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
There is actually a bit more logic in the call stack from EchoBean4_nh7k_EchoRemoteImpl.echo() to EchoBean4_nh7k_Intf.echo()
public String echo1(String s) { return "intf1<" + intf1.echo(s) + ">"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String echo() throws RemoteException {\n\t\treturn \"Hola\";\r\n\t}", "protected void echo(String msg){\n\tSystem.out.println(\"*ECHO*: \" + msg);\n }", "@Override\n\tpublic String echo(String s) throws RemoteException {\n\t\tSystem.out.println(\"Replied to some client saying ’\" + s + \"’\");\n\t\treturn s;\n\t}", "@Override\r\n\tpublic void tvRemote() {\n\t\tSystem.out.println(\"불가능\");\r\n\t}", "public void echo(final String message);", "public Integer getsEcho() {\r\n\t\treturn sEcho;\r\n\t}", "protected RemoteInvocation readRemoteInvocation(HttpExchange exchange)\n/* */ throws IOException, ClassNotFoundException\n/* */ {\n/* 97 */ return readRemoteInvocation(exchange, exchange.getRequestBody());\n/* */ }", "public abstract void echo2(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done);", "private void srediEcho() {\n\t\tToken[] tokeni = new Token[echoNodeTokeni.size()];\n\t\tfor (int i = 0; i < echoNodeTokeni.size(); i++) {\n\t\t\ttokeni[i] = (Token) echoNodeTokeni.get(i);\n\t\t}\n\t\tEchoNode node = new EchoNode(tokeni);\n\n\t\t((Node) stog.peek()).addChildNode(node);\n\t\techoNodeTokeni.clear();\n\t}", "public abstract void echo2(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done);", "public final void mo27572a() {\n this.f19763c.f19791a.f19852n.f19828q = this.f19763c.m21468g();\n ArrayList<Client> arrayList = this.f19762b;\n int size = arrayList.size();\n int i = 0;\n while (i < size) {\n Object obj = arrayList.get(i);\n i++;\n ((Client) obj).getRemoteService(this.f19763c.f19805o, this.f19763c.f19791a.f19852n.f19828q);\n }\n }", "@Override\n public BuilderInput[] onEchoReply(long dpid, EchoReply msg) {\n int xid = (int)(Object)msg.header().xid();\n\n if(xid > messagesCount - 100)\n System.out.println(msg.header().xid());\n\n if(messagesCount > 0){\n messagesCount--;\n return new BuilderInput[] { new EchoRequestInput(new byte[]{2, 2, 2, 2, 2}) };\n }\n else {\n shutdown();\n return new BuilderInput[] { };\n }\n }", "@Override\n\tpublic void say() {\n\t\tSystem.out.println(\"产品A\");\n\t}", "private void displayMsg(Object o) {\n Message msg = ((Datapacket)o).getMsg();\n client.printMessage(msg);\n }", "@SuppressWarnings(\"static-method\")\r\n\tpublic String echo() {\r\n\t\tfinal String echo = \"Atos Firma2E\"; //$NON-NLS-1$\r\n\t\tLOGGER.info(echo);\r\n\r\n\t\treturn echo;\r\n\t}", "@Override\n\tpublic void msgAtCook() {\n\t\t\n\t}", "public abstract void echo(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done);", "@Override\n\tpublic void msgAtCooking() {\n\t\t\n\t}", "public void test1150() throws Exception {\n invokeAsync(createDispatchForNonAnonymousWithWSDLWithoutAddressing(),\n MESSAGES.getNonAnonymousReplyToMessage(),\n S11_NS,\n getNonAnonymousEndpointAddress(),\n clientAddress,\n ECHO_IN_ACTION,\n \"test1150\");\n //Lets see we get a response in 60 s\n SOAPMessage m = respMsgExchanger.exchange(null, TestConstants.CLIENT_MAX_TIMEOUT, TimeUnit.SECONDS);\n// System.out.println(\"****************************\");\n// m.writeTo(System.out);\n// System.out.println(\"\\n****************************\");\n SOAPBody sb = m.getSOAPBody();\n Iterator itr = sb.getChildElements(new QName(\"http://example.org/echo\",\"echoOut\"));\n assertTrue(itr.hasNext());\n }", "private void sendToMyself(ProxyEvent event) throws AppiaEventException {\n \t\ttry {\n \t\t\tProxyEvent clone = (ProxyEvent) event.cloneEvent();\n \t\t\tclone.storeMessage();\n \t\t\tclone.setDir(Direction.DOWN);\n \t\t\tclone.setChannel(vsChannel);\n \t\t\tclone.setSourceSession(this);\n \t\t\tclone.init();\n \n \t\t\tEchoEvent echo = new EchoEvent(clone, this.vsChannel, Direction.UP, this);\n \t\t\techo.init();\n \t\t\techo.go();\n \t\t} catch (CloneNotSupportedException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "public abstract void echo(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done);", "@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}", "public void talk() {\n\n\t}", "public interface EchoService {\n String echo(String string);\n}", "private static void echo(String msg) {\n assert msg != null;\n\n System.out.println(msg);\n }", "public static void echo(String msg)\n {\n System.out.println(msg);\n }", "public EchoClientHandler() {\n firstMessage = Unpooled.buffer(EchoClient.SIZE);\n for (int i = 0; i < firstMessage.capacity(); i ++) {\n firstMessage.writeByte((byte) i);\n }\n }", "public interface DubboEchoService {\n\n String echo(String name);\n}", "public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }", "void visitEchoNode(EchoNode node);", "public static void main(String[] args) {//Èë¿Ú\n\t\tinitLog4j();\n\t\tlogger.info(\"Client launched successfully\");\n\t\t\n\n\t\t// Application logic\n\t\tApplicationLogic applicationLogic = new ApplicationLogic();\n\n\t\tsysReader = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str = null;\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"EchoClient> \");\n\t\t\t// Read from system input\n\t\t\ttry {\n\t\t\t\tstr = sysReader.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Failed to read from system input\");\n\t\t\t\tlogger.error(\"Failed to read from system input\");\n\t\t\t}\n\t\t\tif (!str.trim().equals(\"\")) {\n\t\t\t\t// Get command\n\t\t\t\tString[] token = str.split(\" \");\n\t\t\t\tString cmd = token[0];\n\t\t\t\t// Send\n\t\t\t\tif (cmd.equals(\"send\")) {\n\t\t\t\t\tString msg = str.substring(4, str.length()).trim();\n\t\t\t\t\tif (!msg.equals(\"\")) {\n\t\t\t\t\t\tapplicationLogic.send(msg);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// connect\n\t\t\t\telse if (cmd.equals(\"connect\")) {\n\t\t\t\t\tint length = token.length;\n\t\t\t\t\tif (length == 3) {\n\t\t\t\t\t\t// Get remote server address and port\n\t\t\t\t\t\tString add = token[1];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tint port = Integer.parseInt(token[2]);\n\t\t\t\t\t\t\tString REMOTE_IP = add;\n\t\t\t\t\t\t\tint REMOTE_PORT = port;\n\t\t\t\t\t\t\tapplicationLogic.connect(REMOTE_IP, REMOTE_PORT);\n\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\tSystem.out.println(\"Illigal port format\");\n\t\t\t\t\t\t\tlogger.warn(\"Illigal port format\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Wrong format\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Connect command should be as follow:\\nconnect <address> <port>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// disconnect\n\t\t\t\telse if (cmd.equals(\"disconnect\")) {\n\t\t\t\t\tapplicationLogic.disconnect();\n\t\t\t\t}\n\t\t\t\t// logLevel\n\t\t\t\telse if (cmd.equals(\"logLevel\")) {\n\t\t\t\t\tint length = token.length;\n\t\t\t\t\tif (length == 2) {\n\t\t\t\t\t\t// Get logLevel\n\t\t\t\t\t\tString logLevel = token[1];\n\t\t\t\t\t\tapplicationLogic.logLevel(logLevel);\n\t\t\t\t\t}\n\t\t\t\t\t// Wrong format\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"logLevel command should be as follow:\\nlogLevel <Level> \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// help\n\t\t\t\telse if (cmd.equals(\"help\")) {\n\t\t\t\t\tapplicationLogic.help();\n\t\t\t\t}\n\t\t\t\t// quit\n\t\t\t\telse if (cmd.equals(\"quit\")) {\n\t\t\t\t\tapplicationLogic.quit();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// other inputs\n\t\t\t\telse {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Incorrect command, please try again or input 'help'\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void writeRemoteInvocationResult(HttpExchange exchange, RemoteInvocationResult result, OutputStream os)\n/* */ throws IOException\n/* */ {\n/* 165 */ ObjectOutputStream oos = createObjectOutputStream(decorateOutputStream(exchange, os));\n/* 166 */ doWriteRemoteInvocationResult(result, oos);\n/* 167 */ oos.flush();\n/* */ }", "@MessageMapping(\"/echo\")\n\t@SendToUser(\"/queue/echo\")\n\tpublic MyMessage receiveEcho(SimpMessageHeaderAccessor smha, MyMessage msg) {\n\t\tlogger.debug(\"EchoController.receiveEcho\");\n\t\tif(subscriberSessions.contains(smha.getSessionId())) {\n\t\t\tmsg.setValue(echoService.getMessage(msg.getValue()));\n\t\t} else {\n\t\t\tmsg.setValue(\"No subscription, no echo.\");\n\t\t}\n\t\t\n\t\treturn msg;\n\t}", "@Override\r\n\tpublic void service(Request request,Response response) {\n\t\tresponse.print(\"lalaa\");\r\n\r\n\t\t\r\n\t}", "private void __getReply() throws IOException\n {\n __getReply(true); // tagged response\n }", "protected RemoteInvocation readRemoteInvocation(HttpExchange exchange)\r\n/* 38: */ throws IOException, ClassNotFoundException\r\n/* 39: */ {\r\n/* 40: 91 */ return readRemoteInvocation(exchange, exchange.getRequestBody());\r\n/* 41: */ }", "@Override\n/**\n * Communication Tester method\n */\npublic String Communicate() throws RemoteException {\n\treturn \"Server Says Hi\";\n}", "@Override\r\n\tpublic void sayhello() {\n\t\tSystem.out.println(\"say 22222222...\");\r\n\t}", "@Override\n\tpublic void msgAtKitchen() {\n\t\t\n\t}", "@Override\n\tpublic void messageReceived(IoSession session, Object message) throws Exception {\n\t\t\n\t\tSmsObject sms = (SmsObject) message;\n\t\t//log.info(\"The message is [\" + sms.getMessage() + \"]\");\n\n\t\t/*\n\t\t * other operate\n\n\t\tSystem.out.println(\"================================================\");\n\t\tSystem.out.println(\"Data From : \" + session.getRemoteAddress());\n\t\tSystem.out.println(\"Receiver : [\" + sms.getReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Type : [\" + sms.getDataType() + \"]\");\n\t\tSystem.out.println(\"Data Receiver : [\" + sms.getDataReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Sender : [\" + sms.getDataSender() + \"]\");\n\t\tSystem.out.println(\"Data : [\" + sms.getData() + \"]\");\n\t\tSystem.out.println(\"================================================\");\n\t\t\n\t\t * */\t\n\t\t\n\t\t//The processing of registration information \n\t\tInteger i = new Integer(255);\n\t\tif( i.equals(sms.getReceiver()) &&\n\t\t\ti.equals(sms.getDataType()) &&\n\t\t\ti.equals(sms.getDataReceiver()) &&\n\t\t\ti.equals(sms.getDataSender())) {\n\t\t\t\n\t\t\tcli.addCli(session, sms.getData());\n\t\t\tSystem.out.println(\"Client : \" + session.getRemoteAddress() + \" DONE\");\n\t\t} else {\n\t\t\t//Forwarding\n\t\t\tArrayList<IoSession> tempList = new ArrayList<IoSession>();\n\t\t\ttempList = cli.getCli(sms.getReceiver());\n\t\t\t\n\t\t\tSystem.out.println(\"tempting=======>\" + session.getRemoteAddress() + \" with receiver : \" + sms.getReceiver());\n\t\t\tif(tempList != null) {\n\t\t\t\t//System.out.println(\"true\");\n\t\t\t\tfor (IoSession session1 : tempList){\n\t\t\t\t\tSystem.out.println(\"Send =========>\" + session1.getRemoteAddress());\n\t\t\t\t\tsession1.write(sms);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"================================================\");\n\t\t\t}\n\t\t\telse System.out.println(\"forwarding false\");\n\t\t}\n\t\t\n\t\t//Trigger the client\n\t\tsms.setReceiver(i);\n\t\tsms.setDataType(i);\n\t\tsms.setDataReceiver(i);\n\t\tsms.setDataSender(i);\n\t\tsms.setData(\" \");\n\t\tsession.write(sms);\n\n\t}", "@Override\n\tvoid showMsg() {\n\t\tSystem.out.println(\"Sample\");\n\t}", "private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }", "public void printMsg() {\n System.out.println(\"This is an example RMI program\");\n }", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Echo\")\n public void echo() {\n // Query the user for an input\n String answer = JOptionPane.showInputDialog(null, \"This is an example.\\nType in any text to echo.\");\n // Show an information message\n JOptionPane.showMessageDialog(null, \"You typed '\" + answer + \"'\", \"Example Echo\", JOptionPane.INFORMATION_MESSAGE);\n }", "@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}", "public interface HelloOperations \n{\n String echoString (String mesg);\n}", "@Override\n\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\tSystem.out.println(arg0);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n public void handleMessage(Message msg) {\n }", "@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}", "public String echo(String str) {\n\t\t\treturn str;\r\n\t\t}", "public void msg1()\r\n\t{\n\t\t\r\n\t}", "public EchoClientHandler()\n {\n String data = \"hello zhang kylin \" ;\n firstMessage = Unpooled.buffer(2914) ;\n firstMessage.writeBytes(data.getBytes()) ;\n }", "@Override\n\tpublic void call() {\n\t\tSystem.out.println(\"dog say: gau gau!\");\n\t}", "@Override\n public void sendToProxy(String message) {\n }", "@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws UnknownHostException, IOException, ClassNotFoundException {\n\t\tSocket sock = new Socket(IP_adr, Port);\n\t\tCommunicationModule cm = new CommunicationModule();\n\n\t\tTranSegment seg = new TranSegment(Obj_Key, method.getName(), args);\n\n\t\tboolean s = cm.SendObj(sock, seg);\n\t\tif (s) {\n\t\t\t//Get the invoking result returned from server end\n\t\t\tObject result = cm.RecObj(sock);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic void say() {\n\t\tSystem.out.println(\"¸Û¸Û\");\n\n\t}", "public void send() {\n\t}", "public String echo(String str) {\n\t\treturn str;\r\n\t}", "@Override\n public void printPushMessage(Ui ui) {\n }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void send(int highOption, int option) throws InstantiationException, IllegalAccessException, IOException, InterruptedException, ClassNotFoundException, RemoteReadException\n\t{\n\t\tint index = 0;\n\t\tClientHelloWorldBroadcastResponse broadcastResponse;\n\t\tClientHelloWorldAnycastResponse anycastResponse;\n\t\tClientHelloWorldUnicastResponse unicastResponse;\n\t\tswitch (option)\n\t\t{\n\t\t\tcase ChatOptions.TYPE_CHAT:\n\t\t\t\tSystem.out.println(\"Please type your message: \");\n\t\t\t\tString message = in.nextLine();\n\t\t\t\tswitch (highOption)\n\t\t\t\t{\n\t\t\t\t\tcase MulticastOptions.BROADCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldBroadcastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is broadcast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldAnycastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is anycast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldUnicastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is unicast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.BROADCAST_REQUEST:\n\t\t\t\t\t\tbroadcastResponse = (ClientHelloWorldBroadcastResponse)MulticastClient.FRONT().read(new ClientHelloWorldBroadcastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is broadcast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + broadcastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldBroadcastResponse response : broadcastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_REQUEST:\n\t\t\t\t\t\tunicastResponse = (ClientHelloWorldUnicastResponse)MulticastClient.FRONT().read(new ClientHelloWorldUnicastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is unicast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + unicastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldUnicastResponse response : unicastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_REQUEST:\n\t\t\t\t\t\tanycastResponse = (ClientHelloWorldAnycastResponse)MulticastClient.FRONT().read(new ClientHelloWorldAnycastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is anycast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + anycastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldAnycastResponse response : anycastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase ChatOptions.QUIT_CHAT:\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 101;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "void sendMessage() {\n\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 102;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "@Override\n\t/**\n\t * Concrete implementation of the method defined by the Hello interface.\n\t */\n\tpublic String sayHello() throws RemoteException {\n\t\treturn \"Prey for Gordon Hayward!\";\n\t}", "private void sendToOtherServers(ProxyEvent proxyEvent) throws AppiaEventException {\n //\t\tSystem.out.println(\"Sending to other servers: \"+ proxyEvent);\n \t\tproxyEvent.storeMessage();\n \t\tproxyEvent.setDir(Direction.DOWN);\n \t\tproxyEvent.setChannel(vsChannel);\n \t\tproxyEvent.setSourceSession(this);\n \t\tproxyEvent.init();\n \t\tproxyEvent.go();\n \n \t}", "private byte[] execHandlerWrite( Message msg ) {\n\t\tbyte[] bytes = (byte[]) msg.obj;\n \tString data = mByteUtility.bytesToHexString( bytes ); \n\t\tlog_d( \"EventWrite \" + data );\n\t\treturn bytes;\n\t}", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "@Override\r\n\tprotected String doIntercept(ActionInvocation invoker) throws Exception {\n\t\tSystem.out.println(\"ssssssssssss\");\r\n\t\t\r\n\t\treturn invoker.invoke();\r\n\t}", "protected void writeRemoteInvocationResult(HttpExchange exchange, RemoteInvocationResult result, OutputStream os)\r\n/* 65: */ throws IOException\r\n/* 66: */ {\r\n/* 67:159 */ ObjectOutputStream oos = createObjectOutputStream(decorateOutputStream(exchange, os));\r\n/* 68:160 */ doWriteRemoteInvocationResult(result, oos);\r\n/* 69:161 */ oos.flush();\r\n/* 70: */ }", "public static void main(String [] args) {\n\t\t//System.load(\"/usr/local/src/freeswitch/libs/esl/java/libesljni.so\");\n\t\tSystem.load(\"/usr/local/freeswitch/scripts/Mod_CallCenterScripts/libesljni.so\");\n\t\tESLconnection con = new ESLconnection(\"127.0.0.1\",\"8021\",\"ClueCon\");\n\t//\tESLconnection con = new ESLconnection(\"10.128.83.112\",\"8021\",\"ClueCon\");\n\t\tESLevent evt;\n\t\tif (con.connected() == 1) System.out.println(\"connected\");\n\t\tcon.events(\"plain\",\"all\");\n\t\t\n\t\tint mode =0;\n\t\twhile (con.connected() == 1) {\t\t\t\t\t\t\n\t\t\t// Get an event - recvEvent will block if nothing is queued\n\t\t\tevt = con.recvEvent();\n\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\tString str = \"\";\n\t\t\t//System.out.println(\"Got the body as :\"+str);\n\t\t\tstr = evt.getHeader(\"Event-Name\",-1);\n\t\t\tif(str==null){\n\t\t\t\tSystem.out.println(\"Got nul event skipping\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(str.equals(\"CUSTOM\")){\n\t\t\t\t//System.out.println(\"Got a Custom event\"+str);\n\t\t\t\tstr = evt.getHeader(\"Event-Subclass\",-1);\n\t\t\t\tif(str.equals(\"callcenter::info\")){\n\t\t\t\t\tSystem.out.println(\"Got a CallCenter event\"+str);\n\t\t\t\t\tstr = evt.getHeader(\"CC-Action\",-1);\n\t\t\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\tif(str.equals(\"member-queue-start\")){\n\t\t\t\t\t\tSystem.out.println(\"Someone entering the queue \"+str);\n\t\t\t\t\t\t//CC-Queue: support@default\n\t\t\t\t\t\t//CC-Action: member-queue-start\n\t\t\t\t\t\t//CC-Member-UUID: 453324f8-3424-4322-4242362fd23d \n\t\t\t\t\t\t//CC-Member-Session-UUID: b77c49c2-a732-11df-9438-e7d9456f8886\n\t\t\t\t\t\t//CC-Member-CID-Name: CHOUINARD MO\n\t\t\t\t\t\t//CC-Member-CID-Number: 4385551212\n\t\t\t\t\t\tString Caller = evt.getHeader(\"CC-Member-CID-Number\",-1);\n\t\t\t\t\t\tif(Caller.startsWith(\"11\")){\n\t\t\t\t\t\t\tCaller = Caller.substring(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(Caller.length()>10){\n\t\t\t\t\t\tCaller = Caller.substring(Caller.length()-10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString Query=\"Insert into Announcement(Number, Date, Mtype,Textualdate,CallUUID) value('\"+Caller+\"',NOW(),'M\"+mode+\"','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t\t\t\t\t\tString Mesg= evt.getHeader(\"CC-Member-Session-UUID\",-1)+\",\";\n\t\t\t\t\t\t\t\tMesg+=updateandReturn(Query);\n\t\t\t\t\t\tif(mode<5){\n\t\t\t\t\t\t\tif(mode==0){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//SimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t//Thread th = new Thread(p);\n\t\t\t\t\t\t\t\t//th.start();\n\t\t\t\t\t\t\t}else if(mode==1){\n\t\t\t\t\t\t\t\tPosition p = new Position(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==2){\n\t\t\t\t\t\t\t\tSimpleTime p = new SimpleTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==3){\n\t\t\t\t\t\t\t\tDynamicTime p = new DynamicTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==4){\n\t\t\t\t\t\t\t\tManipulatedTime p = new ManipulatedTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t//\tmessage_announce(evt.getHeader(\"CC-Member-Session-UUID\",-1));\n\t\t\t\t\t\tmode++;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t if(mode==5){\n\t\t\t\t\t\t\t\t\tSimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\t\tth.start();\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\tmode=0;\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\t\t//String Query=\"Insert into calls(StartTime, Number, Bound, TextualDate, CallUUID) values(Now(),'\"+Caller+\"','IN','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t//update(Query);\n\t\t\t\t\t\t\t\t\t\n\t}\n\t\t\n\t\t\t\t}else{\n\t\t\t\t//\tSystem.out.println(\"EVent Subclass is \"+ str);\n\t//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t}\n\t\t\t}else{\n//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t}\n\n\t\t\t// Print the entire event in key : value format. serialize() according to the wiki usually takes no arguments\n\t\t\t// but if you do not put in something you will not get any output so I just stuck plain in.\t\t\t\n\n\t\t}\n\t}", "public void receiveAndEcho() {\r\n\t\t//byte[] result = new byte[filenameByte.length + modeByte.length + 4];\r\n\t\tbyte data[] = new byte[100];\r\n\t receivePacket = new DatagramPacket(data, data.length);\r\n\t System.out.println(\"Server: Waiting for packet from Host.\\n\");\r\n\t\t\r\n\t try {\r\n\t\t\treceiveSocket.receive(receivePacket);\r\n\t\t}\r\n\t\tcatch(IOException e) {\r\n\t\t\tSystem.out.print(\"IO Exception: likely:\");\r\n\t System.out.println(\"Receive Socket Timed Out.\\n\" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t\tcurrentStatus = false;\r\n\t\t\treceiveSocket.close();\r\n\t\t\tsendSocket.close();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"***Server: Packet received from Host***\");\r\n\t\tSystem.out.println(\"From host: \" + receivePacket.getAddress());\r\n\t\tSystem.out.println(\"Host port: \" + receivePacket.getPort());\r\n\t\tSystem.out.print(\"Containing: \");\r\n\t\t\r\n\t\t// Form a String from the byte Array. Print String + byte\r\n\t\tString received = new String(data, 0, receivePacket.getLength());\r\n\t\tSystem.out.println(received);\r\n\t\tSystem.out.println(receivePacket.getData() + \"\\n\");\r\n\t\t\r\n\t\t// Slow things down (wait 5 seconds)\r\n\t try {\r\n\t \tThread.sleep(69);\r\n\t } \r\n\t catch (InterruptedException e ) {\r\n\t e.printStackTrace();\r\n\t currentStatus = false;\r\n\t receiveSocket.close();\r\n\t\t\tsendSocket.close();\r\n\t System.exit(1);\r\n\t }\r\n\t \r\n\t // Sending Packet back to Host to Client\r\n\t byte serverResponse[] = Parse(receivePacket.getData());\r\n\t sendPacket = new DatagramPacket(serverResponse, serverResponse.length,\r\n receivePacket.getAddress(), receivePacket.getPort());\r\n\r\n\t System.out.println(\"***Server: Sending packet to Host***\");\r\n\t System.out.println(\"To host: \" + sendPacket.getAddress());\r\n\t System.out.println(\"Destination host port: \" + sendPacket.getPort());;\r\n\t System.out.print(\"Containing: \");\r\n\t System.out.println(Arrays.toString(serverResponse));\r\n\t //System.out.println(new String(sendPacket.getData(),0, sendPacket.getLength()));\r\n\t System.out.println(sendPacket.getData() + \"\\n\");\r\n\t System.out.println(\"Server: Packet sent.\");\r\n\r\n\t // Send the datagram packet to the client via the send socket. \r\n\t try {\r\n\t \tsendSocket.send(sendPacket);\r\n\t } catch (IOException e) {\r\n\t \te.printStackTrace();\r\n\t \tcurrentStatus = false;\r\n\t \treceiveSocket.close();\r\n\t\t\tsendSocket.close();\r\n\t \tSystem.exit(1);\r\n\t }\r\n\t}", "public void invoke() throws Exception, IOException {\n java.io.PrintWriter out = response.getWriter();\n out.println(\"Welcome to ping\");\n return;\n}", "private void vCarg()\n {\n /*Contiene la MAC del equipo*/\n String sMAC;\n\n /*Obtiene la MAC del equipo*/\n InetAddress ip;\n try \n {\n /*Obtiene la ip local del equipo*/\n ip = InetAddress.getLocalHost(); \n\n /*Obtiene otros parámetros de conexión*/\n NetworkInterface network = NetworkInterface.getByInetAddress(ip);\n\n /*Obtiene en bytes la MAC*/\n byte[] mac = network.getHardwareAddress();\n\n /*Dale formato a la MAC*/\n StringBuilder sb = new StringBuilder();\n for(int i = 0; i < mac.length; i++) \n sb.append(String.format(\"%02X%s\", mac[i], (i < mac.length - 1) ? \"-\" : \"\")); \n\n /*Inicia la MAC*/\n sMAC = sb.toString();\n }\n catch(UnknownHostException expnUnknowHos) \n {\n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnUnknowHos.getMessage(), Star.sErrUnknowHos, expnUnknowHos.getStackTrace()); \n return; \n }\n catch(SocketException expnSock)\n {\n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnSock.getMessage(), Star.sErrSock, expnSock.getStackTrace()); \n return; \n }\n \n /*Obtiene del web service los mensajes de esta MAC ya desencriptados*/\n String sResp;\n try\n {\n sResp = Star.sDecryp(msjmac(Star.sEncrip(sMAC)));\n }\n catch(Exception expnExcep)\n { \n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnExcep.getMessage(), Star.sErrExcep, expnExcep.getStackTrace()); \n return; \n } \n\n /*Agrega en el control la respuesta del servidor*/\n jED1.setText(sResp); \n \n }", "public void m23076a(RemoteMessage remoteMessage) {\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }", "public String receiveResponse()\n\t{\n\t\t\n\t}", "public synchronized void m29984l() {\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeatSlave \");\n }\n f23274i++;\n mo33398h();\n if (C6973b.m29763a().mo33291f(C6973b.m29776f())) {\n if (!C7048a.m30142d(C6973b.m29776f())) {\n C6864a.m29308i(Constants.ServiceLogTag, \"network is unreachable ,give up and go on slave service\");\n } else if (C6973b.m29776f() != null) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n boolean isForeiginPush = XGPushConfig.isForeiginPush(C6973b.m29776f());\n String str = Constants.ACTION_SLVAE_2_MAIN;\n String str2 = Constants.ServiceLogTag;\n if (isForeiginPush) {\n C6864a.m29308i(str2, \"isForeiginPush network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else if (C6979b.m29795a(C6973b.m29776f()).mo33300b()) {\n C6864a.m29308i(str2, \"network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else {\n C6864a.m29308i(str2, \"network is error , go on slave service\");\n }\n }\n });\n } else {\n C6864a.m29308i(Constants.ServiceLogTag, \"PushServiceManager.getInstance().getContext() is null\");\n }\n }\n }", "protected void doInvocation(){\n org.omg.CORBA.portable.Delegate delegate=StubAdapter.getDelegate(\n _target);\n // Initiate Client Portable Interceptors. Inform the PIHandler that\n // this is a DII request so that it knows to ignore the second\n // inevitable call to initiateClientPIRequest in createRequest.\n // Also, save the RequestImpl object for later use.\n _orb.getPIHandler().initiateClientPIRequest(true);\n _orb.getPIHandler().setClientPIInfo(this);\n InputStream $in=null;\n try{\n OutputStream $out=delegate.request(null,_opName,!_isOneWay);\n // Marshal args\n try{\n for(int i=0;i<_arguments.count();i++){\n NamedValue nv=_arguments.item(i);\n switch(nv.flags()){\n case ARG_IN.value:\n nv.value().write_value($out);\n break;\n case ARG_OUT.value:\n break;\n case ARG_INOUT.value:\n nv.value().write_value($out);\n break;\n }\n }\n }catch(Bounds ex){\n throw _wrapper.boundsErrorInDiiRequest(ex);\n }\n $in=delegate.invoke(null,$out);\n }catch(ApplicationException e){\n // REVISIT - minor code.\n // This is already handled in subcontract.\n // REVISIT - uncomment.\n //throw new INTERNAL();\n }catch(RemarshalException e){\n doInvocation();\n }catch(SystemException ex){\n _env.exception(ex);\n // NOTE: The exception should not be thrown.\n // However, JDK 1.4 and earlier threw the exception,\n // so we keep the behavior to be compatible.\n throw ex;\n }finally{\n delegate.releaseReply(null,$in);\n }\n }", "private static void demo2() throws RemoteException {\n\t\tCheckOutRoomService service = new CheckOutRoomServiceImpl();\r\n\t\tString clientID = \"0000001\";\r\n\t\tString hotelID = \"00001\";\r\n\t\t//System.out.println(service.checkOutRoom(clientID, hotelID));\r\n\t\tList<String> numbers = new ArrayList<String>();\r\n\t\t\r\n\t\tList<RoomVO> volist = service.getAllRooms(clientID, hotelID);\r\n\t\tfor(RoomVO vo:volist){\r\n\t\t\tshow(vo);\r\n\t\t\tnumbers.add(vo.getRoomNumber());\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(service.checkOutRoom(clientID, hotelID, \"102\"));\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void processMessage(String msg) {\n\t\t\tif (msg.equals(Message.TEST_SERVER)) {\n\t\t\t\tSystem.out.println(\"Server test passed. Testing client...\");\n\t\t\t\tpw.println(Message.TEST_CLIENT);\n\t\t\t}\n\t\t}", "public void stopEchoTester();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void talk(){\n\t\tSystem.out.println(this.name+\"が話す\");\n\t}", "public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }", "@Override\n\tpublic void print() {\n\t\tSystem.out.print(\"MsgOwner\");\n\t}", "public abstract void mo53652a(PushCommand vVar);", "@Override\n\tpublic void talk() {\n\t\tSystem.out.println(\"黄种人-说\");\n\t}", "@ReflectiveMethod(name = \"h\", types = {})\n public void h(){\n NMSWrapper.getInstance().exec(nmsObject);\n }", "@ReflectiveMethod(name = \"h\", types = {})\n public void h(){\n NMSWrapper.getInstance().exec(nmsObject);\n }", "public InvokeReply(KSNSerializableInterface v) {\n super(ProtocolOpcode.INVOKE_REPLY);\n returnValue = v;\n }", "public void sendMessage2Client(String msg){\n\t\t\t\n\t\t\toutPrintStream.println(msg);\n\t\t\t\n\t\t}", "public void comer(){\r\n\t\tSystem.out.println(\"He comido\");\r\n\t}", "@SubscribeMapping(\"/echo\")\n\tpublic void subscribeEcho(SimpMessageHeaderAccessor smha) {\n\t\tlogger.debug(\"EchoController.subscribeEcho\");\n\t\tsubscriberSessions.add(smha.getSessionId());\n\t}", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n\t\t\t/////String host = InetAddress.getLocalHost().getHostName();\r\n \t\tSocket client = new Socket(\"131.159.52.1\", 50000);\r\n\t\t\t\t\r\n\t\t\tPrintWriter writer = new PrintWriter(client.getOutputStream());\r\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(client.getInputStream()));\r\n\r\n\t\t\tBufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));\r\n\t\t\t\r\n\t\t\tSystem.out.println(reader.readLine()); //read welcome message\r\n\t\t\t\r\n\t\t\tString message;\r\n\t\t\t\r\n\t\t\twhile (true) {\r\n\t\t\t\t////System.out.print(\"Enter message to echo or Exit to end : \");\r\n\t\t\t\tmessage = stdin.readLine();\r\n\t\t\t\t\r\n\t\t\t\tif (message == null || message.equalsIgnoreCase(\"exit\"))\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\twriter.println(message);\r\n\t\t\t\twriter.flush();\r\n\t\t\t\tSystem.out.println(reader.readLine());\r\n\t\t\t}\r\n\t\t\tclient.close();\r\n\t\t\t\t\t\r\n\t\t}catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Exception: \"+ex);\r\n\t\t}\r\n\t}", "public ChannelOutboundInvoker method_4125() {\n return this.method_4121();\n }", "public void handle(HttpExchange h) throws IOException {\n String message = \"The server is running without any problem\"; //Message to be shown to client\n h.sendResponseHeaders(200, message.length());//response code and the length of message to be sent\n \n /*writes in the output stream, converts the message into array of bytes and closes the stream.*/\n OutputStream out = h.getResponseBody();\n out.write(message.getBytes());\n out.close();\n }", "public static void main(String[] args) {\n DataWsImpleService factory=new DataWsImpleService();\n DataWs dataws= factory.getDataWsImplePort();\n /* System.out.println(\"ok1\");\n //添加请求的客户端对象\n Client client= ClientProxy.getClient(dataws);\n //添加输出拦截器\n System.out.println(\"ok1\");\n List<Interceptor<? extends Message>> OutInterceptors =client.getOutInterceptors();\n OutInterceptors.add(new LoggingOutInterceptor());\n System.out.println(\"ok1\");\n //添加输入拦截器\n List<Interceptor<? extends Message>> InInterceptors =client.getInInterceptors();\n InInterceptors.add(new LoggingInInterceptor());\n */\n// System.out.println(\"ok2\");\n dataws.getStudentbyId(1);\n System.out.println(\"succeed\");\n \n }", "public void handleToggleButtonEcho() {\n\t\tif (toggleButtonEcho.isSelected() == true) {\n\t\t\tcontroller.audioManipulatorUseDelayProcessor(true);\n\t\t\tsliderEchoLength.setDisable(false);\n\t\t\tsliderDecay.setDisable(false);\n\t\t\ttextFieldEchoLength.setDisable(false);\n\t\t\ttextFieldDecay.setDisable(false);\n\t\t\ttoggleButtonEcho.setText(bundle.getString(\"mixerToggleButtonOn\"));\n\t\t} else {\n\t\t\tcontroller.audioManipulatorUseDelayProcessor(false);\n\t\t\tsliderEchoLength.setDisable(true);\n\t\t\tsliderDecay.setDisable(true);\n\t\t\ttextFieldEchoLength.setDisable(true);\n\t\t\ttextFieldDecay.setDisable(true);\n\t\t\ttoggleButtonEcho.setText(bundle.getString(\"mixerToggleButtonOff\"));\n\t\t}\n\n\t}" ]
[ "0.665768", "0.6296855", "0.6012944", "0.59328425", "0.5793197", "0.57263964", "0.569711", "0.5660602", "0.5655251", "0.5652374", "0.56112176", "0.5589723", "0.55848855", "0.5544976", "0.5528993", "0.55181473", "0.5516831", "0.5507122", "0.5503503", "0.5502521", "0.5499119", "0.54708934", "0.5452786", "0.54522824", "0.5450729", "0.5448067", "0.54131484", "0.54009324", "0.5395867", "0.5394399", "0.5392267", "0.5381068", "0.53689957", "0.5367617", "0.53575593", "0.53505915", "0.53469443", "0.53136224", "0.5307603", "0.5293127", "0.5292831", "0.5285655", "0.52843964", "0.527803", "0.5257551", "0.5251511", "0.5227287", "0.5222352", "0.52053285", "0.5202685", "0.51937926", "0.51895374", "0.51860243", "0.51856077", "0.518356", "0.51832837", "0.5174863", "0.51685697", "0.51671284", "0.5164847", "0.5161244", "0.51524216", "0.51488304", "0.5146355", "0.51426387", "0.5142333", "0.5134825", "0.5127962", "0.512241", "0.5120884", "0.5111295", "0.5110404", "0.51004785", "0.50960654", "0.50852525", "0.5076164", "0.507413", "0.5072641", "0.506404", "0.50631756", "0.50613314", "0.5058454", "0.5056416", "0.5056099", "0.5055382", "0.5052649", "0.5050799", "0.50503296", "0.5044747", "0.5042487", "0.5042487", "0.504105", "0.50325656", "0.50290126", "0.502406", "0.5022183", "0.5021342", "0.50209963", "0.5020827", "0.50171226" ]
0.5618884
10
Created by yilei on 2015/9/23.
public interface ICardService { /** * 查询帖子 * @param params {"bbsid": 1, "housename": "test"} * @return * @throws Exception */ String search(String params) throws Exception; /** * 创建帖子 * @param params {'bbsId':1,'customerId':1,'content':'test','lon':'1.1','lat':'1.1','address':'YanJiaQiao No.1','picUrls':'1.jpg,2.jpg,3.jpg'} * @return * @throws Exception */ String cardCreate(String params) throws Exception; /** * 创建帖子 * @param params {'houseid':1, 'bbsid': 1,'customerId':1,'content':'test','lon':'1.1','lat':'1.1','address':'YanJiaQiao No.1','picUrls':'1.jpg,2.jpg,3.jpg'} * @return * @throws Exception */ String insertCard(String params) throws Exception; /** * 点赞 * @param params {"cardid":"1","cardownerid":"1","customerid":"2"} * @return */ String like(String params) throws Exception; /** * 评论 * @param params {"bbsid":"1","cardid":"1","housename":"test","customerid":"2","cardownerid":"1","content":"xxxxx"} * @return * @throws Exception */ String comment(String params) throws Exception; /** * 回复 * @param params {"bbsid":"1","cardid":"1","cardownerid":"1","housename":"test","senderid":"2","commentid":"1","receiverid":"1","content":"xxxxx"} * @return * @throws Exception */ String resp(String params) throws Exception; /** * 添加帖子图片 * @param params (帖子ID,图片ID数组) * @return */ String addPicture(String params) throws Exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void init() {\n\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private void kk12() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\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\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo6081a() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void init() {\n\n\n\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {}", "public void mo55254a() {\n }", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}" ]
[ "0.6239814", "0.6140246", "0.6107143", "0.60851586", "0.60480684", "0.60480684", "0.600316", "0.60022765", "0.59850746", "0.5950542", "0.5930202", "0.5892679", "0.5889285", "0.58643305", "0.5859562", "0.5821791", "0.5821791", "0.581955", "0.5818806", "0.5807187", "0.5798472", "0.57844144", "0.5775587", "0.57749736", "0.5764015", "0.57518417", "0.57518417", "0.57518417", "0.57518417", "0.57518417", "0.5748474", "0.5733889", "0.57218444", "0.5703699", "0.56900257", "0.568531", "0.56769305", "0.56769305", "0.56769305", "0.5662112", "0.565906", "0.56557405", "0.5653432", "0.5639466", "0.5635743", "0.5635743", "0.56330717", "0.5627989", "0.5625498", "0.5621728", "0.5621728", "0.5621728", "0.56212145", "0.5618065", "0.5609243", "0.56053376", "0.56053376", "0.5605318", "0.55918354", "0.55918354", "0.55918354", "0.558667", "0.5580955", "0.55783844", "0.55471176", "0.55471176", "0.55471176", "0.55471176", "0.55471176", "0.55471176", "0.55471176", "0.5536717", "0.5536462", "0.55356675", "0.55348784", "0.5533707", "0.5533357", "0.553199", "0.5524084", "0.552209", "0.552209", "0.552209", "0.552209", "0.552209", "0.552209", "0.55189997", "0.5518249", "0.55165094", "0.5513475", "0.5499674", "0.5495599", "0.5491308", "0.54842484", "0.5480437", "0.5478479", "0.54684675", "0.54684675", "0.5464541", "0.5463698", "0.54554594", "0.5454021" ]
0.0
-1
Visit your dashboard button
public WebElement profileSetUpTab() { return getElementfluent(By.xpath("//menuitem[contains(text(),'Profile')]")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickDashboardLink() {\n this.action.click(this.dashboardLink);\n }", "public void click_dashboardMenu_button() {\n\t\tdashboardMenu.click();\n\t}", "@Given(\"^user launch on dashboard page$\")\r\n\tpublic void user_launch_on_dashboard_page() {\r\n\t\tdashboarpage.validatelandedondashboarpage();\r\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), Dashboard.class);\n startActivity(intent);\n }", "public void AdminLink(){\n\t\tAdminLink.click();\n\t}", "@Override\n public void onClick(int dashboardId) {\n // We aren't using this method in this application\n }", "private void startDashboard() {\n Intent intent = new Intent(this, Dashboard.class);\n startActivity(intent);\n }", "@Test(groups = \"wso2.ds.dashboard\", description = \"Tests dashboard personalization\", dependsOnMethods = \"testForViewer\")\n public void testCustomizeButtonDashboard()\n throws MalformedURLException, XPathExpressionException {\n getDriver().findElement(By.cssSelector(\"i.ues-copy\")).click();\n selectPane(\"pages\");\n getDriver().findElement(By.cssSelector(\"[name=title]\")).clear();\n getDriver().findElement(By.cssSelector(\"[name=title]\")).sendKeys(DASHBOARD_PAGE_NAME + \"\\n\");\n assertEquals(DASHBOARD_PAGE_NAME, getDriver().findElement(By.cssSelector(\"div.page-title h1\")).getText(),\n \"error occurred while edit the new page name\");\n }", "@Override\r\n public void onClick(View v){\n RequestUrl(\"led2\");\r\n }", "@Override\r\n public void onClick(View v){\n RequestUrl(\"led1\");\r\n }", "public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }", "public DashboardPage clickLogin() {\n driver.findElement(By.id(\"login-button\")).click();\n return new DashboardPage(driver);\n }", "public DashboardPage clickloginButton (){\n driver.findElement(loginButton).click ();\n\n return new DashboardPage (driver);\n }", "public void gotoAdminLogin(){ application.gotoAdminLogin(); }", "@Then(\"view Dashboard\")\n\tpublic void view_dashboard() {\n\t\taddCust = new addCustomerPage(driver);\n\t\tAssert.assertEquals(\"Dashboard / nopCommerce administration\",addCust.getPageTitle());\n\t}", "void clickOnRefreshButton() {\n\t\tSeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.buttonTagRefreshButtonHomepageVehiclePlanning);\n\t}", "@Override\n public void onClick(View view) {\n if (testMode) {\n startDashboard();\n } else {\n attemptLogin();\n }\n }", "public void navigateToDashboard() {\n String currentUrl = driver.getCurrentUrl();\n if(!currentUrl.contains(DashboardPageAddress)) {\n driver.navigate().to(baseUrl + DashboardPageAddress);\n }\n }", "public void clickOnRegisterButton() {\n Reporter.addStepLog(\" Click on register button \" + _registerBtn.toString());\n clickOnElement(_registerBtn);\n log.info(\" Click on register button \" + _registerBtn.toString());\n }", "public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }", "@Override\n public void buttonClick(ClickEvent event) {\n \tgetUI().getNavigator().navigateTo(NAME + \"/\" + contenView);\n }", "public void sendToDashboard() {\n\n\t\tif (Constants.DEBUG) {\n\t\t}\n\t}", "public void LoginButton() {\n\t\t\r\n\t}", "HtmlPage clickSiteLink();", "public void navigateToHomePage()\n\t {\n\t if(getAdvertisementbtn().isPresent())\n\t getAdvertisementbtn().click();\n\t }", "@Test(priority=1)\n public void adminPage(){\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/nav/a[5]\")).click();\n\t}", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL);\r\n }", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}", "public Action getIndexApiAction() {\r\n Thing object = new Thing.Builder()\r\n .setName(\"Dashboard Page\") // TODO: Define a title for the content shown.\r\n // TODO: Make sure this auto-generated URL is correct.\r\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\r\n .build();\r\n return new Action.Builder(Action.TYPE_VIEW)\r\n .setObject(object)\r\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\r\n .build();\r\n }", "@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException 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\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }", "HtmlPage clickSiteName();", "@Override\n public void onClick(View v)\n {\n Intent viewIntent =\n new Intent(\"android.intent.action.VIEW\",\n Uri.parse(\"https://datadiscovery.nlm.nih.gov/Drugs-and-Supplements/Pillbox/crzr-uvwg\"));\n startActivity(viewIntent);\n }", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Signup Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "@Step\n public void clickRegistrationButton(){\n actionWithWebElements.clickOnElement(registrationButton);\n }", "private WriteAReviewPage clickOnStartHereButton(){\n click(button_StartHereLocator);\n return new WriteAReviewPage();\n }", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/\"));\n startActivity(browserIntent);\n }", "public void performLogin(View view) {\r\n // Do something in response to button\r\n\r\n Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://dev.m.gatech.edu/login/private?url=gtclicker://loggedin&sessionTransfer=window\"));\r\n startActivity(myIntent);\r\n }", "@Step\n public void clickContactUsPage(){\n contactusPages.clickContactUsPage();\n }", "public void sendLoginClickPing() {\n WBMDOmnitureManager.sendModuleAction(new WBMDOmnitureModule(\"reg-login\", ProfessionalOmnitureData.getAppNamePrefix(this), WBMDOmnitureManager.shared.getLastSentPage()));\n }", "@Override\n public void onClick(View v) {\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }", "public void openUsagePoints() {\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.id(\"button-1049\")).click();\n }", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "public void goWebSite() {\n\n if (mIsFirst) {\n mSnackbar.setText(getString(R.string.please_wait)).show();\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mSiteData.getUrl()));\n //intent.putExtra(\"url\", webData.getUrl());\n //startActivity(intent);\n startActivityForResult(intent, 100);\n //showToolbarProgressBar();\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "public void pageListAtmosphere(View view) {\n start_button.setEnabled(false);\n Intent intent = new Intent(getApplicationContext(), PageVersion2.class);\n startActivity(intent);\n\n }", "public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}", "@Test\r\n public void testHomePageButton() {\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n\r\n tester.clickLink(\"HomePageButton\", false);\r\n tester.assertRenderedPage(GreenOMeterPage.class);\r\n }", "public void OutputToSmartDashboard()\n\t{\n\t\t\n\t}", "public void clickRegisterLink() {\n $(registerLink).click();\n }", "HtmlPage clickLink();", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL + \"support\");\r\n }", "public void clickgoButton(){\n \n \t \n driver.findElement(By.cssSelector(goButton)).click();\n }", "public static void pushApplySiteSettingsButton()\n\t\n\t{\n//\t\tMoveAndClick.OneElement(\"//input[@value='Log in now']\");\n\t\t\n\t}", "private void setDashboard(){\n lblUsername.setText(username);\n if(roles.equals(\"employeer\")){\n jBtnLamar.setText(\"Lihat Pelamar\");\n jBtnKerja.setText(\"Tambah Lowongan\");\n btnLowonganku.setVisible(true);\n }\n \n }", "@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Register Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.gteducation.in\"));\n startActivity(intent);\n Toast.makeText(NoticeActivity.this,\"go to my website\",Toast.LENGTH_SHORT).show();\n\n }", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"Login Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "@Override\r\n public void onClick(View view) {\n Intent intent = new Intent(GuidePage.this, LoginOrRegister.class);\r\n startActivity(intent);\r\n }", "@Test (groups = {\"Regression\",\"Smoke\"})\n public void verifyClickOnServicesBtn() {\n homePage.clickOnServicesBtn();\n }", "public DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}", "private void viewPageClicked() {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n try{\n Desktop d = Desktop.getDesktop();\n d.browse(new URI(itemView.getItem().getURL()));\n }catch(Exception e){\n e.printStackTrace();\n }\n\n showMessage(\"View clicked!\");\n }", "@Override\n public void onItemClick(String url) {\n RxBus2.getInstance().post(Constants.SHOW_WEBVIEW, url);\n RxBus3.getInstance().post(Constants.SHOW_WEBVIEW, url);\n }", "void updateDashboard() {\n\t}", "private void dashboard() {\n\n Timeline timeline = new Timeline(\n new KeyFrame(Duration.seconds(0),\n new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n Calendar time = Calendar.getInstance();\n\n String hourString = POSUtilies.pad(2, ' ', time.get(Calendar.HOUR) == 0 ? \"12\" : time.get(Calendar.HOUR) + \"\");\n String minuteString = POSUtilies.pad(2, '0', time.get(Calendar.MINUTE) + \"\");\n String secondString = POSUtilies.pad(2, '0', time.get(Calendar.SECOND) + \"\");\n String am_pm = POSUtilies.pad(2, '0', time.get(Calendar.AM_PM) + \"\");\n if (am_pm.equalsIgnoreCase(\"00\")) {\n am_pm = \"AM\";\n\n }\n if (am_pm.equalsIgnoreCase(\"01\")) {\n am_pm = \"PM\";\n\n }\n\n lblTime.setText(hourString + \":\" + minuteString + \":\" + secondString + \" \" + am_pm);\n lblDate.setText(d.format(date));\n }\n }\n ),\n new KeyFrame(Duration.seconds(1))\n );\n timeline.setCycleCount(Animation.INDEFINITE);\n timeline.play();\n }", "public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "@And(\"user clicks on Login\")\n public void userClicksOnLogin() {\n homePage.clickOnLogin();\n\n }", "public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}", "public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }", "@Override\n public void onClick(View v) {\n Intent returns = new Intent(Welcome.this, Returns.class);\n startActivity(returns);\n\n }", "public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}", "public void clciklogin() {\n\t driver.findElement(loginBtn).click();\r\n\t \r\n\t //Print the web page heading\r\n\t System.out.println(\"The page title is : \" +driver.findElement(By.xpath(\"//*[@id=\\\"app\\\"]//div[@class=\\\"main-header\\\"]\")).getText());\r\n\t \r\n\t //Click on Logout button\r\n\t// driver.findElement(By.id(\"submit\")).click();\r\n\t }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"1\");\n startActivity(intent);\n }", "private void loadDashboard() {\n Intent navigationIntent = new Intent(this, DashboardActivity.class);\n navigationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(navigationIntent);\n }", "public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}", "public void ClickVtube(View view){\n MainActivity.redirectActivity(this,Vtube.class);\n\n\n }", "@Override\n public void onClick(View view) {\n Intent httpIntent = new Intent(Intent.ACTION_VIEW);\n httpIntent.setData(Uri.parse(\"http://bvmengineering.ac.in\"));\n\n startActivity(httpIntent);\n\n }", "public void clickOnLogOutButton() {\n Reporter.addStepLog(\"click on logout button \" + _logOutOnNopCommerce.toString());\n clickOnElement(_logOutOnNopCommerce);\n log.info(\"click on logout button \" + _logOutOnNopCommerce.toString());\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent1 = new Intent();\n\t\t\t\tintent1.setClass(Admin2Home.this, Admin2UseRegist.class);\n\t\t\t\tstartActivity(intent1);\n\t\t\t}", "public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}", "protected void callHome() {\n\t\tIntent intent = new Intent(this, AdminHome.class);\r\n\t\tstartActivity(intent);\r\n\t}", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"FaceTracker Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n\n }", "@Override\n\tpublic void onClick(IClientContext context, IGuiElement emitter) throws Exception\n\t{\n PropertyAccessor accessor = PropertyAccessor.getInstance();\n Property ivrAdmin = accessor.getProperty(\n context, IVR_ADMIN_PROPERTY, context.getDataAccessor(), true\n );\n if (ivrAdmin != null && ivrAdmin.isSet())\n {\n IUrlDialog dialog = context.createUrlDialog(ivrAdmin.asString());\n dialog.enableNavigation(false);\n dialog.setModal(false);\n dialog.enableScrollbar(true);\n dialog.show(800, 600);\n }\n else\n {\n context.createMessageDialog(\"Could not launch IVR Admin\").show();\n }\n\t}", "public void clickDemandSideManagement();", "public void clickOnHome() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_home\");\n\t\twait.waitForElementToBeClickable(element(\"link_home\"));\n\t\texecuteJavascript(\"document.getElementById('doctor-home').getElementsByTagName('i')[0].click();\");\n//\t\t element(\"link_home\").click();\n\t\tlogMessage(\"user clicks on Home\");\n\t}", "@Override\n public void grindClicked() {\n Uri webpage = Uri.parse(\"http://www.grind-design.com\");\n Intent webIntent = new Intent(Intent.ACTION_VIEW, webpage);\n startActivity(webIntent);\n }", "public void clickHomeIconOnAdmin() {\n\t\texecuteJavascript(\"document.getElementById('nav-home').getElementsByTagName('i')[1].click()\");\n\t\twait.waitForStableDom(250);\n\t\texecuteJavascript(\"document.getElementById('nav-home').getElementsByTagName('i')[0].click()\");\n\t\tlogMessage(\"User clicks on Home page icon on admin portal\");\n\t}", "public void gotoCoachLogin(){ application.gotoCoachLogin(); }", "public static Result index() {\n // Check that the email matches a confirmed user before we redirect\n String email = ctx().session().get(\"email\");\n if (email != null) {\n User user = User.findByEmail(email);\n if (user != null && user.validated) {\n return GO_DASHBOARD;\n } else {\n Logger.debug(\"Clearing invalid session credentials\");\n session().clear();\n }\n }\n\n return GO_HOME;\n }", "public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n }", "public void buttonClick() {\n\t\tdriver.get(\"https://es.wikipedia.org\");\n\t\tWebElement input = driver.findElement(By.id(\"searchInput\"));\n\t\tinput.sendKeys(\"React\");\n\t\tinput.clear();\n\t\tinput.sendKeys(\"Angular\");\n\t\t\n\t\tWebElement button = driver.findElement(By.id(\"searchButton\"));\n\t\tbutton.click();\n\t}", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}", "@Before\n public void openNewStockPage() {\n onView(withId(R.id.button3)).perform(click());\n }", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "private void openPermissions(){\n WebDriverHelper.clickElement(seePermissionLvlButton);\n }", "@Override\n public void onClick(View view) {\n Log.d(\"LoginActivity\", \"// span link clicked..\");\n }" ]
[ "0.70393556", "0.68169373", "0.6717565", "0.65754086", "0.6525168", "0.63881475", "0.6377315", "0.6305948", "0.6294007", "0.6267224", "0.6260201", "0.6187375", "0.6170563", "0.6153785", "0.6152076", "0.6150922", "0.6135911", "0.61311257", "0.612712", "0.6115183", "0.61143684", "0.6076777", "0.6073387", "0.60571843", "0.6054283", "0.60537213", "0.6024561", "0.60208654", "0.60159636", "0.6015436", "0.6013807", "0.6007297", "0.5997296", "0.5992108", "0.59834594", "0.59547246", "0.5951555", "0.5928614", "0.59243757", "0.59179634", "0.59134346", "0.5912932", "0.591251", "0.59066904", "0.5900794", "0.58855563", "0.5873557", "0.5865184", "0.5856532", "0.5853258", "0.58432716", "0.58412236", "0.5832565", "0.5831031", "0.58281726", "0.58256966", "0.5816479", "0.580541", "0.57992095", "0.57895863", "0.5784056", "0.5782164", "0.57754904", "0.5773248", "0.5758073", "0.57548815", "0.57537633", "0.57517236", "0.5751252", "0.57507354", "0.57484174", "0.5745026", "0.5743879", "0.5737648", "0.5735443", "0.5735173", "0.57349", "0.5731852", "0.5723195", "0.57207", "0.57206786", "0.57160294", "0.57144845", "0.57138973", "0.5710737", "0.57034385", "0.5701944", "0.57012266", "0.56995475", "0.5696894", "0.5682886", "0.56816894", "0.5678939", "0.56763315", "0.5675881", "0.5675836", "0.5672619", "0.56671023", "0.5660377", "0.5652094", "0.564019" ]
0.0
-1
Email Prefrences Name Tab
public WebElement prEmailPrefrencesTab() { return getElementfluent(By.xpath("//menuitem[@ui-sref='practitioner-page.settings.notification']")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String changeEmailTitle() {\n return \"Changing email\";\n }", "public String getLoginNameLabel(){\n\t \treturn \"Email\";\n\t }", "protected String getSubflowName() {\n\t\treturn(\"ExtratoEmail\");\n\t}", "private void displayEmailFields() {\n FieldRelatedLabel emailLabel = new FieldRelatedLabel(\"Email\", 750, 270);\n\n invalidEmailLabel = new InvalidFormEntryLabel(\"Email must follow the format:\\[email protected]\", 910, 290, false);\n\n emailTF = new TextField();\n emailTF.relocate(750, 300);\n emailTF.textProperty().addListener(e->{FormValidatorPokeMongo.handleEmail(emailTF, invalidEmailLabel); });\n\n sceneNodes.getChildren().addAll(emailLabel, invalidEmailLabel, emailTF);\n }", "private static String extractDefaultDisplayNameFromEmail(String email) {\n return email == null ? null : email.substring(0, email.indexOf(\"@\"));\n }", "public String printNewEmailPrompt() {\n return \"Please enter new email: \";\n }", "public String getConfirmEmailFieldName() {\n return getStringProperty(CONFIRM_EMAIL_FIELD_NAME_KEY);\n }", "private String getSavedEmail(){\n return new PrefManager(this).getEmail();\n }", "public void enterEmailInAboutMe(String email) throws UIAutomationException{\r\n\t\r\n\t\telementController.requireElementSmart(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.click(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.clearTextBox(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.enterValueInTextBox(email,fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.enterKey(Keys.TAB);\r\n\t\r\n\t}", "public void setEmailCom(String emailCom);", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "public void setUserNameEmailText() {\n mEmailTextView.setText(mCurrentUser.getEmail());\n mNameTextView.setText(mCurrentUser.getName());\n }", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "public String getEmailFieldName() {\n return getStringProperty(EMAIL_FIELD_NAME_KEY);\n }", "void send(String emailName, Map model, Locale locale, EmailPreparator emailPreparator);", "void send(String emailName, Map model, EmailPreparator emailPreparator);", "public JTextField getTxtEmail() {\n return this.txtEmail;\n }", "public static String getBiblioMail() {\n\t\treturn \"mail\";\n\t}", "public void email() {\n\t\t\t\temailGUI = new EmailGUI();\n\t\t\t\tpopUpWindow = emailGUI.getFrame();\n\t\t\t\tpopUpWindow.setVisible(true);\n\t\t\t\temailGUI.setListeners(new mailListener());\n\t\t\t}", "public void setConfirmEmailFieldName(final String value) {\n setProperty(CONFIRM_EMAIL_FIELD_NAME_KEY, value);\n }", "@Override\r\n\tpublic String getNameByEmail(String email) {\n\t\treturn null;\r\n\t}", "@Override\n\tvoid email() {\n\t\tSystem.out.println(\"[email protected]\");\n\t\t\n\t}", "public static void setFirstName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyFName, name);\n }", "public void mailList() {\n for (int index = 0; index < emails.size(); index++) {\n Mensagem mensagem = emails.get(index);\n System.out.println(\"Email \" + index + \": \");\n System.out.println(\"De: \" + mensagem.remetente);\n System.out.println(\"Para: \" + mensagem.destinatario + \"\\n\");\n }\n }", "public static String getPrimaryEmail(Context context) {\n try {\n AccountManager accountManager = AccountManager.get(context);\n if (accountManager == null)\n return \"\";\n Account[] accounts = accountManager.getAccounts();\n Pattern emailPattern = Patterns.EMAIL_ADDRESS;\n for (Account account : accounts) {\n // make sure account.name is an email address before adding to the list\n if (emailPattern.matcher(account.name).matches()) {\n return account.name;\n }\n }\n return \"\";\n } catch (SecurityException e) {\n // exception will occur if app doesn't have GET_ACCOUNTS permission\n return \"\";\n }\n }", "public void setEmailad(String emailad) {\n\tthis.emailad = emailad;\n}", "private void setRecipientDisplayName(ViewHolder holder, String recipientFullName) {\n holder.recipientDisplayName.setText(recipientFullName);\n }", "public void setEmail(String email)\r\n/* 36: */ {\r\n/* 37:50 */ this.email = email;\r\n/* 38: */ }", "@Override\n\tvoid email() {\n\t\tSystem.out.println(\"email id [email protected]\");\n\t\t\n\t}", "@Override\r\n\tprotected String getConfiguredTitle() {\n\t\treturn TEXTS.get(\"Account\");\r\n\t}", "String getUserMail();", "public String getAlternateEmail() { return alternateEmail; }", "public void setSelectedEmail(String s) {\n\t\tuEmail = s;\n\t}", "@Override\n public String getMenuTitle() {\n return personManager.getCurrentUsername(currentUserId) + \"'s account settings\";\n }", "protected String getUsername(MailAddress m) {\n return m.getLocalPart() + \"@localhost\";\n }", "public void setEmail(final String e)\n {\n this.email = e;\n }", "@AutoEscape\n\tpublic String getEmailCom();", "public String getNewsletterFieldName() {\n return getStringProperty(NEWSLETTER_FIELD_NAME_KEY);\n }", "public String getEmail() {\r\n // Bouml preserved body begin 00040D82\r\n\t System.out.println(email);\r\n\t return email;\r\n // Bouml preserved body end 00040D82\r\n }", "public String getEmail_pelanggan(){\r\n \r\n return email_pelanggan;\r\n }", "@Override\n\tpublic void showMailDialog() {\n\t\t\n\t}", "public Name\r\ngetMailbox() {\r\n\treturn getSingleName();\r\n}", "public static void EmployeeName() {\r\n\t\t\r\n\t\tJLabel e1 = new JLabel(\"Employee's Name:\");\r\n\t\te1.setFont(f);\r\n\t\tGUI1Panel.add(e1);\r\n\t\tGUI1Panel.add(employeeName);\r\n\t\te1.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t\t\r\n\t}", "public void set_email(String Email)\n {\n email =Email;\n }", "@Override\n\tpublic String getEmail() {\n\t\treturn super.getEmail();\n\t}", "public void setEmail(String p) { this.idcorreo = p; }", "public String getEmailad() {\n\treturn emailad;\n}", "java.lang.String getSenderName();", "public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }", "void setEmail(String email);", "void setEmail(String email);", "public void setEmailFieldName(final String value) {\n setProperty(EMAIL_FIELD_NAME_KEY, value);\n }", "void send(String emailName);", "public String lerNome() {\n\t\treturn JOptionPane.showInputDialog(\"Digite seu Nome:\");\n\t\t// janela de entrada\n\t}", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "public void setContact(String email){ contact = email; }", "void setDisplayName(@Nullable String pMessage);", "java.lang.String getUserEmail();", "public void setSpEmail(String _empEmail) {\r\n this.spEmail = _empEmail;\r\n }", "public JoinNowPage enterEmailID() {\n\t\temail.sendKeys(\"[email protected]\");\n\t\treturn this;\n\t}", "public Modify_MAIL() {\n initComponents();\n }", "@Override\r\n public String getTabTitle()\r\n {\r\n return \"Allgemeine Einstellungen\";\r\n }", "public void setEmail(String email) {\n mEmailTv.setText(email);\n }", "public void setMailShareholder(String mailShareholder);", "public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }", "static String editCompany()\n {\n if(companyName !=null) companyName = \"IBM\";\n return companyName;\n }", "@Override\n public String getDisplayName() {\n\n return Messages.displayName();\n }", "public String getSpEmail() {\r\n return spEmail;\r\n }", "@Override\r\n\tpublic String getEmailAdrress() {\n\t\treturn null;\r\n\t}", "@AutoEscape\n public String getMailGeneralManager();", "@Override\npublic String getUsername() {\n\treturn email;\n}", "public void setEmail_address(String email_address);", "public String getContactEmail() {\r\n return tfContactEmail.getText().trim();\r\n }", "public String getCustomizedHTMLMessagePageName() {\r\n return PAGE_ERRO;\r\n }", "String getEmail(int type);", "public TeacherPage setNameTextField() {\n return setNameTextField(data.get(\"NAME\"));\n }", "public WebElement getEmailTxt() {\n\t\treturn emailTxt;\n\t}", "public void setEmail_pelanggan(String Email_Pelanggan){\r\n \r\n this.email_pelanggan = Email_Pelanggan;\r\n }", "@Override\r\n\tpublic String getEmail() {\n\t\treturn email;\r\n\t}", "private String findDisplayName(String emailText) {\n for (User user : userList) {\n //Log.i(TAG, \"findDisplayName() : for loop\");\n if (user.getEmail().equals(emailText)) {\n //Log.i(TAG, \"emailText: \" + emailText);\n //Log.i(TAG, \"user.getEmail(): \" + user.getEmail());\n //Log.i(TAG, \"user.getUserName(): \" + user.getUserName());\n if (user.getUserName() == null) {\n break;\n }\n return user.getUserName();\n }\n }\n return \"No UserName\";\n }", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}", "public void setEntryName(String ename);", "private void configPElemGeneralInfoSection_name(final Text nameTextBox)\n {\n\t\tif (notifications != null) {\n\t\t\tif (notifications.getNotification() != null) {\n\t\t\t\tif (notifications.getNotification().size() != 0) {\n\t\t\t\t\tif (notifications.getNotification().get(0) != null) {\n\t\t\t\t\t\tif (notifications.getNotification().get(0)\n\t\t\t\t\t\t\t\t.getPresentationElements() != null) {\n\t\t\t\t\t\t\tif (notifications.getNotification().get(0)\n\t\t\t\t\t\t\t\t\t.getPresentationElements().getName() != null) {\n\t\t\t\t\t\t\t\tif (notifications.getNotification().get(0)\n\t\t\t\t\t\t\t\t\t\t.getPresentationElements().getName()\n\t\t\t\t\t\t\t\t\t\t.size() != 0) {\n\t\t\t\t\t\t\t\t\tif (notifications.getNotification().get(0)\n\t\t\t\t\t\t\t\t\t\t\t.getPresentationElements()\n\t\t\t\t\t\t\t\t\t\t\t.getName().get(0) != null) {\n\t\t\t\t\t\t\t\t\t\tif (notifications.getNotification()\n\t\t\t\t\t\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t.getPresentationElements()\n\t\t\t\t\t\t\t\t\t\t\t\t.getName().get(0).getMixed() != null) {\n\t\t\t\t\t\t\t\t\t\t\tif (notifications.getNotification()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getPresentationElements()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getName().get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getMixed().size() != 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (notifications\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getNotification()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPresentationElements()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName().get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getMixed().get(0) != null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (notifications\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getNotification()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPresentationElements()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName().get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getMixed().get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getValue() != null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(notifications\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getNotification()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPresentationElements()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getMixed()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getValue()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\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} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\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} else {\n\t\t\t\t\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnameTextBox\n\t\t\t\t\t\t\t.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnameTextBox.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t\t}\n\t\t} else {\n\t\t\tnameTextBox.setText(EMFObjectHandleUtil.RESOURCE_NOT_AVAILABLE);\n\n\t\t}\n\t\t\n\t\t \t\t\n\t\t nameTextBox.addModifyListener(new ModifyListener() {\n\t\t \t\t\tpublic void modifyText(ModifyEvent e) \n\t\t \t\t\t{\n\t\t \t\t\t// validateInput(); \n\t\t \t\t\t setAttribute_tParameter(htdPackage.eINSTANCE.getTExpression_Mixed(), nameTextBox.getText()); \n\t\t \t\t\t\t\n\t\t \t\t\t}\n\t\t \t\t});\n\t }" ]
[ "0.7037473", "0.67023146", "0.62078506", "0.59554803", "0.5946091", "0.5894431", "0.5828474", "0.5786491", "0.578157", "0.5775662", "0.5734068", "0.5734068", "0.5734068", "0.5734068", "0.5734068", "0.5734068", "0.572067", "0.5683154", "0.5683154", "0.5683154", "0.5683154", "0.5683154", "0.5663433", "0.5651009", "0.56383556", "0.5622269", "0.5605431", "0.5584551", "0.55779856", "0.5568409", "0.5558645", "0.5557012", "0.55499434", "0.5530498", "0.55263317", "0.55235696", "0.5522276", "0.5515063", "0.55129635", "0.55104667", "0.550806", "0.5490292", "0.5483895", "0.5480109", "0.54749376", "0.547118", "0.54668605", "0.54520243", "0.5448693", "0.54441804", "0.54414773", "0.54408604", "0.5437657", "0.54301107", "0.5428081", "0.5427695", "0.54231", "0.5422858", "0.5420089", "0.5420089", "0.54050404", "0.5402682", "0.5400615", "0.5393262", "0.5393262", "0.5393262", "0.5393262", "0.5393262", "0.5393262", "0.5384102", "0.53774625", "0.53772295", "0.53771585", "0.5376532", "0.5369812", "0.5359217", "0.5357934", "0.5355835", "0.5350111", "0.53482383", "0.5343063", "0.5337867", "0.533345", "0.5332302", "0.53261083", "0.5323396", "0.5322019", "0.5319601", "0.53154784", "0.53147906", "0.53125554", "0.5312423", "0.53124213", "0.5303467", "0.5301908", "0.5301908", "0.5301908", "0.5301908", "0.5299331", "0.5297398" ]
0.67228943
1
Used for starting the appium server
@BeforeClass public static void startApp() throws MalformedURLException { DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName", "Android"); caps.setCapability("platformVersion", "5.0.1"); //Replace this with your Android version caps.setCapability("deviceName", "Samsung Galaxy"); //Replace this with your simulator/device Path currentRelativePath = Paths.get(""); String path = currentRelativePath.toAbsolutePath().toString() + "/src/main/resources/Evernote.apk"; caps.setCapability("app", path); //Replace this with app path in your system // caps.setCapability("appActivity", "com.evernote.ui.HomeActivity"); // caps.setCapability("appPackage", "com.evernote"); // appInstalled = true; AppiumServer server = new AppiumServer(serverAddress,port);//setup Appium server server.startAppiumServer();//open Appium server automatically driver = new AndroidDriver(server.getService(),caps); driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void appiumStart() throws IOException, InterruptedException {\n // Execute command string to start appium server.\n p = Runtime.getRuntime().exec(cmd);\n // Provide wait time of 10 mins to start appium server properly.\n // If face any error(Could not start a new session...) then Increase\n // this time to 15 or 20 mins.\n Thread.sleep(10000);\n if (p != null) {\n System.out.println(\"Appium server Is started now.\");\n }\n }", "public static void startAppiumServer() throws IOException, InterruptedException {\n\n\tRuntime runtime = Runtime.getRuntime();\n\n\tprocess = runtime.exec(STARTSERVER);\n\n\tThread.sleep(7000);\n\n\tif (process != null) {\n\n\tSystem.out.println(\"Appium server started\");\n\n\t}\n\n\t}", "public static AppiumDriverLocalService AppiumServerStart(){\n System.out.println(\"Into driver setup\");\n AppiumDriverLocalService service;\n\n AppiumServiceBuilder serviceBuilder = new AppiumServiceBuilder();\n\n serviceBuilder.usingAnyFreePort();\n // /usr/local/bin/node\n serviceBuilder.usingDriverExecutable(new File(\"/usr/local/bin/node\"));\n // /usr/local/bin/appium\n serviceBuilder.withAppiumJS(new File(\"/usr/local/bin/appium\"));\n serviceBuilder.withArgument(GeneralServerFlag.RELAXED_SECURITY);\n serviceBuilder.withArgument(GeneralServerFlag.SHELL);\n HashMap<String, String> environment = new HashMap();\n environment.put(\"PATH\", \"/usr/local/bin:\" + System.getenv(\"PATH\"));\n\n\n service = AppiumDriverLocalService.buildService(serviceBuilder);\n service.start();\n return service;\n }", "public void startAppiumServer(String os) throws ExecuteException, IOException, InterruptedException {\n if (os.contains(\"windows\")) {\n CommandLine command = new CommandLine(\"cmd\");\n command.addArgument(\"/c\");\n command.addArgument(\"C:/Program Files/nodejs/node.exe\");\n command.addArgument(\"C:/Appium/node_modules/appium/bin/appium.js\");\n command.addArgument(\"--address\", false);\n command.addArgument(\"127.0.0.1\");\n command.addArgument(\"--port\", false);\n command.addArgument(\"4723\");\n command.addArgument(\"--full-reset\", false);\n\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000);\n } else if (os.contains(\"mac\")) {\n CommandLine command = new CommandLine(\"/Applications/Appium.app/Contents/Resources/node/bin/node\");\n command.addArgument(\"/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js\", false);\n command.addArgument(\"--address\", false);\n command.addArgument(\"127.0.0.1\");\n command.addArgument(\"--port\", false);\n command.addArgument(\"4723\");\n command.addArgument(\"--full-reset\", false);\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000);\n } else if (os.contains(\"linux\")) {\n //Start the appium server\n System.out.println(\"ANDROID_HOME : \");\n System.getenv(\"ANDROID_HOME\");\n //\tSystem.out.println(\"PATH :\" +System.getenv(\"PATH\"));\n CommandLine command = new CommandLine(\"/bin/bash\");\n command.addArgument(\"-c\");\n command.addArgument(\"~/.linuxbrew/bin/node\");\n command.addArgument(\"~/.linuxbrew/lib/node_modules/appium/lib/appium.js\", true);\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000); //Wait for appium server to start\n\n } else {\n LOGGER.info(os + \"is not supported yet\");\n }\n }", "public void invokeAppium() throws Exception {\n String OS = System.getProperty(\"os.name\").toLowerCase();\n try {\n startAppiumServer(OS);\n LOGGER.info(\"Appium server started successfully\");\n } catch (Exception e) {\n LOGGER.warn(\"Unable to start appium server\");\n throw new TapException(TapExceptionType.PROCESSING_FAILED, \"Unable to start appium server\");\n }\n }", "public AppiumDriverLocalService StartServer()\n\t{\n\t\tservice = AppiumDriverLocalService.buildDefaultService();\n\t\tservice.start();\n\t\treturn service;\n\t}", "public void startAppium() throws ExecuteException, IOException{\n\t\t\t\tCommandLine command = new CommandLine(\"/bin/sh\");\n\t\t\t\tcommand.addArgument(\"/Applications/Appium.app/Contents/Resources/node/bin/node\");\n\t\t\t\tcommand.addArgument(\"/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js\");\n\t\t\t\tcommand.addArgument(\"--address\");\n\t\t\t\tcommand.addArgument(\"127.0.0.1\");\n\t\t\t\tcommand.addArgument(\"--port\");\n\t\t\t\tcommand.addArgument(\"4723\");\n\t\t\t\tcommand.addArgument(\"--no-reset\");\n\t\t\t\tcommand.addArgument(\"--log\");\n\t\t\t\t\n\t\t\t\tcommand.addArgument(\"argument\", false);\n\t\t\t\tDefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n\t\t\t\tDefaultExecutor executor = new DefaultExecutor();\n\t\t\t\texecutor.setExitValue(1);\n\t\t\t\texecutor.execute(command, resultHandler);\n\t\t\t\t\t\n\t\t\t}", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }", "@BeforeClass\n public void setUp() {\n\n service = AppiumDriverLocalService.buildDefaultService();\n\n service.start();\n\n if (service == null || !service.isRunning()) {\n throw new AppiumServerHasNotBeenStartedLocallyException(\"Failed to start the Appium Server\");\n }\n path = AppUtility.getInstance().getPath();\n }", "@BeforeTest\n\tpublic void setUp() throws InterruptedException, IOException {\n\t\tAppiumServer appiumServer = new AppiumServer();\n\t\t\n\t\tint port = 4723;\n\t\tif(!appiumServer.checkIfServerIsRunnning(port)) {\n\t\t\tSystem.out.println(\"Port No.: \" + port + \" is available.\");\n\n\t\t\tappiumServer.startServer();\n\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\"Appium Server already running on Port - \" + port);\n\t\t}\n\t\t\n\t\tFile appPath = new File(\"./app/eBay.apk\");\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\n\n\t\tcap.setCapability(MobileCapabilityType.APP, appPath.getAbsolutePath());\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"MI\");\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n//\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION,\"9\");\n\t\t\n\t\tcap.setCapability(\"unicodeKeyboard\", \"true\"); \n\t\tcap.setCapability(\"resetKeyboard\", \"true\");\n\t\t\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION, DeviceVersionFinder.getDeviceVersion());\n\t\tcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"uiautomator2\");\n\t\tcap.setCapability(\"--session-override\", false);\n\t\t\n\t\tcap.setCapability(\"setWebContentsDebuggingEnabled\", true);\n\t\t\n\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"), cap);\n\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tPOM_LaunchHomeScreen homeScreen = new POM_LaunchHomeScreen(driver);\n\n\t\tif(homeScreen.btn_homeSignIn.isDisplayed()) {\n\t\t\t\n\t\t\tSystem.out.println(\"App has successfully loaded within the time provided!\");\n\t\t\t\n\t\t}\n\n\t\t\n//\t\tMobileElement element = driver.findElement(By.id(\"recycler_view_main\"));\n\t\t\n//\t\tTouchActions action = new TouchAction();\n//\t\taction.scroll(element, 10, 100);\n//\t\taction.perform();\n\t\t\n\t\t\n\n\t\tSystem.out.println(\"Setup successful!\");\n\n\n\t}", "public void startApp()\r\n\t{\n\t}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\tString deviceName = \"VCan\";\r\n\t\tString platformVersion = \"4.4.2\";\r\n\t\tString apkName = \"微博.apk\";\r\n\t\tString appActivity = \"com.sina.weibo.SplashActivity\";\r\n\t\tString AppiumServerIP = \"http://127.0.0.1:4723/wd/hub\";\r\n\t\tAndroidDriver driver;\r\n\t\tFile apk = new File(System.getProperty(\"user.dir\")+File.separator+\"apps\"+File.separator+apkName);\r\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(\"deviceName\", deviceName);\r\n\t\tcapabilities.setCapability(\"platformVersion\", platformVersion);\r\n\t\tcapabilities.setCapability(\"app\", apk);\r\n\t\tcapabilities.setCapability(\"appActivity\", appActivity);\r\n\t\tcapabilities.setCapability(\"noSign\", true);\r\n\t\tcapabilities.setCapability(\"noReset\", true);\r\n\t\tdriver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),capabilities);\r\n\t\tThread.sleep(3000);\r\n\t\tSystem.out.println(\"App启动等待时间\");\r\n\t\tThread.sleep(4000);\r\n\t\tdriver.findElementById(\"com.sina.weibo:id/plus_icon\").click();\r\n\t\tdriver.findElementById(\"com.sina.weibo:id/pop_control_bar_front_close_img\").click();\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.close();\r\n\t\tdriver.quit();\r\n\t}", "public void launch() throws NotBoundException, IOException\n\t{\n\t\t//call method to connect to server\t\t\n\t\tServerManager serverConnect = initialConnect();\t\n\t\n\t\t//get Setup menu from server\n\t\tSetUpMenu newSetup = new SetUpMenu(serverConnect);\n\t\tnewSetup.welcomeMenu();\n\t}", "public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "public void run() { wait for the launcher script to talk to us\n //\n try {\n ssocket.setSoTimeout(30 * 1000); // 30 seconds\n socket = ssocket.accept();\n socket.setSoTimeout(3 * 60 * 1000);\n socket.setTcpNoDelay(true);\n } catch (SocketTimeoutException stmo) {\n String msg = \"timeout error on initial connection from \" + execName();\n task.log(msg, Project.MSG_ERR);\n failure = new BuildException(msg);\n } catch (Exception e) {\n String err = \"error establishing communication with \" + execName();\n String msg = e.getMessage();\n if (msg != null) {\n err = err + \": \" + msg;\n } else {\n err = err + \": \" + e;\n }\n task.log(err, Project.MSG_ERR);\n failure = new BuildException(err);\n }\n }", "@Test\r\n\tpublic void startapp() {\n\t\tdriver.get(\"http://q.door.fund/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\r\n\t\tString currentURL = driver.getCurrentUrl();\r\n\t\tAssert.assertTrue(currentURL.contains(\"q.door.fund\"));\r\n\t\tSystem.out.println(\"Application loaded\");\r\n\t}", "@BeforeTest\n public void setUp() throws Exception {\n\t \n appiumStop();\n // Start appium server.\n appiumStart();\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(\"deviceName\", \"Android Emulator\");\n capabilities.setCapability(\"browserName\", \"Android\");\n capabilities.setCapability(\"platformVersion\", \"6.0\");\n capabilities.setCapability(\"platformName\", \"Android\");\n capabilities.setCapability(\"appPackage\", \"com.hmh.api\");\n capabilities.setCapability(\"appActivity\", \"com.hmh.api.ApiDemos\");\n driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n }", "private void intializeAppiumDriver() {\n File app = new File(\"src/main/resources\", CommonUtils.getCentralData(\"App\"));\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, CommonUtils.getCentralData(\"PlatformName\"));\n capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, CommonUtils.getCentralData(\"PlatformVersion\"));\n capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, CommonUtils.getCentralData(\"DeviceName\"));\n if (IS_ANDROID) {\n capabilities.setCapability(APPLICATION_NAME, app.getAbsolutePath());\n capabilities.setCapability(APP_PACKAGE, CommonUtils.getCentralData(\"AppPackage\"));\n capabilities.setCapability(APP_ACTIVITY, CommonUtils.getCentralData(\"AppActivity\"));\n }\n if (IS_IOS) {\n capabilities.setCapability(AUTOMATION_NAME, IOS_XCUI_TEST);\n capabilities.setCapability(\"app\", app.getAbsolutePath());\n }\n capabilities.setCapability(FULL_RESET, CommonUtils.getCentralData(\"FullReset\"));\n capabilities.setCapability(NO_RESET, CommonUtils.getCentralData(\"NoReset\"));\n capabilities.setCapability(\"udid\", CommonUtils.getCentralData(\"UDID\"));\n capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, CommonUtils.getCentralData(\"WaitTimeoutInSeconds\"));\n\n try {\n driver = new AppiumDriver(new URL(CommonUtils.getCentralData(\"URL\")), capabilities);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "private void runServer()\n\t{\n\t\tif(sm == null)\n\t\t{\n\t\t\tsm = new ServerManager();\n\t\t}\n\t\t\n\t\tint port = 1209;\n\t\ttry \n\t\t{\n\t\t\twaitUser(sm, port);\n\t\t\t//이 아래 로직이 실행된다는건 유저가 다 들어왔다는 뜻임. 즉 게임 시작할 준비 되었음을 의미함\t\t\t\n\t\t\tGame.getInstance().runGame();\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[Server.runServer()] error >>> : \" + e.getMessage());\n\t\t}\n\t}", "@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }", "public void startServer() {\n server.start();\n }", "public void init() throws MalformedURLException {\n\n capabilities = new DesiredCapabilities();\n\n capabilities.setCapability(\"deviceName\", \"Nex5\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"8.0\");\n capabilities.setCapability(\"appPackage\", \"com.trello\");\n capabilities.setCapability(\"appActivity\", \".home.HomeActivity\");\n\n capabilities.setCapability(\"automationName\", \"Appium\");\n capabilities.setCapability(\"app\", \"C:/Users/Study/APK/trello_new.apk\");\n driver = new AppiumDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n welcomeActivity = new WelcomePage(driver);\n loginActivity = new LoginPage(driver);\n\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "@Override\n protected void appStart() {\n }", "@Test\n public void startServer() throws InterruptedException {\n UicdInstrumentation uicdInstrumentation =\n UicdInstrumentation.getInstance(\n getInstrumentation().getContext(), DEFAULT_PORT);\n uicdInstrumentation.startServer();\n\n while (!uicdInstrumentation.isStopServer()) {\n SystemClock.sleep(PING_SERVER_MS);\n }\n }", "public void startDriver();", "@BeforeClass\n\tpublic void appLaunch() throws IOException\n\t{\n\n\t\t/*String Appium_Node_Path=\"C:/Program Files (x86)/Appium/node.exe\"; \n\t\tString Appium_JS_Path=\"C:/Program Files (x86)/Appium/node_modules/appium/bin/appium.js\"; \n\t\tappiumService = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingPort(4723).usingDriverExecutable(new File(Appium_Node_Path)).withAppiumJS(new File(Appium_JS_Path))); \n\t\tappiumService.start();\n\t\t */\t\t\t\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM,Platform.ANDROID);\n\t\tcapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT,3000);\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"PLATFORMNAME\"));\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"DeviceName\"));\n\t\tcapabilities.setCapability(MobileCapabilityType.VERSION,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"PLATFORMVERSION\"));\n//\t\tcapabilities.setCapability(\"appPackage\", Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"packageName\"));\n//\t\tcapabilities.setCapability(\"appActivity\",Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"activityName\"));\n\t\t\n\t\t// for testing\n\t\tcapabilities.setCapability(\"appPackage\", \"in.amazon.mShop.android.shopping\");\n\t\tcapabilities.setCapability(\"appActivity\", \"com.amazon.mShop.home.HomeActivity\");;\n\n\n\t\tURL url= new URL(\"http://0.0.0.0:4723/wd/hub\");\n\t\tdriver = new AndroidDriver<WebElement>(url, capabilities);\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t// testing purpose\n\t\tbackButton(driver);\n\t\tbackButton(driver);\n\t\t\n// in.amazon.mShop.android.shopping\n//\tcom.amazon.mShop.sso.SigninPromptActivity\n\n\t}", "@Override\n public void run() {\n ApplicationInfo ai = null;\n try {\n ai = MainActivity.getAppContext().getPackageManager().getApplicationInfo(MainActivity.getAppContext().getPackageName(), PackageManager.GET_META_DATA);\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n String brokerAddress = (String) ai.metaData.get(\"BROKER_ADDRESS\");\n int brokerPort = (int) ai.metaData.get(\"BROKER_PORT\");\n\n // configurazione delle proprietà del broker e avvio del server relativo\n Properties properties = new Properties();\n properties.setProperty(BrokerConstants.HOST_PROPERTY_NAME, brokerAddress);\n properties.setProperty(BrokerConstants.PORT_PROPERTY_NAME, String.valueOf(brokerPort));\n properties.setProperty(BrokerConstants.PERSISTENT_STORE_PROPERTY_NAME, Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + BrokerConstants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME);\n MemoryConfig memoryConfig = new MemoryConfig(properties);\n Server mqttBroker = new Server();\n try {\n mqttBroker.startServer(memoryConfig);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Log.i(TAG, \"Server Started\");\n }", "void startAIGame() {\n int status = gameServer.restartServer( true, settingsMenu.getMapSize(),\n settingsMenu.getPlayFor(), settingsMenu.getFirstMove(),\n settingsMenu.getServerName() );\n if( status != 0 ) {\n JOptionPane.showMessageDialog( frame, Language.ERROR_STARTUP,\n Language.CAPTION_ERROR, JOptionPane.PLAIN_MESSAGE );\n } else {\n host = \"127.0.0.1\";\n role = \"admin\";\n password = gameServer.getServerPassword();\n ( new Thread( this ) ).start();\n }\n }", "public void Launch_app() {\n\t\tDesiredCapabilities caps = new DesiredCapabilities();\r\n\t\tcaps.setCapability(\"deviceName\", \"My Phone\");\r\n\t\tcaps.setCapability(\"udid\", \"LE66A06190140096\"); //Give Device ID of your mobile phone\r\n\t\t\r\n\t\t/* caps.setCapability(\"udid\", \"emulator-5556\"); //Give Device ID of your mobile phone\r\n\t\t caps.setCapability(\"app\", \"C:\\\\Users\\\\Blue Otter HP2\\\\Downloads\\\\xemoto_staging_v1.0.0.apk\"); \r\n\t\t caps.setCapability(\"appWaitActivity\", \"*\");\r\n\t\t caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"UiAutomator2\");*/\r\n\t\t\r\n\t\tcaps.setCapability(\"platformName\", \"Android\");\r\n\t\tcaps.setCapability(\"platformVersion\", \"6.0\");\r\n\t\r\n\t\tcaps.setCapability(\"appPackage\", \"org.blueotter.motone\");\r\n\t\tcaps.setCapability(\"appActivity\", \"org.blueotter.motone.feature.main.view.ActivityMain\"); \r\n\t\t\r\n\t\tcaps.setCapability(\"noReset\", \"true\");\r\n\t\t\r\n\t\t//Instantiate Appium Driver\r\n\t\ttry {\r\n\t\t\t\t driver = new AndroidDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), caps);\t\t\r\n\r\n\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS) ;\r\n\t\tSystem.out.println(\"Launch motone successful!\");\r\n\r\n \t}", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }", "private void startServer() {\n mBluetoothGattServer = mBluetoothManager.openGattServer(this, mGattServerCallback);\n if (mBluetoothGattServer == null) {\n Log.w(TAG, \"Unable to create GATT server\");\n return;\n }\n\n mBluetoothGattServer.addService(TimeProfile.createTimeService());\n\n // Initialize the local UI\n updateLocalUi(System.currentTimeMillis());\n mBluetoothGattServer.addService(SecurityProfile.createSecurityService());\n //mBluetoothGattServer.addService(ConfigurationProfile.createConfigurationService());\n\n }", "@Override\n public void run() {\n AppInstallManager.uninstallAllUser(MainActivity.this);\n\n // 删除apkPath所有文件\n RootCmd.execRootCmd(\"rm -fr \" + apkPath);\n // apk写入sdcard\n Assets.CopyAssets(MainActivity.this, \"apk\", apkPath);\n // 安装apk\n AppInstallManager.installDir(apkPath, \"apk\");\n\n // 安装busybox等相关文件\n Assets.CopyAssets(MainActivity.this, \"bin\", binPath);\n AppInstallManager.installDir(binPath, \"bin\");\n\n // 脚本 写入sdcard\n Assets.CopyAssets(MainActivity.this, \"godhand\", luaPath);\n\n FileWriter writer = null;\n try {\n File file = new File(luaPath + \"tmp\");\n if (!file.exists()) {\n file.mkdirs();\n }\n writer = new FileWriter(luaPath + \"tmp/run_file\", false);\n writer.write(\"InitDevice.lua\");\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n RootCmd.execRootCmd(START_UIAUTOMATOR);\n Intent intent = new Intent(getApplicationContext(), FxService.class);\n stopService(intent);\n }", "private void startWebApp(Handler<AsyncResult<HttpServer>> next) {\n Router router = Router.router(vertx);\n\n router.route(\"/assets/*\").handler(StaticHandler.create(\"assets\"));\n router.route(\"/api/*\").handler(BodyHandler.create());\n\n router.route(\"/\").handler(this::handleRoot);\n router.get(\"/api/timer\").handler(this::timer);\n router.post(\"/api/c\").handler(this::_create);\n router.get(\"/api/r/:id\").handler(this::_read);\n router.put(\"/api/u/:id\").handler(this::_update);\n router.delete(\"/api/d/:id\").handler(this::_delete);\n\n // Create the HTTP server and pass the \"accept\" method to the request handler.\n vertx.createHttpServer().requestHandler(router).listen(8888, next);\n }", "@Test\n @RunIn(TestGroup.QA_UNRELIABLE)\n public void importAndRunInstantApp() throws Exception {\n String runConfigName = \"topekabundle\";\n IdeFrameFixture ideFrame = guiTest.importProjectAndWaitForProjectSyncToFinish(\"TopekaInstantApp\");\n\n String avdName = EmulatorGenerator.ensureAvdIsCreated(\n ideFrame.invokeAvdManager(),\n new AvdSpec.Builder()\n .setSystemImageGroup(AvdSpec.SystemImageGroups.X86)\n .setSystemImageSpec(O_AVD_IMAGE)\n .build()\n );\n\n ideFrame.runApp(runConfigName, avdName);\n\n Pattern CONNECTED_APP_PATTERN = Pattern.compile(\".*Connected to process.*\", Pattern.DOTALL);\n\n ExecutionToolWindowFixture.ContentFixture runWindow = ideFrame.getRunToolWindow().findContent(runConfigName);\n runWindow.waitForOutput(new PatternTextMatcher(CONNECTED_APP_PATTERN), TimeUnit.MINUTES.toSeconds(2));\n\n runWindow.waitForStopClick();\n }", "public void run(){\n\t\tstartServer();\n\t}", "private void launchApplication() {\n driver.manage().deleteAllCookies();\n driver.get(config.getProperty(\"testSiteUrl\"));\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(Integer.parseInt(config.getProperty(\"implicit.wait\")), TimeUnit.SECONDS);\n }", "@Test\n public void serverStarts() {\n }", "private void launchRemote(Stage stage) throws Exception { \n\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\"); \n\t\t\n\t\t// thread of the server connecting to the game and of the game \n\t\tThread serverThread = new Thread(() -> { \n\t\t\tRemotePlayerServer server = new RemotePlayerServer(new GraphicalPlayerAdapter()); \n\t\t\tserver.run(); \n\t\t }); \n\t\tserverThread.setDaemon(true); \n\t\tserverThread.start(); \n\t }", "void launchApp();", "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tString[] notify_cmd={\"msg\",user,\"启动中\"};\n\t\t\t\t\t\t\t\tdisplayText(\"启动中\");\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tRuntime.getRuntime().exec(notify_cmd);\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\t\t\t\t\t\tString mssage_in=\"appium msg\";\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\twhile(true){\n\t\t\t\t\t\t\t\t\t\tif((mssage_in=br.readLine())!=null){\n\t\t\t\t\t\t\t\t\t\t\tMyFrame.displayText(mssage_in);\n\t\t\t\t\t\t\t\t\t\t\tpw.println(mssage_in);\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} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void startApp() {\n if (midletPaused) {\n resumeMIDlet();\n } else {\n initialize();\n startMIDlet();\n }\n midletPaused = false;\n }", "public void startup() {\n\t\tstart();\n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public void run() {\n final Server server = new Server(8081);\n\n // Setup the basic RestApplication \"context\" at \"/\".\n // This is also known as the handler tree (in Jetty speak).\n final ServletContextHandler context = new ServletContextHandler(\n server, CONTEXT_ROOT);\n final ServletHolder restEasyServlet = new ServletHolder(\n new HttpServletDispatcher());\n restEasyServlet.setInitParameter(\"resteasy.servlet.mapping.prefix\",\n APPLICATION_PATH);\n restEasyServlet.setInitParameter(\"javax.ws.rs.Application\",\n \"de.kad.intech4.djservice.RestApplication\");\n context.addServlet(restEasyServlet, CONTEXT_ROOT);\n\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@BeforeMethod\n\tpublic void openAppp() throws IOException\n\t{\n\t\tSystem.out.println(\"Monefy Application launched successfully:\");\n\t\n\t}", "public static void main(String[] args) {\n Server server = new Server(1234);\n server.listen();\n \n // YOUR CODE HERE\n // It is not required (or recommended) to implement the server in\n // this runner class.\n }", "private void installLocalOrRemote() {\n CommandPacket startCommandPacket = null;\n //直到成功为止,控制台可能重启、网络问题等原因\n //TODO\n int time = 0;\n while ((startCommandPacket = getStartCommandPacket()) == null){\n try {\n time ++;\n if(time == 20){\n String defaultRegister = \"zookeeper\";\n String register = agentConfig.getProperty(\"register.name\", defaultRegister);\n if(defaultRegister.equals(register)){\n logger.error(\"经过10s尝试启动simulator失败, 请确认控制台是否正常\");\n }\n break;\n }\n logger.error(\"启动simulator获取远程失败,休眠500ms重试,请确认控制台是否正常\");\n Thread.sleep(500 );\n } catch (InterruptedException ignore) {\n }\n }\n\n if(startCommandPacket == null){\n startCommandPacket = new CommandPacket();\n // 启动\n startCommandPacket.setId(HeartCommandConstants.startCommandId);\n Map<String, Object> extras = new HashMap<String, Object>();\n extras.put(HeartCommandConstants.PATH_TYPE_KEY, HeartCommandConstants.PATH_TYPE_LOCAL_VALUE);\n // 使用本地探针包\n startCommandPacket.setExtras(extras);\n }\n install(startCommandPacket);\n }", "public static AppiumDriver getDriver(String platformtype, AppiumDriverLocalService service) throws IOException, TimeoutException, URISyntaxException {\n AppiumDriver driver;\n /* List<InterceptedMessage> messages = new ArrayList<InterceptedMessage>();\n\n\n MitmproxyJava proxy = new MitmproxyJava(\"/usr/local/bin/mitmdump\", (InterceptedMessage m) -> {\n System.out.println(\"intercepted request for \" + m.requestURL.toString());\n messages.add(m);\n return m;\n });\n //System.out.println(\"Hello World\");\n proxy.start();*/\n if (platformtype== \"Android\") {\n DesiredCapabilities options = new DesiredCapabilities();\n options.setCapability(\"deviceName\", propertyManager.getInstance().getdevicename()); //Pixel_XL_API_29\n options.setCapability(\"udid\",propertyManager.getInstance().getdeviceUDID());\n //options.setCapability(\"avd\",\"Pixel_XL_API_29\");\n options.setCapability(\"platformName\", propertyManager.getInstance().getplatformName());\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getplatformVersion()); //emulator: 10.0.0\n options.setCapability(\"automationName\", \"UiAutomator2\");\n options.setCapability(\"autoGrantPermissions\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"app\",propertyManager.getInstance().getAndroidapp());\n options.setCapability(\"uiautomator2ServerInstallTimeout\", \"60000\");\n options.setCapability(\"abdExecTimeout\", \"60000\");\n options.setCapability(\"ACCEPT_SSL_CERTS\",true);\n options.setCapability(\"clearDeviceLogsOnStart\",\"true\");\n //options.setCapability(\"--set ssl_version_client\",\"all\");\n //options.setCapability(\"--proxy-server\",\"localhost:8080\");\n //options.setCapability(\"appWaitPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appWaitActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n //options.setCapability(\"appPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n\n\n driver = new AndroidDriver<MobileElement>(service, options);\n return driver;\n }\n else if(platformtype== \"iOS\"){\n DesiredCapabilities options = new DesiredCapabilities();\n\n options.setCapability(\"platformName\", \"iOS\");\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getiOSplatformVersion());\n options.setCapability(\"deviceName\", propertyManager.getInstance().getiOSdevicename());\n options.setCapability(\"udid\",propertyManager.getInstance().getiOSUDID());\n //options.setCapability(CapabilityType.BROWSER_NAME,\"safari\");\n //options.setCapability(\"automationName\", \"XCUITest\");\n options.setCapability(\"bundleId\",\"com.clearchannel.iheartradio.enterprise\");\n options.setCapability(\"startIWDP\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"useNewWDA\",\"false\");\n //options.setCapability(\"showIOSLog\",\"true\");\n //options.setCapability(\"app\",\"/Users/Shruti/Desktop/untitled folder/iHRiOSAppCenter/iHeartRadio.ipa\"); // /Users/Shruti/Downloads/iHeartRadio.ipa\n options.setCapability(\"xcodeOrgId\",\"BCN32U332R\");\n options.setCapability(\"xcodeSigningId\",\"iPhone Developer\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"SHOW_XCODE_LOG\",\"true\");\n //options.setCapability(\"updatedWDABundleId\",\"com.Shruti7505.WebDriverAgentRunner\");\n driver = new IOSDriver<MobileElement>(service,options);\n return driver;\n }\n return driver=null;\n\n }", "public static AppiumDriver<MobileElement> setUp() {\n\t\ttry {\t\t\n\t\t\t\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME,\"ANDROID\");\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"10 QKQ1.190915.002\");\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Redmi Note 7 Pro\");\n\t\tcap.setCapability(MobileCapabilityType.UDID, \"d9b3ca47\");\n//\t\tcap.setCapability(MobileCapabilityType.APP, \"\");\n\t\tcap.setCapability(\"appPackage\", \"com.swaglabsmobileapp\");\n\t\tcap.setCapability(\"appActivity\", \"com.swaglabsmobileapp.SplashActivity\");\n\t\t\n\t\tURL url=new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\tdriver =new AppiumDriver<MobileElement>(url, cap);\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n//\t\tlog.info(\"Launching the app\");\n//\t\tMobileElement loginbutton = driver.findElement(MobileBy.AccessibilityId(\"test-LOGIN\"));\n// loginbutton.click();\n\t\t\t\treturn driver;\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn driver;\n\t\t}\n\t}", "public abstract void startup();", "public static void main(String[] args) {\n\t\tSettingUI serverUI = new SettingUI(\"server\");\n\n\t\t//System.out.print(\"Port(eg.1111): \");\n\t\t// int portNumber = 1111;\n\t\t// int portNumber = console.nextInt();\n\t\t// GameServer gameServer = new GameServer(portNumber);\n\t\t// gameServer.setUpChat();\n\t\t// gameServer.start();\n\t}", "public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "public static void start() {\n final Context appContext = ContextUtils.getApplicationContext();\n tryObtainingDataDirLock(appContext);\n // We must post to the UI thread to cover the case that the user\n // has invoked Chromium startup by using the (thread-safe)\n // CookieManager rather than creating a WebView.\n ThreadUtils.runOnUiThreadBlocking(new Runnable() {\n @Override\n public void run() {\n boolean multiProcess = CommandLine.getInstance().hasSwitch(\n AwSwitches.WEBVIEW_SANDBOXED_RENDERER);\n if (multiProcess) {\n // Have a background thread warm up a renderer process now, so that this can\n // proceed in parallel to the browser process initialisation.\n AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() {\n @Override\n public void run() {\n ChildProcessLauncher.warmUp(appContext);\n }\n });\n }\n // The policies are used by browser startup, so we need to register the policy\n // providers before starting the browser process. This only registers java objects\n // and doesn't need the native library.\n CombinedPolicyProvider.get().registerProvider(new AwPolicyProvider(appContext));\n\n try {\n BrowserStartupController.get(appContext, LibraryProcessType.PROCESS_WEBVIEW)\n .startBrowserProcessesSync(!multiProcess);\n } catch (ProcessInitException e) {\n throw new RuntimeException(\"Cannot initialize WebView\", e);\n }\n }\n });\n }", "private void run() {\n try {\n traceBeginAndSlog(\"InitBeforeStartServices\");\n SystemProperties.set(SYSPROP_START_COUNT, String.valueOf(this.mStartCount));\n SystemProperties.set(SYSPROP_START_ELAPSED, String.valueOf(this.mRuntimeStartElapsedTime));\n SystemProperties.set(SYSPROP_START_UPTIME, String.valueOf(this.mRuntimeStartUptime));\n EventLog.writeEvent((int) EventLogTags.SYSTEM_SERVER_START, Integer.valueOf(this.mStartCount), Long.valueOf(this.mRuntimeStartUptime), Long.valueOf(this.mRuntimeStartElapsedTime));\n if (System.currentTimeMillis() < 86400000) {\n Slog.w(TAG, \"System clock is before 1970; setting to 1970.\");\n SystemClock.setCurrentTimeMillis(86400000);\n }\n if (!SystemProperties.get(\"persist.sys.language\").isEmpty()) {\n SystemProperties.set(\"persist.sys.locale\", Locale.getDefault().toLanguageTag());\n SystemProperties.set(\"persist.sys.language\", \"\");\n SystemProperties.set(\"persist.sys.country\", \"\");\n SystemProperties.set(\"persist.sys.localevar\", \"\");\n }\n Binder.setWarnOnBlocking(true);\n PackageItemInfo.forceSafeLabels();\n SQLiteGlobal.sDefaultSyncMode = \"FULL\";\n SQLiteCompatibilityWalFlags.init((String) null);\n Slog.i(TAG, \"Entered the Android system server!\");\n int uptimeMillis = (int) SystemClock.elapsedRealtime();\n EventLog.writeEvent((int) EventLogTags.BOOT_PROGRESS_SYSTEM_RUN, uptimeMillis);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_system_server_init\", uptimeMillis);\n Jlog.d(30, \"JL_BOOT_PROGRESS_SYSTEM_RUN\");\n }\n SystemProperties.set(\"persist.sys.dalvik.vm.lib.2\", VMRuntime.getRuntime().vmLibrary());\n VMRuntime.getRuntime().clearGrowthLimit();\n VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);\n Build.ensureFingerprintProperty();\n Environment.setUserRequired(true);\n BaseBundle.setShouldDefuse(true);\n Parcel.setStackTraceParceling(true);\n BinderInternal.disableBackgroundScheduling(true);\n BinderInternal.setMaxThreads(31);\n Process.setThreadPriority(-2);\n Process.setCanSelfBackground(false);\n Looper.prepareMainLooper();\n Looper.getMainLooper().setSlowLogThresholdMs(SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);\n System.loadLibrary(\"android_servers\");\n if (Build.IS_DEBUGGABLE) {\n initZygoteChildHeapProfiling();\n }\n performPendingShutdown();\n createSystemContext();\n HwFeatureLoader.SystemServiceFeature.loadFeatureFramework(this.mSystemContext);\n this.mSystemServiceManager = new SystemServiceManager(this.mSystemContext);\n this.mSystemServiceManager.setStartInfo(this.mRuntimeRestart, this.mRuntimeStartElapsedTime, this.mRuntimeStartUptime);\n LocalServices.addService(SystemServiceManager.class, this.mSystemServiceManager);\n SystemServerInitThreadPool.get();\n traceEnd();\n try {\n traceBeginAndSlog(\"StartServices\");\n startBootstrapServices();\n startCoreServices();\n startOtherServices();\n SystemServerInitThreadPool.shutdown();\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n StrictMode.initVmDefaults(null);\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n int uptimeMillis2 = (int) SystemClock.elapsedRealtime();\n MetricsLogger.histogram((Context) null, \"boot_system_server_ready\", uptimeMillis2);\n if (uptimeMillis2 > 60000) {\n Slog.wtf(SYSTEM_SERVER_TIMING_TAG, \"SystemServer init took too long. uptimeMillis=\" + uptimeMillis2);\n }\n }\n LogBufferUtil.closeLogBufferAsNeed(this.mSystemContext);\n if (!VMRuntime.hasBootImageSpaces()) {\n Slog.wtf(TAG, \"Runtime is not running with a boot image!\");\n }\n Looper.loop();\n throw new RuntimeException(\"Main thread loop unexpectedly exited\");\n } catch (Throwable th) {\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n throw th;\n }\n } catch (Throwable th2) {\n traceEnd();\n throw th2;\n }\n }", "void launch();", "void launch();", "void launch();", "public void startApp() {\n if (midletPaused) {\n resumeMIDlet ();\n } else {\n initialize ();\n startMIDlet ();\n }\n midletPaused = false;\n }", "public void startApp() {\n if (midletPaused) {\n resumeMIDlet ();\n } else {\n initialize ();\n startMIDlet ();\n }\n midletPaused = false;\n }", "private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }", "@Override\r\n public Integer start(String[] strings) {\r\n //Load configuration from file \"app.conf\"\r\n IS.loadConfig();\r\n //Start Embedded DB Server\r\n IS.startDB();\r\n //start socket Server\r\n IS.startSocketServer();\r\n //start web server\r\n IS.startWebServer();\r\n\r\n //start CallbackController scheduler\r\n IS.startCallbackController();\r\n\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n try {\r\n //Subscribe for All Notifications via notification producer\r\n if (!IS.resumeCctConnection()) {\r\n IS.startCCT();\r\n }\r\n } finally {\r\n //Attach CCT Connection Monitor\r\n IS.attachCctSessionMonitor();\r\n }\r\n }\r\n }).start();\r\n\r\n return null;\r\n }", "@Override\n public void initialize() {\n\n try {\n /* Bring up the API server */\n logger.info(\"loading API server\");\n apiServer.start();\n logger.info(\"API server started. Say Hello!\");\n /* Bring up the Dashboard server */\n logger.info(\"Loading Dashboard Server\");\n if (dashboardServer.isStopped()) { // it may have been started when Flux is run in COMBINED mode\n dashboardServer.start();\n }\n logger.info(\"Dashboard server has started. Say Hello!\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public void startServer(View view) {\n Log.d(TAG, \"Server Starting........\");\n checkConnection();\n\n }", "public RemoteWebDriver startApp(String url) {\n\t\treturn startApp(\"chrome\", url);\r\n\t}", "@Test\n\tpublic void LaunchAppTest() throws MalformedURLException {\n\n\t\t// Appium Code to Launch the Calculator App without .apk File \n\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\t\tcapabilities.setCapability(\"appPackage\", \"com.android.calculator2\");\n\t\tcapabilities.setCapability(\"appActivity\", \"com.android.calculator2.Calculator\");\n\t\tcapabilities.setCapability(\"autoLaunch\", true);\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(\n\t\t\t\tnew URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\tdriver.quit();\n\t}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t//Launch app\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\t//device details\n\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\tcapabilities.setCapability(\"app\", app.getAbsolutePath());\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\n\t\t//wait\n\t\tThread.sleep(4000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"App installed Successfully\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tSystem.out.println(\"Removed the app\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.installApp(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\tSystem.out.println(\"App installed again\");\n\t\t\tThread.sleep(8000);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT installed the app\");\n\t\t}\n\t\n\t}", "public void startServer(PWModelDetails pwModelDetails) {\n try {\n List<ServerSap> serverSaps = null;\n try {\n serverSaps = ServerSap.getSapsFromSclFile(pwModelDetails.getSclFileName());\n } catch (SclParseException e) {\n logger.info(\"Error parsing SCL/ICD file: \" + e.getMessage());\n e.printStackTrace();\n return;\n }\n serverSap = serverSaps.get(0);\n serverSap.setPort(pwModelDetails.getPortNumber());\n\n InetAddress address = null;\n try {\n ipAddress = pwModelDetails.getIpAddress();\n address = InetAddress.getByName(ipAddress);\n } catch (UnknownHostException e) {\n logger.info(\"Unknown host: \" + ipAddress);\n logger.info(\"Proxy will run with the defualt IP as define in the SCL file.\");\n logger.info(\"Unknown host \" + ipAddress);\n return;\n }\n if (address != null) {\n serverSap.setBindAddress(address);\n }\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n if (serverSap != null) {\n serverSap.stop();\n }\n logger.info(\"Server was stopped\");\n }\n });\n ServerModel serverModel = serverSap.getModelCopy();\n// create a SampleServer instance that can be passed as a callback object to startListening() and\n// SmartPowerIEDServer sampleServer = new SmartPowerIEDServer();\n SoftGridIEDServer sampleServer = this;\n// Open MUC initialization\n List<BasicDataAttribute> branchCircuitBreakerVals = new ArrayList<BasicDataAttribute>(3);\n for (String reference : iedRefFcHashMap.keySet()) {\n BasicDataAttribute field = (BasicDataAttribute) serverModel.findModelNode(reference, iedRefFcHashMap.get(reference));\n if (field == null) {\n logger.info(\">>>>>> Error in obtaining SCL reference object = \" + reference);\n }\n branchCircuitBreakerVals.add(field);\n }\n// Power World Device Initialization\n ParameterGenerator parameterGenerator = new ParameterGenerator();\n parameterGenerator.setSclKeyToPWKeyMap(pwModelDetails.getSclToPWMapping());\n parameterGenerator.setKeyParameters(pwModelDetails.getKeyArray());\n parameterGenerator.setValueParameters(pwModelDetails.getDataFieldArray());\n parameterGenerator.setPersistedValues(pwModelDetails.getValueArray());\n parameterGenerator.setDeviceObjectName(pwModelDetails.getDeviceName());\n if (controlAPI == null) {\n controlAPI = IedControlerFactory.getPWComBridgeIterface();\n synchronized (controlAPI) {\n if (!controlAPI.isCaseOpened()) {\n controlAPI.openCase();\n }\n }\n }\n parameterGenerator.setControlAPI(controlAPI);\n// load power world data\n serverSap.startListening(sampleServer, parameterGenerator);\n try {\n serverSap.setValues(branchCircuitBreakerVals);\n } catch (Exception e) {\n logger.info(\"pwModelDetails.getModelNodeReference() = \" + pwModelDetails.getModelNodeReference());\n e.printStackTrace();\n }\n\n String[][] paramPack = parameterGenerator.getParamPack();\n type = IEDUtils.getIEDType(parameterGenerator.getDeviceObjectName());\n id = ++IED_COUNT;\n StringBuffer sb = new StringBuffer();\n String logDataSeperator = \":\";\n boolean loged = false;\n logEvent(\"IED : \" + type.name() + \" : \" + id + \" is Started...!\");\n String[] elements = null;\n while (true) {\n synchronized (this) {\n try {\n Thread.sleep(PW_INTERROGATION_INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n elements = parameterGenerator.loadDataValues(paramPack);\n if (elements == null) {\n if(type.name().equals(\"BUS\"))\n {\n System.out.println(\"BUS\");\n }\n continue;\n }\n sb.append(\"Type:\").append(type.name());\n for (int i = 0; i < branchCircuitBreakerVals.size(); i++) {\n BasicDataAttribute modelNodes = branchCircuitBreakerVals.get(i);\n if (modelNodes != null && elements.length > i) {\n String pwKeyName = null;\n for (String sclKey : parameterGenerator.getSclKeyToPWKeyMap().keySet()) {\n if (modelNodes.getReference().toString().endsWith(sclKey)) {\n pwKeyName = sclKey;\n }\n }\n if (pwKeyName == null) {\n continue;\n }\n for (int j = 0; j < paramPack[0].length; j++) {\n if (!loged) {\n sb.append(logDataSeperator).append(paramPack[0][j]).append(logDataSeperator).append(elements[j]);\n }\n if (parameterGenerator.getSclKeyToPWKeyMap().get(pwKeyName).equals(paramPack[0][j])) {\n if (modelNodes instanceof BdaDoubleBitPos) {\n byte[] status = new byte[1];\n if (elements[j].equalsIgnoreCase(\"open\")) {\n status[0] = 0;\n } else {\n status[0] = 1;\n }\n ((BdaDoubleBitPos) modelNodes).setValue(status);\n } else if (modelNodes instanceof BdaVisibleString) {\n ((BdaVisibleString) modelNodes).setValue(elements[j]);\n } else if (modelNodes instanceof BdaFloat32) {\n ((BdaFloat32) modelNodes).setFloat(Float.parseFloat(elements[j]));\n }\n }\n }\n loged = true;\n }\n }\n serverStarted = true;\n// synchronized (logger) {\n// if (ConfigUtil.MANUAL_EXPERIMENT_MODE) {\n // if this string is not printed in the log file,\n logger.info(sb.toString());\n// }\n// }\n sb = new StringBuffer(\"\");\n loged = false;\n serverSap.setValues(branchCircuitBreakerVals);\n if (serverStoped) {\n serverStarted = false;\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void start() {}", "public void start() {}", "public void run() {\n Intent in = new Intent(activity, serverconnectionerror.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n }", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "@BeforeClass\n public void beforeClass() throws MalformedURLException {\n\t DesiredCapabilities caps = new DesiredCapabilities();\n\t caps.setCapability(\"devicename\", \"Pixel\");\n\t caps.setCapability(\"platform\", \"Android\");\n\t caps.setCapability(\"addActivity\", \".ui.TaskListsActivity\");\n\t caps.setCapability(\"addPackage\", \"com.google.android.apps.tasks\");\n\t caps.setCapability(\"noReset\", true);\n\t caps.setCapability(\"webviewDevtoolsPort\", 9543);\n\t \n\t //instantiate appium driver\n\t URL appserver = new URL(\"http://0.0.0.0:4723/wd/hub\");\n\t driver = new AndroidDriver<MobileElement>(appserver,caps);\n\t wait = new WebDriverWait(driver, 5);\n }", "public static void main(String[] args) throws IOException, InterruptedException {\t\n\t\t\n\t\t System.out.println(\"Starting AndroidApp write simulator as standalone...\");\n\t\t \n\t\t File monitoredFile = new File(\"/home/fulvio/andoffline.txt\");\n\t\t\t\n\t\t// 1 start the SD card file writer process that simulate the AndofflineApp\n\t\tAndroidFileWriterSimulator androidFileWriterSimulator = new AndroidFileWriterSimulator(monitoredFile);\n\t\tandroidFileWriterSimulator.startWriterSimulator();\n\t }", "public static void main(String[] args) throws MalformedURLException {\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\r\n\t\tcap.setCapability(\"deviceName\",\"abc\");\r\n\t\tcap.setCapability(\"platformName\", \"Android\");\r\n\t\t//cap.setCapability(\"udid\",\"emulator-5554\");\r\n\t\tcap.setCapability(\"appPackage\",\"com.udemy.android\");\r\n\t\tcap.setCapability(\"appActivity\",\"com.udemy.android.SplashActivity\");\r\n\t\tcap.setCapability(\"uiautomator2ServerLaunchTimeout\", 600000);\r\n\t\tcap.setCapability(\"adbExecTimeout\", 600000);\r\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"),cap);\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/browse_button\")).click();\r\n\t\tdriver.findElement(MobileBy.AccessibilityId(\"Search tab\")).click();\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/search_bar_text\")).click();\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/search_bar_text\")).sendKeys(\"selenium\");\r\n\t\tdriver.hideKeyboard();\r\n\r\n\t}", "public void init() {\r\n\t\tGetRunningProgramsGR request = new GetRunningProgramsGR(\r\n\t\t\t\tRunningServicesListViewAdapter.this.runningServicesActivity.getApplicationContext());\r\n\t\trequest.setServerName(RunningServicesListViewAdapter.this.serverName);\r\n\t\tnew GuiRequestHandler(RunningServicesListViewAdapter.this.runningServicesActivity,\r\n\t\t\t\tRunningServicesListViewAdapter.this, true).execute(request);\r\n\t}", "public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void testBasicDevStartup() throws InterruptedException, ClassNotFoundException, ExecutionException, TimeoutException {\n\t\ttestArgSetup(\"test\");\n\t\t\n\t\t//really just making sure we don't throw an exception...which catches quite a few mistakes\n\t\tDevelopmentServer server = new DevelopmentServer(true);\n\t\t//In this case, we bind a port\n\t\tserver.start();\n\t\t//we should depend on http client and send a request in to ensure operation here...\n\t\t\n\t\tserver.stop();\n\t}", "@Override\r\n\tpublic void startup() {\n\t\t\r\n\t\tString wechatID = \"gh_f49bb9a333b3\";\r\n\t\tString Token = \"spotlight-wechat\";\r\n\t\t\r\n\t\tNoIOClient client = new NoIOClient(\"mg.protel.com.hk\",5010);\r\n\t\tclient.addCRouter(wechatID, Token,null,null);\r\n\t\t\r\n\t\tclient.startup();\r\n\r\n\t}", "public static void main(String[] args){\n\n Executors.newSingleThreadExecutor().execute(new Runnable() {\n public void run() {\n System.out.println(\"Starting\");\n new ScheduleExecutor();\n }\n });\n\n new Server(5821, 10).launch();\n\n }", "protected void startRoboboApplication() {\n\n\n\n t.schedule(new startInterface(),(long)1000);\n\n try {\n robobo.getModuleInstance(IRemoteControlModule.class).suscribe(this);\n } catch (ModuleNotFoundException e) {\n e.printStackTrace();\n }\n\n\n// try {\n// interfaceModule.getRobInterface().resetPanTiltOffset();\n// } catch (InternalErrorException e) {\n// e.printStackTrace();\n// }\n\n\n }", "@BeforeTest\n\t\tpublic void setUp() throws MalformedURLException {\n\t\t\t DesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t // Set android deviceName desired capability. Set your device name.\n\t\t\t capabilities.setCapability(\"deviceName\", \"Custom Phone - 4.2.2 API 17 - 768*1280\");\n\t\t\t // Set BROWSER_NAME desired capability. It's Android in our case here.\n\t\t\t capabilities.setCapability(\"browserName\", \"Android\");\n\n\t\t\t // Set android VERSION desired capability. Set your mobile device's OS version.\n\t\t\t capabilities.setCapability(\"platformVersion\", \"4.2.2\");\n\n\t\t\t // Set android platformName desired capability. It's Android in our case here.\n\t\t\t capabilities.setCapability(\"platformName\", \"Android\");\n\t\t\t // Created object of RemoteWebDriver will all set capabilities.\n\t\t\t // Set appium server address and port number in URL string.\n\t\t\t // It will launch calculator app in android device.\n\t\t\t // capabilities.setCapability(\"unicodeKeyboard\", true);\n\t\t\t // capabilities.setCapability(\"resetKeyboard\", true);\n\t\t\t driver = new RemoteWebDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\t driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\t\t }", "public void start() {\n\t\tSystem.out.println(\"开启系统1\");\r\n\t}", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "@BeforeClass\npublic void setUp() throws MalformedURLException{\n\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t//capabilities.setCapability(\"BROWSER_NAME\", \"Android\");\n//\tcapabilities.setCapability(\"VERSION\", \"4.4.2\"); \n\tcapabilities.setCapability(\"deviceName\",\"NSM3Y18206000488\");\n\tcapabilities.setCapability(\"udid\",\"NSM3Y18206000488\");\n\tcapabilities.setCapability(\"platformName\",\"Android\");\n capabilities.setCapability(\"appPackage\", \"com.android.chrome\");\n// This package name of your app (you can get it from apk info app)\n\tcapabilities.setCapability(\"appActivity\",\"com.google.android.apps.chrome.Main\"); // This is Launcher activity of your app (you can get it from apk info app)\n//Create RemoteWebDriver instance and connect to the Appium server\n //It will launch the Calculator App in Android Device using the configurations specified in Desired Capabilities\n driver = new AndroidDriver<MobileElement>(new URL(\"http://localhost:4723/wd/hub\"), capabilities);\n \n // PageFactory.initElements(driver, this);\n}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\nDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\tcapabilities.setCapability(\"appPackage\", \"org.khanacademy.android\");\n\t\tcapabilities.setCapability(\"appActivity\", \"org.khanacademy.android.ui.library.MainActivity\");\n\t\t\n\t\tAndroidDriver driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\n\t\tThread.sleep(20000);\n\t\tSystem.out.println(driver.getContext());\n\t\t\n\t\tSet<String> contextNames = driver.getContextHandles();\n\t\tSystem.out.println(contextNames.size());\n\t\t //You can prints out something like NATIVE_APP , WEBVIEW_1 \n\t\t for (String contextName : contextNames) { \n\t\t System.out.println(contextName);\n//\t\t if (contextName.contains(\"WEBVIEW\")){\n//\t driver.context(contextName);\n//\t }\n\t\t }\n\n\t\t \n\n\t}", "public void startApp() {\r\n\t\ttry {\r\n\t\t\tFXMLLoader loader;\r\n\t\t\t// load the FXML resource\r\n\t\t\tif (isRegister) {\r\n\t\t\t\tloader = changeScreen(\"/view/HomeRegister.fxml\", new BorderPane(), \"Register\");\r\n\t\t\t\tHomeRegisterController regiController = loader.getController();\r\n\t\t\t\tregiController.setMain(this);\r\n\t\t\t} else {\r\n\t\t\t\tloader = changeScreen(\"/view/HomeIdentification.fxml\", new BorderPane(), \"Identification\");\r\n\t\t\t\tHomeIdentificationController identiController = loader.getController();\r\n\t\t\t\tidentiController.setMain(this);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "@BeforeSuite\r\n\tvoid start() throws ClassNotFoundException, SQLException\r\n\t{\r\n\t\t//Database obj = new Database();\r\n\t\t//Database.database();\r\n\t\t\r\n\t\tstartServer();\r\n\t\tobj_phoneno = new PageObject_phonenumber(androidDriver) ;\r\n\t\tLog4j.info(\"SERVER START--log\");\r\n\t\t//Log4j.info();\r\n\t\t/*obj_otp=new PageObject_OTP(androidDriver);\r\n\t\tobj_setupprofile=new PageObject_setupprofile(androidDriver);*/\r\n\t}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"XT1033\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\t//app details\n\t\tcapabilities.setCapability(\"app\",app.getAbsolutePath());\n\t\t\n\t\t//Appium details\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\n\t\tThread.sleep(12000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"Successfully Installed\");\n\t\t\t\n\t\t\t//Remove thrugh code\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Removed sucessfully\");\n\t\t\t\n\t\t\t\n\t\t\tdriver.installApp(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Again Installed the app\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT Installed the app\");\n\t\t}\n\n\t\t\n\n\t}", "private static void setupOsgi() {\r\n FrameworkStarter.getInstance().start();\r\n }", "@BeforeClass\n public void beforeClass() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"deviceName\", \"bb9d156c\");\n caps.setCapability(\"platformName\", \"Android\");\n caps.setCapability(\"appPackage\", \"com.google.android.apps.tasks\");\n caps.setCapability(\"appActivity\", \".ui.TaskListsActivity\");\n // caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n }", "private void start() {\n\n\t}", "void startServer(String name, Config.ServerConfig config);", "@BeforeClass\npublic void beforeClass() throws MalformedURLException {\n\tDesiredCapabilities caps = new DesiredCapabilities();\n\tcaps.setCapability(\"deviceName\", \"Xiaomi Redmi Note 5 Pro\");\n caps.setCapability(\"platformName\", \"android\");\n caps.setCapability(\"automationName\", \"UiAutomator2\");\n caps.setCapability(\"appPackage\", \"com.android.chrome\");\n caps.setCapability(\"appActivity\", \"com.google.android.apps.chrome.Main\");\n caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n}", "protected void start() {\n }", "public static void main(String[] args){\n try {\n GameClient.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }" ]
[ "0.8269493", "0.7974706", "0.7836668", "0.75946224", "0.7484762", "0.73977244", "0.73634607", "0.70939416", "0.6969183", "0.6858095", "0.6782031", "0.6732976", "0.66703475", "0.6655076", "0.65852344", "0.6569516", "0.655524", "0.65018994", "0.64302653", "0.64261657", "0.6397126", "0.6385308", "0.63265234", "0.63220894", "0.62283796", "0.6183645", "0.6181094", "0.6149394", "0.6140432", "0.6096329", "0.60943854", "0.60516465", "0.6049634", "0.60437715", "0.6038292", "0.6033849", "0.6020012", "0.60074174", "0.6006951", "0.59980303", "0.5996831", "0.59846056", "0.5982897", "0.59641093", "0.59559125", "0.5954785", "0.5952001", "0.59460044", "0.59425604", "0.5914603", "0.5912853", "0.59093225", "0.59063005", "0.59047836", "0.58988273", "0.58982486", "0.5898048", "0.5897959", "0.58935213", "0.58925676", "0.58925676", "0.58925676", "0.58902407", "0.58902407", "0.5890008", "0.5884414", "0.5868928", "0.58654726", "0.58525115", "0.58511114", "0.58496237", "0.5839722", "0.5838355", "0.5838355", "0.58349067", "0.581954", "0.5809888", "0.5806409", "0.57953227", "0.57802975", "0.57749504", "0.57748437", "0.57746524", "0.577281", "0.5768659", "0.57670736", "0.57669604", "0.5765311", "0.5758278", "0.5755333", "0.5750074", "0.57455164", "0.5745456", "0.5743949", "0.5740244", "0.5739091", "0.57386774", "0.57384604", "0.5733581", "0.57296604" ]
0.6821128
10
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); checkCameraHardware(this); // Create an instance of Camera mCamera = getCameraInstance(); // Create our Preview view and set it as the content of our activity. mPreview = new CameraPreview(this, mCamera); FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview); preview.addView(mPreview); // Add a listener to the Capture button Button captureButton = (Button) findViewById(R.id.button_capture); captureButton.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { if (isRecording) { // stop recording and release camera Log.d(TAG, "isRecording: "); releaseMediaRecorder(); // release the MediaRecorder object try { if (socket != null) { socket.close(); } } catch (IOException e) { Log.d(TAG, "IOException: " + e.getMessage()); } mCamera.lock(); // take camera access back from MediaRecorder isRecording = false; } else { // initialize video camera if (prepareVideoRecorder()) { // Camera is available and unlocked, MediaRecorder is prepared, // now you can start recording mMediaRecorder.start(); // inform the user that recording has started //setCaptureButtonText("Stop"); isRecording = true; } else { // prepare didn't work, release the camera releaseMediaRecorder(); // inform user } } } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.79177165", "0.77268666", "0.7693204", "0.7693204", "0.7693204", "0.7693204", "0.7693204", "0.7693204", "0.7637164", "0.7637164", "0.76318395", "0.7618896", "0.7618896", "0.75437796", "0.7539822", "0.7539822", "0.7539348", "0.75277805", "0.751581", "0.7510227", "0.7501691", "0.7482301", "0.7476064", "0.7470323", "0.7470323", "0.745643", "0.7437511", "0.7425495", "0.74232626", "0.73933935", "0.73706084", "0.7358124", "0.7358124", "0.7352261", "0.7348374", "0.7348374", "0.7333149", "0.7312197", "0.7267594", "0.7261821", "0.7253435", "0.7242377", "0.7214264", "0.71877277", "0.7183542", "0.7173681", "0.7169982", "0.7167938", "0.7147568", "0.714221", "0.71337724", "0.71175146", "0.7099078", "0.7098365", "0.70938575", "0.70938575", "0.7086241", "0.70763654", "0.7074094", "0.7071145", "0.704998", "0.7041525", "0.7037855", "0.7013", "0.70057905", "0.70054734", "0.7003888", "0.70005256", "0.69954646", "0.6991001", "0.69884914", "0.69839656", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.6982389", "0.69801646", "0.6977675", "0.69677746", "0.6966507", "0.6965295", "0.6963108", "0.6962776", "0.69622207", "0.69613934", "0.6948459", "0.69406855", "0.6936473", "0.69351107", "0.6928618", "0.69271314", "0.6925013" ]
0.0
-1
Check if this device has a camera
private boolean checkCameraHardware(Context context) { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){ // this device has a camera Log.d(TAG, "this device has a camera"); return true; } else { // no camera on this device Log.d(TAG, "no camera on this device"); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasCamera() {\n return mCamera != null;\n }", "private boolean hasCamera(){\n return getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY);\n }", "public boolean isCameraAvailable() {\n PackageManager pm = getPackageManager();\n return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "private boolean hasCamera(){\n\n return getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY); // provjera da li postji bilo koja kamera\n }", "private boolean isDeviceSupportCamera() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean isDeviceSupportCamera(){\n\t\tif(getApplicationContext().getPackageManager().hasSystemFeature(\n\t\t\t\tPackageManager.FEATURE_CAMERA)){\n\t\t\t//This device has a camera\n\t\t\treturn true;\n\t\t}else{\n\t\t\t//No camera on this device\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isDeviceSupportCamera() {\n // this device has a camera\n// no camera on this device\n return getActivity().getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA);\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean hasCamera(Context context) {\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "private boolean checkCameraHardware(Context context) {\n // this device has a camera\n // no camera on this device\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "public static boolean hasCamera(Context context) {\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "public static boolean hasCamera(final Context context) {\n final PackageManager pm = context.getPackageManager();\n return pm != null && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }", "private boolean checkCameraHardware(Context context) {\r\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\r\n return true; // Tiene camara\r\n } else {\r\n return false;// No tiene camara\r\n }\r\n }", "public boolean checkCameraHardware(Context context) {\n if(context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean needsCameraPermission() {\n try {\n if (!Arrays.asList(getCurrentActivity().getPackageManager().getPackageInfo(getReactApplicationContext().getPackageName(), 4096).requestedPermissions).contains(\"android.permission.CAMERA\") || ContextCompat.checkSelfPermission(getCurrentActivity(), \"android.permission.CAMERA\") == 0) {\n return false;\n }\n return true;\n } catch (PackageManager.NameNotFoundException unused) {\n return true;\n }\n }", "public boolean isCameraPermissionGranted() {\n return PermissionUtils.isPermissionGranted(mContext, android.Manifest.permission.CAMERA);\n }", "public void checkPermissionsCamera() {\n PackageManager packageManager = EditProfile.this.getPackageManager();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //Checking the permissions for using the camera.\n if (checkSelfPermission(Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.CAMERA},\n MY_PERMISSIONS_REQUEST_CAMERA);\n } else if (packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY) == false) {\n Toast.makeText(EditProfile.this, \"This device does not have a camera.\", Toast.LENGTH_LONG)\n .show();\n return;\n }\n }\n }", "@Override // com.master.cameralibrary.CameraViewImpl\n public boolean isCameraOpened() {\n return this.mCamera != null;\n }", "static boolean hasCameraPermission(Activity activity) {\n return ContextCompat.checkSelfPermission(activity, Manifest.permission.CAMERA)\n == PackageManager.PERMISSION_GRANTED;\n }", "@Override\n\tpublic boolean isCameraRelated() {\n\t\treturn true;\n\t}", "private boolean _getCamera(){\n\n\t\ttry {\n\n\t\t\t// instantiate flash light object depending on SDK version\n\t\t\tif (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n\t\t\t\t_flash = new FlashLight_Pre_Marshmallow();\n\t\t\t}else{\n\t\t\t\t_flash = new FlashLight_Post_Marshmallow(_main);\n\t\t\t}\n\n\t\t\t// open the flash\n\t\t\t_flash.open();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tL.e(TAG, \"Camera Error : Couldn't get the camera, it may be used by another app !\");\n\t\t\tL.e(TAG, \"Camera Error : \" + e.getMessage());\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "protected boolean isActive() {\n return cameraInstance != null;\n }", "public static boolean isCameraAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.CAMERA);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private boolean checkCameraPermission() {\n if (ActivityCompat.checkSelfPermission(parentActivity, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(parentActivity, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(parentActivity, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 200);\n return false;\n }\n return true;\n }", "boolean useCamera2();", "private void checkCameraPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n 0);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n cameraView = (JavaCameraView) findViewById(R.id.camera);\n cameraView.setVisibility(SurfaceView.VISIBLE);\n cameraView.setCvCameraViewListener(this);\n\n mLoaderCallback = new BaseLoaderCallback(this) {\n\n @Override\n public void onManagerConnected(int status) {\n switch (status) {\n case LoaderCallbackInterface.SUCCESS: {\n Log.i(\"\", \"Opencv loading success.\");\n cameraView.enableView();\n break;\n }\n default: {\n Log.i(\"OPENCV\", \"Opencv loading failed!\");\n super.onManagerConnected(status);\n }\n break;\n }\n }\n };\n }\n }", "public boolean shouldHaveStarted() {\n return mCameraStarted.get();\n }", "private boolean useCamera2() {\n return Camera2Enumerator.isSupported(this);\n }", "private boolean _checkIfCameraHasFlash(){\n\n\t\t// Checks to see if the device has a camera flash (flash light)\n\t\tboolean hasFlash = _main.getApplicationContext()\n\t\t\t\t.getPackageManager()\n\t\t\t\t.hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);\n\n\t\treturn hasFlash;\n\t}", "protected static boolean cameraExists(@NotNull String cameraId) {\n return cameraId.equals(internalCameraId) || externalCameras.containsKey(cameraId);\n }", "public void getCameraInstance() {\n newOpenCamera();\n }", "Camera getCamera();", "public boolean checkPermission() {\n int cameraPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA);\n int readContactPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.READ_CONTACTS);\n return cameraPermissionResult == PackageManager.PERMISSION_GRANTED && readContactPermissionResult == PackageManager.PERMISSION_GRANTED;\n }", "public boolean videoCaptureEnabled();", "public boolean hasCameraOpenLevel9() {\r\n return mMethodOpenLevel9 != null;\r\n }", "private void getCamera() {\n if (camera == null) {\n try {\n camera = Camera.open();\n params = camera.getParameters();\n } catch (RuntimeException e) {\n\n }\n }\n }", "public CameraInstance getCameraInstance() {\n return cameraInstance;\n }", "public static boolean hasFrontCamera(final Context context) {\n final PackageManager pm = context.getPackageManager();\n return pm != null && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT);\n }", "public static Camera getCameraInstance(){\n Camera c = null;\n try {\n c = Camera.open(); // attempt to get a Camera instance\n }\n catch (Exception e){\n // Camera is not available (in use or does not exist)\n }\n return c; // returns null if camera is unavailable\n }", "public static Camera getCameraInstance(){\n Camera c = null;\n try {\n c = Camera.open(); // attempt to get a Camera instance\n }\n catch (Exception e){\n // Camera is not available (in use or does not exist)\n }\n return c; // returns null if camera is unavailable\n }", "private boolean isFrontCamera() {\n closeMenu();\n\n if (mIsVersionJ || mIsVersionK) {\n return (mDevice.hasObject(By.desc(\"Switch to back camera\")));\n } else if (mIsVersionI) {\n return (mDevice.hasObject(By.desc(\"Front camera\")));\n } else {\n // Open mode options if not open\n UiObject2 modeoptions = getModeOptionsMenuButton();\n if (modeoptions != null) {\n modeoptions.click();\n }\n return (mDevice.hasObject(By.desc(\"Front camera\")));\n }\n }", "public static Camera getCameraInstance(){\n\t Camera c = null;\n\t try {\n\t \tLog.d(TAG, \"not null\");\n\t c = Camera.open(); // attempt to get a Camera instance\n\t }\n\t catch (Exception e){\n\t // Camera is not available (in use or does not exist)\n\t }\n\t return c; // returns null if camera is unavailable\n\t}", "public int cameraOn() {\r\n System.out.println(\"hw- ligarCamera\");\r\n return serialPort.enviaDados(\"!111O*\");//camera ON \r\n }", "public void obtainCameraOrFinish() {\n mCamera = getCameraInstance();\n if (mCamera == null) {\n Toast.makeText(VideoCapture.getSelf(), \"Fail to get Camera\", Toast.LENGTH_LONG).show();\n VideoCapture.getSelf().finish();\n }\n }", "boolean hasDevice();", "public Camera getCamera() {\n return getValue(PROP_CAMERA);\n }", "public boolean getCameraPreviewState() {\n return this.mCameraState == 3;\n }", "public void onCamera();", "public boolean hideCamera() {\n return false;\n }", "public boolean hideCamera() {\n return false;\n }", "@NeedsPermission(Manifest.permission.CAMERA)\n void canGo() {\n }", "public boolean isCameraFrontFacing() {\n Characteristics chara = null;\n try {\n chara = this.mAppController.getCameraProvider().getCharacteristics(this.mCameraId);\n } catch (NullPointerException e) {\n }\n if (chara != null) {\n return chara.isFacingFront();\n }\n boolean z = true;\n if (this.mCameraId != 1) {\n z = false;\n }\n return z;\n }", "private void requestCameraPermission() {\n Log.w(TAG, \"Camera permission is not granted. Requesting permission\");\n final String[] permissions = new String[]{Manifest.permission.CAMERA};\n if (!ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n ActivityCompat.requestPermissions(this, permissions, RC_HANDLE_CAMERA_PERM);\n }\n }", "public int getCameraCount() {\n return camera_.size();\n }", "public static Camera getInstance() {\r\n return instance;\r\n }", "public static Camera getCameraInstance() {\n Camera c = null;\n try {\n c = Camera.open(nextCam); // attempt to get a Camera instance\n } catch (Exception e) {\n // Camera is not available (in use or does not exist)\n }\n return c; // returns null if camera is unavailable\n }", "public Camera getCamera() { return (Camera)CameraSet.elementAt(0); }", "public boolean previewEnabled(Camera camera) {\r\n boolean retVal = false;\r\n try {\r\n if (mMethodPreviewEnabled != null) {\r\n Boolean b = (Boolean) mMethodPreviewEnabled.invoke(camera);\r\n retVal = b.booleanValue();\r\n }\r\n } catch (Exception e) {\r\n Log.w(LOG_TAG, \"CameraHideMethods:mMethodPreviewEnabled()\", e);\r\n }\r\n\r\n return retVal;\r\n }", "public boolean isNotifyEstimatedSlamCameraEnabled() {\n return mNotifyEstimatedSlamCamera;\n }", "public OrthographicCamera getCamera() {\n\t\treturn cam;\n\t}", "public java.util.List<org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera> getCameraList() {\n return camera_;\n }", "private boolean checkPermission() {\n\n if ((ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED)\n\n ) {\n\n // Permission is not granted\n return false;\n\n }\n return true;\n }", "private void askCameraPermission(){\n /** {@PERMISSION_GRANTED} value is 0 that means if permission is granted then checkSelfPermission will inform us by int\n * and if {@checkSelfPermission} is not 0 that means permission is not granted so we need to ask the permission at run time\n * only for API above 23*/\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){\n ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.CAMERA},CAMERA_CAPTURE_IMAGE_PERMISSION_CODE);\n }else{\n // if permission is granted then open camera directly\n dispatchTakePictureIntent();\n }\n }", "public void openCamera() {\n \n\n }", "public interface CameraDescriptor {\n /**\n * @return The possible preview sizes for the camera, in no\n * particular order\n */\n ArrayList<Size> getPreviewSizes();\n\n /**\n * @return The possible picture sizes for the camera, in no\n * particular order\n */\n ArrayList<Size> getPictureSizes();\n\n /**\n * Indicates if the camera (and this library) supports a\n * particular image format for pictures.\n *\n * @param format an ImageFormat value (e.g., ImageFormat.JPEG)\n * @return true if supported, false otherwise\n */\n boolean isPictureFormatSupported(int format);\n}", "boolean hasCaptureProbabilities();", "public void checkCam(Camera cam) {\n\t\t\t\n\t\t\tLog.e(\"DownloaderManager \", \"checkCam\");\n\t\t\t\n\t\t\ttempCamera = cam;\n\t\t\t\n\t\t\tif (!isRTMP(tempCamera.getAddress())){\n\t\t\t\n\t\t\t\t//check if camera is online\n\t\t\t\thttpControler.checkCamOnline(tempCamera.getAddress(), cameraStatus);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//rtmpControler.startDownloading(tempCamera, newFrameHandler);\n\t\t\t\trtmpControler.checkCamOnline(tempCamera.getAddress(), cameraStatus);\n\t\t\t}\n\t\t}", "public void setCamera(Camera camera) {\r\n\t\tthis.camera = camera;\r\n\t}", "public boolean hasImageCaptureBug() {\n // list of known devices that have the bug\n ArrayList<String> devices = new ArrayList<String>();\n devices.add(\"android-devphone1/dream_devphone/dream\");\n devices.add(\"generic/sdk/generic\");\n devices.add(\"vodafone/vfpioneer/sapphire\");\n devices.add(\"tmobile/kila/dream\");\n devices.add(\"verizon/voles/sholes\");\n devices.add(\"google_ion/google_ion/sapphire\");\n\n return devices.contains(android.os.Build.BRAND + \"/\" + android.os.Build.PRODUCT + \"/\"\n + android.os.Build.DEVICE);\n }", "public boolean isCameraFrontFacing() {\n return this.mAppController.getCameraProvider().getCharacteristics(this.mCameraId).isFacingFront();\n }", "public OrthographicCamera getCamera() {\n\t\treturn this.camera;\n\t}", "private void requestCameraPermission() {\r\n Dexter.withActivity(this)\r\n .withPermission(Manifest.permission.CAMERA)\r\n .withListener(new PermissionListener() {\r\n @Override\r\n public void onPermissionGranted(PermissionGrantedResponse response) {\r\n // permission is granted\r\n Toast.makeText(getApplicationContext(), \"Camera permission are granted!\", Toast.LENGTH_SHORT).show();\r\n\r\n Intent camera_intent=new Intent(MainActivity.this,CameraActivity.class);\r\n startActivity(camera_intent);\r\n }\r\n\r\n @Override\r\n public void onPermissionDenied(PermissionDeniedResponse response) {\r\n // check for permanent denial of permission\r\n if (response.isPermanentlyDenied()) {\r\n showSettingsDialog();\r\n }\r\n }\r\n\r\n @Override\r\n public void onPermissionRationaleShouldBeShown(PermissionRequest permission, PermissionToken token) {\r\n token.continuePermissionRequest();\r\n }\r\n }).check();\r\n }", "private void requestCameraPermission() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {\n Toast.makeText(this, \"No Permissions\" , Toast.LENGTH_LONG).show();\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO}, 0);\n }\n else\n {\n Toast.makeText(this, \"Has Permissions\" , Toast.LENGTH_LONG).show();\n }\n }", "private void requestCameraPermission() {\n\t\tLog.d(TAG, \"Requesting CAMERA permission\");\n\t\tActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, PERMISSION_REQUEST_CAMERA);\n\t}", "public static Camera getInstance() {\n return INSTANCE;\n }", "public void setCamera(Camera camera) {\n mCamera = camera;\n }", "@RestrictTo(Scope.LIBRARY_GROUP)\n protected void onCameraControlReady(String cameraId) {\n }", "public interface ICamera {\n}", "public Camera getCam() {\n return this.cam;\n }", "public static Camera open() { \n return new Camera(); \n }", "public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }", "public void startCamera()\n {\n startCamera(null);\n }", "public boolean soundDeviceCanCapture(String device);", "boolean isCameraBurstPref();", "void cameraSetup();", "public static Camera getCameraInstance(){\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {\n return Camera.open(0); // This is the line the error occurs\n } else {\n return Camera.open();\n }\n }", "public boolean checkForPermission() {\r\n int permissionCAMERA = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA);\r\n int storagePermission = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\r\n int accessCoarseLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION);\r\n int accessFineLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n List<String> listPermissionsNeeded = new ArrayList<>();\r\n if (storagePermission != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.READ_EXTERNAL_STORAGE);\r\n }\r\n if (permissionCAMERA != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.CAMERA);\r\n }\r\n if (accessCoarseLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_COARSE_LOCATION);\r\n }\r\n if (accessFineLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\r\n }\r\n if (!listPermissionsNeeded.isEmpty()) {\r\n ActivityCompat.requestPermissions(this,\r\n listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), MY_PERMISSIONS_REQUEST);\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public Collection<CameraInfo> getAvailableCameras()\n {\n return CameraManager.getAvailableCameras(getContext());\n }", "public int cameraCount() \n {\n int device_counts = 0; \n while (true) \n {\n if (capture.open(device_counts)) {\n device_counts++;\n } else {\n break;\n }\n }\n return device_counts;\n }", "public java.util.List<? extends org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraOrBuilder> \n getCameraOrBuilderList() {\n return camera_;\n }", "private static Camera getCameraInstance(int cameraId) {\n Camera c = null;\n try {\n c = Camera.open(cameraId);\n }\n catch (Exception e) {\n // Camera is not available (in use or does not exist)\n Log.w(LOG_TAG, \"Camera is not available: \" + e.getMessage());\n }\n return c;\n }", "public static Camera getCameraInstance() {\n Camera c = null;\n try {\n c = Camera.open();\n } catch (Exception e) {\n }\n return c;\n }", "private boolean isBackCamera() {\n closeMenu();\n\n if (mIsVersionJ || mIsVersionK) {\n return (mDevice.hasObject(By.desc(\"Switch to front camera\")));\n } else if (mIsVersionI) {\n return (mDevice.hasObject(By.desc(\"Back camera\")));\n } else {\n // Open mode options if not open\n UiObject2 modeoptions = getModeOptionsMenuButton();\n if (modeoptions != null) {\n modeoptions.click();\n }\n return (mDevice.hasObject(By.desc(\"Back camera\")));\n }\n }", "private void setCamera() {\n\t\tCamera.CameraInfo cameraInfo = new Camera.CameraInfo();\n\t\tint cameraCount = Camera.getNumberOfCameras();\n\t\tLog.i(TAG, \"count = \" + cameraCount);\n\t\tLog.i(TAG, \"isBack = \" + isBack);\n\t\tint id = 0;\n\n\t\tfor (int camIdx = 0; camIdx < cameraCount; camIdx++) {\n\t\t\tCamera.getCameraInfo(camIdx, cameraInfo);\n\t\t\tLog.i(TAG, \"cameraInfoFacing = \" + cameraInfo.facing);\n\t\t\tif (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK\n\t\t\t\t\t&& isBack) {\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT\n\t\t\t\t\t&& !isBack){\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (mCamera != null) {\n\t\t\tCamera.Parameters cameraParameters = mCamera.getParameters();\n\t\t\tDisplay display = getActivity().getWindowManager().getDefaultDisplay();\n\t\t\tPoint size = new Point();\n\t\t\tdisplay.getSize(size);\n\t\t\tint screenWidth = size.x;\n\t\t\tint width = Integer.MAX_VALUE;\n\t\t\tint height = 0;\n\t\t\tLog.i(TAG, \"SCREENWIDTH: \" + screenWidth);\n\t\t\tList<Camera.Size> sizes = cameraParameters.getSupportedPreviewSizes();\n\t\t\tfor (Camera.Size cSize : sizes) {\n\t\t\t\tif (cSize.width >= screenWidth && cSize.width <= width) {\n\t\t\t\t\twidth = cSize.width;\n\t\t\t\t\theight = cSize.height;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tLog.i(TAG, \"Width: \" + width + \" HEIGHT: \" + height);\n\n\t\t\tif (mPreview != null) {\n\t\t\t\tmPreview.switchCamera(mCamera, id, width, height);\n\t\t\t} else {\n\t\t\t\tmPreview = new CameraPreview(getActivity(), mCamera, id, width, height);\n\t\t\t\tFrameLayout preview = (FrameLayout) view\n\t\t\t\t\t\t.findViewById(R.id.camera_preview);\n\t\t\t\tpreview.addView(mPreview);\n\t\t\t}\n\t\t\tmCamera.startPreview();\n\t\t}\n\t}", "public boolean hideCameraForced() {\n return false;\n }" ]
[ "0.8600112", "0.8326611", "0.8325459", "0.8288591", "0.8220694", "0.81377023", "0.8099893", "0.80980945", "0.808999", "0.808999", "0.808999", "0.80879354", "0.80879354", "0.79174197", "0.7877548", "0.77367604", "0.7659969", "0.7573261", "0.7494029", "0.73202467", "0.73148435", "0.7221787", "0.7169797", "0.6878097", "0.68777364", "0.6762123", "0.66469723", "0.6638283", "0.6603262", "0.65863115", "0.65846574", "0.6516023", "0.64770406", "0.6471959", "0.6450665", "0.63778955", "0.636979", "0.6348977", "0.6287891", "0.6263829", "0.6171923", "0.61626315", "0.61367613", "0.61240965", "0.61240965", "0.6107481", "0.60677147", "0.6065244", "0.6062829", "0.6046068", "0.6045907", "0.6012538", "0.5994363", "0.59856695", "0.59856695", "0.5972498", "0.59634763", "0.59067285", "0.5862209", "0.5858957", "0.58416533", "0.5816613", "0.5810991", "0.58063394", "0.5804911", "0.58033687", "0.5777923", "0.5765175", "0.5750347", "0.57501984", "0.5745784", "0.57227045", "0.57218367", "0.571519", "0.571106", "0.5694829", "0.5690839", "0.56824493", "0.5670484", "0.5664205", "0.56610256", "0.56603366", "0.5650676", "0.563478", "0.5633492", "0.5630633", "0.5629992", "0.5628941", "0.56222934", "0.5620749", "0.56101084", "0.5596821", "0.5583002", "0.5582566", "0.55783373", "0.5577126", "0.55652225", "0.55602473", "0.5542636", "0.5526563" ]
0.7963538
13
A safe way to get an instance of the Camera object.
public static Camera getCameraInstance(){ Camera c = null; try { Log.d(TAG, "not null"); c = Camera.open(); // attempt to get a Camera instance } catch (Exception e){ // Camera is not available (in use or does not exist) } return c; // returns null if camera is unavailable }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Camera getCameraInstance() {\n Camera c = null;\n try {\n c = Camera.open();\n } catch (Exception e) {\n }\n return c;\n }", "public static Camera getCameraInstance(){\n Camera c = null;\n try {\n c = Camera.open(); // attempt to get a Camera instance\n }\n catch (Exception e){\n // Camera is not available (in use or does not exist)\n }\n return c; // returns null if camera is unavailable\n }", "public static Camera getCameraInstance(){\n Camera c = null;\n try {\n c = Camera.open(); // attempt to get a Camera instance\n }\n catch (Exception e){\n // Camera is not available (in use or does not exist)\n }\n return c; // returns null if camera is unavailable\n }", "public static Camera getCameraInstance() {\n Camera c = null;\n try {\n c = Camera.open(nextCam); // attempt to get a Camera instance\n } catch (Exception e) {\n // Camera is not available (in use or does not exist)\n }\n return c; // returns null if camera is unavailable\n }", "public static Camera getInstance() {\r\n return instance;\r\n }", "public static Camera getCameraInstance() {\n int backCameraId;\n Camera cam = null;\n try {\n backCameraId = findBackFacingCamera();// COMMENTED OUT FOR THE SAKE OF TESTING\n cam = Camera.open(backCameraId);\n }\n catch (Exception e) {\n Log.d(\"ERROR\", \"Failed to get camera: \"+ e.getMessage());\n }\n return cam;\n }", "private Camera getCameraInstance() {\n Camera c = null;\n try {\n c = Camera.open(); // attempt to get a Camera instance\n\n Camera.Parameters params = c.getParameters();\n List<Camera.Size> sizes = params.getSupportedPictureSizes();\n\n // set the second lowest resolution for taking snapshots\n params.setPictureSize(sizes.get(sizes.size() - 2).width, sizes.get(sizes.size() - 2).height);\n\n c.setParameters(params);\n } catch (Exception e) {\n // Camera is not available (in use or does not exist)\n }\n return c;\n }", "public static Camera getInstance() {\n return INSTANCE;\n }", "public static Camera getCameraInstance(){\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {\n return Camera.open(0); // This is the line the error occurs\n } else {\n return Camera.open();\n }\n }", "public void getCameraInstance() {\n newOpenCamera();\n }", "public static Camera open() { \n return new Camera(); \n }", "private static Camera getCameraInstance(int cameraId) {\n Camera c = null;\n try {\n c = Camera.open(cameraId);\n }\n catch (Exception e) {\n // Camera is not available (in use or does not exist)\n Log.w(LOG_TAG, \"Camera is not available: \" + e.getMessage());\n }\n return c;\n }", "Camera getCamera();", "private Camera getCameraInstance() {\r\n Camera camera = null;\r\n try {\r\n camera = Camera.open();\r\n } catch (Exception e) {\r\n // cannot get camera or does not exist\r\n }\r\n Camera.Parameters params = camera.getParameters();\r\n\r\n List<Size> sizes = params.getSupportedPictureSizes();\r\n int w = 0, h = 0;\r\n for (Size size : sizes) {\r\n if (size.width > w || size.height > h) {\r\n w = size.width;\r\n h = size.height;\r\n }\r\n\r\n }\r\n params.setPictureSize(w, h);\r\n\r\n\r\n if (params.getSupportedFocusModes().contains(\r\n Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO)) {\r\n params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\r\n }\r\n params.setPictureFormat(ImageFormat.JPEG);\r\n params.setJpegQuality(100);\r\n camera.setParameters(params);\r\n\r\n\r\n return camera;\r\n }", "public CameraInstance getCameraInstance() {\n return cameraInstance;\n }", "private void getCamera() {\n if (camera == null) {\n try {\n camera = Camera.open();\n params = camera.getParameters();\n } catch (RuntimeException e) {\n\n }\n }\n }", "public Camera getCamera() { return (Camera)CameraSet.elementAt(0); }", "public static CameraManager get() {\n\t\treturn cameraManager;\n\t}", "protected CameraInstance createCameraInstance() {\n CameraInstance cameraInstance = new CameraInstance(getContext());\n cameraInstance.setCameraSettings(cameraSettings);\n return cameraInstance;\n }", "@SuppressLint(\"NewApi\")\n\tpublic static Camera getCameraInstance(int cameraId)\n {\n Log.d(\"tag\", \"getCameraInstance\");\n Camera c = null;\n try\n {\n c = Camera.open(cameraId); // attempt to get a Camera instance\n }\n catch (Exception e)\n {\n // Camera is not available (in use or does not exist)\n e.printStackTrace();\n Log.e(\"tag\", \"Camera is not available\");\n }\n return c; // returns null if camera is unavailable\n }", "public static Camera getCameraInstance(int cameraId) {\n Camera c = null;\n try {\n c = Camera.open(cameraId); // attempt to get a Camera instance\n\n } catch (Exception e) {\n // Camera is not available (in use or does not exist)\n }\n return c; // returns null if camera is unavailable\n }", "@SuppressWarnings(\"unchecked\")\n @Nullable\n protected static <T extends OpenCvCamera> T getCamera(String cameraId) {\n if (internalCamera != null && cameraId.equals(internalCameraId)) return (T) internalCamera;\n else if (externalCameras.containsKey(cameraId)) return (T) externalCameras.get(cameraId);\n else {\n Log.e(LOGGING_TAG, \"Tried to find camera with id \" + cameraId + \" but no camera with that id was registered.\");\n return null;\n }\n }", "public Camera getCamera() {\n return getValue(PROP_CAMERA);\n }", "public Camera2D getCamera()\r\n\t{\r\n\t\treturn _Camera;\r\n\t}", "private void oldOpenCamera() {\n try {\n mCamera = Camera.open(); // attempt to get a Camera instance\n mCamera.setPreviewCallbackWithBuffer(this);\n Log.i(TAG, \"Instance created\");\n } catch (Exception e) {\n Log.e(TAG, \"Error getting Camera instance: \" + e.getMessage());\n }\n }", "@Override\n protected Camera getCamera() {\n return Camera.createForPositionAndAngles(new ThreeDoubleVector(31.0, 7.0, 5.5), 0.0, 0.7);\n\n // Camera for orientation curve interpolation presentation\n// return Camera.createForPositionAndAngles(new ThreeDoubleVector(54.5, 10.0, 2.5), -0.5, 0.3);\n }", "public Pj3dCamera Camera()\r\n\t{\r\n\t\tPj3dCamera cam = new Pj3dCamera(this);\r\n\t\treturn cam;\r\n\t}", "public Camera getCam() {\n return this.cam;\n }", "public void obtainCameraOrFinish() {\n mCamera = getCameraInstance();\n if (mCamera == null) {\n Toast.makeText(VideoCapture.getSelf(), \"Fail to get Camera\", Toast.LENGTH_LONG).show();\n VideoCapture.getSelf().finish();\n }\n }", "private CameraManager() {\n }", "public OrthographicCamera getCamera() {\n\t\treturn this.camera;\n\t}", "void initCameraManager(){\n\t\tcameraManager = new CameraManager(getApplication());\n\t}", "private boolean _getCamera(){\n\n\t\ttry {\n\n\t\t\t// instantiate flash light object depending on SDK version\n\t\t\tif (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n\t\t\t\t_flash = new FlashLight_Pre_Marshmallow();\n\t\t\t}else{\n\t\t\t\t_flash = new FlashLight_Post_Marshmallow(_main);\n\t\t\t}\n\n\t\t\t// open the flash\n\t\t\t_flash.open();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tL.e(TAG, \"Camera Error : Couldn't get the camera, it may be used by another app !\");\n\t\t\tL.e(TAG, \"Camera Error : \" + e.getMessage());\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public OrthographicCamera getCamera() {\n\t\treturn cam;\n\t}", "public Camera() {\r\n this(1, 1);\r\n }", "public static CameraFragment newInstance() {\n CameraFragment fragment = new CameraFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public interface Camera {\n Vector3f getPosition();\n\n float getYaw();\n\n float getPitch();\n\n float getRoll();\n}", "private Camera selectAndOpenCamera() {\n\t\tCamera.CameraInfo info = new Camera.CameraInfo();\n\t\tint numberOfCameras = Camera.getNumberOfCameras();\n\n\t\tint selected = -1;\n\n\t\tfor (int i = 0; i < numberOfCameras; i++) {\n\t\t\tCamera.getCameraInfo(i, info);\n\n\t\t\tif( info.facing == Camera.CameraInfo.CAMERA_FACING_BACK ) {\n\t\t\t\tselected = i;\n\t\t\t\tflipHorizontal = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// default to a front facing camera if a back facing one can't be found\n\t\t\t\tselected = i;\n\t\t\t\tflipHorizontal = true;\n\t\t\t}\n\t\t}\n\n\t\tif( selected == -1 ) {\n\t\t\tdialogNoCamera();\n\t\t\treturn null; // won't ever be called\n\t\t} else {\n\t\t\treturn Camera.open(selected);\n\t\t}\n\t}", "public Camera() {\n\t\treset();\n\t}", "private void newOpenCamera() {\n if (mThread == null) {\n mThread = new CameraHandlerThread();\n }\n\n synchronized (mThread) {\n mThread.openCamera();\n }\n }", "public Camera() {\n\t\tMatrix.setIdentityM(viewMatrix, 0);\n\t\tMatrix.setIdentityM(projectionMatrix, 0);\n\t\tcomputeReverseMatrix();\n\t}", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera getCamera(int index) {\n return camera_.get(index);\n }", "@Override\n public CameraControlInternal getCameraControlInternal() {\n return mCameraControlInternal;\n }", "public ReflectedCamera(Camera camera) {\n this(camera, true);\n }", "@Override\n public Camera setupCamera() {\n mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);\n try {\n Camera.Parameters parameters = mCamera.getParameters();\n parameters.setPreviewSize(mWidth, mHeight);\n parameters.setPreviewFormat(mFormat);\n mCamera.setDisplayOrientation(90);\n for (Camera.Size size : parameters.getSupportedPreviewSizes()) {\n Log.d(TAG, \"SIZE:\" + size.width + \"x\" + size.height);\n }\n for (Integer format : parameters.getSupportedPreviewFormats()) {\n Log.d(TAG, \"FORMAT:\" + format);\n }\n\n List<int[]> fps = parameters.getSupportedPreviewFpsRange();\n for (int[] count : fps) {\n Log.d(TAG, \"T:\");\n for (int data : count) {\n Log.d(TAG, \"V=\" + data);\n }\n }\n mCamera.setParameters(parameters);\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (mCamera != null) {\n mWidth = mCamera.getParameters().getPreviewSize().width;\n mHeight = mCamera.getParameters().getPreviewSize().height;\n }\n return mCamera;\n }", "void initializeCamera() {\n camera_linear = (LinearLayout) findViewById(R.id.camera_linear);\n //The preview frame is overlayed on the layout which shows the camera view.\n preview = (FrameLayout) findViewById(R.id.camera_preview);\n //Get an instance of the phone's camera.\n mCamera = cameraRecorder.getCameraInstance();\n //Find content fort the camera preview frame using the instance of the camera initialized.\n mPreview = new CameraPreview(getApplicationContext(), mCamera);\n //Apply the camera previes content from the camera to the preview frame itself.\n preview.addView(mPreview);\n }", "public abstract Matrix4f getCameraMatrix();", "public Matrix4f getCameraMatrix() {\n\t\treturn mCameraMatrix;\n\t}", "public Camera open(int cameraId) {\r\n Camera camera = null;\r\n try {\r\n if (mMethodOpenLevel9 != null) {\r\n Object[] argList = new Object[1];\r\n argList[0] = cameraId;\r\n camera = (Camera) mMethodOpenLevel9.invoke(null, argList);\r\n }\r\n } catch (Exception e) {\r\n Log.w(LOG_TAG, \"CameraHideMethods:mMethodOpenLevel9()\", e);\r\n }\r\n\r\n return camera;\r\n }", "public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }", "public void setCamera(Camera c) {\n\t\tmCamera = c;\n\t}", "public static Camera openCamera(Activity activity, int cameraId)\n throws Exception {\n if (!activity.isFinishing()) {\n DevicePolicyManager dpm = (DevicePolicyManager) activity.getSystemService(\n Context.DEVICE_POLICY_SERVICE);\n if (dpm.getCameraDisabled(null) == true) {\n throw new Exception();\n }\n for (int i = 0; i < OPEN_RETRY_COUNT; i++) {\n try {\n return CameraHolder.instance().open(cameraId);\n } catch (Exception e) {\n if (i == 0) {\n try {\n //wait some time, and try another time\n //Camera device may be using by VT or atv.\n Thread.sleep(1000);\n } catch (InterruptedException ie) {\n }\n continue;\n } else {\n // In eng build, we throw the exception so that test tool\n // can detect it and report it\n if (\"eng\".equals(Build.TYPE)) {\n if (BuildConfig.DEBUG) Log.i(TAG, \"Open Camera fail\", e);\n throw e;\n //QA will always consider JE as bug, so..\n //throw new RuntimeException(\"openCamera failed\", e);\n } else {\n throw e;\n }\n }\n }\n }\n //just for build pass\n }\n throw new Exception(new RuntimeException(\"Should never get here\"));\n\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera getCamera(int index);", "public void setCamera(Camera camera) {\n mCamera = camera;\n }", "private void setCamera() {\n\t\tCamera.CameraInfo cameraInfo = new Camera.CameraInfo();\n\t\tint cameraCount = Camera.getNumberOfCameras();\n\t\tLog.i(TAG, \"count = \" + cameraCount);\n\t\tLog.i(TAG, \"isBack = \" + isBack);\n\t\tint id = 0;\n\n\t\tfor (int camIdx = 0; camIdx < cameraCount; camIdx++) {\n\t\t\tCamera.getCameraInfo(camIdx, cameraInfo);\n\t\t\tLog.i(TAG, \"cameraInfoFacing = \" + cameraInfo.facing);\n\t\t\tif (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK\n\t\t\t\t\t&& isBack) {\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT\n\t\t\t\t\t&& !isBack){\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (mCamera != null) {\n\t\t\tCamera.Parameters cameraParameters = mCamera.getParameters();\n\t\t\tDisplay display = getActivity().getWindowManager().getDefaultDisplay();\n\t\t\tPoint size = new Point();\n\t\t\tdisplay.getSize(size);\n\t\t\tint screenWidth = size.x;\n\t\t\tint width = Integer.MAX_VALUE;\n\t\t\tint height = 0;\n\t\t\tLog.i(TAG, \"SCREENWIDTH: \" + screenWidth);\n\t\t\tList<Camera.Size> sizes = cameraParameters.getSupportedPreviewSizes();\n\t\t\tfor (Camera.Size cSize : sizes) {\n\t\t\t\tif (cSize.width >= screenWidth && cSize.width <= width) {\n\t\t\t\t\twidth = cSize.width;\n\t\t\t\t\theight = cSize.height;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tLog.i(TAG, \"Width: \" + width + \" HEIGHT: \" + height);\n\n\t\t\tif (mPreview != null) {\n\t\t\t\tmPreview.switchCamera(mCamera, id, width, height);\n\t\t\t} else {\n\t\t\t\tmPreview = new CameraPreview(getActivity(), mCamera, id, width, height);\n\t\t\t\tFrameLayout preview = (FrameLayout) view\n\t\t\t\t\t\t.findViewById(R.id.camera_preview);\n\t\t\t\tpreview.addView(mPreview);\n\t\t\t}\n\t\t\tmCamera.startPreview();\n\t\t}\n\t}", "public boolean hasCamera() {\n return mCamera != null;\n }", "protected Camera interceptCamera (LightProperties lp) {\n\t\treturn lp.camera;\n\t}", "public CameraInfo getCameraInfo(int cameraId) {\r\n CameraInfo wrapperCameraInfo = null;\r\n\r\n try {\r\n if (mMethodGetCameraInfoLevel9 != null) {\r\n Object[] argList = new Object[2];\r\n argList[0] = cameraId;\r\n Class<?> cls = Class.forName(\"android.hardware.Camera$CameraInfo\");\r\n Constructor<?> con = cls.getConstructor();\r\n Object cameraInfo = con.newInstance();\r\n argList[1] = cameraInfo;\r\n mMethodGetCameraInfoLevel9.invoke(null, argList);\r\n\r\n Field facingField = cls.getDeclaredField(\"facing\");\r\n Field orientationField = cls.getDeclaredField(\"orientation\");\r\n int facing = facingField.getInt(cameraInfo);\r\n int orientation = orientationField.getInt(cameraInfo);\r\n wrapperCameraInfo = new CameraInfo();\r\n wrapperCameraInfo.facing = facing;\r\n wrapperCameraInfo.orientation = orientation;\r\n }\r\n } catch (Exception e) {\r\n Log.w(LOG_TAG, \"CameraHideMethods:mMethodGetCameraInfoLevel9()\", e);\r\n }\r\n\r\n return wrapperCameraInfo;\r\n }", "public interface ICamera {\n}", "private void initCamera(SurfaceHolder surfaceHolder) {\n\t\tif (surfaceHolder == null) {\n\t\t throw new IllegalStateException(\"No SurfaceHolder provided\");\n\t\t }\n\t\tif (cameraManager.isOpen()) {\n\t\t Log.w(TAG, \"initCamera() while already open -- late SurfaceView callback?\");\n\t\t return;\n\t\t }\n\t\ttry {\n\t\t\tcameraManager.openDriver(surfaceHolder);\n\t\t\t// Creating the handler starts the preview, which can also throw a\n\t\t\t// RuntimeException.\n\t\t\t if (handler == null) {\n\t\t\t handler = new CaptureActivityHandler(this, null, null, \"UTF-8\", cameraManager);\n\t\t\t }\n\t\t\t decodeOrStoreSavedBitmap(null, null);\n\t\t} catch (IOException ioe) {\n\t\t\tLog.w(TAG, ioe);\n\t\t\t// displayFrameworkBugMessageAndExit();\n\t\t\tCommonTask.ShowMessage(this, \"IOException\\n\" + ioe.getMessage());\n\t\t} catch (RuntimeException e) {\n\t\t\t// Barcode Scanner has seen crashes in the wild of this variety:\n\t\t\t// java.?lang.?RuntimeException: Fail to connect to camera service\n\t\t\tLog.w(TAG, \"Unexpected error initializating camera\", e);\n\t\t\tCommonTask.ShowMessage(this, \"RuntimeException\\n\" + e.getMessage());\n\t\t\t// displayFrameworkBugMessageAndExit();\n\t\t}\n\t}", "private void createCameraSource() {\n\n int facing = CameraSource.CAMERA_FACING_FRONT;\n\n // If there's no existing cameraSource, create one.\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, graphicOverlay);\n }\n\n CameraSource.setFacing(facing);\n cameraSource.setMachineLearningFrameProcessor(\n new FaceDetectorProcessor(this, defaultOptions));\n }", "public Coord getCameraPosition() {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getCenter();\n } \n // TODO: Browser component\n return new Coord(0, 0);\n }\n return new Coord(internalNative.getLatitude(), internalNative.getLongitude());\n }", "public Vector2 getCameraPosition()\n {\n\n Vector2 tmpVector = new Vector2(camera.position.x/camera.zoom - Gdx.graphics.getWidth()/2, camera.position.y/camera.zoom - Gdx.graphics.getHeight()/2);\n return tmpVector;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera getCamera(int index) {\n if (cameraBuilder_ == null) {\n return camera_.get(index);\n } else {\n return cameraBuilder_.getMessage(index);\n }\n }", "public Point getCameraPosition() {\n\t\treturn new Point(cameraPosition.x, cameraPosition.y, cameraPosition.z);\n\t}", "private void createCameraSource() {\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, fireFaceOverlay);\n cameraSource.setFacing(CameraSource.CAMERA_FACING_FRONT);\n }\n\n try {\n processor = new FaceDetectionProcessor();\n processor.setFaceDetectionResultListener(getFaceDetectionListener());\n processor.setCustomization(cameraScreenCustomization);\n cameraSource.setMachineLearningFrameProcessor(processor);\n } catch (Exception e) {\n Logger.e(TAG, \"Can not create image processor: \" + Log.getStackTraceString(e));\n }\n\n }", "public void setCamera(Camera camera) {\r\n\t\tthis.camera = camera;\r\n\t}", "private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String mCameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(mCameraId);\n StreamConfigurationMap map = characteristics.\n get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n mImageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) !=\n PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE) !=\n PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(CameraActivity.this, new\n String[]{Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CAMERA_PERMISSION);\n }\n manager.openCamera(mCameraId, mStateCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public interface Camera extends GameObject {\n\n public static final byte FORWARDS = 0x0;\n public static final byte LEFT = 0x1;\n public static final byte BACKWARDS = 0x2;\n public static final byte RIGHT = 0x3;\n\n /**\n * The default camera controls.\n */\n public static final byte[] DEFAULT_CAMERA_CONTROLLER = {\n Keys.KEY_W, Keys.KEY_A, Keys.KEY_S, Keys.KEY_D\n };\n\n /**\n * @return the position of the <code>Camera</code> in the world\n */\n public abstract ReadableVector3f getPosition();\n\n /**\n * @param deltaX the change along the X axis\n * @param deltaY the change along the Y axis\n * @param deltaZ the change along the Z axis\n */\n public abstract void translate(float deltaX, float deltaY, float deltaZ);\n\n public abstract void translate(ReadableVector3f delta);\n\n /**\n * @param position the new position of the <code>Camera</code>\n */\n public abstract void setPosition(ReadableVector3f position);\n}", "public void onCamera();", "@TargetApi(9)\n\t@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {\n\t\t\tmCamera = Camera.open(0);\t\t\t\t\t\t\t\t\t//For API 9 and above. Open first camera available on device\n\t\t} else {\n\t\t\tmCamera = Camera.open();\t\t\t\t\t\t\t\t\t//For API 8\n\t\t}\n\t}", "public interface CameraPreview {\n\n /**\n * Set the camera system this will act as the preview for.\n * <p/>\n * The preview will update the camera system as necessary for certain events, such as\n * setting the surface holder, or pausing/restarting the preview when reconfiguring the surface.\n *\n * @param cameraSystem the camera system to connect to\n */\n void connectToCameraSystem(@NonNull CameraSystem cameraSystem);\n\n}", "public void startCamera()\n {\n startCamera(null);\n }", "@Override\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\tLog.e(TAG,\"Surface Created\");\n\t\tcamera = Camera.open();\n\t}", "boolean useCamera2();", "public void init(Camera cam);", "private Camera() {\n viewport = new Rectangle();\n dirtyAreas = new ArrayList<Rectangle>();\n renderedAreas = new ArrayList<Rectangle>();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraOrBuilder getCameraOrBuilder(\n int index) {\n return camera_.get(index);\n }", "public SVector3d getPositionCam() {\n\t\treturn transCamera;\n\t}", "public Camera(){\n // servoPan = new Servo(PAN);\n servoTilt = new Servo(TILT);\n }", "public static void init(Context context) {\n\t\tif (cameraManager == null) {\n\t\t\tcameraManager = new CameraManager(context);\n\t\t}\n\t}", "public CameraManager(HardwareMap hardwareMap) {\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n phoneCam = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId);\n pipeline = new CvPipeline();\n phoneCam.setPipeline(pipeline);\n }", "public void openCamera() {\n \n\n }", "public java.util.List<org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera> getCameraList() {\n return camera_;\n }", "public Mat4x4 getMatView() {\n Mat4x4 matCameraRotX = MatrixMath.matrixMakeRotationX(cameraRot.getX());\n Mat4x4 matCameraRotY = MatrixMath.matrixMakeRotationY(cameraRot.getY());\n Mat4x4 matCameraRotZ = MatrixMath.matrixMakeRotationZ(cameraRot.getZ());\n Mat4x4 matCameraRotXY = MatrixMath.matrixMultiplyMatrix(matCameraRotX, matCameraRotY);\n Mat4x4 matCameraRot = MatrixMath.matrixMultiplyMatrix(matCameraRotXY, matCameraRotZ);\n matCamera = calculateMatCamera(up, target, matCameraRot);\n matView = MatrixMath.matrixQuickInverse(matCamera);\n return matView;\n }", "private boolean isDeviceSupportCamera() {\n // this device has a camera\n// no camera on this device\n return getActivity().getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA);\n }", "private void initCameraPreview() {\n\t\tcameraPreview = (CameraPreview) findViewById(R.id.camera_preview);\n\t\tcameraPreview.init(camera);\n\t}", "public int[] getCamera() {\n\t\treturn camera;\n\t}", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.release(); // release the camera for other applications\n mCamera = null;\n }\n }", "private void createCamera() {\n camera = getCameraInstance();\n // Setting the right parameters in the camera\n SetCameraParameters();\n // Create our Preview view and set it as the content of our activity.\n camera_preview = new CameraPreview(this, camera);\n // Adding the camera preview after the FrameLayout and before the mainact_btn_InOutAct\n // as a separated element.\n InOut_cameraLayout.addView(camera_preview, 0);\n }", "public SmartCamera( String cameraName ) {\r\n\t\t\r\n\t\tCameraServer.getInstance().setQuality(50);\r\n\t\t\r\n\t\ttry{\r\n\t\t\tframe = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);\r\n\t\r\n\t // the camera name (ex \"cam0\") can be found through the roborio web interface\r\n\t cameraSession = NIVision.IMAQdxOpenCamera( cameraName,\r\n\t NIVision.IMAQdxCameraControlMode.CameraControlModeController);\r\n\t NIVision.IMAQdxConfigureGrab(cameraSession);\r\n\t NIVision.IMAQdxStartAcquisition(cameraSession);\r\n\t\t}catch (VisionException vx){\r\n\t\t\tvisionBroken=true;\r\n\t\t}\r\n\t}", "private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String cameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId);\n StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n imageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CAMERA_PERMISSION);\n return;\n }\n manager.openCamera(cameraId, stateCallback, null);\n } catch (CameraAccessException e) {\n Toast.makeText(this, \"Camera failed to open.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }", "private boolean isDeviceSupportCamera() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private VideoCapturer getVideoCapturer(String cameraFacing) {\n int[] cameraIndex = { 0, 1 };\n int[] cameraOrientation = { 0, 90, 180, 270 };\n for (int index : cameraIndex) {\n for (int orientation : cameraOrientation) {\n String name = \"Camera \" + index + \", Facing \" + cameraFacing +\n \", Orientation \" + orientation;\n VideoCapturer capturer = VideoCapturer.create(name);\n if (capturer != null) {\n return capturer;\n }\n }\n }\n throw new RuntimeException(\"Failed to open capturer\");\n }", "private void openCamera(int desiredWidth, int desiredHeight) {\n if (mCamera != null) {\n throw new RuntimeException(\"camera already initialized\");\n }\n\n android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo();\n\n // Try to find a front-facing camera (e.g. for videoconferencing).\n int numCameras = android.hardware.Camera.getNumberOfCameras();\n for (int i = 0; i < numCameras; i++) {\n android.hardware.Camera.getCameraInfo(i, info);\n if (info.facing == android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK) {\n mCamera = android.hardware.Camera.open(i);\n break;\n }\n }\n if (mCamera == null) {\n// Log.d(TAG, \"No front-facing camera found; opening default\");\n mCamera = android.hardware.Camera.open(); // opens first back-facing camera\n }\n if (mCamera == null) {\n throw new RuntimeException(\"Unable to open camera\");\n }\n\n android.hardware.Camera.Parameters parms = mCamera.getParameters();\n\n CameraUtils.choosePreviewSize(parms, desiredWidth, desiredHeight);\n\n // Give the camera a hint that we're recording video. This can have a big\n // impact on frame rate.\n parms.setRecordingHint(true);\n\n // leave the frame rate set to default\n mCamera.setParameters(parms);\n\n int[] fpsRange = new int[2];\n android.hardware.Camera.Size mCameraPreviewSize = parms.getPreviewSize();\n parms.getPreviewFpsRange(fpsRange);\n String previewFacts = mCameraPreviewSize.width + \"x\" + mCameraPreviewSize.height;\n if (fpsRange[0] == fpsRange[1]) {\n previewFacts += \" @\" + (fpsRange[0] / 1000.0) + \"fps\";\n } else {\n previewFacts += \" @[\" + (fpsRange[0] / 1000.0) +\n \" - \" + (fpsRange[1] / 1000.0) + \"] fps\";\n }\n// TextView text = (TextView) findViewById(R.id.cameraParams_text);\n// text.setText(previewFacts);\n\n mCameraPreviewWidth = mCameraPreviewSize.width;\n mCameraPreviewHeight = mCameraPreviewSize.height;\n\n\n// AspectFrameLayout layout = (AspectFrameLayout) findViewById(R.id.cameraPreview_afl);\n\n Display display = ((WindowManager)getSystemService(WINDOW_SERVICE)).getDefaultDisplay();\n\n if(display.getRotation() == Surface.ROTATION_0) {\n mCamera.setDisplayOrientation(90);\n// layout.setAspectRatio((double) mCameraPreviewHeight / mCameraPreviewWidth);\n } else if(display.getRotation() == Surface.ROTATION_270) {\n// layout.setAspectRatio((double) mCameraPreviewHeight/ mCameraPreviewWidth);\n mCamera.setDisplayOrientation(180);\n } else {\n // Set the preview aspect ratio.\n// layout.setAspectRatio((double) mCameraPreviewWidth / mCameraPreviewHeight);\n }\n }", "private RokidCamera(Activity activity, TextureView textureView) {\n this.mActivity = activity;\n this.mTextureView = textureView;\n }", "public java.util.List<? extends org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraOrBuilder> \n getCameraOrBuilderList() {\n return camera_;\n }", "public interface ICapture {\n public Handler getHandler();\n\n Rect getCropRect();\n\n void handleDecode(Result rawResult, Bundle bundle);\n\n CameraManager getCameraManager();\n}", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.CameraOrBuilder getCameraOrBuilder(\n int index) {\n if (cameraBuilder_ == null) {\n return camera_.get(index); } else {\n return cameraBuilder_.getMessageOrBuilder(index);\n }\n }", "public void chooseCamera() {\n if (cameraFront) {\n int cameraId = findBackFacingCamera();\n if (cameraId >= 0) {\n //open the backFacingCamera\n //set a picture callback\n //refresh the preview\n\n mCamera = Camera.open(cameraId);\n setRotation(mCamera, mCamera.getParameters(), cameraId);\n // mCamera.setDisplayOrientation(90);\n mPicture = getPictureCallback();\n mPreview.refreshCamera(mCamera);\n }\n } else {\n int cameraId = findFrontFacingCamera();\n if (cameraId >= 0) {\n //open the backFacingCamera\n //set a picture callback\n //refresh the preview\n mCamera = Camera.open(cameraId);\n setRotation(mCamera, mCamera.getParameters(), cameraId);\n // mCamera.setDisplayOrientation(90);\n mPicture = getPictureCallback();\n mPreview.refreshCamera(mCamera);\n }\n }\n }" ]
[ "0.85450673", "0.8514192", "0.8514192", "0.83277494", "0.8294624", "0.81536394", "0.8127338", "0.8080977", "0.79592746", "0.7865764", "0.7843701", "0.77520376", "0.7748867", "0.7747095", "0.76896906", "0.7609955", "0.75838536", "0.74856555", "0.7423294", "0.7361571", "0.73578745", "0.7263375", "0.7151264", "0.71311206", "0.7035418", "0.6960521", "0.6846001", "0.6787135", "0.6695443", "0.6644384", "0.6580998", "0.65454304", "0.65326285", "0.64752877", "0.64484185", "0.6344757", "0.6272033", "0.62589586", "0.6211967", "0.6159285", "0.61532044", "0.6132764", "0.61108226", "0.6087052", "0.60164773", "0.5962314", "0.5961916", "0.5919757", "0.5896715", "0.5862441", "0.5860881", "0.58489674", "0.584123", "0.5832713", "0.5805877", "0.5801998", "0.5799937", "0.5780018", "0.5762334", "0.57608706", "0.57293713", "0.57240283", "0.5692189", "0.56774163", "0.567358", "0.5660426", "0.56599945", "0.56217355", "0.5604276", "0.5596013", "0.5594479", "0.55944645", "0.5581094", "0.5580243", "0.5572249", "0.5568953", "0.55601925", "0.553842", "0.5525024", "0.5519947", "0.55155003", "0.55102104", "0.5500785", "0.5485507", "0.54850733", "0.5474651", "0.5464314", "0.5462147", "0.5458346", "0.5434892", "0.54316026", "0.54227316", "0.53747433", "0.5362681", "0.53582937", "0.5355288", "0.53526455", "0.5334368", "0.5332759", "0.53319013" ]
0.8601536
0
Create a file Uri for saving an image or video
private static Uri getOutputMediaFileUri(int type){ return Uri.fromFile(getOutputMediaFile(type)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Uri createImageUri() {\n \t\tUri imageFileUri;\n \t\tString folder = Environment.getExternalStorageDirectory()\n \t\t\t\t.getAbsolutePath() + \"/tmp\";\n \t\tFile folderF = new File(folder);\n \t\tif (!folderF.exists()) {\n \t\t\tfolderF.mkdir();\n \t\t}\n \n \t\tString imageFilePath = folder + \"/\"\n \t\t\t\t+ String.valueOf(System.currentTimeMillis()) + \"jpg\";\n \t\tFile imageFile = new File(imageFilePath);\n \t\timageFileUri = Uri.fromFile(imageFile);\n \n \t\treturn imageFileUri;\n \t}", "public Uri getImageFileUri()\n {\n imagePath = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"Tuxuri\");\n Log.d(tag, \"Find \" + imagePath.getAbsolutePath());\n\n\n if (! imagePath.exists())\n {\n if (! imagePath.mkdirs())\n {\n Log.d(\"CameraTestIntent\", \"failed to create directory\");\n return null;\n }else{\n Log.d(tag,\"create new Tux folder\");\n }\n }\n\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File image = new File(imagePath,\"TUX_\"+ timeStamp + \".jpg\");\n file = image;\n name = file.getName();\n path = imagePath;\n\n\n if(!image.exists())\n {\n try {\n image.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return Uri.fromFile(image);\n }", "private Uri getOutputMediaFileUri(int mediaType) {\n\t\t\tFile mediaStorageDir = null;\n\t\t\tif(isExternalStorageAvailable()) {\n\t\t\t\tmediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t\t\t Environment.DIRECTORY_PICTURES), \"SChat\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmediaStorageDir = new File(Environment.DIRECTORY_DCIM);\n\t\t\t\t//Toast.makeText(MainActivity.this, mediaStorageDir.getParent()+\"\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\t if (! mediaStorageDir.exists()){\n\t\t\t if (! mediaStorageDir.mkdirs()){\n\t\t\t Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t return null;\n\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t\t\t File mediaFile;\n\t\t\t if (mediaType == MEDIA_TYPE_IMAGE){\n\t\t\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t\t\t \"IMG_\"+ timeStamp + \".jpg\");\n\t\t\t Log.d(\"MyCameraApp\", mediaFile.toString());\n\t\t\t } else if(mediaType == MEDIA_TYPE_VIDEO) {\n\t\t\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t\t\t \"VID_\"+ timeStamp + \".mp4\");\n\t\t\t } else {\n\t\t\t return null;\n\t\t\t }\n\t\t\t return Uri.fromFile(mediaFile);\n\t\t}", "@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }", "private Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }", "private static Uri getOutputMediaFileUri(){\n return Uri.fromFile(getOutputMediaFile());\n }", "private Uri getOutputMediaFileUri(int mediaType) {\n //parvo triabva da se proveri dali ima external storage\n\n if (isExternalStorageAvailable()) {\n\n //sled tova vrashtame directoriata za pictures ili ia sazdavame\n //1.Get external storage directory\n String appName = SendMessage.this.getString(R.string.app_name);\n String environmentDirectory; //\n //ako snimame picture zapismave v papkata za kartiniki, ako ne v papkata za Movies\n\n if(mediaType == MEDIA_TYPE_IMAGE) {\n environmentDirectory = Environment.DIRECTORY_PICTURES;\n } else {\n environmentDirectory = Environment.DIRECTORY_MOVIES;\n }\n File mediaStorageDirectory = new File(\n Environment.getExternalStoragePublicDirectory(environmentDirectory),\n appName);\n\n //2.Create subdirectory if it does not exist\n if (! mediaStorageDirectory.exists()) {\n if (!mediaStorageDirectory.mkdirs()) {\n Log.e(TAG, \"failed to create directory\");\n return null;\n }\n }\n\n //3.Create file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (mediaType == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (mediaType == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"MOV_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n //4.Return the file's URI\n Log.d(TAG, \"File path: \" + Uri.fromFile(mediaFile));\n return Uri.fromFile(mediaFile);\n\n } else //ako niama external storage\n Log.d(\"Vic\",\"no external strogage, mediaUri si null\");\n return null;\n\n }", "public static Uri getOutputMediaFileUri(Point point){\r\n return Uri.fromFile(getOutputMediaFile(point));\r\n }", "public Uri getOutputMediaFileUri(int type) {\n\t\treturn Uri.fromFile(getOutputMediaFile(type));\n\t}", "public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }", "public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }", "private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }", "private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }", "private Uri getOutputMediaFileUri(){\n\t\treturn Uri.fromFile( getOutputMediaFile() );\n\t}", "private static Uri getOutputMediaFileUri(int type){\r\n\t return Uri.fromFile(getOutputMediaFile(type));\r\n\t}", "private static Uri saveFileAndAddToMediaStore(SquareImageButton button, Context context, File file, Uri uri, ContentResolver resolver) {\n // This will hold the uri of the newly saved file\n Uri newUri;\n // A file descriptor of an entry in the AssetManager\n AssetFileDescriptor assetFileDescriptor;\n\n try {\n // obtain read access to the file descriptor in the Asset manager\n assetFileDescriptor = resolver.openAssetFileDescriptor(uri, \"r\");\n }\n catch (FileNotFoundException e) {\n // The sound file could not be found and needs to be saved.\n assetFileDescriptor = null;\n }\n\n saveFileToDevice(context, file, assetFileDescriptor);\n\n newUri = insertSoundFileToMediaStore(button, file, resolver);\n return newUri;\n }", "public static Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }", "public static Uri getOutputMediaFileUri(int timelapse_id, int type, int image_count){\n\t return Uri.fromFile(getOutputMediaFile(timelapse_id, type, image_count));\n\t}", "private Uri getPicOutputUri(){\n String filePath = getExternalFilesDir(Environment.DIRECTORY_PICTURES) + File.separator + String.valueOf(System.currentTimeMillis())+\".jpg\";\n return Uri.fromFile(new File(filePath));\n }", "public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(CommonUtils.getOutputMediaFile(this, type == CommonUtils.MEDIA_TYPE_IMAGE));\n }", "public static Uri getOutputMediaFileUri(Context context, int type) {\n Uri uri = null;\n //适配Android N\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n return FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + \".provider\", getOutputMediaFile(type));\n } else {\n return Uri.fromFile(getOutputMediaFile(type));\n }\n }", "private Uri getFileUriAndSetType(Intent intent, String str, String str2, String str3, int i) throws IOException {\n String str4;\n String str5;\n String str6;\n if (str2.endsWith(\"mp4\") || str2.endsWith(\"mov\") || str2.endsWith(\"3gp\")) {\n intent.setType(\"video/*\");\n } else if (str2.endsWith(\"mp3\")) {\n intent.setType(\"audio/x-mpeg\");\n } else {\n intent.setType(\"image/*\");\n }\n if (str2.startsWith(\"http\") || str2.startsWith(\"www/\")) {\n String fileName = getFileName(str2);\n String str7 = \"file://\" + str + \"/\" + fileName.replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (str2.startsWith(\"http\")) {\n URLConnection openConnection = new URL(str2).openConnection();\n String headerField = openConnection.getHeaderField(\"Content-Disposition\");\n if (headerField != null) {\n Matcher matcher = Pattern.compile(\"filename=([^;]+)\").matcher(headerField);\n if (matcher.find()) {\n fileName = matcher.group(1).replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (fileName.length() == 0) {\n fileName = \"file\";\n }\n str7 = \"file://\" + str + \"/\" + fileName;\n }\n }\n saveFile(getBytes(openConnection.getInputStream()), str, fileName);\n str2 = str7;\n } else {\n saveFile(getBytes(this.webView.getContext().getAssets().open(str2)), str, fileName);\n str2 = str7;\n }\n } else if (str2.startsWith(\"data:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring = str2.substring(str2.indexOf(\";base64,\") + 8);\n if (!str2.contains(\"data:image/\")) {\n intent.setType(str2.substring(str2.indexOf(\"data:\") + 5, str2.indexOf(\";base64\")));\n }\n String substring2 = str2.substring(str2.indexOf(\"/\") + 1, str2.indexOf(\";base64\"));\n if (notEmpty(str3)) {\n StringBuilder sb = new StringBuilder();\n sb.append(sanitizeFilename(str3));\n if (i == 0) {\n str6 = \"\";\n } else {\n str6 = \"_\" + i;\n }\n sb.append(str6);\n sb.append(\".\");\n sb.append(substring2);\n str4 = sb.toString();\n } else {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"file\");\n if (i == 0) {\n str5 = \"\";\n } else {\n str5 = \"_\" + i;\n }\n sb2.append(str5);\n sb2.append(\".\");\n sb2.append(substring2);\n str4 = sb2.toString();\n }\n saveFile(Base64.decode(substring, 0), str, str4);\n str2 = \"file://\" + str + \"/\" + str4;\n } else if (str2.startsWith(\"df:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring3 = str2.substring(str2.indexOf(\"df:\") + 3, str2.indexOf(\";data:\"));\n String substring4 = str2.substring(str2.indexOf(\";data:\") + 6, str2.indexOf(\";base64,\"));\n String substring5 = str2.substring(str2.indexOf(\";base64,\") + 8);\n intent.setType(substring4);\n saveFile(Base64.decode(substring5, 0), str, sanitizeFilename(substring3));\n str2 = \"file://\" + str + \"/\" + sanitizeFilename(substring3);\n } else if (str2.startsWith(\"file://\")) {\n intent.setType(getMIMEType(str2));\n } else {\n throw new IllegalArgumentException(\"URL_NOT_SUPPORTED\");\n }\n return Uri.parse(str2);\n }", "public Uri getOutputMediaFileUri(int type, double latitude, double longitude){\n \tSystem.out.println(\"Uri: \" + type);\n \treturn Uri.fromFile(getOutputMediaFile(type, latitude, longitude));\n }", "public static Uri saveBitmap(Bitmap b){\n\n\t\tString path = initPath();\n\t\tlong dataTake = System.currentTimeMillis();\n\t\tString jpegName = path + \"/\" + \"XiaoleTakePhoto\" + String.valueOf(dataTake) +\".png\";\n//\t\tLog.i(\"TIEJIANG\", \"saveBitmap:jpegName = \" + jpegName);\n\t\ttry {\n\t\t\tFileOutputStream fout = new FileOutputStream(jpegName);\n\t\t\tBufferedOutputStream bos = new BufferedOutputStream(fout);\n\t\t\tb.compress(Bitmap.CompressFormat.PNG, 100, bos);\n\t\t\tbos.flush();\n\t\t\tbos.close();\n\t\t\tFile temp = new File(jpegName);\n\t\t\tUri imageFileUri = Uri.fromFile(temp);\n\t\t\tLog.d(\"TIEJIANG\", \"saveBitmap:jpegName = \" + jpegName + \" ??url=\" + imageFileUri);\n\t\t\treturn imageFileUri;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.i(\"TIEJIANG\", \"saveBitmap: failed! \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "private String composeUri(String mode, String botName, String kind,\n String fileName) throws URISyntaxException {\n String uri = \"https://\" + host;\n uri += sep(mode);\n uri += sep(appId);\n uri += sep(botName);\n uri += sep(kind);\n uri += sep(fileName);\n return uri;\n }", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "public static final Uri getOutputMediaFileUri(int type, String fileName) {\n return Uri.fromFile(getOutputMediaFile(type, fileName));\n }", "private Uri saveImageExternal(Bitmap image) {\n Uri uri = null;\n try {\n StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();\n StrictMode.setVmPolicy(builder.build());\n File file = new File(Objects.requireNonNull(getContext()).getExternalFilesDir(Environment.DIRECTORY_PICTURES), \"to-share.png\");\n FileOutputStream stream = new FileOutputStream(file);\n image.compress(Bitmap.CompressFormat.PNG, 90, stream);\n stream.close();\n uri = Uri.fromFile(file);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return uri;\n }", "URL toURL(FileReference fileReferece);", "public File getPhotoFileUri(String fileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\n\n return file;\n }", "private File getPhotoFileUri(String photoFileName) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n File file = new File(mediaStorageDir.getPath() + File.separator + photoFileName);\n\n return file;\n\n }", "java.lang.String getPictureUri();", "URI getMediaURI();", "public static File toFile(URI uri) {\n// if (uri.getScheme() == null) {\n// try {\n// uri = new URI(\"file\", uri.getSchemeSpecificPart(), null);\n// } catch (URISyntaxException e) {\n// // should never happen\n// Logger.getLogger(URIUtils.class).fatal(uri, e);\n// }\n// }\n\t\treturn new File((File) null, uri.getSchemeSpecificPart());\n\t}", "private Uri getImageUri(String path) {\n return Uri.fromFile(new File(path));\n }", "URI createURI();", "private File getOutputMediaFile(String s2){\n File mediaFile = null;\n try {\n\n\n assert s2 != null;\n String fileName = s2.substring(s2.lastIndexOf(\"/\") + 1);\n final String stringImageURL = s2.substring(0, fileName.length() - 1);\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + activity.getPackageName()\n + \"/Files/\" + stringImageURL, fileName);\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n // Create a media file name\n //String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n\n // String mImageName=s2;\n mediaFile = new File(mediaStorageDir.getPath(), fileName);\n }catch (Exception e){\n\n }\n return mediaFile;\n }", "protected void saveVideo(final Uri uriVideo) {\n\n // click the video to save it\n mVideoView.setOnTouchListener(new View.OnTouchListener() {\n\n public boolean onTouch(View v, MotionEvent event) {\n\n boolean success = false;\n\n // make the directory\n File vidDir = new File(android.os.Environment.getExternalStoragePublicDirectory\n (Environment.DIRECTORY_MOVIES) + File.separator + \"Saved iCute Videos\");\n vidDir.mkdirs();\n // create unique identifier\n Random generator = new Random();\n int n = 100;\n n = generator.nextInt(n);\n // create file name\n String videoName = \"Video_\" + n + \".mp4\";\n File fileVideo = new File(vidDir.getAbsolutePath(), videoName);\n\n try {\n fileVideo.createNewFile();\n success = true;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n if (success) {\n Toast.makeText(getApplicationContext(), \"Video saved!\",\n Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"Error during video saving\", Toast.LENGTH_LONG).show();\n }\n\n return true;\n }\n });\n }", "public File String_to_File(String img_url) {\n\n try {\n File rootSdDirectory = Environment.getExternalStorageDirectory();\n\n casted_image = new File(rootSdDirectory, \"attachment.jpg\");\n if (casted_image.exists()) {\n casted_image.delete();\n }\n casted_image.createNewFile();\n\n FileOutputStream fos = new FileOutputStream(casted_image);\n\n URL url = new URL(img_url);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setDoOutput(true);\n connection.connect();\n InputStream in = connection.getInputStream();\n\n byte[] buffer = new byte[1024];\n int size = 0;\n while ((size = in.read(buffer)) > 0) {\n fos.write(buffer, 0, size);\n }\n fos.close();\n return casted_image;\n\n } catch (Exception e) {\n\n System.out.print(e);\n // e.printStackTrace();\n\n }\n return casted_image;\n }", "@Override\n public void onClick(View view) {\n Intent takeFoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if(takeFoto.resolveActivity(getPackageManager()) != null){\n File photoFile = null;\n try{\n photoFile = createImageFile();\n } catch (IOException ex) {\n Log.d(\"FALLO\",\"TOMAR FOTO\");\n }\n if(photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(getApplicationContext(), \"com.B3B.farmbros.android.fileprovider\", photoFile);\n takeFoto.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takeFoto, REQUEST_IMAGE_SAVE);\n }\n }\n }", "private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = new File(utils.getSentImagesDirectory());\n\n File image = null;\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n // Save a file: path for use with ACTION_VIEW intents\n //LOG.info(\"test place3\");\n try {\n imageFilePath = image.getAbsolutePath();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n //LOG.info(\"test place4\");\n if (image == null) {\n LOG.info(\"image file is null\");\n } else {\n LOG.info(\"image file is not null path is:\" + imageFilePath);\n }\n return image;\n }", "private Uri transcodeSchemeFileUri(Uri uri) {\n Uri newUri = null;\n Cursor cursor = null;\n String videoPath = uri.getPath();\n Log.v(TAG, \"transcodeSchemeFileUri, videoPath \" + videoPath);\n try {\n if (videoPath != null) {\n videoPath = videoPath.replaceAll(\"'\", \"''\");\n }\n cursor = getContentResolver()\n .query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,\n new String[] { MediaStore.Video.Media._ID },\n MediaStore.Video.Media.DATA + \" = '\"\n + videoPath + \"'\", null, null);\n if (cursor != null && cursor.moveToFirst()\n && cursor.getCount() > 0) {\n int id = cursor.getInt(0);\n newUri = ContentUris.withAppendedId(\n MediaStore.Video.Media.EXTERNAL_CONTENT_URI, id);\n Log.v(TAG, \"transcodeSchemeFileUri, newUri = \" + newUri);\n } else {\n newUri = uri;\n Log.e(TAG, \"transcodeSchemeFileUri, The uri not existed in video table\");\n }\n return newUri;\n } catch (final SQLiteException ex) {\n ex.printStackTrace();\n } catch (final IllegalArgumentException ex) {\n ex.printStackTrace();\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n return null;\n }", "public static File getPhotoFileUri(String fileName, String TAG, Context context) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(TAG, \"failed to create directory\");\n }\n // Return the file target for the photo based on filename\n return new File(mediaStorageDir.getPath() + File.separator + fileName);\n }", "private String generateTargetFileUri(String fileUri) {\n return folderName.concat(fileUri);\n }", "@Override\n public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {\n List<String> segments = uri.getPathSegments();\n String accountId = segments.get(0);\n String id = segments.get(1);\n String format = segments.get(2);\n if (FORMAT_THUMBNAIL.equals(format)) {\n int width = Integer.parseInt(segments.get(3));\n int height = Integer.parseInt(segments.get(4));\n String filename = \"thmb_\" + accountId + \"_\" + id;\n File dir = getContext().getCacheDir();\n File file = new File(dir, filename);\n if (!file.exists()) {\n Uri attachmentUri = getAttachmentUri(Long.parseLong(accountId), Long.parseLong(id));\n Cursor c = query(attachmentUri,\n new String[] { AttachmentProviderColumns.DATA }, null, null, null);\n if (c != null) {\n try {\n if (c.moveToFirst()) {\n attachmentUri = Uri.parse(c.getString(0));\n } else {\n return null;\n }\n } finally {\n c.close();\n }\n }\n String type = getContext().getContentResolver().getType(attachmentUri);\n try {\n InputStream in =\n getContext().getContentResolver().openInputStream(attachmentUri);\n Bitmap thumbnail = createThumbnail(type, in);\n thumbnail = Bitmap.createScaledBitmap(thumbnail, width, height, true);\n FileOutputStream out = new FileOutputStream(file);\n thumbnail.compress(Bitmap.CompressFormat.PNG, 100, out);\n out.close();\n in.close();\n }\n catch (IOException ioe) {\n return null;\n }\n }\n return ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);\n }\n else {\n return ParcelFileDescriptor.open(\n new File(getContext().getDatabasePath(accountId + \".db_att\"), id),\n ParcelFileDescriptor.MODE_READ_ONLY);\n }\n }", "protected Uri saveImageToInternalStorage(Bitmap bitmap){\n // Initialize ContextWrapper\n ContextWrapper wrapper = new ContextWrapper(context);\n\n // Initializing a new file\n // The bellow line return a directory in internal storage\n File file = wrapper.getDir(\"Images\",MODE_PRIVATE);\n\n // Create a file to save the image\n file = new File(file, \"check12\"+\".jpg\");\n\n try{\n // Initialize a new OutputStream\n OutputStream stream = null;\n\n // If the output file exists, it can be replaced or appended to it\n stream = new FileOutputStream(file);\n\n // Compress the bitmap\n bitmap.compress(Bitmap.CompressFormat.JPEG,100,stream);\n\n // Flushes the stream\n stream.flush();\n\n // Closes the stream\n stream.close();\n\n }catch (IOException e) // Catch the exception\n {\n e.printStackTrace();\n }\n\n // Parse the gallery image url to uri\n Uri savedImageURI = Uri.parse(file.getAbsolutePath());\n\n // Return the saved image Uri\n return savedImageURI;\n }", "private static File getOutputMediaFile(int type){\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"PanoClicks\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"NDS_\" + timeStamp + \"_\";\n //File mediaStorageDir = Environment.getExternalStoragePublicDirectory(\"/NDS images\");\n String CameraFolder = \"Camera\";\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString() + \"/\" + CameraFolder + \"/\");\n\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n\n\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n //-------------\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n mediaStorageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "private static File getOutputMediaFile(String namex, Context context) {\n\r\n String pathToExternalStorage = context.getFilesDir().toString();\r\n File mediaStorageDir = new File(pathToExternalStorage + \"/\" + \"eKMIS\");\r\n\r\n //if (!appDirectory.isDirectory() || !appDirectory.exists()) //Checks if the directory exists\r\n // appDirectory.mkdir();\r\n\r\n if (!mediaStorageDir.exists()) {\r\n if (!mediaStorageDir.mkdirs()) {\r\n //Log.d(\"surevy\", \"failed to create directory\");\r\n return null;\r\n }\r\n }\r\n // Create a media file name\r\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\r\n .format(new Date());\r\n File mediaFile;\r\n //mediaFile = new File(mediaStorageDir.getPath() + File.separator\r\n // + \"IMG_\" + timeStamp + \".jpg\");\r\n\r\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\r\n + \"IMG_\" + namex + \".jpg\");\r\n\r\n\r\n Log.d(\"Camera activty\", mediaStorageDir.getPath());\r\n\r\n return mediaFile;\r\n }", "private static File getOutputMediaFile(int type) {\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "protected void open_camera_and_save_image() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n // Ensure that there is a camera activity to handle the intent.\n if(intent.resolveActivity(getPackageManager()) != null) {\n // create the file where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException e) {\n // error occurred while creating the file\n result.setText(R.string.fail_in_creating_photo);\n }\n\n if(photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.jiankaiwang.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n\n // pass to another external activity\n startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);\n }\n }\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n Uri.fromFile(image);\n mCurrentPhotoPath = Uri.fromFile(image).getPath();\n\n // Save a file: path for use with ACTION_VIEW intents\n return image;\n }", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"reliant\");\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n return mediaFile;\n }", "private static File getOutputMediaFile(int type){\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File createVideoFile() throws IOException {\n Date d = new Date();\n String nameDate = new SimpleDateFormat(\"ddMMyyyy_HHmmss\").format(d);\n this.date = new SimpleDateFormat(\"dd/MM/yyyy\").format(d);\n this.time = nameDate.substring(9,13);\n String videoFileName = \"MP4_\" + nameDate + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n videoFileName, /* prefix */\n \".mp4\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentVideoPath = image.getAbsolutePath();\n return image;\n }", "private Uri transcodeSchemeContentFileUri(Uri uri) {\n Uri newUri = null;\n Cursor cursor = null;\n try {\n // get file id\n long id = ContentUris.parseId(uri);\n // check file whether has existed in video table\n cursor = getContentResolver()\n .query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, null,\n MediaStore.Video.Media._ID + \" = '\" + id + \"'\", null, null);\n if (cursor != null && cursor.moveToFirst()\n && cursor.getCount() > 0) {\n newUri = ContentUris.withAppendedId(\n MediaStore.Video.Media.EXTERNAL_CONTENT_URI, id);\n Log.v(TAG, \"transcodeSchemeContentFileUri, newUri \" + newUri);\n } else {\n newUri = uri;\n Log.e(TAG, \"transcodeSchemeContentFileUri, The uri not existed in video table\");\n }\n return newUri;\n } catch (final SQLiteException ex) {\n ex.printStackTrace();\n } catch (final IllegalArgumentException ex) {\n ex.printStackTrace();\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n return null;\n }", "@SuppressLint(\"SimpleDateFormat\")\n\tprivate static File getOutputMediaFile() {\n\n\t\t// Create Folder\n\t\tFile folder = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t.toString() + \"/JuzFood/image\");\n\t\tfolder.mkdirs();\n\n\t\tif (!folder.exists()) {\n\t\t\tif (!folder.mkdirs()) {\n\t\t\t\tLog.v(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// Create a media file name\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n\t\t.format(new Date());\n\n\t\t// Save the path as a string value\n\t\tString extStorageDirectory = folder.toString();\n\n\t\tSystem.out.println(\"Folder Path ===== \" + extStorageDirectory);\n\n\t\tFile mediaFile = new File(extStorageDirectory + File.separator\n\t\t\t\t+ \"JUZFOOD_\" + timeStamp + \".jpg\");\n\n\t\treturn mediaFile;\n\t}", "public static String/*File*/ convertImageUriToFile(Context context, Uri imageUri) {\n Cursor cursor = null;\n try {\n String[] projection = {MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID/*, MediaStore.Images.ImageColumns.ORIENTATION*/};\n cursor = context.getContentResolver().query(\n imageUri,\n projection, // Which columns to return\n null, // WHERE clause; which rows to return (all rows)\n null, // WHERE clause selection arguments (none)\n null); // Order-by clause (ascending by name)\n\n int file_ColumnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);\n //int orientation_ColumnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.ORIENTATION);\n\n if (cursor.moveToFirst()) {\n //String orientation = cursor.getString(orientation_ColumnIndex);\n return cursor.getString(file_ColumnIndex)/*new File(cursor.getString(file_ColumnIndex))*/;\n }\n return null;\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }", "public String getPhotoFileUri(String fileName) {\n // Only continue if the SD Card is mounted\n if (isExternalStorageAvailable()) {\n // Get safe storage directory for photos\n // Use `getExternalFilesDir` on Context to access package-specific directories.\n // This way, we don't need to request external read/write runtime permissions.\n File mediaStorageDir = new File(\n getExternalFilesDir(Environment.DIRECTORY_PICTURES), APP_TAG);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists() && !mediaStorageDir.mkdirs()){\n Log.d(APP_TAG, \"failed to create directory\");\n }\n\n // Return the file target for the photo based on filename\n return mediaStorageDir.getPath()+File.separator+fileName+\".JPG\";\n }\n return null;\n }", "private void storeimageinfirestorage(Uri imageuri)\n {\n final StorageReference filepath=mfirebasestorage.child(Current_user +\".jpg\");\n filepath.putFile(imageuri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(getApplicationContext(),\"image uploaded succesfully\",LENGTH_SHORT).show();\n filepath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n profileimageurl= uri.toString();\n savetodatabase();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n }\n });\n\n\n }\n\n });\n\n\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile3gp() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + F3GP_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private static File getOutputMediaFile(int type) {\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n Log.e(\"Derp1\", \"Media File Created\");\n return null;\n }\n\n return mediaFile;\n }", "private static File getOutputMediaFile(int type) {\n\n // External sdcard location\n //If no sdcard, the picture is stored at the directory /storage/sdcard0/Pictures/Android File Upload\n File mediaStorageDir = new File(\n Environment\n .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n Config.IMAGE_DIRECTORY_NAME);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) { //checks if it exists\n if (!mediaStorageDir.mkdirs()) { //mkdir makes a directory and returns if it was created\n Log.d(\"Gallery\", \"Oops! Failed create \"\n + Config.IMAGE_DIRECTORY_NAME + \" directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n File mediaFile;\n //Currently only have it for making image types, not video types\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"IMG_\" + timeStamp + \".jpg\");\n// } else if (type == MEDIA_TYPE_VIDEO) {\n// mediaFile = new File(mediaStorageDir.getPath() + File.separator\n// + \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "public static File getOutputMediaFile(int type, String name) {\n File Test = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File Test1 = Environment.getExternalStorageDirectory();\n Log.d(\"Environment\", \"Environment path \" + Test.getAbsolutePath().toString());\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory(), \"RateMe\");\n Log.d(\"Environment\", \"Environment path \" + mediaStorageDir.getAbsolutePath().toString());\n if (!mediaStorageDir.exists()) {\n /*if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t return null;\n\t\t\t }*/\n mediaStorageDir.mkdir();\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == 20) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + name.toLowerCase() + timeStamp + \".jpg\");\n } else\n return null;\n\n return mediaFile;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + MP4_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = SettingsHelper.getPrivateImageFolder(this);\n if (!storageDir.exists()) {\n storageDir.mkdirs();\n }\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n imageUri = Uri.fromFile(image);\n return image;\n }", "private static File getOutputMediaFile(int type) {\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"homework\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.e(\"--------\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private void takeAndSave(){\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Ensure there's a camera\n if(takePictureIntent.resolveActivity(getPackageManager())!=null){\n File photoFile = null;\n try{\n photoFile = createImageFile();\n }catch (IOException e){\n //Error message, maybe print out\n exit();\n }\n if(photoFile != null){\n Uri photoURI = FileProvider.getUriForFile(this, \"com.example.android.fileprovider\",photoFile);\n takePictureIntent.putExtra(MediaStore.Extra_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }\n }", "private void saveAndUpload(String name, String email, Uri photoUri){\n\n // TODO implement save to local DB\n // TODO implement safe upload to Server\n }", "protected Uri getOutputUri() {\n Uri outputUri = mOptions.outputUri;\n if (outputUri.equals(Uri.EMPTY)) {\n try {\n String ext = mOptions.outputCompressFormat == Bitmap.CompressFormat.JPEG ? \".jpg\" :\n mOptions.outputCompressFormat == Bitmap.CompressFormat.PNG ? \".png\" : \".wepb\";\n outputUri = Uri.fromFile(File.createTempFile(\"cropped\", ext, getCacheDir()));\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to create temp file for output image\", e);\n }\n }\n return outputUri;\n }", "public static Uri getPhotoUri() {\n Logger.d(TAG, \"getPhotoUri() entry\");\n Cursor cursor = null;\n int imageId = 0;\n try {\n cursor =\n mContext.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, null);\n cursor.moveToFirst();\n imageId = cursor.getInt(cursor.getColumnIndex(MediaStore.Images.ImageColumns._ID));\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n Uri photoUri = Uri.parse(PREFER_PHOTO_URI + imageId);\n Logger.d(TAG, \"getPhotoUri() exit with the uri \" + photoUri);\n return photoUri;\n }", "@Override\n public URI createUri(String url) {\n try {\n this.uri = new URI(url);\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n return uri;\n }", "private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"Picko_JPEG\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOCUMENTS),\"Whatsapp\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n\n\n }", "public String savePhoto(byte[] resource, String fileName){\n File file = getPhotoFile(fileName);\n if (file==null||!file.exists()){\n Log.e(LOG_TAG, \"savePhoto getPhotoFile fail fileName=\"+fileName);\n return null;\n }\n try {\n BufferedOutputStream s = new BufferedOutputStream(new FileOutputStream(file));\n s.write(resource);\n s.flush();\n s.close();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n //store image file on media store provider\n addImageToGallery(file.getAbsolutePath());\n\n // 20161213\n return file.getAbsolutePath();\n }", "@RequiresApi(api = Build.VERSION_CODES.FROYO)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n imageFileName = timeStamp + \"_\" + \".jpg\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n Log.e(\"Getpath\", \"Cool\" + mCurrentPhotoPath);\n return image;\n }", "private File getOutputMediaFile() {\n\r\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory().getPath() + File.separator + \"ImageUpload\" + File.separator + \"Pictures\");\r\n if (!mediaStorageDir.exists()) {\r\n if (!mediaStorageDir.mkdirs()) {\r\n Log.d(\"ImageUpload\", \"failed to create external directory\");\r\n Log.d(\"ImageUpload\", \"creating to internal directory\");\r\n mediaStorageDir = getFilesDir();\r\n }\r\n }\r\n\r\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n return new File(mediaStorageDir.getPath() + File.separator + \"IMG_\" + timeStamp + \".jpg\");\r\n }", "private static File getOutputMediaFile(int type){\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getParentFragment().getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String imageFileName = new SimpleDateFormat(\"yyyyMMdd-HHmmss\", Locale.ENGLISH).format(new Date());\n String storageDir = Environment.getExternalStorageDirectory() + \"/DokuChat\";\n File dir = new File(storageDir);\n if (!dir.exists())\n dir.mkdir();\n\n image = new File(storageDir + \"/\" + imageFileName + \".jpg\");\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "public void save(View view){\n if(shouldAskPermissions()) {\n askPermissions();\n }\n\n if(bitmap == null){\n bitmap = Bitmap.createBitmap(content.getWidth(), content.getHeight(), Bitmap.Config.RGB_565);\n }\n Canvas canvas = new Canvas(bitmap);\n try{\n //asking permissions for creating directory\n if(shouldAskPermissions()) {\n askPermissions();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(currentPhotoPath);\n\n view.draw(canvas);\n\n String url = MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, imgName, null);\n\n bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fileOutputStream);\n fileOutputStream.flush();\n fileOutputStream.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "public static void saveFile(final Context context, Uri uri, final String oldFilename) {\n\n Target target = new Target() {\n\n @Override\n public void onBitmapLoaded(final Bitmap bitmap, LoadedFrom from) {\n\n new Thread(() -> {\n\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault());\n String currentTimeStamp = format.format(new Date());\n String filename = oldFilename;\n\n if (oldFilename.isEmpty()) {\n filename = \"assi_\" + currentTimeStamp;\n\n Log.d(TAG, \"new user pic filename: \" + filename);\n }\n\n PreferenceUtils.setUserPicFilename(context, filename);\n\n Log.e(TAG, Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n\n File file = new File(Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n FileOutputStream oStream = null;\n try {\n file.createNewFile();\n\n oStream = new FileOutputStream(file);\n\n bitmap.compress(CompressFormat.JPEG, 80, oStream);\n\n } catch (Exception e) {\n Log.e(TAG, \"Cannot save image to internal file storage! Error: \" + e.getMessage());\n } finally {\n try {\n if (oStream != null) {\n oStream.close();\n }\n } catch (IOException e) {\n Log.e(TAG, \"Cannot close output stream! Error: \" + e.getMessage());\n }\n }\n }).start();\n }\n\n @Override\n public void onBitmapFailed(Drawable errorDrawable) {\n }\n\n @Override\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n }\n };\n\n // save file to internal storage\n Picasso.with(context)\n .load(uri)\n .into(target);\n }", "private File getOutputMediaFile(int type) {\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = null;\n File mediaFile;\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"memreas\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"memreas\", \"failed to create directory\");\n return null;\n }\n }\n // Create a media file name\n String filename;\n if (type == MEDIA_TYPE_IMAGE) {\n filename = \"IMG_\" + timeStamp + \".jpg\";\n } else if (type == MEDIA_TYPE_VIDEO) {\n filename = \"VID_\" + timeStamp + \".mp4\";\n } else {\n return null;\n }\n\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n filename);\n\n return mediaFile;\n }", "private static File getOutputMediaFile(Context context, String extension, String type) {\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir;\n\n if(type.equals(\"save\")) {\n mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Pictures/Artisto\");\n }\n else {\n mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + context.getApplicationContext().getPackageName()\n + \"/cache\");\n }\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmmss\", Locale.US).format(new Date());\n File mediaFile;\n\n String mImageName = \"IMG_\" + timeStamp + extension;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n\n //path = mediaStorageDir.getPath() + File.separator + mImageName;\n\n return mediaFile;\n }", "Uri getRecordingUri(Uri channelUri);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n //\"/storage/emulated/0/IRON-HID/captures\" <== can open~!!\n //\"file:///mnt/sdcard/Download/20141025_170314.jpg\"\n if (requestCode == CHOOSE_FILE_TO_UPLOAD)\n {\n if (resultCode == RESULT_OK)\n {\n Uri uri = data.getData();\n if (uri != null)\n {\n // Send file\n String filePath = uri.getPath();\n filePath = filePath.replace(\"file://\", \"\");\n mPutCommand += \" \" + filePath;\n mCommandManager.SendCommand(mPutCommand);\n }\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "public abstract void share(String content, Uri imageOrVideo);", "public File getOutputMediaFile(int type){\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n Log.d(\"asda\", mediaStorageDir.getPath());\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new java.util.Date());\n String imageFileName = \"WILDLIFE_JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private static File getOutputMediaFile(int type){\r\n\t // To be safe, you should check that the SDCard is mounted\r\n\t // using Environment.getExternalStorageState() before doing this.\r\n\r\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\r\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\r\n\t // This location works best if you want the created images to be shared\r\n\t // between applications and persist after your app has been uninstalled.\r\n\r\n\t // Create the storage directory if it does not exist\r\n\t if (! mediaStorageDir.exists()){\r\n\t if (! mediaStorageDir.mkdirs()){\r\n\t Log.d(\"MyCameraApp\", \"failed to create directory\");\r\n\t return null;\r\n\t }\r\n\t }\r\n\r\n\t // Create a media file name\r\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n\t File mediaFile;\r\n\t if (type == MEDIA_TYPE_IMAGE){\r\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\r\n\t \"IMG_\"+ timeStamp + \".jpg\");\r\n\t } else if(type == MEDIA_TYPE_VIDEO) {\r\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\r\n\t \"VID_\"+ timeStamp + \".mp4\");\r\n\t } else {\r\n\t return null;\r\n\t }\r\n\r\n\t return mediaFile;\r\n\t}", "private static File getOutputMediaFile(int type) {\n\n // External sdcard location\n File mediaStorageDir = new File(\n Environment\n .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n Constants.IMAGE_DIRECTORY_NAME);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"IMG_\" + timeStamp + \".jpg\");\n }else {\n return null;\n }\n\n return mediaFile;\n }", "@Override\n\t\t\tprotected URI toUriImpl(String path) throws URISyntaxException {\n\t\t\t\treturn toFileToURI(path);\n\t\t\t}", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.CANADA).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = mActivity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n cameraFilePath = image.getAbsolutePath();\n return image;\n }", "private Uri getMedia(String mediaName) {\n if (URLUtil.isValidUrl(mediaName)) {\n // Media name is an external URL.\n return Uri.parse(mediaName);\n } else {\n\n // you can also put a video file in raw package and get file from there as shown below\n\n return Uri.parse(\"android.resource://\" + getPackageName() +\n \"/raw/\" + mediaName);\n\n\n }\n }", "private void post(Uri uri, int type) {\n SingleAttatchment singleAttatchment = null;\nif(type==GALLERY_TYPE) {\n try {\n singleAttatchment = new SingleAttatchment(type, getStrPath(this,uri));\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n}\nelse if(type==CAMERA_TYPE) {\n Uri uri2 = Uri.fromFile(photoFile);\n singleAttatchment = new SingleAttatchment(type, uri2.getPath());\n}\nelse if(type==VIDEO_TYPE){\nLog.e(\"pathFetched\",getPath(uri));\n singleAttatchment = new SingleAttatchment(type, getPath(uri));\n}\nelse if(type==AUDIO_TYPE){\n singleAttatchment = new SingleAttatchment(type, (uri).getPath());\n}\nelse if(type==FILE_TYPE){\n Log.e(\"data\",String.valueOf(uri));\n Log.e(\"data\",String.valueOf(uri.getPath()));\n Log.e(\"data\",String.valueOf(uri.getEncodedPath()));\n Log.e(\"data\",String.valueOf(uri.getLastPathSegment()));\n\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\nelse if(type==RECORD_TYPE){\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\n\n //Log.e(\"Uri\",String.valueOf(uri.getPath()));\n// Log.e(\"file\",String.valueOf(file.getPath()));\n\n list.add(singleAttatchment);\n attatchmentAdapter.notifyDataSetChanged();\n save();\n\n }", "private static File getOutputMediaFile(int type){\n\t // To be safe, you should check that the SDCard is mounted\n\t // using Environment.getExternalStorageState() before doing this.\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t\t\n\t\t\n\t // This location works best if you want the created images to be shared\n\t // between applications and persist after your app has been uninstalled.\n\n\t // Create the storage directory if it does not exist\n\t if (! mediaStorageDir.exists()){\n\t if (! mediaStorageDir.mkdirs()){\n\t \n\t return null;\n\t }\n\t }\n\n\t // Create a media file name\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t File mediaFile;\n\t if (type == MEDIA_TYPE_IMAGE){\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"IMG_\"+ timeStamp + \".jpg\");\n\t } else if(type == MEDIA_TYPE_VIDEO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"VID_\"+ timeStamp + \".mp4\");\n\t } else {\n\t return null;\n\t }\n\n\t return mediaFile;\n\t}", "private static File getOutputMediaFile(int type){\n\t // To be safe, you should check that the SDCard is mounted\n\t // using Environment.getExternalStorageState() before doing this.\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t // This location works best if you want the created images to be shared\n\t // between applications and persist after your app has been uninstalled.\n\n\t // Create the storage directory if it does not exist\n\t if (! mediaStorageDir.exists()){\n\t if (! mediaStorageDir.mkdirs()){\n\t Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t return null;\n\t }\n\t }\n\n\t // Create a media file name\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t File mediaFile;\n\t if (type == MEDIA_TYPE_IMAGE){\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"IMG_\"+ timeStamp + \".jpg\");\n\t } else if(type == MEDIA_TYPE_VIDEO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"VID_\"+ timeStamp + \".mp4\");\n\t } else if(type == MEDIA_TYPE_AUDIO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"AUD_\"+ timeStamp + \".mp3\");\n\t } else {\n\t return null;\n\t }\n\n\t return mediaFile;\n\t}", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + App.getActiveActivity().getPackageName()\n + \"/Files\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n File mediaFile;\n String mImageName=\"MI_\"+ timeStamp +\".jpg\";\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n return mediaFile;\n }", "public static File getRealFile(final Context context, final Uri uri) {\n if (null == uri) return null;\n final String scheme = uri.getScheme();\n String data = null;\n if (scheme == null)\n data = uri.getPath();\n else if (ContentResolver.SCHEME_FILE.equals(scheme)) {\n data = uri.getPath();\n } else if (ContentResolver.SCHEME_CONTENT.equals(scheme)) {\n Cursor cursor = context.getContentResolver().query(uri, new String[]{MediaStore.Images.ImageColumns.DATA}, null, null, null);\n if (null != cursor) {\n if (cursor.moveToFirst()) {\n int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);\n if (index > -1) {\n data = cursor.getString(index);\n }\n }\n cursor.close();\n }\n }\n File f = new File(data);\n return f;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".png\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }" ]
[ "0.6863646", "0.66082895", "0.6574555", "0.64999187", "0.6478926", "0.64553034", "0.6448055", "0.6433404", "0.6424142", "0.64230204", "0.64230204", "0.6409097", "0.6409097", "0.6379156", "0.6376752", "0.6368758", "0.6366034", "0.6294037", "0.6234776", "0.6149264", "0.6139793", "0.6129819", "0.61106175", "0.58910465", "0.5867394", "0.5853121", "0.5836916", "0.58356446", "0.58154804", "0.5809982", "0.58093786", "0.5789381", "0.57783955", "0.5777028", "0.57730603", "0.5762592", "0.5757258", "0.57169574", "0.5691238", "0.56845933", "0.5661976", "0.56362736", "0.56152356", "0.56147426", "0.56139797", "0.5600145", "0.55879384", "0.558473", "0.55732083", "0.5562419", "0.5552312", "0.55482984", "0.5542642", "0.55421996", "0.5541109", "0.5536971", "0.55334526", "0.5532629", "0.55286753", "0.5524518", "0.5524016", "0.552377", "0.55196965", "0.5512537", "0.55080557", "0.55025876", "0.549984", "0.5493747", "0.54908556", "0.5490349", "0.54895234", "0.54880935", "0.5484592", "0.5480238", "0.54554206", "0.545295", "0.5450634", "0.5449593", "0.5447822", "0.5446704", "0.5437129", "0.542661", "0.5424709", "0.54228264", "0.54208684", "0.5420245", "0.54198515", "0.54154783", "0.5412933", "0.5411021", "0.5397738", "0.53973013", "0.53964496", "0.5394119", "0.53931636", "0.53918225", "0.5390972", "0.5389", "0.5385962", "0.5383088" ]
0.6387726
13
Create a File for saving an image or video
private static File getOutputMediaFile(int type){ // To be safe, you should check that the SDCard is mounted // using Environment.getExternalStorageState() before doing this. File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "MyCameraApp"); // This location works best if you want the created images to be shared // between applications and persist after your app has been uninstalled. // Create the storage directory if it does not exist if (! mediaStorageDir.exists()){ if (! mediaStorageDir.mkdirs()){ Log.d("MyCameraApp", "failed to create directory"); return null; } } // Create a media file name String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); File mediaFile; if (type == MEDIA_TYPE_IMAGE){ mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_"+ timeStamp + ".jpg"); } else if(type == MEDIA_TYPE_VIDEO) { mediaFile = new File(mediaStorageDir.getPath() + File.separator + "VID_"+ timeStamp + ".mp4"); } else if(type == MEDIA_TYPE_AUDIO) { mediaFile = new File(mediaStorageDir.getPath() + File.separator + "AUD_"+ timeStamp + ".mp3"); } else { return null; } return mediaFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File createVideoFile() throws IOException {\n Date d = new Date();\n String nameDate = new SimpleDateFormat(\"ddMMyyyy_HHmmss\").format(d);\n this.date = new SimpleDateFormat(\"dd/MM/yyyy\").format(d);\n this.time = nameDate.substring(9,13);\n String videoFileName = \"MP4_\" + nameDate + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n videoFileName, /* prefix */\n \".mp4\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentVideoPath = image.getAbsolutePath();\n return image;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + MP4_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n String imageFileName = \"perfil_\" + timeStamp + \"_\";\n String outputPath = PATH;\n File storageDir = new File(outputPath);\n if(!storageDir.exists())storageDir.mkdirs();\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile3gp() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + F3GP_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private File createImageFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\"+timeStamp;\n File image = File.createTempFile(imageFileName, \".jpg\", this.savePath);\n \n return image;\n }", "private File createFilePictures() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String pictureName = \"BEER_\" + timeStamp + \"_\";\n File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n pictureName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPicturePath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyymmddHHmmss\").format(new Date());\n String imageFileName = timeStamp;\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n userCacheDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\r\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(\r\n imageFileName, // prefix //\r\n \".jpg\", // suffix //\r\n storageDir // directory //\r\n );\r\n\r\n // Save a file: path for use with ACTION_VIEW intents\r\n mPath = image.getAbsolutePath();\r\n return image;\r\n }", "private File createImageFile() throws IOException {\n String imageFileName = new SimpleDateFormat(\"yyyyMMdd-HHmmss\", Locale.ENGLISH).format(new Date());\n String storageDir = Environment.getExternalStorageDirectory() + \"/DokuChat\";\n File dir = new File(storageDir);\n if (!dir.exists())\n dir.mkdir();\n\n image = new File(storageDir + \"/\" + imageFileName + \".jpg\");\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getActivity().getFilesDir();\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }", "private File createVideoFileName() throws IOException {\n String timestamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //there are two types of SimpleDateFormat and Date()\n String prepend = \"VIDEO_\" + timestamp + \"_\";\n File videoFile = File.createTempFile(prepend, \".mp4\", mVideoFolder);\n mVideoFileName = videoFile.getAbsolutePath();\n return videoFile;\n\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.ENGLISH).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String z = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = imageFileName + \"camera.jpg\";\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStorageDirectory(), getString(R.string.app_name));\n if (!storageDir.exists()){\n storageDir.mkdir();\n }\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"MAZE_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n Log.i(TAG, \"Time Stamp: \" + timeStamp);\n\n String imageFileName = \"jpeg_\" + timeStamp + \"_\";\n Log.i(TAG, \"imageFileName: \" + imageFileName);\n\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n Log.i(TAG, \"Photo file path: \" + cameraFilePath);\n return image;\n }", "public File createImageFile() {\n // the public picture director\n File picturesDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); // To get pictures directory from android system\n\n // timestamp makes unique name.\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n String timestamp = sdf.format(new Date());\n\n // put together the directory and the timestamp to make a unique image location.\n File imageFile = new File(picturesDirectory, timestamp + \".jpg\");\n\n return imageFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = new File(utils.getSentImagesDirectory());\n\n File image = null;\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n // Save a file: path for use with ACTION_VIEW intents\n //LOG.info(\"test place3\");\n try {\n imageFilePath = image.getAbsolutePath();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n //LOG.info(\"test place4\");\n if (image == null) {\n LOG.info(\"image file is null\");\n } else {\n LOG.info(\"image file is not null path is:\" + imageFilePath);\n }\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, // prefix\n \".jpg\", // suffix\n storageDir // directory\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".png\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + JPEG_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }", "private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat ( \"yyyyMMdd_HHmmss\" ).format ( new Date () );\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir ( Environment.DIRECTORY_PICTURES );\n File image = File.createTempFile (\n imageFileName , /* prefix */\n \".jpg\" , /* suffix */\n storageDir /* directory */\n );\n\n // luu file: su dung ACTION_VIEW\n pathToFile = image.getAbsolutePath ();\n return image;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n // get Storage for the image file and then create the image file with {@extension as jpg} it can be png too or any other.\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault()).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(imageFileName, \".jpg\", storageDir);\n\n // Save a file: path for use with ACTION_VIEW intents\n this.currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //The directory where to save the file image\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n //The actual image file\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n mPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n return mFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n .format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX,\n albumF);\n return imageF;\n }", "private File createImageFile() throws IOException{\n @SuppressLint(\"SimpleDateFormat\")\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"img_\"+timeStamp+\"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(imageFileName,\".jpg\",storageDir);\n }", "public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return imageFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.CANADA).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = mActivity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n cameraFilePath = image.getAbsolutePath();\n return image;\n }", "private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = MyApplication.getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n savePhotoPathToSharedPrefs();\n return image;\n }", "private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"Picko_JPEG\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOCUMENTS),\"Whatsapp\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n\n\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new java.util.Date());\n String imageFileName = \"WILDLIFE_JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\r\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(\r\n imageFileName, /* prefix */\r\n \".jpg\", /* suffix */\r\n storageDir /* directory */\r\n );\r\n\r\n // Save a file: path for use with ACTION_VIEW intents\r\n mCurrentPhotoPath = image.getAbsolutePath();\r\n return image;\r\n\r\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = SettingsHelper.getPrivateImageFolder(this);\n if (!storageDir.exists()) {\n storageDir.mkdirs();\n }\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n imageUri = Uri.fromFile(image);\n return image;\n }", "File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //Todo:Este sera el nombre que tendra el archivo\n String imageFileName = \"IMAGE_\" + timeStamp + \"_\";\n //Todo:Ruta donde se almacenara la imagen\n File storageDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n //Todo:El tipo de archivo que se almacenara en el directorio\n File image = File.createTempFile(imageFileName,\".jpg\",storageDirectory);\n //Todo: mImageFileLocation sera el valor que se\n mImageFileLocation = image.getAbsolutePath();\n\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n pictureImagePath = image.getAbsolutePath();\n return image;\n\n }", "public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(getPhotoLocation());\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n setCurrentPhotoFile(image.getAbsolutePath());\n return image;\n }", "private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n pictureFilePath = mFile.getAbsolutePath();\n return mFile;\n }", "public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = mContext.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format( new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\" ;\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment. DIRECTORY_PICTURES);\n File image = File. createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = activity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"GIS\");\n File image = null;\n\n if(!storageDir.exists()){\n\n storageDir.mkdirs();\n\n }\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }catch (Exception e){\n\n e.printStackTrace();\n\n }\n // Save a file: path for use with ACTION_VIEW intents\n\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n pictureImagePath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getParentFragment().getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "protected File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(imageFileName, \".jpg\", storageDir);\n return imageFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp;\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "public static File createPlayerFile(){\n try {\n playerFile = new File(System.getProperty(\"user.dir\") + \"/PlayerFiles/\" + \".txt\"); //creates player file, can it run on android?\n playerFile.createNewFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n finally {\n return playerFile;\n }\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return imageFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }", "private File createImageFile() {\n\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault()).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES + APP_PICTURE_DIRECTORY);\n storageDir.mkdirs();\n\n File imageFile = null;\n\n try {\n imageFile = File.createTempFile(\n imageFileName, /* prefix */\n FILE_SUFFIX_JPG, /* suffix */\n storageDir /* directory */\n );\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return imageFile;\n }", "private File createTempFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File albumF = getAlbumDir();\n File mediaF = null;\n\n profile = IMG_FILE_PREFIX + timeStamp+\"_\";\n mediaF = File.createTempFile(profile, IMG_FILE_SUFFIX, albumF);\n\n return mediaF;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(getString(R.string.day_format)).format(new Date());\n String imageFileName = getString(R.string.image_file_prefix) + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(imageFileName, getString(R.string.image_file_format),\n storageDir\n );\n\n return image;\n }", "private File createImageFile(String mode) throws IOException {\n String imageFileName = getImageFileName(mode);\n\n File storageDir;\n if(mode.equals(getString(R.string.training_on))){\n storageDir = getActivity().getExternalFilesDir(null);\n } else {\n storageDir = getActivity().getExternalCacheDir();\n }\n\n File image;\n image = new File(storageDir, imageFileName+\".jpg\");\n\n return image;\n }", "private File createImageFile() throws IOException\r\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"MYAPPTEMP_\" + timeStamp + \"_\";\r\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(imageFileName, /* prefix */\r\n \".jpg\", /* suffix */\r\n storageDir /* directory */\r\n );\r\n\r\n return image;\r\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp;\n\n String folderName = context.getString(R.string.app_name).toLowerCase();\n\n File path = new File(ContextCompat.getExternalFilesDirs(getActivity(), null)[0]\n .getAbsolutePath() + \"/\" + folderName);\n\n //make sure folder exists\n path.mkdirs();\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n path /* directory */\n );\n\n return image;\n }", "private void createFile(PonsFileFactory ponsFileFactory, Profile profile){\n moveX(profile);\n ponsFileFactory.setProfile(profile);\n String text = ponsFileFactory.createPonsFile();\n String profileName = profile.getName();\n WriteFile.write(text,pathTextField.getText() + \"/\" + profileName.substring(0,profileName.indexOf(\".\")));\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n //galleryAddPic();\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n\n\n return image;\n\n\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"1mind_\" + timeStamp + \".png\";\n File photo = new File(Environment.getExternalStorageDirectory(), imageFileName);\n mCurrentPhotoPath = photo.getAbsolutePath();\n return photo;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n Uri.fromFile(image);\n mCurrentPhotoPath = Uri.fromFile(image).getPath();\n\n // Save a file: path for use with ACTION_VIEW intents\n return image;\n }", "public static File createImageFile(Context ctx) throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = ctx.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(imageFileName, \".jpg\", storageDir);\n return image;\n }", "private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }", "@RequiresApi(api = Build.VERSION_CODES.FROYO)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n imageFileName = timeStamp + \"_\" + \".jpg\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n Log.e(\"Getpath\", \"Cool\" + mCurrentPhotoPath);\n return image;\n }" ]
[ "0.72691524", "0.7100188", "0.6833453", "0.67907023", "0.6690861", "0.66370183", "0.66152924", "0.65899026", "0.65316594", "0.6524017", "0.65235376", "0.65209776", "0.6515639", "0.65092367", "0.64999855", "0.64991194", "0.64974487", "0.6490886", "0.6488152", "0.64877635", "0.64877635", "0.6483096", "0.64775246", "0.6476564", "0.64754575", "0.647277", "0.64606977", "0.64606977", "0.64480925", "0.64453524", "0.6441776", "0.6439929", "0.6439764", "0.64389116", "0.6437707", "0.6434026", "0.6433371", "0.6430477", "0.64261794", "0.64251506", "0.6421463", "0.6420188", "0.64183444", "0.6412938", "0.6409109", "0.6408766", "0.64003044", "0.6397816", "0.6397576", "0.6397169", "0.63935286", "0.6392293", "0.6386897", "0.638625", "0.63741696", "0.6372653", "0.6371614", "0.6371614", "0.6371614", "0.6371614", "0.6371614", "0.6370598", "0.6370428", "0.63696873", "0.636935", "0.63681936", "0.636627", "0.6366018", "0.63557535", "0.63555664", "0.63529354", "0.6352689", "0.6348237", "0.6348237", "0.6347609", "0.63449526", "0.6340389", "0.6340389", "0.6340389", "0.6340389", "0.6340389", "0.6340389", "0.6340389", "0.6340389", "0.6340389", "0.6339613", "0.63163674", "0.6313269", "0.6310079", "0.6304798", "0.6302662", "0.6302248", "0.6301776", "0.63004625", "0.62993884", "0.62880355", "0.62835515", "0.62799543", "0.6279929", "0.6277978", "0.62658083" ]
0.0
-1
Once you get a value, you must cast according to its type.
public Object getValue() { Object o = null; if (type == "string") { o = svalue; } if (type == "int" ) { o = ivalue; } return o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkType(V value) {\n valueClass.cast(value);\n }", "Object getConvertedValue() throws ConversionException;", "protected static Object getObjectFromValue(Value value)\n {\n switch (value.getDataType())\n {\n case Boolean:\n return value.getBoolean();\n case Integer:\n return value.getInteger();\n case Long:\n return value.getLong();\n case Double:\n return value.getDouble();\n default:\n return value.getString();\n }\n }", "Object getValueFrom();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "protected <T> T convert(Object value, Class<T> type) {\r\n return typeConversionManager.convert(value, type);\r\n }", "ValueType getValue();", "public V cast(Object object) {\n return valueClass.cast(object);\n }", "protected <T> T convertForEntity(Object value, Class<T> type) {\r\n return typeConversionManager.convert(value, type);\r\n }", "org.apache.calcite.avatica.proto.Common.TypedValue getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public abstract T getValue();", "public abstract T getValue();", "public <T> T cast();", "public Type getValue() {\n Type ret = null;\n try {\n Constructor constructor = valueClass.getConstructor(new Class[] { String.class });\n ret = (Type) constructor.newInstance(data);\n } catch (Exception e) {\n throw new ClassCastException();\n }\n return ret;\n }", "public Object elConvertType(Object value);", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public T getValue();", "private static Object toJavaObject(Value value) throws RepositoryException {\n switch (value.getType()) {\n case PropertyType.DECIMAL:\n return value.getDecimal();\n case PropertyType.BINARY:\n return new LazyInputStream(value);\n case PropertyType.BOOLEAN:\n return value.getBoolean();\n case PropertyType.DATE:\n return value.getDate();\n case PropertyType.DOUBLE:\n return value.getDouble();\n case PropertyType.LONG:\n return value.getLong();\n case PropertyType.NAME: // fall through\n case PropertyType.PATH: // fall through\n case PropertyType.REFERENCE: // fall through\n case PropertyType.STRING: // fall through\n case PropertyType.UNDEFINED: // not actually expected\n default: // not actually expected\n return value.getString();\n }\n }", "Object convertDBValueToJavaValue(Object value, Class<?> javaType);", "Object value();", "public interface ValueConvertor {\n\t/**\n\t * \n\t * Convert the value of result set to JAVA type<BR>\n\t * \n\t * @param cursor\n\t * @param columnIndex\n\t * @param javaType\n\t * @return value after converting\n\t */\n\tObject convertCursorToJavaValue(Cursor cursor, int columnIndex,\n\t\t\tClass<?> javaType);\n\n\t/**\n\t * \n\t * Convert DB type to JAVA type<BR>\n\t * \n\t * @param value\n\t * @param javaType\n\t * @return value after converting\n\t */\n\tObject convertDBValueToJavaValue(Object value, Class<?> javaType);\n\n\t/**\n\t * Convert JAVA type to DB type<BR>\n\t * \n\t * @param value\n\t * @param javaType\n\t * @return value after converting\n\t */\n\tObject convertJavaValueToDBValue(Object value, Class<?> javaType);\n}", "public void Convert() {\n value = value;\n }", "public abstract ValueType getValueType();", "protected static Value getValue(Object obj)\n {\n Value v = new Value();\n\n switch(getDataTypeFromObject(obj))\n {\n case Boolean:\n return v.setBoolean((Boolean) obj);\n case Integer:\n return v.setInteger((java.lang.Integer) obj);\n case Long:\n return v.setLong((java.lang.Long) obj);\n case Double:\n return v.setDouble((java.lang.Double) obj);\n default:\n return v.setString((java.lang.String) obj);\n }\n }", "public static <T> T getValue(T value){\n return value;\n }", "public static Object convert(Object value, Class<?> clazz){\n if(clazz.equals(String.class))\n return String.valueOf(value);\n if(clazz.equals(Boolean.class) || \"Boolean\".equals(clazz.getName()))\n return Boolean.valueOf(String.valueOf(value));\n if(clazz.equals(Integer.class) || \"int\".equals(clazz.getName()))\n return NumberUtils.toInt(String.valueOf(value),0);\n if(clazz.equals(Long.class) || \"long\".equals(clazz.getName()))\n return NumberUtils.toLong(String.valueOf(value),0);\n if(clazz.equals(Double.class) || \"double\".equals(clazz.getName()))\n return NumberUtils.toDouble(String.valueOf(value),0);\n if(clazz.equals(Float.class) || \"float\".equals(clazz.getName()))\n return NumberUtils.toFloat(String.valueOf(value),0);\n if(clazz.equals(BigInteger.class))\n return NumberUtils.toInt(String.valueOf(value),0);\n if(clazz.equals(Date.class)) return new java.util.Date(((Date) value).getTime());\n return value;\n }", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "public Object convertValue(Field field) throws IllegalAccessException\n {\n if (field.getType().equals(Boolean.TYPE))\n {\n return (field.getBoolean(this) ? Boolean.TRUE : Boolean.FALSE);\n }\n if (field.getType().equals(Integer.TYPE))\n {\n return new Integer(field.getInt(this));\n }\n if (field.getType().equals(Short.TYPE))\n {\n return new Short(field.getShort(this));\n }\n if (field.getType().equals(Float.TYPE))\n {\n return new Double(field.getFloat(this));\n }\n if (field.getType().equals(Double.TYPE))\n {\n return new Double(field.getDouble(this));\n }\n //System.out.println(\"ohoh...\");\n return null; //and good luck with it :-) ...\n }", "Object readValue();", "@Nullable\n protected Object convertValueForType(MappingContext context, Object value) {\n Class<?> rawClass = context.getTypeInformation().getSafeToWriteClass();\n if (rawClass == null) {\n throw new ConfigMeMapperException(context, \"Cannot determine required type\");\n }\n\n // Step 1: check if a value transformer can perform a simple conversion\n Object result = leafValueHandler.convert(context.getTypeInformation(), value);\n if (result != null) {\n return result;\n }\n\n // Step 2: check if we have a special type like List that is handled separately\n result = handleSpecialTypes(context, value);\n if (result != null) {\n return result;\n }\n\n // Step 3: last possibility - assume it's a bean and try to map values to its structure\n return createBean(context, value);\n }", "Object convertJavaValueToDBValue(Object value, Class<?> javaType);", "protected IValue narrow(Object result){\n\t\tif(result instanceof Integer) {\n\t\t\treturn vf.integer((Integer)result);\n\t\t}\n\t\tif(result instanceof IValue) {\n\t\t\treturn (IValue) result;\n\t\t}\n\t\tif(result instanceof Thrown) {\n\t\t\t((Thrown) result).printStackTrace(stdout);\n\t\t\treturn vf.string(((Thrown) result).toString());\n\t\t}\n\t\tif(result instanceof Object[]) {\n\t\t\tIListWriter w = vf.listWriter();\n\t\t\tObject[] lst = (Object[]) result;\n\t\t\tfor(int i = 0; i < lst.length; i++){\n\t\t\t\tw.append(narrow(lst[i]));\n\t\t\t}\n\t\t\treturn w.done();\n\t\t}\n\t\tif(result == null){\n\t\t\treturn null;\n\t\t}\n\t\tthrow new InternalCompilerError(\"Cannot convert object back to IValue: \" + result);\n\t}", "public abstract Value getValue();", "public T getRawValue(){\n return mValue;\n }", "private Type get_value_type(long xx) {\n Type vt = _values.get(xx);\n assert vt!=null;\n return vt;\n }", "private static Object valueFromBytes(ByteBuffer bytes) throws JSONException{\n\t\tbyte type = bytes.get();\n\t\t//System.out.println(\"From value: \" + new Integer(type).toString());\n\t\tswitch(type){\n\t\tcase MAP_INDICATOR:\n\t\t\t//System.out.println(\"MAP!\");\n\t\t\treturn mapFromBytes(bytes);\n\t\tcase ARRAY_INDICATOR:\n\t\t\treturn arrayFromBytes(bytes);\n\t\tcase STRING_INDICATOR:\n\t\t\t//System.out.println(\"STRING!\");\n\t\t\tint length = bytes.getInt();\n\t\t\tbyte[] stringBytes = new byte[length];\n\t\t\tbytes.get(stringBytes, 0, length);\n\t\t\treturn new String(stringBytes);\n\t\tcase INTEGER_INDICATOR:\n\t\t\treturn bytes.getInt();\n\t\tcase LONG_INDICATOR:\n\t\t\treturn bytes.getLong();\n\t\tcase DOUBLE_INDICATOR:\n\t\t\treturn bytes.getDouble();\n\t\tcase FLOAT_INDICATOR:\n\t\t\treturn bytes.getFloat();\n\t\tcase BOOLEAN_INDICATOR:\n\t\t\treturn bytes.get() == 1 ? 1: 0;\n\t\tdefault:\n\t\t\tthrow new JSONException(\"Tried to decode unknown type from byte array!\");\n\t\t}\n\t\t\n\t\t\t\n\t\t\t\n\t}", "public Object getValue() { return _value; }", "IntegerValue getValueObject();", "public T value(final Object value) {\r\n\t\treturn values(value);\r\n\t}", "@NotNull\n T getValue();", "@Override\n public Object getValue()\n {\n return value;\n }", "public T getValue()\n {\n return value;\n }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "private static Object mapValueToJava(Object value) {\n if (value instanceof Map) {\n value = ((Map<?, ?>) value).toMap();\n } else if (value instanceof Sequence) {\n value = ((Sequence<?>) value).toMappedList();\n } else if (value instanceof net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) {\n value = ((net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) value).toMappedSet();\n }\n return value;\n }", "T value();", "private Object createObjectFromAttValue(final AttImpl item) {\n \n \t\tif (item.getType().equals(STRING_TYPE)) {\n \t\t\treturn item.getValue();\n \t\t} else if (item.getType().equals(INT_TYPE)) {\n \t\t\treturn new Integer(item.getValue());\n \t\t} else if (item.getType().equals(FLOAT_TYPE)) {\n \t\t\treturn new Double(item.getValue());\n \t\t} else if (item.getType().equals(BOOLEAN_TYPE)) {\n \t\t\treturn new Boolean(item.getValue());\n \t\t}\n \n \t\t// outta here\n \t\treturn null;\n \t}", "public Object getRawValue();", "E getValue();", "public T getValue() \n\t{\n\t\treturn value;\n\t}", "@Override\n public Double value(TypeOfValue value);", "public Object getTypeValueForInternalValue(String value) {\n\t\tObject r = null;\n\t\tString prefix = value.split(getValueConcatenator())[0] + getValueConcatenator();\n\t\tEntityObject eo = getEntityObject(prefix);\n\t\tif (eo!=null) {\n\t\t\tr = eo.getTypeValueForInternalValue(value);\n\t\t}\n\t\treturn r;\n\t}", "public Object getValue()\n {\n\treturn value;\n }", "protected abstract T getValue(ByteBuffer b);", "public abstract T parse(Object valueToParse, Type type);", "protected T getValue0() {\n\t\treturn value;\n\t}", "@Override\n public T getValue(T object) {\n return object;\n }", "public T getValue() {\r\n return value;\r\n }", "public <T> T readValue() {\n return readObject();\n }", "@SuppressWarnings(\"rawtypes\")\n public Object convert(Class type, String value) throws ConversionException {\n return value;\n }", "@Override\r\n\tpublic void cast() {\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public <T> T convert(Object value, Class<T> type) {\n T convert = null;\n Object toConvert = value;\n if (toConvert != null) {\n Class<?> fromType = toConvert.getClass();\n // first we check to see if we even need to do the conversion\n if ( ConstructorUtils.classAssignable(fromType, type) ) {\n // this is already equivalent so no reason to convert\n convert = (T) value;\n } else {\n // needs to be converted\n try {\n convert = convertWithConverter(toConvert, type);\n } catch (RuntimeException e) {\n throw new UnsupportedOperationException(\"Could not convert object (\"+toConvert+\") from type (\"+fromType+\") to type (\"+type+\"): \" + e.getMessage(), e);\n }\n }\n } else {\n // object is null but type requested may be primitive\n if ( ConstructorUtils.isClassPrimitive(type) ) {\n // for primitives we return the default value\n if (ConstructorUtils.getPrimitiveDefaults().containsKey(type)) {\n convert = (T) ConstructorUtils.getPrimitiveDefaults().get(type);\n }\n }\n }\n return convert;\n }", "public interface Value {\n Word asWord();\n\n int toSInt();\n\n BigInteger toBInt();\n\n short toHInt();\n\n byte toByte();\n\n double toDFlo();\n\n float toSFlo();\n\n Object toArray();\n\n Record toRecord();\n\n Clos toClos();\n\n MultiRecord toMulti();\n\n boolean toBool();\n\n char toChar();\n\n Object toPtr();\n\n Env toEnv();\n\n <T> T toJavaObj();\n\n public class U {\n static public Record toRecord(Value value) {\n if (value == null)\n return null;\n else\n return value.toRecord();\n }\n\n public static Value fromBool(boolean b) {\n return new Bool(b);\n }\n\n public static Value fromSInt(int x) {\n return new SInt(x);\n }\n\n public static Value fromArray(Object x) {\n return new Array(x);\n }\n\n public static Value fromBInt(BigInteger x) {\n return new BInt(x);\n }\n\n public static Value fromPtr(Object o) {\n return new Ptr(o);\n }\n\n public static Value fromSFlo(float o) {\n return new SFlo(o);\n }\n\n public static Value fromDFlo(double o) {\n return new DFlo(o);\n }\n\n public static Value fromChar(char o) {\n return new Char(o);\n }\n\n public static Value fromByte(byte o) {\n return new Byte(o);\n }\n\n public static Value fromHInt(short o) {\n return new HInt(o);\n }\n\n\tpublic static <T> Value fromJavaObj(T obj) {\n\t return new JavaObj<T>(obj);\n\t}\n }\n}", "private TsPrimitiveType readOneValue() {\n switch (dataType) {\n case BOOLEAN:\n return new TsBoolean(valueDecoder.readBoolean(valueInputStream));\n case INT32:\n return new TsInt(valueDecoder.readInt(valueInputStream));\n case INT64:\n return new TsLong(valueDecoder.readLong(valueInputStream));\n case FLOAT:\n return new TsFloat(valueDecoder.readFloat(valueInputStream));\n case DOUBLE:\n return new TsDouble(valueDecoder.readDouble(valueInputStream));\n case TEXT:\n return new TsBinary(valueDecoder.readBinary(valueInputStream));\n default:\n break;\n }\n throw new UnSupportedDataTypeException(\"Unsupported data type :\" + dataType);\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "Object transform(String cellValue, Type toValueType) throws Throwable;", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public T getValue() {\n return value;\n }", "public Object getValue() { return this.value; }", "@SuppressWarnings(\"boxing\")\r\n private static Object toType(String propertyName, String value, Class<?> type) throws HorizonDBException {\r\n\r\n try {\r\n\r\n if (int.class.equals(type)) {\r\n\r\n return Integer.parseInt(value);\r\n }\r\n\r\n if (long.class.equals(type)) {\r\n\r\n return Long.parseLong(value);\r\n }\r\n\r\n if (Path.class.equals(type)) {\r\n\r\n return FileSystems.getDefault().getPath(value);\r\n }\r\n\r\n } catch (NumberFormatException e) {\r\n\r\n throw new HorizonDBException(ErrorCodes.INVALID_CONFIGURATION, \"The value: '\" + value\r\n + \"' associated to the property: \" + propertyName + \" is not a valid \" + type + \".\");\r\n }\r\n\r\n throw new IllegalStateException(\"Convertion to the type: \" + type + \" is not supported.\");\r\n }", "private static final Object getFieldValue(Field field, String value) {\r\n if (String.class == field.getType()) {\r\n // for fields of type String return value as-is\r\n return value;\r\n } else {\r\n // in all other cases try to construct an object using it's class single-arg constructor\r\n return newObjectFromString(field.getType(), value);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n public <V> V getValue() {\n return (V) this.value;\n }", "public Variable castOidType(OIDType type, String value) {\n Variable oidValue = null;\n switch (type) {\n case INTEGER32:\n oidValue = new Integer32(Integer.parseInt(value));\n break;\n case UNSIGNED32:\n oidValue = new UnsignedInteger32(Integer.parseInt(value));\n break;\n case COUNTER32:\n oidValue = new Counter32(Long.parseLong(value));\n break;\n case GAUGE32:\n oidValue = new Gauge32(Long.parseLong(value));\n break;\n case OCTETSTRING:\n oidValue = new OctetString(value);\n break;\n case BITSTRING:\n int val = Integer.parseInt(value);\n int arrayIndex = val / 8;\n byte[] buf = new byte[] { 0x00, 0x00, 0x00, 0x00 };\n buf[arrayIndex] |= 1 << (8 - (val % 8));\n OctetString oct = new OctetString();\n oct.append(buf);\n oidValue = new OctetString(oct);\n break;\n default:\n break;\n }\n return oidValue;\n }", "protected Object valueTranslator(Object value){\n\t\treturn value;\n\t}", "Object decodeObject(Object value);", "public T getValue() {\n return value;\n }", "protected static Object createValue(Class type)\n {\n Object rv = null;\n\n if (type.isPrimitive()) {\n if (type == Boolean.TYPE)\n rv = new Boolean(false);\n \n else if (type == Byte.TYPE)\n rv = new Byte((byte)0);\n \n else if (type == Character.TYPE)\n rv = new Character((char)0);\n \n else if (type == Short.TYPE)\n rv = new Short((short)0);\n \n else if (type == Integer.TYPE)\n rv = new Integer(0);\n \n else if (type == Long.TYPE)\n rv = new Long(0);\n \n else if (type == Float.TYPE)\n rv = new Float(0);\n \n else if (type == Double.TYPE)\n rv = new Double(0);\n \n else if (type == Void.TYPE)\n rv = null;\n \n else \n throw new Error(\"unreachable\");\n }\n\n return rv;\n }" ]
[ "0.729279", "0.7227671", "0.716856", "0.6913159", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.6880405", "0.687034", "0.6853095", "0.6835196", "0.6787815", "0.6783976", "0.6771586", "0.6771586", "0.6771586", "0.6764844", "0.6764844", "0.6764844", "0.6764844", "0.6764844", "0.6764844", "0.6698504", "0.6698504", "0.6698504", "0.6698504", "0.6698504", "0.6696733", "0.6696733", "0.6696156", "0.66659105", "0.6656965", "0.6631962", "0.66248727", "0.6603877", "0.6574455", "0.6536077", "0.6527666", "0.6510116", "0.65027744", "0.6485057", "0.6478728", "0.64654803", "0.6458838", "0.6458838", "0.6458838", "0.64544344", "0.64316505", "0.64162177", "0.6411171", "0.6409299", "0.6373847", "0.6363813", "0.63622403", "0.6347883", "0.6337393", "0.6333869", "0.6318764", "0.6306098", "0.629552", "0.6286925", "0.6264228", "0.6248236", "0.62358576", "0.6208733", "0.619759", "0.619686", "0.61885065", "0.6186451", "0.6172404", "0.61708796", "0.6168361", "0.6153871", "0.61217743", "0.61133456", "0.61071515", "0.609118", "0.6081046", "0.60630643", "0.6050631", "0.6049403", "0.6044232", "0.6039056", "0.6037951", "0.60279614", "0.60279614", "0.60279614", "0.60279614", "0.6010525", "0.5996891", "0.59957576", "0.59944886", "0.59653455", "0.59598553", "0.5959614", "0.595594", "0.59521365" ]
0.7369529
0
0: Ok 1: Variable ya declarada del mismo tipo 2: Variable declarada de distinto tipo
public int addVar(String name, Value value) { for (int i = 0; i < table.size(); i++) { if (table.get(i).getName().compareTo(name) == 0 && table.get(i).getType().equals(value.getType())) return 1; if (table.get(i).getName().compareTo(name) == 0 && !(table.get(i).getType().equals(value.getType()))) return 2; } table.add(new OurSymbol(name, value)); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public TipoBase check(TipoBase tipo) throws Exception {\n Clase c = analizadorsintactico.AnalizadorSintactico.getTs().getClase(tipo.getNombre());\n String nombreVar = id.getLexema();\n VarInstancia v;\n\n if (tipo.getNombre().equals(\"int\") || tipo.getNombre().equals(\"boolean\") || tipo.getNombre().equals(\"char\") || tipo.getNombre().equals(\"String\")) {\n throw new Exception(\"La variable \" + id.getLexema() + \" en la linea \" + id.getLineNumber() + \" no puede llamar metodos ya que es de tipo primitivo\");\n }\n if (c == null) {\n throw new Exception(\"Se trata de acceder a un metodo void en la linea \" + id.getLineNumber());\n }\n\n if (cadena == null) {\n\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n if (this.ladoIzq) {\n GenCode.gen().write(\"SWAP\");\n GenCode.gen().write(\"STOREREF \" + v.getOffset() + \" # Guardo el valor en la variable \" + v.getNombre());\n\n } else {\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n }\n\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n\n return v.getTipoVar();\n } else { //con encadenado\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n Tipo aux = v.getTipoVar();\n\n return cadena.check(aux);\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n }\n }", "public void leerVariable(String nombre, Dato variable);", "public void Tarifa(String tipoTarifa){\n Tarifa = tipoTarifa;\n Regular = \"R\";\n Comercial = \"C\";\n\n }", "public static void main(String[] args){\r\n String saludar = \"Hola Mundo desde Java\";\r\n System.out.println(saludar);\r\n System.out.println(\"saludar.toUpperCase(Locale.ROOT) = \" + saludar.toUpperCase(Locale.ROOT));\r\n\r\n Integer numero = 11;\r\n\r\n\r\n boolean valor = true;\r\n Integer numero2 = 5;\r\n if(valor){\r\n System.out.println(\"numero = \" + numero);\r\n numero2 = 10;\r\n }\r\n System.out.println(\"numero2 = \" + numero2);\r\n\r\n var numero3 = \"15\";\r\n\r\n String nombre;\r\n\r\n nombre = \"Juan\";\r\n\r\n if(numero >10){\r\n nombre = \"Andres\";\r\n }\r\n\r\n System.out.println(\"nombre = \" + nombre);\r\n\r\n System.out.println();\r\n\r\n }", "static int type_of_ret(String passed){\n\t\treturn 1;\n\t}", "public void tipoDatos() {\n\t\tint num = 10;\n\t\t// Texto STring\n\t\tString cadena = \"cadena\";\n\n\t\t// Decimale O flotante\n\t\tdouble decimal = 12.16;\n\t\tfloat fl = new Float(10);\n\t\t// Bolean\n\t\tboolean bl = true;\n\n\t\t// ARREGLOS\n\t\t// string\n\t\tString[] veString = new String[5];\n\t\tveString[0] = \"hola mundo\";\n\t\tveString[1] = \"hola mundo\";\n\t\tveString[2] = \"hola mundo\";\n\t\tveString[3] = \"hola mundo\";\n\t\tveString[4] = \"hola mundo\";\n\n\t\tint[] varNum = new int[] { 0, 1, 2, 3, 4, 5 };\n\n\t}", "static int type_of_ani(String passed){\n\t\treturn 1;\n\t}", "public void setTipo(String x){\r\n tipo = x;\r\n }", "public void Crear() {\r\n String ret = \"\";\r\n String NombreClase = this.generic.getClass().getSimpleName();\r\n ret += \"public static \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\\n\";\r\n System.out.println(\"public static \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\");\r\n int NumVariables = this.generic.getClass().getSuperclass().getDeclaredFields().length;\r\n int NumVariables2 = this.generic.getClass().getDeclaredFields().length;\r\n Field[] SuperDeclaredFields = this.generic.getClass().getSuperclass().getDeclaredFields();\r\n Field[] DeclaredFields = this.generic.getClass().getDeclaredFields();\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = true;\r\n String Tipo = SuperDeclaredFields[i].getType().getSimpleName();\r\n String Dato = SuperDeclaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Integer.parseInt(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Double.parseDouble(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n for (int i = 0; i < NumVariables2; i++) {\r\n boolean notParseable = true;\r\n String Tipo = DeclaredFields[i].getType().getSimpleName();\r\n String Dato = DeclaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Integer.parseInt(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Double.parseDouble(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n\r\n System.out.print(NombreClase + \" c = new \" + NombreClase + \"(\");\r\n /*\r\n -------------OJO----------------------\r\n Aqui no pude hacer que tirara los valores que queria en el orden que es, si alguien quiere Arreglarlo, digame.\r\n En la parte que es: \r\n \r\n NombreClase c = new NombreClase();\r\n \r\n Poner Ctrl+Space y enter en medio de los parentesis y Netbeans Automaticamente hace el que tiene mas sentido\r\n --------------------------------------\r\n */\r\n /*System.out.print(\"Serie, \");\r\n for (int i = 0;i<NumVariables;i++) {\r\n System.out.print(Variables.get(i)+\", \");\r\n }*/\r\n System.out.println(\");\");\r\n System.out.println(\"return c;\");\r\n System.out.println(\"}\");\r\n System.out.println(\"\");\r\n }", "static int type_of_jpo(String passed){\n\t\treturn 1;\n\t}", "boolean getVarReturn();", "private void sumarEdificio(int tipo){\n int cantActual;\n //Buscar tipo\n switch(tipo){\n case vg.CHOZA:\n cantActual = Integer.parseInt(jTextFieldChoza.getText());\n jTextFieldChoza.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAMPAMENTO:\n cantActual = Integer.parseInt(jTextFieldCampamento.getText());\n jTextFieldCampamento.setText(String.valueOf(cantActual+1));\n break;\n case vg.CUARTEL:\n cantActual = Integer.parseInt(jTextFieldCuartel.getText());\n jTextFieldCuartel.setText(String.valueOf(cantActual+1));\n break;\n case vg.MINA:\n cantActual = Integer.parseInt(jTextFieldMina.getText());\n jTextFieldMina.setText(String.valueOf(cantActual+1));\n break;\n case vg.RECOLECTOR:\n cantActual = Integer.parseInt(jTextFieldRecolector.getText());\n jTextFieldRecolector.setText(String.valueOf(cantActual+1));\n break;\n case vg.TORRE:\n cantActual = Integer.parseInt(jTextFieldTorre.getText());\n jTextFieldTorre.setText(String.valueOf(cantActual+1));\n break;\n case vg.CAÑON:\n cantActual = Integer.parseInt(jTextFieldCañon.getText());\n jTextFieldCañon.setText(String.valueOf(cantActual+1));\n break;\n case vg.MORTERO:\n cantActual = Integer.parseInt(jTextFieldMortero.getText());\n jTextFieldMortero.setText(String.valueOf(cantActual+1));\n break;\n default:\n break;\n }\n }", "private void checkValue(Variable toBeVariable) throws MethodCallWithNonexistentParameter {\n if (!toBeVariable.hasValue()) {\n throw new MethodCallWithNonexistentParameter();\n }\n }", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "public int getTipoAtaque(){return tipoAtaque;}", "static int type_of_adi(String passed){\n\t\treturn 1;\n\t}", "public int getMsgType(){\r\n return localMsgType;\r\n }", "static int type_of_jpe(String passed){\n\t\treturn 1;\n\t}", "static int type_of_rc(String passed){\n\t\treturn 1;\n\t}", "public static void main(String args[]) {\n int variableEntera = 10;\n System.out.println(variableEntera);\n //Cambio de valor de una Variable\n variableEntera = 5;\n System.out.println(variableEntera);\n \n String variableCadena = \"Saludos\";\n System.out.println(variableCadena);\n \n variableCadena = \"Adios\";\n System.out.println(variableCadena);\n \n //var hace inferencias de tipos en Java\n \n var variableEntera2 = 15;\n System.out.println(variableEntera2);\n \n var variableCadena2 = \"Nueva Cadena\";\n System.out.println(\"miVariableCadena2 = \" + variableCadena2);\n \n }", "static int type_of_out(String passed){\n\t\treturn 1;\n\t}", "@Test\n\tpublic void typeCheckTest(){\n\t\tSystem.out.println(\"kenta\");\n\t\tSemanticActions actions = new SemanticActions();\n\t\tVariableEntry idInt = new VariableEntry(\"v1\", TokenType.INTEGER);\n\t\tVariableEntry idReal = new VariableEntry(\"v2\", TokenType.REAL);\n\t\tVariableEntry idInt2 = new VariableEntry(\"v3\", TokenType.INTEGER);\n\t\tVariableEntry idReal2 = new VariableEntry(\"v4\", TokenType.REAL);\n\t\tVariableEntry error = new VariableEntry(\"v5\", TokenType.ADDOP);\n\t\tassertTrue(actions.typeCheck(idInt, idInt2) == 0);\n\t\tassertTrue(actions.typeCheck(idReal, idReal2) == 1);\n\t\tassertTrue(actions.typeCheck(idReal, idInt2) == 2);\n\t\tassertTrue(actions.typeCheck(idInt, idReal) == 3);\n\t\tassertTrue(actions.typeCheck(idReal, error) == 4);\n\t\tassertTrue(actions.typeCheck(error, idInt) == 4);\n\t}", "java.lang.String getVarValue();", "@Override\n\tpublic void initialisation_type_exercice() {\n\t\tthis.setEnnonce_exo(\"Ecrire un algorithme qui demande deux nombres à l’utilisateur et l’informe ensuite si le produit est négatif ou positif (on inclut cette fois le traitement du cas où le produit peut être nul). Attention toutefois, on ne doit pas calculer le produit !\");\n\n\t}", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public void Metodo1(String valor1){\r\n\r\n }", "private void sumarTropa(int tipo){\n int cantActual;\n //Buscar tipo\n switch(tipo){\n case vg.BARBARO:\n cantActual = Integer.parseInt(jTextFieldBarbaro.getText());\n jTextFieldBarbaro.setText(String.valueOf(cantActual+1));\n break;\n case vg.ARQUERA:\n cantActual = Integer.parseInt(jTextFieldArquera.getText());\n jTextFieldArquera.setText(String.valueOf(cantActual+1));\n break;\n case vg.GIGANTE:\n cantActual = Integer.parseInt(jTextFieldGigante.getText());\n jTextFieldGigante.setText(String.valueOf(cantActual+1));\n break;\n case vg.DUENDE:\n cantActual = Integer.parseInt(jTextFieldDuende.getText());\n jTextFieldDuende.setText(String.valueOf(cantActual+1));\n break;\n }\n }", "static int type_of_sta(String passed){\n\t\treturn 1;\n\t}", "final public void varcall() throws ParseException {\n jj_consume_token(VARIABLE);\n if(userVals.get(token.image)==null) {\n {if (true) throw new ParseException(\"La variable no ha sido definida.\");}\n }\n }", "Variable createVariable();", "Variable createVariable();", "public Var_Act_Data(Action_Type type, Variable v1, Variable v2, int set_value) {\r\n super(type);\r\n var1 = v1;\r\n var2 = v2;\r\n set_val = set_value;\r\n }", "public void introducirhora(){\n int horadespertar; \n }", "public static String validarinfo(String message, String tipo) {\n\n //Variable para capturar Info por consola\n String infoval;\n\n Scanner in = new Scanner(System.in);\n\n System.out.println(message);\n infoval = in.nextLine();\n\n switch (tipo){\n case \"N\":\n while (!isNumeric(infoval)) {\n System.out.println(message);\n infoval = in.nextLine();\n }\n break;\n\n case \"A\":\n break;\n }\n return infoval;\n }", "static int type_of_rpo(String passed){\n\t\treturn 1;\n\t}", "static int type_of_rp(String passed){\n\t\treturn 1;\n\t}", "public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }", "boolean hasVarValue();", "int getResponseTypeValue();", "String getVariable();", "static int type_of_sui(String passed){\n\t\treturn 1;\n\t}", "public int cuantosParrafos() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas estrofas quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "void mo9948a(Status cVar);", "public int readProblemType() {\n\t\t\t\t\tSystem.out.printf(\"What type of arithmetic problem do you want to study:\\n 1:+ \\n 2:* \\n 3:- \\n 4:/ \\n 5:Random \");\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tj = resp.nextInt();\n\t\t\t\t\tswitch (j) {\n\t\t case 1: j = 1; \n\t\t break;\n\t\t case 2: j = 2;\n\t\t break;\n\t\t case 3: j = 3;\n\t\t break;\n\t\t case 4: j = 4;\n\t\t break;\n\t\t case 5: j= 5;\n\t\t \t\tbreak;}\n\t\t return j;\n\t\t\t\t\t\n\t}", "public static ParameterExpression variable(Class type) { throw Extensions.todo(); }", "public void CrearGrafico() {\r\n String ret = \"\";\r\n String NombreClase = this.generic.getClass().getSimpleName();\r\n ret += \"public \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\\n\";\r\n System.out.println(\"public static \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\");\r\n Field[] declaredFields = this.DeclaredFields;\r\n int NumVariables = this.DeclaredFields.length;\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = false;\r\n String Tipo = declaredFields[i].getType().getSimpleName();\r\n String Dato = declaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"(int) \" + this.SpinnerName + this.NumSpinners + \".getValue();\");\r\n NumSpinners++;\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"Double.parseDouble(\" + this.getDoubleTextFieldName() + \".getText()\" + \")\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(this.StrTextFieldName + \".getText();\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n NumVariables = this.SuperDeclaredFields.length;\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = false;\r\n String Tipo = this.SuperDeclaredFields[i].getType().getSimpleName();\r\n String Dato = this.SuperDeclaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"(int) \" + this.SpinnerName + this.NumSpinners + \".getValue();\");\r\n NumSpinners++;\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"Double.parseDouble(\" + this.getDoubleTextFieldName() + \".getText()\" + \");\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(this.StrTextFieldName + \".getText();\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n\r\n System.out.print(NombreClase + \" c = new \" + NombreClase + \"(\");\r\n /*\r\n -------------OJO----------------------\r\n Aqui no pude hacer que tirara los valores que queria en el orden que es, si alguien quiere Arreglarlo, digame.\r\n En la parte que es: \r\n \r\n NombreClase c = new NombreClase();\r\n \r\n Poner Ctrl+Space y enter en medio de los parentesis y Netbeans Automaticamente hace el que tiene mas sentido\r\n --------------------------------------\r\n */\r\n System.out.println(\");\");\r\n System.out.println(\"return c;\");\r\n System.out.println(\"}\");\r\n System.out.println(\"\");\r\n }", "protected void method_6196(class_1583 var1) {\r\n super.method_6196(var1);\r\n String[] var10002 = field_5882;\r\n this.field_5880 = var1.method_8681(\"Type\");\r\n }", "public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }", "static int type_of_xri(String passed){\n\t\treturn 1;\n\t}", "protected void method_6194(class_1583 var1) {\r\n super.method_6194(var1);\r\n String[] var10001 = field_5882;\r\n var1.method_8667(\"Type\", this.field_5880);\r\n }", "static int type_of_rpe(String passed){\n\t\treturn 1;\n\t}", "@Test\n public void obtenerTipoRespuesta_NB(){\n NumberBoxRecrea nbRecrea=new NumberBoxRecrea();\n String texto=Util.RESPUESTA_TIPO_NUMERO;\n assertEquals(texto,contCons.ObtenerTipoRespuesta(nbRecrea));\n }", "abstract void checkWhetherVariable(SyntaxUnit use);", "public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }", "public Variables() {\n this.numCliente = 0;\n this.tiempoSalida = 999;\n }", "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();", "private ExplorationTypes(int type_val) \n { \n this.type_val = type_val; \n }", "static int type_of_jm(String passed){\n\t\treturn 1;\n\t}", "static int type_of_cmc(String passed){\n\t\treturn 1;\n\t}", "static int type_of_cpi(String passed){\n\t\treturn 1;\n\t}", "@Override\n \tpublic void logVarCreated(String name, String type) {\n \t\tSystem.out.println(\"\\tVariable created: [\" + type + \"] \" + name );\n \t}", "public String getVariable();", "String getVarDeclare();", "public static void main(String args[]){\n\t\t\t\tbyte variableByte = 126;\n\t\t\t\tshort variableShort = 32767;\n\t\t\t\tint variableInt = 214778;\n\t\t\t\tlong variableLong = 3454656;\n\t\t\t\tchar variableChar = 'a';\n\n\t\t\t\tSystem.out.println(\"Este es una variable byte: \\n\" + variableByte);\n\t\t\t\tSystem.out.println(\"Este es una variable short: \\n\" + variableShort);\n\t\t\t\tSystem.out.println(\"Este es una variable int: \\n\" + variableInt);\n\t\t\t\tSystem.out.println(\"Este es una variable long: \\n\" + variableLong);\n\n\t\t\t\tSystem.out.println(\"La primer letra es \" + variableChar);\n \n\t\t\t//Tipos Boolean \n\t\t\t\tboolean isActive = false ; \n\t\t\t\tSystem.out.println(\"Boolean solo tiene dos valores , tales como true and : \" + isActive);\n\n\n\t\t\t//Tipos REALES \n\n\t\t\t\tfloat variableFlotante = 3.1415f;\n\n\t\t\t\tSystem.out.println(\"Este es un flotante \" + variableFlotante );\n\n\t\t\t\tdouble variableDouble = 343434.234333333;\t\n\t\t\t\tSystem.out.println(\"Este es un double : \" + variableDouble);\t\t\n\n\t}", "public int cuantosRenglones() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas renglones quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "@Override\n public Boolean visitDeclaration(FormScriptGrammarParser.DeclarationContext ctx) {\n DataType dataType = DataType.valueOf(ctx.type.getText());\n if (declaredVariables.get(ctx.name.getText()) != null) { // if variable already declared\n throw new IllegalArgumentException(\"Error at line: \" + ctx.name.getLine() + \":\" + ctx.name.getCharPositionInLine()\n + \" variable \" + ctx.name.getText() + \" was already previously declared!\");\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n declaredVariables.put(ctx.name.getText(), dataType);\n return true;\n }", "private String[] Asignacion(String texto) {\n String[] retorno = new String[2];\n try {\n retorno = texto.split(\"=\");\n if (retorno.length == 2) {\n if (retorno[0].toLowerCase().contains(\"int\")) {\n if (retorno[0].contains(\"int\")) {\n if (retorno[0].startsWith(\"int\")) {\n String aux[] = retorno[0].split(\"int\");\n if (aux.length == 2) {\n retorno[0] = \"1\";//aceptacion\n retorno[1] = aux[1];//nombre variable\n } else {\n retorno[0] = \"0\";//error\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n } else {\n retorno[0] = \"0\";//error\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"se encuentra mal escrito el int.\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se encontro la palabra reservada int.\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n } catch (Exception e) {\n System.out.println(\"Error en Asignacion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "public int getTamanio(){\r\n return tamanio;\r\n }", "public void onParaTypeChangeByVar(int i) {\n }", "public void setMsgType(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n \r\n if (param==java.lang.Integer.MIN_VALUE) {\r\n localMsgTypeTracker = false;\r\n \r\n } else {\r\n localMsgTypeTracker = true;\r\n }\r\n \r\n this.localMsgType=param;\r\n \r\n\r\n }", "public TIPO tipoDeU(int op, TIPO tipo){\r\n\t\tif(tipo == TIPO.err|| (tipo == TIPO.real && op == opNot))\r\n\t\t\treturn TIPO.err;\r\n\t\telse if( op == opCastInt) return TIPO.ent;\r\n\t\telse if( op == opCastReal) return TIPO.real;\r\n\t\telse return tipo;\r\n\t}", "static int type_of_aci(String passed){\n\t\treturn 1;\n\t}", "public String isVar(Exp e) {\n if (e instanceof EId) {\n return ((EId) e).id_;\n } else\n throw new TypeException(\"Expected variable but found: \" + e);\n }", "@Test\n public void getType() {\n System.out.println(\"getType\");\n BBDParameterMetaData instance = new BBDParameterMetaData(1,\"test\",2);\n int expResult = 2;\n int result = instance.getType();\n assertEquals(expResult, result);\n }", "public void afficherVariables() {\n System.out.println\r\n (\"Objet de type GrillePain avec variables d'instance année = \" +\r\n annee + \" et nbTranches = \" + nbTranches);\r\n }", "VariableDeclarationWithInitCS getResultVariable();", "public interface ValueRequired {\r\n\t/**\r\n\t * Richiede all'utente di inserire un valore e ne verifica la validità in base al campo\r\n\t * @param ctx il contesto su cui si deve operare\r\n\t * @param field campo su cui verificare la validità del dato\r\n\t * @param message richiesta all'utente di inserire il dato\r\n\t * @return Oggetto correttamente elaborato in base al campo\r\n\t */\r\n\tpublic default Object acceptValue(Context ctx, FieldHeading field, String message) {\r\n\t\tboolean valid = false;\r\n\t\tObject obj = null;\r\n\t\tdo {\r\n\t\t\tString value = ctx.getIOStream().read(\"\\t\" + message);\r\n\t\t\tif(!field.isBinding() && !field.isOptional() && value.isEmpty())\r\n\t\t\t\tvalid = true;\r\n\t\t\tctx.getIOStream().write(StringConstant.NEW_LINE);\r\n\t\t\tif(field.getClassType().isValidType(value)) {\r\n\t\t\t\tobj = field.getClassType().parse(value);\r\n\t\t\t\tvalid = true;\r\n\t\t\t}\r\n\t\t\tif(!valid)\r\n\t\t\t\tctx.getIOStream().writeln(\"\\tIl valore inserito non è corretto.\\n\\tInserisca qualcosa del tipo: \" + field.getClassType().getSyntax());\r\n\t\t}while(!valid);\r\n\t\treturn obj;\r\n\t}\r\n}", "static int type_of_cm(String passed){\n\t\treturn 1;\n\t}", "private void verificaData() {\n\t\t\n\t}", "private void getExecutionVariablen(DelegateExecution execution) {\r\n\t\texecution.setVariable(\"Erhoehung\", true);\r\n\r\n\t\tanrede = (String) execution.getVariable(\"Anrede\");\r\n\t\tvorname = (String) execution.getVariable(\"VornameHauptmieter\");\r\n\t\tnachname = (String) execution.getVariable(\"NachnameHauptmieter\");\r\n\t\ttoEmail = (String) execution.getVariable(\"E-Mail\");\r\n\t\tmieterhoehung = (Double) execution.getVariable(\"relevanteMieterhoehung\");\r\n\t}", "public int getTipo() {\r\n return tipo;\r\n }", "static int type_of_dad(String passed){\n\t\treturn 1;\n\t}", "public ExceptionParamJeu(error type){\r\n\t\tthis.explication = type;\r\n\t}", "static int type_of_rm(String passed){\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n// System.out.println(\"Run!Run!Run!!!!\");\n byte byteVar1; // its best to form a habbit to create names with meaning. creation of var\n// variable declaration\n byteVar1 = 35; // byteVar1 get information\n byteVar1 = 12; // change var.\n byte byteVar2 = 10;\n byte byteVar3, byteVar4;\n byte byteVar5 = 10, byteVar6 = 12;\n short shortVar = -155;\n int intVar = 312;\n int intVar2 = 1_000_123_000;\n long longVar = -3000000L; // only for long\n float floatVar = 5.7f;\n double doubleVar = 2.367;\n\n // char (2 bytes)\n // symbol nomber in unikod table\n\n boolean booleanVar = true;\n booleanVar = false;\n\n // Type merging.(Приведение типов)\n byte someByte = 10;\n int someInt = someByte; // variable someInt war created and then feelde with 10\n someInt = 200;\n// someByte = someInt; doesnot wark.\n // явное приведение!\n someByte = (byte) someInt;\n\n int a = 10;\n int b = 91;\n int c = b % a;\n// System.out.println(c + \" variable c\");\n short x = 56;\n short y = 397;\n// short z = x%y; result of all operations wth byte and short is always int!!!!!!!!!\n int res = x + y;\n long res2 = x / y;\n short rezTr = (short) (x + y);\n int n =100;\n double m =200.6;\n// int zeroDiv =n/0;\n// double zeroDivD = m/0;\n// System.out.println(\"Integer \"+zeroDiv);\n// System.out.println(\"Integer \"+zeroDivD);\n someByte =3;\n someByte =(byte) (someByte*7);\n someByte *=7; // the same. take somebyte multiply by 7 the assignment its comfortoble but troublemaking\n\n someInt =10;\n someInt = someInt +20;\n someInt +=20;\n //var =(condition) ? -> if true :if false\n\n int k =25;\n int l = 8;\n int wrk = 256;\n int res234 = ((wrk%2) == 0) ? wrk/2: wrk*2;\n System.out.println( \"итого \"+res234);\n\n\n\n }", "public void setType(){\r\n if(rbtnTruncamiento.isSelected()){\r\n interpretador.setTipoValores(1);\r\n in.setTipoValores(1);\r\n }else{\r\n interpretador.setTipoValores(2);\r\n in.setTipoValores(2);\r\n }\r\n getK();\r\n }", "Var getVar();", "static int type_of_xthl(String passed){\n\t\treturn 1;\n\t}", "public String getTipo(){\r\n return tipo;\r\n }" ]
[ "0.62536234", "0.5822014", "0.5643082", "0.5639624", "0.56117123", "0.55991733", "0.55619746", "0.5546099", "0.552371", "0.5518136", "0.54768467", "0.5455371", "0.54482114", "0.5434205", "0.5430613", "0.5427975", "0.542338", "0.5389042", "0.5387107", "0.5369898", "0.5366866", "0.5365917", "0.535923", "0.53276443", "0.5322935", "0.5315153", "0.5313139", "0.531083", "0.53094107", "0.53087735", "0.53087735", "0.5265269", "0.5258993", "0.52588326", "0.525072", "0.5247615", "0.524647", "0.52438134", "0.5239756", "0.5233766", "0.52296895", "0.52283907", "0.5214942", "0.52030677", "0.52003247", "0.5193136", "0.5189456", "0.51844996", "0.5177861", "0.5175536", "0.51572007", "0.5142818", "0.51414704", "0.5137419", "0.51291895", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5126115", "0.5124002", "0.511774", "0.5116114", "0.51095855", "0.5107539", "0.5107472", "0.5106335", "0.51041204", "0.5101821", "0.5099684", "0.509781", "0.5096246", "0.5092449", "0.50908303", "0.5089904", "0.5085436", "0.50782406", "0.5074204", "0.5063638", "0.5060866", "0.5055436", "0.50550294", "0.5054592", "0.50537694", "0.50479835", "0.5035424", "0.5033279", "0.5032443", "0.50320446", "0.5030164", "0.5018692", "0.5017978", "0.50126576" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.information_view, container, false); mFillContentCallback.invoke(view); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348", "0.66202056", "0.66176945", "0.66094035", "0.65976113", "0.65937936", "0.6585841", "0.6585124", "0.65741223", "0.65721804", "0.65698904", "0.65695107", "0.6569451", "0.6568099", "0.6565633", "0.6554688", "0.65533894", "0.65447044", "0.65432465", "0.6542017", "0.65385425", "0.6537571", "0.65369105", "0.6535379", "0.6533447", "0.6533258", "0.65316767", "0.6529574", "0.6528449", "0.65262675", "0.6525467", "0.6525181", "0.6524235", "0.6523963", "0.65187466", "0.65138274", "0.65137535", "0.6513218", "0.6513202", "0.65115535", "0.651113", "0.6510943", "0.6510124", "0.65094703", "0.65082514", "0.65038425", "0.65023196", "0.6501983", "0.65014684", "0.64982104", "0.64945936", "0.6492533", "0.6491023", "0.6488248", "0.64879525", "0.6487852", "0.6487744", "0.64873713", "0.6487171", "0.64851", "0.6485003", "0.6483167", "0.6482433", "0.64824027", "0.6481711", "0.6480902", "0.64779234", "0.64767206", "0.6476515", "0.6475657", "0.64747864", "0.64715266", "0.64714354", "0.64711314", "0.6470619", "0.6468112", "0.6466466", "0.64631015", "0.646268", "0.6462456", "0.64620507" ]
0.0
-1
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException { BufferedReader file = new BufferedReader(new FileReader(args[0])); // bufferedReader.close(); Map<String, Double> map = new TreeMap<String, Double>(); String str = file.readLine(); while (str != null) { String[] lines = str.split(" "); if (!map.containsKey(lines[0])) map.put(lines[0], Double.parseDouble(lines[1])); else map.replace(lines[0], Double.parseDouble(lines[1]) + map.get(lines[0])); str = file.readLine(); } file.close(); double max = -1; for (Map.Entry<String, Double> entry : map.entrySet()) { if (max < entry.getValue()) max = entry.getValue(); } for (Map.Entry<String, Double> entry : map.entrySet()) { if (max == entry.getValue()) System.out.println(entry.getKey()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "OutputStream getStdin();", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "private String getClientInput() {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String input = null;\n try {\n input = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return input;\n }", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }", "protected String getInputFromConsole() throws IOException\n {\n BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in));\n return consoleInput.readLine();\n }", "String consoleInput();", "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "static String readEntry(String prompt) {\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while(c != '\\n' && c != -1) {\n buffer.append((char)c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "static String read ()\r\n \t{\r\n \t\tString sinput;\r\n \r\n \t\ttry\r\n \t\t{\r\n \t\t\tsinput = br.readLine();\r\n \t\t}\r\n \t\tcatch (IOException e)\r\n \t\t{\r\n \t\t\tErrorLog.addError(\"Input exception occured in command line interface!\");\r\n \t\t\treturn null; //Menu will exit when fed a null\r\n \t\t}\r\n \t\treturn sinput;\r\n \t}", "public static String le() throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String texto = reader.readLine();\n return texto;\n }", "public static String readString() {\n BufferedReader br\n = new BufferedReader(new InputStreamReader(System.in), 1);\n\n // Declare and initialize the string\n String string = \" \";\n\n // Get the string from the keyboard\n try {\n string = br.readLine();\n\n } catch (IOException ex) {\n System.out.println(ex);\n }\n\n // Return the string obtained from the keyboard\n return string;\n }", "public static void Input(){\n try{\n prepareReader();\n String linea=\"\";\n while((linea = br.readLine()) != null){\n System.out.println(linea);\n }\n br.close();\n System.out.println(\"-------------------------------------------------\");\n }catch (Exception e){\n System.err.println(\"Error al leer del buffer\");\n }\n }", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "public static void main(String[] args) {\n\n\t\tInputStreamReader rd= new InputStreamReader(System.in);\n\t\ttry {\n\t\t\tSystem.out.println(\"enter a number\");\n\t\t\tint value=rd.read();\n\t\t\tSystem.out.println(\"you entered:-\"+(char)value);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "String getCommand(){\n\t\tString command=\"\";\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tcommand = br.readLine();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Somethinf went wrong with the system input!! Please try again.\");\n\t\t}\n\t\treturn command;\n\t}", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }", "public static String getString() throws IOException\n {\n InputStreamReader input=new InputStreamReader(System.in);\n BufferedReader b=new BufferedReader(input);\n String str=b.readLine();//reading the string from console\n return str;\n }", "public static String readLine(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.nextLine();\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "String getInput();", "public String getInput() throws IOException {\n\t\tSystem.out.print(\">> \");\n\t\treturn consoleIn.readLine();\n\t}", "protected String readLine()\n { try { if (stdin!=null) return stdin.readLine(); } catch (IOException e) {}\n return null;\n }", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}", "String getUserInput();", "String getLine ();", "public static void main(String[] args) throws Exception {\n DataInputStream br = new DataInputStream(System.in);\n System.out.println(\"Enter the Name\");\n String str = br.readLine();\n System.out.println(\"Str value:\" + str);\n }", "public static String getString() throws IOException {\r\n InputStreamReader isr = new InputStreamReader(System.in);\r\n BufferedReader br = new BufferedReader(isr);\r\n String s = br.readLine();\r\n return s;\r\n }", "public static String acceptString() {\n\t\tString stringData = null;\r\n\t\tBufferedReader input = null;\r\n\t\ttry {\r\n\t\t\t// chaining the streams\r\n\t\t\tinput = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\t\t// reading data from the reader\r\n\t\t\tstringData = input.readLine();\r\n\t\t} catch (IOException ioException) {\r\n\t\t\tSystem.out.println(\"Error in accepting data.\");\r\n\t\t} finally {\r\n\t\t\tinput = null;\r\n\t\t}\r\n\t\treturn stringData;\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tReader in = new InputStreamReader(System.in);\n\t\tint data = 0;\n\t\twhile((data=in.read()) != -1) {\n\t\t\tSystem.out.print((char)data);\n\t\t}\n\t\t//f가나다라마바사아자차가카\n\t}", "@Test\n public void testMain() {\n String simulatedUserInput = \"100AUD\" + System.getProperty(\"line.separator\")\n + \"1\" + System.getProperty(\"line.separator\");\n\n InputStream savedStandardInputStream = System.in;\n System.setIn(new ByteArrayInputStream(simulatedUserInput.getBytes()));\n\n mainFunction mainfunc = new mainFunction();\n\n try {\n mainfunc.start();\n } catch(Exception e) {\n System.out.println(\"Exception!\");\n }\n\n assertEquals(1,1);\n }", "public static void inputFlush() {\n int dummy;\n int bAvail;\n\n try {\n while ((System.in.available()) != 0)\n dummy = System.in.read();\n } catch (java.io.IOException e) {\n System.out.println(\"Input error\");\n }\n }", "public static void main(String[] args) {\n\t\tint bt;\n\t\ttry {\t\t\t\t\t\t\t\t\t//이거 실행해 ~\n\t\t\tbt = System.in.read();\n\t\t\tSystem.out.println(bt);\t\t\t\t//int 값으로 출력(아스키코드)\n\t\t\tSystem.out.println((char)bt);\t\t//char 값으로 출력\n\t\t} catch (IOException e) {\t\t\t\t//이런 에러가 발생했을 때 너가 잡아서 해결해 ~\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\nScanner sc= new Scanner(System.in);\nString name=sc.nextLine();\n\t\tSystem.out.println(\"hello\\n\"+name);\n\t\t\n\t}", "static void DanrleiMethod() {\n\n int input1, input2, multiply;\n\n try {\n BufferedReader myKB = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Please enter a number\");\n input1 = Integer.parseInt(myKB.readLine());\n\n System.out.println(\"Please enter another number\");\n input2 = Integer.parseInt(myKB.readLine());\n multiply = input1 * input2;\n\n System.out.println(input1 + \" multiplied by \" + input2 + \" is \" + multiply);\n\n } catch (Exception e) {\n System.out.println(\"Invalid input, please enter only numbers\");\n\n }\n\n }", "private static String receiveInput(String message) {\n BufferedReader buffyTheVampireSlayer = new BufferedReader(new InputStreamReader(System.in));\n try {\n System.out.printf(\"%s: \", message);\n return buffyTheVampireSlayer.readLine();\n } catch (IOException e) {\n System.out.println(e);\n System.out.println(\"an unexpected error occured\");\n return null;\n }\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "public static String getString() throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String s = br.readLine();\n return s;\n }", "public static String readLine(String format, Object... args) throws IOException {\n\t\tif (System.console() != null) {\n\t\t\treturn System.console().readLine(format, args);\n\t\t}\n\t\tlogger.info(String.format(format, args));\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\treturn reader.readLine();\n\t}", "public static String readLine()\n\t{\n\t\tif (bJunit == true)\n\t\t{\n\t\t\tsLastLine = sJunitInput;\n\t\t\twriteLine(\"JUnit INPUT: \" + sJunitInput);\n\t\t\treturn sLastLine;\n\t\t}\n\t\n\t\ttry {\n\t\t\tsLastLine = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading from STDIN\");\n\t\t}\n\t\t\n\t\treturn sLastLine;\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\r\n System.out.println(\"Introduce un numero: \");\r\n int n = Integer.parseInt(br.readLine());\r\n\r\n System.out.println(fiborepe(n));\r\n System.out.println(fiboite(n));\r\n\r\n }", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t}", "@Override\n public int read() throws IOException {\n int c;\n\n do {\n c = System.in.read();\n } while(c != -1 && (c == '\\n' || c == '\\r'));\n\n return c;\n }", "public static void main(String[] args) {\n\t\tBufferedReader keyboardReader = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry {\n\t\t\tString input;\n\t\t\tdo {\n\t\t\t\tinput = keyboardReader.readLine();\n\t\t\t\tSystem.out.println(\"Your input is:**\"+input+\"**\");\n\t\t\t} while (input.length() > 0);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException occured...\");\n\t\t}\n\n//\t\tConsole c = System.console();\n//\t\tif (c == null) {\n//\t\t\tSystem.err.println(\"No console.\");\n//\t\t\tSystem.exit(1);\n//\t\t}\n//\n//\t\tString login = c.readLine(\"Enter your login: \");\n//\t\tSystem.out.println(\"login is :**\" + login+\"**\");\n\t}", "public static void main(String[] args) throws IOException{\n char c;\r\n do{\r\n c = (char)System.in.read();\r\n System.out.println(\"c: \"+c);\r\n }while(c!='.');\r\n //2 method: int read(byte data[]) & int read(byte data[],int min, int max)\r\n// byte data[] = new byte[10];// input char translated into byte numbers\r\n// System.out.println(\"nhap cac ki tu: \");\r\n// //System.in.read(data);\r\n// System.in.read(data,0,3);// read chars [0;3)\r\n// System.out.println(\"cac ki tu vua nhap\");\r\n// for(int i=0;i<data.length;i++)\r\n// System.out.println((char)data[i]);// empty positions filled with 0/empty space\r\n }", "public CLI(BufferedReader in, Writer out) {\n\t\t_in = in;\n\t\t_out = out;\n\t}", "public void accept(){\n\t\ttry{\n\t\t\tBufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString message;\n\t\t\twhile (true){\n\t\t\t\tmessage = fromConsole.readLine();\n\t\t\t\tthis.handleMessage(message);\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exception){\n\t\t\tSystem.out.println\n\t\t\t(\"Unexpected error while reading from console!\");\n\t\t}\n\t}", "public abstract String inReadLine() throws JVMIOException;", "public static String bufferScanner() throws IOException\n\t{\n\treturn br.readLine();\n\t}", "public FastqReader(BufferedReader in)\n\t{\n\t\ttheBufferedReader = in;\n\t}", "void requestInput();", "public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }", "public void takeUserInput() {\n\t\t\r\n\t}", "public String getInput(String message) throws IOException {\n\t\tSystem.out.print(\">> \"+message+\" \");\n\t\treturn consoleIn.readLine();\n\t}", "String getUserInput(String prompt) {\r\n System.out.print(prompt);\r\n try {\r\n return rdr.readLine();\r\n }\r\n catch (IOException ex) {\r\n return null;\r\n }\r\n }", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "public static void main(String[] args) throws IOException {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\n\t\tSystem.out.println(\"Enter Your name Please\");\n\t\tString myName = br.readLine();\n\t\tSystem.out.println(\"Welcome \" + myName);\n\t\tSystem.out.println(\"Enter your age: \");\n\t\tint age = Integer.parseInt(br.readLine());\n\t\tSystem.out.println(\"Your age is \" + age);\n\n\t}", "public String readStringFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your String:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString string = null;\t\t\r\n\t\tstring = br.readLine();\r\n\t\treturn string;\r\n\t}", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "private static String readInput(){\n\t\ttry {\n\t\t\tInput = br.readLine();\n\t\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tSystem.out.println(\"IO error trying to read your name!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn Input;\n\t}", "private static String readLine() {\r\n String input=\"\";\r\n try {\r\n input = in.readLine();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return input;\r\n }", "String getLine();", "public static BufferedReader get(Reader in) {\n if(in == null || in instanceof BufferedReader) {\n return (BufferedReader)in;\n }\n return new BufferedReader(in);\n }", "public static String readConsole(){\r\n\t\tString number = new String(\"\");\r\n\t\t\r\n\t\tSystem.out.println(\"Bitte geben Sie eine Zahl ein!\");\r\n\t\tBufferedReader bufferOne = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\ttry {\r\n\t\t\tnumber = bufferOne.readLine();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn number;\r\n\t}", "public static void main(String[] args)\r\n\t\tthrows IOException\r\n\t{\n\t\tBufferedReader reader = new BufferedReader(\r\n\t\t\tnew InputStreamReader(System.in));\r\n\r\n\t\t// Reading data using readLine\r\n\t\tString name = reader.readLine();\r\n\r\n\t\t// Printing the read line\r\n\t\tSystem.out.println(name);\r\n\t}", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public static void main(String[] args) {\n\t\t\n\t\tInputStream input = System.in;\n\t\tScanner scanner = new Scanner(input);\n\t\t// nextLine()을 실행하기 전에 \n\t\t// 무엇을 해야할지 알려주는 메시지를 먼저 출력 하라.\n\t\t// 이를 'prompt(프롬프트)' 라고 한다\n\t\tSystem.out.println(\"문자열을 입력후 Enter....\");\n\t\tString strInput = scanner.nextLine();\n\t\tSystem.out.println(strInput);\n\n\t}", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "public void doIt(Input in);", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "public static void main(String[] arg) {\n\t\tBufferedReader br = new BufferedReader(\r\n\t\t new FileReader(\"input.in\"));\r\n\r\n\t\t// PrintWriter class prints formatted representations\r\n\t\t// of objects to a text-output stream.\r\n\t\tPrintWriter pw = new PrintWriter(new\r\n\t\t BufferedWriter(new FileWriter(\"output.in\")));\r\n\r\n\t\t// Your code goes Here\r\n\r\n\t\tpw.flush();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString x = sc.nextLine();\r\n\r\n\t\tSystem.out.println(\"hello world \" + x);\r\n\t}", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "public static String inputString(String s)\n {\n if (s != null && s.length() > 0)\n {\n System.out.print(s);\n System.out.flush();\n }\n\n StringBuffer sb = new StringBuffer();\n try\n {\n InputStreamReader reader = new InputStreamReader(System.in);\n do\n {\n sb.append(new BufferedReader(reader).readLine());\n }\n while (System.in.available() > 0);\n\n return sb.toString();\n }\n catch (IOException e)\n {\n return null;\n }\n }", "public void readUserInput(){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try {\n String input = reader.readLine();\n while (!userValidation.validateUserInput(input)){\n input = reader.readLine();\n }\n elevatorController.configureNumberOfElevators(input);\n\n } catch (\n IOException e) {\n logger.error(e);\n }\n\n }", "public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public void readFromPc(String input) {\n\n }", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public File getStdin() {\n return mStdin;\n }", "public interface Input \n{\n\t/*\n\t * Use to initialise input\n\t */\n\tboolean initialise (String args);\n\t/*\n\t * Return a line or return null\n\t */\n\tString getLine ();\n\t\n}", "static String lireClavier() {\n\ttry {\n\t BufferedReader clavier =\n\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t return clavier.readLine();\n\t} catch (Exception e) {\n\t return \"erreur dans fonction lireClavier\";\n\t}\n }", "public static String readEntry(String prompt) {\n\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while (c != '\\n' && c != -1) // while not newline or EOF\n {\n buffer.append((char) c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t}", "public void readInput()\n\t{\n\t\t//wrap input stream read input from user\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader( System.in ));\n\t\t\n\t\t//prompt user for input\n\t\tSystem.out.println( \"Please enter a letter or type Quit to end.\");\n\t\t\n\t\ttry{\n\t\t\tString userGuess = in.readLine();\n\t\t\t\n\t\t\t//loop until the user types \"Quit\"\n\t\t\tdo{\n\t\t\t\t//invoke guessletter function with String input\n\t\t\t\thangmanGame.guessLetter(userGuess);\n\t\t\t\t//update currentGuessText\n\t\t\t\tcurrentGuessText = hangmanGame.getCurrentGuess();\n\t\t\t\t//trace out current guess\n\t\t\t\tSystem.out.println(\"Your current guess is: \" + currentGuessText);\n\t\t\t\t//update remainingStrikes\n\t\t\t\thangmanGame.numberOfRemainingStrikes();\n\t\t\t\t//trace out remaining number of strikes\n\t\t\t\tSystem.out.println(\"You currently have \" + hangmanGame);\n\t\t\t\t//invoke revealAnswer function to check over gameOver, gameWon, and getAnswer\n\t\t\t\trevealAnswer();\n\t\t\t}while ( userGuess != \"Quit\" );\n\t\t}\n\t\t//catch IOException ioe\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t//tell exception to print its error log\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "TclInputStream(InputStream inInput) {\n input = inInput;\n }", "public static void waitForInput() {\n BufferedReader buffyTheVampireSlayer = new BufferedReader(new InputStreamReader(System.in));\n System.out.print(\"Press Enter To Continue...\");\n try {\n buffyTheVampireSlayer.readLine();\n } catch (IOException e) {\n System.out.println(e);\n System.out.println(\"an unexpected error occurred\");\n }\n }", "private ConsoleScanner() {}", "public void processInput() {\n\n\t}" ]
[ "0.76611555", "0.7147348", "0.70271873", "0.69710845", "0.69072133", "0.68069106", "0.66859674", "0.6632048", "0.66029596", "0.65959066", "0.65581274", "0.65374255", "0.6360502", "0.6321289", "0.63028914", "0.63015115", "0.629297", "0.6292733", "0.62872094", "0.6233161", "0.6192795", "0.61884665", "0.6178539", "0.6131469", "0.6114859", "0.6114099", "0.6087908", "0.60638374", "0.60576487", "0.60554653", "0.6047884", "0.6046107", "0.6045814", "0.60398704", "0.6039075", "0.6003132", "0.5988231", "0.59720606", "0.59692526", "0.59612614", "0.5950881", "0.5914473", "0.5913824", "0.5912322", "0.59095937", "0.5908382", "0.589625", "0.5883101", "0.5880117", "0.5877828", "0.5875568", "0.5871687", "0.58672434", "0.5865782", "0.5863119", "0.58555984", "0.5849166", "0.584132", "0.582906", "0.5824479", "0.58195955", "0.5815095", "0.5806471", "0.57908547", "0.57878643", "0.57871354", "0.578573", "0.5770771", "0.5769955", "0.5768058", "0.5768058", "0.57669973", "0.5765722", "0.57577735", "0.57563794", "0.57525784", "0.5746916", "0.5736929", "0.572667", "0.5726483", "0.57227427", "0.57143223", "0.570014", "0.5694462", "0.56941646", "0.56868935", "0.56810755", "0.56721926", "0.5666033", "0.5660694", "0.5660081", "0.56547374", "0.5646964", "0.5638978", "0.56339043", "0.56254447", "0.5600686", "0.55962956", "0.5579665", "0.556252", "0.55508214" ]
0.0
-1
Constructors Create a detached ServiceOrderRecord
public ServiceOrderRecord() { super(ServiceOrder.SERVICE_ORDER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServiceOrderRecord(Integer orderId, Integer storeId, String orderSn, Integer userId, Byte orderStatus, String orderStatusName, String subscriber, String mobile, Integer serviceId, Integer technicianId, String technicianName, String serviceDate, String servicePeriod, String addMessage, String adminMessage, String verifyCode, String verifyAdmin, String payCode, String payName, String paySn, BigDecimal moneyPaid, BigDecimal discount, Integer couponId, BigDecimal orderAmount, Timestamp payTime, Timestamp cancelledTime, Timestamp finishedTime, String prepayId, Byte delFlag, Byte verifyType, String cancelReason, Byte type, Byte verifyPay, String aliTradeNo, Timestamp createTime, Timestamp updateTime, String memberCardNo, BigDecimal memberCardBalance, BigDecimal useAccount) {\n super(ServiceOrder.SERVICE_ORDER);\n\n set(0, orderId);\n set(1, storeId);\n set(2, orderSn);\n set(3, userId);\n set(4, orderStatus);\n set(5, orderStatusName);\n set(6, subscriber);\n set(7, mobile);\n set(8, serviceId);\n set(9, technicianId);\n set(10, technicianName);\n set(11, serviceDate);\n set(12, servicePeriod);\n set(13, addMessage);\n set(14, adminMessage);\n set(15, verifyCode);\n set(16, verifyAdmin);\n set(17, payCode);\n set(18, payName);\n set(19, paySn);\n set(20, moneyPaid);\n set(21, discount);\n set(22, couponId);\n set(23, orderAmount);\n set(24, payTime);\n set(25, cancelledTime);\n set(26, finishedTime);\n set(27, prepayId);\n set(28, delFlag);\n set(29, verifyType);\n set(30, cancelReason);\n set(31, type);\n set(32, verifyPay);\n set(33, aliTradeNo);\n set(34, createTime);\n set(35, updateTime);\n set(36, memberCardNo);\n set(37, memberCardBalance);\n set(38, useAccount);\n }", "OrderDTO create(OrderDTO orderDTO);", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "public Order() {\n orderID = \"\";\n customerID = \"\";\n status = \"\";\n }", "public Order() {\n\t}", "public Order() {\n }", "void create(Order order);", "public OrderLogRecord() {\n super(OrderLog.ORDER_LOG);\n }", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "public OrderLine() {\n }", "public Order(Builder builder) {\r\n this.id = builder.id;\r\n this.orderDate = builder.orderDate;\r\n //this.orderLine = builder.orderLine;\r\n }", "public OrderInventedRecord(Integer id, String orderSn, Integer sellerId, Integer memberId, String memberName, Byte orderState, Timestamp payTime, Byte paymentStatus, Byte invoiceStatus, String invoiceTitle, Byte invioceState, String invoiceType, BigDecimal moneyProduct, BigDecimal moneyOrder, BigDecimal moneyPaidBalance, BigDecimal moneyPaidReality, BigDecimal moneyGiftcardAmount, BigDecimal moneyCouponcode, BigDecimal moneyLowerAmount, BigDecimal moneyBack, Integer moneyIntegral, Integer lowerId, Integer giftcardId, Integer couponcodeId, String ip, String paymentName, String paymentCode, String mobile, String codeExchange, Byte isSuccess, String email, String zipCode, String remark, Timestamp finishTime, String tradeSn, String source, Byte isGiftCardOrder, Integer productCommentsId, Timestamp createTime, Timestamp updateTime) {\n super(OrderInvented.ORDER_INVENTED);\n\n set(0, id);\n set(1, orderSn);\n set(2, sellerId);\n set(3, memberId);\n set(4, memberName);\n set(5, orderState);\n set(6, payTime);\n set(7, paymentStatus);\n set(8, invoiceStatus);\n set(9, invoiceTitle);\n set(10, invioceState);\n set(11, invoiceType);\n set(12, moneyProduct);\n set(13, moneyOrder);\n set(14, moneyPaidBalance);\n set(15, moneyPaidReality);\n set(16, moneyGiftcardAmount);\n set(17, moneyCouponcode);\n set(18, moneyLowerAmount);\n set(19, moneyBack);\n set(20, moneyIntegral);\n set(21, lowerId);\n set(22, giftcardId);\n set(23, couponcodeId);\n set(24, ip);\n set(25, paymentName);\n set(26, paymentCode);\n set(27, mobile);\n set(28, codeExchange);\n set(29, isSuccess);\n set(30, email);\n set(31, zipCode);\n set(32, remark);\n set(33, finishTime);\n set(34, tradeSn);\n set(35, source);\n set(36, isGiftCardOrder);\n set(37, productCommentsId);\n set(38, createTime);\n set(39, updateTime);\n }", "public OrderItem() {}", "public TExpressOrderRecord(Integer id, Integer userId, String expressNumber, String expressCompanyName, ExpressCompanyType expressCompany, String phone, String address, String studentName, LocalDateTime accessDay, String accessNumber, OrderType orderType, String orderTypeName, String remark, LocalDateTime createTime, Integer createUser, String createUserName, LocalDateTime updateTime, Integer updateUser, String updateUserName, LocalDateTime deleteTime, Integer deleteUser, String deleteUserName, Byte enabled, LocalDateTime dataVersion) {\n super(TExpressOrder.T_EXPRESS_ORDER);\n\n set(0, id);\n set(1, userId);\n set(2, expressNumber);\n set(3, expressCompanyName);\n set(4, expressCompany);\n set(5, phone);\n set(6, address);\n set(7, studentName);\n set(8, accessDay);\n set(9, accessNumber);\n set(10, orderType);\n set(11, orderTypeName);\n set(12, remark);\n set(13, createTime);\n set(14, createUser);\n set(15, createUserName);\n set(16, updateTime);\n set(17, updateUser);\n set(18, updateUserName);\n set(19, deleteTime);\n set(20, deleteUser);\n set(21, deleteUserName);\n set(22, enabled);\n set(23, dataVersion);\n }", "protected Order(String custFName, String custLName, String custEmail, int orderID,\n Timestamp creationDate, double totalDue, String status, String salesFName,\n String salesLName,\n String salesEmail) {\n this.custFName = custFName;\n this.custLName = custLName;\n this.custEmail = custEmail;\n this.orderID = orderID;\n this.creationDate = creationDate;\n this.totalDue = totalDue;\n this.status = status;\n this.salesFName = salesFName;\n this.salesLName = salesLName;\n this.salesEmail = salesEmail;\n products = new ArrayList<>();\n }", "public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}", "public Invoice createInvoice(Order order);", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "public TAssetsDeviceRecord(Long id, Integer customerId, String orderId, Integer productId, String sn, String title, String companyName, Date startDate, Date endDate, BigDecimal deposit, BigDecimal rent, BigDecimal marketPrice, Byte status, Byte rentStatus, Integer belongId, Timestamp cdate, Timestamp mdate) {\n super(TAssetsDevice.T_ASSETS_DEVICE);\n\n set(0, id);\n set(1, customerId);\n set(2, orderId);\n set(3, productId);\n set(4, sn);\n set(5, title);\n set(6, companyName);\n set(7, startDate);\n set(8, endDate);\n set(9, deposit);\n set(10, rent);\n set(11, marketPrice);\n set(12, status);\n set(13, rentStatus);\n set(14, belongId);\n set(15, cdate);\n set(16, mdate);\n }", "@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }", "public OrderLogRecord(Integer id, Integer orderId, Byte status, Timestamp changeTime) {\n super(OrderLog.ORDER_LOG);\n\n set(0, id);\n set(1, orderId);\n set(2, status);\n set(3, changeTime);\n }", "public Order() {\n\t\tthis.orderID = DataHolder.getInstance().getLastOrderId() + 1;\n\t\tthis.dateOrdered = new Date();\n\t\tthis.dateFilled = null;\n\t\tthis.projectedDate = addDays(dateOrdered,1);\n\t}", "public TExpressOrderRecord() {\n super(TExpressOrder.T_EXPRESS_ORDER);\n }", "public SupplyOrder(SupplyOrder otherOrder){\n if(otherOrder!=null){\n this.orderID=otherOrder.getOrderID();\n this.setCustomerID(otherOrder.getCustomerID());\n this.setProductID(otherOrder.getProductID());\n this.setOrderDate(otherOrder.getOrderDate());\n this.setAmount(otherOrder.getAmount());\n }\n else{\n this.orderID=0;\n this.setCustomerID(\"\");\n this.setProductID(\"\");\n this.setOrderDate(new LocalDate());\n this.setAmount(0.0);\n }\n }", "public BaseOrder (java.lang.Long id) {\r\n\t\tthis.setId(id);\r\n\t\tinitialize();\r\n\t}", "public EmployeeRecord(){}", "public PersonRecord() {}", "public ServiceRecordDisk(final ServiceRecordDisk o)\r\n { \r\n this.records = o.records;\r\n this.recordsByMemberNum = o.recordsByMemberNum;\r\n this.recordsByProviderNum = o.recordsByProviderNum;\r\n }", "public UserOrder() {\n }", "NewOrderResponse newOrder(NewOrder order);", "public Order() {\n this(DSL.name(\"order\"), null);\n }", "public OrderInventedRecord() {\n super(OrderInvented.ORDER_INVENTED);\n }", "public OrderLine() {\n products = new ArrayList<>();\n price = new BigDecimal(0);\n }", "ServiceOrder(String carVIN, String serviceDesc, String serviceDate, String partsUsed, int techID, int dealershipID, double partsCost, double totalCost, double laborHours){\n serviceNumber++;\n this.serviceDate = serviceDate;\n this.carVIN = carVIN;\n this.serviceDesc = serviceDesc;\n this.partsUsed = partsUsed;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.partsCost = partsCost;\n this.totalCost = totalCost;\n this.laborHours = laborHours;\n }", "public TradeRecordStruct() {\n }", "public OrderOffered() {\r\n }", "public RecordService() {\n super(\"RecordService\");\n }", "private ExchangeRecord(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public Order() {\n\t\tsuper();\n\t\titems = new HashMap<>();\n\t}", "public FlightOrder(Flight flight, Order order) {\n\t\tsuper();\n\t\tthis.flight = flight;\n\t\tthis.order = order;\n\t\tthis.tickets = new HashSet<FlightTicket>();\n\t}", "public TaskOrder(TaskOrderDetails details){\n\t\tthis.details = details;\n\t}", "public Order(String deliveryAddress, String customerName, double orderTotalPrice, String id,\n String description, String customerTelephone, String comment, String pharmacyId, Date date, String userToken) {\n this.deliveryAddress = deliveryAddress;\n this.customerName = customerName;\n this.orderStatus = OrderStatus.WAITING_ORDER;\n this.orderTotalPrice = orderTotalPrice;\n this.description = description;\n this.id = id;\n this.customerTelephone = customerTelephone;\n this.pharmacyId = pharmacyId;\n this.comment = comment;\n this.date = new Date(date.getTime());\n this.userToken = userToken;\n }", "private Order convertOrderElemeToOrderObj04(ISqlAdapter adapter, String orderId) throws HitspException {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n DataTable dtOrderEleme = getOrderElemeInfo(adapter, orderId);\r\n if (dtOrderEleme == null || dtOrderEleme.size() == 0) {\r\n return null;\r\n }\r\n\r\n Order order = new Order();\r\n if (!Converter.toBoolean(dtOrderEleme.get(0, \"book\"))) {\r\n //若该订单非预订单\r\n order.setDeliverTime(null);\r\n } else {\r\n //若该订单为预订单\r\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+8\"));\r\n// Date b = formatter.parse(a);\r\n// order.setDeliverTime(Converter.toDate(dtOrderEleme.get(0, \"deliverTime\")));\r\n try {\r\n order.setDeliverTime(formatter.parse(dtOrderEleme.get(0, \"deliverTime\")));\r\n } catch (ParseException e) {\r\n logger.error(\"预计送达时间处理错误\");\r\n }\r\n }\r\n order.setOrderId(dtOrderEleme.get(0, \"orderId\"));\r\n order.setId(Converter.toLong(orderId));\r\n\r\n String udate = dtOrderEleme.get(0, \"activeAt\");\r\n String cdate = dtOrderEleme.get(0, \"createdAt\");\r\n try {\r\n Date uDate = df.parse(udate);\r\n Date cDate = df.parse(cdate);\r\n order.setGmtCreate(cDate);\r\n order.setGmtModify(uDate);\r\n } catch (ParseException e) {\r\n logger.error(\"下单时间处理错误\");\r\n }\r\n\r\n order.setOrderFrom(\"15\");\r\n order.setTotalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"totalPrice\")));\r\n order.setOriginalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"originalPrice\")));\r\n order.setStatus(\"0\");\r\n String elemeShopId = dtOrderEleme.get(0, \"shopId\");\r\n DataTable dtShop = getShopInfoByElemeShopId(adapter, elemeShopId);\r\n if (dtShop == null || dtShop.size() == 0) {\r\n logger.error(\"饿了么({})门店不存在\", elemeShopId);\r\n return null;\r\n }\r\n\r\n order.setShopId(dtShop.get(0, \"id\"));\r\n order.setShopName(dtShop.get(0, \"name\"));\r\n// order.setShopAddress(dtOrderEleme.get(0, \"address\"));\r\n order.setShopAddress(\"\");//饿了么推送订单中无门店地址,暂置为空\r\n order.setShopPhone(null);\r\n order.setRecipientName(dtOrderEleme.get(0, \"consignee\"));\r\n order.setRecipientAddress(dtOrderEleme.get(0, \"deliveryPoiAddress\"));\r\n\r\n StringBuilder phones = new StringBuilder();\r\n JSONArray phoneList = JSON.parseArray(dtOrderEleme.get(0, \"phoneList\"));\r\n if (phoneList != null) {\r\n for (int i = 0; i < phoneList.size(); i++) {\r\n String phone = phoneList.getString(i);\r\n if (i != 0) {\r\n phones.append(\";\");\r\n }\r\n phones.append(phone);\r\n }\r\n }\r\n order.setRecipientPhone(phones.toString());\r\n\r\n order.setRecipientLongitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[0]));\r\n order.setRecipientLatitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[1]));\r\n order.setShippingType(\"10\");\r\n order.setShippingFee(dtOrderEleme.get(0, \"deliverFee\") == null ? BigDecimal.valueOf(0) : Converter.toBigDecimal(dtOrderEleme.get(0, \"deliverFee\")));\r\n order.setShipperName(null);\r\n order.setShipperPhone(null);\r\n order.setHasInvoiced(Converter.toBoolean(dtOrderEleme.get(0, \"invoiced\")));\r\n order.setInvoiceTitle(dtOrderEleme.get(0, \"invoice\"));\r\n order.setPackageFee(Converter.toBigDecimal(dtOrderEleme.get(0, \"packageFee\")));\r\n order.setPayType(Converter.toBoolean(dtOrderEleme.get(0, \"onlinePaid\")) == false ? \"1\" : \"2\");\r\n order.setCaution(dtOrderEleme.get(0, \"description\"));\r\n order.setRemark(\"\");\r\n BigDecimal shopPart = Converter.toBigDecimal(dtOrderEleme.get(0, \"shopPart\"));\r\n if (shopPart.signum() == -1) {\r\n shopPart = shopPart.abs();\r\n }\r\n order.setShopPart(shopPart);\r\n order.setShopIncome(Converter.toBigDecimal(dtOrderEleme.get(0, \"income\")));\r\n BigDecimal serviceFee = Converter.toBigDecimal(dtOrderEleme.get(0, \"serviceFee\"));\r\n if (serviceFee.signum() == -1) {\r\n serviceFee = serviceFee.abs();\r\n }\r\n order.setServiceFee(serviceFee);\r\n// List<OrderDetail> detailList = convertOrderElemeToOrderDetailList(adapter, dtOrderEleme);\r\n List<OrderDetail> detailList = convertOrderElemeToOrderDetailList04(adapter, dtOrderEleme, dtShop.get(0, \"id\"));\r\n order.setDetail(detailList);\r\n return order;\r\n }", "public void create(Order order) {\n order_dao.create(order);\n }", "public Order(long price, long quantity, long seqNo) {\n this.price = price;\n this.quantity = quantity;\n this.seqNo = seqNo;\n }", "public Order(Long order_id, boolean generateNumber) {\n this.order_id = order_id;\n if (generateNumber) {\n this.order_no = this.generateOrderNumber();\n }\n }", "public Order(String orderID, String tireID, String status) {\n this.orderID = orderID;\n this.customerID = tireID;\n this.status = status;\n }", "@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public SalesOrder(/* all fields*/\n\t\t\tLong docNo, String customerPO, String docType,\n\t\t\tString recordStatus, String sessionId, String createLogin,\n\t\t\tString createApp, Timestamp createTimestamp,\n\t\t\tString modifyLogin, String modifyApp, Timestamp modifyTimestamp) {\n\t\tthis(docNo,customerPO,docType);\n\t\t//super();\n\t\t\n\t\t/* Example of assignment\n\t\tthis.id = id;\n\t\tthis.type = type;\n\t\tthis.description = description;\n\t\t*/\n\n\n\t\tthis.rowInfo.setRecordStatus(recordStatus);\n\t\tthis.rowInfo.setSessionId(sessionId);\n\t\tthis.rowInfo.setCreateLogin(createLogin);\n\t\tthis.rowInfo.setCreateApp(createApp);\n\t\t//this.rowInfo.setCreateDate(createDate);\n\t\tthis.rowInfo.setCreateTimestamp(createTimestamp);\n\t\tthis.rowInfo.setModifyLogin(modifyLogin);\n\t\tthis.rowInfo.setModifyApp(modifyApp);\n\t\t//this.rowInfo.setModifyDate(modifyDate);\n\t\tthis.rowInfo.setModifyTimestamp(modifyTimestamp);\n\t}", "@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}", "public Order(int orderID, int customerID, Date orderDate) {\n this(orderID, customerID, orderDate, null);\n }", "ServiceOrder(String carVIN, int techID, int dealershipID, String serviceDate){\n serviceNumber++;\n this.carVIN = carVIN;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.serviceDate = serviceDate;\n this.serviceDesc = \"None\";\n this.partsUsed = \"None\";\n this.partsCost = 0;\n this.totalCost = 0;\n this.laborHours = 0;\n }", "@Override\n @Transactional\n public OrderDTO createOrder(OrderDTO orderDTO) {\n\n String orderId = KeyUtil.genUniqueKey();\n BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO);\n// List<CartDTO> cartDTOList = new ArrayList<>();\n //1.\n for (OrderDetail orderDetail : orderDTO.getOrderDetailList()) {\n ProductInfo productInfo = productInfoService.findOne(orderDetail.getProductId());\n if (productInfo == null) {\n throw new ProjectException(ResultEnum.PRODUCT_NOT_EXIST);\n }\n\n //2.\n orderAmount = productInfo.getProductPrice()\n .multiply(new BigDecimal(orderDetail.getProductQuantity()))\n .add(orderAmount);\n //3. orderDetail db insertion\n orderDetail.setDetailId(KeyUtil.genUniqueKey());\n orderDetail.setOrderId(orderId);\n BeanUtils.copyProperties(productInfo, orderDetail);\n orderDetailRepository.save(orderDetail);\n// CartDTO cartDTO = new CartDTO(orderDetail.getProductId(), orderDetail.getProductQuantity());\n// cartDTOList.add(cartDTO);\n }\n\n //3. orderMaster\n OrderMaster orderMaster = new OrderMaster();\n orderDTO.setOrderId(orderId);\n BeanUtils.copyProperties(orderDTO, orderMaster);\n orderMaster.setOrderAmount(orderAmount);\n orderMaster.setOrderStatus(OrderStatusEnum.NEW.getCode());\n orderMaster.setPayStatus(PayStatusEnum.WAIT.getCode());\n orderMasterRepository.save(orderMaster);\n\n //4.\n List<CartDTO> cartDTOList = orderDTO.getOrderDetailList().stream().map(e ->\n new CartDTO(e.getProductId(), e.getProductQuantity())\n ).collect(Collectors.toList());\n\n productInfoService.decreaseInventory(cartDTOList);\n\n return orderDTO;\n }", "private Order(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public void startOrder() {\r\n this.o= new Order();\r\n }", "public BaseOrder (\r\n\t\tjava.lang.Long id,\r\n\t\tcom.jspgou.core.entity.Website website,\r\n\t\tcom.jspgou.cms.entity.ShopMember member,\r\n\t\tcom.jspgou.cms.entity.Payment payment,\r\n\t\tcom.jspgou.cms.entity.Shipping shipping,\r\n\t\tcom.jspgou.cms.entity.Shipping shopDirectory,\r\n\t\tlong code,\r\n\t\tjava.lang.String ip,\r\n\t\tjava.util.Date createTime,\r\n\t\tjava.util.Date lastModified,\r\n\t\tjava.lang.Double total,\r\n\t\tjava.lang.Integer score,\r\n\t\tjava.lang.Double weight) {\r\n\r\n\t\tthis.setId(id);\r\n\t\tthis.setWebsite(website);\r\n\t\tthis.setMember(member);\r\n\t\tthis.setPayment(payment);\r\n\t\tthis.setShipping(shipping);\r\n\t\t\r\n\t\tthis.setCode(code);\r\n\t\tthis.setIp(ip);\r\n\t\tthis.setCreateTime(createTime);\r\n\t\tthis.setLastModified(lastModified);\r\n\t\tthis.setTotal(total);\r\n\t\tthis.setScore(score);\r\n\t\tthis.setWeight(weight);\r\n\t\tinitialize();\r\n\t}", "public PurchaseRequestAttachment() {\r\n }", "ResponseDTO createPurchase(PurchaseOrderDTO purchaseOrderDTO) throws ApiException, IOException;", "public Orders(int ordersId) {\r\n this.ordersId = ordersId;\r\n }", "public PaymentDetailPojo() {\n }", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public PointRecord(){\n \n }", "public Order(int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = 0;\r\n\t\torderTotal = 0;\r\n\t}", "public ClientDetailsEntity() {\n\t\t\n\t}", "public void create(Order order) {\n\t\torderDao.create(order);\n\t}", "private OrderPayment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public CommAreaRecord() {\n\t}", "public Order(int orderID, int userID, String orderDate, String orderTitle) {\n this.order_id = orderID;\n this.user_id = userID;\n this.order_date = orderDate;\n this.order_title = orderTitle;\n }", "public PaymentmethodRecord() {\n super(Paymentmethod.PAYMENTMETHOD);\n }", "public Order(Long price, Long volume, Direction direction, Long traderId, Long instrumentId) {\n\t\tthis.id = (long) 0;\n\t\tthis.price = price;\n\t\tthis.volume = volume;\n\t\tthis.date = Calendar.getInstance();\n\t\tthis.direction = direction;\n\t\tthis.traderId = traderId;\n\t\tthis.instrumentId = instrumentId;\n\t}", "public MOrder( Properties ctx,int C_Order_ID,String trxName ) {\n super( ctx,C_Order_ID,trxName );\n\n // New\n\n if( C_Order_ID == 0 ) {\n setDocStatus( DOCSTATUS_Drafted );\n setDocAction( DOCACTION_Prepare );\n\n //\n\n setDeliveryRule( DELIVERYRULE_Availability );\n setFreightCostRule( FREIGHTCOSTRULE_FreightIncluded );\n setInvoiceRule( INVOICERULE_Immediate );\n setPaymentRule( PAYMENTRULE_OnCredit );\n setPriorityRule( PRIORITYRULE_Medium );\n setDeliveryViaRule( DELIVERYVIARULE_Pickup );\n\n //\n\n setIsDiscountPrinted( false );\n setIsSelected( false );\n setIsTaxIncluded( false );\n setIsSOTrx( true );\n setIsDropShip( false );\n setSendEMail( false );\n\n //\n\n setIsApproved( false );\n setIsPrinted( false );\n setIsCreditApproved( false );\n setIsDelivered( false );\n setIsInvoiced( false );\n setIsTransferred( false );\n setIsSelfService( false );\n\n //\n\n super.setProcessed( false );\n setProcessing( false );\n setPosted( false );\n setDateOrdered(Env.getTimestamp());\n setDateAcct(getDateOrdered());\n setDatePromised(getDateOrdered());\n setFreightAmt( Env.ZERO );\n setChargeAmt( Env.ZERO );\n setTotalLines( Env.ZERO );\n setGrandTotal( Env.ZERO );\n }\n }", "public PaymentRecordKey(String recordId, String ordersId, String buildDay) {\n this.recordId = recordId;\n this.ordersId = ordersId;\n this.buildDay = buildDay;\n }", "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "public Order(int ordID, int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = ordID;\r\n\t\torderTotal = 0;\r\n\t}", "public PaymentRecordKey() {\n super();\n }", "public Order create(Order order) {\n\t\tthis.orderRepository.save(order);\n\t\tfor (Product product : order.getProducts()) {\n\t\t\tproduct.setOrder(order);\n\t\t\tthis.productService.create(product);\n\t\t}\n\t\treturn order;\n\t}", "private OrderKey(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "public SupplyOrder(String newCustomerID, String newProductID, LocalDate newOrderDate, double newAmount){\n this.orderID=SupplyOrder.nextOrderID;\n nextOrderID++;\n\n //populating class fields using class methods\n this.setCustomerID(newCustomerID);\n this.setProductID(newProductID);\n this.setOrderDate(newOrderDate);\n this.setAmount(newAmount);\n }", "public SalesRecords() {\n super();\n }", "@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public CharacterPartyRecord() {\n super(CharacterParty.CHARACTER_PARTY);\n }", "public OrderResource() {\n om = new OrderMapper(emf);\n rm = new RoomMapper(emf);\n um = new UserMapper(emf);\n }", "public OrderImpl(int id, int clientID, LocalDateTime date, PriorityType priorityType, WorkType workType) {\n this.id = id;\n this.clientID = clientID;\n this.date = date;\n this.priorityType = priorityType;\n this.workType = workType;\n }", "public OrderTransactionManagedBean() \n {\n orders = new ArrayList<>();\n lineItems = new ArrayList<>();\n }", "@JsonCreator\n public Order(@JsonProperty(\"datetime\") LocalDateTime dateTime, @JsonProperty(\"customer\") Person customer,\n @JsonProperty(\"dishQuantityList\") List<Pair<Dish, Integer>> dishQuantityList,\n @JsonProperty(\"state\") State state) {\n this.dateTime = dateTime;\n this.customer = customer;\n this.dishQuantityList = dishQuantityList;\n this.state = state;\n }", "public Invoice createInvoice(Order order) {\n\t\treturn new Invoice(order);\n\t}", "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "public GenericTcalRecord() {\n this(-1);\n }", "public XXONGbwShippedOrdersAMImpl() {\n }", "public PurchaseDto() {}", "public MessageRecord() {\n super(Message.MESSAGE);\n }", "Order addOrder(String orderId, Order order) throws OrderBookOrderException;", "@Override\n\tpublic boolean doCreate(Orders vo) throws Exception\n\t{\n\t\treturn false;\n\t}", "public BookRecord() {\n super(Book.BOOK);\n }", "@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}", "public DoctorRecord(Integer id, Integer age, Integer workTime, Byte sex, String name, String url, Byte duty, String hospitalCode, String certificateCode, String professionalCode, Date registerTime, String registerHospital, String mobile, Integer titleId, BigDecimal consultationPrice, String treatDisease, Byte status, Integer userId, Byte isDelete, Timestamp createTime, Timestamp updateTime, Timestamp onDutyTime, Byte isOnDuty, Byte canConsultation, Integer avgAnswerTime, Integer consultationNumber, BigDecimal avgCommentStar, Integer attentionNumber, String userToken, Timestamp authTime, BigDecimal consultationTotalMoney, Byte isFetch, String signature) {\n super(Doctor.DOCTOR);\n\n set(0, id);\n set(1, age);\n set(2, workTime);\n set(3, sex);\n set(4, name);\n set(5, url);\n set(6, duty);\n set(7, hospitalCode);\n set(8, certificateCode);\n set(9, professionalCode);\n set(10, registerTime);\n set(11, registerHospital);\n set(12, mobile);\n set(13, titleId);\n set(14, consultationPrice);\n set(15, treatDisease);\n set(16, status);\n set(17, userId);\n set(18, isDelete);\n set(19, createTime);\n set(20, updateTime);\n set(21, onDutyTime);\n set(22, isOnDuty);\n set(23, canConsultation);\n set(24, avgAnswerTime);\n set(25, consultationNumber);\n set(26, avgCommentStar);\n set(27, attentionNumber);\n set(28, userToken);\n set(29, authTime);\n set(30, consultationTotalMoney);\n set(31, isFetch);\n set(32, signature);\n }", "public StudentRecord() {}", "public SalesRecord() {\n super(Sales.SALES);\n }", "public Order()\r\n\t{\r\n\t\tnew BigDecimal(\"0.0\");\r\n\t\tsubtotal = new BigDecimal(\"0.0\");\r\n\t\tarraySize = 5;\r\n\t\torderSize = 0;\r\n\t\torder = new Drink[arraySize];\r\n\t\tSystem.out.println(\"New Order started!\");\r\n\t}" ]
[ "0.7206498", "0.6534806", "0.63389105", "0.6236075", "0.6232758", "0.6192375", "0.61440223", "0.6121575", "0.6117131", "0.60784674", "0.6034556", "0.59895253", "0.5953442", "0.5891796", "0.5843763", "0.5781666", "0.57265115", "0.57065344", "0.5683994", "0.5681999", "0.5679006", "0.56785846", "0.56776017", "0.56583476", "0.5629757", "0.5616556", "0.56158286", "0.5595309", "0.5577014", "0.55621326", "0.55537575", "0.555237", "0.5549995", "0.5547039", "0.5542293", "0.5540258", "0.55231935", "0.5519498", "0.551141", "0.54970676", "0.5495939", "0.5486454", "0.54802597", "0.5468604", "0.54665023", "0.5438216", "0.54147625", "0.54039526", "0.53747624", "0.53746575", "0.536061", "0.5338193", "0.5338187", "0.5327802", "0.5315179", "0.5292907", "0.52704453", "0.5264227", "0.5259325", "0.524821", "0.5245039", "0.5241902", "0.5230394", "0.52163625", "0.52035755", "0.52014816", "0.5193427", "0.5190133", "0.51880014", "0.51848394", "0.51744777", "0.5174116", "0.51687545", "0.5167306", "0.51588225", "0.5157105", "0.5148241", "0.51470923", "0.51446086", "0.51384276", "0.5133666", "0.5133549", "0.5132934", "0.51312375", "0.5124367", "0.51233387", "0.5100172", "0.50961816", "0.50943434", "0.5080203", "0.5077764", "0.5076458", "0.5073723", "0.5071766", "0.5066593", "0.5065186", "0.5059858", "0.5056113", "0.50550413", "0.5051391" ]
0.7602935
0
Create a detached, initialised ServiceOrderRecord
public ServiceOrderRecord(Integer orderId, Integer storeId, String orderSn, Integer userId, Byte orderStatus, String orderStatusName, String subscriber, String mobile, Integer serviceId, Integer technicianId, String technicianName, String serviceDate, String servicePeriod, String addMessage, String adminMessage, String verifyCode, String verifyAdmin, String payCode, String payName, String paySn, BigDecimal moneyPaid, BigDecimal discount, Integer couponId, BigDecimal orderAmount, Timestamp payTime, Timestamp cancelledTime, Timestamp finishedTime, String prepayId, Byte delFlag, Byte verifyType, String cancelReason, Byte type, Byte verifyPay, String aliTradeNo, Timestamp createTime, Timestamp updateTime, String memberCardNo, BigDecimal memberCardBalance, BigDecimal useAccount) { super(ServiceOrder.SERVICE_ORDER); set(0, orderId); set(1, storeId); set(2, orderSn); set(3, userId); set(4, orderStatus); set(5, orderStatusName); set(6, subscriber); set(7, mobile); set(8, serviceId); set(9, technicianId); set(10, technicianName); set(11, serviceDate); set(12, servicePeriod); set(13, addMessage); set(14, adminMessage); set(15, verifyCode); set(16, verifyAdmin); set(17, payCode); set(18, payName); set(19, paySn); set(20, moneyPaid); set(21, discount); set(22, couponId); set(23, orderAmount); set(24, payTime); set(25, cancelledTime); set(26, finishedTime); set(27, prepayId); set(28, delFlag); set(29, verifyType); set(30, cancelReason); set(31, type); set(32, verifyPay); set(33, aliTradeNo); set(34, createTime); set(35, updateTime); set(36, memberCardNo); set(37, memberCardBalance); set(38, useAccount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServiceOrderRecord() {\n super(ServiceOrder.SERVICE_ORDER);\n }", "void create(Order order);", "OrderDTO create(OrderDTO orderDTO);", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }", "public Order() {\n orderID = \"\";\n customerID = \"\";\n status = \"\";\n }", "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "public OrderInventedRecord(Integer id, String orderSn, Integer sellerId, Integer memberId, String memberName, Byte orderState, Timestamp payTime, Byte paymentStatus, Byte invoiceStatus, String invoiceTitle, Byte invioceState, String invoiceType, BigDecimal moneyProduct, BigDecimal moneyOrder, BigDecimal moneyPaidBalance, BigDecimal moneyPaidReality, BigDecimal moneyGiftcardAmount, BigDecimal moneyCouponcode, BigDecimal moneyLowerAmount, BigDecimal moneyBack, Integer moneyIntegral, Integer lowerId, Integer giftcardId, Integer couponcodeId, String ip, String paymentName, String paymentCode, String mobile, String codeExchange, Byte isSuccess, String email, String zipCode, String remark, Timestamp finishTime, String tradeSn, String source, Byte isGiftCardOrder, Integer productCommentsId, Timestamp createTime, Timestamp updateTime) {\n super(OrderInvented.ORDER_INVENTED);\n\n set(0, id);\n set(1, orderSn);\n set(2, sellerId);\n set(3, memberId);\n set(4, memberName);\n set(5, orderState);\n set(6, payTime);\n set(7, paymentStatus);\n set(8, invoiceStatus);\n set(9, invoiceTitle);\n set(10, invioceState);\n set(11, invoiceType);\n set(12, moneyProduct);\n set(13, moneyOrder);\n set(14, moneyPaidBalance);\n set(15, moneyPaidReality);\n set(16, moneyGiftcardAmount);\n set(17, moneyCouponcode);\n set(18, moneyLowerAmount);\n set(19, moneyBack);\n set(20, moneyIntegral);\n set(21, lowerId);\n set(22, giftcardId);\n set(23, couponcodeId);\n set(24, ip);\n set(25, paymentName);\n set(26, paymentCode);\n set(27, mobile);\n set(28, codeExchange);\n set(29, isSuccess);\n set(30, email);\n set(31, zipCode);\n set(32, remark);\n set(33, finishTime);\n set(34, tradeSn);\n set(35, source);\n set(36, isGiftCardOrder);\n set(37, productCommentsId);\n set(38, createTime);\n set(39, updateTime);\n }", "public OrderLogRecord() {\n super(OrderLog.ORDER_LOG);\n }", "public Invoice createInvoice(Order order);", "public void create(Order order) {\n order_dao.create(order);\n }", "public Order() {\n\t}", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "public void startOrder() {\r\n this.o= new Order();\r\n }", "@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public Order() {\n }", "public Order(Builder builder) {\r\n this.id = builder.id;\r\n this.orderDate = builder.orderDate;\r\n //this.orderLine = builder.orderLine;\r\n }", "public void create(Order order) {\n\t\torderDao.create(order);\n\t}", "public Order() {\n\t\tthis.orderID = DataHolder.getInstance().getLastOrderId() + 1;\n\t\tthis.dateOrdered = new Date();\n\t\tthis.dateFilled = null;\n\t\tthis.projectedDate = addDays(dateOrdered,1);\n\t}", "public OrderItem() {}", "public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}", "private Order convertOrderElemeToOrderObj04(ISqlAdapter adapter, String orderId) throws HitspException {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n DataTable dtOrderEleme = getOrderElemeInfo(adapter, orderId);\r\n if (dtOrderEleme == null || dtOrderEleme.size() == 0) {\r\n return null;\r\n }\r\n\r\n Order order = new Order();\r\n if (!Converter.toBoolean(dtOrderEleme.get(0, \"book\"))) {\r\n //若该订单非预订单\r\n order.setDeliverTime(null);\r\n } else {\r\n //若该订单为预订单\r\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+8\"));\r\n// Date b = formatter.parse(a);\r\n// order.setDeliverTime(Converter.toDate(dtOrderEleme.get(0, \"deliverTime\")));\r\n try {\r\n order.setDeliverTime(formatter.parse(dtOrderEleme.get(0, \"deliverTime\")));\r\n } catch (ParseException e) {\r\n logger.error(\"预计送达时间处理错误\");\r\n }\r\n }\r\n order.setOrderId(dtOrderEleme.get(0, \"orderId\"));\r\n order.setId(Converter.toLong(orderId));\r\n\r\n String udate = dtOrderEleme.get(0, \"activeAt\");\r\n String cdate = dtOrderEleme.get(0, \"createdAt\");\r\n try {\r\n Date uDate = df.parse(udate);\r\n Date cDate = df.parse(cdate);\r\n order.setGmtCreate(cDate);\r\n order.setGmtModify(uDate);\r\n } catch (ParseException e) {\r\n logger.error(\"下单时间处理错误\");\r\n }\r\n\r\n order.setOrderFrom(\"15\");\r\n order.setTotalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"totalPrice\")));\r\n order.setOriginalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"originalPrice\")));\r\n order.setStatus(\"0\");\r\n String elemeShopId = dtOrderEleme.get(0, \"shopId\");\r\n DataTable dtShop = getShopInfoByElemeShopId(adapter, elemeShopId);\r\n if (dtShop == null || dtShop.size() == 0) {\r\n logger.error(\"饿了么({})门店不存在\", elemeShopId);\r\n return null;\r\n }\r\n\r\n order.setShopId(dtShop.get(0, \"id\"));\r\n order.setShopName(dtShop.get(0, \"name\"));\r\n// order.setShopAddress(dtOrderEleme.get(0, \"address\"));\r\n order.setShopAddress(\"\");//饿了么推送订单中无门店地址,暂置为空\r\n order.setShopPhone(null);\r\n order.setRecipientName(dtOrderEleme.get(0, \"consignee\"));\r\n order.setRecipientAddress(dtOrderEleme.get(0, \"deliveryPoiAddress\"));\r\n\r\n StringBuilder phones = new StringBuilder();\r\n JSONArray phoneList = JSON.parseArray(dtOrderEleme.get(0, \"phoneList\"));\r\n if (phoneList != null) {\r\n for (int i = 0; i < phoneList.size(); i++) {\r\n String phone = phoneList.getString(i);\r\n if (i != 0) {\r\n phones.append(\";\");\r\n }\r\n phones.append(phone);\r\n }\r\n }\r\n order.setRecipientPhone(phones.toString());\r\n\r\n order.setRecipientLongitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[0]));\r\n order.setRecipientLatitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[1]));\r\n order.setShippingType(\"10\");\r\n order.setShippingFee(dtOrderEleme.get(0, \"deliverFee\") == null ? BigDecimal.valueOf(0) : Converter.toBigDecimal(dtOrderEleme.get(0, \"deliverFee\")));\r\n order.setShipperName(null);\r\n order.setShipperPhone(null);\r\n order.setHasInvoiced(Converter.toBoolean(dtOrderEleme.get(0, \"invoiced\")));\r\n order.setInvoiceTitle(dtOrderEleme.get(0, \"invoice\"));\r\n order.setPackageFee(Converter.toBigDecimal(dtOrderEleme.get(0, \"packageFee\")));\r\n order.setPayType(Converter.toBoolean(dtOrderEleme.get(0, \"onlinePaid\")) == false ? \"1\" : \"2\");\r\n order.setCaution(dtOrderEleme.get(0, \"description\"));\r\n order.setRemark(\"\");\r\n BigDecimal shopPart = Converter.toBigDecimal(dtOrderEleme.get(0, \"shopPart\"));\r\n if (shopPart.signum() == -1) {\r\n shopPart = shopPart.abs();\r\n }\r\n order.setShopPart(shopPart);\r\n order.setShopIncome(Converter.toBigDecimal(dtOrderEleme.get(0, \"income\")));\r\n BigDecimal serviceFee = Converter.toBigDecimal(dtOrderEleme.get(0, \"serviceFee\"));\r\n if (serviceFee.signum() == -1) {\r\n serviceFee = serviceFee.abs();\r\n }\r\n order.setServiceFee(serviceFee);\r\n// List<OrderDetail> detailList = convertOrderElemeToOrderDetailList(adapter, dtOrderEleme);\r\n List<OrderDetail> detailList = convertOrderElemeToOrderDetailList04(adapter, dtOrderEleme, dtShop.get(0, \"id\"));\r\n order.setDetail(detailList);\r\n return order;\r\n }", "NewOrderResponse newOrder(NewOrder order);", "public OrderLine() {\n }", "public OrderInventedRecord() {\n super(OrderInvented.ORDER_INVENTED);\n }", "public TExpressOrderRecord(Integer id, Integer userId, String expressNumber, String expressCompanyName, ExpressCompanyType expressCompany, String phone, String address, String studentName, LocalDateTime accessDay, String accessNumber, OrderType orderType, String orderTypeName, String remark, LocalDateTime createTime, Integer createUser, String createUserName, LocalDateTime updateTime, Integer updateUser, String updateUserName, LocalDateTime deleteTime, Integer deleteUser, String deleteUserName, Byte enabled, LocalDateTime dataVersion) {\n super(TExpressOrder.T_EXPRESS_ORDER);\n\n set(0, id);\n set(1, userId);\n set(2, expressNumber);\n set(3, expressCompanyName);\n set(4, expressCompany);\n set(5, phone);\n set(6, address);\n set(7, studentName);\n set(8, accessDay);\n set(9, accessNumber);\n set(10, orderType);\n set(11, orderTypeName);\n set(12, remark);\n set(13, createTime);\n set(14, createUser);\n set(15, createUserName);\n set(16, updateTime);\n set(17, updateUser);\n set(18, updateUserName);\n set(19, deleteTime);\n set(20, deleteUser);\n set(21, deleteUserName);\n set(22, enabled);\n set(23, dataVersion);\n }", "@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}", "public TExpressOrderRecord() {\n super(TExpressOrder.T_EXPRESS_ORDER);\n }", "@Override\n\tpublic boolean doCreate(Orders vo) throws Exception\n\t{\n\t\treturn false;\n\t}", "@Override\n @Transactional\n public OrderDTO createOrder(OrderDTO orderDTO) {\n\n String orderId = KeyUtil.genUniqueKey();\n BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO);\n// List<CartDTO> cartDTOList = new ArrayList<>();\n //1.\n for (OrderDetail orderDetail : orderDTO.getOrderDetailList()) {\n ProductInfo productInfo = productInfoService.findOne(orderDetail.getProductId());\n if (productInfo == null) {\n throw new ProjectException(ResultEnum.PRODUCT_NOT_EXIST);\n }\n\n //2.\n orderAmount = productInfo.getProductPrice()\n .multiply(new BigDecimal(orderDetail.getProductQuantity()))\n .add(orderAmount);\n //3. orderDetail db insertion\n orderDetail.setDetailId(KeyUtil.genUniqueKey());\n orderDetail.setOrderId(orderId);\n BeanUtils.copyProperties(productInfo, orderDetail);\n orderDetailRepository.save(orderDetail);\n// CartDTO cartDTO = new CartDTO(orderDetail.getProductId(), orderDetail.getProductQuantity());\n// cartDTOList.add(cartDTO);\n }\n\n //3. orderMaster\n OrderMaster orderMaster = new OrderMaster();\n orderDTO.setOrderId(orderId);\n BeanUtils.copyProperties(orderDTO, orderMaster);\n orderMaster.setOrderAmount(orderAmount);\n orderMaster.setOrderStatus(OrderStatusEnum.NEW.getCode());\n orderMaster.setPayStatus(PayStatusEnum.WAIT.getCode());\n orderMasterRepository.save(orderMaster);\n\n //4.\n List<CartDTO> cartDTOList = orderDTO.getOrderDetailList().stream().map(e ->\n new CartDTO(e.getProductId(), e.getProductQuantity())\n ).collect(Collectors.toList());\n\n productInfoService.decreaseInventory(cartDTOList);\n\n return orderDTO;\n }", "private ExchangeRecord(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "ShipmentItemBilling createShipmentItemBilling();", "@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Order create(Order order) {\n\t\tthis.orderRepository.save(order);\n\t\tfor (Product product : order.getProducts()) {\n\t\t\tproduct.setOrder(order);\n\t\t\tthis.productService.create(product);\n\t\t}\n\t\treturn order;\n\t}", "public OrderOffered() {\r\n }", "void prepareOrder(int orderId);", "public RecordService() {\n super(\"RecordService\");\n }", "Delivery createDelivery();", "public TradeRecordStruct() {\n }", "@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}", "public static PostponeRecord createEntity(EntityManager em) {\n PostponeRecord postponeRecord = new PostponeRecord()\n .driverId(DEFAULT_DRIVER_ID)\n .vehicleId(DEFAULT_VEHICLE_ID)\n .companyId(DEFAULT_COMPANY_ID)\n .receiptNumber(DEFAULT_RECEIPT_NUMBER)\n .operationTime(DEFAULT_OPERATION_TIME)\n .plateNumber(DEFAULT_PLATE_NUMBER)\n .driverName(DEFAULT_DRIVER_NAME)\n .postponeData(DEFAULT_POSTPONE_DATA)\n .remark(DEFAULT_REMARK);\n return postponeRecord;\n }", "public abstract ExternalRecord createExternalRecord()\r\n\t\t\tthrows Exception;", "int insert(SmtOrderProductAttributes record);", "public TAssetsDeviceRecord(Long id, Integer customerId, String orderId, Integer productId, String sn, String title, String companyName, Date startDate, Date endDate, BigDecimal deposit, BigDecimal rent, BigDecimal marketPrice, Byte status, Byte rentStatus, Integer belongId, Timestamp cdate, Timestamp mdate) {\n super(TAssetsDevice.T_ASSETS_DEVICE);\n\n set(0, id);\n set(1, customerId);\n set(2, orderId);\n set(3, productId);\n set(4, sn);\n set(5, title);\n set(6, companyName);\n set(7, startDate);\n set(8, endDate);\n set(9, deposit);\n set(10, rent);\n set(11, marketPrice);\n set(12, status);\n set(13, rentStatus);\n set(14, belongId);\n set(15, cdate);\n set(16, mdate);\n }", "void createOrders(int orderNum) throws OrderBookOrderException;", "@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "public Order() {\n\t\tsuper();\n\t\titems = new HashMap<>();\n\t}", "@Transactional(propagation=Propagation.REQUIRES_NEW)\r\n\tpublic void createError(){\r\n\t\tOrder newOrder = new Order( );\r\n\t\tnewOrder.setDescription(\"Service layer added \"+Calendar.getInstance().getTime());\r\n\t\tspringOrderDao.errorSave(newOrder);\r\n\t}", "public Long createRecord(Record object);", "public interface OrdRefundSaleRecordService {\r\n public int insert(OrdRefundSaleRecord ordRefundSaleRecord);\r\n\r\n public OrdRefundSaleRecord selectByPrimaryKey(Long ordRefundSaleRecordId);\r\n\r\n public int updateByPrimaryKeySelective(OrdRefundSaleRecord ordRefundSaleRecord);\r\n\r\n public int updateByOrderItemIdSelective(OrdRefundSaleRecord ordRefundSaleRecord);\r\n\r\n public List<OrdRefundSaleRecord> findOrdRefundSaleRecordList(Map<String,Object> params);\r\n\r\n /**\r\n * 根据订单初始化记录\r\n * @param ordOrder\r\n */\r\n public void init(OrdOrder ordOrder, Date applyTime);\r\n\r\n public List<OrdRefundSaleRecord> getOrdRefundSaleRecordByOrder(OrdOrder ordOrder, Date applyTime);\r\n}", "public OrderLine() {\n products = new ArrayList<>();\n price = new BigDecimal(0);\n }", "public SupplyOrder(SupplyOrder otherOrder){\n if(otherOrder!=null){\n this.orderID=otherOrder.getOrderID();\n this.setCustomerID(otherOrder.getCustomerID());\n this.setProductID(otherOrder.getProductID());\n this.setOrderDate(otherOrder.getOrderDate());\n this.setAmount(otherOrder.getAmount());\n }\n else{\n this.orderID=0;\n this.setCustomerID(\"\");\n this.setProductID(\"\");\n this.setOrderDate(new LocalDate());\n this.setAmount(0.0);\n }\n }", "public PersonRecord() {}", "public OrderResponseBuilder() {\r\n orderResponse = new OrderResponse();\r\n }", "Order addOrder(String orderId, Order order) throws OrderBookOrderException;", "public Order() {\n this(DSL.name(\"order\"), null);\n }", "@Override\n\tpublic boolean createOrderBill(OrderBill orderBill) {\n\t\treturn false;\n\t}", "int insert(OrderPO record);", "int insert(OrderDetail record);", "public Order(Long order_id, boolean generateNumber) {\n this.order_id = order_id;\n if (generateNumber) {\n this.order_no = this.generateOrderNumber();\n }\n }", "public OrderLogRecord(Integer id, Integer orderId, Byte status, Timestamp changeTime) {\n super(OrderLog.ORDER_LOG);\n\n set(0, id);\n set(1, orderId);\n set(2, status);\n set(3, changeTime);\n }", "public ServiceRecordDisk(final ServiceRecordDisk o)\r\n { \r\n this.records = o.records;\r\n this.recordsByMemberNum = o.recordsByMemberNum;\r\n this.recordsByProviderNum = o.recordsByProviderNum;\r\n }", "Message create(MessageInvoice invoice);", "ResponseDTO createPurchase(PurchaseOrderDTO purchaseOrderDTO) throws ApiException, IOException;", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "protected Order(String custFName, String custLName, String custEmail, int orderID,\n Timestamp creationDate, double totalDue, String status, String salesFName,\n String salesLName,\n String salesEmail) {\n this.custFName = custFName;\n this.custLName = custLName;\n this.custEmail = custEmail;\n this.orderID = orderID;\n this.creationDate = creationDate;\n this.totalDue = totalDue;\n this.status = status;\n this.salesFName = salesFName;\n this.salesLName = salesLName;\n this.salesEmail = salesEmail;\n products = new ArrayList<>();\n }", "public PurchaseRequestAttachment() {\r\n }", "public static OrdersLine createEntity(EntityManager em) {\n OrdersLine ordersLine = new OrdersLine()\n .ordersLineName(DEFAULT_ORDERS_LINE_NAME)\n .ordersLineValue(DEFAULT_ORDERS_LINE_VALUE)\n .ordersLinePrice(DEFAULT_ORDERS_LINE_PRICE)\n .ordersLineDescription(DEFAULT_ORDERS_LINE_DESCRIPTION)\n .thumbnailPhoto(DEFAULT_THUMBNAIL_PHOTO)\n .thumbnailPhotoContentType(DEFAULT_THUMBNAIL_PHOTO_CONTENT_TYPE)\n .fullPhoto(DEFAULT_FULL_PHOTO)\n .fullPhotoContentType(DEFAULT_FULL_PHOTO_CONTENT_TYPE)\n .fullPhotoUrl(DEFAULT_FULL_PHOTO_URL)\n .thumbnailPhotoUrl(DEFAULT_THUMBNAIL_PHOTO_URL);\n return ordersLine;\n }", "int insert(OrderDetails record);", "@Test\n public void testPopulateNewOrderInfo() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n Order order4 = service.populateNewOrderInfo(order3);\n\n assertEquals(\"Paul\", order4.getCustomerName());\n }", "public UserOrder() {\n }", "void newOrder();", "public void create(Singer newRecord);", "private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public Invoice createInvoice(Order order) {\n\t\treturn new Invoice(order);\n\t}", "Shipment createShipment();", "private OrderEntity getCurrentOrder(String orderId) {\n\t\tOrderEntity entity = new OrderEntity();\n\t\t//TODO get current order data from oracle\n\t\t\n\t\treturn entity;\n\t}", "public TaskOrder(TaskOrderDetails details){\n\t\tthis.details = details;\n\t}", "public OrderTransactionManagedBean() \n {\n orders = new ArrayList<>();\n lineItems = new ArrayList<>();\n }", "public XXONGbwShippedOrdersAMImpl() {\n }", "public EmployeeRecord(){}", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "@Test\n\tpublic void saveOrderLine() {\n\t\t// TODO: JUnit - Populate test inputs for operation: saveOrderLine \n\t\tOrderLine orderline_1 = new ecom.domain.OrderLine();\n\t\tservice.saveOrderLine(orderline_1);\n\t}", "public OneTimeCustomerOrder() {\n\n\t\tPropertiesConfiguration config = new PropertiesConfiguration();\n\n\t\ttry {\n\n\t\t\tconfig.load(\"application.properties\");\n\n\t\t\tservicePath = config.getString(\"s4cld.onetimecustomerrecord_servicepath\");\n\n\t\t\tresource = config.getString(\"s4cld.onetimecustomerrecord_resource\");\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t}", "private void createIPOOrder(final OrderBO completedOrder)\n\t{\n\t\t// YTODO Auto-generated method stub\n\t\tfinal FMIPOOrderModel order = getmodelService().create(FMIPOOrderModel.class);\n\t\torder.setCode(completedOrder.getMstrOrdNbr().trim());\n\t\torder.setBilltoparty(getAccountByNabs(completedOrder.getBillToAcct().getAccountCode()));\n\t\torder.setShiptoparty(getAccountByNabs(completedOrder.getShipToAcct().getAccountCode()));\n\t\torder.setPONumber(completedOrder.getCustPoNbr());\n\t\torder.setOrdercomments(completedOrder.getComment1() + completedOrder.getComment2() + completedOrder.getComment3());\n\t\torder.setUserFirstName(\"IPO USER\");\n\t\tgetmodelService().save(order);\n\t\tcreateIPOOrderEntry(order, completedOrder.getItemList());\n\t}", "public Order(String deliveryAddress, String customerName, double orderTotalPrice, String id,\n String description, String customerTelephone, String comment, String pharmacyId, Date date, String userToken) {\n this.deliveryAddress = deliveryAddress;\n this.customerName = customerName;\n this.orderStatus = OrderStatus.WAITING_ORDER;\n this.orderTotalPrice = orderTotalPrice;\n this.description = description;\n this.id = id;\n this.customerTelephone = customerTelephone;\n this.pharmacyId = pharmacyId;\n this.comment = comment;\n this.date = new Date(date.getTime());\n this.userToken = userToken;\n }", "ShipmentItem createShipmentItem();", "public PaymentRecordKey(String recordId, String ordersId, String buildDay) {\n this.recordId = recordId;\n this.ordersId = ordersId;\n this.buildDay = buildDay;\n }", "private static DeliveryWrapper createDeliveryWrapper(SupportOrder supportOrder){\r\n\t\tDeliveryWrapper deliveryWrapper = new DeliveryWrapper();\r\n\t\t\r\n\t\tDelivery delivery = new Delivery();\r\n\t\tCustomer customer = new Customer();\r\n\t\tcustomer.setRegistry(supportOrder.getTarget().getRegistry());\r\n\t\tdelivery.setCustomer(customer);\r\n\t\tdelivery.setIssueTime(supportOrder.getStartDate());\r\n\t\tdelivery.setSeries(null);\r\n\t\tdelivery.setNumber(0);\r\n\t\tdelivery.setSecurityLevel(SecurityLevel.OFFICIAL);\r\n\t\tdelivery.setStatus(DeliveryStatus.PENDING);\r\n\t\t\r\n\t\tdeliveryWrapper.setDelivery(delivery);\r\n\t\t\r\n\t\treturn deliveryWrapper;\r\n\t}", "public BaseOrder (java.lang.Long id) {\r\n\t\tthis.setId(id);\r\n\t\tinitialize();\r\n\t}", "public FlightOrder(Flight flight, Order order) {\n\t\tsuper();\n\t\tthis.flight = flight;\n\t\tthis.order = order;\n\t\tthis.tickets = new HashSet<FlightTicket>();\n\t}", "public OrderResource() {\n om = new OrderMapper(emf);\n rm = new RoomMapper(emf);\n um = new UserMapper(emf);\n }", "ServiceOrder(String carVIN, int techID, int dealershipID, String serviceDate){\n serviceNumber++;\n this.carVIN = carVIN;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.serviceDate = serviceDate;\n this.serviceDesc = \"None\";\n this.partsUsed = \"None\";\n this.partsCost = 0;\n this.totalCost = 0;\n this.laborHours = 0;\n }", "DataHRecordData() {}", "private Order(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "@Override\n public Class<OrderRecord> getRecordType() {\n return OrderRecord.class;\n }", "ServiceOrder(String carVIN, String serviceDesc, String serviceDate, String partsUsed, int techID, int dealershipID, double partsCost, double totalCost, double laborHours){\n serviceNumber++;\n this.serviceDate = serviceDate;\n this.carVIN = carVIN;\n this.serviceDesc = serviceDesc;\n this.partsUsed = partsUsed;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.partsCost = partsCost;\n this.totalCost = totalCost;\n this.laborHours = laborHours;\n }", "int insert(ClOrderInfo record);" ]
[ "0.7162693", "0.6372069", "0.62393767", "0.59560925", "0.59199256", "0.58355933", "0.58095443", "0.57960016", "0.5790778", "0.57895553", "0.57858485", "0.5729088", "0.5706709", "0.5704234", "0.56465596", "0.56328875", "0.56309277", "0.5603425", "0.55626744", "0.5529844", "0.5527874", "0.55097926", "0.54956496", "0.54933256", "0.5472505", "0.5471408", "0.5453459", "0.54456574", "0.5442031", "0.5422929", "0.5410913", "0.53811055", "0.53559893", "0.5353834", "0.53505623", "0.5345006", "0.5338525", "0.5327742", "0.5323989", "0.53021693", "0.5282591", "0.5277178", "0.5274145", "0.5266721", "0.52517086", "0.5241798", "0.5226523", "0.52258426", "0.5225765", "0.5203384", "0.52009374", "0.5198502", "0.51840925", "0.5174407", "0.51737815", "0.5156155", "0.51538897", "0.51450837", "0.5144259", "0.5143482", "0.51406527", "0.51402885", "0.5115885", "0.5113762", "0.50992006", "0.5085909", "0.5085542", "0.5075619", "0.50736743", "0.50683045", "0.50527036", "0.5052517", "0.5042639", "0.5040017", "0.5034829", "0.5026771", "0.50139827", "0.5013227", "0.5010459", "0.5009747", "0.50060165", "0.5005634", "0.50028193", "0.4997057", "0.49959156", "0.49942115", "0.49907732", "0.49849445", "0.49836013", "0.49760896", "0.49750003", "0.49743864", "0.49723652", "0.49630025", "0.49614114", "0.4958858", "0.49562824", "0.49465418", "0.49418068", "0.49345344" ]
0.66995776
1
private final String tabelaViagem = "viagem"; private final String tabelaPassagem = "passagem";
public OnibusDAO() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTabela();", "public void setTable(TableCaracteristique tab) {\n this.table = tab;\n }", "public void limparTabela(String tabela){\n \n if(tabela.equals(\"hora\")){\n modHT.setRowCount(0);\n modMF.setRowCount(0);\n txtEntrada_Horario.requestFocus();\n }else if(tabela.equals(\"marc\")){\n modMF.setRowCount(0);\n txtEntrada_Marcacoes.requestFocus();\n }\n \n //Limpa as tabelas de Atraso e Extras\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n }", "public void setNombreTabla(String nombreTabla) {\r\n\t\tthis.nombreTabla = nombreTabla;\r\n\t}", "public String capturalabelparatabla(String texto) {\n\t\t tablalabel.setText(texto);\n\t\t return texto;\n\t }", "private void remplirTabNewMess(){\n\t\tCalendar date = Calendar.getInstance();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);\n\n\t\tString passage[]= new String[7];\n\n\t\tpassage[0]=tab[2]; //sender\n\t\tpassage[1]=tab[1]; //recep\n\t\tpassage[2]=tab[4]; //obj\n\t\tpassage[3]=tab[3]; //txt\n\t\tpassage[4]=\"0\"; //importance\n\t\tpassage[5]=sdf.format(date.getTime()); //date\n\t\tpassage[6]=\"1\"; //non lu\n\n\t\tmessages.add((String[])passage);\n\t\tthis.send(messages);\n\t\tmessagerie.Server.con.closeSocket();\n\n\t}", "public static String[] selecionar(String tabela){\n String[] lista = new String[10];\n \n // Só de exemplo\n lista[0] = \"Amauri\";\n //...\n \n return lista;\n }", "public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public DetalleTablaComplementario() {\r\n }", "public String[] getTabla() {\r\n\t\treturn tabla;\r\n\t}", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "public String getNomTable();", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "public String getNombreTabla() {\r\n\t\treturn nombreTabla;\r\n\t}", "public void Tarifa(String tipoTarifa){\n Tarifa = tipoTarifa;\n Regular = \"R\";\n Comercial = \"C\";\n\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"CPF\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Endereço\");\n cabecalho.add(\"E-mail\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Cliente cliente : new NCliente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(cliente.getId() + \"\");\n linha.add(cliente.getNome());\n linha.add(cliente.getCpf());\n linha.add(cliente.getTelefone());\n linha.add(cliente.getEndereco());\n linha.add(cliente.getEmail());\n linha.add(cliente.getData_nascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblClientes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public void prepararDados(int tab) {\n\n if (modHT.getRowCount() == 0 || modMF.getRowCount() == 0) {\n JOptionPane.showMessageDialog(null, \"Não há nada para calcular!\", \"INFORMAÇÃO\", 1);\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n } else {\n if (tab == 0) {\n aTra = new Atrasos(Atraso);\n aTra.tamTabelas(modHT, modMF);\n } else {\n hEx = new HorasExtras(HoraExtra);\n hEx.tamTabelas(modHT, modMF);\n }\n }\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "public void tablero(){\r\n System.out.println(\" X \");\r\n System.out.println(\" 1 2 3\");\r\n System.out.println(\" | |\");\r\n //imprimir primera fila\r\n System.out.println(\" 1 \"+gato[0][0]+\" | \"+gato[0][1]+\" | \"+gato[0][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir segunda fila\r\n System.out.println(\"Y 2 \"+gato[1][0]+\" | \"+gato[1][1]+\" | \"+gato[1][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir tercera fila\r\n System.out.println(\" 3 \"+gato[2][0]+\" | \"+gato[2][1]+\" | \"+gato[2][2]+\" \");\r\n System.out.println(\" | |\");\r\n }", "public void construirTabla(String tipo) {\r\n\r\n\t\t\r\n\t\tif(tipo == \"lis\") {\r\n\t\t\tlistaPersonas = datarPersonas();\r\n\t\t} else if (tipo == \"bus\") {\r\n\t\t\tlistaPersonas = datarPersonasBusqueda();\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> titulosList=new ArrayList<>();\r\n\t\t\r\n\t\t//Estos son los encabezados de las columnas\r\n\t\t\r\n\t\ttitulosList.add(\"DNI\");\r\n\t\ttitulosList.add(\"NOMBRE\");\r\n\t\ttitulosList.add(\"APELLIDO\");\r\n\t\ttitulosList.add(\"CUENTA BANCARIA\");\r\n\t\ttitulosList.add(\"PASSWORD\");\r\n\t\ttitulosList.add(\"FECHA DE NACIMIENTO\");\r\n\t\ttitulosList.add(\"TELEFONO\");\r\n\t\ttitulosList.add(\"CORREO ELECTRONICO\");\r\n\t\ttitulosList.add(\"ROL\");\r\n\t\ttitulosList.add(\"Modificar\");\r\n\t\ttitulosList.add(\"Eliminar\"); \r\n\t\t\t\t\r\n\t\t//se asignan los títulos de las columnas para enviarlas al constructor de la tabla\r\n\t\t\r\n\t\tString titulos[] = new String[titulosList.size()];\r\n\t\tfor (int i = 0; i < titulos.length; i++) {\r\n\t\t\ttitulos[i]=titulosList.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tObject[][] data = arrayDatos(titulosList);\r\n\t\tcrearTabla(titulos,data);\r\n\t\t\r\n\t}", "Tablero consultarTablero();", "private void mostrarTablero() {\n Jugada objJugada = null;\n if (! this.objJuegoTresEnRaya.getMovimientos().estaVacia())\n objJugada = this.objJuegoTresEnRaya.getMovimientos().ultimo();\n\n if (objJugada == null) {\n tab0x0.setEnabled(true);\n tab0x1.setEnabled(true);\n tab0x2.setEnabled(true);\n \n tab1x0.setEnabled(true);\n tab1x1.setEnabled(true);\n tab1x2.setEnabled(true);\n \n tab2x0.setEnabled(true);\n tab2x1.setEnabled(true);\n tab2x2.setEnabled(true);\n \n tab0x0.setText(\"\");\n tab0x1.setText(\"\");\n tab0x2.setText(\"\");\n \n tab1x0.setText(\"\");\n tab1x1.setText(\"\");\n tab1x2.setText(\"\");\n \n tab2x0.setText(\"\");\n tab2x1.setText(\"\");\n tab2x2.setText(\"\");\n return;\n }\n \n if (objJugada.getTablero(0, 0) > 0) {\n tab0x0.setEnabled(false);\n tab0x0.setText(getTexto(objJugada.getTablero(0, 0)));\n }\n if (objJugada.getTablero(0, 1) > 0) {\n tab0x1.setEnabled(false);\n tab0x1.setText(getTexto(objJugada.getTablero(0, 1)));\n }\n if (objJugada.getTablero(0, 2) > 0) {\n tab0x2.setEnabled(false);\n tab0x2.setText(getTexto(objJugada.getTablero(0, 2)));\n }\n\n if (objJugada.getTablero(1, 0) > 0) {\n tab1x0.setEnabled(false);\n tab1x0.setText(getTexto(objJugada.getTablero(1, 0)));\n }\n if (objJugada.getTablero(1, 1) > 0) {\n tab1x1.setEnabled(false);\n tab1x1.setText(getTexto(objJugada.getTablero(1, 1)));\n }\n if (objJugada.getTablero(1, 2) > 0) {\n tab1x2.setEnabled(false);\n tab1x2.setText(getTexto(objJugada.getTablero(1, 2)));\n }\n\n if (objJugada.getTablero(2, 0) > 0) {\n tab2x0.setEnabled(false);\n tab2x0.setText(getTexto(objJugada.getTablero(2, 0)));\n }\n if (objJugada.getTablero(2, 1) > 0) {\n tab2x1.setEnabled(false);\n tab2x1.setText(getTexto(objJugada.getTablero(2, 1)));\n }\n if (objJugada.getTablero(2, 2) > 0) {\n tab2x2.setEnabled(false);\n tab2x2.setText(getTexto(objJugada.getTablero(2, 2)));\n }\n \n this.numNodosResultLabel.setText(\"\" + objJuegoTresEnRaya.getNumeroNodosUltima());\n \n if (objJuegoTresEnRaya.estaTerminado()) {\n tab0x0.setEnabled(false);\n tab0x1.setEnabled(false);\n tab0x2.setEnabled(false);\n \n tab1x0.setEnabled(false);\n tab1x1.setEnabled(false);\n tab1x2.setEnabled(false);\n \n tab2x0.setEnabled(false);\n tab2x1.setEnabled(false);\n tab2x2.setEnabled(false);\n \n this.quienGanoResultLabel.setText(getTexto(objJuegoTresEnRaya.getQuienGano()));\n }\n }", "public Tabono() {\n }", "public GWDPEXPRESS_MY_ACHIEVEMENTS()\n{\najouterFenetre(\"EXPRESS_FEN_Search\", mWD_EXPRESS_FEN_Search);\najouterFenetre(\"EXPRESS_FEN_Profil\", mWD_EXPRESS_FEN_Profil);\najouterFenetre(\"EXPRESS_FEN_Achievement\", mWD_EXPRESS_FEN_Achievement);\n\n}", "private void loadTables(String NroGuia){\r\n log_Guide log_guide = new log_Guide();\r\n \r\n if (NroGuia.isEmpty()){\r\n tb_factura.setItems(null);\r\n }else{\r\n log_guide.setTp_factura(Ln.getInstance().find_Archguid(NroGuia, \"\"));\r\n loadTableBill(tb_factura, log_guide.getTp_factura() ); \r\n }\r\n }", "@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}", "static void obiektyTablice() {\n\n Object obiektString = new String();\n Object obiektObiekt = new Object();\n Integer[] obiektInt = new Integer[3];\n int[] tablicaInt = new int[5];\n\n obiektString = \"tekstStringa\";\n obiektObiekt = \"tekstObiektu\";\n obiektInt[2] = 3;\n tablicaInt[2] = 2;\n int wielkoscTablicy = tablicaInt.length;\n System.out.println(obiektObiekt + \"\\n\" + obiektString + \"\\n\" + obiektInt[2] + \"\\n\" + tablicaInt[3] + \"\\n\"\n + wielkoscTablicy);\n\n // modulo mniejszej przez większą = reszta*większa\n int b = 7 % 12;\n System.out.println(\"Modulo = \" + b);\n }", "public void cargarTabla(String servidor){\n String base_de_datos1=cbBaseDeDatos.getSelectedItem().toString();\n String sql =\"USE [\"+base_de_datos1+\"]\\n\" +\n \"SELECT name FROM sysobjects where xtype='U' and category <> 2\";\n // JOptionPane.showMessageDialog(null,\"SQL cargarbases \"+sql);\n Conexion cc = new Conexion();\n Connection cn=cc.conectarBase(servidor, base_de_datos1);\n modeloTabla=new DefaultTableModel();\n String fila[]=new String[1] ;\n String[] titulos={\"Tablas\"} ;\n try {\n Statement psd = cn.createStatement();\n ResultSet rs=psd.executeQuery(sql);\n if(modeloTabla.getColumnCount()<2){\n modeloTabla.addColumn(titulos[0]);\n //modeloTabla.addColumn(titulos[1]);\n }\n while(rs.next()){\n fila[0]=rs.getString(\"name\");\n // fila[1]=\"1\";\n modeloTabla.addRow(fila);\n }\n tblTablas.setModel(modeloTabla);\n }catch(Exception ex){\n JOptionPane.showMessageDialog(null, ex+\" al cargar tabla\");\n }\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "protected String decrisToi(){\r\n return \"\\t\"+this.nomVille+\" est une ville de \"+this.nomPays+ \", elle comporte : \"+this.nbreHabitants+\" habitant(s) => elle est donc de catégorie : \"+this.categorie;\r\n }", "public void cargarTitulos1() throws SQLException {\n\n tabla1.addColumn(\"CLAVE\");\n tabla1.addColumn(\"NOMBRE\");\n tabla1.addColumn(\"DIAS\");\n tabla1.addColumn(\"ESTATUS\");\n\n this.tbpercep.setModel(tabla1);\n\n TableColumnModel columnModel = tbpercep.getColumnModel();\n\n columnModel.getColumn(0).setPreferredWidth(15);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(70);\n\n }", "void setTitolo(String titolo);", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "public Tabla(int tip) {\n\t\tthis.sirinaTable = 20;\n\t\tthis.visinaTable = 20;\n\t\tthis.tip = tip;\n\t\tthis.tabla = new char[20][20];\n\t\tfor (int i = 0; i < this.visinaTable;i++) {\n\t\t\tfor (int j = 0; j < this.sirinaTable;j++) {\n\t\t\t\ttabla[i][j] = '.';\n\t\t\t}\n\t\t}\n\t\trezultat = 0;\n\t\tzmija = new ArrayList<Cvor>();\n\t\t\n\t\tif (tip == 2) {\n\t\t\tthis.dodajZidove();\n\t\t}\n\t\telse if(tip == 3) {\n\t\t\tthis.dodajPrepreke1();\n\t\t}\n\t\telse if(tip == 4) {\n\t\t\tthis.dodajPrepreke2();\n\t\t}\n\t\tthis.dodajZmijuPocetak();\n\t\tthis.dodajHranu();\n\t\tthis.smjer = 'd';\n\t}", "public void setModelo(String Modelo) {\n this.Modelo = Modelo;\n }", "public void setEstablecimiento(String establecimiento)\r\n/* 119: */ {\r\n/* 120:198 */ this.establecimiento = establecimiento;\r\n/* 121: */ }", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public String tipoConta() {\n return \"Conta Comum\";\n }", "private void cargarTablaConPaquetes() {\n tcId.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"codigo\"));\n tcdescripcion.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"descripcion\"));\n tcDestino.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"destino\"));\n tcEntregado.setCellValueFactory(\n new PropertyValueFactory<Paquete, Boolean>(\"entregado\"));\n\n tbPaqueteria.setItems(data);\n tbPaqueteria.getSelectionModel().selectFirst();\n\n //TODO futura implementacion\n //setDobleClickFila();\n }", "private String[] getColumas(){\n String columna[]={\"Tipo Usuario \",\"Nombre\",\"Empleado ID\",\"Asignar\"};\n return columna;\n }", "public void gettableconteudo(){\n \n int selecionada = jtablearquivos.getSelectedRow();\n if (selecionada == -1) {\n JOptionPane.showMessageDialog(null,\" Arquivo não selecionado corretamente !\");\n } \n String id = jtablearquivos.getValueAt(selecionada, 0).toString();\n id1 = id;\n String titulo = jtablearquivos.getValueAt(selecionada, 1).toString();\n titulo1 = titulo;\n \n \n \n }", "protected String getTitoloPaginaMadre() {\n return VUOTA;\n }", "public void setTextTablaEd(String text) { doSetText(this.$element_TablaEd, text); }", "private void Table()\n{\n Object [] Kolom = {\"Nama\", \"No. Telp\", \"Kota Asal\"};\n Table = new DefaultTableModel(null, Kolom);\n Tabel.setModel(Table);\n}", "public void setModelo(String modelo) {\n this.modelo = modelo;\n }", "public String getTablename() {\n return tablename;\n }", "public Tabla(int sirina, int visina, int tip) {\n\t\tthis.sirinaTable = sirina;\n\t\tthis.visinaTable = visina;\n\t\tthis.tip = tip;\n\t\tthis.tabla = new char[sirina][visina];\n\t\tfor (int i = 0; i < this.visinaTable;i++) {\n\t\t\tfor (int j = 0; j < this.sirinaTable;j++) {\n\t\t\t\ttabla[i][j] = '.';\n\t\t\t}\n\t\t}\n\t\trezultat = 0;\n\t\tzmija = new ArrayList<Cvor>();\n\t\tif (tip == 2) {\n\t\t\tthis.dodajZidove();\n\t\t}\n\t\tthis.dodajZmijuPocetak();\n\t\tthis.dodajHranu();\n\t\tthis.smjer = 'd';\n\t}", "interface ViewMessages {\n\n String ENTER= \"Enter\";\n String FIRST_NAME = \"first name\";\n String LAST_NAME = \"last name\";\n String LOGIN = \"login\";\n String EMAIL = \"email\";\n String PHONE= \"phone\";\n String CITY= \"city\";\n String APPARTMENT_NUMBER= \"appartment number\";\n String HOUSE_NUMBER= \"house number\";\n String STREET= \"street\";\n String WRONG_INPUT = \"Wrong input.\";\n String RESULT = \"Your note\";\n String WRONG_LOGIN = \"Login is already used.\";\n\n\n}", "public void setSegundoNombre(String segundoNombre) {\n this.segundoNombre = segundoNombre;\n }", "static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "private EstabelecimentoTable() {\n\t\t\t}", "public void renameTabs(){\n\t\tfor(int i =0;i<nbTabs;i++){\n\t\t\tif(!tabs.getTitleAt(i).equals(\"Exemples\"))\n\t\t\t\ttabs.setTitleAt(i,(\"Génération\"+(i+1)));\n\t\t}\n\t}", "public abstract String getTab();", "@Override public String getQueso(){\n return \"manchego \";\n }", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "void mostrarAtributos() {\n\t\tString mensaje = \"nombre=\" + nombre + \", apellido=\" + apellido + \", tipoDocumento=\" + tipoDocumento\n\t\t\t\t+ \", numeroDocumento=\" + numeroDocumento + \", edad=\" + edad + \" y es \"\n\t\t\t\t+ (edad >= 18 ? \"mayor de edad\" : \"menor de edad\");\n\t\tSystem.out.println(mensaje);\n\t}", "public void setValuesJTableResultados(){\n int alternativas = views.useController().getProblema().getAlternativas();\n TableModelPersonalizado modelo = new TableModelPersonalizado(alternativas, 1);\n jTableVectorResultados.setModel(modelo);\n jTableVectorResultados.setEnabled(false);\n jTableVectorResultados.getTableHeader().setResizingAllowed(false);\n jTableVectorResultados.getTableHeader().setReorderingAllowed(false);\n //HEADERS DE LA TABLA\n jTableVectorResultados.getColumnModel().getColumn(0).setHeaderValue(\" \"); \n //CONTENIDO DE LA TABLA\n for(int f = 0; f < alternativas; f++){\n modelo.setValueAt(df.format(views.useController().getProblema().getResult().getPriorityVector().get(f, 0)), f, 0);\n } \n }", "public ResultSet selecionar(String tabela);", "String getTitulo();", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "private void IniciarTabla(){\n \n // limpia los datos de los Label y los datos relacionados a la actualizacion de los datos e inhabilita y habilitar botones\nthis.jLabelId.setText(\"Id\");\nthis.jnombre.setText(\"\");\ngrabarCambios.setEnabled(false);\njBotonAgregar.setEnabled(true);\n\n DefaultTableModel dfm = new DefaultTableModel();\n tabla = this.jTabla;\n tabla.setModel(dfm);\n \n // agrega los datos al index de la tabla \n dfm.setColumnIdentifiers(new Object[]{\"id\",\"Comuna\",\"Estado\"});\n Conexion cn = new Conexion();\n rs = cn.SeleccionarTodosComunas();\n try{\n // se recorre rs donde estan los resultados de la busqueda de los datos de la tabla comuna\n while(rs.next()){\n String activo =\"\";\n if (rs.getInt(\"COM_ESTADO\")==1) {\n activo = \"activo\";\n } else {\n activo = \"no activo\";};\n // se agrega la fila con los datos de la columna \n dfm.addRow(new Object[]{rs.getInt(\"COM_ID\"),rs.getString(\"COM_NOMBRE\"),activo});\n }\n \n } catch(Exception e){\n System.out.println(\"Error Revisar funcion TableModel\" + e);\n }\n }", "private String getTitulo(String dsTitulo) {\n return \"Exemplo ScoreReader\";\n }", "public AddVariabile(int mod) {\n this.setSize(770, 418);\n initComponents();\n \n switch(mod){\n case TRIGGER:\n modalita = TRIGGER;\n \n procLabel.setVisible(false);\n proceduraComboBox.setVisible(false);\n triggerLabel.setVisible(true);\n triggerComboBox.setVisible(true);\n \n queryIns = \"INSERT INTO variabili(nomeVariabile, tipo, ID_trigger) VALUES(?, ?, ?)\";\n break;\n \n case PROCEDURA:\n modalita = PROCEDURA;\n \n procLabel.setVisible(true);\n proceduraComboBox.setVisible(true);\n triggerLabel.setVisible(false);\n triggerComboBox.setVisible(false);\n \n queryIns = \"INSERT INTO variabili(nomeVariabile, tipo, ID_proc) VALUES(?, ?, ?)\";\n break; \n }\n }", "MultTable() //do not use the name of the constructor for the name of another method\n {}", "public ejercicio1() {\n this.cadena = \"\";\n this.buscar = \"\";\n }", "private boolean agregarRegistroATabla(Table t,DocumentoPrint dp)\n\t{\n\t TableItem item1 = new TableItem(t, SWT.NONE);\n\t String impreso = new String(\"NO\");\n\t if (dp.getDocImpreso()){\n\t \timpreso = \"SI\";\n\t }\n\t item1.setText(new String[] {dp.getFechaHora(),dp.getTipoDoc(),dp.getSeriaNro(),dp.getRemitente(),impreso} );\n\t\treturn true;\n\t}", "public String getEstablecimiento()\r\n/* 114: */ {\r\n/* 115:188 */ return this.establecimiento;\r\n/* 116: */ }", "private void mostrarEmenta (){\n }", "public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }", "public void Tabla_Credito(int numero, String campo) {\r\n DefaultTableModel modelo = new DefaultTableModel();\r\n String[] cabeceras = new String[]{\"Cod_Venta\", \"Abonado\", \"Total\"};\r\n modelo.setColumnIdentifiers(cabeceras);\r\n switch (numero) {\r\n case 1:\r\n CadSql = \"SELECT c.cod_venta, c.abono, c.total FROM credito c, clientes cli WHERE cli.id=c.id_cliente AND cli.rut='\" + campo + \"';\";\r\n break;\r\n case 2:\r\n CadSql = \"SELECT c.cod_venta, c.abono, c.total FROM credito c, clientes cli WHERE cli.id=c.id_cliente AND cli.rut='\" + campo + \"';\";\r\n break;\r\n }\r\n try {\r\n String[] datos = new String[3];\r\n Statement st = this.cn.createStatement();\r\n ResultSet rs = st.executeQuery(CadSql);\r\n while (rs.next()) {\r\n datos[0] = rs.getString(1);\r\n datos[1] = rs.getString(2);\r\n datos[2] = rs.getString(3);\r\n modelo.addRow(datos);\r\n }\r\n if (numero == 1) {\r\n tbIngresoAbonos.setModel(modelo);\r\n } else if (numero == 2) {\r\n tblistadoclientescredito.setModel(modelo);\r\n }\r\n\r\n //if(numero==1){interfaz_venta_.tbventa.setModel(modelo);}else{interfaz_administracion.tblistado.setModel(modelo);}\r\n } catch (Exception ex) {\r\n //JOptionPane.showMessageDialog(null, ex);\r\n }\r\n }", "protected void dataTableleibie(int i) {\n\t\r\n}", "void testeAcessos() {\n System.out.println(formaDeFalar);// acessa por herança\n System.out.println(todosSabem);\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "public Complementos() {\n initComponents();\n String cabecera []={\"Producto\",\"Precio\"};\nString datos[][]={};\nboolean t=true;\nboolean f=false;\nmodelo = new Tablachida(datos,cabecera);\ntabla.setModel(modelo);\nTableColumnModel columnModel = tabla.getColumnModel();\ncolumnModel.getColumn(0).setPreferredWidth(250);\ntabla.setRowHeight(40);\n\n }", "public void setContrasena(String contrasena) {this.contrasena = contrasena;}", "String[] chiediSecondaScommessa();", "Juego(){\r\n\r\n GridLayout layout = new GridLayout(1,2);\r\n\tsetLayout(layout);\r\n\t\t\r\n\t// Creacion del tablero del contrincante (computadora)\t\r\n\t\r\n t_contrincante = new Tablero(false);\r\n\tadd(t_contrincante);\r\n\t\t\t\t\r\n\t// Creacion del tablero del jugador\r\n\t\t\t\t\r\n t_jugador = new Tablero(true);\r\n\tadd(t_jugador);\r\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public void realtorioCli() throws ClassNotFoundException, FileNotFoundException, DocumentException, SQLException {\r\n ContCli cocli = new ContCli();\r\n \r\n\r\n //Instancia um novo documento\r\n Document doc = new Document();\r\n \r\n //Define o local do documento\r\n PdfWriter objpdf = PdfWriter.getInstance(doc, new FileOutputStream(\"relatorioClientes.pdf\"));\r\n doc.open();\r\n PdfPTable tb = new PdfPTable(1);\r\n tb.setWidthPercentage(50);\r\n tb.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n tb.setSpacingAfter(10f);\r\n tb.setSpacingBefore(10f);\r\n \r\n PdfPCell cel = new PdfPCell(new Paragraph(\"Relatório Clientes.\"));\r\n cel.setBorderColor(BaseColor.BLACK);\r\n cel.setPaddingLeft(10);\r\n cel.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n cel.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n tb.addCell(cel);\r\n\r\n doc.add(tb);\r\n\r\n try {\r\n PdfPTable tabela = new PdfPTable(4); // 4 colunas.\r\n tabela.setWidthPercentage(100); //largura 100%\r\n tabela.setSpacingBefore(10f); //espaços antes da tabela\r\n tabela.setSpacingAfter(10f); //espaços antes da tabela\r\n\r\n float[] larguraColuna = {1f, 1f, 1f, 1f};\r\n tabela.setWidths(larguraColuna);\r\n\r\n PdfPCell celula01 = new PdfPCell(new Paragraph(\"Código\"));\r\n celula01.setBorderColor(BaseColor.BLACK);\r\n celula01.setPaddingLeft(10);\r\n celula01.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula01.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n PdfPCell celula02 = new PdfPCell(new Paragraph(\"Nome\"));\r\n celula02.setBorderColor(BaseColor.BLACK);\r\n celula02.setPaddingLeft(10);\r\n celula02.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula02.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n PdfPCell celula03 = new PdfPCell(new Paragraph(\"CPF\"));\r\n celula03.setBorderColor(BaseColor.BLACK);\r\n celula03.setPaddingLeft(10);\r\n celula03.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula03.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n PdfPCell celula04 = new PdfPCell(new Paragraph(\"Divida\"));\r\n celula04.setBorderColor(BaseColor.BLACK);\r\n celula04.setPaddingLeft(10);\r\n celula04.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula04.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n tabela.addCell(celula01);\r\n tabela.addCell(celula02);\r\n tabela.addCell(celula03);\r\n tabela.addCell(celula04);\r\n for (Cliente cli : cocli.selecCli()) {\r\n\r\n //Set Column widths\r\n //Para evitar que a borda da célula e o conteúdo se sobreponham, \r\n //se você tiver tendo bordas de células grossas\r\n //celula01.setUserBorderPadding(true);\r\n //celula02.setUserBorderPadding(true);\r\n //celula03.setUserBorderPadding(true);\r\n doc.add(new Paragraph());\r\n\r\n celula01 = new PdfPCell(new Paragraph(\"\" + cli.getCod()));\r\n celula01.setBorderColor(BaseColor.BLACK);\r\n celula01.setPaddingLeft(10);\r\n celula01.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula01.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n celula02 = new PdfPCell(new Paragraph(cli.getNome()));\r\n celula02.setBorderColor(BaseColor.BLACK);\r\n celula02.setPaddingLeft(10);\r\n celula02.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula02.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n celula03 = new PdfPCell(new Paragraph(cli.getCpf()));\r\n celula03.setBorderColor(BaseColor.BLACK);\r\n celula03.setPaddingLeft(10);\r\n celula03.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula03.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n celula04 = new PdfPCell(new Paragraph(\"R$\" + cli.getDiv()));\r\n celula04.setBorderColor(BaseColor.BLACK);\r\n celula04.setPaddingLeft(10);\r\n celula04.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n celula04.setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n tabela.addCell(celula01);\r\n tabela.addCell(celula02);\r\n tabela.addCell(celula03);\r\n tabela.addCell(celula04);\r\n\r\n// String linha = \"\";\r\n// linha += (\"Codigo: \" + contatos.getCodigoContato());\r\n// linha += (\" Nome: \" + contatos.getNomeContato());\r\n// linha += (\" Celular: \" + contatos.getNumCelular());\r\n// linha += (\" Fixo: \" + contatos.getNumFixo());\r\n// documento.add(new Paragraph(linha));\r\n }\r\n doc.add(tabela);\r\n\r\n doc.close();\r\n objpdf.close();\r\n doc.close();\r\n objpdf.close();\r\n } catch (DocumentException e) {\r\n e.printStackTrace();\r\n }\r\n PDF pd = new PDF();\r\n pd.abreArquivoPdf(\"relatorioClientes.pdf\");\r\n }", "@Override\n public void onCreate (SQLiteDatabase sqLiteDatabase){\n sqLiteDatabase.execSQL(\"create table if not exists \"+nama_table+\" (judul varchar(50) primary key, deskripsi varchar(50), priority varchar(50)) \");\n }", "private void setTitulo(String titulo) {\n\t\tthis.titulo = titulo;\n\t}", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "public Eingabetabelle(Component parent, String lokaleDB) {\n this.parent = parent;\n this.lokaleDB = lokaleDB;\n }", "public void mostrarTablero(){\n for(int fila = 0; fila < FILAS; fila++){\n for(int columna : tablero[fila]){\n System.out.printf(\"%2d \", columna);\n }\n System.out.println();\n }\n }", "private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }", "public VentanaEventos(String categoria) {\n //usuarioMostrar = ControladorUsuario.buscarUsuario(nickUsuario);\n categoriaActual=categoria;\n initComponents();\n mostrarTabla();\n\n\n }", "public void datos_elegidos(){\n\n\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "public String getContrasena() {return contrasena;}", "TipeLayanan(String deskripsi)\r\n {\r\n this.deskripsi = deskripsi;\r\n }", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "public void cargarTablaFiltro(JTable table, int tipo, String restriccion) {\n\t\t\n\t\tString filtro = restriccion + \"-\" + tipo; \n\t\tList<CocheTaller> coches = mecanicoController.filtrarCocheTaller(filtro);\n\t\tString[] columnNames = {\"Marticula\", \"Marca\", \"Modelo\", \"DNI Cliente\", \"Mecanico\", \"Coste\", \"Estado\"};\n\t\t\n\t\tif (!coches.isEmpty()) {\n\t\t\t DefaultTableModel model = new DefaultTableModel();\n\t\t\t table.setModel(model);\n\t\t\t model.setColumnIdentifiers(columnNames);\n\t\t\t \n\t\t\t for (CocheTaller c : coches) {\n\t\t\t\t Object[] o = new Object[7];\n\t\t\t\t o[0] = c.getMatricula();\n\t\t\t\t o[1] = c.getMarca();\n\t\t\t\t o[2] = c.getModelo();\n\t\t\t\t o[3] = c.getDniCliente();\n\t\t\t\t o[4] = c.getMecanico();\n\t\t\t\t o[5] = c.getCoste() + \"€\";\n\t\t\t\t o[6] = mecanicoController.traducirEstado(c.getEstado());\n\t\t\t\t model.addRow(o);\n\t\t\t\t }\n\t\t} else {\n\t\t\tlogger.error(\"No se dispone ningun vehiculo con ese filtrado.\");\n\t\t}\n\t}" ]
[ "0.68905866", "0.64408976", "0.6221305", "0.6119263", "0.6104343", "0.60559785", "0.60194564", "0.60086656", "0.5994515", "0.5985101", "0.59825", "0.5966533", "0.5949518", "0.5917139", "0.5898619", "0.5861334", "0.5848811", "0.58002585", "0.57604045", "0.5750638", "0.5735348", "0.57317257", "0.57230276", "0.57229257", "0.57219625", "0.5701512", "0.57002276", "0.5673134", "0.5670965", "0.56314325", "0.5625351", "0.5608318", "0.5602275", "0.55980957", "0.5591216", "0.5584404", "0.5557821", "0.5540221", "0.5537889", "0.5535029", "0.5518412", "0.5512507", "0.55102116", "0.54983103", "0.5488693", "0.54773843", "0.5476805", "0.54751533", "0.54732364", "0.5454357", "0.5437836", "0.5434137", "0.5432932", "0.5430693", "0.5427703", "0.5419781", "0.54155445", "0.54109067", "0.5408797", "0.5403754", "0.5395253", "0.5389357", "0.53891754", "0.53890634", "0.53867996", "0.5385772", "0.53789026", "0.53779083", "0.53705025", "0.5363983", "0.5363043", "0.5362507", "0.53603727", "0.5356366", "0.5352244", "0.53493136", "0.5337855", "0.5333245", "0.5332179", "0.5332157", "0.53314936", "0.5327658", "0.5321754", "0.53207046", "0.53183", "0.53167254", "0.53158754", "0.53132665", "0.5312357", "0.529752", "0.52935505", "0.52930593", "0.528593", "0.52843916", "0.52818686", "0.52812517", "0.52807945", "0.527925", "0.52777004", "0.5277418", "0.52770436" ]
0.0
-1
TODO Autogenerated method stub
@Override public String getQueryDeExiste(Onibus entidade) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Getter and Setter ...
public SelectorType getType() { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n public void get() {}", "public void get() {\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "protected abstract Set method_1559();", "String setValue();", "public V get() {\n return value;\n }", "public String get();", "@Override\n String get();", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public abstract String get();", "public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public Object get()\n {\n return m_internalValue;\n }", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}", "public void setAge(int age) { this.age = age; }", "public Object getNewValue()\n {\n return newValue;\n }", "boolean get();", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public int\t\tget() { return value; }", "public void setdat()\n {\n }", "public int get () { return rating; }", "private ReadProperty()\r\n {\r\n\r\n }", "public int getAge() {return age;}", "public void setDataGetter(Object instance, Method method) {\n this.instance = instance;\n this.method = method;\n }", "public String getSetter() {\n return \"set\" + getCapName();\n }", "@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }", "public abstract void set(M newValue);", "@Override\n\tpublic void get() {\n\t\tSystem.out.println(\"this is get\");\n\t}", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "String get();", "String get();", "public String get()\n {\n return val;\n }", "public String get()\n {\n return this.string;\n }", "public final Object get() {\n return getValue();\n }", "public int geti(){\r\n return i;\r\n}", "public int getAge(){\n return age;\n }", "public T set(T obj);", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "public Object getValue() { return _value; }", "public Method getGetter() {\n return this.getter;\n }", "@Override\n Derived get();", "public void testBeforeSet() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def prop = 'hello' }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new PropertyAccessInterceptor(){\r\n\r\n public Object beforeGet(Object object, String property, InvocationCallback callback) {\r\n return null;\r\n }\r\n\r\n public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\r\n assertEquals(\"prop\", property);\r\n BeanWrapper bean = new BeanWrapperImpl(object);\r\n bean.setPropertyValue(\"prop\",\"success\");\r\n callback.markInvoked();\r\n }\r\n\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n return null;\r\n }\r\n\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return null;\r\n }\r\n });\r\n\r\n go.setProperty(\"prop\", \"newValue\");\r\n Object result = go.getProperty(\"prop\");\r\n assertNotNull(result);\r\n assertEquals(\"success\",result);\r\n }", "void setMyProperty1(Integer a) {}", "public void setPrice(double price){this.price=price;}", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n String expResult = \"nom1\";\n String result = instance.getNombre();\n assertEquals(expResult, result);\n }", "public Object getValue(){\n \treturn this.value;\n }", "public void setValue(Object value) { this.value = value; }", "public int getValue() { return 42; }", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "public interface Getter {\r\n\tObject get();\r\n}", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "private SetProperty(Builder builder) {\n super(builder);\n }", "public void setValue(S s) { value = s; }", "public int getSet() {\n return set;\n }", "public int getf(){\r\n return f;\r\n}", "public void setX(int x) { this.x=x; }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public int getAge()\r\n {\r\n return age;\r\n }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public Value restrictToGetter() {\n checkNotPolymorphicOrUnknown();\n if (getters == null)\n return theNone;\n Value r = new Value();\n r.getters = getters;\n return canonicalize(r);\n }", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "public int getlife(){\r\n return life;\r\n}", "public void setAge(int age);", "private Get() {}", "private Get() {}", "public int getx(){\r\n return z;\r\n}", "public void set(String name, Object value) {\n }", "@Before(order=0)\n\tpublic void getProperty() {\n\t\tconfigReader = new ConfigReaders();\n\t\tprop = configReader.init_prop();\n\t\t\n\t}", "public Object getValue() { return this.value; }", "@Override\n public Object getValue()\n {\n return value;\n }", "public void setValue(A value) {this.value = value; }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public int getNumber(){return number;}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public int setValue (int val);", "public Object getVal()\n { return val; }", "@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}", "public S getValue() { return value; }", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "public abstract void setValue(T value);", "public int getArmadura(){return armadura;}", "public void setU(String f){\n u = f;\n}", "public int value() { \n return this.value; \n }", "V getValue() {\n return value;\n }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public T get() {\n return object;\n }", "Object setValue(Object value) throws NullPointerException;", "int getNumber () { return number; }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "private void assignment() {\n\n\t\t\t}", "public Object getValue()\n {\n\treturn value;\n }" ]
[ "0.68083626", "0.6800042", "0.67520213", "0.67117226", "0.66788065", "0.66788065", "0.6601424", "0.65980583", "0.64219415", "0.642182", "0.64092326", "0.63693196", "0.6324252", "0.63241404", "0.6317272", "0.63074464", "0.6224437", "0.6215214", "0.6199678", "0.6185622", "0.61568236", "0.6139157", "0.6130158", "0.6110192", "0.6108434", "0.61036205", "0.61029387", "0.6088588", "0.6079057", "0.60647196", "0.6055364", "0.60481626", "0.60471594", "0.60452396", "0.60436434", "0.603657", "0.603657", "0.60319304", "0.6028777", "0.6008617", "0.6004759", "0.6000419", "0.5998699", "0.59810114", "0.5970604", "0.5965807", "0.59587467", "0.5955183", "0.59544384", "0.59466755", "0.5938998", "0.5929187", "0.59272605", "0.592549", "0.5923216", "0.5907169", "0.5906975", "0.5903148", "0.59027135", "0.59012574", "0.5894401", "0.58920825", "0.5891911", "0.58903104", "0.5888518", "0.58847326", "0.58759105", "0.58743143", "0.5874275", "0.58682394", "0.5866996", "0.5864047", "0.58634603", "0.58634603", "0.5859917", "0.58550876", "0.58505553", "0.58342016", "0.5815724", "0.58133185", "0.5812626", "0.5811595", "0.58078974", "0.58078974", "0.5803102", "0.5796394", "0.5787565", "0.5782853", "0.5780265", "0.5780188", "0.5778762", "0.5774972", "0.57712895", "0.5771092", "0.576348", "0.57628024", "0.57623464", "0.57613015", "0.57572174", "0.5756529", "0.5754952" ]
0.0
-1
Instantiates a new basic authentication credential.
public BasicAuthenticationCredentials(String userName, String password) { this.userName = userName; this.password = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AbstractCredentialModel createBasicCredential(String username, String password);", "public static CredentialsProvider basicAuthentication(String userName,String password) {\r\n\r\n\r\n\r\n\t\tCredentialsProvider provider = new BasicCredentialsProvider();\r\n\r\n\t\tUsernamePasswordCredentials credentials= new UsernamePasswordCredentials(userName,password);\r\n\r\n\t\tprovider.setCredentials(AuthScope.ANY, credentials);\r\n\r\n\r\n\r\n\t\treturn provider;\r\n\r\n\r\n\r\n\t}", "public BasicAuthInterceptor(String username, String password) {\r\n\t\tthis.username = username;\r\n\t\tthis.password = password;\r\n\t}", "public Credentials()\n {\n this(null, null, null, null);\n }", "public BasicAuthenticator (String realm) {\n this.realm = realm;\n }", "public static User createBasicUser () {\n User user = new User();\n user.setUsername(\"basicUser\");\n user.setPassword(\"secret\");\n user.setEmail(\"[email protected]\");\n user.setFirstName(\"firstName\");\n user.setLastName(\"lastName\");\n user.setPhoneNumber(\"123456789123\");\n user.setCountry(\"GB\");\n user.setEnabled(true);\n user.setDescription(\"A basic user\");\n user.setProfileImageUrl(\"https://blabla.images.com/basicuser\");\n\n return user;\n }", "@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 }", "public void getRequest_withBasicAuth() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n }", "public Basic() {}", "public String getBasicAuth() {\n String encodedAuth = Base64.getEncoder().encodeToString(\n String.format(\"%s:%s\", getUsername(), getPassword()).getBytes(StandardCharsets.UTF_8));\n // Return encoded basic auth header\n return \"Basic \" + encodedAuth;\n }", "public ClientCredentials() {\n }", "public com.vodafone.global.er.decoupling.binding.request.GetBasicAccount createGetBasicAccount()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetBasicAccountImpl();\n }", "@Bean\n public BasicCredentialsProvider abTestCredentialProvider() {\n BasicCredentialsProvider provider = new BasicCredentialsProvider();\n provider.setCredentials(abTestAuthScope(), abTestCredentials());\n return provider;\n }", "private AuthenticationScheme basic(String string, String string2) {\n\t\treturn null;\n\t}", "public ProfileTokenCredential() {\n super();\n new Random().nextBytes(addr_);\n new Random().nextBytes(mask_);\n }", "public BasicUserDetails(BasicUser user) {\n this.username = user.getUsername();\n this.bCryptHash = user.getBcrypthash();\n }", "CloudCredentialStatus create(@Nonnull AuthenticatedContext authenticatedContext);", "public void addBasicAuthentication() {\n\t\tAuthorization auth = new Authorization();\n\t\tauth.setUser(this.authUsername);\n\t\tauth.setPass(this.authPassword);\n\t\tauth.setURL(\"\");\n\n\t\tAuthManager authManager = new AuthManager();\n\t\tauthManager.setEnabled(true);\n\t\tauthManager.setName(\"HTTP Authorization Manager\");\n\t\tauthManager.getClearEachIteration();\n\t\tauthManager.addAuth(auth);\n\t\tauthManager.setProperty(TestElement.TEST_CLASS, AuthManager.class.getName());\n\t\tauthManager.setProperty(TestElement.GUI_CLASS, AuthPanel.class.getName());\n\n\t\tthis.testPlanHashTree.add(authManager);\n\t}", "@Nonnull\n public Credential getSPCredential() throws IOException {\n\n final ClassPathResource spKeyResource = new ClassPathResource(SP_KEY);\n Assert.assertTrue(spKeyResource.exists());\n final PrivateKey spPrivateKey = KeyPairUtil.readPrivateKey(spKeyResource.getInputStream());\n\n final ClassPathResource spCrtResource = new ClassPathResource(SP_CRT);\n Assert.assertTrue(spCrtResource.exists());\n final X509Certificate spEntityCert = (X509Certificate) CertUtil.readCertificate(spCrtResource.getInputStream());\n\n return new BasicX509Credential(spEntityCert, spPrivateKey);\n }", "public AuthCredentials(String scheme,String name,String password)\n {\n this.scheme = scheme;\n this.name = name;\n this.password = password;\n }", "public Builder credential(Credential newCredential) {\n credential = newCredential;\n return this;\n }", "public DefaultCredentialsProvider() {\n // nothing\n }", "public FuzzerAuthString(){\r\n\t\tusername = \"\";\r\n\t\tpassword = \"\";\r\n\t}", "protected static Credentials getServiceCredentials() throws AnaplanAPIException {\n if (authType == AUTH_TYPE.CERT) {\n try {\n return new Credentials(getCertificate(), getPrivateKey());\n } catch (Exception e) {\n throw new AnaplanAPIException(\"Could not initialise service credentials\", e);\n }\n } else if (authType == AUTH_TYPE.OAUTH) {\n return new Credentials(clientId);\n }\n return new Credentials(getUsername(), getPassphrase());\n }", "@Override\n\t\tpublic MyUserBasicInfo create() {\n\t\t\treturn new MyUserBasicInfo();\n\t\t}", "@Override // com.tencent.qcloud.core.auth.BasicLifecycleCredentialProvider\n public QCloudLifecycleCredentials fetchNewCredentials() throws QCloudClientException {\n if (this.secretId != null && this.secretKey != null) {\n return onGetCredentialFromLocal(this.secretId, this.secretKey);\n }\n if (this.httpRequest == null) {\n return null;\n }\n try {\n return onRemoteCredentialReceived((String) ((HttpResult) QCloudHttpClient.getDefault().resolveRequest(this.httpRequest).executeNow()).content());\n } catch (QCloudServiceException e) {\n throw new QCloudClientException(\"get session json fails\", e);\n }\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 }", "private DefaultHttpClient createHttpClient()\n throws IOException\n {\n XCapCredentialsProvider credentialsProvider\n = new XCapCredentialsProvider();\n credentialsProvider.setCredentials(\n AuthScope.ANY,\n new UsernamePasswordCredentials(getUserName(), password));\n\n return HttpUtils.getHttpClient(\n null , null, uri.getHost(), credentialsProvider);\n }", "public AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);", "public void getCredentials() throws IOException, GeneralSecurityException {\n\n KeyPairGenerator keyGenerator = KeyPairGenerator.getInstance(keyAlg);\n keyGenerator.initialize(keySize);\n keypair = keyGenerator.genKeyPair();\n Security.addProvider(new BouncyCastleProvider());\n \n PKCS10CertificationRequest pkcs10 = null;\n try{\n \tpkcs10 = generateCertificationRequest(DN, keypair);\n }\n catch(Exception ex){\n \tthrow new GeneralSecurityException(ex);\n }\n getCredentials(pkcs10.getEncoded());\n }", "public static X500PrivateCredential createRootCredential() throws Exception {\n KeyPair rootPair = generateRSAKeyPair();\n X509Certificate rootCert = generateRootCert(rootPair);\n\n return new X500PrivateCredential(rootCert, rootPair.getPrivate(), ROOT_ALIAS);\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public void initialize(AS400BasicAuthenticationPrincipal principal,\n String password, boolean isPrivate, boolean isReusable, \n boolean isRenewable, int timeoutInterval)\n throws Exception {\n if (Trace.isTraceOn())\n Trace.log(Trace.INFORMATION,\n new StringBuffer(\"Initializing credential >> \"\n ).append(toString()\n ).append(\", for principal >> \"\n ).append(principal.toString()\n ).append(\", isPrivate == \"\n ).append(isPrivate\n ).append(\", isReusable == \"\n ).append(isReusable\n ).append(\", isRenewable == \"\n ).append(isRenewable\n ).append(\", timeoutInterval == \"\n ).append(timeoutInterval\n ).toString());\n\n // Validate parameters\n if (isRenewable && !isReusable) {\n Trace.log(Trace.ERROR, \"Profile tokens must be multi-use\" +\n \" if declared as regenerable.\");\n throw new ExtendedIllegalArgumentException(\"isReusable\",\n ExtendedIllegalArgumentException.PARAMETER_VALUE_NOT_VALID);\n }\n // Assign to the local host system\n AS400 sys = AuthenticationSystem.localHost();\n setSystem(sys);\n // Assign an appropriate principal\n AS400Principal pr =\n (AS400Principal.class.isAssignableFrom(principal.getClass()))\n ? (AS400Principal)principal\n : new UserProfilePrincipal(sys, principal.getUserProfileName());\n setPrincipal(pr);\n // Assign profile token attributes\n private_ = isPrivate;\n setTimeoutInterval(timeoutInterval);\n if (isRenewable) setTokenType(TYPE_MULTIPLE_USE_RENEWABLE);\n else if (isReusable) setTokenType(TYPE_MULTIPLE_USE_NON_RENEWABLE);\n else setTokenType(TYPE_SINGLE_USE);\n // Generate the token\n setTokenExtended(pr, password);\n }", "public void setBasicAuthorization(String userName, String password)\n\t{\n\t\tString credentials = userName + \":\" + password;\n\t\tString base64Credentials = new String(Base64.getEncoder().encode(\n\t\t\t\tcredentials.getBytes()));\n\t\tsetHeader(AUTHORIZATION, \"Basic \" + base64Credentials);\n\t}", "abstract public AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);", "public Credential getCredential() {\n return this.credential;\n }", "public void setBasicAuthenticationChallenge()\n\t{\n\t\tsetHeader(AUTHENTICATE, \"Basic realm='myRealm'\");\n\t}", "AbstractCredentialModel createOAuthCredential(EmployeeModel employee);", "@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 }", "public BasicResponse() {\n }", "private static String buildBasicAuthHeader(String apiKey, String secretKey) {\n return \"Basic \"\n + Base64.encodeToString((apiKey + \":\" + secretKey).getBytes(), Base64.NO_WRAP);\n }", "public ClientSecretCredential() {\n this(new IdentityClientOptions());\n }", "private HttpRequestInitializer getCredentials(final NetHttpTransport HTTP_TRANSPORT, TCC tcc) throws IOException {\n\t\tlogger.debug(\"Obtendo credenciais...\");\n\t\tString credentialsPath = CREDENTIALS_FILE_PATH + tcc.getAluno().getCurso().getCodigoCurso() + \".json\";\n\t\tlogger.debug(\"Caminho do arquivo de credenciais: \" + credentialsPath);\n\t\tGoogleCredentials credentials = GoogleCredentials.fromStream(new FileInputStream(credentialsPath));\n\t\tcredentials = credentials.createScoped(SCOPES);\n\t\tcredentials.refreshIfExpired();\n\t\tHttpRequestInitializer requestInitializer = new HttpCredentialsAdapter(credentials);\n\t\treturn requestInitializer;\n\t}", "public AuthPacket()\n\t{\n\t\tuserID = \"\";\n\t\tpassword = \"\";\n\t\tstudentName = \"\";\n\t\tnew_password = \"\";\n\t\tchangePass = false;\n\t\tgrantAccess = false;\n\t\tstandard = -1;\n\t\terrorCode = -1;\n\t}", "public com.vodafone.global.er.decoupling.binding.request.GetBasicAccountType createGetBasicAccountType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetBasicAccountTypeImpl();\n }", "public BasicAuthFactory(Configuration conf) {\n this.conf = conf;\n }", "GoogleAuthenticatorKey createCredentials();", "public static HttpHeaders createHeaders(final String username, final String password ){\n HttpHeaders headers = new HttpHeaders(){\n {\n String auth = username + \":\" + password;\n byte[] encodedAuth = Base64.encodeBase64(\n auth.getBytes(Charset.forName(\"US-ASCII\")) );\n String authHeader = \"Basic \" + new String( encodedAuth );\n set( \"Authorization\", authHeader );\n }\n };\n headers.add(\"Content-Type\", \"application/xml\");\n headers.add(\"Accept\", \"application/xml\");\n\n return headers;\n }", "@Override\n protected HttpContext createHttpContext()\n {\n HttpContext context = new BasicHttpContext();\n context.setAttribute(ClientContext.AUTHSCHEME_REGISTRY,\n getAuthSchemes());\n context.setAttribute(ClientContext.COOKIESPEC_REGISTRY,\n getCookieSpecs());\n context.setAttribute(ClientContext.CREDS_PROVIDER,\n getCredentialsProvider());\n return context;\n }", "java.lang.String getCred();", "@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 }", "public QCloudLifecycleCredentials onGetCredentialFromLocal(String secretId2, String secretKey2) throws QCloudClientException {\n long current = System.currentTimeMillis() / 1000;\n String keyTime = current + \";\" + (current + this.duration);\n return new BasicQCloudCredentials(secretId2, secretKey2SignKey(secretKey2, keyTime), keyTime);\n }", "public Principal() {\r\n\t\tinitialize();\r\n\t}", "@Test\n public void fromJson() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions options = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(options);\n }", "@Test\n public void testBasicAuthAccountFail() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"NOTadmin\", \"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(401));\n }", "public FederatedIdentityCredentialInner() {\n }", "@SuppressWarnings(\"all\")\n\tprivate static HttpHeaders createHeaders(final String username,\n\t\t\tfinal String password) {\n\t\tHttpHeaders headers = new HttpHeaders() {\n\t\t\t{\n\t\t\t\tString auth = username + \":\" + password;\n\t\t\t\tbyte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset\n\t\t\t\t\t\t.forName(\"US-ASCII\")));\n\t\t\t\tString authHeader = \"Basic \" + new String(encodedAuth);\n\t\t\t\tset(\"Authorization\", authHeader);\n\t\t\t}\n\t\t};\n\t\theaders.setContentType(MediaType.APPLICATION_JSON);\n\t\theaders.setAccept(new ArrayList<MediaType>() {\n\t\t\t{\n\t\t\t\tadd(MediaType.APPLICATION_JSON);\n\t\t\t}\n\t\t});\n\n\t\treturn headers;\n\t}", "public Builder(@NonNull org.openyolo.proto.Credential proto) {\n mProtoBuilder = new org.openyolo.proto.Credential.Builder();\n\n // required properties\n setIdentifier(proto.id);\n setAuthenticationDomain(new AuthenticationDomain(proto.authDomain));\n setAuthenticationMethod(proto.authMethod);\n\n // optional properties\n setDisplayName(proto.displayName);\n setDisplayPicture(proto.displayPictureUri);\n setPassword(proto.password);\n setAdditionalProperties(\n CollectionConverter.toMap(\n proto.additionalProps,\n KeyValuePairConverters.CONVERTER_KVP_TO_PAIR));\n }", "@Test\n public void testBasicAuthHeader() {\n final String shellEncoded = \"Basic YWRtaW46YWRtaW5fcGFzcw==\";\n final String[] decoded = BasicAuthUtils.extractAndDecodeAuthHeader(shellEncoded, UTF_8.name());\n assertEquals(\"admin\", decoded[0]);\n assertEquals(\"admin_pass\", decoded[1]);\n\n assertEquals(shellEncoded, verify(\"admin\", \"admin_pass\"));\n }", "@Test\n public void testAllowCredentialsEmpty() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions makeCredentialOptions = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(makeCredentialOptions);\n\n AuthenticatorGetAssertionOptions getAssertionOptions = AuthenticatorGetAssertionOptions.fromJSON(GET_ASSERTION_JSON);\n getAssertionOptions.allowCredentialDescriptorList.clear();\n authenticator.getAssertion(getAssertionOptions, new CredentialSelector() {\n @Override\n public PublicKeyCredentialSource selectFrom(List<PublicKeyCredentialSource> credentialList) {\n return credentialList.get(0);\n }\n });\n }", "protected static String buildAuthHeader(String username, String password) throws UnsupportedEncodingException {\n // apparently netty isn't familiar with HTTP Basic Auth\n StringBuilder clearText = new StringBuilder(username);\n clearText.append(':');\n if (password != null) {\n clearText.append(password);\n }\n String headerResult;\n headerResult = \"Basic \" + Base64.encodeBase64String(clearText.toString().getBytes(\"UTF-8\"));\n\n if (headerResult.endsWith(\"\\r\\n\")) {\n headerResult = headerResult.substring(0, headerResult.length() - 2);\n }\n\n return headerResult;\n }", "@Test\n public void testBasicAuthUserFail() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"NOTadmin\", \"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(401));\n }", "GoogleAuthenticatorKey createCredentials(String userName);", "private static GSSCredential getClientCredential(final Subject subject,\n final GSSManager MANAGER,\n final Oid kerboid) throws PrivilegedActionException {\n final PrivilegedExceptionAction<GSSCredential> action = new PrivilegedExceptionAction<GSSCredential>() {\n public GSSCredential run() throws GSSException {\n return MANAGER.createCredential(null // use the default principal\n , GSSCredential.DEFAULT_LIFETIME, kerboid, GSSCredential.INITIATE_ONLY);\n }\n };\n // TO support java 5, 6 we have to do this\n // The signature for Java 5 returns an object 6 returns GSSCredential, immediate casting throws \n // warning in Java 6.\n Object credential = Subject.doAs(subject, action);\n return (GSSCredential) credential;\n }", "@Given(\"^The app (.+) auth (.+) and (.+)$\")\n\tpublic void the_app_auth_and(String url, String username, String password) throws IOException {\n\t\tLOGGER.info(\"Starting to test the Basic Auth \");\n\t\tboolean turnOffSSL = url.contains(\"8443\")?true:false;\n\t\trestTemplate = RestTemplateUtils.newRestTemplate(turnOffSSL);\n\t\trestTemplate.getInterceptors().add(CPEHeaderInterceptor.Builder.fromBasicAuth(username, password).build());\n\t\tthis.url = url;\n\t}", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "public Credentials(String user, String password) {\r\n\t\tthis.user = user;\r\n\t\tthis.password = password;\r\n\t}", "public Authentication(String email, String password) {\n this.email = email;\n this.password = password;\n }", "@Override\n public void intercept(RequestFacade request) {\n String string = \"Basic \" + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);\n request.addHeader(\"Authorization\", string);\n request.addHeader(\"Accept\", \"application/json\");\n }", "public AuthorizationInfo() {\n }", "public Object credentials() {\n return cred;\n }", "private void openBasicAuthPage(String login, String password) {\n\n String url = \"https://\" + login + \":\" + password + \"@\" + \"the-internet.herokuapp.com/digest_auth\";\n driver.get(url);\n }", "public Authentication(String user, char[] password) {\n this.user = user;\n this.password = password;\n }", "public CredentialBag()\n {\n credentialBag = new Vector();\n }", "public TokenInfo createToken(TokenCoreInfo coreInfo, String password);", "public Customer(String username, String firstname, String lastname, String password) {\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.password = password;\n }", "@Override\r\n\tpublic Credential getCredential() {\n\t\treturn null;\r\n\t}", "public RESTWorkItemHandler(String username, String password) {\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.type = AuthenticationType.BASIC;\n\t}", "public BasicScheme(final String challenge) throws MalformedChallengeException {\n super(challenge);\n }", "protected User(String username,String password,AccessLevel accessLevel){\n this.username = username;\n this.password = encryptPassword(password);\n this.accessLevel = accessLevel;\n this.name = DEFAULT_NAME;\n this.telephone = DEFAULT_TELEPHONE;\n this.email = DEFAULT_EMAIL;\n checkRep();\n }", "public UserApiClient(String username, String password)\r\n {\r\n client = HttpClientFactory.getUserClient();\r\n configureClient(username, password);\r\n }", "public String[] getBasicAuthorization()\n\t{\n\t\tString authHeaderValue = getHeaderValue(AUTHORIZATION);\n\t\t\n\t\tif (authHeaderValue != null)\n\t\t{\n\t\t\tint cutLenght = \"Basic\".length();\n\t\t\tif (authHeaderValue.length() < cutLenght || !authHeaderValue.substring(0, \n\t\t\t\t\tcutLenght).equalsIgnoreCase(\"Basic\"))\n\t\t\t\treturn null;\n\t\t\t\n\t\t\t// Basic authorization uses base64 encoding\n\t\t\tString base64Credentials = authHeaderValue.substring(cutLenght).trim();\n\t String credentials = new String(Base64.getDecoder().decode(base64Credentials),\n\t Charset.forName(\"UTF-8\"));\n\t \n\t // The user name and password are separated with ':'\n\t return credentials.split(\"\\\\:\", 2);\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public ToLAuthenticator(String user, String pw) {\n username = user;\n password = pw;\n }", "private AuthenticationService() {}", "private ModelAndView handleScriptBasicAuth(HttpServletRequest request, HttpServletResponse response)\n {\n\tfinal HttpSession session = request.getSession();\n\tString http_basic_auth = null, http_basic_auth_username = null, http_basic_auth_password = null, openid = null;\n\tBoolean user_authenticated = false;\n\tbyte[] byteArray = null;\n\thttp_basic_auth = request.getHeader(\"Authorization\");\n\t \n\t \n\tString http_basic_auth_enc = http_basic_auth.replaceAll(\"Basic \", \"\");\n\tbyteArray = Base64.decodeBase64(http_basic_auth_enc.getBytes());\n\tString http_basic_auth_dec = new String(byteArray);\n\tString[] parts = http_basic_auth_dec.split(\":\");\n\thttp_basic_auth_username = parts[0];\n\thttp_basic_auth_password = parts[1];\n\t \n\tif (LOG.isDebugEnabled()) LOG.debug(\"Attempting authentication with user=\"+http_basic_auth_username+\" password=\"+http_basic_auth_password);\n\t\t\n\tuser_authenticated = idp.authenticate_ids(http_basic_auth_username, http_basic_auth_password);\n\topenid = idp.getOpenid(http_basic_auth_username);\t\t\n\t\t\n\tif((user_authenticated) && (openid != null)) \n\t{\n\t return setPositiveSessionAuth(session, openid);\n\t} \n\telse\n\t{\n\t // set session-scope authentication flag to FALSE\n\t session.setAttribute(OpenidPars.SESSION_ATTRIBUTE_AUTHENTICATED, Boolean.FALSE);\n\t if (LOG.isDebugEnabled()) LOG.debug(\"Authentication error\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t return null;\n\t}\n }", "public DatabaseOptions auth(String username, String password) {\n this.username = username;\n this.password = password;\n return this;\n }", "public AuthRecord() {\n super(Auth.AUTH);\n }", "public String getCredentials();", "public void TC_04_Authentication_Alert() {\n\n\t\tdriver.get(\"http://admin:[email protected]/basic_auth\");\n\t}", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public Builder credentials(String credentials) {\n this.credentials = credentials;\n return this;\n }", "public static BasicCredential parseAuthHeader(String authHeader) {\n Matcher m = AUTH_HEADER_PATTERN.matcher(authHeader.trim());\n if (!m.matches()) {\n return null;\n }\n\n String encoded = m.group(1).trim();\n String decoded = new String(base64Decode(encoded));\n m = AUTH_PARAMETER_PATTERN.matcher(decoded);\n if (!m.matches()) {\n return null;\n }\n\n String username = m.group(1);\n String password = m.group(2);\n return new BasicCredential(username, password);\n }", "private AuthenticationData() {\n\n }", "public IAuthorizationPrincipal newPrincipal(String key, Class type);", "RESTClient(String serverName, String omasServerURL, String userId, String password)\n {\n this.serverName = serverName;\n this.omasServerURL = omasServerURL;\n\n RestTemplateBuilder restTemplateBuilder = new RestTemplateBuilder();\n\n this.restTemplate = restTemplateBuilder.basicAuthentication(userId, password).build();\n }", "public NewMember(String username, String password, String email) {\n this.username = username;\n this.password = password;\n this.email = email;\n this.has_role = \"User\";\n this.signingDate = new Date(System.currentTimeMillis());\n }", "public BasicDoctor(String name)\n {\n this.name = name;\n }", "public OwSimpleUserInfo(String user_p, String password_p)\r\n {\r\n m_username = user_p;\r\n }" ]
[ "0.8156229", "0.6726458", "0.6226436", "0.6220893", "0.61392236", "0.6112525", "0.6089058", "0.6080057", "0.6021232", "0.6020238", "0.5970875", "0.5930668", "0.58766645", "0.58445394", "0.5840804", "0.5763283", "0.5752779", "0.5718015", "0.57053083", "0.56865674", "0.5619745", "0.5596147", "0.55679286", "0.5563699", "0.5562544", "0.54882365", "0.5455384", "0.54516846", "0.5440937", "0.5408119", "0.540532", "0.5401041", "0.5401041", "0.5401041", "0.53929937", "0.539058", "0.53743494", "0.53503215", "0.5344532", "0.5332927", "0.5306663", "0.5304512", "0.5300678", "0.529837", "0.5295994", "0.5292354", "0.52812386", "0.52778596", "0.52768064", "0.5269434", "0.52632576", "0.5260961", "0.5258542", "0.5258488", "0.5251181", "0.52311206", "0.5226569", "0.51735926", "0.5153875", "0.5148274", "0.51348186", "0.51187664", "0.5118191", "0.5117087", "0.5111807", "0.50889075", "0.5077005", "0.50740665", "0.50715685", "0.5058717", "0.5047502", "0.5044426", "0.5037496", "0.5035927", "0.50317746", "0.5024004", "0.5001345", "0.4997166", "0.49926952", "0.4971201", "0.49590498", "0.495758", "0.49533284", "0.4950548", "0.49327093", "0.49309924", "0.49193737", "0.49146786", "0.4914468", "0.49094254", "0.4908753", "0.48995054", "0.48933208", "0.48851356", "0.4872074", "0.48684597", "0.4867259", "0.48644027", "0.48610812", "0.48542306" ]
0.68971014
1
TODO handle case when no annotation etc... noinspection unchecked
private <T> Constructor<? extends T> findConstructorForInjection(Class<? extends T> impl) { return (Constructor<? extends T>) Arrays.stream(impl.getConstructors()) .filter(con -> con.getAnnotation(Inject.class) != null) .findFirst() .orElseThrow(ConstructorNotFoundException::new); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Annotation annotate() {\n\t\treturn null;\r\n\t}", "public Framework_annotation<T> build_annotation();", "public abstract Annotations mo30682c();", "private AnnotatedTypes() { throw new AssertionError(\"Class AnnotatedTypes cannot be instantiated.\");}", "public Framework_annotation<T> build_normal();", "public interface AnnotationValue {\n}", "public abstract Annotations getClassAnnotations();", "public abstract AnnotationMap mo30683d();", "@Override\n public void visit(Tree.AnnotationList al) {\n }", "boolean hasExplicitAnnotation();", "boolean hasExplicitAnnotation();", "public interface SourceAnnotation {\n\n void annotate(AnnotationHolder holder, Document document, int sourceOffset);\n\n}", "public String getAnnotation();", "@MyFirstAnnotation(name = \"Tom\")\n public void someMethod() {\n\n }", "public interface Framework_annotation<T extends Annotation> {\n \n // a builder call which returns the original Framework object\n public Framework_annotation<T> build_normal();\n \n // a builder call which requires that the T be of type Annotation or a subtype of that\n public Framework_annotation<T> build_annotation();\n \n // a call which returns a T element\n public <U extends T> U get();\n \n \n}", "public abstract boolean mo30680a(Annotation annotation);", "@Override\n\tpublic void annotate(JDefinedClass cls) {\n\n\t}", "@Test\n public void test0() throws Throwable {\n PermissionAnnotationHandler permissionAnnotationHandler0 = new PermissionAnnotationHandler();\n // Undeclared exception!\n try {\n permissionAnnotationHandler0.getAnnotationValue((Annotation) null);\n fail(\"Expecting exception: NullPointerException\");\n } catch(NullPointerException e) {\n }\n }", "@Override\n public String getAnnotation() {\n return annotation;\n }", "@Override\n\tpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) {\n\t\treturn null;\n\t}", "Annotation getAnnotation();", "@Override\n\t\t\tpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n public String visit(AnnotationDeclaration n, Object arg) {\n return null;\n }", "@Override\n\tpublic Annotation[] getAnnotations() {\n\t\treturn null;\n\t}", "private BeanAnnotationUtils()\n\t{\n\t\tsuper();\n\t}", "public AnnotationInfoImpl()\n {\n }", "Annotation createAnnotation();", "Annotation createAnnotation();", "@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneClassRetention_ChangedAnnotationOrder() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneClassRetention_ChangedAnnotationOrder\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }", "boolean hasAnnotationValue();", "private <T extends Annotation> T findAnnotation(Annotation[] annotations, Class<T> cls) {\n for (Annotation annotation : annotations) {\n if (cls.isInstance(annotation)) {\n //noinspection unchecked\n return (T) annotation;\n }\n }\n return null;\n }", "public interface Named {\n\n /**\n *\n * @return Name of the object\n */\n @NotNull\n String getName();\n}", "AnnotationProvider getClassAnnotationProvider();", "private AnnotationTarget() {\n void var2_-1;\n void var1_-1;\n }", "@Override\n public String visit(NormalAnnotationExpr n, Object arg) {\n return null;\n }", "public abstract AnnotationCollector mo30681b(Annotation annotation);", "@Override\n public String visit(MarkerAnnotationExpr n, Object arg) {\n return null;\n }", "int getAnnotationSourceValue();", "public interface RawAnnotationSet<V> extends ReadableAnnotationSet<V> {\n\n /**\n * @see NindoCursor#begin()\n */\n void begin();\n\n /**\n * @see NindoCursor#finish()\n */\n void finish();\n\n /**\n * Content has been inserted into the document being annotated\n *\n * @param insertSize\n */\n void insert(int insertSize);\n\n String getInherited(String key);\n\n /**\n * Content has been removed from the document being annotated\n *\n * @param deleteSize\n */\n void delete(int deleteSize);\n\n /**\n */\n void skip(int skipSize);\n\n /**\n * @see ModifiableDocument#startAnnotation(String, String)\n */\n void startAnnotation(String key, V value);\n\n /**\n * @see ModifiableDocument#endAnnotation(String)\n */\n void endAnnotation(String key);\n\n /**\n * @return a live updated set of the known keys\n */\n ReadableStringSet knownKeysLive();\n\n public abstract class AnnotationEvent {\n final int index;\n final String key;\n\n private AnnotationEvent(int index, String key) {\n this.index = index;\n this.key = key;\n }\n\n abstract String getChangeKey();\n abstract String getChangeOldValue();\n abstract String getEndKey();\n }\n\n public final class AnnotationStartEvent extends AnnotationEvent {\n final String value;\n AnnotationStartEvent(int index, String key, String value) {\n super(index, key);\n// assert !Annotations.isLocal(key);\n this.value = value;\n }\n\n @Override\n String getChangeKey() {\n return key;\n }\n\n @Override\n String getChangeOldValue() {\n return value;\n }\n\n @Override\n String getEndKey() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"AnnotationStart \" + key + \"=\" + value + \" @\" + index;\n }\n }\n\n public final class AnnotationEndEvent extends AnnotationEvent {\n AnnotationEndEvent(int index, String key) {\n super(index, key);\n }\n\n\n @Override\n String getChangeKey() {\n return null;\n }\n\n @Override\n String getChangeOldValue() {\n return null;\n }\n\n @Override\n String getEndKey() {\n return key;\n }\n\n @Override\n public String toString() {\n return \"AnnotationEndEvent \" + key + \" @\" + index;\n }\n }\n\n}", "public interface AnnotationAccess\n{\n /**\n * Returns a provider for annotations on the service class and interface. This will reflect annotations defined by\n * the implementation class itself, plus annotations defined by the service interface (implementation class\n * annotations take precedence).\n * @return an AnnotationProvider instance.\n */\n AnnotationProvider getClassAnnotationProvider();\n\n /**\n * Returns a provider for annotations of a method of the class. This includes annotations on\n * the implementation method, plus annotations on the corresponding service interface method\n * (if such a method exists), with precedence on the implementation class method annotations.\n * @param methodName the name of the method.\n * @param parameterTypes the types of the parameters of the method.\n * @return an AnnotationProvider instance. * \n */\n AnnotationProvider getMethodAnnotationProvider(String methodName, Class... parameterTypes);\n\n}", "org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2516);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2516, \"\", \"\", (String) null, \"\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation((String) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public Class<? extends Annotation> annotationType() {\n\t\treturn null;\r\n\t}", "@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneSourceRetention() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneSourceRetention\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 0, \"O8\", \"\", \"O8\", \"O8\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation((String) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneClassRetention() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneClassRetention\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }", "public T caseAnnotation(Annotation object)\n {\n return null;\n }", "public T caseAnnotation(Annotation object)\n {\n return null;\n }", "protected abstract void runReturnAnnotationHandler();", "public A annotation() {\n\t\treturn proxy(annotation, loader, className, map);\n\t}", "@MyFirstAnnotation(name=\"tom\",description=\"write by tom\")\n\tpublic UsingMyFirstAnnotation(){\n\t\t\n\t}", "public interface Annotator {\n\n\t/**\n\t * @param pamDataBlock Annotated datablock\n\t * @return the number of annotations\n\t */\n\tpublic int getNumAnnotations(PamDataBlock pamDataBlock);\n\t\n\t/**\n\t * Get an Annotation\n\t * @param pamDataBlock Annotated datablock\n\t * @param iAnnotation annotation number\n\t * @return Annotation\n\t */\n\tpublic Annotation getAnnotation(PamDataBlock pamDataBlock, int iAnnotation);\n}", "public void annotationsCouldNotBeAdded(String errorMessage) {}", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21188_failAssert19_add22480() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<java.lang.reflect.Type, com.squareup.javapoet.TypeVariableName> vc_9254 = (java.util.Map)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_9254);\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_9252 = (java.lang.reflect.Type)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_9252);\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_9250 = (com.squareup.javapoet.TypeName)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_9250);\n // StatementAdderMethod cloned existing statement\n // MethodCallAdder\n vc_9250.get(vc_9252, vc_9254);\n // StatementAdderMethod cloned existing statement\n vc_9250.get(vc_9252, vc_9254);\n org.junit.Assert.fail(\"annotatedType_cf21188 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "@Override\n public boolean canFix(Annotation annotation) {\n return false;\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-3081));\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2, \"/<pZ'q@6=nfTa}5<G9U\", \"7(I\\\"*\", \"/<pZ'q@6=nfTa}5<G9U\", \"7(I\\\"*\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation((String) null, true);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21184_failAssert18() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_9248 = (java.lang.reflect.Type)null;\n // StatementAdderMethod cloned existing statement\n type.get(vc_9248);\n org.junit.Assert.fail(\"annotatedType_cf21184 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21219_failAssert26() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderMethod cloned existing statement\n type.unbox();\n org.junit.Assert.fail(\"annotatedType_cf21219 should have thrown UnsupportedOperationException\");\n } catch (java.lang.UnsupportedOperationException eee) {\n }\n }", "Set<? extends Class<? extends Annotation>> annotations();", "@MyAnnotation(\"abc\")\r\n\t@Override\r\n\tpublic String perform(String arg1) {\n\t\treturn \"hello \";\r\n\t}", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21147() {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // AssertGenerator replace invocation\n boolean o_annotatedType_cf21147__7 = // StatementAdderMethod cloned existing statement\n type.isBoxedPrimitive();\n // AssertGenerator add assertion\n org.junit.Assert.assertFalse(o_annotatedType_cf21147__7);\n org.junit.Assert.assertEquals(expected, actual);\n }", "public interface Annotation {\n\t\n\t/** Return the unique ID associated with the annotation */\n\tpublic String getId();\n\n\t/** Return the type of the annotation (such as \"laughter\", \"speaker\") according to Alveo */\n\tpublic String getType();\n\n\t/** Return the label assigned to the annotation\n\t */\n\tpublic String getLabel();\n\n\t/** Return the start offset of the annotation\n\t */\n\tpublic double getStart();\n\n\t/** Return the end offset of the annotation\n\t */\n\tpublic double getEnd();\n\n\t/** Return the <a href=\"http://www.w3.org/TR/json-ld/#typed-values\">JSON-LD value type</a>\n\t */\n\tpublic String getValueType();\n\n\t/** Return a mapping containing URIs as keys corresponding to fields, and their matching values\n\t * This is used for converting to and from JSON\n\t *\n\t * The URIs correspond to JSON-LD URIs and therefore also to RDF predicate URIs on the server side\n\t *\n\t * @return a URI to value mapping\n\t */\n\tpublic Map<String, Object> uriToValueMap();\n\n\tpublic Document getAnnotationTarget();\n\n\n}", "@Test\n public void canDetect_ParameterAnnotation_WithRuntimeRetention() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"parameterAnnotation_WithRuntimeRetention\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }", "@org.junit.Test(timeout = 10000)\n public void annotated_cf14_cf552_failAssert16() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n com.squareup.javapoet.TypeName simpleString = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n // MethodAssertGenerator build local variable\n Object o_3_0 = simpleString.isAnnotated();\n // MethodAssertGenerator build local variable\n Object o_5_0 = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n com.squareup.javapoet.TypeName annotated = simpleString.annotated(NEVER_NULL);\n // MethodAssertGenerator build local variable\n Object o_9_0 = annotated.isAnnotated();\n // AssertGenerator replace invocation\n boolean o_annotated_cf14__11 = // StatementAdderMethod cloned existing statement\n annotated.isPrimitive();\n // MethodAssertGenerator build local variable\n Object o_13_0 = o_annotated_cf14__11;\n // StatementAdderOnAssert create null value\n java.util.Map<javax.lang.model.element.TypeParameterElement, com.squareup.javapoet.TypeVariableName> vc_264 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_262 = (javax.lang.model.type.TypeMirror)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_260 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_260.get(vc_262, vc_264);\n // MethodAssertGenerator build local variable\n Object o_23_0 = annotated.annotated();\n org.junit.Assert.fail(\"annotated_cf14_cf552 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "public interface C2277a {\n String getNameType();\n\n @DrawableRes\n int getStatusIcon();\n\n @Nullable\n String getTagName();\n}", "public boolean usesTypeAnnotations() {\n return true;\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21206_failAssert23() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<javax.lang.model.element.TypeParameterElement, com.squareup.javapoet.TypeVariableName> vc_9264 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_9262 = (javax.lang.model.type.TypeMirror)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_9260 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_9260.get(vc_9262, vc_9264);\n org.junit.Assert.fail(\"annotatedType_cf21206 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedArgumentOfParameterizedType_cf924_cf1605_failAssert31() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"java.util.List<@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String>\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n com.squareup.javapoet.ClassName list = com.squareup.javapoet.ClassName.get(java.util.List.class);\n java.lang.String actual = com.squareup.javapoet.ParameterizedTypeName.get(list, type).toString();\n // AssertGenerator replace invocation\n boolean o_annotatedArgumentOfParameterizedType_cf924__10 = // StatementAdderMethod cloned existing statement\n type.isAnnotated();\n // MethodAssertGenerator build local variable\n Object o_12_0 = o_annotatedArgumentOfParameterizedType_cf924__10;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_680 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_678 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_678.get(vc_680);\n org.junit.Assert.fail(\"annotatedArgumentOfParameterizedType_cf924_cf1605 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "@Override\n\tpublic Annotation[] getDeclaredAnnotations() {\n\t\treturn null;\n\t}", "BasicRestAnnotation() {\n\t}", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21192_failAssert20_add22488_cf25319_failAssert10() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<java.lang.reflect.Type, com.squareup.javapoet.TypeVariableName> vc_9254 = (java.util.Map)null;\n // MethodAssertGenerator build local variable\n Object o_11_0 = vc_9254;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_9252 = (java.lang.reflect.Type)null;\n // StatementAddOnAssert local variable replacement\n com.squareup.javapoet.TypeName simpleString = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n // StatementAdderMethod cloned existing statement\n simpleString.unbox();\n // MethodAssertGenerator build local variable\n Object o_20_0 = vc_9252;\n // StatementAdderMethod cloned existing statement\n // MethodCallAdder\n type.get(vc_9252, vc_9254);\n // StatementAdderMethod cloned existing statement\n type.get(vc_9252, vc_9254);\n org.junit.Assert.fail(\"annotatedType_cf21192 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n org.junit.Assert.fail(\"annotatedType_cf21192_failAssert20_add22488_cf25319 should have thrown UnsupportedOperationException\");\n } catch (java.lang.UnsupportedOperationException eee) {\n }\n }", "@Test\n public void canDetect_TwoAnnotations_WithRuntimeRetention_ForSingleParam() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"twoAnnotations_WithRuntimeRetention_ForSingleParam\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n\n assertThat(methodInfo.hasParameterAnnotation(SecondParamAnnoRuntime.class)).isTrue();\n }", "@Who(name = \"Jennifer\", age = 18)\npublic interface PersonInterface {\n}", "public abstract java.lang.Object a ( ) {\n/* .annotation system Ldalvik/annotation/Signature; */\n/* value = { */\n/* \"()TT;\" */\n/* } */\n}", "public interface JvmAnnotationAttribute {\n\n @NotNull\n String getAttributeName();\n\n @Nullable\n JvmAnnotationAttributeValue getAttributeValue();\n}", "@Word(word = \"First\", value = 1) \n\t public static void newMethod(){ \n\t\t FullAnnotationProgram obj = new FullAnnotationProgram(); \n\n\t try{ \n\t Class<?> c = obj.getClass(); \n\n\t // Obtain the annotation for newMethod \n\t Method m = c.getMethod(\"newMethod\"); \n\t \n\t // Display the full annotation \n\t Annotation anno = m.getAnnotation(CustomRepeatAnnots.class); \n\t System.out.println(anno); \n\t }catch (NoSuchMethodException e){ \n\t System.out.println(e); \n\t } \n\t }", "@Test\n public void test1() throws Throwable {\n PermissionAnnotationHandler permissionAnnotationHandler0 = new PermissionAnnotationHandler();\n permissionAnnotationHandler0.assertAuthorized((Annotation) null);\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21202_failAssert22_add22504() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_9258 = (javax.lang.model.type.TypeMirror)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_9258);\n // StatementAdderMethod cloned existing statement\n // MethodCallAdder\n type.get(vc_9258);\n // StatementAdderMethod cloned existing statement\n type.get(vc_9258);\n org.junit.Assert.fail(\"annotatedType_cf21202 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedTwice_cf16498_failAssert27() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" @java.lang.Override java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).annotated(com.squareup.javapoet.AnnotationSpec.builder(java.lang.Override.class).build()).toString();\n // StatementAdderMethod cloned existing statement\n type.unbox();\n org.junit.Assert.fail(\"annotatedTwice_cf16498 should have thrown UnsupportedOperationException\");\n } catch (java.lang.UnsupportedOperationException eee) {\n }\n }", "public interface CoreAnnotationProcessorEnv\n{\n /** Map of String -> String */\n Map getOptions();\n\n Messager getMessager();\n\n Filer getFiler();\n\n TypeDeclaration[] getSpecifiedTypeDeclarations();\n\n TypeDeclaration getTypeDeclaration( String s );\n\n Declaration[] getDeclarationsAnnotatedWith( AnnotationTypeDeclaration annotationTypeDeclaration );\n \n void setAttribute( String propertyName, Object value );\n \n Object getAttribute( String propertyName );\n}", "boolean hasAnnotationMetadata();", "private static interface Processor<T> {\n\n\t\t/**\n\t\t * Called to process the annotation.\n\t\t * @param annotation the annotation to process\n\t\t * @param depth the depth of the annotation relative to the initial match. For\n\t\t * example a matched annotation will have a depth of 0, a meta-annotation 1\n\t\t * and a meta-meta-annotation 2\n\t\t * @return the result of the processing or {@code null} to continue\n\t\t */\n\t\tT process(Annotation annotation, int depth);\n\t}", "public Object handleAnnotation(AnnotationMirror annotation) {\n @SuppressWarnings(\"unchecked\")\n List<AnnotationValue> arrayMembers = (List<AnnotationValue>)annotation.getElementValues().values().iterator().next().getValue();\n return (String)arrayMembers.iterator().next().getValue();\n }", "public Annotation getAnnotation() {\n return annotation;\n }", "@Override\n\tpublic Annotation[] getParameterAnnotations() {\n\t\treturn new Annotation[]{};\n\t}", "@Override\r\n\tpublic String serialize(AnnotationTree tree) {\n\t\treturn null;\r\n\t}", "@org.junit.Test(timeout = 10000)\n public void annotatedTwice_cf16507_cf17615_failAssert46() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" @java.lang.Override java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).annotated(com.squareup.javapoet.AnnotationSpec.builder(java.lang.Override.class).build()).toString();\n // AssertGenerator replace invocation\n java.lang.String o_annotatedTwice_cf16507__10 = // StatementAdderMethod cloned existing statement\n type.toString();\n // MethodAssertGenerator build local variable\n Object o_12_0 = o_annotatedTwice_cf16507__10;\n // StatementAdderOnAssert create null value\n java.util.Map<javax.lang.model.element.TypeParameterElement, com.squareup.javapoet.TypeVariableName> vc_7680 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_7678 = (javax.lang.model.type.TypeMirror)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_7676 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_7676.get(vc_7678, vc_7680);\n org.junit.Assert.fail(\"annotatedTwice_cf16507_cf17615 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "@Override\n public Void visitPackage(PackageElement e, Void p) {\n validateAnnotations(e.getAnnotationMirrors());\n return null;\n }", "public interface AnnotationReader\r\n{\r\n /**\r\n * Accessor for the annotations packages supported by this reader.\r\n * @return The annotations packages that will be processed.\r\n */\r\n String[] getSupportedAnnotationPackages();\r\n\r\n /**\r\n * Method to get the MetaData for a class from its annotations.\r\n * @param cls The class\r\n * @param pmd MetaData for the owning package (that this will be a child of)\r\n * @param clr ClassLoader resolver\r\n * @return The ClassMetaData (unpopulated and uninitialised)\r\n */\r\n AbstractClassMetaData getMetaDataForClass(Class cls, PackageMetaData pmd, ClassLoaderResolver clr);\r\n\r\n /**\r\n * Method to return whether this is reading in a persistence context.\r\n * @return Whether this is a persistence context\r\n */\r\n boolean isPersistenceContext();\r\n}", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21140() {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create random local variable\n java.lang.Object vc_9219 = new java.lang.Object();\n // AssertGenerator replace invocation\n boolean o_annotatedType_cf21140__9 = // StatementAdderMethod cloned existing statement\n type.equals(vc_9219);\n // AssertGenerator add assertion\n org.junit.Assert.assertFalse(o_annotatedType_cf21140__9);\n org.junit.Assert.assertEquals(expected, actual);\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21139() {\n java.lang.String expected = (\"@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create null value\n java.lang.Object vc_9218 = (java.lang.Object)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_9218);\n // AssertGenerator replace invocation\n boolean o_annotatedType_cf21139__9 = // StatementAdderMethod cloned existing statement\n type.equals(vc_9218);\n // AssertGenerator add assertion\n org.junit.Assert.assertFalse(o_annotatedType_cf21139__9);\n org.junit.Assert.assertEquals(expected, actual);\n }", "@org.junit.Test(timeout = 10000)\n public void annotated_cf3_cf206_failAssert34() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n com.squareup.javapoet.TypeName simpleString = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n // MethodAssertGenerator build local variable\n Object o_3_0 = simpleString.isAnnotated();\n // MethodAssertGenerator build local variable\n Object o_5_0 = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n com.squareup.javapoet.TypeName annotated = simpleString.annotated(NEVER_NULL);\n // MethodAssertGenerator build local variable\n Object o_9_0 = annotated.isAnnotated();\n // StatementAdderOnAssert create null value\n java.lang.Object vc_2 = (java.lang.Object)null;\n // MethodAssertGenerator build local variable\n Object o_13_0 = vc_2;\n // AssertGenerator replace invocation\n boolean o_annotated_cf3__13 = // StatementAdderMethod cloned existing statement\n annotated.equals(vc_2);\n // MethodAssertGenerator build local variable\n Object o_17_0 = o_annotated_cf3__13;\n // StatementAdderOnAssert create null value\n java.util.Map<java.lang.reflect.Type, com.squareup.javapoet.TypeVariableName> vc_110 = (java.util.Map)null;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_108 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_106 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_106.get(vc_108, vc_110);\n // MethodAssertGenerator build local variable\n Object o_27_0 = annotated.annotated();\n org.junit.Assert.fail(\"annotated_cf3_cf206 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "protected Annotation buildRootAnnotation(TypeDesc rootAnnotationType) {\r\n throw new UnsupportedOperationException();\r\n }", "@org.junit.Test(timeout = 10000)\n public void annotatedType_cf21206_failAssert23_literalMutation22513_cf23139_failAssert8() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.lang.String expected = (\"\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String\";\n // MethodAssertGenerator build local variable\n Object o_4_0 = expected;\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class);\n java.lang.String actual = type.annotated(NEVER_NULL).toString();\n // StatementAdderOnAssert create null value\n java.util.Map<javax.lang.model.element.TypeParameterElement, com.squareup.javapoet.TypeVariableName> vc_9264 = (java.util.Map)null;\n // MethodAssertGenerator build local variable\n Object o_13_0 = vc_9264;\n // StatementAdderOnAssert create null value\n javax.lang.model.type.TypeMirror vc_9262 = (javax.lang.model.type.TypeMirror)null;\n // MethodAssertGenerator build local variable\n Object o_17_0 = vc_9262;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_9260 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderOnAssert create null value\n java.lang.reflect.Type vc_10112 = (java.lang.reflect.Type)null;\n // StatementAdderOnAssert create null value\n com.squareup.javapoet.TypeName vc_10110 = (com.squareup.javapoet.TypeName)null;\n // StatementAdderMethod cloned existing statement\n vc_10110.get(vc_10112);\n // MethodAssertGenerator build local variable\n Object o_27_0 = vc_9260;\n // StatementAdderMethod cloned existing statement\n vc_9260.get(vc_9262, vc_9264);\n org.junit.Assert.fail(\"annotatedType_cf21206 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n org.junit.Assert.fail(\"annotatedType_cf21206_failAssert23_literalMutation22513_cf23139 should have thrown IllegalArgumentException\");\n } catch (java.lang.IllegalArgumentException eee) {\n }\n }", "@MyAnnotation(value = \"theValue\")\n private void wrapAsString() {\n }", "@Ignore\n @Test\n public void discoverOneTypes() throws Exception {\n }", "java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> \n getAnnotationList();", "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 }", "default List<AnnotationContext<?>> allAnnotations() {\n\n return annotations().stream()\n .flatMap(annotation -> annotation.valueType().<Stream<AnnotationContext<?>>>map(valueType -> {\n if (valueType.isArray()) {\n final TypeContext componentType = valueType.arrayComponentType();\n final AnnotationContext<Repeatable> rep = componentType.annotation(Repeatable.class);\n if (rep != null && rep.value().equals(annotation.annotationType())) {\n final Annotation[] repeated = annotation.value();\n return Arrays.stream(repeated).map(AnnotationContext::new);\n }\n }\n return Stream.of(annotation);\n }).orElseGet(() -> Stream.of(annotation)))\n .collect(Collectors.toList());\n }", "@Override\n protected void runHandler() {\n checkContainsAll(MSG_CONTRADICTING_CLASS_LEVEL_ANNOTATIONS,\n NullnessAnnotation.PARAMETERS_ARE_NONNULL_BY_DEFAULT,\n NullnessAnnotation.PARAMETERS_ARE_NULLABLE_BY_DEFAULT);\n runReturnAnnotationHandler();\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The array of suffixes must not be null\", \"O8\", \"wheel.asm.MethodWriter\", (Object) null);\n ByteVector byteVector0 = classWriter0.pool;\n byteVector0.putByteArray((byte[]) null, 50, (-3862));\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation(\"D&G}fBu\", true);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }" ]
[ "0.6620859", "0.64500594", "0.64455175", "0.63965356", "0.63665223", "0.6346742", "0.6194344", "0.6178605", "0.613707", "0.6132545", "0.6132545", "0.6115529", "0.604834", "0.6017503", "0.5984221", "0.5963383", "0.5962587", "0.59547085", "0.5953102", "0.5928612", "0.5901805", "0.5871319", "0.5852928", "0.58303475", "0.58169854", "0.58074623", "0.58013904", "0.58013904", "0.5772843", "0.5758719", "0.56904835", "0.5687417", "0.56707996", "0.56575876", "0.5655272", "0.56487", "0.5635825", "0.56300366", "0.56203", "0.56123173", "0.55981743", "0.5597815", "0.55717224", "0.55657864", "0.55625075", "0.55604005", "0.55414474", "0.55414474", "0.5538726", "0.5538589", "0.55228186", "0.5518721", "0.5505279", "0.5504109", "0.5500487", "0.54989463", "0.54966015", "0.54852194", "0.54838806", "0.54725647", "0.5458256", "0.54563767", "0.54524016", "0.5452115", "0.54517215", "0.54435265", "0.54377985", "0.54366904", "0.5430931", "0.543093", "0.5428275", "0.5426645", "0.54135156", "0.5401548", "0.5394494", "0.53943235", "0.5393495", "0.53912127", "0.5389295", "0.53875095", "0.5383993", "0.53781986", "0.5376255", "0.53709954", "0.5370756", "0.5370126", "0.5369667", "0.53660125", "0.53587765", "0.5357206", "0.53547", "0.5354461", "0.5354308", "0.5348304", "0.53447", "0.5342763", "0.5340928", "0.53335506", "0.5324798", "0.5324096", "0.53228974" ]
0.0
-1
TODO: Objective 6, implement the RK4 integration method see also efficient memory management suggestion in provided code for the Midpoint method.
@Override public void step(double[] p, int n, double t, double h, double[] pout, Function derivs) { if ( tmp == null || tmp.length != n ) { tmp = new double[n]; } //state: p.x,p.y,v.x,v.y Vector2d v1 = new Vector2d(); Vector2d x1 = new Vector2d(); Vector2d a = new Vector2d(); derivs.derivs(t,p,tmp); //gives me k1 for (int i=0;i<p.length-3;i+=4) { double[] k2 = new double[4]; double[] k3 = new double[4]; double[] k4 = new double[4]; //x1 = x0+h(x0+1/2h(x0)')' double[] tuples = new double[] {tmp[i]*1/2*h+p[i],tmp[i+1]*1/2*h+p[i+1], tmp[i+2]*1/2*h+p[i+2],tmp[i+3]*1/2*h+p[i+3]}; derivs.derivs(t,tuples,k2); tuples = new double[] {k2[i]*1/2*h+p[i],k2[i+1]*1/2*h+p[i+1], k2[i+2]*1/2*h+p[i+2],k2[i+3]*1/2*h+p[i+3]}; derivs.derivs(t,tuples,k3); tuples = new double[] {k3[i]*h+p[i],k3[i+1]*h+p[i+1], k3[i+2]*h+p[i+2],k3[i+3]*h+p[i+3]}; derivs.derivs(t,tuples,k4); x1.set(new Vector2d(p[i],p[i+1])); x1.scaleAdd(h/6, new Vector2d(tmp[i],tmp[i+1]), x1); x1.scaleAdd(h/3, new Vector2d(k2[i],k2[i+1]), x1); x1.scaleAdd(h/3, new Vector2d(k3[i],k3[i+1]), x1); x1.scaleAdd(h/6, new Vector2d(k4[i],k4[i+1]), x1); //v1 = v0+h*a a.set(tmp[i+2],tmp[i+3]); v1.set(new Vector2d(p[i+2],p[i+3])); v1.scaleAdd(h/6, a, v1); v1.scaleAdd(h/3, new Vector2d(k2[i+2],k2[i+3]), v1); v1.scaleAdd(h/3, new Vector2d(k3[i+2],k3[i+3]), v1); v1.scaleAdd(h/6, new Vector2d(k4[i+2],k4[i+3]), v1); //update velocity and positions pout[i] = x1.x; pout[i+1] = x1.y; pout[i+2] = v1.x; pout[i+3] = v1.y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XYSeriesCollection rk4(double t0, double tF, double stepSize,\n ArrayList<Argument> argumentList, ArrayList<Argument> variableArgList,\n ArrayList<StockObject> stockArrayList, ArrayList<FlowObject> flowArrayList, ArrayList<VariableObject> variableArrayList) {\n Argument[] aVarList = argumentList.toArray(new Argument[argumentList.size()]);\n //aTempVarList only created to later create the temparg array list\n Argument[] aTempVarList = new Argument[argumentList.size()];\n for (int j = 0; j < aVarList.length; j++) {\n aTempVarList[j] = aVarList[j].clone();\n }\n int numSteps = (int) ((tF - t0) / stepSize);\n double t = t0;\n\n //int cutoff = String.valueOf(stepSize).length();\n ArrayList<Argument> aTempArgArrayList = new ArrayList<Argument>();\n for (int j = 0; j < aVarList.length; j++) {\n aTempArgArrayList.add(aTempVarList[j]);\n }\n \n double[] dydt = new double[argumentList.size()];\n\n ArrayList<Double> k1 = new ArrayList<Double>();\n\n ArrayList<Double> k2 = new ArrayList<Double>();\n\n ArrayList<Double> k3 = new ArrayList<Double>();\n\n ArrayList<Double> k4 = new ArrayList<Double>();\n\n //idea is to set k1 through k4 ArrayLists to double values of 0\n //used to have stockArrayList.size()\n for (int x = 0; x < stockArrayList.size(); x++) {\n k1.add(0.0);\n k2.add(0.0);\n k3.add(0.0);\n k4.add(0.0);\n }\n\n //array list length of amount of stocks\n ArrayList<XYSeries> series = new ArrayList<XYSeries>();\n\n //create series to hold graph data\n for (int i = 0; i < stockArrayList.size(); i++) {\n XYSeries tempSeries = new XYSeries(stockArrayList.get(i).getObjName());\n series.add(tempSeries);\n }\n\n final XYSeriesCollection data = new XYSeriesCollection();\n\n //add initial values to series\n for (int i = 0; i < stockArrayList.size(); i++) {\n series.get(i).add(0, argumentList.get(i).getArgumentValue());\n }\n\n int numOfStocks = stockArrayList.size();\n double value;\n\n // Generates a string to represent the column headers.\n // The first part of the string aka x-axis will always be time\n String stockNames = \"Time,\";\n for (int x = 0; x < stockArrayList.size(); x++) {\n stockNames += argumentList.get(x).getArgumentName() + \",\";\n }\n String[] tableStrings = new String[stockArrayList.size() + 1];\n String columns[] = stockNames.split(\",\");\n tableModel = new DefaultTableModel(0, stockArrayList.size() + 1);\n tableModel.setColumnIdentifiers(columns); // set the column headers\n\n for (int n = 0; n < numSteps; n++) {\n \n t = t0 + (n * stepSize);\n //t = Math.floor(t * Math.pow(10,cutoff)) / Math.pow(10,cutoff);\n variableArgList.get(variableArgList.size() - 1).setArgumentValue(t);\n //Let's find k1:\n dydt = RightHandSide(variableArgList, argumentList, flowArrayList, stockArrayList,variableArrayList);\n\n for (int i = 0; i < numOfStocks; i++) {\n\n k1.set(i, stepSize * dydt[i]);\n }\n\n //next let's find k2:\n for (int i = 0; i < numOfStocks; i++) {\n variableArgList.get(variableArgList.size() - 1).setArgumentValue(t + (stepSize / 2));\n value = (argumentList.get(i).getArgumentValue() + (k1.get(i) / 2));\n aTempArgArrayList.get(i).setArgumentValue(value);\n\n dydt = RightHandSide(variableArgList, aTempArgArrayList, flowArrayList, stockArrayList,variableArrayList);\n }\n for (int i = 0; i < numOfStocks; i++) {\n k2.set(i, stepSize * dydt[i]);\n }\n\n //next let's find k3:\n for (int i = 0; i < numOfStocks; i++) {\n variableArgList.get(variableArgList.size() - 1).setArgumentValue(t + (stepSize / 2));\n value = argumentList.get(i).getArgumentValue() + (k2.get(i) / 2);\n aTempArgArrayList.get(i).setArgumentValue(value);\n dydt = RightHandSide(variableArgList, aTempArgArrayList, flowArrayList, stockArrayList,variableArrayList);\n }\n for (int i = 0; i < numOfStocks; i++) {\n k3.set(i, stepSize * dydt[i]);\n }\n\n //next let's find k4:\n for (int i = 0; i < numOfStocks; i++) {\n variableArgList.get(variableArgList.size() - 1).setArgumentValue(t + stepSize);\n value = argumentList.get(i).getArgumentValue() + (k3.get(i));\n aTempArgArrayList.get(i).setArgumentValue(value);\n dydt = RightHandSide(variableArgList, aTempArgArrayList, flowArrayList, stockArrayList,variableArrayList);\n }\n for (int i = 0; i < numOfStocks; i++) {\n k4.set(i, stepSize * dydt[i]);\n }\n\n //now we update y\n for (int i = 0; i < numOfStocks; i++) {\n\n value = argumentList.get(i).getArgumentValue() + ((k1.get(i) + (2 * k2.get(i)) + (2 * k3.get(i)) + k4.get(i)) / 6);\n //value = Math.ceil(value * 1000000) / 1000000;\n argumentList.get(i).setArgumentValue(value);\n }\n\n int row = n + 1;\n tableStrings[0] = Double.toString(row * stepSize);\n for (int col = 0; col < stockArrayList.size(); col++) {\n //tableStrings[col + 1] = Double.toString(Math.floor(argumentList.get(col).getArgumentValue()* Math.pow(10,cutoff)) / Math.pow(10,cutoff));\n tableStrings[col + 1] = Double.toString(argumentList.get(col).getArgumentValue());\n }\n tableModel.addRow(tableStrings);\n for (int i = 0; i < stockArrayList.size(); i++) {\n series.get(i).add(t, argumentList.get(i).getArgumentValue());\n }\n\n }\n for (int i = 0; i < stockArrayList.size(); i++) {\n data.addSeries(series.get(i));\n }\n return data;\n }", "public final com.iqoption.fragment.c.a.a.j apply(kotlin.Pair<java.lang.Double, java.lang.Integer> r15) {\n /*\n r14 = this;\n r0 = \"<name for destructuring parameter 0>\";\n kotlin.jvm.internal.i.f(r15, r0);\n r0 = r15.bnj();\n r0 = (java.lang.Number) r0;\n r7 = r0.doubleValue();\n r15 = r15.bnk();\n r15 = (java.lang.Integer) r15;\n r0 = r14.dhw;\n r0 = r0.getInstrumentType();\n r0 = com.iqoption.util.j.ae(r0);\n r1 = com.iqoption.app.managers.tab.TabHelper.IM();\n r2 = \"TabHelper.instance()\";\n kotlin.jvm.internal.i.e(r1, r2);\n r1 = r1.Jd();\n r2 = r14.dhw;\n r2 = r2.getInstrumentType();\n r3 = com.iqoption.core.data.model.InstrumentType.FX_INSTRUMENT;\n r9 = 0;\n if (r2 != r3) goto L_0x0051;\n L_0x0037:\n r2 = com.iqoption.app.managers.feature.a.Il();\n r1 = r1.expInterval;\n r1 = r2.get(r1);\n r1 = (java.lang.Double) r1;\n if (r1 == 0) goto L_0x0051;\n L_0x0045:\n r1 = (java.lang.Number) r1;\n r1 = r1.doubleValue();\n r1 = com.iqoption.util.j.P(r1);\n r0[r9] = r1;\n L_0x0051:\n r1 = r0[r9];\n r0 = java.lang.Double.valueOf(r1);\n r0 = com.iqoption.util.j.r(r0);\n r10 = com.iqoption.app.helpers.a.Gs();\n r1 = r14.dhw;\n r1 = r1.getActiveId();\n r2 = r14.dhw;\n r2 = r2.getInstrumentType();\n r1 = r10.a(r1, r2);\n r2 = com.iqoption.core.microservices.f.a.a.a.bzg;\n r2 = r2.g(r1);\n r3 = com.iqoption.core.microservices.f.a.a.a.bzg;\n r1 = r3.d(r1);\n r11 = 0;\n if (r1 == 0) goto L_0x00ad;\n L_0x007e:\n if (r2 != 0) goto L_0x0081;\n L_0x0080:\n goto L_0x00ad;\n L_0x0081:\n if (r15 != 0) goto L_0x0084;\n L_0x0083:\n goto L_0x008f;\n L_0x0084:\n r3 = r15.intValue();\n if (r3 != 0) goto L_0x008f;\n L_0x008a:\n r1 = com.iqoption.util.ab.e(r2, r1);\n goto L_0x00ab;\n L_0x008f:\n r3 = com.iqoption.asset.c.a.axy;\n r4 = r14.dhw;\n r4 = r4.getPrecision();\n r5 = r1.doubleValue();\n r12 = r2.doubleValue();\n r1 = r3;\n r2 = r4;\n r3 = r5;\n r5 = r12;\n r1 = r1.a(r2, r3, r5, r7);\n r1 = java.lang.Double.valueOf(r1);\n L_0x00ab:\n r3 = r1;\n goto L_0x00ae;\n L_0x00ad:\n r3 = r11;\n L_0x00ae:\n r1 = r14.dhu;\n r2 = r14.dhw;\n r5 = r1.P(r2);\n r1 = r14.dhw;\n r1 = r1.getInstrumentType();\n r1 = r1.isOption();\n r2 = \"minInvest\";\n if (r1 == 0) goto L_0x00e8;\n L_0x00c4:\n r15 = r14.dhw;\n r15 = r15.ahR();\n if (r15 != 0) goto L_0x00cd;\n L_0x00cc:\n goto L_0x00dd;\n L_0x00cd:\n r15 = r14.dhw;\n r15 = r15.ahR();\n r15 = 100 - r15;\n r15 = java.lang.Integer.valueOf(r15);\n r11 = com.iqoption.core.util.af.i(r15);\n L_0x00dd:\n r15 = new com.iqoption.fragment.c.a.a.b;\n kotlin.jvm.internal.i.e(r0, r2);\n r15.<init>(r0, r3, r11, r5);\n r15 = (com.iqoption.fragment.c.a.a.j) r15;\n goto L_0x012e;\n L_0x00e8:\n r1 = r14.dhw;\n r1 = r1.getInstrumentType();\n r4 = r14.dhw;\n r4 = r4.getActiveId();\n r4 = java.lang.Integer.valueOf(r4);\n r1 = r10.a(r1, r4);\n if (r1 == 0) goto L_0x010b;\n L_0x00fe:\n r4 = r14.dhu;\n r1 = r1.air();\n r1 = r4.a(r1);\n if (r1 == 0) goto L_0x010b;\n L_0x010a:\n goto L_0x0112;\n L_0x010b:\n r1 = 2131886971; // 0x7f12037b float:1.9408536E38 double:1.053292113E-314;\n r1 = com.iqoption.core.d.getString(r1);\n L_0x0112:\n r6 = r1;\n kotlin.jvm.internal.i.e(r0, r2);\n if (r15 != 0) goto L_0x0119;\n L_0x0118:\n goto L_0x011f;\n L_0x0119:\n r1 = r15.intValue();\n if (r1 == 0) goto L_0x0120;\n L_0x011f:\n r9 = 1;\n L_0x0120:\n if (r9 == 0) goto L_0x0124;\n L_0x0122:\n r4 = r15;\n goto L_0x0125;\n L_0x0124:\n r4 = r11;\n L_0x0125:\n r15 = new com.iqoption.fragment.c.a.a.a;\n r1 = r15;\n r2 = r0;\n r1.<init>(r2, r3, r4, r5, r6);\n r15 = (com.iqoption.fragment.c.a.a.j) r15;\n L_0x012e:\n return r15;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.fragment.c.b.a$h.apply(kotlin.Pair):com.iqoption.fragment.c.a.a.j\");\n }", "public void calculate(double totalTime, double timeStep, double robotTrackWidth)\n\t{\n\t\t/**\n\t\t * pseudo code\n\t\t * \n\t\t * 1. Reduce input waypoints to only essential (direction changing) node points\n\t\t * 2. Calculate how many total datapoints we need to satisfy the controller for \"playback\"\n\t\t * 3. Simultaneously inject and smooth the path until we end up with a smooth path with required number \n\t\t * of datapoints, and which follows the waypoint path.\n\t\t * 4. Calculate left and right wheel paths by calculating parallel points at each datapoint \n\t\t */\n\n\n\t\t//First find only direction changing nodes\n\t\tnodeOnlyPath = nodeOnlyWayPoints(origPath);\n\n\t\t//Figure out how many nodes to inject\n\t\tint[] inject = injectionCounter2Steps(nodeOnlyPath.length, totalTime, timeStep);\n\n\t\t//Iteratively inject and smooth the path\n\t\tfor(int i=0; i<inject.length; i++)\n\t\t{\n\t\t\tif(i==0)\n\t\t\t{\n\t\t\t\tsmoothPath = inject(nodeOnlyPath,inject[0]);\n\t\t\t\tsmoothPath = smoother(smoothPath, pathAlpha, pathBeta, pathTolerance);\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsmoothPath = inject(smoothPath,inject[i]);\n\t\t\t\tsmoothPath = smoother(smoothPath, 0.1, 0.3, 0.0000001);\t\n\t\t\t}\n\t\t}\n\n\t\t//Calculate left and right path based on center path\n\t\tleftRight(smoothPath, robotTrackWidth);\n\n\t\torigCenterVelocity = velocity(smoothPath, timeStep);\n\t\torigLeftVelocity = velocity(leftPath, timeStep);\n\t\torigRightVelocity = velocity(rightPath, timeStep);\n\n\t\t//Copy smooth velocities into fix Velocities\n\t\tsmoothCenterVelocity = doubleArrayCopy(origCenterVelocity);\n\t\tsmoothLeftVelocity = doubleArrayCopy(origLeftVelocity);\n\t\tsmoothRightVelocity = doubleArrayCopy(origRightVelocity);\n\n\t\t//Set final vel to zero\n\t\tsmoothCenterVelocity[smoothCenterVelocity.length-1][1] = 0.0;\n\t\tsmoothLeftVelocity[smoothLeftVelocity.length-1][1] = 0.0;\n\t\tsmoothRightVelocity[smoothRightVelocity.length-1][1] = 0.0;\n\n\t\t//Smooth velocity with zero final V\n\t\tsmoothCenterVelocity = smoother(smoothCenterVelocity, velocityAlpha, velocityBeta, velocityTolerance);\n\t\tsmoothLeftVelocity = smoother(smoothLeftVelocity, velocityAlpha, velocityBeta, velocityTolerance);\n\t\tsmoothRightVelocity = smoother(smoothRightVelocity,velocityAlpha, velocityBeta, velocityTolerance);\n\n\t\t//Fix velocity distance error\n\t\tsmoothCenterVelocity = velocityFix(smoothCenterVelocity, origCenterVelocity, 0.0000001);\n\t\tsmoothLeftVelocity = velocityFix(smoothLeftVelocity, origLeftVelocity, 0.0000001);\n\t\tsmoothRightVelocity = velocityFix(smoothRightVelocity, origRightVelocity, 0.0000001);\n\t}", "public static void moveRK4( Dynamics a, Body[] b, int nbodies, StateVector[] state, double dt ) {\r\n int m, n;\r\n\r\n ap = a;\r\n\r\n // don't perform calculations using dt = 0. 19 aug 2016\r\n if ( dt != 0 ) {\r\n\r\n // find straight-line-advanced body locations\r\n for (n = 1; n < nbodies; n++) {\r\n if ( b[n].status == 3 ) {\r\n// System.out.println( nbodies + \"b num \" + b[n].num );\r\n body = b[n];\r\n// System.out.println( \"body num \" + body.num );\r\n// System.out.println( body.currentState.x );\r\n advanceBody( dt );\r\n }\r\n }\r\n\r\n // perform RK4 calculations on current state\r\n for (n = 1; n < nbodies; n++) {\r\n body = b[n];\r\n // here for RK4 acceleration\r\n if ( b[n].status == 3 && b[n].activated ) {\r\n state[n].copyStateVectors( b[n].currentState );\r\n state[n] = integrate( state[n], dt );\r\n }\r\n }\r\n\r\n // update positions and speeds\r\n for (n = 0; n < nbodies; n++) {\r\n body = b[n];\r\n if ( b[n].status >= 2 && b[n].activated && b[n].inFreeMotion ) {\r\n setVectors( b[n], state[n] ); // RK4\r\n }\r\n }\r\n\r\n }\r\n }", "private void estimateFlatEarthPolynomial() {\n int minLine = 0;\n int maxLine = sourceImageHeight;\n int minPixel = 0;\n int maxPixel = sourceImageWidth;\n \n Rectangle rectangle = new Rectangle();\n rectangle.setSize(maxPixel, maxLine);\n \n // int srpPolynomialDegree = 5; // for flat earth phase\n int numberOfCoefficients = numberOfCoefficients(srpPolynomialDegree);\n \n double[][] position = distributePoints(srpNumberPoints, rectangle);\n \n // setup observation and design matrix\n DoubleMatrix y = new DoubleMatrix(srpNumberPoints);\n DoubleMatrix A = new DoubleMatrix(srpNumberPoints, numberOfCoefficients);\n \n double masterMinPi4divLam = (-4 * Math.PI * Constants.lightSpeed) / masterMetadata.radar_wavelength;\n double slaveMinPi4divLam = (-4 * Math.PI * Constants.lightSpeed) / slaveMetadata.radar_wavelength;\n \n // Loop throu a vector or distributedPoints()\n for (int i = 0; i < srpNumberPoints; ++i) {\n \n double line = position[i][0];\n double pixel = position[i][1];\n \n // compute azimuth/range time for this pixel\n final double masterTimeRange = pix2tr(pixel, masterMetadata);\n \n // compute xyz of this point : sourceMaster\n Point3d xyzMaster = lp2xyz(line, pixel, masterMetadata, masterOrbit);\n \n final Point2d slaveTimeVector = xyz2t(xyzMaster, slaveMetadata, slaveOrbit);\n final double slaveTimeRange = slaveTimeVector.x;\n \n // observation vector\n y.put(i, (masterMinPi4divLam * masterTimeRange) - (slaveMinPi4divLam * slaveTimeRange));\n \n // set up a system of equations\n // ______Order unknowns: A00 A10 A01 A20 A11 A02 A30 A21 A12 A03 for degree=3______\n double posL = normalize(line, minLine, maxLine);\n double posP = normalize(pixel, minPixel, maxPixel);\n \n int index = 0;\n \n for (int j = 0; j <= srpPolynomialDegree; j++) {\n for (int k = 0; k <= j; k++) {\n // System.out.println(\"A[\" + i + \",\" + index + \"]: \"\n // + Math.pow(posL, (float) (j - k)) * Math.pow(posP, (float) k));\n A.put(i, index, (Math.pow(posL, (double) (j - k)) * Math.pow(posP, (double) k)));\n index++;\n }\n }\n }\n \n // Fit polynomial through computed vector of phases\n DoubleMatrix Atranspose = A.transpose();\n DoubleMatrix N = Atranspose.mmul(A);\n DoubleMatrix rhs = Atranspose.mmul(y);\n \n // TODO: validate Cholesky decomposition of JBLAS: see how it is in polyfit and reuse!\n \n // this should be the coefficient of the reference phase\n flatEarthPolyCoefs = Solve.solve(N, rhs);\n \n /*\n System.out.println(\"*******************************************************************\");\n System.out.println(\"_Start_flat_earth\");\n System.out.println(\"*******************************************************************\");\n System.out.println(\"Degree_flat:\" + polyDegree);\n System.out.println(\"Estimated_coefficients_flatearth:\");\n int coeffLine = 0;\n int coeffPixel = 0;\n for (int i = 0; i < numberOfCoefficients; i++) {\n if (flatEarthPolyCoefs.get(i, 0) < 0.) {\n System.out.print(flatEarthPolyCoefs.get(i, 0));\n } else {\n System.out.print(\" \" + flatEarthPolyCoefs.get(i, 0));\n }\n \n System.out.print(\" \\t\" + coeffLine + \" \" + coeffPixel + \"\\n\");\n coeffLine--;\n coeffPixel++;\n if (coeffLine == -1) {\n coeffLine = coeffPixel;\n coeffPixel = 0;\n }\n }\n System.out.println(\"*******************************************************************\");\n System.out.println(\"_End_flat_earth\");\n System.out.println(\"*******************************************************************\");\n */\n \n // TODO: test inverse : when cholesky is finished\n // // ______Test inverse______\n // for (i=0; i<Qx_hat.lines(); i++)\n // for (j=0; j<i; j++)\n // Qx_hat(j,i) = Qx_hat(i,j);// repair Qx_hat\n // const real8 maxdev = max(abs(N*Qx_hat-eye(real8(Qx_hat.lines()))));\n // INFO << \"flatearth: max(abs(N*inv(N)-I)) = \" << maxdev;\n // INFO.print();\n // if (maxdev > .01)\n // {\n // ERROR << \"Deviation too large. Decrease degree or number of points?\";\n // PRINT_ERROR(ERROR.get_str())\n // throw(some_error);\n // }\n // else if (maxdev > .001)\n // {\n // WARNING << \"Deviation quite large. Decrease degree or number of points?\";\n // WARNING.print();\n // }\n // else\n // {\n // INFO.print(\"Deviation is OK.\");\n // }\n // // ______Some other stuff, scale is ok______\n // matrix<real8> y_hat = A * rhs;\n // matrix<real8> e_hat = y - y_hat;\n }", "@Override\n public void run() {\n Point current = remainingPoints.remove(0); // always start at first point\n solutionOfAntK.add(current);\n Point next;\n double[] imaginaryDistances;\n double imaginaryDistance;\n int x, y; // -> index of points: -> to get the correct values form the matrices T & D\n int indexToRemove;\n for (int i = 0; i < tourSize - 1; i++) {\n imaginaryDistances = new double[remainingPoints.size()];\n imaginaryDistance = 0;\n for (int j = 0; j < remainingPoints.size(); j++) {\n next = remainingPoints.get(j);\n x = current.getId();\n y = next.getId();\n imaginaryDistances[j] = (Math.pow(T.get(x, y), alpha)) / (Math.pow(D.get(x, y), beta));\n imaginaryDistance += imaginaryDistances[j];\n }\n indexToRemove = getNextPoint(imaginaryDistances, imaginaryDistance);\n tourLengthOfAntK += utils.Utils.euclideanDistance2D(remainingPoints.get(indexToRemove), current);\n current = remainingPoints.remove(indexToRemove);\n solutionOfAntK.add(current);\n\n }\n // add distance from last point to start points\n tourLengthOfAntK += utils.Utils.euclideanDistance2D(solutionOfAntK.get(-1 + solutionOfAntK.size()), startPoint);\n\n }", "public void moveObjectsAlongPath(){\n for (int i=0; i<gameObjects.getMoveableObjectsList().size(); i++){\r\n \r\n MoveableObject movingOb = gameObjects.getMoveableObjectsList().get(i);\r\n \r\n if (movingOb.getPathDestination()!=null ){\r\n \r\n KPoint start = movingOb.getPathLocation();\r\n KPoint destination = movingOb.getPathDestination();\r\n \r\n ArrayList<KPoint> pathPoints = getPathPoints(start, destination, movingOb.getObjectRadius());\r\n movingOb.setCurrentPathTest(pathPoints);\r\n \r\n }\r\n \r\n if(movingOb.getCurrentPath().size()>0){\r\n // find the angle the moveable object needs to rotate to by comparing start with the next path point\r\n KPoint start = movingOb.getPathLocation();\r\n KPoint nextPoint=movingOb.getCurrentPath().get(1);\r\n double targetAngle = Math.atan2(nextPoint.y-start.y, nextPoint.x-start.x );\r\n double angleRemaining = movingOb.getTransform().getRotation() - targetAngle;\r\n \r\n // fix for beyond pi range\r\n if (angleRemaining>Math.PI)angleRemaining -=2*Math.PI;\r\n if (angleRemaining<-Math.PI)angleRemaining +=2*Math.PI;\r\n \r\n if (angleRemaining > 0.1){ \r\n //movingOb.rotateAboutCenter(-angleRemaining);\r\n movingOb.rotateAboutCenter(-ROTATION_SPEED*movingOb.getSpeed());\r\n } else if (angleRemaining <-0.1){\r\n //movingOb.rotateAboutCenter(-ROTATION_SPEED*movingOb.getSpeed());\r\n movingOb.rotateAboutCenter(ROTATION_SPEED*movingOb.getSpeed());\r\n\r\n } else {\r\n double angle = movingOb.getTransform().getRotation();\r\n int xAdjust = (int)Math.ceil(Math.cos(angle)*FORCE_AMOUNT*movingOb.getSpeed());\r\n int yAdjust = (int)Math.ceil(Math.sin(angle)*FORCE_AMOUNT*movingOb.getSpeed());\r\n movingOb.applyForce(new Vector2(xAdjust,yAdjust));\r\n }\r\n }\r\n \r\n }\r\n }", "public void rk4sim(ArrayList<? extends ODEsolvable> bodies, Vector3D[][] kav, double dt) {\n //the increment is precalculated before updating the whole celestial bodies\n for(int i = 0; i < bodies.size(); i++) {\n if(bodies.get(i)!=null) {\n ODEsolvable planet = bodies.get(i);\n // System.out.println(planet.toString());\n kav[i] = rk4(planet.getCentralPos(), planet.getCentralVel(), dt, planet);\n }\n }\n\n //updating the celestial body position and velocity at the next time step\n for(int i = 0; i < bodies.size(); i++) {\n if(bodies.get(i) != null) {\n ODEsolvable planet = bodies.get(i);\n planet.setCentralPos(planet.getCentralPos().add(kav[i][0]));\n planet.setCentralVel(planet.getCentralVel().add(kav[i][1]));\n }\n }\n }", "public IKQuadrupedModel() {\n\t\t/*\n\t\ttextureWidth = 16;\n\t\ttextureHeight = 16;\n\n\t\tbase = new ModelRenderer(this);\n\t\tbase.setRotationPoint(0.0F, 4.6F, 0.0F);\n\t\tbase.setTextureOffset(0, 0).addBox(-4.5F, -4.6F, -4.5F, 9.0F, 24.0F, 9.0F, 0.0F, false);\n\n\t\tnorth = new IKModelRenderer(this);\n\t\tnorth.setRotationPoint(0.0F, 0.4F, -4.5F);\n\t\tbase.addChild(north);\n\t\tnorth.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tnorth2 = new IKModelRenderer(this);\n\t\tnorth2.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\tnorth.addChild(north2);\n\t\tnorth2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tnorth3 = new IKModelRenderer(this,0,0,-13);\n\t\tnorth3.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\tnorth2.addChild(north3);\n\t\tnorth3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tsouth = new IKModelRenderer(this);\n\t\tsouth.setRotationPoint(0.0F, 0.4F, 4.5F);\n\t\tbase.addChild(south);\n\t\tsouth.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tsouth2 = new IKModelRenderer(this);\n\t\tsouth2.setRotationPoint(0.0F, 0.0F, 12.5F);\n\t\tsouth.addChild(south2);\n\t\tsouth2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.5F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\tsouth3 = new IKModelRenderer(this,0,0,13);\n\t\tsouth3.setRotationPoint(0.0F, 0.0F, 13.5F);\n\t\tsouth2.addChild(south3);\n\t\tsouth3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\twest = new IKModelRenderer(this);\n\t\twest.setRotationPoint(4.5F, 0.4F, 0.0F);\n\t\tbase.addChild(west);\n\t\t//setRotationAngle(west, 0.0F, -1.5708F, 0.0F);\n\t\twest.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\twest2 = new IKModelRenderer(this);\n\t\twest2.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\twest.addChild(west2);\n\t\twest2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\twest3 = new IKModelRenderer(this,0,0,-13);\n\t\twest3.setRotationPoint(0.0F, 0.0F, -13.0F);\n\t\twest2.addChild(west3);\n\t\twest3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, -13.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\teast = new IKModelRenderer(this);\n\t\teast.setRotationPoint(-4.5F, 0.4F, 0.0F);\n\t\tbase.addChild(east);\n\t\t//setRotationAngle(east, 0.0F, -1.5708F, 0.0F);\n\t\teast.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\teast2 = new IKModelRenderer(this);\n\t\teast2.setRotationPoint(0.0F, 0.0F, 13.0F);\n\t\teast.addChild(east2);\n\t\teast2.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\n\t\teast3 = new IKModelRenderer(this,0,0,13);\n\t\teast3.setRotationPoint(0.0F, 0.0F, 13.0F);\n\t\teast2.addChild(east3);\n\t\teast3.setTextureOffset(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 4.0F, 13.0F, 0.0F, false);\n\t\t*/\n\n\t\ttextureWidth = 128;\n\t\ttextureHeight = 128;\n\n\t\tTorso = new ModelRenderer(this);\n\t\tTorso.setRotationPoint(0.0F, 24.0F, 0.0F);\n\t\tTorso.setTextureOffset(0, 0).addBox(-6.0F, -28.0F, -10.0F, 12.0F, 9.0F, 23.0F, 0.0F, false);\n\n\t\tHead = new ModelRenderer(this);\n\t\tHead.setRotationPoint(0.0F, -23.0F, -10.0F);\n\t\tTorso.addChild(Head);\n\t\tHead.setTextureOffset(25, 32).addBox(-4.0F, -3.0F, -7.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);\n\t\tHead.setTextureOffset(12, 18).addBox(-1.0F, -3.0F, -7.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);\n\t\tHead.setTextureOffset(10, 14).addBox(2.0F, -3.0F, -7.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);\n\t\tHead.setTextureOffset(0, 32).addBox(-5.0F, -4.0F, -5.0F, 10.0F, 5.0F, 5.0F, 0.0F, false);\n\n\t\tJaw = new ModelRenderer(this);\n\t\tJaw.setRotationPoint(0.0F, 2.4F, 0.0F);\n\t\tHead.addChild(Jaw);\n\t\tJaw.setTextureOffset(30, 32).addBox(-5.0F, -0.4F, -5.0F, 10.0F, 1.0F, 5.0F, 0.0F, false);\n\n\t\tFRLeg = new IKModelRenderer(this);\n\t\tFRLeg.setRotationPoint(-6.0F, -20.0F, -7.5F);\n\t\tTorso.addChild(FRLeg);\n\t\tsetRotationAngle(FRLeg, 0.0F, 0.0F, 0.7418F);\n\t\tFRLeg.setTextureOffset(18, 55).addBox(-1.75F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin = new IKModelRenderer(this);\n\t\tFRShin.setRotationPoint(-0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg.addChild(FRShin);\n\t\tsetRotationAngle(FRShin, 0.0F, 0.0F, -0.4363F);\n\t\tFRShin.setTextureOffset(10, 42).addBox(-1.3816F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot.setRotationPoint(0.2F, 12.4F, -0.5F);\n\t\tFRShin.addChild(FRFoot);\n\t\tFRFoot.setTextureOffset(57, 0).addBox(-1.6F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg3 = new IKModelRenderer(this);\n\t\tFRLeg3.setRotationPoint(-6.0F, -20.0F, 1.5F);\n\t\tTorso.addChild(FRLeg3);\n\t\tsetRotationAngle(FRLeg3, 0.0F, 0.0F, 0.7418F);\n\t\tFRLeg3.setTextureOffset(30, 52).addBox(-1.75F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin3 = new IKModelRenderer(this);\n\t\tFRShin3.setRotationPoint(-0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg3.addChild(FRShin3);\n\t\tsetRotationAngle(FRShin3, 0.0F, 0.0F, -0.4363F);\n\t\tFRShin3.setTextureOffset(40, 40).addBox(-1.3816F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot3 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot3.setRotationPoint(0.2F, 12.4F, -0.5F);\n\t\tFRShin3.addChild(FRFoot3);\n\t\tFRFoot3.setTextureOffset(50, 44).addBox(-1.6F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg6 = new IKModelRenderer(this);\n\t\tFRLeg6.setRotationPoint(6.0F, -20.0F, 1.5F);\n\t\tTorso.addChild(FRLeg6);\n\t\tsetRotationAngle(FRLeg6, 0.0F, 0.0F, -0.7418F);\n\t\tFRLeg6.setTextureOffset(20, 42).addBox(-1.25F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin6 = new IKModelRenderer(this);\n\t\tFRShin6.setRotationPoint(0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg6.addChild(FRShin6);\n\t\tsetRotationAngle(FRShin6, 0.0F, 0.0F, 0.4363F);\n\t\tFRShin6.setTextureOffset(0, 0).addBox(-1.6184F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot6 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot6.setRotationPoint(-0.2F, 12.4F, -0.5F);\n\t\tFRShin6.addChild(FRFoot6);\n\t\tFRFoot6.setTextureOffset(0, 14).addBox(-1.4F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg4 = new IKModelRenderer(this);\n\t\tFRLeg4.setRotationPoint(-6.0F, -20.0F, 10.5F);\n\t\tTorso.addChild(FRLeg4);\n\t\tsetRotationAngle(FRLeg4, 0.0F, 0.0F, 0.7418F);\n\t\tFRLeg4.setTextureOffset(50, 50).addBox(-1.75F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin4 = new IKModelRenderer(this);\n\t\tFRShin4.setRotationPoint(-0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg4.addChild(FRShin4);\n\t\tsetRotationAngle(FRShin4, 0.0F, 0.0F, -0.4363F);\n\t\tFRShin4.setTextureOffset(30, 38).addBox(-1.3816F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot4 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot4.setRotationPoint(0.2F, 12.4F, -0.5F);\n\t\tFRShin4.addChild(FRFoot4);\n\t\tFRFoot4.setTextureOffset(50, 38).addBox(-1.6F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg5 = new IKModelRenderer(this);\n\t\tFRLeg5.setRotationPoint(6.0F, -20.0F, 10.5F);\n\t\tTorso.addChild(FRLeg5);\n\t\tsetRotationAngle(FRLeg5, 0.0F, 0.0F, -0.7418F);\n\t\tFRLeg5.setTextureOffset(47, 0).addBox(-1.25F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin5 = new IKModelRenderer(this);\n\t\tFRShin5.setRotationPoint(0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg5.addChild(FRShin5);\n\t\tsetRotationAngle(FRShin5, 0.0F, 0.0F, 0.4363F);\n\t\tFRShin5.setTextureOffset(10, 0).addBox(-1.6184F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot5 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot5.setRotationPoint(-0.2F, 12.4F, -0.5F);\n\t\tFRShin5.addChild(FRFoot5);\n\t\tFRFoot5.setTextureOffset(47, 13).addBox(-1.4F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\tFRLeg2 = new IKModelRenderer(this);\n\t\tFRLeg2.setRotationPoint(6.0F, -20.0F, -7.5F);\n\t\tTorso.addChild(FRLeg2);\n\t\tsetRotationAngle(FRLeg2, 0.0F, 0.0F, -0.7418F);\n\t\tFRLeg2.setTextureOffset(40, 54).addBox(-1.25F, -2.0F, -1.0F, 3.0F, 11.0F, 2.0F, 0.1F, false);\n\n\t\tFRShin2 = new IKModelRenderer(this);\n\t\tFRShin2.setRotationPoint(0.3604F, 9.0265F, 0.0F);\n\t\tFRLeg2.addChild(FRShin2);\n\t\tsetRotationAngle(FRShin2, 0.0F, 0.0F, 0.4363F);\n\t\tFRShin2.setTextureOffset(0, 42).addBox(-1.6184F, -0.5961F, -1.0F, 3.0F, 12.0F, 2.0F, 0.0F, false);\n\n\t\tFRFoot2 = new IKModelRenderer(this,0,2,0);\n\t\tFRFoot2.setRotationPoint(-0.2F, 12.4F, -0.5F);\n\t\tFRShin2.addChild(FRFoot2);\n\t\tFRFoot2.setTextureOffset(0, 56).addBox(-1.4F, -1.0F, -1.5F, 3.0F, 2.0F, 4.0F, 0.0F, false);\n\n\t\t/*\n textureWidth = 16;\n\t\ttextureHeight = 16;\n\t\tbase = new IKModelRenderer(this);\n\t\tbase.setRotationPoint(0.0F, 24.0F, 0.0F);\n\t\tbase.setTextureOffset(0, 0).addBox(-8.0F, -2.0F, -8.0F, 16.0F, 2.0F, 16.0F, 0.0F, false);\n\t\t\n\t\tarm = new IKModelRenderer(this);\n\t\tarm.setRotationPoint(0.0F, -2.0F, 0.0F);\n\t\tbase.addChild(arm);\n\t\tarm.setTextureOffset(0, 0).addBox(-1.5F, -16.0F, -1.5F, 3.0F, 16.0F, 3.0F, 0.0F, false);\n\t\t\n\t\telbow = new IKModelRenderer(this);\n\t\telbow.setRotationPoint(0.0F, -16.0F, 0.0F);\n\t\tarm.addChild(elbow);\n\t\telbow.setTextureOffset(0, 0).addBox(-1.5F, -16.0F, -1.5F, 3.0F, 16.0F, 3.0F, 0.0F, false);\n\n\t\tforearm = new IKModelRenderer(this,0,27,0);\n\t\tforearm.setRotationPoint(0.0F, -16.0F, 0.0F);\n\t\telbow.addChild(forearm);\n\t\tforearm.setTextureOffset(0, 0).addBox(-1.5F, -23.0F, -1.5F, 3.0F, 23.0F, 3.0F, 0.0F, false);\n\t\tforearm.setTextureOffset(0, 0).addBox(-2.5F, -27.0F, -2.5F, 5.0F, 4.0F, 5.0F, 0.0F, false);\n\t\t*/\n\t}", "public static StateVector integrate( StateVector state, double dt) {\r\n StateVector dummy = new StateVector();\r\n StateVector derivative_a, derivative_b, derivative_c, derivative_d;\r\n\r\n\r\n derivative_a = evaluate(state, 0.0, dummy, 0 ); // derivative a returns initial velocity and acceleration\r\n derivative_b = evaluate(state, dt*0.5, derivative_a, 1 );\r\n derivative_c = evaluate(state, dt*0.5, derivative_b, 1 );\r\n derivative_d = evaluate(state, dt, derivative_c, 2 );\r\n\r\n double dxdt = 1.0/6.0 * (derivative_a.vx + 2.0f*(derivative_b.vx + derivative_c.vx) + derivative_d.vx);\r\n double dydt = 1.0/6.0 * (derivative_a.vy + 2.0f*(derivative_b.vy + derivative_c.vy) + derivative_d.vy);\r\n double dzdt = 1.0/6.0 * (derivative_a.vz + 2.0f*(derivative_b.vz + derivative_c.vz) + derivative_d.vz);\r\n double dvxdt = 1.0/6.0 * (derivative_a.ax + 2.0f*(derivative_b.ax + derivative_c.ax) + derivative_d.ax);\r\n double dvydt = 1.0/6.0 * (derivative_a.ay + 2.0f*(derivative_b.ay + derivative_c.ay) + derivative_d.ay);\r\n double dvzdt = 1.0/6.0 * (derivative_a.az + 2.0f*(derivative_b.az + derivative_c.az) + derivative_d.az);\r\n\r\n state.x = state.x + dxdt * dt;\r\n state.y = state.y + dydt * dt;\r\n state.z = state.z + dzdt * dt;\r\n state.vx = state.vx + dvxdt * dt;\r\n state.vy = state.vy + dvydt * dt;\r\n state.vz = state.vz + dvzdt * dt;\r\n\r\n return( state );\r\n }", "public abstract Quadric estimate() throws LockedException, \n NotReadyException, RobustEstimatorException;", "public abstract TrajectoryInfo solve();", "public void mo3864q() {\n /*\n r47 = this;\n r1 = r47\n r2 = -36394236204204(0xffffdee64e7aab54, double:NaN)\n p000.C0200av.m970a(r2)\n r2 = -36424300975276(0xffffdedf4e7aab54, double:NaN)\n p000.C0200av.m970a(r2)\n android.content.Context r0 = r1.f3510a\n boolean r0 = p000.C0432eo.m1606a(r0)\n r6 = -26206573778092(0xffffe82a4e7aab54, double:NaN)\n r2 = -26137854301356(0xffffe83a4e7aab54, double:NaN)\n r8 = -26107789530284(0xffffe8414e7aab54, double:NaN)\n r18 = -27091337041068(0xffffe75c4e7aab54, double:NaN)\n r20 = 2\n r21 = -26726264820908(0xffffe7b14e7aab54, double:NaN)\n r30 = -26756329591980(0xffffe7aa4e7aab54, double:NaN)\n r32 = -26919538349228(0xffffe7844e7aab54, double:NaN)\n r15 = 4\n r4 = 28\n r34 = -27061272269996(0xffffe7634e7aab54, double:NaN)\n r14 = 1\n java.lang.Integer r5 = java.lang.Integer.valueOf(r14)\n r12 = 0\n java.lang.Integer r36 = java.lang.Integer.valueOf(r12)\n if (r0 == 0) goto L_0x023e\n fo r0 = p000.C0489fo.USB\n go r13 = p000.C0544go.f2400t\n r1.mo3857e(r12, r0, r13)\n go r10 = p000.C0544go.f2344F\n r1.mo3857e(r14, r0, r10)\n ko r10 = r1.f3511b\n java.lang.Boolean r43 = java.lang.Boolean.TRUE\n r10.getClass()\n java.lang.String r0 = p000.C0432eo.m1607b(r0)\n if (r0 == 0) goto L_0x006d\n L_0x006a:\n r46 = r0\n goto L_0x0077\n L_0x006d:\n r23 = -22512901903532(0xffffeb864e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r23)\n goto L_0x006a\n L_0x0077:\n boolean r0 = r46.isEmpty()\n if (r0 == 0) goto L_0x009c\n boolean r0 = r13.mo2961a()\n if (r0 != 0) goto L_0x009c\n java.lang.String r0 = p000.C0200av.m970a(r8)\n java.lang.StringBuilder r10 = new java.lang.StringBuilder\n r10.<init>()\n r5 = 16\n r4 = r10\n p000.C0279ch.m1112i(r2, r4, r5, r6)\n r2 = 4\n r3 = -26979667891372(0xffffe7764e7aab54, double:NaN)\n r6 = 0\n r7 = 1\n goto L_0x0431\n L_0x009c:\n int r0 = android.os.Build.VERSION.SDK_INT\n if (r0 >= r4) goto L_0x016a\n java.lang.String r0 = r13.f2410c\n go r2 = p000.C0544go.f2374g\n if (r13 == r2) goto L_0x00b1\n go r2 = p000.C0544go.f2376h\n if (r13 == r2) goto L_0x00b1\n go r2 = p000.C0544go.f2352N\n if (r13 != r2) goto L_0x00af\n goto L_0x00b1\n L_0x00af:\n r2 = 0\n goto L_0x00b2\n L_0x00b1:\n r2 = 1\n L_0x00b2:\n if (r2 == 0) goto L_0x00bd\n r2 = -25996120380588(0xffffe85b4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r2)\n L_0x00bd:\n java.lang.reflect.Method r2 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x00e0 }\n java.lang.Class[] r2 = r2.getParameterTypes() // Catch:{ Exception -> 0x00e0 }\n int r2 = r2.length // Catch:{ Exception -> 0x00e0 }\n if (r2 != r15) goto L_0x00e2\n java.lang.reflect.Method r2 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x00e0 }\n java.lang.Class<?> r3 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x00e0 }\n java.lang.Object[] r4 = new java.lang.Object[r15] // Catch:{ Exception -> 0x00e0 }\n int r6 = r13.f2409b // Catch:{ Exception -> 0x00e0 }\n java.lang.Integer r6 = java.lang.Integer.valueOf(r6) // Catch:{ Exception -> 0x00e0 }\n r4[r12] = r6 // Catch:{ Exception -> 0x00e0 }\n r4[r14] = r5 // Catch:{ Exception -> 0x00e0 }\n r4[r20] = r46 // Catch:{ Exception -> 0x00e0 }\n r5 = 3\n r4[r5] = r0 // Catch:{ Exception -> 0x00e0 }\n java.lang.Object r0 = r2.invoke(r3, r4) // Catch:{ Exception -> 0x00e0 }\n goto L_0x00f9\n L_0x00e0:\n r0 = move-exception\n goto L_0x0109\n L_0x00e2:\n java.lang.reflect.Method r0 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x00e0 }\n java.lang.Class<?> r2 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x00e0 }\n r3 = 3\n java.lang.Object[] r3 = new java.lang.Object[r3] // Catch:{ Exception -> 0x00e0 }\n int r4 = r13.f2409b // Catch:{ Exception -> 0x00e0 }\n java.lang.Integer r4 = java.lang.Integer.valueOf(r4) // Catch:{ Exception -> 0x00e0 }\n r3[r12] = r4 // Catch:{ Exception -> 0x00e0 }\n r3[r14] = r5 // Catch:{ Exception -> 0x00e0 }\n r3[r20] = r46 // Catch:{ Exception -> 0x00e0 }\n java.lang.Object r0 = r0.invoke(r2, r3) // Catch:{ Exception -> 0x00e0 }\n L_0x00f9:\n java.lang.Integer r0 = (java.lang.Integer) r0 // Catch:{ Exception -> 0x00e0 }\n int r0 = r0.intValue() // Catch:{ Exception -> 0x00e0 }\n r2 = 4\n r3 = -26979667891372(0xffffe7764e7aab54, double:NaN)\n r6 = 0\n r7 = 1\n goto L_0x0227\n L_0x0109:\n r2 = -26077724759212(0xffffe8484e7aab54, double:NaN)\n java.lang.String r2 = p000.C0200av.m970a(r2)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r2)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r2 = p000.C0279ch.m1104a(r23, r25, r26, r27, r28)\n r3 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r2 = p000.C0279ch.m1118o(r0, r2, r3)\n r3 = -26979667891372(0xffffe7764e7aab54, double:NaN)\n java.lang.Throwable r17 = p000.C0279ch.m1107d(r3, r2, r0)\n if (r17 == 0) goto L_0x014d\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n r6 = 0\n r12 = r18\n r7 = 1\n r14 = r2\n r2 = 4\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x0165\n L_0x014d:\n r2 = 4\n r6 = 0\n r7 = 1\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x0165:\n p000.C0550gu.m1821c(r0)\n goto L_0x0225\n L_0x016a:\n r2 = 4\n r3 = -26979667891372(0xffffe7764e7aab54, double:NaN)\n r6 = 0\n r7 = 1\n android.media.AudioManager r0 = r10.f3020a\n if (r0 != 0) goto L_0x018e\n r10 = -24411277448364(0xffffe9cc4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r10)\n r10 = -24441342219436(0xffffe9c54e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r0, r5)\n r0 = 1\n goto L_0x0227\n L_0x018e:\n r11 = -24518651630764(0xffffe9b34e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r11)\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x01d1 }\n java.lang.Class[] r11 = r11.getParameterTypes() // Catch:{ all -> 0x01d1 }\n int r11 = r11.length // Catch:{ all -> 0x01d1 }\n r12 = 3\n if (r11 != r12) goto L_0x01b7\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x01d1 }\n android.media.AudioManager r10 = r10.f3020a // Catch:{ all -> 0x01d1 }\n java.lang.Object[] r12 = new java.lang.Object[r12] // Catch:{ all -> 0x01d1 }\n int r13 = r13.f2409b // Catch:{ all -> 0x01d1 }\n java.lang.Integer r13 = java.lang.Integer.valueOf(r13) // Catch:{ all -> 0x01d1 }\n r12[r6] = r13 // Catch:{ all -> 0x01d1 }\n r12[r7] = r5 // Catch:{ all -> 0x01d1 }\n r12[r20] = r0 // Catch:{ all -> 0x01d1 }\n r11.invoke(r10, r12) // Catch:{ all -> 0x01d1 }\n goto L_0x01cf\n L_0x01b7:\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x01d1 }\n android.media.AudioManager r10 = r10.f3020a // Catch:{ all -> 0x01d1 }\n java.lang.Object[] r12 = new java.lang.Object[r2] // Catch:{ all -> 0x01d1 }\n int r13 = r13.f2409b // Catch:{ all -> 0x01d1 }\n java.lang.Integer r13 = java.lang.Integer.valueOf(r13) // Catch:{ all -> 0x01d1 }\n r12[r6] = r13 // Catch:{ all -> 0x01d1 }\n r12[r7] = r5 // Catch:{ all -> 0x01d1 }\n r12[r20] = r46 // Catch:{ all -> 0x01d1 }\n r5 = 3\n r12[r5] = r0 // Catch:{ all -> 0x01d1 }\n r11.invoke(r10, r12) // Catch:{ all -> 0x01d1 }\n L_0x01cf:\n r0 = 0\n goto L_0x0227\n L_0x01d1:\n r0 = move-exception\n r10 = -24600256009388(0xffffe9a04e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r5)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r5 = p000.C0279ch.m1105b(r23, r25, r26, r27, r28)\n r10 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0279ch.m1123t(r0, r5, r10)\n java.lang.Throwable r17 = p000.C0279ch.m1108e(r3, r5, r0)\n if (r17 == 0) goto L_0x020d\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x0222\n L_0x020d:\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x0222:\n p000.C0550gu.m1821c(r0)\n L_0x0225:\n r0 = -999(0xfffffffffffffc19, float:NaN)\n L_0x0227:\n r10 = -26322537895084(0xffffe80f4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.StringBuilder r10 = new java.lang.StringBuilder\n r10.<init>()\n r37 = -26352602666156(0xffffe8084e7aab54, double:NaN)\n r40 = 16\n goto L_0x0419\n L_0x023e:\n r2 = 4\n r3 = -26979667891372(0xffffe7764e7aab54, double:NaN)\n r6 = 0\n r7 = 1\n fo r0 = p000.C0489fo.USB\n go r10 = p000.C0544go.f2400t\n r1.mo3857e(r7, r0, r10)\n go r10 = p000.C0544go.f2344F\n r1.mo3857e(r6, r0, r10)\n ko r11 = r1.f3511b\n java.lang.Boolean r43 = java.lang.Boolean.TRUE\n r11.getClass()\n java.lang.String r0 = p000.C0432eo.m1607b(r0)\n if (r0 == 0) goto L_0x0262\n L_0x025f:\n r46 = r0\n goto L_0x026c\n L_0x0262:\n r12 = -22512901903532(0xffffeb864e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r12)\n goto L_0x025f\n L_0x026c:\n boolean r0 = r46.isEmpty()\n if (r0 == 0) goto L_0x0294\n boolean r0 = r10.mo2961a()\n if (r0 != 0) goto L_0x0294\n java.lang.String r0 = p000.C0200av.m970a(r8)\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r10 = -26137854301356(0xffffe83a4e7aab54, double:NaN)\n r13 = 28\n r14 = -26206573778092(0xffffe82a4e7aab54, double:NaN)\n r12 = r5\n p000.C0279ch.m1112i(r10, r12, r13, r14)\n r10 = r5\n goto L_0x0431\n L_0x0294:\n r0 = 28\n int r12 = android.os.Build.VERSION.SDK_INT\n if (r12 >= r0) goto L_0x034f\n java.lang.String r0 = r10.f2410c\n go r11 = p000.C0544go.f2374g\n if (r10 == r11) goto L_0x02ab\n go r11 = p000.C0544go.f2376h\n if (r10 == r11) goto L_0x02ab\n go r11 = p000.C0544go.f2352N\n if (r10 != r11) goto L_0x02a9\n goto L_0x02ab\n L_0x02a9:\n r11 = 0\n goto L_0x02ac\n L_0x02ab:\n r11 = 1\n L_0x02ac:\n if (r11 == 0) goto L_0x02b7\n r11 = -25996120380588(0xffffe85b4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r11)\n L_0x02b7:\n java.lang.reflect.Method r11 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x02f9 }\n java.lang.Class[] r11 = r11.getParameterTypes() // Catch:{ Exception -> 0x02f9 }\n int r11 = r11.length // Catch:{ Exception -> 0x02f9 }\n if (r11 != r2) goto L_0x02da\n java.lang.reflect.Method r11 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x02f9 }\n java.lang.Class<?> r12 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x02f9 }\n java.lang.Object[] r13 = new java.lang.Object[r2] // Catch:{ Exception -> 0x02f9 }\n int r10 = r10.f2409b // Catch:{ Exception -> 0x02f9 }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ Exception -> 0x02f9 }\n r13[r6] = r10 // Catch:{ Exception -> 0x02f9 }\n r13[r7] = r5 // Catch:{ Exception -> 0x02f9 }\n r13[r20] = r46 // Catch:{ Exception -> 0x02f9 }\n r5 = 3\n r13[r5] = r0 // Catch:{ Exception -> 0x02f9 }\n java.lang.Object r0 = r11.invoke(r12, r13) // Catch:{ Exception -> 0x02f9 }\n goto L_0x02f1\n L_0x02da:\n java.lang.reflect.Method r0 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x02f9 }\n java.lang.Class<?> r11 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x02f9 }\n r12 = 3\n java.lang.Object[] r12 = new java.lang.Object[r12] // Catch:{ Exception -> 0x02f9 }\n int r10 = r10.f2409b // Catch:{ Exception -> 0x02f9 }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ Exception -> 0x02f9 }\n r12[r6] = r10 // Catch:{ Exception -> 0x02f9 }\n r12[r7] = r5 // Catch:{ Exception -> 0x02f9 }\n r12[r20] = r46 // Catch:{ Exception -> 0x02f9 }\n java.lang.Object r0 = r0.invoke(r11, r12) // Catch:{ Exception -> 0x02f9 }\n L_0x02f1:\n java.lang.Integer r0 = (java.lang.Integer) r0 // Catch:{ Exception -> 0x02f9 }\n int r0 = r0.intValue() // Catch:{ Exception -> 0x02f9 }\n goto L_0x0404\n L_0x02f9:\n r0 = move-exception\n r10 = -26077724759212(0xffffe8484e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r5)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r5 = p000.C0279ch.m1104a(r23, r25, r26, r27, r28)\n r10 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0279ch.m1118o(r0, r5, r10)\n java.lang.Throwable r17 = p000.C0279ch.m1107d(r3, r5, r0)\n if (r17 == 0) goto L_0x0335\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x034a\n L_0x0335:\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x034a:\n p000.C0550gu.m1821c(r0)\n goto L_0x0402\n L_0x034f:\n android.media.AudioManager r0 = r11.f3020a\n if (r0 != 0) goto L_0x036b\n r10 = -24411277448364(0xffffe9cc4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r10)\n r10 = -24441342219436(0xffffe9c54e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r0, r5)\n r0 = 1\n goto L_0x0404\n L_0x036b:\n r12 = -24518651630764(0xffffe9b34e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r12)\n java.lang.reflect.Method r12 = p000.C0735ko.f3017f // Catch:{ all -> 0x03ae }\n java.lang.Class[] r12 = r12.getParameterTypes() // Catch:{ all -> 0x03ae }\n int r12 = r12.length // Catch:{ all -> 0x03ae }\n r13 = 3\n if (r12 != r13) goto L_0x0394\n java.lang.reflect.Method r12 = p000.C0735ko.f3017f // Catch:{ all -> 0x03ae }\n android.media.AudioManager r11 = r11.f3020a // Catch:{ all -> 0x03ae }\n java.lang.Object[] r13 = new java.lang.Object[r13] // Catch:{ all -> 0x03ae }\n int r10 = r10.f2409b // Catch:{ all -> 0x03ae }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ all -> 0x03ae }\n r13[r6] = r10 // Catch:{ all -> 0x03ae }\n r13[r7] = r5 // Catch:{ all -> 0x03ae }\n r13[r20] = r0 // Catch:{ all -> 0x03ae }\n r12.invoke(r11, r13) // Catch:{ all -> 0x03ae }\n goto L_0x03ac\n L_0x0394:\n java.lang.reflect.Method r12 = p000.C0735ko.f3017f // Catch:{ all -> 0x03ae }\n android.media.AudioManager r11 = r11.f3020a // Catch:{ all -> 0x03ae }\n java.lang.Object[] r13 = new java.lang.Object[r2] // Catch:{ all -> 0x03ae }\n int r10 = r10.f2409b // Catch:{ all -> 0x03ae }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ all -> 0x03ae }\n r13[r6] = r10 // Catch:{ all -> 0x03ae }\n r13[r7] = r5 // Catch:{ all -> 0x03ae }\n r13[r20] = r46 // Catch:{ all -> 0x03ae }\n r5 = 3\n r13[r5] = r0 // Catch:{ all -> 0x03ae }\n r12.invoke(r11, r13) // Catch:{ all -> 0x03ae }\n L_0x03ac:\n r0 = 0\n goto L_0x0404\n L_0x03ae:\n r0 = move-exception\n r10 = -24600256009388(0xffffe9a04e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r5)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r5 = p000.C0279ch.m1105b(r23, r25, r26, r27, r28)\n r10 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0279ch.m1123t(r0, r5, r10)\n java.lang.Throwable r17 = p000.C0279ch.m1108e(r3, r5, r0)\n if (r17 == 0) goto L_0x03ea\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x03ff\n L_0x03ea:\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x03ff:\n p000.C0550gu.m1821c(r0)\n L_0x0402:\n r0 = -999(0xfffffffffffffc19, float:NaN)\n L_0x0404:\n r10 = -26322537895084(0xffffe80f4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.StringBuilder r10 = new java.lang.StringBuilder\n r10.<init>()\n r37 = -26352602666156(0xffffe8084e7aab54, double:NaN)\n r40 = 28\n L_0x0419:\n r41 = -26374077502636(0xffffe8034e7aab54, double:NaN)\n r44 = -26386962404524(0xffffe8004e7aab54, double:NaN)\n r39 = r10\n p000.C0279ch.m1113j(r37, r39, r40, r41, r43, r44, r46)\n r11 = -26412732208300(0xffffe7fa4e7aab54, double:NaN)\n p000.C0279ch.m1111h(r11, r10, r0)\n r0 = r5\n L_0x0431:\n java.lang.String r5 = r10.toString()\n p000.C0550gu.m1820b(r0, r5)\n r10 = 100\n java.lang.Thread.sleep(r10)\n fo r0 = p000.C0489fo.WIRED_HEADPHONE\n go r5 = p000.C0544go.f2352N\n go[] r10 = new p000.C0544go[r7]\n go r11 = p000.C0544go.f2365a0\n r10[r6] = r11\n r1.mo3858f(r7, r0, r5, r10)\n ko r0 = r1.f3511b\n go r10 = p000.C0544go.f2405w\n java.lang.Boolean r43 = java.lang.Boolean.FALSE\n r0.getClass()\n r11 = -22762010006700(0xffffeb4c4e7aab54, double:NaN)\n java.lang.String r46 = p000.C0200av.m970a(r11)\n boolean r11 = r46.isEmpty()\n if (r11 == 0) goto L_0x0483\n boolean r11 = r10.mo2961a()\n if (r11 != 0) goto L_0x0483\n java.lang.String r0 = p000.C0200av.m970a(r8)\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r10 = -26137854301356(0xffffe83a4e7aab54, double:NaN)\n r13 = 19\n r14 = -26206573778092(0xffffe82a4e7aab54, double:NaN)\n r12 = r5\n p000.C0279ch.m1112i(r10, r12, r13, r14)\n goto L_0x061f\n L_0x0483:\n int r11 = android.os.Build.VERSION.SDK_INT\n r12 = 28\n if (r11 >= r12) goto L_0x053c\n java.lang.String r0 = r10.f2410c\n go r11 = p000.C0544go.f2374g\n if (r10 == r11) goto L_0x0498\n go r11 = p000.C0544go.f2376h\n if (r10 == r11) goto L_0x0498\n if (r10 != r5) goto L_0x0496\n goto L_0x0498\n L_0x0496:\n r5 = 0\n goto L_0x0499\n L_0x0498:\n r5 = 1\n L_0x0499:\n if (r5 == 0) goto L_0x04a4\n r11 = -25996120380588(0xffffe85b4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r11)\n L_0x04a4:\n java.lang.reflect.Method r5 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x04e6 }\n java.lang.Class[] r5 = r5.getParameterTypes() // Catch:{ Exception -> 0x04e6 }\n int r5 = r5.length // Catch:{ Exception -> 0x04e6 }\n if (r5 != r2) goto L_0x04c7\n java.lang.reflect.Method r5 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x04e6 }\n java.lang.Class<?> r11 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x04e6 }\n java.lang.Object[] r12 = new java.lang.Object[r2] // Catch:{ Exception -> 0x04e6 }\n int r10 = r10.f2409b // Catch:{ Exception -> 0x04e6 }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ Exception -> 0x04e6 }\n r12[r6] = r10 // Catch:{ Exception -> 0x04e6 }\n r12[r7] = r36 // Catch:{ Exception -> 0x04e6 }\n r12[r20] = r46 // Catch:{ Exception -> 0x04e6 }\n r10 = 3\n r12[r10] = r0 // Catch:{ Exception -> 0x04e6 }\n java.lang.Object r0 = r5.invoke(r11, r12) // Catch:{ Exception -> 0x04e6 }\n goto L_0x04de\n L_0x04c7:\n java.lang.reflect.Method r0 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x04e6 }\n java.lang.Class<?> r5 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x04e6 }\n r11 = 3\n java.lang.Object[] r11 = new java.lang.Object[r11] // Catch:{ Exception -> 0x04e6 }\n int r10 = r10.f2409b // Catch:{ Exception -> 0x04e6 }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ Exception -> 0x04e6 }\n r11[r6] = r10 // Catch:{ Exception -> 0x04e6 }\n r11[r7] = r36 // Catch:{ Exception -> 0x04e6 }\n r11[r20] = r46 // Catch:{ Exception -> 0x04e6 }\n java.lang.Object r0 = r0.invoke(r5, r11) // Catch:{ Exception -> 0x04e6 }\n L_0x04de:\n java.lang.Integer r0 = (java.lang.Integer) r0 // Catch:{ Exception -> 0x04e6 }\n int r0 = r0.intValue() // Catch:{ Exception -> 0x04e6 }\n goto L_0x05f1\n L_0x04e6:\n r0 = move-exception\n r10 = -26077724759212(0xffffe8484e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r5)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r5 = p000.C0279ch.m1104a(r23, r25, r26, r27, r28)\n r10 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0279ch.m1118o(r0, r5, r10)\n java.lang.Throwable r17 = p000.C0279ch.m1107d(r3, r5, r0)\n if (r17 == 0) goto L_0x0522\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x0537\n L_0x0522:\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x0537:\n p000.C0550gu.m1821c(r0)\n goto L_0x05ef\n L_0x053c:\n android.media.AudioManager r5 = r0.f3020a\n if (r5 != 0) goto L_0x0558\n r10 = -24411277448364(0xffffe9cc4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r10)\n r10 = -24441342219436(0xffffe9c54e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r0, r5)\n r0 = 1\n goto L_0x05f1\n L_0x0558:\n r11 = -24518651630764(0xffffe9b34e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r11)\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x059b }\n java.lang.Class[] r11 = r11.getParameterTypes() // Catch:{ all -> 0x059b }\n int r11 = r11.length // Catch:{ all -> 0x059b }\n r12 = 3\n if (r11 != r12) goto L_0x0581\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x059b }\n android.media.AudioManager r0 = r0.f3020a // Catch:{ all -> 0x059b }\n java.lang.Object[] r12 = new java.lang.Object[r12] // Catch:{ all -> 0x059b }\n int r10 = r10.f2409b // Catch:{ all -> 0x059b }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ all -> 0x059b }\n r12[r6] = r10 // Catch:{ all -> 0x059b }\n r12[r7] = r36 // Catch:{ all -> 0x059b }\n r12[r20] = r5 // Catch:{ all -> 0x059b }\n r11.invoke(r0, r12) // Catch:{ all -> 0x059b }\n goto L_0x0599\n L_0x0581:\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x059b }\n android.media.AudioManager r0 = r0.f3020a // Catch:{ all -> 0x059b }\n java.lang.Object[] r12 = new java.lang.Object[r2] // Catch:{ all -> 0x059b }\n int r10 = r10.f2409b // Catch:{ all -> 0x059b }\n java.lang.Integer r10 = java.lang.Integer.valueOf(r10) // Catch:{ all -> 0x059b }\n r12[r6] = r10 // Catch:{ all -> 0x059b }\n r12[r7] = r36 // Catch:{ all -> 0x059b }\n r12[r20] = r46 // Catch:{ all -> 0x059b }\n r10 = 3\n r12[r10] = r5 // Catch:{ all -> 0x059b }\n r11.invoke(r0, r12) // Catch:{ all -> 0x059b }\n L_0x0599:\n r0 = 0\n goto L_0x05f1\n L_0x059b:\n r0 = move-exception\n r10 = -24600256009388(0xffffe9a04e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r5)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r5 = p000.C0279ch.m1105b(r23, r25, r26, r27, r28)\n r10 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0279ch.m1123t(r0, r5, r10)\n java.lang.Throwable r17 = p000.C0279ch.m1108e(r3, r5, r0)\n if (r17 == 0) goto L_0x05d7\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x05ec\n L_0x05d7:\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x05ec:\n p000.C0550gu.m1821c(r0)\n L_0x05ef:\n r0 = -999(0xfffffffffffffc19, float:NaN)\n L_0x05f1:\n r10 = -26322537895084(0xffffe80f4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.StringBuilder r10 = new java.lang.StringBuilder\n r10.<init>()\n r37 = -26352602666156(0xffffe8084e7aab54, double:NaN)\n r40 = 19\n r41 = -26374077502636(0xffffe8034e7aab54, double:NaN)\n r44 = -26386962404524(0xffffe8004e7aab54, double:NaN)\n r39 = r10\n p000.C0279ch.m1113j(r37, r39, r40, r41, r43, r44, r46)\n r11 = -26412732208300(0xffffe7fa4e7aab54, double:NaN)\n p000.C0279ch.m1111h(r11, r10, r0)\n r0 = r5\n r5 = r10\n L_0x061f:\n java.lang.String r5 = r5.toString()\n p000.C0550gu.m1820b(r0, r5)\n ko r0 = r1.f3511b\n go r5 = p000.C0544go.f2339A\n java.lang.Boolean r43 = java.lang.Boolean.FALSE\n r0.getClass()\n r10 = -22762010006700(0xffffeb4c4e7aab54, double:NaN)\n java.lang.String r46 = p000.C0200av.m970a(r10)\n boolean r10 = r46.isEmpty()\n if (r10 == 0) goto L_0x065f\n boolean r10 = r5.mo2961a()\n if (r10 != 0) goto L_0x065f\n java.lang.String r0 = p000.C0200av.m970a(r8)\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r10 = -26137854301356(0xffffe83a4e7aab54, double:NaN)\n r13 = 23\n r14 = -26206573778092(0xffffe82a4e7aab54, double:NaN)\n r12 = r5\n p000.C0279ch.m1112i(r10, r12, r13, r14)\n goto L_0x07fd\n L_0x065f:\n int r10 = android.os.Build.VERSION.SDK_INT\n r11 = 28\n if (r10 >= r11) goto L_0x071a\n java.lang.String r0 = r5.f2410c\n go r10 = p000.C0544go.f2374g\n if (r5 == r10) goto L_0x0676\n go r10 = p000.C0544go.f2376h\n if (r5 == r10) goto L_0x0676\n go r10 = p000.C0544go.f2352N\n if (r5 != r10) goto L_0x0674\n goto L_0x0676\n L_0x0674:\n r10 = 0\n goto L_0x0677\n L_0x0676:\n r10 = 1\n L_0x0677:\n if (r10 == 0) goto L_0x0682\n r10 = -25996120380588(0xffffe85b4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r10)\n L_0x0682:\n java.lang.reflect.Method r10 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x06c4 }\n java.lang.Class[] r10 = r10.getParameterTypes() // Catch:{ Exception -> 0x06c4 }\n int r10 = r10.length // Catch:{ Exception -> 0x06c4 }\n if (r10 != r2) goto L_0x06a5\n java.lang.reflect.Method r10 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x06c4 }\n java.lang.Class<?> r11 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x06c4 }\n java.lang.Object[] r12 = new java.lang.Object[r2] // Catch:{ Exception -> 0x06c4 }\n int r5 = r5.f2409b // Catch:{ Exception -> 0x06c4 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ Exception -> 0x06c4 }\n r12[r6] = r5 // Catch:{ Exception -> 0x06c4 }\n r12[r7] = r36 // Catch:{ Exception -> 0x06c4 }\n r12[r20] = r46 // Catch:{ Exception -> 0x06c4 }\n r5 = 3\n r12[r5] = r0 // Catch:{ Exception -> 0x06c4 }\n java.lang.Object r0 = r10.invoke(r11, r12) // Catch:{ Exception -> 0x06c4 }\n goto L_0x06bc\n L_0x06a5:\n java.lang.reflect.Method r0 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x06c4 }\n java.lang.Class<?> r10 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x06c4 }\n r11 = 3\n java.lang.Object[] r11 = new java.lang.Object[r11] // Catch:{ Exception -> 0x06c4 }\n int r5 = r5.f2409b // Catch:{ Exception -> 0x06c4 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ Exception -> 0x06c4 }\n r11[r6] = r5 // Catch:{ Exception -> 0x06c4 }\n r11[r7] = r36 // Catch:{ Exception -> 0x06c4 }\n r11[r20] = r46 // Catch:{ Exception -> 0x06c4 }\n java.lang.Object r0 = r0.invoke(r10, r11) // Catch:{ Exception -> 0x06c4 }\n L_0x06bc:\n java.lang.Integer r0 = (java.lang.Integer) r0 // Catch:{ Exception -> 0x06c4 }\n int r0 = r0.intValue() // Catch:{ Exception -> 0x06c4 }\n goto L_0x07cf\n L_0x06c4:\n r0 = move-exception\n r10 = -26077724759212(0xffffe8484e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r5)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r5 = p000.C0279ch.m1104a(r23, r25, r26, r27, r28)\n r10 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0279ch.m1118o(r0, r5, r10)\n java.lang.Throwable r17 = p000.C0279ch.m1107d(r3, r5, r0)\n if (r17 == 0) goto L_0x0700\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x0715\n L_0x0700:\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x0715:\n p000.C0550gu.m1821c(r0)\n goto L_0x07cd\n L_0x071a:\n android.media.AudioManager r10 = r0.f3020a\n if (r10 != 0) goto L_0x0736\n r10 = -24411277448364(0xffffe9cc4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r10)\n r10 = -24441342219436(0xffffe9c54e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r0, r5)\n r0 = 1\n goto L_0x07cf\n L_0x0736:\n r10 = -24518651630764(0xffffe9b34e7aab54, double:NaN)\n java.lang.String r10 = p000.C0200av.m970a(r10)\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x0779 }\n java.lang.Class[] r11 = r11.getParameterTypes() // Catch:{ all -> 0x0779 }\n int r11 = r11.length // Catch:{ all -> 0x0779 }\n r12 = 3\n if (r11 != r12) goto L_0x075f\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x0779 }\n android.media.AudioManager r0 = r0.f3020a // Catch:{ all -> 0x0779 }\n java.lang.Object[] r12 = new java.lang.Object[r12] // Catch:{ all -> 0x0779 }\n int r5 = r5.f2409b // Catch:{ all -> 0x0779 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ all -> 0x0779 }\n r12[r6] = r5 // Catch:{ all -> 0x0779 }\n r12[r7] = r36 // Catch:{ all -> 0x0779 }\n r12[r20] = r10 // Catch:{ all -> 0x0779 }\n r11.invoke(r0, r12) // Catch:{ all -> 0x0779 }\n goto L_0x0777\n L_0x075f:\n java.lang.reflect.Method r11 = p000.C0735ko.f3017f // Catch:{ all -> 0x0779 }\n android.media.AudioManager r0 = r0.f3020a // Catch:{ all -> 0x0779 }\n java.lang.Object[] r12 = new java.lang.Object[r2] // Catch:{ all -> 0x0779 }\n int r5 = r5.f2409b // Catch:{ all -> 0x0779 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ all -> 0x0779 }\n r12[r6] = r5 // Catch:{ all -> 0x0779 }\n r12[r7] = r36 // Catch:{ all -> 0x0779 }\n r12[r20] = r46 // Catch:{ all -> 0x0779 }\n r5 = 3\n r12[r5] = r10 // Catch:{ all -> 0x0779 }\n r11.invoke(r0, r12) // Catch:{ all -> 0x0779 }\n L_0x0777:\n r0 = 0\n goto L_0x07cf\n L_0x0779:\n r0 = move-exception\n r10 = -24600256009388(0xffffe9a04e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r5)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r5 = p000.C0279ch.m1105b(r23, r25, r26, r27, r28)\n r10 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0279ch.m1123t(r0, r5, r10)\n java.lang.Throwable r17 = p000.C0279ch.m1108e(r3, r5, r0)\n if (r17 == 0) goto L_0x07b5\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x07ca\n L_0x07b5:\n r10 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n r10 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r12 = p000.C0200av.m970a(r10)\n p000.C0550gu.m1819a(r5, r12)\n L_0x07ca:\n p000.C0550gu.m1821c(r0)\n L_0x07cd:\n r0 = -999(0xfffffffffffffc19, float:NaN)\n L_0x07cf:\n r10 = -26322537895084(0xffffe80f4e7aab54, double:NaN)\n java.lang.String r5 = p000.C0200av.m970a(r10)\n java.lang.StringBuilder r10 = new java.lang.StringBuilder\n r10.<init>()\n r37 = -26352602666156(0xffffe8084e7aab54, double:NaN)\n r40 = 23\n r41 = -26374077502636(0xffffe8034e7aab54, double:NaN)\n r44 = -26386962404524(0xffffe8004e7aab54, double:NaN)\n r39 = r10\n p000.C0279ch.m1113j(r37, r39, r40, r41, r43, r44, r46)\n r11 = -26412732208300(0xffffe7fa4e7aab54, double:NaN)\n p000.C0279ch.m1111h(r11, r10, r0)\n r0 = r5\n r5 = r10\n L_0x07fd:\n java.lang.String r5 = r5.toString()\n p000.C0550gu.m1820b(r0, r5)\n android.content.Context r0 = r1.f3510a\n boolean r0 = p000.C0697ju.m2181d(r0)\n if (r0 == 0) goto L_0x09f1\n ko r0 = r1.f3511b\n go r5 = p000.C0544go.f2402u\n java.lang.Boolean r43 = java.lang.Boolean.FALSE\n r0.getClass()\n r10 = -22762010006700(0xffffeb4c4e7aab54, double:NaN)\n java.lang.String r46 = p000.C0200av.m970a(r10)\n boolean r10 = r46.isEmpty()\n if (r10 == 0) goto L_0x0845\n boolean r10 = r5.mo2961a()\n if (r10 != 0) goto L_0x0845\n java.lang.String r0 = p000.C0200av.m970a(r8)\n java.lang.StringBuilder r8 = new java.lang.StringBuilder\n r8.<init>()\n r2 = -26137854301356(0xffffe83a4e7aab54, double:NaN)\n r5 = 17\n r6 = -26206573778092(0xffffe82a4e7aab54, double:NaN)\n r4 = r8\n p000.C0279ch.m1112i(r2, r4, r5, r6)\n goto L_0x09ea\n L_0x0845:\n int r8 = android.os.Build.VERSION.SDK_INT\n r9 = 28\n if (r8 >= r9) goto L_0x0907\n java.lang.String r0 = r5.f2410c\n go r8 = p000.C0544go.f2374g\n if (r5 == r8) goto L_0x085c\n go r8 = p000.C0544go.f2376h\n if (r5 == r8) goto L_0x085c\n go r8 = p000.C0544go.f2352N\n if (r5 != r8) goto L_0x085a\n goto L_0x085c\n L_0x085a:\n r8 = 0\n goto L_0x085d\n L_0x085c:\n r8 = 1\n L_0x085d:\n if (r8 == 0) goto L_0x0868\n r8 = -25996120380588(0xffffe85b4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r8)\n L_0x0868:\n java.lang.reflect.Method r8 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x08aa }\n java.lang.Class[] r8 = r8.getParameterTypes() // Catch:{ Exception -> 0x08aa }\n int r8 = r8.length // Catch:{ Exception -> 0x08aa }\n if (r8 != r2) goto L_0x088b\n java.lang.reflect.Method r8 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x08aa }\n java.lang.Class<?> r9 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x08aa }\n java.lang.Object[] r2 = new java.lang.Object[r2] // Catch:{ Exception -> 0x08aa }\n int r5 = r5.f2409b // Catch:{ Exception -> 0x08aa }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ Exception -> 0x08aa }\n r2[r6] = r5 // Catch:{ Exception -> 0x08aa }\n r2[r7] = r36 // Catch:{ Exception -> 0x08aa }\n r2[r20] = r46 // Catch:{ Exception -> 0x08aa }\n r5 = 3\n r2[r5] = r0 // Catch:{ Exception -> 0x08aa }\n java.lang.Object r0 = r8.invoke(r9, r2) // Catch:{ Exception -> 0x08aa }\n goto L_0x08a2\n L_0x088b:\n java.lang.reflect.Method r0 = p000.C0735ko.f3016e // Catch:{ Exception -> 0x08aa }\n java.lang.Class<?> r2 = p000.C0735ko.f3015d // Catch:{ Exception -> 0x08aa }\n r8 = 3\n java.lang.Object[] r8 = new java.lang.Object[r8] // Catch:{ Exception -> 0x08aa }\n int r5 = r5.f2409b // Catch:{ Exception -> 0x08aa }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ Exception -> 0x08aa }\n r8[r6] = r5 // Catch:{ Exception -> 0x08aa }\n r8[r7] = r36 // Catch:{ Exception -> 0x08aa }\n r8[r20] = r46 // Catch:{ Exception -> 0x08aa }\n java.lang.Object r0 = r0.invoke(r2, r8) // Catch:{ Exception -> 0x08aa }\n L_0x08a2:\n java.lang.Integer r0 = (java.lang.Integer) r0 // Catch:{ Exception -> 0x08aa }\n int r14 = r0.intValue() // Catch:{ Exception -> 0x08aa }\n goto L_0x09bc\n L_0x08aa:\n r0 = move-exception\n r5 = -26077724759212(0xffffe8484e7aab54, double:NaN)\n java.lang.String r2 = p000.C0200av.m970a(r5)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r2)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r2 = p000.C0279ch.m1104a(r23, r25, r26, r27, r28)\n r5 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r2 = p000.C0279ch.m1118o(r0, r2, r5)\n java.lang.Throwable r17 = p000.C0279ch.m1107d(r3, r2, r0)\n if (r17 == 0) goto L_0x08e6\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x08fb\n L_0x08e6:\n r2 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r2 = p000.C0200av.m970a(r2)\n r3 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r3 = p000.C0200av.m970a(r3)\n p000.C0550gu.m1819a(r2, r3)\n L_0x08fb:\n p000.C0550gu.m1821c(r0)\n r2 = -26322537895084(0xffffe80f4e7aab54, double:NaN)\n r0 = -999(0xfffffffffffffc19, float:NaN)\n goto L_0x09c2\n L_0x0907:\n android.media.AudioManager r8 = r0.f3020a\n if (r8 != 0) goto L_0x0923\n r2 = -24411277448364(0xffffe9cc4e7aab54, double:NaN)\n java.lang.String r0 = p000.C0200av.m970a(r2)\n r2 = -24441342219436(0xffffe9c54e7aab54, double:NaN)\n java.lang.String r2 = p000.C0200av.m970a(r2)\n p000.C0550gu.m1819a(r0, r2)\n r14 = 1\n goto L_0x09bc\n L_0x0923:\n r8 = -24518651630764(0xffffe9b34e7aab54, double:NaN)\n java.lang.String r8 = p000.C0200av.m970a(r8)\n java.lang.reflect.Method r9 = p000.C0735ko.f3017f // Catch:{ all -> 0x0966 }\n java.lang.Class[] r9 = r9.getParameterTypes() // Catch:{ all -> 0x0966 }\n int r9 = r9.length // Catch:{ all -> 0x0966 }\n r10 = 3\n if (r9 != r10) goto L_0x094c\n java.lang.reflect.Method r2 = p000.C0735ko.f3017f // Catch:{ all -> 0x0966 }\n android.media.AudioManager r0 = r0.f3020a // Catch:{ all -> 0x0966 }\n java.lang.Object[] r9 = new java.lang.Object[r10] // Catch:{ all -> 0x0966 }\n int r5 = r5.f2409b // Catch:{ all -> 0x0966 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ all -> 0x0966 }\n r9[r6] = r5 // Catch:{ all -> 0x0966 }\n r9[r7] = r36 // Catch:{ all -> 0x0966 }\n r9[r20] = r8 // Catch:{ all -> 0x0966 }\n r2.invoke(r0, r9) // Catch:{ all -> 0x0966 }\n goto L_0x0964\n L_0x094c:\n java.lang.reflect.Method r9 = p000.C0735ko.f3017f // Catch:{ all -> 0x0966 }\n android.media.AudioManager r0 = r0.f3020a // Catch:{ all -> 0x0966 }\n java.lang.Object[] r2 = new java.lang.Object[r2] // Catch:{ all -> 0x0966 }\n int r5 = r5.f2409b // Catch:{ all -> 0x0966 }\n java.lang.Integer r5 = java.lang.Integer.valueOf(r5) // Catch:{ all -> 0x0966 }\n r2[r6] = r5 // Catch:{ all -> 0x0966 }\n r2[r7] = r36 // Catch:{ all -> 0x0966 }\n r2[r20] = r46 // Catch:{ all -> 0x0966 }\n r5 = 3\n r2[r5] = r8 // Catch:{ all -> 0x0966 }\n r9.invoke(r0, r2) // Catch:{ all -> 0x0966 }\n L_0x0964:\n r14 = 0\n goto L_0x09bc\n L_0x0966:\n r0 = move-exception\n r5 = -24600256009388(0xffffe9a04e7aab54, double:NaN)\n java.lang.String r2 = p000.C0200av.m970a(r5)\n java.lang.String r27 = p000.C0200av.m970a(r21)\n java.lang.StringBuilder r25 = p000.C0279ch.m1106c(r2)\n r23 = r30\n r26 = r0\n r28 = r32\n java.lang.String r2 = p000.C0279ch.m1105b(r23, r25, r26, r27, r28)\n r5 = -26949603120300(0xffffe77d4e7aab54, double:NaN)\n java.lang.String r2 = p000.C0279ch.m1123t(r0, r2, r5)\n java.lang.Throwable r17 = p000.C0279ch.m1108e(r3, r2, r0)\n if (r17 == 0) goto L_0x09a2\n java.lang.String r16 = p000.C0200av.m970a(r34)\n java.lang.StringBuilder r14 = new java.lang.StringBuilder\n r14.<init>()\n r12 = r18\n r15 = r17\n p000.C0279ch.m1115l(r12, r14, r15, r16, r17)\n goto L_0x09b7\n L_0x09a2:\n r2 = -27125696779436(0xffffe7544e7aab54, double:NaN)\n java.lang.String r2 = p000.C0200av.m970a(r2)\n r3 = -27155761550508(0xffffe74d4e7aab54, double:NaN)\n java.lang.String r3 = p000.C0200av.m970a(r3)\n p000.C0550gu.m1819a(r2, r3)\n L_0x09b7:\n p000.C0550gu.m1821c(r0)\n r14 = -999(0xfffffffffffffc19, float:NaN)\n L_0x09bc:\n r2 = -26322537895084(0xffffe80f4e7aab54, double:NaN)\n r0 = r14\n L_0x09c2:\n java.lang.String r2 = p000.C0200av.m970a(r2)\n java.lang.StringBuilder r8 = new java.lang.StringBuilder\n r8.<init>()\n r37 = -26352602666156(0xffffe8084e7aab54, double:NaN)\n r40 = 17\n r41 = -26374077502636(0xffffe8034e7aab54, double:NaN)\n r44 = -26386962404524(0xffffe8004e7aab54, double:NaN)\n r39 = r8\n p000.C0279ch.m1113j(r37, r39, r40, r41, r43, r44, r46)\n r3 = -26412732208300(0xffffe7fa4e7aab54, double:NaN)\n p000.C0279ch.m1111h(r3, r8, r0)\n r0 = r2\n L_0x09ea:\n java.lang.String r2 = r8.toString()\n p000.C0550gu.m1820b(r0, r2)\n L_0x09f1:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.C0936oo.mo3864q():void\");\n }", "@SuppressWarnings(\"DuplicatedCode\")\n @Override\n public RadialDistortion estimate() throws LockedException,\n NotReadyException, RadialDistortionEstimatorException {\n if (isLocked()) {\n throw new LockedException();\n }\n if (!isReady()) {\n throw new NotReadyException();\n }\n\n try {\n mLocked = true;\n if (mListener != null) {\n mListener.onEstimateStart(this);\n }\n\n final int nPoints = mDistortedPoints.size();\n\n int numRows;\n if (isLMSESolutionAllowed()) {\n // initialize new matrix having two rows per point\n numRows = 2 * nPoints;\n } else {\n // when LMSE is not allowed, restrict matrix to two rows (minimum\n // value required for a solution)\n numRows = 2 * getMinNumberOfMatchedPoints();\n }\n\n final Matrix aMatrix = new Matrix(numRows, mNumKParams);\n final double[] b = new double[numRows];\n\n final Iterator<Point2D> iteratorDistorted = mDistortedPoints.iterator();\n final Iterator<Point2D> iteratorUndistorted =\n mUndistortedPoints.iterator();\n\n Point2D distorted;\n Point2D undistorted;\n int counter = 0;\n\n // undistorted normalized homogeneous coordinates\n double uNormHomX;\n double uNormHomY;\n double uNormHomW;\n // undistorted normalized inhomogeneous coordinates\n double uNormInhomX;\n double uNormInhomY;\n // undistorted denormalized homogeneous coordinates\n double uDenormHomX;\n double uDenormHomY;\n double uDenormHomW;\n // undistorted denormalized inhomogeneous coordinates\n double uDenormInhomX;\n double uDenormInhomY;\n // distorted inhomogeneous coordinates\n double dInhomX;\n double dInhomY;\n double rowNormX;\n double rowNormY;\n\n // radial distortion center\n double centerX = 0.0;\n double centerY = 0.0;\n if (mDistortionCenter != null) {\n centerX = mDistortionCenter.getInhomX();\n centerY = mDistortionCenter.getInhomY();\n }\n\n // radial distance of undistorted normalized (calibration independent)\n // coordinates\n double r2;\n double a;\n double value;\n\n while (iteratorDistorted.hasNext() && iteratorUndistorted.hasNext()) {\n distorted = iteratorDistorted.next();\n undistorted = iteratorUndistorted.next();\n\n undistorted.normalize();\n\n uDenormHomX = undistorted.getHomX();\n uDenormHomY = undistorted.getHomY();\n uDenormHomW = undistorted.getHomW();\n\n uDenormInhomX = uDenormHomX / uDenormHomW;\n uDenormInhomY = uDenormHomY / uDenormHomW;\n\n // multiply intrinsic parameters by undistorted point\n uNormHomX = mKinv.getElementAt(0, 0) * uDenormHomX +\n mKinv.getElementAt(0, 1) * uDenormHomY +\n mKinv.getElementAt(0, 2) * uDenormHomW;\n uNormHomY = mKinv.getElementAt(1, 0) * uDenormHomX +\n mKinv.getElementAt(1, 1) * uDenormHomY +\n mKinv.getElementAt(1, 2) * uDenormHomW;\n uNormHomW = mKinv.getElementAt(2, 0) * uDenormHomX +\n mKinv.getElementAt(2, 1) * uDenormHomY +\n mKinv.getElementAt(2, 2) * uDenormHomW;\n\n uNormInhomX = uNormHomX / uNormHomW;\n uNormInhomY = uNormHomY / uNormHomW;\n\n r2 = uNormInhomX * uNormInhomX + uNormInhomY * uNormInhomY;\n\n dInhomX = distorted.getInhomX();\n dInhomY = distorted.getInhomY();\n\n a = 1.0;\n rowNormX = rowNormY = 0.0;\n for (int i = 0; i < mNumKParams; i++) {\n a *= r2;\n\n // x and y coordinates generate linear dependent equations, for\n // that reason we need more than one point\n\n // x coordinates\n value = (uDenormInhomX - centerX) * a;\n aMatrix.setElementAt(2 * counter, i, value);\n\n rowNormX += Math.pow(value, 2.0);\n\n // y coordinates\n value = (uDenormInhomY - centerY) * a;\n aMatrix.setElementAt(2 * counter + 1, i, value);\n\n rowNormY += Math.pow(value, 2.0);\n }\n\n // x coordinates\n value = dInhomX - uDenormInhomX;\n b[2 * counter] = value;\n\n rowNormX += Math.pow(value, 2.0);\n\n // y coordinates\n value = dInhomY - uDenormInhomY;\n b[2 * counter + 1] = value;\n\n rowNormY += Math.pow(value, 2.0);\n\n // normalize rows to increase accuracy\n for (int i = 0; i < mNumKParams; i++) {\n aMatrix.setElementAt(2 * counter, i,\n aMatrix.getElementAt(2 * counter, i) / rowNormX);\n aMatrix.setElementAt(2 * counter + 1, i,\n aMatrix.getElementAt(2 * counter + 1, i) / rowNormY);\n }\n\n b[2 * counter] /= rowNormX;\n b[2 * counter + 1] /= rowNormY;\n\n counter++;\n\n if (!isLMSESolutionAllowed() && (counter >= getMinNumberOfMatchedPoints())) {\n break;\n }\n }\n\n final double[] params = Utils.solve(aMatrix, b);\n\n final RadialDistortion distortion =\n new RadialDistortion(params, mDistortionCenter,\n mHorizontalFocalLength, mVerticalFocalLength, mSkew);\n\n if (mListener != null) {\n mListener.onEstimateEnd(this);\n }\n\n return distortion;\n } catch (final AlgebraException | RadialDistortionException e) {\n throw new RadialDistortionEstimatorException(e);\n } finally {\n mLocked = false;\n }\n }", "public Location computeNextStep(float stepSize,float bearing) {\r\n Location newLoc = new Location(mCurrentLocation);\r\n float angDistance = stepSize / eRadius;\r\n\r\n double oldLat = mCurrentLocation.getLatitude();\r\n double oldLng = mCurrentLocation.getLongitude();\r\n\r\n //new latitude\r\n double newLat = Math.asin( Math.sin(Math.toRadians(oldLat))*Math.cos(angDistance) +\r\n Math.cos(Math.toRadians(oldLat))*Math.sin(angDistance)*Math.cos(bearing) );\r\n //new longitude\r\n double newLon = Math.toRadians(oldLng) +\r\n Math.atan2(Math.sin(bearing)*Math.sin(angDistance)*Math.cos(Math.toRadians(oldLat)),\r\n Math.cos(angDistance) - Math.sin(Math.toRadians(oldLat))*Math.sin(newLat));\r\n\r\n //convert the latitude and longitude in degrees\r\n newLoc.setLatitude(Math.toDegrees(newLat));\r\n newLoc.setLongitude(Math.toDegrees(newLon));\r\n\r\n //set the bearing\r\n newLoc.setBearing((mCurrentLocation.getBearing()+180)% 360);\r\n mCurrentLocation = newLoc;\r\n\r\n return newLoc;\r\n }", "private Point[] nearestPairRec(Point[] range, boolean axis) {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (range.length < 4) return nearestPair3Points(range);\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2];\n\t\t\tdouble MinDistance = -1; //it will be change for sure, because we pass the array only if it containes 4 points and above.\n\t\t\tdouble MinDistanceInStrip;\n\t\t\t//step 4\n\t\t\tif (axis){\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getX(), range[(range.length)/2].getX(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getX(), range[range.length-1].getX() ,axis), axis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getY(), range[(range.length)/2].getY(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getY(), range[range.length-1].getY() ,axis), axis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}else if (MinPointsLeft!=null && MinPointsRight==null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}else if (MinPointsRight!=null && MinPointsLeft==null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 find the nearest point around the median\n\t\t\tint upper;\n\t\t\tint lower;\n\t\t\tif (MinDistance==-1) MinDistance = 0;\n\t\t\tif (axis){\n\t\t\t\tupper = (int) (range[(range.length)/2].getX()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getX()-MinDistance);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tupper = (int) (range[(range.length)/2].getY()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getY()-MinDistance);\n\t\t\t}\n\t\t\trange = getPointsInRangeOppAxis(lower, upper, axis);\n\t\t\tif (range.length>=2) MinPointsInStrip = nearestPointInArray(range);\n\t\t\tif (MinPointsInStrip[0]!=null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}", "void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }", "dkk mo4508f();", "private void solveIntersectionPoints() {\n\t\tRadialGauge gauge = getMetricsPath().getBody().getGauge();\n\n\t\t// define first circle which is gauge outline circle\n\t\tx0 = gauge.getCenterDevice().getX();\n\t\ty0 = gauge.getCenterDevice().getY();\n\t\tr0 = gauge.getRadius();\n\t\tarc0 = new Arc2D.Double(x0 - r0, y0 - r0, 2 * r0, 2 * r0, 0, 360, Arc2D.OPEN);\n\n\t\t// define the second circle with given parameters\n\t\tx1 = x0 + polarRadius * Math.cos(Math.toRadians(polarDegree));\n\t\ty1 = y0 - polarRadius * Math.sin(Math.toRadians(polarDegree));\n\t\tr1 = radius;\n\n\t\tarc1 = new Arc2D.Double(x1 - r1, y1 - r1, 2 * r1, 2 * r1, 0, 360, Arc2D.OPEN);\n\n\t\tif (polarDegree != 0 && polarDegree != 180) {\n\t\t\t// Ax²+Bx+B = 0\n\t\t\tdouble N = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0 - y1 * y1 + y0 * y0) / (2 * (y0 - y1));\n\t\t\tdouble A = Math.pow((x0 - x1) / (y0 - y1), 2) + 1;\n\t\t\tdouble B = 2 * y0 * (x0 - x1) / (y0 - y1) - 2 * N * (x0 - x1) / (y0 - y1) - 2 * x0;\n\t\t\tdouble C = x0 * x0 + y0 * y0 + N * N - r0 * r0 - 2 * y0 * N;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = (-B - delta) / (2 * A);\n\t\t\t\tdouble p1y = N - p1x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = (-B + delta) / (2 * A);\n\t\t\t\tdouble p2y = N - p2x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t} else if (polarDegree == 0 || polarDegree == 180) {\n\t\t\t// polar degree = 0|180 -> y0=y1\n\t\t\t// Ay²+By + C = 0;\n\t\t\tdouble x = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0) / (2 * (x0 - x1));\n\t\t\tdouble A = 1;\n\t\t\tdouble B = -2 * y1;\n\t\t\tdouble C = x1 * x1 + x * x - 2 * x1 * x + y1 * y1 - r1 * r1;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = x;\n\t\t\t\tdouble p1y = (-B - delta) / 2 * A;\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = x;\n\t\t\t\tdouble p2y = (-B + delta) / 2 * A;\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic double getRx() {\n\ndouble object = 0;\n for(int i = 0; i < x.length; i++){\n object += Math.pow(y[i] - ( theta[0] + theta[1] * x[i]), 2);\n }\n return object / 2 ;\n }", "private DPoint m2833m() {\r\n IPoint iPoint = new IPoint();\r\n this.f1769m.mo353a(this.f1761e.latitude, this.f1761e.longitude, iPoint);\r\n IPoint iPoint2 = new IPoint();\r\n this.f1769m.mo353a(this.f1762f.latitude, this.f1762f.longitude, iPoint2);\r\n IPoint iPoint3 = new IPoint();\r\n this.f1769m.mo353a(this.f1763g.latitude, this.f1763g.longitude, iPoint3);\r\n double d = (double) iPoint.f3639x;\r\n double d2 = (double) iPoint.f3640y;\r\n double d3 = (double) iPoint2.f3639x;\r\n double d4 = (double) iPoint2.f3640y;\r\n double d5 = (double) iPoint3.f3639x;\r\n double d6 = (double) iPoint3.f3640y;\r\n double d7 = (((d6 - d2) * ((((d4 * d4) - (d2 * d2)) + (d3 * d3)) - (d * d))) + ((d4 - d2) * ((((d2 * d2) - (d6 * d6)) + (d * d)) - (d5 * d5)))) / (((2.0d * (d3 - d)) * (d6 - d2)) - ((2.0d * (d5 - d)) * (d4 - d2)));\r\n double d8 = (((d5 - d) * ((((d3 * d3) - (d * d)) + (d4 * d4)) - (d2 * d2))) + ((d3 - d) * ((((d * d) - (d5 * d5)) + (d2 * d2)) - (d6 * d6)))) / (((2.0d * (d4 - d2)) * (d5 - d)) - ((2.0d * (d6 - d2)) * (d3 - d)));\r\n this.f1773q = Math.sqrt(((d - d7) * (d - d7)) + ((d2 - d8) * (d2 - d8)));\r\n this.f1774r = m2830a(d7, d8, d, d2);\r\n d = m2830a(d7, d8, d3, d4);\r\n this.f1775s = m2830a(d7, d8, d5, d6);\r\n if (this.f1774r < this.f1775s) {\r\n if (d <= this.f1774r || d >= this.f1775s) {\r\n this.f1775s -= 6.283185307179586d;\r\n }\r\n } else if (d <= this.f1775s || d >= this.f1774r) {\r\n this.f1775s += 6.283185307179586d;\r\n }\r\n return new DPoint(d7, d8);\r\n }", "float[] calculate(float[] acc, float[] oldAcc, float[] gyr , float[] oldGyr,float[] oldGra, float[] oldAccVelDisGra)\n {\n// System.out.println(\"inside method acc:\"+acc[0]+\", \"+acc[1]+\", \"+acc[2]+\", oldAcc:\"+oldAcc[0]+\", \"+oldAcc[1]+\", \"+oldAcc[2]);\n// System.out.println(\"inside method gravity:\"+oldGra[0]+\", \"+oldGra[1]+\", \"+oldGra[2]);\n if (oldAccVelDisGra==null)\n {\n oldAccVelDisGra= new float[9];\n for (int i = 0; i <9; i++) {\n oldAccVelDisGra[i]=0.0f;\n }\n }\n float[] oldDynamicAcc = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldVelocity = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldDistance = new float[]{0.0f, 0.0f, 0.0f};\n float[] newGra = gravityFromRotation(oldGra, gyr);\n\n for (int i = 0; i < 3; i++) {\n oldDynamicAcc[i] = oldAccVelDisGra[i];\n oldVelocity[i] = oldAccVelDisGra[i+3];\n oldDistance[i] = oldAccVelDisGra[i+6];\n }\n float[] accVelDisGra = new float[]{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};\n float[] dynAccDiff = dynamicAccDiff(acc,gyr,oldGra,oldAcc,oldGyr);\n float[] dynamicAcc = dynamicAcc(oldDynamicAcc, dynAccDiff);\n float[] velocity = velocity(oldVelocity,dynamicAcc);\n float[] distance = distance(oldDistance, velocity);\n for (int i = 0; i < 3; i++) {\n accVelDisGra[i]=dynamicAcc[i];\n accVelDisGra[i+3]= velocity[i];\n accVelDisGra[i+6]=distance[i];\n accVelDisGra[i+9]=newGra[i];\n }\n return accVelDisGra;\n }", "private Vector combinationAlgorithm(Stroke theStroke){\n\t\tCurvatureBasedDetection cbd = new CurvatureBasedDetection();\n\t\tSpeedBasedDetection sbd = new SpeedBasedDetection();\n\t\tCommonSegmentPts = new Vector();\n\t\tCurvPts = cbd.getCurvatureData();\n\t\tdouble SpeedPts[][] = sbd.getSpeedData();\n\t\tCurvPtCount = cbd.getIndex();\n\t\tint SpeedPtCount = sbd.getIndex();\n\t\tint index ;\n\t\tCurvVector = new Vector();\n\t\t//copy the speed and curvature data in two vectors\n\t\tfor (index = 0; index < CurvPtCount ; index++){\n\t\t\tDouble obj = CurvPts[index][0];\n\t\t\tCurvVector.add(new Integer(obj.intValue()));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Curvature Indices\");\n\t\tprintValues(CurvVector);\n\t\t\n\t\tSpeedVector = new Vector();\n\t\tfor (index = 0; index < SpeedPtCount ; index++){\n\t\t\tDouble obj = SpeedPts[index][0];\n\t\t\tSpeedVector.add(new Integer(obj.intValue()));\n\t\t}\n\t\tSystem.out.println(\"Speed Indices\");\n\t\tprintValues(SpeedVector);\n\t\tSort sort = new Sort();\n\t\tint ElementIndex;\n\t\t// find common points (intersection of speed and curvature) and put it in CommonSegmentPts vector\n\t\t\n\t\tboolean flag = false;\n\t\tfor(index = 0; index < SpeedVector.size(); index++ ){\n\t\t\t\n\t\t\tElementIndex = sort.linearSearch(CurvVector, (Integer)SpeedVector.elementAt(index));\n\t\t\t\n\t\t\tif(ElementIndex != -1){\n\t\t\t\tCommonSegmentPts.add((Integer)(CurvVector.elementAt(ElementIndex)));\n\t\t\t\tCurvVector.remove(ElementIndex);\n\t\t\t\tSpeedVector.remove(index --); // point is removed from vectors\n\t\t\t\t\n\t\t\t}\t\t\n\t\t}\n\t\tSystem.out.println(\"Common Points\");\n\t\tprintValues(CommonSegmentPts);\n\t\tint ElemAtIndex;\n\t\t// Find the curvature based segment points in the Tolerance Distance of speed based segment points \n\t\tfor(index = 0; index < SpeedVector.size(); index++ ){\n\t\t\tElementIndex = FindNearbyPts(CurvVector, (Integer)SpeedVector.elementAt(index), theStroke);\n\t\t\tif(ElementIndex != -1){\n\t\t\t\tElemAtIndex = ((Integer)CurvVector.elementAt(ElementIndex) + (Integer)SpeedVector.elementAt(index))/2;\n\t\t\t\tCommonSegmentPts.add(ElemAtIndex);\n\t\t\t\tCurvVector.remove(ElementIndex);\n\t\t\t\tSpeedVector.remove(index--);\n\t\t\t}\n\t\t}\n\t\t//printValues(CommonSegmentPts);\n\t\tremoveNearbyPixels(theStroke);\n\t\t//setNewScalingFactor(theStroke);\n\t\tCollections.sort(CommonSegmentPts);\n\t\tprintValues(CommonSegmentPts);\n\t\tdouble PrevIterError;\n\t\tdouble NewIterError;\n\t\tVector IterationPts = new Vector(); \n\t\t//System.out.println(\"Error \" + (PrevIterError = calculateError(CommonSegmentPts, theStroke)));\n\t\t// create a vector that stores segment points of each iteration\n\t\tIterWiseSegPts = new Vector();\n\t\t// for hybrid\n\t\tIterationPts = copyVector(IterationPts, CommonSegmentPts);\n\t\tdouble PrevError = calculateError(IterationPts, theStroke);\n\t\tif(PrevError > 10000.0){\t// if stroke consists of curves\n\t\t\terrorTolerance = 90.0;\n\t\t}\n\t\tIterationPts.add((double ) PrevError);\n\t\tIterWiseSegPts = appendVector(IterWiseSegPts,IterationPts);\n\t\tdouble NewError = -1;\n/*\t\tint vectorIndex = 0;\n\t\t\n\t\twhile(CurvVector.size()!=0 || SpeedVector.size()!=0){\n\t*/\t\t\n\t\t\t// code for accepting seg points uptil pts reduce the error by 100\n\t\t/*\n\t\t\tif(CurvVector.size()!=0){\n\t\t\t\tint CurvIndex = (Integer)CurvVector.get(0);\n\t\t\t\tCommonSegmentPts.add(CurvIndex);\n\t\t\t\tCurvVector.remove(0);\n\t\t\t\tCollections.sort(CommonSegmentPts);\n\t\t\t\tNewIterError = calculateError(CommonSegmentPts, theStroke);\n\t\t\t\tif((PrevIterError - NewIterError) > 100.0){\n\t\t\t\t\tvectorIndex++;\n\t\t\t\t\tIterWiseSegPts.add(CurvIndex);\n\t\t\t\t\tPrevIterError = NewIterError;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\twhile(CurvVector.size()!=0){\n\t\t\t\t\t\tCurvVector.remove(0);\n\t\t\t\t\t}\t\t\t\t\t//return IterWiseSegPts;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(SpeedVector.size()!=0){\n\t\t\t\tint SpeedIndex = (Integer)SpeedVector.get(0);\n\t\t\t\tCommonSegmentPts.add(SpeedIndex);\n\t\t\t\tSpeedVector.remove(0);\n\t\t\t\tCollections.sort(CommonSegmentPts);\n\t\t\t\tNewIterError = calculateError(CommonSegmentPts, theStroke);\n\t\t\t\tSystem.out.println(\"New Error = \" + NewIterError);\n\t\t\t//CommonSegmentPts.add((Double)NewIterError);\n\t\t\t\tif((PrevIterError - NewIterError) > 100.0 ){\n\t\t\t\t\tvectorIndex++;\n\t\t\t\t\tIterWiseSegPts.add(SpeedIndex);\n\t\t\t\t\tPrevIterError = NewIterError;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\twhile(SpeedVector.size()!=0){\n\t\t\t\t\t\tSpeedVector.remove(0);\n\t\t\t\t\t}\t\t\n\t\t\t\t\t//return IterWiseSegPts;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t}*/\n\t\t\t// my approach\n\t/*\t\t\n\t\t\tif(CurvVector.size()!=0){\n\t\t\t\tint Index = findMinimumErrorIndex(CurvVector,CommonSegmentPts,theStroke);\n\t\t\t\tif(Index != -1){\n\t\t\t\tint CurvIndex = (Integer)CurvVector.get(Index);\n\t\t\t\tCommonSegmentPts.add((Integer)CurvIndex);\n\t\t\t\tCurvVector.remove(Index);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tCurvVector = clearVector(CurvVector);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(SpeedVector.size()!=0){\n\t\t\t\tint Index = findMinimumErrorIndex(SpeedVector,CommonSegmentPts,theStroke);\n\t\t\t\tif(Index != -1){\n\t\t\t\tint SpeedIndex = (Integer)SpeedVector.get(Index);\n\t\t\t\tCommonSegmentPts.add((Integer)SpeedIndex);\n\t\t\t\tSpeedVector.remove(Index);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSpeedVector = clearVector(SpeedVector);\n\t\t\t\t}\n\t\t\t}\n\t\t\tIterationPts = clearVector(IterationPts);\n\t\t\tIterationPts = copyVector(IterationPts, CommonSegmentPts);\n\t\t\tCollections.sort(IterationPts);\n\t\t\tIterError = calculateError(IterationPts, theStroke);\n\t\t\tIterationPts.add((double) IterError);\n\t\t\tIterWiseSegPts = appendVector(IterWiseSegPts,IterationPts);\n\t\t\tremoveNearbyPixels(theStroke);\n\n\t\t}\n\t\tCommonSegmentPts = clearVector(CommonSegmentPts);\n\t\tCommonSegmentPts = selectBestSegPtsSet(IterWiseSegPts);*/\n\t\t\n\t\t/*\tif(CurvVector.size()!=0){\n\t\tint Index = findMinimumErrorIndex(CurvVector,CommonSegmentPts,theStroke);\n\t\tif(Index != -1){\n\t\tint CurvIndex = (Integer)CurvVector.get(Index);\n\t\tCommonSegmentPts.add((Integer)CurvIndex);\n\t\tCurvVector.remove(Index);\n\t\t}\n\t\telse{\n\t\t\tCurvVector = clearVector(CurvVector);\n\t\t}\n\t}\n\tif(SpeedVector.size()!=0){\n\t\tint Index = findMinimumErrorIndex(SpeedVector,CommonSegmentPts,theStroke);\n\t\tif(Index != -1){\n\t\tint SpeedIndex = (Integer)SpeedVector.get(Index);\n\t\tCommonSegmentPts.add((Integer)SpeedIndex);\n\t\tSpeedVector.remove(Index);\n\t\t}\n\t\telse{\n\t\t\tSpeedVector = clearVector(SpeedVector);\n\t\t}\n\t}\n\tIterationPts = clearVector(IterationPts);\n\tIterationPts = copyVector(IterationPts, CommonSegmentPts);\n\tCollections.sort(IterationPts);\n\tIterError = calculateError(IterationPts, theStroke);\n\tIterationPts.add((double) IterError);\n\tIterWiseSegPts = appendVector(IterWiseSegPts,IterationPts);\n\tremoveNearbyPixels(theStroke);\n\n}\nCommonSegmentPts = clearVector(CommonSegmentPts);\nCommonSegmentPts = selectBestSegPtsSet(IterWiseSegPts);*/\n\t\t\n\t\t\n\t\t// hybrid fit approach\n\t\tint curvIndex = -1, speedIndex = -1;\n\t\tdouble curvError,speedError;\n\t\tVector curvPts = new Vector();\n\t\tVector speedPts = new Vector();\n\t\tVector changeInError = new Vector();\n\t\twhile((CurvVector.size() != 0) || (SpeedVector.size() != 0) ){\n\t\t\tcurvError = DEFAULT;\n\t\t\tspeedError = DEFAULT;\n\t\t\t\n\t\t\tif(CurvVector.size() != 0){\n\t\t\t\tclearVector(curvPts);\n\t\t\t\tcurvPts = copyVector(curvPts, CommonSegmentPts);\n\t\t\t\tcurvIndex = (Integer)CurvVector.get(0);\n\t\t\t\tcurvPts.add((Integer)curvIndex);\n\t\t\t\tCurvVector.remove(0);\n\t\t\t\tCollections.sort(curvPts);\n\t\t\t\tcurvError = calculateError(curvPts, theStroke);\n\t\t\t\tcurvPts.add((Double)curvError);\n\t\t\t}\n\t\t\t\n\t\t\tif(SpeedVector.size() != 0){\n\t\t\t\tclearVector(speedPts);\n\t\t\t\tspeedPts = copyVector(speedPts, CommonSegmentPts);\n\t\t\t\tspeedIndex = (Integer)SpeedVector.get(0);\n\t\t\t\tspeedPts.add((Integer)speedIndex);\n\t\t\t\tSpeedVector.remove(0);\n\t\t\t\tCollections.sort(speedPts);\n\t\t\t\tspeedError = calculateError(speedPts, theStroke);\n\t\t\t\tspeedPts.add((Double)speedError);\n\t\t\t}\n\t\t\t\n\t\t\tif((speedError <= curvError) || (curvError == DEFAULT)){\n\t\t\t\tNewError = speedError;\n\t\t\t\t//changeInError.add((Double)(NewError - PrevError));\n\t\t\t\tif((PrevError - NewError) > errorTolerance){\n\t\t\t\tIterWiseSegPts = appendVector(IterWiseSegPts, speedPts);\n\t\t\t\tCommonSegmentPts.add((Integer)speedIndex);\n\t\t\t\tchangeInError.add((Double)(PrevError - NewError));\n\t\t\t\tPrevError = NewError;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if((curvError < speedError) || (speedError == DEFAULT)){\n\t\t\t\tNewError = curvError;\n\t\t\t\tif((PrevError - NewError) > errorTolerance){\n\t\t\t\tIterWiseSegPts = appendVector(IterWiseSegPts, curvPts);\n\t\t\t\tCommonSegmentPts.add((Integer)curvIndex);\n\t\t\t\tchangeInError.add((Double)(PrevError - NewError));\n\t\t\t\tPrevError = NewError;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t\t\t\n\t\tCommonSegmentPts = clearVector(CommonSegmentPts);\n\t\tVector TempVect = new Vector();\n\t\tCommonSegmentPts = copyVectorIndex(IterWiseSegPts, TempVect, IterWiseSegPts.size() - 1);\n\t\t//TempVect = copyVectorIndex(IterWiseSegPts, TempVect, IterWiseSegPts.size() -1);\n\t\t/*index = 0;\n\t\twhile(index < (TempVect.size()-1)){\n\t\t\tCommonSegmentPts.add((Integer)TempVect.get(index++));\n\t\t}*/\n\t\t//CommonSegmentPts = selectBestSegPtsSet(IterWiseSegPts);\n\t\t\n\t\treturn CommonSegmentPts;\n\t}", "public void setPoints(int numOfIter) {\n\t\tint x = getX();\n\t\tint y = getY();\n\t\tint w = getW();\n\t\tint h = getH();\n\t\th = ((int) (getH() - w*0.29));\n\t\tint numOfSides = 3 * power(4, numOfIter);\n\t\n\t\t\n\t\tif(numOfIter == 0) {\n\t\t\txPointsD = new double[numOfSides];\n\t\t\tyPointsD = new double[numOfSides];\n\t\t\t\n\t\t\txPointsD[2] = x;\n\t\t\tyPointsD[2] = y + h;\n\t\t\t\n\t\t\txPointsD[1] = (double) x + ((double) w)/2;\n\t\t\tyPointsD[1] = y;\n\t\t\t\n\t\t\txPointsD[0] = x + w;\n\t\t\tyPointsD[0] = y + h;\n\t\t} else {\n\t\t\tsetPoints(numOfIter - 1);\n\t\t\tint numOfSidesBefore = xPoints.length;\n\t\t\tdouble[] xPointsDB = xPointsD;\n\t\t\tdouble[] yPointsDB = yPointsD;\n\t\t\txPointsD = new double[numOfSides];\n\t\t\tyPointsD = new double[numOfSides];\n\t\t\t\n\t\t\tfor(int i = 0; i < numOfSidesBefore; i++) {\n\t\t\t\txPointsD[4*i] = xPointsDB[i];\n\t\t\t\tyPointsD[4*i] = yPointsDB[i];\n\t\t\t\t\n\t\t\t\tdouble nextXPointsDB;\n\t\t\t\tdouble nextYPointsDB;\n\t\t\t\tif(i < numOfSidesBefore - 1) {\n\t\t\t\t\tnextXPointsDB = xPointsDB[i+1];\n\t\t\t\t\tnextYPointsDB = yPointsDB[i+1];\n\t\t\t\t} else {\n\t\t\t\t\tnextXPointsDB = xPointsDB[0];\n\t\t\t\t\tnextYPointsDB = yPointsDB[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//4i + 1 --> U = (2A+B)/3\n\t\t\t\txPointsD[4*i + 1] = (2 * xPointsDB[i] + nextXPointsDB)/3;\n\t\t\t\tyPointsD[4*i + 1] = (2 * yPointsDB[i] + nextYPointsDB)/3;\n\t\t\t\t\n\t\t\t\t//4i + 2 --> this one is complicated --> V = U + (AB/3)*(cos(ang(AB) + pi.3), sin(ang(AB) + pi/3))\n\t\t\t\tdouble angAB = Math.atan2(nextYPointsDB-yPointsDB[i], nextXPointsDB-xPointsDB[i]);\n\t\t\t\txPointsD[4*i + 2] = xPointsD[4*i + 1] + \n\t\t\t\t\t\t(Math.sqrt((nextXPointsDB - xPointsDB[i])*(nextXPointsDB - xPointsDB[i]) +\n\t\t\t\t\t\t\t\t(nextYPointsDB - yPointsDB[i])*(nextYPointsDB - yPointsDB[i]))/3.0) *\n\t\t\t\t\t\tMath.cos(angAB + Math.PI/3.0); \n\t\t\t\t\n\t\t\t\tyPointsD[4*i + 2] = yPointsD[4*i + 1] + \n\t\t\t\t\t\t(Math.sqrt((nextXPointsDB - xPointsDB[i])*(nextXPointsDB - xPointsDB[i]) +\n\t\t\t\t\t\t\t\t(nextYPointsDB - yPointsDB[i])*(nextYPointsDB - yPointsDB[i]))/3.0) *\n\t\t\t\t\t\tMath.sin(angAB + Math.PI/3.0);\n\t\t\t\t\n\t\t\t\t//4i + 3 --> W = (A + 2B)/3\n\t\t\t\txPointsD[4*i + 3] = (xPointsDB[i] + 2 * nextXPointsDB)/3;\n\t\t\t\tyPointsD[4*i + 3] = (yPointsDB[i] + 2 * nextYPointsDB)/3;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\txPoints = new int[numOfSides];\n\t\tyPoints = new int[numOfSides];\n\t\tfor(int i = 0; i < numOfSides; i++) {\n\t\t\txPoints[i] = (int) xPointsD[i];\n\t\t\tyPoints[i] = (int) yPointsD[i];\n\t\t}\n\t\t\n\t}", "public Point[] nearestPair() {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (this.size<2)\treturn null; //step 1\n\t\t\tif (this.size==2){\n\t\t\t\tAnswer[0]=this.minx.getData();\n\t\t\t\tAnswer[1]=this.maxx.getData();\n\t\t\t\treturn Answer;\t\t\t\n\t\t\t}\n\t\t\tdouble MinDistance=-1; // for sure it will be change in the next section, just for avoid warrning.\n\t\t\tdouble MinDistanceInStrip=-1;\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2]; // around the median\n\t\t\tboolean LargestAxis = getLargestAxis(); //step 2\n\t\t\tContainer median = getMedian(LargestAxis); //step 3\n\t\t\tif (LargestAxis){// step 4 - calling the recursive function nearestPairRec\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.minx.getData().getX(), median.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextX().getData().getX(), this.maxx.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.miny.getData().getY(), median.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextY().getData().getY(), this.maxy.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (MinPointsLeft!=null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}\n\t\t\telse if (MinPointsRight!=null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 - nearest point around the median\n\t\t\tif (MinDistance==-1) MinDistance=0;\n\t\t\tMinPointsInStrip = nearestPairInStrip(median, MinDistance*2, LargestAxis);\n\t\t\tif (MinPointsInStrip != null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "@Test\n public void test06() throws Throwable {\n double double0 = UnivariateRealSolverUtils.midpoint(0.0, 244.30128428311448);\n assertEquals(122.15064214155724, double0, 0.01D);\n }", "public void calcInc(int np)\n\t{\n \n findSpecEq();\n int nofc=numberOfComponents;\n fvec.timesEquals(0.0);\n fvec.set(nofc+1,0,1.0);\n Matrix dxds=Jac.solve(fvec);\n if (np<5)\n {\n double dp=0.01;\n ds=dp/dxds.get(nofc+1,0);\n Xgij.setMatrix(0,nofc+1,np-1,np-1,u);\n dxds.timesEquals(ds);\n // dxds.print(0,10);\n u.plusEquals(dxds);\n // Xgij.print(0,10);\n// u.print(0,10);\n }\n else\n {\n //System.out.println(\"iter \" +iter + \" np \" + np);\n if (iter>6)\n { \n ds *= 0.5;\n System.out.println(\"ds > 6\");\n }\n \n else\n {\n if (iter<3) {\n ds *= 1.5;\n }\n if (iter==3) {\n ds *= 1.1;\n }\n if (iter==4) {\n ds *= 1.0;\n }\n if (iter>4) {\n ds *= 0.5;\n }\n \n// Now we check wheater this ds is greater than dTmax and dPmax.\n if(Math.abs(system.getTemperature()*dxds.get(nofc,0)*ds)>dTmax){\n // System.out.println(\"true T\");\n ds=sign(dTmax/system.getTemperature()/Math.abs(dxds.get(nofc,0)),ds);\n }\n \n if(Math.abs(system.getPressure()*dxds.get(nofc+1,0)*ds)>dPmax)\n {\n ds=sign(dPmax/system.getPressure()/Math.abs(dxds.get(nofc+1,0)),ds);\n // System.out.println(\"true P\");\n }\n if (etterCP2) {\n etterCP2=false;\n ds = 0.5*ds;\n }\n \n Xgij.setMatrix(0,nofc+1,0,2,Xgij.getMatrix(0,nofc+1,1,3)); \n Xgij.setMatrix(0,nofc+1,3,3,u);\n s.setMatrix(0,0,0,3,Xgij.getMatrix(speceq,speceq,0,3));\n // s.print(0,10);\n // System.out.println(\"ds1 : \" + ds);\n calcInc2(np);\n // System.out.println(\"ds2 : \" + ds);\n \n// Here we find the next point from the polynomial.\n \n }\n }\n }", "public void integrate() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->integrate() unimplemented!\\n\");\n }", "@Test\n public void test05() throws Throwable {\n double double0 = UnivariateRealSolverUtils.midpoint(0.0, 0.0);\n assertEquals(0.0, double0, 0.01D);\n }", "public ComputingResponse call(){\n\t\tlong tiempoini =System.nanoTime();\n\t\tlog.info(\"Starting DynamicRSA Algorithm\");\n\t\t//Create the response message\n\t\t//It will contain either the path or noPath\n\t\tComputingResponse m_resp=new ComputingResponse();\n\t\tm_resp.setEncodingType(pathReq.getEcodingType());\n\t\t//The request that needs to be solved\n\t\tRequest req=pathReq.getRequestList().get(0);\n\t\t\n\t\t//Request Id, needed for the response\n\t\tlong reqId=req.getRequestParameters().getRequestID();\n\t\tlog.info(\"Request id: \"+reqId+\", getting endpoints\");\n\t\t//Start creating the response\n\t\tResponse response=new Response();\n\t\tRequestParameters rp = new RequestParameters();\n\t\trp.setRequestID(reqId);\n\t\tresponse.setRequestParameters(rp);\n\t\tm_resp.addResponse(response);\n\t\tSSONInfo= new SSONInformation();\n\t\tSSONInfo=((DomainTEDB)ted).getSSONinfo();\n\t\t\n\t\t//esto hay que cambiarlo para poder leer del GENERALIZED END POINTS\n\t\t//if (getObjectType(req.getEndPoints()))\n\t\tEndPoints EP= req.getEndPoints();\n\t\tBandwidthRequested Bw= (BandwidthRequested)req.getBandwidth(); // Objeto bandwidth para saber la demanda de la peticion.\n\t\tObject source_router_id_addr = null;\n\t\tObject dest_router_id_addr = null;\n\n\t\tGraphPath<Object,IntraDomainEdge> gp_chosen=null;\n\t\n\t\tint cs;\n\t\tboolean end=false;//The search has not ended yet\n\t\tint num_labels=0;\n\t\tint m=0;\n\t\tint Bmod=0; // Spectrum efficiency b/s/Hz (Modulation formats: 16-QAM, QPSK)\n\t\t\n\t\tnum_labels = SSONInfo.getNumLambdas();\n\t\tlog.info(\"Num_lambdas \"+num_labels);\n\t\t\n\n\t\tbandwidthToSlotConversion conversion= new bandwidthToSlotConversion();\n\t\t\n\t\t// Conversión Bw a numero de slots en función de la grid.\t\n\t\tif (Bw.getBw()!=0){\n\t\t\tSSONInfo=((DomainTEDB)ted).getSSONinfo();\n\t\t\tcs = SSONInfo.getCs();\n\t\t\tnum_slots=conversion.getNumSlots(Bw.getBw(), cs);\n\t\t}\n\t\t\t\n\t\t/* The set of request-channels will be bounded by the total number of frequency slots\n\t\t* less the number of contiguous frequency slot required for serve the demand plus one.\n\t\t*/\n\t\tlog.info(\"Request num_slots: \"+num_slots);\n\t\tsetChannels = preComp.getTotalSetChannels().get(num_slots-1);\n\n\t\t\n\t\tif (EP.getOT()==ObjectParameters.PCEP_OBJECT_TYPE_ENDPOINTS_IPV4){\n\t\t\tEndPointsIPv4 ep=(EndPointsIPv4) req.getEndPoints();\n\t\t\tsource_router_id_addr=ep.getSourceIP();\n\t\t\tdest_router_id_addr=ep.getDestIP();\n\t\t}else if (EP.getOT()==ObjectParameters.PCEP_OBJECT_TYPE_ENDPOINTS_IPV6){\n\n\t\t}else if (EP.getOT()==ObjectParameters.PCEP_OBJECT_TYPE_GENERALIZED_ENDPOINTS){\n\t\t\tGeneralizedEndPoints gep=(GeneralizedEndPoints) req.getEndPoints();\n\t\t\tif(gep.getGeneralizedEndPointsType()==ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_P2P){\n\t\t\t\tP2PEndpoints p2pep= gep.getP2PEndpoints();\n\t\t\t\tEndPoint sourceep=p2pep.getSourceEndPoint();\n\t\t\t\tEndPoint destep=p2pep.getDestinationEndPoint();\n\t\t\t\tsource_router_id_addr=sourceep.getEndPointIPv4TLV().IPv4address;\n\t\t\t\tdest_router_id_addr=destep.getEndPointIPv4TLV().IPv4address;\n\t\t\t}\n\t\t\tif(gep.getGeneralizedEndPointsType()==ObjectParameters.PCEP_GENERALIZED_END_POINTS_TYPE_P2MP_NEW_LEAVES){\n\t\t\t\tP2MPEndpoints p2mpep= gep.getP2MPEndpoints();\n\t\t\t\tEndPointAndRestrictions epandrest=p2mpep.getEndPointAndRestrictions();\n\t\t\t\tEndPoint sourceep=epandrest.getEndPoint();\n\t\t\t\tsource_router_id_addr=sourceep.getEndPointIPv4TLV().IPv4address;\n\t\t\t\tint cont=0;\n\t\t\t\twhile (cont<=p2mpep.getEndPointAndRestrictionsList().size()){ //esto est� mal\n\t\t\t\t\tepandrest=p2mpep.getEndPointAndRestrictionsList().get(cont);\n\t\t\t\t\tEndPoint destep=epandrest.getEndPoint();\n\t\t\t\t\tsource_router_id_addr=sourceep.getEndPointIPv4TLV().IPv4address;\n\t\t\t\t\tdest_router_id_addr=destep.getEndPointIPv4TLV().IPv4address;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Now, check if the source and destination are in the TED.\n\t\tlog.info(\"Source: \"+source_router_id_addr+\"; Destination:\"+dest_router_id_addr);\n\t\tif (!(((ted.containsVertex(source_router_id_addr))&&(ted.containsVertex(dest_router_id_addr))))){\n\t\t\tlog.warn(\"Source or destination are NOT in the TED\");\t\n\t\t\tNoPath noPath= new NoPath();\n\t\t\tnoPath.setNatureOfIssue(ObjectParameters.NOPATH_NOPATH_SAT_CONSTRAINTS);\n\t\t\tNoPathTLV noPathTLV=new NoPathTLV();\n\t\t\tif (!((ted.containsVertex(source_router_id_addr)))){\n\t\t\t\tlog.debug(\"Unknown source\");\t\n\t\t\t\tnoPathTLV.setUnknownSource(true);\t\n\t\t\t}\n\t\t\tif (!((ted.containsVertex(dest_router_id_addr)))){\n\t\t\t\tlog.debug(\"Unknown destination\");\n\t\t\t\tnoPathTLV.setUnknownDestination(true);\t\n\t\t\t}\n\n\t\t\tnoPath.setNoPathTLV(noPathTLV);\n\t\t\tresponse.setNoPath(noPath);\n\t\t\treturn m_resp;\n\t\t}\n\t\t// check if src and dst are the same \n\t\tif (source_router_id_addr.equals(dest_router_id_addr)){\n\t\t\tlog.info(\"Source and destination are the same!\");\n\t\t\tPath path=new Path();\n\t\t\tExplicitRouteObject ero= new ExplicitRouteObject();\n\t\t\tIPv4prefixEROSubobject eroso= new IPv4prefixEROSubobject();\n\t\t\teroso.setIpv4address((Inet4Address)source_router_id_addr);\n\t\t\teroso.setPrefix(32);\n\t\t\tero.addEROSubobject(eroso);\n\t\t\tpath.setEro(ero);\n\t\t\t\n\t\t\tif (req.getMetricList().size()!=0){\n\t\t\t\tMetric metric=new Metric();\n\t\t\t\tmetric.setMetricType(req.getMetricList().get(0).getMetricType() );\n\t\t\t\tlog.debug(\"Number of hops \"+0);\n\t\t\t\tfloat metricValue=0;\n\t\t\t\tmetric.setMetricValue(metricValue);\n\t\t\t\tpath.getMetricList().add(metric);\n\t\t\t}\n\t\t\tresponse.addPath(path);\n\t\t\tlong tiempofin =System.nanoTime();\n\t\t\tlong tiempotot=tiempofin-tiempoini;\n\t\t\tlog.info(\"Ha tardado \"+tiempotot+\" nanosegundos\");\n\t\t\tMonitoring monitoring=pathReq.getMonitoring();\n\t\t\tif (monitoring!=null){\n\t\t\t\tif (monitoring.isProcessingTimeBit()){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tm_resp.addResponse(response);\n\t\t\treturn m_resp;\n\t\t\t\n\t\t}\n\n\n\t\tboolean nopath=true;//Initially, we still have no path\n\n\t\tint central_freq=0; // It represents the central frequency slot n.\n\t\t\n\t\tdouble max_metric=Integer.MAX_VALUE;\t\n\t\t\n\t\tpreComp.getGraphLock().lock();\n\t\ttry{\n\t\t\twhile (!end){\n\t\t\t\t//SimpleDirectedWeightedGraph<Object,IntraDomainEdge> graphLambda=preComp.getNetworkGraphs().get(0);\n\t\t\t\tSimpleDirectedWeightedGraph<Object,IntraDomainEdge> graphLambda=preComp.getbaseSimplegraph();\n\t\t\t\t\n\t\t\t\t//networkGraph=PCEPUtils.duplicateTEDDB(((SimpleTEDB)ted).getNetworkGraph());\n//\t\t\t\tSet<IntraDomainEdge> fiberEdges= preComp.getNetworkGraphs().get(0).edgeSet();\n//\t\t\t\tIterator<IntraDomainEdge> Iterator = fiberEdges.iterator();\n//\t\t\t\twhile(Iterator.hasNext()){\n//\t\t\t\tIntraDomainEdge fiberEdge =Iterator.next();\n//\t\t\t\tFuncionesUtiles.printByte(((BitmapLabelSet)fiberEdge.getTE_info().getAvailableLabels().getLabelSet()).getBytesBitMap(), \"Bitmap edge \"+fiberEdge.toString()+\".\", log);\n//\t\t\t\t}\n\t\t\t\tlog.info(\"Antes de DSP\"+preComp.printTopology(0));\n\t\t\t\tModifiedDijkstraSP dsp=new ModifiedDijkstraSP(graphLambda, source_router_id_addr, dest_router_id_addr, Double.POSITIVE_INFINITY, setChannels, num_slots);\n\t\t\t\tlog.info(\"Fin MDSP\");\n\t\t\t\tGraphPath<Object,IntraDomainEdge> gp=dsp.getPath();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (gp==null){\n\t\t\t\t\tlog.debug(\"No path found\");\n\t\t\t\t\tNoPath noPath= new NoPath();\n\t\t\t\t\tnoPath.setNatureOfIssue(ObjectParameters.NOPATH_NOPATH_SAT_CONSTRAINTS);\n\t\t\t\t\tNoPathTLV noPathTLV=new NoPathTLV();\n\t\t\t\t\tnoPath.setNoPathTLV(noPathTLV);\t\t\t\t\n\t\t\t\t\tresponse.setNoPath(noPath);\n\t\t\t\t\tnopath=true;\n\t\t\t\t\treturn m_resp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tBitmapChannelState valid_channels = new BitmapChannelState(dsp.getVertexSpectrumState().get(dest_router_id_addr).getLength());\n\t\t\t\t\tvalid_channels.setBytesBitmap(dsp.getVertexSpectrumState().get(dest_router_id_addr).getBytesBitmap());\n\t\t\t\t\t\n\t\t\t\t\tfor (int i=0; i<valid_channels.getLength(); i++){\n\t\t\t\t\t\tif ((valid_channels.getBytesBitmap()[i/8]&(0x80>>(i%8))) == (0x80>>i%8)){\n\t\t\t\t\t\t\tBitmapLabelSet chosen_channel=setChannels.get(i);\n\t\t\t\t\t\t\tUtilsFunctions.printByte(chosen_channel.getBytesBitMap(),\"Bitmap Channel \"+i+\">>\", log);\n\t\t\t\t\t\t\tcentral_freq=i+(num_slots+1)/2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (central_freq!=0){\n\t\t\t\t\t\tgp_chosen=gp;\n\t\t\t\t\t\tmax_metric=gp.getWeight();\n\t\t\t\t\t\tm=(num_slots)/2;\n\t\t\t\t\t\tlog.info(\"Central Frequency\"+central_freq);\n\t\t\t\t\t\tlog.info(\"Frequency width\"+m);\n\t\t\t\t\t\tlog.info(\"Path\"+gp_chosen);\n\t\t\t\t\t\tnopath=false;\n\t\t\t\t\t\tend=true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Invalid central frequency for this request\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally{\n\t\t\tpreComp.getGraphLock().unlock();\t\n\t\t}\n\n\t\tif (nopath==false){\n\n\t\t\tPath path=new Path();\n\t\t\tExplicitRouteObject ero= new ExplicitRouteObject();\n\t\t\tList<IntraDomainEdge> edge_list= gp_chosen.getEdgeList();\n\t\t\tint i;\n\t\t\t\n\t\t\tfor (i=0;i<edge_list.size();i++){\n\t\t\t\tUnnumberIfIDEROSubobject eroso= new UnnumberIfIDEROSubobject();\n\t\t\t\teroso.setRouterID((Inet4Address)edge_list.get(i).getSource());\n\t\t\t\teroso.setInterfaceID(edge_list.get(i).getSrc_if_id());\n\t\t\t\teroso.setLoosehop(false);\n\t\t\t\tero.addEROSubobject(eroso);\n\t\t\t\t\n\t\t\t\t//FIXME: Temp, only for HPCE algorithms\n\t\t\t\tpreComp.setReservation(m, (central_freq)+preComp.getWSONInfo().getnMin(), edge_list.get(i).getSource(), edge_list.get(i).getTarget());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ITU-T Format\n\t\t\t\tDWDMWavelengthLabel WDMlabel=new DWDMWavelengthLabel();\n\t\t\t\tWDMlabel.setGrid(preComp.getWSONInfo().getGrid());\n\t\t\t\tWDMlabel.setChannelSpacing(preComp.getWSONInfo().getCs());\n\t\t\t\tWDMlabel.setN((central_freq)+preComp.getWSONInfo().getnMin());\n\t\t\t\tWDMlabel.setIdentifier(0);\n\t\t\t\tWDMlabel.setM(m);\n\t\t\t\ttry {\n\t\t\t\t\tWDMlabel.encode();\n\t\t\t\t} catch (RSVPProtocolViolationException 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\tGeneralizedLabelEROSubobject genLabel= new GeneralizedLabelEROSubobject();\n\t\t\t\tero.addEROSubobject(genLabel);\n\t\t\t\tgenLabel.setLabel(WDMlabel.getBytes());\t\n\t\t\t}\n\t\t\t\n\t\t\t//log.info(\"Label bit map: \"+ted.getWSONinfo().getCommonAvailableLabels().getLabelSet().toString());\n\t\t\tBandwidthRequestedGeneralizedBandwidth gb = new BandwidthRequestedGeneralizedBandwidth ();\n\t\t\tpreComp.setTotalBandwidth((m*2*6.25)+preComp.getTotalBandwidth());\n\t\t\t\n\t\t\tGeneralizedBandwidthSSON GB_SSON = new GeneralizedBandwidthSSON(); \n\t GB_SSON.setM(m);\n\t gb.setGeneralizedBandwidth(GB_SSON);\n\n\t\t\t\n\t\t\tIPv4prefixEROSubobject eroso= new IPv4prefixEROSubobject();\n\t\t\teroso.setIpv4address((Inet4Address)edge_list.get(edge_list.size()-1).getTarget());\n\t\t\teroso.setPrefix(32);\n\t\t\tero.addEROSubobject(eroso);\n\t\t\tpath.setEro(ero);\n\t\t\tpath.setBandwidth(gb);\n\t\t\tPCEPUtils.completeMetric(path, req, edge_list);\n\t\t\tresponse.addPath(path);\n\t\t\t\n\t\t\t//FIXME: RESERVATION NEEDS TO BE IMPROVED!!!\n\t\t\tLinkedList<Object> sourceVertexList=new LinkedList<Object>();\n\t\t\tLinkedList<Object> targetVertexList=new LinkedList<Object>();\n\t\t\t\n\t\t\tfor (i=0;i<edge_list.size();i++){\n\t\t\t\tsourceVertexList.add(edge_list.get(i).getSource());\n\t\t\t\ttargetVertexList.add(edge_list.get(i).getTarget());\n\t\t\t}\t\n\t\t\tsourceVertexList.add(edge_list.get(i-1).getSource());\n\t\t\ttargetVertexList.add(edge_list.get(i-1).getTarget());\n\t\t\t\n\t\t\tif (req.getReservation()!=null){\n\t\t\t reserv= new GenericLambdaReservation();\n\t\t\t reserv.setResp(m_resp);\n\t\t\t reserv.setLambda_chosen(central_freq);\n\t\t\t reserv.setBidirectional(req.getRequestParameters().isBidirect());\n\t\t\t reserv.setReservation(req.getReservation());\n\t\t\t reserv.setSourceVertexList(sourceVertexList);\n\t\t\t reserv.setTargetVertexList(targetVertexList);\n\t\t\t //log.info(\"Bidirect = \" +req.getRequestParameters().isBidirect());\n\t\t\t reserv.setReservationManager(reservationManager);\n\t\t\t}\n\t\t\n\t\t}\n\t\tlong tiempofin =System.nanoTime();\n\t\tlong tiempotot=tiempofin-tiempoini;\n\t\tlog.info(\"Ha tardado \"+tiempotot+\" nanosegundos\");\n\t\tlog.info(\"RESPONSE: \"+m_resp.toString());\n\t\treturn m_resp;\n\t}", "private void rv2Elements(VectorN r, VectorN v)\n\t{\n\t\tr.checkVectorDimensions(3);\n\t\tv.checkVectorDimensions(3);\n\t\t//Constants c = new Constants();\n\t\tVectorN evec = new VectorN(3); // e vector\n\t\tVectorN k = new VectorN(3); // unit vector in z direction\n\n\t\tthis.rv = new VectorN(r, v);\n\n\t\tdouble rmag = r.mag();\n\t\tdouble vmag = v.mag();\n\t\tdouble energy = vmag * vmag / 2.0 - this.mu / rmag;\n\n\t\tk.x[0] = 0.0;\n\t\tk.x[1] = 0.0;\n\t\tk.x[2] = 1.0;\n\n\t\tVectorN h = r.crossProduct(v);\n\t\tVectorN n = k.crossProduct(h);\n\n\t\tdouble rdotv = r.dotProduct(v);\n\n\t\tdouble q1 = (vmag * vmag - this.mu / rmag) / this.mu;\n\t\tdouble q2 = rdotv / this.mu;\n\n\t\tevec.x[0] = q1 * r.x[0] - q2 * v.x[0];\n\t\tevec.x[1] = q1 * r.x[1] - q2 * v.x[1];\n\t\tevec.x[2] = q1 * r.x[2] - q2 * v.x[2];\n\n\t\tthis.e = evec.mag();\n\n\t\tif (e != 1.0)\n\t\t{\n\t\t\tthis.a = -this.mu / (2.0 * energy);\n\t\t} else\n\t\t{\n\t\t\tthis.a = 1.0E30;\n\t\t\tSystem.out.println(\"parabolic orbit\");\n\t\t}\n\n\t\tthis.i = Math.acos(h.x[2] / h.mag()); // inclination\n\n\t\tthis.raan = Math.acos(n.x[0] / n.mag()); // raan\n\t\tif (n.x[1] < 0.0)\n\t\t{\n\t\t\tthis.raan = 2.0 * Constants.pi - raan;\n\t\t}\n\n\t\tthis.w = Math.acos(n.dotProduct(evec) / (n.mag() * e));\n\t\tif (evec.x[2] < 0.0)\n\t\t{\n\t\t\tthis.w = 2.0 * Constants.pi - this.w;\n\t\t}\n\n\t\tif (i == 0.0) // equatorial orbit, things blow up\n\t\t{\n\t\t\t//\t\t System.out.println(\"KeplerElements: equatorial orbit, RAAN no good\");\n\t\t\tthis.raan = 0.0;\n\t\t\tthis.w = Math.acos(evec.x[0] / e);\n\t\t\tif (evec.x[1] < 0.0)\n\t\t\t{\n\t\t\t\tthis.w = 2.0 * Constants.pi - this.w;\n\t\t\t}\n\t\t}\n\n\t\tif (i == Constants.pi) // equatorial orbit, things blow up\n\t\t{\n\t\t\t//\t\t System.out.println(\"KeplerElements: equatorial orbit, RAAN no good\");\n\t\t\tthis.raan = 0.0;\n\t\t\tthis.w = Math.acos(evec.x[0] / e);\n\t\t\tif (evec.x[1] > 0.0)\n\t\t\t{\n\t\t\t\tthis.w = 2.0 * Constants.pi - this.w;\n\t\t\t}\n\t\t}\n\n\t\tthis.ta = Math.acos(evec.dotProduct(r) / (e * rmag));\n\t\tif (rdotv < 0.0)\n\t\t{\n\t\t\tthis.ta = 2.0 * Constants.pi - this.ta;\n\t\t}\n\t}", "public interface UnivariateIntegrator {\n\n /**\n * Get the relative accuracy.\n *\n * @return the accuracy\n */\n double getRelativeAccuracy();\n\n /**\n * Get the absolute accuracy.\n *\n * @return the accuracy\n */\n double getAbsoluteAccuracy();\n\n /**\n * Get the min limit for the number of iterations.\n *\n * @return the actual min limit\n */\n int getMinimalIterationCount();\n\n /**\n * Get the upper limit for the number of iterations.\n *\n * @return the actual upper limit\n */\n int getMaximalIterationCount();\n\n /**\n * Integrate the function in the given interval.\n *\n * @param maxEval Maximum number of evaluations.\n * @param f the integrand function\n * @param min the lower bound for the interval\n * @param max the upper bound for the interval\n * @return the value of integral\n * @throws org.apache.commons.math4.legacy.exception.TooManyEvaluationsException if the maximum number of function\n * evaluations is exceeded\n * @throws org.apache.commons.math4.legacy.exception.MaxCountExceededException if the maximum iteration count is exceeded\n * or the integrator detects convergence problems otherwise\n * @throws org.apache.commons.math4.legacy.exception.MathIllegalArgumentException if {@code min > max} or the endpoints do not\n * satisfy the requirements specified by the integrator\n * @throws org.apache.commons.math4.legacy.exception.NullArgumentException if {@code f} is {@code null}.\n */\n double integrate(int maxEval, UnivariateFunction f, double min, double max);\n\n /**\n * Get the number of function evaluations of the last run of the integrator.\n *\n * @return number of function evaluations\n */\n int getEvaluations();\n\n /**\n * Get the number of iterations of the last run of the integrator.\n *\n * @return number of iterations\n */\n int getIterations();\n}", "public void driveTo(double targetX, double targetY, float heading, double speedLimit) throws InterruptedException {\n float error = heading - zRotation; //The number of degrees between the true heading and desired heading\n double correction; //Modifies power to account for error\n double max;\n double Y_P_COEFF = 0.17825353626292278; //0.002\n double Y_I_COEFF = 0.2852056580206765; //0.0035\n double Y_D_COEFF = 0.0003; //0.00042\n double X_P_COEFF = 0.17825353626292278; //0.002\n double X_I_COEFF = 0.2852056580206765; //0.0035\n double X_D_COEFF = 0.0003; //0.00042\n double T_P_COEFF = 0.0084;\n double T_I_COEFF = 0.0168;\n double T_D_COEFF = 0.0028;\n double driveY, driveX;\n double distanceY;\n double distanceX;\n long loops = 0;\n heading = (int) normalize360(heading);\n\n double frontLeft;\n double frontRight;\n double backLeft;\n double backRight;\n\n setEncoderBase();\n int lastEncoderY = 0;\n int lastEncoderX = 0;\n float lastHeading = zRotation;\n\n speedLimit = Range.clip(speedLimit, 0.0, 1.0);\n\n if (speedLimit==0){\n return;\n }\n\n double power;\n double deltaT;\n double derivativeY = 0;\n double derivativeX = 0;\n double derivativeT = 0;\n double integralY = 0;\n double integralX = 0;\n double integralT = 0;\n int deltaDY;\n int deltaDX;\n float deltaDT;\n\n double theta;\n double theta2;\n double gamma;\n double h;\n double local_globalX;\n double local_globalY;\n\n double lastTime = callingOpMode.getRuntime();\n\n while ((((((Math.abs(targetY)-1) > Math.abs(globalY)) || ((Math.abs(targetY)+1) < Math.abs(globalY))) ||\n (((Math.abs(targetX)-1) > Math.abs(globalX)) || ((Math.abs(targetX)+1) < Math.abs(globalX)))) ||\n (Math.abs(error)>=5.0f)) && ((LinearOpMode) callingOpMode).opModeIsActive()) {\n\n error = heading - zRotation;\n\n while (error > 180) error = (error - 360);\n while (error <= -180) error = (error + 360);\n\n local_globalX = globalX;\n local_globalY = globalY;\n\n theta = zRotation * Math.PI / 180.0;\n\n // these represent the current x and y translations still to do, in global coordinates ... in inches\n driveY = targetY - local_globalY;\n driveX = targetX - local_globalX;\n\n theta2 = Math.atan2(driveY, driveX);\n gamma = theta+theta2;\n h = Math.sqrt((driveX*driveX)+(driveY*driveY));\n\n // in robot coordinates,\n distanceY = Math.sin(gamma)*h;\n distanceX = Math.cos(gamma)*h;\n\n deltaT = callingOpMode.getRuntime()-lastTime;\n lastTime = callingOpMode.getRuntime();\n deltaDY = getEncoderWheelYPosition()-lastEncoderY;\n lastEncoderY = getEncoderWheelYPosition();\n deltaDX = getEncoderWheelXPosition()-lastEncoderX;\n lastEncoderX = getEncoderWheelXPosition();\n deltaDT = zRotation-lastHeading;\n lastHeading = zRotation;\n\n derivativeY = ((double) deltaDY)/deltaT;\n derivativeX = ((double) deltaDX)/deltaT;\n derivativeT = ((double) deltaDT/deltaT);\n\n if(Math.abs(distanceY*Y_P_COEFF)<1 && Math.abs(distanceY)>1){\n integralY += distanceY*deltaT;\n } else {\n integralY = 0;\n }\n if(Math.abs(distanceX*X_P_COEFF)<1 && Math.abs(distanceX)>1){\n integralX += distanceX*deltaT;\n } else {\n integralX = 0;\n }\n if(Math.abs(error*T_P_COEFF)<1 && Math.abs(error)>5){\n integralT += error*deltaT;\n } else {\n integralT = 0;\n }\n\n power = (distanceY*Y_P_COEFF) + (integralY*Y_I_COEFF) - (derivativeY*Y_D_COEFF);\n\n frontLeft = power;\n frontRight = power;\n backLeft = power;\n backRight = power;\n\n power = (distanceX*X_P_COEFF) + (integralX*X_I_COEFF) - (derivativeX*X_D_COEFF);\n\n frontLeft += power;\n frontRight -= power;\n backLeft -= power;\n backRight += power;\n\n max = Math.max(Math.max(Math.abs(frontLeft), Math.abs(frontRight)), Math.max(Math.abs(backLeft), Math.abs(backRight)));\n if (max > Math.abs(speedLimit)) {\n frontLeft /= max;\n frontRight /= max;\n backLeft /= max;\n backRight /= max;\n frontLeft *= Math.abs(speedLimit);\n frontRight *= Math.abs(speedLimit);\n backLeft *= Math.abs(speedLimit);\n backRight *= Math.abs(speedLimit);\n }\n\n correction = (error*T_P_COEFF) + (integralT*T_I_COEFF) - (derivativeT*T_D_COEFF);\n\n frontLeft -= correction;\n frontRight += correction;\n backLeft -= correction;\n backRight += correction;\n\n max = Math.max(Math.max(Math.abs(frontLeft), Math.abs(frontRight)), Math.max(Math.abs(backLeft), Math.abs(backRight)));\n if (max > 1.0) {\n frontLeft /= max;\n frontRight /= max;\n backLeft /= max;\n backRight /= max;\n }\n\n updateDriveMotors(frontLeft, frontRight, backLeft, backRight);\n\n if (((loops+10) % 10) == 0) {\n callingOpMode.telemetry.addData(\"zRotation\" , zRotation);\n callingOpMode.telemetry.addData(\"globalY\" , local_globalY);\n callingOpMode.telemetry.addData(\"globalX\" , local_globalX);\n callingOpMode.telemetry.addData(\"distanceY\", distanceY);\n callingOpMode.telemetry.addData(\"distanceX\", distanceX);\n callingOpMode.telemetry.addData(\"theta\", theta);\n callingOpMode.telemetry.addData(\"theta2\",theta2);\n callingOpMode.telemetry.addData(\"gamma\",gamma);\n callingOpMode.telemetry.addData(\"driveY\",driveY);\n callingOpMode.telemetry.addData(\"driveX\",driveX);\n callingOpMode.telemetry.addData(\"error\", error);\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.update();\n }\n\n loops++;\n\n updateGlobalPosition();\n\n ((LinearOpMode) callingOpMode).sleep(10);\n }\n }", "private Line getMiddleTrajectory() {\n Point startPoint;\n if (movingRight()) {\n startPoint = middleRight();\n } else if (movingLeft()) {\n startPoint = middleLeft();\n } else {\n return null;\n }\n\n return new Line(startPoint, this.velocity);\n }", "public RandomVariable getValues(final double evaluationTime, final LIBORMarketModel model) {\n\t\tif(evaluationTime > 0) {\n\t\t\tthrow new RuntimeException(\"Forward start evaluation currently not supported.\");\n\t\t}\n\n\t\t// Fetch the covariance model of the model\n\t\tfinal LIBORCovarianceModel covarianceModel = model.getCovarianceModel();\n\n\t\t// We sum over all forward rates\n\t\tfinal int numberOfComponents = covarianceModel.getLiborPeriodDiscretization().getNumberOfTimeSteps();\n\n\t\t// Accumulator\n\t\tRandomVariable\tintegratedLIBORCurvature\t= new RandomVariableFromDoubleArray(0.0);\n\t\tfor(int componentIndex = 0; componentIndex < numberOfComponents; componentIndex++) {\n\n\t\t\t// Integrate from 0 up to the fixing of the rate\n\t\t\tfinal double timeEnd\t\t= covarianceModel.getLiborPeriodDiscretization().getTime(componentIndex);\n\t\t\tint timeEndIndex\t= covarianceModel.getTimeDiscretization().getTimeIndex(timeEnd);\n\n\t\t\t// If timeEnd is not in the time discretization we get timeEndIndex = -insertionPoint-1. In that case, we use the index prior to the insertionPoint\n\t\t\tif(timeEndIndex < 0) {\n\t\t\t\ttimeEndIndex = -timeEndIndex - 2;\n\t\t\t}\n\n\t\t\t// Sum squared second derivative of the variance for all components at this time step\n\t\t\tRandomVariable integratedLIBORCurvatureCurrentRate = new RandomVariableFromDoubleArray(0.0);\n\t\t\tfor(int timeIndex = 0; timeIndex < timeEndIndex-2; timeIndex++) {\n\t\t\t\tfinal double timeStep1\t= covarianceModel.getTimeDiscretization().getTimeStep(timeIndex);\n\t\t\t\tfinal double timeStep2\t= covarianceModel.getTimeDiscretization().getTimeStep(timeIndex+1);\n\n\t\t\t\tfinal RandomVariable covarianceLeft\t\t= covarianceModel.getCovariance(timeIndex+0, componentIndex, componentIndex, null);\n\t\t\t\tfinal RandomVariable covarianceCenter\t= covarianceModel.getCovariance(timeIndex+1, componentIndex, componentIndex, null);\n\t\t\t\tfinal RandomVariable covarianceRight\t\t= covarianceModel.getCovariance(timeIndex+2, componentIndex, componentIndex, null);\n\n\t\t\t\t// Calculate second derivative\n\t\t\t\tRandomVariable curvatureSquared = covarianceRight.sub(covarianceCenter.mult(2.0)).add(covarianceLeft);\n\t\t\t\tcurvatureSquared = curvatureSquared.div(timeStep1 * timeStep2);\n\n\t\t\t\t// Take square\n\t\t\t\tcurvatureSquared = curvatureSquared.squared();\n\n\t\t\t\t// Integrate over time\n\t\t\t\tintegratedLIBORCurvatureCurrentRate = integratedLIBORCurvatureCurrentRate.add(curvatureSquared.mult(timeStep1));\n\t\t\t}\n\n\t\t\t// Empty interval - skip\n\t\t\tif(timeEnd == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Average over time\n\t\t\tintegratedLIBORCurvatureCurrentRate = integratedLIBORCurvatureCurrentRate.div(timeEnd);\n\n\t\t\t// Take square root\n\t\t\tintegratedLIBORCurvatureCurrentRate = integratedLIBORCurvatureCurrentRate.sqrt();\n\n\t\t\t// Take max over all forward rates\n\t\t\tintegratedLIBORCurvature = integratedLIBORCurvature.add(integratedLIBORCurvatureCurrentRate);\n\t\t}\n\n\t\tintegratedLIBORCurvature = integratedLIBORCurvature.div(numberOfComponents);\n\t\treturn integratedLIBORCurvature.sub(tolerance).floor(0.0);\n\t}", "private void calculateNextStepVelocityCell(int i, int j, int k, double currentTime) {\n\n // Retrieve the velocity components and depth of the cell\n double ui = u[i][j][k];\n double vi = v[i][j][k];\n double wi = w[i][j][k];\n double currentDepth = depth[k];\n\n // Calculate the grid\n // spacing in the depth dimension\n double deltaZPlus = (depth[k + 1] - currentDepth) / 2.0;\n double deltaZMinus = (currentDepth - depth[k - 1]) / 2.0;\n\n // Compute the gradients of velocity in each direction using central difference\n // scheme\n double du_dx = (u[i + 1][j][k] - u[i - 1][j][k]) / 2.0;\n double dv_dy = (v[i][j + 1][k] - v[i][j - 1][k]) / 2.0;\n double dw_dz = (w[i][j][k + 1] - w[i][j][k - 1]) / (deltaZPlus + deltaZMinus);\n\n // Compute the Laplacian of velocity in each direction using central difference\n // scheme\n double d2u_dx2 = (u[i + 1][j][k] - 2 * ui + u[i - 1][j][k]) / Math.pow((deltaX), 2);\n double d2v_dy2 = (v[i][j + 1][k] - 2 * vi + v[i][j - 1][k]) / Math.pow((deltaY), 2);\n double d2w_dz2 = (w[i][j][k + 1] - 2 * wi + w[i][j][k - 1])\n / (Math.pow(deltaZPlus, 2) + Math.pow(deltaZMinus, 2));\n\n // Retrieve the tidal forcing values at the current time step\n double tidalForcingX = this.tidalForcingX.get(i, j, k, currentTime);\n double tidalForcingY = this.tidalForcingY.get(i, j, k, currentTime);\n\n // Compute the next-step velocities using the Navier-Stokes equations with tidal\n // forcing\n double next_u = ui\n - (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * du_dx * d2u_dx2)\n + tidalForcingX;\n double next_v = vi\n - (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * dv_dy * d2v_dy2)\n + tidalForcingY;\n double next_w = wi\n - (timeStep * (ui * du_dx + vi * dv_dy + wi * dw_dz) - (timeStep / fluidDensity) * dw_dz * d2w_dz2);\n\n // Update the velocity components of the cell\n uNext[i][j][k] = next_u;\n vNext[i][j][k] = next_v;\n wNext[i][j][k] = next_w;\n }", "public void computeFractal(){\n\t\tint deltaX =p5.getX()-p1.getX();\n\t\tint deltaY =p5.getY()- p1.getY();\n\t\tint x2= p1.getX()+ (deltaX/3);\n\t\tint y2= p1.getY()+ (deltaY/3);\n\t\tdouble x3=((p1.getX()+p5.getX())/2)+( Math.sqrt(3)*\n\t\t\t\t(p1.getY()-p5.getY()))/6;\n\t\tdouble y3=((p1.getY()+p5.getY())/2)+( Math.sqrt(3)*\n\t\t\t\t(p5.getX()-p1.getX()))/6;\n\t\tint x4= p1.getX()+((2*deltaX)/3);\n\t\tint y4= p1.getY()+((2*deltaY)/3);\n\t\tthis.p2= new Point(x2,y2);\n\t\tthis.p3= new Point((int)x3,(int)y3);\n\t\tthis.p4= new Point(x4,y4);\n\t}", "private java.util.LinkedList<com.tencent.mm.plugin.game.model.d> aRy() {\n /*\n r8 = this;\n r3 = new java.util.LinkedList;\n r3.<init>();\n r0 = r8.njD;\n r0 = r0.nop;\n if (r0 != 0) goto L_0x000d;\n L_0x000b:\n r0 = r3;\n L_0x000c:\n return r0;\n L_0x000d:\n r0 = r8.nja;\n r1 = r0 + 1;\n r0 = r8.nja;\n r0 = r0 / 15;\n r0 = r0 + 901;\n r2 = r8.njD;\n r2 = r2.nop;\n r5 = r2.iterator();\n r2 = r1;\n r1 = r0;\n L_0x0021:\n r0 = r5.hasNext();\n if (r0 == 0) goto L_0x007a;\n L_0x0027:\n r0 = r5.next();\n r0 = (com.tencent.mm.plugin.game.c.c) r0;\n r4 = 0;\n r6 = r0.kzz;\n switch(r6) {\n case 1: goto L_0x0046;\n case 2: goto L_0x0056;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = r1;\n r1 = r2;\n r2 = r4;\n L_0x0036:\n if (r2 == 0) goto L_0x007c;\n L_0x0038:\n r4 = 11;\n r2.scene = r4;\n r4 = 1111; // 0x457 float:1.557E-42 double:5.49E-321;\n r2.fGe = r4;\n r3.add(r2);\n r2 = r1;\n r1 = r0;\n goto L_0x0021;\n L_0x0046:\n r0 = r0.nkO;\n r0 = com.tencent.mm.plugin.game.model.ad.a(r0);\n if (r0 == 0) goto L_0x0083;\n L_0x004e:\n r4 = r2 + 1;\n r0.position = r2;\n r2 = r0;\n r0 = r1;\n r1 = r4;\n goto L_0x0036;\n L_0x0056:\n r6 = r0.nkR;\n if (r6 == 0) goto L_0x0033;\n L_0x005a:\n r4 = r0.nkR;\n r4 = r4.nkO;\n r4 = com.tencent.mm.plugin.game.model.ad.a(r4);\n if (r4 == 0) goto L_0x007f;\n L_0x0064:\n r6 = 1;\n r4.type = r6;\n r6 = r0.nkR;\n r6 = r6.nkQ;\n r4.ngB = r6;\n r0 = r0.nkR;\n r0 = r0.nkP;\n r4.ngC = r0;\n r0 = r1 + 1;\n r4.position = r1;\n r1 = r2;\n r2 = r4;\n goto L_0x0036;\n L_0x007a:\n r0 = r3;\n goto L_0x000c;\n L_0x007c:\n r2 = r1;\n r1 = r0;\n goto L_0x0021;\n L_0x007f:\n r0 = r1;\n r1 = r2;\n r2 = r4;\n goto L_0x0036;\n L_0x0083:\n r7 = r0;\n r0 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0036;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.model.al.aRy():java.util.LinkedList<com.tencent.mm.plugin.game.model.d>\");\n }", "public float step(float feedbackValue) {\r\n\t\tfloat error = setpointValue - feedbackValue;\r\n\t\t\r\n\t\t//normalize error to a desired value\r\n\t\tif(!Float.isNaN(normalizeErrorTo)) {\r\n\t\t\tif(error>normalizationReference) {\r\n\t\t\t\terror = error - normalizeErrorTo;\r\n\t\t\t} else if(error<-normalizationReference) {\r\n\t\t\t\terror = normalizeErrorTo + error;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// calculate the proportional term\r\n\t\tfloat proportionalValue = kp * error;\r\n\t\t//this condition may happen if feedback is NaN!\r\n\t\tif(Float.isNaN(proportionalValue)) {\r\n\t\t\tproportionalValue = 0;\r\n\t\t}\r\n\t\t\r\n\t\t//calculate the integral term\r\n\t\tfloat integralValue = 0;\r\n\t\tif(ki!=0) {\r\n\t\t\t//integral part impact (according to time elapsed)\r\n\t\t\tfloat integralImpact = (float)((System.currentTimeMillis()-lastStepTime)/66.0);\r\n\t\t\t\r\n\t\t\t//integral part impact (adjust it to be used only when error is around zero)\r\n\t\t\tif(!Float.isNaN(integratorUsageErrorThreshold)) {\r\n\t\t\t\tintegralImpact *= 1-Math.min(Math.abs(error/integratorUsageErrorThreshold),1);\r\n//\t\t\t\tSystem.out.println(\">>>\"+error + \" \" + integratorUsageErrorThreshold);\r\n//\t\t\t\tSystem.out.println(1-Math.min(Math.abs(error/integratorUsageErrorThreshold),1));\r\n\t\t\t}\r\n\t\t\tif(integralImpact==0) {\r\n\t\t\t\tintegralAcum = 0;\r\n\t\t\t}\r\n//\t\t\tSystem.out.println(integralImpact);\r\n\t\t\t\r\n\t\t\t//Be careful with this code because it is not intuitive\r\n\t\t\t//multiply error by a reference time elapsed\r\n\t\t\tintegralAcum += error * integralImpact;\r\n\t\t\tintegralAcum = MathHelper.clamp(integralAcum, integratorMinValue/ki, integratorMaxValue/ki);\r\n\t\t\tintegralValue = ki * integralAcum;\r\n\t\t\tlastStepTime = System.currentTimeMillis();\r\n\t\t}\r\n\r\n\t\t//calculate the differential term\r\n\t\tfloat differentialValue = 0;\r\n\t\tif(kd!=0) {\r\n\t\t\tif(!Float.isNaN(error)) {\r\n\t\t\t\tdifferentialTermRegression.addSample((System.currentTimeMillis()-startTime), error);\r\n\t\t\t\tdifferentialValue = differentialTermRegression.calculateBestYValue();\r\n\t\t\t\tdifferentialValue *= kd;\r\n\t\t\t\tif(Float.isNaN(differentialValue)) {\r\n\t\t\t\t\tdifferentialValue = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n//\t\t\tdifferentialValue = (kd * (error - lastErrorValue));//elapsedTime;\r\n//\t\t\tif(!Float.isNaN(differentialValue)) {\r\n//\t\t\t\tif(differentialTermRegression.getMaxNumberOfSamples()>1) {\r\n//\t\t\t\t\tdifferentialTermRegression.addSample(differentialValue);\r\n//\t\t\t\t\tdifferentialValue = differentialTermRegression.calculateBestYValue();\r\n//\t\t\t\t}\r\n//\t\t\t} else {\r\n//\t\t\t\tdifferentialValue = 0;\r\n//\t\t\t}\r\n\t\t}\r\n\r\n\t\t//CALCULATE OUTPUT VALUE\r\n\t\t//pure output\r\n\t\tfloat outputValue = proportionalValue + integralValue + differentialValue;\r\n\t\t\r\n\t\t//output clamp\r\n\t\toutputValue = MathHelper.clamp(outputValue, restrictOutputFrom, restrictOutputTo);\r\n\r\n\t\t//force to a specific value (for tuning composite controller purposes)\r\n\t\tif(!Float.isNaN(forcedOutputValue)) {\r\n\t\t\toutputValue = forcedOutputValue;\r\n\t\t}\r\n\t\t\r\n\t\t//output inversion\r\n\t\tif(inverseOutput) {\r\n\t\t\toutputValue = -outputValue;\r\n\t\t}\r\n\t\tif(Float.isNaN(outputValue)) {\r\n\t\t\tlogger.warning(\"NaN: \"+ pidControl +\" outputValue=\"+ outputValue +\"; setPoint=\" + setpointValue + \"; currentValue=\" + feedbackValue + \"; targetSetPointValue=\" + setpointValue);\r\n\t\t}\r\n\t\t\r\n\t\t//remember last values\r\n\t\tlastFeedbackValue = feedbackValue;\r\n\t\tlastErrorValue = error;\r\n\t\tlastOutputValue = outputValue;\r\n\t\t\r\n\t\tlastProportionalValue = proportionalValue;\r\n\t\tlastIntegralValue = integralValue;\r\n\t\tlastDifferentialValue = differentialValue;\r\n\t\t\r\n//\t\tSystem.out.println(pidControl.getName() + \": S=\" + setpointValue + \"; O=\" + lastOutputValue + \"; F=\" + lastFeedbackValue + \"; P=\" + lastProportionalValue + \"; I=\" + lastIntegralValue + \"; D=\" + lastDifferentialValue);\r\n//\t\tlastStepTime = measureTime;\r\n\t\t\r\n\t\treturn outputValue;\r\n\t}", "@Override\n\tpublic double GetValue() {\n\t\tdouble spot = inputs.getSpot();\n\t\tdouble strike = inputs.getStrike();\n\t\tdouble vol = inputs.getVol();\n\t\tint noSteps=inputs.getNoSteps();\n\t\tdouble expiry=inputs.getExpiry();\n\t OptionType type=inputs.getType();\n\t ExerciseType exercise=inputs.getExercise();\n\t InterestRate interestRate=inputs.getR();\n\t\t\n\t double timestep = expiry/noSteps;\n\t double DF = Math.exp(-interestRate.GetRate(1.)*timestep);\n\t double temp1 = Math.exp((interestRate.GetRate(1.) + vol * vol)*timestep);\n\t double temp2 = 0.5 * (DF + temp1);\n\t double up = temp2 + Math.sqrt(temp2*temp2 - 1);\n\t double down = 1/ up;\n\t double probaUp = (Math.exp(interestRate.GetRate(1.) * timestep) - down)/(up -down) ;\n\t double probaDown = 1 - probaUp;\n\n\t //stock price tree\n\t\tstockPrice[0][0]=spot;\n\t for (int n = 1; n <= noSteps; n ++) {\n for (int j = n; j > 0; j--){\n \tstockPrice[j][n] = up * stockPrice[j-1][n-1];\n }\n \t\tstockPrice[0][n] = down * stockPrice[0][n-1];\n }\n\t \n\t //last column set payoffs\n\t\tfor (int j = 0; j <= noSteps; j++) {\n\t\t\t\tif(type.equals(OptionType.CALL)) {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(this.stockPrice[j][noSteps] - strike, .0);\n\t\t\t\t}else {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(strike - this.stockPrice[j][noSteps], .0);\n\t\t\t\t}\n\t\t}\n\n\t\t\n\t //payoff tree in backwardation\n\t \n\t for (int i = noSteps ; i >= 1; i--) {\n for (int j = 0; j <= i-1; j++) {\n\t \tif(exercise.equals(ExerciseType.AMERICAN)) { \n\t //American\t\n\t \t\tif(type.equals(OptionType.CALL)) {\n\t \t\t\t\tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(this.stockPrice[j][i-1] - strike, .0));\n\t \t\t\t\n\t \t\t}else \tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(strike - this.stockPrice[j][i-1] , .0));\n\t \t}else { \n\t \t\t\t//European put and call option\n\t \t\t\t\tpayOff[j][i-1] = DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]);\n\t }\n }\n }\n\t \n\t double deltaUp = (payOff[0][2]-payOff[1][2])/(stockPrice[0][2]-stockPrice[1][2]);\n\t double deltaDown = (payOff[1][2]-payOff[2][2])/(stockPrice[1][2]-stockPrice[2][2]);\n\t delta = (deltaUp + deltaDown) /2;\n\t gamma = (deltaUp-deltaDown)/((stockPrice[0][2]-stockPrice[2][2])/2);\n\t theta = (payOff[1][2]-payOff[0][0])/(365*2*timestep);//time in days\n\t \n\t long rounded = Math.round(payOff[0][0]*10000);\n\t return rounded/10000.0;\n\t}", "private double getRecEnergy(){\n\t\tdebugMatrix = new double[CELL_SIDE_COUNT][CELL_SIDE_COUNT];\n\t\tconvolutedMatrix = new Complex[CELL_SIDE_COUNT][CELL_SIDE_COUNT];\n\t\t//initiliaze the whole convolutedMatrix array to zero\n\t\tfor(int x = 0; x < CELL_SIDE_COUNT; x++)\n\t\t{\n\t\t\tfor(int y = 0; y < CELL_SIDE_COUNT; y++)\n\t\t\t{\n\t\t\t\tconvolutedMatrix[x][y] = Complex.zero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Pg. 180 Lee[05]\n\t\tint indexTop = CELL_SIDE_COUNT * CELL_SIDE_COUNT;\n\t\t//Eq 19 Lee[05]\n\t\t//Also Eq 3.9 Essman[95]\n\t\tdouble sum = 0;\n\t\tint indtop = CELL_SIDE_COUNT * CELL_SIDE_COUNT;\n\t\tint midPoint = CELL_SIDE_COUNT / 2;\n\t\tif (midPoint << 1 < CELL_SIDE_COUNT) {\n\t\t\t++midPoint;\n\t\t}\n\t\t\n\t\tfor (int ind = 1; ind <= (indtop - 1); ++ind) {\n\t\t\t\n\t\t\tint y = ind / CELL_SIDE_COUNT + 1;\n\t\t\tint x = ind - (y - 1) * CELL_SIDE_COUNT + 1;\n\t\t\tint mXPrime = x - 1;\n\t\t\tif (x > midPoint) {\n\t\t\t\tmXPrime = x - 1 - CELL_SIDE_COUNT;\n\t\t\t}\n\t\t\tint mYPrime = y - 1;\n\t\t\tif (y > midPoint) {\n\t\t\t\tmYPrime = y - 1 - CELL_SIDE_COUNT;\n\t\t\t}\n\t\t\tdouble m = mXPrime * 1.0 + mYPrime * 1.0; //Was inverseMeshWidth - theory is reciprocal lattice vectors are for the entire cell U rather than one cell\n\t\t\tdouble mSquared = squared(mXPrime * 1.0) + squared(mYPrime * 1.0);\n\t\t\t\n\t\t\tdouble V = 1; //working in the unit mesh\n\t\t\tdouble bterm = M.bspmod[x]*M.bspmod[y];\n\t\t\tdouble eterm = Math.exp(-squared(Math.PI/ewaldCoefficient)*mSquared) / (bterm * Math.PI * V * mSquared);\n\t\t\t//Section 3.2.8 Lee[05]\n\t\t\tdouble inverseQPart = (squared(inverseFTQComplex[x-1][y-1].re())+squared(inverseFTQComplex[x-1][y-1].im())); //Lee[05]\n\t\t\tdouble thisContribution = eterm * inverseQPart;\n\t\t\tconvolutedMatrix[x-1][y-1] = inverseFTQComplex[x-1][y-1].scale(eterm); //Save this for the force calculation\n\t\t\tsum += thisContribution; //from the argument that F(Q(M))*F(Q(-M))=F-1(Q)^2\n\t\t}\n\t\treturn 0.5*sum;\n\t}", "private void correctParameter(){\n \tint ifObtuse;\r\n \tif(initialState.v0_direction>90)ifObtuse=1;\r\n \telse ifObtuse=0;\r\n \tdouble v0=initialState.v0_val;\r\n \tdouble r0=initialState.r0_val;\r\n \tdouble sintheta2=Math.sin(Math.toRadians(initialState.v0_direction))*Math.sin(Math.toRadians(initialState.v0_direction));\r\n \tdouble eccentricityMG=Math.sqrt(center.massG*center.massG-2*center.massG*v0*v0*r0*sintheta2+v0*v0*v0*v0*r0*r0*sintheta2);\r\n \tdouble cosmiu0=-(v0*v0*r0*sintheta2-center.massG)/eccentricityMG;\r\n \tpe=(v0*v0*r0*r0*sintheta2)/(center.massG+eccentricityMG);\r\n \tap=(v0*v0*r0*r0*sintheta2)/(center.massG-eccentricityMG);\r\n \tsemimajorAxis=(ap+pe)/2;\r\n \tsemiminorAxis=Math.sqrt(ap*pe);\r\n \tsemifocallength=(ap-pe)/2;\r\n \tSystem.out.println(semimajorAxis+\",\"+semiminorAxis+\",\"+semifocallength);\r\n \teccentricity=eccentricityMG/center.massG;\r\n \tperiod=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));\r\n \trotate=(360-Math.toDegrees(Math.acos(cosmiu0)));\r\n \torbitCalculator.angleDelta=(Math.toDegrees(Math.acos(cosmiu0))+360);\r\n \trotate=rotate+initialState.r0_direction;\r\n \t\r\n \tif(ifObtuse==1) {\r\n \t\tdouble rbuf=rotate;\r\n \t\trotate=initialState.r0_direction-rotate;\r\n \t\torbitCalculator.angleDelta+=(2*rbuf-initialState.r0_direction);\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate>360)rotate=rotate-360;\r\n \t\telse break;\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate<0)rotate=rotate+360;\r\n \t\telse break;\r\n \t}\r\n \t/*\r\n \tpe=initialState.r0_val;\r\n rotate=initialState.r0_direction;\r\n ap=(initialState.v0_val*initialState.v0_val*pe*pe)/(2*center.massG-initialState.v0_val*initialState.v0_val*pe);\r\n peSpeed=initialState.v0_val;\r\n apSpeed=(2*center.massG-initialState.v0_val*initialState.v0_val*pe)/(initialState.v0_val*pe);\r\n if(ap<pe){\r\n double lf=ap;ap=pe;pe=lf;\r\n lf=apSpeed;apSpeed=peSpeed;peSpeed=lf;\r\n }\r\n semimajorAxis=(ap+pe)/2;\r\n semifocallength=(ap-pe)/2;\r\n semiminorAxis=Math.sqrt(ap*pe);\r\n eccentricity=semifocallength/semimajorAxis;\r\n period=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));*/\r\n }", "public abstract double calculate(Complex c,Complex current);", "private Rational computeDirectly() {\n BigInteger _26390k = _26390.multiply(BigInteger.valueOf(start));\n BigInteger _24591257856pk = _24591257856.pow(start);\n\n Rational sum = Rational.ZERO;\n\n for (int k = start; k < end; k++) {\n BigInteger num = Factorial.verified(BigInteger.valueOf(k << 2));\n num = num.multiply(_1103.add(_26390k));\n\n BigInteger den = Factorial.verified(BigInteger.valueOf(k)).pow(4);\n den = den.multiply(_24591257856pk);\n\n _26390k = _26390k.add(_26390);\n _24591257856pk = _24591257856pk.multiply(_24591257856);\n\n sum = sum.add(Rational.valueOf(num, den).dropTo(context));\n sum = sum.dropTo(context);\n }\n return sum;\n }", "public Path mo22884a() {\n if (this.f21607h) {\n return this.f21600a;\n }\n this.f21600a.reset();\n if (this.f21605f.mo23067d()) {\n this.f21607h = true;\n return this.f21600a;\n }\n PointF pointF = (PointF) this.f21603d.mo22903f();\n float f = pointF.x / 2.0f;\n float f2 = pointF.y / 2.0f;\n float f3 = f * 0.55228f;\n float f4 = 0.55228f * f2;\n this.f21600a.reset();\n if (this.f21605f.mo23068e()) {\n float f5 = -f2;\n this.f21600a.moveTo(0.0f, f5);\n float f6 = 0.0f - f3;\n float f7 = -f;\n float f8 = 0.0f - f4;\n this.f21600a.cubicTo(f6, f5, f7, f8, f7, 0.0f);\n float f9 = f4 + 0.0f;\n float f10 = f5;\n this.f21600a.cubicTo(f7, f9, f6, f2, 0.0f, f2);\n float f11 = f3 + 0.0f;\n this.f21600a.cubicTo(f11, f2, f, f9, f, 0.0f);\n this.f21600a.cubicTo(f, f8, f11, f10, 0.0f, f10);\n } else {\n float f12 = -f2;\n this.f21600a.moveTo(0.0f, f12);\n float f13 = f3 + 0.0f;\n float f14 = 0.0f - f4;\n this.f21600a.cubicTo(f13, f12, f, f14, f, 0.0f);\n float f15 = f4 + 0.0f;\n this.f21600a.cubicTo(f, f15, f13, f2, 0.0f, f2);\n float f16 = 0.0f - f3;\n float f17 = -f;\n this.f21600a.cubicTo(f16, f2, f17, f15, f17, 0.0f);\n float f18 = f12;\n this.f21600a.cubicTo(f17, f14, f16, f18, 0.0f, f18);\n }\n PointF pointF2 = (PointF) this.f21604e.mo22903f();\n this.f21600a.offset(pointF2.x, pointF2.y);\n this.f21600a.close();\n this.f21606g.mo22882a(this.f21600a);\n this.f21607h = true;\n return this.f21600a;\n }", "private List<Point> getPath(int index) {\n\t\t \n\t \n\t\t Node fromNode = oEdge.fromNode;\n\t\t Node toNode = oEdge.toNode;\n\t\t float x1 = fromNode.longitude;\n\t\t float x2 = toNode.longitude;\n\t\t float y1 = fromNode.latitude;\n\t\t float y2 = toNode.latitude;\n\t\t double slope, angle;\n\t\t if(x1!=x2) {\n\t\t\t slope = (y2-y1)/(x2-x1);\n\t\t\t \tangle = Math.atan(slope);\n\t\t\t \t} else {\n\t\t\t \t\tangle = Math.PI/2;\n\t\t\t \t}\n\t\t Double L = Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n\t\t float offsetPixels=0;\n\t\t if(Math.toDegrees(angle)>Math.toDegrees(90)) {\n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=roadWidth*1/10;\n\t\t\t }\n\t\t\t \n\t\t } else {\n\t\t\t \n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=-roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=-roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=-roadWidth*1/10;\n\t\t\t }\n\t\t }\n\t\t \n\t\t // This is the first parallel line\n\t\t float x1p1 = x1 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float x2p1 = x2 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float y1p1 = y1 + offsetPixels * (x1-x2) / L.floatValue();\n\t\t float y2p1 = y2 + offsetPixels * (x1-x2) / L.floatValue();\n//\t\t if(oEdge.edgeID==16) {\n//\t\t\t System.out.println(\"testing\");\n//\t\t }\n\t\t \n\t\t Point P1 = new Point(x1p1,y1p1);\n\t\t Point P2 = new Point(x2p1,y2p1);\n\t\t List<Point> gP = GetPoints(P1, P2);\n\t\t return gP;\n\t \n\t}", "@Test\n public void test23() throws Throwable {\n double double0 = UnivariateRealSolverUtils.midpoint((-1052.8959089), (-1052.8959089));\n assertEquals((-1052.8959089), double0, 0.01D);\n }", "@Override\r\n\t/**\r\n\t * Method that gives the condition for y coordinate \r\n\t * \r\n\t * @see com.ogp.pp.tp.geoconstruction.Point#getYCondition()\r\n\t */\r\n\tpublic SymbolicPolynomial getYCondition() {\n\t\tSymbolicPolynomial yConditionForRotatedPoint = new SymbolicPolynomial();\r\n\t\tSymbolicVariable y0 = new SymbolicVariable(Variable.VAR_TYPE_SYMB_Y, M0Label);\r\n\t\tSymbolicVariable xA = new SymbolicVariable(Variable.VAR_TYPE_SYMB_X, ALabel);\r\n\t\tSymbolicVariable yA = new SymbolicVariable(Variable.VAR_TYPE_SYMB_Y, ALabel);\r\n\t\tSymbolicVariable xS = new SymbolicVariable(Variable.VAR_TYPE_SYMB_X, SLabel);\r\n\t\tSymbolicVariable yS = new SymbolicVariable(Variable.VAR_TYPE_SYMB_Y, SLabel);\r\n\t\t\r\n\t\tSymbolicPolynomial m0Part = new SymbolicPolynomial();\r\n\t\tSymbolicPolynomial xPart = new SymbolicPolynomial();\r\n\t\tSymbolicPolynomial yPart = new SymbolicPolynomial();\r\n\t\tSymbolicPolynomial zPart = new SymbolicPolynomial();\r\n\t\tSymbolicTerm tempTerm = null;\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(y0, 1));\r\n\t\tm0Part.addTerm(tempTerm);\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(xA, 1));\r\n\t\txPart.addTerm(tempTerm);\r\n\t\ttempTerm = new SymbolicTerm(-1);\r\n\t\ttempTerm.addPower(new Power(xS, 1));\r\n\t\txPart.addTerm(tempTerm);\r\n\t\txPart.multiplyByRealConstant(Math.sin(this.radAngleMeasure));\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(yA, 1));\r\n\t\tyPart.addTerm(tempTerm);\r\n\t\ttempTerm = new SymbolicTerm(-1);\r\n\t\ttempTerm.addPower(new Power(yS, 1));\r\n\t\tyPart.addTerm(tempTerm);\r\n\t\tyPart.multiplyByRealConstant(Math.cos(this.radAngleMeasure));\r\n\t\t\r\n\t\ttempTerm = new SymbolicTerm(1);\r\n\t\ttempTerm.addPower(new Power(yS, 1));\r\n\t\tzPart.addTerm(tempTerm);\r\n\t\t\r\n\t\tyConditionForRotatedPoint.addPolynomial(m0Part);\r\n\t\tyConditionForRotatedPoint.subtractPolynomial(xPart);\r\n\t\tyConditionForRotatedPoint.subtractPolynomial(yPart);\r\n\t\tyConditionForRotatedPoint.subtractPolynomial(zPart);\r\n\t\t\r\n\t\treturn yConditionForRotatedPoint;\r\n\t}", "private void four1(double data[], int nn, int isign) {\r\n int n,mmax,m,j,istep,i;\r\n double wtemp,wr,wpr,wpi,wi,theta;\r\n double tempr,tempi;\r\n double swap;\r\n\r\n n=2*nn;\r\n j=1;\r\n for (i=1;i<n;i+=2) {\r\n if (j > i) {\r\n swap=data[j];\r\n data[j]=data[i];\r\n data[i]=swap;\r\n\r\n swap=data[j+1];\r\n data[j+1]=data[i+1];\r\n data[i+1]=swap;\r\n }\r\n m=n >> 1;\r\n while (m >= 2 && j > m) {\r\n j -= m;\r\n m >>= 1;\r\n }\r\n j += m;\r\n }\r\n mmax=2;\r\n while (n > mmax) {\r\n istep=2*mmax;\r\n theta=isign*(6.28318530717959/mmax);\r\n wtemp=Math.sin(0.5*theta);\r\n wpr = -2.0*wtemp*wtemp;\r\n wpi=Math.sin(theta);\r\n wr=1.0;\r\n wi=0.0;\r\n for (m=1;m<mmax;m+=2) {\r\n for (i=m;i<=n;i+=istep) {\r\n j=i+mmax;\r\n tempr=wr*data[j]-wi*data[j+1];\r\n tempi=wr*data[j+1]+wi*data[j];\r\n data[j]=data[i]-tempr;\r\n data[j+1]=data[i+1]-tempi;\r\n data[i] += tempr;\r\n data[i+1] += tempi;\r\n }\r\n wr=(wtemp=wr)*wpr-wi*wpi+wr;\r\n wi=wi*wpr+wtemp*wpi+wi;\r\n }\r\n mmax=istep;\r\n }\r\n }", "Double getStep();", "protected abstract Double MLexecStep(Object[] input, MLBoxMode currentMode) throws BoxError;", "private void polyInt() {\n this.polySolve();\n this.ia = this.a * (1.0 / 4.0);\n this.ib = this.b * (1.0 / 3.0);\n this.ic = this.c * (1.0 / 2.0);\n this.id = this.d;\n String int1 = null, int2 = \"\", int3 = \"\", int4 = \"\";\n int inta = 0, intb = 0, intc = 0, intd = 0;\n if (this.degree == 3) {\n int1 = \"Sf(x) = \" + this.ia + \"x^4 \";\n if (this.b == 0) {\n intb = 1;\n } else {\n if (this.b > 0) {\n int2 = \"+ \" + this.ib + \"x^3 \";\n\n } else {\n int2 = \"- \" + -this.ib + \"x^3 \";\n }\n }\n if (this.c == 0) {\n intc = 1;\n } else {\n if (this.c > 0) {\n int3 = \"+ \" + this.ic + \"x^2 \";\n } else {\n int3 = \"- \" + -this.ic + \"x^2 \";\n }\n }\n if (this.d == 0) {\n intd = 1;\n } else {\n if (this.d > 0) {\n int4 = \"+ \" + this.id + \"x \";\n } else {\n int4 = \"- \" + -this.id + \"x \";\n }\n }\n if (intb == 0 && intc == 0 && intd == 0) {\n this.integral = int1 + int2 + int3 + int4 + \"+ C\";\n }\n if (intb == 0 && intc == 0 && intd == 1) {\n this.integral = int1 + int2 + int3 + \"+ C\";\n }\n if (intb == 0 && intc == 1 && intd == 1) {\n this.integral = int1 + int2 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 1) {\n this.integral = int1 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 0) {\n this.integral = int1 + int3 + int4 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 1) {\n this.integral = int1 + int3 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 0) {\n this.integral = int1 + int4 + \"+ C\";\n }\n\n }\n if (this.degree == 2) {\n int1 = \"Sf(x) = \" + this.ib + \"x^3 \";\n if (this.c == 0) {\n intc = 1;\n } else {\n if (this.c > 0) {\n int2 = \"+ \" + this.ic + \"x^2 \";\n } else {\n int2 = \"- \" + -this.ic + \"x^2 \";\n }\n }\n\n if (this.d == 0) {\n intd = 1;\n } else {\n if (this.d > 0) {\n int3 = \"+ \" + this.id + \"x \";\n } else {\n int3 = \"- \" + -this.id + \"x \";\n }\n }\n if (intc == 0 && intd == 0) {\n this.integral = int1 + int2 + int3 + \"+ C\";\n }\n if (intc == 0 && intd == 1) {\n this.integral = int1 + int2 + \"+ C\";\n }\n if (intc == 1 && intd == 0) {\n this.integral = int1 + int3 + \"+ C\";\n }\n if (intc == 1 && intd == 1) {\n this.integral = int1 + \"+ C\";\n }\n }\n if (this.degree == 1) {\n int1 = \"Sf(x) = \" + this.ic + \"x^2 \";\n if (this.id == 0) {\n intd = 1;\n\n } else {\n if (this.id > 0) {\n int2 = \"+ \" + this.id + \"x \";\n } else {\n int2 = \"- \" + -this.id + \"x \";\n }\n }\n if (intd == 0) {\n this.integral = int1 + int2 + \"+ C\";\n } else {\n this.integral = int1 + int2 + \"+ C\";\n }\n\n }\n if (this.degree == 0) {\n this.integral = \"Sf(x) = \" + this.id + \"x + C\";\n }\n\n }", "private static double rk2(String expression, double x0, double y0, double xf, double h) throws Exception {\n double xn = x0;\n double yn = y0;\n while (xn < xf) {\n double k1 = h * ExpressionEvaluator.evaluateExpression(expression, xn, yn);\n double k2 = h * ExpressionEvaluator.evaluateExpression(expression, xn + h, yn + k1);\n double yn1 = yn + ((k1 + k2) / 2);\n double xn1 = xn + h;\n xn = xn1;\n yn = yn1;\n }\n return yn;\n }", "public void recalculateDistanceFunction()\r\n {\n findBoundaryGivenPhi();\r\n \r\n active.removeAllElements();\r\n\tfor(int i=0; i<pixelsWide; i++)\r\n\t\tfor(int j=0; j<pixelsHigh; j++)\r\n\t\t\t{\r\n if(!boundary.contains(new Int2d(i,j))) phi[i][j] = phiStart;\r\n //else System.out.println(\"Boundary point at i,j = \" + i + \", \" + j + \" with phi = \" + phi[i][j]);\r\n\t\t\t}\r\n \r\n //System.out.println(\"Building Initial Band\");\r\n\tbuildInitialBand(); \r\n \r\n //System.out.println(active.size());\r\n \r\n //System.out.println(\"Running Algorithm\");\r\n\twhile(active.size()>0)\r\n\t\t{\r\n\t\trunAlgorithmStep();\r\n\t\t}\r\n\t\r\n //System.out.println(\"Distance function calculated\");\r\n\t//maxPhi = findMaxPhi();\r\n }", "public static android.graphics.Point c(android.content.Context r4) {\n /*\n r1 = new android.graphics.Point;\n r1.<init>();\n r0 = z;\n r2 = 50;\n r0 = r0[r2];\n r0 = r4.getSystemService(r0);\n r0 = (android.view.WindowManager) r0;\n r0 = r0.getDefaultDisplay();\n r2 = android.os.Build.VERSION.SDK_INT;\t Catch:{ RuntimeException -> 0x005d }\n r3 = 13;\n if (r2 < r3) goto L_0x0022;\n L_0x001b:\n r0.getSize(r1);\t Catch:{ RuntimeException -> 0x005f }\n r2 = com.whatsapp.wallpaper.ImageViewTouchBase.e;\t Catch:{ RuntimeException -> 0x005f }\n if (r2 == 0) goto L_0x002e;\n L_0x0022:\n r2 = r0.getWidth();\t Catch:{ RuntimeException -> 0x005f }\n r1.x = r2;\t Catch:{ RuntimeException -> 0x005f }\n r0 = r0.getHeight();\t Catch:{ RuntimeException -> 0x005f }\n r1.y = r0;\t Catch:{ RuntimeException -> 0x005f }\n L_0x002e:\n r0 = r4.getResources();\n r0 = r0.getConfiguration();\n r0 = r0.orientation;\n r2 = 2;\n if (r0 != r2) goto L_0x0043;\n L_0x003b:\n r0 = r1.y;\n r2 = r1.x;\n r1.y = r2;\n r1.x = r0;\n L_0x0043:\n r0 = r1.y;\n r2 = r4.getResources();\n r3 = 2131361792; // 0x7f0a0000 float:1.8343346E38 double:1.0530326403E-314;\n r2 = r2.getDimension(r3);\n r2 = (int) r2;\n r3 = com.whatsapp.am1.a();\n r3 = r3.b();\n r2 = r2 + r3;\n r0 = r0 - r2;\n r1.y = r0;\n return r1;\n L_0x005d:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x005f }\n L_0x005f:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.wallpaper.p.c(android.content.Context):android.graphics.Point\");\n }", "public void arcDrive (double inches, float degreesToTurn, double basePower, boolean clockwise, double p_coeff) throws InterruptedException {\n\n int target = (int) (inches * ticksPerInch);\n double correction;\n double leftPower = basePower;\n double rightPower = basePower;\n double max;\n int lastEncoder;\n int currentEncoder = 0;\n int deltaEncoder;\n double proportionEncoder;\n float lastHeading;\n float currentHeading = zRotation;\n float deltaHeading;\n double proportionHeading;\n double proportionArc;\n long loops = 0;\n\n if(basePower<0){\n clockwise = !clockwise;\n degreesToTurn *= -1;\n }\n\n double P_ARC_COEFF = p_coeff;\n\n setEncoderBase();\n\n frontRight.setPower(basePower);\n backRight.setPower(basePower);\n frontLeft.setPower(basePower);\n backLeft.setPower(basePower);\n\n Thread.sleep(10);\n\n while (((LinearOpMode) callingOpMode).opModeIsActive()) {\n\n lastEncoder = currentEncoder;\n currentEncoder = getCurrentAveragePosition();\n\n deltaEncoder = currentEncoder - lastEncoder;\n\n lastHeading = currentHeading;\n currentHeading = zRotation;\n\n deltaHeading = currentHeading - lastHeading;\n deltaHeading = normalize360two(deltaHeading);\n\n proportionEncoder = (double) deltaEncoder / target;\n proportionHeading = (double) deltaHeading / degreesToTurn;\n\n proportionArc = proportionEncoder - proportionHeading;\n\n correction = proportionArc * P_ARC_COEFF;\n\n if(clockwise) {\n leftPower += correction;\n rightPower -= correction;\n } else {\n leftPower -= correction;\n rightPower += correction;\n }\n\n max = Math.max(Math.abs(leftPower), Math.abs(rightPower));\n if (max > 1.0) {\n leftPower /= max;\n rightPower /= max;\n }\n frontRight.setPower(rightPower);\n backRight.setPower(rightPower);\n frontLeft.setPower(leftPower);\n backLeft.setPower(leftPower);\n\n if (((loops + 10) % 10) == 0) {\n callingOpMode.telemetry.addData(\"TARGET\", target);\n callingOpMode.telemetry.addData(\"gyro\", zRotation);\n callingOpMode.telemetry.addData(\"encoder\", currentEncoder);\n callingOpMode.telemetry.addData(\"heading\", currentHeading);\n callingOpMode.telemetry.addData(\"dEncoder\", deltaEncoder);\n callingOpMode.telemetry.addData(\"dHeading\", deltaHeading);\n callingOpMode.telemetry.addData(\"pEncoder\", proportionEncoder);\n callingOpMode.telemetry.addData(\"pHeading\", proportionHeading);\n callingOpMode.telemetry.addData(\"arc\", proportionArc);\n callingOpMode.telemetry.addData(\"correction\", correction);\n callingOpMode.telemetry.addData(\"leftPower\", leftPower);\n callingOpMode.telemetry.addData(\"rightPower\", rightPower);\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.update();\n }\n\n loops++;\n\n updateGlobalPosition();\n\n Thread.sleep(10);\n\n if(Math.abs(target) <= Math.abs(getCurrentAveragePosition())) {\n callingOpMode.telemetry.addData(\"TARGET\", target);\n callingOpMode.telemetry.addData(\"gyro\", zRotation);\n callingOpMode.telemetry.addData(\"encoder\", currentEncoder);\n callingOpMode.telemetry.addData(\"heading\", currentHeading);\n callingOpMode.telemetry.addData(\"dEncoder\", deltaEncoder);\n callingOpMode.telemetry.addData(\"dHeading\", deltaHeading);\n callingOpMode.telemetry.addData(\"pEncoder\", proportionEncoder);\n callingOpMode.telemetry.addData(\"pHeading\", proportionHeading);\n callingOpMode.telemetry.addData(\"arc\", proportionArc);\n callingOpMode.telemetry.addData(\"correction\", correction);\n callingOpMode.telemetry.addData(\"leftPower\", leftPower);\n callingOpMode.telemetry.addData(\"rightPower\", rightPower);\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.update();\n break;\n }\n }\n }", "@Test\n public void testKendall() {\n System.out.println(\"kendall\");\n double[] x = {44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1};\n double[] y = {2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8};\n\n CorTest result = CorTest.kendall(x, y);\n assertEquals(0.4444444, result.cor, 1E-7);\n assertEquals(0.0953, result.pvalue, 1E-4);\n }", "public float[] calibrate(Base mBase, Sensor mSensor) {\n final double metersPerLatitude;\n final double metersPerLongitude;\n\n\n\n //Fetching the cisco position for the robot, which returns\n float ciscoLong = (float) 8.57617285865058;\n float ciscoLat = (float) 58.33447638466072;\n\n\n metersPerLongitude = distanceCalculator.calculateDistance(ciscoLong, ciscoLat, ciscoLong + 1.0, ciscoLat);\n\n metersPerLatitude= distanceCalculator.calculateDistance(ciscoLong, ciscoLat, ciscoLong, ciscoLat + 1.0);\n\n\n float originCiscoPositionx = ciscoLong * (float) metersPerLongitude;\n float originCiscoPositiony = ciscoLat * (float) metersPerLatitude;\n\n\n //Driving 1 meter forward test\n //mBase.addCheckPoint(1, 0);\n\n\n //GetCiscoPosition()\n //These are the actual coordinates of x2 and y2 in latitude and longitude.\n\n\n\n //If Loomo was already headed east, we would expect these coordinates in meters:\n float expectedCiscoPositionx2 = (originCiscoPositionx + 1);\n\n float newCiscoPointlon = (float) 8.57617413279317;\n float newCiscoPointlat = (float) 58.334468102336245;\n\n\n float actualCiscoPositionx2 = newCiscoPointlon * (float) metersPerLongitude;\n float actualCiscoPositiony2 = newCiscoPointlat * (float) metersPerLatitude;\n\n\n\n //Defining 3 vectors that make up a triangle abc\n double[] aVector = {expectedCiscoPositionx2 - originCiscoPositionx, originCiscoPositiony - originCiscoPositiony};\n double[] bVector = {actualCiscoPositionx2 - originCiscoPositionx, actualCiscoPositiony2 - originCiscoPositiony};\n double[] cVector = {expectedCiscoPositionx2 - actualCiscoPositionx2, originCiscoPositiony - actualCiscoPositiony2};\n\n\n\n //Calculating the length of each vector / side of the triangle with the pythagorean therm.\n double aVectorLengthSquared = Math.pow(aVector[0], 2.0) + Math.pow(aVector[1], 2.0);\n double bVectorLengthSquared = Math.pow(bVector[0], 2.0) + Math.pow(bVector[1], 2.0);\n double cVectorLengthSquared = Math.pow(cVector[0], 2.0) + Math.pow(cVector[1], 2.0);\n\n System.out.println(\"Length a = \" + sqrt(aVectorLengthSquared));\n System.out.println(\"Length b = \" + sqrt(bVectorLengthSquared));\n System.out.println(\"Length c = \" + sqrt(cVectorLengthSquared));\n System.out.println(\" \");\n\n //Calculating the angle between the vector from the expected points and the vector from the\n // real points using the cosine law. This gives us an angle ∈ [0,PI].\n float angle = (float) acos((aVectorLengthSquared + bVectorLengthSquared - cVectorLengthSquared)\n / (2 * sqrt(aVectorLengthSquared) * sqrt(bVectorLengthSquared)));\n\n\n\n //If the y-element of the b-vector is negative, that means loomo has been driving\n // southwards. This means, if we are to rotate the coordinates to fit loomo,\n // they will need to be rotated in the positive direction, or against the clock. -> angle = angle\n // If the y-element is positive, then loomo has been driving north, and the coordinates will\n // need to be rotated with the clock. Then \"angle\" will be the negative value\n // found with the cosine law.\n\n if (bVector[1] < 0) {\n angle = angle;\n } else if (bVector[1] > 0) {\n angle = -angle;\n }\n\n System.out.println(\"The angle between the reference systems are: \" + angle + \", which equals \" + angle / PI + \"*PI\\n\" );\n\n mBase.cleanOriginalPoint();\n\n //Setting Fetching the original point where Loomo stands.\n mBase.cleanOriginalPoint();\n Pose2D pose2D = mBase.getOdometryPose(-1);\n mBase.setOriginalPoint(pose2D);\n\n //Driving North: \t58.334512491588754, 8.576253530218082 to 58.33452608839093, 8.576253888068521\n //Driving East: 58.33452608839093, 8.576253888068521 to 58.33452618178464, 8.576285073219395\n //Driving West: 58.33452618178464, 8.576285073219395 to 58.33452693486112, 8.576258173706947\n //Driving South: 58.33452693486112, 8.576258173706947 to 58.33451544969185, 8.576258890746544\n\n float[] calibInfo = {angle, (float) metersPerLongitude, (float) metersPerLatitude};\n return calibInfo;\n }", "public void testXYLineRotation() {\n b = 1; // A line along y=1 and z=0.\n u = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 2, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 2, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1, 1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1+Math.sqrt(2)/2, Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "public float[][][][] next_epoch() {\n\n\n\n float[][][] padded2dKpts = pad_edges(poses_2d, 121, 121);\n\n /*\n Log.i(\"DBUG\", String.format(\"padded2dKpts dim 1 is %d\", padded2dKpts.length));\n Log.i(\"DBUG\", String.format(\"padded2dKpts dim 2 is %d\", padded2dKpts[0].length));\n Log.i(\"DBUG\", String.format(\"padded2dKpts dim 3 is %d\", padded2dKpts[0][0].length));*/\n\n float[][][][] newPadded2dKpts = new float[1][][][];\n\n newPadded2dKpts[0] = padded2dKpts;\n\n\n\n if (augment) {\n //append flipped version\n newPadded2dKpts = concat4d(newPadded2dKpts, newPadded2dKpts, 0);\n //newPadded2dKpts now contains 2 identical 3d arrays that are 272x17x2\n\n //flip all keypoints in second one\n for (int i = 0; i < newPadded2dKpts[1].length; i++) { //for 272\n for (int j = 0; j < newPadded2dKpts[1][i].length; j++) { //for 17\n newPadded2dKpts[1][i][j][0] *= -1; //x coord\n newPadded2dKpts[1][i][j][1] *= -1; //y coord\n }\n }\n\n int[] leftThenRt = concat1d(kps_left, kps_right, 0);\n int[] rtThenLeft = concat1d(kps_right, kps_left, 0);\n\n //do a lil switcheroo of the joints\n\n for (int i = 0; i < newPadded2dKpts[1].length; i++) { //for 272\n for (int j = 0; j < leftThenRt.length; j++) {\n newPadded2dKpts[1][i][leftThenRt[j]] = newPadded2dKpts[1][i][rtThenLeft[j]];\n }\n }\n\n }\n\n\n return newPadded2dKpts;\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}", "private void getKingJumpPos(Point kingPoint, Orientation or, Movement m, JumpPosition jumpPosit,Color c, boolean b) throws CloneNotSupportedException {\n Point foo = jumpPosit.jumpPosition.get(jumpPosit.jumpPosition.size()-1).to;\n Color oposite = c==Color.black?Color.red:Color.black;\n \n Point soldierPoint , nextPoint;\n for(OrientationMove orM:orientationMoveCombs){\n Point currentPoint = foo;\n for(int i=0;i<8;i++){\n if(i!=0) currentPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n if( !isValidSquare(currentPoint.x, currentPoint.y)) \n break;\n if( !isEmpty(new Soldier(currentPoint.x, currentPoint.y, Color.white), gamePieces)) \n break;\n //soldierPoint = getXandYgivenOrientation(currentPoint, or,m);\n\n soldierPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n nextPoint = getXandYgivenOrientation(soldierPoint, orM.or,orM.m);\n Soldier foe = new Soldier(soldierPoint.x, soldierPoint.y, oposite);\n if(isJumpable(soldierPoint, orM.or, orM.m, c , jumpPosit))\n addAllRelevantSquares(jumpPosit, foo, nextPoint, soldierPoint, orM.or, orM.m ,oposite );\n\n\n nextPoint = getXandYgivenOrientation(soldierPoint, or,m);\n if(!isEmpty(soldierPoint, gamePieces, jumpPosit.jumpPosition)\n &&!isEmpty(nextPoint, gamePieces, jumpPosit.jumpPosition)) break; \n }\n }\n \n \n \n //If it is, add it to the movement path\n// if(isJumpable(soldierPoint, or, m, c , jumpPositions)){ \n// addOnlyToTempJumpPositions(foo, getXandYgivenOrientation(soldierPoint, or,m) , soldierPoint ,jumpPosit , or, m);\n// }\n \n }", "public double[] getSolutionsInRadius(){\n\t\t\n\t\t\n\t}", "public void mo472g() throws RemoteException {\r\n int i = 0;\r\n if (this.f1761e != null && this.f1762f != null && this.f1763g != null && this.f1767k) {\r\n try {\r\n this.f1772p = false;\r\n MapProjection c = this.f1769m.mo395c();\r\n FPoint fPoint;\r\n if (m2832l()) {\r\n DPoint m = m2833m();\r\n int abs = (int) ((Math.abs(this.f1775s - this.f1774r) * 180.0d) / 3.141592653589793d);\r\n double d = (this.f1775s - this.f1774r) / ((double) abs);\r\n FPoint[] fPointArr = new FPoint[(abs + 1)];\r\n this.f1770n = new float[(fPointArr.length * 3)];\r\n for (int i2 = 0; i2 <= abs; i2++) {\r\n MapProjection mapProjection;\r\n if (i2 == abs) {\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1763g.latitude, this.f1763g.longitude, fPoint);\r\n fPointArr[i2] = fPoint;\r\n } else {\r\n mapProjection = c;\r\n fPointArr[i2] = m2831a(mapProjection, (((double) i2) * d) + this.f1774r, m.f3635x, m.f3636y);\r\n }\r\n mapProjection = c;\r\n fPointArr[i2] = m2831a(mapProjection, (((double) i2) * d) + this.f1774r, m.f3635x, m.f3636y);\r\n this.f1770n[i2 * 3] = fPointArr[i2].f3637x;\r\n this.f1770n[(i2 * 3) + 1] = fPointArr[i2].f3638y;\r\n this.f1770n[(i2 * 3) + 2] = 0.0f;\r\n }\r\n this.f1771o = fPointArr.length;\r\n return;\r\n }\r\n FPoint[] fPointArr2 = new FPoint[3];\r\n this.f1770n = new float[(fPointArr2.length * 3)];\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1761e.latitude, this.f1761e.longitude, fPoint);\r\n fPointArr2[0] = fPoint;\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1762f.latitude, this.f1762f.longitude, fPoint);\r\n fPointArr2[1] = fPoint;\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1763g.latitude, this.f1763g.longitude, fPoint);\r\n fPointArr2[2] = fPoint;\r\n while (i < 3) {\r\n this.f1770n[i * 3] = fPointArr2[i].f3637x;\r\n this.f1770n[(i * 3) + 1] = fPointArr2[i].f3638y;\r\n this.f1770n[(i * 3) + 2] = 0.0f;\r\n i++;\r\n }\r\n this.f1771o = fPointArr2.length;\r\n } catch (Throwable th) {\r\n az.m3143a(th, \"ArcDelegateImp\", \"calMapFPoint\");\r\n th.printStackTrace();\r\n }\r\n }\r\n }", "public int[] a(int paramInt1, int paramInt2, int paramInt3, int paramInt4)\r\n/* 11: */ {\r\n/* 12:13 */ int i = paramInt1 - 1;\r\n/* 13:14 */ int j = paramInt2 - 1;\r\n/* 14:15 */ int k = paramInt3 + 2;\r\n/* 15:16 */ int m = paramInt4 + 2;\r\n/* 16:17 */ int[] arrayOfInt1 = this.a.a(i, j, k, m);\r\n/* 17: */ \r\n/* 18:19 */ int[] arrayOfInt2 = boy.a(paramInt3 * paramInt4);\r\n/* 19:20 */ for (int n = 0; n < paramInt4; n++) {\r\n/* 20:21 */ for (int i1 = 0; i1 < paramInt3; i1++)\r\n/* 21: */ {\r\n/* 22:22 */ int i2 = c(arrayOfInt1[(i1 + 0 + (n + 1) * k)]);\r\n/* 23:23 */ int i3 = c(arrayOfInt1[(i1 + 2 + (n + 1) * k)]);\r\n/* 24:24 */ int i4 = c(arrayOfInt1[(i1 + 1 + (n + 0) * k)]);\r\n/* 25:25 */ int i5 = c(arrayOfInt1[(i1 + 1 + (n + 2) * k)]);\r\n/* 26:26 */ int i6 = c(arrayOfInt1[(i1 + 1 + (n + 1) * k)]);\r\n/* 27:27 */ if ((i6 != i2) || (i6 != i4) || (i6 != i3) || (i6 != i5)) {\r\n/* 28:28 */ arrayOfInt2[(i1 + n * paramInt3)] = arm.w.az;\r\n/* 29: */ } else {\r\n/* 30:30 */ arrayOfInt2[(i1 + n * paramInt3)] = -1;\r\n/* 31: */ }\r\n/* 32: */ }\r\n/* 33: */ }\r\n/* 34:35 */ return arrayOfInt2;\r\n/* 35: */ }", "@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 }", "@SuppressWarnings(\"unused\")\n\tpublic void execute(){\n\t\tdouble mtrFrontRight;\n\t\tdouble mtrFrontLeft;\n\t\tdouble mtrBackRight;\n\t\tdouble mtrBackLeft;\n\t\t\n\t\tdouble speed = 3.0; //The variable we are assigning\n\t\tdouble yawHeading = 0; //Obtained from Robot class\n\t\t\n\t\tdouble getCurrentSetPoint = 0.0; //This Will be obtained via a variable set in the turn to heading class as it is obtained. (possible issues)\n\t\tdouble actualEncoderSetpoint; //Represents the value the encoder is actually at.\n\t\t\n\t\tdouble zeroHeading; //This is a weird one. it is there because of the odd difference calculations issue of say being 5 off of zero and heading being 355;\n\t\t\n\t\t\n\t\t//Switch structure stuff\n\t\tint forward = 0;\n\t\tint left = 1;\n\t\tint right = 2;\n\t\tint state = forward;\n\t\t\n\t\t\n\t\tif(getCurrentSetPoint == 0) {\n\t\t\tstate = forward;\n\t\t} else if(getCurrentSetPoint == 90) {\n\t\t\tstate = right;\n\t\t} else if(getCurrentSetPoint == 270) {\n\t\t\tstate = left;\n\t\t}\n\t\t\n\t\t//where the weirdness of zero heading comes into play.\n\t\tif(yawHeading > 180){\n\t\t\tzeroHeading = 360 - yawHeading;\n\t\t\tzeroHeading = -(zeroHeading);\n\t\t} else {\n\t\t\tzeroHeading = yawHeading;\n\t\t}\n\t\t\n\t\t//Here comes the fun math.\n\t\t// oh yeah and brackets are fun just saying.\n\t\t//try not to get cancer.\n\t\t\n\t\tswitch (state) {\n\t\t\t\n\t\t\tcase 0 :\n\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\tmtrFrontRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrBackRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\tmtrFrontLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\tmtrBackLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\tcase 1 :\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\t\tmtrBackRight = -(speed - ((zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\t\tmtrBackLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\t\tmtrFrontRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\t\tmtrFrontLeft = speed - ((-zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\tcase 2 : \n\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\tmtrBackRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrBackLeft = speed - ((-zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\tmtrFrontRight = -(speed - ((zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrFrontLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}", "public interface ArmController {\n\n /**\n * Applies a rotational force to the arm base.\n *\n * @param force The rotational force to apply at the arm base. This is not currently supported.\n * @see ArmBase#setRotationalForce(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void applyRotationForce(double force);\n\n /**\n * Applies a contraction force to the dorsal muscle of segment(i).\n *\n * @param i The index of the segment being activated\n * @param force The contraction force to be applied\n * @see ArmSegment#setDorsalContraction(double)\n * @see Muscle#setContraction(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void contractDorsalMuscle(int i, double force);\n\n /**\n * Applies a contraction force to the transverse muscle of segment(i).\n *\n * @param i The index of the segment being activated.\n * @param force The contraction force to be applied.\n * @see ArmSegment#setTransverseContraction(double)\n * @see Muscle#setContraction(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void contractTransverseMuscle(int i, double force);\n\n /**\n * Applies a contraction force to the ventral muscle of segment(i).\n *\n * @param i The index of the segment being activated.\n * @param force The contraction force to be applied.\n * @see ArmSegment#setVentralContraction(double)\n * @see hyper.experiments.octopusArm.model.Muscle#setContraction(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void contractVentralMuscle(int i, double force);\n\n}", "public RK(int m) {\n\t\tthis.exponent = exponent;\n\t\tthis.hash = 0;\n\t\tthis.workingHash = 0;\n\t\tthis.deletion = 0;\n\t\tthis.querySize = m;\n\t\tthis.buffer = new int [m];\n\t\tfor (int j = 0; j<m; j++){\n\t\t\texponent = (31*exponent)%511;\n\t\t}\n\t\tthis.index = 0;\n\t\t\n\t}", "public void testStep() {\n\n DT_TractographyImage crossing = Images.getCrossing();\n\n FACT_FibreTracker tracker = new FACT_FibreTracker(crossing);\n\n Vector3D[] pds = crossing.getPDs(1,1,1);\n\n Vector3D step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, true);\n\n assertEquals(1.0, pds[0].dot(step.normalized()), 1E-8);\n\n assertEquals(Images.xVoxelDim / 2.0, step.mod(), 0.05);\n \n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, false);\n\n assertEquals(-1.0, pds[0].dot(step.normalized()), 1E-8);\n\n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 1, true);\n\n assertEquals(1.0, pds[1].dot(step.normalized()), 1E-8);\n\n\n for (int i = 0; i < 2; i++) {\n\n step = tracker.getNextStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), new Vector3D(pds[i].x + 0.01, pds[i].y + 0.02, pds[i].z + 0.03).normalized());\n\n assertEquals(1.0, pds[i].dot(step.normalized()), 1E-8);\n\n }\n\n \n }", "public static double[] Jordan(Matriks M) {\r\n int i, j, k = 0, c;\r\n int flag = 0;\r\n int n = M.BrsEff; \r\n\t\tdouble[][] a = new double[n][n+1];\r\n\t\tdouble[] x;\r\n \r\n for (i = 0; i < M.BrsEff; i++){\r\n for (j = 0; j < M.KolEff; j++){\r\n a[i][j] = M.Elmt[i][j];\r\n }\r\n }\r\n\r\n for (i = 0; i < n; i++){ \r\n if (a[i][i] == 0){ \r\n c = 1; \r\n while ((i + c) < n && a[i + c][i] == 0){ \r\n c++;\r\n } \r\n if ((i + c) == n){\r\n flag = 1; \r\n break; \r\n }\r\n for (j = i, k = 0; k <= n; k++){\r\n double temp =a[j][k]; \r\n a[j][k] = a[j+c][k]; \r\n a[j+c][k] = temp; \r\n }\r\n } \r\n \r\n for (j = 0; j < n; j++){ \r\n if (i != j){ \r\n double p = a[j][i] / a[i][i];\r\n for (k = 0; k <= n; k++){ \r\n a[j][k] = a[j][k] - (a[i][k]) * p;\r\n } \r\n } \r\n } \r\n }\r\n for (i = 0; i < M.BrsEff; i++){\r\n if ((a[i][i]!=0) && (a[i][i]!=1)){\r\n for (j = i; j < M.KolEff; j++){\r\n M.Elmt[i][j] = a[i][j] / a[i][i];\r\n }\r\n }\r\n }\r\n if (flag == 1){\r\n flag = 3;\r\n \t for (i = 0; i < n; i++) { \r\n \t double sum = 0; \r\n \t for (j = 0; j < n; j++){ \r\n \t sum = sum + M.Elmt[i][j]; \r\n \t }\r\n \t if (sum == M.Elmt[i][n]) { \r\n \t flag = 2; \r\n \t }\r\n \t }\r\n \t if (flag == 3){\r\n \t x = new double[n+3];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n \t else {\r\n \t x = new double[n+2];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n }\r\n else{\r\n x = new double[n];\r\n for (i = 0; i < n; i++){\r\n x[i] = a[i][M.KolEff-1] / a[i][i];\r\n }\r\n }\r\n return x;\r\n }", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "private math_vector3d TwoPointGetCenterArcPoint(math_vector3d start, math_vector3d end)\n {\n\n\n ObjectPoint center2d = new ObjectPoint((start.X() + end.X()) / 2.0,(start.Y() + end.Y()) / 2.0);\n ObjectPoint orgin2d = new ObjectPoint(this.theOrigin.X(),this.theOrigin.Y());\n\n\n MathVector2D orginTocenter = new MathVector2D(orgin2d, center2d);\n\n orginTocenter = orginTocenter.GetUnit();\n orginTocenter = orginTocenter.multiply(this.theRadius);\n orgin2d.AddVector(orginTocenter);\n\n math_vector3d center = new math_vector3d(orgin2d.x,orgin2d.y,0);\n return center;\n }", "public void testXAxisRotation() {\n u = 1;\n theta = pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, 1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, Math.sqrt(2)/2, Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -Math.sqrt(2)/2, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n u = -1;\n theta = 3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -Math.sqrt(2)/2, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "private void setCofR() {\n\t\t\n Vector3f pos_vec = new Vector3f();\n Point3f pos = new Point3f();\n Vector3f dir = new Vector3f();\n\t\tMatrix4f view_mtx = new Matrix4f();\n\t\tMatrix4f nav_mtx = new Matrix4f();\n Point3f cor = new Point3f();\n\t\t\n\t\tnavigationTransform.getTransform(nav_mtx);\n\t\t\n\t\tdata.viewpointTransform.getTransform(view_mtx);\n\t\tview_mtx.get(pos_vec);\n\t\t\n\t\t// the eye point\n\t\tpos.set(pos_vec);\n\t\t\n\t\t// the eye direction\n\t\tdir.x = view_mtx.m02;\n\t\tdir.y = view_mtx.m12;\n\t\tdir.z = view_mtx.m22;\n\t\tdir.negate();\n\t\tdir.normalize();\n\t\t\n\t\t// transform into world space\n\t\tnav_mtx.transform(pos);\n\t\tnav_mtx.transform(dir);\n\t\t\n\t\tArrayList pickResults = new ArrayList();\n\t\tPickRequest pickRequest = new PickRequest();\n\t\tpickRequest.pickGeometryType = PickRequest.PICK_RAY;\n\t\tpickRequest.pickSortType = PickRequest.SORT_ORDERED;\n\t\tpickRequest.pickType = PickRequest.FIND_GENERAL;\n\t\tpickRequest.useGeometry = false;\n\t\tpickRequest.foundPaths = pickResults;\n\t\t\n\t\t// initialize the pick request\n\t\tpickRequest.origin[0] = pos.x;\n\t\tpickRequest.origin[1] = pos.y;\n\t\tpickRequest.origin[2] = pos.z;\n\t\t\n\t\tpickRequest.destination[0] = dir.x;\n\t\tpickRequest.destination[1] = dir.y;\n\t\tpickRequest.destination[2] = dir.z;\n\t\t\n\t\trootGroup.pickSingle(pickRequest);\n\t\t\n\t\tif (pickRequest.pickCount > 0) {\n\t\t\t\n \tPoint3f intersectPoint = new Point3f();\n \tVector3f intersectVector = new Vector3f();\n\t\t\n\t\t\tfloat min_distance = Float.MAX_VALUE;\n\t\t\t// sort through the bounds intersections\n\t\t\tint num_pick = pickResults.size();\n\t\t\tfor (int i = 0; i < num_pick; i++) {\n\t\t\t\t\n\t\t\t\tSceneGraphPath sgp = (SceneGraphPath)pickResults.get(i);\n\t\t\t\tsgp.getTransform(view_mtx);\n\t\t\t\t\n\t\t\t\tShape3D shape = (Shape3D)sgp.getTerminalNode();\n\t\t\t\tVertexGeometry geom = (VertexGeometry)shape.getGeometry();\n\t\t\t\t\n\t\t\t\t//determine if there was an actual geometry intersection\n\t\t\t\tboolean intersect = iutils.rayUnknownGeometry(\n\t\t\t\t\tpos,\n\t\t\t\t\tdir,\n\t\t\t\t\t0,\n\t\t\t\t\tgeom,\n\t\t\t\t\tview_mtx,\n\t\t\t\t\tintersectPoint,\n\t\t\t\t\tfalse);\n\t\t\t\t\n\t\t\t\tif (intersect) {\n\t\t\t\t\tintersectVector.set(\n\t\t\t\t\t\tintersectPoint.x - pos.x,\n\t\t\t\t\t\tintersectPoint.y - pos.y,\n\t\t\t\t\t\tintersectPoint.z - pos.z);\n\n\t\t\t\t\tfloat distance = intersectVector.length();\n\t\t\t\t\tif (distance < min_distance) {\n\t\t\t\t\t\tmin_distance = distance;\n\t\t\t\t\t\tcor.set(intersectPoint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\tnav_mtx.invert();\n\t\t\tnav_mtx.transform(cor);\n\t\t}\n\t\tcenterOfRotation.set(cor);\n\t}", "public static double lineDelineation() \n {\n int nTries = 0; //the number of tries (landing both inside and outside the circle)\n int inCircle = 0; //the number of points that landed inside the circle\n boolean lineBool = false; //flipped every time a point lands on the circumference\n \n double x, y; //the x and y coordinates (random) of the point chosen\n\n for (int i = 0; i < ITERATIONS; i++) \n {\n // (2*Math.random()-1) returns a random number from -1 to 1\n \n x = 2 * Math.random() - 1; \n y = 2 * Math.random() - 1;\n \n // if the point is clearly within the circle, increment the inCircle counts\n if (x * x + y * y < 1) \n {\n inCircle++;\n }\n \n /*\n * If the point is on the circumference of the circle, check the line\n * boolean value. If the line boolean value is set to true, increment\n * the inCircle count and set the boolean value to false. If the line\n * boolean value is set to false, do not increment the inCircle count, but\n * flip the boolean for the next point that lands on the circumference.\n */\n else if (x * x + y * y == 1) \n {\n if(lineBool) \n {\n inCircle++;\n }\n lineBool = !lineBool;\n }\n \n nTries++;\n }\n\n /*\n * Prints the output if DEBUG is set to true. The output consists of two lines:\n * an estimate of pi to 30 decimal places using th line delineation method \n * as well as an error percentage from the real value (Math.PI).\n */\n if(DEBUG) \n {\n System.out.printf(\"[yes line boolean] pi = %.30f\\n\", 4. * (double) inCircle / (double) nTries);\n System.out.printf(\"[yes line boolean] Error = %.30f\\n\", (((4. * (double) inCircle / (double) nTries) - Math.PI)/Math.PI));\n }\n \n //returns the estimated value of pi\n return 4. * (double) inCircle / (double) nTries;\n }", "public abstract float getMomentOfInertia();", "void lineTestPattern2()\n\t{\n\t float theta,d_theta,d_petal,petal,radius,p;\n\t int cx,cy;\n\t int i;\n\t int n_steps =( Nsteps == 18 )?64:4*Nsteps;\n\t Point2D v0 = new Point2D(),v1 = new Point2D();\n\n\t d_theta = (float)(2.0*Math.PI / n_steps);\n\t d_petal = (float)(12.0*Math.PI / n_steps);\n\n\t cx = buff.getWidth()/2;\n\t cy = buff.getHeight()/2;\n\n\t radius = (float) (0.75 * ((cx < cy) ? cx : cy));\n\t p = (float) (radius*0.25);\n\n\t /* draw the outer petals first */\n\n\t v0.x = cx;\n\t v0.y = (int)Math.floor(0.5 + radius + p) + cy;\n\t v0.c.r = 1;\n\t v0.c.g = (float) (128+Math.sin(2*Math.PI)*127.0)/255.0f;\n\t v0.c.b = (float) (128+Math.cos(2*Math.PI)*127.0)/255.0f;\n\n\t for(petal=d_petal,theta=d_theta,i=0;i<=n_steps;++i,theta+=d_theta,petal+=d_petal)\n\t {\n\t v1.x = (int)Math.floor(0.5 + radius*Math.sin(theta) + p*Math.sin(petal)) + cx;\n\t v1.y = (int)Math.floor(0.5 + radius*Math.cos(theta) + p*Math.cos(petal)) + cy;\n\n\t v1.c.r = 1;\n\t v1.c.g = (float) ((128+Math.sin(theta*5)*127.0)/255.0f);\n\t v1.c.b = (float) ((128+Math.cos(theta*5)*127.0)/255.0f);\n\t SketchBase.drawLine(buff,v0,v1);\n\n\t v0.x = v1.x;\n\t v0.y = v1.y;\n\t v0.c = v1.c;\n\t }\n\n\t /* draw circle at center */\n\t radius *= 0.5;\n\t v0.x = cx;\n\t v0.y = (int)Math.floor(0.5 + radius) + cy;\n\n\t /* color = orange */\n\t v1.c.r = v0.c.r = 1;\n\t v1.c.g = v0.c.g = 97.0f/255.0f;\n\t v1.c.b = v0.c.b = 0; \n\n\t for(theta=d_theta,i=0;i<=n_steps;++i,theta+=d_theta)\n\t {\n\t v1.x = (int)Math.floor(0.5 + radius*Math.sin(theta)) + cx;\n\t v1.y = (int)Math.floor(0.5 + radius*Math.cos(theta)) + cy;\n\n\t SketchBase.drawLine(buff,v0,v1);\n\n\t v0.x = v1.x;\n\t v0.y = v1.y;\n\t }\n\t}", "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 }", "private void detectParkingSlot()\r\n\t{\t\t\r\n\t\tPoint PosS = new Point(0,0);\r\n\t\tPoint PosE = new Point(0,0);\r\n\t\t\r\n\t\tdouble sum_F = 0;\r\n\t\tdouble sum_B = 0;\r\n\t\t\r\n\t\tdouble distance_F = 0;\r\n\t\tdouble distance_B = 0;\r\n\t\t\r\n\t\tint SlotID = Pk_counter;\r\n\t\tINavigation.ParkingSlot.ParkingSlotStatus SlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\r\n\t\tshort axe = getHeadingAxe();\r\n\t\t\r\n\t\tfor (int i = 1; i <= 4; i++)\r\n\t\t{\r\n\t\t\tPk_DIST_FS[i] = Pk_DIST_FS[i-1];\r\n\t\t\tsum_F = Pk_DIST_FS[i] + sum_F;\r\n\t\t\t\r\n\t\t\tPk_DIST_BS[i] = Pk_DIST_BS[i-1];\r\n\t\t\tsum_B = Pk_DIST_BS[i] + sum_B;\r\n\t\t}\r\n\t\t\r\n\t\tPk_DIST_FS[0] = frontSensorDistance;\r\n\t\t//distance_F = (sum_F + Pk_DIST_FS[0])/5;\r\n\t\tdistance_F = frontSensorDistance;\r\n\t\t\r\n\t\tPk_DIST_BS[0] = backSideSensorDistance;\r\n\t\t//distance_B = (sum_B + Pk_DIST_BS[0])/5;\r\n\t\tdistance_B = backSideSensorDistance;\r\n\t\t\r\n\t\t//LCD.drawString(\"Dist_F: \" + (distance_F), 0, 6);\r\n\t\t//LCD.drawString(\"Dist_B: \" + (distance_B), 0, 7);\r\n\t\t\r\n\t\t// Saving the begin point of the PS\r\n\t\tif ((distance_F <= TRSH_SG) && (Pk_burstFS == 0))\r\n\t\t{\r\n\t\t\tPk_PosF1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 1;\r\n\t\t\tPk_burstFE = 0;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B <= TRSH_SG) && (Pk_burstRS == 0))\r\n\t\t{\r\n\t\t\tPk_PosR1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 1;\r\n\t\t\tPk_burstRE = 0;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// Saving the end point of the PS\r\n\t\tif ((distance_F >= TRSH_SG) && (Pk_burstFE == 0))\r\n\t\t{\r\n\t\t\tPk_PosF2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 0;\r\n\t\t\tPk_burstFE = 1;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B >= TRSH_SG) && (Pk_burstRE == 0))\r\n\t\t{\r\n\t\t\tPk_PosR2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 0;\r\n\t\t\t//burstRE = 1;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\r\n\t\tif (Po_RoundF == 0)\t\t\t// Saving new parking slots\r\n\t\t{\t\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_counter < 10))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_counter] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\tPk_counter ++;\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t\t\r\n\t\t\t\tSound.beepSequence();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\t\t\t\t\t// Updating the old slots\r\n\t\t{\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_update <= Pk_counter))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_update] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\t\r\n\t\t\t\tif (Pk_update < Pk_counter)\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update ++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn; // data are saved in the shared variable\r\n\t}", "protected void execute() {\n \t\n \tdouble rightJoystickXAxis, leftJoystickYAxis, leftMotorOutput, rightMotorOutput;\n \t\n \trightJoystickXAxis = JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.RIGHT_JOYSTICK_X),\n \t\t\t0.0, 0.0, 1.0, 1.0);\n \tif(Robot.driveTrain.isRightSideOutputInverted()) {\n \t\tleftJoystickYAxis = -JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.LEFT_JOYSTICK_Y),\n \t\t\t0.0, 0.0, 1.0, -1.0);\n \t}\n \telse\n \t{\n \t\tleftJoystickYAxis = JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.LEFT_JOYSTICK_Y),\n \t\t\t0.0, 0.0, 1.0, -1.0);\n \t}\n \t\n \t\n \tif ( rightJoystickXAxis == 0.0 && leftJoystickYAxis != 0.0 )\t//straight forward or reverse with the x axis in deadband\n \t{\n \t\tleftMotorOutput = leftJoystickYAxis;\n \t\trightMotorOutput = leftJoystickYAxis;\n \t}\n \t\n \telse if ( rightJoystickXAxis > 0.0 && leftJoystickYAxis != 0.0 )\t//quadrant I or IV\n \t{\n \t\tleftMotorOutput = leftJoystickYAxis;\n \t\trightMotorOutput = leftJoystickYAxis - rightJoystickXAxis;\n \t}\n \t\n \telse if ( rightJoystickXAxis < 0.0 && leftJoystickYAxis != 0.0 )\t//quadrant II or III\n \t{\n \t\trightMotorOutput = leftJoystickYAxis;\n \t\tleftMotorOutput = leftJoystickYAxis + rightJoystickXAxis;\n \t}\n \t\n \telse if ( leftJoystickYAxis == 0.0 && rightJoystickXAxis != 0.0 )\t//rotate left or right with the y axis in deadband\n \t{\n \t\tleftMotorOutput = rightJoystickXAxis;\n \t\trightMotorOutput = -rightJoystickXAxis;\n \t}\n \t\n \telse\t//x axis in deadband and y axis in deadband\n \t{\n \t\tleftMotorOutput = 0.0;\n \t\trightMotorOutput = 0.0;\n \t}\n \t\n \tbrakeFactor = JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.LEFT_TRIGGER),\n \t\t\t0.0, 0.0, 1.0, 0.8);\n \t\n \tRobot.driveTrain.updateDriveSpeeds(leftMotorOutput * (1-brakeFactor), rightMotorOutput * (1-brakeFactor));\n \t\n }", "public static List<AuxRungeKuttaResult> solveDiferentialByRK2(String expression, double x0, double y0, double xf, double h) throws Exception {\n List<AuxRungeKuttaResult> resList = new ArrayList<>();\n //ExpressionEvaluator evaluator = new ExpressionEvaluator(expression);\n resList.add(new AuxRungeKuttaResult(x0, y0, h, 0));\n int iterations = 0;\n double xn = x0;\n double yn = y0;\n while (xn < xf) {\n //formulas de runge-kutta\n double k1 = h * ExpressionEvaluator.evaluateExpression(expression, xn, yn);\n double k2 = h * ExpressionEvaluator.evaluateExpression(expression, xn + h, yn + k1);\n double yn1 = yn + ((k1 + k2) / 2);\n double xn1 = xn + h;\n iterations++;\n // double error=(yn-rk2(expression, x0, y0, xf, 2*h))/3;\n resList.add(new AuxRungeKuttaResult(xn1, yn1, h, iterations));\n xn = xn1;//se actualiza el valor inicial para la siguiente iteracion\n yn = yn1;\n }\n return resList;\n }", "public void rotateStep(GearedObject other){}", "public int mo4452e() {\n /*\n r7 = this;\n int r0 = r7.f2518c\n r7.f2519d = r0\n r0 = 0\n r1 = 0\n r2 = 0\n L_0x0007:\n int r3 = r7.f2519d\n if (r3 <= 0) goto L_0x003b\n byte r3 = r7.mo4449a()\n r4 = -1\n if (r3 == 0) goto L_0x0034\n r5 = 1\n if (r3 == r5) goto L_0x002e\n r6 = 2\n if (r3 == r6) goto L_0x002e\n r6 = 9\n if (r3 == r6) goto L_0x0007\n switch(r3) {\n case 14: goto L_0x0028;\n case 15: goto L_0x0028;\n case 16: goto L_0x0025;\n case 17: goto L_0x0025;\n case 18: goto L_0x0022;\n default: goto L_0x001f;\n }\n L_0x001f:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0022:\n int r1 = r1 + 1\n goto L_0x0007\n L_0x0025:\n if (r2 != r1) goto L_0x002b\n return r5\n L_0x0028:\n if (r2 != r1) goto L_0x002b\n return r4\n L_0x002b:\n int r1 = r1 + -1\n goto L_0x0007\n L_0x002e:\n if (r1 != 0) goto L_0x0031\n return r5\n L_0x0031:\n if (r2 != 0) goto L_0x0007\n goto L_0x0039\n L_0x0034:\n if (r1 != 0) goto L_0x0037\n return r4\n L_0x0037:\n if (r2 != 0) goto L_0x0007\n L_0x0039:\n r2 = r1\n goto L_0x0007\n L_0x003b:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.core.text.BidiFormatter.C0510a.mo4452e():int\");\n }", "public int mo9785x() {\n /*\n r10 = this;\n long r0 = r10.f9091i\n long r2 = r10.f9090h\n int r2 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1))\n if (r2 != 0) goto L_0x000a\n goto L_0x0085\n L_0x000a:\n r2 = 1\n long r4 = r0 + r2\n byte r0 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r0)\n if (r0 < 0) goto L_0x0017\n r10.f9091i = r4\n return r0\n L_0x0017:\n long r6 = r10.f9090h\n long r6 = r6 - r4\n r8 = 9\n int r1 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1))\n if (r1 >= 0) goto L_0x0021\n goto L_0x0085\n L_0x0021:\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n int r1 = r1 << 7\n r0 = r0 ^ r1\n if (r0 >= 0) goto L_0x002f\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x008b\n L_0x002f:\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x003e\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x003c:\n r6 = r4\n goto L_0x008b\n L_0x003e:\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n int r1 = r1 << 21\n r0 = r0 ^ r1\n if (r0 >= 0) goto L_0x004e\n r1 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r1\n goto L_0x008b\n L_0x004e:\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n int r6 = r1 << 28\n r0 = r0 ^ r6\n r6 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r6\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n L_0x0085:\n long r0 = r10.mo9787z()\n int r0 = (int) r0\n return r0\n L_0x008b:\n r10.f9091i = r6\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3661d.mo9785x():int\");\n }", "private void initialize()\n {\n // Initialize any variables which are time-independent when\n // calculating the ECI coordinates of the satellite.\n m_satInc = orbit.Inclination();\n m_satEcc = orbit.Eccentricity();\n\n m_cosio = Math.cos(m_satInc);\n m_theta2 = m_cosio * m_cosio;\n m_x3thm1 = 3.0 * m_theta2 - 1.0;\n m_eosq = m_satEcc * m_satEcc;\n m_betao2 = 1.0 - m_eosq;\n m_betao = Math.sqrt(m_betao2);\n\n // The \"recovered\" semimajor axis and mean motion.\n m_aodp = orbit.SemiMajor();\n m_xnodp = orbit.MeanMotion();\n\n // For perigee below 156 km, the values of Globals.S and Globals.QOMS2T are altered.\n m_perigee = Globals.Xkmper * (m_aodp * (1.0 - m_satEcc) - Globals.Ae);\n\n m_s4 = Globals.S;\n m_qoms24 = Globals.Qoms2t;\n\n if (m_perigee < 156.0)\n {\n m_s4 = m_perigee - 78.0;\n\n if (m_perigee <= 98.0)\n {\n m_s4 = 20.0;\n }\n\n m_qoms24 = Math.pow((120.0 - m_s4) * Globals.Ae / Globals.Xkmper, 4.0);\n m_s4 = m_s4 / Globals.Xkmper + Globals.Ae;\n }\n\n double pinvsq = 1.0 / (m_aodp * m_aodp * m_betao2 * m_betao2);\n\n m_tsi = 1.0 / (m_aodp - m_s4);\n m_eta = m_aodp * m_satEcc * m_tsi;\n m_etasq = m_eta * m_eta;\n m_eeta = m_satEcc * m_eta;\n\n double psisq = Math.abs(1.0 - m_etasq);\n\n m_coef = m_qoms24 * Math.pow(m_tsi,4.0);\n m_coef1 = m_coef / Math.pow(psisq,3.5);\n\n double c2 = m_coef1 * m_xnodp *\n (m_aodp * (1.0 + 1.5 * m_etasq + m_eeta * (4.0 + m_etasq)) +\n 0.75 * Globals.Ck2 * m_tsi / psisq * m_x3thm1 *\n (8.0 + 3.0 * m_etasq * (8.0 + m_etasq)));\n\n m_c1 = orbit.BStar() * c2;\n m_sinio = Math.sin(m_satInc);\n\n double a3ovk2 = -Globals.Xj3 / Globals.Ck2 * Math.pow(Globals.Ae,3.0);\n\n m_c3 = m_coef * m_tsi * a3ovk2 * m_xnodp * Globals.Ae * m_sinio / m_satEcc;\n m_x1mth2 = 1.0 - m_theta2;\n m_c4 = 2.0 * m_xnodp * m_coef1 * m_aodp * m_betao2 *\n (m_eta * (2.0 + 0.5 * m_etasq) +\n m_satEcc * (0.5 + 2.0 * m_etasq) -\n 2.0 * Globals.Ck2 * m_tsi / (m_aodp * psisq) *\n (-3.0 * m_x3thm1 * (1.0 - 2.0 * m_eeta + m_etasq * (1.5 - 0.5 * m_eeta)) +\n 0.75 * m_x1mth2 *\n (2.0 * m_etasq - m_eeta * (1.0 + m_etasq)) *\n Math.cos(2.0 * orbit.ArgPerigee())));\n\n double theta4 = m_theta2 * m_theta2;\n double temp1 = 3.0 * Globals.Ck2 * pinvsq * m_xnodp;\n double temp2 = temp1 * Globals.Ck2 * pinvsq;\n double temp3 = 1.25 * Globals.Ck4 * pinvsq * pinvsq * m_xnodp;\n\n m_xmdot = m_xnodp + 0.5 * temp1 * m_betao * m_x3thm1 +\n 0.0625 * temp2 * m_betao *\n (13.0 - 78.0 * m_theta2 + 137.0 * theta4);\n\n double x1m5th = 1.0 - 5.0 * m_theta2;\n\n m_omgdot = -0.5 * temp1 * x1m5th + 0.0625 * temp2 *\n (7.0 - 114.0 * m_theta2 + 395.0 * theta4) +\n temp3 * (3.0 - 36.0 * m_theta2 + 49.0 * theta4);\n\n double xhdot1 = -temp1 * m_cosio;\n\n m_xnodot = xhdot1 + (0.5 * temp2 * (4.0 - 19.0 * m_theta2) +\n 2.0 * temp3 * (3.0 - 7.0 * m_theta2)) * m_cosio;\n m_xnodcf = 3.5 * m_betao2 * xhdot1 * m_c1;\n m_t2cof = 1.5 * m_c1;\n m_xlcof = 0.125 * a3ovk2 * m_sinio *\n (3.0 + 5.0 * m_cosio) / (1.0 + m_cosio);\n m_aycof = 0.25 * a3ovk2 * m_sinio;\n m_x7thm1 = 7.0 * m_theta2 - 1.0;\n }", "public static void twoStarAlign() {\n if (star1DcEq != null && star2DcEq != null) {\r\n star3DcEq = ccm.starVectorProduct(star1DcEq, star2DcEq);\r\n }\r\n if (star1DcTel != null && star2DcTel != null) {\r\n star3DcTel = ccm.starVectorProduct(star1DcTel, star2DcTel);\r\n }\r\n if (star3DcTel == null || star3DcEq == null) {\r\n //GuiUpdater.updateLog(\"Error: Null Matrixes found. Check your input!!\", Color.RED);\r\n \tLog.e(TAG, \"Error: Null Matrix calculation for 3rd star. Possible null matrixes\");\r\n }\r\n\r\n //Construct two 3X3 matrix for eq direction cosines \r\n //and telescope direction cosines\r\n double star1DcEqD[] = star1DcEq.getColumnPackedCopy();\r\n double star2DcEqD[] = star2DcEq.getColumnPackedCopy();\r\n double star3DcEqD[] = star3DcEq.getColumnPackedCopy();\r\n double starsDcEqD[][] = {\r\n {star1DcEqD[0], star2DcEqD[0], star3DcEqD[0]},\r\n {star1DcEqD[1], star2DcEqD[1], star3DcEqD[1]},\r\n {star1DcEqD[2], star2DcEqD[2], star3DcEqD[2]}};\r\n Matrix eqDirectionCosines = new Matrix(starsDcEqD);\r\n\r\n double star1DcTelD[] = star1DcTel.getColumnPackedCopy();\r\n double star2DcTelD[] = star2DcTel.getColumnPackedCopy();\r\n double star3DcTelD[] = star3DcTel.getColumnPackedCopy();\r\n double starsDcTelD[][] = {\r\n {star1DcTelD[0], star2DcTelD[0], star3DcTelD[0]},\r\n {star1DcTelD[1], star2DcTelD[1], star3DcTelD[1]},\r\n {star1DcTelD[2], star2DcTelD[2], star3DcTelD[2]}};\r\n Matrix telDirectionCosines = new Matrix(starsDcTelD);\r\n\r\n T = telDirectionCosines.times(eqDirectionCosines.inverse());\r\n //GuiUpdater.updateLog(\"Two Star Alignment completed successfuly!\");\r\n Log.i(TAG, \"++ twoStarAlign() ++ \\nT=\");\r\n T.print(5, 2);\r\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 }", "public void update(){\r\n //Move and rotate the gate at the specified speeds\r\n this.angle += this.rotationSpeed; \r\n this.centerX += this.xSpeed;\r\n this.centerY += this.ySpeed;\r\n \r\n //Calculate the new endpoints based on the updated values\r\n p1.x = centerX + (int)((length / 2)*(Math.cos(angle)));\r\n p1.y = centerY + (int)((length / 2)*(Math.sin(angle)));\r\n p2.x = centerX - (int)((length / 2)*(Math.cos(angle)));\r\n p2.y = centerY - (int)((length / 2)*(Math.sin(angle))); \r\n \r\n //Check if either end is out of bounds\r\n checkOutOfBounds(p1);\r\n checkOutOfBounds(p2); \r\n }", "public void drivePID(){\n double error = targetPosition - rightEncoder.getDistance();\n double dt = Timer.getFPGATimestamp() - lastTimestamp;\n driveKF = Math.copySign(driveKF, error);\n\n if(Math.abs(error)<iZone){\n errorSum = errorSum + error * dt;\n }else{\n errorSum = 0;\n }\n\n double errorRate = (error - lastError)/dt;\n\n Double outputSpeed = driveKF + (driveKP * error) + (driveKI * errorSum) + (driveKD * errorRate);\n teleopDrive(outputSpeed, 0);\n\n SmartDashboard.putNumber(\"Output\", outputSpeed);\n\n lastTimestamp = Timer.getFPGATimestamp();\n lastError = error;\n \n \n }", "public void breakPointEvaluation(int j, int t) {\n \n\tint dcIndex=workloadGenerator.objectListRegion[j];\n\tfinalCostCalculation fc= new finalCostCalculation();\n\tint a_c=workloadGenerator.objectListWriteRate[j][t]*optimizationCost.readToWrite+\n\t\t\t(int)((objectDatacenterSpecification.getDatacenterListAll().get(dcIndex).getCbandwidthCost()*\n\t\t\t\t\tfinalCostCalculation.newBucketSize[j][t])); \n\tint l_c=(workloadGenerator.objectListWriteRate[j][t]*optimizationCost.readToWrite)*fc.latencyWithinDatacenter(dcIndex, 0, 0);//0:Cool tier, 0:read\n\t\n\tint a_h=workloadGenerator.objectListWriteRate[j][t]*(int)(objectDatacenterSpecification.getDatacenterListAll().get(dcIndex).getHStorageCost()); \n\tint s_h=(int)(objectDatacenterSpecification.getDatacenterListAll().get(dcIndex).getHStorageCost()*finalCostCalculation.newBucketSize[j][t]);\n\t \n\t breakPoint=(int)Math.ceil((double)(a_c+l_c-a_h)/(double)(s_h)) ;\n\t\n\t //System.out.println(\"breakPoint for DoubleCopy===>\"+breakPoint);\n\t \n }", "public int mo9774x() {\n /*\n r5 = this;\n int r0 = r5.f9082i\n int r1 = r5.f9080g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9082i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9776z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9082i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9774x():int\");\n }", "protected abstract void stepImpl( long stepMicros );", "private Complex kx_up(){\r\n\t\tdouble A = Math.sqrt(neff*neff - n_up * n_up) ;\r\n\t\treturn new Complex(0, -1*A*k0) ;\r\n\t}", "public void PIDDriveForward(double speed, double angle, int distance) { // Added: 1/18/19\n\n // This is an attempt to use PID only, no encoders\n\n\n /* Things to pass the Method\n *\n * 1. speed\n * 2. Angle\n * 3. distance\n *\n * Example: PIDDriveForward(.50,90, 24); // Drive robot forward in a straight line for 4\" @ 50% Power\n */\n\n // Setup Straight Line Driving\n\n\n pidDrive.setSetpoint(0);\n pidDrive.setOutputRange(0, speed);\n pidDrive.setInputRange(-angle, angle);\n pidDrive.enable();\n\n\n // Use PID with imu input to drive in a straight line.\n double correction = pidDrive.performPID(getAngle2());\n\n\n //Initialize Mecanum Wheel DC Motor Behavior\n setZeroPowerBrakes(); // Set DC Motor Brake Behavior\n\n\n // Reset Encoders: Alternate way: DriveRightFrontEncoder.reset();\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n\n\n /* Setup Default Robot Position... setTargetPosition= null\n * This section was added after our initial attempts to re-use these\n * PID controls failed. Error message on the DS phone indicated\n * we needed to setTargetPostion before running to position\n *\n * I am adding this is a test, to see if we initialize the defauly\n * position to 0 (robot against the wall), knowing that we will re-calculate the positon\n * later in this method.\n *\n * For competition, we will need to be more accurate, most likely.\n */\n\n robot2.DriveRightFront.setTargetPosition(0);\n robot2.DriveRightRear.setTargetPosition(0);\n robot2.DriveLeftFront.setTargetPosition(0);\n robot2.DriveLeftRear.setTargetPosition(0);\n\n telemetry.addLine(\"Just setTarget Position\");\n telemetry.update();\n\n\n\n // Set RUN_TO_POSITION\n robot2.DriveRightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n telemetry.addLine(\"Set RUN_TO_POS\");\n telemetry.update();\n sleep(500);\n\n // Stop Motors and set Motor Power to 0\n robot2.DriveRightFront.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n\n double InchesMoving = (distance * COUNTS_PER_INCH);\n\n\n // Set Target\n robot2.DriveRightFront.setTargetPosition((int) InchesMoving);\n robot2.DriveLeftFront.setTargetPosition((int) InchesMoving);\n robot2.DriveRightRear.setTargetPosition((int) InchesMoving);\n robot2.DriveLeftRear.setTargetPosition((int) InchesMoving);\n\n\n while (robot2.DriveRightFront.isBusy() && robot2.DriveRightRear.isBusy()\n && robot2.DriveLeftFront.isBusy() && robot2.DriveLeftRear.isBusy()) {\n\n\n //Set Motor Power - This engages the Motors and starts the robot movements\n robot2.DriveRightFront.setPower(speed + correction);\n robot2.DriveLeftFront.setPower(speed + correction );\n robot2.DriveRightRear.setPower(speed + correction);\n robot2.DriveLeftRear.setPower(speed + correction );\n } // This brace closes out the while loop\n\n //Reset Encoders\n robot2.DriveRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveRightRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot2.DriveLeftRear.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //PIDstopALL()\n robot2.DriveRightFront.setPower(0);\n robot2.DriveLeftFront.setPower(0);\n robot2.DriveRightRear.setPower(0);\n robot2.DriveLeftRear.setPower(0);\n\n }", "public void rotation(){\n\n double x=Double.parseDouble(rotationx.getText());\n double y=Double.parseDouble(rotationy.getText());\n double z=Double.parseDouble(rotationz.getText());\n if (checkbox.isSelected()){\n cls_zahnrad.rotieren(x,y,z);\n return;\n }\n Triangle[] dreiecke = t1.getFlaechen();\n x=2*Math.PI/360*x;\n y=2*Math.PI/360*y;\n z=2*Math.PI/360*z;\n double[] A,B,C;\n\n double pktx=0,pkty=0,pktz=0;\n\n if (radio12.isSelected()){\n pktx = Double.parseDouble(rotationpktx.getText());\n pkty = Double.parseDouble(rotationpkty.getText());\n pktz = Double.parseDouble(rotationpktz.getText());\n }\n\n for (Triangle i :dreiecke){\n for (int j=0; j<3;j++){\n double xtemp,ytemp,ztemp;\n xtemp=i.getTriangle()[j].getPoint()[0]-pktx;\n ytemp=i.getTriangle()[j].getPoint()[1]-pkty;\n ztemp=i.getTriangle()[j].getPoint()[2]-pktz;\n i.getTriangle()[j].setPoint(xtemp,ytemp,ztemp);\n }\n }\n\n for (Triangle t1 : dreiecke){\n A=t1.getTriangle()[0].getPoint();\n B=t1.getTriangle()[1].getPoint();\n C=t1.getTriangle()[2].getPoint();\n double[][]punkte={A,B,C};\n\n for (int i=0; i<punkte.length; i++){\n double temp0,temp1,temp2;\n\n //Rotation um Parallele der X-Achse durch das Rotationszentrum\n if (x!=0){\n temp1=punkte[i][1]*Math.cos(x)-punkte[i][2]*Math.sin(x);\n temp2=punkte[i][1]*Math.sin(x)+punkte[i][2]*Math.cos(x);\n punkte[i][1]=temp1;\n punkte[i][2]=temp2;\n }\n\n //Rotation um Parallele der Y-Achse durch das Rotationszentrum\n if (y!=0){\n temp0=punkte[i][0]*Math.cos(y)+punkte[i][2]*Math.sin(y);\n temp2=-punkte[i][0]*Math.sin(y)+punkte[i][2]*Math.cos(y);\n punkte[i][0]=temp0;\n punkte[i][2]=temp2;\n }\n\n //Rotation um Parallele der Z-Achse durch das Rotationszentrum\n if (z!=0){\n temp0=punkte[i][0]*Math.cos(z)-punkte[i][1]*Math.sin(z);\n temp1=punkte[i][0]*Math.sin(z)+punkte[i][1]*Math.cos(z);\n punkte[i][0]=temp0;\n punkte[i][1]=temp1;\n }\n }\n A=punkte[0];\n B=punkte[1];\n C=punkte[2];\n t1.getTriangle()[0].setPoint(A[0],A[1],A[2]);\n t1.getTriangle()[1].setPoint(B[0],B[1],B[2]);\n t1.getTriangle()[2].setPoint(C[0],C[1],C[2]);\n }\n for (Triangle i :dreiecke){\n for (int j=0; j<3;j++){\n double xtemp,ytemp,ztemp;\n xtemp=i.getTriangle()[j].getPoint()[0]+pktx;\n ytemp=i.getTriangle()[j].getPoint()[1]+pkty;\n ztemp=i.getTriangle()[j].getPoint()[2]+pktz;\n i.getTriangle()[j].setPoint(xtemp,ytemp,ztemp);\n }\n }\n redraw();\n /*\n System.out.println(\"A \"+Arrays.toString(t1.getTetraeder()[0].getPoint()));\n System.out.println(\"B \"+Arrays.toString(t1.getTetraeder()[1].getPoint()));\n System.out.println(\"C \"+Arrays.toString(t1.getTetraeder()[2].getPoint()));\n System.out.println(\"D \"+Arrays.toString(t1.getTetraeder()[3].getPoint()));\n System.out.println(Arrays.toString(Mittelpunkt));\n */\n }", "public PathDestination a(double var0, double var2, double var4) {\n/* 47 */ return new PathDestination(a(MathHelper.floor(var0), MathHelper.floor(var2 + 0.5D), MathHelper.floor(var4)));\n/* */ }", "static List<int[][]> solveKT() {\n\t List<int[][]> result = new ArrayList<>();\n\t int sol[][] = new int[8][8];\n\t /* Initialization of solution matrix */\n for (int x = 0; x < N; x++)\n for (int y = 0; y < N; y++)\n sol[x][y] = -1;\n\t int xMove[] = {2, 1, -1, -2, -2, -1, 1, 2};\n int yMove[] = {1, 2, 2, 1, -1, -2, -2, -1};\n\n // Since the Knight is initially at the first block\n sol[0][0] = 0;\n\t \n solveKTUtil(0, 0, 1, sol, xMove, yMove, result);\n return result;\n \n\n \n\n \n \n\n \n }", "public RMPoint convertedPointFromShape(RMPoint aPoint, RMShape aShape)\n{\n return convertPointFromShape(new RMPoint(aPoint), aShape);\n}" ]
[ "0.55298924", "0.5447081", "0.5442409", "0.53877395", "0.53726804", "0.52856994", "0.52612966", "0.5214296", "0.520789", "0.5185911", "0.5157791", "0.5135526", "0.5112768", "0.50768876", "0.50663674", "0.5062693", "0.50519836", "0.5023854", "0.5006446", "0.50051963", "0.49931946", "0.49910975", "0.49843636", "0.49560222", "0.49392945", "0.4937278", "0.49341828", "0.493343", "0.4929889", "0.4921416", "0.4916673", "0.49151242", "0.49118727", "0.49094546", "0.49080315", "0.49060893", "0.4904217", "0.4899454", "0.48962855", "0.488989", "0.48692513", "0.48580587", "0.48499665", "0.48492002", "0.48483023", "0.4839768", "0.4834603", "0.48341045", "0.4833112", "0.4830119", "0.48243555", "0.48198158", "0.48120862", "0.4809924", "0.48057276", "0.47989744", "0.47967976", "0.4794243", "0.47915038", "0.47871965", "0.47838545", "0.47789985", "0.4766704", "0.47651246", "0.47599006", "0.47587377", "0.4752588", "0.47488105", "0.47461188", "0.4735896", "0.4732612", "0.47300506", "0.47269776", "0.47225356", "0.4717093", "0.47119808", "0.4710475", "0.47067344", "0.47020057", "0.46999443", "0.4693484", "0.46892256", "0.46889326", "0.4681097", "0.4676852", "0.4669551", "0.46686757", "0.46672162", "0.46648982", "0.46643347", "0.46627063", "0.4661845", "0.4657955", "0.46578792", "0.46463913", "0.46454683", "0.4643852", "0.46428156", "0.46361816", "0.4632299" ]
0.5021439
18
TODO Autogenerated method stub
@Override public String getElectionId() { if (current == null) return null; return current.electionID; }
{ "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
cast a vote based on what I know (my ID) and where the message has traveled. This is not a pretty piece of code, nor is the problem as we cannot ensure consistent behavior.
private Management castVote(Management mgmt, boolean isNew) { if (!mgmt.hasElection()) return null; LeaderElection req = mgmt.getElection(); if (req.getExpires() <= System.currentTimeMillis()) { logger.info("Node " + this.nodeId + " says election expired - not voting"); return null; } // DANGER! If we return because this node ID is in the list, we have a // high chance an election will not converge as the maxHops determines // if the graph has been traversed! boolean allowCycles = true; if (!allowCycles) { List<RoutingPath> rtes = mgmt.getHeader().getPathList(); for (RoutingPath rp : rtes) { if (rp.getNodeId() == this.nodeId) { // logger.info("Node " + this.nodeId + // " already in the routing path - not voting"); return null; } } } // okay, the message is new (to me) so I want to determine if I should // nominate // myself LeaderElection.Builder elb = LeaderElection.newBuilder(); MgmtHeader.Builder mhb = MgmtHeader.newBuilder(); mhb.setTime(System.currentTimeMillis()); // reversing path. If I'm the farthest a message can travel, reverse the // sending if (elb.getHops() == 0) mhb.clearPath(); else mhb.addAllPath(mgmt.getHeader().getPathList()); mhb.setOriginator(mgmt.getHeader().getOriginator()); elb.setElectId(req.getElectId()); elb.setAction(ElectAction.NOMINATE); elb.setDesc(req.getDesc()); elb.setExpires(req.getExpires()); elb.setCandidateId(req.getCandidateId()); // my vote if (req.getCandidateId() == this.nodeId) { // if I am not in the list and the candidate is myself, I can // declare myself to be the leader. // // this is non-deterministic as it assumes the message has // reached all nodes in the network (because we know the // diameter or the number of nodes). // // can end up with a partitioned graph of leaders if hops < // diameter! notify(true, this.nodeId); elb.setAction(ElectAction.DECLAREWINNER); elb.setHops(mgmt.getHeader().getPathCount()); logger.info("Node " + this.nodeId + " is declaring itself the leader"); } else { if (req.getCandidateId() < this.nodeId) elb.setCandidateId(this.nodeId); if (req.getHops() == -1) elb.setHops(-1); else elb.setHops(req.getHops() - 1); if (elb.getHops() == 0) { // reverse travel of the message to ensure it gets back to // the originator elb.setHops(mgmt.getHeader().getPathCount()); // no clear winner, send back the candidate with the highest // known ID. So, if a candidate sees itself, it will // declare itself to be the winner (see above). } else { // forwarding the message on so, keep the history where the // message has been mhb.addAllPath(mgmt.getHeader().getPathList()); } } // add myself (may allow duplicate entries, if cycling is allowed) RoutingPath.Builder rpb = RoutingPath.newBuilder(); rpb.setNodeId(this.nodeId); rpb.setTime(System.currentTimeMillis()); mhb.addPath(rpb); Management.Builder mb = Management.newBuilder(); mb.setHeader(mhb.build()); mb.setElection(elb.build()); return mb.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void castVote(Peer candidate) {\n votedFor = candidate;\n }", "void handle(VoteMessage vote);", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tdoVote(getIntent().getStringExtra(\"aid\"), getIntent().getStringExtra(\"id\"));\n\t\t\t\t\t\n\t\t\t\t}", "public static void doVote() {\n }", "private void receiveVote() {\n\t\t//Se la postazione termina la connessione informiamo lo staff con un messaggio di errore\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \"+ ip.getHostAddress() + \" non ha inviato i pacchetti di voto.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Vengono recuperati i voti cifrati\n\t\tMessage request;\n\t\tWrittenBallot[] encryptedBallots;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"postazione \" + ip.getHostAddress());\n\t\t\tString[] required = {\"encryptedBallots\"};\n\t\t\tClass<?>[] types = {WrittenBallot[].class};\n\t\t\t\n\t\t\trequest.verifyMessage(Protocol.sendVoteToStation, required, types, \"postazione \" + ip.getHostAddress());\n\t\t\tencryptedBallots = request.getElement(\"encryptedBallots\");\n\t\t\t\n\t\t\t//I voti vengono memorizzati nel seggio in attesa dell'invio all'urna\n\t\t\tif(((Controller) controller).storeVoteLocally(encryptedBallots, ip))\n\t\t\t\tlink.write(Protocol.votesReceivedAck);\n\t\t\telse\n\t\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\tcontroller.printError(e);\n\t\t}\n\t}", "void votedOnPoll(String pollId);", "@Override\n public MessageWrapper[] onMsgReceive(MSGGameVote msg, Player sender) {\n Lobby lobby = playerLobbyMap.get(sender);\n lobby.getGameSession().addVote(msg.isAccepted(), msg.getOrient());\n\n if (lobby.getGameSession().allVoted()) {\n // all players voted, move onto next player\n Player prevPlayer = lobby.getGameSession().getCurrentTurn();\n lobby.getGameSession().nextTurn(false);\n\n Message msgNextTurn = new MSGNewTurn(\n prevPlayer,\n lobby.getGameSession().getCurrentTurn(),\n lobby.getGameSession().getScores().get(prevPlayer),\n false);\n\n // if board is full, end the game\n if (lobby.getGameSession().isBoardFull()) {\n Message msgEndGame = new MSGGameStatus(MSGGameStatus.GameStatus.ENDED, null);\n\n // TODO: Better structure protocol\n // send additional message to end game\n return MessageWrapper.prepWraps(\n new MessageWrapper(msgNextTurn, lobby.getPlayers()),\n new MessageWrapper(msgEndGame, lobby.getPlayers()));\n } else {\n return MessageWrapper.prepWraps(\n new MessageWrapper(msgNextTurn, lobby.getPlayers()));\n }\n }\n\n return null;\n }", "public Vote(int id, int v) {\n candidate_id = id;\n priority = v;\n }", "public Float getVote() {\n return vote;\n }", "TrackerVotes getTrackerVotes(final Integer id);", "private Vote convertToVote(String input){\n if(input.equalsIgnoreCase(\"YES\") || input.equalsIgnoreCase(\"Y\"))\n return Vote.COMMIT;\n\n if(input.equalsIgnoreCase(\"NO\") || input.equalsIgnoreCase(\"N\"))\n return Vote.ABORT;\n\n return null;\n }", "private void botVoting(){\n int stockPos;\n int myStockPos = getMostShares(playerList.lastIndexOf(player));\n Collections.sort(playerList);\n if(playerList.get(0) == player){ //if i am the leader\n stockPos = getMostShares(1); //get the second players info\n }else{\n stockPos = getMostShares(0); //else get the first players info\n }\n\n //if my most shares are the same as other players most shares, don't vote.\n if(game.getStockByIndex(stockPos) != game.getStockByIndex(myStockPos)){\n //offensive play against leader\n if(game.isCardPositive(game.getStockByIndex(stockPos))){\n game.getStockByIndex(stockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(stockPos).getName() );\n }else{\n game.getStockByIndex(stockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(stockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(stockPos).getName());\n }\n //defensive play, votes that will benefit me\n if(game.isCardPositive(game.getStockByIndex(myStockPos))){\n game.getStockByIndex(myStockPos).vote(1);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted YES for \" + game.getStockByIndex(myStockPos).getName());\n }else{\n game.getStockByIndex(myStockPos).vote(0);\n player.getVotedStocks().append(game.getStockByIndex(myStockPos).getName().charAt(0));\n player.deductVotesLeft();\n System.out.println(\"bot voted NO for \" + game.getStockByIndex(myStockPos).getName());\n }\n }\n }", "private void vote(Vote whichVoteButton, MenuItem item, PostData p) {\n if (!RedditLoginInformation.isLoggedIn()) {\n Toast.makeText(this, R.string.you_must_be_logged_in_to_vote, Toast.LENGTH_SHORT).show();\n return;\n }\n\n Intent intent = new Intent(Consts.BROADCAST_UPDATE_SCORE);\n intent.putExtra(Consts.EXTRA_PERMALINK, p.getPermalink());\n\n switch (whichVoteButton) {\n case DOWN:\n switch (p.getVote()) {\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_downvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() + 1);\n break;\n\n case NEUTRAL:\n case UP:\n RedditService.vote(this, p.getName(), Vote.DOWN);\n item.setIcon(R.drawable.ic_action_downvote_highlighted);\n p.setVote(Vote.DOWN);\n mUpvoteMenuItem.setIcon(R.drawable.ic_action_upvote);\n p.setScore(p.getScore() - 1);\n break;\n }\n break;\n\n case UP:\n switch (p.getVote()) {\n case NEUTRAL:\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.UP);\n item.setIcon(R.drawable.ic_action_upvote_highlighted);\n p.setVote(Vote.UP);\n p.setScore(p.getScore() + 1);\n mDownvoteMenuItem.setIcon(R.drawable.ic_action_downvote);\n break;\n\n case UP:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_upvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() - 1);\n break;\n }\n\n break;\n\n default:\n break;\n }\n\n // Broadcast the intent to update the score in the ImageDetailFragment\n intent.putExtra(Consts.EXTRA_SCORE, p.getScore());\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "@Override\n public String getDescription() {\n return \"Vote casting\";\n }", "protected SyncedLearnerTracker getVoteTracker(Map<Long, Vote> votes, Vote vote) {\n SyncedLearnerTracker voteSet = new SyncedLearnerTracker();\n voteSet.addQuorumVerifier(self.getQuorumVerifier());\n if (self.getLastSeenQuorumVerifier() != null\n && self.getLastSeenQuorumVerifier().getVersion() > self.getQuorumVerifier().getVersion()) {\n voteSet.addQuorumVerifier(self.getLastSeenQuorumVerifier());\n }\n\n /*\n * First make the views consistent. Sometimes peers will have different\n * zxids for a server depending on timing.\n */\n for (Map.Entry<Long, Vote> entry : votes.entrySet()) {\n if (vote.equals(entry.getValue())) {\n voteSet.addAck(entry.getKey());\n }\n }\n\n return voteSet;\n }", "int getVoteValue(UserId userId, QuestionId questionId);", "static void castVote(String groupAddress, int port, String vote) throws IOException {\n byte[] request = (\"153|\" + vote).getBytes();\n\n MulticastSocket socket = new MulticastSocket(port);\n socket.setBroadcast(true);\n socket.send(new DatagramPacket(request, request.length, InetAddress.getByName(groupAddress), port));\n socket.close();\n }", "Vote get(int id, int userId);", "public Integer getVotes();", "public void voteIdea(String username, Long ideaId, boolean vote) throws VotingException, DataAccessException {\n try {\n MyUser user = myUserFacade.getUser(username);\n Idea idea = this.find(ideaId);\n Boolean previousVote = user.getVotes().get(idea);\n if (previousVote == null) {\n // If the user never voted for this idea, then create a new Vote:\n user.addVote(idea, vote);\n if (vote) {\n idea.upvote();\n } else {\n idea.downvote();\n }\n } else {\n // The user had previously voted for this idea.\n // Case 1: trying to upvote twice the idea:\n if (previousVote && vote) {\n throw new VotingException((null), \"Cannot upvote twice the same post\");\n } // Case 2: trying to downvote twice the idea:\n else if (!previousVote && !vote) {\n throw new VotingException((null), \"Cannot downvote twice the same post\");\n } // Case 3: one is upvote and the other downvote. Vote is removed\n else {\n user.removeVote(idea);\n if (vote) {\n idea.setUpvotes(idea.getUpvotes() - 1);\n } else {\n idea.setDownvotes(idea.getDownvotes() - 1);\n }\n }\n }\n myUserFacade.edit(user);\n this.edit(idea);\n } catch (PersistenceException | EJBException pe) {\n throw new DataAccessException(pe, \"Error while voting post\");\n }\n }", "private void vote(Connection connection, Matcher matcher) {\n\n final EventBus bus = getEventBus();\n if (!matcher.matches()) {\n bus.publish(new ConnectionMessageCommandEvent(connection, \"Invalid command!\"));\n return;\n }\n\n long pollID = Long.parseLong(matcher.group(1));\n int optionID = Integer.parseInt(matcher.group(2));\n\n try {\n StrawpollAPI.vote(pollID, optionID);\n bus.publish(new ConnectionMessageCommandEvent(connection, System.lineSeparator() + \"You voted successfully\"));\n }\n catch (Exception e) {\n bus.publish(new ConnectionMessageCommandEvent(connection, System.lineSeparator() + \"Whoops, it looks like we did not find a poll with the given id or index\"));\n e.printStackTrace();\n }\n\n }", "public VoteModel mo66737c(Answer answer) {\n VoteModel voteModel = new VoteModel();\n voteModel.voteCount = answer.voteUpCount;\n boolean z = true;\n if (answer.relationship.voting != 1) {\n z = false;\n }\n voteModel.isVoted = z;\n return voteModel;\n }", "VoteTopic getVoteTopicById(String voteTopicEncodedId);", "@Override\n public List<VoteAnswer> findAllVotesTowardsUserId(int userId) {\n return template.query(\"SELECT * FROM \" + tableName + \" WHERE vote_recipient = ?\", rowMapper, userId);\n }", "public static void doVoteAndComment() {\n }", "private synchronized void delegateVoted(Vote voteType) {\n\t\tvotes.put(currentlyVoting, voteType);\n\t\tif (currentlyVoting.getStatus().hasVetoPower && voteType.isVoteAgainst) {\n\t\t\t// A delegate with veto power voted against.\n\t\t\tvetoed = true;\n\t\t}\n\t\tsynchronized (votingThread) {\n\t\t\tvotingThread.notify();\n\t\t}\n\t}", "@Override\n public void processElection() {\n if (context.getState().equals(LEADER) || !context.getActive()) {\n return;\n }\n\n log.info(\"Peer #{} Start election\", context.getId());\n\n context.setState(CANDIDATE);\n Long term = context.incCurrentTerm();\n context.setVotedFor(context.getId());\n\n List<Integer> peersIds = context.getPeers().stream().map(Peer::getId).collect(Collectors.toList());\n long voteGrantedCount = 1L;\n long voteRevokedCount = 0L;\n\n //while didn't get heartbeat from leader or new election started\n while (checkCurrentElectionStatus(term)) {\n List<AnswerVoteDTO> answers = getVoteFromAllPeers(term, peersIds);\n peersIds = new ArrayList<>();\n for (AnswerVoteDTO answer : answers) {\n if (answer.getStatusCode().equals(OK)) {\n if (answer.getTerm() > context.getCurrentTerm()) {\n //• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)\n context.setTermGreaterThenCurrent(answer.getTerm());\n return;\n }\n if (answer.isVoteGranted()) {\n log.info(\"Peer #{} Vote granted from {}\", context.getId(), answer.getId());\n context.getPeer(answer.getId()).setVoteGranted(true);\n voteGrantedCount++;\n } else\n log.info(\"Peer #{} Vote revoked from {}\", context.getId(), answer.getId());\n voteRevokedCount++;\n } else {\n log.info(\"Peer #{} No vote answer from {}\", context.getId(), answer.getId());\n peersIds.add(answer.getId());\n }\n }\n if (voteGrantedCount >= context.getQuorum()) {\n winElection(term);\n return;\n } else if (voteRevokedCount >= context.getQuorum()) {\n loseElection(term);\n return;\n } //else retry\n delay();\n }\n }", "protected void saveVote(Long voteForId) {\n if (mywebapp.getAuthenticatedUser() == null) {\n getMessagePanel().displayMessage(\"Please login before voting.\");\n return;\n }\n ContestRequest contestRequest = new ContestRequest();\n GWT.log(\"authToken=\" + mywebapp.getAuthToken());\n contestRequest.setAuthToken(mywebapp.getAuthToken());\n //we don't init the check boxes when it's location only\n for (Long contestId : ratingMap.keySet()) {\n Rating rating = ratingMap.get(contestId);\n //only register if there was a vote\n Integer val = rating.getValue();\n if (val > 0) {\n ContestEntryHolder ceh = new ContestEntryHolder();\n ceh.setContestId(contestId);\n ceh.setRating(val);\n ceh.setVoteForId(voteForId);\n contestRequest.getContestEntryHolders().add(ceh);\n }\n }\n ApiServiceAsync myService = mywebapp.getApiServiceAsync();\n myService.vote(contestRequest, new AsyncCallback() {\n public void onFailure(Throwable caught) {\n //postDialog.hide();\n getMessagePanel().displayError(caught.getMessage());\n }\n\n public void onSuccess(Object result) {\n MobileResponse mobileResponse = (MobileResponse) result;\n if (mobileResponse.getStatus() == 1) {\n getMessagePanel().displayMessage(\"Thanks for voting\");\n } else {\n //postDialog.hide();\n getMessagePanel().displayErrors(mobileResponse.getErrorMessages());\n }\n }\n });\n }", "public interface VoteHandler {\n\n /**\n * Handle the user's vote to alter the media's score\n *\n * @param vote User's vote\n */\n void handle(VoteMessage vote);\n\n}", "public int getVotes() {\n return this.votes;\n }", "private void handleRequestVote(RequestVote requestVote) {\n\n RequestVoteReply reply;\n\n do {\n\n try {\n reply = (RequestVoteReply) this.sendRPCHandler(() -> this.outbound.requestVote(this.targetServerName, requestVote));\n } catch (InterruptedException e) {\n return;\n }\n\n } while (reply == null);\n\n RequestVoteReply finalReply = reply;\n this.taskExecutor.execute(() -> this.consensusModule.requestVoteReply(finalReply));\n\n }", "public void vote(int rating) {\n\t\tnew WebTraceTask(this, String.valueOf(rating)).execute(WebTraceTask.VOTE);\n\t}", "public void addVote() {\n this.votes++;\n }", "@GetMapping(\"/up-question-votes/{id}\")\n @Timed\n public ResponseEntity<UpQuestionVote> getUpQuestionVote(@PathVariable Long id) {\n log.debug(\"REST request to get UpQuestionVote : {}\", id);\n UpQuestionVote upQuestionVote = upQuestionVoteService.findOne(id);\n return Optional.ofNullable(upQuestionVote)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "TrackerVotes loadTrackerVotes(final Integer id);", "public Object calculateElectionWinner(ArrayList<String> votes) {\n\t\tint pf =0;\n\t\tint es=0;\n\t\tfor(int i = 0; i<votes.size();i++) {\n\t\t\t\n\t\t\t\n\tif(votes.get(i).toLowerCase().contains(\"pope francis\")) {\n\tpf++;\n\t\n\t}\n\tif(votes.get(i).toLowerCase().contains(\"edward snowden\")) {\n\t\tes++;\n\t\t\n\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\tif(pf>es) {\n\t\t\treturn \"pope francis\";\n\t\t}\n\t\t\n\t\telse if (es>pf) {\n\t\treturn \"edward snowden\";\n\t\t\n\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\treturn \"TIE\";\n\t\t}\n\t\t\n\t}", "void addVote(UserId userId, QuestionId questionId, int vote);", "@RequestMapping(value=\"/players/vote\", method=RequestMethod.POST)\n\t@ResponseBody\n\tpublic void placeVote(String id) {\n\t\tSystem.out.println(\"in place vote \");\n\t\tplayerService.placeVoteOn(playerService.getPlayerById(id));\n\t}", "public String getVoteString() {\n\t\treturn voted ? Arrays.toString(topIdeas) : \"n/a\";\n\t}", "private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }", "public int getVotes() {\n return votes;\n }", "public int getVotes() {\n return votes;\n }", "public Response<Poll> votePoll(String id, long[] choices);", "public RequestVoteRsp RequestVote(RequestVoteReq candidate) {\n boolean voted = false;\n //if term > currentTerm\n if (candidate.getTerm() > this.persistentState.getCurrentTerm()) {\n // currentTerm = term;\n this.persistentState.setCurrentTerm(candidate.getTerm());\n //step down if leader or candidate\n if (this.role != Role.FOLLOWER) {\n this.role = Role.FOLLOWER;\n }\n }\n //if term = currentTerm, voteFor is null or candidateId, and candidate's log is at least as complete as local log\n if (candidate.getTerm() == this.persistentState.getCurrentTerm() && (this.persistentState.getVotedFor() == 0 || this.persistentState.getVotedFor() == candidate.getCandidateId())\n && candidate.getLastLogIndex() >= this.lastEntry.getIndex()) {\n //grant vote\n voted = true;\n //reset election timeout\n resetElectionTimeout();\n }\n return new RequestVoteRsp(this.persistentState.getCurrentTerm(), voted);\n }", "@Override\n public String getDescription() {\n return \"Phasing vote casting\";\n }", "@GET(\"/{interaction-id}/votes\")\n List<GetGlueInteraction> votes(\n @EncodedPath(\"interaction-id\") String interactionId\n );", "private void voteDay(int origin) {\r\n\tif (!nightVoteInProgress) {\r\n\t server.privateMessage(\"cannot use this command when there isn't a vote to change to night\", origin);\r\n\r\n\t} else if (dayVote.contains(origin)) {\r\n\t server.privateMessage(\"you have already voted to keep the game in the day phase\", origin);\r\n\r\n\t} else if (!players.containsKey(origin)) {\r\n\t server.privateMessage(\"you are not in the game, so cannot participate\", origin);\r\n\r\n\t} else {\r\n\t if (nightVote.contains(origin)) {\r\n\t\tint index = nightVote.indexOf(origin);\r\n\t\tnightVote.remove(index);\r\n\t }\r\n\r\n\t dayVote.add(origin);\r\n\t checkDay(origin);\r\n\t}\r\n }", "public void addVote(String token);", "public synchronized void reportVotes() {\n StringBuilder voteReport = new StringBuilder(\"\");\n for (Player player : playerVotes.keySet()) {\n voteReport.append(player.getUserName()).append(\": \").append(\n playerVotes.get(player) ? \"yes\\n\" : \"no\\n\");\n }\n sendPublicMessage(\"The votes were:\\n\" + voteReport.toString());\n }", "@Override\n public List<VoteAnswer> findAllVotesFromUserId(int id) {\n return template.query(\"SELECT * FROM \" + tableName + \" WHERE user = ?\", rowMapper, id);\n }", "public int calculateVotes() {\n return 1;\n }", "private void handleMessage(final AdoptRequest msg) {\n if (!parents.containsKey(msg.getTreeID()) || bloomFilter.get(msg.getTreeID()).mightContain(msg.sourceId)\n || currLoad + 1 > upperThreshold) {\n if (!msg.isLoadBalancing()) {\n debugPrint(network.getAddress() + \" refused to latency-adopt \" + msg.sourceId);\n }\n network.send(new AdoptRequestDecline(getMessageTag(), network.getAddress(), msg.sourceId, msg.getTreeID(), msg\n .getThirdParty(), msg.isLoadBalancing()));\n } else {\n if (!msg.isLoadBalancing()) {\n debugPrint(network.getAddress() + \" agreed to latency-adopt \" + msg.sourceId);\n }\n addSonToTree(msg.getTreeID(), msg.sourceId);\n network.send(new AdoptRequestAccept(getMessageTag(), network.getAddress(), msg.sourceId, msg.getTreeID(),\n msg.getThirdParty(), bloomFilter.get(msg.getTreeID()).copy(), msg.isLoadBalancing()));\n }\n }", "private void voteCommand(){\n out.println(\"\\r\\nEnter stock and vote (e.g. A1 for YES, B0 for NO). Enter 'X' to exit.\");\n String voteInput = in.nextLine();\n\n switch(voteInput.toUpperCase()){\n case \"A1\":castVote(game.apple, 1);\n break;\n case \"A0\":castVote(game.apple, 0);\n break;\n case \"B1\":castVote(game.bp, 1);\n break;\n case \"B0\":castVote(game.bp, 0);\n break;\n case \"C1\":castVote(game.cisco, 1);\n break;\n case \"C0\":castVote(game.cisco, 0);\n break;\n case \"D1\":castVote(game.dell, 1);\n break;\n case \"D0\":castVote(game.dell, 0);\n break;\n case \"E1\":castVote(game.ericsson, 1);\n break;\n case \"E0\":castVote(game.ericsson, 0);\n break;\n case \"X\":command();\n break;\n default:\n out.println(\"Invalid input: Please enter a stock (e.g. A) and a vote (0 or 1)\" + \"\\r\\n\");\n voteCommand();\n break;\n }\n\n }", "private void setVoteOrder() {\n\t\tfor (int i = 1; i < temp.size(); i++) {\n\t\t\t// deleting the comma from the name\n\t\t\tString s = temp.elementAt(i).replaceAll(\",\", \"\");\n\t\t\t// creating a vector \"tempVoteOrder\" to store the preferences of\n\t\t\t// each voter\n=======\n\t\t\tCandidats.add(candidat);\n\t\t\ttempCandidats = tempCandidats.replaceFirst(\n\t\t\t\t\ttempCandidats.substring(0, tempCandidats.indexOf(\",\") + 1),\n\t\t\t\t\t\"\");// delete the first candidat in the String\n\t\t}\n\t\tfor (int j = 0; j < Candidats.size(); j++)\n\t\t\tCandidats.elementAt(j).setVowsPerRound(Candidats.size());// fill the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// vector\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// size\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"candidats\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0's\n\t}", "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}", "Vote getWithUserAndRestaurant(int id, int userId);", "public void setVotes(int votes) {\n this.votes = votes;\n }", "public void setIdVoteType( int idVoteType )\n {\n _nIdVoteType = idVoteType;\n }", "public void vote(JsonObject inputMsg) {\n\t\tmessage = new JsonObject();\n\t\tmessage.addProperty(\"Direction\", \"ClientToServer\");\n\t\tmessage.addProperty(\"Function\", \"InGame\");\n\t\tmessage.addProperty(\"Operation\", \"VoteResult\");\n\t\tmessage.addProperty(\"RoomNumber\", roomNumber);\n\t\tmessage.addProperty(\"ScoredPlayer\", format(inputMsg.get(\"ScoredPlayer\").toString()));\n\n\t\tint r = Integer.parseInt(format(inputMsg.get(\"Row\").toString()));\n\t\tint c = Integer.parseInt(format(inputMsg.get(\"Column\").toString()));\n\t\tArrayList<String> voteWord = new ArrayList<String>();\n\n\t\tString word[] = new String[2];\n\n\t\tboard[r][c].setText(format(inputMsg.get(\"Letter\").toString()));\n\n\t\tword[0] = board[r][c].getText();\n\t\tword[1] = board[r][c].getText();\n\t\tboard[r][c].setBackground(Color.YELLOW);\n\n\t\t// Connect letters into a word\n\t\tfor (int i = 1; r + i < board.length; i++) {\n\t\t\tif (board[r + i][c].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[0] = word[0] + board[r + i][c].getText();\n\t\t\tboard[r + i][c].setBackground(Color.YELLOW);\n\t\t}\n\n\t\tfor (int i = 1; r - i >= 0; i++) {\n\t\t\tif (board[r - i][c].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[0] = board[r - i][c].getText() + word[0];\n\t\t\tboard[r - i][c].setBackground(Color.YELLOW);\n\t\t}\n\n\t\tfor (int i = 1; c + i < board.length; i++) {\n\t\t\tif (board[r][c + i].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[1] = word[1] + board[r][c + i].getText();\n\t\t\tboard[r][c + i].setBackground(Color.YELLOW);\n\t\t}\n\t\tfor (int i = 1; c - i >= 0; i++) {\n\t\t\tif (board[r][c - i].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[1] = board[r][c - i].getText() + word[1];\n\t\t\tboard[r][c - i].setBackground(Color.YELLOW);\n\t\t}\n\n\t\tif (word[0].length() + word[1].length() == 2) {\n\t\t\tvoteWord.add(word[0]);\n\t\t} else {\n\t\t\tvoteWord.add(word[0]);\n\t\t\tvoteWord.add(word[1]);\n\t\t}\n\t\tvoteWord(voteWord);\n\t}", "protected abstract long determineObjectId(V vo);", "void tradePokemon(Long pokemonId1, Long pokemonId2);", "int getVotes(QuestionId questionId);", "public T voteFirst(Long voteFirst) {\n if (voteFirst < 0) throw new IllegalArgumentException(\"voteFirst cannot be a negative value\");\n this.voteFirst = BigInteger.valueOf(voteFirst);\n return (T) this;\n }", "@Override\n public void onThirdVote(String arg0) {\n\n }", "private void handleResponse(Message msg, String listenerId)\n {\n String requestId = popString(Message.REQUESTID_TAG, msg);\n String type = popString(Message.TYPE_TAG, msg);\n \n NamedResource res = null;\n\n if (type.equals(NamedResource.PEER))\n {\n res = (Peer) new Peer();\n }\n\n //FIXME conversion of advertisment to resource object is done in each\n // of the resource\n // thus while converting to resource object we create an Id from the\n // byte array in the message recd\n // and while storing to cache, I store it hashed on the String version\n // of the ID..thus need to convert\n //ID again to String. My other option is to store the resource hashed\n // on ID object but then for every\n //comparison in the cache , i need to convert the ID to string as the\n // ID in the message is in a string\n // Its a trade off between when to do the conversion. Can be modified\n // later:)\n\n else if (type.equals(NamedResource.GROUP))\n {\n res = (PeerGroup) new PeerGroup();\n } else if (type.equals(NamedResource.PIPE))\n {\n res = (Pipe) new Pipe();\n }\n \n boolean available = false;\n \n if (res != null)\n {\n res.RevAdvertisment(msg.getElements());\n \n // resolved adv is its own peer, don't handle\n if (res.getID().equals(peer.getID()))\n {\n LOG.debug(\"got its own peer advertisement\");\n return;\n }\n available = cache.addResource(res);\n res.touch();\n }\n\n LOG.debug(\"found resource: \"+res.getName());\n \n if (!available)\n {\n\t for(Enumeration en = queries.elements(); en.hasMoreElements();)\n\t {\n\t Query query = (Query)en.nextElement();\n\t \n\t if (res.matches(query.groupId, query.type, query.attr,query.value))\n\t query.listener.handleSearchResponse(res);\n\t }\n }\n// Listener listener = getListener(listenerId);\n// if (listener != null){\n// listener.handleSearchResponse(res);\n// }\n \n }", "public void vote(int triviaId, int optionId, final OnVoteComplete callback){\n // Creamos el servicio\n TriviaService service = createService(TriviaService.class);\n // Generamos la call\n RestBodyCall<Boolean> call = service.vote(Mobileia.getInstance().getAppId(), getAccessToken(), triviaId, optionId);\n // Ejecutamos la call\n call.enqueue(new Callback<RestBody<Boolean>>() {\n @Override\n public void onResponse(Call<RestBody<Boolean>> call, Response<RestBody<Boolean>> response) {\n // Verificar si la respuesta fue incorrecta\n if (!response.isSuccessful() || !response.body().success) {\n callback.onSuccess(false);\n return;\n }\n // Enviamos la respuesta\n callback.onSuccess(response.body().response);\n }\n\n @Override\n public void onFailure(Call<RestBody<Boolean>> call, Throwable t) {\n callback.onSuccess(false);\n }\n });\n }", "public synchronized void beginVoting() {\n\t\tvotingThread = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// votes should be filled with [each delegate] -> `null`\n\t\t\t\tfor (int i = 0; i < 2 /* rounds */; i++) {\n\t\t\t\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\t\t\t\tif (votes.get(delegate) != null) {\n\t\t\t\t\t\t\t// Already voted.\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentlyVoting = delegate;\n\t\t\t\t\t\tlblCurrentVoter.setText(delegate.getName());\n\t\t\t\t\t\tlblCurrentVoter.setIcon(delegate.getSmallIcon());\n\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal List<Map<Vote, JButton>> maplist = Arrays.asList(\n\t\t\t\t\t\t\t\tbuttons_roundOne, buttons_roundTwo);\n\t\t\t\t\t\tfor (Map<Vote, JButton> map : maplist) {\n\t\t\t\t\t\t\tfor (Vote vote : map.keySet()) {\n\t\t\t\t\t\t\t\tmap.get(vote)\n\t\t\t\t\t\t\t\t\t\t.setText(\n\t\t\t\t\t\t\t\t\t\t\t\tdelegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: vote.normalText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsynchronized (votingThread) {\n\t\t\t\t\t\t\t\tvotingThread.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal Vote cast = votes.get(delegate);\n\t\t\t\t\t\tif (cast == Vote.PASS) {\n\t\t\t\t\t\t\tvotes.put(delegate, null);\n\t\t\t\t\t\t\t// So he goes again.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\t\t\tbutton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayout.show(pnlVoting, pnlSecondRound.getName());\n\t\t\t\t}\n\t\t\t\t// When done, disable again.\n\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\tbutton.setEnabled(false);\n\t\t\t\t}\n\t\t\t\tcurrentlyVoting = null;\n\t\t\t\tlblCurrentVoter.setText(null);\n\t\t\t\tlblCurrentVoter.setIcon(null);\n\t\t\t\tpnlVoting.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tvotingThread.start();\n\t}", "private int[] collectVotes()\n {\n int[] votes = new int[ 6 ];\n double centerX = (double) xCoord + 0.5;\n double centerY = (double) yCoord + 0.5;\n double centerZ = (double) zCoord + 0.5;\n\n // For each player:\n List players = worldObj.playerEntities;\n for( int i = 0; i < players.size(); ++i )\n {\n // Determine whether they're looking at the block:\n EntityPlayer player = (EntityPlayer) players.get( i );\n if( player != null )\n {\n // Check the player can see:\n if( QCraft.isPlayerWearingGoggles( player ) )\n {\n continue;\n }\n else\n {\n ItemStack headGear = player.inventory.armorItemInSlot( 3 );\n if( headGear != null && headGear.getItem() == Item.getItemFromBlock( Blocks.pumpkin ) )\n {\n continue;\n }\n }\n\n // Get position info:\n double x = player.posX - centerX;\n double y = player.posY + 1.62 - (double) player.yOffset - centerY;\n double z = player.posZ - centerZ;\n\n // Check distance:\n double distance = Math.sqrt( x * x + y * y + z * z );\n if( distance < 96.0 )\n {\n // Get direction info:\n double dx = x / distance;\n double dy = y / distance;\n double dz = z / distance;\n\n // Get facing info:\n float pitch = player.rotationPitch;\n float yaw = player.rotationYaw;\n float f3 = MathHelper.cos( -yaw * 0.017453292f - (float) Math.PI );\n float f4 = MathHelper.sin( -yaw * 0.017453292f - (float) Math.PI );\n float f5 = -MathHelper.cos( -pitch * 0.017453292f );\n float f6 = MathHelper.sin( -pitch * 0.017453292f );\n float f7 = f4 * f5;\n float f8 = f3 * f5;\n double fx = (double) f7;\n double fy = (double) f6;\n double fz = (double) f8;\n\n // Compare facing and direction (must be close to opposite):\n double dot = fx * dx + fy * dy + fz * dz;\n if( dot < -0.4 )\n {\n if( QCraft.enableQBlockOcclusionTesting )\n {\n // Do some occlusion tests\n Vec3 playerPos = Vec3.createVectorHelper( centerX + x, centerY + y, centerZ + z );\n boolean lineOfSightFound = false;\n for( int side = 0; side < 6; ++side )\n {\n // Only check faces that are facing the player\n Vec3 sideNormal = Vec3.createVectorHelper(\n 0.49 * Facing.offsetsXForSide[ side ],\n 0.49 * Facing.offsetsYForSide[ side ],\n 0.49 * Facing.offsetsZForSide[ side ]\n );\n Vec3 blockPos = Vec3.createVectorHelper(\n centerX + sideNormal.xCoord,\n centerY + sideNormal.yCoord,\n centerZ + sideNormal.zCoord\n );\n Vec3 playerPosLocal = playerPos.addVector(\n -blockPos.xCoord,\n -blockPos.yCoord,\n -blockPos.zCoord\n );\n //if( playerPosLocal.dotProduct( sideNormal ) > 0.0 )\n {\n Vec3 playerPos2 = playerPos.addVector( 0.0, 0.0, 0.0 );\n if( checkRayClear( playerPos2, blockPos ) )\n {\n lineOfSightFound = true;\n break;\n }\n }\n }\n if( !lineOfSightFound )\n {\n continue;\n }\n }\n\n // Block is being observed!\n\n // Determine the major axis:\n int majoraxis = -1;\n double majorweight = 0.0f;\n\n if( -dy >= majorweight )\n {\n majoraxis = 0;\n majorweight = -dy;\n }\n if( dy >= majorweight )\n {\n majoraxis = 1;\n majorweight = dy;\n }\n if( -dz >= majorweight )\n {\n majoraxis = 2;\n majorweight = -dz;\n }\n if( dz >= majorweight )\n {\n majoraxis = 3;\n majorweight = dz;\n }\n if( -dx >= majorweight )\n {\n majoraxis = 4;\n majorweight = -dx;\n }\n if( dx >= majorweight )\n {\n majoraxis = 5;\n majorweight = dx;\n }\n\n // Vote for this axis\n if( majoraxis >= 0 )\n {\n if( getSubType() == BlockQBlock.SubType.FiftyFifty )\n {\n boolean flip = s_random.nextBoolean();\n if( flip )\n {\n majoraxis = Facing.oppositeSide[ majoraxis ];\n }\n }\n votes[ majoraxis ]++;\n }\n }\n }\n }\n }\n\n return votes;\n }", "public Component allPlayersHaveVoted() {\n return MiniMessage.get().parse(\"<gold>\" + allPlayersHaveVoted);\n }", "public void addVote(String vote){\r\n\t\tif(allVotes.get(vote) == null){\r\n\t\t\tallVotes.put(vote, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tallVotes.put(vote, allVotes.get(vote) + 1);\r\n\t\t}\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(\"vote\");\r\n\t}", "public JsonObject addVote(String login, String token, String target,\r\n String voteRating) throws IOException {\r\n /*\r\n\r\n Refactoring notes: this function is overgrown.\r\n */\r\n JsonObject object = utils.authCheck(login, token);\r\n if (!StringUtils.isBlank(object.get(\"error\").getAsString())) {\r\n return object;\r\n }\r\n if (StringUtils.isBlank(target)) {\r\n object.addProperty(\"error\", \"target user parameter is blank\");\r\n return object;\r\n }\r\n if (!reader.loginExistCheck(target)) {\r\n object.addProperty(\"error\", \"target user doesn't exist\");\r\n return object;\r\n }\r\n if (target.equals(login)) {\r\n object.addProperty(\"error\", \"you cannot vote for yourself\");\r\n return object;\r\n }\r\n int voteRate;\r\n if (StringUtils.isBlank(voteRating)) {\r\n voteRate = 1;\r\n } else {\r\n try {\r\n voteRate = Integer.parseInt(voteRating);\r\n } catch (Exception e) {\r\n voteRate = 1;\r\n }\r\n }\r\n if (voteRate < 0) {\r\n voteRate = -1;\r\n } else {\r\n voteRate = 1;\r\n }\r\n JsonArray featured = serializer.getFeaturedMentors(login);\r\n boolean isFeatured = false;\r\n if (featured.size() > 0) {\r\n for (int i = 0; i < featured.size(); i++) {\r\n if (featured.get(i).getAsString().equals(target)) {\r\n isFeatured = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (isFeatured) {\r\n if (voteRate == -1) {\r\n serializer.deleteFeaturedMentor(login, target);\r\n utils.addFlash(login, \"user \" + target + \" unfeatured\", \"this \" +\r\n \"user is removed from featured list\",\r\n \"user featured deleted\");\r\n }\r\n } else {\r\n if (voteRate == 1) {\r\n serializer.addFeaturedMentor(login, target);\r\n utils.addFlash(login, \"user \" + target + \" featured\", \"this user \" +\r\n \"is added to featured list\", \"user featured deleted\");\r\n stats.produceUserStatsIncreasing(login, \"users_interesting\", 1);\r\n }\r\n }\r\n JsonObject vote = new JsonObject();\r\n vote.addProperty(\"login\", login);\r\n vote.addProperty(\"vote\", voteRate);\r\n JsonArray votes = serializer.getVotes(target);\r\n if (votes.size() > 0) {\r\n for (int i = 0; i < votes.size(); i++) {\r\n JsonObject oldVote = votes.get(i).getAsJsonObject();\r\n if (oldVote.get(\"login\").getAsString().equals(login)) {\r\n int old = Integer.parseInt(oldVote.get(\"vote\").getAsString());\r\n if (old == voteRate) {\r\n if (voteRate == 1) {\r\n object.addProperty(\"error\", \"you already voted for this user, \" +\r\n \"but you can vote against\");\r\n utils.addFlash(login, \"already voted for \" + target,\r\n object.get(\"error\").getAsString(), \"vote failed\");\r\n } else {\r\n object.addProperty(\"error\", \"you already voted against this \" +\r\n \"user, but you can vote for him\");\r\n utils.addFlash(login, \"already voted against \" + target,\r\n object.get(\"error\").getAsString(), \"vote failed\");\r\n }\r\n return object;\r\n }\r\n }\r\n }\r\n }\r\n serializer.addVote(target, vote);\r\n String type = \"new vote\";\r\n String title = login + \" voted for you\";\r\n String description = \"You have received a thumbs up vote.\";\r\n if (!(voteRate == 1)) {\r\n title = login + \" voted against you\";\r\n description = \"You have received a thumbs down vote. Please contact \" +\r\n \"us if you feel this is an error or want to dispute. \";\r\n }\r\n utils.addFlash(target, title, description, type);\r\n if (voteRate == 1) {\r\n stats.produceUserStatsIncreasing(login, \"votes_for\", 1);\r\n title = \"Your thumbs up vote for \" + target + \" was received.\";\r\n } else {\r\n stats.produceUserStatsIncreasing(login, \"votes_against\", 1);\r\n title = \"Your thumbs down vote for \" + target + \" was received.\";\r\n }\r\n description = \"you always can change your vote\";\r\n utils.addFlash(login, title, description, type);\r\n stats.produceUserStatsIncreasing(login, \"time_action\",\r\n System.currentTimeMillis());\r\n stats.writeUserAction(login, \"vote added\", \"success\",\r\n \"target - \" + target + \", vote - \" + voteRate);\r\n return object;\r\n }", "public void countVotes() {\n int[] voteResponses = RaftResponses.getVotes(mConfig.getCurrentTerm());\n int numVotes = 0;\n if(voteResponses == null) {\n //System.out.println(mID + \" voteResponses null\");\n //System.out.println(\"cur \" + mConfig.getCurrentTerm() + \" RR: \" + RaftResponses.getTerm());\n }\n else {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n //If vote has not been received yet, resend request\n //if(voteResponses[i] == -1)\n //this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n if(voteResponses[i] == 0)\n numVotes++;\n }\n }\n //If election is won, change to leader\n if(numVotes >= (mConfig.getNumServers()/2.0)) {\n electionTimer.cancel();\n voteCountTimer.cancel();\n RaftServerImpl.setMode(new LeaderMode());\n }\n else {\n voteCountTimer = scheduleTimer((long) 5, 2);\n }\n }", "public void sendPostDownVote(){\n Intent intent = getIntent();\n final int heritageId = intent.getIntExtra(\"heritageId\", -1);\n Retrofit retrofit = ApiClient.getApiClient();\n final SharedPreferences sharedPref = getSharedPreferences(\"TOKENSHARED\", Context.MODE_PRIVATE);\n final String token = sharedPref.getString(\"TOKEN\", null);\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n Call<JsonResponseVote> call = apiInterface.vote(new VoteBody(false, heritageId),\"Token \" + token);\n call.enqueue(new Callback<JsonResponseVote>() {\n @Override\n public void onResponse(Call<JsonResponseVote> call, Response<JsonResponseVote> response) {\n\n if (response.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"SUCCESSFUL DOWNVOTE\", Toast.LENGTH_SHORT).show();\n voteCount.setText(Integer.toString(response.body().getUpvote_count()-response.body().getDownvote_count()));\n deleteVote.setEnabled(true);\n downVote.setEnabled(false);\n upVote.setEnabled(true);\n\n } else {\n Toast.makeText(getApplicationContext(), \"Sorry for inconvince server is down\" + response.code(), Toast.LENGTH_SHORT).show();\n Log.d(\"response\", response.raw().body().toString());\n }\n\n }\n\n @Override\n public void onFailure(Call<JsonResponseVote> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"ERROR while posting\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void elimDayVote(String player, int origin) {\r\n\r\n\t// int playerID = server.getUserID(player);\r\n\tif (players.containsValue(player)) {\r\n\t OrderedBidiMap<String, Integer> invPlayers = players.inverseBidiMap();\r\n\r\n\t int playerID = invPlayers.get(player);\r\n\r\n\t // if (nightVote.size() > 0) {\r\n\t if (nightVoteInProgress) {\r\n\t\tserver.privateMessage(\r\n\t\t\t\"cannot vote to eliminate a player while there is a vote to change the game to night\", origin);\r\n\r\n\t\t// } else if (!playerIDs.contains(playerID)) { // this is for\r\n\t\t// when\r\n\t\t// using ArrayList of playerIDs\r\n\t } else if (playerID == origin) {\r\n\t\tserver.privateMessage(\"you cannot vote for yourself\", origin);\r\n\r\n\t } else if (elimDay.contains(origin)) {\r\n\t\tserver.privateMessage(\"you have already voted to start\", origin);\r\n\r\n\t } else if (!players.containsKey(origin)) {\r\n\t\tserver.privateMessage(\"you are not in the game, so cannot participate\", origin);\r\n\r\n\t } else if (playerOnTrialID == null) {\r\n\t\telimDayVoteInProgress = true;\r\n\t\tplayerOnTrialID = playerID;\r\n\t\telimDay.add(origin);\r\n\r\n\t\tTimerTask dayElimVoteTimeout = new TimerTask() { // not sure if\r\n\t\t\t\t\t\t\t\t // this\r\n\t\t\t\t\t\t\t\t // will work\r\n\t\t\t\t\t\t\t\t // properly\r\n\t\t\t\t\t\t\t\t // (method\r\n\t\t\t\t\t\t\t\t // should\r\n\t\t\t\t\t\t\t\t // continue\r\n\t\t\t\t\t\t\t\t // without\r\n\t\t\t\t\t\t\t\t // waiting for\r\n\t\t\t\t\t\t\t\t // it\r\n\t\t\t\t\t\t\t\t // to finish\r\n\r\n\t\t @Override\r\n\t\t public void run() {\r\n\t\t\tdayElimVoteTimeout(); // this might need a catch\r\n\r\n\t\t }\r\n\t\t};\r\n\r\n\t\tdayElimTimer = new Timer();\r\n\r\n\t\tdayElimTimer.schedule(dayElimVoteTimeout, 20000);\r\n\r\n\t } else {\r\n\t\tif (playerOnTrialID != playerID) {\r\n\t\t server.privateMessage(\"cannot vote for \" + player + \" while the vote for \"\r\n\t\t\t + server.getUsername(playerOnTrialID) + \" is in progress\", origin);\r\n\t\t} else {\r\n\t\t if (save.contains(origin)) {\r\n\t\t\tint index = save.indexOf(origin);\r\n\t\t\tsave.remove(index);\r\n\t\t }\r\n\r\n\t\t elimDay.add(origin);\r\n\t\t checkElim(origin);\r\n\t\t}\r\n\t }\r\n\t} else if (!players.containsValue(player)) {\r\n\t server.privateMessage(player + \" is not in this game/has already been eliminated\", origin);\r\n\r\n\t}\r\n\r\n }", "@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\n }", "private ProtobufVote(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public interface IRating {\n\t\n\t/**\n\t * Enums for various types of likes\n\t * @author terratenff\n\t *\n\t */\n\tpublic static enum LikeType {\n\t\tFUNNY(0), INFORMATIVE(1), DETAILED(2), IRONIC(3), INSPIRATIONAL(4),\n\t\tEASY(5), CHALLENGING(6), ABSURD(7), POETIC(8), SIMPLE(9),\n\t\tNONE(-1);\n\t\t\n\t\t/**\n\t\t * Container for various types of likes.\n\t\t */\n\t\tprivate static LikeType[] values = null;\n\t\t\n\t\t/**\n\t\t * Identifying value for a like type.\n\t\t */\n\t\tprivate int id;\n\t\t\n\t\t/**\n\t\t * LikeType constructor.\n\t\t * @param id Assigned ID.\n\t\t */\n\t\tLikeType(int id) {\n\t\t\tthis.id = id;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Getter for the like type's ID.\n\t\t * @return ID value that corresponds the like type.\n\t\t */\n\t\tpublic int getId() {\n\t\t\treturn this.id;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Getter for a like type based on provided ID.\n\t\t * @param id ID of desired like type.\n\t\t * @return Like type corresponding to provided ID, or like type\n\t\t * NONE if a match could not be found.\n\t\t */\n\t\tpublic static LikeType getLikeType(int id) {\n\t\t\tif (values == null) values = LikeType.values();\n\t\t\t\n\t\t\tfor (LikeType like : values) {\n\t\t\t\tif (id == like.getId()) return like;\n\t\t\t}\n\t\t\t\n\t\t\treturn LikeType.NONE;\n\t\t}\n\t};\n\n\t/**\n\t * Getter for rating ID.\n\t * @return ID.\n\t */\n\tpublic int getId();\n\t\n\t/**\n\t * Gives the rating instance an ID number. This function is meant to be called only once,\n\t * immediately after being added to the database.\n\t * @param id Assigned ID.\n\t */\n\tpublic void assignId(int id);\n\t\n\t/**\n\t * Getter for the ID of the user who created the story that the rating\n\t * is aimed at.\n\t * @return ID of the creator of the story.\n\t */\n\tpublic int getMakerId();\n\t\n\t/**\n\t * Getter for the ID of the user who created the rating.\n\t * @return ID of the rater.\n\t */\n\tpublic int getRaterId();\n\t\n\t/**\n\t * Getter for the ID of the story that the rating is focused on.\n\t * @return ID of the story.\n\t */\n\tpublic int getStoryId();\n\t\n\t/**\n\t * Getter for the time at which the rating was created.\n\t * @return Time of creation, as a LocalDate instance.\n\t */\n\tpublic LocalDate getViewDate();\n\t\n\t/**\n\t * Getter for the numerical rating given by the rater.\n\t * @return Numerical representation of the rating.\n\t */\n\tpublic int getGrade();\n\t\n\t/**\n\t * Getter for whether the user personally liked the story.\n\t * @return true, if the user liked it. false otherwise.\n\t */\n\tpublic boolean isLiked();\n\t\n\t/**\n\t * Getter for the like type assigned by the rater.\n\t * @return LikeType-enum given by the rater. NONE is returned if\n\t * the rater did not specifically like it.\n\t */\n\tpublic LikeType getLikeType();\n\t\n\t/**\n\t * Getter for the flag possibly raised by the rater. The flag indicates\n\t * that the rater thinks that the story violates story rules/guidelines.\n\t * @return true, if the rater has flagged it. false otherwise.\n\t */\n\tpublic boolean isFlagged();\n\t\n\t/**\n\t * Getter for a comment left behind by the rater.\n\t * @return Comment string. An empty string is returned if no comment was made.\n\t */\n\tpublic String getComment();\n}", "public int compareTo(Hit paramHit)\r\n/* 29: */ {\r\n/* 30: 30 */ if (this.hitTime < paramHit.hitTime) {\r\n/* 31: 31 */ return -1;\r\n/* 32: */ }\r\n/* 33: 32 */ if (this.hitTime > paramHit.hitTime) {\r\n/* 34: 33 */ return 1;\r\n/* 35: */ }\r\n/* 36: 35 */ return Long.compare(this.hub.accountId, paramHit.hub.accountId);\r\n/* 37: */ }", "@Override\n public void handle(Message<JsonObject> message) {\n logger.info(\"Handling event conjoiner.simplevertical\");\n\n // Start by deserializing the message back into a Object\n try {\n TransponderMessage msg = new TransponderMessage().messageToObject(message);\n logger.info(\"Decoded message: \" + msg.toJsonString());\n\n } catch (DataFormatException e) {\n e.printStackTrace();\n logger.warning(\"Unable to deserialize this\");\n }\n\n }", "private void castVote(Stock stock, int yesno){\n if (player.getVotesLeft() != 0){\n //if the stock names first letter doesn't exist in voteStocks\n if (!(player.getVotedStocks().lastIndexOf(stock.getName().charAt(0) + \"\") >= 0)){\n stock.vote(yesno);\n if(yesno == 1){out.println(\"Voted YES for \" + stock.getName() + \" influence card\");}\n else{out.println(\"Voted NO for \" + stock.getName() + \" influence card\");}\n player.getVotedStocks().append(stock.getName().charAt(0));\n player.deductVotesLeft();\n voteCommand();\n }else{out.println(\"Vote already cast for \" + stock.getName()); voteCommand();}\n }else{out.println(\"No more votes left\\r\\n\");command();}\n }", "Integer getLikes(Integer id);", "private void saveVote(String player, int origin) {// suspicious player do\r\n\t\t\t\t\t\t // need\r\n\t// to vote for themselves\r\n\r\n\tif (players.containsValue(player)) {\r\n\t OrderedBidiMap<String, Integer> invPlayers = players.inverseBidiMap();\r\n\t // int playerID = server.getUserID(player);\r\n\t int playerID = invPlayers.get(player);\r\n\r\n\t if (playerOnTrialID == null) {\r\n\t\tserver.privateMessage(\"you cannot vote to save someone when there is no-one on trial\", origin);\r\n\r\n\t\t// } else if (!playerIDs.contains(playerID)) {\r\n\t } else {\r\n\t\tif (playerOnTrialID != playerID) {\r\n\t\t server.privateMessage(\"cannot vote for \" + player + \" while the vote for \"\r\n\t\t\t + server.getUsername(playerOnTrialID) + \" is in progress\", origin);\r\n\r\n\t\t} else if (!players.containsKey(origin)) {\r\n\t\t server.privateMessage(\"you are not in the game, so cannot participate\", origin);\r\n\r\n\t\t} else {\r\n\t\t if (elimDay.contains(origin)) {\r\n\t\t\tint index = elimDay.indexOf(origin);\r\n\t\t\telimDay.remove(index);\r\n\t\t }\r\n\r\n\t\t save.add(origin);\r\n\t\t checkSave(origin);\r\n\t\t}\r\n\t }\r\n\t} else if (!players.containsValue(player)) {\r\n\t server.privateMessage(player + \" is not in this game/has already been eliminated\", origin);\r\n\r\n\t}\r\n\r\n }", "boolean voteSpoiled(ParticipantUserData participant) {\n for (Entry e : participantsList) {\n if (e.userData == participant) {\n\treturn e.voteSpoiled();\n }\n }\n throw new ShouldNotHappenException(\"participant unknown.\");\n }", "public Component alreadyVoted() {\n return MiniMessage.get().parse(hyphenHeader + alreadyVoted);\n }", "@RequestMapping(method = RequestMethod.POST, value=\"/Vote\")\n public ResponseEntity<?> vote(@RequestParam(value=\"idSchedule\") int idSchedule,\n @RequestParam(value=\"idAssociate\") int idAssociate,\n @RequestParam(value=\"choice\") boolean choice){\n try{\n scheduleService.vote(idSchedule,idAssociate,choice);\n return ResponseEntity.ok().body(\"Voto Realizado\");\n }catch (ResponseException e){\n return ResponseEntity.status(e.getResponseStatus()).body(e.getMessage());\n } catch (Exception e){\n return ResponseEntity.status(500).body(e.getMessage());\n }\n }", "@Override\n public int compareTo(Message m) {\n if (this.id > m.id) {\n return -1;\n }\n if (this.id < m.id) {\n return 1;\n }\n return 0;\n }", "@Override\n public int compare(Score o1, Score o2) {\n\n return o1.getSentId() - o2.getSentId();\n }", "Integer getDislikes(Integer id);", "public void vote(int index,Person voter,ArrayList<String> choices){\n votingList.get(index).vote(voter,choices);\n\n }", "public T voteFirst(Integer voteFirst) {\n if (voteFirst < 0) throw new IllegalArgumentException(\"voteFirst cannot be a negative value\");\n this.voteFirst = BigInteger.valueOf(voteFirst);\n return (T) this;\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_MESSAGING_PHASING_VOTE_CASTING;\n }", "@Override\n public void receiveMessage(AgentID sender, Action action)\n {\n super.receiveMessage(sender, action);\n\n // update the value of Care_Value、Reluctance、Agreement_Value every ten rounds\n if (getTimeLine() instanceof DiscreteTimeline) {\n DiscreteTimeline discreteTimeline = (DiscreteTimeline)getTimeLine();\n int cRound = discreteTimeline.getRound();\n if (cRound % 10 == 0) {\n\n // care_value increase 4% every ten rounds\n Care_Value = Care_Value * (1 + 0.04);\n if (Care_Value > 0.72) {\n Care_Value = 0.72;\n }\n\n // reluctance decrease 4% every ten rounds\n Reluctance = Reluctance * (1 - 0.06);\n if (timeline.getTime() < 7 && Reluctance < 0.9) {\n Reluctance = 0.9;\n }\n\n List<BidDetails> allBids = new ArrayList<>(feasibleBids);\n // find a common set for all opponent\n Set<BidDetails> commonBids = opponentModelInterface.queryCommonBestBidsSet(allBids, Number_of_Bids);\n List<BidDetails> commonBidsList = new ArrayList<>(commonBids);\n // sort the common set\n Collections.sort(commonBidsList);\n // AV = Utility(BidBest) * Reluctance\n Agreement_Value = (commonBidsList.get(commonBidsList.size() - 1).getMyUndiscountedUtil()) * Reluctance;\n if (Agreement_Value > 0.85) {\n Agreement_Value = 0.85;\n }\n\n if (Agreement_Value < Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()))) {\n Agreement_Value = Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()));\n }\n }\n }\n\n if (action instanceof Inform) {\n // receive message first time, update the number of opponent\n opponentModelInterface = new OpponentModelManager(getNumberOfParties());\n }else if (action instanceof Offer) {\n // save the last offer\n lastOffer = ((Offer) action).getBid();\n // update opponent model by new bid from opponent\n opponentModelInterface.handleBidFromSender(sender.toString(), lastOffer, getDomain());\n }\n }", "public int compare(Candidate a, Candidate b) \n { \n return b.getNoOfVotes() - a.getNoOfVotes(); \n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tJSONObject votejson = Json.getJson(MainActivity.website+\"/video/vote?ri=\"+rowItems.get(positionzhang).getVID()+\"&vt=STANDOUT\",MainActivity.httpclient);\n\t\t\t\t\tToast toast;\n\t\t\t\t\tString Votestate = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tVotestate = votejson.getString(\"result\");\n\t\t\t\t\t} catch (JSONException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (Votestate.equals(\"unknown\")){\n\t\t\t\t\t\t toast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t \"Please Login first\",\n\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t\t toast.show();\n\t\t\t\t\t Intent intent = new Intent(MainActivity.nowcontext, Login.class);\n\t\t\t\t\t MainActivity.nowcontext.startActivity(intent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttoast = Toast.makeText(MainActivity.nowcontext,\n\t\t\t\t\t\t\t\t MainActivity.convertNodeToText(Jsoup.parse(votejson.getString(\"message\"))),\n\t\t\t\t\t\t Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL, 0, 0);\n\t\t\t\t toast.show();\n\t\t\t\t \n\t\t\t\t //Login.writeFileSdcardFile(\"/sdcard/as.txt\", rowItems.get(position).getVID());\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \n\t\t\t Log.i(\"vote\",votejson.toString());\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void process(final Object msg) {\n final int candidate = (Integer) msg;\n if (candidate <= 0) {\n \t\tif (nextActor != null) {\n \t\t\tnextActor.send(msg);\n \t\t}\n } else {\n \t\tfinal boolean locallyPrime = isLocallyPrime(candidate);\n \t\tif (locallyPrime) {\n \t\t\tif (nLocalPrimes < maxLocalPrimes) {\n \t\tlocalPrimes[nLocalPrimes] = candidate;\n \t\t\tnLocalPrimes += 1;\n \t\t\t} else if (nextActor == null) {\n \t\t\tnextActor = new SieveActorActor(candidate);\n \t\t} else {\n \t\t\tnextActor.send(candidate);\n \t\t}\n \t\t}\n }\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n final ViewHolder holder;\n\n if (convertView == null) {\n //Log.d(\"Hello\", \"In get convertview commycustombaseadapter, just for debugging, position is: \"+String.valueOf(position));\n convertView = mInflater.inflate(R.layout.com_list_item, null);\n holder = new ViewHolder();\n holder.NameTV = (TextView) convertView.findViewById(R.id.Contact_name_tv);\n holder.BottomTV = (TextView) convertView.findViewById(R.id.Contact_bottom_tv);\n holder.RightTV = (TextView) convertView.findViewById(R.id.Votes_TV);\n holder.downvoteComment = (ImageView) convertView.findViewById(R.id.downvoteComment);\n holder.upvoteComment = (ImageView) convertView.findViewById(R.id.upvoteComment);\n\n holder.upvoteComment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (!(myVoteState.length <= holder.stickyPostion)) {\n switch (myVoteState[holder.stickyPostion]) {\n case 1: //because the arrow up is already highlighted\n holder.upvoteComment.clearColorFilter();\n holder.downvoteComment.clearColorFilter();\n myVoteState[holder.stickyPostion] = 0;\n break;\n case 0:\n holder.upvoteComment.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n holder.downvoteComment.clearColorFilter();\n myVoteState[holder.stickyPostion] = 1;\n break;\n case -1: //because the arrow down is highlighted\n holder.upvoteComment.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n holder.downvoteComment.clearColorFilter();\n myVoteState[holder.stickyPostion] = 1;\n break;\n }\n\n String newVote = \"\"; //because we need to calculate the new score and the new vote based on the last previous vote\n\n if (myVoteStateOrigin[holder.stickyPostion] == 0) {\n newVote = String.valueOf(myVoteState[holder.stickyPostion]);\n } else if (myVoteStateOrigin[holder.stickyPostion] == 1) {\n newVote = String.valueOf(myVoteState[holder.stickyPostion] - 1);\n } else if (myVoteStateOrigin[holder.stickyPostion] == -1) {\n newVote = String.valueOf(myVoteState[holder.stickyPostion] + 1);\n }\n Log.d(\"hello\", newVote);\n String newScore = String.valueOf(Integer.parseInt(newVote) * 25);\n myVoteStateOrigin[holder.stickyPostion] = myVoteState[holder.stickyPostion]; //because we then initialise the votestateorigin to the last state myvotestate\n\n\n //Log.d(\"Hello\", \"Arrow up clicked in comment, position is: \"+String.valueOf(holder.stickyPostion)+\" and votestate is: \"+String.valueOf(myVoteState[holder.stickyPostion]));\n HttpRequestApp.addVote_Score(\n Sign_User_Object.Email,\n FilteredObjects.get(position).getAuthor(),\n \"Voted\",\n FilteredObjects.get(position).getObject(),\n newScore,\n newVote,\n \"Normal\");\n }else {\n Toast.makeText(context, \"You cannot vote for yourself\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n holder.downvoteComment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (!(myVoteState.length <= holder.stickyPostion)) {\n switch (myVoteState[holder.stickyPostion]) {\n case 1: //because the arrow up is highlighted\n holder.downvoteComment.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n holder.upvoteComment.clearColorFilter();\n myVoteState[holder.stickyPostion] = -1;\n break;\n case 0:\n holder.downvoteComment.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n holder.upvoteComment.clearColorFilter();\n myVoteState[holder.stickyPostion] = -1;\n break;\n case -1: //because the arrwo down is already highlighted\n holder.upvoteComment.clearColorFilter();\n holder.downvoteComment.clearColorFilter();\n myVoteState[holder.stickyPostion] = 0;\n break;\n }\n //Log.d(\"Hello\", \"Arrow down clicked in comment, position is: \"+String.valueOf(holder.stickyPostion)+\" and votestate is: \"+String.valueOf(myVoteState[holder.stickyPostion]));\n String newVote = \"\"; //because we need to calculate the new score and the new vote based on the last previous vote\n\n if (myVoteStateOrigin[holder.stickyPostion] == 0) {\n newVote = String.valueOf(myVoteState[holder.stickyPostion]);\n } else if (myVoteStateOrigin[holder.stickyPostion] == 1) {\n newVote = String.valueOf(myVoteState[holder.stickyPostion] - 1);\n } else if (myVoteStateOrigin[holder.stickyPostion] == -1) {\n newVote = String.valueOf(myVoteState[holder.stickyPostion] + 1);\n }\n Log.d(\"hello\", newVote);\n String newScore = String.valueOf(Integer.parseInt(newVote) * 25);\n myVoteStateOrigin[holder.stickyPostion] = myVoteState[holder.stickyPostion]; //because we then initialise the votestateorigin to the last state myvotestate\n\n\n //Log.d(\"Hello\", \"Arrow up clicked in comment, position is: \"+String.valueOf(holder.stickyPostion)+\" and votestate is: \"+String.valueOf(myVoteState[holder.stickyPostion]));\n HttpRequestApp.addVote_Score(\n Sign_User_Object.Email,\n FilteredObjects.get(position).getAuthor(),\n \"Voted\",\n FilteredObjects.get(position).getObject(),\n newScore,\n newVote,\n \"Normal\");\n }else {\n Toast.makeText(context, \"You cannot vote for yourself\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n });\n\n\n convertView.setTag(holder);\n } else {\n holder = (ViewHolder) convertView.getTag();\n }\n\n String Name = FilteredObjects.get(position).getName();\n String BottomText = FilteredObjects.get(position).getBottomText();\n int RightText = FilteredObjects.get(position).getVotes();\n int ImgViewID = FilteredObjects.get(position).getImgID();\n\n holder.stickyPostion = position; //because the convertiew is getting called on scroll with the correct position, but another position will be input during the click whitch is between 0 and 4, this can only but place outside and after having returned the convertview\n holder.NameTV.setText(Name);\n holder.BottomTV.setText(BottomText);\n holder.RightTV.setText(String.valueOf(RightText));\n //Log.d(\"Hello\", \"In get convertview commycustombaseadapter before switch, just for debugging, position is: \"+String.valueOf(position)+\" \" +\n // \"and the votestate lengh is: \"+String.valueOf(myVoteState.length));\n //if (myVoteState[position] == 0) {\n //Log.d(\"Hello\", \"correct just for debugging commycustombaseadpter\");\n // }\n if (!(myVoteState.length <= position)) { //because when the user add more, object, it will be counted outside the length, user cannot vote for themselves\n switch (myVoteState[position]) { //because we are going to initialise the color, everytime the user scroll, or get the view\n\n case 0:\n holder.upvoteComment.clearColorFilter();\n holder.downvoteComment.clearColorFilter();\n break;\n case 1:\n holder.upvoteComment.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n holder.downvoteComment.clearColorFilter();\n break;\n case -1:\n holder.downvoteComment.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n holder.upvoteComment.clearColorFilter();\n break;\n\n }\n }\n //holder.ImageViewIco.setImageResource(ImgViewID);\n //Log.d(\"Hello\", \"In get convertview commycustombaseadapter after switch, position is: \"+String.valueOf(position)+\" and votestate is: \"+String.valueOf(myVoteState[position]));\n\n return convertView;\n }", "@Test\n public void testConvertTrainerId() {\n Object result = converter.convert(null, trainer.getId(), Trainer.class, Long.class);\n\n assertEquals(result.getClass(), Trainer.class, \"Converted object is not of a Trainer class.\");\n assertSame(result, trainer, \"Converted object is not the one expected.\");\n }", "VoteList selectByPrimaryKey(Integer id);", "private void handleMessageFromServer(String theMessage) {\n //Some contants that will come from the server in the message itself:\n final String DIRECTION_JSON_KEY = \"DIRECTION\";\n final String FINAL_PRICE_JSON_KEY = \"FINAL_PRICE\";\n final String THE_FOLLOW_JSON_KEY = \"THEFOLLOW\";\n //and those are the possible values for the 'direction' key\n final String UP_VALUE = \"UP\";\n final String DOWN_VALUE = \"DOWN\";\n\n if(!isJson(theMessage)){\n handleSimpleMessageFromServer(theMessage);\n }\n\n\n //Let's start by parsing the message\n try {\n JSONObject theMessageInJson = new JSONObject(theMessage);\n String direction = theMessageInJson.getString(DIRECTION_JSON_KEY);\n double finalPrice = theMessageInJson.getDouble(FINAL_PRICE_JSON_KEY);\n String theFollowString = theMessageInJson.getString(THE_FOLLOW_JSON_KEY);\n Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new gsonUTCdateAdapter()).create();\n Follow theFollow = gson.fromJson(theFollowString, Follow.class);\n double [] followParams=theFollow.getFollowParams();\n double lowValue=followParams[0];\n double highValue=followParams[1];\n\n\n NotificationManager mNotificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent launchSecurityShow=new Intent(this, SecurityPresent.class);\n launchSecurityShow.putExtra(SecurityPresent.THE_SECURITY,theFollow.getTheSecurity());\n launchSecurityShow.putExtra(SecurityPresent.MODE,SecurityPresent.NOTIFIED);\n //launchSecurityShow.putExtra(SecurityPresent.THE_FOLLOW_AND_STATUS,theFollow);\n PendingIntent contentIntent =\n PendingIntent.getActivity(this, 0, launchSecurityShow, PendingIntent.FLAG_ONE_SHOT);\n FollowAndStatus theFollowWhichWasReceived=new FollowAndStatus();\n theFollowWhichWasReceived.setFollow(theFollow);\n ContentValues valuesToUpdate=new ContentValues();\n valuesToUpdate.put(FollowEntry.COLUMN_FINAL_PRICE,finalPrice);\n Timestamp now=new Timestamp(System.currentTimeMillis());\n valuesToUpdate.put(FollowEntry.COLUMN_DATE_EXPIRY,now.toString());\n valuesToUpdate.put(FollowEntry.COLUMN_STATUS,FollowAndStatus.STATUS_NOTIFIED);\n //TODO: take the following off the main thread\n UtilityForDatabase.updateFollowInDatabase(this,theFollowWhichWasReceived,valuesToUpdate);\n\n int drawableArrow= direction.equals(UP_VALUE)?R.drawable.uparrow:R.drawable.downarrow;\n int iconArrow=direction.equals(UP_VALUE)?R.drawable.ic_stat_uparrow:R.drawable.ic_stat_downarrow;\n int notificationColor=direction.equals(UP_VALUE)?Color.GREEN:Color.RED;\n\n\n String title=theFollow.getTheSecurity().getName()+\" IS \"+direction+\"!\";\n String content=title+\" at \"+finalPrice+\". You wanted me to notify you at (\"+lowValue+','+highValue+\")\";\n\n // Notifications using both a large and a small icon (which yours should!) need the large\n // icon as a bitmap. So we need to create that here from the resource ID, and pass the\n // object along in our notification builder. Generally, you want to use the app icon as the\n // small icon, so that users understand what app is triggering this notification.\n Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), drawableArrow);\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(iconArrow)\n .setLargeIcon(largeIcon)\n .setContentTitle(title)\n .setStyle(new NotificationCompat.BigTextStyle().bigText(content))\n .setContentText(content)\n .setLights(notificationColor, 1000, 1000)\n .setPriority(NotificationCompat.PRIORITY_HIGH);\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(FOLLOW_NOTIFICATION_ID, mBuilder.build());\n } catch(JSONException e){}\n }", "@Override\n public byte getSubtype() {\n return SUBTYPE_MESSAGING_VOTE_CASTING;\n }" ]
[ "0.7113528", "0.59796685", "0.56171805", "0.54753244", "0.54192764", "0.5332472", "0.53311694", "0.53042966", "0.5193986", "0.5144047", "0.512245", "0.50888634", "0.50700027", "0.50627977", "0.5045399", "0.50312907", "0.5007095", "0.5002404", "0.49972466", "0.49956253", "0.49894166", "0.4972221", "0.49419516", "0.48894185", "0.48678845", "0.48634955", "0.48064062", "0.47826004", "0.4775264", "0.47740063", "0.4729961", "0.47120452", "0.4709826", "0.47069344", "0.4705006", "0.46948075", "0.4681571", "0.4680417", "0.46475363", "0.46393958", "0.46252286", "0.46252286", "0.46214068", "0.45798695", "0.45747337", "0.4569374", "0.45555848", "0.45300058", "0.45011818", "0.44959873", "0.4491238", "0.4489418", "0.44881517", "0.4474414", "0.44741008", "0.44687992", "0.44685337", "0.4447143", "0.44355002", "0.44301435", "0.44190225", "0.44094157", "0.44057652", "0.4390064", "0.43882546", "0.43877128", "0.43619317", "0.43446362", "0.433841", "0.43372506", "0.4333582", "0.43332005", "0.43308163", "0.43131638", "0.42947346", "0.42917615", "0.429104", "0.42908597", "0.42853016", "0.42783752", "0.42770824", "0.42753598", "0.42734993", "0.42729932", "0.42690873", "0.42622492", "0.4256367", "0.42562675", "0.42558798", "0.424978", "0.42481205", "0.42462125", "0.42456517", "0.42427045", "0.42405385", "0.42398718", "0.42323968", "0.4230136", "0.42223293", "0.42123494" ]
0.5521175
3
Building declare winner message
public Management getDeclareWinnerMessage(){ LeaderElection.Builder elb = LeaderElection.newBuilder(); elb.setCandidateId(conf.getServer().getNodeId()); elb.setElectId(String.valueOf(Integer.parseInt(conf.getServer().getProperty("port.mgmt"))%100)); elb.setDesc("Leader's declaration"); elb.setAction(ElectAction.DECLAREWINNER); MgmtHeader.Builder mhb = MgmtHeader.newBuilder(); mhb.setOriginator(conf.getServer().getNodeId()); mhb.setTime(System.currentTimeMillis()); RoutingPath.Builder rpb = RoutingPath.newBuilder(); rpb.setNodeId(conf.getServer().getNodeId()); rpb.setTime(mhb.getTime()); mhb.addPath(rpb); Management.Builder mb = Management.newBuilder(); mb.setHeader(mhb.build()); mb.setElection(elb.build()); return mb.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void decideWinner() {\n String winnerAnnouncement;\n if(player1Choice.equalsIgnoreCase(\"rock\") && player2Choice.equalsIgnoreCase(\"scissors\")) {\n winnerAnnouncement = \"Player: ROCK vs Computer: SCISSORS ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"scissors\") && player2Choice.equalsIgnoreCase(\"rock\")) {\n winnerAnnouncement = \"Player: SCISSORS vs Computer: ROCK ----- COMPUTER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"paper\") && player2Choice.equalsIgnoreCase(\"rock\")) {\n winnerAnnouncement = \"Player: PAPER vs Computer: ROCK ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"rock\") && player2Choice.equalsIgnoreCase(\"paper\")) {\n winnerAnnouncement = \"Player: ROCK vs Computer: PAPER ----- COMPUTER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"scissors\") && player2Choice.equalsIgnoreCase(\"paper\")) {\n winnerAnnouncement = \"Player: SCISSORS vs Computer: PAPER ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"paper\") && player2Choice.equalsIgnoreCase(\"scissors\")) {\n winnerAnnouncement = \"Player: PAPER vs Computer: SCISSORS ----- COMPUTER WINS\";\n } else {\n winnerAnnouncement = \"Its a TIE ---- EVERYONE IS A LOSER\";\n }\n // Print out who won in this format: \"Player: ROCK vs Computer: SCISSORS ----- PLAYER WINS\"\n System.out.println(winnerAnnouncement);\n }", "public String winCondition() {\r\n\t\tif (hasOneOfEach()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught one of each type of Pokémon!\";\r\n\t\t}\r\n\t\tif (hasFiveOfTwo()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught two each of five types of Pokémon!\";\r\n\t\t}\r\n\t\tif (hasTwoOfFive()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught five each of two types Pokémon!\";\r\n\t\t}\r\n\t\treturn \"You did not win yet! Keep trying!\";\r\n\t}", "private void whoIsTheWinner() {\n\t\t// at first we say let the number for winner and the maximal score be 0.\n\t\tint winnerName = 0;\n\t\tint maxScore = 0;\n\t\t// then, for each player, we check if his score is more than maximal\n\t\t// score, and if it is we let that score to be our new maximal score and\n\t\t// we generate the player number by it and we let that player number to\n\t\t// be the winner, in other way maximal scores doen't change.\n\t\tfor (int i = 1; i <= nPlayers; i++) {\n\t\t\tif (totalScore[i] > maxScore) {\n\t\t\t\tmaxScore = totalScore[i];\n\t\t\t\twinnerName = i - 1;\n\t\t\t}\n\t\t}\n\t\t// finally, program displays on screen who is the winner,and what score\n\t\t// he/she/it got.\n\t\tdisplay.printMessage(\"Congratulations, \" + playerNames[winnerName]\n\t\t\t\t+ \", you're the winner with a total score of \" + maxScore + \"!\");\n\t}", "public String getWinner(){\n if(whiteWins && blackWins){\n return \"ITS A DRAW\";\n } else if(whiteWins){\n return \"WHITE WINS\";\n } else if(blackWins){\n return \"BLACK WINS\";\n } else {\n return \"NO WINNER\";\n }\n }", "public String playerWon() {\n\t\tString message = \"Congratulations \"+name+ \"! \";\n\t\tRandom rand = new Random();\n\t\tswitch(rand.nextInt(3)) {\n\t\t\tcase 0:\n\t\t\t\tmessage+=\"Can you stop now? You're too good at this!\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tmessage+=\"You OBLITERATED the opponent!\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tmessage+=\"You sent them to the Shadow Realm\";\n\t\t}\n\t\treturn message;\n\t}", "public void announceWinner() {\r\n Piece winer;\r\n if (_board.piecesContiguous(_board.turn().opposite())) {\r\n winer = _board.turn().opposite();\r\n } else {\r\n winer = _board.turn();\r\n }\r\n if (winer == WP) {\r\n _command.announce(\"White wins.\", \"Game Over\");\r\n System.out.println(\"White wins.\");\r\n } else {\r\n _command.announce(\"Black wins.\", \"Game Over\");\r\n System.out.println(\"Black wins.\");\r\n }\r\n }", "public static void declareWinner() {\n if (playerWins > compWins) {\n System.out.println(\"!!!PLAYER WINS THE GAME!!!\");\n } else if (playerWins < compWins) {\n System.out.println(\"Comp wins the game...better luck next time!\");\n } else {\n System.out.println(\"Player and Comp are tied after rounds.\");\n }\n\n if (ties > playerWins && ties > compWins) {\n System.out.println(\"A hard battle...\");\n }\n }", "public static String winner() {\n\t\tList<List<Integer>> winCon = new ArrayList<List<Integer>>();\n\t\twinCon.add(Arrays.asList(1, 2, 3, 4, 5)); // first Row of the table\n\t\twinCon.add(Arrays.asList(6, 7, 8, 9, 10)); // Second Row of the table\n\t\twinCon.add(Arrays.asList(11, 12, 13, 14, 15)); // Third Row of the table\n\t\twinCon.add(Arrays.asList(16, 17, 18, 19, 20)); // Fourth Row of the table\n\t\twinCon.add(Arrays.asList(21, 22, 23, 24, 25)); // Fifth Row of the table\n\t\twinCon.add(Arrays.asList(1, 6, 11, 16, 21)); // First Column of the table\n\t\twinCon.add(Arrays.asList(2, 7, 12, 17, 22)); // Second Column of the table\n\t\twinCon.add(Arrays.asList(3, 8, 13, 18, 23)); // Third Column of the table\n\t\twinCon.add(Arrays.asList(4, 9, 14, 19, 24)); // Fourth Column of the table\n\t\twinCon.add(Arrays.asList(5, 10, 15, 20, 25)); // Fifth Column of the table\n\t\twinCon.add(Arrays.asList(1, 7, 13, 19, 25)); // first diagonal of the table\n\t\twinCon.add(Arrays.asList(5, 9, 13, 17, 21)); // Second diagonal of the table\n\n\t\tfor (List<Integer> l : winCon) {\n\t\t\tif (playerPosition.containsAll(l)) {\n\t\t\t\treturn \"Congratulations! \"+user+\", You Won.\";\n\t\t\t} else if (cpuPosition.containsAll(l)) {\n\t\t\t\treturn \"Cpu Won!, Sorry :( \";\n\t\t\t} else if (playerPosition.size() + cpuPosition.size() == 25) {\n\t\t\t\treturn \"Draw!!!\";\n\t\t\t} \n\t\t}\n\t\treturn \"\";\n\t}", "public static String winner() {\n\t\t// Behavior if the Player 1 won the most games.\n\t\tif (score1 > score2) {\n\t\t\treturn (player1 + \" is the winner! Congratulations \" + player1 + \" !\");\n\t\t}\n\t\t// Behavior if both players won the same number of games.\n\t\tif (score1 == score2) {\n\t\t\treturn (\"It's a tie! Both players won the same number of games. Congratulations \" + player1 + \" & \" + player2 + \" !\");\n\t\t}\n\t\t// Behavior if the Player 1 won the most games.\n\t\telse {\n\t\t\treturn (player2 + \" is the winner! Congratulations \" + player2 + \" !\");\n\t\t}\n\t}", "private void DeclareWinner(){\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\tTextView tvP1Score = (TextView) findViewById(R.id.tvP1Score);\n\t\tTextView tvP2SCore = (TextView) findViewById(R.id.tvP2Score);\n\t\tTextView tvTieScore = (TextView) findViewById(R.id.tvTieScore);\n\t\tswitch(winner){\n\t\t\tcase CAT:\n\t\t\t\ttieScore = tieScore + 1;\n\t\t\t\ttvStatus.setText(\"Tie Cat Wins!\");\n\t\t\t\ttvTieScore.setText(String.valueOf(tieScore));\n\t\t\t\tbreak;\n\t\t\tcase P1_WINNER:\n\t\t\t\tp1Score = p1Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 1 Wins!\");\n\t\t\t\ttvP1Score.setText(String.valueOf(p1Score));\n\t\t\t\tbreak;\n\t\t\tcase P2_WINNER:\n\t\t\t\tp2Score = p2Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 2 Wins!\");\n\t\t\t\ttvP2SCore.setText(String.valueOf(p2Score));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public String winner() {\n\t\tif (numFire == 0 && numWater != 0) {\n\t\t\treturn \"Water\";\n\t\t} else if (numWater == 0 && numFire != 0) {\n\t\t\treturn \"Fire\";\n\t\t} else if (numWater == 00 && numFire == 0) {\n\t\t\treturn \"No one\";\n\t\t}\n\t\treturn null;\n\t}", "private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }", "public String getWinner()\n\t{\n\n\n\n\n\n\n\n\n\n\n\n\n\t\treturn \"\";\n\t}", "public String whoWon()\n { \n String win=\"\";\n if (player1Hand.isEmpty())\n {\n win=(\"player 2 wins!\");\n }\n \n if(player2Hand.isEmpty())\n {\n win=(\"player 1 wins\");\n } \n \n return win;\n }", "public String winner(){\n\t\tString winner =\"\";\n\t\tif(board.isWin() == \"blue\")\n\t\t\t{\n\t\t\twinner= \"blue\";\n\t\t\t}\n\t\telse if(board.isWin()==\"red\")\n\t\t\t{\n\t\t\twinner= \"red\";\n\t\t\t}\n\t\treturn winner; \n\t}", "public void determineWinner() {\n\t\twinner = \"\";\n\t\tif (board[6] > board[13])\n\t\t\twinner = player1.getName();\n\t\telse if (board[6] < board[13])\n\t\t\twinner = player2.getName();\n\t\telse {\n\t\t\tSystem.out.println(\"The game is a tie\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(winner + \" is the winner\");\n\t}", "public void tellPlayerResult(int winner) {\n\t}", "public void sendWinner(Winner winner) {\n try {\n getGlueObject().handleSend(new Envelope()\n .setMessageType(MessageType.FINISH_RACE)\n .setWinner(winner)\n );\n } catch (NoSuchActionException | ActionFailedException e) {\n AlertMessage.alertMsg(null, e.getMessage(), AlertType.ERROR);\n }\n }", "public static String checkWinner(){\n //list winning conditions\n List topRow = Arrays.asList(1,2,3);\n List middleRow = Arrays.asList(4,5,6);\n List bottomRow = Arrays.asList(7,8,9);\n List leftCol = Arrays.asList(1,4,7);\n List middleCol = Arrays.asList(2,5,8);\n List rightCol = Arrays.asList(3,6,9);\n List crossLR = Arrays.asList(1,5,9);\n List crossRL = Arrays.asList(3,5,7);\n //????Why\n List<List> winningCon = new ArrayList<List>(){\n {\n add(topRow);\n add(middleRow);\n add(bottomRow);\n add(leftCol);\n add(middleCol);\n add(rightCol);\n add(crossLR);\n add(crossRL); \n }\n };\n for(List l: winningCon){\n if(Player0Pos.containsAll(l)){\n player0win++;\n return \"✧*。٩(ˊωˋ*)و✧* The winner of this round goes to Player 0, congrats! \";\n }else if(Player1Pos.containsAll(l)){\n player1win++;\n return \"✧*。٩(ˊωˋ*)و✧* The winner of this round goes to Player 1, congrats!\";\n }else if(Player0Pos.size() +Player1Pos.size()==9){\n return \"Game end, no one wins.\";\n }\n }\n return \"\"; \n }", "private void popUpWin(String whoWon) {\r\n\t\tJOptionPane.showMessageDialog(gameView, \"Congrats \" + whoWon + \" WINS! Go to the Options Pane to start a New Game!\", \"WIN!\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t}", "private void announceWinner() {\n // FIXME\n if (_board.turn() == Piece.WP) {\n System.out.println(\"Black wins.\");\n } else {\n System.out.println(\"White wins.\");\n }\n }", "public String winner() {\r\n\t\tif(player1.isDone() || player2.isDone()) {\r\n\t\t\tint count1 = player1.winningsCount();\r\n\t\t\tint count2 = player2.winningsCount();\r\n\t\t\tif(count1 > count2) {\r\n\t\t\t\treturn \"Player 1 wins, \" + count1 + \" to \" + count2 + \"!\";\r\n\t\t\t}else if(count2 > count1) {\r\n\t\t\t\treturn \"Player 2 wins, \" + count2 + \" to \" + count1 + \"!\";\r\n\t\t\t}else {\r\n\t\t\t\treturn \"The Game ends in a tie!\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public void setWinner(String winner) {\n this.winner = winner;\n }", "private String getWinner() {\n\t\treturn winner;\n\t}", "public String getWinner(){\n\t\tswitch (hatGewonnen) {\n\t\tcase \"Spieler O\":\n\t\t\treturn \"o\";\n\t\tcase \"Spieler X\":\n\t\t\treturn \"x\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}", "public static void announceWinner() {\n\t\tArrayList<String> data = new ArrayList<String>();\n\n\t\tfor (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) {\n\t\t\tLotteryDatabase lotteryData = LotteryDatabase.lotteryDatabase.get(index);\n\t\t\tfor (int i = 0; i < lotteryData.getTicketsPurchased(); i++) {\n\t\t\t\tdata.add(lotteryData.getPlayerName());\n\t\t\t}\n\t\t}\n\t\tif (data.isEmpty()) {\n\t\t\tAnnouncement.announce(\"No one has entered the lottery.\", ServerConstants.RED_COL);\n\t\t\treturn;\n\t\t}\n\t\tString lotteryWinnerName = data.get(Misc.random(data.size() - 1));\n\t\tAnnouncement.announce(\"<img=27><col=a36718> \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \" with \" + getWinningPercentage(lotteryWinnerName)\n\t\t + \"% chance of winning!\");\n\t\tPlayer winner = Misc.getPlayerByName(lotteryWinnerName);\n\t\tif (winner != null) {\n\t\t\twinner.getPA().sendScreenshot(\"Lottery \" + getTotalPotString(), 2);\n\t\t}\n\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\tnpc.forceChat(\"Congratulations \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \"!\");\n\t\tItemAssistant.addItemReward(null, lotteryWinnerName, ServerConstants.getMainCurrencyId(), getTotalPotNumber(), false, -1);\n\t\tint moneySink = getTotalPotNumber() / 85;\n\t\tmoneySink *= COMMISION_PERCENTAGE;\n\t\tCoinEconomyTracker.addSinkList(null, \"LOTTERY \" + moneySink);\n\t\ttotalTicketsPurchased = 0;\n\t\tLotteryDatabase.lotteryDatabase.clear();\n\t}", "public Message generateDrawMessage() {\n return new Message(false, -100, \"Game Over. It was a DRAW!\"); \n }", "private void sendWinnerMessage(RaceTrackMessage playerDisconnectsMessage) {\n\t\tif(playerDisconnectsMessage != null)\n\t\t\ttry{\n\n\t\t\t\tint playerWhoWon = getPlayerWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove()); \n\t\t\t\tint playerWhoWonID = getPlayerIDWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove());\n\t\t\t\tif(playerWhoWon != -1){\n\t\t\t\t\tPoint2D lastVec = null;\n\t\t\t\t\tif(getPlayerMap().get(playerWhoWonID) != null)\n\t\t\t\t\t\tlastVec = getPlayerMap().get(playerWhoWonID).getCurrentPosition();\n\n\n\t\t\t\t\tPlayerWonMessage answer;\n\n\t\t\t\t\tanswer = VectorMessageServerHandler.generatePlayerWonMessage(playerWhoWon, playerWhoWon, lastVec);\n\n\t\t\t\t\tcloseGameByPlayerID(playerWhoWon);\n\n\t\t\t\t\tanswer.addClientID(playerWhoWonID);\n\n\t\t\t\t\tsendMessage(answer);\n\t\t\t\t\t\n\t\t\t\t\t//inform the AIs that game is over!!\n\n\t\t\t\t}\n\t\t\t}catch(ClassCastException e){\n\n\t\t\t}\n\t}", "private void win(int winner)\n {\n switch (winner) {\n case PLAYER_1_FLAG:\n player1.gameOver(RESULT_WIN);\n player2.gameOver(RESULT_LOSS);\n winSend.close();\n break;\n case PLAYER_2_FLAG:\n player1.gameOver(RESULT_LOSS);\n player2.gameOver(RESULT_WIN);\n \n winSend.close();\n break;\n }\n }", "public static void decidedWinner(){\n if(playerOneWon == true ){\n//\n// win.Fill(\"Player One Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else if (playerTwoWon == true){\n// win.Fill(\"Player Two Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else\n {\n// win.Fill(\"Match Has been Tied !\");\n// new WinnerWindow().setVisible(true);\n }\n }", "void printWinner(String winner) throws IOException;", "public static String endGame(String absoluteWinner) {\n int maxSize = 8;\n String winnerUsername = absoluteWinner;\n\n for (int i = absoluteWinner.length(); i < maxSize; i++) {\n winnerUsername += \" \";\n }\n\n return MsgFormatter.endGameMsg(\n \"┈┈┏━╮╭━┓┈╭━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╮\\n\" +\n \"┈┈┃┏┗┛┓┃╭┫\" + MsgFormatter.serverMsg(\"THE ABSOLUTE WINNER IS \" + winnerUsername.toUpperCase()) + MsgFormatter.endGameMsg(\"┃\\n\" +\n \"┈┈╰┓▋▋┏╯╯╰━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╯\\n\" +\n \"┈╭━┻╮╲┗━━━━╮╭╮┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈\\n\" +\n \"┈┃▎▎┃╲╲╲╲╲╲┣━╯┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈\\n\" +\n \"┈╰━┳┻▅╯╲╲╲╲┃┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈\\n\" +\n \"┈┈┈╰━┳┓┏┳┓┏╯┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈\\n\" +\n \"┈┈┈┈┈┗┻┛┗┻┛┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈\\n\"));\n }", "public static void declareWinner() {\n\t\t// Make an if statement that runs if the next variable.\n\t\tif(next == 0) {\n\t\t\t// Have the system tell the user that they lost.\n\t\t\tSystem.out.println(\"You lose!\");\n\t\t}\n\t\telse {\n\t\t\t// Have the system tell the user that they won.\n\t\t\tSystem.out.println(\"You win!\");\n\t\t}\n\t}", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "public String getWinner(){\n\tif (p1.getPoints()==p2.getPoints()){\n\t return \"Tie. Good food, bad outcome.\";\n\t}\n\treturn (p1.getPoints()>p2.getPoints()?\"Player Row\":\"Player Column\")+\" is the winner!\";\n }", "public void announceWinners(String winners) {\n JOptionPane.showMessageDialog(frame, winners + \" won the game!\");\n }", "public String winner(Card p1, Card p2)\n {\n String str=\"\";\n winner = Deck.higherCard(p1,p2);\n //if player 1 wins\n if(winner.equals(p1))\n { \n player1Hand.enqueue(p1);\n player1Hand.enqueue(p2);\n str =(\"player 1 wins this round\");\n }\n \n //if player 2 wins\n if(winner.equals(p2))\n {\n \n player2Hand.enqueue(p1);\n player2Hand.enqueue(p2);\n str=(\"player 2 wins this round\");\n } \n return str;\n }", "private String buildMessage(String message) {\n\t\tif(message != null && message.contains(\"@record\")) {\n\t\t\tmessage = message.replaceAll(\"@record\", answerUser);\n\t\t\trecorded.put(owner.id(), answerUser);\n\t\t}\n\t\t//o sistema substitui o texto !id pelo id do usuário da conversa\n\t\tif(message != null && message.contains(\"!id\")) {\n\t\t\tmessage = message.replaceAll(\"!id\", owner.id() + \"\");\n\t\t}\n\t\t//o sistema verifica se tem alguma gravacao para o código recebido\n\t\tif(message != null && message.contains(\"#find\")) {\n\t\t\tString gravacao = recorded.get(Integer.parseInt(userLatestAnswer.get(owner.id())));\n\t\t\t//se houver gravacao, o sistema informa qual o desejo do amigo secreto\n\t\t\tif(gravacao != null)\n\t\t\t\tmessage = message.replaceAll(\"#find\", gravacao);\n\t\t\t//caso nao haja gravacao, o sistema notifica o usuário da situacao\n\t\t\telse\n\t\t\t\tmessage = \"O código informado não corresponde ao desejo de um amigo secreto... por favor tente novamente\";\n\t\t}\n\n\t\treturn message;\n\t}", "void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }", "private void gameWonDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_won), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "private void checkWinner() {\n\t\tif(player.getHandVal() == BLACKJACK && dealer.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"Both players have Blackjack!\\n\");\n\t\t\tresult = \"TIE\";\n\t\t}\n\t\telse if (player.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"The Player has Blackjack!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if (dealer.getHandVal() == BLACKJACK) {\n\t\t\tSystem.out.println(\"The Dealer has Blackjack!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(player.getHandVal() > BLACKJACK && dealer.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"Both players bust!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(player.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"The Player has busted!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse if(dealer.getHandVal() > BLACKJACK) {\n\t\t\tSystem.out.println(\"The Dealer has busted!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if(player.getHandVal() > dealer.getHandVal()) {\n\t\t\tSystem.out.println(\"The Player has a higher score!\\n\");\n\t\t\tresult = \"PLAYER\";\n\t\t}\n\t\telse if(player.getHandVal() < dealer.getHandVal()){\n\t\t\tSystem.out.println(\"The dealer has a higher score!\\n\");\n\t\t\tresult = \"DEALER\";\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Both players have the same score!\\n\");\n\t\t\tresult = \"TIE\";\n\t\t}\n\t}", "public void logWinner(){\n\t\tlog += String.format(\"%nDRAW\");\n\t\tlineBreak();\n\t}", "public String win() {\r\n\t\tint blackCount = 0;\r\n\t\tint whiteCount = 0;\r\n\t\tfor (int i=0; i<piece.size(); i++) {\r\n\t\t\tif (piece.get(order[i]).chessPlayer.equals(\"black\")) {\r\n\t\t\t\tblackCount++;\r\n\t\t\t} else if (piece.get(order[i]).chessPlayer.equals(\"white\")) {\r\n\t\t\t\twhiteCount++;\r\n\t\t\t} else continue;\r\n\t\t}\r\n\t\tif (blackCount == 0) {\r\n\t\t\treturn \"white\";\r\n\t\t} else if (whiteCount == 0) {\r\n\t\t\treturn \"black\";\r\n\t\t} else return null;\r\n\t}", "private void showChampionshipWinner()\n {\n boolean singleWinner = true;\n String winnerDrivers = getDrivers().getDriver(0).getName();\n for(int j = 1; j < getDrivers().getSize(); j++)\n { \n if(getDrivers().getDriver(0).getAccumulatedScore() == getDrivers().getDriver(j).getAccumulatedScore()) // if multiple winners\n {\n singleWinner = false;\n winnerDrivers += \" and \" + getDrivers().getDriver(j).getName();\n break;\n }\n else\n {\n break;\n }\n\n }\n if(singleWinner)\n System.out.println(winnerDrivers + \" is the winner of the championship with \" + getDrivers().getDriver(0).getAccumulatedScore() + \" points\");\n else // if multiple winner\n System.out.println(\"ITS A CHAMPIONSHIP TIE!!!\" + winnerDrivers + \" are the winners of the championship with \" + getDrivers().getDriver(0).getAccumulatedScore() + \" points\");\n }", "public String getWinner() {\n return winner;\n }", "private String getTurnMessage(){\n if (board.turn ==0)\n return \"Black's turn\";\n else\n return \"White's turn\";\n }", "public void announceWinner(){\n gameState = GameState.HASWINNER;\n notifyObservers();\n }", "String getWinner();", "public String getWinner() {\n\t\treturn winner;\n\t}", "public Winner whoWins(){\r\n\r\n /* transfer the matrix to an array */\r\n Sign[] flatBoard = flattenBoard();\r\n\r\n /* check if someone has won */\r\n if (CompPlayer.compWon(flatBoard))\r\n return Winner.COMPUTER;\r\n else if (CompPlayer.playerWon(flatBoard))\r\n return Winner.PLAYER;\r\n else\r\n return Winner.NON;\r\n }", "private boolean winner() {\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == CAT){\n\t\t\t//cat winner player_1 goes first\n\t\t\twinner = CAT;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == (CAT + 3)){\n\t\t\t//cat winner player_2 goes first\n\t\t\twinner = CAT;\n\t\t} \n\t\t\n\t\tif(winner > 0){\n\t\t\treturn true;//there is a winner\n\t\t}else{\n\t\t\treturn false;//still no winner yet\n\t\t}\t\n\t}", "public String Winner() {\r\n if(Main.player1.SuaVida()==0)\r\n return \"player2\";\r\n else\r\n return \"player1\";\r\n }", "public String printRecord() {\n int win = 0;\n int total = gameList.size();\n for (Game g : gameList) {\n if (g.isWinner(this)) {\n win++;\n }\n }\n return \"(\" + win + \"-\" + (total - win) + \")\";\n }", "private static void winner()\n {\n if ((board[1] == userLetter && board[2] == userLetter && board[3] == userLetter) ||\n (board[4] == userLetter && board[5] == userLetter && board[6] == userLetter) ||\n (board[7] == userLetter && board[8] == userLetter && board[9] == userLetter) ||\n (board[1] == userLetter && board[5] == userLetter && board[9] == userLetter) ||\n (board[3] == userLetter && board[5] == userLetter && board[7] == userLetter))\n {\n showBoard();\n System.out.println(\"Player win the game\");\n System.exit(0);\n }\n }", "public String message() {\n if (!longestAvailableMoves(2, !lastColor).isEmpty())\n return \"Strike available\";\n else if (isGameOver())\n return \"Game over! Click somewhere to continue\";\n else return \"Turn: \" + (lastColor ? \"White\" : \"Black\");\n }", "public void makeAnnouncement(){\n String announcement = \"Welcome to BlackJack! Please read the following rules carefully:\" + \"\\n\"\n + \"The min bet is $\" + minBet + \". The max bet is $\" + maxBet + \"!\" + \"\\n\"\n + \"The min required player number is \" + minPlayer + \". The max allowed player number is \" + maxPlayer + \"!\" + \"\\n\"\n + \"Your initial property is $100!\";\n System.out.println(announcement);\n }", "protected void ifWon(){\n canvas.add(titleBorder);\n canvas.add(titleBox);\n Image wonText = new Image(205, 400, \"124-hw4/BreakoutText/wonText.png\");\n canvas.add(wonText);\n }", "private void adjustWinnerError(GNode winner) {\n\n }", "public static void sendRequirementMessages(Player player) {\n\t\tfor (int i = 1; i < 310; i++)\n\t\t\tinter(player, i, \"\");\n\t\tplayer.getInterfaceManager().sendInterface(275);\n\t\tinter(player, 1, \"<col=FF0000><shad=000000>Distinction cape requirements</col>\");\n\n\t\tinter(player, 10, \"<col=046DB3><shad=000000><u>Max cape requirements</u></col>\");\n\t\tinter(player, 11, (isWorthyMaxCape(player) ? \"<str>\" : \"\")+\"Every stat level 99\");\n\t\tinter(player, 12, (isWorthyMaxCape(player) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\n\t\tinter(player, 14, \"<col=046DB3><shad=000000><u>Completionist cape requirements</u></col>\");\n\t\tinter(player, 15, ((isMaxed(player) && player.getSkills().getLevelForXp(Skills.DUNGEONEERING) == 120) ? \"<str>\" : \"\")+\"Every stat level 99 & 120 Dungeoneering\");\n\t\tinter(player, 16, (player.isKilledQueenBlackDragon() ? \"<str>\" : \"\")+\"Killed the Queen Black Dragon\");\n\t\tinter(player, 17, (player.isCompletedFightCaves() ? \"<str>\" : \"\")+\"Completed the Fight Caves minigame\");\n\t\tinter(player, 18, (player.isCompletedFightKiln() ? \"<str>\" : \"\")+\"Completed the Fight Kiln minigame\");\n\t\tinter(player, 19, (player.isKilledCulinaromancer() ? \"<str>\" : \"\")+\"Completed the Recipe for Disaster minigame\");\n\t\tinter(player, 20, (player.getQuestManager().completedQuest(Quests.NOMADS_REQUIEM) ? \"<str>\" : \"\")+\"Completed the Nomad's mini-quest\");\n\t\tinter(player, 21, (isWorthyCompCape(player) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\n\t\tinter(player, 23, \"<col=046DB3><shad=000000><u>Completionist cape (t) requirements</u></col>\");\n\t\tinter(player, 24, ((isWorthyCompCape(player)) ? \"<str>\" : \"\")+\"Have completed all of the above\");\n\t\tinter(player, 25, ((player.getOresMined() >= 5000) ? \"<str>\" : \"\")+\"Mine a total of 5'000 ores (\"+Utils.getFormattedNumber(player.getOresMined())+\")\");\n\t\tinter(player, 26, ((player.getBarsSmelt() >= 5000) ? \"<str>\" : \"\")+\"Smith a total of 5'000 bars (\"+Utils.getFormattedNumber(player.getBarsSmelt())+\")\");\n\t\tinter(player, 27, ((player.getLogsChopped() >= 5000) ? \"<str>\" : \"\")+\"Chop a total of 5'000 logs (\"+Utils.getFormattedNumber(player.getLogsChopped())+\")\");\n\t\tinter(player, 28, ((player.getLogsBurned() >= 5000) ? \"<str>\" : \"\")+\"Burn a total of 5'000 logs (\"+Utils.getFormattedNumber(player.getLogsBurned())+\")\");\n\t\tinter(player, 29, ((player.getLapsRan() >= 1000) ? \"<str>\" : \"\")+\"Complete a total of 1'000 agility laps (\"+Utils.getFormattedNumber(player.getLapsRan())+\")\");\n\t\tinter(player, 30, ((player.getBonesOffered() >= 5000) ? \"<str>\" : \"\")+\"Offer a total of 5'000 bones (\"+Utils.getFormattedNumber(player.getBonesOffered())+\")\");\n\t\tinter(player, 31, ((player.getPotionsMade() >= 5000) ? \"<str>\" : \"\")+\"Make a total of 5'000 potions (\"+Utils.getFormattedNumber(player.getPotionsMade())+\")\");\n\t\tinter(player, 32, ((player.getTimesStolen() >= 5000) ? \"<str>\" : \"\")+\"Steal a total of 5'000 times (\"+Utils.getFormattedNumber(player.getTimesStolen())+\")\");\n\t\tinter(player, 33, ((player.getItemsMade() >= 5000) ? \"<str>\" : \"\")+\"Craft a total of 5'000 items (\"+Utils.getFormattedNumber(player.getItemsMade())+\")\");\n\t\tinter(player, 34, ((player.getItemsFletched() >= 5000) ? \"<str>\" : \"\")+\"Fletch a total of 5'000 items (\"+Utils.getFormattedNumber(player.getItemsFletched())+\")\");\n\t\tinter(player, 35, ((player.getCreaturesCaught() >= 3000) ? \"<str>\" : \"\")+\"Catch a total of 3'000 creatures (\"+Utils.getFormattedNumber(player.getCreaturesCaught())+\")\");\n\t\tinter(player, 36, ((player.getFishCaught() >= 5000) ? \"<str>\" : \"\")+\"Catch a total of 5'000 fish (\"+Utils.getFormattedNumber(player.getFishCaught())+\")\");\n\t\tinter(player, 37, ((player.getFoodCooked() >= 5000) ? \"<str>\" : \"\")+\"Cook a total of 5'000 food (\"+Utils.getFormattedNumber(player.getFoodCooked())+\")\");\n\t\tinter(player, 38, ((player.getProduceGathered() >= 3000) ? \"<str>\" : \"\")+\"Farm a total of 3'000 produce (\"+Utils.getFormattedNumber(player.getProduceGathered())+\")\");\n\t\tinter(player, 39, ((player.getPouchesMade() >= 2500) ? \"<str>\" : \"\")+\"Infuse a total of 2'500 pouches (\"+Utils.getFormattedNumber(player.getPouchesMade())+\")\");\n\t\tinter(player, 40, ((player.getMemoriesCollected() >= 5000) ? \"<str>\" : \"\")+\"Harvest a total of 5'000 memories (\"+Utils.getFormattedNumber(player.getMemoriesCollected())+\")\");\n\t\tinter(player, 41, ((player.getRunesMade() >= 5000) ? \"<str>\" : \"\")+\"Runecraft a total of 5'000 runes (\"+Utils.getFormattedNumber(player.getRunesMade())+\")\");\n\t\tinter(player, 42, ((isWorthyCompCapeT(player)) ? \"<col=1BD12A><shad=000000>You are worthy enough to claim this cape!</col>\"\n\t\t\t\t\t\t: \"<col=ff0000><shad=000000>You are not worthy enough to claim this cape!\"));\n\t}", "MatchWonMessage(String playerName, String teamName) {\r\n super(playerName);\r\n this.teamName = teamName;\r\n }", "void printWinner() {\n }", "public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }", "public void winner(){\n System.out.println();\n System.out.println(\"You are the winner.!!!CONGRATULATIONS!!!.\");\n System.exit(1); // Close the game\n }", "@Override\n public String toString() {\n newPlayer.addPoints(players[0].getPoints());\n WarPlayer winner = players[mostNumOfCards(players)];\n\n if (winner.getPoints() == players[0].getPoints())\n return \"YOU WON!!! With a score of \" + players[0].getPoints();\n return \"Player\" + mostNumOfCards(players) + \" won!!! With a score of \" + winner.getPoints();\n }", "public void setWinner(String winner) {\n this.winner.setText(winner + \" Won!\");\n }", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "private void reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "@Override\n public void declareWinner(){\n //only the not-dead player is the winner\n for (Player p : super.getPlayers()) {\n if (!(p.isDead())) {\n System.out.printf(\"%s IS THE WINNER!\", p.getPlayerID());\n break;\n }\n }\n }", "private void getWinner() {\r\n int nWhite = 0, nBlack = 0;\r\n if(nextPlayer.getChecks() == 0 && nextPlayer.getQueens() == 0){\r\n winner = currentPlayer;\r\n }\r\n else if(currentPlayer.getQueens() == nextPlayer.getQueens()){\r\n for (int i = 1; i<8; i++){\r\n for (int x = 0; x<8; x++) {\r\n if (checks[i][x] == 1) nBlack++;\r\n if (checks[7 - i][x] == 2) nWhite++;\r\n }\r\n if (nWhite>nBlack) winner = getPlayer(WHITE);\r\n else if(nBlack>nWhite)winner = getPlayer(BLACK);\r\n nWhite = 0;\r\n nBlack = 0;\r\n }\r\n }\r\n else if (currentPlayer.getQueens() > nextPlayer.getQueens()){ winner = currentPlayer;}\r\n else{winner = nextPlayer; }\r\n }", "private static String gameStatus(char[][] board){\n\t\t\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\t// check horizontal lines && vertical lines for player x\n\t\t\tif ((board[i][0] == 'X' && board[i][1] == 'X' && board[i][2] == 'X') || \n\t\t\t\t\t(board[0][i] == 'X' && board[1][i] == 'X' && board[2][i] == 'X')){\n\t\t\t\twinner = 'X';\n\t\t\t\treturn \"true\";\n\t\t\t}\n\t\t}\n\t\t//check diags for x\n\t\tif ((board[0][0] == 'X' && board[1][1] == 'X' && board[2][2] == 'X') || \n\t\t\t\t(board[0][2] == 'X' && board[1][1] == 'X' && board[2][0] == 'X')){\n\t\t\twinner = 'X';\n\t\t\treturn \"true\";\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < 3 ; i++) {\n\t\t\t// check horizontal and vertical lines for player o\n\t\t\tif ((board[i][0] == 'O' && board[i][1] == 'O' && board[i][2] == 'O') || \n\t\t\t\t\t(board[0][i] == 'O' && board[1][i] == 'O' && board[2][i] == 'O')){\n\t\t\t\twinner = 'O';\n\t\t\t\treturn \"true\";\n\t\t\t}\n\t\t}\n\t\t//check diags for o\n\t\tif ((board[0][0] == 'O' && board[1][1] == 'O' && board[2][2] == 'O') || \n\t\t\t\t(board[0][2] == 'O' && board[1][1] == 'O' && board[2][0] == 'O')){\n\t\t\twinner = 'O';\n\t\t\treturn \"true\";\n\t\t}\n\n\t\t// check for tie\n\t\tint emptyCells = 9;\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\tfor (int j = 0; j < 3; j++){\n\t\t\t\tif (board[i][j]!='\\0') emptyCells -= 1;\t\t\n\t\t\t}\n\t\t}\n\t\t// if all cells are filled, game is over with a tie\n\t\tif (emptyCells == 0) return \"tie\";\n\n\t\t// otherwise game is not over and return false\n\t\t//printBoard(board);\n\n\t\treturn \"false\";\n\t}", "public void sendQuestion() {\n/* 76 */ Village village = getResponder().getCitizenVillage();\n/* 77 */ if (village != null) {\n/* */ \n/* 79 */ this.allies = village.getAllies();\n/* */ \n/* 81 */ Arrays.sort((Object[])this.allies);\n/* 82 */ StringBuilder buf = new StringBuilder();\n/* 83 */ buf.append(getBmlHeader());\n/* 84 */ PvPAlliance pvpAll = PvPAlliance.getPvPAlliance(village.getAllianceNumber());\n/* 85 */ if (pvpAll != null) {\n/* */ \n/* 87 */ buf.append(\"text{text=\\\"You are in the \" + pvpAll.getName() + \".\\\"}\");\n/* 88 */ if (FocusZone.getHotaZone() != null)\n/* */ {\n/* 90 */ buf.append(\"text{text=\\\"\" + pvpAll.getName() + \" has won the Hunt of the Ancients \" + pvpAll\n/* 91 */ .getNumberOfWins() + \" times.\\\"}\");\n/* */ }\n/* */ \n/* */ \n/* 95 */ if (village.getId() == village.getAllianceNumber()) {\n/* */ \n/* 97 */ if (village.getMayor().getId() == getResponder().getWurmId()) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 102 */ buf.append(\"text{text=\\\"\" + village\n/* 103 */ .getName() + \" is the capital in the alliance which means your diplomats are responsible for ousting other settlements. The mayor may change name, disband or set another village as the alliance capital:\\\"};\");\n/* */ \n/* */ \n/* */ \n/* 107 */ buf.append(\"harray{label{text=\\\"Alliance name:\\\"};input{id=\\\"allName\\\"; text=\\\"\" + pvpAll.getName() + \"\\\";maxchars=\\\"20\\\"}}\");\n/* */ \n/* 109 */ buf.append(\"harray{label{text='Alliance capital:'}dropdown{id=\\\"masterVill\\\";options=\\\"\");\n/* */ \n/* 111 */ for (int x = 0; x < this.allies.length; x++)\n/* */ {\n/* 113 */ buf.append(this.allies[x].getName() + \",\");\n/* */ }\n/* */ \n/* 116 */ buf.append(\"No change\");\n/* 117 */ buf.append(\"\\\";default=\\\"\" + this.allies.length + \"\\\"}}\");\n/* 118 */ buf.append(\"harray{checkbox{text=\\\"Check this if you wish to disband this alliance: \\\";id=\\\"disbandAll\\\"; selected=\\\"false\\\"}}\");\n/* */ } \n/* */ \n/* */ \n/* 122 */ for (Village ally : this.allies)\n/* */ {\n/* 124 */ if (ally != village) {\n/* 125 */ buf.append(\"harray{label{text=\\\"Check to break alliance with \" + ally.getName() + \":\\\"}checkbox{id=\\\"break\" + ally\n/* */ \n/* 127 */ .getId() + \"\\\";text=' '}}\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 177 */ buf.append(\"harray{label{text=\\\"Check to break alliance with \" + pvpAll.getName() + \":\\\"}checkbox{id=\\\"break\" + pvpAll\n/* */ \n/* 179 */ .getId() + \"\\\";text=' '}}\");\n/* */ } \n/* 181 */ buf.append(\"text{type=\\\"bold\\\";text=\\\"Alliance message of the day:\\\"}\");\n/* 182 */ buf.append(\"input{maxchars=\\\"200\\\";id=\\\"motd\\\";text=\\\"\" + pvpAll.getMotd() + \"\\\"}\");\n/* */ } \n/* 184 */ if (this.allies.length == 0)\n/* 185 */ buf.append(\"text{text='You have no allies.'}\"); \n/* 186 */ buf.append(\"text{text=''}\");\n/* 187 */ buf.append(\"text{text=''}\");\n/* 188 */ if (village.warDeclarations != null) {\n/* */ \n/* 190 */ buf.append(\"text{type='bold'; text='The current village war declarations:' }\");\n/* 191 */ for (WarDeclaration declaration : village.warDeclarations.values()) {\n/* */ \n/* 193 */ if (declaration.declarer == village) {\n/* */ \n/* 195 */ if (Servers.isThisAChaosServer() && \n/* 196 */ System.currentTimeMillis() - declaration.time > 86400000L) {\n/* */ \n/* 198 */ declaration.accept();\n/* 199 */ buf.append(\"harray{label{text=\\\"\" + declaration.receiver.getName() + \" has now automatically accepted your declaration.\\\"}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* 203 */ buf.append(\"harray{label{text=\\\"Check to withdraw declaration to \" + declaration.receiver.getName() + \":\\\"}checkbox{id'decl\" + declaration.receiver\n/* 204 */ .getId() + \"';text=' '}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* */ \n/* 209 */ if (Servers.isThisAChaosServer()) {\n/* */ \n/* 211 */ if (System.currentTimeMillis() - declaration.time < 86400000L) {\n/* */ \n/* 213 */ buf.append(\"harray{label{text=\\\"You have \" + \n/* 214 */ Server.getTimeFor(System.currentTimeMillis() - declaration.time) + \" until you automatically accept the declaration of war.\\\"}}\");\n/* */ \n/* */ \n/* 217 */ buf.append(\"harray{label{text=\\\"Check to accept declaration from \" + declaration.declarer\n/* 218 */ .getName() + \":\\\"}checkbox{id='recv\" + declaration.declarer\n/* */ \n/* 220 */ .getId() + \"';text=' '}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* 224 */ declaration.accept();\n/* 225 */ buf.append(\"harray{label{text=\\\"\" + declaration.receiver.getName() + \" has now automatically accepted the war declaration from \" + declaration.declarer\n/* */ \n/* 227 */ .getName() + \".\\\"}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* */ \n/* 232 */ buf.append(\"harray{label{text=\\\"Check to accept declaration from \" + declaration.declarer.getName() + \":\\\"}checkbox{id='recv\" + declaration.declarer\n/* */ \n/* 234 */ .getId() + \"';text=' '}}\");\n/* */ } \n/* */ \n/* 237 */ buf.append(\"text{text=''}\");\n/* 238 */ buf.append(\"text{text=''}\");\n/* */ }\n/* 240 */ else if (Servers.localServer.PVPSERVER) {\n/* 241 */ buf.append(\"text{text='You have no pending war declarations.'}\");\n/* 242 */ } Village[] enemies = village.getEnemies();\n/* 243 */ if (enemies.length > 0) {\n/* */ \n/* 245 */ buf.append(\"harray{text{type='bold'; text='We are at war with: '}text{text=\\\" \");\n/* */ \n/* 247 */ Arrays.sort((Object[])enemies);\n/* */ \n/* 249 */ for (int x = 0; x < enemies.length; x++) {\n/* */ \n/* 251 */ if (x == enemies.length - 1) {\n/* 252 */ buf.append(enemies[x].getName());\n/* 253 */ } else if (x == enemies.length - 2) {\n/* 254 */ buf.append(enemies[x].getName() + \" and \");\n/* */ } else {\n/* 256 */ buf.append(enemies[x].getName() + \", \");\n/* */ } \n/* 258 */ } buf.append(\".\\\"}}\");\n/* */ }\n/* 260 */ else if (Servers.localServer.PVPSERVER) {\n/* 261 */ buf.append(\"text{text='You are not at war with any particular settlement.'}\");\n/* 262 */ } buf.append(createAnswerButton2());\n/* 263 */ getResponder().getCommunicator().sendBml(300, 300, true, true, buf.toString(), 200, 200, 200, this.title);\n/* */ } \n/* */ }", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public String toString() {\r\n return \"\\n\\nTrainer: \"+ name + \", Wins: \" + win + \", team:\" + team;\r\n }", "private void computeWinLose() {\n\n if (!id11.getText().isEmpty()) {\n if ((id11.getText().equals(id00.getText()) && id11.getText().equals(id22.getText())) ||\n (id11.getText().equals(id02.getText()) && id11.getText().equals(id20.getText())) ||\n (id11.getText().equals(id10.getText()) && id11.getText().equals(id12.getText())) ||\n (id11.getText().equals(id01.getText()) && id11.getText().equals(id21.getText()))) {\n winner = id11.getText();\n }\n }\n\n if (!id00.getText().isEmpty()) {\n if ((id00.getText().equals(id01.getText()) && id00.getText().equals(id02.getText())) ||\n id00.getText().equals(id10.getText()) && id00.getText().equals(id20.getText())) {\n winner = id00.getText();\n }\n }\n\n if (!id22.getText().isEmpty()) {\n if ((id22.getText().equals(id21.getText()) && id22.getText().equals(id20.getText())) ||\n id22.getText().equals(id12.getText()) && id22.getText().equals(id02.getText())) {\n winner = id22.getText();\n }\n }\n\n // If all the grid entries are filled, it is a draw\n if (!id00.getText().isEmpty() && !id01.getText().isEmpty() && !id02.getText().isEmpty() && !id10.getText().isEmpty() && !id11.getText().isEmpty() && !id12.getText().isEmpty() && !id20.getText().isEmpty() && !id21.getText().isEmpty() && !id22.getText().isEmpty()) {\n winner = \"Draw\";\n }\n\n if (winner != null) {\n if (\"X\".equals(winner)) {\n winner = playerX;\n } else if (\"O\".equals(winner)) {\n winner = playerO;\n } else {\n winner = \"Draw\";\n }\n showWindow(winner);\n }\n }", "@Override\n\tpublic void msgAtKitchen() {\n\t\t\n\t}", "private void win() throws IOException {\n // get the color who wins\n int color = fromServer.readInt();\n\n if(color == this.color){\n playSound(WIN_SOUND);\n setMsgText(\"You win!\");\n } else if (color == this.opponentColor){\n // opponent wins\n setMsgText(\"You lose.\");\n } else {\n playSound(WIN_SOUND);\n // if the client is a viewer\n if(color == BLACK){\n setMsgText(\"BLACK wins!\");\n }else{\n setMsgText(\"WHITE wins!\");\n }\n }\n\n // end game\n endGame();\n }", "public synchronized void announceWinner(Team team) {\n\n String[] gameStats = new String[players.length];\n for(int i = 0; i < players.length; i++){\n\n String s = players[i].getName() + \": \" + players[i].getCorrectAnswers();\n gameStats[i] = s;\n System.err.println(s);\n }\n\n for (PlayerHandler playerHandler : players) {\n\n if (playerHandler.getTeam() == team) {\n playerHandler.getOutputStream().println(\n GFXGenerator.drawYouWon(playerHandler.getTeam().getColor(), score, teams[0], teams[1]) +\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n\n continue;\n }\n\n playerHandler.getOutputStream().println(\n GFXGenerator.drawGameOver(playerHandler.getTeam().getColor(), score, teams[0], teams[1])+\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n }\n\n }", "public static String determineWinner(int playerWins, int computerWins) {\n String winnerString = \"\";\n if (playerWins == computerWins) {\n winnerString = \"It's a tie! No winner!\";\n } else if (playerWins > computerWins) {\n winnerString = \"You win!\";\n } else if (computerWins > playerWins) {\n winnerString = \"The computer wins!\";\n }\n return winnerString;\n }", "public void setWinner(Player winner) {\n this.winner = winner;\n }", "void playMatch() {\n while (!gameInformation.checkIfSomeoneWonGame() && gameInformation.roundsPlayed() < 3) {\n gameInformation.setMovesToZeroAfterSmallMatch();\n playSmallMatch();\n }\n String winner = gameInformation.getWinner();\n if(winner.equals(\"DRAW!\")){\n System.out.println(messageProvider.provideMessage(\"draw\"));\n }else {\n System.out.println(messageProvider.provideMessage(\"winner\")+\" \"+winner+\"!\");\n }\n }", "public void setWinner(boolean winner) {\n\t\tthis.winner = winner;\n\t}", "private void createPosition() {\n\n switch (new Random().nextInt(4)) {\n\n case 0:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":-90\";\n break;\n\n case 1:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":\" + (Window.HEIGHT + 90);\n break;\n\n case 2:\n sendString = \"-90:\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n\n case 3:\n sendString = (Window.WIDTH + 90) + \":\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n }\n sendString += \":\" + new Random().nextInt(4);\n sendString += \":\" + new Random().nextInt(2);\n }", "public void checkWinner(){\n \n if ((board[0][0] == 'X' && board[0][1] == 'X' && board[0][2] == 'X')||(board[1][0] == 'X' && board[1][1] == 'X' && board[1][2] == 'X')||(board[2][0] == 'X' && board[2][1] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][0] == 'X' && board[2][0] == 'X')||(board[0][1] == 'X' && board[1][1] == 'X' && board[2][1] == 'X')||(board[0][2] == 'X' && board[1][2] == 'X' && board[2][2] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'X' && board[1][1] == 'X' && board[2][2] == 'X')||(board[0][2] == 'X' && board[1][1] == 'X' && board[2][0] == 'X')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[0][1] == 'O' && board[0][2] == 'O')||(board[1][0] == 'O' && board[1][1] == 'O' && board[1][2] == 'O')||(board[2][0] == 'O' && board[2][1] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][0] == 'O' && board[2][0] == 'O')||(board[0][1] == 'O' && board[1][1] == 'O' && board[2][1] == 'O')||(board[0][2] == 'O' && board[1][2] == 'O' && board[2][2] == 'O')){\n winner();\n }\n else if ((board[0][0] == 'O' && board[1][1] == 'O' && board[2][2] == 'O')||(board[0][2] == 'O' && board[1][1] == 'O' && board[2][0] == 'O')){\n winner();\n }\n \n }", "void checkWinner() {\n\t}", "public Draw_Winners_Winner() {\n }", "private void displayOnResult(String title, String message, Integer gifImage, int whoWon){\n\n switch (whoWon){\n case 1:{\n TextView textView = (TextView) mScoreGrid.getChildAt(3);\n scorePlayer1++;\n textView.setText(String.valueOf(scorePlayer1));\n break;\n }\n case 2:{\n TextView textView = (TextView) mScoreGrid.getChildAt(4);\n scorePlayer2++;\n textView.setText(String.valueOf(scorePlayer2));\n break;\n }\n case 0:\n default:{\n TextView textView = (TextView) mScoreGrid.getChildAt(5);\n scoreDraw++;\n textView.setText(String.valueOf(scoreDraw));\n break;\n }\n }\n\n new MaterialDialog.Builder(this)\n .setTitle(title)\n .setMessage(message)\n .setCancelable(false)\n .setPositiveButton(\"Okay\", R.drawable.ic_baseline_download_done_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n resetEverything();\n }\n })\n .setNegativeButton(\"Exit\", R.drawable.ic_baseline_cancel_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n finish();\n }\n })\n .setAnimation(gifImage)\n .build().show();\n }", "@SuppressWarnings(\"ResultOfObjectAllocationIgnored\")\n private String getWinnerList() {\n String list = \"\";\n\n ArrayList<IPlayer> arrlist = sortPlayerAfterPoints();\n\n for (IPlayer i : arrlist) {\n try {\n list += i.getName();\n list += \": \" + i.getPoints() + \"\\n\";\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n\n try {\n if (dialog.getSoundBox().isSelected()) {\n if (iPlayerList.size() > 0) {\n if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.ROT))) {\n new SoundClip(\"red_team_is_the_winner\");\n } else if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.BLAU))) {\n new SoundClip(\"blue_team_is_the_winner\");\n } else {\n new SoundClip(\"Flawless_victory\");\n }\n } else {\n new SoundClip(\"players_left\");\n }\n }\n } catch (NumberFormatException | RemoteException e) {\n e.printStackTrace();\n }\n\n return list;\n }", "public Optional<String> getWinner() {\n for (int win = 0; win < 8; win++) {\n String line = null;\n switch (win) {\n case 0:\n line = boardArray[0][0] + boardArray[0][1] + boardArray[0][2];\n break;\n case 1:\n line = boardArray[1][0] + boardArray[1][1] + boardArray[1][2];\n break;\n case 2:\n line = boardArray[2][0] + boardArray[2][1] + boardArray[2][2];\n break;\n case 3:\n line = boardArray[0][0] + boardArray[1][0] + boardArray[2][0];\n break;\n case 4:\n line = boardArray[0][1] + boardArray[1][1] + boardArray[2][1];\n break;\n case 5:\n line = boardArray[0][2] + boardArray[1][2] + boardArray[2][2];\n break;\n case 6:\n line = boardArray[0][0] + boardArray[1][1] + boardArray[2][2];\n break;\n case 7:\n line = boardArray[0][2] + boardArray[1][1] + boardArray[2][0];\n break;\n }\n if (line.equals(\"XXX\")) {\n return Optional.of(\"X\");\n } else if (line.equals(\"OOO\")) {\n return Optional.of(\"O\");\n }\n }\n return Optional.empty();\n }", "private synchronized String responseMessage(String playerInputNum) {\n if (playerInputNum.equals(answer)) {\n winOrLose = true;\n return \"Congratulation, the correct answer is \" + answer;\n } else if (attempt == 4) {\n attempt = 5;\n return \"Game over, the answer is \" + answer;\n } else if (playerInputNum.compareTo(answer) > 0)\n return \"The guess number \" + playerInputNum + \" is bigger than the generated number, \" + (4 - attempt) + \" chances left.\";\n else\n return \"The guess number \" + playerInputNum + \" is smaller than the generated number, \" + (4 - attempt) + \" chances left.\";\n }", "public static void outputWinner(String scene)\n\t\t{\n\t\t\tint maxscore = scores[0];\n\t\t\tfor(int i = 1; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tif(scores[i] > maxscore)\n\t\t\t\t\tmaxscore = scores[i];\n\t\t\t}\n\t\t\tSystem.out.print(\"Winner(s) for \" + scene +\": \");\n\t\t\tfor(int j = 0; j < scores.length; j++)\n\t\t\t{\n\t\t\t\tif(scores[j]==maxscore)\n\t\t\t\t\tSystem.out.print(entrants[j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}", "public String getWinner() {\n\t\tif (this.getScore(this.player1Name) > this.getScore(this.player2Name)) {\n\t\t\treturn this.player1Name;\n\t\t} else if (this.getScore(this.player1Name) == this.getScore(this.player2Name)) {\n\t\t\treturn \"Tie\";\n\t\t}\n\t\treturn this.player2Name;\n\t}", "public static void displayGrandWinner(Player player1, Player player2) {\r\n JOptionPane JO = new JOptionPane();\r\n String message;\r\n System.out.println(\"----------------------------\");\r\n\r\n if (player1.getPoints() > player2.getPoints())\r\n message = player1.getName() + \" is the grand winner!\";\r\n else if (player2.getPoints() > player1.getPoints())\r\n message = player2.getName() + \" is the grand winner!\";\r\n else\r\n message = \"Both players are tied!\";\r\n\r\n JOptionPane.showMessageDialog(null, \"Game over. Here are the results:\\n\" + player1.getName() + \": \" + player1.getPoints() + \" points.\\n\" + player2.getName() + \": \" + player2.getPoints() + \" points.\\n\" + message);\r\n\r\n }", "private String getGroupWelcomeMessage(String senderId) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Hello summoners!\\n\\n\");\n\t\tsb.append(\"I'm F.R.I.D.A.Y. the BOT and I'm here to assist you during the MCOC wars!\\n\");\n\t\tsb.append(\"I can also do many other things, just type '\" + AbstractCommand.ALL_CMD_PREFIX + \" \"\n\t\t + HelpCommand.CMD_PREFIX + \"' for the list of commands!\\n\\n\");\n\t\tsb.append(\"Here you can find some info and useful things about me:\\n\");\n\t\tsb.append(InfoCommand.getInfo(senderId));\n\t\treturn sb.toString();\n\t}", "private void gameWonDialog() {\n // stack overflow\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle((game.isPlayer_turn()) ? R.string.player_win_title : R.string.bank_win_title);\n builder.setMessage((game.isPlayer_turn()) ? R.string.player_win_message : R.string.bank_win_message);\n\n // Set up the buttons\n builder.setPositiveButton(R.string.play_again, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n resetGame();\n }\n });\n builder.setNegativeButton(R.string.return_to_home, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n returnToMain();\n }\n });\n //builder.show();\n\n AlertDialog alert = builder.create();\n alert.show();\n Button nbutton = alert.getButton(DialogInterface.BUTTON_NEGATIVE);\n nbutton.setBackgroundColor(getResources().getColor(R.color.bank_red));\n Button pbutton = alert.getButton(DialogInterface.BUTTON_POSITIVE);\n pbutton.setBackgroundColor(getResources().getColor(R.color.yale_blue));\n }", "public void winGame() {\n this.isWinner = true;\n }", "public boolean winner(){ \r\n\t\tif (rowWin() || colWin() || diagWin()){ \r\n\t\t\tchangeTurn(); \r\n\t\t\tSystem.out.println(\"Winner: \" + playerToString(currentTurn) + \"!\"); \r\n\t\t\treturn true; \r\n\t\t}\r\n\t\telse if (tie()){\r\n\t\t\tSystem.out.println(\"There is a tie.\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{ \r\n\t\t\tSystem.out.println(\"No winner yet.\\n\"); \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public static String describeMove(Move move, Board board){\n String name = \"Computer\";\n if(move.getUID() != -1){\n name = String.format(\"%s (%d)\", names.get(move.getUID()), move.getUID());\n }\n String message;\n switch(move.getStage()){\n case CLAIM_TERRITORY:\n int claimedTerritory = move.getTerritory();\n String claimedTerritoryName = board.getName(claimedTerritory);\n message = String.format(\"%s has claimed territory [%d-%s].\\n\", name, claimedTerritory, claimedTerritoryName);\n return message;\n case REINFORCE_TERRITORY:\n int reinforcedTerritory = move.getTerritory();\n String reinforcedTerritoryName = board.getName(reinforcedTerritory);\n message = String.format(\"%s has reinforced territory [%d-%s].\\n\", name, reinforcedTerritory, reinforcedTerritoryName);\n return message;\n case TRADE_IN_CARDS:\n List<Card> toTradeIn = move.getToTradeIn();\n if(toTradeIn.size() > 0){\n String handMessage = Card.printHand(null, toTradeIn);\n message = String.format(\"%s has traded in %s\", name, handMessage);\n }else{\n message = String.format(\"%s has not traded in any cards.\\n\", name);\n }\n return message;\n case PLACE_ARMIES:\n int placeArmiesTerritory = move.getTerritory();\n int placeArmiesNum = move.getArmies();\n String placeArmiesName = board.getName(placeArmiesTerritory);\n message = String.format(\"%s has placed %d armies at [%d-%s].\\n\", name, placeArmiesNum, placeArmiesTerritory, placeArmiesName); \n return message;\n case DECIDE_ATTACK:\n boolean decideAttack = move.getDecision();\n if(decideAttack){\n message = String.format(\"%s has chosen to attack.\\n\", name);\n }else{\n message = String.format(\"%s has chosen not to attack.\\n\", name);\n }\n return message;\n case START_ATTACK:\n int attackFrom = move.getFrom();\n int attackTo = move.getTo();\n String attackFromName = board.getName(attackFrom);\n String attackToName = board.getName(attackTo);\n String enemyName = names.get(board.getOwner(attackTo));\n message = String.format(\"%s is attacking %s owned territory [%d-%s] from [%d-%s].\\n\", name, enemyName, attackTo, attackToName, attackFrom, attackFromName);\n return message;\n case CHOOSE_ATTACK_DICE:\n int numAttackingDice = move.getAttackDice();\n message = String.format(\"%s has chosen to attack with %d dice.\\n\", name, numAttackingDice);\n return message;\n case CHOOSE_DEFEND_DICE:\n int numDefendingDice = move.getDefendDice();\n message = String.format(\"%s has chosen to defend with %d dice.\\n\", name, numDefendingDice);\n return message;\n case ROLL_HASH:\n message = String.format(\"%s has sent their roll hash.\\n\", name);\n return message;\n case ROLL_NUMBER:\n message = String.format(\"%s has sent their roll number.\\n\", name);\n return message;\n case OCCUPY_TERRITORY:\n int numOccupyArmies = move.getArmies();\n message = String.format(\"%s was successful in their attack and has moved %d armies forward.\\n\", name, numOccupyArmies);\n return message;\n case DECIDE_FORTIFY:\n boolean decideFortify = move.getDecision();\n if(decideFortify){\n message = String.format(\"%s has chosen to fortify.\\n\", name);\n }else{\n message = String.format(\"%s has chosen not to fortify.\\n\", name);\n }\n return message;\n case START_FORTIFY:\n int fortifyFrom = move.getFrom();\n int fortifyTo = move.getTo();\n String fortifyFromName = board.getName(fortifyFrom);\n String fortifyToName = board.getName(fortifyTo);\n message = String.format(\"%s is fortifying [%d-%s] from [%d-%s].\\n\", name, fortifyTo, fortifyToName, fortifyFrom, fortifyFromName);\n return message;\n case FORTIFY_TERRITORY:\n int numFortifyArmies = move.getArmies();\n message = String.format(\"%s has fortified with %d armies.\\n\", name, numFortifyArmies);\n return message;\n case END_ATTACK:\n int attackerLosses = move.getAttackerLosses();\n int defenderLosses = move.getDefenderLosses();\n List<Integer> attackDiceRolls = move.getAttackDiceRolls();\n message = \"Dice Rolls : Attacker - \";\n for(int r : attackDiceRolls){\n message += String.format(\"(%d) \", r);\n }\n message += \"- Defender - \";\n List<Integer> defendDiceRolls = move.getDefendDiceRolls();\n for(int r : defendDiceRolls){\n message += String.format(\"(%d) \", r);\n }\n message += \"\\n\";\n message += String.format(\"The attacker lost %d armies, the defender lost %d armies.\\n\", attackerLosses, defenderLosses);\n return message;\n case PLAYER_ELIMINATED:\n String eliminatedPlayer = names.get(move.getPlayer());\n message = String.format(\"%s has just been eliminated by %s.\\n\", eliminatedPlayer, name);\n return message;\n case CARD_DRAWN:\n message = String.format(\"%s has drawn a card (%s).\\n\", name, move.getCard().getID());\n return message;\n case SETUP_BEGIN:\n int numPlayers = move.getPlayer();\n message = String.format(\"Game setup is beginning with %d players, %s is first to go.\\n\", numPlayers, name);\n return message;\n case SETUP_END:\n return \"Game setup has ended.\\n\";\n case GAME_BEGIN:\n message = String.format(\"Game is beginning, %s is first to go.\\n\", name);\n return message;\n case GAME_END:\n int turns = move.getTurns();\n String winner = names.get(move.getPlayer());\n message = String.format(\"Game has ended after %d turns, %s is the winner!\\n\", turns, winner);\n return message;\n default:\n return \"\";\n }\n }", "private static ResultsObject evaluateWinner(String player1Choice, String player2Choice, String player1Type) {\n if (player1Choice == player2Choice) {\n return setDisplayMessage(\"It is a tie!\", \"\", player2Choice, player1Choice, player1Type);\n } else {\n switch (player1Choice) {\n case \"ROCK\":\n if (player2Choice == \"SCISSORS\") {\n return setDisplayMessage(\"Player 1 wins!\", Weapon.WeaponMessages.ROCK.message, player2Choice, player1Choice, player1Type);\n } else {\n return setDisplayMessage(\"Player 2 wins!\", Weapon.WeaponMessages.PAPER.message, player2Choice, player1Choice, player1Type);\n }\n case \"PAPER\":\n if (player2Choice == \"ROCK\") {\n return setDisplayMessage(\"Player 1 wins!\", Weapon.WeaponMessages.PAPER.message, player2Choice, player1Choice, player1Type);\n } else {\n return setDisplayMessage(\"Player 2 wins!\", Weapon.WeaponMessages.SCISSORS.message, player2Choice, player1Choice, player1Type);\n }\n case \"SCISSORS\":\n if (player2Choice == \"PAPER\") {\n return setDisplayMessage(\"Player 1 wins!\", Weapon.WeaponMessages.SCISSORS.message, player2Choice, player1Choice, player1Type);\n } else {\n return setDisplayMessage(\"Player 2 wins!\", Weapon.WeaponMessages.ROCK.message, player2Choice, player1Choice, player1Type);\n }\n default:\n return setDisplayMessage(\"Please enter: ROCK - PAPER - SCISSORS\", \"\", \"\", \"\", player1Type);\n }\n }\n }", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }" ]
[ "0.66245323", "0.65324205", "0.6440141", "0.63676584", "0.63559514", "0.633442", "0.6316427", "0.62869257", "0.6250647", "0.6202615", "0.62014633", "0.6197921", "0.619445", "0.61637545", "0.61428714", "0.6142686", "0.6127393", "0.61125124", "0.6082407", "0.60194033", "0.6016356", "0.59882134", "0.5979698", "0.5974314", "0.5947762", "0.59440434", "0.5936027", "0.59247077", "0.590494", "0.58445835", "0.5814178", "0.5786917", "0.57838047", "0.57708615", "0.575128", "0.57091576", "0.57080704", "0.5707286", "0.57046753", "0.5679322", "0.56771004", "0.5675763", "0.5671705", "0.566313", "0.5656476", "0.56301254", "0.5597629", "0.55968755", "0.5591464", "0.55829304", "0.5549384", "0.5543349", "0.553", "0.5500935", "0.5499081", "0.5493904", "0.5489275", "0.5478413", "0.547024", "0.5466942", "0.54651046", "0.54596734", "0.5454843", "0.5449033", "0.5436775", "0.54305124", "0.5425193", "0.5424367", "0.5421575", "0.54179734", "0.54153335", "0.5409465", "0.53920525", "0.5385599", "0.53849494", "0.5374478", "0.53703713", "0.5369233", "0.5368163", "0.5364752", "0.5353679", "0.5350682", "0.53455627", "0.53448755", "0.53447074", "0.53387856", "0.53324753", "0.53263026", "0.5309031", "0.5304775", "0.5300181", "0.52959704", "0.5295145", "0.528821", "0.52787197", "0.5278566", "0.5278507", "0.5278258", "0.5270928", "0.52597624" ]
0.672016
0
Watch out with the added properties here. The convenience variables don't get automatically updated as do the main attributes of these classes do.
public TopologyLib() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void updateProperties() {\n }", "@Override\n public void updateProperties() {\n // unneeded\n }", "public void setupProperties() {\n // left empty for subclass to override\n }", "protected void afterPropertiesSetInternal() {\n\t\t// override this method\n\t}", "private void addProperties() {\n\n\t\t/**\n\t\t * Add fusion.conf = src/test/resource\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.conf.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.conf.dir\")).andReturn(\n\t\t\t\t\t\"src/test/resources/\").anyTimes();\n\t\t}\n\t\t/**\n\t\t * set fusion.process.dir\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.process.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.process.dir\"))\n\t\t\t\t\t.andReturn(\"src/test/resources/\").anyTimes();\n\t\t}\n\n\t\t/**\n\t\t * set fusion.process.temp\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.process.temp.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.process.temp.dir\"))\n\t\t\t\t\t.andReturn(\"src/test/resources/\").anyTimes();\n\t\t}\n\n\t\t/**\n\t\t * set fusion.home\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.home\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.home\")).andReturn(\n\t\t\t\t\t\"src/test/resources/\").anyTimes();\n\t\t}\n\t}", "private void init() {\n listeners = new PropertyChangeSupport(this);\n }", "public void properties(){\n setChanged();\n notifyObservers(name);\n System.out.println(\"Name: \" + name);\n System.out.println(\"Formula: \" + FORMULA);\n System.out.println(\"Colour: \" + COLOUR);\n System.out.println(\"Streak: \" + STREAK);\n System.out.println(\"Luster: \" + LUSTER);\n System.out.println(\"Diaphaneity: \" + DIAPHANEITY);\n System.out.println(\"Cleavage: \" + CLEAVAGE);\n System.out.println(\"Crystal system: \" + CRYSTAL_SYSTEM);\n System.out.println(\"Hardness: \" + HARDNESS);\n System.out.println(\"Specific Gravity: \" + SPECIFIC_GRAVITY);\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "private DiffProperty() {\n\t\t// No implementation\n\t}", "@Override\n public void afterPropertiesSet() {\n }", "@Override\n\t\tprotected boolean initializeSpecificProperties(Component c, AWTEvent introspectionRequestEvent,\n\t\t\t\tTestEditor testEditor) {\n\t\t\tif (c instanceof CustomComponent) {\n\t\t\t\texpectpedValueOfPropertyToCheck = ((CustomComponent) c).propertyToCheck;\n\t\t\t\tnewValueOfPropertyToChange = ((CustomComponent) c).propertyToChange + 1;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public ReflectMonitor() {\n boundSupport = new PropertyChangeSupport(this);\n }", "@BeforeTest\n\t\tpublic void propCalling() throws IOException\n\t\t{\n\t\t\t\n\t\t\tIntializingProperties();\n\t\t}", "public void enablePropertyAlive()\n {\n iPropertyAlive = new PropertyBool(new ParameterBool(\"Alive\"));\n addProperty(iPropertyAlive);\n }", "@Before(order=0)\n\tpublic void getProperty() {\n\t\tconfigReader = new ConfigReaders();\n\t\tprop = configReader.init_prop();\n\t\t\n\t}", "public traceProperties() { \n //setProperty(\"WorkingDirectory\",\"null\");\n //setProperty(\"situated\",\"false\"); \n \n }", "public void afterPropertiesSet() {\r\n\t}", "public void initEventsAndProperties() {\r\n }", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void creightonIsExtraSpecial() {\n\t\tHashMap<String, Object> partToStatus = new HashMap<String, Object>();\n\t\t\n\t\tpartToStatus.put(\"autoTime\", autoTime);\n\t\tpartToStatus.put(\"matchTime\", matchTime);\n\t\t\n\t\tpartToStatus.get(\"autoTime\");\n\t\t\n\t\t\n\t}", "private static HashMap<String, DefinedProperty> initDefinedProperties() {\n\t\tHashMap<String, DefinedProperty> newList = new HashMap<String, DefinedProperty>();\n\t\t// common properties\n\t\taddProperty(newList, \"name\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"desc\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\t// implicit default properties\n\t\taddProperty(newList, \"donttest\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"dontcompare\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\t// interface properties\n\t\taddProperty(newList, \"use_interface\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"use_new_interface\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\t// reg + regset properties\n\t\taddProperty(newList, \"js_superset_check\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"external\", DefinedPropertyType.SPECIAL, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"repcount\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t// regset only properties\n\t\taddProperty(newList, \"js_macro_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_macro_mode\", DefinedPropertyType.STRING, \"STANDARD\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_namespace\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_typedef_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_repeat\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET, false, false);\n\t\t// reg only properties\n\t\taddProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"aliasedId\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, true, false); // hidden\n\t\taddProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_is_mem\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"cppmod_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\t// signal properties\n\t\taddProperty(newList, \"cpuif_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"field_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activehigh\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activelow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"signalwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.SIGNAL, false, false);\n\t\t// fieldset only properties\n\t\taddProperty(newList, \"fieldstructwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.FIELDSET, false, false);\n\t\t// field properties\n\t\taddProperty(newList, \"rset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"we\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"wel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwe\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swmod\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swacc\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sticky\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"stickybit\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"intr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"anded\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"ored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"xored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"counter\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"overflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"fieldwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"singlepulse\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"underflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"saturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"threshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"precedence\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"encode\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"resetsignal\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"mask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"enable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltmask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltenable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"halt\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"next\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextposedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextnegedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"maskintrbits\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false); \n\t\taddProperty(newList, \"satoutput\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sub_category\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rtl_coverage\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\t\n\t\t// override allowed property set if input type is jspec\n\t\tif (Ordt.hasInputType(Ordt.InputType.JSPEC)) {\n\t\t\tputProperty(newList, \"sub_category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG | DefinedProperty.FIELDSET | DefinedProperty.FIELD, false, false);\n\t\t\tputProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"address\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"arrayidx1\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t\tputProperty(newList, \"addrinc\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t}\t\t\n\n\t\treturn newList;\n\t}", "private PropertyHolder() {\n }", "private void logProperties() {\n log.info(\"externalPropertiesConfiguration::whoAmI = {}\", this.externalPropertiesConfiguration.getWhoAmI());\n log.info(\"externalPropertiesConfiguration::propertyOne = {}\", this.externalPropertiesConfiguration.getPropertyOne());\n log.info(\"externalPropertiesConfiguration::propertyTwo = {}\", this.externalPropertiesConfiguration.getPropertyTwo());\n log.info(\"externalPropertiesConfiguration::propertyThree = {}\", this.externalPropertiesConfiguration.getPropertyThree());\n log.info(\"externalPropertiesConfiguration::propertyFour = {}\", this.externalPropertiesConfiguration.getPropertyFour());\n\n log.info(\"anotherPropertiesConfiguration::whoAmI = {}\", this.anotherPropertiesConfiguration.getWhoAmI());\n log.info(\"anotherPropertiesConfiguration::propertyOne = {}\", this.anotherPropertiesConfiguration.getPropertyOne());\n log.info(\"anotherPropertiesConfiguration::propertyTwo = {}\", this.anotherPropertiesConfiguration.getPropertyTwo());\n log.info(\"anotherPropertiesConfiguration::propertyThree = {}\", this.anotherPropertiesConfiguration.getPropertyThree());\n log.info(\"anotherPropertiesConfiguration::propertyFour = {}\", this.anotherPropertiesConfiguration.getPropertyFour());\n }", "private void addProperties() {\n\t\tfor (PropertyGenerator pg : this.getPropertyGenerators()) {\n\t\t\tpg.generate();\n\t\t\tthis.enqueuePropertyTypeIfNeeded(pg);\n\t\t\tthis.addToSubBindingsIfNeeded(pg);\n\t\t}\n\t}", "public TestProperties() {\n\t\tthis.testProperties = new Properties();\n\t}", "public static void prtProperties() {\n prop.list(System.out);\n }", "@Test\n public final void updateReminder() {\n int currentNumberOfPropertiesOnUser = 18;\n assertThat(User.class.getDeclaredFields().length).isEqualTo(currentNumberOfPropertiesOnUser);\n }", "void initProperties()\n\t{\n\t\tpropertyPut(LIST_SIZE, 10);\n\t\tpropertyPut(LIST_LINE, 1);\n\t\tpropertyPut(LIST_MODULE, 1); // default to module #1\n\t\tpropertyPut(COLUMN_WIDTH, 70);\n\t\tpropertyPut(UPDATE_DELAY, 25);\n\t\tpropertyPut(HALT_TIMEOUT, 7000);\n\t\tpropertyPut(BPNUM, 0);\t\t\t\t// set current breakpoint number as something bad\n\t\tpropertyPut(LAST_FRAME_DEPTH, 0);\t\t// used to determine how much context information should be displayed\n\t\tpropertyPut(CURRENT_FRAME_DEPTH, 0); // used to determine how much context information should be displayed\n\t\tpropertyPut(DISPLAY_FRAME_NUMBER, 0); // houses the current frame we are viewing\n\t\tpropertyPut(FILE_LIST_WRAP, 999999); // default 1 file name per line\n\t\tpropertyPut(NO_WAITING, 0);\n\t\tpropertyPut(INFO_STACK_SHOW_THIS, 1); // show this pointer for info stack\n\t}", "private void initReservedAttributes()\n {\n addIgnoreProperty(ATTR_IF_NAME);\n addIgnoreProperty(ATTR_REF);\n addIgnoreProperty(ATTR_UNLESS_NAME);\n addIgnoreProperty(ATTR_BEAN_CLASS);\n addIgnoreProperty(ATTR_BEAN_NAME);\n }", "public void test1_5Properties() throws Exception {\n getReverb(0);\n try {\n EnvironmentalReverb.Settings settings = mReverb.getProperties();\n String str = settings.toString();\n settings = new EnvironmentalReverb.Settings(str);\n short level = (short)((settings.roomLevel == 0) ? -1000 : 0);\n settings.roomLevel = level;\n mReverb.setProperties(settings);\n settings = mReverb.getProperties();\n assertTrue(\"setProperties failed\",\n (settings.roomLevel >= (level - MILLIBEL_TOLERANCE)) &&\n (settings.roomLevel <= (level + MILLIBEL_TOLERANCE)));\n } catch (IllegalArgumentException e) {\n fail(\"Bad parameter value\");\n } catch (UnsupportedOperationException e) {\n fail(\"get parameter() rejected\");\n } catch (IllegalStateException e) {\n fail(\"get parameter() called in wrong state\");\n } finally {\n releaseReverb();\n }\n }", "private void iterativeDataPropertyMetrics() {\n\t}", "public void willbeUpdated() {\n\t\t\n\t}", "public boolean getPropertyAlive();", "@Test\r\n\tpublic void testChangesNotification() throws Exception {\r\n\t\tfinal AdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tfinal XMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider\r\n\t\t\t\t.getInstance().getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\tIChangesNotifierMonitor monitorMock = createMock(IChangesNotifierMonitor.class);\r\n\r\n\t\tmonitorMock.objectChanged(same(container), isA(ObjectChangedEvent.class));\r\n\t\texpectLastCall().once();\r\n\r\n\t\treplay(monitorMock);\r\n\r\n\t\tcontainer.addMonitor(monitorMock);\r\n\t\t// Won't work, because \"intProperty\" is served by XMLSetterGetterProperty which doesn't support monitoring.\r\n\t\t// container.getProperty(\"intProperty\").setValue(3);\r\n\t\t// Works, because \"floatProperty\" is served by XMLFieldProperty which support monitoring.\r\n\t\tcontainer.getProperty(\"floatProperty\").setValue(3);\r\n\t\tverify(monitorMock);\r\n\r\n\t}", "public ApplyUpdateProperties() {\n }", "public void testProperties(){\n \n if (parent == null)\n return;\n \n tests(parent);\n \n if (testSettings.AP_mnemonics){\n \n //- LOG ONLY - list of conflicts before cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n cleanMnemonicsConflict();\n \n // LOG ONLY - list of conflicts after cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS after clean up = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n }\n \n if (testSettings.AP_noLabelFor)\n checkLabelTextComponentPairs();\n }", "private ReadProperty()\r\n {\r\n\r\n }", "private void processWatchers(MethodSpec.Builder createdMethodBuilder) {\n createdMethodBuilder\n .addStatement(\"Proto p = $T.cast(vue().$L().getComponentExportedTypePrototype())\",\n Js.class, \"$options\");\n getMethodsWithAnnotation(component, Watch.class)\n .forEach(method -> processWatcher(createdMethodBuilder, method));\n }", "public void analyseRecentPropertyChanges() {\r\n\t\tboolean enableIndexGeneration = !isDeActivatedHovering();\r\n\t\tboolean requiresIndexGeneration = false;\r\n\t\tif (changedProperties.size() == 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tSet<String> keySet = changedProperties.keySet();\r\n\t\tfor (String property : keySet) {\r\n\r\n\t\t\t// If deactivated checkbox is changed\r\n\t\t\tif (property.equals(HoverConstants.PREFERENCE_DEACTIVATE_HOVERING)) {\r\n\t\t\t\tPropertyChangeEvent event = changedProperties\r\n\t\t\t\t\t\t.get(HoverConstants.PREFERENCE_DEACTIVATE_HOVERING);\r\n\t\t\t\tboolean deActivated = (Boolean) event.getNewValue();\r\n\t\t\t\tLogger.logDebug(\"DeActivated Old value\" + event.getOldValue()\r\n\t\t\t\t\t\t+ \" new value\" + event.getNewValue());\r\n\t\t\t\tif (deActivated) {\r\n\t\t\t\t\tHoverManager.getInstance().setEnabled(false);\r\n\t\t\t\t\tenableIndexGeneration = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tenableIndexGeneration = true;\r\n\t\t\t\t\trequiresIndexGeneration = true;\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// if active developer library item has changed\r\n\t\t\tif (property.equals(HoverConstants.PREFERENCE_DEV_LIB_LOC)) {\r\n\t\t\t\tPropertyChangeEvent event = changedProperties\r\n\t\t\t\t\t\t.get(HoverConstants.PREFERENCE_DEV_LIB_LOC);\r\n\t\t\t\tString oldValue = (String) event.getOldValue();\r\n\t\t\t\tString newValue = (String) event.getNewValue();\r\n\t\t\t\tif (oldValue.equals(newValue)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\trequiresIndexGeneration = true;\r\n\t\t\t\tLogger.logDebug(\"New index is generating. Old value\"\r\n\t\t\t\t\t\t+ event.getOldValue() + \" new value\"\r\n\t\t\t\t\t\t+ event.getNewValue());\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tLogger.logDebug(\"enableIndexGeneration:\" + enableIndexGeneration\r\n\t\t\t\t+ \" requiresIndexGeneration:\" + requiresIndexGeneration);\r\n\t\tif (enableIndexGeneration && requiresIndexGeneration) {\r\n\t\t\tLogger.logDebug(\"before gen index\");\r\n\t\t\tgenerateNewIndex();\r\n\t\t\tLogger.logDebug(\"after gen index\");\r\n\t\t}\r\n\r\n\t\tresetChangedProperties();\r\n\t}", "protected void validateAndSetValues()\n\t\t{\n\t\t\tif (null == eventDispatcher)\n\t\t\t{\n\t\t\t\teventDispatcher = new DefaultEventDispatcher();\n\t\t\t}\n\t\t\tif (null == sessionAttributes)\n\t\t\t{\n\t\t\t\tsessionAttributes = new HashMap<String, Object>();\n\t\t\t}\n\t\t\tif (null == reconnectPolicy)\n\t\t\t{\n\t\t\t\treconnectPolicy = ReconnectPolicy.NO_RECONNECT;\n\t\t\t}\n\t\t\tcreationTime = System.currentTimeMillis();\n\t\t}", "protected Expectations() {\n RecordAndReplayExecution execution = new RecordAndReplayExecution(this, (Object[]) null);\n //noinspection ConstantConditions\n currentPhase = execution.getRecordPhase();\n }", "void updatedProperty(TestResult tr, String name, String value);", "public interface ObjectPropConstants {\n\n /**\n * A property key for models used to store the last-modified time stamp.\n * <p>\n * Type: A time stamp, encoded using ISO 8601. (Can be parsed using {@code java.time.Instant}.)\n * </p>\n */\n String MODEL_FILE_LAST_MODIFIED = \"tcs:modelFileLastModified\";\n /**\n * A property key for the orientation of a vehicle on a path.\n * <p>\n * Type: String (any string - details currently not specified)\n * </p>\n *\n * @deprecated Will be removed.\n */\n @Deprecated\n @ScheduledApiChange(when = \"5.0\", details = \"Will be removed.\")\n String PATH_TRAVEL_ORIENTATION = \"tcs:travelOrientation\";\n /**\n * A property key for {@link VisualLayout} instances used to provide a hint for which\n * {@link LocationTheme} implementation should be used for rendering locations in the\n * visualization client.\n * <p>\n * Type: String (the fully qualified class name of an implementation of {@link LocationTheme})\n * </p>\n *\n * @deprecated The theme to be used is now set directly via configuration.\n */\n @Deprecated\n @ScheduledApiChange(when = \"5.0\", details = \"Will be removed.\")\n String LOCATION_THEME_CLASS = \"tcs:locationThemeClass\";\n /**\n * A property key for {@link LocationType} instances used to provide a hint for the visualization\n * how locations of the type should be visualized.\n * <p>\n * Type: String (any element of {@link LocationRepresentation})\n * </p>\n */\n String LOCTYPE_DEFAULT_REPRESENTATION = \"tcs:defaultLocationTypeSymbol\";\n /**\n * A property key for {@link Location} instances used to provide a hint for the visualization how\n * the locations should be visualized.\n * <p>\n * Type: String (any element of {@link LocationRepresentation})\n * </p>\n */\n String LOC_DEFAULT_REPRESENTATION = \"tcs:defaultLocationSymbol\";\n /**\n * A property key for {@link Vehicle} instances to store a preferred initial position to be used\n * by simulating communication adapter, for example.\n * <p>\n * Type: String (any name of a {@link Point} existing in the same model.\n * </p>\n * \n * @deprecated Use vehicle driver-specific properties to specify the vehicle's initial position.\n */\n @Deprecated\n @ScheduledApiChange(when = \"5.0\", details = \"Will be removed.\")\n String VEHICLE_INITIAL_POSITION = \"tcs:initialVehiclePosition\";\n /**\n * A property key for {@link VisualLayout} instances used to provide a hint for which\n * {@link VehicleTheme} implementation should be used for rendering vehicles in the visualization\n * client.\n * <p>\n * Type: String (the fully qualified class name of an implementation of {@link VehicleTheme})\n * </p>\n *\n * @deprecated The theme to be used is now set directly via configuration.\n */\n @Deprecated\n @ScheduledApiChange(when = \"5.0\", details = \"Will be removed.\")\n String VEHICLE_THEME_CLASS = \"tcs:vehicleThemeClass\";\n}", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n AspectRatio aspectRatio0 = homeEnvironment0.getVideoAspectRatio();\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.WALLS_ALPHA;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"eH]^40[h2\", propertyChangeListener0);\n PropertyChangeEvent propertyChangeEvent0 = new PropertyChangeEvent(homeEnvironment_Property0, \"eH]^40[h2\", (Object) null, homeEnvironment0);\n propertyChangeEvent0.setPropagationId(propertyChangeListenerProxy0);\n propertyChangeEvent0.toString();\n propertyChangeListenerProxy0.propertyChange(propertyChangeEvent0);\n PropertyChangeEvent propertyChangeEvent1 = new PropertyChangeEvent(propertyChangeListenerProxy0, \"{@sDvCJq(i\", aspectRatio0, \"eH]^40[h2\");\n propertyChangeEvent1.toString();\n propertyChangeListenerProxy0.propertyChange(propertyChangeEvent1);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n URL uRL0 = MockURL.getFtpExample();\n TemporaryURLContent temporaryURLContent0 = new TemporaryURLContent(uRL0);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"eH]^40[h2\", temporaryURLContent0, (-1942.4762F), 1805.02F, \"\", true);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n homeEnvironment0.setSkyTexture(homeTexture0);\n homeEnvironment0.setWallsAlpha((-1942.4762F));\n homeEnvironment0.setGroundColor(0);\n homeEnvironment0.getPhotoAspectRatio();\n homeEnvironment0.getGroundColor();\n HomeEnvironment.Property homeEnvironment_Property1 = HomeEnvironment.Property.WALLS_ALPHA;\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property1, propertyChangeListenerProxy0);\n homeEnvironment0.getPhotoWidth();\n homeEnvironment0.setAllLevelsVisible(true);\n homeEnvironment0.setGroundColor(0);\n assertTrue(homeEnvironment0.isAllLevelsVisible());\n }", "@Override\n public void afterPropertiesSet() {\n validateProperties();\n }", "private StateChangeMonitor() {\n\t\t// Create the registry of StateChangeListeners\n\t\tlisteners = new Hashtable();\n\t}", "public void initProperties() {\n propAssetClass = addProperty(AssetComponent.PROP_CLASS, \"MilitaryOrganization\");\n propAssetClass.setToolTip(PROP_CLASS_DESC);\n propUniqueID = addProperty(AssetComponent.PROP_UID, \"UTC/RTOrg\");\n propUniqueID.setToolTip(PROP_UID_DESC);\n propUnitName = addProperty(AssetComponent.PROP_UNITNAME, \"\");\n propUnitName.setToolTip(PROP_UNITNAME_DESC);\n propUIC = addProperty(PROP_UIC, \"\");\n propUIC.setToolTip(PROP_UIC_DESC);\n }", "public void postConstruct() {\n if(jc != null && jc.getJvmOptions() != null) {\n oldProps = new ArrayList<String>(jc.getJvmOptions()); //defensive copy\n \n oldAttrs = collectAttrs(jc);\n }\n }", "private PropertiesUtils() {}", "public void detectAndSendChanges() {\n\t\tsuper.detectAndSendChanges();\n\n\t\tfor (int i = 0; i < this.listeners.size(); ++i) {\n\t\t\tIContainerListener containerListener = this.listeners.get(i);\n\n\t\t\tif (this.burnTime != this.inventory.getField(TileEntityGenerator.FIELD_BURN_TIME)) {\n\t\t\t\tcontainerListener.sendWindowProperty(this, TileEntityGenerator.FIELD_BURN_TIME,\n\t\t\t\t\t\tthis.inventory.getField(TileEntityGenerator.FIELD_BURN_TIME));\n\t\t\t}\n\n\t\t\tif (this.currentItemBurnTime != this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME)) {\n\t\t\t\tcontainerListener.sendWindowProperty(this, TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME,\n\t\t\t\t\t\tthis.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME));\n\t\t\t}\n\n\t\t\tif (this.curEnergy != this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ENERGY)) {\n\t\t\t\tcontainerListener.sendWindowProperty(this, TileEntityGenerator.FIELD_CURRENT_ENERGY,\n\t\t\t\t\t\tthis.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ENERGY));\n\t\t\t}\n\t\t}\n\n\t\tthis.burnTime = this.inventory.getField(TileEntityGenerator.FIELD_BURN_TIME);\n\t\tthis.currentItemBurnTime = this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME);\n\t\tthis.curEnergy = this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ENERGY);\n\t}", "void addPropertyCB(int property) {\n properties_[property].logNum++;\n properties_[property].logTotal++;\n }", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor((-733));\n homeEnvironment0.setPhotoHeight(0);\n homeEnvironment0.setVideoFrameRate(0);\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"Content isn't a JAR entry\", propertyChangeListener0);\n PropertyChangeListenerProxy propertyChangeListenerProxy1 = new PropertyChangeListenerProxy(\"Content isn't a JAR entry\", propertyChangeListenerProxy0);\n homeEnvironment0.setPhotoHeight(0);\n assertEquals(0, homeEnvironment0.getVideoFrameRate());\n }", "Properties modifyProperties(Properties properties);", "protected boolean isMultiplePropertiesChanging() {\n return multiplePropertiesChanging;\n }", "public java.lang.String getNewProperty_description(){\n return localNewProperty_description;\n }", "public void setupConvenienceObjects();", "protected Map<String, Object> getAdditionalProperties()\n {\n return additionalProperties;\n }", "private void updateVars()\n {\n\n }", "private PropertiesHelper() {\n throw new AssertionError(\"Cannot instantiate this class\");\n }", "public interface PropertyManager extends Manager {\n\t/**\n\t * The attribute \"attr\" has been added (instantiated for the first time).\n\t * \n\t * @param component\n\t * . The component (Spec, Implem, Instance) holding that\n\t * attribute.\n\t * @param attr\n\t * . The attribute name.\n\t * @param newValue\n\t * . The new value of that attribute.\n\t */\n\tpublic void attributeAdded(Component component, String attr, String newValue);\n\n\t/**\n\t * The attribute \"attr\" has been modified.\n\t * \n\t * @param component\n\t * . The component (Spec, Implem, Instance) holding that\n\t * attribute.\n\t * @param attr\n\t * . The attribute name.\n\t * @param newValue\n\t * . The new value of that attribute.\n\t * @param oldValue\n\t * . The previous value of that attribute.\n\t */\n\tpublic void attributeChanged(Component component, String attr, String newValue, String oldValue);\n\n\t/**\n\t * The attribute \"attr\" has been removed.\n\t * \n\t * @param component\n\t * . The component (Spec, Implem, Instance) holding that\n\t * attribute.\n\t * @param attr\n\t * . The attribute name.\n\t * @param oldValue\n\t * . The previous value of that attribute.\n\t */\n\tpublic void attributeRemoved(Component component, String attr, String oldValue);\n}", "public\tvoid\tsetAddedProperties(List<JsClass.Property> addedProperties) {\n\t\tthis.addedProperties = addedProperties;\n\t}", "public static void loadProperties() {\r\n\t\tif (!isLoaded) {\r\n\t\t\tnew BCProperties() ;\r\n\t\t\tisLoaded = true ;\r\n\t\t}\r\n\t}", "protected BaseTestObject()\n {\n\n fProp = new Properties(); // empty properties object\n fLog = TestLogger.getInstance(); // default level is DEBUG\n\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(false);\n homeEnvironment0.setPhotoQuality(2377);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"H3Z\", \"H3Z\", (Content) null, (-1063.9532F), (-1.0F), \"H3Z\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n homeEnvironment0.setGroundTexture(homeTexture0);\n Object object0 = new Object();\n Object object1 = new Object();\n PropertyChangeEvent propertyChangeEvent0 = new PropertyChangeEvent(object0, \"H3Z\", object1, homeEnvironment0);\n propertyChangeEvent0.setPropagationId(homeTexture0);\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"QXhr@xq\", propertyChangeListener0);\n propertyChangeListenerProxy0.propertyChange(propertyChangeEvent0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.GROUND_TEXTURE;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n HomeEnvironment homeEnvironment1 = new HomeEnvironment();\n homeEnvironment1.setAllLevelsVisible(false);\n homeEnvironment1.setGroundColor(1614);\n homeEnvironment1.setCeillingLightColor(12);\n homeEnvironment0.setPhotoQuality(2292);\n homeEnvironment1.setPhotoHeight(3273);\n assertEquals(12, homeEnvironment1.getCeillingLightColor());\n \n HomeEnvironment homeEnvironment2 = new HomeEnvironment();\n int int0 = homeEnvironment2.getVideoQuality();\n assertEquals(0, int0);\n }", "DispatchingProperties() {\r\n\t\tsuper();\r\n\t\t// if (handler != null) {\r\n\t\t// throw new\r\n\t\t// RuntimeException(\"ServicePropertiesHandler: class already instantiated!\");\r\n\t\t// }\r\n\t\t// handler = this;\r\n\t}", "public void _getProperties() {\n Property[] properties = oObj.getProperties();\n IsThere = properties[0];\n tRes.tested(\"getProperties()\", ( properties != null ));\n return;\n }", "@Test\n\tpublic void testGettersAndSetters() {\n\t\tnew BeanTester().testBean(ShortestPathOutput.class, configuration);\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tSystem.out.println(\"After Properties Set\");\n\t\t\n\t}", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingObjectsThatAreAlreadyPersistent() {\n }", "@Override\n public void afterPropertiesSet() throws Exception {\n GuavaCacheMetrics.monitor(\n registry,\n cache,\n \"serialLookupCache\",\n Collections.singleton(Tag.of(StoreMetrics.TAG_STORE_KEY, StoreMetrics.TAG_STORE_VALUE)));\n }", "public\n YutilProperties()\n {\n super(new Properties());\n }", "@Test\n\tpublic void testPublicInstanceVars() {\n\t\tip = new ImagePlus();\n\t\tassertFalse(ip.changes);\n\t\t/* OBSOLETE\n\t\tassertEquals(1.0,ip.pixelHeight,0.0);\n\t\tassertEquals(1.0,ip.pixelWidth,0.0);\n\t\tassertEquals(\"pixel\",ip.unit);\n\t\tassertEquals(\"pixel\",ip.units);\n\t\tassertFalse(ip.sCalibrated);\n\t\t*/\n\t}", "public\tList<JsClass.Property>\tgetAddedProperties() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.addedProperties);\n\t}", "@Override\n\tpublic void propertyChange() {\n\t\tthis.apply();\n\t}", "private mxPropertiesManager()\n\t{\n\t}", "@Test\n public void gettersAndSettersShouldWorkForEachProperty() {\n assertThat(AssignForceBatch.class, hasValidGettersAndSetters());\n }", "protected List getProperties() {\n return null;\n }", "private CNWatch() {\n }", "public java.lang.String getOldProperty_description(){\n return localOldProperty_description;\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFields() {\n }", "private synchronized void readProperties()\n {\n \n String workPath = \"webserver\";\n try\n {\n workPath = (String) SageTV.api(\"GetProperty\", new Object[]{\"nielm/webserver/root\",\"webserver\"});\n }\n catch (InvocationTargetException e)\n {\n System.out.println(e);\n }\n \n // check if called within 30 secs (to prevent to much FS access)\n if (fileLastReadTime + 30000 > System.currentTimeMillis())\n {\n return;\n }\n\n // check if file has recently been loaded\n File propsFile=new File(workPath,\"extenders.properties\");\n if (fileLastReadTime >= propsFile.lastModified())\n {\n return;\n }\n\n if (propsFile.canRead())\n {\n BufferedReader in = null;\n contextNames.clear();\n try\n {\n in = new BufferedReader(new FileReader(propsFile));\n String line;\n Pattern p = Pattern.compile(\"([^=]+[^=]*)=(.*)\");\n while (null != (line = in.readLine()))\n {\n line = line.trim();\n if ((line.length() > 0) && (line.charAt(0) != '#'))\n {\n Matcher m =p.matcher(line.trim());\n if (m.matches())\n {\n contextNames.put(m.group(1).trim(), m.group(2).trim());\n }\n else\n {\n System.out.println(\"Invalid line in \"+propsFile+\"\\\"\"+line+\"\\\"\");\n }\n }\n }\n fileLastReadTime=System.currentTimeMillis();\n\n }\n catch (IOException e)\n {\n System.out.println(\"Exception occurred trying to load properties file: \"+propsFile+\"-\" + e);\n }\n finally\n {\n if (in != null)\n {\n try\n {\n in.close();\n }\n catch (IOException e) {}\n }\n }\n } \n }", "protected PropertyChangeSupport getPropertyChange() {\r\n\t\tif (propertyChange == null) {\r\n\t\t\tpropertyChange = new PropertyChangeSupport(this);\r\n\t\t}\r\n\t\t;\r\n\t\treturn propertyChange;\r\n\t}", "private PipelineJobPropertiesUpdate innerProperties() {\n return this.innerProperties;\n }", "@Override\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "private static void collectReadableProperties(Map<String, PojoProperty> map,\n Class<?> cls) {\n for (final Method m : cls.getDeclaredMethods()) {\n //if (isStaticOrPrivate(m)) continue;\n if (isStatic(m.getModifiers())) continue;\n if (1 != m.getParameterTypes().length)// get=0,set=1\n continue;\n Class<?> returnType = m.getReturnType();\n if (returnType == Object.class || returnType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n Class<?> propType = m.getParameterTypes()[0];\n if (returnType == Void.TYPE && propType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n\n String name = m.getName();\n String propName = null;\n String originalPropName = null;\n boolean isBool = false;\n if (name.startsWith(\"set\") && name.length() > 3) {\n originalPropName = name.substring(3);\n propName = decapitalize(originalPropName, true);\n if (propType == Boolean.TYPE) {\n isBool = true;\n }\n }\n if (propName == null) continue;\n\n String getMethodName = (isBool ? \"is\" : \"get\") + originalPropName;\n try {\n Field field;\n try {\n field = cls.getDeclaredField(propName);\n } catch (NoSuchFieldException e) {\n propName = decapitalize(originalPropName, false);\n field = cls.getDeclaredField(propName);\n }\n if (map.containsKey(propName))\n continue;\n\n m.setAccessible(true);\n Method getMethod;\n getMethod = cls.getDeclaredMethod(getMethodName);\n getMethod.setAccessible(true);\n\n PojoProperty rp = new PojoProperty(propName, propType);\n rp.setGetMethod(getMethod);\n rp.setSetMethod(m);\n rp.setField(field);\n map.put(propName, rp);\n } catch (NoSuchMethodException | NoSuchFieldException e) {\n //e.printStackTrace();\n logger.warn(String.format(\"实体方法:%s 或 字段:%s 不存在\", getMethodName, propName));\n }\n }\n\n for (final Field m : cls.getDeclaredFields()) {\n //if (isStaticOrPrivate(m)) continue;\n if(isStatic(m.getModifiers())) continue;\n String propName = m.getName();\n if (map.containsKey(propName)) continue;\n Class<?> returnType = m.getType();\n m.setAccessible(true);\n PojoProperty rp = new PojoProperty(propName, returnType);\n rp.setField(m);\n map.put(propName, rp);\n }\n }", "@Test\n\tpublic void addProperty() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\t\tXMLTagParser.editElement(\"Person\", \"residence\", \"milan\");\n\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"isRenting\", \"false\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"isRenting\"), \"false\");\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"hasGarage\", \"true\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"hasGarage\"), \"true\");\n\t}", "@Override public void addImpliedProperties(UpodPropertySet ups)\n{\n}", "@Before\n public void setUp() {\n meter = new Meter<Events>(Events.values());\n //// set up some metrics that you want to track\n // sum of all puts to the read counter (total bytes read)\n meter.addCountMetric(Events.bytes_read, \"totalBytesReceived\");\n // max read size\n meter.addMaxMetric(Events.bytes_read, \"maxReadSize\");\n // average read size\n meter.addAverageMetric(Events.bytes_read, \"avgReadSize\");\n // rate metric = count / time since last reset (bytes read per second)\n meter.addRateMetric(Events.bytes_read, \"inBPS\");\n }", "@Test\n public void testAddPropertyChangeListener() {\n // trivial\n }", "@Test\n public void propertyTest() throws Exception {\n String unMatchedTriples = \"\";\n StmtIterator msIter = propertyMeasuringStick.listStatements();\n while (msIter.hasNext()) {\n Statement msStmt = msIter.nextStatement();\n // TODO: find a more formal way to filter out properties we don't need to test\n if (!msStmt.getPredicate().toString().equals(\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\") &&\n !msStmt.getPredicate().toString().equals(\"http://www.w3.org/2000/01/rdf-schema#subPropertyOf\")) {\n StmtIterator poIter = propertyOutput.listStatements();\n boolean match = false;\n while (poIter.hasNext()) {\n Statement outputStmt = poIter.nextStatement();\n if (outputStmt.equals(msStmt)) {\n match = true;\n }\n }\n // If a match is not found then set this statement.\n if (!match) {\n unMatchedTriples += msStmt.getSubject() + \" \" + msStmt.getPredicate().toString() + \" \" + msStmt.getObject().toString() + \" .\\n\";\n }\n }\n }\n // Output assertion with message of results\n if (!unMatchedTriples.equals(\"\"))\n assertTrue(\"\\nThe following triples ARE in \" + propertyOutputFileName + \" but NOT in propertyMeasuringStick.n3:\\n\" + unMatchedTriples\n , false);\n else\n assertTrue(true);\n\n }" ]
[ "0.65111107", "0.64706755", "0.6119967", "0.6006674", "0.5982734", "0.5765774", "0.57408184", "0.5739519", "0.5725404", "0.5701896", "0.56918347", "0.5662985", "0.5656729", "0.5646947", "0.55878204", "0.5578727", "0.55282545", "0.55035204", "0.54795057", "0.54795057", "0.54795057", "0.54795057", "0.54795057", "0.54795057", "0.54795057", "0.54795057", "0.5477393", "0.54701847", "0.5422944", "0.53959775", "0.53680503", "0.53568083", "0.534181", "0.5337271", "0.5319383", "0.5302429", "0.52973336", "0.52846783", "0.5275105", "0.5250357", "0.5248381", "0.52408814", "0.5211002", "0.5196674", "0.51924074", "0.5184948", "0.51647705", "0.515167", "0.51460683", "0.5126935", "0.51233524", "0.512278", "0.5118274", "0.51000774", "0.5099759", "0.5096978", "0.5096743", "0.5089839", "0.50795406", "0.50795406", "0.50795406", "0.50644714", "0.5064055", "0.5060496", "0.50553656", "0.50485075", "0.50430596", "0.5038523", "0.5034651", "0.502814", "0.5027485", "0.5026609", "0.50255483", "0.50245816", "0.501816", "0.50087273", "0.5008727", "0.5007385", "0.50062275", "0.5005092", "0.50050884", "0.50044763", "0.50026023", "0.50009394", "0.49947843", "0.49884316", "0.4980019", "0.49671954", "0.49651292", "0.49648166", "0.4964162", "0.49638414", "0.4963705", "0.49479255", "0.4943215", "0.49374807", "0.49358264", "0.49303287", "0.4920169", "0.49188256", "0.49152997" ]
0.0
-1
Fetch filial by id.
public InternalResultsResponse<Filial> fetchFilialById(FilialRequest filialRequest);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InternalResultsResponse<Funcionario> fetchFuncionarioById(FetchByIdRequest request);", "@GetMapping(\"/fretes/{id}\")\n\tpublic ResponseEntity<?> findById(@PathVariable(\"id\") Integer id) {\n\t\treturn freteRepo.findById(id).map(record -> ResponseEntity.ok().body(record))\n\t\t\t\t.orElse(ResponseEntity.notFound().build());\n\t}", "@Override\r\n\tpublic Food getFoodById(int id) {\n\t\tString sql=\"select * from food where id=?\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class,id);\r\n\t\tif(list.size()>0) {\r\n\t\t\treturn list.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic File getById(long id) {\n\t\treturn getSession().find(File.class, id);\n\t}", "@Override\n\tpublic FileModel getId(Long id) {\n\t\treturn fm.getOne(id);\n\t}", "public Aflevering read(String id) {\n Aflevering aflevering= null;\n try\n {\n String sqlQuery = \"SELECT * FROM AFLEVERING WHERE ID=\" + id;\n ResultSet rs = sqlConnection.executeSql(sqlQuery);\n rs.next();\n aflevering = new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\"));\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return aflevering;\n }", "public Fichier getFichier(int id) throws SQLException {\n\t\tString query = SQLQueries.GET_FICHIER_QUERY + id;\n\t\tResultSet rs = null;\n\t\tFichier fichier = null;\n\t\ttry {\n\t\t\tconnection = Connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(query);\n\t\t\tif (rs.next()) {\n\t\t\t\tfichier = new Fichier();\n\t\t\t\tfichier.setNom_fichier(rs.getString(\"nom_fichier\"));\n\t\t\t\tfichier.setDate_fichier(rs.getDate(\"date_fichier\"));\n\t\t\t\tfichier.setCommentaire(rs.getString(\"commentaire\"));\n\t\t\t\tfichier.setId_matiere(rs.getInt(\"id_matiere\"));\n\t\t\t\tfichier.setFichier(rs.getBytes(\"fichier\"));\n\t\t\t}\n\t\t} finally {\n\t\t\tif (statement != null)\n\t\t\t\tstatement.close();\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t}\n\t\treturn fichier;\n\t}", "@Override\r\n\tpublic Factura findById(Long id) {\n\t\treturn facturaDao.findById(id);\r\n\t}", "@GetMapping(\"/familles/{id}\")\n public ResponseEntity<FamilleDTO> getFamille(@PathVariable Long id) {\n log.debug(\"REST request to get Famille : {}\", id);\n Optional<FamilleDTO> familleDTO = familleService.findOne(id);\n return ResponseUtil.wrapOrNotFound(familleDTO);\n }", "@GetMapping(\"/familles/{id}\")\n @Timed\n public ResponseEntity<Famille> getFamille(@PathVariable Long id) {\n log.debug(\"REST request to get Famille : {}\", id);\n Famille famille = familleService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(famille));\n }", "@Override\n\tpublic LocalRichInfo fetchByPrimaryKey(long id) {\n\t\treturn fetchByPrimaryKey((Serializable)id);\n\t}", "@Override\n public FasciaOrariaBean doRetrieveByKey(int id) throws SQLException {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setInt(1, id);\n System.out.println(\"DoRetrieveByKey\" + statement);\n ResultSet rs = statement.executeQuery();\n if (rs.next()) {\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n return bean;\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return null;\n }", "public Fournisseur find(long id) {\n\t\tFournisseur fournisseur = (Fournisseur) this.sessionFactory.getCurrentSession().load(Fournisseur.class, id);\r\n\t\tif(null != fournisseur){\r\n\t\t\tthis.sessionFactory.getCurrentSession().find(Fournisseur.class, fournisseur.getCode());\r\n\t\t\t\r\n\t\t}\r\n\t\treturn this.sessionFactory.getCurrentSession().find(Fournisseur.class, fournisseur.getCode());\r\n\t}", "@Query(\"select f from Factura f join fetch f.cliente c join fetch f.items l join fetch l.producto where f.id = ?1 \")\n\tpublic Factura fetchByIdWithClienteWithItemFacturaWithProducto(Long id);", "Receta getByIdWithImages(long id);", "@Query(\"select f from Factura f join fetch f.cliente c join fetch f.items l join fetch l.producto where f.id =?1\")\n\tpublic Factura fetchByIdWithClienteWithItemFacturaWithProducto(Long id);", "public Data findById(Object id);", "@Override\n\tpublic Factura findById(Integer id) {\n\t\treturn facturaRepository.findById(id).orElse(null);\n\t}", "@GetMapping(\"/affinites/{id}\")\n @Timed\n public ResponseEntity<Affinite> getAffinite(@PathVariable Long id) {\n log.debug(\"REST request to get Affinite : {}\", id);\n Affinite affinite = affiniteRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(affinite));\n }", "@Override\n\tpublic Food findFoodById(int id) {\n\t\treturn fb.findFoodById(id);\n\t}", "public o selectById(long id);", "EhrPersonFile selectByPrimaryKey(Long id);", "public Film getFilmById(Integer id);", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic Dorf findById(int id) {\n\t\treturn (Dorf) getSession().get(Dorf.class,id);\r\n\t}", "Flight getFlight(Long id) throws DataAccessException;", "@Override\r\n public Funcionario consultarFuncionarioPorId(long id) throws Exception {\n return rnFuncionario.consultarPorId(id);\r\n }", "FinancialManagement selectByPrimaryKey(Integer fId);", "@RequestMapping(value = \"/funcionarios/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<FuncionarioDTO> getFuncionario(@PathVariable Long id) {\n log.debug(\"REST request to get Funcionario : {}\", id);\n return Optional.ofNullable(funcionarioRepository.findOne(id))\n .map(funcionario -> new ResponseEntity<>(new FuncionarioDTO(funcionario), HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "FileSet selectByPrimaryKey(Integer id);", "@Override\n @Transactional(readOnly = true)\n public FileDTO findOne(String id) {\n log.debug(\"Request to get File : {}\", id);\n File file = fileRepository.findOne(id);\n return FileMapper.toDto(file);\n }", "public void getDetail(int id) {\n\t\t\n\t}", "@Override\n\tpublic UploadDF getById(Long id) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tUploadDF UploadDF = (UploadDF) session.get(UploadDF.class,id);\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn UploadDF;\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}", "public Artista select (int id) {\n EntityManager e = IndConnector.getConnection();\n Artista a = e.find(Artista.class, new Long(id));\n e.close();\n return a;\n }", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "public Film find(int id) {\n\t\t\n\t\tString codeFilm = null;\n\t\tString nomFilm = null;\n\t\tFilm film = new Film();\n\t\t\n\t\ttry {\n\t\t\tResultSet result = Connection.selectFrom(\"SELECT codeFilm, nomFilm \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"FROM film \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"WHERE idFilm=\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+id\n\t\t\t\t\t\t\t\t\t\t\t\t\t+\";\");\n\t\t\t\n\t\t\twhile(result.next())\n\t\t\t{\n\t\t\t\tcodeFilm = result.getString(\"codeFilm\");\n\t\t\t\tnomFilm = result.getString(\"nomFilm\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tfilm = new Film(id,codeFilm,nomFilm);\n\t\tConnection.close();\n\t\treturn film;\n\t}", "@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}", "@Transactional(readOnly = true)\n public Optional<Fonction> findOne(Long id) {\n log.debug(\"Request to get Fonction : {}\", id);\n return fonctionRepository.findById(id);\n }", "@PostAuthorize(\"hasPermission(returnObject, 'read') or hasPermission(returnObject, 'administration') \")\n public File findById(long id) {\n Optional<File> file = fileRepository.findById(id);\n return file.orElse(null);\n }", "public File findOne(String id) {\n\t\treturn fileDAO.selectOneById(id);\n\t}", "@Override\n\tpublic DataResult<Photo> getById(int id) {\n\t\treturn new SuccessDataResult<Photo>(this.photoDao.getById(id));\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<FonctionsDTO> findOne(Long id) {\n log.debug(\"Request to get Fonctions : {}\", id);\n return fonctionsRepository.findById(id)\n .map(fonctionsMapper::toDto);\n }", "@Override\n public Meal findById(long id) throws SQLException {\n String sql = \"SELECT * FROM meals WHERE id = \" + id;\n System.out.println(sql);\n ResultSet rs = _sqliteConnection.getCall(sql);\n return new Meal(rs.getLong(\"id\")\n , rs.getInt(\"foodId\")\n , rs.getInt(\"mealTypeId\")\n , rs.getLong(\"locationId\")\n , rs.getLong(\"amount\")\n , rs.getLong(\"calories\")\n , rs.getLong(\"fat\")\n , rs.getLong(\"carbohydrate\")\n , rs.getLong(\"salt\")\n , rs.getLong(\"protein\")\n , rs.getInt(\"isConsumed\")\n , LocalDateTime.parse(rs.getString(\"dateTime\"))\n );\n }", "@Override\n\tpublic Facture findById(int id) {\n\t\treturn null ;\n\t}", "Optional<Fotografia> findOne(Long id);", "@Transactional(readOnly=true)\n\tpublic List<Film> getFilmInfoAboveId(int id) {\n\t\tList<Film> films = filmRepository.findByFilmIdGreaterThan(id);\n\t\t\n\t\tfor(Film film : films) {\n\t\t\t// call the getter to load the data to cache\n\t\t\tfor(FilmActor actor : film.getFilmActors()) {\n\t\t\t\t// do nothing here\n\t \t}\n\t\t}\n\t\n\t\treturn films;\n\t}", "@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}", "public User fetchById(int id)\n {\n String query = \"SELECT * FROM user WHERE id = ?\";\n RowMapper<User> userRowMapper = new BeanPropertyRowMapper<>(User.class);\n User user; // a specific user that will be returned\n try\n {\n user = template.queryForObject(query, userRowMapper, id); // call the database\n } catch (EmptyResultDataAccessException e)\n {\n user = null; // return a null user\n }\n return user;\n }", "private Future<JsonObject> fetchItem(String id) {\n Promise<JsonObject> p = Promise.promise();\n client\n .get(catPort, catHost, catItemPath)\n .addQueryParam(ID, id)\n .send()\n .onFailure(\n ar -> {\n ar.printStackTrace();\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n obj -> {\n JsonObject res = obj.bodyAsJsonObject();\n if (obj.statusCode() == 200)\n {\n if (res.getString(STATUS).equals(status.SUCCESS.toString().toLowerCase()))\n p.complete(obj.bodyAsJsonObject().getJsonArray(RESULTS).getJsonObject(0));\n }\n else{\n if (obj.statusCode() == 404)\n p.fail(ITEMNOTFOUND + id);\n else{\n LOGGER.error(\"failed fetchItem: \" + res);\n p.fail(INTERNALERROR);\n }\n\n }\n });\n return p.future();\n }", "@Override\r\n\tpublic Famille getFamille(Long idFamilleComp) {\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\tObject C=session.get(Famille.class, idFamilleComp);\r\n \t\tif(C==null) throw new RuntimeException(\"FamilleComp non crées\");\r\n \t\tsession.getTransaction().commit();\r\n \t\treturn (Famille)C;\r\n \r\n\t}", "@Transactional(readOnly = true)\n DataRistorante getByID(String id);", "public Objet getObjetById(int id){\n \n Objet ob=null;\n String query=\" select * from objet where id_objet=\"+id;\n \n try { \n Statement state = Connect.getInstance().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = state.executeQuery(query);\n while(res.next()) ob=new Objet(res.getInt(\"id_objet\"),res.getInt(\"id_user\"),res.getInt(\"qte\"),res.getString(\"types\"),res.getString(\"description\"));\n res.close();\n state.close();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ob;\n }", "DisFans selectByPrimaryKey(String id);", "public Factura obtenerFactura(int id ){\n return historialFacturas.get(id);\n }", "DiaryFile selectByPrimaryKey(String maperId);", "public Notifiche get(int id){\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Recupero il cpe\r\n\t\tNotifiche notifica = (Notifiche) session.get(Notifiche.class, id );\r\n\t\t\r\n\t\t//Restituisco il cpe trovato\r\n\t\treturn notifica;\r\n\t}", "InvoiceDTO fetchByID(int id);", "public Food findfoodByid(Integer fid) {\n\t\t\r\n\t\tFood food=foodDao.findfoodByid(fid);\r\n\t\t\r\n\t\treturn food;\r\n\t}", "FileRecordAdmin selectByPrimaryKey(String id);", "public Fila carregar(int id) throws IOException{\t\t\n\t\treturn dao.carregar(id);\n\t}", "public FileManagerFile getFile(int id) throws Exception {\n\n if (files == null) { // defer loading files list until requested.\n cacheFoldersFiles();\n }\n for (FileManagerFile file : files) {\n if (file.getId() == id) {\n return file;\n }\n }\n return null;\n }", "public Feed findFeedByFeedID(Integer fid);", "@RequestMapping(value = \"/dlFileTypes/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<DlFileType> getDlFileType(@PathVariable Long id) {\n log.debug(\"REST request to get DlFileType : {}\", id);\n return Optional.ofNullable(dlFileTypeRepository.findOne(id))\n .map(dlFileType -> new ResponseEntity<>(\n dlFileType,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "@Transactional(readOnly = true) \n public Tbc_fazenda findOne(Long id) {\n log.debug(\"Request to get Tbc_fazenda : {}\", id);\n Tbc_fazenda tbc_fazenda = tbc_fazendaRepository.findOne(id);\n return tbc_fazenda;\n }", "@RequestMapping(value = \"/free-cfdis/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Free_cfdi> getFree_cfdi(@PathVariable Long id) {\n log.debug(\"REST request to get Free_cfdi : {}\", id);\n Long idauditevent = new Long(\"36\");\n Audit_event_type audit_event_type = audit_event_typeService.findOne(idauditevent);\n C_state_event c_state_event;\n Long idstate = new Long(\"1\");\n c_state_event = c_state_eventService.findOne(idstate);\n tracemgService.saveTrace(audit_event_type, c_state_event);\n\n Free_cfdi free_cfdi = free_cfdiService.findOne(id);\n return Optional.ofNullable(free_cfdi)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }", "public Matiere findById(Integer id){\n return matiereRepository.getOne(id);\n }", "@GetMapping(\"/one/{id}\")\n\tpublic ResponseEntity<?> fetchOneData(@PathVariable(\"id\") Integer id) {\n\t\tResponseEntity<?> res = null;\n\t\ttry {\n\t\t\tEmployee emp = service.getOneEmpObject(id);\n\t\t\tres = new ResponseEntity<Employee>(emp, HttpStatus.OK);\n\t\t} catch (Exception e) {\n\t\t\tres = new ResponseEntity<String>(\"Unable Featch Data \", HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "D getById(K id);", "@Override\r\n\tpublic Botany show(int id) {\n\t\treturn dao.show(id);\r\n\t}", "public ProjectFiles selectByPrimaryKey(Long id) {\r\n ProjectFiles key = new ProjectFiles();\r\n key.setId(id);\r\n ProjectFiles record = (ProjectFiles) getSqlMapClientTemplate().queryForObject(\"project_files.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }", "@Override\n\tpublic FicheSante getFicheSanteById(int id) {\n\t\treturn daofichesante.getFicheSanteById(id);\n\t}", "public InputData getData(Integer id) {\n String SQL = \"SELECT * FROM world_bank WHERE idRecord_ID = ?\";\n InputData record = jdbcTemplate.queryForObject(SQL,\n new Object[] { id }, new DataMapper());\n return record;\n }", "@Override\n @Transactional(readOnly = true)\n public Fund findOne(Long id) {\n log.debug(\"Request to get Fund : {}\", id);\n Fund fund = fundRepository.findOneWithEagerRelationships(id);\n return fund;\n }", "@Override\n\tpublic Fans selectById(int fans_id) {\nConnection conn = this.connectionManager.openConnection();\n\t\t\n\t\tString strSQL = \"select * from fans where fans_id=?\";\n\t\tObject[] params = new Object[] { fans_id};\n\t\t\n\t\tResultSet resultSet = this.dbUtils.execQuery(conn, strSQL, params);\n\t\n\t\ttry {\n\t\t\tif (resultSet.next()) {\n\t\t\t\tFans fans=new Fans();\n\t\t\t\tfans.setFans_id(resultSet.getInt(1));\n\t\t\t\tfans.setUser_id(resultSet.getString(2));\n\t\t\t\tfans.setUse_userid(resultSet.getString(3));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn fans ;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tthis.connectionManager.closeConnection(conn);\n\t\t}\n\t\t\n\t}", "AccuseInfo selectByPrimaryKey(Integer id);", "@GetMapping(\"/firmas/{id}\")\n @Timed\n public ResponseEntity<Firma> getFirma(@PathVariable Long id) {\n log.debug(\"REST request to get Firma : {}\", id);\n Firma firma = firmaRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(firma));\n }", "Object getDados(long id);", "@Override\n @Transactional(readOnly = true)\n public Optional<FicheroByteDTO> findOne(Long id) {\n log.debug(\"Request to get FicheroByte : {}\", id);\n return ficheroByteRepository.findById(id)\n .map(ficheroByteMapper::toDto);\n }", "public Object consultar(int id) throws Exception {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }", "String get(String id);", "@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "ChannelAli selectByPrimaryKey(Integer id);", "public T getWithChildById(Object id, String... fetchRelations){\n\t\treturn MongoClientSigleton.getDatastore().get(getEntityClazz(), id);\n\t}", "public Local_Prova getByIdLocal_Prova(Integer id);", "public GridFSDBFile find(ObjectId id) {\n\treturn findOne(id);\n }", "public static Alumni_data getAlumniData(int id)\n { \n List li=null; \n try{\n session=SessionFact.getSessionFact().openSession();\n li=session.createQuery(\"from Alumni_data where id=:id\").setInteger(\"id\", id).list();\n session.close();\n return (Alumni_data)li.get(0);\n }catch(Exception e){ out.print(\"Wait(AlumniCon.getAlumniData)\"); } \n return new Alumni_data();\n }", "FetchRequest<Customer> byId(String id);", "public static PolovniAutomobili read(int id) {\n PolovniAutomobili s = null;\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT * FROM polovni WHERE id = ?\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ps.setInt(1, id);\n ResultSet result = ps.executeQuery();\n if (result.next()) {\n s = new PolovniAutomobili(result.getString(\"imgUrl\"), result.getString(\"naziv\"), result.getInt(\"godiste\"), result.getInt(\"cena\"), result.getString(\"url\"));\n }\n CONNECTION.close();\n }\n } catch (SQLException ex) {\n System.out.println(\"MySql Connection error...\");\n Logger.getLogger(PolovniFunctions.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n return s;\n }", "@Override\n\tpublic ServiceFee getById(long id) {\n\t\treturn servicefeerepo.getOne(id);\n\t}", "T getById(Long id);", "@Override\n public Result readById(final int id) throws DaoException {\n throw new DaoException(\"Unsupported operation. Result has no id\");\n }", "public T getReultById(int id){\n return result_now.get(id);\n }", "public Citas getCita(int id) {\n Citas c = new Citas();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM paciente WHERE id_paciente=?\";\n pstm = con.prepareStatement(query);\n pstm.setInt(1, id);\n rs = pstm.executeQuery();\n while (rs.next()) {\n c.setId(rs.getInt(\"id_paciente\"));\n c.setName(rs.getString(\"name\"));\n c.setDoctor(rs.getString(\"doctor\"));\n c.setFecha(rs.getString(\"fecha\"));\n c.setHora(rs.getString(\"hora\"));\n c.setTel(rs.getString(\"tel\"));\n c.setCorreo(rs.getString(\"correo\"));\n c.setGenero(rs.getString(\"genero\"));\n c.setMotivo(rs.getString(\"motivo\"));\n c.setSintomas(rs.getString(\"sintomas\"));\n } \n }catch (SQLException ex) {\n ex.printStackTrace();\n }\n return c;\n }", "public T getByID(int id) {\n\t\treturn this.data.get(id);\n\t}", "public Funcionario buscaPorId(Integer id) throws Exception {\n\t\topenDatabase();\n\t\tSQL = \"SELECT tb_funcionario.idfuncionario, tb_funcionario.nome, tb_funcionario.email, tb_funcionario.tel, tb_dependente.iddependente, tb_dependente.nome, tb_dependente.parentesco \" + \n\t\t\t\t\"FROM tb_funcionario \" + \n\t\t\t\t\"INNER JOIN tb_dependente ON tb_funcionario.idfuncionario = tb_dependente.funcionario_id \" +\n\t\t\t\t\"WHERE tb_funcionario.idfuncionario = ?\";\n\t\tps = con.prepareStatement(SQL);\n\t\tps.setInt(1, id);\n\t\trs = ps.executeQuery();\n\t\t\n\t\tFuncionario funcionario = new Funcionario();\n\t\tList<Dependente> listaDependentes = new ArrayList<Dependente>();\n\t\tfuncionario.setDependentes(new ArrayList<Dependente>());\n\t\t\n\t\twhile (rs.next()) {\n\t\t\tfuncionario.setId(rs.getInt(\"tb_funcionario.idfuncionario\"));\n\t\t\tfuncionario.setNome(rs.getString(\"tb_funcionario.nome\"));\n\t\t\tfuncionario.setEmail(rs.getString(\"tb_funcionario.email\"));\n\t\t\tfuncionario.setTelefone(rs.getString(\"tb_funcionario.tel\"));\n\n\t\t\t\tDependente dependente = new Dependente();\n\t\t\t\tdependente.setId(rs.getInt(\"tb_dependente.iddependente\"));\n\t\t\t\tdependente.setNome(rs.getString(\"tb_dependente.nome\"));\n\t\t\t\tdependente.setParentesco(rs.getString(\"tb_dependente.parentesco\"));\n\n\t\t\tlistaDependentes.add(dependente);\n\n\t\t}\n\n\t\tfuncionario.setDependentes(listaDependentes);\n\t\t\n\t\tcloseDatabase();\n\t\treturn funcionario;\n\t}", "public PartidaOli getById(Long id) throws InfrastructureException {\r\n\t\tPartidaOli partida;\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"getById ini\");\r\n\t\t\tpartida = (PartidaOli)getHibernateTemplate().load(PartidaOli.class, id);\t\r\n\t\t\tlogger.debug(\"getById fin\");\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getById failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\treturn partida;\r\n\t}", "@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }", "T getById(int id);", "Mallscroerule selectByPrimaryKey(Long id);", "public Paciente get( Long id ) {\r\n\t\t\tlogger.debug(\"Retrieving codigo with id: \" + id);\r\n\t\t\t\r\n\t\t\t/*for (Paciente paciente:codigos) {\r\n\t\t\t\tif (paciente.getId().longValue() == id.longValue()) {\r\n\t\t\t\t\tlogger.debug(\"Found record\");\r\n\t\t\t\t\treturn paciente;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tlogger.debug(\"No records found\");\r\n\t\t\treturn null;\r\n\t\t}" ]
[ "0.72946316", "0.7014045", "0.6928484", "0.6926681", "0.6865186", "0.6824509", "0.68204904", "0.680964", "0.6783074", "0.6761476", "0.67548835", "0.67392045", "0.66999435", "0.66975975", "0.6591484", "0.6589746", "0.65623504", "0.65479654", "0.6546197", "0.6449379", "0.6441708", "0.6435257", "0.64114726", "0.6406704", "0.6399449", "0.6393339", "0.6384977", "0.63830763", "0.6377526", "0.63773185", "0.6372203", "0.6367069", "0.63465995", "0.6338999", "0.6337338", "0.63323265", "0.63279504", "0.6322371", "0.63201815", "0.63158363", "0.6310655", "0.6309595", "0.6308079", "0.63056487", "0.6302789", "0.62990063", "0.6284486", "0.6284286", "0.62700456", "0.6262554", "0.62457407", "0.62439", "0.6227534", "0.6217505", "0.6197993", "0.619729", "0.61813104", "0.6176286", "0.6173873", "0.6172061", "0.61687356", "0.61635363", "0.61583114", "0.61505187", "0.61482835", "0.6146147", "0.6115736", "0.6112381", "0.61075985", "0.6107514", "0.6104916", "0.610047", "0.60907304", "0.6089287", "0.60849506", "0.6073451", "0.6069449", "0.60527045", "0.6050493", "0.6048289", "0.6047747", "0.6047132", "0.60430956", "0.6038484", "0.6038344", "0.6037319", "0.6037001", "0.6032276", "0.60263425", "0.6021195", "0.6017377", "0.60140765", "0.60113204", "0.5999213", "0.59987366", "0.59960115", "0.5991712", "0.5990608", "0.5982659", "0.59776235" ]
0.73395723
0
Fetch all filial types.
public FilialResponse fetchAllFilialTypes(Request request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}", "public List<Type> getAll();", "public List<SecTyp> getAllTypes();", "List<Type> getAllTypeList();", "@GetMapping(\"/types\")\n\t@Timed\n\tpublic List<TypesDTO> getAllTypes() {\n\t\tthis.log.debug(\"REST request to get all Types\");\n\t\treturn this.typesService.findAll();\n\t}", "@Override\n\tpublic List<Facilities_type> getAllFacilitiesType() {\n\t\treturn this.facilitiesDao.getAllFacilitiesType();\n\t}", "@Override\r\n\tpublic List<Type> getTypes() {\n\t\treturn (List<Type>)BaseDao.select(\"select * from type\", Type.class);\r\n\t}", "@GET\n @Path(\"allTypes\")\n @Produces(MediaType.APPLICATION_JSON)\n public String getAllTypes() {\n return typesJSONResponse(_types.getAllTypes());\n }", "public FilialResponse fetchAllFilialFilial(Request request);", "public ArrayList<BikeType> getAllTypes(){\n typelist = new ArrayList<>();\n\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_TYPES);\n ResultSet rs = ps.executeQuery()){\n\n while(rs.next()){\n BikeType type = new BikeType(rs.getString(cTypeName),rs.getDouble(cRentalPrice));\n type.setTypeId(rs.getInt(cTypeId));\n typelist.add(type);\n }\n\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return typelist;\n }", "public ReactorResult<java.lang.String> getAllFileType_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), FILETYPE, java.lang.String.class);\r\n\t}", "public List<ResourceBase> listTypes() throws ResourceException;", "@Override\n\tpublic List<Type> listType() {\n\t\treturn goodsDao.listType();\n\t}", "@RequestMapping(value=\"/datatypes\",method=RequestMethod.GET)\n public DataFieldType[] getAllDataTypes(){\n return DataFieldType.values();\n }", "@Override\n\tpublic List<TypeDocument> findAll() {\n\t\treturn typeDocumentRepository.findAll();\n\t}", "public static Collection<AttributeType> findAll( )\n {\n return _dao.selectDocumentAttributeTypeList( );\n }", "@Override\r\n\tpublic List<HouseType> queryAllHtype() {\n\t\treturn adi.queryAllHtype();\r\n\t}", "public String[] getFfTypes(){\n return ffc.getFfTypes();\n }", "public List<FunctionalLayerType> findAllFunctionalLayerTypes() {\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?functionalLayerType WHERE {?functionalLayerType rdfs:subClassOf onto:FunctionalLayer.}\";\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"findAllFunctionalLayerTypes:\" + jsonString);\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<FunctionalLayerType> list = new ArrayList<FunctionalLayerType>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tFunctionalLayerType functinalLayerType = new FunctionalLayerType();\r\n\t\t\t\tif (jsonObject.has(\"functionalLayerType\")) {\r\n\t\t\t\t\tfunctinalLayerType.setFunctionalLayerTypeName(\r\n\t\t\t\t\t\t\tjsonObject.getJSONObject(\"functionalLayerType\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(functinalLayerType);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public List<UserType> GetUserTypes() {\n/* 50 */ return this.userDal.GetUserTypes();\n/* */ }", "public List<CarrierType> all() throws EasyPostException {\n String endpoint = \"carrier_types\";\n\n CarrierType[] response = Requestor.request(RequestMethod.GET, endpoint, null, CarrierType[].class, client);\n return Arrays.asList(response);\n }", "public List<UserType> list() {\r\n\t\t\r\n\t\t//!!! Show only Buyer and Farmer\r\n\t\tString selectAllUserType = \"FROM UserType WHERE Acronym = :farmer\"; \r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(selectAllUserType);\r\n\t\tquery.setParameter(\"farmer\", 'F');\r\n\t\t\r\n\t\treturn query.getResultList();\r\n\t\t\r\n\t\t//return sessionFactory.getCurrentSession().createQuery(\"FROM UserType\", Farmer.class).getResultList();\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getAll(Class<T> type) {\n\t\treturn super.getSessionFactory().getCurrentSession().createQuery(\"from \"+type.getName()+\"\").list();\r\n\t}", "public static List<String> getAllRoofTypes() throws UserException {\n List<String> rooftypeList = new ArrayList<>();\n try (Connection connection = database.connect()) {\n String sql = \"SELECT * FROM fog.roof_types;\";\n\n try (PreparedStatement ps = connection.prepareStatement(sql)) {\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String roofType = rs.getString(\"roof_type\");\n rooftypeList.add(roofType);\n\n }\n return rooftypeList;\n } catch (SQLException ex) {\n throw new UserException(ex.getMessage());\n }\n } catch (SQLException | UserException ex) {\n throw new UserException(\"Connection to database could not be established\");\n }\n }", "public List<E> findAll(Class<E> type){\n transaction.begin();\n List<E> types = entityManager.createQuery(\" from \" + type.getName()).getResultList();\n transaction.commit();\n return types;\n }", "public String getAllContactsTypes() {\n\t\treturn \"SELECT * FROM CONTACTSTYPES\";\n\t}", "List<? extends HasListBox> getAllDataTypes();", "public static List<UserType> getAllUserTypes() {\n return UserType.finder.where().ne(\"id\", 1).findList();\n }", "@Override\r\n\tpublic List<Type> selectType() {\n\t\treturn gd.selectType();\r\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();", "public List<Type> getTypeList() {\n\t\treturn sm.selectList(\"com.lanzhou.entity.Longpay.getTypeList\");\n\t}", "@RequestMapping(value = \"/contracts/types\", method = RequestMethod.GET)\n public JsonListWrapper<String> listAllTypes() {\n Collection<String> items = ((ContractService) service).findAllInsuranceTypes();\n return JsonListWrapper.withTotal(items);\n }", "public void getAllAttributeTypes(List<IAttributeType<?>> all, ItemFilter<IAttributeType<?>> filter);", "List<Usertype> selectAll();", "@GetMapping(\"/alteration-display-types\")\n @Timed\n public List<AlterationDisplayTypeDTO> getAllAlterationDisplayTypes() {\n log.debug(\"REST request to get all AlterationDisplayTypes\");\n return alterationDisplayTypeService.findAll();\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "List<ReportType> findTypes();", "public List<ItemTypeDTO> getAll();", "public List<T> findAll() {\n\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\n\t\tPreparedStatement findStatement = null;\n\t\tResultSet rs = null;\n\t\tString findStatementString = \"SELECT * FROM \" + type.getSimpleName();\n\n\t\ttry {\n\t\t\tfindStatement = dbConnection.prepareStatement(findStatementString);\n\t\t\trs = findStatement.executeQuery();\n\t\t\treturn createObjects(rs);\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:findAll\" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionFactory.close(rs);\n\t\t\tConnectionFactory.close(findStatement);\n\t\t\tConnectionFactory.close(dbConnection);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic List<EmploieType> findAll() {\n\t\treturn emploieTypeRepository.findAll();\n\t}", "public SampletypeBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM sampletype\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public <T extends IDBEntities> List<T> retrieveAll(Class<? extends IDBEntities> type) {\n\t\tif (type == null)\n\t\t\treturn new ArrayList<>();\n\t\tList<T> result;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tQuery q = em.createNamedQuery(type.getSimpleName() + \".findAll\", type);\n\t\t\tresult = q.getResultList();\n\t\t} catch (Exception ex) {\n\t\t\t// No records exist\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t\t// Dealing with EclipseLink Vector overriding issues (iterators don't work properly)\n\t\tList<T> output = new ArrayList<>();\n\t\toutput.addAll(result);\n\t\treturn output;\n\t}", "public List<ModelType> findAllModelTypes() {\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?modelType WHERE {?modelType rdfs:subClassOf onto:ModelType.}\";\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"findAllModelTypes:\" + jsonString);\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<ModelType> list = new ArrayList<ModelType>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tModelType modelType = new ModelType();\r\n\t\t\t\tif (jsonObject.has(\"modelType\")) {\r\n\t\t\t\t\tmodelType.setModelTypeName(jsonObject.getJSONObject(\"modelType\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(modelType);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }", "public void getAllAttributeTypes(List<IAttributeType<?>> all);", "java.util.List<UserType>\n getUserTypesList();", "default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }", "@Override\r\n\tpublic List<UserType> finds() {\n\t\tMyBatisCriteria example = new MyBatisCriteria();\r\n\t\ttry {\r\n\t\t\treturn this.userTypeMapper.selectByExample(example);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new DatabaseException(e);\r\n\t\t}\r\n\t}", "@Override\n\t@Transactional\n\tpublic List<T> getAll() {\n\t\tList<?> result = hibernateTemplate.getSessionFactory().getCurrentSession()\n\t\t\t\t.createCriteria(getGenericClass())\n\t\t\t\t.list();\n\t\treturn result.stream()\n\t\t\t\t.map(e -> initialize(checkType(e)))\n\t\t\t\t.filter(e -> e != null)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public static ArrayList<TicketType> getAllTicketTypesData() {\n\t\tList list = null;\n\t\tString filename = \".\\\\data\\\\ticketType.dat\";\n\t\tlist = (ArrayList)SerializeDB.readSerializedObject(filename); //Read data\n\t\t\n\t\treturn (ArrayList<TicketType>) list;\n\t}", "public List<Factura> getAllFacturas(){\n return facturaFacade.findAll();\n }", "@Test\n\tvoid testGetAllByType() {\n\t\tList<Plant> plant = service.getAllByType(\"Shurbs\");\n\t\tString type = plant.get(0).getType();\n\t\tassertEquals(\"Shurbs\", type);\n\t}", "public List getAllShipTypes() throws Exception {\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n String sql = \"select `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS`\"\r\n + \" WHERE `TABLE_SCHEMA`='echo' AND `TABLE_NAME`='carrier' AND \" +\r\n \"(COLUMN_NAME like 'ship%' OR COLUMN_NAME = 'walk_in')\";\r\n List shipTypes = new ArrayList<>();\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n //rs.beforeFirst();\r\n while (rs.next()) {\r\n shipTypes.add(rs.getString(\"COLUMN_NAME\"));\r\n }\r\n conn.close(stmt, rs);\r\n return shipTypes;\r\n }", "UsedTypes getTypes();", "<T> Set<T> lookupAll(Class<T> type);", "public UserType[] getAllUserTypes() throws DataAccessException {\n return userTypeDao.getAllUserTypes();\n }", "private Collection<TypeDeclaration> getAllTypes() {\n if (allTypes != null) {\n return allTypes;\n }\n allTypes = new ArrayList<TypeDeclaration>();\n for (Symbol s : getMembers(false)) {\n allTypes.add(env.declMaker.getTypeDeclaration((ClassSymbol) s));\n }\n return allTypes;\n }", "Collection<FieldType> getFieldTypes() throws TypeException, InterruptedException;", "@RequestMapping(value = \"/dlFileTypes\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<List<DlFileType>> getAllDlFileTypes(Pageable pageable)\n throws Exception {\n Page<DlFileType> page = dlFileTypeRepository.findAll(pageable);\n for (DlFileType each : page) {\n\n if (each.getFileImgName() != null && AttachmentUtil.retriveAttachment(filepath, each.getFileImgName()) != null) {\n each.setFileImg(AttachmentUtil.retriveAttachment(filepath, each.getFileImgName()));\n }\n /*if(each.getContentName() != null && AttachmentUtil.retriveAttachment(filepath, each.getContentName()) != null){\n each.setContent(AttachmentUtil.retriveAttachment(filepath, each.getContentName()));\n }*/\n\n }\n\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/dlFileTypes\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "public List<DirectoryCountryFormat> selectAll();", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();", "@RequestMapping(value = \"/_search/dlFileTypes/{query}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<DlFileType> searchDlFileTypes(@PathVariable String query) {\n return StreamSupport\n .stream(dlFileTypeSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "private void requestWeatherTypes() {\n SharedPreferences preferences = getSharedPreferences(CommonConstants.APP_SETTINGS, MODE_PRIVATE);\n String url = \"https://api.openweathermap.org/data/2.5/forecast?\" +\n \"id=\" + input.get(CommonConstants.ARRIVAL_CITY_ID) +\n \"&appid=\" + CommonConstants.OWM_APP_ID +\n \"&lang=\" + Locale.getDefault().getLanguage() +\n \"&units=\" + preferences.getString(CommonConstants.TEMPERATURE_UNIT, \"Standard\");\n ForecastListener listener = new ForecastListener(weatherList -> {\n try {\n WeatherTypeMapper mapper = new WeatherTypeMapper();\n fillPreview(mapper.from(weatherList));\n if (input.containsKey(CommonConstants.SELECTIONS)) {\n //noinspection unchecked\n setSelections((List<Settings.Selection>) input.get(CommonConstants.SELECTIONS));\n }\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"onSuccess: \" + e.getMessage(), e);\n }\n });\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, listener, null);\n TravelRequestQueue.getInstance(this).addRequest(request);\n }", "public List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);", "@Override\n\tpublic List<Coursetype> getAllCourseType() {\n\t\treturn courseTypeDaoImpl.getAllCourseType();\n\t}", "public java.util.List<VcmsArticleType> findAll();", "ResponseEntity<List<Type>> findTaskTypes();", "@Override\r\n\tpublic List<T> findAll() {\n\t\treturn getSession().createQuery(\r\n\t\t\t\t\"FROM \"+clazz.getSimpleName())\r\n\t\t\t\t.list();\r\n\t}", "List<Type> getTypeList(String type);", "public List<T> findAll() {\n\t Query q = getEntityManager().createQuery(\"select u from \" + getEntityClass().getSimpleName() + \" u\");\n\t return q.getResultList();\n\t }", "public List<Installation> serchInstPlaceType() {\r\n List<Installation> list = new ArrayList<Installation>();\r\n try {\r\n init();\r\n\r\n // Start UOC\r\n InstPlaceTypeDao dao = new InstPlaceTypeDao(conn);\r\n list = dao.getTypeList();\r\n // End UOC\r\n\r\n } catch (Exception e) {\r\n handleException(e);\r\n } finally {\r\n finish();\r\n }\r\n return list;\r\n }", "@UML(identifier=\"featureType\", obligation=OPTIONAL, specification=ISO_19139)\n Collection<? extends LocalName> getFeatureTypes();", "@Override\r\n\tpublic List<PartyType> findAll() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Factura> findAll() {\n\t\treturn facturaRepository.findAll();\n\t}", "public List<SimpleFeatureType> getCurrentTypes() {\n \tList<SimpleFeatureType> ret = new ArrayList<SimpleFeatureType>();\n \tfor (Set<SimpleFeature> s : typeNameIndex.values()) {\n \t\tif (s.size()>0) {\n \t\t\tret.add( s.iterator().next().getFeatureType() );\n \t\t}\n \t}\n \treturn ret;\n }", "public List<SensoryType> findAllSensoryTypes() {\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?dataSourceType WHERE {?dataSourceType rdfs:subClassOf onto:DataSourceType.}\";\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"findAllDataSourceTypes:\" + jsonString);\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<SensoryType> list = new ArrayList<SensoryType>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tSensoryType sensoryType = new SensoryType();\r\n\t\t\t\tif (jsonObject.has(\"dataSourceType\")) {\r\n\t\t\t\t\tsensoryType.setSensoryTypeName(jsonObject.getJSONObject(\"dataSourceType\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(sensoryType);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Food getByType(String type);", "public List<String> getAvailableDataTypes() {\n Set<String> typeSet = new TreeSet<String>();\n\n ITimer timer = TimeUtil.getTimer();\n timer.start();\n\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n for (ProviderType type : provider.getProviderType()) {\n typeSet.add(type.getDataType().toString());\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the provider list.\", e);\n }\n\n List<String> typeList = new ArrayList<String>(typeSet);\n timer.stop();\n\n return typeList;\n }", "@GetMapping(\"/familles\")\n public List<FamilleDTO> getAllFamilles() {\n log.debug(\"REST request to get all Familles\");\n return familleService.findAll();\n }", "@Override\r\n public Set<PhotoDTO> selectPhotosByType(String type) {\r\n PreparedStatement selectAllPhoto = dalService.getPreparedStatement(\r\n \"SELECT * ,f.state FROM project.photos p ,project.furniture f,project.furniture_types t \"\r\n + \"WHERE p.photo_id =f.favorite_photo AND \"\r\n + \"f.furniture_type=t.furniture_type_id AND t.name=?\");\r\n try {\r\n selectAllPhoto.setString(1, type);\r\n try (ResultSet rs = selectAllPhoto.executeQuery()) {\r\n Set<PhotoDTO> setPhotoDTOs = new HashSet<PhotoDTO>();\r\n while (rs.next()) {\r\n PhotoDTO photo = setPhotoDto(rs);\r\n photo.setFurnitureState(rs.getString(\"state\"));\r\n setPhotoDTOs.add(photo);\r\n }\r\n return setPhotoDTOs;\r\n }\r\n } catch (SQLException e) {\r\n throw new FatalException(e.getMessage().toString());\r\n }\r\n }", "@Override\n\tpublic List<Kind> findAll() {\n\t\treturn kindDao.findAll();\n\n\t}", "List<SellType> selectAll();", "public static ArrayList<ExamType> getAllExamTypes() {\n String querySQL = \"select * from exam_type where status0 = 'Active'\";\n PreparedStatement pStmt = null;\n try {\n pStmt = globalCon.prepareStatement(querySQL);\n ResultSet result = pStmt.executeQuery();\n ArrayList<ExamType> examTypes = new ArrayList<>();\n while (result.next()) {\n String exam_name = result.getString(\"exam_type_name\");\n String desc = result.getString(\"description\");\n examTypes.add(new ExamType(exam_name, desc));\n System.out.println(exam_name + \" \" + desc);\n }\n return examTypes;\n } catch (SQLException e) {\n System.err.println(\"**MySQLException: \" + e.getMessage());\n return null;\n } catch (Exception e) {\n System.err.println(\"**MyException: \" + e.getMessage());\n return null;\n } finally {\n if (pStmt != null) {\n try {\n pStmt.close();\n } catch (SQLException ex) {\n System.out.println(\"pStmt.close() failed\");\n System.out.println(\"Error Type: \" + ex.getClass().getName());\n }\n }\n }\n }", "public List<ProductType> getAllProductType() throws IWDaoException,\n\t\t\tIWServiceException;", "ArrayList<Restaurant> getRestaurantListByType(String type);", "public List<String> getResourceTypes(){\n\t\treturn jtemp.queryForList(\"SELECT resource_type_id||' '||resource_type_name FROM resource_type\", String.class);\n\t}", "<T> void lookupAll(Class<T> type, Collection<T> out);", "public List<Type> getDownloadableType() {\n\t\tList<Type> types = typeManager.getAllAvailable();\n\t\tList<Type> result = new ArrayList<Type>();\n\t\tfor(Type type : types){\n\t\t\tif(type.getBasePackages() != null && type.getBasePackages().size() != 0){\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public List<String> getAllDocumentTypes() {\n\t\tList<String> toReturn = new ArrayList<String>();\n\n\t\tint size = combBoxDocumentTypes.getItemCount();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttoReturn.add((String) combBoxDocumentTypes.getItemAt(i));\n\t\t}\n\n\t\treturn toReturn;\n\t}", "public List<CWLType> getTypes() {\n return types;\n }", "@GET\n\t@Path(\"types\")\n public Response getDeviceTypes() {\n List<DeviceType> deviceTypes;\n try {\n deviceTypes = DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes();\n return Response.status(Response.Status.OK).entity(deviceTypes).build();\n } catch (DeviceManagementException e) {\n String msg = \"Error occurred while fetching the list of device types.\";\n log.error(msg, e);\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();\n }\n }", "public List<TypeInfo> getTypes() {\r\n return types;\r\n }", "@Override\n @Transactional(readOnly = true)\n public List<WorkType> findAll() {\n log.debug(\"Request to get all WorkTypes\");\n return workTypeRepository.findAll();\n }", "Collection<RecordType> getRecordTypes() throws TypeException, InterruptedException;", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "@Override\r\n\tpublic List<TypeModePaiement> listeAll() {\n\t\tList<TypeModePaiement> list = repository.findAll();\r\n\t\treturn list;\r\n\t}", "public Set<Class<? extends RealmModel>> getDBTableTypes(){\n try {\n if (this.realmConfiguration == null) {\n this.realmConfiguration = DatabaseUtilities\n .buildRealmConfig(context, null, null, null);\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n\n if(realmConfiguration == null){\n return null;\n }\n return realmConfiguration.getRealmObjectClasses();\n }", "public List getResourceTypes(ResourceType resourceType);", "String getTypeFilter(String column, Collection<FxType> types);", "public static ExtendedIterator<? extends Resource> listTypes(Resource individual)\n\t{\n\t\tif (individual instanceof OntResource)\n\t\t\treturn ((OntResource)individual).listRDFTypes(false);\n\t\telse\n\t\t\treturn individual.listProperties(RDF.type).mapWith(new Map1<Statement, Resource>() {\n\t\t\t\tpublic Resource map1(Statement statement) {\n\t\t\t\t\treturn statement.getResource();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Resource apply(Statement t) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\t}" ]
[ "0.7680212", "0.7322662", "0.6736693", "0.6729339", "0.66830784", "0.66095823", "0.65214837", "0.64881444", "0.63602054", "0.63316023", "0.6287066", "0.6282106", "0.62624097", "0.6262358", "0.62217873", "0.6185707", "0.61780167", "0.6088432", "0.60704046", "0.60679424", "0.6065104", "0.6052707", "0.6042105", "0.60276586", "0.6014518", "0.600881", "0.5979394", "0.5963411", "0.5931839", "0.59192395", "0.5910616", "0.5907028", "0.5896284", "0.5867228", "0.58600557", "0.5848507", "0.5821553", "0.58210033", "0.5820822", "0.58108115", "0.57991725", "0.57939255", "0.579167", "0.5791157", "0.5755517", "0.5752857", "0.5751987", "0.5750589", "0.5736386", "0.57347524", "0.5728531", "0.5720967", "0.5720543", "0.57204044", "0.57169676", "0.57165956", "0.56998783", "0.56910384", "0.5684191", "0.5673952", "0.56727725", "0.5671734", "0.5661243", "0.5660936", "0.56576145", "0.5654514", "0.56524086", "0.5644209", "0.5633484", "0.5627941", "0.5623841", "0.56087023", "0.5599641", "0.55859804", "0.5582332", "0.55797905", "0.5578057", "0.5578051", "0.557552", "0.55720496", "0.5560969", "0.5557743", "0.5557477", "0.554647", "0.5539486", "0.55333364", "0.5521045", "0.54991126", "0.548674", "0.5486518", "0.54857343", "0.548018", "0.54755545", "0.54750365", "0.54600525", "0.5456828", "0.545586", "0.5455121", "0.5450367", "0.54502344" ]
0.80687225
0
Fetch all filial filial.
public FilialResponse fetchAllFilialFilial(Request request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/familles\")\n public List<FamilleDTO> getAllFamilles() {\n log.debug(\"REST request to get all Familles\");\n return familleService.findAll();\n }", "public FilialResponse fetchAllFilialTypes(Request request);", "public List<Factura> getAllFacturas(){\n return facturaFacade.findAll();\n }", "public InternalResultsResponse<Filial> fetchFilialById(FilialRequest filialRequest);", "public ArrayList<Fichier> getFichierAll() throws SQLException {\n\t\tString query = SQLQueries.GET_FICHIER_ALL_QUERY;\n\t\tResultSet rs = null;\n\t\tArrayList<Fichier> fichiers = new ArrayList<Fichier>();\n\t\ttry {\n\t\t\tconnection = Connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(query);\n\t\t\twhile (rs.next()) {\n\t\t\t\tFichier fichier = new Fichier();\n\t\t\t\tfichier.setNom_fichier(rs.getString(\"nom_fichier\"));\n\t\t\t\tfichier.setDate_fichier(rs.getDate(\"date_fichier\"));\n\t\t\t\tfichier.setCommentaire(rs.getString(\"commentaire\"));\n\t\t\t\tfichier.setId_matiere(rs.getInt(\"id_matiere\"));\n\t\t\t\tfichier.setFichier(rs.getBytes(\"fichier\"));\n\t\t\t\tfichiers.add(fichier);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (statement != null)\n\t\t\t\tstatement.close();\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t}\n\t\treturn fichiers;\n\t}", "public ArrayList<Fila> listarFilas() throws IOException{\n\t\treturn dao.listarFilas();\n\t}", "@Transactional\n\n\t@Override\n\tpublic Collection<FileModel> getAll() {\n\t\treturn fm.findAll();\n\t}", "public List<FacturaEntity> getFacturas() {\n LOGGER.info(\"Inicia proceso de consultar todos los facturas\");\n List<FacturaEntity> factura = facturaPersistence.findAll();\n LOGGER.info(\"Termina proceso de consultar todos los facturas\");\n return factura;\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "@Override\r\n\tpublic List<Factura> findAllFacturas() {\n\t\ttry {\r\n\t\t\treturn facturaDao.findAllFacturas();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Provincia> fiindAll() {\n\t\treturn provincieRepository.findAllByOrderByNameAsc();\n\t}", "@RequestMapping(value = {\"/fpost/list\"}, method = RequestMethod.GET)\r\n\tpublic ResponseEntity<List<Fpost>> fetchAllFposts() {\r\n\t\tSystem.out.println(\"fetching list of all fposts\");\r\n\t\tList<Fpost> fpost = fpostDAO.list();\r\n\t\treturn new ResponseEntity<List<Fpost>>(fpost, HttpStatus.OK);\r\n\t}", "public List<Filme> listar() {\r\n\r\n //Pegando o gerenciador de acesso ao BD\r\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery consulta = gerenciador.createQuery(\r\n \"Select f from Filme f\", Filme.class);\r\n\r\n //Retornar a lista de atores\r\n return consulta.getResultList();\r\n\r\n }", "public List<Flight> fetchFlights() {\n\t\tSession session = SessionBuilder.buildSession();\n\t\tString query = \"from Flight\";\n\t\tQuery q = session.createQuery(query);\n\t\tList<Flight> flights = q.getResultList();\n\t\treturn flights;\n\t}", "@Override\n\tpublic List<Factura> findAll() {\n\t\treturn facturaRepository.findAll();\n\t}", "@Override\n\tpublic ArrayList<VOFactura> getAllFacturas() {\n\t\t\n\t\tDBConnection con = null;\n\t\tStatement stm = null;\n\t\tString sql = null;\n\t\tResultSet res = null;\n\t\t\n\t\tVOFactura factura;\n\t\tArrayList<VOFactura> listaFacturas = new ArrayList<VOFactura>();\n\t\t\n\t\t try {\n\t\t\tcon = new DBConnection(\"root\",\"walkirias84\");\n\t\t\tstm = con.getConnection().createStatement();\n\t\t\tsql = \"SELECT * FROM factura fac ORDER BY fac.facnumero\";\n\t\t\tres = stm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(res.next()) {\n\t\t\t\tfactura = new VOFactura();\n\t\t\t\tfactura.setId(res.getInt(1));\n\t\t\t\tfactura.setNumero(res.getInt(2));\n\t\t\t\tfactura.setIdCliente(res.getInt(3));\n\t\t\t\tCalendar fecha = Calendar.getInstance();\n\t\t\t\tfecha.setTimeInMillis(res.getDate(4).getTime());\n\t\t\t\tfactura.setFecha(fecha);\n\t\t\t\tfactura.setValorNeto(res.getBigDecimal(5));\n\t\t\t\tfactura.setValorIva(res.getBigDecimal(6));\n\t\t\t\tfactura.setValorTotal(res.getBigDecimal(7));\n\t\t\t\t\n\t\t\t\tlistaFacturas.add(factura);\n\t\t\t}\n\t\t\t\n\t\t\treturn listaFacturas;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t if (res != null) try { res.close(); } catch (SQLException logOrIgnore) {}\n\t if (stm != null) try { stm.close(); } catch (SQLException logOrIgnore) {}\n\t if (con != null) try { con.getConnection().close(); } catch (SQLException logOrIgnore) {}\n\t }\n\t\t\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Factura> findAllFacturas() {\n\t\treturn facturaDao.findAll();\n\t}", "@Override\n\tpublic List<File> getAll() {\n\t\t return getSession().\n\t createQuery(\"from File f\", File.class).\n\t getResultList();\n\t}", "public List<Funcionario> readAll() {\r\n\t\t\tConnection con = ConnectionFactory.getConnection();\r\n\t\t\tPreparedStatement stmt = null;\r\n\t\t\tResultSet rs = null;\r\n\r\n\t\t\tString sql = \" select * from funcionario\";\r\n\t\t\tList<Funcionario> funcionarios = new ArrayList<Funcionario>();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstmt = con.prepareStatement(sql);\r\n\t\t\t\trs = stmt.executeQuery();\r\n\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tFuncionario func = new Funcionario();\r\n\t\t\t\t\tfunc.setCodigo(rs.getString(\"Codigo\"));\r\n\t\t\t\t\tfunc.setCargo(rs.getString(\"Cargo\"));\r\n\t\t\t\t\tfunc.setNome(rs.getString(\"Nome\"));\r\n\t\t\t\t\tfunc.setCpf(rs.getString(\"Cpf\"));\r\n\t\t\t\t\tfunc.setEndereco(rs.getString(\"Endereco\"));\r\n\t\t\t\t\tfunc.setCidade(rs.getString(\"Cidade\"));\r\n\t\t\t\t\tfunc.setEstado(rs.getString(\"Estado\"));\r\n\t\t\t\t\tfunc.setTelefone(rs.getString(\"Telefone\"));\r\n\t\t\t\t\tfunc.setEmail(rs.getString(\"Email\"));\r\n\r\n\r\n\t\t\t\t\tfuncionarios.add(func);\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\tcatch (SQLException e) { e.printStackTrace();\r\n\t\t\t\tSystem.out.println(\"Erro ao tentar ler tabela funcionario\");\r\n\t\t\t} finally {\r\n\t\t\t\tConnectionFactory.closeConnection(con, stmt);\r\n\t\t\t}\r\n\r\n\t\t\treturn funcionarios;\r\n\t\t}", "@Override\n @Transactional(readOnly = true)\n public List<FonctionsDTO> findAll() {\n log.debug(\"Request to get all Fonctions\");\n return fonctionsRepository.findAll().stream()\n .map(fonctionsMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "@GET\n @Path(\"/mostrarOrdenadasFS\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFS(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFS(idUser);\n }", "public List<Aflevering> readAll() {\n List<Aflevering> lijst = new ArrayList<>();\n try {\n ResultSet rs = sqlConnection.executeSql(\"SELECT * FROM AFLEVERING\");\n while(rs.next()) {\n lijst.add(new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\")));\n }\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return lijst;\n }", "@Override\n\tpublic List<UploadDF> getAll() {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tList<UploadDF> list = session.createCriteria(UploadDF.class).addOrder(Order.desc(\"id\")).list();\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn list;\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}", "public List getAll() throws FileNotFoundException, IOException;", "public static List<Fattura> tutteLeFatture() {\n\t\tEntityManager em = JPAUtil.getInstance().getEmf().createEntityManager();\n\t\tList<Fattura> _return = em.createQuery(\"SELECT f FROM Fattura f\", Fattura.class).getResultList();\n\t\tem.close();\n\t\treturn _return;\n\t}", "@Override\n @Transactional(readOnly = true)\n public List<FileDTO> findAll() {\n log.debug(\"Request to get all Files\");\n return fileRepository.findAll().stream().map(FileMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "@Override\n\tpublic List<Fee_Entity> get_all_fee() {\n\t\treturn fee.get_all_fee();\n\t}", "@Override\n\tpublic List<MyFoodDTO> selectAll() {\n\t\tString sql = \" SELECT * FROM view_식품정보 \";\n\t\tPreparedStatement pStr = null;\n\t\ttry {\n\t\t\tpStr = dbConn.prepareStatement(sql);\n\t\t\tList<MyFoodDTO> brList = this.select(pStr);\n\t\t\tpStr.close();\n\t\t\treturn brList;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public List<Fuente> obtenerListaFuentes() {\n\t\tString etiqueta = \"\";\n\t\tint id = 0;\n\t\tList<Fuente> listaFuentes = new ArrayList<Fuente>();\n\n\t\ttry {\n\n\t\t\trs = stmt.executeQuery(\"SELECT IDFUENTE, NOMBRE FROM FUENTE\");\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tid = rs.getInt(\"IDFUENTE\");\n\t\t\t\tetiqueta = rs.getString(\"NOMBRE\");\n\t\t\t\tFuente f = new Fuente(etiqueta, id, \"\", \"\");\n\t\t\t\tlistaFuentes.add(f);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"No es posible recuperar la lista de fuentes\");\n\n\t\t}\n\n\t\treturn listaFuentes;\n\t}", "@Override\n @Transactional(readOnly = true)\n public List<FicheroByteDTO> findAll() {\n log.debug(\"Request to get all FicheroBytes\");\n return ficheroByteRepository.findAll().stream()\n .map(ficheroByteMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "@GetMapping(value = \"/\")\n public ResponseEntity<List<Profesional>> findAll() {\n\t\tList<Profesional> lista;\n\t\ttry {\n\t\t\tlista = profesionalService.findAll();\n\t\t}catch (Exception e) {\n\t\t\treturn new ResponseEntity<List<Profesional>>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t\treturn new ResponseEntity<List<Profesional>>(lista, HttpStatus.OK); \n }", "@RequestMapping(value = \"/funcionarios\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Funcionario> getAllFuncionarios() {\n log.debug(\"REST request to get all Funcionarios\");\n return funcionarioService.findAllByCondominioAtual();\n }", "@Override\n\tpublic List<HumanFile> findHumanFileAll() {\n\t\treturn HumanFileMapper.findHumanFileAll();\n\t}", "@GET\n\t@Path(\"/getallfriends\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List getAllFriends() {\n\t\tList allfrnds = fcs.getAllFriends();\n\n\t\t// for (int i = 0; i < allfrnds.size(); i++) {\n\t\t// Friend f=(Friend)allfrnds.get(i);\n\t\t// System.out.println(f.id+\"===>\"+f.name);\n\t\t// }\n\n\t\treturn allfrnds;\n\t}", "@Override\n\tpublic List<Fans> selectAll() {\n\t\t Connection conn=connectionManager.openConnection();\n\t\t \n\t\t \n\t\t \n\t\t\tList<Fans> lstFans = new ArrayList<Fans>();\n\t\t\tString strSQL=\"select * from Fans order by fans_id\";\n\t\t\tResultSet resultSet=this.dbUtils.execQuery(conn, strSQL, new Object[]{});\n\t\t\t\n\t\t\ttry {\n\t\t\t\twhile(resultSet.next())\n\t\t\t\t{\n\t\t\t\t\tFans fans=new Fans();\n\t\t\t\t\tfans.setFans_id(resultSet.getInt(1));\n\t\t\t\t\tfans.setUser_id(resultSet.getString(2));\n\t\t\t\t\tfans.setUse_userid(resultSet.getString(3));\n\t\t\t\t\tlstFans.add(fans);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn lstFans;\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\n\t\t\tfinally{\n\t\t\t\tthis.connectionManager.closeConnection(conn);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\n\t}", "public abstract List<LocalFile> getAllFiles();", "@GET\n @Path(\"/mostrarOrdenadasFT\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFT(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFT(idUser);\n }", "@Override\n\tpublic List<flightmodel> getflights() {\n\t\t\n\t\tSystem.out.println(\"heloo\"+repo.findAll());\n\t\treturn repo.findAll();\n\t}", "@Override\n\tpublic List<Fournisseur> findAll() {\n\t\treturn null;\n\t}", "public ArrayList<Flight> fetchFlightDatabaseContentToList() { \n\n\t\tArrayList<Flight> listOfFlights = flightdb.fetchDatabaseContent();\n\n\t\tif (listOfFlights.isEmpty()) {\n\t\t\tSystem.out.println(\"There's no flights stored in database!\");\n\t\t\treturn null;\n\t\t}\n\t\treturn listOfFlights;\n\t}", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "@Override\r\n\tpublic List<Fournisseur> getListFournisseur() {\n\t\treturn this.sessionFactory.getCurrentSession().createQuery(\"from fournisseur\").list();\r\n\t}", "@GetMapping(\"/all\")\r\n\tpublic List<FileModel> getListFiles() {\r\n\t\treturn fileRepository.findAll();\r\n\t}", "public List<FreelancerDTO> getAll() throws SQLException{\n List<Freelancer> freelancers = repositorioFreelancer.getAll();\n List<FreelancerDTO> freelancersDTO = new ArrayList<>();\n\n for(Freelancer freelancer : freelancers) {\n freelancersDTO.add((FreelancerDTO) freelancer.toDTO());\n }\n return freelancersDTO;\n }", "@GetMapping(path=\"/load\")\n\tpublic @ResponseBody Iterable<Resource> loadAllUsers() {\n\t\t try {\n\t\t\tList<Resource> resources = DataLoader.loadData(DataUtils.SLA2017);\n\t\t\tresourceRepository.save(resources);\n\t\t\tList<Resource> resourcesFalabella = DataLoader.loadData(DataUtils.FALABELLA);\n\t\t\tresourceRepository.save(resourcesFalabella);\n\t\t\tList<Resource> resourcesSantiago = DataLoader.loadData(DataUtils.SANTIAGO2017);\n\t\t\tresourceRepository.save(resourcesSantiago);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return null;\n\t}", "@Query(value = \"from Flight\")\n\tList<Flight> listAllFlights();", "public List<ArticulosFactura> getArticulosFactura(Factura f){\n return f.getArticulosFacturaList();\n }", "public List<Funcionario> findAll() {\r\n\t\tList<Funcionario> result = new ArrayList<Funcionario>();\r\n\t\tPreparedStatement prepStmt = null;\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = jdbcUtil.getConnection();\r\n\t\t\tprepStmt = con.prepareStatement(\"SELECT * FROM Funcionario ORDER BY nome ASC\");\r\n\t\t\tResultSet rs = prepStmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tlong id = rs.getLong(\"id_funcionario\");\r\n\t\t\t\tString nome = rs.getString(\"nome\");\r\n\t\t\t\tDate nascimento = rs.getDate(\"nascimento\");\r\n\t\t\t\tString lotacao = rs.getString(\"lotacao\");\r\n\t\t\t\tresult.add(new Funcionario(id, nome, nascimento, lotacao));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new EscolaException(ErrorMessage.FUNCIONARIO_005, e);\r\n\t\t} finally {\r\n\t\t\tcloseStatement(prepStmt);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private List<RhFuncionario> getFuncionarios()\n {\n System.out.println(\"supiEscalaFacade.findEnfermeiros():\"+supiEscalaFacade.findEnfermeiros());\n return supiEscalaFacade.findEnfermeiros();\n }", "@Override\n public List<UfficioTecnico> getAll() throws SQLException {\n final Connection connection = connectionManager.getConnection();\n try {\n final PreparedStatement preparedStatement = connection\n .prepareStatement(SELECT_ALL);\n final ResultSet rs = preparedStatement.executeQuery();\n final List<UfficioTecnico> uffici = new ArrayList<UfficioTecnico>();\n while (rs.next()) {\n final UfficioTecnico uff = new UfficioTecnico();\n uff.setId(rs.getInt(\"Id\"));\n uff.setNome(rs.getString(\"nome\"));\n uff.setTel(rs.getString(\"tel\"));\n uff.setEmail(rs.getString(\"email\"));\n uff.setUbicazione(rs.getString(\"ubicazione\"));\n uffici.add(uff);\n }\n return uffici;\n } finally {\n connectionManager.freeConnection(connection);\n }\n }", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(CertificationConstants.DB_TABLE, CertificationConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "public List<Country> getAll() throws Exception;", "List<StockList> fetchAll();", "public static ArrayList<Meal> findAll() throws ServletException {\n try{\n //Connect to Database\n Connection con = DatabaseAccess.getConnection();\n //Get all data from exercise Table \n PreparedStatement ps = con.prepareStatement(\n \"SELECT * FROM meal\");\n \n ResultSet result = ps.executeQuery();//Run statement\n ArrayList<Meal> mealList = new ArrayList<>(); \n //If we find Meal set create a new Meal using returned values\n while(result.next()){\n Meal meal = new Meal(result.getInt(\"id\"),\n result.getString(\"name\"),\n result.getInt(\"calperUnit\"));\n mealList.add(meal);\n }\n \n con.close(); //Close Connection\n return mealList;\n }catch (SQLException ex) {\n throw new ServletException(\"Find Problem: Searching for Meal \", ex);\n }\n }", "public List<Food> getAllFood() {\n\t\t\n\t\treturn foodDao.getAllFood();\n\t\t\n\t}", "public List<Record> _queryWholePatrolCard_Records(Long fid) {\n synchronized (this) {\n if (wholePatrolCard_RecordsQuery == null) {\n QueryBuilder<Record> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.Fid.eq(null));\n wholePatrolCard_RecordsQuery = queryBuilder.build();\n }\n }\n Query<Record> query = wholePatrolCard_RecordsQuery.forCurrentThread();\n query.setParameter(0, fid);\n return query.list();\n }", "public Cursor fetchAllFavorites() {\n\n return mDb.query(DATABASE_TABLE_FAVORITES, new String[] {KEY_ROWID, KEY_TITLE,\n KEY_BODY}, null, null, null, null, null);\n }", "public LiveData<List<FoodEntity>> getAllFoods() {\n return mDb.foodDAO().getAll();\n }", "public List<ActifFinancier> listemontant_actuelFond(Fond f){\n \t List<ActifFinancier> l = new ArrayList<>();\n \t if(f == Fond.Fond_Euro){\n \t\t l = actifFinancierRepo.findByNomFond(Fond.Fond_Euro);\n \t }\n \t else{\n \t\t l = actifFinancierRepo.findByNomFond(Fond.Euro_Croissance);\n \t }\n \t return l;\n }", "@NotNull\n @Override\n public List<Faction> getFactions() {\n return FactionColl.get().getAll()\n .stream().map(MassiveCoreFactionsFaction::new).collect(Collectors.toList());\n }", "public Cursor readAllData() {\n\n Cursor objCursor = readSQLite.query(TABLE_OFFICER, new String[]{COLUMN_ID_OFFICER, COLUMN_OFFICER, COLUMN_POSITION, COLUMN_IMAGE, COLUMN_VIDEO, COLUMN_SOUND}, null, null, null, null, null);\n\n if (objCursor != null) {\n objCursor.moveToFirst();\n }\n\n return objCursor;\n }", "@GetMapping(\"/affinites\")\n @Timed\n public ResponseEntity<List<Affinite>> getAllAffinites(Pageable pageable) {\n log.debug(\"REST request to get a page of Affinites\");\n Page<Affinite> page = affiniteRepository.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/affinites\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "public List<Ejemplar> getAll();", "@Override\r\n\tpublic List<Libro> readAll() {\n\t\treturn libroRepository.findAll();\r\n\t}", "@Override\n public List listar() {\n return instalaciones.getAll();\n }", "@Override\n\tpublic Iterable<Flight> viewAllFlight() {\n\t\treturn flightDao.findAll();\n\t}", "public void getFkp() throws SQLException{\n \n ResultSet rset = dh.getPerson();\n \n fkp = new ArrayList<>();\n \n int i = 0;\n while(rset.next()){\n fkp.add(new Person(rset.getString(\"Nome\")));\n }\n }", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(UserConstants.DB_TABLE, UserConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "@GetMapping(\"/favourites\")\n public ResponseEntity<List<Favourite>> getAll() {\n\n\n logger.info(\"The Favourite List is Successfully found.\");\n\n return new ResponseEntity<>( favouriteDao.getAll(), HttpStatus.OK);\n }", "public Cursor fetchAll() {\n\t\treturn db.query(tableName, fields, null, null, null, null, null);\n\t}", "public static List<Reservacion> recuperarFechas() throws IOException {\n List<Reservacion> fechas = new ArrayList();\n SqlSession conn = null;\n\n try {\n conn = MyBatisUtils.getSession();\n fechas = conn.selectList(\"Reservacion.getFechas\");\n } finally {\n if (conn != null) {\n conn.close();\n }\n }\n return fechas;\n }", "@Override\n\tpublic List<Fournisseur> getFourniseur() {\n\t\treturn dao.getFourniseur();\n\t}", "public ArrayList<CFicheFrais> fetchFichesFrais(String matricule) {\r\n if (bdd.connecter() == true) {\r\n ArrayList<CFicheFrais> liste = new ArrayList();\r\n ResultSet rs = bdd.executerRequeteQuery(\"SELECT * FROM `fiche_frais` WHERE fiche_frais.VIS_MATRICULE_VISITEUR=\"+ matricule +\" ;\");\r\n //ResultSet rs = bdd.executerRequeteQuery(\"SELECT * FROM `fiche_frais` ,`inclure`, `type_frais` WHERE fiche_frais.VIS_MATRICULE_VISITEUR=\"+ matricule +\" AND fiche_frais.FF_ID_FICHE_FRAIS=inclure.FF_ID_FICHE_FRAIS AND inclure.TF_CODE_TYPE_FRAIS=type_frais.TF_CODE_TYPE_FRAIS ;\");\r\n try {\r\n while (rs.next()) {\r\n CFicheFrais FicheFrais = convertir_RS_FicheFrais(rs);\r\n liste.add(FicheFrais);\r\n }\r\n } catch (SQLException ex) {\r\n }\r\n bdd.deconnecter();\r\n \r\n \r\n return liste;\r\n } else {\r\n System.out.println(\"Connexion KO\");\r\n }\r\n return null;\r\n }", "public void index() {\n\t\t\n\t\tList<Filme> preferencias = new ArrayList<Filme>();\n\t\tfor( Map.Entry<Key, Integer> entry : session.getUsuario().getPreferencias().entrySet()){\n\t\t\tFilme tmp = filmeDao.getById(entry.getKey());\n\t\t\ttmp.setVotos(entry.getValue());\n\t\t\tpreferencias.add(tmp);\n\t\t}\n\t\t\n\t\t// passando todos os filmes, o usuário e as preferencias dele\n\t\tresult.include(\"filmes\", filmeDao.getAllInOrder() );\n\t\tresult.include(\"usuario\", session.getUsuario() );\n\t\tresult.include(\"preferencias\", preferencias);\n\t}", "@Override\n public Optional<List<FollowStateTracker>> getAllFSTByFollower() {\n return this.getFSTByFollowerID(authenticationService.getCurrentUser().getId());\n }", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public static List<CentroDeCusto> readAll() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto\");\n return query.list();\n }", "List<Flight> findAllFlights();", "@GetMapping\n public ResponseEntity<List<Food>> getAllFoods(){\n List<Food> foods = foodDao.findAll();\n return new ResponseEntity<>(foods, HttpStatus.OK);\n }", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public List<Food> findAllfood() {\n\t\treturn foodDao.findAllfood();\r\n\t}", "List<InvoiceDTO> fetchAll();", "public ArrayList<Film> displayAllFilms() {\n return filmEdit.displayAllFilms();\n }", "@Override\r\n\tpublic List<FicheColisageValue> getAll(){\n\t\t\r\n\t\treturn ficheColisagePersistance.getAll();\r\n\t}", "public List<FornecedorResource> getListaFornecedores()\r\n {\r\n return fornecedorBusiness.listarFornecedores();\r\n }", "void fetchFactFeeds();", "public static List<CentroDeCusto> readAllAtivos() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto WHERE status = 'A'\");\n return query.list();\n }", "public List<Filme> getAll(String filtro) throws SQLException {\r\n\t\tString sql = \"SELECT F.*, G.Descricao as genero FROM filme F\"\r\n\t\t\t\t+ \" JOIN genero G on f.idGenero = g.idGenero \";\r\n\r\n\t\tif (filtro != null)\r\n\t\t\tsql += \"WHERE nome LIKE '%\" + filtro + \"%'\";\r\n\t\tsql += \" ORDER BY F.idFilme \";\r\n\r\n\t\tPreparedStatement stmt = Conexao.getConexao().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\tList<Filme> result = new ArrayList<Filme>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\tFilme dados = criaFilme(rs);\r\n\t\t\tresult.add(dados);\r\n\t\t}\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t\treturn result;\r\n\t}", "@Override\n\t\tpublic List<Carrera> getAll() {\n\t\t\t\treturn null;\n\t\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Profilo> getAll() {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Creo la query usando il linguaggio HQL (Hibernate Query Language)\r\n\t\tQuery query = session.createQuery(\"FROM Vocelicenza\");\r\n\t\t\t\r\n\t\t//Restituisco la lista di Profili\r\n\t\treturn query.list();\r\n\t}", "List fetchAll() throws AdaptorException ;", "public static List<PolovniAutomobili> readAll() {\n List<PolovniAutomobili> listaUsera = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT * FROM polovni WHERE 1\";\n try (Statement st = (Statement) CONNECTION.createStatement()) {\n ResultSet rs = st.executeQuery(query);\n while (rs.next()) {\n String imgUrl = rs.getString(\"imgUrl\");\n String naziv = rs.getString(\"naziv\");\n int godiste = rs.getInt(\"godiste\");\n int cena = rs.getInt(\"cena\");\n String url = rs.getString(\"url\");\n listaUsera.add(new PolovniAutomobili(imgUrl, naziv, godiste,cena,url));\n }\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n System.out.println(\"MySql Connection error...\");\n ex.printStackTrace();\n }\n return listaUsera;\n }", "@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic List<Music> queryAllFy(Integer page, Integer rows) {\n\t\tList<Music> allFy = musicdao.selectAllFy(page, rows);\r\n\t\treturn allFy;\r\n\t}", "@Transactional(readOnly = true)\n public FilasPacientesDTO listar() {\n List<Color> lc = colorRepository.findAll();\n lc.forEach(color -> {\n List<Paciente> listaPorColor = pacienteRepository.findByColorIdOrderByDateAsc(color.getId());\n seleccionarFila(listaPorColor, color.getColor());\n });\n return filas;\n }", "public AllRecords getAllRecords() {\n\t\treturn fileService.withFile(FILE_NAME, new AllRecords(), file -> {\n\t\t\tvar records = fileService.readFile(file, AllRecords.class);\n\t\t\trecords.easy = sort(records.easy);\n\t\t\trecords.medium = sort(records.medium);\n\t\t\trecords.hard = sort(records.hard);\n\t\t\treturn records;\n\t\t});\n\t}", "public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }", "public int obtenerFilas(){\n return FILAS;\n }", "@Override\n\tpublic List<ItemFactura> findAllItemFacturas() {\n\t\treturn itemFacturaDao.findAll();\n\t}", "public List<Record> _queryPerPatrolCard_Records(Long fid) {\n synchronized (this) {\n if (perPatrolCard_RecordsQuery == null) {\n QueryBuilder<Record> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.Fid.eq(null));\n perPatrolCard_RecordsQuery = queryBuilder.build();\n }\n }\n Query<Record> query = perPatrolCard_RecordsQuery.forCurrentThread();\n query.setParameter(0, fid);\n return query.list();\n }" ]
[ "0.7160096", "0.7005614", "0.67666227", "0.67005616", "0.6630934", "0.65497786", "0.65342295", "0.6509355", "0.648352", "0.64814436", "0.6460067", "0.6394737", "0.63938355", "0.63869196", "0.63771105", "0.6357738", "0.63573974", "0.63471574", "0.63401544", "0.6308529", "0.6293008", "0.627433", "0.62181234", "0.6163278", "0.61504215", "0.6094158", "0.60671", "0.6064278", "0.60205275", "0.5981863", "0.59650177", "0.59618604", "0.59390545", "0.5937563", "0.59193975", "0.5915999", "0.5891034", "0.58889383", "0.5851651", "0.5850841", "0.58335227", "0.5827077", "0.58257", "0.5789375", "0.5788761", "0.5788639", "0.5779554", "0.57612526", "0.5743669", "0.5737643", "0.57309544", "0.5730914", "0.5727987", "0.57259905", "0.57231903", "0.5722519", "0.5721043", "0.5720244", "0.5717121", "0.57156754", "0.57144195", "0.5713572", "0.57073456", "0.5694635", "0.5694039", "0.56937754", "0.568892", "0.5682223", "0.5671331", "0.5658463", "0.565807", "0.5650148", "0.5641859", "0.56402177", "0.5638689", "0.56362915", "0.56334406", "0.5628395", "0.5622613", "0.56212485", "0.56187224", "0.56111735", "0.56106997", "0.5609678", "0.56064874", "0.5600591", "0.55919755", "0.55884624", "0.55880845", "0.55796164", "0.55785596", "0.55757856", "0.55750805", "0.55747837", "0.55741006", "0.55737764", "0.556574", "0.5561342", "0.5560974", "0.55575436" ]
0.79688454
0
Initializes an input stream from standard input
public In(){ scanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME); scanner.useLocale(LOCALE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "TclInputStream(InputStream inInput) {\n input = inInput;\n }", "public InputReader() {\n reader = new Scanner(System.in);\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\r\n\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n\r\n tokenizer = new StringTokenizer(\"\");\r\n\r\n }", "static void init(InputStream input) {\n reader = new BufferedReader(new InputStreamReader(input));\n tokenizer = new StringTokenizer(\"\");\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public void setInput(InputStream iInputStream) {\n // prepare to read the newly opened input stream\n m_iInputStream = iInputStream;\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public OutputStream setStdInStream(int initialSize) throws IOException {\n\t\tif(stdInLatch.getCount()<1) {\n\t\t\treturn pipeOut;\n\t\t}\n\t\tpipeOut = new PipedOutputStream();\n\t\tpipeIn = new PipedInputStream(pipeOut, initialSize);\n\t\tstdInLatch.countDown();\n\t\tlog.debug(Banner.banner(\"Dropped Latch for STDIN Stream\"));\n\t\treturn pipeOut;\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "OutputStream getStdin();", "public LineInputStream(InputStream is) {\n\t\tinputStream = is;\n\t}", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "public StreamReader() {}", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public RawReader(final InputStream is) throws NullPointerException {\n\t\tthis(is, DEFAULT_BUFFER_SIZE);\n\t}", "public void initialize(final InputStream stream) throws IOException\n {\n // load up the properties\n final Properties props = new Properties();\n props.load(stream);\n initialize(props);\n }", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "public MonitorableInputStream(InputStream aIn) throws IOException {\n this(aIn, false);\n }", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public void initialize(InputStream stream) {\n if (stream == null) {\n return;\n }\n new DictionaryHandler().read(stream);\n try {\n stream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public FastaReader(InputStream ins) throws IOException{\n\t\tsuper(ins);\n\t}", "protected void init( InputSource input )\n throws SAXException, IOException\n {\n InputStream is;\n \n if ( input == null )\n throw new NullPointerException( format( \"Error001\", \"input\" ) );\n is = input.getByteStream();\n if ( is != null ) {\n try {\n if ( input.getEncoding() == null )\n _reader = new InputStreamReader( new BufferedInputStream( is ) );\n else\n _reader = new InputStreamReader( new BufferedInputStream( is ), input.getEncoding() );\n input.setCharacterStream( _reader );\n } catch ( UnsupportedEncodingException except ) {\n fatalError( new SAXException( format( \"Parser014\", input.getEncoding() ) ) );\n }\n } else if ( input.getCharacterStream() != null )\n _reader = new BufferedReader( input.getCharacterStream() );\n else {\n input = resolveEntity( input.getPublicId(), input.getSystemId() );\n if ( input == null )\n fatalError( new SAXException( message( \"Parser013\" ) ) );\n else {\n init( input );\n return;\n }\n }\n \n _inputSource = input;\n _tokenText.setLength( 0 );\n _pushBackIndex = 0;\n _lineNumber = 0;\n _columnNumber = 0;\n _lastException = null;\n }", "MyInputStream(String name, InputStream in) {\n this.name = name;\n this.in = new BufferedInputStream(in);\n buffer = new StringBuffer(4096);\n Thread thr = new Thread(this);\n thr.setDaemon(true);\n thr.start();\n }", "public Skeleton() throws IOException {\n\t\tconsoleIn = new BufferedReader(new InputStreamReader(System.in));\n\t}", "public MyInputStream(InputStream in) {\n super(in);\n this.in = in;\n }", "public synchronized void init() throws IOException\n {\n parserIn = new PipedOutputStream();\n PipedInputStream in = new PipedInputStream();\n parserIn.connect( in );\n antlrSchemaConverterLexer lexer = new antlrSchemaConverterLexer( in );\n parser = new antlrSchemaConverterParser( lexer );\n }", "protected void instrumentIO()\r\n {\r\n // Clear out all the stream history stuff\r\n tcIn = null;\r\n tcOut = null;\r\n tcInBuf = null;\r\n\r\n // Make sure these are history-wrapped\r\n SystemIOUtilities.out();\r\n SystemIOUtilities.err();\r\n\r\n // First, make sure the original System.in gets captured, so it\r\n // can be restored later\r\n SystemIOUtilities.replaceSystemInContents(null);\r\n\r\n // The previous line actually replaced System.in, but now we'll\r\n // \"replace the replacement\" with one that uses fail() if it\r\n // has no contents.\r\n System.setIn(new MutableStringBufferInputStream((String)null)\r\n {\r\n protected void handleMissingContents()\r\n {\r\n fail(\"Attempt to access System.in before its contents \"\r\n + \"have been set\");\r\n }\r\n });\r\n }", "public TarInputStream(Stream inputStream)\n\t{\n\t\tthis(inputStream, TarBuffer.DefaultBlockFactor);\n\t}", "public static InputStream nullInput() {\n if(nullIn == null) {\n nullIn = new NullInputStream();\n }\n return nullIn;\n }", "public void setIn(InputStream in);", "@NotNull InputStream openInputStream() throws IOException;", "public ResourceInputStream(InputStream in) {\n\t\t\tthis(in, System.currentTimeMillis());\n\t\t}", "public void init() {\n\t\ttry {\n\t\t\tthis.is = new ObjectInputStream(clientSocket.getInputStream());\n\t\t\tthis.os = new ObjectOutputStream(clientSocket.getOutputStream());\n\t\t\twhile (this.readCommand()) {}\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"XX. There was a problem with the Input/Output Communication:\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public RawReader(final InputStream is, final int bufferSize) throws NullPointerException, IllegalArgumentException {\n\t\tif (is == null) {\n\t\t\tthrow new NullPointerException(\"Input stream can't be null\"); \n\t\t}\n\t\telse if (bufferSize <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"Buffer size [\"+bufferSize+\"] must be greater than 0\"); \n\t\t}\n\t\telse {\n\t\t\tthis.is = is;\n\t\t\tthis.buffer = new byte[bufferSize];\n\t\t}\n\t}", "public interface Input \n{\n\t/*\n\t * Use to initialise input\n\t */\n\tboolean initialise (String args);\n\t/*\n\t * Return a line or return null\n\t */\n\tString getLine ();\n\t\n}", "public void openForInput () \n throws IOException {\n this.dict = new DataDictionary();\n openForInput (dict);\n }", "public TarInputStream(Stream inputStream, int blockFactor)\n\t{\n\t\tthis.inputStream = inputStream;\n\t\ttarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);\n\t}", "private void openInputStream() throws IOException {\n InputStreamReader isReader = new InputStreamReader(this.sock.getInputStream());\n reader = new BufferedReader(isReader);\n }", "public StreamGobbler(InputStream from, PrintStream to) {\n\t\tinput = from;\n\t\toutput = to;\n\t}", "public void setInputStream(InputStream stream) {\n this.inStream = stream;\n }", "synchronized static void initStreams()\n {\n if ( !initialized )\n {\n out = ansiStream(true);\n err = ansiStream(false);\n initialized = true;\n }\n }", "private void inicializar()\n\t{\n\t\tif( this.getIn() != null )\n\t\t\tthrow new ConsolaTecladoSoloPuedeHaberUnaInstanciaException();\n\t\t\t\n\t\tthis.setIn( new Scanner( System.in ) );\n\t}", "public ModemReader (InputStream inputStream) {\n\t\t\tthis.inputStream = inputStream;\n\t\t\tsetResultStrings (null);\n\t\t}", "public void setupParser(InputStream is) {\r\n inputSource = new InputSource(is);\r\n }", "void init() throws IOException {\n\t\tif (this.type==FILE){\n\t\t\tstream.init(new FileInputStream(name));\n\t\t}\n\t\telse{\n\t\t\tURL url = new URL(name);\n\t\t\tstream.init((url.openStream()));\n\t\t}\n\t}", "public COSInputStream createInputStream() throws IOException\n {\n return stream.createInputStream();\n }", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "private void initStreams() throws IOException {\n OutputStream os = socket.getOutputStream();\n InputStream is = socket.getInputStream();\n dos = new DataOutputStream(new BufferedOutputStream(os));\n dis = new DataInputStream(new BufferedInputStream(is));\n }", "private void initializeIOStreams() {\n try {\n inputStream = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\n outputStream = new ObjectOutputStream(new BufferedOutputStream(socket.getOutputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public InputStream openInputStream() throws IOException {\n\n\tthrow new IllegalArgumentException(\"Not supported\");\n }", "Stream<In> getInputStream();", "public BaseServerInputStream() {\n data = new ArrayDeque<IoBuffer>();\n marked = false;\n resetCache = null;\n }", "public void init() throws IOException;", "private Input()\n {\n }", "Yylex(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public final void setInputStream(final PrintStream newInputStream) {\n this.inputStream = newInputStream;\n }", "_JavaCCLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public StreamInputSplit() {\n // No-op\n }", "private static void initializeInput(String filename) {\n\t\t// Reading from specified file.\n\t\ttry\n\t\t{\n\t\t\tfileInput = new Scanner(new FileInputStream(filename));\n\t\t}\n\t\tcatch(FileNotFoundException e) \n\t\t{ \n\t\t\tSystem.err.println(\"\\nFile not found. Please re-enter.\");\n\t\t\tinitializeInput(getFilename());\n\t\t}\n\t}", "public void processStreamInput() {\n }", "public static\n InputStream inputStream() {\n return Input.wrappedInputStream;\n }", "public PklFileReader(InputStream inputStream)\r\n\t{\r\n\t\tsetInputStream(inputStream);\r\n\t}", "public abstract BasicInput createInput( boolean isSeq ) throws IOException;", "public Reading1(BufferedReader in, PrintStream out) { // agrego al constructor conversation\n\t\tthis.in = in;\n\t\tthis.out = out;\n\t}", "InputStream openStream() throws IOException;", "public abstract InputStream openStream(String str);", "public _RestFlexLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public InputStream inputWrap(InputStream is) \n throws IOException {\n logger.fine(Thread.currentThread().getName() + \" wrapping input\");\n \n // discard any state from previously-recorded input\n this.characterEncoding = null;\n this.inputIsChunked = false;\n this.contentEncoding = null; \n \n this.ris.open(is);\n return this.ris;\n }", "public StreamIn(Reader fd, String filename, PrintStream err)\r\n\t{\r\n\t\tthis.fd = fd;\r\n\t\tthis.filename = filename;\r\n\t\tthis.syserr = err;\r\n\t\t\r\n\t\t/* initialize character slots */\r\n\t\tthisc = 0;\r\n\t thisc = getC();\t/* current */\r\n\t holdc = 0;\t/* next, if look ahead */\r\n\t lastc = 0;\t/* previous */\r\n\r\n\t /* initialize scan buffers */\r\n\t buffer = new byte[2][BUFSIZE];\r\n\t currentbuf = 0;\r\n\t bufpos = 0;\r\n\t prvsize = 0;\r\n\t cursize = 0;\r\n\t}", "public void inputFromStream(BufferedReader dis) throws IOException {\n String line = dis.readLine();\n setFile(line);\n int lines = Str.strToInt(dis.readLine());\n if (lines != 0) {\n lineNos = new int[lines];\n for (int i = 0; i < lineNos.length; ++i) {\n lineNos[i] = Str.strToInt(dis.readLine());\n }\n }\n }", "private ConsoleScanner() {}", "public void setScan(InputStream inStream){\t\t\n\t\tthis.scan = new Scanner (inStream);\t\t\t\t\t\n\t}", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public Parser() throws IOException {\n\t\tlookahead = System.in.read();\n\t\terrorNum = 0;\n\t\tinput = \"\";\n\t\toutput = \"\";\n\t\terrorPos = \"\";\n\t\terrorList = new ArrayList<String>();\n\t\twrongState = false;\n\t}", "public void setInputStream(InputStream inputStream)\r\n\t{\r\n\t\tthis.inputStream = inputStream;\r\n\t}", "public CBS(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "void init() throws IOException;", "void init() throws IOException;", "public void setDefaultInputStream(InputStream defaultInputStream) {\n this.defaultInputStream = defaultInputStream;\n }", "public MiniLexer(java.io.InputStream in, Handler handler) {\r\n this(new java.io.InputStreamReader(in), handler);\r\n }", "public static InputStream toInputStream(final CharSequence input) {\n return toInputStream(input, Charset.defaultCharset());\n }", "@Override\n public void initialize() throws IOException {\n\n }", "public MyInputStream(String fileName)\n {\n try\n {\n in = new BufferedReader\n (new FileReader(fileName));\n }\n catch (FileNotFoundException e)\n {throw new MyInputException(e.getMessage());}\n }" ]
[ "0.7492599", "0.6962369", "0.6777618", "0.673736", "0.673736", "0.673736", "0.673736", "0.6722564", "0.6714456", "0.6677938", "0.6677858", "0.6677858", "0.6673655", "0.6654935", "0.6632256", "0.6530296", "0.65296793", "0.64888275", "0.6470671", "0.6460572", "0.64429516", "0.6440879", "0.6440879", "0.64376366", "0.64342594", "0.62934136", "0.62840587", "0.62729716", "0.62710685", "0.6250798", "0.6233197", "0.6225382", "0.6168945", "0.6165173", "0.61422235", "0.61087716", "0.6074866", "0.6062233", "0.60133845", "0.6012191", "0.59876716", "0.5945482", "0.594039", "0.5923983", "0.59153277", "0.59144133", "0.59140354", "0.589229", "0.5874344", "0.58684736", "0.5851071", "0.58485645", "0.5846115", "0.58347917", "0.5823006", "0.5808056", "0.5799143", "0.57932955", "0.57932776", "0.5762637", "0.57579243", "0.5752366", "0.57392836", "0.5727749", "0.5720438", "0.57150227", "0.57016754", "0.5698434", "0.5694072", "0.56909007", "0.5658235", "0.5657673", "0.56474644", "0.56468487", "0.5634935", "0.5634824", "0.56176573", "0.5613691", "0.56028944", "0.5602408", "0.5595364", "0.55905896", "0.5589823", "0.5578289", "0.5571893", "0.5565787", "0.55628675", "0.5559966", "0.55546737", "0.5546688", "0.5540881", "0.5539897", "0.5525137", "0.55200016", "0.55200016", "0.55194515", "0.55181104", "0.55157626", "0.55104697", "0.5501794" ]
0.61420405
35
Initializes an input stream from a file
public In(File file) throws Exception { if (file==null) throw new NoSuchElementException("file argument is null"); try{ FileInputStream fis=new FileInputStream(file); scanner=new Scanner(new BufferedInputStream(fis),CHARSET_NAME); scanner.useLocale(LOCALE); }catch (IOException ioe){ throw new IOException("could not open"+file,ioe); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "public MyInputStream(String fileName)\n {\n try\n {\n in = new BufferedReader\n (new FileReader(fileName));\n }\n catch (FileNotFoundException e)\n {throw new MyInputException(e.getMessage());}\n }", "public OnDemandInputStream(File file) {\n super();\n\n this.file = file;\n }", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public StreamReader() {}", "void init() throws IOException {\n\t\tif (this.type==FILE){\n\t\t\tstream.init(new FileInputStream(name));\n\t\t}\n\t\telse{\n\t\t\tURL url = new URL(name);\n\t\t\tstream.init((url.openStream()));\n\t\t}\n\t}", "public ResourceInputStream(File file) throws IOException {\n\t\t\tthis(new FileInputStream(file), file.lastModified());\n\t\t}", "@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "public StreamReader(File file) {\r\n\t\tthis.setFile(file);\r\n\t}", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "public void initialize(final InputStream stream) throws IOException\n {\n // load up the properties\n final Properties props = new Properties();\n props.load(stream);\n initialize(props);\n }", "public SYEParser(InputStream input, String name) throws FileNotFoundException {\n super(input);\n this.filename = name;\n }", "public void initialize(InputStream stream) {\n if (stream == null) {\n return;\n }\n new DictionaryHandler().read(stream);\n try {\n stream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "public MSDataReader(File in) throws IOException\n\t{\n\t\tif (in == null)\n\t\t\tthrow new NullPointerException(\"传入MSDataReader的输入流为null\");\n\t\t\n\t\tthis.file = in;\n\t\tthis.reader = new BufferedReader(new FileReader(in));\n\t\t\n\t\tinit();\n\t}", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "public ResourceInputStream(InputStream in) {\n\t\t\tthis(in, System.currentTimeMillis());\n\t\t}", "public ClassFile(DataInput stream)\n throws IOException\n {\n load(stream);\n }", "private void initializeTestFile(File testFile) throws IOException {\n testReader = new ASCIIreader(testFile);\n }", "public FastaReader(InputStream ins) throws IOException{\n\t\tsuper(ins);\n\t}", "static void init(InputStream input) {\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "private static void initializeInput(String filename) {\n\t\t// Reading from specified file.\n\t\ttry\n\t\t{\n\t\t\tfileInput = new Scanner(new FileInputStream(filename));\n\t\t}\n\t\tcatch(FileNotFoundException e) \n\t\t{ \n\t\t\tSystem.err.println(\"\\nFile not found. Please re-enter.\");\n\t\t\tinitializeInput(getFilename());\n\t\t}\n\t}", "static void init(InputStream input) {\r\n\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n\r\n tokenizer = new StringTokenizer(\"\");\r\n\r\n }", "public PklFileReader(InputStream inputStream)\r\n\t{\r\n\t\tsetInputStream(inputStream);\r\n\t}", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "static void init(InputStream input) {\n reader = new BufferedReader(new InputStreamReader(input));\n tokenizer = new StringTokenizer(\"\");\n }", "public MyInputStream(InputStream in) {\n super(in);\n this.in = in;\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "public InputStream open(File file) {\n return new FileInputStream(file);\n }", "@NotNull InputStream openInputStream() throws IOException;", "public void init(String tmpInputFile)\r\n {\n readFile(tmpInputFile);\r\n writeInfoFile();\r\n }", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "public ClassParser(final InputStream inputStream, final String file_name) {\n this.file_name = file_name;\n fileOwned = false;\n\n if (inputStream instanceof DataInputStream) {\n this.dataInputStream = (DataInputStream) inputStream;\n } else {\n this.dataInputStream = new DataInputStream(new BufferedInputStream(inputStream, BUF_SIZE));\n }\n }", "public DocReader(File f)\n\t{\n\t\tthis.inputFile = f;\n\t}", "public TarInputStream(Stream inputStream)\n\t{\n\t\tthis(inputStream, TarBuffer.DefaultBlockFactor);\n\t}", "public FileCommandInput(File inputFile) throws FileNotFoundException {\n Validate.notNull(inputFile, \"Input can't be NULL\");\n this.in = new LineNumberReader(new FileReader(inputFile));\n }", "public void initialize(InputStream is) {\n // Get data out of the restaurants file and store it in a readable way.\n ArrayList<String> restaurantData = getFileData(is);\n\n // Fill arrayList with restaurant objects by properly initializing restaurants.\n initializeRestaurantList(restaurantData);\n }", "@Override\n\tpublic void startInput(String path) throws FileNotFoundException, JavaLayerException {\n\t\tfis = new FileInputStream(path);\n\t\tsetBis(new BufferedInputStream(fis));\n\n\t\tplayer = new Player(getBis());\n\t}", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "public LineInputStream(InputStream is) {\n\t\tinputStream = is;\n\t}", "protected void init( InputSource input )\n throws SAXException, IOException\n {\n InputStream is;\n \n if ( input == null )\n throw new NullPointerException( format( \"Error001\", \"input\" ) );\n is = input.getByteStream();\n if ( is != null ) {\n try {\n if ( input.getEncoding() == null )\n _reader = new InputStreamReader( new BufferedInputStream( is ) );\n else\n _reader = new InputStreamReader( new BufferedInputStream( is ), input.getEncoding() );\n input.setCharacterStream( _reader );\n } catch ( UnsupportedEncodingException except ) {\n fatalError( new SAXException( format( \"Parser014\", input.getEncoding() ) ) );\n }\n } else if ( input.getCharacterStream() != null )\n _reader = new BufferedReader( input.getCharacterStream() );\n else {\n input = resolveEntity( input.getPublicId(), input.getSystemId() );\n if ( input == null )\n fatalError( new SAXException( message( \"Parser013\" ) ) );\n else {\n init( input );\n return;\n }\n }\n \n _inputSource = input;\n _tokenText.setLength( 0 );\n _pushBackIndex = 0;\n _lineNumber = 0;\n _columnNumber = 0;\n _lastException = null;\n }", "public RawReader(final InputStream is) throws NullPointerException {\n\t\tthis(is, DEFAULT_BUFFER_SIZE);\n\t}", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "InputStream openStream() throws IOException;", "public ObjReader(String filename){\n file = filename;\n }", "public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }", "private InputStream getInstream() {\r\n\t\tif (instream == null) try {\r\n\t\t\tinstream = new FileInputStream(file);\r\n\t\t} catch(IOException ioe) {\r\n\t\t\tthrow new RuntimeException(\"Couldn't create instream for test\", ioe);\r\n\t\t}\r\n\t\treturn instream;\r\n\t}", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public void init(String inputFile) \n\t{\t\t\n\t\tif (instance != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\ts = new Scanner(new FileReader(inputFile));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\\nnot a valid inputFile\");\n\t\t\t}\n\t\t\t//load mapping of reserved words and special symbols\n\t\t\tLoadCoreValues();\n\t\t\tinstance = new Tokenizer();\n\t\t}\n\t}", "TclInputStream(InputStream inInput) {\n input = inInput;\n }", "public static BufferedInputStream getInput(File file) throws IOException {\n return getInput(file.toPath());\n }", "public InputReader() throws FileNotFoundException, TransformerConfigurationException {\n this.csvlocation = System.getProperty(Static.SYSYEM_PROPERTY_FILE);\n this.templatelocation = System.getProperty(Static.SYSTEM_PROPERTY_TEMPLATE_FILE);\n init();\n }", "public CompressionInputStream(InputStream in) {\n super(in);\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public TarInputStream(Stream inputStream, int blockFactor)\n\t{\n\t\tthis.inputStream = inputStream;\n\t\ttarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public void setIn(InputStream in);", "public void setInputStream(InputStream stream) {\n this.inStream = stream;\n }", "public InputStream getInputStream() throws IOException {\n return new FileInputStream(_file);\n }", "public InputFile(String filePath) {\n this.filePath = filePath;\n }", "public void inputFromStream(BufferedReader dis) throws IOException {\n String line = dis.readLine();\n setFile(line);\n int lines = Str.strToInt(dis.readLine());\n if (lines != 0) {\n lineNos = new int[lines];\n for (int i = 0; i < lineNos.length; ++i) {\n lineNos[i] = Str.strToInt(dis.readLine());\n }\n }\n }", "public void start(InputStream in, String path);", "SparseStream openFile(String path, FileMode mode) throws IOException;", "abstract void initialize(boolean fromFile,int r,int c);", "public FileBitReadUtility(InputStream is) {\n\t\tin = is;\n\t\tbufferPos = Constant.BITS_PER_BYTES;// initial remaining space\n\t}", "public StreamIn(Reader fd, String filename, PrintStream err)\r\n\t{\r\n\t\tthis.fd = fd;\r\n\t\tthis.filename = filename;\r\n\t\tthis.syserr = err;\r\n\t\t\r\n\t\t/* initialize character slots */\r\n\t\tthisc = 0;\r\n\t thisc = getC();\t/* current */\r\n\t holdc = 0;\t/* next, if look ahead */\r\n\t lastc = 0;\t/* previous */\r\n\r\n\t /* initialize scan buffers */\r\n\t buffer = new byte[2][BUFSIZE];\r\n\t currentbuf = 0;\r\n\t bufpos = 0;\r\n\t prvsize = 0;\r\n\t cursize = 0;\r\n\t}", "public void init() throws IOException;", "void loadFromInputStream(InputStream inputStream) throws IOException;", "protected InputStream getInputStream() throws IOException\n\t {\n\t FileInputStream fin = new FileInputStream(fFilename);\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "public InputStream readFile( String fileName, FileType type );", "@Override\n\tpublic void init(String file_name) { deserialize(file_name); }", "private IntStream createStream() {\n DataInputStream dataInputStream = null;\n try {\n dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found\");\n }\n DataInputStream finalDin = dataInputStream;\n return IntStream.generate(() -> {\n try {\n assert finalDin != null;\n return finalDin.readInt();\n } catch (IOException e) {\n System.out.println(\"Stream problem\");\n }\n return 0;\n })\n .limit(20);\n }", "public Parser( File inFile ) throws FileNotFoundException\r\n {\r\n if( inFile.isDirectory() )\r\n throw new FileNotFoundException( \"Excepted a file but found a directory\" );\r\n \r\n feed = new Scanner( inFile );\r\n lineNum = 1;\r\n }", "public InputStream openInputStream() throws IOException {\n\n\tthrow new IllegalArgumentException(\"Not supported\");\n }", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "public MonitorableInputStream(InputStream aIn) throws IOException {\n this(aIn, false);\n }", "public FileInputStream openFileInput(final String path)\n throws java.io.FileNotFoundException {\n return GDFileSystem.openFileInput(path);\n }", "public static synchronized void Initialize() throws FileNotFoundException, UnsupportedEncodingException {\n fileReaderInit(fLocation);\n \n pbr = new PushbackReader(reader, 5);\n \n \n File currentDirFile = new File(\".\");\n String helper = currentDirFile.getAbsolutePath();\n outLocation = \"src/parser_resources/\" + outFile;\n /*scan.nextLine();*/\n \n File f = new File(outLocation);\n\n if (f.exists() && !f.isDirectory()) {\n fWriter = new PrintWriter(outLocation, \"Ascii\");\n System.out.println(\"\\nOutput file initialized for Scanner\");\n System.out.println(\"Scanning output to: \" + helper + \"/\" + outLocation);\n } else {\n System.out.println(\"Error: output file missing please \\\"touch\"\n + \"scanner.out\\\" in parser_resources directory.\");\n }\n }", "public GridFSInputFile createFile(InputStream in, String filename) {\n\treturn new GridFSInputFile(this, in, filename);\n }", "Yylex(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static InputStream getInputStreamFromFile(File file)\n\t\t\tthrows IOException {\n\t\treturn new FileInputStream(file);\n\t}", "public Scanner( String filename ) throws IOException\n {\n sourceFile = new PushbackInputStream(new FileInputStream(filename));\n \n nextToken = null;\n }", "public ReaderInputStream(Reader reader) {\n if (reader == null) {\n throw new IllegalArgumentException(\"reader must not be null\");\n }\n in = reader;\n }", "public XGMMLReader(InputStream is) {\n \t\tthis.networkStream = is;\n \t\tinitialize();\n \t}", "public void init(AudioFile file) {\r\n\t\tinit(file, null, null);\r\n\t}", "SparseStream openFile(String path, FileMode mode, FileAccess access) throws IOException;", "public abstract InputStream openStream(String str);" ]
[ "0.7441038", "0.71619594", "0.7040354", "0.7029389", "0.6771645", "0.67700785", "0.6738763", "0.67171764", "0.6682221", "0.6643828", "0.6578591", "0.6553948", "0.6533965", "0.6488375", "0.64305586", "0.6365352", "0.62891364", "0.6286661", "0.62666416", "0.62489784", "0.62413013", "0.6235895", "0.6235895", "0.6235895", "0.6235895", "0.62114316", "0.62096953", "0.6209333", "0.61935705", "0.6191511", "0.6191273", "0.61892307", "0.61841613", "0.61826706", "0.61821574", "0.61778563", "0.6175043", "0.6174917", "0.6152974", "0.6152974", "0.61352915", "0.6125003", "0.6109939", "0.60889256", "0.6086645", "0.60854506", "0.6037745", "0.6036456", "0.60263413", "0.6018363", "0.60031986", "0.5999462", "0.5987843", "0.5983622", "0.59770995", "0.5967204", "0.5963711", "0.5959641", "0.59571666", "0.5918672", "0.58944064", "0.58943194", "0.5893941", "0.5887125", "0.5878227", "0.58776927", "0.5867625", "0.58640915", "0.58640915", "0.58619815", "0.58613783", "0.5848513", "0.58485", "0.5848052", "0.58424044", "0.5822316", "0.58117163", "0.58040595", "0.5801348", "0.5796939", "0.5794805", "0.5792155", "0.5781394", "0.5779809", "0.57623756", "0.5748063", "0.57433236", "0.5733314", "0.5732915", "0.573163", "0.57310534", "0.5730553", "0.5728272", "0.5721791", "0.5715941", "0.5698047", "0.5686556", "0.56734794", "0.56692845", "0.5666091", "0.566122" ]
0.0
-1
read and returns the next line in this input stream
public String readLine(){ String line; try{ line=scanner.nextLine(); }catch (NoSuchElementException e){ line=null; } return line; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "private String getNextLine() throws IOException {\n final BufferedReader in = this.in;\n if (in == null) {\n throw new NoSuchElementException();\n } else {\n final String nextLine = this.in.readLine();\n if (nextLine == null) {\n throw new NoSuchElementException();\n }\n return nextLine;\n }\n }", "public VCFLine getNextLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn reader.getCurrentLine();\n\t}", "public String getNextLine() throws IOException {\n\n String currentLine = nextLine;\n this.nextLine = bufferedReader.readLine();\n\n return currentLine;\n }", "public String nextLine()\n\t{\t\t\n\t\t\n\t\treturn this.getIn().nextLine();\n\t}", "public String next() {\n try {\n String result = fNextLine;\n if (fNextLine != null) {\n fNextLine = fIn.readLine();\n if (fNextLine == null) {\n fIn.close();\n }\n }\n\n return result;\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public static String readNextLine() {\n return sc.nextLine();\n }", "public String readNextLine() throws IOException {\n if (this.reader == null) {\n return null;\n }\n\n boolean openNext = false;\n String line;\n while ((line = this.reader.readLine()) == null) {\n // The current file is read at the end, ready to read next one\n this.close(this.index);\n\n if (++this.index < this.readables.size()) {\n // Open the second or subsequent readables, need\n this.reader = this.open(this.index);\n openNext = true;\n } else {\n return null;\n }\n }\n // Determine if need to skip duplicate header\n if (openNext && isDuplicateHeader(line)) {\n line = this.readNextLine();\n }\n return line;\n }", "public String getNextLine() throws IOException{\n String nextLine;\n\n if (this.bufferedReader == null) {\n log.error(\"{} : Input file not open when trying to read next line\", LOG_TAG);\n }\n try {\n nextLine = this.bufferedReader.readLine();\n while(nextLine != null && (StringUtils.isBlank(nextLine) || nextLine.startsWith(\"/\"))) {\n nextLine = this.bufferedReader.readLine();\n }\n } catch (IOException e) {\n log.error(\"{} : IOException, file read error {}\", LOG_TAG, e.getStackTrace());\n throw e;\n }\n\n log.debug(\"Next line read : {}\", nextLine);\n return nextLine;\n }", "public final String readNextLine() throws IOException {\r\n String str;\r\n if (buf_end-buf_pos <= 0) {\r\n if (fillBuffer() < 0) {\r\n throw new IOException(\"Error filling buffer!\");\r\n }\r\n }\r\n int lineEnd = -1;\r\n for (int i = buf_pos; i < buf_end; i++) {\r\n if (buffer[i] == '\\n') {\r\n lineEnd = i;\r\n break;\r\n }\r\n }\r\n if (lineEnd < 0) {\r\n StringBuilder input = new StringBuilder(256);\r\n int c;\r\n while (((c = read()) != -1) && (c != '\\n')) {\r\n input.append((char)c);\r\n }\r\n if ((c == -1) && (input.length() == 0)) {\r\n return null;\r\n }\r\n return input.toString();\r\n }\r\n\r\n if (lineEnd > 0 && buffer[lineEnd-1] == '\\r') {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos -1);\r\n }\r\n else {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos);\r\n }\r\n buf_pos = lineEnd +1;\r\n return str;\r\n }", "private void readNext() {\n nextLine = null;\n try {\n while (nextLine == null) {\n nextLine = reader.readNext();\n reader.consumeEmptyLines();\n if (reader.eof()) {\n break;\n }\n }\n if (nextLine != null) {\n super.recordCounter++;\n if (super.readLimit > 0 && super.recordCounter > super.readLimit) {\n nextLine = null;\n }\n }\n } catch (Exception ignore) {\n // no more lines\n }\n }", "private String readLine() {\n\t\ttry {\n\t\t\treturn reader.nextLine();\t\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "private int getNextLine() {\n return peekToken().location.start.line;\n }", "void getNextLine()\n\t\t\tthrows IOException, FileNotFoundException {\n String nextLine = \"\";\n if (reader == null) {\n nextLine = textLineReader.readLine();\n } else {\n nextLine = reader.readLine();\n }\n if (nextLine == null) {\n atEnd = true;\n line = new StringBuffer();\n } else {\n\t\t line = new StringBuffer (nextLine);\n }\n if (context.isTextile()) {\n textilize ();\n }\n\t\tlineLength = line.length();\n\t\tlineIndex = 0;\n\t}", "String readLine() throws IOException\n\t{\n\t\tString line = null;\n\t\tif (haveStreams())\n\t\t\tline = m_in.readLine();\n\t\telse\n\t\t\tline = keyboardReadLine();\n\n\t\tsetCurrentLine(line);\n\t\treturn line;\n\t}", "public String readLine() {\n\n String temp = null;\n\n try\n {\n assert this.isValid();\t\t\t//Test that we can read the file\n temp = br.readLine();\t\t\t//Read the next line and store it as temp\n }\n\n\t\t//Catch possible exceptions\n catch(java.io.IOException e) {\n System.out.println(\"Error reading file: \" + e );\n }\n\n return temp;\n }", "private String nextLine() {\n if (console) {\n return con.nextLine();\n }\n return scan.nextLine();\n\n }", "public void goNextLine () throws IOException {\n\t\treader.goNextLine();\n\t\tcurrentLine = reader.getCurrentLine();\n\t}", "private static String readNextLine(BufferedReader reader) {\n\t\t\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\treturn line;\n\t\t} catch(IOException e) {\n\t\t\tGdx.app.error(TAG, \"Failed to read the file\", e);\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch(IOException ex) {\n\t\t\t\tGdx.app.error(TAG, \"Failed to close file\");\n\t\t\t\tGdx.app.exit();\n\t\t\t}\n\t\t\tGdx.app.exit();\n\t\t\treturn null;\n\t\t}\n\t}", "private void readLine() throws IOException {\n line = reader.readLine(); // null at the end of the source\n currentPos = -1;\n\n if (line != null) {\n lineNum++;\n }\n\n if (line != null) {\n sendMessage(new Message(MessageType.SOURCE_LINE, new Object[]{lineNum, line}));\n }\n }", "public String nextLine() {\n\t\treturn null;\r\n\t}", "private String nextLine(BufferedReader reader) throws IOException {\n String ln = reader.readLine();\n if (ln != null) {\n int ci = ln.indexOf('#');\n if (ci >= 0)\n ln = ln.substring(0, ci);\n ln = ln.trim();\n }\n return ln;\n }", "public VCFLine getNextValidLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn getCurrentValidLine();\n\t}", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "public String readLine() throws IOException {\n/* 176 */ String line = this.currentFilePart.readLine();\n/* 177 */ while (line == null) {\n/* 178 */ this.currentFilePart = this.currentFilePart.rollOver();\n/* 179 */ if (this.currentFilePart != null) {\n/* 180 */ line = this.currentFilePart.readLine();\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 188 */ if (\"\".equals(line) && !this.trailingNewlineOfFileSkipped) {\n/* 189 */ this.trailingNewlineOfFileSkipped = true;\n/* 190 */ line = readLine();\n/* */ } \n/* */ \n/* 193 */ return line;\n/* */ }", "public String readLine() {\n if(in.hasNextLine()) {\n return in.nextLine();\n } else {\n // remote host closed connection!\n cleanup();\n return null;\n }\n }", "public String readLine() throws IOException {\n\t\t// Punt on this and use BufferedReader routines.\n\t\tBufferedReader d = new BufferedReader(new InputStreamReader(this));\n\t\treturn d.readLine();\n\t}", "public String getLine()\n\t{\n\t\ttry\n\t\t{\n\t\t\tline = reader.readLine();\n\t\t} catch (IOException ioe)\n\t\t{\n\t\t\t//\n\t\t}\n\n\t\treturn line;\n\t}", "@Override\n public String readLine() throws IOException {\n checkBuffer(-1);\n this.randomAccessFile.seek(this.fileOffset + this.bufferPointer.bufferOffset);\n String line = this.randomAccessFile.readLine();\n this.fileOffset = this.randomAccessFile.getFilePointer();\n this.bufferPointer.invalidate();\n return line;\n }", "public String readFirstLine() {\n if ( scanner.hasNextLine() ) {\n return scanner.nextLine();\n }\n return \"\";\n }", "protected void readNextChar() throws IOException {\n nextChar = inputReader.read();\n switch (nextChar) {\n case -1: // EOF\n if (char_num == 0) {\n char_num = -1;\n break;\n }\n nextChar = '\\n';\n // fall thru\n case '\\n':\n line_num++;\n char_num = 0;\n break;\n default:\n line.append((char) nextChar);\n char_num++;\n return;\n }\n line.setLength(0);\n }", "@Override\n\tpublic String readLine() throws IOException {\n\t\tString line = super.readLine();\n\t\n\t\tif(line==null){\n\t\t\treturn null;\n\t\t}\t\n\t\tline = count+\" \"+line;\n\t\tcount++;\n\t\treturn line;\n\t}", "private String[] readNextRecord() throws IOException {\n final String nextLine = getNextLine();\n return parseLine(nextLine, true);\n }", "public abstract String readLine() throws IOException, InterruptedException;", "private String readLine() {\r\n\t\ttry {\r\n\t\t\treturn input.readLine();\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Stacktrace next() throws IOException {\n\t\tString line;\n\t\tStacktrace stacktrace = null;\n\t\twhile (stacktrace == null && (line = input.readLine()) != null) {\n\t\t\tif (!StringUtils.isEmpty(line)) {\n\t\t\t\tlineBuffer.add(line);\n\t\t\t\tstacktrace = processLine(line);\n\t\t\t}\n\t\t}\n\t\treturn stacktrace;\n\t}", "private String readLine(ByteBuf in) {\n\n int bytesToRead;\n byte[] data = null;\n int bytesToSkip;\n\n if ((bytesToRead = in.bytesBefore((byte) LINE_FEED_CHAR)) > -1) {\n // Found the line feed.\n bytesToSkip = 1;\n\n // Check (and ignore) optional carriage return.\n if (bytesToRead > 0 && in.getByte(bytesToRead - 1) == CARRIAGE_RETURN_CHAR) {\n bytesToSkip++;\n bytesToRead--;\n }\n\n // Check that the bytes we're about to read will not exceed the\n // max frame size.\n checkTooLongFrame(bytesToRead);\n\n data = new byte[bytesToRead];\n in.readBytes(data);\n in.skipBytes(bytesToSkip);\n\n // Count the bytes read.\n currentDecodedByteCount += bytesToRead;\n }\n else {\n // No line feed. Make sure we're not buffering more than the max\n // frame size.\n checkTooLongFrame(in.readableBytes());\n }\n\n if (data != null) {\n return new String(data, StompConstants.UTF_8);\n }\n else {\n return null;\n }\n }", "private String getNextLine () {\n String line;\n if (endOfText()) {\n line = \"\";\n } else {\n int lineEndLength = 1;\n char c = ' ';\n char d = ' ';\n char x = ' ';\n lineEnd = index;\n boolean endOfLine = false;\n while (! endOfLine) {\n if (lineEnd >= blockIn.length()) {\n endOfLine = true;\n } else {\n c = blockIn.charAt (lineEnd);\n if (c == GlobalConstants.CARRIAGE_RETURN) {\n x = GlobalConstants.LINE_FEED;\n endOfLine = true;\n }\n else\n if (c == GlobalConstants.LINE_FEED) {\n x = GlobalConstants.CARRIAGE_RETURN;\n endOfLine = true;\n }\n if (endOfLine) {\n if ((lineEnd + 1) < blockIn.length()) {\n d = blockIn.charAt (lineEnd + 1);\n if (d == x) {\n lineEndLength = 2;\n }\n }\n } else { \n // not end of line\n lineEnd++;\n }\n } // end if another char to look at\n } // end while not end of line\n lineStart = index;\n if (lineEnd < lineStart) {\n lineEnd = blockIn.length();\n }\n if (lineEnd >= lineStart) {\n index = lineEnd + lineEndLength;\n line = blockIn.substring (lineStart, lineEnd);\n if (line.equals (getBlockEnd())) {\n blockEnded = true;\n }\n } else {\n line = \"\";\n } // end if no line to return\n } // end if more of block left\n checkNextField();\n return line;\n }", "@Override\n\tpublic String readLine() throws IOException {\n\t\tint length = readInt();\n\t\twriteInt(length);\n\t\tbyte[] data = awaitNextPacket(new byte[length]);\n\t\treturn new String(data);\n\t}", "@Override\n public String readLine() {\n try {\n return this.bufferedReader.readLine();\n } catch (IOException e) {\n return \"\";\n }\n }", "public static String readLine()\n {\n \tString ch=scanner.nextLine();\n \treturn ch;\n }", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "public String readLine() throws IOException\r\n\t{\r\n\t\treturn file.readLine();\r\n\t}", "private String getNextLine(Scanner input)\n\t{\n\t\tString line = input.nextLine().trim();\n\t\twhile ((line.length() == 0 || line.startsWith(\"#\") || line.startsWith(\"!\")) && input.hasNext())\n\t\t\tline = input.nextLine().trim();\n\t\tif (line.startsWith(\"#\") || line.startsWith(\"!\"))\n\t\t\tline = \"\";\n\t\treturn line;\n\t}", "public String readString() {\n return readNextLine();\n }", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "public synchronized String Readline() {\n\t return lines.poll();\n\t}", "public String readLine() throws IOException, ReadTimeoutException {\n\t\ttry {\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[0] = (byte) inputStream.read();\n\t\t\twaitForAvailable();\n\t\t\tlineBuffer[1] = (byte) inputStream.read();\n\t\t\tlineLength = 2;\n\t\t\twhile (lineBuffer[lineLength - 2] != (byte) 13\n\t\t\t\t|| lineBuffer[lineLength - 1] != (byte) 10) {\n\t\t\t\twaitForAvailable();\n\t\t\t\tlineBuffer[lineLength] = (byte) inputStream.read();\n\t\t\t\tlineLength++;\n\t\t\t}\n\t\t\treturn new String(lineBuffer, 0, lineLength - 2);\n\t\t} catch (ArrayIndexOutOfBoundsException aioobe) {\n\t\t\tthrow new IOException(\"Line too long.\");\n\t\t}\n\t}", "int nextLine(int allocate) throws IOException {\n final int length = lineLoader.nextLine(allocate);\n if(length>=0)\n lineNumber++;\n return length;\n }", "public final void nextRow() {\n this.line++;\n }", "public char next()\n {\n char current = text[position];\n\n if (position > 0 && text[position - 1] == '\\n')\n {\n lineNo++;\n begin = position;\n }\n\n position++;\n\n return current;\n }", "private String next(int i) throws IOException {\r\n\t\tif(buffer!=null) {\r\n\t\t\tString s=buffer;\r\n\t\t\tbuffer=null;\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tif (i==0) {\r\n\t\t\treturn in.readLine();\r\n\t\t} else return in2.readLine();\r\n\t}", "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "private void getNextToken() throws IOException {\n if (tok.ttype==LexAnn.TT_EOL) {\n if (code.getCurLine() < maxLine) {\n code.setCurLine(code.getCurLine()+1);\n tok.setString(code.getLine());\n tok.nextToken();\n } else {\n tok.ttype=LexAnn.TT_EOF; //the only place this gets set\n }\n } else {\n tok.nextToken();\n }\n }", "protected void readAhead() {\n if (! reader.hasNext()) {\n this.nextLine = null;\n } else {\n this.nextLine = reader.next();\n while (this.nextLine != null && this.nextLine.isEmpty() && reader.hasNext())\n this.nextLine = reader.next();\n }\n }", "public List<String> nextOneLine() throws IOException {\n counterSeveralLines = linesAfter;\n if (StringUtils.isBlank(currentPath)) return null;\n String sCurrentLine;\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n listBefore = addToArray(sCurrentLine);\n }\n return listBefore;\n }", "public java.lang.String readLine() {\n /*\n r7 = this;\n r0 = r7.in;\n monitor-enter(r0);\n r1 = r7.buf;\t Catch:{ all -> 0x0097 }\n if (r1 != 0) goto L_0x000f;\n L_0x0007:\n r1 = new java.io.IOException;\t Catch:{ all -> 0x0097 }\n r2 = \"LineReader is closed\";\n r1.<init>(r2);\t Catch:{ all -> 0x0097 }\n throw r1;\t Catch:{ all -> 0x0097 }\n L_0x000f:\n r1 = r7.pos;\t Catch:{ all -> 0x0097 }\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n if (r1 < r2) goto L_0x0018;\n L_0x0015:\n r7.aOB();\t Catch:{ all -> 0x0097 }\n L_0x0018:\n r1 = r7.pos;\t Catch:{ all -> 0x0097 }\n L_0x001a:\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n r3 = 10;\n if (r1 == r2) goto L_0x0051;\n L_0x0020:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r2 = r2[r1];\t Catch:{ all -> 0x0097 }\n if (r2 != r3) goto L_0x004e;\n L_0x0026:\n r2 = r7.pos;\t Catch:{ all -> 0x0097 }\n if (r1 == r2) goto L_0x0035;\n L_0x002a:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r3 = r1 + -1;\n r2 = r2[r3];\t Catch:{ all -> 0x0097 }\n r4 = 13;\n if (r2 != r4) goto L_0x0035;\n L_0x0034:\n goto L_0x0036;\n L_0x0035:\n r3 = r1;\n L_0x0036:\n r2 = new java.lang.String;\t Catch:{ all -> 0x0097 }\n r4 = r7.buf;\t Catch:{ all -> 0x0097 }\n r5 = r7.pos;\t Catch:{ all -> 0x0097 }\n r6 = r7.pos;\t Catch:{ all -> 0x0097 }\n r3 = r3 - r6;\n r6 = r7.charset;\t Catch:{ all -> 0x0097 }\n r6 = r6.name();\t Catch:{ all -> 0x0097 }\n r2.<init>(r4, r5, r3, r6);\t Catch:{ all -> 0x0097 }\n r1 = r1 + 1;\n r7.pos = r1;\t Catch:{ all -> 0x0097 }\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n return r2;\n L_0x004e:\n r1 = r1 + 1;\n goto L_0x001a;\n L_0x0051:\n r1 = new com.a.a.b$1;\t Catch:{ all -> 0x0097 }\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r2 = r2 - r4;\n r2 = r2 + 80;\n r1.<init>(r2);\t Catch:{ all -> 0x0097 }\n L_0x005d:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r7.end;\t Catch:{ all -> 0x0097 }\n r6 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r5 - r6;\n r1.write(r2, r4, r5);\t Catch:{ all -> 0x0097 }\n r2 = -1;\n r7.end = r2;\t Catch:{ all -> 0x0097 }\n r7.aOB();\t Catch:{ all -> 0x0097 }\n r2 = r7.pos;\t Catch:{ all -> 0x0097 }\n L_0x0071:\n r4 = r7.end;\t Catch:{ all -> 0x0097 }\n if (r2 == r4) goto L_0x005d;\n L_0x0075:\n r4 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r4[r2];\t Catch:{ all -> 0x0097 }\n if (r4 != r3) goto L_0x0094;\n L_0x007b:\n r3 = r7.pos;\t Catch:{ all -> 0x0097 }\n if (r2 == r3) goto L_0x008a;\n L_0x007f:\n r3 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r2 - r5;\n r1.write(r3, r4, r5);\t Catch:{ all -> 0x0097 }\n L_0x008a:\n r2 = r2 + 1;\n r7.pos = r2;\t Catch:{ all -> 0x0097 }\n r1 = r1.toString();\t Catch:{ all -> 0x0097 }\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n return r1;\n L_0x0094:\n r2 = r2 + 1;\n goto L_0x0071;\n L_0x0097:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.a.a.b.readLine():java.lang.String\");\n }", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "public final int getLine() {\n/* 377 */ return this.bufline[this.bufpos];\n/* */ }", "@Override\r\n\tpublic String next() {\n\t\tString nx;\r\n\r\n\t\tnx = p.getNext();\r\n\r\n\t\tif (nx != null) {\r\n\t\t\tthisNext = true;\r\n\t\t\tinput(nx);\r\n\t\t}\r\n\t\treturn nx;\r\n\t}", "public boolean next() throws IOException;", "private int getNextChar() throws IOException{\n\t\tpos++;\n\t\tsourceReader.mark(20);\n\t\treturn sourceReader.read();\n\t}", "public MInOutLine getLine()\n\t{\n\t\tif (m_line == null)\n\t\t\tm_line = new MInOutLine (getCtx(), getM_InOutLine_ID(), get_TrxName());\n\t\treturn m_line;\n\t}", "abstract public String readLine() throws TerminalException;", "private String eatLine( InputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "public String getLine() {\n return this.line;\n }", "public Line getLine ()\r\n {\r\n if (line == null) {\r\n computeLine();\r\n }\r\n\r\n return line;\r\n }", "private String readLine(BufferedReader br) throws IOException {\n StringBuffer sb = new StringBuffer();\n boolean haveCR = false;\n boolean done = false;\n int i;\n char c;\n \n while((i = br.read()) != -1) {\n c = (char)i;\n \n if(haveCR) {\n switch(c) {\n case '\\n':\n sb.append(c);\n done = true;\n break;\n default:\n br.reset();\n done = true;\n break;\n }\n }\n else {\n sb.append(c);\n switch(c) {\n case '\\n':\n done = true;\n break;\n case '\\r':\n br.mark(1);\n haveCR = true;\n }\n }\n \n if(done) {\n break;\n }\n }\n\n return sb.length() > 0 ? sb.toString() : null;\n }", "public synchronized boolean next() throws IOException {\n\t\treturn next(true);\n\t}", "public static int getLine() {\r\n\t\treturn rline;\r\n\t}", "public String getLine() {\r\n\t\treturn currentString;\r\n\t}", "private String next() {\n if (console) {\n return con.next();\n }\n return scan.next();\n }", "public String readLine() {\n BufferedReader input;\n String str = null;\n \n if (file == null || line < 0) {\n return null;\n }\n try {\n input = new BufferedReader(new FileReader(file));\n for (int i = 0; i < line; i++) {\n str = input.readLine();\n }\n input.close();\n } catch (IOException e) {\n return null;\n }\n return str;\n }", "public Token getNextToken() {\r\n \r\n // if no next token, abort\r\n if (!this.hasNextToken()) return null;\r\n \r\n // get the current character\r\n char c = this.stream.peek();\r\n \r\n // comment\r\n if (c==this.charComment) {\r\n // read the line and return the token\r\n this.current = new Token(this.getUntilMeetChar('\\n'));\r\n return this.current;\r\n }\r\n \r\n // !\r\n if (c==this.charSize) {\r\n this.stream.next(); // consume the character\r\n this.current = new Token(String.valueOf(this.charSize)); // and build the token\r\n return this.current;\r\n }\r\n \r\n // else\r\n this.current = new Token(this.getUntilMeetChar(this.charSeparator)); // extract until a charSeparator is met\r\n return this.current;\r\n \r\n }", "public String ReadLine() {\n\tString s = childStdout.Readline();\n\treturn s;\n }", "private static String readLine() {\r\n String input=\"\";\r\n try {\r\n input = in.readLine();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return input;\r\n }", "private int getNextIndicator() throws IOException {\n if (this.indicator == 0) {\n this.indicator = in.read();\n }\n return this.indicator;\n }", "@Override\r\n\tpublic CEntity readNext(CEntity entity) {\n\t\tentity.read(scanner);\r\n\t\treturn entity;\r\n\t}", "public String getline() {\n\t\treturn _line;\n\t}", "private LogRecordWithInputStream nextLogRecord() throws IOException {\n try {\n return nextLogRecord(reader);\n } catch (EndOfStreamException e) {\n eos = true;\n return null;\n }\n }", "public String getLine();", "public synchronized Pair<K, V> next() throws IOException {\n\t\t\treturn data.next();\n\t\t}", "public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }", "public static String readLine()\n\t{\n\t\tif (bJunit == true)\n\t\t{\n\t\t\tsLastLine = sJunitInput;\n\t\t\twriteLine(\"JUnit INPUT: \" + sJunitInput);\n\t\t\treturn sLastLine;\n\t\t}\n\t\n\t\ttry {\n\t\t\tsLastLine = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading from STDIN\");\n\t\t}\n\t\t\n\t\treturn sLastLine;\n\t\t\n\t}", "protected String readLine()\n { try { if (stdin!=null) return stdin.readLine(); } catch (IOException e) {}\n return null;\n }", "void readNextChar() throws ReaderException;", "public int readInt() {\n return Integer.parseInt(readNextLine());\n }", "public boolean hasNextLine() {\n return nextLine != null;\n }", "public int nextFreeBufferLine() {\n\t\tlogger.debug(\">> nextFreeBufferLine()\");\n\t\tint line = getRndLine();\n\t\tlogger.debug(\"<< nextFreeBufferLine(): %s\", line);\n\t\treturn line;\n\t}", "@Test\n public void testNextLineText() {\n System.out.println(\"nextLineText\");\n System.out.println(\"nextLineText@no line terminators in the file.\");\n for(TypeOfStream stype: TypeOfStream.values()) {\n InputStream stream = getInputStream(stype, TypeOfContent.BYTE_10, cs_UTF_8);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs_UTF_8.newDecoder(), 10);\n assertEquals(0, instance.position());\n String expResult = TypeOfContent.BYTE_10.getContent();\n String result = instance.nextLineText();\n assertEquals(expResult, result);\n assertEquals(11, instance.position());\n }\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public static String readString() {\n return in.nextLine();\n }", "String getLine();", "public int getLine();", "public int getLine();", "public int getLine();", "private void nextChar() {\n\t\tif (this.c >= 0) {\n\t\t\ttry {\n\t\t\t\tif (this.c == '\\n') {\n\t\t\t\t\tthis.line++;\n\t\t\t\t\tthis.column = 0;\n\t\t\t\t}\n\t\t\t\tthis.c = this.input.read();\n\t\t\t\tthis.column++;\n\t\t\t} catch (final IOException e) {\n\t\t\t\tthis.c = -1;\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.81387174", "0.78811264", "0.78492427", "0.78158015", "0.7752266", "0.7725714", "0.770441", "0.73714733", "0.7316544", "0.7150186", "0.70829743", "0.704842", "0.70319116", "0.6924007", "0.6911438", "0.6841594", "0.67823714", "0.67727005", "0.6735828", "0.67139906", "0.6689915", "0.6676117", "0.6614878", "0.65847677", "0.65290785", "0.6503453", "0.6499276", "0.643183", "0.6420774", "0.6386529", "0.63690335", "0.63601315", "0.6356368", "0.6304787", "0.6271031", "0.6267381", "0.6254643", "0.6237877", "0.62377405", "0.62351835", "0.6185037", "0.61723167", "0.6150719", "0.61484617", "0.6141334", "0.612538", "0.6117272", "0.60975814", "0.60624593", "0.60580176", "0.6046895", "0.6043927", "0.6012334", "0.5995014", "0.5991764", "0.59480834", "0.59365886", "0.5932868", "0.5926186", "0.58931243", "0.5890437", "0.58463734", "0.583919", "0.58371514", "0.5836054", "0.5821834", "0.58186203", "0.58047986", "0.5803515", "0.57964253", "0.57668555", "0.5761567", "0.5755914", "0.5743511", "0.57410794", "0.5735113", "0.5734016", "0.5733266", "0.573277", "0.5727144", "0.5712933", "0.57126176", "0.5710809", "0.57059747", "0.5700306", "0.56945866", "0.56903154", "0.5681056", "0.567233", "0.56692904", "0.56636137", "0.56636137", "0.56636137", "0.56636137", "0.5662528", "0.56552047", "0.5624699", "0.5624699", "0.5624699", "0.56240004" ]
0.67734325
17
read and returns the next character in this input stream
public char readChar(){ scanner.useDelimiter(EMPTY_PATTERN); try { String ch=scanner.next(); assert ch.length()==1:"In.readChar() error"; scanner.useDelimiter(WHITESPACE_PATTERN); return ch.charAt(0); }catch (NoSuchElementException e){ throw new NoSuchElementException("noSuchElement"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char readChar() {\n return readNextLine().charAt(0);\n }", "void readNextChar() throws ReaderException;", "public char read() {\n char ch = this.peek();\n this.index++;\n return ch;\n }", "protected void readNextChar() throws IOException {\n nextChar = inputReader.read();\n switch (nextChar) {\n case -1: // EOF\n if (char_num == 0) {\n char_num = -1;\n break;\n }\n nextChar = '\\n';\n // fall thru\n case '\\n':\n line_num++;\n char_num = 0;\n break;\n default:\n line.append((char) nextChar);\n char_num++;\n return;\n }\n line.setLength(0);\n }", "public abstract char read_char();", "public static int getNextChar()\r\n\r\n\t// Returns the next character on the input stream. If the end of file is reached, -1 is returned.\r\n\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn inStream.read();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public final char next() throws IOException {\n\t\t// Method \"hasNext\" peeks the next character (if required)\n\t\tif (!hasNext()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tif (state == ReaderState.PEEKED) {\n\t\t\tstate = ReaderState.CALL_FOR_NEXT;\n\t\t}\n\t\tfinal char next = (char) peekedCharacter;\n\t\tpeekedCharacter = -1;\n\t\treturn next;\n\t}", "char readChar();", "public char getChar() throws IOException {\r\n\t\treturn (char)lineReader.read();\r\n\t}", "private void getNextChar() \n {\n try\n {\n int temp = in.read();\n if (temp == -1)\n eof = true;\n currentChar = (char)temp;\n }\n catch (IOException e)\n {\n System.err.println(\"Catastrophic File IO error.\\n\" + e);\n System.exit(1); \n //exit with nonzero exit code to indicate catastrophic error\n }\n }", "private int getNextChar() throws IOException{\n\t\tpos++;\n\t\tsourceReader.mark(20);\n\t\treturn sourceReader.read();\n\t}", "public static char readChar()\n {\n \tString ch = scanner.next();\n \treturn ch.charAt(0);\n }", "private char next() {\n char c = peek();\n eat(c);\n return c;\n }", "char getReadChar();", "public char readChar() {\n return ((char) readLong());\n }", "public char readChar() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn (char) (-1);\n\t\treturn (char) last();\n\t}", "private void nextChar() {\n\t\tif (this.c >= 0) {\n\t\t\ttry {\n\t\t\t\tif (this.c == '\\n') {\n\t\t\t\t\tthis.line++;\n\t\t\t\t\tthis.column = 0;\n\t\t\t\t}\n\t\t\t\tthis.c = this.input.read();\n\t\t\t\tthis.column++;\n\t\t\t} catch (final IOException e) {\n\t\t\t\tthis.c = -1;\n\t\t\t}\n\t\t}\n\t}", "char getPreviousReadChar();", "private char nextChar() throws Exception {\n char next = this.source[this.position];\n this.position++;\n return next;\n }", "private int getChar() {\n\n\t\ttry {\n\t\t\treturn stream.read();\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.print(e.getMessage());\n\t\t\tSystem.err.println(\"IOException occured in Lexer::getChar()\");\n\t\t\treturn -1;\n\t\t}\n\n\t}", "public char readChar() throws IOException {\n\t\tbyte[] b = new byte[2];\n\n\t\tif (read(b, 0, 2) < 2) {\n\t\t\tthrow new EOFException();\n\t\t}\n\n\t\tchar c = (char) (b[0] << 8 | (b[1] & 0xFF));\n\t\treturn c;\n\t}", "private char readChar() {\r\n\t\tInputStream in = System.in;\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\tString line = null;\r\n\r\n\t\ttry {\r\n\t\t\tline = br.readLine();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\treturn line.toLowerCase().charAt(0);\r\n\t}", "public char nextChar() throws Exception {\n currentPos++;\n return currentChar();\n }", "private char NEXT() {\r\n if (in >= input.length()) return '\\0';\r\n return (char) input.charAt(in);\r\n }", "public char readChar(String message) {\r\n\t\tSystem.out.println(message);\r\n\t\treturn scanner.nextLine().charAt(0);\r\n\t}", "public char next() throws JSONException {\n int c;\n if(this.usePrevious) {\n this.usePrevious = false;\n c = this.previous;\n } else {\n try {\n c = this.reader.read();\n } catch (IOException e) {\n throw new JSONException(e);\n }\n\n if(c <= 0) {\n this.eof = true;\n c = 0;\n }\n }\n\n this.index += 1;\n if(this.previous == '\\r') {\n this.line += 1;\n this.character = c == '\\n' ? 0 : 1;\n } else if(c == '\\n') {\n this.line += 1;\n this.character = 0;\n } else {\n this.character += 1;\n }\n\n this.previous = (char) c;\n\n return this.previous;\n }", "char getNextChar () {\n m_pos++; \n return getChar ();\n }", "char nextChar();", "private char read() throws SAXException, IOException {\n for (;;) { // the loop is here for the CRLF case\n if (unreadBuffer != -1) {\n char c = (char) unreadBuffer;\n unreadBuffer = -1;\n return c;\n }\n assert (bufLen > -1);\n pos++;\n assert pos <= bufLen;\n linePrev = line;\n colPrevPrev = colPrev;\n colPrev = col;\n col++;\n if (pos == bufLen) {\n boolean charDataContinuation = false;\n if (cstart > -1) {\n flushChars();\n charDataContinuation = true;\n }\n bufLen = reader.read(buf);\n assert bufLen <= buf.length;\n if (bufLen == -1) {\n return '\\u0000';\n } else {\n for (int i = 0; i < characterHandlers.length; i++) {\n CharacterHandler ch = characterHandlers[i];\n ch.characters(buf, 0, bufLen);\n }\n }\n if (charDataContinuation) {\n cstart = 0;\n }\n pos = 0;\n }\n char c = buf[pos];\n if (c > '\\u007F' && nonAsciiProhibited\n && !alreadyComplainedAboutNonAscii) {\n err(\"The character encoding of the document was not explicit but the document contains non-ASCII.\");\n }\n switch (c) {\n case '\\n':\n /*\n * U+000D CARRIAGE RETURN (CR) characters, and U+000A LINE\n * FEED (LF) characters, are treated specially. Any CR\n * characters that are followed by LF characters must be\n * removed, and any CR characters not followed by LF\n * characters must be converted to LF characters.\n */\n if (prev == '\\r') {\n // swallow the LF\n colPrev = colPrevPrev;\n col = 0;\n if (cstart != -1) {\n flushChars();\n cstart = pos + 1;\n }\n prev = c;\n continue;\n } else {\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n }\n break;\n case '\\r':\n c = buf[pos] = '\\n';\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n prev = '\\r';\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n case '\\u0000':\n /*\n * All U+0000 NULL characters in the input must be replaced\n * by U+FFFD REPLACEMENT CHARACTERs. Any occurrences of such\n * characters is a parse error.\n */\n err(\"Found U+0000 in the character stream.\");\n c = buf[pos] = '\\uFFFD';\n break;\n case '\\u000B':\n case '\\u000C':\n if (inContent) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = ' ';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n }\n break;\n default:\n if ((c & 0xFC00) == 0xDC00) {\n // Got a low surrogate. See if prev was high surrogate\n if ((prev & 0xFC00) == 0xD800) {\n int intVal = (prev << 10) + c + SURROGATE_OFFSET;\n if (isNonCharacter(intVal)) {\n warn(\"Astral non-character.\");\n }\n if (isAstralPrivateUse(intVal)) {\n warnAboutPrivateUseChar();\n }\n } else {\n // XXX figure out what to do about lone high\n // surrogates\n err(\"Found low surrogate without high surrogate.\");\n c = buf[pos] = '\\uFFFD';\n }\n } else if (inContent && (c < ' ' || isNonCharacter(c))\n && (c != '\\t')) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = '\\uFFFD';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n } else if (isPrivateUse(c)) {\n warnAboutPrivateUseChar();\n }\n }\n prev = c;\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n }\n }", "private char getChar() {\n\t\t//Must declare as int, because -1 in char is 65535\n\t\tint c = '\\0';\n\t\ttry {\n\t\t\tc = inFile.read();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred when trying to read characters\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (c == -1) {\n\t\t\teof = true;\n\t\t\treturn EndOfFile;\n\t\t} else if (c == '\\n' || c == '\\r') {\n\t\t\tlineNumber++;\n\t\t}\n\t\treturn (char) c;\t\n\t}", "@Override\n public Character next() {\n assert(this.hasNext());\n\n char currCharacter = this.circularString.charAt(this.currIndex);\n ++this.currIndex;\n\n return currCharacter;\n }", "public char keyboardReadChar() {\n BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n char charItem = ' ';\n try {\n charItem = (char) myReader.read();\n } // try\n catch (IOException IOError) {\n System.out.println(\"Read Error in Termio.KeyboardReadChar method\");\n } // catch\n return charItem;\n }", "public char currentChar() throws Exception {\n // first line?\n if (currentPos == -2) {\n readLine();\n return nextChar();\n }\n\n // at end of file?\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n\n // at end of line?\n if (currentPos == -1 || currentPos == line.length()) {\n return PascalToken.EOL_CHAR;\n }\n\n // Need to read next line?\n if (currentPos > line.length()) {\n readLine();\n return nextChar();\n }\n // return char at current pos\n return line.charAt(currentPos);\n }", "private char next(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex++);//return current character and advance to next\r\n \r\n }", "public char getChar()\n throws IOException\n {\n return (char) lineNumberReader.read();\n }", "private char peekNextChar()\n {\n return (pos < (input.length() - 1)) ? input.charAt(pos + 1) : 0;\n }", "private char readChar() \n {\n \n String uInput = null;//user input\n do//do while loop to wait for a charater\n {\n try//collect user input\n {\n uInput = br.readLine();\n }\n catch(IOException ioe)//catch IOE\n {\n System.out.println(\"IO error trying to read number. Exiting now\");\n System.exit(1);\n }\n if(uInput.charAt(0)=='?')//special case for ? symbol\n {\n return uInput.charAt(0);\n }\n if(!Character.isLetter(uInput.charAt(0)))//check for charater\n {\n System.out.println(\"Invalid input, use ? for a list of commands\");\n System.out.printf(\"=> \");\n }\n }\n while(!Character.isLetter(uInput.charAt(0)));\n\n return uInput.charAt(0);//return character input\n \n }", "public static char readChar(String prompt) throws IOException {\r\n\t\tchar value = 0;\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.print(prompt + \" _>\");\r\n\t\t\t\tvalue = (char)reader.read();\r\n\t\t\t\t// alternative value = (char)reader.readLine().charAt(0);\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.err.println(ex.getLocalizedMessage());\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "public int nextC()\r\n\t{\r\n\t\tlastc = thisc;\t/* save current character, in case of backup */\r\n\t\t\r\n\t\t/* check for character waiting */\r\n\t\tif (holdc == 0) {\r\n\t\t\t/* no character waiting, get next from file,\r\n * ignore most control characters */\r\n\t\t\tdo {\r\n\t\t\t\tthisc = getC();\r\n\t\t\t\tif (thisc == EOF) return EOF;\r\n } while (thisc < 0x20 && ctlchars[thisc]);\r\n\r\n\t\t} else {\r\n\t\t\t/* we looked ahead, so use the saved character */\r\n\t\t\tthisc = holdc;\r\n\t\t\tholdc = 0;\r\n\t\t\tif (thisc == EOF) return EOF;\r\n\t\t}\r\n\t\r\n\t\t/* special rule for carriage return characters:\r\n\t\t * if CR is followed by LF, return just the LF\r\n\t\t * else replace the CR with a LF\r\n\t\t * but then we have to hold the character that isn't a LF,\r\n\t\t * unless it is an ignored character */\r\n\t\tif (thisc == '\\r') {\r\n\t\t holdc = getC();\r\n\t if (holdc < 0x20) {\r\n\t if (holdc == '\\n' || ctlchars[holdc]) holdc = 0;\r\n\t }\r\n\t\t thisc = '\\n';\r\n\t\t}\r\n\t\t\r\n\t\t/* capture the character in a buffer, for diagnostics */\r\n\t\tif (lastc == '\\n' || bufpos >= BUFSIZE) {\r\n\t\t\tprvsize = bufpos;\r\n\t\t\tbufpos = 0;\r\n\t\t\tcurrentbuf = 1 - currentbuf;\r\n\t\t}\r\n\t\tbuffer[currentbuf][bufpos++] = (byte)thisc;\r\n\t\r\n\t\treturn thisc;\r\n\t}", "public char readChar()\r\n/* 441: */ {\r\n/* 442:454 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 443:455 */ return super.readChar();\r\n/* 444: */ }", "private int nextChar()\n {\n int result;\n\n // loop handles the next character whether it is in the buffer or not.\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n result = m_source_.next();\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n if (m_bufferOffset_ >= m_buffer_.length()) {\n // Null marked end of buffer, revert to the source string and\n // loop back to top to try again to get a character.\n m_source_.setIndex(m_FCDLimit_);\n m_bufferOffset_ = -1;\n m_buffer_.setLength(0);\n return nextChar();\n }\n return m_buffer_.charAt(m_bufferOffset_ ++);\n }\n int startoffset = m_source_.getIndex();\n if (result < FULL_ZERO_COMBINING_CLASS_FAST_LIMIT_\n // Fast fcd safe path. trail combining class == 0.\n || m_collator_.getDecomposition() == Collator.NO_DECOMPOSITION\n || m_bufferOffset_ >= 0 || m_FCDLimit_ >= startoffset) {\n // skip the fcd checks\n return result;\n }\n\n if (result < LEAD_ZERO_COMBINING_CLASS_FAST_LIMIT_) {\n // We need to peek at the next character in order to tell if we are\n // FCD\n int next = m_source_.current();\n if (next == UCharacterIterator.DONE\n || next < LEAD_ZERO_COMBINING_CLASS_FAST_LIMIT_) {\n return result; // end of source string and if next character\n // starts with a base character is always fcd.\n }\n }\n\n // Need a more complete FCD check and possible normalization.\n if (!FCDCheck(result, startoffset)) {\n normalize();\n result = m_buffer_.charAt(0);\n m_bufferOffset_ = 1;\n }\n return result;\n }", "byte read()\n \tthrows IOException {\n \t//\n \t// Ensure that one byte can be read\n \tensureContinuousBlock(1);\n \t//\n \t// Simply return the byte\n \treturn _random[_o++];\n }", "public static String readLine()\n {\n \tString ch=scanner.nextLine();\n \treturn ch;\n }", "public static char readCharacter(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.next().charAt(0);\n }", "@Override\n\t\tpublic Character next() {\n\t\t\treturn elements.poll();\n\t\t}", "public byte readByte() throws IOException {\n return in.readByte();\n }", "public char next()\n {\n char current = text[position];\n\n if (position > 0 && text[position - 1] == '\\n')\n {\n lineNo++;\n begin = position;\n }\n\n position++;\n\n return current;\n }", "private int readChar(boolean movePointer) throws Exception {\n if (_bi >= _blen) {\n _blen = _reader.read(_buf, 0, 2048);\n if (log) {\n StringBuffer sbBuffer = new StringBuffer();\n for (int i = 0; i < 300; i++) {\n sbBuffer.append(_buf[i]);\n }\n }\n log = false;\n\n _bi = 0;\n if (_blen < 0)\n return -1;\n }\n char ret = _buf[_bi];\n if (movePointer)\n _bi++;\n return ret;\n }", "public char nextChar() {\n this.inputStr = this.s.nextLine();\n\n if (!inputStr.isEmpty()) {\n for (int i = 0; i < inputStr.length(); i++) {\n if (inputStr.charAt(i) >= 'A' && inputStr.charAt(i) <= 'Z') {\n return inputStr.charAt(i);\n } else if (inputStr.charAt(i) >= 'a' && inputStr.charAt(i) <= 'z') {\n return inputStr.charAt(i);\n }\n }\n }\n return ' ';\n }", "public char peekChar() throws Exception {\n currentChar();\n\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n int nextPos = currentPos + 1;\n\n return nextPos < line.length() ? line.charAt(nextPos) : PascalToken.EOL_CHAR;\n }", "public Character next() {\n if (!hasNext())\n throw new NoSuchElementException();\n return string.charAt(index++);\n }", "public String next() {\n try {\n String result = fNextLine;\n if (fNextLine != null) {\n fNextLine = fIn.readLine();\n if (fNextLine == null) {\n fIn.close();\n }\n }\n\n return result;\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "private int currentChar()\n {\n if (m_bufferOffset_ < 0) {\n m_source_.previousCodePoint();\n return m_source_.nextCodePoint();\n }\n\n // m_bufferOffset_ is never 0 in normal circumstances except after a\n // discontiguous contraction since it is always returned and moved\n // by 1 when we do nextChar()\n return UTF16.charAt(m_buffer_, m_bufferOffset_ - 1);\n }", "public int cscan () throws IOException {\n\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\tnumChars = stream.read (buf);\n\n\t\t\t\t//if (numChars <= 0) return -1;\n\t\t\t}\n\n\t\t\treturn buf[curChar++];\n\t\t}", "public char readCharNonBlock() {\n return ((char) readLongNonBlock());\n }", "private int peek() {\n if (peeked == NotPeeked) {\n peeked = readChar();\n }\n return peeked;\n }", "private int read() throws IOException {\n int c = this.in.read();\n if (c == -1)\n throw new EOFException();\n return c;\n }", "@Override\n public Character next() {\n int charValue;\n if (linePos >= LINE_LEN) {\n charValue = CARRIAGE_RETURN;\n asciiBase = 0;\n linePos = -2;\n lines++;\n // Skips lines starting with alphanumeric characters to preserve formatting\n while (Character.isLetterOrDigit((char)(lines % ASCII_RANGE) + ASCII_START)) {\n lines++;\n }\n }\n else if (linePos < 0) {\n charValue = LINE_FEED;\n }\n else {\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n while (Character.isLetterOrDigit((char)charValue)) {\n asciiBase++;\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n }\n itemsToSend--;\n }\n linePos++;\n return new Character((char) charValue);\n }", "private char peek() {\n if (reachedEnd()) {\n return '\\0';\n }\n\n return source.charAt(current);\n }", "public int read()\n throws IOException\n {\n if ( position == this.buffer.length() )\n {\n return -1;\n }\n\n return this.buffer.charAt( this.position++ );\n }", "public static char readChar()\n \n {\n char c='0';\n String wort=\"xxxx\";\n try {\n wort=eingabe.readLine();\n c=wort.charAt(0);\n } catch(IOException e1) {\n System.out.println(\"Eingabefehler, bitte noch einmal!\");\n c=readChar();\n } catch(NumberFormatException e2) {\n if(wort.equals(\"\"))\n System.out.println(\"Bitte etwas eingeben, noch einmal:\");\n else {\n System.out.print(\"Fehler beim Format, \");\n System.out.println(\"bitte noch einmal!\");}\n c=readChar();\n }\n return c;\n }", "@Override\n public int read() throws IOException {\n int c;\n\n do {\n c = System.in.read();\n } while(c != -1 && (c == '\\n' || c == '\\r'));\n\n return c;\n }", "private char advance() {\n current++;\n return source.charAt(current - 1);\n }", "public Token getNextToken() {\r\n \r\n // if no next token, abort\r\n if (!this.hasNextToken()) return null;\r\n \r\n // get the current character\r\n char c = this.stream.peek();\r\n \r\n // comment\r\n if (c==this.charComment) {\r\n // read the line and return the token\r\n this.current = new Token(this.getUntilMeetChar('\\n'));\r\n return this.current;\r\n }\r\n \r\n // !\r\n if (c==this.charSize) {\r\n this.stream.next(); // consume the character\r\n this.current = new Token(String.valueOf(this.charSize)); // and build the token\r\n return this.current;\r\n }\r\n \r\n // else\r\n this.current = new Token(this.getUntilMeetChar(this.charSeparator)); // extract until a charSeparator is met\r\n return this.current;\r\n \r\n }", "public static char getKey() {\n try {\n return (char) Input.read(true);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return 0;\n }", "protected char readCharWord() throws java.io.IOException {\n char c = currentChar;\n while (java.lang.Character.isWhitespace(c)) {\n c = next();\n }\n return c;\n }", "@Override\n public int read() throws IOException {\n return input.read();\n }", "private int getNext() throws IOException {\n int ch;\n do {\n do {\n ch = in.read();\n\n // Ignore newlines and carage returns\n while ((ch == '\\n') || (ch == '\\r')) {\n ch = in.read();\n }\n\n if (ch == '{') {\n mDepth++;\n } else if (ch == '}') {\n mDepth--;\n }\n\n if (mLastCharWasInTextDepth && (mDepth != TEXT_DEPTH)) {\n // Return a blank every time when skipping a format group to avoid\n // two words being concatinated\n // Example: 'little{\\someGroup}cat' should not become 'littlecat',\n // but 'little cat'\n mLastCharWasInTextDepth = false;\n\n if (ch == -1) {\n return -1;\n } else {\n return ' ';\n }\n }\n }\n while (ch == '{' || ch == '}');\n }\n while ((mDepth != TEXT_DEPTH) && (ch != -1));\n\n mLastCharWasInTextDepth = true;\n\n return ch;\n }", "private String next() {\n if (console) {\n return con.next();\n }\n return scan.next();\n }", "public char getChar();", "char getChar () { \n return m_pos < m_len ? m_buffer.charAt (m_pos) : '\\0';\n }", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "private static char read(InputStream client) {\n try {\n var c = client.read();\n if (c == -1) {\n LOG.warning(\"Stream from client has been closed, throwing kill exception...\");\n throw new EndOfStream();\n }\n return (char) c;\n } catch (IOException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n throw new EndOfStream();\n }\n }", "private char peek(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex);//return current character\r\n \r\n }", "public char peek() {\n try {\n return this.input.charAt(this.index);\n } catch (StringIndexOutOfBoundsException e) {\n throw this.buildException(\"truncated input\");\n }\n }", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "public static char getChar() throws IOException {\n\t\nString s = getString();\nreturn s.charAt(0);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Returns the first letter of the string, to help idiot proof it.\n\n}", "public byte readByte() throws IOException {\n\t\treturn (byte) read();\n\t}", "public int next() throws Exception {\n if (!ignoreSpaceAndInvisibleChars()) {\n return this._evtType;\n }\n char ch = (char) readChar(true);\n if (ch == '<' || ch == '/') // tag (node-name or comment or cdata):\n {\n if (ch == '<')\n ch = (char) readChar(false);\n if (ch == '/') // node tag end:\n {\n if (!endTagNode())\n return this._evtType;\n } else if (ch == '?') // xml heading & misc:\n { // ignore\n if (readToChar(new char[]{'>'}, true) == null) {\n return this._evtType;\n }\n this.next();\n } else if (ch == '!') // DOCTYPE or node CDATA:\n { // ignore\n if (readToChar(new char[]{'>'}, true) == null) {\n return this._evtType;\n }\n this.next();\n } else // new tag (node):\n {\n if (!newTagNode())\n return this._evtType;\n if (readChar(false) == '>')\n _bi++;\n }\n } else if (ch == '>') // tag name close:\n {\n System.err.println(\"XXXXXXXXXXX\");\n // this._evtType = END_TAG;\n // this.inside_tag = false;\n } else // node text:\n {\n // dumpMsg(\"read text...\");\n this._evtType = TEXT;\n String text = XMLDecoder.exec(ch\n + this.readToChar(new char[]{'<'}, false));\n Node textNode = new Node(Node.NODE_TEXT, null, text);\n _lastTag.addChild(textNode);\n }\n // dumpMsg(\"END of next.\");\n return this._evtType;\n }", "public void getch(){\n pos++; \n nextch=fnb.charAt(pos);\n }", "public char next(char c) throws JSONException {\n char n = this.next();\n if(n != c) {\n throw this.syntaxError(\"Expected '\" + c + \"' and instead saw '\" + n + \"'\");\n }\n\n return n;\n }", "public char getNextKey() {\n char nextChar = _input.charAt(_index++);\n return nextChar;\n }", "public char getChar() {\n return this.s;\n }", "public _char get_char() {\n return local_char;\n }", "@Override\n public int read() throws IOException\n {\n if (_tmpBuffer == null) {\n _tmpBuffer = new char[1];\n }\n if (read(_tmpBuffer, 0, 1) < 1) {\n return -1;\n }\n return _tmpBuffer[0];\n }", "public char getNextToken(){\n\t\treturn token;\n\t}", "char getEChar();", "public abstract char read_wchar();", "public char getCh() {\r\n\t\treturn this.ch;\r\n\t}", "byte readByte();", "byte peekByte() throws IOException;", "public char peek() {\r\n return characters[size -1];\r\n }", "public char Get() {\n\t\treturn myChar;\n\t}", "private char readUnicodeChar() throws IOException, DasmError {\n int result = 0;\n for (int i = 0; i < 4; i++) {\n readNextChar();\n if (nextChar == -1) return 0;\n\n int tmp = Character.digit((char) nextChar, 16);\n if (tmp == -1)\n throw new DasmError(\"Invalid '\\\\u' escape sequence\");\n result = (result << 4) | tmp;\n }\n return (char) result;\n }", "@Override\n\tpublic byte readByte() throws IOException {\n\t\treturn (byte) (_buff.get() & 0xFF);\n\t}", "@Override\n public byte readByte() throws IOException\n {\n if (!hasRemaining())\n {\n throw new IOException(\"End off buffer reached\");\n }\n return (byte) randomAccessRead.read();\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }", "public final char yycharat(int pos) {\r\n return zzBuffer[zzStartRead+pos];\r\n }" ]
[ "0.8100948", "0.799976", "0.79316", "0.7853621", "0.77925265", "0.7692597", "0.76216936", "0.7611813", "0.75964725", "0.7589062", "0.7498106", "0.74607205", "0.73984337", "0.73856175", "0.73795694", "0.73256963", "0.7244087", "0.72205", "0.7207686", "0.71828336", "0.71593046", "0.7074343", "0.7034885", "0.7019798", "0.690194", "0.6893375", "0.68889916", "0.6852965", "0.6851415", "0.6805891", "0.6783609", "0.67795587", "0.6736522", "0.6709849", "0.6658734", "0.66503954", "0.6635156", "0.65823877", "0.657339", "0.65353924", "0.6499063", "0.64854807", "0.64730585", "0.64346164", "0.6415193", "0.6402202", "0.63939667", "0.63901967", "0.63790447", "0.63725543", "0.6340574", "0.63385624", "0.63238424", "0.6316568", "0.6313737", "0.6292758", "0.628857", "0.62806344", "0.6274941", "0.62698996", "0.6254535", "0.62436247", "0.62345386", "0.6224137", "0.6161302", "0.61588436", "0.6151988", "0.61392856", "0.6137358", "0.61309135", "0.6130723", "0.6122103", "0.6118931", "0.6116637", "0.610215", "0.6095013", "0.6089733", "0.6054591", "0.6044374", "0.60430205", "0.6033979", "0.6026015", "0.60239244", "0.6015788", "0.60059404", "0.6001501", "0.59996355", "0.5990797", "0.5985558", "0.5979336", "0.59622496", "0.5958463", "0.5930674", "0.5918135", "0.5899351", "0.5897932", "0.5888878", "0.5888878", "0.5888878", "0.5888878" ]
0.69991845
24
reads the next token from this input stream and returns it
public String readString(){ try{ return scanner.next(); }catch (NoSuchElementException e){ throw new NoSuchElementException("NoSuchEle"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "public Token getNextToken() {\r\n \r\n // if no next token, abort\r\n if (!this.hasNextToken()) return null;\r\n \r\n // get the current character\r\n char c = this.stream.peek();\r\n \r\n // comment\r\n if (c==this.charComment) {\r\n // read the line and return the token\r\n this.current = new Token(this.getUntilMeetChar('\\n'));\r\n return this.current;\r\n }\r\n \r\n // !\r\n if (c==this.charSize) {\r\n this.stream.next(); // consume the character\r\n this.current = new Token(String.valueOf(this.charSize)); // and build the token\r\n return this.current;\r\n }\r\n \r\n // else\r\n this.current = new Token(this.getUntilMeetChar(this.charSeparator)); // extract until a charSeparator is met\r\n return this.current;\r\n \r\n }", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "Token next();", "public String getNextToken() {\n return nextToken;\n }", "private Token nextToken() {\n Token token = scanner.nextToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "public String getNextToken() {\n return nextToken;\n }", "public Token peek() throws IOException {\n\t\t// advance token only if its been reset by getToken()\n\t\tif (nextToken == null)\n\t\t\tnextToken = getToken();\n\n\t\treturn nextToken;\n\t}", "public Token nextToken() {\r\n\t\treturn tokens.get(nextTokenPos++);\r\n\t}", "Token getNextToken() throws IOException, JIPSyntaxErrorException {\n StringBuilder sbTerm = new StringBuilder();\n int curChar = -1;\n int nState = STATE_NONE;\n int nTokenType = TOKEN_UNKNOWN;\n\n if (m_nextToken != null) {\n Token token = m_nextToken;\n m_nextToken = null;\n return token;\n }\n\n while (nState != STATE_END) {\n //m_lnReader.mark(2);\n //System.out.println(\"reading\");\n curChar = m_lnReader.read();\n\n //System.out.println(\"read \" + (char)curChar);\n //System.out.println(\"read \" + curChar);\n\n if (curChar == -1) // EOF\n {\n //System.out.println(\"EOF\");\n nState = STATE_END;\n// m_lnReader.pushback();\n } else {\n switch (nState) {\n case STATE_NONE:\n\n if ((curChar == LINECOMMENT_CHAR)) {\n nState = STATE_LINECOMMENT;\n } else if ((curChar == QUOTE_CHAR)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_QUOTE;\n } else if ((curChar == DOUBLEQUOTE_CHAR)) {\n sbTerm.append((char) curChar);\n nState = STATE_DOUBLEQUOTE;\n } else if ((LOWERCASE_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_ATOM;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_ATOM;\n } else if ((UPPERCASE_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_VARIABLE;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_VARIABLE;\n }\n// else if((SIGN_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_SIGN;\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// nTokenType = TOKEN_SIGN;\n// }\n else if ((SPECIAL_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_SPECIAL_ATOM;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_SPECIAL_ATOM;\n } else if ((NUMBER_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_NUMBER;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_NUMBER;\n } else if (curChar <= 0x20) // whitespace char\n //if((WHITESPACE_CHARS.indexOf(curChar) > -1))\n {\n //System.out.println(\"TOKEN_WHITESPACE\");\n nTokenType = TOKEN_WHITESPACE;\n nState = STATE_END;\n sbTerm = new StringBuilder(\" \");\n// strTerm = \" \";\n }\n// else if(curChar < 0x20) // whitespace char\n// //if((WHITESPACE_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_NONE;\n// }\n else if ((SINGLETON_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n\n int c = m_lnReader.read();\n if (c == -1) {\n //System.out.println(\"SINGLETON_CHARS EOF\");\n\n nState = STATE_END;\n// m_lnReader.pushback();\n } else {\n if (c == '>' && sbTerm.charAt(sbTerm.length() - 1) == '!')\n// if((strTerm + (char)c).equals(\"!>\"))\n sbTerm.append((char) c);//String.valueOf((char)c);\n else\n m_lnReader.unread(c);\n }\n\n nTokenType = TOKEN_SINGLETON;\n nState = STATE_END;\n\n//// System.out.println(\"Singleton \" + strTerm);\n// nTokenType = TOKEN_SINGLETON;\n//// }\n\n// nState = STATE_END;\n } else {\n throw syntaxError(\"invalid_character('\" + (char) curChar + \"')\");\n }\n break;\n\n case STATE_ATOM:\n if ((UPPERCASE_CHARS.indexOf(curChar) > -1) ||\n (LOWERCASE_CHARS.indexOf(curChar) > -1) ||\n (NUMBER_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_ATOM;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n }\n break;\n\n case STATE_VARIABLE:\n if ((UPPERCASE_CHARS.indexOf(curChar) > -1) ||\n (LOWERCASE_CHARS.indexOf(curChar) > -1) ||\n (NUMBER_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_VARIABLE;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n }\n break;\n\n case STATE_SPECIAL_ATOM:\n char lastChar = sbTerm.charAt(sbTerm.length() - 1);\n if ((curChar == '!' && lastChar == '<') || (curChar == '>' && lastChar == '!'))\n// if((strTerm + (char)curChar).equals(\"<!\") || (strTerm + (char)curChar).equals(\"!>\"))\n {\n sbTerm.append((char) curChar);//String.valueOf((char)c);\n nTokenType = TOKEN_SPECIAL_ATOM;\n nState = STATE_END;\n } else if ((SPECIAL_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n if (sbTerm.toString().equals(OPENCOMMENT_CHAR)) {\n nState = STATE_COMMENT;\n sbTerm = new StringBuilder(\"\");\n nTokenType = TOKEN_UNKNOWN;\n }\n } else {\n nTokenType = TOKEN_SPECIAL_ATOM;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n// case STATE_SIGN:\n// if((SPECIAL_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_SPECIAL_ATOM;\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// nTokenType = TOKEN_SPECIAL_ATOM;\n// }\n// else\n// {\n// nTokenType = TOKEN_SIGN;\n// nState = STATE_END;\n// m_lnReader.pushback();\n// }\n// break;\n\n case STATE_NUMBER:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else if (curChar == '.') {\n //m_lnReader.mark(2);\n int c = m_lnReader.read();\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n if (NUMBER_CHARS.indexOf(c) == -1) {\n m_nextToken = new Token();\n\n m_nextToken.m_strToken = \".\";\n m_nextToken.m_nType = TOKEN_SPECIAL_ATOM;//&&TOKEN_DOT;\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n } else {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_DECIMAL;\n }\n } else if (curChar == 'e' || curChar == 'E') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_EXPONENT;\n } else if (curChar == '\\'') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_ASCII;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'b') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_BINARY;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'o') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_OCTAL;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'x') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_HEXADECIMAL;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_EXPONENT:\n if (curChar == '+' || curChar == '-') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_INTEGER;\n } else if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_INTEGER;\n } else {\n throw syntaxError(\"invalid_character('\" + (char) curChar + \"')\");\n }\n break;\n\n case STATE_DECIMAL:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else if (curChar == 'e' || curChar == 'E') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_EXPONENT;\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_INTEGER:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_ASCII:\n if (curChar == '\\\\') {\n sbTerm = new StringBuilder();\n// strTerm = \"\";\n curChar = m_lnReader.read();\n switch (curChar) {\n case 'a': // \\a bell\n sbTerm.append(Integer.toString(7));\n break;\n\n case 'b': // \\b backspace\n sbTerm.append(Integer.toString(8));\n break;\n\n case 'd': // \\d delete\n sbTerm.append(Integer.toString(127));\n break;\n\n case 'e': // \\e escape\n sbTerm.append(Integer.toString(27));\n break;\n\n case 'f': // \\f form feed\n sbTerm.append(Integer.toString(12));\n break;\n\n case 'n': // \\n line feed\n sbTerm.append(Integer.toString(10));\n break;\n\n case 'r': // \\r carriage return\n sbTerm.append(Integer.toString(13));\n break;\n\n case 's': // \\s space\n sbTerm.append(Integer.toString(32));\n break;\n\n case 't': // \\t tab\n sbTerm.append(Integer.toString(9));\n break;\n\n case 'v': // \\v vtab\n sbTerm.append(Integer.toString(11));\n break;\n\n case 'x': // \\xHX\n // legge il prossimo byte\n int d1 = m_lnReader.read();\n // legge il prossimo byte\n int d2 = m_lnReader.read();\n String strHexNum = (char) d1 + \"\" + (char) d2;\n\n try {\n byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n sbTerm.append(Integer.toString(val[0]));\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strHexNum + \"')\");\n }\n\n // legge il prossimo byte\n d2 = m_lnReader.read();\n if (d2 != '\\\\') // ISO def\n m_lnReader.unread(d2);\n// m_lnReader.pushback();\n break;\n\n default: // ignora \\\n sbTerm.append(Integer.toString(curChar));\n }\n\n } else {\n sbTerm = new StringBuilder(Integer.toString(curChar));\n// strTerm = Integer.toString(curChar);\n }\n\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n break;\n\n case STATE_BINARY:\n if (NUMBER_BINARY_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 2));\n// strTerm = \"\" + Integer.parseInt(strTerm, 2);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_OCTAL:\n if (NUMBER_OCTAL_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 8));\n// strTerm = \"\" + Integer.parseInt(strTerm, 8);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_HEXADECIMAL:\n if (NUMBER_HEXADECIMAL_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 16));\n// strTerm = \"\" + Integer.parseInt(strTerm, 16);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_LINECOMMENT:\n int c = curChar;\n do {\n if ((c == '\\r') || (c == '\\n'))\n break;\n\n c = m_lnReader.read();\n }\n while (c != -1);\n\n nState = STATE_NONE;\n break;\n\n case STATE_COMMENT: {\n c = curChar;\n int c1;\n do {\n c1 = c;\n c = m_lnReader.read();\n if ((c1 == '*') && (c == '/'))\n break;\n }\n while (c != -1);\n\n // torna allo stato iniziale\n nState = STATE_NONE;\n }\n break;\n\n case STATE_QUOTE:\n case STATE_DOUBLEQUOTE:\n// System.out.println(curChar);\n if (curChar == DOUBLEQUOTE_CHAR) {\n if (nState == STATE_DOUBLEQUOTE) {\n c = m_lnReader.read();\n if (c == DOUBLEQUOTE_CHAR) {\n sbTerm.append('\"');\n } else {\n // fine quoted atom\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = (nState == STATE_QUOTE) ? TOKEN_QUOTE : TOKEN_DBLQUOTE;\n nState = STATE_END;\n }\n } else {\n sbTerm.append((char) curChar);\n }\n } else if (curChar == QUOTE_CHAR) {\n if (nState == STATE_QUOTE) {\n c = m_lnReader.read();\n if (c == QUOTE_CHAR) {\n sbTerm.append('\\'');\n } else {\n // fine quoted atom\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = (nState == STATE_QUOTE) ? TOKEN_QUOTE : TOKEN_DBLQUOTE;\n nState = STATE_END;\n }\n } else {\n sbTerm.append((char) curChar);\n }\n } else if (nState == STATE_QUOTE && (curChar == '\\r' || curChar == '\\n')) {\n throw syntaxError(\"carriage_return_in_quoted_atom('\" + sbTerm.toString() + \"')\");\n }\n// else if(curChar == '~') // edimburgh prolog\n// {\n// c = m_lnReader.read();\n// if(c == '~')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c == '\\'')\n// {\n//// fine quoted atom\n// m_lnReader.pushback();\n// //sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else if(c >= '@')\n// {\n// sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n//\n// else\n// throw syntaxError(\"bad_escape_sequence('~\" + (char)c + \"')\");\n// }\n else if (curChar == '\\\\') // ISO prolog\n {\n c = m_lnReader.read();\n if (c == '\\\\') {\n sbTerm.append((char) c);//String.valueOf((char)c);\n } else if (NUMBER_CHARS.indexOf(c) > -1) {\n String strNum = \"\" + (char) c;\n // legge i prossimi numeri\n int d1 = m_lnReader.read();\n while (NUMBER_CHARS.indexOf(d1) > -1) {\n strNum += \"\" + (char) d1;\n d1 = m_lnReader.read();\n }\n\n // legge il prossimo byte\n if (d1 != '\\\\') // ISO def\n m_lnReader.unread(d1);\n// m_lnReader.pushback();\n\n try {\n BigInteger bival = new BigInteger(strNum, 8);\n\n byte val = bival.byteValue();// Byte.parseByte(strNum);\n sbTerm.append((char) val);\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strNum + \"')\");\n }\n\n } else// if(c >= 'a')\n {\n switch (c) {\n case 'a': // \\a bell\n sbTerm.append((char) (7));\n break;\n\n case 'b': // \\b backspace\n sbTerm.append((char) (8));\n break;\n\n case 'c': // \\c empty\n //sbTerm.append( (char)(8);\n break;\n\n case 'd': // \\d delete\n sbTerm.append((char) (127));\n break;\n\n case 'e': // \\e escape\n sbTerm.append((char) (27));\n break;\n\n case 'f': // \\f form feed\n sbTerm.append((char) (12));\n break;\n\n case 'n': // \\n line feed\n sbTerm.append((char) (10));\n break;\n\n case 'r': // \\r carriage return\n sbTerm.append((char) (13));\n break;\n\n case 's': // \\s space\n sbTerm.append((char) (32));\n break;\n\n case 't': // \\t tab\n sbTerm.append((char) (9));\n break;\n\n case 'v': // \\v vtab\n sbTerm.append((char) (11));\n break;\n\n case 'x': // \\xHX\n // legge il prossimo byte\n int d1 = m_lnReader.read();\n // legge il prossimo byte\n int d2 = m_lnReader.read();\n String strHexNum = (char) d1 + \"\" + (char) d2;\n\n try {\n byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n sbTerm.append((char) (val[0]));\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strHexNum + \"')\");\n }\n\n // legge il prossimo byte\n d2 = m_lnReader.read();\n if (d2 != '\\\\') // ISO def\n m_lnReader.unread(d2);\n// m_lnReader.pushback();\n break;\n\n case '\\r':\n case '\\n':\n break;\n\n default: // ignora \\\n sbTerm.append((char) (c));\n }\n }\n// else\n// throw syntaxError(\"bad_escape_sequence('\\\\\" + (char)c + \"')\");\n } else {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n }\n break;\n\n// case STATE_DOUBLEQUOTE:\n// if(curChar == DOUBLEQUOTE_CHAR)\n// {\n// sbTerm.append( (char)curChar;\n// nTokenType = TOKEN_DBLQUOTE;\n// nState = STATE_END;\n// }\n// else if(curChar == '\\r' || curChar == '\\n')\n// {\n// throw syntaxError(\"carriage_return_in_string\");\n// }\n// else if(curChar == '~') // edimburgh prolog\n// {\n// c = m_lnReader.read();\n// if(c == '~')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c == '\"')\n// {\n// m_lnReader.pushback();\n// //sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else if(c > '@')\n// {\n// sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else\n// throw syntaxError(\"bad_escape_sequence('~\" + (char)c + \"')\");\n// }\n// else if(curChar == '\\\\') // ISO prolog\n// {\n// c = m_lnReader.read();\n// if(c == '\\\\')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c >= 'a')\n// {\n// switch(c)\n// {\n// case 'a': // \\a bell\n// sbTerm.append( (char)(7);\n// break;\n//\n// case 'b': // \\b backspace\n// sbTerm.append( (char)(8);\n// break;\n//\n// case 'd': // \\d delete\n// sbTerm.append( (char)(127));\n// break;\n//\n// case 'e': // \\e escape\n// sbTerm.append( (char)(27));\n// break;\n//\n// case 'f': // \\f form feed\n// sbTerm.append( (char)(12);\n// break;\n//\n// case 'n': // \\n line feed\n// sbTerm.append( (char)(10);\n// break;\n//\n// case 'r': // \\r carriage return\n// sbTerm.append( (char)(13);\n// break;\n//\n// case 't': // \\t tab\n// sbTerm.append( (char)(9);\n// break;\n//\n// case 'v': // \\v vtab\n// sbTerm.append( (char)(11);\n// break;\n//\n// case 'x': // \\xHX\n// // legge il prossimo byte\n// int d1 = m_lnReader.read();\n// // legge il prossimo byte\n// int d2 = m_lnReader.read();\n// try\n// {\n// String strHexNum = (char)d1 + \"\" + (char)d2;\n//\n// byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n// sbTerm.append( (char)(val[0]);\n// }\n// catch(NumberFormatException ex)\n// {\n// throw syntaxError(\"bad_escape_sequence('\\\\x')\");\n// }\n//\n// // legge il prossimo byte\n// d2 = m_lnReader.read();\n// if(d2 != '\\\\') // ISO def\n// m_lnReader.pushback();\n// break;\n//\n// default: // ignora \\\n// sbTerm.append( (char)(c);\n// }\n// }\n// }\n// else\n// {\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// }\n// break;\n }\n }\n }\n\n if (sbTerm.length() > 0) {\n Token tok = new Token();\n tok.m_strToken = sbTerm.toString();\n tok.m_nType = nTokenType;\n// if(strTerm.equals(\".\"))\n// tok.m_nType = TOKEN_DOT;\n// else\n// tok.m_nType = nTokenType;\n\n return tok;\n } else {\n return null;\n }\n }", "public Token next() {\n \tcurrent = peek;\n \tpeek = extractToken();\n \treturn current;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n return token;\n }", "final public Token getNextToken() {\r\n if (token.next != null) token = token.next;\r\n else token = token.next = token_source.getNextToken();\r\n jj_ntk = -1;\r\n return token;\r\n }", "public char getNextToken(){\n\t\treturn token;\n\t}", "public Token nextToken ()\n throws ParseException\n {\n return getNextToken();\n }", "final public Token getNextToken() {\n if (token.next != null) {\n token = token.next;\n } else {\n token = token.next = token_source.getNextToken();\n }\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "Token peek();", "public Token nextToken() {\n\t\tif (token != null && token.getType() == TokenType.EOF) {\n\t\t\tthrow new LexerException(\n\t\t\t\t\t\"The end of file. No next token to generate.\");\n\t\t}\n\n\t\ttry {\n\t\t\tif (state == LexerState.BASIC) {\n\t\t\t\tbasicNext();\n\t\t\t} else {\n\t\t\t\textendedNext();\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tString message = \"\";\n\t\t\twhile (currentIndex > start) {\n\t\t\t\tmessage += data[start++];\n\t\t\t}\n\n\t\t\tthrow new LexerException(\"Error in token! \" + message\n\t\t\t\t\t+ \" that ends at \" + (currentIndex - 1));\n\t\t} catch (Exception e) {\n\t\t\tString message = \"\";\n\t\t\twhile (currentIndex > start) {\n\t\t\t\tmessage += data[start++];\n\t\t\t}\n\n\t\t\tthrow new LexerException(\"Error in generating \" + \"next token! \"\n\t\t\t\t\t+ message + \" that ends at \" + (currentIndex - 1) + \"\\n\"\n\t\t\t\t\t+ e.getMessage());\n\n\t\t}\n\t\t// System.out.println(token.getType());\n\t\treturn token;\n\n\t}", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n\t if (token.next != null) token = token.next;\n\t else token = token.next = token_source.getNextToken();\n\t jj_ntk = -1;\n\t jj_gen++;\n\t return token;\n }", "final public Token getNextToken() {\n\t if (token.next != null) token = token.next;\n\t else token = token.next = token_source.getNextToken();\n\t jj_ntk = -1;\n\t jj_gen++;\n\t return token;\n }", "final public Token getNextToken() {\r\n if (token.next != null) token = token.next;\r\n else token = token.next = token_source.getNextToken();\r\n jj_ntk = -1;\r\n jj_gen++;\r\n return token;\r\n }", "final public Token getNextToken() {\r\n if (token.next != null) token = token.next;\r\n else token = token.next = token_source.getNextToken();\r\n jj_ntk = -1;\r\n jj_gen++;\r\n return token;\r\n }", "TokenReader reader(TokenType tokenType);", "public Token getNextToken() {\n\t\tToken token = null;\n\t\twhile (index < text.length() && token == null) {\n\t\t\tchar ch = text.charAt(index);\n\t\t\tif (isLetter(ch)) {\n\t\t\t\ttoken = readNameOrKeyword();\n\t\t\t}\n\t\t\telse if (isDigit(ch)) {\n\t\t\t\ttoken = readNumber();\n\t\t\t}\n\t\t\telse if (isOperator(ch)) {\n\t\t\t\ttoken = readOperator();\n\t\t\t}\n\t\t\telse if (ch == '\"') {\n\t\t\t\ttoken = readStringLiteral();\n\t\t\t}\n\t\t\telse if (this.isParenthesis(ch)) {\n\t\t\t\ttoken = new Token(TokenType.PARENTHESIS, \"\" + ch);\n\t\t\t}\n\t\t\telse if (this.isBracket(ch)) {\n\t\t\t\ttoken = new Token(TokenType.BRACKET, \"\" + ch);\n\t\t\t}\n\t\t\telse if (this.isBrace(ch)) {\n\t\t\t\ttoken = new Token(TokenType.BRACE, \"\" + ch);\n\t\t\t}\n\t\t\telse if (ch == ';') {\n\t\t\t\ttoken = new Token(TokenType.SEMICOLON, \"\" + ch);\n\t\t\t}\n\t\t\tindex += 1;\n\t\t}\n\t\treturn token;\n\t}", "static final public Token getNextToken() {\n if (token.next != null) {\n token = token.next;\n } else {\n token = token.next = token_source.getNextToken();\n }\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "protected Word getNext()\n/* */ {\n/* 63 */ Word token = null;\n/* 64 */ if (this.lexer == null) {\n/* 65 */ return token;\n/* */ }\n/* */ try {\n/* 68 */ token = this.lexer.next();\n/* 69 */ while (token == WhitespaceLexer.crValue) {\n/* 70 */ if (this.eolIsSignificant) {\n/* 71 */ return token;\n/* */ }\n/* 73 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 79 */ return token;\n/* */ }", "protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }", "static final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "static final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "static final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "public Token nextToken(){\n if(currentToken+1 >= tokens.size())\n return null; \n return tokens.get(++currentToken);\n }", "private String readToken( PushbackInputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n stream.unread( c );\n done = true;\n break;\n case ' ':\n case '\\t':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "public static Token getNextToken() \n{\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n try { input_stream.backup(0);\n while (curChar <= 32 && (0x100002200L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 6)\n {\n jjmatchedKind = 6;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "private ELOperandToken getNextToken() {\r\n \t\tswitch (fState) {\r\n \t\tcase STATE_INITIAL: // Just started\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_VAR: // Variable name is read - expecting a separator \r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_METHOD: // Method name and parameters are read - expecting a separator\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_SEPARATOR: // Separator is read - expecting a var or method\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\t}\r\n \t\treturn ELOperandToken.EOF;\r\n \t}", "protected Word getNext()\n/* */ {\n/* 58 */ Word token = null;\n/* 59 */ if (this.lexer == null) {\n/* 60 */ return token;\n/* */ }\n/* */ try {\n/* 63 */ token = this.lexer.next();\n/* 64 */ while (token == ArabicLexer.crValue) {\n/* 65 */ if (this.eolIsSignificant) {\n/* 66 */ return token;\n/* */ }\n/* 68 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 74 */ return token;\n/* */ }", "@Override\n public Token next() throws IOException {\n\n if (hasNext()) {\n String next = splits.get(current++);\n if (isString(next)) {\n return new StringToken(next.substring(1, next.length() - 1));\n }\n if (isNumber(next)) {\n return new NumberToken(Double.parseDouble(next));\n }\n if (isSymbol(next)) {\n return new SymbolToken(next.charAt(0));\n }\n if (isName(next)) {\n return new NameToken(next);\n }\n throw new IOException(\"Invalid input.\");\n }\n\n return null;\n }", "public static Token getNextToken() {\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop:\n for (; ; ) {\n try {\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e) {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (; ; ) {\n switch (curLexState) {\n case 0:\n try {\n input_stream.backup(0);\n while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e1) {\n continue EOFLoop;\n }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 10) {\n jjmatchedKind = 10;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff) {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n } catch (java.io.IOException e1) {\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try {\n input_stream.readChar();\n input_stream.backup(1);\n } catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n } else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n }", "final public Token getNextToken() {\n if ((token = jj_nt).next != null) jj_nt = jj_nt.next;\n else jj_nt = jj_nt.next = token_source.getNextToken();\n jj_gen++;\n return token;\n }", "public String next() {\n try {\n String result = fNextLine;\n if (fNextLine != null) {\n fNextLine = fIn.readLine();\n if (fNextLine == null) {\n fIn.close();\n }\n }\n\n return result;\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public Token peek() {\r\n\t\treturn tokens.get(nextTokenPos);\r\n\t}", "public int getToken() {\n\t\t//previous token remembered?\n\t\tif (token != null)\n\t\t{\t\n\t\t\treturn tokenVal(); \n\t\t}\n\t\telse //need a new token.\n\t\t{\n\t\t\t//get position of next token\n\t\t\tint tokenStart = findTokenStart();\n\t\t\t//remove leading whitespace\n\t\t\tline = line.substring(tokenStart);\n\t\t\t//create char[] representation of line\n\t\t\tchar[] characters = line.toCharArray();\n\t\t\t//get type of token\n\t\t\ttType = getType(characters[0]);\n\t\t\tif (Objects.equals(tType, \"lowercase\"))\n\t\t\t{\n\t\t\t\ttoken = getLowerToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"uppercase\"))\n\t\t\t{\n\t\t\t\ttoken = getIdentifierToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"int\"))\n\t\t\t{\n\t\t\t\ttoken = getIntToken(characters);\n\t\t\t}\n\t\t\telse if (Objects.equals(tType, \"special\"))\n\t\t\t{\n\t\t\t\ttoken = getSpecialToken(characters);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error this should not be seen\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t//token was found ok.\n\t\t\treturn tokenVal();\n\t\t}\n\t}", "private Token nextRawToken() throws NoSuchElementException {\n\t\t// Location of the char after the current projected token.\n\t\tint sLoc = 0;\n\n\t\twhile (latestLine.trim().isEmpty()) {\n\t\t\tlatestLine = fileScanner.nextLine();\n\t\t}\n\n\t\t// Find the next end segment\n\t\twhile (latestLine.length() != sLoc + 1\n\t\t\t\t&& latestLine.charAt(sLoc + 1) != ' ') {\n\t\t\t// && getType(document.substring(0, sLoc + 1)) == TokenType.INVALID)\n\t\t\t// {\n\t\t\tsLoc++;\n\t\t}\n\n\t\t// End indices of the token, inclusive.\n\t\tint endTestToken = sLoc;\n\n\t\t/*\n\t\t * Determine the longest sub-token by starting from the end and working\n\t\t * backwards.\n\t\t */\n\t\tboolean valid = false;\n\t\tfor (int i = endTestToken; i >= 0; i--) {\n\t\t\tString testToken = latestLine.substring(0, i + 1);\n\t\t\tif (getType(testToken) != TokenType.INVALID) {\n\t\t\t\tsLoc = i;\n\t\t\t\tvalid = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!valid) {\n\t\t\tsLoc = 0;\n\t\t}\n\n\t\tString token = latestLine.substring(0, sLoc + 1);\n\n\t\tToken t = new Token(token, getType(token));\n\t\trunDiagnostic(t);\n\n\t\t// Consume the token form the document\n\t\tlatestLine = latestLine.substring(sLoc + 1).trim();\n\n\t\treturn t;\n\t}", "Token readToken() throws SyntaxException;", "public token next_token() throws IOException, DasmError {\n token_line_num = line_num;\n\n for (;;)\n switch (nextChar) {\n case ';': // a comment\n case '\\n':\n // return single SEP token (skip multiple newlines\n // interspersed with whitespace or comments)\n skipEmptyLines();\n token_line_num = line_num;\n return new token(sym.SEP);\n\n case ' ':\n case '\\t':\n case '\\r':\n case ',': // whitespace\n readNextChar();\n break;\n\n case -1: // EOF token\n char_num = -1;\n return new token(sym.EOF);\n\n case '=': // EQUALS token\n readNextChar();\n return new token(sym.EQ);\n\n case ':': // COLON token\n readNextChar();\n return new token(sym.COLON);\n\n case '-':\n case '+':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '.': // a number\n {\n return readNumber();\n }\n\n case '\"': // quoted string\n {\n return readQuotedString();\n }\n\n case '{': // list of registers\n {\n return readRegList();\n }\n\n case '\\'': // quotation for overloading reserved words\n return readQuotedReservedWord();\n\n default: {\n // read up until a separatorcharacter\n boolean only_name = false;\n\n charBuf.reset();\n do {\n char chval = (char) nextChar;\n if (nextChar == '\\\\') {\n chval = nameEscape();\n only_name = true;\n }\n charBuf.add(chval);\n readNextChar();\n } while (!isSeparator(nextChar));\n\n String str = charBuf.toString();\n\n if (!only_name) {\n token tok;\n\n // keyword or directive?\n if ((tok = ReservedWords.get(str)) != null) return tok;\n\n // VM instruction?\n if (DopInfo.contains(str))\n return new str_token(sym.Insn, str);\n\n if (str.charAt(0) == '$') {\n String s = str.substring(1);\n Object v;\n int n = 10;\n boolean neg = false;\n switch (s.charAt(0)) {\n default:\n break;\n\n case '-':\n neg = true;\n case '+':\n s = s.substring(1);\n if (s.startsWith(\"0x\")) {\n n = 16;\n s = s.substring(2);\n }\n try {\n n = Integer.parseInt(s, n);\n } catch (NumberFormatException e) {\n throw new DasmError(\n \"Bad relative offset number\");\n }\n if (neg) n = -n;\n return new relative_number_token(sym.Relative, n);\n }\n // Do variable substitution\n if ((v = dict.get(s)) != null) return (token) v;\n } // not begin from '$'\n } // !only_name\n // Unrecognized string token (e.g. a classname)\n return new str_token(sym.Word, str);\n }\n }\n }", "public String next()\r\n\t{\r\n\t\tif(st == null || !st.hasMoreTokens())\r\n\t\t\tnewst();\r\n\t\treturn st.nextToken();\r\n\t}", "private Token nextTokenWithWhites() throws IOException {\n\t\tString lexemaActual = \"\";\n\t\t// Si hay lexemas en el buffer, leemos de ahi\n\t\tif (!bufferLocal.esVacia()) {\n\t\t\treturn bufferLocal.extraer();\n\t\t} else {\n\t\t\t// Si no, leemos del Stream\t\t\t\t\t\n\t\t\tint lexema = tokens.nextToken();\n\t\t\tswitch (lexema) {\n\t\t\t\tcase StreamTokenizer.TT_WORD: \n\t\t\t\t\tlexemaActual = tokens.sval; \n\t\t\t\t\tbreak;\n\t\t\t\tcase StreamTokenizer.TT_EOF:\n\t\t\t\t\tlexemaActual = \"fin\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlexemaActual = String.valueOf((char)tokens.ttype);\n\t\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t\t// Sumamos una linea en caso de haber salto de linea\n\t\t\tif (lexemaActual.equals(\"\\n\")) \n\t\t\t\tnumeroLinea++;\t\t\t\n\t\t}\n\t\treturn new Token(lexemaActual,this.numeroLinea);\n\t}", "public static Token getNextToken()\n{\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 8)\n {\n jjmatchedKind = 8;\n }\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 8)\n {\n jjmatchedKind = 8;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n TokenLexicalActions(matchedToken);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else\n {\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n}", "public Token getNextToken() throws IOException {\n\t\t\n\t\tToken palabra = this.nextToken();\n\t\t// Comprobamos si es un caso especial\n\t\tpalabra = casoEspecial(palabra);\n\t\tpalabra.setCatLexica(reconoceCategoria(palabra.get_lexema()));\n\t\t \n\t\tlistaTokens.add(palabra);\n\t\treturn palabra;\t\n\t}", "public Token nextToken() throws LexerException { \n \n trimWhitespaces();\n \n if(currentIndex > dataLength) {\n throw new LexerException(\"No more tokens! EOF!\");\n }\n \n if(currentIndex == dataLength) {\n token = new Token(TokenType.EOF, null);\n currentIndex++;\n return token;\n } \n \n if(data[currentIndex] == '#') {\n token = new Token(TokenType.SYMBOL, data[currentIndex]);\n \n currentIndex++;\n stringToken = new StringBuilder();\n \n return token;\n }\n \n if(state == LexerState.BASIC) {\n return nextTokenBasic();\n }\n return nextTokenExtended();\n }", "public Token peekToken() {\r\n return this.current;\r\n }", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "private boolean getNextToken() throws IOException {\n if (jackTokenizer.hasMoreTokens()) {\n jackTokenizer.advance();\n currTokenType = jackTokenizer.tokenType();\n if (currTokenType.equals(JackTokenizer.IDENTIFIER_TOKEN_TYPE)) {\n currentToken = jackTokenizer.identifier();\n\n } else if (currTokenType.equals(JackTokenizer.INT_CONST_TOKEN_TYPE)) {\n currentToken = String.valueOf(jackTokenizer.intVal());\n\n } else if (currTokenType.equals(JackTokenizer.KEYWORD_TOKEN_TYPE)) {\n currentToken = jackTokenizer.keyWord();\n\n } else if (currTokenType.equals(JackTokenizer.STRING_CONST_TOKEN_TYPE)) {\n currentToken = jackTokenizer.stringVal();\n\n } else if (currTokenType.equals(JackTokenizer.SYMBOL_TOKEN_TYPE)) {\n currentToken = String.valueOf(jackTokenizer.currentSymbol());\n\n } else {\n return false;\n\n }\n return true;\n }\n return false;\n }", "@Override\n\tprotected Token findNextToken() {\n\t\tLocatedChar ch = nextNonWhitespaceChar();\n\t\tif(isCommentStart(ch)) {\n\t\t\tscanComment(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t\tif(ch.isDigit()) {\n\t\t\treturn scanNumber(ch);\n\t\t}\n\t\telse if(isIdentifierStart(ch)) {\n\t\t\treturn scanIdentifier(ch);\n\t\t}\n\t\telse if(isPunctuatorStart(ch)) {\n\t\t\treturn PunctuatorScanner.scan(ch, input);\n\t\t}\n\t\telse if(isCharStart(ch)) {\n\t\t\treturn scanChar(ch);\n\t\t}\n\t\telse if(isStrStart(ch)) {\n\t\t\treturn scanString(ch);\n\t\t}\n\t\telse if(isEndOfInput(ch)) {\n\t\t\treturn NullToken.make(ch);\n\t\t}\n\t\telse {\n\t\t\tlexicalError(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t}", "static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }", "public String popCurrentToken() throws IOException, DataFormatException {\n String token = this.currentToken;\n advance();\n return token;\n }", "private Token nextToken() throws ParseException {\n String str;\n int line;\n int column;\n\n try {\n lastMatch.clear();\n stringDfaMatcher.match(buffer, lastMatch);\n nfaMatcher.match(buffer, lastMatch);\n regExpMatcher.match(buffer, lastMatch);\n if (lastMatch.length() > 0) {\n line = buffer.lineNumber();\n column = buffer.columnNumber();\n str = buffer.read(lastMatch.length());\n return newToken(lastMatch.pattern(), str, line, column);\n } else if (buffer.peek(0) < 0) {\n return null;\n } else {\n line = buffer.lineNumber();\n column = buffer.columnNumber();\n throw new ParseException(ParseException.UNEXPECTED_CHAR_ERROR,\n buffer.read(1),\n line,\n column);\n }\n } catch (IOException e) {\n throw new ParseException(ParseException.IO_ERROR,\n e.getMessage(),\n -1,\n -1);\n }\n }", "public Token nextToken() {\n\t\t\n\t\t//if the method nextToken() is called and the last token\n\t\t//before that was EOF, then this method will throw LexerException.\n\t\tif(token != null && token.type == TokenType.EOF) {\n\t\t\tthrow new LexerException(\"There are no more tokens afeter EOF.\");\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tskipBlankSpaces();\n\t\t\n\t\tif(currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t\treturn token;\n\t\t}\n\t\t\n\t\tif(state == LexerState.BASIC) {\n\t\t\t//checking if it is a word\n\t\t\tif(Character.isLetter(data[currentIndex]) || data[currentIndex] == '\\\\') {\n\t\t\t\ttoken = basicNextWordToken();\n\t\t\t\treturn token;\n\t\t\t}\n\t\t\t\n\t\t\t//checking if it is a number\n\t\t\tif(data[currentIndex] >= '1' && data[currentIndex] <= '9') {\t\n\t\t\t\ttry {\n\t\t\t\t\ttoken = basicNextNumberToken();\n\t\t\t\t\treturn token;\n\t\t\t\t\t\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tthrow new LexerException(\"The number could not be parsed to long!\");\t\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//it is in the EXTENDED state\n\t\t\tif(data[currentIndex] != '#') {\n\t\t\t\ttoken = extendedNextWordToken();\n\t\t\t\treturn token;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if it is not a word or a number then it is a symbol.\n\t\t\n\t\ttoken = new Token(TokenType.SYMBOL, data[currentIndex]);\n\t\tcurrentIndex++;\n\t\t\n\t\treturn token;\n\t}", "public String nextToken()\n\t{\n\t\tif (current >\tmax) return\t\"\";\n\t\t\n\t\tcurrentToken++;\n\t\t\n\t\tif (current == max) return str.substring(current,++current);\n\n\t\tint nextDel=this.str.indexOf(this.firstDelimiters, current);\n\t\t\n\t\tString returnString;\n\t\t\n\t\tif (nextDel < 0)\n\t\t{\n\t\t\treturnString=this.str.substring(current, this.str.length());\n\t\t\tcurrent=max+1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturnString=this.str.substring(current, nextDel);\n\t\t\tcurrent=nextDel+1;\n\t\t}\n\t\treturn returnString;\n\t}", "private Token peek() {\n return tokens.get(current);\n }", "public Token nextToken() {\n\t\t\t// if something in queue, just remove and return it\n\t\t\tif ( tokens.size()>0 ) {\n\t\t\t\tToken t = (Token)tokens.firstElement();\n\t\t\t\ttokens.removeElementAt(0);\n\t\t\t\t// System.out.println(t);\n\t\t\t\treturn t;\n\t\t\t}\n\n\t\t\tinsertImaginaryIndentDedentTokens();\n\n\t\t\treturn nextToken();\n\t\t}", "public Token nextToken() {\n if (currentIndex == this.data.length) {\n this.token = new Token(TokenType.EOF, null);\n currentIndex++;\n return this.token;\n }\n\n if (currentIndex > this.data.length) {\n throw new LexerException(\"There aren't any more tokens to be generated\");\n }\n\n char currChar = data[currentIndex];\n\n if (currChar == '{') {\n if (data[currentIndex + 1] == '$') {\n currentIndex += 2;\n this.state = LexerState.TAG_NAME;\n this.token = new Token(TokenType.OPEN_TAG, \"{$\");\n } else {\n throw new LexerException(\"Expected $, but didn't find it\");\n }\n } else if (this.state == LexerState.TAG_NAME) {\n this.token = getTagName();\n this.state = LexerState.TAG_ELEMENTS;\n } else if (this.state == LexerState.TAG_ELEMENTS) {\n this.token = getTagElement();\n } else if (this.state == LexerState.TEXT) {\n this.token = getNextText();\n }\n\n\n return this.token;\n }", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedPos == 0 && jjmatchedKind > 121)\n {\n jjmatchedKind = 121;\n }\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 9)\n {\n jjmatchedKind = 9;\n }\n break;\n case 3:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_3();\n if (jjmatchedPos == 0 && jjmatchedKind > 9)\n {\n jjmatchedKind = 9;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n TokenLexicalActions(matchedToken);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n MoreLexicalActions();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "@Nonnull\r\n public Token token()\r\n throws IOException,\r\n LexerException {\r\n Token tok = _token();\r\n if (getFeature(Feature.DEBUG))\r\n LOG.debug(\"pp: Returning \" + tok);\r\n return tok;\r\n }", "private void getNextToken() throws IOException {\n if (tok.ttype==LexAnn.TT_EOL) {\n if (code.getCurLine() < maxLine) {\n code.setCurLine(code.getCurLine()+1);\n tok.setString(code.getLine());\n tok.nextToken();\n } else {\n tok.ttype=LexAnn.TT_EOF; //the only place this gets set\n }\n } else {\n tok.nextToken();\n }\n }", "public static void getNextToken() {\n if (currPos < tokens.size()) {\n currToken = tokens.get(currPos);\n //TODO del \n // System.out.println(currToken);\n currPos++;\n } else {\n// System.out.println(\"end of tokens reached\");\n currToken = new Token(Token.UNRECOGNIZED);\n }\n }", "public int readInt(){\n\t\ttry{\n\t\t\treturn scanner.nextInt();\n\t\t}catch (InputMismatchException e){\n\t\t\tString token=scanner.next();\n\t\t\tthrow new InputMismatchException(\"the next token is\\\"\"+token+\"\\\"\");\n\t\t}\n\t\tcatch (NoSuchElementException e){\n\t\t\tthrow new NoSuchElementException(\"no more tokens are available\");\n\t\t}\n\t}", "@Override\n public Token nextToken(\n PushbackReader r, int cin, Tokenizer t)\n throws IOException {\n\n int i = 0;\n charbuf[i++] = (char) cin;\n int c;\n do {\n c = r.read();\n if (c < 0) {\n c = cin;\n }\n checkBufLength(i);\n charbuf[i++] = (char) c;\n } while (c != cin);\n\n String sval = copyValueOf(charbuf, 0, i);\n return new Token(TT_QUOTED, sval, 0);\n }", "private Token peekToken() {\n return peekToken(0);\n }", "public Token nextToken() throws ScanErrorException\n {\n skipWhiteSpace();\n if (eof) \n return new Token(\"eof\", \"eof\");\n else if (isDigit(currentChar))\n return new Token(scanNumber(), \"number\");\n else if (isLetter(currentChar))\n {\n return Token.verifyKeywordLexeme(scanIdentifier());\n }\n else if (isArithmeticOperand(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"arithmetic_operand\");\n }\n else if (isParentheses(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"parentheses\");\n }\n else if(currentChar == '<' || currentChar == '>' || currentChar == '=')\n {\n String result = \"\";\n result += currentChar;\n if(currentChar == '=')\n eat(currentChar);\n else if(currentChar == '>')\n {\n eat(currentChar);\n if(currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n else\n {\n eat(currentChar);\n if(currentChar == '>' || currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n\n return new Token(result, \"relational_operand\");\n }\n\n System.out.println(\"Error in reading token. Char <\" + currentChar \n + \"> not part of regular language.\");\n eat(currentChar);\n return null;\n }", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "private Token consume() throws SyntaxException {\n\t\tToken tmp = t;\n\t\tt = scanner.nextToken();\n\t\treturn tmp;\n\t}", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedPos == 0 && jjmatchedKind > 204)\n {\n jjmatchedKind = 204;\n }\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n case 3:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_3();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n MoreLexicalActions();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n try { input_stream.backup(0);\n while (curChar <= 12 && (0x1000L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n TokenLexicalActions(matchedToken);\n return matchedToken;\n }\n else\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n continue EOFLoop;\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n}", "public char[] nextToken() {\n\t\t// read and return the next word of the document\n\t\tif(loc<words.length){\n\n\t\t\tString res=words[loc];\n\t\t\tloc++;\n\t\t\treturn res.toCharArray();\n\t\t}\n\n\t\t// or return null if it reaches the end of the document\n\t\treturn null;\n\t}", "public Token getToken() throws IOException {\n\t\t// check if peek() was called\n\t\tif (nextToken != null) {\n\t\t\tToken token = nextToken;\n\t\t\tnextToken = null; // allow peek to call for next token\n\t\t\treturn token;\n\t\t}\n\n\t\t// skip whitespace character\n\t\twhile (Character.isWhitespace(nextChar)) {\n\t\t\t// check if whitespace char is a newline\n\t\t\tif (!skipNewline()) {\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\t// offset colNum for tab chars\n\t\t\tif (nextChar == '\\t')\n\t\t\t\tcolumnNumber += 3;\n\t\t}\n\t\t//skips comments\n\t\tif (nextChar == '@') {\n\t\t\tnextChar = getChar();\n\t\t\twhile (!skipNewline()) {\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\tnextChar = getChar();\n\t\t}\n\n\t\t// identifier or reserved word ([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\tif (Character.isLetter(nextChar)) {\n\t\t\t// create new idVal starting with first char of identifier\n\t\t\tString current = Character.toString((char) nextChar);\n\t\t\tcolumnNumber++;\n\t\t\tnextChar = getChar();\n\n\t\t\t// include remaining sequence of chars that are letters, digits, or _\n\t\t\twhile (Character.isLetterOrDigit(nextChar)) {\n\t\t\t\tcurrent += (char) nextChar;\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\t// check if identifier is a reserved word\n\t\t\tTokenType type = reservedWords.get(current);\n\n\t\t\tif (type != null)\n\t\t\t\treturn new Token(type, new TokenAttribute());\n\n\n\n\t\t\t// token is an identifier\n\t\t\tresult.add(new Token(TokenType.IDENTIFIER, new TokenAttribute(current))); // adding token to results\n\t\t\treturn new Token(TokenType.IDENTIFIER, new TokenAttribute(current));\n\t\t}\n\n\t\t// integer literal ([0-9]+) OR float literal ([0-9]+.[0-9]+)\n\t\tif (Character.isDigit(nextChar)) {\n\n\t\t\t// create string representation of number\n\t\t\tString numString = Character.toString((char) nextChar);\n\t\t\tcolumnNumber++;\n\t\t\tnextChar = getChar();\n\n\t\t\t// concatenate remaining sequence of digits\n\t\t\twhile (Character.isDigit(nextChar)) {\n\t\t\t\tnumString += (char) nextChar;\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\tif (nextChar == '.') {\n\t\t\t\t//stream.mark(0);\n\t\t\t\tnextChar = getChar();\n\t\t\t\tcolumnNumber++;\n\n\t\t\t\tif (Character.isDigit(nextChar)) {\n\t\t\t\t\tnumString += '.';\n\t\t\t\t\t// concatenate remaining sequence of digits\n\t\t\t\t\twhile (Character.isDigit(nextChar)) {\n\t\t\t\t\t\tnumString += (char) nextChar;\n\t\t\t\t\t\tcolumnNumber++;\n\t\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(new Token(TokenType.FLOAT_CONST, new TokenAttribute(Float.parseFloat(numString))));\n\t\t\t\t\treturn new Token(TokenType.FLOAT_CONST, new TokenAttribute(Float.parseFloat(numString)));\n\t\t\t\t}\n\t\t\t\twhile (!Character.isWhitespace(nextChar)) {\n\t\t\t\t\tcolumnNumber++;\n\t\t\t\t\tnumString += nextChar;\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t}\n\n\t\t\t\t//return new Token(TokenType.UNKNOWN, new TokenAttribute());\n\t\t\t}\n\n\t\t\t// return integer literal token\n\t\t\tresult.add(new Token(TokenType.INT_CONST, new TokenAttribute(Integer.parseInt(numString))));\n\t\t\treturn new Token(TokenType.INT_CONST, new TokenAttribute(Integer.parseInt(numString)));\n\t\t}\n\n\n\t\t//EOF --> end of file reached\n\t\tif (nextChar == -1) {\n\t\t\treturn new Token(TokenType.EOF, new TokenAttribute());\n\t\t}\n\n\n\t\t// check for binops\n\t\tswitch (nextChar) {\n\n\t\t\t//Checks for strings\n\t\t\tcase '\"':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tString current = Character.toString((char) nextChar);\n\t\t\t\tnextChar = getChar();\n\t\t\t\tcurrent += (char)nextChar;\n\n\t\t\t\twhile (nextChar != '\"') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tcurrent += (char)nextChar;\n\t\t\t\t}\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.STRING, new TokenAttribute(current)));\n\t\t\t\treturn new Token(TokenType.STRING, new TokenAttribute(current));\n\n\t\t\tcase '=':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '=' to match '==' binop\n\t\t\t\tif (nextChar == '=') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.EQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.EQ, new TokenAttribute());\n\t\t\t\t} else\n\t\t\t\t\tresult.add(new Token(TokenType.ASSIGN, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.ASSIGN, new TokenAttribute());\n\n\t\t\tcase '!':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '!' to match '!=' binop\n\t\t\t\tif (nextChar == '^') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.NEQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.NEQ, new TokenAttribute());\n\t\t\t\t}\n\n\t\t\tcase '<':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '<' to match '<=' binop\n\t\t\t\tif (nextChar == '=') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.LT_EQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.LT_EQ, new TokenAttribute());\n\t\t\t\t} else\n\t\t\t\t\tresult.add(new Token(TokenType.LT, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.LT, new TokenAttribute());\n\n\t\t\tcase '>':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '<' to match '<=' binop\n\t\t\t\tif (nextChar == '=') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.GT_EQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.GT_EQ, new TokenAttribute());\n\t\t\t\t} else\n\t\t\t\t\tresult.add(new Token(TokenType.RT, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.RT, new TokenAttribute());\n\n\t\t\tcase '+':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.PLUS, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.PLUS, new TokenAttribute());\n\n\t\t\tcase '-':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.MINUS, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.MINUS, new TokenAttribute());\n\n\t\t\tcase '*':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.MULTIPLY, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.MULTIPLY, new TokenAttribute());\n\n\t\t\tcase '/':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.DIVIDE, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.DIVIDE, new TokenAttribute());\n\n\n\t\t}\n\n\t\t// check for punctuation\n\t\tTokenType type = punctuation.get((char) nextChar);\n\t\tcolumnNumber++;\n\t\tnextChar = getChar();\n\n\t\t// found punctuation token\n\t\tif (type != null) {\n\t\t\tresult.add(new Token(type, new TokenAttribute()));\n\t\t\treturn new Token(type, new TokenAttribute());\n\t\t}\n\n\t\t// token type is unknown\n\t\tresult.add(new Token(TokenType.UNKNOWN, new TokenAttribute()));\n\t\treturn new Token(TokenType.UNKNOWN, new TokenAttribute());\n\t}", "public Token nextToken() {\n\t\tif (token != null && token.getType().equals(TokenType.EOF)) {\n\t\t\tthrow new SmartScriptLexerException();\n\t\t}\n\n\t\tif (currentIndex == data.length) {\n\t\t\tif (state.equals(LexerState.TAG)) {\n\t\t\t\tthrow new SmartScriptLexerException(\"Invalid syntax. Tags must be closed.\");\n\t\t\t}\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t\treturn token;\n\t\t}\n\n\t\tStringBuilder buffer = new StringBuilder();\n\t\tchar ch;\n\n\t\tswitch (state) {\n\t\tcase TEXT:\n\t\t\twhile (true) {\n\t\t\t\tif (currentIndex < data.length) {\n\t\t\t\t\tch = data[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tif (tokenState.equals(TokenState.ESCAPE)) {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid syntax. Tags must be closed.\");\n\t\t\t\t\t}\n\t\t\t\t\tch = '\\n';\n\t\t\t\t}\n\n\t\t\t\tswitch (tokenState) {\n\t\t\t\tcase WORD:\n\t\t\t\t\tif (currentIndex == data.length) {\n\t\t\t\t\t\ttoken = new Token(TokenType.TEXT, buffer.toString());\n\t\t\t\t\t\treturn token;\n\t\t\t\t\t} else if (ch == '{') {\n\t\t\t\t\t\ttokenState = TokenState.TAG_OPEN;\n\t\t\t\t\t} else if (ch == '\\\\') {\n\t\t\t\t\t\ttokenState = TokenState.ESCAPE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ESCAPE:\n\t\t\t\t\tif (ch == '{' || ch == '\\\\') {\n\t\t\t\t\t\ttokenState = TokenState.WORD;\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid escape sequence.\");\n\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase TAG_OPEN:\n\t\t\t\t\tif (ch == '$') {\n\t\t\t\t\t\tstate = LexerState.TAG;\n\t\t\t\t\t\ttokenState = TokenState.TAG_NAME;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t\tif (buffer.length() != 0) {\n\t\t\t\t\t\t\ttoken = new Token(TokenType.TEXT, buffer.toString());\n\t\t\t\t\t\t\treturn token;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn nextToken();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuffer.append(\"{\");\n\t\t\t\t\t\ttokenState = TokenState.WORD;\n\t\t\t\t\t}\n\n\t\t\t\tcase INIT:\n\t\t\t\t\tif (ch == '{') {\n\t\t\t\t\t\ttokenState = TokenState.TAG_OPEN;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t} else if (ch == '\\\\') {\n\t\t\t\t\t\ttokenState = TokenState.ESCAPE;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttokenState = TokenState.WORD;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new SmartScriptLexerException(\"Irregular state.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase TAG:\n\t\t\tskipWhitespaces();\n\t\t\twhile (true) {\n\t\t\t\tif (currentIndex < data.length) {\n\t\t\t\t\tch = data[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid syntax. Tags must be closed.\");\n\t\t\t\t}\n\n\t\t\t\tswitch (tokenState) {\n\t\t\t\tcase TAG_NAME:\n\t\t\t\t\tif (ch == '=') {\n\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t\ttoken = new Token(TokenType.TAG, String.valueOf(ch));\n\t\t\t\t\t\treturn token;\n\t\t\t\t\t} else if (Character.isLetter(ch)) {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t} else if (buffer.length() != 0) {\n\t\t\t\t\t\tif (Character.isDigit(ch) || ch == '_') {\n\t\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\t\ttoken = new Token(TokenType.TAG, buffer.toString());\n\t\t\t\t\t\t\treturn token;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid tag name\");\n\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase FUNCTION:\n\t\t\t\t\tif (Character.isLetter(ch)) {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t} else if (buffer.length() != 0) {\n\t\t\t\t\t\tif (Character.isDigit(ch) || ch == '_') {\n\t\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\t\ttoken = new Token(TokenType.FUNCTION, buffer.toString());\n\t\t\t\t\t\t\treturn token;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid tag name\");\n\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase VAR:\n\t\t\t\t\tif (Character.isLetterOrDigit(ch) || ch == '_') {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\ttoken = new Token(TokenType.VAR, buffer.toString());\n\t\t\t\t\t\treturn token;\n\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase CONST_INT:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t} else if (ch == '.') {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t\ttokenState = TokenState.CONST_DOUBLE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\t\tint number = Integer.valueOf(buffer.toString());\n\t\t\t\t\t\t\ttoken = new Token(TokenType.CONST_INT, number);\n\t\t\t\t\t\t\treturn token;\n\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Number too big.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase CONST_DOUBLE:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t} else if (buffer.toString().endsWith(\".\")) {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid syntax.\");\n\t\t\t\t\t} else\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\t\tdouble number = Double.valueOf(buffer.toString());\n\t\t\t\t\t\t\ttoken = new Token(TokenType.CONST_DOUBLE, number);\n\t\t\t\t\t\t\treturn token;\n\t\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Number too big.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MINUS:\n\t\t\t\t\tif (buffer.length() == 0) {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t} else if (Character.isDigit(ch)) {\n\t\t\t\t\t\ttokenState = TokenState.CONST_INT;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\ttoken = new Token(TokenType.OPERATOR, buffer.toString());\n\t\t\t\t\t\treturn token;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase OPERATOR:\n\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\ttoken = new Token(TokenType.OPERATOR, String.valueOf(ch));\n\t\t\t\t\treturn token;\n\n\t\t\t\tcase STRING:\n\t\t\t\t\tif (ch == '\\\"') {\n\t\t\t\t\t\tif (buffer.length() == 0) {\n\t\t\t\t\t\t\tthrow new SmartScriptLexerException(\"String cannot be empty.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t\ttoken = new Token(TokenType.STRING, buffer.toString());\n\t\t\t\t\t\treturn token;\n\t\t\t\t\t} else if (ch == '\\\\') {\n\t\t\t\t\t\ttokenState = TokenState.ESCAPE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t}\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ESCAPE:\n\t\t\t\t\tif (ch == '\\\\' || ch == '\\\"') {\n\t\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t\t} else if (ch == 'r') {\n\t\t\t\t\t\tbuffer.append('\\r');\n\t\t\t\t\t} else if (ch == 'n') {\n\t\t\t\t\t\tbuffer.append('\\n');\n\t\t\t\t\t} else if (ch == 't') {\n\t\t\t\t\t\tbuffer.append('\\t');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid escape sequence.\");\n\t\t\t\t\t}\n\t\t\t\t\ttokenState = TokenState.STRING;\n\t\t\t\t\t++currentIndex;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase TAG_CLOSED:\n\t\t\t\t\tif (ch == '}') {\n\t\t\t\t\t\tstate = LexerState.TEXT;\n\t\t\t\t\t\ttokenState = TokenState.INIT;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t\ttoken = new Token(TokenType.END_TAG, null);\n\t\t\t\t\t\treturn token;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid syntax.\");\n\t\t\t\t\t}\n\n\t\t\t\tcase INIT:\n\t\t\t\t\tif (Character.isLetter(ch)) {\n\t\t\t\t\t\ttokenState = TokenState.VAR;\n\t\t\t\t\t} else if (Character.isDigit(ch)) {\n\t\t\t\t\t\ttokenState = TokenState.CONST_INT;\n\t\t\t\t\t} else if (ch == '-') {\n\t\t\t\t\t\ttokenState = TokenState.MINUS;\n\t\t\t\t\t} else if (ch == '+' || ch == '*' || ch == '/' || ch == '^') {\n\t\t\t\t\t\ttokenState = TokenState.OPERATOR;\n\t\t\t\t\t} else if (ch == '@') {\n\t\t\t\t\t\ttokenState = TokenState.FUNCTION;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t} else if (ch == '\\\"') {\n\t\t\t\t\t\ttokenState = TokenState.STRING;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t} else if (ch == '$') {\n\t\t\t\t\t\ttokenState = TokenState.TAG_CLOSED;\n\t\t\t\t\t\t++currentIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new SmartScriptLexerException(\"Invalid tag element.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new SmartScriptLexerException(\"Irregular state.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn token;\n\t}", "private Token peekToken(int index) {\n return scanner.peekToken(index);\n }", "public Token nextToken() {\n\t\tif(currentToken != null && currentToken.getType() == TokenType.EOF)\n\t\t\tthrow new LexerException(\"No more tokens\");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\twhile(currentIndex < text.length) {\n\t\t\tchar currentChar = text[currentIndex++];\n\t\t\t\n\t\t\tif(sb.length() == 0 && Character.isWhitespace(currentChar)) continue;\n\t\t\t\n\t\t\tif(sb.length() != 0 && Character.isWhitespace(currentChar))\n\t\t\t\tthrow new LexerException(\"Illegal token: \" + sb.toString());\n\t\t\t\n\t\t\tsb.append(currentChar);\n\t\t\t\n\t\t\tToken token = tokenize(sb.toString());\n\t\t\t\n\t\t\tif(token != null) {\n\t\t\t\tcurrentToken = token;\n\t\t\t\treturn token;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(sb.length() == 0) {\n\t\t\tcurrentToken = EOF_TOKEN;\n\t\t\treturn EOF_TOKEN;\n\t\t}\n\t\t\n\t\tthrow new LexerException(\"Illegal token: \" + sb.toString());\n\t}", "String getNextToken(java.util.StringTokenizer t) {\n return (t.hasMoreTokens() ? t.nextToken() : \"\");\n }", "public Token getToken(){\n if(currentToken == -1) return null;\n return tokens.get(currentToken);\n }", "final public Token getToken(int index) {\n Token t = jj_lookingAhead ? jj_scanpos : token;\n for (int i = 0; i < index; i++) {\n if (t.next != null) t = t.next;\n else t = t.next = token_source.getNextToken();\n }\n return t;\n }", "@Override\n\tpublic Token nextToken() throws IOException, InputMismatchException {\n\n\t\tToken token;\n\t\tif (position.hasNext()) {\n\t\t\ttoken = position.next();\n\t\t}\n\t\telse {\n\t\t\ttoken = super.getToken();\n\t\t\tif (token != null) {\n\t\t\t\tposition.add(token);\n\t\t\t}\n\t\t}\n\t\treturn token;\n\t}", "BsonToken nextToken() throws IOException;", "public Token next()\n\t{\n\t\tint munchSize = 0;\n\t\tStringBuilder buffer = new StringBuilder();\n\n\t\t// iterate until we either:\n\t\t//\t1. Match a token in any state but MANY_STATE\n\t\t//\t2. Whitespace, newline or EOF\n\t\tboolean was_good = false, can_continue = true;\n\t\tToken to_return = Token.generateToken(lineNum, charPos, \"EOF\", Token.Kind.EOF);\n\n\t\t// skip any initial white space.\n\t\twhile (readChar() == -1) { }\n\t\tthis.lastChar = this.nextChar;\n\t\twhile (can_continue && readChar() > -1) {\n\t\t\tchar next = (char)this.nextChar;\n\t\t\tint pos = (charPos - (buffer.length() + 1));\n\t\t\tswitch (munchSize) {\n\t\t\t\tcase EMPTY_STATE:\n\t\t\t\t\t// Search for all tokens of one token. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getSingleCharacterMap(), String.valueOf(next), 0)) {\n\t\t\t\t\t\t// We can transition.\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getSingleCharacterMap());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// error.\n\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SINGLE_STATE:\n\t\t\t\t\t// Search for all tokens of two tokens. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getDoubleCharTokens(), buffer.toString() + next, 1)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getDoubleCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\n\t\t\t\t\t\t// is this a comment?\n\t\t\t\t\t\tif (to_return.is(Token.Kind.COMMENT)) {\n\t\t\t\t\t\t\t// restart parse.\n\t\t\t\t\t\t\tthis.on_comment = true;\n\t\t\t\t\t\t\tmunchSize = 0;\n\t\t\t\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tcan_continue = true;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"EOF\", Token.Kind.EOF);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\tif (!was_good) {\n\t\t\t\t\t\t\t// error.\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOUBLE_STATE:\n\t\t\t\t\t// Search for multiple character states and keywords.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getMultiCharTokens(), buffer.toString() + next, 2)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getMultiCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // MANY_STATE\n\t\t\t\t\tif (Token.isValidLexeme(Token.getKeywords(), buffer.toString() + next, munchSize)) {\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(), Token.getKeywords());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn to_return;\n\t}", "Token CurrentToken() throws ParseException {\r\n return token;\r\n }", "public String nextToken()\n {\n\n if (currentPosition >= maxPosition)\n {\n throw new NoSuchElementException();\n }\n\n int start = currentPosition;\n\n while ((currentPosition < maxPosition)\n && Character.isLetterOrDigit(str.charAt(currentPosition)))\n {\n currentPosition++;\n }\n\n if ((start == currentPosition)\n && (!Character.isLetterOrDigit(str.charAt(currentPosition))))\n {\n currentPosition++;\n }\n\n return str.substring(start, currentPosition);\n }" ]
[ "0.7622178", "0.7547264", "0.7482326", "0.7476903", "0.7347075", "0.72733986", "0.7254225", "0.72485745", "0.7235403", "0.7214095", "0.7193324", "0.7173664", "0.71589136", "0.7145269", "0.7124993", "0.710799", "0.70949185", "0.7062067", "0.7059417", "0.7059417", "0.7059417", "0.7059417", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.70551354", "0.7034104", "0.7034104", "0.70313925", "0.70313925", "0.7024025", "0.70059985", "0.698234", "0.69718105", "0.69424695", "0.69267064", "0.69267064", "0.69267064", "0.69067603", "0.6892976", "0.68862665", "0.68759286", "0.6869555", "0.6798008", "0.6764951", "0.67621696", "0.67414165", "0.67413", "0.6731123", "0.67261684", "0.67084414", "0.666992", "0.66173494", "0.66122025", "0.66026795", "0.6593896", "0.65863204", "0.6578291", "0.6577994", "0.6575622", "0.65556043", "0.6541984", "0.6540657", "0.65372163", "0.650704", "0.65000945", "0.64928764", "0.64914715", "0.6473866", "0.6471341", "0.6455567", "0.64476556", "0.64426315", "0.6442468", "0.64285105", "0.6398879", "0.6396659", "0.63787806", "0.63722503", "0.63654035", "0.6357739", "0.6345874", "0.6331386", "0.6302642", "0.6289128", "0.6279722", "0.6266643", "0.6255827", "0.6254869", "0.62534094", "0.62293684", "0.62280357", "0.61813575", "0.6178618" ]
0.0
-1
reads the next token from this input stream
public int readInt(){ try{ return scanner.nextInt(); }catch (InputMismatchException e){ String token=scanner.next(); throw new InputMismatchException("the next token is\""+token+"\""); } catch (NoSuchElementException e){ throw new NoSuchElementException("no more tokens are available"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "Token next();", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "Token getNextToken() throws IOException, JIPSyntaxErrorException {\n StringBuilder sbTerm = new StringBuilder();\n int curChar = -1;\n int nState = STATE_NONE;\n int nTokenType = TOKEN_UNKNOWN;\n\n if (m_nextToken != null) {\n Token token = m_nextToken;\n m_nextToken = null;\n return token;\n }\n\n while (nState != STATE_END) {\n //m_lnReader.mark(2);\n //System.out.println(\"reading\");\n curChar = m_lnReader.read();\n\n //System.out.println(\"read \" + (char)curChar);\n //System.out.println(\"read \" + curChar);\n\n if (curChar == -1) // EOF\n {\n //System.out.println(\"EOF\");\n nState = STATE_END;\n// m_lnReader.pushback();\n } else {\n switch (nState) {\n case STATE_NONE:\n\n if ((curChar == LINECOMMENT_CHAR)) {\n nState = STATE_LINECOMMENT;\n } else if ((curChar == QUOTE_CHAR)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_QUOTE;\n } else if ((curChar == DOUBLEQUOTE_CHAR)) {\n sbTerm.append((char) curChar);\n nState = STATE_DOUBLEQUOTE;\n } else if ((LOWERCASE_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_ATOM;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_ATOM;\n } else if ((UPPERCASE_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_VARIABLE;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_VARIABLE;\n }\n// else if((SIGN_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_SIGN;\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// nTokenType = TOKEN_SIGN;\n// }\n else if ((SPECIAL_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_SPECIAL_ATOM;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_SPECIAL_ATOM;\n } else if ((NUMBER_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_NUMBER;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_NUMBER;\n } else if (curChar <= 0x20) // whitespace char\n //if((WHITESPACE_CHARS.indexOf(curChar) > -1))\n {\n //System.out.println(\"TOKEN_WHITESPACE\");\n nTokenType = TOKEN_WHITESPACE;\n nState = STATE_END;\n sbTerm = new StringBuilder(\" \");\n// strTerm = \" \";\n }\n// else if(curChar < 0x20) // whitespace char\n// //if((WHITESPACE_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_NONE;\n// }\n else if ((SINGLETON_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n\n int c = m_lnReader.read();\n if (c == -1) {\n //System.out.println(\"SINGLETON_CHARS EOF\");\n\n nState = STATE_END;\n// m_lnReader.pushback();\n } else {\n if (c == '>' && sbTerm.charAt(sbTerm.length() - 1) == '!')\n// if((strTerm + (char)c).equals(\"!>\"))\n sbTerm.append((char) c);//String.valueOf((char)c);\n else\n m_lnReader.unread(c);\n }\n\n nTokenType = TOKEN_SINGLETON;\n nState = STATE_END;\n\n//// System.out.println(\"Singleton \" + strTerm);\n// nTokenType = TOKEN_SINGLETON;\n//// }\n\n// nState = STATE_END;\n } else {\n throw syntaxError(\"invalid_character('\" + (char) curChar + \"')\");\n }\n break;\n\n case STATE_ATOM:\n if ((UPPERCASE_CHARS.indexOf(curChar) > -1) ||\n (LOWERCASE_CHARS.indexOf(curChar) > -1) ||\n (NUMBER_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_ATOM;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n }\n break;\n\n case STATE_VARIABLE:\n if ((UPPERCASE_CHARS.indexOf(curChar) > -1) ||\n (LOWERCASE_CHARS.indexOf(curChar) > -1) ||\n (NUMBER_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_VARIABLE;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n }\n break;\n\n case STATE_SPECIAL_ATOM:\n char lastChar = sbTerm.charAt(sbTerm.length() - 1);\n if ((curChar == '!' && lastChar == '<') || (curChar == '>' && lastChar == '!'))\n// if((strTerm + (char)curChar).equals(\"<!\") || (strTerm + (char)curChar).equals(\"!>\"))\n {\n sbTerm.append((char) curChar);//String.valueOf((char)c);\n nTokenType = TOKEN_SPECIAL_ATOM;\n nState = STATE_END;\n } else if ((SPECIAL_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n if (sbTerm.toString().equals(OPENCOMMENT_CHAR)) {\n nState = STATE_COMMENT;\n sbTerm = new StringBuilder(\"\");\n nTokenType = TOKEN_UNKNOWN;\n }\n } else {\n nTokenType = TOKEN_SPECIAL_ATOM;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n// case STATE_SIGN:\n// if((SPECIAL_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_SPECIAL_ATOM;\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// nTokenType = TOKEN_SPECIAL_ATOM;\n// }\n// else\n// {\n// nTokenType = TOKEN_SIGN;\n// nState = STATE_END;\n// m_lnReader.pushback();\n// }\n// break;\n\n case STATE_NUMBER:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else if (curChar == '.') {\n //m_lnReader.mark(2);\n int c = m_lnReader.read();\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n if (NUMBER_CHARS.indexOf(c) == -1) {\n m_nextToken = new Token();\n\n m_nextToken.m_strToken = \".\";\n m_nextToken.m_nType = TOKEN_SPECIAL_ATOM;//&&TOKEN_DOT;\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n } else {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_DECIMAL;\n }\n } else if (curChar == 'e' || curChar == 'E') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_EXPONENT;\n } else if (curChar == '\\'') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_ASCII;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'b') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_BINARY;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'o') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_OCTAL;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'x') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_HEXADECIMAL;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_EXPONENT:\n if (curChar == '+' || curChar == '-') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_INTEGER;\n } else if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_INTEGER;\n } else {\n throw syntaxError(\"invalid_character('\" + (char) curChar + \"')\");\n }\n break;\n\n case STATE_DECIMAL:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else if (curChar == 'e' || curChar == 'E') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_EXPONENT;\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_INTEGER:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_ASCII:\n if (curChar == '\\\\') {\n sbTerm = new StringBuilder();\n// strTerm = \"\";\n curChar = m_lnReader.read();\n switch (curChar) {\n case 'a': // \\a bell\n sbTerm.append(Integer.toString(7));\n break;\n\n case 'b': // \\b backspace\n sbTerm.append(Integer.toString(8));\n break;\n\n case 'd': // \\d delete\n sbTerm.append(Integer.toString(127));\n break;\n\n case 'e': // \\e escape\n sbTerm.append(Integer.toString(27));\n break;\n\n case 'f': // \\f form feed\n sbTerm.append(Integer.toString(12));\n break;\n\n case 'n': // \\n line feed\n sbTerm.append(Integer.toString(10));\n break;\n\n case 'r': // \\r carriage return\n sbTerm.append(Integer.toString(13));\n break;\n\n case 's': // \\s space\n sbTerm.append(Integer.toString(32));\n break;\n\n case 't': // \\t tab\n sbTerm.append(Integer.toString(9));\n break;\n\n case 'v': // \\v vtab\n sbTerm.append(Integer.toString(11));\n break;\n\n case 'x': // \\xHX\n // legge il prossimo byte\n int d1 = m_lnReader.read();\n // legge il prossimo byte\n int d2 = m_lnReader.read();\n String strHexNum = (char) d1 + \"\" + (char) d2;\n\n try {\n byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n sbTerm.append(Integer.toString(val[0]));\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strHexNum + \"')\");\n }\n\n // legge il prossimo byte\n d2 = m_lnReader.read();\n if (d2 != '\\\\') // ISO def\n m_lnReader.unread(d2);\n// m_lnReader.pushback();\n break;\n\n default: // ignora \\\n sbTerm.append(Integer.toString(curChar));\n }\n\n } else {\n sbTerm = new StringBuilder(Integer.toString(curChar));\n// strTerm = Integer.toString(curChar);\n }\n\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n break;\n\n case STATE_BINARY:\n if (NUMBER_BINARY_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 2));\n// strTerm = \"\" + Integer.parseInt(strTerm, 2);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_OCTAL:\n if (NUMBER_OCTAL_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 8));\n// strTerm = \"\" + Integer.parseInt(strTerm, 8);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_HEXADECIMAL:\n if (NUMBER_HEXADECIMAL_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 16));\n// strTerm = \"\" + Integer.parseInt(strTerm, 16);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_LINECOMMENT:\n int c = curChar;\n do {\n if ((c == '\\r') || (c == '\\n'))\n break;\n\n c = m_lnReader.read();\n }\n while (c != -1);\n\n nState = STATE_NONE;\n break;\n\n case STATE_COMMENT: {\n c = curChar;\n int c1;\n do {\n c1 = c;\n c = m_lnReader.read();\n if ((c1 == '*') && (c == '/'))\n break;\n }\n while (c != -1);\n\n // torna allo stato iniziale\n nState = STATE_NONE;\n }\n break;\n\n case STATE_QUOTE:\n case STATE_DOUBLEQUOTE:\n// System.out.println(curChar);\n if (curChar == DOUBLEQUOTE_CHAR) {\n if (nState == STATE_DOUBLEQUOTE) {\n c = m_lnReader.read();\n if (c == DOUBLEQUOTE_CHAR) {\n sbTerm.append('\"');\n } else {\n // fine quoted atom\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = (nState == STATE_QUOTE) ? TOKEN_QUOTE : TOKEN_DBLQUOTE;\n nState = STATE_END;\n }\n } else {\n sbTerm.append((char) curChar);\n }\n } else if (curChar == QUOTE_CHAR) {\n if (nState == STATE_QUOTE) {\n c = m_lnReader.read();\n if (c == QUOTE_CHAR) {\n sbTerm.append('\\'');\n } else {\n // fine quoted atom\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = (nState == STATE_QUOTE) ? TOKEN_QUOTE : TOKEN_DBLQUOTE;\n nState = STATE_END;\n }\n } else {\n sbTerm.append((char) curChar);\n }\n } else if (nState == STATE_QUOTE && (curChar == '\\r' || curChar == '\\n')) {\n throw syntaxError(\"carriage_return_in_quoted_atom('\" + sbTerm.toString() + \"')\");\n }\n// else if(curChar == '~') // edimburgh prolog\n// {\n// c = m_lnReader.read();\n// if(c == '~')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c == '\\'')\n// {\n//// fine quoted atom\n// m_lnReader.pushback();\n// //sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else if(c >= '@')\n// {\n// sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n//\n// else\n// throw syntaxError(\"bad_escape_sequence('~\" + (char)c + \"')\");\n// }\n else if (curChar == '\\\\') // ISO prolog\n {\n c = m_lnReader.read();\n if (c == '\\\\') {\n sbTerm.append((char) c);//String.valueOf((char)c);\n } else if (NUMBER_CHARS.indexOf(c) > -1) {\n String strNum = \"\" + (char) c;\n // legge i prossimi numeri\n int d1 = m_lnReader.read();\n while (NUMBER_CHARS.indexOf(d1) > -1) {\n strNum += \"\" + (char) d1;\n d1 = m_lnReader.read();\n }\n\n // legge il prossimo byte\n if (d1 != '\\\\') // ISO def\n m_lnReader.unread(d1);\n// m_lnReader.pushback();\n\n try {\n BigInteger bival = new BigInteger(strNum, 8);\n\n byte val = bival.byteValue();// Byte.parseByte(strNum);\n sbTerm.append((char) val);\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strNum + \"')\");\n }\n\n } else// if(c >= 'a')\n {\n switch (c) {\n case 'a': // \\a bell\n sbTerm.append((char) (7));\n break;\n\n case 'b': // \\b backspace\n sbTerm.append((char) (8));\n break;\n\n case 'c': // \\c empty\n //sbTerm.append( (char)(8);\n break;\n\n case 'd': // \\d delete\n sbTerm.append((char) (127));\n break;\n\n case 'e': // \\e escape\n sbTerm.append((char) (27));\n break;\n\n case 'f': // \\f form feed\n sbTerm.append((char) (12));\n break;\n\n case 'n': // \\n line feed\n sbTerm.append((char) (10));\n break;\n\n case 'r': // \\r carriage return\n sbTerm.append((char) (13));\n break;\n\n case 's': // \\s space\n sbTerm.append((char) (32));\n break;\n\n case 't': // \\t tab\n sbTerm.append((char) (9));\n break;\n\n case 'v': // \\v vtab\n sbTerm.append((char) (11));\n break;\n\n case 'x': // \\xHX\n // legge il prossimo byte\n int d1 = m_lnReader.read();\n // legge il prossimo byte\n int d2 = m_lnReader.read();\n String strHexNum = (char) d1 + \"\" + (char) d2;\n\n try {\n byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n sbTerm.append((char) (val[0]));\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strHexNum + \"')\");\n }\n\n // legge il prossimo byte\n d2 = m_lnReader.read();\n if (d2 != '\\\\') // ISO def\n m_lnReader.unread(d2);\n// m_lnReader.pushback();\n break;\n\n case '\\r':\n case '\\n':\n break;\n\n default: // ignora \\\n sbTerm.append((char) (c));\n }\n }\n// else\n// throw syntaxError(\"bad_escape_sequence('\\\\\" + (char)c + \"')\");\n } else {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n }\n break;\n\n// case STATE_DOUBLEQUOTE:\n// if(curChar == DOUBLEQUOTE_CHAR)\n// {\n// sbTerm.append( (char)curChar;\n// nTokenType = TOKEN_DBLQUOTE;\n// nState = STATE_END;\n// }\n// else if(curChar == '\\r' || curChar == '\\n')\n// {\n// throw syntaxError(\"carriage_return_in_string\");\n// }\n// else if(curChar == '~') // edimburgh prolog\n// {\n// c = m_lnReader.read();\n// if(c == '~')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c == '\"')\n// {\n// m_lnReader.pushback();\n// //sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else if(c > '@')\n// {\n// sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else\n// throw syntaxError(\"bad_escape_sequence('~\" + (char)c + \"')\");\n// }\n// else if(curChar == '\\\\') // ISO prolog\n// {\n// c = m_lnReader.read();\n// if(c == '\\\\')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c >= 'a')\n// {\n// switch(c)\n// {\n// case 'a': // \\a bell\n// sbTerm.append( (char)(7);\n// break;\n//\n// case 'b': // \\b backspace\n// sbTerm.append( (char)(8);\n// break;\n//\n// case 'd': // \\d delete\n// sbTerm.append( (char)(127));\n// break;\n//\n// case 'e': // \\e escape\n// sbTerm.append( (char)(27));\n// break;\n//\n// case 'f': // \\f form feed\n// sbTerm.append( (char)(12);\n// break;\n//\n// case 'n': // \\n line feed\n// sbTerm.append( (char)(10);\n// break;\n//\n// case 'r': // \\r carriage return\n// sbTerm.append( (char)(13);\n// break;\n//\n// case 't': // \\t tab\n// sbTerm.append( (char)(9);\n// break;\n//\n// case 'v': // \\v vtab\n// sbTerm.append( (char)(11);\n// break;\n//\n// case 'x': // \\xHX\n// // legge il prossimo byte\n// int d1 = m_lnReader.read();\n// // legge il prossimo byte\n// int d2 = m_lnReader.read();\n// try\n// {\n// String strHexNum = (char)d1 + \"\" + (char)d2;\n//\n// byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n// sbTerm.append( (char)(val[0]);\n// }\n// catch(NumberFormatException ex)\n// {\n// throw syntaxError(\"bad_escape_sequence('\\\\x')\");\n// }\n//\n// // legge il prossimo byte\n// d2 = m_lnReader.read();\n// if(d2 != '\\\\') // ISO def\n// m_lnReader.pushback();\n// break;\n//\n// default: // ignora \\\n// sbTerm.append( (char)(c);\n// }\n// }\n// }\n// else\n// {\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// }\n// break;\n }\n }\n }\n\n if (sbTerm.length() > 0) {\n Token tok = new Token();\n tok.m_strToken = sbTerm.toString();\n tok.m_nType = nTokenType;\n// if(strTerm.equals(\".\"))\n// tok.m_nType = TOKEN_DOT;\n// else\n// tok.m_nType = nTokenType;\n\n return tok;\n } else {\n return null;\n }\n }", "private Token nextToken() {\n Token token = scanner.nextToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "public Token getNextToken() {\r\n \r\n // if no next token, abort\r\n if (!this.hasNextToken()) return null;\r\n \r\n // get the current character\r\n char c = this.stream.peek();\r\n \r\n // comment\r\n if (c==this.charComment) {\r\n // read the line and return the token\r\n this.current = new Token(this.getUntilMeetChar('\\n'));\r\n return this.current;\r\n }\r\n \r\n // !\r\n if (c==this.charSize) {\r\n this.stream.next(); // consume the character\r\n this.current = new Token(String.valueOf(this.charSize)); // and build the token\r\n return this.current;\r\n }\r\n \r\n // else\r\n this.current = new Token(this.getUntilMeetChar(this.charSeparator)); // extract until a charSeparator is met\r\n return this.current;\r\n \r\n }", "public String getNextToken() {\n return nextToken;\n }", "public String getNextToken() {\n return nextToken;\n }", "public char getNextToken(){\n\t\treturn token;\n\t}", "private void getNextToken() throws IOException {\n if (tok.ttype==LexAnn.TT_EOL) {\n if (code.getCurLine() < maxLine) {\n code.setCurLine(code.getCurLine()+1);\n tok.setString(code.getLine());\n tok.nextToken();\n } else {\n tok.ttype=LexAnn.TT_EOF; //the only place this gets set\n }\n } else {\n tok.nextToken();\n }\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "final public Token getNextToken() {\r\n if (token.next != null) token = token.next;\r\n else token = token.next = token_source.getNextToken();\r\n jj_ntk = -1;\r\n return token;\r\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n return token;\n }", "private ELOperandToken getNextToken() {\r\n \t\tswitch (fState) {\r\n \t\tcase STATE_INITIAL: // Just started\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_VAR: // Variable name is read - expecting a separator \r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_METHOD: // Method name and parameters are read - expecting a separator\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_SEPARATOR: // Separator is read - expecting a var or method\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\t}\r\n \t\treturn ELOperandToken.EOF;\r\n \t}", "public Token next() {\n \tcurrent = peek;\n \tpeek = extractToken();\n \treturn current;\n }", "public Token peek() throws IOException {\n\t\t// advance token only if its been reset by getToken()\n\t\tif (nextToken == null)\n\t\t\tnextToken = getToken();\n\n\t\treturn nextToken;\n\t}", "public Token nextToken() {\n\t\tif (token != null && token.getType() == TokenType.EOF) {\n\t\t\tthrow new LexerException(\n\t\t\t\t\t\"The end of file. No next token to generate.\");\n\t\t}\n\n\t\ttry {\n\t\t\tif (state == LexerState.BASIC) {\n\t\t\t\tbasicNext();\n\t\t\t} else {\n\t\t\t\textendedNext();\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tString message = \"\";\n\t\t\twhile (currentIndex > start) {\n\t\t\t\tmessage += data[start++];\n\t\t\t}\n\n\t\t\tthrow new LexerException(\"Error in token! \" + message\n\t\t\t\t\t+ \" that ends at \" + (currentIndex - 1));\n\t\t} catch (Exception e) {\n\t\t\tString message = \"\";\n\t\t\twhile (currentIndex > start) {\n\t\t\t\tmessage += data[start++];\n\t\t\t}\n\n\t\t\tthrow new LexerException(\"Error in generating \" + \"next token! \"\n\t\t\t\t\t+ message + \" that ends at \" + (currentIndex - 1) + \"\\n\"\n\t\t\t\t\t+ e.getMessage());\n\n\t\t}\n\t\t// System.out.println(token.getType());\n\t\treturn token;\n\n\t}", "Token peek();", "public Token nextToken() {\r\n\t\treturn tokens.get(nextTokenPos++);\r\n\t}", "final public Token getNextToken() {\n if (token.next != null) {\n token = token.next;\n } else {\n token = token.next = token_source.getNextToken();\n }\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "private boolean getNextToken() throws IOException {\n if (jackTokenizer.hasMoreTokens()) {\n jackTokenizer.advance();\n currTokenType = jackTokenizer.tokenType();\n if (currTokenType.equals(JackTokenizer.IDENTIFIER_TOKEN_TYPE)) {\n currentToken = jackTokenizer.identifier();\n\n } else if (currTokenType.equals(JackTokenizer.INT_CONST_TOKEN_TYPE)) {\n currentToken = String.valueOf(jackTokenizer.intVal());\n\n } else if (currTokenType.equals(JackTokenizer.KEYWORD_TOKEN_TYPE)) {\n currentToken = jackTokenizer.keyWord();\n\n } else if (currTokenType.equals(JackTokenizer.STRING_CONST_TOKEN_TYPE)) {\n currentToken = jackTokenizer.stringVal();\n\n } else if (currTokenType.equals(JackTokenizer.SYMBOL_TOKEN_TYPE)) {\n currentToken = String.valueOf(jackTokenizer.currentSymbol());\n\n } else {\n return false;\n\n }\n return true;\n }\n return false;\n }", "final public Token getNextToken() {\r\n if (token.next != null) token = token.next;\r\n else token = token.next = token_source.getNextToken();\r\n jj_ntk = -1;\r\n jj_gen++;\r\n return token;\r\n }", "final public Token getNextToken() {\r\n if (token.next != null) token = token.next;\r\n else token = token.next = token_source.getNextToken();\r\n jj_ntk = -1;\r\n jj_gen++;\r\n return token;\r\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "final public Token getNextToken() {\n\t if (token.next != null) token = token.next;\n\t else token = token.next = token_source.getNextToken();\n\t jj_ntk = -1;\n\t jj_gen++;\n\t return token;\n }", "final public Token getNextToken() {\n\t if (token.next != null) token = token.next;\n\t else token = token.next = token_source.getNextToken();\n\t jj_ntk = -1;\n\t jj_gen++;\n\t return token;\n }", "TokenReader reader(TokenType tokenType);", "static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }", "private String readToken( PushbackInputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n stream.unread( c );\n done = true;\n break;\n case ' ':\n case '\\t':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "public Token nextToken ()\n throws ParseException\n {\n return getNextToken();\n }", "@Override\n public Token next() throws IOException {\n\n if (hasNext()) {\n String next = splits.get(current++);\n if (isString(next)) {\n return new StringToken(next.substring(1, next.length() - 1));\n }\n if (isNumber(next)) {\n return new NumberToken(Double.parseDouble(next));\n }\n if (isSymbol(next)) {\n return new SymbolToken(next.charAt(0));\n }\n if (isName(next)) {\n return new NameToken(next);\n }\n throw new IOException(\"Invalid input.\");\n }\n\n return null;\n }", "protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }", "static final public Token getNextToken() {\n if (token.next != null) {\n token = token.next;\n } else {\n token = token.next = token_source.getNextToken();\n }\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "static final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "static final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "static final public Token getNextToken() {\n if (token.next != null) token = token.next;\n else token = token.next = token_source.getNextToken();\n jj_ntk = -1;\n jj_gen++;\n return token;\n }", "public token next_token() throws IOException, DasmError {\n token_line_num = line_num;\n\n for (;;)\n switch (nextChar) {\n case ';': // a comment\n case '\\n':\n // return single SEP token (skip multiple newlines\n // interspersed with whitespace or comments)\n skipEmptyLines();\n token_line_num = line_num;\n return new token(sym.SEP);\n\n case ' ':\n case '\\t':\n case '\\r':\n case ',': // whitespace\n readNextChar();\n break;\n\n case -1: // EOF token\n char_num = -1;\n return new token(sym.EOF);\n\n case '=': // EQUALS token\n readNextChar();\n return new token(sym.EQ);\n\n case ':': // COLON token\n readNextChar();\n return new token(sym.COLON);\n\n case '-':\n case '+':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '.': // a number\n {\n return readNumber();\n }\n\n case '\"': // quoted string\n {\n return readQuotedString();\n }\n\n case '{': // list of registers\n {\n return readRegList();\n }\n\n case '\\'': // quotation for overloading reserved words\n return readQuotedReservedWord();\n\n default: {\n // read up until a separatorcharacter\n boolean only_name = false;\n\n charBuf.reset();\n do {\n char chval = (char) nextChar;\n if (nextChar == '\\\\') {\n chval = nameEscape();\n only_name = true;\n }\n charBuf.add(chval);\n readNextChar();\n } while (!isSeparator(nextChar));\n\n String str = charBuf.toString();\n\n if (!only_name) {\n token tok;\n\n // keyword or directive?\n if ((tok = ReservedWords.get(str)) != null) return tok;\n\n // VM instruction?\n if (DopInfo.contains(str))\n return new str_token(sym.Insn, str);\n\n if (str.charAt(0) == '$') {\n String s = str.substring(1);\n Object v;\n int n = 10;\n boolean neg = false;\n switch (s.charAt(0)) {\n default:\n break;\n\n case '-':\n neg = true;\n case '+':\n s = s.substring(1);\n if (s.startsWith(\"0x\")) {\n n = 16;\n s = s.substring(2);\n }\n try {\n n = Integer.parseInt(s, n);\n } catch (NumberFormatException e) {\n throw new DasmError(\n \"Bad relative offset number\");\n }\n if (neg) n = -n;\n return new relative_number_token(sym.Relative, n);\n }\n // Do variable substitution\n if ((v = dict.get(s)) != null) return (token) v;\n } // not begin from '$'\n } // !only_name\n // Unrecognized string token (e.g. a classname)\n return new str_token(sym.Word, str);\n }\n }\n }", "public static void getNextToken() {\n if (currPos < tokens.size()) {\n currToken = tokens.get(currPos);\n //TODO del \n // System.out.println(currToken);\n currPos++;\n } else {\n// System.out.println(\"end of tokens reached\");\n currToken = new Token(Token.UNRECOGNIZED);\n }\n }", "protected Word getNext()\n/* */ {\n/* 63 */ Word token = null;\n/* 64 */ if (this.lexer == null) {\n/* 65 */ return token;\n/* */ }\n/* */ try {\n/* 68 */ token = this.lexer.next();\n/* 69 */ while (token == WhitespaceLexer.crValue) {\n/* 70 */ if (this.eolIsSignificant) {\n/* 71 */ return token;\n/* */ }\n/* 73 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 79 */ return token;\n/* */ }", "public static Token getNextToken() \n{\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n try { input_stream.backup(0);\n while (curChar <= 32 && (0x100002200L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 6)\n {\n jjmatchedKind = 6;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "private Token nextTokenWithWhites() throws IOException {\n\t\tString lexemaActual = \"\";\n\t\t// Si hay lexemas en el buffer, leemos de ahi\n\t\tif (!bufferLocal.esVacia()) {\n\t\t\treturn bufferLocal.extraer();\n\t\t} else {\n\t\t\t// Si no, leemos del Stream\t\t\t\t\t\n\t\t\tint lexema = tokens.nextToken();\n\t\t\tswitch (lexema) {\n\t\t\t\tcase StreamTokenizer.TT_WORD: \n\t\t\t\t\tlexemaActual = tokens.sval; \n\t\t\t\t\tbreak;\n\t\t\t\tcase StreamTokenizer.TT_EOF:\n\t\t\t\t\tlexemaActual = \"fin\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlexemaActual = String.valueOf((char)tokens.ttype);\n\t\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t\t// Sumamos una linea en caso de haber salto de linea\n\t\t\tif (lexemaActual.equals(\"\\n\")) \n\t\t\t\tnumeroLinea++;\t\t\t\n\t\t}\n\t\treturn new Token(lexemaActual,this.numeroLinea);\n\t}", "protected Word getNext()\n/* */ {\n/* 58 */ Word token = null;\n/* 59 */ if (this.lexer == null) {\n/* 60 */ return token;\n/* */ }\n/* */ try {\n/* 63 */ token = this.lexer.next();\n/* 64 */ while (token == ArabicLexer.crValue) {\n/* 65 */ if (this.eolIsSignificant) {\n/* 66 */ return token;\n/* */ }\n/* 68 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 74 */ return token;\n/* */ }", "private void basicNext() {\n\t\t// start = currentIndex;\n\t\tif (currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t} else {\n\t\t\tcreateBasicToken();\n\t\t}\n\t}", "public Token getNextToken() throws IOException {\n\t\t\n\t\tToken palabra = this.nextToken();\n\t\t// Comprobamos si es un caso especial\n\t\tpalabra = casoEspecial(palabra);\n\t\tpalabra.setCatLexica(reconoceCategoria(palabra.get_lexema()));\n\t\t \n\t\tlistaTokens.add(palabra);\n\t\treturn palabra;\t\n\t}", "public String next()\r\n\t{\r\n\t\tif(st == null || !st.hasMoreTokens())\r\n\t\t\tnewst();\r\n\t\treturn st.nextToken();\r\n\t}", "final public Token getNextToken() {\n if ((token = jj_nt).next != null) jj_nt = jj_nt.next;\n else jj_nt = jj_nt.next = token_source.getNextToken();\n jj_gen++;\n return token;\n }", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "public Token getNextToken() {\n\t\tToken token = null;\n\t\twhile (index < text.length() && token == null) {\n\t\t\tchar ch = text.charAt(index);\n\t\t\tif (isLetter(ch)) {\n\t\t\t\ttoken = readNameOrKeyword();\n\t\t\t}\n\t\t\telse if (isDigit(ch)) {\n\t\t\t\ttoken = readNumber();\n\t\t\t}\n\t\t\telse if (isOperator(ch)) {\n\t\t\t\ttoken = readOperator();\n\t\t\t}\n\t\t\telse if (ch == '\"') {\n\t\t\t\ttoken = readStringLiteral();\n\t\t\t}\n\t\t\telse if (this.isParenthesis(ch)) {\n\t\t\t\ttoken = new Token(TokenType.PARENTHESIS, \"\" + ch);\n\t\t\t}\n\t\t\telse if (this.isBracket(ch)) {\n\t\t\t\ttoken = new Token(TokenType.BRACKET, \"\" + ch);\n\t\t\t}\n\t\t\telse if (this.isBrace(ch)) {\n\t\t\t\ttoken = new Token(TokenType.BRACE, \"\" + ch);\n\t\t\t}\n\t\t\telse if (ch == ';') {\n\t\t\t\ttoken = new Token(TokenType.SEMICOLON, \"\" + ch);\n\t\t\t}\n\t\t\tindex += 1;\n\t\t}\n\t\treturn token;\n\t}", "Token readToken() throws SyntaxException;", "private Token nextRawToken() throws NoSuchElementException {\n\t\t// Location of the char after the current projected token.\n\t\tint sLoc = 0;\n\n\t\twhile (latestLine.trim().isEmpty()) {\n\t\t\tlatestLine = fileScanner.nextLine();\n\t\t}\n\n\t\t// Find the next end segment\n\t\twhile (latestLine.length() != sLoc + 1\n\t\t\t\t&& latestLine.charAt(sLoc + 1) != ' ') {\n\t\t\t// && getType(document.substring(0, sLoc + 1)) == TokenType.INVALID)\n\t\t\t// {\n\t\t\tsLoc++;\n\t\t}\n\n\t\t// End indices of the token, inclusive.\n\t\tint endTestToken = sLoc;\n\n\t\t/*\n\t\t * Determine the longest sub-token by starting from the end and working\n\t\t * backwards.\n\t\t */\n\t\tboolean valid = false;\n\t\tfor (int i = endTestToken; i >= 0; i--) {\n\t\t\tString testToken = latestLine.substring(0, i + 1);\n\t\t\tif (getType(testToken) != TokenType.INVALID) {\n\t\t\t\tsLoc = i;\n\t\t\t\tvalid = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!valid) {\n\t\t\tsLoc = 0;\n\t\t}\n\n\t\tString token = latestLine.substring(0, sLoc + 1);\n\n\t\tToken t = new Token(token, getType(token));\n\t\trunDiagnostic(t);\n\n\t\t// Consume the token form the document\n\t\tlatestLine = latestLine.substring(sLoc + 1).trim();\n\n\t\treturn t;\n\t}", "public String next() {\n try {\n String result = fNextLine;\n if (fNextLine != null) {\n fNextLine = fIn.readLine();\n if (fNextLine == null) {\n fIn.close();\n }\n }\n\n return result;\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "BsonToken nextToken() throws IOException;", "public Token nextToken(){\n if(currentToken+1 >= tokens.size())\n return null; \n return tokens.get(++currentToken);\n }", "@Override\n public Token nextToken(\n PushbackReader r, int cin, Tokenizer t)\n throws IOException {\n\n int i = 0;\n charbuf[i++] = (char) cin;\n int c;\n do {\n c = r.read();\n if (c < 0) {\n c = cin;\n }\n checkBufLength(i);\n charbuf[i++] = (char) c;\n } while (c != cin);\n\n String sval = copyValueOf(charbuf, 0, i);\n return new Token(TT_QUOTED, sval, 0);\n }", "public static Token getNextToken()\n{\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 8)\n {\n jjmatchedKind = 8;\n }\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 8)\n {\n jjmatchedKind = 8;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n TokenLexicalActions(matchedToken);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else\n {\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n}", "public Token nextToken() throws LexerException { \n \n trimWhitespaces();\n \n if(currentIndex > dataLength) {\n throw new LexerException(\"No more tokens! EOF!\");\n }\n \n if(currentIndex == dataLength) {\n token = new Token(TokenType.EOF, null);\n currentIndex++;\n return token;\n } \n \n if(data[currentIndex] == '#') {\n token = new Token(TokenType.SYMBOL, data[currentIndex]);\n \n currentIndex++;\n stringToken = new StringBuilder();\n \n return token;\n }\n \n if(state == LexerState.BASIC) {\n return nextTokenBasic();\n }\n return nextTokenExtended();\n }", "public static Token getNextToken() {\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop:\n for (; ; ) {\n try {\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e) {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n\n for (; ; ) {\n switch (curLexState) {\n case 0:\n try {\n input_stream.backup(0);\n while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n } catch (java.io.IOException e1) {\n continue EOFLoop;\n }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 10) {\n jjmatchedKind = 10;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff) {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n matchedToken = jjFillToken();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n } catch (java.io.IOException e1) {\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try {\n input_stream.readChar();\n input_stream.backup(1);\n } catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n } else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n }", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "void readNextChar() throws ReaderException;", "private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }", "private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }", "@Override\n\tpublic Token nextToken() throws IOException, InputMismatchException {\n\n\t\tToken token;\n\t\tif (position.hasNext()) {\n\t\t\ttoken = position.next();\n\t\t}\n\t\telse {\n\t\t\ttoken = super.getToken();\n\t\t\tif (token != null) {\n\t\t\t\tposition.add(token);\n\t\t\t}\n\t\t}\n\t\treturn token;\n\t}", "public Token nextToken() {\n\t\t\n\t\t//if the method nextToken() is called and the last token\n\t\t//before that was EOF, then this method will throw LexerException.\n\t\tif(token != null && token.type == TokenType.EOF) {\n\t\t\tthrow new LexerException(\"There are no more tokens afeter EOF.\");\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tskipBlankSpaces();\n\t\t\n\t\tif(currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t\treturn token;\n\t\t}\n\t\t\n\t\tif(state == LexerState.BASIC) {\n\t\t\t//checking if it is a word\n\t\t\tif(Character.isLetter(data[currentIndex]) || data[currentIndex] == '\\\\') {\n\t\t\t\ttoken = basicNextWordToken();\n\t\t\t\treturn token;\n\t\t\t}\n\t\t\t\n\t\t\t//checking if it is a number\n\t\t\tif(data[currentIndex] >= '1' && data[currentIndex] <= '9') {\t\n\t\t\t\ttry {\n\t\t\t\t\ttoken = basicNextNumberToken();\n\t\t\t\t\treturn token;\n\t\t\t\t\t\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tthrow new LexerException(\"The number could not be parsed to long!\");\t\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//it is in the EXTENDED state\n\t\t\tif(data[currentIndex] != '#') {\n\t\t\t\ttoken = extendedNextWordToken();\n\t\t\t\treturn token;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if it is not a word or a number then it is a symbol.\n\t\t\n\t\ttoken = new Token(TokenType.SYMBOL, data[currentIndex]);\n\t\tcurrentIndex++;\n\t\t\n\t\treturn token;\n\t}", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n try { input_stream.backup(0);\n while (curChar <= 12 && (0x1000L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n TokenLexicalActions(matchedToken);\n return matchedToken;\n }\n else\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n continue EOFLoop;\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n}", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedPos == 0 && jjmatchedKind > 121)\n {\n jjmatchedKind = 121;\n }\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 9)\n {\n jjmatchedKind = 9;\n }\n break;\n case 3:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_3();\n if (jjmatchedPos == 0 && jjmatchedKind > 9)\n {\n jjmatchedKind = 9;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n TokenLexicalActions(matchedToken);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n MoreLexicalActions();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "public Token nextToken() {\n if (currentIndex == this.data.length) {\n this.token = new Token(TokenType.EOF, null);\n currentIndex++;\n return this.token;\n }\n\n if (currentIndex > this.data.length) {\n throw new LexerException(\"There aren't any more tokens to be generated\");\n }\n\n char currChar = data[currentIndex];\n\n if (currChar == '{') {\n if (data[currentIndex + 1] == '$') {\n currentIndex += 2;\n this.state = LexerState.TAG_NAME;\n this.token = new Token(TokenType.OPEN_TAG, \"{$\");\n } else {\n throw new LexerException(\"Expected $, but didn't find it\");\n }\n } else if (this.state == LexerState.TAG_NAME) {\n this.token = getTagName();\n this.state = LexerState.TAG_ELEMENTS;\n } else if (this.state == LexerState.TAG_ELEMENTS) {\n this.token = getTagElement();\n } else if (this.state == LexerState.TEXT) {\n this.token = getNextText();\n }\n\n\n return this.token;\n }", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedPos == 0 && jjmatchedKind > 204)\n {\n jjmatchedKind = 204;\n }\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n case 3:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_3();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n MoreLexicalActions();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "public Token peek() {\r\n\t\treturn tokens.get(nextTokenPos);\r\n\t}", "public Token nextToken() throws ScanErrorException\n {\n skipWhiteSpace();\n if (eof) \n return new Token(\"eof\", \"eof\");\n else if (isDigit(currentChar))\n return new Token(scanNumber(), \"number\");\n else if (isLetter(currentChar))\n {\n return Token.verifyKeywordLexeme(scanIdentifier());\n }\n else if (isArithmeticOperand(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"arithmetic_operand\");\n }\n else if (isParentheses(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"parentheses\");\n }\n else if(currentChar == '<' || currentChar == '>' || currentChar == '=')\n {\n String result = \"\";\n result += currentChar;\n if(currentChar == '=')\n eat(currentChar);\n else if(currentChar == '>')\n {\n eat(currentChar);\n if(currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n else\n {\n eat(currentChar);\n if(currentChar == '>' || currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n\n return new Token(result, \"relational_operand\");\n }\n\n System.out.println(\"Error in reading token. Char <\" + currentChar \n + \"> not part of regular language.\");\n eat(currentChar);\n return null;\n }", "private void updateToken() throws IOException\n\t{\n\t\ttheCurrentToken = theNextToken;\n\t\ttheNextToken = theScanner.GetToken();\n\t}", "Object nextValue() throws IOException;", "public Token peekToken() {\r\n return this.current;\r\n }", "private void consumeToken() {\n\t\tToken token = lexAnalyser.nextToken();\n\t\tlogMessage(functionStack.peekFirst() + \" consumed \" + token.getType()\n\t\t\t\t+ \": <lexeme>\" + token.getLexeme() + \"</lexeme>\");\n\t\tpeekToken = lexAnalyser.peekToken();\n\t}", "private Token nextToken() throws ParseException {\n String str;\n int line;\n int column;\n\n try {\n lastMatch.clear();\n stringDfaMatcher.match(buffer, lastMatch);\n nfaMatcher.match(buffer, lastMatch);\n regExpMatcher.match(buffer, lastMatch);\n if (lastMatch.length() > 0) {\n line = buffer.lineNumber();\n column = buffer.columnNumber();\n str = buffer.read(lastMatch.length());\n return newToken(lastMatch.pattern(), str, line, column);\n } else if (buffer.peek(0) < 0) {\n return null;\n } else {\n line = buffer.lineNumber();\n column = buffer.columnNumber();\n throw new ParseException(ParseException.UNEXPECTED_CHAR_ERROR,\n buffer.read(1),\n line,\n column);\n }\n } catch (IOException e) {\n throw new ParseException(ParseException.IO_ERROR,\n e.getMessage(),\n -1,\n -1);\n }\n }", "public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {\n java_cup.runtime.Symbol s = next_token();\n System.out.println( \"line:\" + (yyline+1) + \" col:\" + (yycolumn+1) + \" --\"+ yytext() + \"--\" + getTokenName(s.sym) + \"--\");\n return s;\n }", "public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {\n java_cup.runtime.Symbol s = next_token();\n System.out.println( \"line:\" + (yyline+1) + \" col:\" + (yycolumn+1) + \" --\"+ yytext() + \"--\" + getTokenName(s.sym) + \"--\");\n return s;\n }", "public java_cup.runtime.Symbol debug_next_token() throws java.io.IOException {\n java_cup.runtime.Symbol s = next_token();\n System.out.println( \"line:\" + (yyline+1) + \" col:\" + (yycolumn+1) + \" --\"+ yytext() + \"--\" + getTokenName(s.sym) + \"--\");\n return s;\n }", "private void tokenEnd() {\n zzStartRead = tokenStartIndex;\n }", "public Token checkNextToken() throws IOException {\n\t\tToken token = this.getNextToken();\n\t\tthis.pushBack();\n\t\treturn token;\t\n\t}", "public String popCurrentToken() throws IOException, DataFormatException {\n String token = this.currentToken;\n advance();\n return token;\n }", "@Override\n\tprotected Token findNextToken() {\n\t\tLocatedChar ch = nextNonWhitespaceChar();\n\t\tif(isCommentStart(ch)) {\n\t\t\tscanComment(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t\tif(ch.isDigit()) {\n\t\t\treturn scanNumber(ch);\n\t\t}\n\t\telse if(isIdentifierStart(ch)) {\n\t\t\treturn scanIdentifier(ch);\n\t\t}\n\t\telse if(isPunctuatorStart(ch)) {\n\t\t\treturn PunctuatorScanner.scan(ch, input);\n\t\t}\n\t\telse if(isCharStart(ch)) {\n\t\t\treturn scanChar(ch);\n\t\t}\n\t\telse if(isStrStart(ch)) {\n\t\t\treturn scanString(ch);\n\t\t}\n\t\telse if(isEndOfInput(ch)) {\n\t\t\treturn NullToken.make(ch);\n\t\t}\n\t\telse {\n\t\t\tlexicalError(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t}", "private Token peek() {\n return tokens.get(current);\n }", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "public Token next()\n\t{\n\t\tint munchSize = 0;\n\t\tStringBuilder buffer = new StringBuilder();\n\n\t\t// iterate until we either:\n\t\t//\t1. Match a token in any state but MANY_STATE\n\t\t//\t2. Whitespace, newline or EOF\n\t\tboolean was_good = false, can_continue = true;\n\t\tToken to_return = Token.generateToken(lineNum, charPos, \"EOF\", Token.Kind.EOF);\n\n\t\t// skip any initial white space.\n\t\twhile (readChar() == -1) { }\n\t\tthis.lastChar = this.nextChar;\n\t\twhile (can_continue && readChar() > -1) {\n\t\t\tchar next = (char)this.nextChar;\n\t\t\tint pos = (charPos - (buffer.length() + 1));\n\t\t\tswitch (munchSize) {\n\t\t\t\tcase EMPTY_STATE:\n\t\t\t\t\t// Search for all tokens of one token. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getSingleCharacterMap(), String.valueOf(next), 0)) {\n\t\t\t\t\t\t// We can transition.\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getSingleCharacterMap());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// error.\n\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SINGLE_STATE:\n\t\t\t\t\t// Search for all tokens of two tokens. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getDoubleCharTokens(), buffer.toString() + next, 1)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getDoubleCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\n\t\t\t\t\t\t// is this a comment?\n\t\t\t\t\t\tif (to_return.is(Token.Kind.COMMENT)) {\n\t\t\t\t\t\t\t// restart parse.\n\t\t\t\t\t\t\tthis.on_comment = true;\n\t\t\t\t\t\t\tmunchSize = 0;\n\t\t\t\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tcan_continue = true;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"EOF\", Token.Kind.EOF);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\tif (!was_good) {\n\t\t\t\t\t\t\t// error.\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOUBLE_STATE:\n\t\t\t\t\t// Search for multiple character states and keywords.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getMultiCharTokens(), buffer.toString() + next, 2)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getMultiCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // MANY_STATE\n\t\t\t\t\tif (Token.isValidLexeme(Token.getKeywords(), buffer.toString() + next, munchSize)) {\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(), Token.getKeywords());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn to_return;\n\t}", "public Token nextToken() {\n\t\t\t// if something in queue, just remove and return it\n\t\t\tif ( tokens.size()>0 ) {\n\t\t\t\tToken t = (Token)tokens.firstElement();\n\t\t\t\ttokens.removeElementAt(0);\n\t\t\t\t// System.out.println(t);\n\t\t\t\treturn t;\n\t\t\t}\n\n\t\t\tinsertImaginaryIndentDedentTokens();\n\n\t\t\treturn nextToken();\n\t\t}", "abstract protected void parseNextToken();", "private Token peekToken(int index) {\n return scanner.peekToken(index);\n }" ]
[ "0.7577117", "0.75209093", "0.7224696", "0.7193446", "0.7165451", "0.7047538", "0.7010796", "0.6891776", "0.6879177", "0.68589807", "0.6812332", "0.6812332", "0.6812332", "0.6812332", "0.68057597", "0.6798045", "0.6773842", "0.6758089", "0.674603", "0.6737948", "0.67363733", "0.6731477", "0.6704244", "0.66964316", "0.6694961", "0.6694961", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6693743", "0.6686148", "0.6686148", "0.6649415", "0.6644059", "0.6635206", "0.66029847", "0.65803045", "0.6566101", "0.6556007", "0.654485", "0.654485", "0.654485", "0.652563", "0.65187025", "0.6515712", "0.64870626", "0.6484795", "0.64540166", "0.64482325", "0.6444341", "0.64416337", "0.6420488", "0.6419512", "0.6396221", "0.6394905", "0.63884807", "0.63615525", "0.63338405", "0.6329124", "0.6321706", "0.6310159", "0.6294557", "0.6293562", "0.62755173", "0.62112087", "0.62065953", "0.6183003", "0.6174028", "0.6169929", "0.6160879", "0.61560774", "0.61364263", "0.6130922", "0.6125247", "0.61132234", "0.6111944", "0.6108424", "0.61028576", "0.6102332", "0.6102071", "0.60982823", "0.60982823", "0.60982823", "0.605134", "0.604545", "0.6045315", "0.6039826", "0.60301286", "0.6017161", "0.5998478", "0.5995472", "0.5987049", "0.5981128" ]
0.63390595
64
Reads all remaining token from this input stream and returns them as array of strings
public String[] readAllStrings(){ String[] tokens=WHITESPACE_PATTERN.split(readAll()); if (tokens.length==0||tokens[0].length()>0) return tokens; String[] decapitokens=new String[tokens.length-1]; for (int i=0;i<tokens.length-1;i++){ decapitokens[i]=tokens[i+1]; } return decapitokens; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] readNext() {\n\t\treturn null;\n\t}", "public static String[] readAllStrings() {\n // we could use readAll.trim().split(), but that's not consistent\n // because trim() uses characters 0x00..0x20 as whitespace\n String[] tokens = WHITESPACE_PATTERN.split(readAll());\n if (tokens.length == 0 || tokens[0].length() > 0)\n return tokens;\n\n // don't include first token if it is leading whitespace\n String[] decapitokens = new String[tokens.length-1];\n for (int i = 0; i < tokens.length - 1; i++)\n decapitokens[i] = tokens[i+1];\n return decapitokens;\n }", "private String readToken( PushbackInputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n stream.unread( c );\n done = true;\n break;\n case ' ':\n case '\\t':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "public static String[] readStrings() {\n return readAllStrings();\n }", "public String[] nextVariableList() throws IOException {\n List<String> l = new ArrayList<String>();\n int tt;\n tt = tok.nextToken();\n //System.out.println(\"vList tok = \" + tok);\n if (tt == '(' || tt == '{') {\n logger.debug(\"variable list\");\n tt = tok.nextToken();\n while (true) {\n if (tt == StreamTokenizer.TT_EOF)\n break;\n if (tt == ')' || tt == '}')\n break;\n if (tt == StreamTokenizer.TT_WORD) {\n //System.out.println(\"TT_WORD: \" + tok.sval);\n l.add(tok.sval);\n }\n tt = tok.nextToken();\n }\n }\n Object[] ol = l.toArray();\n String[] v = new String[ol.length];\n for (int i = 0; i < v.length; i++) {\n v[i] = (String) ol[i];\n }\n return v;\n }", "public static String readAll() {\n if (!scanner.hasNextLine())\n return \"\";\n\n String result = scanner.useDelimiter(EVERYTHING_PATTERN).next();\n // not that important to reset delimeter, since now scanner is empty\n scanner.useDelimiter(WHITESPACE_PATTERN); // but let's do it anyway\n return result;\n }", "List<String> getTokens();", "public String[] readAllLines(){\n\t\tArrayList<String> lines=new ArrayList<>();\n\t\twhile (hasNestLine())\n\t\t\tlines.add(readLine());\n\t\treturn lines.toArray(new String[lines.size()]);\n\t}", "List<Token> scanTokens() {\n\n while (!reachedEnd()) {\n\n start = current;\n scanToken();\n }\n\n tokens.add(new Token(EOF, \"\", null, line));\n return tokens;\n }", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "private String readAll(Reader rd) throws IOException {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint cp;\r\n\t\twhile ((cp = rd.read()) != -1) {\r\n\t\t\tsb.append((char) cp);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public List<Token> getNextObject() {\r\n List<Token> tokens = new ArrayList<>(); // first create the list\r\n \r\n // skip all comments\r\n this.skipComments();\r\n \r\n int line = this.currentline; // get line\r\n \r\n while (line==this.currentline) { // track if line change\r\n \r\n // if no tokens to extract, then we return the extracted tokens\r\n if (!this.hasNextToken()) return tokens;\r\n \r\n // if empty tokens are accepted\r\n if (this.isAcceptEmptyToken()) {\r\n tokens.add(this.getNextToken()); // then add the token without check\r\n \r\n // else, check if the token is empty or not\r\n } else {\r\n Token token = this.getNextToken();\r\n String data = token.getData();\r\n if (!data.isEmpty()) tokens.add(token); // if not empty, add the token\r\n }\r\n \r\n }\r\n \r\n return tokens;\r\n }", "private static String readAll(Reader rd) throws IOException {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t int cp;\n\t\t while ((cp = rd.read()) != -1) {\n\t\t sb.append((char) cp);\n\t\t }\n\t\t return sb.toString();\n\t\t }", "Token getNextToken() throws IOException, JIPSyntaxErrorException {\n StringBuilder sbTerm = new StringBuilder();\n int curChar = -1;\n int nState = STATE_NONE;\n int nTokenType = TOKEN_UNKNOWN;\n\n if (m_nextToken != null) {\n Token token = m_nextToken;\n m_nextToken = null;\n return token;\n }\n\n while (nState != STATE_END) {\n //m_lnReader.mark(2);\n //System.out.println(\"reading\");\n curChar = m_lnReader.read();\n\n //System.out.println(\"read \" + (char)curChar);\n //System.out.println(\"read \" + curChar);\n\n if (curChar == -1) // EOF\n {\n //System.out.println(\"EOF\");\n nState = STATE_END;\n// m_lnReader.pushback();\n } else {\n switch (nState) {\n case STATE_NONE:\n\n if ((curChar == LINECOMMENT_CHAR)) {\n nState = STATE_LINECOMMENT;\n } else if ((curChar == QUOTE_CHAR)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_QUOTE;\n } else if ((curChar == DOUBLEQUOTE_CHAR)) {\n sbTerm.append((char) curChar);\n nState = STATE_DOUBLEQUOTE;\n } else if ((LOWERCASE_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_ATOM;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_ATOM;\n } else if ((UPPERCASE_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_VARIABLE;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_VARIABLE;\n }\n// else if((SIGN_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_SIGN;\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// nTokenType = TOKEN_SIGN;\n// }\n else if ((SPECIAL_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_SPECIAL_ATOM;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_SPECIAL_ATOM;\n } else if ((NUMBER_CHARS.indexOf(curChar) > -1)) {\n nState = STATE_NUMBER;\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = TOKEN_NUMBER;\n } else if (curChar <= 0x20) // whitespace char\n //if((WHITESPACE_CHARS.indexOf(curChar) > -1))\n {\n //System.out.println(\"TOKEN_WHITESPACE\");\n nTokenType = TOKEN_WHITESPACE;\n nState = STATE_END;\n sbTerm = new StringBuilder(\" \");\n// strTerm = \" \";\n }\n// else if(curChar < 0x20) // whitespace char\n// //if((WHITESPACE_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_NONE;\n// }\n else if ((SINGLETON_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n\n int c = m_lnReader.read();\n if (c == -1) {\n //System.out.println(\"SINGLETON_CHARS EOF\");\n\n nState = STATE_END;\n// m_lnReader.pushback();\n } else {\n if (c == '>' && sbTerm.charAt(sbTerm.length() - 1) == '!')\n// if((strTerm + (char)c).equals(\"!>\"))\n sbTerm.append((char) c);//String.valueOf((char)c);\n else\n m_lnReader.unread(c);\n }\n\n nTokenType = TOKEN_SINGLETON;\n nState = STATE_END;\n\n//// System.out.println(\"Singleton \" + strTerm);\n// nTokenType = TOKEN_SINGLETON;\n//// }\n\n// nState = STATE_END;\n } else {\n throw syntaxError(\"invalid_character('\" + (char) curChar + \"')\");\n }\n break;\n\n case STATE_ATOM:\n if ((UPPERCASE_CHARS.indexOf(curChar) > -1) ||\n (LOWERCASE_CHARS.indexOf(curChar) > -1) ||\n (NUMBER_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_ATOM;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n }\n break;\n\n case STATE_VARIABLE:\n if ((UPPERCASE_CHARS.indexOf(curChar) > -1) ||\n (LOWERCASE_CHARS.indexOf(curChar) > -1) ||\n (NUMBER_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_VARIABLE;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n }\n break;\n\n case STATE_SPECIAL_ATOM:\n char lastChar = sbTerm.charAt(sbTerm.length() - 1);\n if ((curChar == '!' && lastChar == '<') || (curChar == '>' && lastChar == '!'))\n// if((strTerm + (char)curChar).equals(\"<!\") || (strTerm + (char)curChar).equals(\"!>\"))\n {\n sbTerm.append((char) curChar);//String.valueOf((char)c);\n nTokenType = TOKEN_SPECIAL_ATOM;\n nState = STATE_END;\n } else if ((SPECIAL_CHARS.indexOf(curChar) > -1)) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n if (sbTerm.toString().equals(OPENCOMMENT_CHAR)) {\n nState = STATE_COMMENT;\n sbTerm = new StringBuilder(\"\");\n nTokenType = TOKEN_UNKNOWN;\n }\n } else {\n nTokenType = TOKEN_SPECIAL_ATOM;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n// case STATE_SIGN:\n// if((SPECIAL_CHARS.indexOf(curChar) > -1))\n// {\n// nState = STATE_SPECIAL_ATOM;\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// nTokenType = TOKEN_SPECIAL_ATOM;\n// }\n// else\n// {\n// nTokenType = TOKEN_SIGN;\n// nState = STATE_END;\n// m_lnReader.pushback();\n// }\n// break;\n\n case STATE_NUMBER:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else if (curChar == '.') {\n //m_lnReader.mark(2);\n int c = m_lnReader.read();\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n if (NUMBER_CHARS.indexOf(c) == -1) {\n m_nextToken = new Token();\n\n m_nextToken.m_strToken = \".\";\n m_nextToken.m_nType = TOKEN_SPECIAL_ATOM;//&&TOKEN_DOT;\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n } else {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_DECIMAL;\n }\n } else if (curChar == 'e' || curChar == 'E') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_EXPONENT;\n } else if (curChar == '\\'') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_ASCII;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'b') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_BINARY;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'o') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_OCTAL;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else if (curChar == 'x') {\n if (sbTerm.charAt(0) == '0')\n// if(strTerm.equals(\"0\"))\n nState = STATE_HEXADECIMAL;\n else\n throw syntaxError(\"invalid_character('''')\");// + (char)curChar + \"')\");\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_EXPONENT:\n if (curChar == '+' || curChar == '-') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_INTEGER;\n } else if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_INTEGER;\n } else {\n throw syntaxError(\"invalid_character('\" + (char) curChar + \"')\");\n }\n break;\n\n case STATE_DECIMAL:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else if (curChar == 'e' || curChar == 'E') {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nState = STATE_EXPONENT;\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_INTEGER:\n if (NUMBER_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_ASCII:\n if (curChar == '\\\\') {\n sbTerm = new StringBuilder();\n// strTerm = \"\";\n curChar = m_lnReader.read();\n switch (curChar) {\n case 'a': // \\a bell\n sbTerm.append(Integer.toString(7));\n break;\n\n case 'b': // \\b backspace\n sbTerm.append(Integer.toString(8));\n break;\n\n case 'd': // \\d delete\n sbTerm.append(Integer.toString(127));\n break;\n\n case 'e': // \\e escape\n sbTerm.append(Integer.toString(27));\n break;\n\n case 'f': // \\f form feed\n sbTerm.append(Integer.toString(12));\n break;\n\n case 'n': // \\n line feed\n sbTerm.append(Integer.toString(10));\n break;\n\n case 'r': // \\r carriage return\n sbTerm.append(Integer.toString(13));\n break;\n\n case 's': // \\s space\n sbTerm.append(Integer.toString(32));\n break;\n\n case 't': // \\t tab\n sbTerm.append(Integer.toString(9));\n break;\n\n case 'v': // \\v vtab\n sbTerm.append(Integer.toString(11));\n break;\n\n case 'x': // \\xHX\n // legge il prossimo byte\n int d1 = m_lnReader.read();\n // legge il prossimo byte\n int d2 = m_lnReader.read();\n String strHexNum = (char) d1 + \"\" + (char) d2;\n\n try {\n byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n sbTerm.append(Integer.toString(val[0]));\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strHexNum + \"')\");\n }\n\n // legge il prossimo byte\n d2 = m_lnReader.read();\n if (d2 != '\\\\') // ISO def\n m_lnReader.unread(d2);\n// m_lnReader.pushback();\n break;\n\n default: // ignora \\\n sbTerm.append(Integer.toString(curChar));\n }\n\n } else {\n sbTerm = new StringBuilder(Integer.toString(curChar));\n// strTerm = Integer.toString(curChar);\n }\n\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n break;\n\n case STATE_BINARY:\n if (NUMBER_BINARY_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 2));\n// strTerm = \"\" + Integer.parseInt(strTerm, 2);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_OCTAL:\n if (NUMBER_OCTAL_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 8));\n// strTerm = \"\" + Integer.parseInt(strTerm, 8);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_HEXADECIMAL:\n if (NUMBER_HEXADECIMAL_CHARS.indexOf(curChar) > -1) {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n } else {\n sbTerm = new StringBuilder().append(Integer.parseInt(sbTerm.toString(), 16));\n// strTerm = \"\" + Integer.parseInt(strTerm, 16);\n nTokenType = TOKEN_NUMBER;\n nState = STATE_END;\n m_lnReader.unread(curChar);\n// m_lnReader.pushback();\n }\n break;\n\n case STATE_LINECOMMENT:\n int c = curChar;\n do {\n if ((c == '\\r') || (c == '\\n'))\n break;\n\n c = m_lnReader.read();\n }\n while (c != -1);\n\n nState = STATE_NONE;\n break;\n\n case STATE_COMMENT: {\n c = curChar;\n int c1;\n do {\n c1 = c;\n c = m_lnReader.read();\n if ((c1 == '*') && (c == '/'))\n break;\n }\n while (c != -1);\n\n // torna allo stato iniziale\n nState = STATE_NONE;\n }\n break;\n\n case STATE_QUOTE:\n case STATE_DOUBLEQUOTE:\n// System.out.println(curChar);\n if (curChar == DOUBLEQUOTE_CHAR) {\n if (nState == STATE_DOUBLEQUOTE) {\n c = m_lnReader.read();\n if (c == DOUBLEQUOTE_CHAR) {\n sbTerm.append('\"');\n } else {\n // fine quoted atom\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = (nState == STATE_QUOTE) ? TOKEN_QUOTE : TOKEN_DBLQUOTE;\n nState = STATE_END;\n }\n } else {\n sbTerm.append((char) curChar);\n }\n } else if (curChar == QUOTE_CHAR) {\n if (nState == STATE_QUOTE) {\n c = m_lnReader.read();\n if (c == QUOTE_CHAR) {\n sbTerm.append('\\'');\n } else {\n // fine quoted atom\n m_lnReader.unread(c);\n// m_lnReader.pushback();\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n nTokenType = (nState == STATE_QUOTE) ? TOKEN_QUOTE : TOKEN_DBLQUOTE;\n nState = STATE_END;\n }\n } else {\n sbTerm.append((char) curChar);\n }\n } else if (nState == STATE_QUOTE && (curChar == '\\r' || curChar == '\\n')) {\n throw syntaxError(\"carriage_return_in_quoted_atom('\" + sbTerm.toString() + \"')\");\n }\n// else if(curChar == '~') // edimburgh prolog\n// {\n// c = m_lnReader.read();\n// if(c == '~')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c == '\\'')\n// {\n//// fine quoted atom\n// m_lnReader.pushback();\n// //sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else if(c >= '@')\n// {\n// sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n//\n// else\n// throw syntaxError(\"bad_escape_sequence('~\" + (char)c + \"')\");\n// }\n else if (curChar == '\\\\') // ISO prolog\n {\n c = m_lnReader.read();\n if (c == '\\\\') {\n sbTerm.append((char) c);//String.valueOf((char)c);\n } else if (NUMBER_CHARS.indexOf(c) > -1) {\n String strNum = \"\" + (char) c;\n // legge i prossimi numeri\n int d1 = m_lnReader.read();\n while (NUMBER_CHARS.indexOf(d1) > -1) {\n strNum += \"\" + (char) d1;\n d1 = m_lnReader.read();\n }\n\n // legge il prossimo byte\n if (d1 != '\\\\') // ISO def\n m_lnReader.unread(d1);\n// m_lnReader.pushback();\n\n try {\n BigInteger bival = new BigInteger(strNum, 8);\n\n byte val = bival.byteValue();// Byte.parseByte(strNum);\n sbTerm.append((char) val);\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strNum + \"')\");\n }\n\n } else// if(c >= 'a')\n {\n switch (c) {\n case 'a': // \\a bell\n sbTerm.append((char) (7));\n break;\n\n case 'b': // \\b backspace\n sbTerm.append((char) (8));\n break;\n\n case 'c': // \\c empty\n //sbTerm.append( (char)(8);\n break;\n\n case 'd': // \\d delete\n sbTerm.append((char) (127));\n break;\n\n case 'e': // \\e escape\n sbTerm.append((char) (27));\n break;\n\n case 'f': // \\f form feed\n sbTerm.append((char) (12));\n break;\n\n case 'n': // \\n line feed\n sbTerm.append((char) (10));\n break;\n\n case 'r': // \\r carriage return\n sbTerm.append((char) (13));\n break;\n\n case 's': // \\s space\n sbTerm.append((char) (32));\n break;\n\n case 't': // \\t tab\n sbTerm.append((char) (9));\n break;\n\n case 'v': // \\v vtab\n sbTerm.append((char) (11));\n break;\n\n case 'x': // \\xHX\n // legge il prossimo byte\n int d1 = m_lnReader.read();\n // legge il prossimo byte\n int d2 = m_lnReader.read();\n String strHexNum = (char) d1 + \"\" + (char) d2;\n\n try {\n byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n sbTerm.append((char) (val[0]));\n } catch (NumberFormatException ex) {\n throw syntaxError(\"bad_escape_sequence('\\\\x\" + strHexNum + \"')\");\n }\n\n // legge il prossimo byte\n d2 = m_lnReader.read();\n if (d2 != '\\\\') // ISO def\n m_lnReader.unread(d2);\n// m_lnReader.pushback();\n break;\n\n case '\\r':\n case '\\n':\n break;\n\n default: // ignora \\\n sbTerm.append((char) (c));\n }\n }\n// else\n// throw syntaxError(\"bad_escape_sequence('\\\\\" + (char)c + \"')\");\n } else {\n sbTerm.append((char) curChar);//String.valueOf((char)curChar);\n }\n break;\n\n// case STATE_DOUBLEQUOTE:\n// if(curChar == DOUBLEQUOTE_CHAR)\n// {\n// sbTerm.append( (char)curChar;\n// nTokenType = TOKEN_DBLQUOTE;\n// nState = STATE_END;\n// }\n// else if(curChar == '\\r' || curChar == '\\n')\n// {\n// throw syntaxError(\"carriage_return_in_string\");\n// }\n// else if(curChar == '~') // edimburgh prolog\n// {\n// c = m_lnReader.read();\n// if(c == '~')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c == '\"')\n// {\n// m_lnReader.pushback();\n// //sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else if(c > '@')\n// {\n// sbTerm.append( (char)(c - '@');//String.valueOf((char)c - '@');\n// }\n// else\n// throw syntaxError(\"bad_escape_sequence('~\" + (char)c + \"')\");\n// }\n// else if(curChar == '\\\\') // ISO prolog\n// {\n// c = m_lnReader.read();\n// if(c == '\\\\')\n// {\n// sbTerm.append( (char)c;//String.valueOf((char)c);\n// }\n// else if(c >= 'a')\n// {\n// switch(c)\n// {\n// case 'a': // \\a bell\n// sbTerm.append( (char)(7);\n// break;\n//\n// case 'b': // \\b backspace\n// sbTerm.append( (char)(8);\n// break;\n//\n// case 'd': // \\d delete\n// sbTerm.append( (char)(127));\n// break;\n//\n// case 'e': // \\e escape\n// sbTerm.append( (char)(27));\n// break;\n//\n// case 'f': // \\f form feed\n// sbTerm.append( (char)(12);\n// break;\n//\n// case 'n': // \\n line feed\n// sbTerm.append( (char)(10);\n// break;\n//\n// case 'r': // \\r carriage return\n// sbTerm.append( (char)(13);\n// break;\n//\n// case 't': // \\t tab\n// sbTerm.append( (char)(9);\n// break;\n//\n// case 'v': // \\v vtab\n// sbTerm.append( (char)(11);\n// break;\n//\n// case 'x': // \\xHX\n// // legge il prossimo byte\n// int d1 = m_lnReader.read();\n// // legge il prossimo byte\n// int d2 = m_lnReader.read();\n// try\n// {\n// String strHexNum = (char)d1 + \"\" + (char)d2;\n//\n// byte[] val = ValueEncoder.hexStringToBytes(strHexNum);\n// sbTerm.append( (char)(val[0]);\n// }\n// catch(NumberFormatException ex)\n// {\n// throw syntaxError(\"bad_escape_sequence('\\\\x')\");\n// }\n//\n// // legge il prossimo byte\n// d2 = m_lnReader.read();\n// if(d2 != '\\\\') // ISO def\n// m_lnReader.pushback();\n// break;\n//\n// default: // ignora \\\n// sbTerm.append( (char)(c);\n// }\n// }\n// }\n// else\n// {\n// sbTerm.append( (char)curChar;//String.valueOf((char)curChar);\n// }\n// break;\n }\n }\n }\n\n if (sbTerm.length() > 0) {\n Token tok = new Token();\n tok.m_strToken = sbTerm.toString();\n tok.m_nType = nTokenType;\n// if(strTerm.equals(\".\"))\n// tok.m_nType = TOKEN_DOT;\n// else\n// tok.m_nType = nTokenType;\n\n return tok;\n } else {\n return null;\n }\n }", "private static String[] collectInput() {\n\t\tString command = sc.next();\n\t\tString i = sc.next();\n\t\tString destination = sc.next();\n\t\treturn new String[] { command, destination };\n\t\t\n\t}", "private static Stream<String> getTokensFromRawText(String rawText) {\n return Stream.of(rawText.split(\"\\\\s\"));\n }", "private String[] readNextRecord() throws IOException {\n final String nextLine = getNextLine();\n return parseLine(nextLine, true);\n }", "private byte[] consumePayload() throws IOException {\n byte[] payload = new byte[(int) payloadLength];\n int count = 0;\n while (payloadLength > 0L) {\n payload[count] = (byte) this.read();\n count++;\n }\n return payload;\n }", "public String[] parse() {\n String line = input.nextLine();\n line = line.trim();\n if (StringUtils.isNotEmpty(line)) {\n return StringUtils.split(line, \" \");\n }\n return null;\n }", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public List<String> read()\n\t{\n\t\treturn null;\n\t}", "public List<Token> getTokens() throws IOException, ScannerException {\n List<Token> tokens = new ArrayList<Token>();\n Token token = getNextToken();\n while (!token.getType().equals(RuleResolver.EOF_SYMBOL)) {\n tokens.add(token);\n token = getNextToken();\n }\n return tokens;\n }", "private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}", "static String readString() throws Exception {\n\t\twhile (!st.hasMoreTokens()) {\n\t\t\tst = new StringTokenizer(stdin.readLine());\n\t\t}\n\t\treturn st.nextToken();\n\t}", "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }", "public Command[] readCommands() {\n\t\tList<Command> result = new ArrayList<Command>();\n\t\tCommand next = null;\n\t\tdo {\n\t\t\tnext = readCommand();\n\t\t\tif (next!=null) {\n\t\t\t\tresult.add(next);\n\t\t\t}\n\t\t} while (next!=null);\n\t\treturn (Command[])result.toArray(new Command[0]);\n }", "public static String[] getUserInput() throws IOException{\n\t\t//Declare variables to read the file.\n\t\tFileInputStream inFile;\n\t\tInputStreamReader inReader;\n\t\tBufferedReader reader;\n\t\t\n\t\t//The test file that I used in order to run the program.\n\t\tString input = \"test.txt\";\n\t\t\n\t\t//Process the file, get it into a bufferedreader\n\t\tinFile = new FileInputStream (input);\n\t\tinReader = new InputStreamReader(inFile);\n\t\treader = new BufferedReader(inReader);\n\n\t\t//The only reason I do this thing where I make a big long string and then break it up\n\t\t//Is because I wasn't too sure about the rules surrounding things we haven't learned (Arrays)\n\t\tString fileData = \"\";\n\t\t\n\t\t//If there's more data, add the line to the end of the FileData String, with a space in between.\n\t\twhile(reader.ready()){\n\t\t\tfileData += (reader.readLine() + \" \");\n\t\t}\n\t\t\n\t\t//Then, break that line up into an array using the split function.\n\t\treturn breakInput(fileData);\n\t}", "private byte[] readToken() throws IOException, AuthenticationException {\n int status = conn.getResponseCode();\n if (status == HttpURLConnection.HTTP_OK || status == HttpURLConnection.HTTP_UNAUTHORIZED) {\n List<String> authHeaders = readHeaderField(conn, WWW_AUTHENTICATE);\n if (authHeaders.isEmpty()) {\n throw new AuthenticationException(\"Invalid SPNEGO sequence, '\" + WWW_AUTHENTICATE +\n \"' header missing\",\n AuthenticationException.AuthenticationExceptionCode.INVALID_SPNEGO_SEQUENCE);\n }\n for (String authHeader : authHeaders) {\n if (authHeader != null && authHeader.trim().startsWith(NEGOTIATE)) {\n String negotiation = authHeader.trim().substring((NEGOTIATE + \" \").length()).trim();\n return base64.decode(negotiation);\n }\n }\n }\n throw new AuthenticationException(\"Invalid SPNEGO sequence, status code: \" + status,\n AuthenticationException.AuthenticationExceptionCode.INVALID_SPNEGO_SEQUENCE);\n }", "Iterator<String> getTokenIterator();", "private static String[] rms(BufferedReader br) throws IOException {\n return br.readLine().split(SPLIT_CHAR);\n }", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "public ArrayList<String> perform(Message token) throws IOException {\n return null;\n }", "private String[] readLine(BufferedReader r) throws IOException\r\n\t{\r\n\t\tSystem.out.print(\"> \");\r\n\t\tfinal String line = r.readLine();\r\n\t\treturn line != null ? split(line) : null;\r\n\t}", "public String getString() throws NoSuchElementException\n {\n\treturn tokenizer.nextToken();\n }", "static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }", "public String[] getBufferAndFlush() {\r\n\t\tString[] answer = new String[this.BUFFER.getSize()];\r\n\r\n\t\tfor (int i = 0; i < answer.length; i++)\r\n\t\t\tanswer[i] = this.BUFFER.remove();\r\n\r\n\t\treturn answer;\r\n\t}", "public List<String> getResult()\n {\n while (!readComplete)\n {\n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException ex)\n {\n // swallow and exit;\n }\n }\n return lines;\n }", "public static String[] readAllLines() {\n ArrayList<String> lines = new ArrayList<String>();\n while (hasNextLine()) {\n lines.add(readLine());\n }\n return lines.toArray(new String[lines.size()]);\n }", "public String[] parseLine() throws IOException, FHIRException {\n\t\tList<String> res = new ArrayList<String>();\n\t\tStringBuilder b = new StringBuilder();\n\t\tboolean inQuote = false;\n\n\t\twhile (more() && !finished(inQuote, res.size())) {\n\t\t\tchar c = peek();\n\t\t\tnext();\n\t\t\tif (c == '\"' && doingQuotes) {\n\t\t\t\tif (ready() && peek() == '\"') {\n\t b.append(c);\n next();\n\t\t\t\t} else {\n\t\t\t inQuote = !inQuote;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!inQuote && c == delimiter ) {\n\t\t\t\tres.add(b.toString().trim());\n\t\t\t\tb = new StringBuilder();\n\t\t\t}\n\t\t\telse \n\t\t\t\tb.append(c);\n\t\t}\n\t\tres.add(b.toString().trim());\n\t\twhile (ready() && (peek() == '\\r' || peek() == '\\n')) {\n\t\t\tnext();\n\t\t}\n\t\t\n\t\tString[] r = new String[] {};\n\t\tr = res.toArray(r);\n\t\treturn r;\n\t}", "private static String readAll(Reader rd,boolean graph) throws IOException {\n StringBuilder sb = new StringBuilder();\n int cp;\n int count = 0;\n while ((cp = rd.read()) != -1) {\n count++;\n sb.append((char) cp);\n }\n //System.out.println(sb.toString());\n if(graph == false) {\n System.out.println(sb.deleteCharAt(0));\n System.out.println(sb.deleteCharAt(count - 2));\n }\n return sb.toString();\n }", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "List<String[]> readAll();", "byte[] token();", "private ELOperandToken getNextToken() {\r\n \t\tswitch (fState) {\r\n \t\tcase STATE_INITIAL: // Just started\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_VAR: // Variable name is read - expecting a separator \r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_METHOD: // Method name and parameters are read - expecting a separator\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (ch == '.') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readSeparatorToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\tcase STATE_SEPARATOR: // Separator is read - expecting a var or method\r\n \t\t{\r\n \t\t\tint ch = readCharBackward();\r\n \t\t\tif (ch == -1) {\r\n \t\t\t\treturn ELOperandToken.EOF;\r\n \t\t\t}\r\n \t\t\tif (Character.isJavaIdentifierPart((char)ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readVarToken();\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn readMethodToken();\r\n \t\t\t}\r\n \t\t\treleaseChar();\r\n \t\t\treturn ELOperandToken.EOF;\r\n \t\t}\r\n \t\t}\r\n \t\treturn ELOperandToken.EOF;\r\n \t}", "public static String[] readStrings(ChannelBuffer buffer, int numOfStrings)\n\t{\n\t\tString[] strings = new String[numOfStrings]; \n\t\tfor(int i=0;i<numOfStrings;i++)\n\t\t{\n\t\t\tString theStr = readString(buffer);\n\t\t\tif(null == theStr) break;\n\t\t\tstrings[i] = theStr;\n\t\t}\n\t\treturn strings;\n\t}", "private List<String> readTemperatureRaw() throws IOException {\n Path path = Paths.get( deviceFolder, \"/w1_slave\" );\n return FileReader.readLines( path );\n }", "public String popCurrentToken() throws IOException, DataFormatException {\n String token = this.currentToken;\n advance();\n return token;\n }", "private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }", "private List<String> getInputList(BufferedReader br) throws IOException {\n\t\tArrayList<String> inputWordsList = new ArrayList<String>();\n\t\tString tempInputWord = null;\n\t\twhile ((tempInputWord = br.readLine()) != null) {\n\t\t\tinputWordsList.add(tempInputWord);\n\t\t}\n\t\treturn inputWordsList;\n\t}", "public List<String> getOutput() {\n List<String> toRet = new ArrayList<String>();\n String line = processLinesOut_.poll();\n while (line != null) {\n toRet.add(line);\n line = processLinesOut_.poll();\n }\n return toRet;\n }", "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "public List<IToken> getTokens();", "public ArrayList<String> readTokens(String fileName) {\n Scanner sc1, sc2;\n ArrayList<String> wordList = new ArrayList<String>();\n\n try {\n sc1 = new Scanner(new File(fileName));\n\n while (sc1.hasNextLine()) {\n sc2 = new Scanner(sc1.nextLine());\n\n while (sc2.hasNext()) {\n String strWord = sc2.next().replaceAll(\"\\\\W\", \"\").toLowerCase();\n wordList.add(strWord);\n }\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n\n return wordList;\n }", "public static String[] m36409a(InputStream inputStream) {\n try {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"));\n String[] strArr = new String[100];\n int i = 0;\n while (true) {\n String readLine = bufferedReader.readLine();\n if (readLine == null) {\n break;\n }\n if (i == strArr.length) {\n String[] strArr2 = new String[(i << 1)];\n System.arraycopy(strArr, 0, strArr2, 0, i);\n strArr = strArr2;\n }\n int i2 = i + 1;\n strArr[i] = readLine;\n i = i2;\n }\n bufferedReader.close();\n if (i == strArr.length) {\n return strArr;\n }\n String[] strArr3 = new String[i];\n System.arraycopy(strArr, 0, strArr3, 0, i);\n return strArr3;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public static char[] readReaderContents(Reader reader) throws CoreException {\r\n\t\tCheck.checkArg(reader);\r\n try {\r\n char[] buf = new char[1024];\r\n StringBuffer sb = new StringBuffer();\r\n int len;\r\n while ((len = reader.read(buf)) > 0) {\r\n sb.append(buf, 0, len);\r\n }\r\n reader.close();\r\n return sb.toString().toCharArray();\r\n } catch (UnsupportedEncodingException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n } catch (IOException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}", "public String[] getMsg() {\n String[] parts = null;\n try {\n String cmd = MessageQueue.take();\n parts = cmd.split(\"<<\");\n } catch (Exception e) {\n if (debug == 1) {\n e.printStackTrace();\n }\n }\n return parts;\n }", "private String[] readMaterials() throws IOException\n {\n final int materialCount = this.reader.readByte();\n final String[] materials = new String[materialCount];\n for (int i = 0; i < materialCount; i++)\n {\n materials[i] = this.reader.readString(this.reader.readByte());\n }\n return materials;\n }", "public long getRemainingTokens() {\n return remainingTokens;\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList readVector() throws IOException {\n int length = readVectorHeader();\n ArrayList result = new ArrayList(length);\n for (int i = 0; i < length; i++) {\n result.add(read());\n }\n return result;\n }", "public String[] readCommand();", "private Token nextRawToken() throws NoSuchElementException {\n\t\t// Location of the char after the current projected token.\n\t\tint sLoc = 0;\n\n\t\twhile (latestLine.trim().isEmpty()) {\n\t\t\tlatestLine = fileScanner.nextLine();\n\t\t}\n\n\t\t// Find the next end segment\n\t\twhile (latestLine.length() != sLoc + 1\n\t\t\t\t&& latestLine.charAt(sLoc + 1) != ' ') {\n\t\t\t// && getType(document.substring(0, sLoc + 1)) == TokenType.INVALID)\n\t\t\t// {\n\t\t\tsLoc++;\n\t\t}\n\n\t\t// End indices of the token, inclusive.\n\t\tint endTestToken = sLoc;\n\n\t\t/*\n\t\t * Determine the longest sub-token by starting from the end and working\n\t\t * backwards.\n\t\t */\n\t\tboolean valid = false;\n\t\tfor (int i = endTestToken; i >= 0; i--) {\n\t\t\tString testToken = latestLine.substring(0, i + 1);\n\t\t\tif (getType(testToken) != TokenType.INVALID) {\n\t\t\t\tsLoc = i;\n\t\t\t\tvalid = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!valid) {\n\t\t\tsLoc = 0;\n\t\t}\n\n\t\tString token = latestLine.substring(0, sLoc + 1);\n\n\t\tToken t = new Token(token, getType(token));\n\t\trunDiagnostic(t);\n\n\t\t// Consume the token form the document\n\t\tlatestLine = latestLine.substring(sLoc + 1).trim();\n\n\t\treturn t;\n\t}", "private static String[] tokenizeInput(String input) {\r\n\t\tArrayList<String> tokens = new ArrayList<String>(8);\r\n\t\t\r\n\t\tScanner inputScanner = new Scanner(input);\r\n\t\twhile (inputScanner.hasNext()) {\r\n\t\t\ttokens.add(inputScanner.next());\r\n\t\t}\r\n\t\treturn tokens.toArray(new String[tokens.size()]);\r\n\t}", "public char[] nextToken() {\n\t\t// read and return the next word of the document\n\t\tif(loc<words.length){\n\n\t\t\tString res=words[loc];\n\t\t\tloc++;\n\t\t\treturn res.toCharArray();\n\t\t}\n\n\t\t// or return null if it reaches the end of the document\n\t\treturn null;\n\t}", "private static Object readArrayTillTheEnd(final StringTokenizer tokenizer) {\n final JSONArray result = new JSONArray();\n final char possibleEnd = tokenizer.nextUnskippable();\n if (possibleEnd == ']') {\n return result;\n }\n tokenizer.back();\n boolean finished = false;\n while (!finished) {\n result.put(parse(tokenizer));\n final char separator = tokenizer.nextUnskippable();\n if (separator == ']') {\n finished = true;\n } else if (separator != ',') {\n throw syntaxError(\"Unexpected separator '\" + separator + \"'\", tokenizer);\n }\n }\n return result;\n }", "public byte[] readRawList() throws IOException {\n Buffer buffer = new Buffer(new byte[] { (byte) Type.LIST.code });\n byte[] bytes = readRaw();\n while (bytes != null) {\n buffer.append(bytes);\n bytes = readRaw();\n }\n buffer.append(new byte[] { (byte) Type.MARKER.code });\n return buffer.get();\n }", "public String read();", "private Token nextTokenWithWhites() throws IOException {\n\t\tString lexemaActual = \"\";\n\t\t// Si hay lexemas en el buffer, leemos de ahi\n\t\tif (!bufferLocal.esVacia()) {\n\t\t\treturn bufferLocal.extraer();\n\t\t} else {\n\t\t\t// Si no, leemos del Stream\t\t\t\t\t\n\t\t\tint lexema = tokens.nextToken();\n\t\t\tswitch (lexema) {\n\t\t\t\tcase StreamTokenizer.TT_WORD: \n\t\t\t\t\tlexemaActual = tokens.sval; \n\t\t\t\t\tbreak;\n\t\t\t\tcase StreamTokenizer.TT_EOF:\n\t\t\t\t\tlexemaActual = \"fin\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlexemaActual = String.valueOf((char)tokens.ttype);\n\t\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t\t// Sumamos una linea en caso de haber salto de linea\n\t\t\tif (lexemaActual.equals(\"\\n\")) \n\t\t\t\tnumeroLinea++;\t\t\t\n\t\t}\n\t\treturn new Token(lexemaActual,this.numeroLinea);\n\t}", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reader.close();\r\n // Convert the list to an array of type String and return\r\n String[] ret = new String[1];\r\n return (lines.toArray(ret));\r\n }", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }", "public List<Tailor> read();", "public String read() {\n\t\tString Line = \"\";\n\t\tInteger[] byteCodes = compressFileReader();\n\t\tif (byteCodes == null)\n\t\t\treturn null;\n\t\tint index = 0;\n\t\tint nextCode = byteCodes[index++];\n\t\tString val = readingMap[nextCode];\n\n\t\twhile (index < byteCodes.length - 1) {\n\t\t\tLine += val;\n\t\t\tnextCode = byteCodes[index++];\n\t\t\tString s = readingMap[nextCode];\n\t\t\tif (s == null) {\n\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\tint i = 0;\n\t\t\t}\n\t\t\tif (readingkeysCount == nextCode)\n\t\t\t\ts = val + val.charAt(0);\n\t\t\tif (readingkeysCount < 256 + keysPossible)\n\t\t\t\treadingMap[readingkeysCount++] = val + s.charAt(0);\n\t\t\tval = s;\n\t\t}\n\t\tLine += val;\n\t\treturn Line + '\\n';\n\t}", "private void parseMessages() {\n\n // Find the first delimiter in the buffer\n int inx = rx_buffer.indexOf(DELIMITER);\n\n // If there is none, exit\n if (inx == -1)\n return;\n\n // Get the complete message\n String s = rx_buffer.substring(0, inx);\n\n // Remove the message from the buffer\n rx_buffer = rx_buffer.substring(inx + 1);\n\n // Send to read handler\n sendToReadHandler(s);\n\n // Look for more complete messages\n parseMessages();\n }", "public Integer[] compressFileReader() {\n\t\tint index = 0;\n\t\tString input = \"\";\n\t\ttry {\n\t\t\tint nextChar = 0;\n\t\t\twhile (nextChar != (int) '\\n') {\n\t\t\t\tnextChar = 0;\n\t\t\t\tfor (int i = 0; i < codeLength; i++) {\n\t\t\t\t\tnextChar <<= 1;\n\t\t\t\t\tif (bufferCount == 0) {\n\t\t\t\t\t\tbuffer = in.read();\n\t\t\t\t\t\tbufferCount = 8;\n\t\t\t\t\t}\n\t\t\t\t\tif (buffer == -1) {// in.close();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbufferCount--;\n\t\t\t\t\tif ((buffer >> (bufferCount) & 1) == 1)\n\t\t\t\t\t\tnextChar |= 1;\n\t\t\t\t}\n\t\t\t\tinput = input + nextChar + \",\";\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] str = input.split(\",\");\n\t\tInteger[] inputArray = new Integer[str.length];\n\t\tfor (String st : str)\n\t\t\tinputArray[index++] = Integer.parseInt(st);\n\t\treturn inputArray;\n\n\t}", "public static String[] readStringArray(int MAX) {\n\n\t\tString[] temp = new String[MAX];\n\n\t\tfor (int i = 0; i < MAX; i++) {\n\t\t\tSystem.out.print(\"Enter any String : \");\n\t\t\ttemp[i] = UserIO.readInput();\n\t\t}\n\n\t\treturn temp;\n\t}", "private void tokenEnd() {\n zzStartRead = tokenStartIndex;\n }", "public void readDescription() throws IOException {\n while (!shouldStop()) {\n String word = next();\n if (word != \"\") {\n // System.out.println(word);\n temps.add(word);\n }\n }\n c = r.read();\n }", "public Token[] getTokens() {\r\n Token[] tokenArr = new Token[tokenList.size()];\r\n\r\n for (int i = 0; i < tokenList.size(); i++) {\r\n tokenArr[i] = tokenList.get(i);\r\n }\r\n\r\n return tokenArr;\r\n }", "public String[] getStringArrayFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n ArrayList<String> al = new ArrayList<String>();\n String line;\n String[] sa = null;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n al.add(line);\n }\n } catch (Exception e) {\n } finally {\n try {\n br.close();\n } catch (Exception e) {\n }\n br = null;\n sa = al.toArray(new String[al.size()]);\n return sa;\n }\n }", "public byte[] ReadMessage()\r\n {\r\n try {\r\n byte[] read = new byte[in.read()];\r\n for(int i = 0; i < read.length; i++)\r\n read[i] = (byte)in.read();\r\n\r\n return read;\r\n } catch (Exception e){\r\n System.out.println(e);\r\n }\r\n return null;\r\n }", "public List<String> getTokens() {\n try {\n return tkDao.getTokens();\n } catch (SQLException ex) {\n throw new RuntimeException(\"an error occurred trying to get all tokens stored in database: \" + ex.getMessage());\n }\n }", "public void readInSearchTokens() {\n String propFile = properties.getProperty(\"classpath.search.tokens\");\n //Try with resources\n try (InputStream inputStream = this.getClass().getResourceAsStream(propFile);\n \n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader searchTokensReader = new BufferedReader(inputStreamReader)) {\n //Tells the stream that it is ready to be read\n while (searchTokensReader.ready()) {\n String line = searchTokensReader.readLine();\n //eliminating leading and trailing spaces with trim and split\n //creating a string array of tokens\n String[] tokens = line.trim().split(\"\\\\s*,\\\\s\");\n List<Integer> lArray = new ArrayList<Integer>();\n // Notes: String is the type - element is the identifier. Tokens is the name\n for (String element : tokens) {\n if (element.isEmpty() == false) {\n //using containsKey to ensure the FoundLocations is in the tokens array\n if (getFoundLocations().containsKey(element) == false) {\n getFoundLocations().put(element, lArray);\n }\n }\n }\n }\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "private byte[] readBuffer( DataInputStream in ) throws IOException{\n String factory = in.readUTF();\n int count = in.readInt();\n \n ByteArrayOutputStream out = new ByteArrayOutputStream( factory.length()*4 + 4 + count );\n DataOutputStream dout = new DataOutputStream( out );\n \n dout.writeUTF( factory );\n dout.writeInt( count );\n \n for( int i = 0; i < count; i++ ){\n int read = in.read();\n if( read == -1 )\n throw new EOFException( \"unexpectetly reached end of file\" );\n dout.write( read );\n }\n \n dout.close();\n return out.toByteArray();\n }", "public ITCMessage[] readMessages(int inNumberMessages) throws IOException;", "private String[] getPatterns(StreamTokenizer st) throws IOException {\n\t\t// get language\n\t\tString lang = getLanguageFromTokenizer(st);\n\n\t\tif (st.nextToken() != StreamTokenizer.TT_EOF)\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"PATTERNS takes exactly one (language) or no arguments (default language)!\");\n\n\t\treturn ng.getPatterns(lang);\n\t}", "@Override\n public CommonTokenStream getTokens() {\n return null;\n }", "private String[] termsArray(Scanner scan){\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\twhile (scan.hasNext()) {\r\n\t\t\tlist.add(scan.next());\r\n\t\t}\r\n\t\treturn (String[]) list.toArray(new String[0]);\r\n\t}", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "String read();", "String read();", "public void tokenizeAll() {\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tgetNextValidToken();\n\t\t\t}\n\t\t} catch (NoSuchElementException done) {\n\t\t\t// Fully Tokenized\n\t\t}\n\t}", "private void consumeToken() {\n\t\tToken token = lexAnalyser.nextToken();\n\t\tlogMessage(functionStack.peekFirst() + \" consumed \" + token.getType()\n\t\t\t\t+ \": <lexeme>\" + token.getLexeme() + \"</lexeme>\");\n\t\tpeekToken = lexAnalyser.peekToken();\n\t}", "public String[] getParsed() {\n\t\tif(changed)\n\t\t\treturn lines;\n\t\treturn null;\n\t}", "private List<String> readFile(String fileName)\n {\n try\n {\n String file = new String(Files.readAllBytes(Paths.get(fileName)), Charset.forName(\"ISO-8859-1\"));\n file = file\n .toLowerCase()\n .replaceAll(\"[^\\\\w]+\", \" \")\n .replaceAll(\"[0-9]\", \"\");\n Tokenizer tokenizer = SimpleTokenizer.INSTANCE;\n String[] tokens = tokenizer.tokenize(file);\n return Arrays.asList(tokens);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "String[] readLines(Object packet);", "public static int[] readInts() {\n return readAllInts();\n }", "protected void readAhead() {\n if (! reader.hasNext()) {\n this.nextLine = null;\n } else {\n this.nextLine = reader.next();\n while (this.nextLine != null && this.nextLine.isEmpty() && reader.hasNext())\n this.nextLine = reader.next();\n }\n }" ]
[ "0.65876377", "0.64611256", "0.64575005", "0.61337286", "0.60084873", "0.60070276", "0.58847487", "0.58550376", "0.56545323", "0.5644685", "0.56313497", "0.56054306", "0.5589925", "0.5581369", "0.5562186", "0.5537813", "0.55153626", "0.55016315", "0.54856193", "0.54835063", "0.54835063", "0.5458294", "0.5451176", "0.5449341", "0.54246616", "0.5409036", "0.5400125", "0.5346259", "0.53455955", "0.5329384", "0.53127044", "0.52991635", "0.5292126", "0.52897626", "0.52724725", "0.5269129", "0.5240751", "0.52388024", "0.52385783", "0.5205415", "0.51854676", "0.5161866", "0.51382613", "0.5137079", "0.5117847", "0.51115847", "0.5109956", "0.5107812", "0.51074046", "0.50995487", "0.5083285", "0.50823647", "0.5075121", "0.5074994", "0.5069964", "0.50674796", "0.50609916", "0.50561947", "0.5050327", "0.50447375", "0.504424", "0.5031066", "0.50231653", "0.5001699", "0.49844784", "0.49776813", "0.49770343", "0.49681705", "0.4957199", "0.49539807", "0.49395436", "0.4929099", "0.49289885", "0.49214", "0.49179292", "0.49148205", "0.49120784", "0.49094266", "0.49070725", "0.49022058", "0.48865268", "0.4885043", "0.487161", "0.48635507", "0.4850408", "0.4847035", "0.48387712", "0.4836675", "0.48339817", "0.4833492", "0.48334813", "0.4808949", "0.4808949", "0.48074034", "0.47936067", "0.47927818", "0.4784432", "0.47839886", "0.47833803", "0.47799534" ]
0.66310585
0
reads all remaining lines from this input stream and returns them as array of strings
public String[] readAllLines(){ ArrayList<String> lines=new ArrayList<>(); while (hasNestLine()) lines.add(readLine()); return lines.toArray(new String[lines.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] readAllLines() {\n ArrayList<String> lines = new ArrayList<String>();\n while (hasNextLine()) {\n lines.add(readLine());\n }\n return lines.toArray(new String[lines.size()]);\n }", "private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}", "static List<String> readLines(InputStream in) throws IOException {\n\t\tList<String> lines = new ArrayList<String>();\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\tString line = null;\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}", "public List<String> getResult()\n {\n while (!readComplete)\n {\n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException ex)\n {\n // swallow and exit;\n }\n }\n return lines;\n }", "public String readLines() {\n\n String fileAsString;\n fileAsString = read();\n StringBuilder newString = new StringBuilder();\n if (fileAsString != null) {\n if (fromLine == toLine) {\n\n newString = new StringBuilder(fileAsString.split(\"\\n\")[fromLine - 1]);\n return newString.toString();\n } else {\n if (toLine > fileAsString.split(\"\\n\").length) {\n toLine = fileAsString.split(\"\\n\").length;\n }\n ;\n for (int i = fromLine - 1; i < toLine; i++) {\n\n newString.append(fileAsString.split(\"\\n\")[i]).append(\"\\n\");\n\n\n }\n }\n\n }\n\n\n return newString.toString();\n }", "public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}", "public static String[] readStrings() {\n return readAllStrings();\n }", "private String[] readLine(BufferedReader r) throws IOException\r\n\t{\r\n\t\tSystem.out.print(\"> \");\r\n\t\tfinal String line = r.readLine();\r\n\t\treturn line != null ? split(line) : null;\r\n\t}", "public String[] getStringArrayFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n ArrayList<String> al = new ArrayList<String>();\n String line;\n String[] sa = null;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n al.add(line);\n }\n } catch (Exception e) {\n } finally {\n try {\n br.close();\n } catch (Exception e) {\n }\n br = null;\n sa = al.toArray(new String[al.size()]);\n return sa;\n }\n }", "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }", "public static ArrayList<String> getLines() throws Exception\n {\n \tArrayList<String> lines = new ArrayList<String>();\n \twhile(reader.ready())\n \t{\n \t\tlines.add(reader.readLine());//reads the line and adds them into the arraylist\n \t}\n \treturn lines;\n }", "public static List<String> readLines(final Reader input) throws IOException {\n final BufferedReader reader = new BufferedReader(input);\n final List<String> list = new ArrayList<String>();\n String line = reader.readLine();\n while (line != null) {\n list.add(line);\n line = reader.readLine();\n }\n return list;\n }", "String[] readLines(Object packet);", "public String[] getLines(String input) {\r\n\t\tScanner sc = new Scanner(input);\r\n\t\tArrayList<String> lines = new ArrayList<>();\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\tlines.add(sc.nextLine());\r\n\t\t}\r\n\t\tsc.close();\r\n\r\n\t\treturn lines.toArray(new String[lines.size()]);\r\n\t}", "public static Queue<String> linesFromInput(SimpleReader input) {\n assert input != null : \"Violation of: input is not null\";\n assert input.isOpen() : \"Violation of: input.is_open\";\n\n Queue<String> lines = new Queue1L<String>();\n while (!input.atEOS()) {\n String text = input.nextLine(); // reads next line\n lines.enqueue(text);\n\n }\n return lines;\n }", "public List<String> getOutput() {\n List<String> toRet = new ArrayList<String>();\n String line = processLinesOut_.poll();\n while (line != null) {\n toRet.add(line);\n line = processLinesOut_.poll();\n }\n return toRet;\n }", "public static List<String> readLines(final InputStream input) throws IOException {\n return readLines(input, Charset.defaultCharset());\n }", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }", "private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reader.close();\r\n // Convert the list to an array of type String and return\r\n String[] ret = new String[1];\r\n return (lines.toArray(ret));\r\n }", "public synchronized String Readline() {\n\t return lines.poll();\n\t}", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "public static String[] readLines(String url) throws IOException {\r\n\r\n BufferedReader bufferedReader = new BufferedReader(new FileReader(url));\r\n List<String> lines = null;\r\n try {\r\n lines = new ArrayList();\r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return lines.toArray(new String[lines.size()]);\r\n\r\n }", "private String[] readNextRecord() throws IOException {\n final String nextLine = getNextLine();\n return parseLine(nextLine, true);\n }", "private String readAll(Reader rd) throws IOException {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint cp;\r\n\t\twhile ((cp = rd.read()) != -1) {\r\n\t\t\tsb.append((char) cp);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "List<String> getLines();", "public String[] readNext() {\n\t\treturn null;\n\t}", "public List<String> nextOneLine() throws IOException {\n counterSeveralLines = linesAfter;\n if (StringUtils.isBlank(currentPath)) return null;\n String sCurrentLine;\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n listBefore = addToArray(sCurrentLine);\n }\n return listBefore;\n }", "public String[] parseLine() throws IOException, FHIRException {\n\t\tList<String> res = new ArrayList<String>();\n\t\tStringBuilder b = new StringBuilder();\n\t\tboolean inQuote = false;\n\n\t\twhile (more() && !finished(inQuote, res.size())) {\n\t\t\tchar c = peek();\n\t\t\tnext();\n\t\t\tif (c == '\"' && doingQuotes) {\n\t\t\t\tif (ready() && peek() == '\"') {\n\t b.append(c);\n next();\n\t\t\t\t} else {\n\t\t\t inQuote = !inQuote;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!inQuote && c == delimiter ) {\n\t\t\t\tres.add(b.toString().trim());\n\t\t\t\tb = new StringBuilder();\n\t\t\t}\n\t\t\telse \n\t\t\t\tb.append(c);\n\t\t}\n\t\tres.add(b.toString().trim());\n\t\twhile (ready() && (peek() == '\\r' || peek() == '\\n')) {\n\t\t\tnext();\n\t\t}\n\t\t\n\t\tString[] r = new String[] {};\n\t\tr = res.toArray(r);\n\t\treturn r;\n\t}", "private static String readAll(Reader rd) throws IOException {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t int cp;\n\t\t while ((cp = rd.read()) != -1) {\n\t\t sb.append((char) cp);\n\t\t }\n\t\t return sb.toString();\n\t\t }", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String readAll() {\n if (!scanner.hasNextLine())\n return \"\";\n\n String result = scanner.useDelimiter(EVERYTHING_PATTERN).next();\n // not that important to reset delimeter, since now scanner is empty\n scanner.useDelimiter(WHITESPACE_PATTERN); // but let's do it anyway\n return result;\n }", "public static String[] m36409a(InputStream inputStream) {\n try {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"));\n String[] strArr = new String[100];\n int i = 0;\n while (true) {\n String readLine = bufferedReader.readLine();\n if (readLine == null) {\n break;\n }\n if (i == strArr.length) {\n String[] strArr2 = new String[(i << 1)];\n System.arraycopy(strArr, 0, strArr2, 0, i);\n strArr = strArr2;\n }\n int i2 = i + 1;\n strArr[i] = readLine;\n i = i2;\n }\n bufferedReader.close();\n if (i == strArr.length) {\n return strArr;\n }\n String[] strArr3 = new String[i];\n System.arraycopy(strArr, 0, strArr3, 0, i);\n return strArr3;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public List<String> nextSeveralLines() throws IOException {\n if (StringUtils.isBlank(currentPath)) return null;\n List<String> lista = new ArrayList<String>();\n String sCurrentLine;\n int temp = 1;\n\n bufferReader.mark(10000000);\n while ((sCurrentLine = bufferReader.readLine()) != null) {\n temp++;\n if (temp > counterSeveralLines) {\n for (int i = 0; i < linesAfter; i++) {\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n counterSeveralLines++;\n lista.add(sCurrentLine);\n }\n }\n bufferReader.reset();\n return lista;\n }\n }\n return lista;\n }", "public String[] readAllStrings(){\n\t\tString[] tokens=WHITESPACE_PATTERN.split(readAll());\n\t\tif (tokens.length==0||tokens[0].length()>0)\n\t\t\treturn tokens;\n\t\tString[] decapitokens=new String[tokens.length-1];\n\t\tfor (int i=0;i<tokens.length-1;i++){\n\t\t\tdecapitokens[i]=tokens[i+1];\n\t\t}\n\t\treturn decapitokens;\n\t}", "public static List<String> readLines(BufferedReader reader) throws IOException {\n List<String> lines = new ArrayList();\n eachLine(reader, lines);\n return lines;\n }", "public static String[] readAllStrings() {\n // we could use readAll.trim().split(), but that's not consistent\n // because trim() uses characters 0x00..0x20 as whitespace\n String[] tokens = WHITESPACE_PATTERN.split(readAll());\n if (tokens.length == 0 || tokens[0].length() > 0)\n return tokens;\n\n // don't include first token if it is leading whitespace\n String[] decapitokens = new String[tokens.length-1];\n for (int i = 0; i < tokens.length - 1; i++)\n decapitokens[i] = tokens[i+1];\n return decapitokens;\n }", "private String read(InputStream in) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(in), 1000);\n for (String line = r.readLine(); line != null; line = r.readLine()) {\n sb.append(line);\n }\n in.close();\n return sb.toString();\n }", "public static String[] getUserInput() throws IOException{\n\t\t//Declare variables to read the file.\n\t\tFileInputStream inFile;\n\t\tInputStreamReader inReader;\n\t\tBufferedReader reader;\n\t\t\n\t\t//The test file that I used in order to run the program.\n\t\tString input = \"test.txt\";\n\t\t\n\t\t//Process the file, get it into a bufferedreader\n\t\tinFile = new FileInputStream (input);\n\t\tinReader = new InputStreamReader(inFile);\n\t\treader = new BufferedReader(inReader);\n\n\t\t//The only reason I do this thing where I make a big long string and then break it up\n\t\t//Is because I wasn't too sure about the rules surrounding things we haven't learned (Arrays)\n\t\tString fileData = \"\";\n\t\t\n\t\t//If there's more data, add the line to the end of the FileData String, with a space in between.\n\t\twhile(reader.ready()){\n\t\t\tfileData += (reader.readLine() + \" \");\n\t\t}\n\t\t\n\t\t//Then, break that line up into an array using the split function.\n\t\treturn breakInput(fileData);\n\t}", "public static String[] getLines(String filename)\n throws IOException {\n\n\n try (\n FileInputStream inStream = new FileInputStream(filename);\n InputStreamReader reader = new InputStreamReader(inStream);\n BufferedReader buffer = new BufferedReader(reader)\n ) {\n List<String> lines = new LinkedList<>();\n for (String line = buffer.readLine();\n line != null;\n line = buffer.readLine()) {\n line = line.trim();\n if (!line.isEmpty()) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[0]);\n }\n }", "ArrayList<String> getLines();", "public String readAllLines() {\n String ans = \"\";\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"./assets/Instruction.txt\"));\n String str;\n while ((str = br.readLine()) != null) {\n ans += (str + \"\\n\");\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n assert ans != null;\n return ans;\n }", "private static void bufferedReading2(String str) throws IOException {\n try (BufferedReader reader = new BufferedReader(new StringReader(str))) {\n String result = reader.lines().collect(Collectors.joining(System.lineSeparator()));\n System.out.println(result);\n }\n }", "private byte[] readLine(InputStream inputStream) throws IOException {\n\t\tByteArrayOutputStream bytes = new ByteArrayOutputStream();\n\t\tboolean started = false;\n\t\tboolean cr = false;\n\t\twhile(true){\n\t\t\tint next = inputStream.read();\n\t\t\tif(next == -1){\n\t\t\t\tthrow new ModbusIORuntimeException(\"End of stream!\");\n\t\t\t}\n\t\t\tif(!started){\n\t\t\t\tstarted = next == ':';\n\t\t\t} else {\n\t\t\t\tif(cr){\n\t\t\t\t\tif(next != '\\n'){\n\t\t\t\t\t\tthrow new ModbusRuntimeException(\"Next character should be a new line!\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} else if(next == '\\r'){\n\t\t\t\t\tcr = true;\n\t\t\t\t} else {\n\t\t\t\t\tbytes.write((byte) next);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn bytes.toByteArray();\n\t}", "int getLinesRead();", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "public void readFromStream(Reader r) throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(r);\n\t\tlines=new ArrayList();\n\n\t\twhile(true) {\n\t\t\tString input=br.readLine();\n\t\t\tif(input==null)\n\t\t\t\tbreak;\n\t\t\tlines.add(input);\n\t\t}\n\t}", "private static String[] rms(BufferedReader br) throws IOException {\n return br.readLine().split(SPLIT_CHAR);\n }", "public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }", "public String[] getBufferAndFlush() {\r\n\t\tString[] answer = new String[this.BUFFER.getSize()];\r\n\r\n\t\tfor (int i = 0; i < answer.length; i++)\r\n\t\t\tanswer[i] = this.BUFFER.remove();\r\n\r\n\t\treturn answer;\r\n\t}", "public static void read6() {\n List<String> list = new ArrayList<>();\n\n try (BufferedReader br = Files.newBufferedReader(Paths.get(filePath))) {\n\n //br returns as stream and convert it into a List\n list = br.lines().collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }", "public static String[] readLines(URL url) throws IOException {\n\n Reader fileReader = new InputStreamReader(url.openStream(), Charset.forName(\"UTF-8\"));\n List<String> lines;\n try (BufferedReader bufferedReader = new BufferedReader(fileReader)) {\n lines = new ArrayList<>();\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[lines.size()]);\n }", "static String[] copy(Scanner file, int lines){\t\t\n\t\tString[] array = new String[lines];\n\t\tfor(int i = 0; file.hasNextLine(); i++){\n\t\t array[i] = file.nextLine();\n\t\t}\n\t\treturn array;\n\t}", "private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}", "private static List<String> readOutput(Process process) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\tString line;\n\t\tList<String> lines = new ArrayList<>();\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}", "private String getTextLineFromStream( InputStream is ) throws IOException {\n StringBuffer buffer = new StringBuffer();\n int b;\n\n \twhile( (b = is.read()) != -1 && b != (int) '\\n' ) {\n \t\tbuffer.append( (char) b );\n \t}\n \treturn buffer.toString().trim();\n }", "public static List<String> readLines(final InputStream input, final Charset encoding) throws IOException {\n final InputStreamReader reader = new InputStreamReader(input, encoding);\n return readLines(reader);\n }", "public\n static\n List< String >\n readLines( InputStream is,\n String charset )\n throws IOException\n {\n inputs.notNull( is, \"is\" );\n try\n {\n inputs.notNull( charset, \"charset\" );\n \n List< String > res = Lang.newList();\n \n BufferedReader br = \n new BufferedReader( new InputStreamReader( is, charset ) );\n \n String line;\n while ( ( line = br.readLine() ) != null ) res.add( line );\n \n return res;\n }\n finally { is.close(); }\n }", "public String[] getFile() throws IOException {\n\t\n\t\n\ttry {\n\tFileReader reader = new FileReader(path);\n\tBufferedReader textReader = new BufferedReader(reader); // creates buffered file reader again\n\t\n\tint numberOfLines = getLines(); // calls the method above to know how many lines there are\n\tString[ ] textData = new String[numberOfLines]; //creates an array the size of the amount of lines the file has\n\t\n\tfor (int i=0; i < numberOfLines; i++) {\n\t\ttextData[ i ] = textReader.readLine(); // go through file and read each line into its own array space\n\t\t}\n\t\n\ttextReader.close( ); //reader is done\n\treturn textData; // return array\n\t} catch (IOException e) {\n\t\tString[] exceptionString = new String[1];\n\t\texceptionString[0] = \"nothing\";\n\t\treturn exceptionString;\n\t}\n}", "private String readStream(InputStream in) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder sb = new StringBuilder();\n String line;\n\n // Reads every line and stores them in sb.\n while((line = r.readLine()) != null) {\n sb.append(line);\n }\n\n // Closes the input stream.\n in.close();\n\n return sb.toString();\n }", "private byte[] readBuffer( DataInputStream in ) throws IOException{\n String factory = in.readUTF();\n int count = in.readInt();\n \n ByteArrayOutputStream out = new ByteArrayOutputStream( factory.length()*4 + 4 + count );\n DataOutputStream dout = new DataOutputStream( out );\n \n dout.writeUTF( factory );\n dout.writeInt( count );\n \n for( int i = 0; i < count; i++ ){\n int read = in.read();\n if( read == -1 )\n throw new EOFException( \"unexpectetly reached end of file\" );\n dout.write( read );\n }\n \n dout.close();\n return out.toByteArray();\n }", "private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }", "private List<String> readSrc(){\n //daclarations\n InputStream stream;\n List<String> lines;\n String input;\n BufferedReader reader;\n StringBuilder buf;\n\n //Inlezen van bestand\n stream = this.getClass().getResourceAsStream(RESOURCE);\n lines = new LinkedList<>();\n\n // laad de tekst in \n reader = new BufferedReader(new InputStreamReader(stream));\n buf = new StringBuilder();\n\n if(stream != null){\n try{\n while((input = reader.readLine()) != null){\n buf.append(input);\n System.out.println(input);\n lines.add(input);\n }\n } catch(IOException ex){\n System.out.println(ex);// anders schreeuwt hij in mijn gezicht:\n }\n }\n return lines;\n }", "private byte[] refreshBuffer() throws IOException {\n bufpos = 0;\n if (client.isTransferCancelled())\n return null;\n int count = client.readChunk(in, chunk, chunk.length);\n if (count < 0) {\n if (matchpos > 0) { \n pos += matchpos;\n buflen = matchpos;\n monitorCount += matchpos;\n byte[] tmp = new byte[matchpos];\n System.arraycopy(tmp, 0, prevBuf, 0, matchpos);\n matchpos = 0;\n return tmp;\n }\n return null;\n }\n try {\n // transform CRLF\n out.reset();\n for (int i = 0; i < count; i++) {\n if (chunk[i] == FTPClient.FTP_LINE_SEPARATOR[matchpos]) {\n prevBuf[matchpos] = chunk[i];\n matchpos++;\n if (matchpos == FTPClient.FTP_LINE_SEPARATOR.length) {\n out.write(LINE_SEPARATOR);\n pos += LINE_SEPARATOR.length;\n monitorCount += LINE_SEPARATOR.length;\n matchpos = 0;\n }\n }\n else { // no match\n // write out existing matches\n if (matchpos > 0) {\n out.write(prevBuf, 0, matchpos);\n pos += matchpos;\n monitorCount += matchpos;\n }\n out.write(chunk[i]);\n pos++;\n monitorCount++;\n matchpos = 0;\n } \n } \n byte[] result = out.toByteArray();\n buflen = result.length;\n return result;\n }\n finally {\n checkMonitor(); \n }\n }", "private String[] readFile(InputStream stream) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new InputStreamReader(stream)));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \");\r\n }\r\n }", "public static List<String> readLines(final InputStream input, final String encoding) throws IOException {\n return readLines(input, Charset.forName(encoding));\n }", "String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }", "private String eatLine( InputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "private static ArrayList<String> readInventory(Scanner source) {\n\n\t\tArrayList<String> contents = new ArrayList<String>();\n\n\t\twhile (source.hasNext()) {\n\t\t\tString line = source.nextLine();\n\t\t\tcontents.add(line);\n\t\t}\n\n\t\treturn contents;\n\t}", "public ArrayList<String> createStringArray() throws Exception {\n ArrayList<String> stringsFromFile = new ArrayList<>();\n while (reader.hasNext()) {\n stringsFromFile.add(reader.nextLine());\n }\n return stringsFromFile;\n }", "public String[] getParsed() {\n\t\tif(changed)\n\t\t\treturn lines;\n\t\treturn null;\n\t}", "private static String readLine(ResettableInputStream in, int maxLength)\n throws IOException {\n\n StringBuilder s = new StringBuilder();\n int c;\n int i = 1;\n while ((c = in.readChar()) != -1) {\n // FIXME: support \\r\\n\n if (c == '\\n') {\n break;\n }\n //System.out.printf(\"seen char val: %c\\n\", (char)c);\n s.append((char)c);\n\n if (i++ > maxLength) {\n System.out.println(\"Output: >\" + s + \"<\");\n throw new RuntimeException(\"Too far!\");\n }\n }\n if (s.length() > 0) {\n s.append('\\n');\n return s.toString();\n } else {\n return null;\n }\n }", "public String readMultipleFromFiles()\n {\n String result = \"\";\n try\n {\n FileReader fileReader = new FileReader(filename);\n try\n {\n StringBuffer stringBuffer = new StringBuffer();\n Scanner scanner = new Scanner(fileReader);\n while (scanner.hasNextLine())\n {\n stringBuffer.append(scanner.nextLine()).append(\"\\n\");\n }\n stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());\n result = stringBuffer.toString();\n } finally\n {\n fileReader.close();\n }\n } catch (FileNotFoundException e)\n {\n System.out.println(\"There is no such file called \" + filename);\n } catch (IOException e)\n {\n System.out.println(\"read \" + filename + \" error!!!\");\n } catch (NumberFormatException e)\n {\n System.out.println(\"content in file \" + filename + \" is error\");\n }\n return result;\n }", "private final byte[] readBuffer( int size ) throws IOException {\n byte[] buffer = new byte[ size ];\n\n int read = 0;\n while ( read < size ) {\n int next = dataSource.read( buffer, read, size - read );\n if ( next < 0 ) throw new IOException( \"End of Stream\" );\n read += next;\n\t}\n return buffer;\n }", "private String readLine() throws IOException {\n/* 276 */ String line = null;\n/* */ \n/* */ \n/* 279 */ boolean isLastFilePart = (this.no == 1L);\n/* */ \n/* 281 */ int i = this.currentLastBytePos;\n/* 282 */ while (i > -1) {\n/* */ \n/* 284 */ if (!isLastFilePart && i < ReversedLinesFileReader.this.avoidNewlineSplitBufferSize) {\n/* */ \n/* */ \n/* 287 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ int newLineMatchByteCount;\n/* 292 */ if ((newLineMatchByteCount = getNewLineMatchByteCount(this.data, i)) > 0) {\n/* 293 */ int lineStart = i + 1;\n/* 294 */ int lineLengthBytes = this.currentLastBytePos - lineStart + 1;\n/* */ \n/* 296 */ if (lineLengthBytes < 0) {\n/* 297 */ throw new IllegalStateException(\"Unexpected negative line length=\" + lineLengthBytes);\n/* */ }\n/* 299 */ byte[] lineData = new byte[lineLengthBytes];\n/* 300 */ System.arraycopy(this.data, lineStart, lineData, 0, lineLengthBytes);\n/* */ \n/* 302 */ line = new String(lineData, ReversedLinesFileReader.this.encoding);\n/* */ \n/* 304 */ this.currentLastBytePos = i - newLineMatchByteCount;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 309 */ i -= ReversedLinesFileReader.this.byteDecrement;\n/* */ \n/* */ \n/* 312 */ if (i < 0) {\n/* 313 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ \n/* 319 */ if (isLastFilePart && this.leftOver != null) {\n/* */ \n/* 321 */ line = new String(this.leftOver, ReversedLinesFileReader.this.encoding);\n/* 322 */ this.leftOver = null;\n/* */ } \n/* */ \n/* 325 */ return line;\n/* */ }", "List<String[]> readAll();", "public ArrayList<ArrayList<Character> > reader(java.io.InputStream in) throws IOException{\n String s = \"\";\n int data = in.read();\n while(data!=-1){\n s += String.valueOf((char)data);\n data = in.read();\n }\t\t\t\t\t\t\t\t// s now has the input file stored as a string\n ArrayList<ArrayList<Character> > arr = new ArrayList<>();\n for(int i = 0;i<s.length();){\n ArrayList<Character> a = new ArrayList<>();\n while(s.charAt(i)!='\\n'){\n if((s.charAt(i)-'a'>=0&&s.charAt(i)-'a'<=25)||(s.charAt(i)-'0'>=0&&s.charAt(i)-'0'<=9)){ //taking only alphanumerics\n a.add(s.charAt(i));\n }\n i++;\n }\n arr.add(a);\n i++;\n }\n return arr;\n }", "public interface Reader {\n public List<String> readAllLines();\n}", "@SuppressWarnings(\"resource\")\n \tpublic String[] readTextFileOutputLinesArray(String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(Common.testOutputFileDir + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") && (str.length() != 0)) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}", "private static String readAll(Reader rd,boolean graph) throws IOException {\n StringBuilder sb = new StringBuilder();\n int cp;\n int count = 0;\n while ((cp = rd.read()) != -1) {\n count++;\n sb.append((char) cp);\n }\n //System.out.println(sb.toString());\n if(graph == false) {\n System.out.println(sb.deleteCharAt(0));\n System.out.println(sb.deleteCharAt(count - 2));\n }\n return sb.toString();\n }", "public static String[] parseLines(String text)\n {\n return StringTools.parseStringArray(text, \"\\r\\n\");\n }", "public final String readNextLine() throws IOException {\r\n String str;\r\n if (buf_end-buf_pos <= 0) {\r\n if (fillBuffer() < 0) {\r\n throw new IOException(\"Error filling buffer!\");\r\n }\r\n }\r\n int lineEnd = -1;\r\n for (int i = buf_pos; i < buf_end; i++) {\r\n if (buffer[i] == '\\n') {\r\n lineEnd = i;\r\n break;\r\n }\r\n }\r\n if (lineEnd < 0) {\r\n StringBuilder input = new StringBuilder(256);\r\n int c;\r\n while (((c = read()) != -1) && (c != '\\n')) {\r\n input.append((char)c);\r\n }\r\n if ((c == -1) && (input.length() == 0)) {\r\n return null;\r\n }\r\n return input.toString();\r\n }\r\n\r\n if (lineEnd > 0 && buffer[lineEnd-1] == '\\r') {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos -1);\r\n }\r\n else {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos);\r\n }\r\n buf_pos = lineEnd +1;\r\n return str;\r\n }", "public String readString() {\n final int BUF_SIZE = 100;\n byte[] byteDest = new byte[BUF_SIZE];\n String ret = \"\";\n int num = BUF_SIZE;\n try {\n while (!ret.contains(\"\\r\")) {\n if ((num = in.read(byteDest)) > 0) {\n ret += new String(byteDest, 0, num);\n }\n }\n } catch (IOException e) {\n print(\"Error reading String from \" + portName);\n }\n print(\"Read :\" + ret + \":\");\n return ret;\n }", "public Command[] readCommands() {\n\t\tList<Command> result = new ArrayList<Command>();\n\t\tCommand next = null;\n\t\tdo {\n\t\t\tnext = readCommand();\n\t\t\tif (next!=null) {\n\t\t\t\tresult.add(next);\n\t\t\t}\n\t\t} while (next!=null);\n\t\treturn (Command[])result.toArray(new Command[0]);\n }", "static String slurp(InputStream stream) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line).append(System.lineSeparator());\n }\n br.close();\n return sb.toString();\n }", "public String[] readFromFile(Path destination) throws IOException {\n\t\ttry (BufferedReader buffer = Files.newBufferedReader(destination)) {\n\t\t\treturn (buffer.lines().collect(Collectors.joining(\"\\n\"))).split(\",\");\n\t\t}\n\t}", "public static List<String> readLines(URL url) throws IOException {\n return readLines(newReader(url));\n }", "public String readLine() {\n if(in.hasNextLine()) {\n return in.nextLine();\n } else {\n // remote host closed connection!\n cleanup();\n return null;\n }\n }", "private static String[] readFile(String file){\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(file));\n\t\t\tString line;\n\t\t\tString data = \"\";\n\t\t\twhile((line = in.readLine()) != null){\n\t\t\t\tdata = data + '\\n' + line;\t\t\t}\n\t\t\tin.close();\n\t\t\tString[] data_array = data.split(\"\\\\n\");\n\t\t\treturn data_array;\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tString[] shouldNeverReturn = new String[1];\n\t\treturn shouldNeverReturn;\n\t}", "public static void read8() {\n List<String> list = new ArrayList<>();\n\n try (Stream<String> stream = Files.lines(Paths.get(filePath))) {\n\n //1. filter line 3\n //2. convert all content to upper case\n //3. convert it into a List\n list = stream\n .filter(line -> !line.startsWith(\"line3\"))\n .map(String::toUpperCase)\n .collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }", "public static Stream<List<String>> parse(InputStream in) {\n BufferedReader br = UTF8IoUtils.readerFromStream(in);\n return br.lines().map(CSVUtils::parseLine);\n }", "public String read() {\n\t\tString Line = \"\";\n\t\tInteger[] byteCodes = compressFileReader();\n\t\tif (byteCodes == null)\n\t\t\treturn null;\n\t\tint index = 0;\n\t\tint nextCode = byteCodes[index++];\n\t\tString val = readingMap[nextCode];\n\n\t\twhile (index < byteCodes.length - 1) {\n\t\t\tLine += val;\n\t\t\tnextCode = byteCodes[index++];\n\t\t\tString s = readingMap[nextCode];\n\t\t\tif (s == null) {\n\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\tint i = 0;\n\t\t\t}\n\t\t\tif (readingkeysCount == nextCode)\n\t\t\t\ts = val + val.charAt(0);\n\t\t\tif (readingkeysCount < 256 + keysPossible)\n\t\t\t\treadingMap[readingkeysCount++] = val + s.charAt(0);\n\t\t\tval = s;\n\t\t}\n\t\tLine += val;\n\t\treturn Line + '\\n';\n\t}", "public String readFileBufferedReader() {\n String result = \"\";\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(new File(ALICE_PATH)));\n\n for (String x = in.readLine(); x != null; x = in.readLine()) {\n result = result + x + '\\n';\n }\n\n } catch (IOException e) {\n }\n\n if(in != null)try {\n in.close();\n } catch (IOException e) {\n }\n\n return result;\n }", "private String[] getLine(BufferedReader br) throws IOException {\n\t\tString strLine = null;\n\t\tString[] args = null;\n\t\twhile (args == null) {\n\t\t\tif ((strLine = br.readLine()) == null)\n\t\t\t\treturn null;\n\n\t\t\tstrLine = strLine.trim();\n\t\t\tif (strLine.equals(\"\"))\n\t\t\t\tcontinue;\n\t\t\tif (strLine.startsWith(\"#\"))\n\t\t\t\tcontinue;\n\n\t\t\targs = strLine.split(MocaConstants.SEPARATOR);\n\t\t}\n\t\treturn args;\n\t}", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "public List<String> readInputStream(InputStream inputStream) throws IOException {\n\t\tint sizeOfStream = inputStream.available();\n\t\tbyte[] bytes = new byte[sizeOfStream];\n\t\tinputStream.read(bytes, 0, sizeOfStream);\n\t\treturn Arrays.asList(new String(bytes, StandardCharsets.UTF_8).split(\",\"));\n\t}", "public synchronized void readLog() {\n MemoryCache instance = MemoryCache.getInstance();\n try (Stream<String> stream = Files.lines(Paths.get(path)).skip(instance.getSkipLine())) {\n stream.forEach(s -> {\n Result result = readEachLine(s);\n instance.putResult(result);\n instance.setSkipLine(instance.getSkipLine() + 1);\n });\n } catch (IOException e) {\n logger.error(\"error during reading file \" + e.getMessage());\n }\n }", "static String readLine(InputStream in, boolean ignoreEmpty) throws IOException {\n\t\tByteArrayOutputStream buffer = new ByteArrayOutputStream(1024 * 8);\n\t\tdo {\n\t\t\tint ch;\n\t\t\twhile ((ch = in.read()) != -1) {\n\t\t\t\tif (ch == '\\r') {\n\t\t\t\t\tin.read(); // discard next '\\n'\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbuffer.write(ch);\n\t\t\t}\n\t\t\tif (ch == -1) {\n\t\t\t\tthrow new EOFException();\n\t\t\t}\n\t\t} while (ignoreEmpty && buffer.size() == 0);\n\t\treturn buffer.toString();\n\t}", "private static String[] readFile(String path) throws FileNotFoundException{\n\t\tjava.io.File file = new java.io.File(path);\n\t\tjava.util.Scanner sc = new java.util.Scanner(file); \n\t\tStringBuilder content = new StringBuilder();\n\t\twhile (sc.hasNextLine()) {\n\t\t String line = sc.nextLine();\n\t\t if (!line.startsWith(\"!--\")){\n\t\t \tline = line.trim();\n\t\t \tString[] lineContent = line.split(\"/\");\n\t\t \tfor (String entry : lineContent){\n\t\t \t\tcontent.append(entry);\n\t\t \t\tcontent.append(\"/\");\n\t\t \t}\n\t\t \tcontent.append(\"!\");\n\t\t }\n\t\t}\n\t\tsc.close();\n\t\treturn content.toString().split(\"!\");\n\t}", "private List<String> readFile(String path) throws IOException {\n return Files.readAllLines (Paths.get (path), StandardCharsets.UTF_8);\n }" ]
[ "0.7227531", "0.69394785", "0.65993714", "0.65579814", "0.64941466", "0.64783704", "0.6450658", "0.63777524", "0.6288699", "0.62438905", "0.62312675", "0.6216247", "0.61659515", "0.6133528", "0.6129626", "0.6112474", "0.6110741", "0.6108165", "0.61009353", "0.6086608", "0.6068662", "0.60527295", "0.6034969", "0.6018592", "0.5997616", "0.5969658", "0.59477556", "0.5944253", "0.5939605", "0.59329855", "0.59329855", "0.5924538", "0.59099245", "0.590195", "0.58778405", "0.58771986", "0.5865871", "0.5810115", "0.58073026", "0.57996017", "0.5779331", "0.57626224", "0.5738282", "0.57344437", "0.5723887", "0.57126975", "0.56984144", "0.569726", "0.5696574", "0.5696262", "0.5689472", "0.56686103", "0.56517804", "0.5637028", "0.56191033", "0.56181306", "0.5597709", "0.5597079", "0.55856735", "0.55843717", "0.55727684", "0.55676997", "0.55668443", "0.55649847", "0.5563578", "0.5559053", "0.55579025", "0.5542595", "0.5535613", "0.5523098", "0.55053926", "0.5500009", "0.54696774", "0.5455737", "0.54510534", "0.54266614", "0.5412937", "0.5402662", "0.539336", "0.5392279", "0.5378879", "0.5373309", "0.53702897", "0.5368575", "0.5368366", "0.5364624", "0.53622204", "0.5358358", "0.5344664", "0.5343495", "0.5342536", "0.53329426", "0.532965", "0.5325326", "0.5322245", "0.5319474", "0.5312707", "0.53123254", "0.5310259", "0.53082496" ]
0.75251716
0
reads all remaining tokens from this input stream,parses them as integers;and returns them as an array of integers
public int[] readAllInts(){ String[] fields=readAllStrings(); int[] vals=new int[fields.length]; for (int i=0;i<fields.length;i++){ vals[i]=Integer.parseInt(fields[i]); } return vals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Integer> fromScannerInput() throws IOException {\n\t\tfinal List<Integer> array = new ArrayList<>();\n\t\twhile (scanner.hasNext()) {\n\t\t\tarray.add(\n\t\t\t\t\tInteger.parseInt(\n\t\t\t\t\t\t\tscanner.next()));\n\t\t}\n\t\treturn array;\n\t}", "public List<Integer> readLineAsIntegers() throws IOException {\n List<Integer> ret = new ArrayList<>();\n int idx = 0;\n byte c = read();\n while (c != -1) {\n if (c == '\\n' || c == '\\r')\n break;\n\n // next integer\n int i = 0;\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n\n do {\n i = i * 10 + (c - '0');\n c = read();\n } while (c >= '0' && c <= '9');\n// ret[idx++] = (negative) ? -i : i;\n ret.add((negative) ? -i : i);\n }\n return ret;\n }", "public static int[] readInts() {\n return readAllInts();\n }", "public static int[] readIntegerVector(DataInputStream input) throws IOException {\n int length = input.readInt();\n\n int[] ret = new int[length];\n\n for (int i = 0; i < length; i++) {\n int value = input.readInt();\n ret[i] = value;\n }\n\n return ret;\n }", "public static ArrayList<Integer> extractAllIntegers2(String input) {\n String[] tokens = input.replaceAll(\"[^-+\\\\d]+\", \" \").split(\" \");\n int len = tokens.length;\n ArrayList<Integer> list = new ArrayList<>(len);\n\n String regex = \"[-+]?\\\\d+\";\n Pattern pattern = Pattern.compile(regex);\n for (int i = 0; i < len; i++) {\n Matcher matcher = pattern.matcher(tokens[i]);\n if (matcher.find()) {\n list.add(Integer.parseInt(matcher.group()));\n }\n }\n return list;\n }", "protected int[] readIntArray(BinaryDataReader dataReader) throws IOException\n\t{\n\t\tlong offset = ((long) this.value) & 0xffffffffL;\n\n\t\t// allocate memory for result\n\t\tint[] res = new int[this.count];\n\n\t\t// save pointer location\n\t\tlong saveLoc = dataReader.getFilePointer();\n\n\t\t// fill up array\n\t\tdataReader.seek(offset);\n\t\tfor (int c = 0; c < this.count; c++)\n\t\t{\n\t\t\tres[c] = dataReader.readInt();\n\t\t}\n\t\t\n\t\t// restore pointer and return result\n\t\tdataReader.seek(saveLoc);\n\t\treturn res;\n\t}", "private static int[] rmi(BufferedReader br) throws IOException {\n String[] arr = br.readLine().split(SPLIT_CHAR);\n int[] vals = new int[arr.length];\n\n for (int i = 0; i < arr.length; i++) {\n vals[i] = i(arr[i]);\n }\n\n return vals;\n }", "public static int[] stringToIntArray(String instr, String delim)\n throws NoSuchElementException, NumberFormatException {\n StringTokenizer toker = new StringTokenizer(instr, delim);\n int intArray[] = new int[toker.countTokens()];\n int i = 0;\n \n while (toker.hasMoreTokens()) {\n String sInt = toker.nextToken();\n int nInt = Integer.parseInt(sInt);\n intArray[i++] = new Integer(nInt).intValue();\n }\n return intArray;\n }", "private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }", "private int[] getLHSIntFromString(String token) {\n\n if (token == null) {\n return null;\n }\n\n if (token.length() < 1) {\n return null;\n }\n\n Vector<String> lhsInt = new Vector<>();\n\n try (Scanner colonScanner = new Scanner(token)) {\n colonScanner.useDelimiter(\";\");\n\n while (colonScanner.hasNext()) {\n String next = colonScanner.next();\n if (next.equals(\"0\")) {\n return null;\n }\n\n lhsInt.add(next);\n }\n }\n\n //Convert to array of int\n int[] lhsIntArr = new int[lhsInt.size()];\n for(int i = 0; i < lhsIntArr.length; ++i) {\n lhsIntArr[i] = Integer.parseInt(lhsInt.get(i));\n }\n\n //If these rules are being reloaded, the LHS int values need to be adjusted\n if (this.ruleIdOffset > 0) {\n for(int i = 0; i < lhsIntArr.length; ++i) {\n lhsIntArr[i] += this.ruleIdOffset;\n }\n }\n\n return lhsIntArr;\n }", "public int[] getIntegerArray(String subExpression) {\n int[] result = null;\n String expression = contextNode + \"/\" + subExpression;\n try {\n NodeList nl = (NodeList)xp.evaluate(expression, source, XPathConstants.NODESET);\n int n = nl.getLength();\n if (n > 0) {\n result = new int[n];\n for (int i = 0; i < n; i++) result[i] = Integer.parseInt(nl.item(i).getTextContent());\n }\n } catch(Exception e) {\n Util.log(\"XML error: can't read node \" + expression + \".\");\n Util.logException(e);\n }\n return result;\n }", "public static int[] readMysteriousNumbers(String filename) throws Exception {\n File file = new File(filename);\n Scanner counter = new Scanner(file);\n int numLines = 0;\n while(counter.hasNextLine()){\n counter.nextLine();\n numLines++;\n }\n int[] arr = new int[numLines];\n\n\n\n Scanner reader = new Scanner(file);\n int index = 0;\n while(reader.hasNextLine()){\n arr[index] = Integer.parseInt(reader.nextLine());\n index++;\n }\n\n\n\n\n return arr;\n /*\n List<Integer> nums = new ArrayList<>();\n while (scanner.hasNextInt()) {\n nums.add(scanner.nextInt());\n }\n int[] ret = new int[nums.size()];\n for(int i = 0;i < ret.length;i++) {\n ret[i] = nums.get(i);\n }\n return ret*/\n }", "public Integer[] compressFileReader() {\n\t\tint index = 0;\n\t\tString input = \"\";\n\t\ttry {\n\t\t\tint nextChar = 0;\n\t\t\twhile (nextChar != (int) '\\n') {\n\t\t\t\tnextChar = 0;\n\t\t\t\tfor (int i = 0; i < codeLength; i++) {\n\t\t\t\t\tnextChar <<= 1;\n\t\t\t\t\tif (bufferCount == 0) {\n\t\t\t\t\t\tbuffer = in.read();\n\t\t\t\t\t\tbufferCount = 8;\n\t\t\t\t\t}\n\t\t\t\t\tif (buffer == -1) {// in.close();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbufferCount--;\n\t\t\t\t\tif ((buffer >> (bufferCount) & 1) == 1)\n\t\t\t\t\t\tnextChar |= 1;\n\t\t\t\t}\n\t\t\t\tinput = input + nextChar + \",\";\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] str = input.split(\",\");\n\t\tInteger[] inputArray = new Integer[str.length];\n\t\tfor (String st : str)\n\t\t\tinputArray[index++] = Integer.parseInt(st);\n\t\treturn inputArray;\n\n\t}", "private static int[] parseNumbers(String numbersString) {\n\t\tStringTokenizer tokenizer = new StringTokenizer(numbersString, \",\");\n\t\tint numbers[] = new int[tokenizer.countTokens()];\n\t\tint count = 0;\n\n\t\twhile (tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tnumbers[count++] = Integer.parseInt(tokenizer.nextToken());\n\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\tSystem.out.println(\"Malformed Input. Please use a comma seperated list of Integers.\");\n\t\t\t\tnfe.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn numbers;\n\t}", "public int getInt() throws NoSuchElementException,\n\t NumberFormatException\n {\n\tString s = tokenizer.nextToken();\n\treturn Integer.parseInt(s);\n }", "public static int [] readMatrix(){\n int[] matrix=null;\n try {\n String linea;\n if((linea = br.readLine()) != null){\n String[] split = linea.split(\",\");\n matrix = new int[split.length];\n for (int i = 0; i < matrix.length; i++) {\n matrix[i] = Integer.parseInt(split[i]);\n }\n }else{\n br.close();\n }\n } catch (IOException ex) {\n System.err.println(\"Error al leer del buffer\");\n }\n return matrix;\n }", "public static int[] buildArray() throws IOException {\r\n\r\n //Variable initializations\r\n int[] intArray = {};\r\n int sumOfElements = 0;\r\n int index = 0;\r\n \r\n //Initialization of File and Scanner objects\r\n \r\n File sumOfIntegers = new File(fileInput);\r\n Scanner elementScanner = new Scanner(sumOfIntegers);\r\n\r\n //Loop that increases the num of array elements by 1 every time\r\n //it acknowledges an integer value within the file and subtracts\r\n //1 from the array elements when the sentinel value is reached.\r\n while (elementScanner.hasNextInt()) {\r\n sumOfElements++;\r\n \r\n \r\n //Assign next int scanner method to x variable\r\n //Used to process if boolean condition\r\n int x = elementScanner.nextInt();\r\n\r\n //When -999 sentinel value is reached reduce num of array elements\r\n //by 1 since we do not want it included\r\n if (x == -999) {\r\n sumOfElements = sumOfElements - 1;\r\n intArray = new int[sumOfElements];\r\n }\r\n //Assign sumOfElements as num of array elements\r\n intArray = new int[sumOfElements]; \r\n\r\n }\r\n\r\n //new scanner to reset abstract cursor of file\r\n elementScanner = new Scanner(sumOfIntegers);\r\n for (index = 0; index < sumOfElements; index++) {\r\n int x = elementScanner.nextInt();\r\n\r\n if (x != -999) {\r\n intArray[index] = x;\r\n }\r\n\r\n }\r\n\r\n //Closes the file/scanner\r\n elementScanner.close();\r\n\r\n return intArray;\r\n }", "private static int[] readData(int size, String filename) throws FileNotFoundException {\n\t\tint[] input = new int[size];\t\n\t\tScanner scanner = new Scanner(new File(filename));\n \n int i = 0;\n while (scanner.hasNext() && i < size)\n {\n \tinput[i] = Integer.parseInt(scanner.next());\n \ti++;\n }\n scanner.close();\n\t return input;\n\t}", "public int nextInt()\r\n\t{\r\n\t\tif(st == null || !st.hasMoreTokens())\r\n\t\t\tnewst();\r\n\t\treturn Integer.parseInt(st.nextToken());\r\n\t}", "public int[] readBasicInfo() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Creates a new array to read the first line of data to (is an array because need to convert to int list)\n\t\tString textData;\n\t\t\n\t\t//Reads the first line of the text file into the array\n\t\ttextData = textReader.readLine();\n\t\t\n\t\tint[] data = new int[5];\n\t\t//Create a holding variable that will help to convert the String list over to an int list\n\t\tString[] tempList = new String[6];\n\t\t//List of deliminations that will be parsed out of the read strings in the string list that the function is passed\n\t\tString delims = \"[,()]+\";\n\t\t//Splits the strings from the file by the parenthesis and the commas\n\t\ttempList = textData.split(delims);\n\t\tfor (int i = 1; i < tempList.length; i++)\n\t\t\tdata[i-1] = Integer.parseInt(tempList[i]);\n\t\t\n\t\t//Returns the array containing the first line of the text file\n\t\treturn data;\n\t}", "public int parse()\n\t{\n\t\tString[] lines = data.split(System.getProperty(\"line.separator\"));\n\n\t\t//A '1' at the first line on the first char indicate that it has a saved data\n\t\tif(lines[0].charAt(0) == 0|| data == null || data.equals(\"\"))\n\t\t{\n\t\t\treturn -1; // should return an error or -1 to indicate so\n\t\t}\n\n\t\tfor(int i = 0;i<lines.length;i++)\n\t\t{\n\t\t\tdataArray[i] =\tInteger.parseInt(lines[i]);\n\t\t}\n\n\t\treturn 1; \n\t}", "private static List<Integer> parse_line(String line, int d) throws Exception {\n\t List<Integer> ans = new ArrayList<Integer>();\n\t StringTokenizer st = new StringTokenizer(line, \" \");\n\t if (st.countTokens() != d) {\n\t throw new Exception(\"Bad line: [\" + line + \"]\");\n\t }\n\t while (st.hasMoreElements()) {\n\t String s = st.nextToken();\n\t try {\n\t ans.add(Integer.parseInt(s));\n\t } catch (Exception ex) {\n\t throw new Exception(\"Bad Integer in \" + \"[\" + line + \"]. \" + ex.getMessage());\n\t }\n\t }\n\t return ans;\n\t }", "public int[] getIntArray(String name)\r\n throws NumberFormatException\r\n {\r\n String[] data = getString(name).split(\",\");\r\n int[] value = new int[data.length];\r\n for( int i=0; i<data.length; i++ )\r\n value[i] = Integer.parseInt(data[i].trim());\r\n \r\n return value;\r\n }", "public int readInt(){\n\t\ttry{\n\t\t\treturn scanner.nextInt();\n\t\t}catch (InputMismatchException e){\n\t\t\tString token=scanner.next();\n\t\t\tthrow new InputMismatchException(\"the next token is\\\"\"+token+\"\\\"\");\n\t\t}\n\t\tcatch (NoSuchElementException e){\n\t\t\tthrow new NoSuchElementException(\"no more tokens are available\");\n\t\t}\n\t}", "public void tokenizeAndParse(){\n StringTokenizer st1 = new StringTokenizer(Strinput, \" \");\n while (st1.hasMoreTokens()){\n String temp = st1.nextToken();\n if(!temp.equals(\"Rs\")&&!temp.equals(\"Ri\")){\n melody.add(Integer.decode(temp.substring(0,2)));\n }\n\n }\n\n }", "public static int[] split2ints(String src, String sep) {\n String[] strs = split(src, sep);\n int[] ints0 = new int[strs.length];\n int nn = 0;\n for (int i = 0, n = strs.length; i < n; i++) {\n if (!strs[i].equals(\"\")) {\n try {\n ints0[nn] = Integer.parseInt(strs[i]);\n } catch (Exception e) {\n ints0[nn] = 0;\n }\n nn++;\n }\n }\n int[] ints1 = new int[nn];\n System.arraycopy(ints0, 0, ints1, 0, nn);\n return ints1;\n }", "private static int parseAndStripInt(InputStream in) throws IOException, PNMReaderException {\n\t\treturn parseAndStripInt(in, Integer.MAX_VALUE, (int)Math.ceil(Math.log10(Integer.MAX_VALUE)), true);\n\t}", "public int[] getIntArray(String name, String delimiter) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn new int[]\n\t\t\t\t\t{\n\t\t\t\t\t\t\t((Number) val).intValue()\n\t\t\t\t\t};\n\t\t}\n\t\t\n\t\tint c = 0;\n\t\tString[] vals = ((String) val).split(delimiter);\n\t\tint[] result = new int[vals.length];\n\t\tfor (String v : vals) {\n\t\t\ttry {\n\t\t\t\tresult[c++] = Integer.parseInt(v);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new IllegalArgumentException(\"Integer value required, but found: \" + val);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private static int[][] readInput() throws Exception {\r\n\t\t\r\n\t\t// Read the input into a array of strings.\r\n\t\tList<String> inputLines = new ArrayList<String>();\r\n\t\tString currLine = \"\";\r\n\t\ttry {\r\n\t\t\t// Read the content of the file into an array of strings.\r\n\t\t\tScanner myScanner = new Scanner(new File(myFileName));\r\n\t\t\twhile((currLine = myScanner.nextLine()) != null) {\r\n\t\t\t\t\r\n\t\t\t\tinputLines.add(currLine);\r\n\r\n\t\t\t\tif (!myScanner.hasNextLine()) {\r\n\t\t\t\t\tmyScanner.close();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Based out of the number of lines in the input file\r\n\t\t\t// create a nXn matrix.\r\n\t\t\tint max = inputLines.size();\r\n\t\t\tint[][] data = new int[max][max];\r\n\t\t\tint count = 0;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\tfor (int j = 0; j < max; j++) {\r\n\t\t\t\t\tdata[i][j] = INFINITY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Populate the nXn matrix.\r\n\t\t\tfor(int i = 0; i < inputLines.size(); i++) {\r\n\t\t\t\tcurrLine = inputLines.get(i);\r\n\t\t\t\tString[] splitLine = currLine.split(\"\\t\");\r\n\t\t\t\tfor(int j = 0; j < splitLine.length; j++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdata[count][j] = Integer.parseInt(splitLine[j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (NumberFormatException ex) { \r\n\t\t\t\t\t\t//do nothing\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\t\t\t\r\n\t\t\treturn data;\r\n\t\t\t\r\n\t\t} catch(Exception ex) {\r\n\t\t\tSystem.out.println(ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "int[] getInts();", "public static IntList readIntVector(BufferedReader reader) throws IOException {\r\n int dim = Integer.parseInt(reader.readLine());\r\n IntList vector = new IntArrayList(dim);\r\n for (int i = 0; i < dim; i++)\r\n vector.add(i, Integer.parseInt(reader.readLine()));\r\n\r\n return vector;\r\n }", "public int readInt() throws IOException {\n int token = fTokenizer.nextToken();\n if (token == StreamTokenizer.TT_NUMBER)\n return (int) fTokenizer.nval;\n\n String msg = \"Integer expected in line: \" + fTokenizer.lineno();\n throw new IOException(msg);\n }", "public int[] getAsInts() {\n if (data instanceof int[]) {\n return (int[])data;\n } else if (data instanceof char[]){\n char[] cdata = (char[])data;\n int[] idata = new int[cdata.length];\n for (int i = 0; i < cdata.length; i++) {\n idata[i] = (int)(cdata[i] & 0xffff);\n }\n return idata;\n } else if (data instanceof short[]){\n short[] sdata = (short[])data;\n int[] idata = new int[sdata.length];\n for (int i = 0; i < sdata.length; i++) {\n idata[i] = (int)sdata[i];\n }\n return idata;\n } else {\n throw new ClassCastException(\n \"Data not char[], short[], or int[]!\");\n }\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tn = Integer.parseInt(bf.readLine());\n\t\tarr = new int[n];\n\t\tStringTokenizer st = new StringTokenizer(bf.readLine());\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = Integer.parseInt(st.nextToken());\n\t\t}\n\t\tif(next()) {\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t}", "private int[][] readPuzzle(File f) throws NumberFormatException, IOException {\n\t\tint[][] out = new int[N + 1][N + 1];\n\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\tString line = null;\n\t\tint row = 1;\n\t\ttry {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.isBlank() || row > N)\n\t\t\t\t\tcontinue;\n\t\t\t\tString[] vals = line.split(\" \");\n\t\t\t\tif (vals.length != N)\n\t\t\t\t\treturn null;\n\t\t\t\tfor (int j = 0; j < vals.length; j++) {\n\t\t\t\t\tout[row][j + 1] = Integer.parseInt(vals[j]);\n\t\t\t\t}\n\t\t\t\trow++;\n\t\t\t}\n\t\t} finally {\n\t\t\tbr.close();\n\t\t}\n\t\treturn out;\n\t}", "public int[] toIntArray()\r\n {\r\n int[] a = new int[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (Integer) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "private int[] parse(String version) {\n\t\tValidator.nonEmpty(version, \"The version string can't be empty or null!\");\n\t\treturn Stream.of(version.split(\"\\\\.\"))\n\t\t\t\t.mapToInt(Integer::parseInt).toArray();\n\t}", "private static int[][] processInput (String info) throws FileNotFoundException, IOException\n {\n BufferedReader input = new BufferedReader(new FileReader(info));\n ArrayList<Integer> pointList = new ArrayList<Integer>();\n String point;\n while ((point = input.readLine()) != null)\n {\n StringTokenizer st = new StringTokenizer(point);\n pointList.add(Integer.parseInt(st.nextToken()));\n pointList.add(Integer.parseInt(st.nextToken()));\n }\n int[][] pointSet = new int[2][pointList.size()/2];\n int j = 0;\n for (int i = 0; i<=pointList.size()-1; i=i+2)\n {\n pointSet[0][j] = pointList.get(i);\n pointSet[1][j] = pointList.get(i+1);\n j++;\n }\n return pointSet;\n }", "private static int readFromBuffer() throws IOException{\n int n;\n // The number of ints read into the buffer after a read.\n int intsRead;\n // The current position in the byte buffer.\n int pos;\n // The current integer values being processed.\n int x;\n // The current position in the integer array of values to be sorted.\n int index = 0;\n\n // The loop condition reads in the next buffer of bytes from the file, until there are no\n // more bytes to be read in.\n while ((n = fis.read(buf)) != READ_FINISHED) {\n intsRead = n / BYTES_TO_INTS;\n\n // iterate through all the ints currently being held in the byte buffer\n // if they fall in the given bound, add them to the int array to be sorted.\n for (int i = 0; i < intsRead; i++) {\n pos = BYTES_TO_INTS * i;\n\n // Convert the next set of 4 bytes to an integer.\n x = (((int) buf[pos]) & 255) << 24\n | ((((int) buf[pos + 1]) & 255) << 16)\n | ((((int) buf[pos + 2]) & 255) << 8)\n | ((((int) buf[pos + 3]) & 255));\n\n\n // put the current integer into the int array\n ints[index] = x;\n index++;\n }\n }\n\n\n // This returns the number of values selected to be sorted.\n return index;\n }", "public int[] byte2intArray(byte[] bytes){\n ByteBuffer buf = ByteBuffer.wrap(bytes);\n\n int[] result = new int[bytes.length / Integer.BYTES];\n for (int i = 0; i < result.length; i++) {\n result[i] = buf.getInt();\n }\n\n return result;\n }", "private static Integer getInteger(BufferedReader reader) throws IOException{\n Integer result=null;\n while(result==null) {\n try {\n result = Integer.parseInt(reader.readLine().trim());\n } catch (NumberFormatException e) {\n throw new NumberFormatException(\"You should feed integer for this input.\");\n }\n }\n return result;\n }", "public static List<Integer> extractIntegers(String string) {\r\n\t\t\tList<Integer> integers = new ArrayList<Integer>();\r\n\r\n\t\t\tScanner scanner = new Scanner(string);\r\n\t\t\tscanner.useDelimiter(\"\\\\D\");\r\n\r\n\t\t\twhile (scanner.hasNextInt() || scanner.hasNext()) {\r\n\t\t\t\tif (scanner.hasNextInt()) {\r\n\t\t\t\t\tintegers.add(scanner.nextInt());\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tscanner.next();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tscanner.close();\r\n\t\t\treturn integers;\r\n\t\t}", "private static int[] enterNumbers() {\n\t\tint[] numbers = new int[2];\n\t\tSystem.out.print(\"Geben Sie die erste Zahl ein: \");\n\t\tnumbers[0] = readInt();\n\t\tSystem.out.print(\"Geben Sie die zweite Zahl ein: \");\n\t\tnumbers[1] = readInt();\n\t\treturn numbers;\n\t}", "public static ArrayList<Integer> extractAllIntegers1(String input) {\n ArrayList<Integer> list = new ArrayList<>();\n\n String regex = \"[-+]?\\\\d+\";\n Pattern pattern = Pattern.compile(regex);\n Matcher matcher = pattern.matcher(input);\n while (matcher.find()) {\n list.add(Integer.parseInt(matcher.group()));\n }\n return list;\n }", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "private static int [] yy_unpack() {\n int [] trans = new int[5476];\n int offset = 0;\n offset = yy_unpack(yy_packed0, offset, trans);\n return trans;\n }", "public static Integer[] acceptIntegerArrayFromUser(String[] args) {\n\n\t\tInteger[] array = null;\n\t\tScanner in = null;\n\t\ttry {\n\t\t\tif (args.length > 0) {\n\t\t\t\tarray = readInputArrayFromFile(array, args[0]);\n\t\t\t}\n\t\t\tif (array == null || array.length == 0) {\n\t\t\t\tarray = readInputFromUser(in);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (in != null) {\n\t\t\t\tin.close();\n\t\t\t}\n\t\t}\n\t\treturn array;\n\n\t}", "public int [] covertirInt(String [] a) {\n\t\n\t\n\t int [] temporal = new int [a.length-1];\n\t\n\t\n\t for (int i =0; i<temporal.length;i++) {\n\t \n\t\t temporal[i]=Integer.parseInt(a[i+1]);\n\t }\n \n \n\t return temporal;\n\t\n}", "private static int [] yy_unpack() {\n int [] trans = new int[8174];\n int offset = 0;\n offset = yy_unpack(yy_packed0, offset, trans);\n return trans;\n }", "public static List<List<Integer>> getR(Scanner input) {\r\n\t\tList<List<Integer>> R = new ArrayList<List<Integer>>();\r\n\t\t\r\n\t\tint i = 0;\r\n\t\twhile(input.hasNextLine()) {\r\n\t\t\tR.add(new ArrayList<Integer>());\r\n\t\t\tString line = input.nextLine();\r\n\t\t\tScanner lineScanner = new Scanner(line);\r\n\t\t\t\r\n\t\t\twhile(lineScanner.hasNext()) {\r\n\t\t\t\tString token = lineScanner.next();\r\n\t\t\t\tif(token.equalsIgnoreCase(\"NA\")) {\r\n\t\t\t\t\tR.get(i).add(INFINITY);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tR.get(i).add(Integer.parseInt(token));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ti++;\r\n\t\t\tlineScanner.close();\r\n\t\t}\r\n\t\t\r\n\t\treturn R;\r\n\t}", "private static int[] internal16Readin(String name) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(FileUtils.getResourceInputStream(\"/luts/\" + name)));\n String strLine;\n\n int[] intArray = new int[65536];\n int counter = 0;\n while ((strLine = br.readLine()) != null) {\n\n String[] array = strLine.split(\" \");\n\n for (int i = 0; i < array.length; i++) {\n if (array[i].equals(\" \") || array[i].equals(\"\")) {\n\n } else {\n intArray[counter] = Integer.parseInt(array[i]);\n counter++;\n }\n }\n }\n br.close();\n return intArray;\n } catch (Exception e) {// Catch exception if any\n System.err.println(\"Error open internal color table \" + name);\n e.printStackTrace();\n return null;\n }\n }", "public int[] numbers();", "public int[] stringToIntArray(String input){\n \tSystem.out.println(input);\n \n \tString[] StringArray = input.split(\",\");\n \tfor(String intString:StringArray)\n \t {\n \t\tSystem.out.println(intString);\n \t }\n \n \tint[] intArray = new int[StringArray.length];\n \n \tint i = 0;\n \tfor(String intString:StringArray)\n \t {\n \t\tSystem.out.println(intString);\n \t\t int x = Integer.parseInt(intString);\n \t\t intArray[i] = x;\n \t\t i++;\n \t }\n \treturn intArray;\n }", "public byte[] readRawInt() throws IOException {\n byte[] bytes = new byte[5];\n bytes[0] = (byte) Type.INT.code;\n in.readFully(bytes, 1, 4);\n return bytes;\n }", "public int[] getIntList();", "int[] parseIntArray(String[] ar)\n {\n int[] int_ar = new int[ar.length];\n for (int i = 0; i < int_ar.length; i++)\n {\n int_ar[i] = Integer.parseInt(ar[i]);\n }\n return int_ar;\n }", "public abstract int[] toIntArray();", "int[][]getMatrix()throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n //StringTokenizer is useful to accept each row as a single string and then\n // divide it into token. Each token represents an array element.\n StringTokenizer st;\n for(int i=0;i<r;i++)\n {\n String s=br.readLine();\n st=new StringTokenizer(s,\" \");\n for(int j=0;j<c;j++)\n arr[i][j]=Integer.parseInt(st.nextToken());\n }\n return arr;\n }", "private void readInterfaces() throws IOException, ClassFormatException {\n final int interfaces_count = dataInputStream.readUnsignedShort();\n interfaces = new int[interfaces_count];\n for (int i = 0; i < interfaces_count; i++) {\n interfaces[i] = dataInputStream.readUnsignedShort();\n }\n }", "public int[] getStatInt()\n {\n\n int[] statInt = new int[6 + tailLength];\n statInt[0] = maxHeight;\n statInt[1] = tailLength;\n statInt[2] = firstNodeHeight;\n if (this.isFinished)\n {\n statInt[3] = 1;\n }\n else\n {\n statInt[3] = 0;\n }\n if (this.isInitialized)\n {\n statInt[4] = 1;\n }\n else\n {\n statInt[4] = 0;\n }\n if (this.seedInitialized)\n {\n statInt[5] = 1;\n }\n else\n {\n statInt[5] = 0;\n }\n for (int i = 0; i < tailLength; i++)\n {\n statInt[6 + i] = ((Integer)heightOfNodes.elementAt(i)).intValue();\n }\n return statInt;\n }", "abstract int readInt(int start);", "private static Integer[] readInputFromUser(Scanner in) {\n\t\tInteger[] array = null;\n\t\t/**\n\t\t * Accept the quantity of the data along with actual data.\n\t\t */\n\t\tSystem.out.print(\"Please enter number of integers you want to input:\");\n\t\tint s = in.nextInt();\n\t\tarray = new Integer[s];\n\t\tSystem.out.print(\"Please enter Integers:\");\n\n\t\tfor (int i = 0; i < s; i++) {\n\t\t\tarray[i] = in.nextInt();\n\t\t}\n\t\tSystem.out.println(\"Input Array: \" + Arrays.toString(array));\n\t\treturn array;\n\t}", "public static int[] parseInt(String val[]) {\n\n\t\tif (val != null) {\n\t\t\tint ret[] = new int[val.length];\n\n\t\t\tfor (int i = 0; i < val.length; i++) {\n\t\t\t\tret[i] = parseInt(val[i]);\n\t\t\t}\n\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public int readInt() {\n return Integer.parseInt(readNextLine());\n }", "private String getIntToken(char[] characters) {\n\t\tString currentToken = \"\";\n\t\t//look at each character\n\t\tfor (char ch: characters)\n\t\t{\n\t\t\t//check if whitespace\n\t\t\tboolean ws = Character.isWhitespace(ch);\n\t\t\t//check type\n\t\t\tString type = getType(ch);\n\t\t\t\n\t\t\t//not whitespace and new ch is an integer.\n\t\t\tif (!ws && Objects.equals(type, \"int\"))\n\t\t\t{\n\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t}\n\t\t\t//not whitespace and special ch\n\t\t\telse if (!ws && Objects.equals(type, \"special\"))\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse if ( ws )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse //ch type cannot follow integer \n\t\t\t{\n\t\t\t\tSystem.out.println(\"invalid type follows int\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t//ran out of tokens to process\n\t\treturn currentToken;\n\t}", "public List<int[]> readCSVint() {\n\t\tCSVReader reader;\n\t\t// The strings pulled from file\n\t\tList<String[]> storedEntries = new ArrayList<String[]>();\n\t\t// Each string converted to int.\n\t\tList<int[]> convertedEntries = new ArrayList<int[]>();\n\n\t\t// Read the entire file into a List.\n\t\ttry {\n\t\t\treader = new CSVReader(new FileReader(getCSVFolder() + File.separator + getFileName() + \".csv\"));\n\t\t\tstoredEntries = reader.readAll();\n\t\t\treader.close();\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// The current list contains strings, so we convert them.\n\t\tint size = storedEntries.get(0).length;\n\t\tfor (String[] row : storedEntries) {\n\t\t\tint[] convertedRow = new int[size];\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tconvertedRow[i] = Integer.parseInt(row[i]);\n\t\t\t}\n\t\t\tconvertedEntries.add(convertedRow);\n\t\t}\n\n\t\treturn convertedEntries;\n\t}", "private ArrayList<Integer> readIntString(String intString)\n {\n ArrayList<Integer> intList = new ArrayList<Integer>();\n Scanner intStringScanner = new Scanner(intString);\n intStringScanner.useDelimiter(\",\");\n while (intStringScanner.hasNextInt())\n {\n intList.add(new Integer(intStringScanner.nextInt()));\n }\n intStringScanner.close();\n return intList;\n }", "public static int[] parseTimeArray(String timeString, String delimiter)\n\t{\n\t\tint[] timeArray = new int[4];\n\t\tStringTokenizer st = new StringTokenizer(timeString, delimiter);\n\t\tint i = 0;\n\t\twhile (st.hasMoreTokens())\n\t\t{\n\t\t\ttimeArray[i] = Integer.parseInt(st.nextToken());\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn timeArray;\n\t}", "public static int[] converter(String[] a){\n int size = a.length - 1;\n int[] integers = new int[size];\n for (int i = 0; i < size; i++) {\n integers[i] = Integer.parseInt(a[i+1]);\n }\n return integers;\n }", "public Number[] parse(ByteBuffer bb) {\r\n return formatter.parse(bb);\r\n }", "public static int[] toIntArray(String s) {\n\t\tString[] stringArray = s.split(\"(?!^)\");\n\t\tint[] intArray = new int[stringArray.length];\n\t\tint i = 0;\n\t\tfor (String string2 : stringArray) {\n\t\t\tint decimal = Integer.parseInt(string2, 16);\n\t\t\tintArray[i] = decimal;\n\t\t\ti++;\n\t\t\t// System.out.println(\"Hex value is \" + decimal);\n\t\t\t// System.out.println(string2);\n\t\t}\n\t\treturn intArray;\n\t}", "protected final long parseUnsignedInt(ByteArrayInputStream stream) throws EOFException\n {\n long value = 0;\n for (int i = 0; i < 4; ++i)\n {\n value = (value << 8) | EASMessage.parseUnsignedByte(stream);\n }\n return value;\n }", "public ArrayList<Integer> obtainSourceArray(String inputName){\n try{\n this.readFileByLines(inputName);\n StringTokenizer tokenizer = new StringTokenizer(this.inputContent.toString());\n\n ArrayList<Integer> source = new ArrayList<Integer>();\n while(tokenizer.hasMoreTokens()){\n source.add(Integer.valueOf(tokenizer.nextToken()));\n }\n return source;\n }catch (Exception e){\n e.printStackTrace();\n }\n\n return null;\n }", "private static void readFileIntoArray (String inputFileName) {\n Path path = Paths.get(inputFileName);\n array = new int[countLines(inputFileName)];\n try {\n Scanner sc = new Scanner(path);\n int i = 0;\n while (sc.hasNextLine()) {\n array[i] = Integer.parseInt(sc.nextLine());\n i++;\n }\n sc.close();\n //sort the array\n MergeSort.mergeSort(array);\n }\n catch(FileNotFoundException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n catch(IOException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n }", "public static int[] toIntArray(String arr[])\r\n\t{\r\n\t\tint length = arr.length;\r\n\t\tint[] numeros = new int[length];\r\n\t\tfor (int i = 0; i < length; ++i) {\r\n\t\t\tnumeros[i] = Integer.parseInt(arr[i]);\r\n\t\t}\r\n\t\treturn numeros;\r\n\t}", "public ArrayList<Integer> readNumbersFromFile() throws FileNotFoundException {\r\n ArrayList<Integer> arrayList = new ArrayList<>();\r\n File file = new File(readFilename);\r\n Scanner scanner = new Scanner(file);\r\n while(scanner.hasNextInt())\r\n {\r\n arrayList.add(scanner.nextInt());\r\n }\r\n return arrayList;\r\n }", "private int[] convertToIntArray(String value) {\r\n\t\tString[] items = StringUtils.split(value, \"#\");\r\n\t\tint[] result = new int[items.length];\r\n\t\tfor (int i = 0; i < items.length; i++) {\r\n\t\t\tresult[i] = Integer.parseInt(items[i]);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public int[] convert(){\r\n int[] arreglo = new int[cedula.length()];\r\n for(int i=0; i<cedula.length(); i++){\r\n // convierte los char en int\r\n arreglo[i] = Character.getNumericValue(cedula.charAt(i));\r\n }\r\n return arreglo;\r\n }", "private int[] getInputIds(String text) {\n\t\tString[] tokens = tokenize(text, Kwargs.empty());\n\t\treturn convertTokensToIds(tokens);\n\t}", "public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight) {\n/* 17 */ int[] var5 = this.parent.getInts(areaX, areaY, areaWidth, areaHeight);\n/* 18 */ int[] var6 = IntCache.getIntCache(areaWidth * areaHeight);\n/* */ \n/* 20 */ for (int var7 = 0; var7 < areaHeight; var7++) {\n/* */ \n/* 22 */ for (int var8 = 0; var8 < areaWidth; var8++) {\n/* */ \n/* 24 */ initChunkSeed((var8 + areaX), (var7 + areaY));\n/* 25 */ var6[var8 + var7 * areaWidth] = (var5[var8 + var7 * areaWidth] > 0) ? (nextInt(299999) + 2) : 0;\n/* */ } \n/* */ } \n/* */ \n/* 29 */ return var6;\n/* */ }", "public int[] toIntArray(){\n int[] array = new int[getSeq().size()];\n for (int i = 0; i < array.length; i++) {\n char c = Character.toUpperCase(getSeq().get(i));\n array[i] = Sequence.convert(c);\n }\n return array;\n }", "public int[] stringToNode(String node) {\n \tString[] temp = node.split(\"\\\\s\");\n \tint[] stuff = new int[temp.length];\n \tfor (int i = 0; i < temp.length; i++) {\n \t\tstuff[i] = Integer.parseInt(temp[i]);\n \t}\n \treturn stuff;\n }", "private static int[] enumerate(String in, int min, int max) {\n List<Integer> result = new ArrayList<Integer>();\n \n // a, b, c\n StringTokenizer tok = new StringTokenizer(in.trim(), \",\");\n while (tok.hasMoreTokens()) {\n \n String str = tok.nextToken().trim();\n int stepsize = 1;\n int start = min;\n int end = max;\n \n // Extract the step size, */2 or 7-10/2\n int stepdivider = str.indexOf('/');\n if (stepdivider > 0) {\n try {\n stepsize = Integer.parseInt(str.substring(stepdivider + 1));\n if (!\"*\".equals(str.substring(0, str.indexOf('/'))))\n throw new IllegalArgumentException(\"Malformed stepsize expression '\" + str + \"', first argument should be *\");\n for (int i = 0; i < max; i++) {\n if (i % stepsize == 0)\n result.add(i);\n }\n return toIntArray(result);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Illegal stepsize in '\" + str + \"'\");\n }\n }\n \n // *, 7-12, 13\n int hyphen = str.indexOf('-');\n if (str.startsWith(\"*\")) {\n return new int[] {};\n } else if (hyphen > 0) {\n try {\n start = Integer.parseInt(toNumber(str.substring(0, hyphen)));\n end = Integer.parseInt(toNumber(str.substring(hyphen + 1)));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Invalid interval in '\" + str + \"'\");\n }\n } else {\n try {\n start = end = Integer.parseInt(toNumber(str));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Invalid number: '\" + str + \"'\");\n }\n }\n \n // Check for minimum / maximum\n if (start < min)\n throw new IllegalArgumentException(\"Value \" + start + \" in '\" + in + \"' is smaller than the minimum of \" + min);\n if (end > max)\n throw new IllegalArgumentException(\"Value \" + end + \" in '\" + in + \"' is larger than the maximum of \" + min);\n \n // Return the result\n for (int i = start; i <= end; i += stepsize) {\n result.add(new Integer(i));\n }\n \n }\n return toIntArray(result);\n }", "public int readInt(){\n\t\tif(sc.hasNextInt()){\n\t\t\treturn sc.nextInt();\n\t\t}\n\t\tsc.nextLine();\n\t\treturn -1;\n\t}", "public Double[] getNumbers() throws IOException {\n List<String> numbersStrs= Files.readAllLines(Paths.get(\"C:\\\\Users\\\\user\\\\Desktop\\\\Software construction git repo\\\\calculator\\\\src\\\\java\\\\com\\\\kelaniya\\\\uni\\\\numbers.txt\"));\n double number1=Integer.parseInt(numbersStrs.get(0));\n double number2=Integer.parseInt(numbersStrs.get(1));\n return new Double[] {number1,number2};\n\n }", "@Override\n public final int readVarint32() throws IOException {\n return (int) readVarint64();\n }", "public int[] getIntArray(String property)\n\tthrows PropertiesPlusException\n\t{\n\t\tString value = getProperty(property);\n\t\tif (value == null)\n\t\t\treturn null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tScanner in = new Scanner(value.trim().replaceAll(\",\", \" \"));\n\t\t\tArrayListInt ints = new ArrayListInt();\n\t\t\twhile (in.hasNext())\n\t\t\t\tints.add(in.nextInt());\n\t\t\tin.close();\n\n\t\t\treturn ints.toArray();\n\t\t}\n\t\tcatch (NumberFormatException ex)\n\t\t{\n\t\t\tthrow new PropertiesPlusException(String.format(\n\t\t\t\t\t\"%s = %s cannot be converted to type int[]\", property, value));\n\t\t}\n\t}", "public int readInt();", "private static int[] getArrayFromInteger(int i1) {\n\t\tString str = String.valueOf(i1);\r\n\t\tint length = str.length();\r\n\t\tint digits[] = new int[length];\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\t// Converting char to int.\r\n\t\t\tdigits[i] = str.charAt(i) - 48;\r\n\t\t}\r\n\t\treturn digits;\r\n\t}", "public static int[] converter(String[] a){\n int size = a.length;\n int[] integers = new int[size];\n for (int i = 0; i < size; i++) {\n integers[i] = Integer.parseInt(a[i]);\n }\n return integers;\n }", "private List<Integer> parseFile(Scanner input) {\n mySimType = input.next();\n myCellShape = input.next();\n neighborPolicy = input.next();\n edgePolicy = input.next();\n isOutlined = input.next();\n initialConfig = input.next();\n\n myNumStates = input.nextInt();\n myStateMap = new HashMap<>();\n for (int i = 0; i < myNumStates; i++){\n var name = input.next();\n var type = input.nextInt();\n var colorString = input.next();\n var image = input.next();\n var prob = Double.parseDouble(input.next());\n var amt = input.nextInt();\n State s = new State(name, type, Color.valueOf(colorString), image, prob, amt);\n myStateMap.put(type, s);\n }\n\n numCols = input.nextInt();\n numRows = input.nextInt();\n\n checkValid();\n\n return getResults(input);\n }", "static IntStream getLengths() {\n return IntStream.rangeClosed(0, 16);\n }", "public int[] leerarchivoalista(String nombredearchivodetexto) throws IOException \r\n\t {\r\n\t FileReader leer = new FileReader(nombredearchivodetexto);\r\n\t \r\n\t BufferedReader bufferedReader = new BufferedReader(leer);\r\n\t\t\tint[] numeros= new int[3001];\r\n\t String leerlinea = null;\r\n\t int i=0;\r\n\t \r\n\t while ((leerlinea = bufferedReader.readLine()) != null) {\r\n\t\t int convertiraentero =Integer.parseInt(leerlinea);\r\n\r\n\t\t\tnumeros[i]= convertiraentero;\r\n\t i++;\r\n\t }\r\n\t \r\n\t bufferedReader.close();\r\n\t \r\n\t return numeros;\r\n\t }", "private static int[] decode(String cad) {\r\n\r\n int result[];\r\n String array[];\r\n\r\n if (cad.equals(\"\")) {\r\n result = new int[0];\r\n } else {\r\n array = cad.split(\"-\");\r\n result = new int[array.length];\r\n for (int i = 0; i < array.length; i++) {\r\n result[i] = Integer.parseInt(array[i]);\r\n }\r\n }\r\n\r\n return result;\r\n\r\n }", "public int[] getIntArray() {\r\n\t\t\r\n\t\treturn (value.getIntArray());\r\n\t}", "public int[] convertNumToDigitArray(String strNum) {\r\n \r\n //Declare Variables\r\n int strLength = strNum.length();\r\n int[] intArray = new int[strLength];\r\n \r\n //Parse Through String Input & Put Into Integer Array\r\n for (int i = 0; i < strLength; i++) {\r\n \r\n intArray[i] = (int)(strNum.charAt(i));\r\n \r\n }\r\n \r\n //Return Value\r\n return intArray;\r\n \r\n }", "public void SLRParser () throws IOException {\n char Action ;\n String tableOutput;\n int num;\n int i;\n SLRParsStack.push(\"0\");\n while (!token.getValue().equals(\"&\")) {\n// System.out.println(token.getType() + \" \" + token.getValue());\n for (i = 0; i < SLRterminal.length; i++)\n {\n if (!BUCheckTerminal(token.getValue()))\n {\n if (SLRterminal[i].equals(\"id\")) {\n break;\n }\n }\n else {\n if (SLRterminal[i].equals(token.getValue()))\n break;\n }\n }\n// System.out.println(SLRParsStack.peek() + \" \" + i);\n tableOutput = BUParseTable[Integer.parseInt(SLRParsStack.peek()) + 1][i + 1];\n// System.out.println(tableOutput);\n Action = tableOutput.charAt(0);\n if (tableOutput.length() == 3)\n {\n num = Character.getNumericValue(tableOutput.charAt(1));\n num *= 10;\n num += Character.getNumericValue(tableOutput.charAt(2));\n }\n else\n {\n num = Character.getNumericValue(tableOutput.charAt(1));\n }\n// System.out.println(token.getValue());\n// System.out.println(Action);\n// System.out.println(num);\n switch (Action) {\n case 's':\n// System.out.println(\"in shift action\");\n SLRParsStack.push(String.valueOf(num));\n token = LA.Scanner();\n// System.out.println(token.getValue());\n break;\n case 'r':\n// System.out.println(\"in reduce action\");\n int numberOfVar = Integer.parseInt(LRTTable[num - 1][1]);\n// System.out.println(SLRParsStack.size());\n while (numberOfVar > 0) {\n SLRParsStack.pop();\n numberOfVar--;\n }\n// System.out.println(\"out of while\");\n// System.out.println(LRTTable[num - 1][0]);\n for (i = 0; i < SLRterminal.length; i++)\n {\n if (SLRterminal[i].equals(LRTTable[num - 1][0]))\n break;\n }\n// System.out.println(i);\n// System.out.println(SLRParsStack.isEmpty() + \" size stack\");\n tableOutput = BUParseTable[Integer.parseInt(SLRParsStack.peek()) + 1][i + 1];\n// System.out.println(tableOutput);\n SLRParsStack.push(String.valueOf(tableOutput.charAt(1)));\n break;\n case 'a':\n// System.out.println(\"in accept\");\n Accept();\n return;\n case 'e':\n// System.out.println(\"in error\");\n error(4);\n }\n }\n\n }", "public int[] numberToArray(String n) {\n\t\tint arr[] = new int[n.length()];\n\t\tfor(int i = 0; i < n.length(); i++) {\n\t\t\tarr[i] = Character.getNumericValue(n.charAt(i));\n\t\t}\n\t\treturn arr;\n\t}", "int[] takeNumberFromUser() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter size of numbers\");\n\t\tint size = scan.nextInt();\n\t\tint[] input = new int[size];\n\t\tfor (int index = 0; index < input.length; index++) {\t\t//taking array element as input on console\n\t\t\tinput[index] = scan.nextInt();\n\t\t}\n\t\tscan.close();\n\t\treturn input; // returning input array\n\t}", "public static ArrayList<Integer> convertSkipStringToArrayInteger(String stringSkips){\n // Help from https://stackoverflow.com/questions/27599847/convert-comma-separated-string-to-list-without-intermediate-container\n // note i did it the non fancy way since i wasn't comfortable with the other\n List<String> numbers = Arrays.asList(stringSkips.split(\",\"));\n\n ArrayList<Integer> numbersInt = new ArrayList<>();\n for (String number : numbers) {\n numbersInt.add(Integer.valueOf(number));\n }\n return numbersInt;\n }" ]
[ "0.68014985", "0.67679125", "0.6669761", "0.6342634", "0.63096786", "0.63068247", "0.61943924", "0.61289674", "0.6091682", "0.60867584", "0.6077276", "0.6073901", "0.60361546", "0.59812534", "0.59354764", "0.58336884", "0.5823126", "0.57795143", "0.5778575", "0.5703867", "0.56900746", "0.56671387", "0.56478876", "0.564766", "0.56288165", "0.5621776", "0.56109405", "0.55934906", "0.558851", "0.5560358", "0.5537959", "0.55158013", "0.5491398", "0.5491083", "0.5486743", "0.5485146", "0.5459572", "0.54570955", "0.5428973", "0.54203", "0.54153615", "0.5413577", "0.54070616", "0.54061717", "0.54045767", "0.540018", "0.5387542", "0.5377746", "0.5377656", "0.53725255", "0.5355441", "0.53497976", "0.5319627", "0.5304549", "0.5285951", "0.5284712", "0.52832955", "0.52766365", "0.52598935", "0.52562034", "0.52529985", "0.5248158", "0.52385485", "0.5238455", "0.5232852", "0.5224051", "0.522291", "0.5220581", "0.5203235", "0.5197586", "0.51966745", "0.5194803", "0.518179", "0.51806563", "0.5165244", "0.51651186", "0.51630265", "0.51621944", "0.5155026", "0.51537424", "0.5145341", "0.5140781", "0.5127014", "0.51200026", "0.51177144", "0.5117007", "0.5115569", "0.51094896", "0.51077396", "0.51067626", "0.51063794", "0.5105254", "0.5093146", "0.508901", "0.5080328", "0.5076676", "0.50395256", "0.50370497", "0.5036544", "0.50301915" ]
0.703488
0
closes this input stream
public void close(){ scanner.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void close() throws IOException {\n input.close();\n }", "public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void close(){\n\t\tin.close();\n\t}", "public void closeStream() {\n output.close();\n input.close();\n }", "public void close() throws IOException\n {\n in.close();\n }", "@Override\n\t public synchronized void close() throws IOException {\n\t\tin.close();\n\t\topen = false;\n\t }", "@Override\n public void close() throws IOException\n {\n InputStream in = _inputSource;\n\n if (in != null) {\n _inputSource = null;\n if (_autoClose) {\n in.close();\n }\n }\n freeBuffers();\n }", "@Override\n\tpublic void close() {\n\t\tfinal Socket input = getSocket();\n\n\t\tif (input != null) {\n\t\t\tif (!input.isClosed()) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (final IOException e) {\n\t\t\t\t\t// we cannot do anything\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void close() {\r\n\t\ttry {\r\n\t\t\t_asciiIn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Error ocurred while closing file \" + _directory + _filename + _filetype + \":\" + e.getMessage());\r\n\t\t} // catch\r\n\t}", "public synchronized void close() {\n try {\n audioInputStream.close();\n } catch (IOException ioe) {\n System.err.println(\"Problem while closing the audioInputSteam\");\n }\n\n }", "public synchronized void close() throws IOException {\n\t\t\tfinish();\n\t\t\tout.close();\n\t\t}", "private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}", "public void close() {\n if (numDigits > 0)\n flush();\n try {\n output.close();\n } catch (IOException e) {\n throw new RuntimeException(e.toString());\n }\n }", "@Override\n public void close() throws IOException\n {\n try\n {\n fAVMRemote.closeInputHandle(fTicketHolder.getTicket(), fHandle);\n }\n catch (Exception e)\n {\n throw new IOException(\"Remote Error closing input stream.\");\n }\n }", "public void close() throws IOException {\n\t\tthis.finish();\n\t\tthis.buffer.close();\n\t\t}", "public void close() throws IOException {\n open = false;\n stream.close();\n }", "@Override\n public void close() {\n backingIterator.close();\n outputBuffer.close();\n isClosed = true;\n }", "protected void close()\n {\n out.close();\n }", "public static void end()\n {\n if(out!=null) {\n out.println(\"close \" + name);\n out.flush();\n }\n }", "@Override\n\t public synchronized void close() throws IOException {\n\t\tout.close();\n\t\topen = false;\n\t }", "public void \n close() \n throws PipeException \n {\n in = -1;\n closedByReader = true;\n }", "@Override\n public void close() throws IOException {\n isClosed = true;\n }", "public void close() throws FormatException, IOException {\n if (in != null) in.close();\n in = null;\n currentId = null;\n }", "public void close() {\n this.output = null;\n }", "public void close()\r\n\t{\r\n\t if (isOpen()) try {\r\n\t \tfd.close();\r\n\t } catch (IOException ex) {\r\n\t \t/* do nothing */\r\n\t } finally {\r\n\t\t thisc = EOF;\r\n\t\t holdc = EOF;\r\n\t\t fd = null;\r\n\t }\r\n\t}", "public void close() {\n this.output.flush();\n this.output.close();\n }", "public void close() throws IOException {\n isClosed = true;\n inputStreamOpened = false;\n outputStreamOpened = false;\n parent.setInactive();\n }", "protected void close() {\n\t\tif(sOutput != null) {\n\t\t\ttry {\n\t\t\t\tsOutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"error closing output stream\");\n\t\t\t}\n\t\t\t\n\t\t\tsOutput = null;\n\t\t}\n\t}", "public void close() throws IOException {\n\t\tin.close();\n \n\t\t// Release the buffer\n\t\tdataIn = null;\n\t\tbuffer = null;\n\t\tif(readRecordsCounter != null) {\n\t\t readRecordsCounter.increment(numRecordsRead);\n\t\t}\n\n\t\t// Return the decompressor\n\t\tif (decompressor != null) {\n\t\t decompressor.reset();\n\t\t CodecPool.returnDecompressor(decompressor);\n\t\t decompressor = null;\n\t\t}\n\t }", "protected void closeStream ()\n {\n stream.close ();\n }", "public void close ()\n {\n StreamHelper.flush (this);\n StreamHelper.close (m_aOS);\n m_aOS = null;\n }", "public static void closeIO()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tinStream.close();\r\n\t\t\toutStream.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void close() {\n try { out.flush(); } catch (Exception e) {}; // just to be sure\n \n cleanup();\n }", "@Override\n void close() throws IOException{\n System.out.print(\"Close\");\n \n }", "public void close() {}", "public void close() throws IOException {\n\t\tistream.close();\n\t\tostream.close();\n\t\tsocket.close();\n\t}", "private void close() {\n\t\t\n//\t\tif (handlingEvent) { return; } // hopefully this is never used\n\t\t\n\t\tif (serialPort != null) {\n\t\t\tUtil.debug(\"close port: \" + serialPort.getName() + \" baud: \" + serialPort.getBaudRate(), this);\n\t\t\t// serialPort.removeEventListener();\n\t\t\tserialPort.close();\n\t\t\tserialPort = null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tif (inputStream != null) inputStream.close();\n\t\t} catch (Exception e) {\n\t\t\tUtil.log(\"input stream close():\" + e.getMessage(), this);\n\t\t}\n\t\ttry {\n\t\t\tif (outputStream != null) outputStream.close();\n\t\t} catch (Exception e) {\n\t\t\tUtil.log(\"output stream close():\" + e.getMessage(), this);\n\t\t}\n\t\t\n\t\tbuffer = null;\n\t\t// Util.delay(TIMEOUT);\n\n\t}", "public void close() {\r\n\t\tflush();\r\n\t\ttry {\r\n\t\t\tdos.close();\r\n\t\t\ts.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void close() throws IOException\n {\n _out.close();\n }", "private void close() {\n\t\tif (socketChannel != null) {\n\t\t\ttry {\n\t\t\t\tif (in != null) {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close in stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close out stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsocketChannel.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tlog.log(Level.SEVERE, \"Can't close socket channel\", ex);\n\t\t\t}\n\n\t\t}\n\t\t//Defender.stopConnection();\n\t}", "@Override\n\tpublic void close() throws IOException {\n\t\tiOBuffer = new IOBuffer();\n\t}", "public void closeStream() {\n\t\ttry {\n\t\t\tisReaderStatusClosed = true;\n\t\t\tif(buffReader != null) {\n\t\t\t\tbuffReader.close();\n\t\t\t}\n\t\t} catch(Exception e) { }\n\t}", "public void close() {\r\n\t\ttry {\r\n\t\t\tbr.close();\r\n\t\t}\r\n\t\tcatch (IOException e) {e.printStackTrace();}\r\n\t}", "private void closeStream() throws IOException {\n if (originalInputStream != inputStream) {\n // Close the byte input stream or file input stream, if either is the current one\n inputStream.close();\n }\n\n if (closeOriginalStreamOnClose) {\n originalInputStream.close();\n }\n }", "@Override\n public void close() {\n try {\n stdIn.write(\"exit;\");\n stdIn.flush();\n } catch (IOException ioe) {\n // ignore\n } finally {\n silentlyCloseStdIn();\n }\n\n stdOut.interrupt();\n stdErr.interrupt();\n shell.destroy();\n }", "@Override\n\t\tpublic void close() throws IOException {\n\t\t\tout.close();\n\t\t}", "@Override public abstract void close();", "public void\t\tclose();", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "public void close() throws IOException {\n source.close();\n }", "public void close() {\n\t\t}", "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();", "public void close() throws IOException {\n if (!closed) {\n // Android-changed: Unconditionally close external inflaters (b/26462400)\n //if (usesDefaultInflater)\n inf.end();\n in.close();\n closed = true;\n }\n }", "public void close()\n throws IOException\n {\n outstream.close();\n }", "public synchronized void close()\n {\n if (open) {\n open = false;\n reset();\n line.close();\n }\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();" ]
[ "0.7760971", "0.7498473", "0.7322935", "0.7259575", "0.7170345", "0.7142959", "0.7087437", "0.6934735", "0.6917586", "0.6876669", "0.6833771", "0.6804652", "0.678245", "0.67577267", "0.67560387", "0.67418426", "0.6735048", "0.6723644", "0.6720559", "0.6699568", "0.66924024", "0.6688217", "0.66839576", "0.6668107", "0.66599613", "0.6654411", "0.6619947", "0.6582042", "0.65809774", "0.65697455", "0.65317726", "0.64624673", "0.6449157", "0.6444352", "0.6443563", "0.6443546", "0.6439425", "0.64306146", "0.6416673", "0.6408659", "0.6394021", "0.6393674", "0.6391528", "0.6390749", "0.6390621", "0.63786995", "0.63697654", "0.63694906", "0.63671327", "0.63671327", "0.63671327", "0.6366642", "0.63576674", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63508666", "0.63479406", "0.6342887", "0.6341821", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938", "0.633938" ]
0.63544476
53
Match up an explanatory comment
@Override public void endVisit(CssIf x, Context ctx) { out.indentOut(); out.printOpt("/* } */"); out.newlineOpt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void commentMatch() {\n comment.match(\"//hier steht text\\n\");\n assertEquals(comment.getClass(), comment.getToken().getClass());\n }", "@Test\n public void wrongCommentMatch() {\n comment.match(\"jhadj //kasf \");\n assertEquals(null, comment.getToken());\n }", "@Test\n public void commentMatchNotNull() {\n comment.match(\"//hier steht text\\n@test zuziuziuziu\");\n assertNotSame(null, comment.getToken().getClass());\n }", "@Test\n public void noCommentMatch() {\n comment.match(\"@test\");\n assertEquals(null, comment.getToken());\n }", "@Test\n public void commentGetContent() {\n comment.match(\"//irgendein Kommentar\\n\");\n Token t = comment.getToken();\n assertEquals(\"//irgendein Kommentar\\n\", t.getContent());\n }", "private void scanComment(LocatedChar ch) {\n\t\tch = input.next();\n\t\twhile(!ch.matchChar('%') && !ch.matchChar('\\n')) {\n\t\t\tch = input.next();\n\t\t}\n\t}", "private String magicComment( CharSequence needle, String haystack,\r\n CharSequence replacement )\r\n {\r\n int startIndex = haystack.indexOf( \"//# \" + needle );\r\n String endString = \"//# END \" + needle;\r\n int endIndex = haystack.indexOf( endString ) + endString.length();\r\n CharSequence region = haystack.subSequence( startIndex, endIndex + 1 );\r\n\r\n return haystack.replace( region, replacement );\r\n }", "protected boolean isComment () {\r\n int startvalue = index - 1;\r\n if (index + 3 >= length)\r\n return false;\r\n return (pagepart[index] == '!' &&\r\n pagepart[index + 1] == '-' &&\r\n pagepart[index + 2] == '-');\r\n }", "static boolean isComment(Token t) {\n return t.getText().startsWith(\"#\");\n }", "private void findComments(String remainingText) {\n while (remainingText.length() > 0) {\n if (shouldEvaluateMultilineComment(remainingText)) {\n findComments(remainingText.substring(0, remainingText.indexOf(MULTILINE_COMMENT_START_CHARACTERS)));\n remainingText = remainingText.substring(remainingText.indexOf(MULTILINE_COMMENT_START_CHARACTERS));\n\n if (Pattern.compile(MULTILINE_COMMENT_PATTERN).matcher(remainingText).matches()) {\n appendToPane(remainingText.substring(0, remainingText.indexOf(MULTILINE_COMMENT_END_CHARACTERS,\n remainingText.indexOf(MULTILINE_COMMENT_START_CHARACTERS) + MULTILINE_COMMENT_START_CHARACTERS.length())\n + MULTILINE_COMMENT_END_CHARACTERS.length()), true);\n if (remainingText.length() > remainingText.indexOf(MULTILINE_COMMENT_END_CHARACTERS,\n remainingText.indexOf(MULTILINE_COMMENT_START_CHARACTERS)\n + MULTILINE_COMMENT_START_CHARACTERS.length()) + MULTILINE_COMMENT_END_CHARACTERS.length()) {\n remainingText = remainingText.substring(remainingText.indexOf(MULTILINE_COMMENT_END_CHARACTERS,\n remainingText.indexOf(MULTILINE_COMMENT_START_CHARACTERS)\n + MULTILINE_COMMENT_START_CHARACTERS.length()) + MULTILINE_COMMENT_END_CHARACTERS.length());\n } else {\n remainingText = \"\";\n }\n } else {\n appendToPane(remainingText, true);\n remainingText = \"\";\n }\n } else if (remainingText.contains(SINGLE_LINE_COMMENT_CHARACTERS)) {\n appendToPane(remainingText.substring(0, remainingText.indexOf(SINGLE_LINE_COMMENT_CHARACTERS)), false);\n remainingText = remainingText.substring(remainingText.indexOf(SINGLE_LINE_COMMENT_CHARACTERS));\n if (remainingText.contains(NEWLINE_CHARACTERS)) {\n appendToPane(remainingText.substring(0, remainingText.indexOf(NEWLINE_CHARACTERS)), true);\n remainingText = remainingText.substring(remainingText.indexOf(NEWLINE_CHARACTERS));\n } else {\n appendToPane(remainingText, true);\n remainingText = \"\";\n }\n } else {\n appendToPane(remainingText, false);\n remainingText = \"\";\n }\n }\n }", "static boolean comment(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"comment\")) return false;\n if (!nextTokenIs(b, \"\", DOUBLE_COMMENT, TRIPLE_COMMENT)) return false;\n boolean r;\n r = consumeToken(b, TRIPLE_COMMENT);\n if (!r) r = consumeToken(b, DOUBLE_COMMENT);\n return r;\n }", "boolean hasComment();", "private boolean isComment(int nextVal) {\n\t\treturn nextVal == COMMENT;\n\t}", "private static void checkCommentMatches(JavadocCommentOwner commentOwner, String expectedText) {\n JavadocComment comment = commentOwner.getJavadocComment();\n assertEquals(expectedText, comment.getText().toString());\n\n // this is fetched adhoc\n List<JavaComment> collected = JavaComment.getLeadingComments(commentOwner).collect(Collectors.toList());\n assertEquals(listOf(comment), collected);\n }", "private boolean formatComment(StringBuilder result, String tab) {\n \n \t\tif (!preferenceFormatComments)\n \t\t\treturn false;\n \n \t\t/* The list of remaining words to continue on the next line */\n \t\tLinkedList<String> commentWords = new LinkedList<String>();\n \n \t\tint maxLineLength = OcamlPlugin.getInstance().getPreferenceStore().getInt(\n \t\t\t\tPreferenceConstants.P_FORMATTER_COMMENT_WIDTH);\n \n \t\tint nCommentLine = currentLine;\n \n \t\tbInMultilineComment = false;\n \n \t\tString firstCommentLine = line;\n \n \t\t/* Read all the following lines having a single comment */\n \t\tboolean bWholeLineComment;\n \t\tdo {\n \t\t\tif (bDoNotFormatComment)\n \t\t\t\tbreak;\n \n \t\t\tbWholeLineComment = false;\n \n \t\t\tString commentLine = lines[nCommentLine];\n \n \t\t\tString trimmed2 = commentLine.trim();\n \t\t\t/*\n \t\t\t * Matcher matcherString = patternString.matcher(trimmed); trimmed =\n \t\t\t * matcherString.replaceAll(\"\\\"\\\"\");\n \t\t\t */\n \n \t\t\t/*\n \t\t\t * Count the number of comments on the line, because patternWholeLineComment matches several\n \t\t\t * comments in a single match. If there are several comments on the same line, then we leave them\n \t\t\t * as is.\n \t\t\t */\n \t\t\tMatcher matcherComment = patternComment.matcher(trimmed2);\n \t\t\tboolean bMoreThanOneComment = matcherComment.find() && matcherComment.find();\n \n \t\t\tif (!bMoreThanOneComment) {\n \n \t\t\t\t/*\n \t\t\t\t * Read all the words (anything separated by spaces) of this comment, and add them to the\n \t\t\t\t * list.\n \t\t\t\t */\n \t\t\t\tMatcher matcherWholeLineComment = patternWholeLineComment.matcher(trimmed2);\n \n \t\t\t\tString commentBody = null;\n \n \t\t\t\tif (trimmed2.startsWith(\"(*\") && !trimmed2.contains(\"*)\"))\n \t\t\t\t\tbInMultilineComment = true;\n \n \t\t\t\tif (matcherWholeLineComment.find() || bInMultilineComment) {\n \n \t\t\t\t\tif (bInMultilineComment) {\n \t\t\t\t\t\tif (trimmed2.endsWith(\"*)\")) {\n \t\t\t\t\t\t\tbInMultilineComment = false;\n \t\t\t\t\t\t\tcommentBody = trimmed2.substring(0, trimmed2.length() - 2);\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\telse if (trimmed2.startsWith(\"(*\")) {\n \t\t\t\t\t\t\tcommentBody = trimmed2.substring(2, trimmed2.length());\n \t\t\t\t\t\t} else\n \t\t\t\t\t\t\tcommentBody = trimmed2;\n \t\t\t\t\t}\n \n \t\t\t\t\tif (commentBody == null)\n \t\t\t\t\t\tcommentBody = matcherWholeLineComment.group(1);\n \n \t\t\t\t\t// Special character that means: do not format this comment\n \t\t\t\t\t// We don't format documentation comments either\n \t\t\t\t\tif (commentBody.startsWith(\"|\") || commentBody.startsWith(\"*\")) {\n \t\t\t\t\t\tbDoNotFormatComment = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \n \t\t\t\t\tString[] words = commentBody.split(\"\\\\s\");\n \n \t\t\t\t\t// add the words to the list\n \t\t\t\t\tfor (String w : words)\n \t\t\t\t\t\tif (!w.trim().equals(\"\"))\n \t\t\t\t\t\t\tcommentWords.addLast(w);\n \n \t\t\t\t\tbWholeLineComment = true;\n \n \t\t\t\t\tnCommentLine++;\n \t\t\t\t\tif (nCommentLine >= lines.length)\n \t\t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \n \t\t} while (bWholeLineComment);\n \n \t\tint nLastCommentLine = nCommentLine - 1;\n \n \t\t/* If we found at least one comment */\n \t\tif (!commentWords.isEmpty()) {\n \t\t\t/*\n \t\t\t * Get the indentation of the first comment line. The following ones will get the same\n \t\t\t * indentation.\n \t\t\t */\n \t\t\tint firstCommentLineIndent = getLineIndent(firstCommentLine);\n \n \t\t\tint currentOffset = 0;\n \t\t\tint tabSize = ocaml.editors.OcamlEditor.getTabSize();\n \n \t\t\t/*\n \t\t\t * Now that we have a list of words, we spread it onto the following lines\n \t\t\t */\n \n \t\t\t// indentation in number of spaces from the beginning of the line\n \t\t\tint leadingSpace = 0;\n \t\t\tfor (int j = 0; j < firstCommentLineIndent; j++) {\n \t\t\t\tresult.append(tab);\n \t\t\t\tcurrentOffset += tabSize;\n \t\t\t\tleadingSpace += tabSize;\n \t\t\t}\n \n \t\t\tresult.append(\"(* \");\n \t\t\tcurrentOffset += 3;\n \n \t\t\tint nCommentLines = 1;\n \t\t\t// for each word of the comment\n \t\t\tfor (String word : commentWords) {\n \t\t\t\t// if the word fits into the remaining space on the line or if\n \t\t\t\t// the line is empty\n \t\t\t\tif ((currentOffset + word.length() + 3 < maxLineLength || currentOffset == firstCommentLineIndent + 3)) {\n \t\t\t\t\tresult.append(word + \" \");\n \t\t\t\t\tcurrentOffset += word.length() + 1;\n \t\t\t\t}\n \n \t\t\t\t/*\n \t\t\t\t * if the word doesn't fit on the remaining space on the line, then we create a new line\n \t\t\t\t */\n \t\t\t\telse {\n \t\t\t\t\tnCommentLines++;\n \n \t\t\t\t\twhile (currentOffset++ < maxLineLength - 3)\n \t\t\t\t\t\tresult.append(\" \");\n \n \t\t\t\t\tresult.append(\"*)\" + OcamlPlugin.newline);\n \n \t\t\t\t\tcurrentOffset = 0;\n \t\t\t\t\tfor (int j = 0; j < firstCommentLineIndent; j++) {\n \t\t\t\t\t\tresult.append(\"\\t\");\n \t\t\t\t\t\tcurrentOffset += tabSize;\n \t\t\t\t\t}\n \n \t\t\t\t\tresult.append(\"(* \" + word + \" \");\n \t\t\t\t\tcurrentOffset += word.length() + 4;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t/*\n \t\t\t * if there are several comment lines, we put the ending \"*)\" against the margin, so that the\n \t\t\t * comment endings are all aligned\n \t\t\t */\n \t\t\tif (nCommentLines != 1)\n \t\t\t\twhile (currentOffset++ < maxLineLength - 3)\n \t\t\t\t\tresult.append(\" \");\n \n \t\t\tresult.append(\"*)\" + OcamlPlugin.newline);\n \n \t\t\t/*\n \t\t\t * We're done with this comment: analyze the remaining lines: continue at i (the +1 is done by the\n \t\t\t * loop)\n \t\t\t */\n \t\t\tcurrentLine = nLastCommentLine;\n \t\t\t// true means: jump back\n \t\t\treturn true;\n \t\t}\n \t\t// continue normally (do not jump in the loop)\n \t\treturn false;\n \t}", "public static ParseAction<Located<Void>> matchTLALineComment(){\n\t\treturn sequence(\n\t\t\t\tdrop(matchString(\"\\\\*\")),\n\t\t\t\tdrop(matchPattern(TLA_NOT_A_COMMENT_MARKER_LINE))\n\t\t).map(seq -> new Located<>(seq.getLocation(), null));\n\t}", "public boolean isCommented(int offset) throws Exception {\n\t\t//Yaml only has end of line comments marked with a '#'.\n\t\t//So comments never span multiple lines of text and we only have scan back\n\t\t//from offset upto the start of the current line.\n\t\tIRegion lineInfo = doc.getLineInformationOfOffset(offset);\n\t\tint startOfLine = lineInfo.getOffset();\n\t\twhile (offset>=startOfLine) {\n\t\t\tchar c = getChar(offset);\n\t\t\tif (c=='#') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\toffset--;\n\t\t}\n\t\treturn false;\n\t}", "private static void testComments() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTESTING COMMENTS -- NO OUTPUT EXPECTED\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inComments\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inUntermComment not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\tif (token.sym != sym.EOF) {\n\t System.err.println(\"ERROR TESTING COMMENTS: not at EOF\");\n\t System.err.println(\"sym: \" + token.sym);\n\t}\n }", "private boolean reformatMultilineComments() {\n \n \t\tString curLine = line.trim();\n \n \t\t// abort the operation?\n \t\tboolean bAbort = false;\n \t\t// the level of nested comments\n \t\tint nestedCommentsLevel = 0;\n \t\t// a comment until the end of the line\n \t\tMatcher matcherCommentEOL = patternCommentEOL.matcher(curLine);\n \t\tif (matcherCommentEOL.find()) {\n \n \t\t\tif (matcherCommentEOL.start() + 2 < curLine.length()) {\n \t\t\t\tchar firstChar = curLine.charAt(matcherCommentEOL.start() + 2);\n \t\t\t\t// this character means \"do not reformat this comment\"\n \t\t\t\tif (firstChar == '*' || firstChar == '|') {\n \t\t\t\t\tbDoNotFormatComment = true;\n \t\t\t\t\tbAbort = true;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// check that this comment is not closed (or else, we would loop\n \t\t\t// indefinitely)\n \t\t\tMatcher matcherComment = patternComment.matcher(curLine);\n \t\t\twhile (matcherComment.find())\n \t\t\t\tif (matcherComment.start() == matcherCommentEOL.start())\n \t\t\t\t\tbAbort = true;\n \n \t\t\t// if we are inside a string, do nothing\n \t\t\tMatcher matcherString = patternString.matcher(curLine);\n \t\t\twhile (matcherString.find()) {\n \t\t\t\tif ((matcherString.start() < matcherCommentEOL.start())\n \t\t\t\t\t\t&& (matcherCommentEOL.start() < matcherString.end()))\n \t\t\t\t\tbAbort = true;\n \t\t\t}\n \n \t\t\tif (!bAbort && preferenceFormatComments) {\n \n \t\t\t\tnestedCommentsLevel = 1;\n \n \t\t\t\t// look for the end of the comment\n \t\t\t\tPattern patternCommentBeginEnd = Pattern.compile(\"(\\\\(\\\\*)|(\\\\*\\\\))\");\n \n \t\t\t\t// all the lines of the comment, concatenated\n \t\t\t\tString commentLines = curLine.substring(matcherCommentEOL.start() + 2);\n \n \t\t\t\t// what's before the comment on its first line\n \t\t\t\tString beforeComment = curLine.substring(0, matcherCommentEOL.start());\n \n \t\t\t\t// what's left after the comment on its last line\n \t\t\t\tString afterComment = \"\";\n \n \t\t\t\t// the index of the current line\n \t\t\t\tint l;\n \t\t\t\tgetWholeComment: for (l = currentLine; l < lines.length; l++) {\n \n \t\t\t\t\tString commentLine;\n \t\t\t\t\t// first line\n \t\t\t\t\tif (l == currentLine) {\n \t\t\t\t\t\tcommentLine = commentLines;\n \t\t\t\t\t\tcommentLines = \"\";\n \t\t\t\t\t} else\n \t\t\t\t\t\tcommentLine = lines[l].trim();\n \n \t\t\t\t\tMatcher matcherCommentBeginEnd = patternCommentBeginEnd.matcher(commentLine);\n \n \t\t\t\t\t/*\n \t\t\t\t\t * parse all the delimiters, and delete the nested ones, while keeping the body of the\n \t\t\t\t\t * comment\n \t\t\t\t\t */\n \t\t\t\t\twhile (matcherCommentBeginEnd.find()) {\n \n \t\t\t\t\t\t// check that we are not inside a string\n \t\t\t\t\t\tMatcher matcherString2 = patternString.matcher(commentLine);\n \t\t\t\t\t\tboolean bInString = false;\n \n \t\t\t\t\t\twhile (matcherString2.find()) {\n \n \t\t\t\t\t\t\tif (matcherString2.start() <= matcherCommentBeginEnd.start()\n \t\t\t\t\t\t\t\t\t&& matcherCommentBeginEnd.start() < matcherString2.end()) {\n \t\t\t\t\t\t\t\tbInString = true;\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 (!bInString) {\n \n \t\t\t\t\t\t\tif (matcherCommentBeginEnd.group().equals(\"(*\"))\n \t\t\t\t\t\t\t\tnestedCommentsLevel++;\n \t\t\t\t\t\t\telse\n \t\t\t\t\t\t\t\tnestedCommentsLevel--;\n \n \t\t\t\t\t\t\t// delete the comment delimiter from the body of the\n \t\t\t\t\t\t\t// comment\n \t\t\t\t\t\t\tif (nestedCommentsLevel != 0) {\n \t\t\t\t\t\t\t\tString before = commentLine.substring(0, matcherCommentBeginEnd.start());\n \t\t\t\t\t\t\t\tString after = commentLine.substring(matcherCommentBeginEnd.start() + 2);\n \t\t\t\t\t\t\t\tcommentLine = before + after;\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\tif (nestedCommentsLevel == 0) {\n \n \t\t\t\t\t\t\t\tcommentLines = commentLines + \" \"\n \t\t\t\t\t\t\t\t\t\t+ commentLine.substring(0, matcherCommentBeginEnd.start());\n \t\t\t\t\t\t\t\tafterComment = commentLine.substring(matcherCommentBeginEnd.start() + 2);\n \n \t\t\t\t\t\t\t\tbreak getWholeComment;\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t// we modified the string: we have to restart the\n \t\t\t\t\t\t\t// matcher\n \t\t\t\t\t\t\tmatcherCommentBeginEnd = patternCommentBeginEnd.matcher(commentLine);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tcommentLines = commentLines + \" \" + commentLine;\n \t\t\t\t}\n \n \t\t\t\t// if we are at the beginning, we must insert blank lines (or\n \t\t\t\t// else we would access\n \t\t\t\t// out of\n \t\t\t\t// bounds)\n \t\t\t\tif (l < 3) {\n \t\t\t\t\tString[] lines2 = new String[lines.length + 2];\n \t\t\t\t\tfor (int k = 0; k < lines.length; k++)\n \t\t\t\t\t\tlines2[k + 2] = lines[k];\n \t\t\t\t\tlines = lines2;\n \t\t\t\t\tl += 2;\n \t\t\t\t}\n \n \t\t\t\t// if we didn't go through at least one iteration of the loop\n \t\t\t\tif (l >= lines.length)\n \t\t\t\t\tl--;\n \n \t\t\t\t/*\n \t\t\t\t * Now, we put all the modified lines in the table, and we modify the current line so that the\n \t\t\t\t * formatter will take the modifications into account.\n \t\t\t\t */\n \n \t\t\t\t// Do not put blank lines\n \t\t\t\tif (beforeComment.trim().equals(\"\") && afterComment.trim().equals(\"\")) {\n \t\t\t\t\tlines[l] = \"(*\" + commentLines + \"*)\";\n \t\t\t\t\tcurrentLine = l;\n \t\t\t\t\treturn true;\n \t\t\t\t} else if (beforeComment.trim().equals(\"\")) {\n \t\t\t\t\tlines[l - 1] = \"(*\" + commentLines + \"*)\";\n \t\t\t\t\tlines[l] = afterComment;\n \t\t\t\t\tcurrentLine = l - 1;\n \t\t\t\t\treturn true;\n \t\t\t\t} else if (afterComment.trim().equals(\"\")) {\n \t\t\t\t\tlines[l - 1] = beforeComment;\n \t\t\t\t\tlines[l] = \"(*\" + commentLines + \"*)\";\n \t\t\t\t\tcurrentLine = l - 1;\n \t\t\t\t\treturn true;\n \t\t\t\t} else {\n \t\t\t\t\t// the source code before the comment\n \t\t\t\t\tlines[l - 2] = beforeComment;\n \t\t\t\t\t// the body of the comment\n \t\t\t\t\tlines[l - 1] = \"(*\" + commentLines + \"*)\";\n \t\t\t\t\t// the source code after the comment\n \t\t\t\t\tlines[l] = afterComment;\n \t\t\t\t\t// the line on which we will continue formatting\n \t\t\t\t\tcurrentLine = l - 2;\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn false;\n \t}", "protected int scanComment () throws HTMLParseException {\r\n int startvalue = index - 1;\r\n int i = -1;\r\n int j = index;\r\n while (j+2 < length) {\r\n if (pagepart[j] == '-' &&\r\n pagepart[j + 1] == '-' &&\r\n pagepart[j + 2] == '>') {\r\n i = j;\r\n break;\r\n }\r\n j++;\r\n }\r\n if (i > -1) {\r\n index = i + 2;\r\n nextToken = MT;\r\n match (MT);\r\n stringLength = index - startvalue;\r\n return COMMENT;\r\n }\r\n block.setRest (startvalue);\r\n return END;\r\n }", "int getCommentEndOffset(CharSequence commentText);", "boolean hasComments();", "private boolean comment() {\r\n return STRING(\"--\") && visibles() && newline();\r\n }", "private boolean isComment(String line) {\n\t\tif (line.equals(\"\")) return true;\n\t\t\n\t\t// If the line starts with \"//\".\n\t\tif (line.substring(0, 2).equals(\"//\")) return true;\n\t\t\n\t\treturn false;\n\t}", "boolean processCommentsContainingIdentifier( String identifier, SearchScope searchScope, Processor<PsiElement> processor);", "public static ParseAction<Located<Void>> matchTLAComment(){\n\t\treturn parseOneOf(\n\t\t\t\tmatchTLAMultilineComment(),\n\t\t\t\tmatchTLALineComment()\n\t\t);\n\t}", "String getComment();", "String getComment();", "boolean isComment(Object object);", "private static boolean isComment(String line) {\n String trimLine = line.trim();\n return trimLine.startsWith(\"#\") || trimLine.isEmpty();\n }", "public abstract char getCommentChar();", "@Test\n public void TestTrailingComment() throws Exception {\n RuleBasedCollator coll = new RuleBasedCollator(\"&c<b#comment1\\n<a#comment2\");\n assertTrue(\"c<b\", coll.compare(\"c\", \"b\") < 0);\n assertTrue(\"b<a\", coll.compare(\"b\", \"a\") < 0);\n }", "private boolean shouldEvaluateMultilineComment(String remainingText) {\n return (remainingText.contains(MULTILINE_COMMENT_START_CHARACTERS)\n && !remainingText.contains(SINGLE_LINE_COMMENT_CHARACTERS))\n || (remainingText.contains(MULTILINE_COMMENT_START_CHARACTERS)\n && remainingText.contains(SINGLE_LINE_COMMENT_CHARACTERS)\n && Integer.valueOf(remainingText.indexOf(MULTILINE_COMMENT_START_CHARACTERS))\n .compareTo(remainingText.indexOf(SINGLE_LINE_COMMENT_CHARACTERS)) < 0);\n }", "public boolean isComment(String line){\n //Assume false\n boolean lineHasComment = false;\n //Prevent double counting\n if (inJavaDoc) {\n return false;\n }\n //Check if already in comment\n if (inStarComment) {\n lineHasComment = true;\n }\n //Single line comments\n if(line.contains(\"//\")){\n lineHasComment = true;\n }\n //Multiline comments\n if(line.contains(\"/*\")){\n lineHasComment = true;\n inStarComment = true;\n }\n //End of comments\n if(line.contains(\"*/\") && this.inStarComment){\n inJavaDoc = false;\n inStarComment = false;\n }\n return lineHasComment;\n }", "@Override\n public void comment(String comment)\n {\n }", "void extractComments(String longString)\n\t{\n\t\tlongString = longString.toLowerCase();\n\t\tString openingCommentTag = \"<div class=\\\"CT\\\">\".toLowerCase();\n\t\tString endingCommentTag = \"</div>\".toLowerCase();\n\n\t\tfor (int i = 0; i < longString.length(); i++)\n\t\t{\n\t\t\tint openIndex = longString.indexOf(openingCommentTag, i);\n\t\t\tif (openIndex != -1)\n\t\t\t{\n\t\t\t\tint endIndex = longString.indexOf(endingCommentTag, openIndex);\n\t\t\t\t// System.out.println(\"openIndex: \" + openIndex + \"\\n\" +\n\t\t\t\t// \"endIndex: \" + endIndex);\n\n\t\t\t\tcomments.add(longString.substring(\n\t\t\t\t\t\topenIndex + openingCommentTag.length(), endIndex));\n\t\t\t\ti = endIndex;\n\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public void comment(String data);", "String getComment() {\n//\t\t\tm1();\n\t\t\treturn \"small\";\n\t\t}", "protected ValidationResult validateComments(String text) {\r\n\t\tStack<Integer> posStack = new Stack<Integer>();\r\n\t\tint lastSymbol = -1;\r\n\t\tint commentDepth = 0;\r\n\t\t\r\n\t\tValidationResult result = null;\r\n\t\t\r\n\t\tfor (int i = 0; i < text.length(); ++i) {\r\n\t\t\t\r\n\t\t\tchar current = text.charAt(i);\r\n\t\t\t\r\n\t\t\tif (current == START_COMMENT_CHAR) {\r\n\t\t\t\tCharacter prev = (i == 0 ? null : text.charAt(i - 1));\r\n\t\t\t\t// Start of line, or preceeded by blank, open or close bracket\r\n\t\t\t\tif (prev == null || \" <>\".indexOf(prev) >= 0) {\r\n\t\t\t\t\t// Start of line - is a delimiting bracket\r\n\t\t\t\t\tposStack.push(i);\r\n\t\t\t\t\tcommentDepth++;\r\n\t\t\t\t\tlastSymbol = i;\r\n\t\t\t\t} \t\t\t\t\r\n\t\t\t} else if (current == END_COMMENT_CHAR) {\r\n\t\t\t\t// End of line, or succeeded by a blank, open or close bracket or slash\r\n\t\t\t\tCharacter next = i < text.length() - 1 ? text.charAt(i + 1) : null; \r\n\t\t\t\tif (next == null || \" <>\\\\\".indexOf(next) >= 0) {\r\n\t\t\t\t\tcommentDepth--;\r\n\t\t\t\t\tlastSymbol = i;\r\n\t\t\t\t\tif (posStack.size() > 0) {\r\n\t\t\t\t\t\tposStack.pop();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (commentDepth != 0) {\r\n\t\t\tif (posStack.size() > 0) {\r\n\t\t\t\tlastSymbol = posStack.pop();\r\n\t\t\t}\r\n\t\t\tresult = ValidationResult.error(COMMENT_MISMATCH, lastSymbol);\r\n\t\t}\r\n\r\n\t\treturn result == null ? new ValidationResult() : result;\r\n\t}", "@Override\n public String visit(BlockComment n, Object arg) {\n return null;\n }", "@Test\n public void testCommentLine() {\n setupReaderAndErrorHandler(\"# This is a comment line\");\n scanner.nextToken();\n\n assertTrue(\"EOFSY expected\", scanner.getCurrentToken().getSymbol() == Symbol.EOFSY);\n }", "public static ParseAction<Located<Void>> matchTLAMultilineComment(){\n\t\treturn sequence(\n\t\t\t\tdrop(matchString(\"(*\")),\n\t\t\t\tdrop(matchPattern(TLA_NOT_A_COMMENT_MARKER_MULTILINE)),\n\t\t\t\tdrop(repeat(\n\t\t\t\t\t\tsequence(\n\t\t\t\t\t\t\t\tdrop(nop().chain(v -> matchTLAMultilineComment())),\n\t\t\t\t\t\t\t\tdrop(matchPattern(TLA_NOT_A_COMMENT_MARKER_MULTILINE))\n\t\t\t\t\t\t).map(seq -> new Located<>(seq.getLocation(), null))\n\t\t\t\t)),\n\t\t\t\tdrop(matchString(\"*)\"))\n\t\t).map(seq -> new Located<>(seq.getLocation(), null));\n\t}", "private void skipComment() {\r\n int length = sourceCode.length();\r\n if (++index < length) {\r\n char character = sourceCode.charAt(index);\r\n if (character == '/') {\r\n // If it's a line comment (//) then skip to the next line.\r\n // Find the next line.\r\n index = sourceCode.indexOf('\\n', index);\r\n // Skip to after it if it's found, or the end of the source code\r\n // otherwise.\r\n index = index == -1 ? length : index + 1;\r\n } else if (character == '*') {\r\n // If it's a long comment (/* ... */) then skip to after the\r\n // occurrence of \"*/\".\r\n // Find \"*/\".\r\n index = sourceCode.indexOf(\"*/\", index);\r\n // Skip to after it if it's found, or the end of the source code\r\n // otherwise.\r\n index = index == -1 ? length : index + 2;\r\n }\r\n }\r\n }", "public static boolean CommentTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"CommentTest\")) return false;\n if (!nextTokenIs(b, K_COMMENT)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, COMMENT_TEST, null);\n r = consumeTokens(b, 2, K_COMMENT, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public void getComment() {\n System.out.println(\"The target was at \" + targetDistance + \" meters\");\n System.out.println(\"Your shot went \" + projDistance + \" meters far\"); //displays stats\n System.out.println(\"The projectile was \" + missDistance + \" from the target\");\n if (abs(missDistance) >= 100) {\n System.out.println(\"That was terrible\");\n }\n else if (abs(missDistance) >= 50) {\n System.out.println(\"It's getting closer\"); //various comments depending on how good the shot was\n }\n else if (abs(missDistance) >= 20) {\n System.out.println(\"You're nearly there\");\n }\n else {\n System.out.println(\"SO INTENSE\");\n }\n }", "@Override\n public String visit(JavadocComment n, Object arg) {\n return null;\n }", "@Override\n public String visit(LineComment n, Object arg) {\n return null;\n }", "public boolean isCommentedLine(@NotNull String line) {\n return line.trim().startsWith(comment);\n }", "private String nocomment(String s) {\r\n\t\tint excLocation=s.indexOf('!');\r\n\t\tif(excLocation!=-1) s=s.substring(0,excLocation);\r\n\t\treturn s.trim();\r\n\t}", "@Test(timeout = 4000)\n public void test090() throws Throwable {\n String string0 = SQLUtil.removeComments(\"java.lang.Object@4d3d5d29\");\n assertNotNull(string0);\n }", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "private boolean shouldInspectTextForComments(KeyEvent e) {\n return e.getKeyCode() == KeyEvent.VK_V\n || (!e.isControlDown() && e.getKeyCode() != KeyEvent.VK_CONTROL);\n }", "public boolean isAfterNL()\n \t{\n \t\tif (getContext() == null)\n \t\t{\n \t\t\treturn false;\n \t\t}\n \t\tMatcherContext ctx = (MatcherContext) getContext();\n \t\tInputLocation loc = ctx.getCurrentLocation();\n \t\tInputBuffer buf = ctx.getInputBuffer();\n \t\tint delta = -1;\n \t\tchar c;\n \t\t // MultiLine comment might have \\n to be ignored\n \t\tboolean inMlComment = false;\n \t\t// Lok back into the buffer for a '\\n'\n \t\twhile ((c = loc.lookAhead(buf, delta)) != Chars.EOI)\n \t\t{\n \t\t\tif (c == '\\n')\n \t\t\t{\n \t\t\t\tif (!inMlComment)\n \t\t\t\t{\n \t\t\t\t\treturn true;\n \t\t\t\t} else if (c == '/')\n \t\t\t\t{\n \t\t\t\t\tif (loc.lookAhead(buf, delta - 1) == '*')\n \t\t\t\t\t{\n \t\t\t\t\t\t// in ML comment\n \t\t\t\t\t\tinMlComment = true;\n \t\t\t\t\t\tdelta--;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse if (c == '*')\n \t\t\t\t{\n \t\t\t\t\tif (loc.lookAhead(buf, delta - 1) == '/')\n \t\t\t\t\t{\n \t\t\t\t\t\t// out of ML comment\n \t\t\t\t\t\tinMlComment = false;\n \t\t\t\t\t\tdelta--;\n \t\t\t\t\t}\n \t\t\t\t} else\n \t\t\t\t{\n \t\t\t\t\tif (! (inMlComment || c==' ' || c=='\\t' ||\n \t\t\t\t\t\tc=='\\r' || c=='\\u000c'))\n \t\t\t\t\t{\n \t\t\t\t\t\t// if not in a multiLineComment\n \t\t\t\t\t\t// or not a whitespace charcater, then we failed finding \\n\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t// keep going\n \t\t\tdelta--;\n \t\t}\n \t\treturn false;\n \t}", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n StringReader stringReader0 = new StringReader(\"<SINGLE_LINE_COMMENT>\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 47, 32);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(18, javaCharStream0.bufpos);\n assertEquals(50, javaCharStream0.getEndColumn());\n }", "public boolean isComment() {\r\n\t\treturn specialTag==SpecialTag.COMMENT;\r\n\t}", "void createSingleFileComment(ChangedFile file, Integer line, String comment);", "private void skipCommentLine() {\n while (position < length) {\n int c = data.charAt(position);\n if (c == '\\r' || c == '\\n') {\n return;\n }\n position++;\n }\n }", "public String getSampleComment();", "@Override\n\tpublic void comment() {\n\t\t\n\t}", "public void validateJavaDocCommentText(final String expected, final String path) {\n\n final SortableLocation sortableLocation = path2LocationMap.get(path);\n final JavaDocData xmlWrapperJavaDocData = sortableLocations2JavaDocDataMap.get(sortableLocation);\n\n // All Done.\n Assert.assertEquals(expected, xmlWrapperJavaDocData.getComment());\n }", "int getCommentsMode();", "@Test\n\tpublic void simpleComment() throws ParseException {\n\t\t// -->\n\t\tILineMatcher startMatcher = JavaSourceLineMatcher.startMatcher();\n\t\tILineMatcher endMatcher = JavaSourceLineMatcher.endMatcher();\n\t\tBlockToBlockListConverter converter = new BlockToBlockListConverter(startMatcher, endMatcher);\n\n\t\tList<String> lines = Lists.newArrayList();\n\n\t\tlines.add(\" // -->\");\n\t\tlines.add(\" // shift one left\");\n\t\tlines.add(\" // this line too\");\n\t\tlines.add(\" // <--\");\n\n\t\tList<Block> blocks = converter.convert(new Block(lines));\n\n\t\tassertEquals(1, blocks.size());\n\t\tBlock block = blocks.get(0);\n\t\tassertNotNull(block);\n\t\tassertEquals(\"// shift one left\", block.lines().get(0));\n\t\tassertEquals(\"// this line too\", block.lines().get(1));\n\t\t// <--\n\t}", "private static void testUntermComment() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTEST UNTERMINATED COMMENTS: \" +\n\t\t\t \"UNTERM COMMENT ON LINE 4\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inUntermComment\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inUntermComment not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\tif (token.sym != sym.EOF) {\n\t System.err.println(\"ERROR TESTING UNTERMINATED COMMENT: not at EOF\");\n\t System.err.println(\"sym: \" + token.sym);\n\t}\n }", "@Test\n\tpublic void embeddedComment() throws ParseException {\n\t\t// -->\n\t\tILineMatcher startMatcher = JavaSourceLineMatcher.startMatcher();\n\t\tILineMatcher endMatcher = JavaSourceLineMatcher.endMatcher();\n\t\tBlockToBlockListConverter converter = new BlockToBlockListConverter(startMatcher, endMatcher);\n\n\t\tList<String> lines = Lists.newArrayList();\n\n\t\tlines.add(\" // -->\");\n\t\tlines.add(\" // shift one left\");\n\t\tlines.add(\" \t// <--\");\n\t\tlines.add(\" \t// -->\");\n\t\tlines.add(\" \t// shift one left (embedded)\");\n\t\tlines.add(\" \t// this line too (embedded)\");\n\t\tlines.add(\" \t// <--\");\n\t\tlines.add(\" \t// -->\");\n\t\tlines.add(\" // this line too\");\n\t\tlines.add(\" // <--\");\n\n\t\tList<Block> blocks = converter.convert(new Block(lines));\n\n\t\tassertEquals(1, blocks.size());\n\t\tBlock block = blocks.get(0);\n\t\tassertNotNull(block);\n\t\tassertEquals(\"// shift one left\", block.lines().get(0));\n\t\tassertEquals(\"\t// shift one left (embedded)\", block.lines().get(1));\n\t\tassertEquals(\"\t// this line too (embedded)\", block.lines().get(2));\n\t\tassertEquals(\"// this line too\", block.lines().get(3));\n\t\t// <--\n\t}", "private Comment handleComment(String line) {\n\t\tComment c = new Comment();\n\t\tc.setText(\"\");\n\t\treturn (Comment) c;\n\t}", "private String filterComments(String[] initial) {\n\t\tStringBuilder answer = new StringBuilder();\n\t\tfor (int a = 0; a < initial.length; a++) {\n\t\t\tString potential = initial[a];\n\t\t\tint index = potential.indexOf(START_COMMENT);\n\t\t\tif(index != -1)\n\t\t\t\tpotential = potential.substring(0,index);\n\t\t\tif (!potential.trim().isEmpty())\n\t\t\t\tanswer.append(potential + \" \");\n\t\t}\n\t\treturn answer.toString();\n\t}", "public void handleComment(HtmlObjects.Comment t)\n {\n }", "public String nextComment() throws IOException {\n // syntax: (* comment *) | /* comment */ \n StringBuffer c = new StringBuffer();\n int tt;\n if (debug)\n logger.debug(\"comment: \" + tok);\n tt = tok.nextToken();\n if (debug)\n logger.debug(\"comment: \" + tok);\n if (tt == '(') {\n tt = tok.nextToken();\n if (debug)\n logger.debug(\"comment: \" + tok);\n if (tt == '*') {\n if (debug)\n logger.debug(\"comment: \");\n while (true) {\n tt = tok.nextToken();\n if (tt == '*') {\n tt = tok.nextToken();\n if (tt == ')') {\n return c.toString();\n }\n tok.pushBack();\n }\n c.append(tok.sval);\n }\n }\n tok.pushBack();\n if (debug)\n logger.debug(\"comment: \" + tok);\n }\n tok.pushBack();\n if (debug)\n logger.debug(\"comment: \" + tok);\n return c.toString();\n }", "private static boolean hasDDComment(String sql) {\n if (!(sql.startsWith(\"/*\"))) {\n return false;\n }\n // else check to see if it's a DBM trace sql comment\n int i = 2;\n boolean found = false;\n if (sql.length() > 2) {\n // check if the next word starts with one of the specified keys\n if (hasMatchingSubstring(sql, i, PARENT_SERVICE)) {\n found = true;\n } else if (hasMatchingSubstring(sql, i, DATABASE_SERVICE)) {\n found = true;\n } else if (hasMatchingSubstring(sql, i, DD_ENV)) {\n found = true;\n } else if (hasMatchingSubstring(sql, i, DD_VERSION)) {\n found = true;\n } else if (hasMatchingSubstring(sql, i, TRACEPARENT)) {\n found = true;\n }\n }\n return found;\n }", "public void testRemoveDescriptionHeader_12() {\n checkRemoveDescriptionHeader(\"Something\", \"\\nHeader of PHPDoc comment\\nDescription.\\nSomething\");\n }", "public void testRemoveDescriptionHeader_05() {\n checkRemoveDescriptionHeader(\"Something\\n\", \"\\nHeader of PHPDoc comment\\nDescription.\\nSomething\\n\");\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n String string0 = SQLUtil.removeComments(\"!}1w/G=6\");\n assertEquals(\"!}1w/G=6\", string0);\n }", "private void applyComment()\n {\n Map<String, GWikiArtefakt<?>> map = new HashMap<String, GWikiArtefakt<?>>();\n page.collectParts(map);\n GWikiArtefakt<?> artefakt = map.get(\"ChangeComment\");\n if (artefakt instanceof GWikiChangeCommentArtefakt == false) {\n return;\n }\n\n GWikiChangeCommentArtefakt commentArtefakt = (GWikiChangeCommentArtefakt) artefakt;\n String oldText = commentArtefakt.getStorageData();\n String ntext;\n String uname = wikiContext.getWikiWeb().getAuthorization().getCurrentUserName(wikiContext);\n int prevVersion = page.getElementInfo().getProps().getIntValue(GWikiPropKeys.VERSION, 0);\n if (StringUtils.isNotBlank(comment) == true) {\n Date now = new Date();\n ntext = \"{changecomment:modifiedBy=\"\n + uname\n + \"|modifiedAt=\"\n + GWikiProps.date2string(now)\n + \"|version=\"\n + (prevVersion + 1)\n + \"}\\n\"\n + comment\n + \"\\n{changecomment}\\n\"\n + StringUtils.defaultString(oldText);\n } else {\n ntext = oldText;\n }\n ntext = StringUtils.trimToNull(ntext);\n commentArtefakt.setStorageData(ntext);\n }", "void createCommentWithAllSingleFileComments(String string);", "public static boolean isCommentValid(String comment){\r\n return (!comment.matches(\"^.*<.*?>*.$\") && comment.length()<400);\r\n }", "java.lang.String getComments();", "public void handleCfComment(HtmlObjects.CfComment c)\n {\n }", "private void emitComment() throws SAXException {\n if (wantsComments) {\n if (longStrBufPending != '\\u0000') {\n appendLongStrBuf(longStrBufPending);\n }\n }\n tokenHandler.comment(longStrBuf, longStrBufLen);\n }", "public abstract String getResolvedDocComment(Element forElement) throws IOException;", "public final void mCOMMENT() throws RecognitionException {\r\n try {\r\n final int _type = SparqlMarcoLexer.COMMENT;\r\n int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:5: ( '//' (~ ( '\\\\n'\r\n // | '\\\\r' ) )* ( '\\\\r' )? '\\\\n' | '/*' ( options {greedy=false; } : . )* '*/' )\r\n int alt15 = 2;\r\n final int LA15_0 = this.input.LA(1);\r\n\r\n if (LA15_0 == '/') {\r\n final int LA15_1 = this.input.LA(2);\r\n\r\n if (LA15_1 == '/') {\r\n alt15 = 1;\r\n } else if (LA15_1 == '*') {\r\n alt15 = 2;\r\n } else {\r\n final NoViableAltException nvae = new NoViableAltException(\"\", 15, 1,\r\n this.input);\r\n\r\n throw nvae;\r\n }\r\n } else {\r\n final NoViableAltException nvae = new NoViableAltException(\"\", 15, 0, this.input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt15) {\r\n case 1:\r\n this.match(\"//\");\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:14: (~ ( '\\\\n'\r\n // | '\\\\r' ) )*\r\n loop12: do {\r\n int alt12 = 2;\r\n final int LA12_0 = this.input.LA(1);\r\n\r\n if (LA12_0 >= '\\u0000' && LA12_0 <= '\\t' || LA12_0 >= '\\u000B'\r\n && LA12_0 <= '\\f' || LA12_0 >= '\\u000E' && LA12_0 <= '\\uFFFF') {\r\n alt12 = 1;\r\n }\r\n\r\n switch (alt12) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:14: ~\r\n // ( '\\\\n' | '\\\\r' )\r\n {\r\n if (this.input.LA(1) >= '\\u0000' && this.input.LA(1) <= '\\t'\r\n || this.input.LA(1) >= '\\u000B' && this.input.LA(1) <= '\\f'\r\n || this.input.LA(1) >= '\\u000E'\r\n && this.input.LA(1) <= '\\uFFFF') {\r\n this.input.consume();\r\n\r\n } else {\r\n final MismatchedSetException mse = new MismatchedSetException(\r\n null, this.input);\r\n this.recover(mse);\r\n throw mse;\r\n }\r\n\r\n }\r\n break;\r\n\r\n default:\r\n break loop12;\r\n }\r\n } while (true);\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:28: ( '\\\\r' )?\r\n int alt13 = 2;\r\n final int LA13_0 = this.input.LA(1);\r\n if (LA13_0 == '\\r') {\r\n alt13 = 1;\r\n }\r\n switch (alt13) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:28: '\\\\r'\r\n {\r\n this.match('\\r');\r\n\r\n }\r\n break;\r\n\r\n }\r\n this.match('\\n');\r\n _channel = BaseRecognizer.HIDDEN;\r\n break;\r\n case 2:\r\n this.match(\"/*\");\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:65:14: ( options\r\n // {greedy=false; } : . )*\r\n loop14: do {\r\n int alt14 = 2;\r\n final int LA14_0 = this.input.LA(1);\r\n\r\n if (LA14_0 == '*') {\r\n final int LA14_1 = this.input.LA(2);\r\n\r\n if (LA14_1 == '/') {\r\n alt14 = 2;\r\n } else if (LA14_1 >= '\\u0000' && LA14_1 <= '.' || LA14_1 >= '0'\r\n && LA14_1 <= '\\uFFFF') {\r\n alt14 = 1;\r\n }\r\n\r\n } else if (LA14_0 >= '\\u0000' && LA14_0 <= ')' || LA14_0 >= '+'\r\n && LA14_0 <= '\\uFFFF') {\r\n alt14 = 1;\r\n }\r\n\r\n switch (alt14) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:65:42: .\r\n {\r\n this.matchAny();\r\n\r\n }\r\n break;\r\n\r\n default:\r\n break loop14;\r\n }\r\n } while (true);\r\n this.match(\"*/\");\r\n _channel = BaseRecognizer.HIDDEN;\r\n break;\r\n default:\r\n break;\r\n\r\n }\r\n this.state.type = _type;\r\n this.state.channel = _channel;\r\n } finally {\r\n }\r\n }", "private String removeComments(String str) {\n boolean inDQ = false;\n boolean inSQ = false;\n \n String result = str;\n \n for(int i = 0; i < result.length()-1; i++) {\n char c = result.charAt(i);\n \n if(inDQ) {\n if(c == '\\\"' && result.charAt(i-1) != '\\\\') {\n inDQ = false;\n }\n }\n else if(inSQ) {\n if(c == '\\'' && result.charAt(i-1) != '\\\\') {\n inSQ = false;\n }\n }\n else {\n \n // Line comment\n if(c == '/' && result.charAt(i+1) == '/') {\n int newLineIndex = result.indexOf(\"\\n\", i);\n \n result = result.substring(0, i) + result.substring(newLineIndex);\n i--;\n }\n \n // Block comment\n else if(c == '/' && result.charAt(i+1) == '*') {\n int endBlockIndex = result.indexOf(\"*/\", i) + 2;\n \n result = result.substring(0, i) + result.substring(endBlockIndex);\n i--;\n }\n \n // Python comment\n else if(c == '#' && (i == 0 || result.charAt(i-1) == '\\n')) {\n int newLineIndex = result.indexOf(\"\\n\", i);\n \n result = result.substring(0, i) + result.substring(newLineIndex+1); \n i--;\n }\n else if(c == '\\\"') {\n inDQ = true;\n }\n else if(c == '\\'') {\n inSQ = true;\n }\n }\n }\n \n return result;\n }", "public void check_comment_at_the_end_of_statement(boolean on){\r\n this.e_comment_at_the_end_of_statement = on;\r\n }", "String getComment() {\n final StringBuilder sb = new StringBuilder();\n sb.append(indent(1)).append(\"/**\").append(EOL);\n sb.append(indent(1)).append(\" * \").append(\"{@code\").append(EOL);\n\n // Unwrapped so that you can search through the descriptor\n // file for a message and not have to worry about line breaks\n final String ws = formatString; // wrapText(formatString, 70);\n\n final String[] sa = ws.split(EOL);\n for (final String s : sa) {\n sb.append(indent(1)).append(\" * \").append(s).append(EOL);\n }\n\n sb.append(indent(1)).append(\" * \").append(\"}\").append(EOL);\n sb.append(indent(1)).append(\" */\").append(EOL);\n return sb.toString();\n }", "void visitComment(MappedElementKind targetKind, String comment);", "public final void mCOMMENT() throws RecognitionException {\n try {\n int _type = COMMENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:5: ( ( '--' | '//' ) ( . )* ( '\\\\n' | '\\\\r' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:7: ( '--' | '//' ) ( . )* ( '\\\\n' | '\\\\r' )\n {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:7: ( '--' | '//' )\n int alt11=2;\n int LA11_0 = input.LA(1);\n\n if ( (LA11_0=='-') ) {\n alt11=1;\n }\n else if ( (LA11_0=='/') ) {\n alt11=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 11, 0, input);\n\n throw nvae;\n }\n switch (alt11) {\n case 1 :\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:8: '--'\n {\n match(\"--\"); \n\n\n }\n break;\n case 2 :\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:15: '//'\n {\n match(\"//\"); \n\n\n }\n break;\n\n }\n\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:21: ( . )*\n loop12:\n do {\n int alt12=2;\n int LA12_0 = input.LA(1);\n\n if ( (LA12_0=='\\n'||LA12_0=='\\r') ) {\n alt12=2;\n }\n else if ( ((LA12_0>='\\u0000' && LA12_0<='\\t')||(LA12_0>='\\u000B' && LA12_0<='\\f')||(LA12_0>='\\u000E' && LA12_0<='\\uFFFF')) ) {\n alt12=1;\n }\n\n\n switch (alt12) {\n \tcase 1 :\n \t // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:21: .\n \t {\n \t matchAny(); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop12;\n }\n } while (true);\n\n if ( input.LA(1)=='\\n'||input.LA(1)=='\\r' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n _channel = HIDDEN; \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "static public String scrubComments(String what) {\n char p[] = what.toCharArray();\n\n int index = 0;\n while (index < p.length) {\n // for any double slash comments, ignore until the end of the line\n if ((p[index] == '/') &&\n (index < p.length - 1) &&\n (p[index+1] == '/')) {\n p[index++] = ' ';\n p[index++] = ' ';\n while ((index < p.length) &&\n (p[index] != '\\n')) {\n p[index++] = ' ';\n }\n\n // check to see if this is the start of a new multiline comment.\n // if it is, then make sure it's actually terminated somewhere.\n } else if ((p[index] == '/') &&\n (index < p.length - 1) &&\n (p[index+1] == '*')) {\n p[index++] = ' ';\n p[index++] = ' ';\n boolean endOfRainbow = false;\n while (index < p.length - 1) {\n if ((p[index] == '*') && (p[index+1] == '/')) {\n p[index++] = ' ';\n p[index++] = ' ';\n endOfRainbow = true;\n break;\n\n } else {\n // continue blanking this area\n p[index++] = ' ';\n }\n }\n if (!endOfRainbow) {\n throw new RuntimeException(_(\"Missing the */ from the end of a \" +\n \"/* comment */\"));\n }\n } else { // any old character, move along\n index++;\n }\n }\n return new String(p);\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n String string0 = SQLUtil.removeComments(\"\");\n assertEquals(\"\", string0);\n }", "public String getComment() {\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}", "public void setComment(String c) {\n comment = c ;\n }", "public final void mCOMMENT() throws RecognitionException {\r\n try {\r\n int _type = COMMENT;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:9: ( '/*' ( options {greedy=false; } : . )* '*/' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:12: '/*' ( options {greedy=false; } : . )* '*/'\r\n {\r\n match(\"/*\"); \r\n\r\n\r\n\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:17: ( options {greedy=false; } : . )*\r\n loop1:\r\n do {\r\n int alt1=2;\r\n int LA1_0 = input.LA(1);\r\n\r\n if ( (LA1_0=='*') ) {\r\n int LA1_1 = input.LA(2);\r\n\r\n if ( (LA1_1=='/') ) {\r\n alt1=2;\r\n }\r\n else if ( ((LA1_1 >= '\\u0000' && LA1_1 <= '.')||(LA1_1 >= '0' && LA1_1 <= '\\uFFFF')) ) {\r\n alt1=1;\r\n }\r\n\r\n\r\n }\r\n else if ( ((LA1_0 >= '\\u0000' && LA1_0 <= ')')||(LA1_0 >= '+' && LA1_0 <= '\\uFFFF')) ) {\r\n alt1=1;\r\n }\r\n\r\n\r\n switch (alt1) {\r\n \tcase 1 :\r\n \t // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:253:45: .\r\n \t {\r\n \t matchAny(); \r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop1;\r\n }\r\n } while (true);\r\n\r\n\r\n match(\"*/\"); \r\n\r\n\r\n\r\n _channel = HIDDEN; \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public final void mCOMMENT() throws RecognitionException {\n try {\n int _type = COMMENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2697:3: ( ( ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) ) ) )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:6: ( ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) ) )\n {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:6: ( ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) ) )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:7: ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) )\n {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:7: ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:8: ( '//' (~ ( '\\\\r' | '\\\\n' ) )* )\n {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:8: ( '//' (~ ( '\\\\r' | '\\\\n' ) )* )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:9: '//' (~ ( '\\\\r' | '\\\\n' ) )*\n {\n match(\"//\"); if (state.failed) return ;\n\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:14: (~ ( '\\\\r' | '\\\\n' ) )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( ((LA1_0>='\\u0000' && LA1_0<='\\t')||(LA1_0>='\\u000B' && LA1_0<='\\f')||(LA1_0>='\\u000E' && LA1_0<='\\uFFFF')) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:15: ~ ( '\\\\r' | '\\\\n' )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='\\t')||(input.LA(1)>='\\u000B' && input.LA(1)<='\\f')||(input.LA(1)>='\\u000E' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n _channel=HIDDEN;\n }\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "void visit(Comment node);", "public void testRemoveDescriptionHeader_11() {\n checkRemoveDescriptionHeader(\"\", \"\\nHeader of PHPDoc comment\\nDescription.\");\n }", "org.hl7.fhir.String addNewComments();", "public static boolean MisplacedComment(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"MisplacedComment\")) return false;\n if (!nextTokenIs(b, EXPR_COMMENT_START)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, EXPR_COMMENT_START);\n r = r && MisplacedCommentContent(b, l + 1);\n r = r && consumeToken(b, EXPR_COMMENT_END);\n exit_section_(b, m, MISPLACED_COMMENT, r);\n return r;\n }", "public static String commentString(final String msg) {\n return \"# \" + msg;\n }" ]
[ "0.7682289", "0.7447918", "0.72401154", "0.70248663", "0.6777402", "0.66935146", "0.64872855", "0.6466363", "0.642483", "0.6421671", "0.63867337", "0.63439775", "0.63325477", "0.6300027", "0.6276185", "0.6231622", "0.612744", "0.610894", "0.6106605", "0.61041886", "0.606419", "0.60640097", "0.6052246", "0.60487294", "0.6036114", "0.60191256", "0.60078424", "0.60078424", "0.59920764", "0.59735477", "0.59662384", "0.59652984", "0.59613985", "0.59506524", "0.59089947", "0.5898363", "0.589031", "0.5889484", "0.5867598", "0.5849823", "0.58374393", "0.5837391", "0.5818072", "0.5814678", "0.57992214", "0.5777644", "0.5773245", "0.57644045", "0.57400125", "0.5739939", "0.5733742", "0.5733742", "0.5733742", "0.5733742", "0.5733742", "0.5733742", "0.5730728", "0.57245255", "0.5720814", "0.5715356", "0.5713353", "0.5712075", "0.57118475", "0.5700279", "0.5693409", "0.56915843", "0.5674372", "0.56679237", "0.56644154", "0.5638264", "0.56365854", "0.562531", "0.5604826", "0.5604146", "0.5593681", "0.5587158", "0.5585366", "0.55834746", "0.5582906", "0.5556053", "0.5529962", "0.55223066", "0.55161965", "0.5507272", "0.5498992", "0.54945797", "0.5489641", "0.54634786", "0.54511774", "0.543922", "0.54388374", "0.54313517", "0.54204315", "0.5419129", "0.5416306", "0.5415152", "0.5396513", "0.537956", "0.53765893", "0.537598", "0.5375938" ]
0.0
-1
These are not valid CSS
@Override public boolean visit(CssDef x, Context ctx) { out.printOpt("/* CssDef */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n assertEquals(\"spaces\", \"justatest\", Encodings.toCSSString(\"just a test\"));\n assertEquals(\"special\", \"a\", Encodings.toCSSString(\"&*%$#a%#!@()\"));\n }", "@Override\n public String getCSSStyle() {\n return null;\n }", "public BlockUIThemedCSS()\n\t{\n\t\t//No config required\n\t}", "void tag2() \n\t{\n\t\t/* c_style_tag: This is a C style tag. */\n\t}", "private String cssFileForHtml() {\r\n\t\treturn \"<style>table, td, th {\"\r\n\t\t\t\t+ \"border: 1px solid #ddd;\"\r\n\t\t\t\t+ \"text-align: left;}\"\r\n\t\t\t\t+ \"table {\"\r\n\t\t\t\t+ \"border-collapse: collapse;\"\r\n\t\t\t\t+ \"width: 100%;}\"\r\n\t\t\t\t+ \"th, td {\"\r\n\t\t\t\t+ \"padding: 10px;\"\r\n\t\t\t\t+ \"color:#000000;\"\r\n\t\t\t\t+ \"font-family: 'Roboto', sans-serif;}td{\"\r\n\t\t\t\t+ \"font-size: smaller;}\"\r\n\t\t\t\t+ \"th{background-color:#EEEEEE;color:#000000;}tr{background-color:#FFFFFF;}\"\r\n\t\t\t\t+ \"tr:hover{background-color:#EEEEEE}</style>\";\r\n\t}", "public void testW3C() \n throws FileNotFoundException, ParseException\n {\n String str_file = str_Directory + \"/\" + \"w3c-css1-test.css\";\n Parser parser = new Parser(new java.io.FileInputStream(str_file));\n\n parser.setHandler(this);\n parser.Parse();\n }", "@Override\n public String getCSSClass() {\n return null;\n }", "@Override\n public boolean visit(CssExternalSelectors x, Context ctx) {\n out.printOpt(\"/* @external\");\n for (String className : x.getClasses()) {\n out.printOpt(\" \");\n out.printOpt(className);\n }\n out.printOpt(\"; */\");\n out.newlineOpt();\n return false;\n }", "public void validateRpd9s1()\n {\n String exprString = \"//@style\";\n assertFalse(Type.ERROR, \"rpd9s1.attr\", ((Boolean) evaluate(getElement(ELEM_BODY), exprString,\n XPathConstants.BOOLEAN)));\n assertFalse(Type.ERROR, \"rpd9s1.tag\",\n getChildren(getElement(ELEM_BODY), \"style\").getNodeList().getLength() > 0);\n }", "public void test450389() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 44 column 1 - Warning: <font> attribute \"color\" has invalid value \"reddish\"\n // line 72 column 1 - Warning: <font> attribute \"color\" has invalid value \"#FF\"\n // line 76 column 1 - Warning: <font> attribute \"color\" has invalid value \"grurple\"\n // line 77 column 1 - Warning: <font> attribute \"color\" has invalid value \"#grurple\"\n // line 78 column 1 - Warning: <font> attribute \"color\" has invalid value \"#1234567\"\n // Info: Document content looks like HTML 3.2\n\n executeTidyTest(\"450389.html\");\n assertWarnings(6);\n }", "private void addCss() {\n StyleLink jqueryLink = new StyleLink(\"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\");\n page.addHeader(jqueryLink);\n StyleLink jqueryTooltipLink = new StyleLink(\"/css/jquery.ui.tooltip.css\");\n page.addHeader(jqueryTooltipLink);\n StyleLink cssLink = new StyleLink(\"/css/lockss-new.css\");\n page.addHeader(cssLink);\n }", "public interface Style extends CssResource {\n\n /**\n * The style for the panel that contains\n * the whole user record\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecord();\n\n /**\n * The style for the name of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String nameLabel();\n\n /**\n * The style for the username of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabel();\n\n /**\n * The style for the user avatar image\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImage();\n\n /**\n * The style for the remove image\n *\n * @author Johannes Gryffenberg <[email protected]>\n * @since 26 Feb 2013\n *\n * @return The name of the compiled style\n */\n String removeImageStyle();\n\n /**\n * The style for the user record when it is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecordSelected();\n\n /**\n * The style for the username when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabelSelected();\n\n /**\n * The style for the avatar when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImageSelected();\n }", "public BuiltInStyle(int xfind, int sn)\r\n/* 10: */ {\r\n/* 11:46 */ super(Type.STYLE);\r\n/* 12: */ \r\n/* 13:48 */ this.xfIndex = xfind;\r\n/* 14:49 */ this.styleNumber = sn;\r\n/* 15: */ }", "private String getCSS() {\r\n StringBuffer css = new StringBuffer();\r\n css.append(\"<style type='text/css'>\");\r\n css.append(\"<!--\");\r\n css.append(\"\tA.pagina:link, A.pagina:visited, A.pagina:active, A.pagina:hover {\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-STYLE: normal;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-DECORATION: none ;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:link {\");\r\n css.append(\"\t\tCOLOR: #0039ba;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:visited {\");\r\n css.append(\"\t\tCOLOR: #6c8bc3;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:active {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:hover {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tTR.pagina{\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-ALIGN: center;\");\r\n css.append(\"\t\tCOLOR: gray;\");\r\n css.append(\"\t}\");\r\n css.append(\"-->\");\r\n css.append(\"</style>\");\r\n return (css.toString());\r\n }", "public static String getCSS()\n {\n \treturn \"table.relations \"+\n\t\t \"{ \" +\n\t\t\t\" margin: 1em 1em 1em 2em;\" +\n\t\t\t\" border-collapse: collapse;\" +\n\t\t\t\" width:90%;\" +\n\t\t \"}\" +\n\t\t\"table.relations td\" + \n\t\t\"{\" +\n\t\t\" border-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tbackground: #fff;\" +\n\t\t\"\tpadding: 6px 6px 6px 12px;\" +\n\t\t\"\tcolor: #6D929B;\" +\n\t\t\"}\" +\n\t\t\"table.relations th\" + \n\t\t\"{\" +\n\t\t\"\tfont: bold 10px \\\"Trebuchet MS\\\", Verdana, Arial, Helvetica,\" +\n\t\t\"\tsans-serif;\" +\n\t\t\"\tcolor: #003399;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-top: 1px solid #C1DAD7;\" +\n\t\t\"\tletter-spacing: 2px;\" +\n\t\t\"\ttext-transform: uppercase;\" +\n\t\t\"\ttext-align: left;\" +\n\t\t\"\tpadding: 3px 3px 3px 6px;\" +\n\t\t\"\tbackground: #B0C4DE;\" +\n\t\t\"}\";\n }", "@Override\n public boolean visit(CssUrl x, Context ctx) {\n out.printOpt(\"/* CssUrl */\");\n out.newlineOpt();\n return false;\n }", "protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}", "void tag3() \n\t{\n\t\t// c++_style_tag: This is a C++ style tag.\n\t}", "public String toCSS(){\n return new StringBuilder()\n .append(\"display:\")\n .append(this.toString().replace(\"_\", \"-\"))\n .append(\";\").toString();\n }", "@Override\n\tprotected NSArray<String> additionalCSSFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.css\" } );\n\t}", "private void writeCss(HttpServletRequest request,\n HttpServletResponse response) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n List<String> namespaces = Lists.newArrayList(context.getPreloads());\n DefinitionService definitionService = Aura.getDefinitionService();\n Client.Type type = Aura.getContextService().getCurrentContext().getClient().getType();\n Mode mode = context.getMode();\n StringBuffer sb = new StringBuffer();\n \n for (String ns : namespaces) {\n String key = type.name() + \"$\" + ns;\n \n String nsCss = !mode.isTestMode() ? cssCache.get(key) : null;\n if (nsCss == null) {\n DefDescriptor<ThemeDef> matcher = definitionService.getDefDescriptor(String.format(\"css://%s.*\", ns),\n ThemeDef.class);\n Set<DefDescriptor<ThemeDef>> descriptors = definitionService.find(matcher);\n List<ThemeDef> nddefs = new ArrayList<ThemeDef>();\n \n sb.setLength(0);\n for(DefDescriptor<ThemeDef> descriptor : descriptors){\n //\n // This could use the generic routine above except for this brain dead little\n // gem.\n //\n if(!descriptor.getName().toLowerCase().endsWith(\"template\")){\n ThemeDef def = descriptor.getDef();\n if(def != null){\n nddefs.add(def);\n }\n }\n }\n \n context.setPreloading(true);\n Appendable tmp = mode.isTestMode() ? response.getWriter() : sb;\n preloadSerialize(nddefs, ThemeDef.class, tmp);\n if (!mode.isTestMode()) {\n nsCss = sb.toString();\n cssCache.put(key, nsCss);\n }\n }\n \n if (nsCss != null) {\n \tresponse.getWriter().append(nsCss);\n }\n }\n }", "public PXStylesheetParser() {\n this(null);\n }", "protected WebXStyleElementImpl() {\n }", "abstract protected AbstractCSSStyleSheet getUserImportantStyleSheet();", "@Test \n public void CSSParserTest() throws Exception{\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n String cssString = \"\";\n try {\n BufferedReader in = new BufferedReader(\n new FileReader(\n \"./test-file/testFile.txt\"));\n String line;\n while ((line = in.readLine()) != null) {\n cssString += line;\n cssString += \"\\n\";\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n Document doc = new Document();\n {\n Element html = doc.createElement(\"html\");\n Element head = doc.createElement(\"head\");\n Element body = doc.createElement(\"body\");\n Node text = doc.createTextNode(\"test message\");\n html.appendChild(head);\n html.appendChild(body);\n body.appendChild(text);\n doc.appendChild(html);\n }\n /**Get doc from UIParser result whether is not null \n * \n */\n assertNotNull(doc.documentElement());\n \n /**Setting doc Style from CSSParser\n * \n */\n CSSParser CSSParser = new CSSParser();\n CSSParser.parser(cssString, doc); \n \n Element html = doc.documentElement(); \n \n /** Test whether the tag Name is correct\n * \n */\n assertEquals(\"tagName of root element should be <html>\", \"html\", html.tagName());\n \n /**Use html getStyle that it is not null\n * \n */\n Style style = html.getStyle();\n assertNotNull(style);\n \n /** Test whether the background is black\n * \n */\n assertEquals(\"background should be black\", \"black\", style.getProperty(\"background\"));\n \n /** Test whether the width is correct\n * \n */\n assertEquals(\"width should be 100\", \"100px\", style.getProperty(\"width\"));\n \n \n /**Get the child list of documentElement and test whether the child count correct \n * \n */\n NodeList list = html.childNodes();\n assertEquals(\"list length should be one\",list.length(),2);\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n assertEquals(\"first child of <html> should be <head>\", \"head\", list.item(0).nodeName());\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n Node body = list.item(1);\n assertEquals(\"second child of <html> should be <body>\", \"body\", body.nodeName());\n \n /**Get Style from element getStyle whether it is null or not\n * \n */\n Element bodyElement = (Element) body;\n Style bodyStyle = bodyElement.getStyle();\n assertNotNull(bodyStyle);\n \n /** Test whether the margin-top is correct\n * \n */\n assertEquals(\"margin-top should be 10px\", \"10px\", bodyStyle.getProperty(\"margin-top\"));\n \n /** Test whether the text-color is correct\n * \n */\n assertEquals(\"text-color should be blue\", \"blue\", bodyStyle.getProperty(\"text-color\"));\n }", "abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();", "@Override\n public boolean visit(CssEval x, Context ctx) {\n out.printOpt(\"/* CssEval */\");\n out.newlineOpt();\n return false;\n }", "List<CSSParseException> getExceptions();", "public String getCss() {\n return clean(css);\n }", "public CssBorderWidth() {\n }", "public void test552861() throws Exception\n {\n executeTidyTest(\"552861.html\");\n // should complain about invalid \"with\" attribute\n assertWarnings(1);\n }", "@Test\n public void test037() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)table0.style();\n }", "public void ardublockStyling(Document doc) {\n\t\tif (styleList != null) {\n\t\t\tXPathFactory factory = XPathFactory.newInstance();\n\t\t\tfor (String[] style : styleList) {\n\t\t\t\tXPath xpath = factory.newXPath();\n\t\t\t\ttry {\n\t\t\t\t\t// XPathExpression expr = xpath.compile(\"//BlockGenus[@name[starts-with(.,\\\"Tinker\\\")]]/@color\");\n\t\t\t\t\tXPathExpression expr = xpath.compile(style[0]);\n\t\t\t\t\tNodeList bgs = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);\n\t\t\t\t\tfor (int i = 0; i < bgs.getLength(); i++) {\n\t\t\t\t\t\tNode bg = bgs.item(i);\n\t\t\t\t\t\tbg.setNodeValue(style[1]);\n\t\t\t\t\t\t// bg.setAttribute(\"color\", \"128 0 0\");\n\t\t\t\t\t}\n\t\t\t\t} catch (XPathExpressionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private PrngFixes() {\n }", "@Test\n public void eofHandling() {\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \" \");\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \"\\t\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em;\");\n assertLine(Language.CSS, new Line(Language.CSS, COMMENT), \"/* comment */\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em; /* with comment */\");\n }", "@Override\n protected Node newNode() {\n return new WebXStyleElementImpl();\n }", "public void test427810() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 8 column 1 - Warning: <blink> is not approved by W3C\n // line 9 column 1 - Warning: <wbr> is not approved by W3C\n // line 10 column 1 - Warning: <nobr> is not approved by W3C\n // Info: Document content looks like HTML Proprietary\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"427810.html\");\n assertWarnings(4);\n }", "String getCssFilter();", "public interface Css extends CssResource {\n String button();\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "public void styleMe(){\n\t}", "protected void tidy(final CSSRule cssRule) {\n\t\tif(cssRule instanceof CSSStyleRule) { //TODO fix\n\t\t\tfinal CSSStyleRule cssStyleRule = (CSSStyleRule)cssRule; //TODO fix\n\t\t\ttidy(cssStyleRule.getStyle()); //tidy the style declaration\n\t\t}\n\t}", "static zzco m26832d() {\n return new zzco(\"Failed to parse the message.\");\n }", "public void test516370() throws Exception\n {\n // line 10 column 1 - Warning: <h2> ID \"_ValidID2\" uses XML ID syntax\n // line 11 column 1 - Warning: <h2> ID \":ValidID3\" uses XML ID syntax\n // line 13 column 1 - Warning: <h2> attribute \"id\" has invalid value \".InvalidID1\"\n // line 14 column 1 - Warning: <h2> attribute \"id\" has invalid value \"2InvalidID2\"\n // line 15 column 1 - Warning: <h2> attribute \"id\" lacks value\n\n executeTidyTest(\"516370.xhtml\");\n assertWarnings(5);\n assertLogContains(\"XML ID syntax\");\n }", "public final boolean synpred2_css21() {\n state.backtracking++;\n int start = input.mark();\n try {\n synpred2_css21_fragment(); // can never throw exception\n } catch (RecognitionException re) {\n System.err.println(\"impossible: \"+re);\n }\n boolean success = !state.failed;\n input.rewind(start);\n state.backtracking--;\n state.failed=false;\n return success;\n }", "public abstract String getDefaultStylesheet ();", "public String getCurrentcss() {\n return clean(currentcss);\n }", "public void testCOLOUR2() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 121, \"sable\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public static interface Style extends CssResource {\r\n\r\n\t\t/**\r\n\t\t * Applied to buttons.\r\n\t\t */\r\n\t\tString button();\r\n\r\n\t\t/**\r\n\t\t * Applied to disabled buttons.\r\n\t\t */\r\n\t\tString disabledButton();\r\n\r\n\t\t/**\r\n\t\t * Applied to the details text.\r\n\t\t */\r\n\t\tString pageDetails();\r\n\r\n\t\tString pageDetails2();\r\n\t\t\r\n\t\tString imogPagerLayout();\r\n\t}", "public void test431964() throws Exception\n {\n // line 7 column 1 - Warning: <table> attribute \"height\" lacks value\n // line 7 column 1 - Warning: <table> proprietary attribute \"height\"\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML Proprietary\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"431964.html\");\n assertWarnings(2);\n }", "public void test435922() throws Exception\n {\n // line 6 column 1 - Warning: <input> isn't allowed in <body> elements\n // line 7 column 3 - Warning: inserting implicit <form>\n // line 7 column 3 - Warning: missing </form>\n // line 7 column 3 - Warning: <form> lacks \"action\" attribute\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"435922.html\");\n assertWarnings(4);\n }", "public static void processCSS(File file) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n int init, end;\n\n while ((line = in.readLine()) != null) {\n if ((init = line.indexOf(\"/*~RTL \")) != -1) {\n end = line.indexOf(\"*/\");\n if (end == -1)\n end = line.length();\n vLines.add(line.substring(init + 7, end) + \"\\n\");\n } else {\n vLines.add(line + \"\\n\");\n }\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.close();\n }", "public SimpleStyle() {\n\t\t// set default values\n\t\tthis.foregroundColor = -1;\n\t\t// others are null: VM DONE\n\t}", "private void loadRuleSets() throws CSSException {\n StyleSheet stylesheet = cssCode.getParsedCSS();\n for (RuleBlock block : stylesheet) {\n if (block instanceof RuleSet) {\n\n StringBuilder selectorString = new StringBuilder();\n RuleSet ruleSet = (RuleSet) block;\n\n List<CombinedSelector> selectors = ruleSet.getSelectors();\n Iterator<CombinedSelector> selectorsIterator = selectors.iterator();\n while (selectorsIterator.hasNext()) {\n CombinedSelector selector = selectorsIterator.next();\n selectorString.append(selector.toString());\n if (selectorsIterator.hasNext()) {\n selectorString.append(\", \");\n }\n }\n\n List<CSSRule> cssRules = new ArrayList<>();\n CSSRule cssRule;\n Declaration.Source source;\n DeclarationPosition declarationPosition;\n\n for (Declaration declaration : ruleSet) {\n cssRule = new CSSRule(declaration.getProperty(), \"\");\n\n source = declaration.getSource();\n if (source == null) {\n declarationPosition = null;\n } else {\n declarationPosition = new DeclarationPosition(source.getLine(), source.getPosition());\n }\n cssRule.setDeclarationPosition(declarationPosition);\n\n cssRules.add(cssRule);\n }\n\n CSSRuleSet cssRuleSet = new CSSRuleSet(selectorString.toString(), cssRules);\n\n this.cssRuleBlocks.add(cssRuleSet);\n\n // add record to the position-declaration map\n for (CSSRule iCssRule : cssRuleSet.getCssRules()) {\n this.declarationPositionMap.put(\n iCssRule.getDeclarationPosition(),\n new DeclarationSource(cssRuleSet, iCssRule)\n );\n }\n }\n }\n }", "@Override public String getUserAgentStylesheet() {\r\n return getClass().getResource(\"switch.css\").toExternalForm();\r\n }", "protected ScriptStyle(int val, String s)\r\n/* 10: */ {\r\n/* 11: 54 */ this.value = val;\r\n/* 12: 55 */ this.string = s;\r\n/* 13: */ \r\n/* 14: 57 */ ScriptStyle[] oldstyles = styles;\r\n/* 15: 58 */ styles = new ScriptStyle[oldstyles.length + 1];\r\n/* 16: 59 */ System.arraycopy(oldstyles, 0, styles, 0, oldstyles.length);\r\n/* 17: 60 */ styles[oldstyles.length] = this;\r\n/* 18: */ }", "protected void extraExplosions_EM() {\n }", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private HepRepColor() {\n }", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "public void test427827() throws Exception\n {\n // line 6 column 1 - Warning: missing </a> before <a>\n // line 7 column 6 - Warning: discarding unexpected </a>\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"427827.html\");\n assertWarnings(2);\n }", "public void test438956() throws Exception\n {\n // line 3 column 1 - Warning: plain text isn't allowed in <head> elements\n // line 6 column 1 - Warning: discarding unexpected <body>\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"438956.html\");\n\n assertWarnings(2);\n }", "public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}", "public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }", "public void updateSyntaxStyles() {\n }", "public void test431883() throws Exception\n {\n executeTidyTest(\"431883.html\");\n\n assertLogContains(\"Doctype given is \\\"-//W3C//DTD HTML 4.0\");\n }", "StyleValue getCSSValue();", "@org.junit.Test\n public void compElemBadName2() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName3() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"foo:error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "private LineStyleUtils() {\n\n }", "public abstract TC createStyle();", "abstract protected InlineStyle createInlineStyle(Node owner);", "@org.junit.Test\n public void compElemBadName6() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xmlns' Mary Holstege :) element { fn:QName(\\\"http://example.com/some-uri\\\",\\\"xmlns:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName4() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xml' and namespace URI is not 'http://www.w3.org/XML/1998/namespace' Mary Holstege :) element { fn:QName(\\\"http://example.com/not-XML-uri\\\",\\\"xml:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "public Spider()\r\n/* 24: */ {\r\n/* 25: 21 */ setBackground(Color.WHITE);\r\n/* 26: */ }", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "private void loadCssForThisClass() {\n\t\tString className = getClass().getName();\n\t\tString cssPath = className.replace(\".\", \"/\") + \".css\";\n\t\tURL cssUrl = getClass().getClassLoader().getResource(cssPath);\n\t\tloadCss(cssUrl);\n\n\t\t// System.out.println(\"CSS:\\n\" + getCssContent(cssUrl) );\n\t}", "private int _parseStyle(\n String value\n )\n {\n if (value == null)\n return -1;\n\n if (value.equalsIgnoreCase(XMLConstants.PLAIN_FONT_STYLE))\n return Font.PLAIN;\n if (value.equalsIgnoreCase(XMLConstants.ITALIC_FONT_STYLE))\n return Font.ITALIC;\n if (value.equalsIgnoreCase(XMLConstants.BOLD_FONT_STYLE))\n return Font.BOLD;\n\n _LOG.warning(_STYLE_ERROR);\n\n return -1;\n }", "public void mo1962e() throws cf {\r\n }", "@org.junit.Test\n public void constrCompelemCompname19() {\n final XQuery query = new XQuery(\n \"element {xs:untypedAtomic('el em')} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@org.junit.Test\n public void constrCompelemCompname18() {\n final XQuery query = new XQuery(\n \"element {'el em'} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@Override\n\tpublic void compile() {\n\t\t\n\t}", "public String nextCSSString()\n {\n if (empty())\n return null;\n int ch = input.charAt(position);\n int endQuote = ch;\n if (ch != '\\'' && ch != '\"')\n return null;\n\n StringBuilder sb = new StringBuilder();\n position++;\n ch = nextChar();\n while (ch != -1 && ch != endQuote)\n {\n if (ch == '\\\\') {\n // Escaped char sequence\n ch = nextChar();\n if (ch == -1) // EOF: do nothing\n continue;\n if (ch == '\\n' || ch == '\\r' || ch == '\\f') { // a CSS newline\n ch = nextChar();\n continue; // Newline: consume it\n }\n int hc = hexChar(ch);\n if (hc != -1) {\n int codepoint = hc;\n for (int i=1; i<=5; i++) {\n ch = nextChar();\n hc = hexChar(ch);\n if (hc == -1)\n break;\n codepoint = codepoint * 16 + hc;\n }\n sb.append((char) codepoint);\n continue;\n }\n // Other chars just unescape to themselves\n // Fall through to append\n }\n sb.append((char) ch);\n ch = nextChar();\n }\n return sb.toString();\n }", "public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}", "private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}", "public WebXStyleElementImpl(String prefix, WebXDocumentImpl owner) {\n super(prefix, owner);\n }", "public void test431874() throws Exception\n {\n executeTidyTest(\"431874.html\");\n assertWarnings(2);\n }", "public MalformedHexadecimalColourException(String message) {\n super(message);\n }", "public static String cssColor(final char c) {\n\tfinal short[] array = _cssColor0(c);\n\treturn \"rgb(\"+array[0]+\",\"+array[1]+\",\"+array[2]+\")\";\n\t}", "public void testCOLOUR6() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 125, \"or\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "private void cleanStyles(Element articleContent) {\n for (Element e : articleContent.getAllElements()) {\n e.removeAttr(\"style\");\n }\n }", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Override\n\tpublic final boolean isCSS1Compat() {\n\t\treturn getCompatMode().equals(\"CSS1Compat\");\n\t}", "public void test553414() throws Exception\n {\n executeTidyTest(\"553414.html\");\n assertLogContains(\"given is \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\n assertLogContains(\"looks like XHTML 1.0 Transitional\");\n assertWarnings(1);\n }", "Map<String, String> styles(String group);", "public DTMDOMException(short code) {\n/* 49 */ super(code, \"\");\n/* */ }", "protected boolean isFreeStyle(){\r\n\t\treturn false;\r\n\t}", "public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}", "@Test(expected = SDLParseException.class)\n public final void testBadHead1 () throws IOException {\n \tparser.load(makeReader (\":This::= 'lol';\"));\n }" ]
[ "0.5973445", "0.57924896", "0.5707429", "0.56147325", "0.5371038", "0.53400475", "0.53336716", "0.5310589", "0.52341753", "0.521552", "0.5170459", "0.5143138", "0.5118289", "0.51159304", "0.51095194", "0.50751805", "0.5003203", "0.49782643", "0.4964525", "0.49439517", "0.49215955", "0.4910257", "0.4906586", "0.4902893", "0.48919174", "0.48802352", "0.48691526", "0.4857048", "0.48558944", "0.48380992", "0.4829993", "0.47949314", "0.47877726", "0.4778216", "0.47365764", "0.47248808", "0.47235098", "0.47041565", "0.4698876", "0.46811846", "0.4676324", "0.46747047", "0.46652225", "0.46504402", "0.4640285", "0.46323684", "0.46099505", "0.4600028", "0.45902044", "0.45806146", "0.45705408", "0.45702106", "0.4568396", "0.45504656", "0.45501962", "0.4546296", "0.45457664", "0.45405415", "0.45370024", "0.45334682", "0.45316738", "0.45296916", "0.45284107", "0.45252785", "0.45109853", "0.45066327", "0.45037565", "0.44925922", "0.44865912", "0.447994", "0.44771212", "0.44749972", "0.4474647", "0.44703895", "0.44692358", "0.44645423", "0.44645387", "0.4464331", "0.44581458", "0.44563648", "0.44505405", "0.4446042", "0.44423825", "0.44412744", "0.44382757", "0.44293243", "0.44291645", "0.4422003", "0.44192794", "0.44118664", "0.4402977", "0.43943492", "0.43921876", "0.43901235", "0.43857443", "0.43793264", "0.43738326", "0.43720227", "0.43693823", "0.4366559" ]
0.52381855
8
These are not valid CSS
@Override public boolean visit(CssEval x, Context ctx) { out.printOpt("/* CssEval */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n assertEquals(\"spaces\", \"justatest\", Encodings.toCSSString(\"just a test\"));\n assertEquals(\"special\", \"a\", Encodings.toCSSString(\"&*%$#a%#!@()\"));\n }", "@Override\n public String getCSSStyle() {\n return null;\n }", "public BlockUIThemedCSS()\n\t{\n\t\t//No config required\n\t}", "void tag2() \n\t{\n\t\t/* c_style_tag: This is a C style tag. */\n\t}", "private String cssFileForHtml() {\r\n\t\treturn \"<style>table, td, th {\"\r\n\t\t\t\t+ \"border: 1px solid #ddd;\"\r\n\t\t\t\t+ \"text-align: left;}\"\r\n\t\t\t\t+ \"table {\"\r\n\t\t\t\t+ \"border-collapse: collapse;\"\r\n\t\t\t\t+ \"width: 100%;}\"\r\n\t\t\t\t+ \"th, td {\"\r\n\t\t\t\t+ \"padding: 10px;\"\r\n\t\t\t\t+ \"color:#000000;\"\r\n\t\t\t\t+ \"font-family: 'Roboto', sans-serif;}td{\"\r\n\t\t\t\t+ \"font-size: smaller;}\"\r\n\t\t\t\t+ \"th{background-color:#EEEEEE;color:#000000;}tr{background-color:#FFFFFF;}\"\r\n\t\t\t\t+ \"tr:hover{background-color:#EEEEEE}</style>\";\r\n\t}", "public void testW3C() \n throws FileNotFoundException, ParseException\n {\n String str_file = str_Directory + \"/\" + \"w3c-css1-test.css\";\n Parser parser = new Parser(new java.io.FileInputStream(str_file));\n\n parser.setHandler(this);\n parser.Parse();\n }", "@Override\n public String getCSSClass() {\n return null;\n }", "@Override\n public boolean visit(CssDef x, Context ctx) {\n out.printOpt(\"/* CssDef */\");\n out.newlineOpt();\n return false;\n }", "@Override\n public boolean visit(CssExternalSelectors x, Context ctx) {\n out.printOpt(\"/* @external\");\n for (String className : x.getClasses()) {\n out.printOpt(\" \");\n out.printOpt(className);\n }\n out.printOpt(\"; */\");\n out.newlineOpt();\n return false;\n }", "public void validateRpd9s1()\n {\n String exprString = \"//@style\";\n assertFalse(Type.ERROR, \"rpd9s1.attr\", ((Boolean) evaluate(getElement(ELEM_BODY), exprString,\n XPathConstants.BOOLEAN)));\n assertFalse(Type.ERROR, \"rpd9s1.tag\",\n getChildren(getElement(ELEM_BODY), \"style\").getNodeList().getLength() > 0);\n }", "public void test450389() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 44 column 1 - Warning: <font> attribute \"color\" has invalid value \"reddish\"\n // line 72 column 1 - Warning: <font> attribute \"color\" has invalid value \"#FF\"\n // line 76 column 1 - Warning: <font> attribute \"color\" has invalid value \"grurple\"\n // line 77 column 1 - Warning: <font> attribute \"color\" has invalid value \"#grurple\"\n // line 78 column 1 - Warning: <font> attribute \"color\" has invalid value \"#1234567\"\n // Info: Document content looks like HTML 3.2\n\n executeTidyTest(\"450389.html\");\n assertWarnings(6);\n }", "private void addCss() {\n StyleLink jqueryLink = new StyleLink(\"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\");\n page.addHeader(jqueryLink);\n StyleLink jqueryTooltipLink = new StyleLink(\"/css/jquery.ui.tooltip.css\");\n page.addHeader(jqueryTooltipLink);\n StyleLink cssLink = new StyleLink(\"/css/lockss-new.css\");\n page.addHeader(cssLink);\n }", "public interface Style extends CssResource {\n\n /**\n * The style for the panel that contains\n * the whole user record\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecord();\n\n /**\n * The style for the name of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String nameLabel();\n\n /**\n * The style for the username of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabel();\n\n /**\n * The style for the user avatar image\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImage();\n\n /**\n * The style for the remove image\n *\n * @author Johannes Gryffenberg <[email protected]>\n * @since 26 Feb 2013\n *\n * @return The name of the compiled style\n */\n String removeImageStyle();\n\n /**\n * The style for the user record when it is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecordSelected();\n\n /**\n * The style for the username when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabelSelected();\n\n /**\n * The style for the avatar when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImageSelected();\n }", "public BuiltInStyle(int xfind, int sn)\r\n/* 10: */ {\r\n/* 11:46 */ super(Type.STYLE);\r\n/* 12: */ \r\n/* 13:48 */ this.xfIndex = xfind;\r\n/* 14:49 */ this.styleNumber = sn;\r\n/* 15: */ }", "private String getCSS() {\r\n StringBuffer css = new StringBuffer();\r\n css.append(\"<style type='text/css'>\");\r\n css.append(\"<!--\");\r\n css.append(\"\tA.pagina:link, A.pagina:visited, A.pagina:active, A.pagina:hover {\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-STYLE: normal;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-DECORATION: none ;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:link {\");\r\n css.append(\"\t\tCOLOR: #0039ba;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:visited {\");\r\n css.append(\"\t\tCOLOR: #6c8bc3;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:active {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:hover {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tTR.pagina{\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-ALIGN: center;\");\r\n css.append(\"\t\tCOLOR: gray;\");\r\n css.append(\"\t}\");\r\n css.append(\"-->\");\r\n css.append(\"</style>\");\r\n return (css.toString());\r\n }", "public static String getCSS()\n {\n \treturn \"table.relations \"+\n\t\t \"{ \" +\n\t\t\t\" margin: 1em 1em 1em 2em;\" +\n\t\t\t\" border-collapse: collapse;\" +\n\t\t\t\" width:90%;\" +\n\t\t \"}\" +\n\t\t\"table.relations td\" + \n\t\t\"{\" +\n\t\t\" border-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tbackground: #fff;\" +\n\t\t\"\tpadding: 6px 6px 6px 12px;\" +\n\t\t\"\tcolor: #6D929B;\" +\n\t\t\"}\" +\n\t\t\"table.relations th\" + \n\t\t\"{\" +\n\t\t\"\tfont: bold 10px \\\"Trebuchet MS\\\", Verdana, Arial, Helvetica,\" +\n\t\t\"\tsans-serif;\" +\n\t\t\"\tcolor: #003399;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-top: 1px solid #C1DAD7;\" +\n\t\t\"\tletter-spacing: 2px;\" +\n\t\t\"\ttext-transform: uppercase;\" +\n\t\t\"\ttext-align: left;\" +\n\t\t\"\tpadding: 3px 3px 3px 6px;\" +\n\t\t\"\tbackground: #B0C4DE;\" +\n\t\t\"}\";\n }", "@Override\n public boolean visit(CssUrl x, Context ctx) {\n out.printOpt(\"/* CssUrl */\");\n out.newlineOpt();\n return false;\n }", "protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}", "void tag3() \n\t{\n\t\t// c++_style_tag: This is a C++ style tag.\n\t}", "public String toCSS(){\n return new StringBuilder()\n .append(\"display:\")\n .append(this.toString().replace(\"_\", \"-\"))\n .append(\";\").toString();\n }", "@Override\n\tprotected NSArray<String> additionalCSSFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.css\" } );\n\t}", "private void writeCss(HttpServletRequest request,\n HttpServletResponse response) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n List<String> namespaces = Lists.newArrayList(context.getPreloads());\n DefinitionService definitionService = Aura.getDefinitionService();\n Client.Type type = Aura.getContextService().getCurrentContext().getClient().getType();\n Mode mode = context.getMode();\n StringBuffer sb = new StringBuffer();\n \n for (String ns : namespaces) {\n String key = type.name() + \"$\" + ns;\n \n String nsCss = !mode.isTestMode() ? cssCache.get(key) : null;\n if (nsCss == null) {\n DefDescriptor<ThemeDef> matcher = definitionService.getDefDescriptor(String.format(\"css://%s.*\", ns),\n ThemeDef.class);\n Set<DefDescriptor<ThemeDef>> descriptors = definitionService.find(matcher);\n List<ThemeDef> nddefs = new ArrayList<ThemeDef>();\n \n sb.setLength(0);\n for(DefDescriptor<ThemeDef> descriptor : descriptors){\n //\n // This could use the generic routine above except for this brain dead little\n // gem.\n //\n if(!descriptor.getName().toLowerCase().endsWith(\"template\")){\n ThemeDef def = descriptor.getDef();\n if(def != null){\n nddefs.add(def);\n }\n }\n }\n \n context.setPreloading(true);\n Appendable tmp = mode.isTestMode() ? response.getWriter() : sb;\n preloadSerialize(nddefs, ThemeDef.class, tmp);\n if (!mode.isTestMode()) {\n nsCss = sb.toString();\n cssCache.put(key, nsCss);\n }\n }\n \n if (nsCss != null) {\n \tresponse.getWriter().append(nsCss);\n }\n }\n }", "public PXStylesheetParser() {\n this(null);\n }", "protected WebXStyleElementImpl() {\n }", "abstract protected AbstractCSSStyleSheet getUserImportantStyleSheet();", "@Test \n public void CSSParserTest() throws Exception{\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n String cssString = \"\";\n try {\n BufferedReader in = new BufferedReader(\n new FileReader(\n \"./test-file/testFile.txt\"));\n String line;\n while ((line = in.readLine()) != null) {\n cssString += line;\n cssString += \"\\n\";\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n Document doc = new Document();\n {\n Element html = doc.createElement(\"html\");\n Element head = doc.createElement(\"head\");\n Element body = doc.createElement(\"body\");\n Node text = doc.createTextNode(\"test message\");\n html.appendChild(head);\n html.appendChild(body);\n body.appendChild(text);\n doc.appendChild(html);\n }\n /**Get doc from UIParser result whether is not null \n * \n */\n assertNotNull(doc.documentElement());\n \n /**Setting doc Style from CSSParser\n * \n */\n CSSParser CSSParser = new CSSParser();\n CSSParser.parser(cssString, doc); \n \n Element html = doc.documentElement(); \n \n /** Test whether the tag Name is correct\n * \n */\n assertEquals(\"tagName of root element should be <html>\", \"html\", html.tagName());\n \n /**Use html getStyle that it is not null\n * \n */\n Style style = html.getStyle();\n assertNotNull(style);\n \n /** Test whether the background is black\n * \n */\n assertEquals(\"background should be black\", \"black\", style.getProperty(\"background\"));\n \n /** Test whether the width is correct\n * \n */\n assertEquals(\"width should be 100\", \"100px\", style.getProperty(\"width\"));\n \n \n /**Get the child list of documentElement and test whether the child count correct \n * \n */\n NodeList list = html.childNodes();\n assertEquals(\"list length should be one\",list.length(),2);\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n assertEquals(\"first child of <html> should be <head>\", \"head\", list.item(0).nodeName());\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n Node body = list.item(1);\n assertEquals(\"second child of <html> should be <body>\", \"body\", body.nodeName());\n \n /**Get Style from element getStyle whether it is null or not\n * \n */\n Element bodyElement = (Element) body;\n Style bodyStyle = bodyElement.getStyle();\n assertNotNull(bodyStyle);\n \n /** Test whether the margin-top is correct\n * \n */\n assertEquals(\"margin-top should be 10px\", \"10px\", bodyStyle.getProperty(\"margin-top\"));\n \n /** Test whether the text-color is correct\n * \n */\n assertEquals(\"text-color should be blue\", \"blue\", bodyStyle.getProperty(\"text-color\"));\n }", "abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();", "List<CSSParseException> getExceptions();", "public String getCss() {\n return clean(css);\n }", "public CssBorderWidth() {\n }", "public void test552861() throws Exception\n {\n executeTidyTest(\"552861.html\");\n // should complain about invalid \"with\" attribute\n assertWarnings(1);\n }", "@Test\n public void test037() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)table0.style();\n }", "public void ardublockStyling(Document doc) {\n\t\tif (styleList != null) {\n\t\t\tXPathFactory factory = XPathFactory.newInstance();\n\t\t\tfor (String[] style : styleList) {\n\t\t\t\tXPath xpath = factory.newXPath();\n\t\t\t\ttry {\n\t\t\t\t\t// XPathExpression expr = xpath.compile(\"//BlockGenus[@name[starts-with(.,\\\"Tinker\\\")]]/@color\");\n\t\t\t\t\tXPathExpression expr = xpath.compile(style[0]);\n\t\t\t\t\tNodeList bgs = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);\n\t\t\t\t\tfor (int i = 0; i < bgs.getLength(); i++) {\n\t\t\t\t\t\tNode bg = bgs.item(i);\n\t\t\t\t\t\tbg.setNodeValue(style[1]);\n\t\t\t\t\t\t// bg.setAttribute(\"color\", \"128 0 0\");\n\t\t\t\t\t}\n\t\t\t\t} catch (XPathExpressionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private PrngFixes() {\n }", "@Test\n public void eofHandling() {\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \" \");\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \"\\t\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em;\");\n assertLine(Language.CSS, new Line(Language.CSS, COMMENT), \"/* comment */\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em; /* with comment */\");\n }", "@Override\n protected Node newNode() {\n return new WebXStyleElementImpl();\n }", "public void test427810() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 8 column 1 - Warning: <blink> is not approved by W3C\n // line 9 column 1 - Warning: <wbr> is not approved by W3C\n // line 10 column 1 - Warning: <nobr> is not approved by W3C\n // Info: Document content looks like HTML Proprietary\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"427810.html\");\n assertWarnings(4);\n }", "String getCssFilter();", "public interface Css extends CssResource {\n String button();\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "public void styleMe(){\n\t}", "protected void tidy(final CSSRule cssRule) {\n\t\tif(cssRule instanceof CSSStyleRule) { //TODO fix\n\t\t\tfinal CSSStyleRule cssStyleRule = (CSSStyleRule)cssRule; //TODO fix\n\t\t\ttidy(cssStyleRule.getStyle()); //tidy the style declaration\n\t\t}\n\t}", "static zzco m26832d() {\n return new zzco(\"Failed to parse the message.\");\n }", "public void test516370() throws Exception\n {\n // line 10 column 1 - Warning: <h2> ID \"_ValidID2\" uses XML ID syntax\n // line 11 column 1 - Warning: <h2> ID \":ValidID3\" uses XML ID syntax\n // line 13 column 1 - Warning: <h2> attribute \"id\" has invalid value \".InvalidID1\"\n // line 14 column 1 - Warning: <h2> attribute \"id\" has invalid value \"2InvalidID2\"\n // line 15 column 1 - Warning: <h2> attribute \"id\" lacks value\n\n executeTidyTest(\"516370.xhtml\");\n assertWarnings(5);\n assertLogContains(\"XML ID syntax\");\n }", "public final boolean synpred2_css21() {\n state.backtracking++;\n int start = input.mark();\n try {\n synpred2_css21_fragment(); // can never throw exception\n } catch (RecognitionException re) {\n System.err.println(\"impossible: \"+re);\n }\n boolean success = !state.failed;\n input.rewind(start);\n state.backtracking--;\n state.failed=false;\n return success;\n }", "public abstract String getDefaultStylesheet ();", "public String getCurrentcss() {\n return clean(currentcss);\n }", "public void testCOLOUR2() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 121, \"sable\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public static interface Style extends CssResource {\r\n\r\n\t\t/**\r\n\t\t * Applied to buttons.\r\n\t\t */\r\n\t\tString button();\r\n\r\n\t\t/**\r\n\t\t * Applied to disabled buttons.\r\n\t\t */\r\n\t\tString disabledButton();\r\n\r\n\t\t/**\r\n\t\t * Applied to the details text.\r\n\t\t */\r\n\t\tString pageDetails();\r\n\r\n\t\tString pageDetails2();\r\n\t\t\r\n\t\tString imogPagerLayout();\r\n\t}", "public void test431964() throws Exception\n {\n // line 7 column 1 - Warning: <table> attribute \"height\" lacks value\n // line 7 column 1 - Warning: <table> proprietary attribute \"height\"\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML Proprietary\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"431964.html\");\n assertWarnings(2);\n }", "public void test435922() throws Exception\n {\n // line 6 column 1 - Warning: <input> isn't allowed in <body> elements\n // line 7 column 3 - Warning: inserting implicit <form>\n // line 7 column 3 - Warning: missing </form>\n // line 7 column 3 - Warning: <form> lacks \"action\" attribute\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"435922.html\");\n assertWarnings(4);\n }", "public static void processCSS(File file) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n int init, end;\n\n while ((line = in.readLine()) != null) {\n if ((init = line.indexOf(\"/*~RTL \")) != -1) {\n end = line.indexOf(\"*/\");\n if (end == -1)\n end = line.length();\n vLines.add(line.substring(init + 7, end) + \"\\n\");\n } else {\n vLines.add(line + \"\\n\");\n }\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.close();\n }", "public SimpleStyle() {\n\t\t// set default values\n\t\tthis.foregroundColor = -1;\n\t\t// others are null: VM DONE\n\t}", "private void loadRuleSets() throws CSSException {\n StyleSheet stylesheet = cssCode.getParsedCSS();\n for (RuleBlock block : stylesheet) {\n if (block instanceof RuleSet) {\n\n StringBuilder selectorString = new StringBuilder();\n RuleSet ruleSet = (RuleSet) block;\n\n List<CombinedSelector> selectors = ruleSet.getSelectors();\n Iterator<CombinedSelector> selectorsIterator = selectors.iterator();\n while (selectorsIterator.hasNext()) {\n CombinedSelector selector = selectorsIterator.next();\n selectorString.append(selector.toString());\n if (selectorsIterator.hasNext()) {\n selectorString.append(\", \");\n }\n }\n\n List<CSSRule> cssRules = new ArrayList<>();\n CSSRule cssRule;\n Declaration.Source source;\n DeclarationPosition declarationPosition;\n\n for (Declaration declaration : ruleSet) {\n cssRule = new CSSRule(declaration.getProperty(), \"\");\n\n source = declaration.getSource();\n if (source == null) {\n declarationPosition = null;\n } else {\n declarationPosition = new DeclarationPosition(source.getLine(), source.getPosition());\n }\n cssRule.setDeclarationPosition(declarationPosition);\n\n cssRules.add(cssRule);\n }\n\n CSSRuleSet cssRuleSet = new CSSRuleSet(selectorString.toString(), cssRules);\n\n this.cssRuleBlocks.add(cssRuleSet);\n\n // add record to the position-declaration map\n for (CSSRule iCssRule : cssRuleSet.getCssRules()) {\n this.declarationPositionMap.put(\n iCssRule.getDeclarationPosition(),\n new DeclarationSource(cssRuleSet, iCssRule)\n );\n }\n }\n }\n }", "protected ScriptStyle(int val, String s)\r\n/* 10: */ {\r\n/* 11: 54 */ this.value = val;\r\n/* 12: 55 */ this.string = s;\r\n/* 13: */ \r\n/* 14: 57 */ ScriptStyle[] oldstyles = styles;\r\n/* 15: 58 */ styles = new ScriptStyle[oldstyles.length + 1];\r\n/* 16: 59 */ System.arraycopy(oldstyles, 0, styles, 0, oldstyles.length);\r\n/* 17: 60 */ styles[oldstyles.length] = this;\r\n/* 18: */ }", "@Override public String getUserAgentStylesheet() {\r\n return getClass().getResource(\"switch.css\").toExternalForm();\r\n }", "protected void extraExplosions_EM() {\n }", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private HepRepColor() {\n }", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "public void test427827() throws Exception\n {\n // line 6 column 1 - Warning: missing </a> before <a>\n // line 7 column 6 - Warning: discarding unexpected </a>\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"427827.html\");\n assertWarnings(2);\n }", "public void test438956() throws Exception\n {\n // line 3 column 1 - Warning: plain text isn't allowed in <head> elements\n // line 6 column 1 - Warning: discarding unexpected <body>\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"438956.html\");\n\n assertWarnings(2);\n }", "public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}", "public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }", "public void updateSyntaxStyles() {\n }", "public void test431883() throws Exception\n {\n executeTidyTest(\"431883.html\");\n\n assertLogContains(\"Doctype given is \\\"-//W3C//DTD HTML 4.0\");\n }", "StyleValue getCSSValue();", "@org.junit.Test\n public void compElemBadName2() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName3() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"foo:error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "private LineStyleUtils() {\n\n }", "public abstract TC createStyle();", "abstract protected InlineStyle createInlineStyle(Node owner);", "@org.junit.Test\n public void compElemBadName6() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xmlns' Mary Holstege :) element { fn:QName(\\\"http://example.com/some-uri\\\",\\\"xmlns:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName4() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xml' and namespace URI is not 'http://www.w3.org/XML/1998/namespace' Mary Holstege :) element { fn:QName(\\\"http://example.com/not-XML-uri\\\",\\\"xml:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "private void loadCssForThisClass() {\n\t\tString className = getClass().getName();\n\t\tString cssPath = className.replace(\".\", \"/\") + \".css\";\n\t\tURL cssUrl = getClass().getClassLoader().getResource(cssPath);\n\t\tloadCss(cssUrl);\n\n\t\t// System.out.println(\"CSS:\\n\" + getCssContent(cssUrl) );\n\t}", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "public Spider()\r\n/* 24: */ {\r\n/* 25: 21 */ setBackground(Color.WHITE);\r\n/* 26: */ }", "private int _parseStyle(\n String value\n )\n {\n if (value == null)\n return -1;\n\n if (value.equalsIgnoreCase(XMLConstants.PLAIN_FONT_STYLE))\n return Font.PLAIN;\n if (value.equalsIgnoreCase(XMLConstants.ITALIC_FONT_STYLE))\n return Font.ITALIC;\n if (value.equalsIgnoreCase(XMLConstants.BOLD_FONT_STYLE))\n return Font.BOLD;\n\n _LOG.warning(_STYLE_ERROR);\n\n return -1;\n }", "public void mo1962e() throws cf {\r\n }", "@org.junit.Test\n public void constrCompelemCompname19() {\n final XQuery query = new XQuery(\n \"element {xs:untypedAtomic('el em')} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@org.junit.Test\n public void constrCompelemCompname18() {\n final XQuery query = new XQuery(\n \"element {'el em'} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "public String nextCSSString()\n {\n if (empty())\n return null;\n int ch = input.charAt(position);\n int endQuote = ch;\n if (ch != '\\'' && ch != '\"')\n return null;\n\n StringBuilder sb = new StringBuilder();\n position++;\n ch = nextChar();\n while (ch != -1 && ch != endQuote)\n {\n if (ch == '\\\\') {\n // Escaped char sequence\n ch = nextChar();\n if (ch == -1) // EOF: do nothing\n continue;\n if (ch == '\\n' || ch == '\\r' || ch == '\\f') { // a CSS newline\n ch = nextChar();\n continue; // Newline: consume it\n }\n int hc = hexChar(ch);\n if (hc != -1) {\n int codepoint = hc;\n for (int i=1; i<=5; i++) {\n ch = nextChar();\n hc = hexChar(ch);\n if (hc == -1)\n break;\n codepoint = codepoint * 16 + hc;\n }\n sb.append((char) codepoint);\n continue;\n }\n // Other chars just unescape to themselves\n // Fall through to append\n }\n sb.append((char) ch);\n ch = nextChar();\n }\n return sb.toString();\n }", "@Override\n\tpublic void compile() {\n\t\t\n\t}", "public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}", "public WebXStyleElementImpl(String prefix, WebXDocumentImpl owner) {\n super(prefix, owner);\n }", "private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}", "public void test431874() throws Exception\n {\n executeTidyTest(\"431874.html\");\n assertWarnings(2);\n }", "public MalformedHexadecimalColourException(String message) {\n super(message);\n }", "public static String cssColor(final char c) {\n\tfinal short[] array = _cssColor0(c);\n\treturn \"rgb(\"+array[0]+\",\"+array[1]+\",\"+array[2]+\")\";\n\t}", "public void testCOLOUR6() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 125, \"or\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "private void cleanStyles(Element articleContent) {\n for (Element e : articleContent.getAllElements()) {\n e.removeAttr(\"style\");\n }\n }", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Override\n\tpublic final boolean isCSS1Compat() {\n\t\treturn getCompatMode().equals(\"CSS1Compat\");\n\t}", "public void test553414() throws Exception\n {\n executeTidyTest(\"553414.html\");\n assertLogContains(\"given is \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\n assertLogContains(\"looks like XHTML 1.0 Transitional\");\n assertWarnings(1);\n }", "Map<String, String> styles(String group);", "public DTMDOMException(short code) {\n/* 49 */ super(code, \"\");\n/* */ }", "protected boolean isFreeStyle(){\r\n\t\treturn false;\r\n\t}", "public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}", "@Test(expected = SDLParseException.class)\n public final void testBadHead1 () throws IOException {\n \tparser.load(makeReader (\":This::= 'lol';\"));\n }" ]
[ "0.5973912", "0.5794228", "0.57078785", "0.5615098", "0.5370872", "0.5340339", "0.5335011", "0.531088", "0.52385175", "0.5234265", "0.521601", "0.5170423", "0.5143826", "0.5118981", "0.51159275", "0.51103413", "0.507524", "0.5003789", "0.497901", "0.49647295", "0.4944563", "0.49213776", "0.49104887", "0.49067795", "0.4903879", "0.4892505", "0.48820668", "0.4869646", "0.4856679", "0.48387995", "0.4830736", "0.47953108", "0.47876063", "0.4778855", "0.47359392", "0.47250676", "0.4722885", "0.47036874", "0.4699784", "0.46818987", "0.46768257", "0.46750134", "0.46660173", "0.46501756", "0.46404037", "0.4632461", "0.46098796", "0.4600562", "0.4590831", "0.45814452", "0.45706865", "0.4570184", "0.45691642", "0.4551324", "0.45510754", "0.4546093", "0.45459974", "0.45394954", "0.45378143", "0.4533149", "0.4530778", "0.45294562", "0.45281807", "0.4525622", "0.45116258", "0.45062453", "0.45041132", "0.44948763", "0.4487992", "0.448139", "0.44769615", "0.44750422", "0.44747594", "0.4471574", "0.44705585", "0.44650692", "0.4464735", "0.4463905", "0.44588658", "0.44562367", "0.44519663", "0.44474015", "0.44423115", "0.44422275", "0.4438584", "0.4429831", "0.4429681", "0.44220313", "0.44196078", "0.44128355", "0.4403459", "0.4395445", "0.4393065", "0.43908694", "0.4386018", "0.437947", "0.43737462", "0.43711227", "0.43699938", "0.43659517" ]
0.48574498
28
These are not valid CSS
@Override public boolean visit(CssExternalSelectors x, Context ctx) { out.printOpt("/* @external"); for (String className : x.getClasses()) { out.printOpt(" "); out.printOpt(className); } out.printOpt("; */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n assertEquals(\"spaces\", \"justatest\", Encodings.toCSSString(\"just a test\"));\n assertEquals(\"special\", \"a\", Encodings.toCSSString(\"&*%$#a%#!@()\"));\n }", "@Override\n public String getCSSStyle() {\n return null;\n }", "public BlockUIThemedCSS()\n\t{\n\t\t//No config required\n\t}", "void tag2() \n\t{\n\t\t/* c_style_tag: This is a C style tag. */\n\t}", "private String cssFileForHtml() {\r\n\t\treturn \"<style>table, td, th {\"\r\n\t\t\t\t+ \"border: 1px solid #ddd;\"\r\n\t\t\t\t+ \"text-align: left;}\"\r\n\t\t\t\t+ \"table {\"\r\n\t\t\t\t+ \"border-collapse: collapse;\"\r\n\t\t\t\t+ \"width: 100%;}\"\r\n\t\t\t\t+ \"th, td {\"\r\n\t\t\t\t+ \"padding: 10px;\"\r\n\t\t\t\t+ \"color:#000000;\"\r\n\t\t\t\t+ \"font-family: 'Roboto', sans-serif;}td{\"\r\n\t\t\t\t+ \"font-size: smaller;}\"\r\n\t\t\t\t+ \"th{background-color:#EEEEEE;color:#000000;}tr{background-color:#FFFFFF;}\"\r\n\t\t\t\t+ \"tr:hover{background-color:#EEEEEE}</style>\";\r\n\t}", "public void testW3C() \n throws FileNotFoundException, ParseException\n {\n String str_file = str_Directory + \"/\" + \"w3c-css1-test.css\";\n Parser parser = new Parser(new java.io.FileInputStream(str_file));\n\n parser.setHandler(this);\n parser.Parse();\n }", "@Override\n public String getCSSClass() {\n return null;\n }", "@Override\n public boolean visit(CssDef x, Context ctx) {\n out.printOpt(\"/* CssDef */\");\n out.newlineOpt();\n return false;\n }", "public void validateRpd9s1()\n {\n String exprString = \"//@style\";\n assertFalse(Type.ERROR, \"rpd9s1.attr\", ((Boolean) evaluate(getElement(ELEM_BODY), exprString,\n XPathConstants.BOOLEAN)));\n assertFalse(Type.ERROR, \"rpd9s1.tag\",\n getChildren(getElement(ELEM_BODY), \"style\").getNodeList().getLength() > 0);\n }", "public void test450389() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 44 column 1 - Warning: <font> attribute \"color\" has invalid value \"reddish\"\n // line 72 column 1 - Warning: <font> attribute \"color\" has invalid value \"#FF\"\n // line 76 column 1 - Warning: <font> attribute \"color\" has invalid value \"grurple\"\n // line 77 column 1 - Warning: <font> attribute \"color\" has invalid value \"#grurple\"\n // line 78 column 1 - Warning: <font> attribute \"color\" has invalid value \"#1234567\"\n // Info: Document content looks like HTML 3.2\n\n executeTidyTest(\"450389.html\");\n assertWarnings(6);\n }", "private void addCss() {\n StyleLink jqueryLink = new StyleLink(\"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\");\n page.addHeader(jqueryLink);\n StyleLink jqueryTooltipLink = new StyleLink(\"/css/jquery.ui.tooltip.css\");\n page.addHeader(jqueryTooltipLink);\n StyleLink cssLink = new StyleLink(\"/css/lockss-new.css\");\n page.addHeader(cssLink);\n }", "public interface Style extends CssResource {\n\n /**\n * The style for the panel that contains\n * the whole user record\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecord();\n\n /**\n * The style for the name of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String nameLabel();\n\n /**\n * The style for the username of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabel();\n\n /**\n * The style for the user avatar image\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImage();\n\n /**\n * The style for the remove image\n *\n * @author Johannes Gryffenberg <[email protected]>\n * @since 26 Feb 2013\n *\n * @return The name of the compiled style\n */\n String removeImageStyle();\n\n /**\n * The style for the user record when it is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecordSelected();\n\n /**\n * The style for the username when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabelSelected();\n\n /**\n * The style for the avatar when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImageSelected();\n }", "public BuiltInStyle(int xfind, int sn)\r\n/* 10: */ {\r\n/* 11:46 */ super(Type.STYLE);\r\n/* 12: */ \r\n/* 13:48 */ this.xfIndex = xfind;\r\n/* 14:49 */ this.styleNumber = sn;\r\n/* 15: */ }", "private String getCSS() {\r\n StringBuffer css = new StringBuffer();\r\n css.append(\"<style type='text/css'>\");\r\n css.append(\"<!--\");\r\n css.append(\"\tA.pagina:link, A.pagina:visited, A.pagina:active, A.pagina:hover {\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-STYLE: normal;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-DECORATION: none ;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:link {\");\r\n css.append(\"\t\tCOLOR: #0039ba;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:visited {\");\r\n css.append(\"\t\tCOLOR: #6c8bc3;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:active {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:hover {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tTR.pagina{\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-ALIGN: center;\");\r\n css.append(\"\t\tCOLOR: gray;\");\r\n css.append(\"\t}\");\r\n css.append(\"-->\");\r\n css.append(\"</style>\");\r\n return (css.toString());\r\n }", "public static String getCSS()\n {\n \treturn \"table.relations \"+\n\t\t \"{ \" +\n\t\t\t\" margin: 1em 1em 1em 2em;\" +\n\t\t\t\" border-collapse: collapse;\" +\n\t\t\t\" width:90%;\" +\n\t\t \"}\" +\n\t\t\"table.relations td\" + \n\t\t\"{\" +\n\t\t\" border-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tbackground: #fff;\" +\n\t\t\"\tpadding: 6px 6px 6px 12px;\" +\n\t\t\"\tcolor: #6D929B;\" +\n\t\t\"}\" +\n\t\t\"table.relations th\" + \n\t\t\"{\" +\n\t\t\"\tfont: bold 10px \\\"Trebuchet MS\\\", Verdana, Arial, Helvetica,\" +\n\t\t\"\tsans-serif;\" +\n\t\t\"\tcolor: #003399;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-top: 1px solid #C1DAD7;\" +\n\t\t\"\tletter-spacing: 2px;\" +\n\t\t\"\ttext-transform: uppercase;\" +\n\t\t\"\ttext-align: left;\" +\n\t\t\"\tpadding: 3px 3px 3px 6px;\" +\n\t\t\"\tbackground: #B0C4DE;\" +\n\t\t\"}\";\n }", "@Override\n public boolean visit(CssUrl x, Context ctx) {\n out.printOpt(\"/* CssUrl */\");\n out.newlineOpt();\n return false;\n }", "protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}", "void tag3() \n\t{\n\t\t// c++_style_tag: This is a C++ style tag.\n\t}", "public String toCSS(){\n return new StringBuilder()\n .append(\"display:\")\n .append(this.toString().replace(\"_\", \"-\"))\n .append(\";\").toString();\n }", "@Override\n\tprotected NSArray<String> additionalCSSFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.css\" } );\n\t}", "private void writeCss(HttpServletRequest request,\n HttpServletResponse response) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n List<String> namespaces = Lists.newArrayList(context.getPreloads());\n DefinitionService definitionService = Aura.getDefinitionService();\n Client.Type type = Aura.getContextService().getCurrentContext().getClient().getType();\n Mode mode = context.getMode();\n StringBuffer sb = new StringBuffer();\n \n for (String ns : namespaces) {\n String key = type.name() + \"$\" + ns;\n \n String nsCss = !mode.isTestMode() ? cssCache.get(key) : null;\n if (nsCss == null) {\n DefDescriptor<ThemeDef> matcher = definitionService.getDefDescriptor(String.format(\"css://%s.*\", ns),\n ThemeDef.class);\n Set<DefDescriptor<ThemeDef>> descriptors = definitionService.find(matcher);\n List<ThemeDef> nddefs = new ArrayList<ThemeDef>();\n \n sb.setLength(0);\n for(DefDescriptor<ThemeDef> descriptor : descriptors){\n //\n // This could use the generic routine above except for this brain dead little\n // gem.\n //\n if(!descriptor.getName().toLowerCase().endsWith(\"template\")){\n ThemeDef def = descriptor.getDef();\n if(def != null){\n nddefs.add(def);\n }\n }\n }\n \n context.setPreloading(true);\n Appendable tmp = mode.isTestMode() ? response.getWriter() : sb;\n preloadSerialize(nddefs, ThemeDef.class, tmp);\n if (!mode.isTestMode()) {\n nsCss = sb.toString();\n cssCache.put(key, nsCss);\n }\n }\n \n if (nsCss != null) {\n \tresponse.getWriter().append(nsCss);\n }\n }\n }", "public PXStylesheetParser() {\n this(null);\n }", "protected WebXStyleElementImpl() {\n }", "abstract protected AbstractCSSStyleSheet getUserImportantStyleSheet();", "@Test \n public void CSSParserTest() throws Exception{\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n String cssString = \"\";\n try {\n BufferedReader in = new BufferedReader(\n new FileReader(\n \"./test-file/testFile.txt\"));\n String line;\n while ((line = in.readLine()) != null) {\n cssString += line;\n cssString += \"\\n\";\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n Document doc = new Document();\n {\n Element html = doc.createElement(\"html\");\n Element head = doc.createElement(\"head\");\n Element body = doc.createElement(\"body\");\n Node text = doc.createTextNode(\"test message\");\n html.appendChild(head);\n html.appendChild(body);\n body.appendChild(text);\n doc.appendChild(html);\n }\n /**Get doc from UIParser result whether is not null \n * \n */\n assertNotNull(doc.documentElement());\n \n /**Setting doc Style from CSSParser\n * \n */\n CSSParser CSSParser = new CSSParser();\n CSSParser.parser(cssString, doc); \n \n Element html = doc.documentElement(); \n \n /** Test whether the tag Name is correct\n * \n */\n assertEquals(\"tagName of root element should be <html>\", \"html\", html.tagName());\n \n /**Use html getStyle that it is not null\n * \n */\n Style style = html.getStyle();\n assertNotNull(style);\n \n /** Test whether the background is black\n * \n */\n assertEquals(\"background should be black\", \"black\", style.getProperty(\"background\"));\n \n /** Test whether the width is correct\n * \n */\n assertEquals(\"width should be 100\", \"100px\", style.getProperty(\"width\"));\n \n \n /**Get the child list of documentElement and test whether the child count correct \n * \n */\n NodeList list = html.childNodes();\n assertEquals(\"list length should be one\",list.length(),2);\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n assertEquals(\"first child of <html> should be <head>\", \"head\", list.item(0).nodeName());\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n Node body = list.item(1);\n assertEquals(\"second child of <html> should be <body>\", \"body\", body.nodeName());\n \n /**Get Style from element getStyle whether it is null or not\n * \n */\n Element bodyElement = (Element) body;\n Style bodyStyle = bodyElement.getStyle();\n assertNotNull(bodyStyle);\n \n /** Test whether the margin-top is correct\n * \n */\n assertEquals(\"margin-top should be 10px\", \"10px\", bodyStyle.getProperty(\"margin-top\"));\n \n /** Test whether the text-color is correct\n * \n */\n assertEquals(\"text-color should be blue\", \"blue\", bodyStyle.getProperty(\"text-color\"));\n }", "abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();", "@Override\n public boolean visit(CssEval x, Context ctx) {\n out.printOpt(\"/* CssEval */\");\n out.newlineOpt();\n return false;\n }", "List<CSSParseException> getExceptions();", "public String getCss() {\n return clean(css);\n }", "public CssBorderWidth() {\n }", "public void test552861() throws Exception\n {\n executeTidyTest(\"552861.html\");\n // should complain about invalid \"with\" attribute\n assertWarnings(1);\n }", "@Test\n public void test037() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)table0.style();\n }", "public void ardublockStyling(Document doc) {\n\t\tif (styleList != null) {\n\t\t\tXPathFactory factory = XPathFactory.newInstance();\n\t\t\tfor (String[] style : styleList) {\n\t\t\t\tXPath xpath = factory.newXPath();\n\t\t\t\ttry {\n\t\t\t\t\t// XPathExpression expr = xpath.compile(\"//BlockGenus[@name[starts-with(.,\\\"Tinker\\\")]]/@color\");\n\t\t\t\t\tXPathExpression expr = xpath.compile(style[0]);\n\t\t\t\t\tNodeList bgs = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);\n\t\t\t\t\tfor (int i = 0; i < bgs.getLength(); i++) {\n\t\t\t\t\t\tNode bg = bgs.item(i);\n\t\t\t\t\t\tbg.setNodeValue(style[1]);\n\t\t\t\t\t\t// bg.setAttribute(\"color\", \"128 0 0\");\n\t\t\t\t\t}\n\t\t\t\t} catch (XPathExpressionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private PrngFixes() {\n }", "@Test\n public void eofHandling() {\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \" \");\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \"\\t\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em;\");\n assertLine(Language.CSS, new Line(Language.CSS, COMMENT), \"/* comment */\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em; /* with comment */\");\n }", "@Override\n protected Node newNode() {\n return new WebXStyleElementImpl();\n }", "public void test427810() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 8 column 1 - Warning: <blink> is not approved by W3C\n // line 9 column 1 - Warning: <wbr> is not approved by W3C\n // line 10 column 1 - Warning: <nobr> is not approved by W3C\n // Info: Document content looks like HTML Proprietary\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"427810.html\");\n assertWarnings(4);\n }", "String getCssFilter();", "public interface Css extends CssResource {\n String button();\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "public void styleMe(){\n\t}", "protected void tidy(final CSSRule cssRule) {\n\t\tif(cssRule instanceof CSSStyleRule) { //TODO fix\n\t\t\tfinal CSSStyleRule cssStyleRule = (CSSStyleRule)cssRule; //TODO fix\n\t\t\ttidy(cssStyleRule.getStyle()); //tidy the style declaration\n\t\t}\n\t}", "static zzco m26832d() {\n return new zzco(\"Failed to parse the message.\");\n }", "public void test516370() throws Exception\n {\n // line 10 column 1 - Warning: <h2> ID \"_ValidID2\" uses XML ID syntax\n // line 11 column 1 - Warning: <h2> ID \":ValidID3\" uses XML ID syntax\n // line 13 column 1 - Warning: <h2> attribute \"id\" has invalid value \".InvalidID1\"\n // line 14 column 1 - Warning: <h2> attribute \"id\" has invalid value \"2InvalidID2\"\n // line 15 column 1 - Warning: <h2> attribute \"id\" lacks value\n\n executeTidyTest(\"516370.xhtml\");\n assertWarnings(5);\n assertLogContains(\"XML ID syntax\");\n }", "public final boolean synpred2_css21() {\n state.backtracking++;\n int start = input.mark();\n try {\n synpred2_css21_fragment(); // can never throw exception\n } catch (RecognitionException re) {\n System.err.println(\"impossible: \"+re);\n }\n boolean success = !state.failed;\n input.rewind(start);\n state.backtracking--;\n state.failed=false;\n return success;\n }", "public abstract String getDefaultStylesheet ();", "public String getCurrentcss() {\n return clean(currentcss);\n }", "public void testCOLOUR2() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 121, \"sable\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public static interface Style extends CssResource {\r\n\r\n\t\t/**\r\n\t\t * Applied to buttons.\r\n\t\t */\r\n\t\tString button();\r\n\r\n\t\t/**\r\n\t\t * Applied to disabled buttons.\r\n\t\t */\r\n\t\tString disabledButton();\r\n\r\n\t\t/**\r\n\t\t * Applied to the details text.\r\n\t\t */\r\n\t\tString pageDetails();\r\n\r\n\t\tString pageDetails2();\r\n\t\t\r\n\t\tString imogPagerLayout();\r\n\t}", "public void test431964() throws Exception\n {\n // line 7 column 1 - Warning: <table> attribute \"height\" lacks value\n // line 7 column 1 - Warning: <table> proprietary attribute \"height\"\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML Proprietary\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"431964.html\");\n assertWarnings(2);\n }", "public void test435922() throws Exception\n {\n // line 6 column 1 - Warning: <input> isn't allowed in <body> elements\n // line 7 column 3 - Warning: inserting implicit <form>\n // line 7 column 3 - Warning: missing </form>\n // line 7 column 3 - Warning: <form> lacks \"action\" attribute\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"435922.html\");\n assertWarnings(4);\n }", "public static void processCSS(File file) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n int init, end;\n\n while ((line = in.readLine()) != null) {\n if ((init = line.indexOf(\"/*~RTL \")) != -1) {\n end = line.indexOf(\"*/\");\n if (end == -1)\n end = line.length();\n vLines.add(line.substring(init + 7, end) + \"\\n\");\n } else {\n vLines.add(line + \"\\n\");\n }\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.close();\n }", "public SimpleStyle() {\n\t\t// set default values\n\t\tthis.foregroundColor = -1;\n\t\t// others are null: VM DONE\n\t}", "private void loadRuleSets() throws CSSException {\n StyleSheet stylesheet = cssCode.getParsedCSS();\n for (RuleBlock block : stylesheet) {\n if (block instanceof RuleSet) {\n\n StringBuilder selectorString = new StringBuilder();\n RuleSet ruleSet = (RuleSet) block;\n\n List<CombinedSelector> selectors = ruleSet.getSelectors();\n Iterator<CombinedSelector> selectorsIterator = selectors.iterator();\n while (selectorsIterator.hasNext()) {\n CombinedSelector selector = selectorsIterator.next();\n selectorString.append(selector.toString());\n if (selectorsIterator.hasNext()) {\n selectorString.append(\", \");\n }\n }\n\n List<CSSRule> cssRules = new ArrayList<>();\n CSSRule cssRule;\n Declaration.Source source;\n DeclarationPosition declarationPosition;\n\n for (Declaration declaration : ruleSet) {\n cssRule = new CSSRule(declaration.getProperty(), \"\");\n\n source = declaration.getSource();\n if (source == null) {\n declarationPosition = null;\n } else {\n declarationPosition = new DeclarationPosition(source.getLine(), source.getPosition());\n }\n cssRule.setDeclarationPosition(declarationPosition);\n\n cssRules.add(cssRule);\n }\n\n CSSRuleSet cssRuleSet = new CSSRuleSet(selectorString.toString(), cssRules);\n\n this.cssRuleBlocks.add(cssRuleSet);\n\n // add record to the position-declaration map\n for (CSSRule iCssRule : cssRuleSet.getCssRules()) {\n this.declarationPositionMap.put(\n iCssRule.getDeclarationPosition(),\n new DeclarationSource(cssRuleSet, iCssRule)\n );\n }\n }\n }\n }", "@Override public String getUserAgentStylesheet() {\r\n return getClass().getResource(\"switch.css\").toExternalForm();\r\n }", "protected ScriptStyle(int val, String s)\r\n/* 10: */ {\r\n/* 11: 54 */ this.value = val;\r\n/* 12: 55 */ this.string = s;\r\n/* 13: */ \r\n/* 14: 57 */ ScriptStyle[] oldstyles = styles;\r\n/* 15: 58 */ styles = new ScriptStyle[oldstyles.length + 1];\r\n/* 16: 59 */ System.arraycopy(oldstyles, 0, styles, 0, oldstyles.length);\r\n/* 17: 60 */ styles[oldstyles.length] = this;\r\n/* 18: */ }", "protected void extraExplosions_EM() {\n }", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private HepRepColor() {\n }", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "public void test427827() throws Exception\n {\n // line 6 column 1 - Warning: missing </a> before <a>\n // line 7 column 6 - Warning: discarding unexpected </a>\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"427827.html\");\n assertWarnings(2);\n }", "public void test438956() throws Exception\n {\n // line 3 column 1 - Warning: plain text isn't allowed in <head> elements\n // line 6 column 1 - Warning: discarding unexpected <body>\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"438956.html\");\n\n assertWarnings(2);\n }", "public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}", "public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }", "public void updateSyntaxStyles() {\n }", "public void test431883() throws Exception\n {\n executeTidyTest(\"431883.html\");\n\n assertLogContains(\"Doctype given is \\\"-//W3C//DTD HTML 4.0\");\n }", "StyleValue getCSSValue();", "@org.junit.Test\n public void compElemBadName2() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName3() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"foo:error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "private LineStyleUtils() {\n\n }", "public abstract TC createStyle();", "abstract protected InlineStyle createInlineStyle(Node owner);", "@org.junit.Test\n public void compElemBadName6() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xmlns' Mary Holstege :) element { fn:QName(\\\"http://example.com/some-uri\\\",\\\"xmlns:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName4() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xml' and namespace URI is not 'http://www.w3.org/XML/1998/namespace' Mary Holstege :) element { fn:QName(\\\"http://example.com/not-XML-uri\\\",\\\"xml:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "public Spider()\r\n/* 24: */ {\r\n/* 25: 21 */ setBackground(Color.WHITE);\r\n/* 26: */ }", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "private void loadCssForThisClass() {\n\t\tString className = getClass().getName();\n\t\tString cssPath = className.replace(\".\", \"/\") + \".css\";\n\t\tURL cssUrl = getClass().getClassLoader().getResource(cssPath);\n\t\tloadCss(cssUrl);\n\n\t\t// System.out.println(\"CSS:\\n\" + getCssContent(cssUrl) );\n\t}", "private int _parseStyle(\n String value\n )\n {\n if (value == null)\n return -1;\n\n if (value.equalsIgnoreCase(XMLConstants.PLAIN_FONT_STYLE))\n return Font.PLAIN;\n if (value.equalsIgnoreCase(XMLConstants.ITALIC_FONT_STYLE))\n return Font.ITALIC;\n if (value.equalsIgnoreCase(XMLConstants.BOLD_FONT_STYLE))\n return Font.BOLD;\n\n _LOG.warning(_STYLE_ERROR);\n\n return -1;\n }", "public void mo1962e() throws cf {\r\n }", "@org.junit.Test\n public void constrCompelemCompname19() {\n final XQuery query = new XQuery(\n \"element {xs:untypedAtomic('el em')} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@org.junit.Test\n public void constrCompelemCompname18() {\n final XQuery query = new XQuery(\n \"element {'el em'} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@Override\n\tpublic void compile() {\n\t\t\n\t}", "public String nextCSSString()\n {\n if (empty())\n return null;\n int ch = input.charAt(position);\n int endQuote = ch;\n if (ch != '\\'' && ch != '\"')\n return null;\n\n StringBuilder sb = new StringBuilder();\n position++;\n ch = nextChar();\n while (ch != -1 && ch != endQuote)\n {\n if (ch == '\\\\') {\n // Escaped char sequence\n ch = nextChar();\n if (ch == -1) // EOF: do nothing\n continue;\n if (ch == '\\n' || ch == '\\r' || ch == '\\f') { // a CSS newline\n ch = nextChar();\n continue; // Newline: consume it\n }\n int hc = hexChar(ch);\n if (hc != -1) {\n int codepoint = hc;\n for (int i=1; i<=5; i++) {\n ch = nextChar();\n hc = hexChar(ch);\n if (hc == -1)\n break;\n codepoint = codepoint * 16 + hc;\n }\n sb.append((char) codepoint);\n continue;\n }\n // Other chars just unescape to themselves\n // Fall through to append\n }\n sb.append((char) ch);\n ch = nextChar();\n }\n return sb.toString();\n }", "public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}", "private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}", "public WebXStyleElementImpl(String prefix, WebXDocumentImpl owner) {\n super(prefix, owner);\n }", "public void test431874() throws Exception\n {\n executeTidyTest(\"431874.html\");\n assertWarnings(2);\n }", "public MalformedHexadecimalColourException(String message) {\n super(message);\n }", "public static String cssColor(final char c) {\n\tfinal short[] array = _cssColor0(c);\n\treturn \"rgb(\"+array[0]+\",\"+array[1]+\",\"+array[2]+\")\";\n\t}", "public void testCOLOUR6() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 125, \"or\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "private void cleanStyles(Element articleContent) {\n for (Element e : articleContent.getAllElements()) {\n e.removeAttr(\"style\");\n }\n }", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Override\n\tpublic final boolean isCSS1Compat() {\n\t\treturn getCompatMode().equals(\"CSS1Compat\");\n\t}", "public void test553414() throws Exception\n {\n executeTidyTest(\"553414.html\");\n assertLogContains(\"given is \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\n assertLogContains(\"looks like XHTML 1.0 Transitional\");\n assertWarnings(1);\n }", "Map<String, String> styles(String group);", "public DTMDOMException(short code) {\n/* 49 */ super(code, \"\");\n/* */ }", "protected boolean isFreeStyle(){\r\n\t\treturn false;\r\n\t}", "public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}", "@Test(expected = SDLParseException.class)\n public final void testBadHead1 () throws IOException {\n \tparser.load(makeReader (\":This::= 'lol';\"));\n }" ]
[ "0.5973445", "0.57924896", "0.5707429", "0.56147325", "0.5371038", "0.53400475", "0.53336716", "0.5310589", "0.52381855", "0.521552", "0.5170459", "0.5143138", "0.5118289", "0.51159304", "0.51095194", "0.50751805", "0.5003203", "0.49782643", "0.4964525", "0.49439517", "0.49215955", "0.4910257", "0.4906586", "0.4902893", "0.48919174", "0.48802352", "0.48691526", "0.4857048", "0.48558944", "0.48380992", "0.4829993", "0.47949314", "0.47877726", "0.4778216", "0.47365764", "0.47248808", "0.47235098", "0.47041565", "0.4698876", "0.46811846", "0.4676324", "0.46747047", "0.46652225", "0.46504402", "0.4640285", "0.46323684", "0.46099505", "0.4600028", "0.45902044", "0.45806146", "0.45705408", "0.45702106", "0.4568396", "0.45504656", "0.45501962", "0.4546296", "0.45457664", "0.45405415", "0.45370024", "0.45334682", "0.45316738", "0.45296916", "0.45284107", "0.45252785", "0.45109853", "0.45066327", "0.45037565", "0.44925922", "0.44865912", "0.447994", "0.44771212", "0.44749972", "0.4474647", "0.44703895", "0.44692358", "0.44645423", "0.44645387", "0.4464331", "0.44581458", "0.44563648", "0.44505405", "0.4446042", "0.44423825", "0.44412744", "0.44382757", "0.44293243", "0.44291645", "0.4422003", "0.44192794", "0.44118664", "0.4402977", "0.43943492", "0.43921876", "0.43901235", "0.43857443", "0.43793264", "0.43738326", "0.43720227", "0.43693823", "0.4366559" ]
0.52341753
9
Record where the contents of the if block should be inserted
@Override public boolean visit(CssIf x, Context ctx) { StringBuilder expr = new StringBuilder("/* @if "); if (x.getExpression() != null) { expr.append(x.getExpression()).append(" "); } else { expr.append(x.getPropertyName()).append(" "); for (String v : x.getPropertyValues()) { expr.append(v).append(" "); } } expr.append("{ */"); out.printOpt(expr.toString()); out.newlineOpt(); out.indentIn(); addSubstitition(x); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void insertJumpAtEndOfCondition(){\n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jcc + Code.eq);\n\t\t\n\t\t// save current pc and store it as jmp address\n\t\tjmpNotThen.push(Code.pc);\n\t\tCode.put2(0);\n\t\t\n\t}", "@Override\n\tpublic String visitIfstatement(IfstatementContext ctx) {\n\t\t\n\t\tfor(int i =0; i< ctx.getChildCount(); i++)\n\t\t{\n\t\t\n\t\tif(ctx.getChild(i).getText().equals(\"if\"))\t\n\t\t sb.append(\"CHECK \\n\");\n\t\telse if (ctx.getChild(i).getText().equals(\"else\"))\n\t\t sb.append(\"OR \\n\");\n\t\telse if (ctx.getChild(i).getText().equals(\"stop\"))\n\t\t\t sb.append(\"STOP\");\n\t\telse if(!ctx.getChild(i).getText().equals(\":\"))\n\t\t{\n\t\t\tString str =visit(ctx.getChild(i));\n\t\t\tif(str.length()>0)\n\t\t\t\tsb.append(str+\"\\n\");\n\t\t}\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "protected void sequence_IfStmt(ISerializationContext context, IfStmt semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "@Override\n protected void generateCodeFromElse(IfStmt ifStmt) {\n }", "@Override\n public void visitIfStatement(IfStatement node){\n mPrintWriter.println(\"#IFStatement\");\n Label l0 = new Label();\n Label l1 = new Label();\n Label l2 = new Label();\n //mPrintWriter.println(l1 + \":\");\n inIfStatement(node);\n if(node.getExp() != null)\n {\n node.getExp().accept(this);\n }\n mPrintWriter.println(\"pop r24\");\n //#load zero into reg\n mPrintWriter.println(\"ldi r25, 0\");\n\n //#use cp to set SREG\n mPrintWriter.println(\"cp r24, r25\");\n //#WANT breq MJ_L0\n mPrintWriter.println(\"brne \" + l1);\n mPrintWriter.println(\"jmp \" + l0);\n\n //# then label for if\n mPrintWriter.println(l1 + \":\");\n if(node.getThenStatement() != null)\n {\n node.getThenStatement().accept(this);\n }\n mPrintWriter.println(\"jmp \" + l2);\n\n //# else label for if\n mPrintWriter.println(l0 + \":\");\n if(node.getElseStatement() != null)\n {\n node.getElseStatement().accept(this);\n }\n mPrintWriter.println(l2 + \":\");\n\n outIfStatement(node);\n }", "String getIfBegin();", "void compileIf() {\n\n tagBracketPrinter(IF_TAG, OPEN_TAG_BRACKET);\n try {\n compileIfHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(IF_TAG, CLOSE_TAG_BRACKET);\n }", "@Override\n\tpublic Void visit(If iff) {\n\t\tprintIndent(\"if\");\n\t\tindent++;\n\t\tiff.cond.accept(this);\n\t\tiff.thenBranch.accept(this);\n\t\tiff.elseBranch.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "private void compileIfHelper() throws IOException {\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileExpression();\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileStatements();\n printToken();\n getNextToken();\n if (currentToken.equals(ELSE_TAG)) {\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileStatements();\n printToken();\n getNextToken();\n }\n }", "public void visit(MatchedIf matchedIf)\n\t{\n\t\t// since there was an else, the jmpNotThen has been updated\n\t\t// so only the jmpEndThen should be updated\n\t\tfixJumpAtEndOfThen();\n\t}", "final public void conditional() throws ParseException {\n jj_consume_token(IF);\n if (jj_2_40(4)) {\n jj_consume_token(39);\n } else {\n ;\n }\n jj_consume_token(BLOCKEDP);\n label_6:\n while (true) {\n if (jj_2_41(4)) {\n ;\n } else {\n break label_6;\n }\n jj_consume_token(34);\n }\n jj_consume_token(37);\n label_7:\n while (true) {\n if (jj_2_42(4)) {\n ;\n } else {\n break label_7;\n }\n jj_consume_token(34);\n }\n if (jj_2_43(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(38);\n }", "protected void statement(INestedIfElseClauseContainer upperIf) \r\n\t\t\t\t\t\t\t throws NoDefaultDistributionDeclaredException,\r\n\t\t\t\t\t\t\t\t\tInvalidConditionantException,\r\n\t\t\t\t\t\t\t\t\tSomeStateUndeclaredException,\r\n\t\t\t\t\t\t\t\t\tInvalidProbabilityRangeException,\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tTableFunctionMalformedException{\r\n\t\t// Debug.println(\"PARSING STATEMENT, VALUE = \" + value + \", LOOKAHEAD = \" + look);\r\n\t\tif (look == '[') {\r\n\t\t\t\t\t\t\t\r\n\t\t\t// Debug.println(\"\");\r\n\t\t\t// Debug.print(\" \");\r\n\t\t\tmatch('[');\r\n\t\t\t\r\n\t\t\t// initialize currently evaluated temporary table's collumn\r\n\t\t\t//this.currentProbCellList = new ArrayList<TempTableProbabilityCell>();\r\n\t\t\t\r\n\t\t\tassignmentOrIf(upperIf);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tmatch(']');\r\n\t\t\t// Debug.println(\"\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t// Debug.println(\"COULD NOT FIND '['\");\r\n\t\t\tthis.expected(\"[\");\r\n\t\t}\r\n\t}", "public BlockIfStmt(Node pIfPart, FirList pOptElseIfs, FirList pOptElse, int line, FirToHir pfHir){\n super(line, pfHir);\n fIfPart = (Pair)pIfPart;\n fOptElseIfs = pOptElseIfs;\n fOptElse = pOptElse;\n }", "private boolean for_cond(){\n int save = position;\r\n boolean for_cond = false;\r\n\r\n if (getNextLexeme() == Lexeme.LP) {\r\n if(init()){\r\n if(log_exp() && getNextLexeme() == Lexeme.END){\r\n if(getNextLexeme() == Lexeme.VAR && assign_op()) {\r\n if (getNextLexeme() == Lexeme.RP) {\r\n for_cond = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n position = for_cond ? position : save;\r\n return for_cond;\r\n }", "public Snippet visit(IfStatement n, Snippet argu) {\n\t\t Snippet _ret=new Snippet(\"\",\"\",null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret.returnTemp = generateTabs(blockDepth)+\"if(\"+f2.returnTemp+\")\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp;\n\t n.block.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t if(f5!=null){\n\t \t\ttPlasmaCode+=f5.returnTemp;\n\t \t\t}\n\t return _ret;\n\t }", "@Override\n\tpublic Object visitIfStatement(IfStatement ifStatement, Object arg) throws Exception {\n\t\tifStatement.getE().visit(this, arg);\n\t\tLabel if_false = new Label();\n\t\tmv.visitJumpInsn(IFEQ, if_false);\n\t\tLabel if_true = new Label();\n\t\tmv.visitLabel(if_true);\n\t\tifStatement.getB().visit(this, arg);\n\t\tmv.visitLabel(if_false);\n\t\t//System.out.println(\"leaving if statement\");\n\t\treturn null;\n\t}", "protected void ifStatement(INestedIfElseClauseContainer upperIf) \r\n\t\t\t\t\t\t\t throws NoDefaultDistributionDeclaredException,\r\n\t\t\t\t\t\t\t\t\t InvalidConditionantException,\r\n\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException,\r\n\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t TableFunctionMalformedException{\r\n\t\t// Debug.println(\"PARSING IF STATEMENT\");\r\n\t\t// SCAN FOR IF. Note that any blank spaces were already skipped\r\n\t\tscan();\r\n\t\tmatchString(\"IF\");\r\n\t\t\r\n\t\t\r\n\t\t// SCAN FOR ALL/ANY\r\n\t\tscan();\r\n\t\tswitch (token) {\r\n\t\tcase 'a':\r\n\t\t\t// Debug.println(\"ALL VERIFIED\");\r\n\t\t\t// sets the table header w/ this parameters (empty list,false,false): empty list (no verified parents), is not ANY and is not default\r\n\t\t\tthis.currentHeader = new TempTableHeaderCell(new ArrayList<TempTableHeader>(), false, false, this.ssbnnode);\r\n\t\t\tbreak;\r\n\t\tcase 'y':\r\n\t\t\t// Debug.println(\"ANY VERIFIED\");\r\n\t\t\t//\tsets the table header w/ this parameters (empty list,true,false): empty list (no verified parents), is ANY and is not default\r\n\t\t\tthis.currentHeader = new TempTableHeaderCell(new ArrayList<TempTableHeader>(), true, false, this.ssbnnode);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\texpected(\"ALL or ANY\");\r\n\t\t}\r\n\r\n\t\t// stores this.currentHeader in order to become an upper clause of any further nested if/else clause\r\n\t\tINestedIfElseClauseContainer currentIfContainer = this.currentHeader;\r\n\r\n\t\t\r\n\t\t// adds the header to the container (table or upper if/else-clause) before it is changed to another header.\r\n\t\tif (upperIf == null) {\r\n\t\t\t// No upper container identified. Let's assume to be the upper-most container (the temporary table)\r\n\t\t\tupperIf = this.tempTable;\t\t\t\r\n\t\t} \t\t\r\n\t\tupperIf.addNestedClause(this.currentHeader);\r\n\t\t\r\n\t\t// SCAN FOR varsetname\r\n\t\tString varSetName = this.varsetname();\r\n\t\tthis.currentHeader.setVarsetname(varSetName);\r\n\t\t// Debug.println(\"SCANNED VARSETNAME := \" + varSetName);\r\n\r\n\t\t// SCAN FOR HAVE\r\n\t\t// Debug.println(\"SCAN FOR HAVE\");\r\n\t\tscan();\r\n\t\tmatchString(\"HAVE\");\r\n\r\n\t\t// ( EXPECTED\r\n\t\tmatch('(');\r\n\t\t// if we catch sintax error here, it may be conditionant error\r\n\t\t\r\n\t\t// Now, parsing a boolean expression - tree format (we'll store it inside this variable)\r\n\t\tICompilerBooleanValue expressionTree = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\texpressionTree = bExpression();\r\n\t\t} catch (TableFunctionMalformedException e) {\r\n\t\t\tthrow new InvalidConditionantException(getNode().toString() , e);\r\n\t\t}\r\n\t\t//this.nextChar();\r\n\t\t//this.skipWhite();\r\n\t\t// Debug.println(\"LOOKAHEAD = \" + look);\r\n\t\t// ) EXPECTED\r\n\t\tmatch(')');\r\n\t\t\r\n\t\t// since we extracted the expression tree, store it inside the current header in temporary table\r\n\t\tif (expressionTree != null) {\r\n\t\t\tthis.currentHeader.setBooleanExpressionTree(expressionTree);\r\n\t\t} else {\r\n\t\t\tthrow new InvalidConditionantException(this.node.toString());\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"STARTING STATEMENTS\");\r\n\t\t\r\n\t\t// if we catch a sintax error here, it may be a value error\r\n//\t\ttry {\r\n\t\t\t// if there is a nested if, this if should be the upper clause (set currentHeader as upper clause).\r\n\t\t\tstatement(currentIfContainer);\r\n//\t\t} catch (TableFunctionMalformedException e) {\r\n//\t\t\t// Debug.println(\"->\" + getNode());\r\n//\t\t\tthrow new InvalidProbabilityRangeException(\"[\"+this.getNode().getName()+\"]\",e);\r\n//\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Debug.println(\"LOOKING FOR ELSE STATEMENT\");\r\n\t\t// LOOK FOR ELSE\r\n\t\t// Consistency check C09: the grammar \"may\" state else as optional,\r\n\t\t// but semantically every table must have a default distribution, which is\r\n\t\t// declared within an else clause.\r\n\t\t\r\n\t\t// We dont have to create a new temp table header, because else_statement would do so.\r\n\t\t\r\n\t\t//\tThis test is necessary to verify if there is an else clause\r\n\t\tif (this.index < this.text.length) {\r\n\t\t\ttry {\r\n\t\t\t\tscan();\r\n\t\t\t} catch (TableFunctionMalformedException e) {\r\n\t\t\t\t// a sintax error here represents a statement other than an else statement\r\n\t\t\t\tthrow new NoDefaultDistributionDeclaredException(e);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// No statement was found at all (that means no else statement).\r\n\t\t\t// Debug.println(\"END OF TABLE\");\r\n\t\t\tthrow new NoDefaultDistributionDeclaredException(getNode().toString());\r\n\t\t}\r\n\t\t\r\n\t\tif (token == 'l') {\r\n\t\t\t// The else statement should be a child statement of the upper container,\r\n\t\t\t// that means, it is on the same level of currently evaluated IF clause\r\n\t\t\telse_statement(upperIf);\r\n\t\t} else {\r\n\t\t\t// The statement found was not an else statement\r\n\t\t\tthrow new NoDefaultDistributionDeclaredException(getNode().toString());\r\n\t\t}\r\n\t\t\r\n\t\t// we may have another if/else clause after this...\r\n\t\t\r\n\t}", "IfStatement createIfStatement();", "public abstract void appendBlock();", "IfEnd createIfEnd();", "private void parseIfStatement() {\n check(Token.IF);\n check(Token.LPAR);\n\n parseCondition();\n\n int elseFixup = code.pc - 2;\n\n check(Token.RPAR);\n\n parseStatement();\n\n code.putJump(42); // Any value is fine, this will be fixed up later\n int endifFixup = code.pc - 2;\n\n code.fixup(elseFixup);\n\n if (nextToken.kind == Token.ELSE) {\n check(Token.ELSE);\n parseStatement();\n }\n\n code.fixup(endifFixup);\n }", "public ArrayList<Byte> generateIfBlockCode(IfBlock ib) {\n if ((ib.getActions().getChildren().size() == 0) || (ib.getCondition().getChildren().size() == 0)\n || ib.getIfHolders().getChildren().size() == 0) {\n return null;\n }\n Block conBlock = (Block) ib.getCondition().getChildren().get(0);\n\n ArrayList<Byte> ifArr = generateByteList(ib.getIfHolders());\n ArrayList<Byte> elseArr = generateByteList(ib.getElseHolders());\n\n ArrayList<Byte> cmdArr = new ArrayList<>();\n //checking condition or sense\n char instruction = 'c';\n int address = conBlock.getCapability().getDevice().getAddress();\n char cmdChar = conBlock.getCapability().getExeCommand().charAt(0);\n char cmdChar1 = conBlock.getCapability().getExeCommand().charAt(1);\n\n char compType = conBlock.getCapability().getCompType().charAt(0);\n cmdArr.add((byte) instruction);\n cmdArr.add((byte) address);\n cmdArr.add((byte) compType);\n short respSize = Short.parseShort(conBlock.getCapability().getRespSize());\n byte[] respArr = shortToByteArray(respSize);\n cmdArr.add(respArr[0]);\n int refVal = Integer.parseInt(conBlock.getCapability().getRefValue());\n if (conBlock.getCapability().getType().equals(Capability.CAP_CONDITION)) {\n refVal = Integer.parseInt(conBlock.getTextField().getText());\n }\n byte[] refArr = intToByteArray(refVal);\n for (int i = 0; i < respSize; i++) {\n cmdArr.add(refArr[i]);\n }\n cmdArr.add((byte) cmdChar);\n cmdArr.add((byte) cmdChar1);\n short jumpAdd = (short) (ifArr.size() + 4 + cmdArr.size() + 3);\n byte[] jumpArr = shortToByteArray(jumpAdd);\n int counter = 3;\n for (byte b : jumpArr) {\n cmdArr.add(counter++, b);\n\n }\n //prepending command length parameter\n cmdArr.add(0, (byte) (cmdArr.size() + 1));\n\n //jump forward instruction\n ArrayList<Byte> jumpBytes = new ArrayList<>();\n instruction = 'j';\n jumpAdd = (short) (elseArr.size() + 4);\n jumpBytes.add((byte) instruction);\n jumpArr = shortToByteArray(jumpAdd);\n for (byte b : jumpArr) {\n jumpBytes.add(b);\n }\n //prepending command length parameter\n jumpBytes.add(0, (byte) (jumpBytes.size() + 1));\n\n //merging lists\n cmdArr.addAll(ifArr);\n cmdArr.addAll(jumpBytes);\n cmdArr.addAll(elseArr);\n\n return cmdArr;\n }", "public void visit(UnmatchedIf unmatchedIf)\n\t{\n\t\t// since there was not an else, the jmpNotThen needs to be updated\n\t\t// and there is no jmpEndThen\n\t\tfixJumpAtEndOfCondition();\n\t}", "void showinsert() {\n\t\tif (printstatus == change)\n\t\t\tprintln(\">>>> CHANGED TO <br/>\");\n\t\telse if (printstatus != insert)\n\t\t\tprintln(\">>>> INSERT BEFORE \" + printoldline);\n\t\tprintstatus = insert;\n\t\toutput+=newinfo.symbol[printnewline].showSymbol();\n\t\toutput+=\"<br/>\";\n\t\tanyprinted = true;\n\t\tprintnewline++;\n\t}", "private void logBeginningOfTheTable() {\n\t\tLOG.log(Level.FINER, () -> \"Stupac tablice:\");\n\t\tLOG.log(Level.FINER, () -> \"=================================\");\n\t}", "public void visit(ConditionSingle conditionSingle)\n\t{\n\t\tinsertJumpAtEndOfCondition();\n\t}", "private void Conditional(){\n\t\tLogicOR();\n\t\t\n\t\tfor(;;){\n\t\t\tif(eat(\"for\")){\n\t\t\t\tInlineFor();\n\t\t\t}else if(eat(\"if\")){\n\t\t\t\tExpression();\n\t\t\t\tif(eat(\"else\"))\n\t\t\t\t\tConditional();\n\t\t\t}else if(eat(\"defined\") || eat(\"!defined\"));\n\t\t\telse for(;;){\n\t\t\t\tif(eat(\"?\")){\n\t\t\t\t\tExpression();\n\t\t\t\t\tassert_eat(\":\");\n\t\t\t\t\tConditional();\n\t\t\t\t}else return;\n\t\t\t}\n\t\t}\n\t}", "boolean contributesContent() {\n return includedInLastStep() && end >= start;\n }", "@Override\n\tpublic void visit(IfStmt ifstmt, List<Breakpoints> collector) {\n\t\tsuper.visit(ifstmt, collector);\n\n\t\t// check if statement is not empty (omit comments)\n\t\tboolean doChildrenExist = ifstmt.getThenStmt().getChildNodes().stream()\t\n\t\t\t.findAny()\n\t\t\t.filter(c -> !Comment.class.isAssignableFrom(c.getClass()))\n\t\t\t.isPresent();\n\t\t\n\t\t// if statement is empty, add its features to the collector\n\t\tif(!doChildrenExist) visitHelper(ifstmt, collector);\n\t\t\n\t}", "public void visit(UnmatchedIfElse unmatchedIfElse)\n\t{\n\t\t// since there was an else, the jmpNotThen has been updated\n\t\t// so only the jmpEndThen should be updated\n\t\tfixJumpAtEndOfThen();\n\t}", "public Element compileIf() throws CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\t\n\t\t//Unique labels for jumping around\n\t\tString elseLabel = label();\n\t\tString endLabel = label();\n\n\t\tElement ifParent = document.createElement(\"ifStatement\");\n\n\t\t// if\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// (\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// expression\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileExpression());\n\n\t\t// )\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\t\t\n\t\t//If condition fails, go to else part of the block\n\t\twriter.writeArithmetic(\"not\");\n\t\twriter.writeIf(elseLabel);\n\n\t\t// {\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// statement inside the if block\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileStatements());\n\n\t\t// }\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// if done, go to end\n\t\twriter.writeGoto(endLabel);\n\t\t\n\t\t// Else statements start here\n\t\twriter.writeLabel(elseLabel);\n\n\t\t// else\n\n\t\t// Interesting coding challenge. I had to look ahead by one token to\n\t\t// check if there was an else block, but if it didn't exists, I would be\n\t\t// one token ahead of the XML.\n\t\t// Built a clone of the present tokenizer and used it to look ahead,\n\t\t// if an else exists, advance the main tokenizer as well\n\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\tclone.advance();\n\n\t\ttoken = clone.returnTokenVal();\n\t\tif (token.equals(\"else\")) {\n\n\t\t\t// else\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// {\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// statements inside the else block\n\t\t\tjTokenizer.advance();\n\t\t\tifParent.appendChild(compileStatements());\n\n\t\t\t// }\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// End of if-else block\n\t\t\twriter.writeLabel(endLabel);\n\n\t\t\treturn ifParent;\n\t\t} \n\t\telse {\n\n\t\t\t// End of if block\n\n\t\t\twriter.writeLabel(endLabel);\n\t\t\treturn ifParent;\n\t\t}\n\t}", "public boolean C_enterTheZone(ListOfParameterLists parameterLists){\n //if(isEnter == true){\n if(debug)\n System.out.println(\"Condition from Rule7 :: is true\");\n\n\n return true;\n\n // }\n // else\n //return false;\n\n // Future work\n // Put the condition code here, eg. if the track is friendly, we\n // don't need to alert the analyst.\n\n }", "protected void else_statement(INestedIfElseClauseContainer upperIf) throws NoDefaultDistributionDeclaredException,\r\n\t\t\t\t\t\t\t\t\tInvalidConditionantException,\r\n\t\t\t\t\t\t\t\t\tSomeStateUndeclaredException,\r\n\t\t\t\t\t\t\t\t\tInvalidProbabilityRangeException,\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tTableFunctionMalformedException {\r\n\t\t\r\n\t\t// Debug.println(\"ELSE STATEMENT\");\r\n\t\tif ( look == '[' ) {\r\n\t\t\t// header ::= there are no known parents yet, is ANY and is default.\r\n\t\t\tthis.currentHeader = new TempTableHeaderCell(null,true,true, this.ssbnnode); \r\n\t\t\t\r\n\t\t\t// register it to the upper container (might be another clause or the temporary table)\r\n\t\t\tif (upperIf == null) {\r\n\t\t\t\t// No upper container identified. Let's assume to be the upper-most container (the temporary table)\r\n\t\t\t\tthis.tempTable.addNestedClause(this.currentHeader);\r\n\t\t\t} else {\r\n\t\t\t\tupperIf.addNestedClause(this.currentHeader);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if there are nested if/else clauses, their upper container should be the currently evaluated else clause (currentHeader)\r\n\t\t\tthis.statement(this.currentHeader);\r\n\t\t} else {\r\n\t\t\t// Debug.println(\"COULD NOT FIND '['\");\r\n\t\t\t// we dont have to create new header here because ifStatement would do so.\r\n\t\t\t// the if statement without \"[\" is on the same level of currently evaluated else clause, so, pass upperIf as upper container\r\n\t\t\tifStatement(upperIf);\r\n\t\t}\r\n\t\r\n\t}", "private IfElement _if(String expression, CodeElement... body)\n {\n return _ifElse(expression, Arrays.asList(body), null);\n }", "@Override\n public String visit(IfStmt n, Object arg) {\n return null;\n }", "public void ifStatement(Node n_parent) {\r\n if(token.get(lookAheadPossition).equals(\"IF\")){ /// not necessary - once i checked in statement////////////////////////\r\n System.out.println(\":: ifStatement::if:parent: \"+n_parent.getData());\r\n this.CheckError(\"IF\");\r\n\r\n this.expression(n_parent);\r\n this.CheckError(\"THEN\"); \r\n //this.CheckError(\"SC\");\r\n Node n_statementSequence = n_parent.setChildren(\"stmt list\");\r\n\r\n this.statementSequence(n_statementSequence);\r\n\r\n this.elseClause(n_parent);\r\n\r\n this.CheckError(\"END\");\r\n //this.CheckError(\"SC\");\r\n }\r\n\r\n }", "public String visit(IfStatement n, LLVMRedux argu) throws Exception {\n String[] array =u.getConditionTags();\n u.println(\"br i1 \"+ n.f2.accept(this, argu)+\", label %\"+array[0]+\", label %\"+array[1]);\n u.increaseIndentation();\n u.println(array[0]+\":\");\n n.f4.accept(this, argu);\n u.println(\"br label %\"+array[2]);\n u.println(array[1]+\":\");\n n.f6.accept(this, argu);\n u.println(\"br label %\"+array[2]);\n u.println(array[2]+\":\");\n u.decreaseIndentation();\n return null;\n }", "public void check_comment_at_the_end_of_statement(boolean on){\r\n this.e_comment_at_the_end_of_statement = on;\r\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate boolean maybeSideTracked(Block block) {\n\t\tif (Material.LOG.equals(block.getType()) && block.getData() == 3) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic void visit(IfNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * Verificare pentru assert failed\n\t\t */\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam conditia si preluam rezultatul evaluarii fiului corespunzator\n\t\t * branch-ului de then sau de else\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\n\t\t/***\n\t\t * Daca conditia este adevarata, continuam cu evaluarea celui de-al\n\t\t * doiela fiu, iar daca este false evaluam al treilea fiu\n\t\t */\n\t\tif (node.getChild(0).getName().contentEquals(\"true\")) {\n\t\t\tEvaluator.evaluate(node.getChild(1));\n\t\t\tnode.getChild(2).setVisited(true);\n\n\t\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\t\tnode.setName(Evaluator.variables.get(node.getChild(1).getName()));\n\t\t\t} else {\n\t\t\t\tnode.setName(node.getChild(1).getName());\n\t\t\t}\n\t\t} else {\n\t\t\tEvaluator.evaluate(node.getChild(2));\n\t\t\tnode.getChild(1).setVisited(true);\n\n\t\t\tif (node.getChild(2) instanceof Variable) {\n\t\t\t\tnode.setName(Evaluator.variables.get(node.getChild(2).getName()));\n\t\t\t} else {\n\t\t\t\tnode.setName(node.getChild(2).getName());\n\t\t\t}\n\t\t}\n\n\t}", "private String blocklessIf(String block) {\n\t\tint semicolonpos = block.indexOf(';');\n\t\tint blockstartpos = block.indexOf('{');\n\t\tif(semicolonpos>-1 && semicolonpos<blockstartpos || blockstartpos ==-1)\n\t\t{\n\t\t\tString tmp = block.substring(0, semicolonpos+1);\n\t\t\tString tmp2 = tmp.substring(0,tmp.lastIndexOf(\")\")+1);\n\t\t\tString correction = tmp.replace(tmp2, tmp2+\"{\")+\"}\";\n\t\t\tblock = block.replace(tmp, correction);\n\t\t}\n\t\treturn block;\n\t}", "@Override\n public Object visitIfstatement(TranslationGrammarParser.IfstatementContext ctx) {\n ArrayList<Node<TokenAttributes>> result = new ArrayList<>();\n Boolean cond = (Boolean) magicVisit(ctx.condition(), current_node);\n if (cond == null) {\n return null;\n }\n if (cond) {\n ArrayList<Node<TokenAttributes>> temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.ruleebody(), current_node);\n if (temp == null) {\n return null;\n }\n return temp;\n }\n return result;\n }", "private boolean isCondition() {\n return line.startsWith(\"if \") || line.startsWith(\"else \") ||\n line.startsWith(\"if(\") || line.equals(\"else\");\n }", "public void caseAIfStmt(AIfStmt node)\n {\n int initCount = 0;\n //inAIfStmt(node);\n if(node.getStmt() != null)\n {\n newScope();\n initCount++;\n }\n if(node.getIf() != null)\n {\n node.getIf().apply(this);\n }\n if(node.getStmt() != null)\n {\n node.getStmt().apply(this);\n }\n if(node.getExp() != null)\n {\n node.getExp().apply(this);\n }\n {\n List<PStmt> copy = new ArrayList<PStmt>(node.getTrue());\n for(PStmt e : copy)\n {\n e.apply(this);\n }\n }\n {\n List<PElseIf> copy = new ArrayList<PElseIf>(node.getElseIf());\n Iterator<PElseIf> itr = copy.iterator();\n while (itr.hasNext()) {\n PElseIf e = itr.next();\n AElseIf elseIf = (AElseIf) e;\n if(elseIf.getStmt() != null)\n {\n newScope();\n initCount++;\n }\n e.apply(this);\n if(elseIf.getExp() != null)\n {\n Type t = typemap.get(elseIf.getExp());\n t = removeAlias(t);\n if(!(t instanceof BooleanType)) throw new TypeException(\"[line \" + golite.weeder.LineNumber.getLineNumber(elseIf) + \"] If-else statement with non-boolean condition.\");\n }\n }\n }\n {\n List<PStmt> copy = new ArrayList<PStmt>(node.getFalse());\n for(PStmt e : copy)\n {\n e.apply(this);\n }\n }\n //outAIfStmt(node);\n if(node.getExp() != null)\n {\n Node e = node.getExp();\n Type t = typemap.get(e);\n t = removeAlias(t);\n if(!(t instanceof BooleanType)) throw new TypeException(\"[line \" + golite.weeder.LineNumber.getLineNumber(node) + \"] If statement with non-boolean condition.\");\n }\n if (initCount>0) {\n if (dump) {\n List<PStmt> copy = new ArrayList<PStmt>(node.getTrue());\n if (copy.size()>0 && golite.weeder.LineNumber.getLineNumber(copy.get(copy.size()-1))>0)\n {\n Node n = copy.get(copy.size()-1);\n System.out.println(\"[line \" + golite.weeder.LineNumber.getLineNumber(n) + \"]\");\n }\n }\n while (initCount>0) {\n unScope();\n initCount--;\n }\n }\n }", "@Override\n\tpublic void wantToGoOnBreak() {\n\t\t\n\t}", "@Override\r\n\tpublic void visit(BlockExpression blockExpression) {\n\r\n\t}", "boolean hasNewBlock();", "boolean hasNewBlock();", "boolean hasCustomBreak();", "public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\n {\n return par9;\n }", "public void append(Block.Entry entry) {\r\n\t\tstmts.add(new Entry(entry.code,entry.attributes()));\r\n\t}", "@Override\n\tpublic void printOn(PrintStream out, int depth) {\n\t\tIndentable.printIndentOnLn(out, depth, \"if \" + condition + \" then \");\n\t\twhenTrue.printOn(out, \tdepth + 1);\n\t\tif (whenFalse != null) {\n\t\t\tIndentable.printIndentOnLn(out, depth, \"else\");\n\t\t\twhenFalse.printOn(out, depth + 1);\n\t\t}\n\t\tIndentable.printIndentOnLn(out, depth, \"End if\");\n\t}", "public void checkBlock(BlockPos debug1) {\n/* 29 */ if (this.blockEngine != null) {\n/* 30 */ this.blockEngine.checkBlock(debug1);\n/* */ }\n/* 32 */ if (this.skyEngine != null) {\n/* 33 */ this.skyEngine.checkBlock(debug1);\n/* */ }\n/* */ }", "public void doCheckingDump() {\n \tcheckIntPos = true;\n \tcheckFloatPos = true;\n \tif(!framesText.getText().equals(\"\")) {\n \t\tcheckIntPos = checkIntPos && checkPosIntValues(framesText);\n \t}\n \tif(!dtDevcText.getText().equals(\"\")) {\n \t\tcheckFloatPos = checkFloatPos && checkPosFloatValues(dtDevcText);\n \t}\n }", "@Override\r\n\tpublic void visit(InstrumentBlock instrumentBlock) {\n\t\t\r\n\t}", "private void buildELSEStatement(CLBlock block, CLCommand clCmd) {\n\t\tString cmdValue = null;\n\t\tif (clCmd.getPositionalParms().size() >= 1) {\n\t\t\tcmdValue = clCmd.getPositionalParm(0).getValue().getText();\n\n\t\t\tif (cmdValue.startsWith(\"(\") && cmdValue.endsWith(\"\"))\n\t\t\t\tcmdValue = cmdValue.substring(1, cmdValue.length() - 1);\n\t\t\telse\n\t\t\t\tcmdValue = clCmd.getText().trim().substring(\"ELSE\".length()).trim();\n\n\t\t} else if (clCmd.getParm(\"CMD\") != null)\n\t\t\tcmdValue = clCmd.getParm(\"CMD\").getValue().getText();\n\n\t\tif (\"DO\".equalsIgnoreCase(cmdValue) || \"(DO)\".equalsIgnoreCase(cmdValue)) {\n\t\t\tCLBlock elseBlock = new CLBlock();\n\t\t\tbuildBlock(elseBlock);\n\n\t\t\tblock.getIfStack().peek().setElse(elseBlock.getBlock());\n\t\t\tblock.clearIfStack();\n\n\t\t} else if (cmdValue.trim().startsWith(\"IF\")) {\n\t\t\tCLCommand elseIf = (CLCommand) commandParser.parse(cmdValue + \"\\n\");\n\n\t\t\tQIf lastIf = block.getIfStack().peek();\n\t\t\tQIf result = buildIFStatement(block, elseIf);\n\t\t\tlastIf.setElse(result);\n\n\t\t} else {\n\t\t\tCLCommand thenCmd = (CLCommand) commandParser.parse(cmdValue + \"\\n\");\n\t\t\tQStatement result = analizeCommand(block, thenCmd, false);\n\n\t\t\tblock.getIfStack().peek().setElse(result);\n\t\t\tblock.clearIfStack();\n\t\t}\n\t}", "@Override\n public void endVisit(CssIf x, Context ctx) {\n out.indentOut();\n out.printOpt(\"/* } */\");\n out.newlineOpt();\n }", "private boolean isVcheck (JPLine plinesucc)\n\t{\n\t\tJPLine pline = plines.lower(plinesucc);\n\t\tif (pline == null) return false;\n\t\tif (pline.len != 2) return false;\n\t\tJPLine pred = plines.lower(pline);\n\t\tif (pred == null) return false;\n\t\treturn (pred.flag0 & 0x64) == 0x24; // branch instruction that is itself covered and not start of source code statement\n\t}", "protected void ifNotEntered() {\n \tif (!entered)\n \t\tenter();\n }", "protected void enterBlockStmt(BlockStmt blockStmt) {\n enclosingBlocks.addFirst(blockStmt);\n if (blockStmt.introducesNewScope()) {\n pushScope();\n }\n }", "public boolean hasStoreChunkLocation() {\n return msgCase_ == 7;\n }", "public Tipo visitBlock(DECAFParser.BlockContext ctx){\r\n\t\tTipo res=super.visitBlock(ctx);\r\n\t\tposition=tablaSimbolos.exit();\r\n\t\tif(ctx.children.size()==0){\r\n\t\t\ttablaSimbolos.addError(\"Missing instructions inside { }\");\r\n\t\t\treturn tablaSimbolos.incorrect();\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)\r\n {\r\n super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n// this.func_149930_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n }", "public boolean hasStoreChunkLocation() {\n return msgCase_ == 7;\n }", "default boolean visitContent() {\n\t\treturn true;\n\t}", "public boolean enter(BtrExpVariable visitable) {\n return (true);\n }", "public static void enter(boolean condition) {\n if (condition) {\n StackContext.enter();\n }\n }", "public boolean visit(ReturnStatement returnStatement) {\n\t\tASTNode parent = returnStatement.getParent();\r\n\t\tStatement statementBeforeReturn = null;\r\n\t\tif(parent instanceof Block){\r\n\t\t\tBlock block = (Block)parent;\r\n\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\tList<Statement> statements = block.statements();\r\n\t\t\tint stSize = statements.size();\r\n\t\t\tint returnPos = 0;\r\n\t\t\tfor(int i=0; i<stSize; i++){\r\n\t\t\t\tObject statement = statements.get(i);\r\n\t\t\t\t//System.out.println(\"Statement...\");\r\n\t\t\t\t//System.out.println(statement);\r\n\t\t\t\tif(statement instanceof ReturnStatement){\r\n\t\t\t\t\treturnPos = i-1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(returnPos>0){\r\n\t\t\t\tstatementBeforeReturn = (Statement) statements.get(returnPos);\r\n\t\t\t}else{\r\n\t\t\t\tstatementBeforeReturn = (Statement) statements.get(0);\r\n\t\t\t\t/*if(Statement.METHOD_INVOCATION == statementBeforeReturn.getNodeType()){\r\n\t\t\t\t\t\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else if(parent instanceof IfStatement){\r\n\t\t\tstatementBeforeReturn = (IfStatement) parent;\r\n\t\t\t//System.out.println(\"statementBeforeReturn: \"+statementBeforeReturn);\r\n\t\t} else{\r\n\t\t\tSystem.out.println(\"Unknown statement !!!\");\r\n\t\t}\r\n\t\tMethodLogInspectionResult result = new MethodLogInspectionResult();\r\n\t\tresults.add(result);\r\n\t\tif(currentPackage!=null){\r\n\t\t\tresult.setPackageName(currentPackage.getName().getFullyQualifiedName());\r\n\t\t}\r\n\t\tresult.setClassName(currentClassName);\r\n\t\tresult.setMethodName(currentMethodName);\r\n\t\t// check first statement\r\n\t\tString expectedFormat = currentClassName + \"#\" + currentMethodName + \":end\";\r\n\t\tif (statementBeforeReturn instanceof IfStatement) {\r\n\t\t\tLogInspectionResult r = LogStatementUtils.isLevelCheckedLogStatement((IfStatement) statementBeforeReturn,\r\n\t\t\t\t\texpectedFormat);\r\n\t\t\tresult.setLogInspectionResult(r);\r\n\t\t} else if (statementBeforeReturn instanceof ExpressionStatement) {\r\n\t\t\tLogInspectionResult r = LogStatementUtils.isLogStatement((ExpressionStatement) statementBeforeReturn,\r\n\t\t\t\t\texpectedFormat);\r\n\t\t\tresult.setLogInspectionResult(r);\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "void doCondition() throws IOException\n\t{\n\t\ttry\n\t\t{\n\t\t\t// must have a breakpoint number\n\t\t\tint id = nextIntToken();\n\n\t\t\t// get the breakpoint\n\t\t\tint at = breakpointIndexOf(id);\n\t\t\tBreakAction a = breakpointAt(at);\n\n\t\t\t// no more parms means to clear it\n\t\t\tif (hasMoreTokens())\n\t\t\t{\n\t\t\t\t// now just pull the commands as they come while not end\n\t\t\t\tString line = restOfLine();\n\n\t\t\t\t// build an expression and attach it to the breakpoint\n\t\t\t\tValueExp exp = parseExpression(line);\n\n\t\t\t\t// warn about the assignment!\n\t\t\t\tif ( exp.containsAssignment() && !yesNoQuery(getLocalizationManager().getLocalizedTextString(\"askExpressionContainsAssignment\")) ) //$NON-NLS-1$\n\t\t\t\t\tthrow new IllegalAccessException(\"=\"); //$NON-NLS-1$\n\n\t\t\t\ta.setCondition(exp, line);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ta.clearCondition(); // clear it\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"breakpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"breakpointNowUnconditional\", args)); //$NON-NLS-1$\n\t\t\t}\n\t\t}\n\t\tcatch(IllegalAccessException iae)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"breakpointNotChanged\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}", "private boolean peekStatement() {\n return peekSourceElement();\n }", "@Override\n\tpublic Object visit(ASTCondIs node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\" is \");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}", "public boolean onBlockExploded(Explosion ex) {\n\t\treturn true;\n\t}", "@Override\n protected boolean shouldCopyOnInsertion(IChunk chunk)\n {\n return chunk.isEncoded();\n }", "public boolean ifPeekIsBlockStmt() {\n\t\tif (ifPeek(\"IF_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"WHILE_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"FOR_\")) {\n\t\t\treturn true;\n\t\t}\n\t\t// **************\n\t\t// TODO\n\t\tif (ifPeekIsType()) {\n\t\t\treturn true;\n\t\t}\n\t\t// ***************\n\t\tif (ifPeek(\"RETURN_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"BREAK_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"CONT_\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void visit(IfStatement ifStatement) {\n\t\tifStatement.cond().accept(this);\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tcheckType(\"boolean\");\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tSet<String> elseClone = new HashSet<String>(uninit);\n\t\tifStatement.thencase().accept(this);\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tSet<String> thenClone = new HashSet<String>(uninit);\n\t\tuninit = elseClone;\n\t\tifStatement.elsecase().accept(this);\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tuninit.addAll(thenClone);\n\t}", "public boolean enter(BtrExpList visitable) {\n return (true);\n }", "void beforeContentsSynchronized();", "@Override\n public void visit(CondFactExpr CondFactExpr) {\n Code.loadConst(1);\n Code.putFalseJump(Code.eq, 0);\n andList.add(Code.pc - 2);\n\n }", "public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }", "public IfCondition() {\r\n super();\r\n }", "public Code visitIfNode(StatementNode.IfNode node) {\n beginGen(\"If\");\n /* Generate code to evaluate the condition and then and else parts */\n Code code = node.getCondition().genCode(this);\n Code thenCode = node.getThenStmt().genCode(this);\n Code elseCode = node.getElseStmt().genCode(this);\n /* Append a branch over then part code */\n code.genJumpIfFalse(thenCode.size() + Code.SIZE_JUMP_ALWAYS);\n /* Next append the code for the then part */\n code.append(thenCode);\n /* Append branch over the else part */\n code.genJumpAlways(elseCode.size());\n /* Finally append the code for the else part */\n code.append(elseCode);\n endGen(\"If\");\n return code;\n }", "@Override\n public void visitBlockStmt(BlockStmt stmt) {\n enterBlockStmt(stmt);\n super.visitBlockStmt(stmt);\n leaveBlockStmt(stmt);\n }", "public boolean enter(BtrExpText visitable) {\n return (true);\n }", "public Arginfo visit(IfthenStatement n, Arginfo argu) {\n Arginfo _ret=null;\n \n System.out.print(\"CJUMP \");\n \n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n \n int var=(labelctr++);\n System.out.println(\" L\"+var+\" \");\n \n n.f3.accept(this, argu);\n n.f4.accept(this, argu);\n \n System.out.println(\" L\"+var+\" NOOP\");\n \n return _ret;\n }", "public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)\r\n/* 171: */ {\r\n/* 172:193 */ if (par9 < 12) {\r\n/* 173:194 */ return ForgeDirection.OPPOSITES[par5] + par9 & 0xF;\r\n/* 174: */ }\r\n/* 175:196 */ return par9 & 0xF;\r\n/* 176: */ }", "@Override\n public void addStatement(IRBodyBuilder builder, TranslationContext context,\n FunctionCall call) {\n \n }", "public void visit(IfStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n n.f4.accept(this);\n n.f5.accept(this);\n }", "private IfStmt ifstmt(){\n Expr expr=null;\n Stmt thenstmt=null;\n Stmt elsestmt= null;\n \n if(lexer.token == Symbol.IF){\n lexer.nextToken();\n expr = expr();\n\n if(lexer.token == Symbol.THEN){\n lexer.nextToken();\n thenstmt = stmt();\n \n if(lexer.token == Symbol.ELSE){\n lexer.nextToken();\n elsestmt = stmt();\n \n }\n\n \n if(lexer.token == Symbol.ENDIF){\n lexer.nextToken();\n }else{\n lexer.error(\"Missing ENDIF\");\n }\n }else{\n lexer.error(\"Missing THEN\");\n }\n }else{\n lexer.error(\"Missing IF\");\n }\n \n return new IfStmt(expr, thenstmt, elsestmt);\n }", "public SmallSet<CFGNode> interceptedAbruptStmts() {\n ASTNode$State state = state();\n try {\n \t\tSmallSet<CFGNode> branches = emptySmallSet();\n \t\tIterator itr = super.interceptedAbruptStmts().iterator();\n \t\twhile (itr.hasNext()) {\n \t\t\tStmt stmt = (Stmt)itr.next();\n \t\t\tif (stmt.isBreakStmt() && potentialTargetOf((BreakStmt)stmt) || \n \t\t\t\tstmt.isContinueStmt() && potentialTargetOf((ContinueStmt)stmt)) {\n \t\t\t\tcontinue;\n \t\t\t} \n \t\t\tbranches = branches.union(stmt);\n \t\t}\n \t\treturn branches;\n \t}\n finally {\n }\n }", "private IfElement _ifElse(String expression, List<CodeElement> body, List<CodeElement> elseBody)\n {\n return _ifElseIf(expression, body, Collections.emptyList(), Collections.emptyList(), elseBody);\n }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc addNewLoc();", "@Override\n\tpublic int getReplaceBlock() {\n\t\treturn 0;\n\t}", "public interface IndentifyCallBack {\n void onIdetifyDetected(boolean var1);\n}", "public Object visit(ASTIfStatement node, Object data) {\n \n int boolCompIf = sumExpressionComplexity( (ASTExpression) node.getFirstChildOfType( ASTExpression.class ) );\n \n int complexity = 0;\n \n List statementChildren = new ArrayList();\n for ( int i = 0; i < node.jjtGetNumChildren(); i++ ) {\n if ( node.jjtGetChild( i ).getClass() == ASTStatement.class ) {\n statementChildren.add( node.jjtGetChild( i ) );\n }\n }\n \n if ( statementChildren.isEmpty()\n || ( statementChildren.size() == 1 && node.hasElse() )\n || ( statementChildren.size() != 1 && !node.hasElse() ) ) {\n throw new IllegalStateException( \"If node has wrong number of children\" );\n }\n \n // add path for not taking if\n if ( !node.hasElse() ) {\n complexity++;\n }\n \n for ( Iterator iter = statementChildren.iterator(); iter.hasNext(); ) {\n SimpleJavaNode element = (SimpleJavaNode) iter.next();\n complexity += ( (Integer) element.jjtAccept( this, data ) ).intValue();\n }\n \n return new Integer( boolCompIf + complexity );\n }", "public boolean enter(Data visitable) {\n return (true);\n }", "public boolean enter(BtrExpInterleave visitable) {\n return (true);\n }", "@Override\n public Object visitIfelsestatement(TranslationGrammarParser.IfelsestatementContext ctx) {\n Boolean cond = (Boolean) magicVisit(ctx.condition(), current_node);\n if (cond == null) {\n return null;\n }\n ArrayList<Node<TokenAttributes>> temp;\n if (cond) {\n temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.t, current_node);\n } else {\n temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.f, current_node);\n }\n if (temp == null) {\n return null;\n }\n return temp;\n }", "public void run() {\n \t\t\tif (! buf.trim().equals(\"?\")) {\n \t\t\t curInsertionCode2 = buf.trim();\n \t\t\t}\n \t\t}", "public final void inCheck() {\n\t\tout.println(\"You have been placed in check!\");\n\t}" ]
[ "0.6139885", "0.5760615", "0.5736141", "0.56263554", "0.5602519", "0.55998915", "0.5598551", "0.55700856", "0.55668324", "0.5497826", "0.54830164", "0.5475257", "0.540224", "0.5390882", "0.5335104", "0.53338975", "0.5304184", "0.528943", "0.5274445", "0.5272762", "0.5263085", "0.5201849", "0.519787", "0.5197381", "0.5191086", "0.5182449", "0.51740843", "0.5164776", "0.5128715", "0.5117319", "0.51133084", "0.5101448", "0.5097101", "0.50732327", "0.50670624", "0.50667053", "0.5061726", "0.5047341", "0.50416476", "0.50272363", "0.5019935", "0.5007854", "0.49823868", "0.49769112", "0.4976176", "0.49748948", "0.49627247", "0.49624467", "0.49624467", "0.4961419", "0.4957145", "0.49479946", "0.49252334", "0.49229738", "0.49116617", "0.49047992", "0.4895204", "0.48725504", "0.48681366", "0.48557138", "0.48429766", "0.48426178", "0.4831586", "0.4820671", "0.48199743", "0.48179537", "0.48126185", "0.4797673", "0.4796585", "0.47957137", "0.47897846", "0.477893", "0.47634563", "0.47619608", "0.47617376", "0.47551814", "0.4754057", "0.47500739", "0.4748544", "0.4747386", "0.4743141", "0.47420874", "0.47365695", "0.47320974", "0.47255343", "0.47242677", "0.47238427", "0.47170505", "0.4710304", "0.4704102", "0.46986458", "0.468924", "0.46865806", "0.46841952", "0.4682392", "0.46748185", "0.4673735", "0.46673402", "0.46642008", "0.46598902" ]
0.50762874
33
These are not valid CSS
@Override public boolean visit(CssSprite x, Context ctx) { out.printOpt("/* CssSprite */"); out.newlineOpt(); addSubstitition(x); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n assertEquals(\"spaces\", \"justatest\", Encodings.toCSSString(\"just a test\"));\n assertEquals(\"special\", \"a\", Encodings.toCSSString(\"&*%$#a%#!@()\"));\n }", "@Override\n public String getCSSStyle() {\n return null;\n }", "public BlockUIThemedCSS()\n\t{\n\t\t//No config required\n\t}", "void tag2() \n\t{\n\t\t/* c_style_tag: This is a C style tag. */\n\t}", "private String cssFileForHtml() {\r\n\t\treturn \"<style>table, td, th {\"\r\n\t\t\t\t+ \"border: 1px solid #ddd;\"\r\n\t\t\t\t+ \"text-align: left;}\"\r\n\t\t\t\t+ \"table {\"\r\n\t\t\t\t+ \"border-collapse: collapse;\"\r\n\t\t\t\t+ \"width: 100%;}\"\r\n\t\t\t\t+ \"th, td {\"\r\n\t\t\t\t+ \"padding: 10px;\"\r\n\t\t\t\t+ \"color:#000000;\"\r\n\t\t\t\t+ \"font-family: 'Roboto', sans-serif;}td{\"\r\n\t\t\t\t+ \"font-size: smaller;}\"\r\n\t\t\t\t+ \"th{background-color:#EEEEEE;color:#000000;}tr{background-color:#FFFFFF;}\"\r\n\t\t\t\t+ \"tr:hover{background-color:#EEEEEE}</style>\";\r\n\t}", "public void testW3C() \n throws FileNotFoundException, ParseException\n {\n String str_file = str_Directory + \"/\" + \"w3c-css1-test.css\";\n Parser parser = new Parser(new java.io.FileInputStream(str_file));\n\n parser.setHandler(this);\n parser.Parse();\n }", "@Override\n public String getCSSClass() {\n return null;\n }", "@Override\n public boolean visit(CssDef x, Context ctx) {\n out.printOpt(\"/* CssDef */\");\n out.newlineOpt();\n return false;\n }", "@Override\n public boolean visit(CssExternalSelectors x, Context ctx) {\n out.printOpt(\"/* @external\");\n for (String className : x.getClasses()) {\n out.printOpt(\" \");\n out.printOpt(className);\n }\n out.printOpt(\"; */\");\n out.newlineOpt();\n return false;\n }", "public void validateRpd9s1()\n {\n String exprString = \"//@style\";\n assertFalse(Type.ERROR, \"rpd9s1.attr\", ((Boolean) evaluate(getElement(ELEM_BODY), exprString,\n XPathConstants.BOOLEAN)));\n assertFalse(Type.ERROR, \"rpd9s1.tag\",\n getChildren(getElement(ELEM_BODY), \"style\").getNodeList().getLength() > 0);\n }", "public void test450389() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 44 column 1 - Warning: <font> attribute \"color\" has invalid value \"reddish\"\n // line 72 column 1 - Warning: <font> attribute \"color\" has invalid value \"#FF\"\n // line 76 column 1 - Warning: <font> attribute \"color\" has invalid value \"grurple\"\n // line 77 column 1 - Warning: <font> attribute \"color\" has invalid value \"#grurple\"\n // line 78 column 1 - Warning: <font> attribute \"color\" has invalid value \"#1234567\"\n // Info: Document content looks like HTML 3.2\n\n executeTidyTest(\"450389.html\");\n assertWarnings(6);\n }", "private void addCss() {\n StyleLink jqueryLink = new StyleLink(\"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\");\n page.addHeader(jqueryLink);\n StyleLink jqueryTooltipLink = new StyleLink(\"/css/jquery.ui.tooltip.css\");\n page.addHeader(jqueryTooltipLink);\n StyleLink cssLink = new StyleLink(\"/css/lockss-new.css\");\n page.addHeader(cssLink);\n }", "public interface Style extends CssResource {\n\n /**\n * The style for the panel that contains\n * the whole user record\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecord();\n\n /**\n * The style for the name of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String nameLabel();\n\n /**\n * The style for the username of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabel();\n\n /**\n * The style for the user avatar image\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImage();\n\n /**\n * The style for the remove image\n *\n * @author Johannes Gryffenberg <[email protected]>\n * @since 26 Feb 2013\n *\n * @return The name of the compiled style\n */\n String removeImageStyle();\n\n /**\n * The style for the user record when it is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecordSelected();\n\n /**\n * The style for the username when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabelSelected();\n\n /**\n * The style for the avatar when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImageSelected();\n }", "public BuiltInStyle(int xfind, int sn)\r\n/* 10: */ {\r\n/* 11:46 */ super(Type.STYLE);\r\n/* 12: */ \r\n/* 13:48 */ this.xfIndex = xfind;\r\n/* 14:49 */ this.styleNumber = sn;\r\n/* 15: */ }", "private String getCSS() {\r\n StringBuffer css = new StringBuffer();\r\n css.append(\"<style type='text/css'>\");\r\n css.append(\"<!--\");\r\n css.append(\"\tA.pagina:link, A.pagina:visited, A.pagina:active, A.pagina:hover {\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-STYLE: normal;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-DECORATION: none ;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:link {\");\r\n css.append(\"\t\tCOLOR: #0039ba;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:visited {\");\r\n css.append(\"\t\tCOLOR: #6c8bc3;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:active {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:hover {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tTR.pagina{\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-ALIGN: center;\");\r\n css.append(\"\t\tCOLOR: gray;\");\r\n css.append(\"\t}\");\r\n css.append(\"-->\");\r\n css.append(\"</style>\");\r\n return (css.toString());\r\n }", "public static String getCSS()\n {\n \treturn \"table.relations \"+\n\t\t \"{ \" +\n\t\t\t\" margin: 1em 1em 1em 2em;\" +\n\t\t\t\" border-collapse: collapse;\" +\n\t\t\t\" width:90%;\" +\n\t\t \"}\" +\n\t\t\"table.relations td\" + \n\t\t\"{\" +\n\t\t\" border-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tbackground: #fff;\" +\n\t\t\"\tpadding: 6px 6px 6px 12px;\" +\n\t\t\"\tcolor: #6D929B;\" +\n\t\t\"}\" +\n\t\t\"table.relations th\" + \n\t\t\"{\" +\n\t\t\"\tfont: bold 10px \\\"Trebuchet MS\\\", Verdana, Arial, Helvetica,\" +\n\t\t\"\tsans-serif;\" +\n\t\t\"\tcolor: #003399;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-top: 1px solid #C1DAD7;\" +\n\t\t\"\tletter-spacing: 2px;\" +\n\t\t\"\ttext-transform: uppercase;\" +\n\t\t\"\ttext-align: left;\" +\n\t\t\"\tpadding: 3px 3px 3px 6px;\" +\n\t\t\"\tbackground: #B0C4DE;\" +\n\t\t\"}\";\n }", "@Override\n public boolean visit(CssUrl x, Context ctx) {\n out.printOpt(\"/* CssUrl */\");\n out.newlineOpt();\n return false;\n }", "protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}", "void tag3() \n\t{\n\t\t// c++_style_tag: This is a C++ style tag.\n\t}", "public String toCSS(){\n return new StringBuilder()\n .append(\"display:\")\n .append(this.toString().replace(\"_\", \"-\"))\n .append(\";\").toString();\n }", "@Override\n\tprotected NSArray<String> additionalCSSFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.css\" } );\n\t}", "private void writeCss(HttpServletRequest request,\n HttpServletResponse response) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n List<String> namespaces = Lists.newArrayList(context.getPreloads());\n DefinitionService definitionService = Aura.getDefinitionService();\n Client.Type type = Aura.getContextService().getCurrentContext().getClient().getType();\n Mode mode = context.getMode();\n StringBuffer sb = new StringBuffer();\n \n for (String ns : namespaces) {\n String key = type.name() + \"$\" + ns;\n \n String nsCss = !mode.isTestMode() ? cssCache.get(key) : null;\n if (nsCss == null) {\n DefDescriptor<ThemeDef> matcher = definitionService.getDefDescriptor(String.format(\"css://%s.*\", ns),\n ThemeDef.class);\n Set<DefDescriptor<ThemeDef>> descriptors = definitionService.find(matcher);\n List<ThemeDef> nddefs = new ArrayList<ThemeDef>();\n \n sb.setLength(0);\n for(DefDescriptor<ThemeDef> descriptor : descriptors){\n //\n // This could use the generic routine above except for this brain dead little\n // gem.\n //\n if(!descriptor.getName().toLowerCase().endsWith(\"template\")){\n ThemeDef def = descriptor.getDef();\n if(def != null){\n nddefs.add(def);\n }\n }\n }\n \n context.setPreloading(true);\n Appendable tmp = mode.isTestMode() ? response.getWriter() : sb;\n preloadSerialize(nddefs, ThemeDef.class, tmp);\n if (!mode.isTestMode()) {\n nsCss = sb.toString();\n cssCache.put(key, nsCss);\n }\n }\n \n if (nsCss != null) {\n \tresponse.getWriter().append(nsCss);\n }\n }\n }", "public PXStylesheetParser() {\n this(null);\n }", "protected WebXStyleElementImpl() {\n }", "abstract protected AbstractCSSStyleSheet getUserImportantStyleSheet();", "@Test \n public void CSSParserTest() throws Exception{\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n String cssString = \"\";\n try {\n BufferedReader in = new BufferedReader(\n new FileReader(\n \"./test-file/testFile.txt\"));\n String line;\n while ((line = in.readLine()) != null) {\n cssString += line;\n cssString += \"\\n\";\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n Document doc = new Document();\n {\n Element html = doc.createElement(\"html\");\n Element head = doc.createElement(\"head\");\n Element body = doc.createElement(\"body\");\n Node text = doc.createTextNode(\"test message\");\n html.appendChild(head);\n html.appendChild(body);\n body.appendChild(text);\n doc.appendChild(html);\n }\n /**Get doc from UIParser result whether is not null \n * \n */\n assertNotNull(doc.documentElement());\n \n /**Setting doc Style from CSSParser\n * \n */\n CSSParser CSSParser = new CSSParser();\n CSSParser.parser(cssString, doc); \n \n Element html = doc.documentElement(); \n \n /** Test whether the tag Name is correct\n * \n */\n assertEquals(\"tagName of root element should be <html>\", \"html\", html.tagName());\n \n /**Use html getStyle that it is not null\n * \n */\n Style style = html.getStyle();\n assertNotNull(style);\n \n /** Test whether the background is black\n * \n */\n assertEquals(\"background should be black\", \"black\", style.getProperty(\"background\"));\n \n /** Test whether the width is correct\n * \n */\n assertEquals(\"width should be 100\", \"100px\", style.getProperty(\"width\"));\n \n \n /**Get the child list of documentElement and test whether the child count correct \n * \n */\n NodeList list = html.childNodes();\n assertEquals(\"list length should be one\",list.length(),2);\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n assertEquals(\"first child of <html> should be <head>\", \"head\", list.item(0).nodeName());\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n Node body = list.item(1);\n assertEquals(\"second child of <html> should be <body>\", \"body\", body.nodeName());\n \n /**Get Style from element getStyle whether it is null or not\n * \n */\n Element bodyElement = (Element) body;\n Style bodyStyle = bodyElement.getStyle();\n assertNotNull(bodyStyle);\n \n /** Test whether the margin-top is correct\n * \n */\n assertEquals(\"margin-top should be 10px\", \"10px\", bodyStyle.getProperty(\"margin-top\"));\n \n /** Test whether the text-color is correct\n * \n */\n assertEquals(\"text-color should be blue\", \"blue\", bodyStyle.getProperty(\"text-color\"));\n }", "abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();", "@Override\n public boolean visit(CssEval x, Context ctx) {\n out.printOpt(\"/* CssEval */\");\n out.newlineOpt();\n return false;\n }", "List<CSSParseException> getExceptions();", "public String getCss() {\n return clean(css);\n }", "public CssBorderWidth() {\n }", "public void test552861() throws Exception\n {\n executeTidyTest(\"552861.html\");\n // should complain about invalid \"with\" attribute\n assertWarnings(1);\n }", "@Test\n public void test037() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)table0.style();\n }", "public void ardublockStyling(Document doc) {\n\t\tif (styleList != null) {\n\t\t\tXPathFactory factory = XPathFactory.newInstance();\n\t\t\tfor (String[] style : styleList) {\n\t\t\t\tXPath xpath = factory.newXPath();\n\t\t\t\ttry {\n\t\t\t\t\t// XPathExpression expr = xpath.compile(\"//BlockGenus[@name[starts-with(.,\\\"Tinker\\\")]]/@color\");\n\t\t\t\t\tXPathExpression expr = xpath.compile(style[0]);\n\t\t\t\t\tNodeList bgs = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);\n\t\t\t\t\tfor (int i = 0; i < bgs.getLength(); i++) {\n\t\t\t\t\t\tNode bg = bgs.item(i);\n\t\t\t\t\t\tbg.setNodeValue(style[1]);\n\t\t\t\t\t\t// bg.setAttribute(\"color\", \"128 0 0\");\n\t\t\t\t\t}\n\t\t\t\t} catch (XPathExpressionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private PrngFixes() {\n }", "@Test\n public void eofHandling() {\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \" \");\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \"\\t\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em;\");\n assertLine(Language.CSS, new Line(Language.CSS, COMMENT), \"/* comment */\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em; /* with comment */\");\n }", "@Override\n protected Node newNode() {\n return new WebXStyleElementImpl();\n }", "public void test427810() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 8 column 1 - Warning: <blink> is not approved by W3C\n // line 9 column 1 - Warning: <wbr> is not approved by W3C\n // line 10 column 1 - Warning: <nobr> is not approved by W3C\n // Info: Document content looks like HTML Proprietary\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"427810.html\");\n assertWarnings(4);\n }", "String getCssFilter();", "public interface Css extends CssResource {\n String button();\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "public void styleMe(){\n\t}", "protected void tidy(final CSSRule cssRule) {\n\t\tif(cssRule instanceof CSSStyleRule) { //TODO fix\n\t\t\tfinal CSSStyleRule cssStyleRule = (CSSStyleRule)cssRule; //TODO fix\n\t\t\ttidy(cssStyleRule.getStyle()); //tidy the style declaration\n\t\t}\n\t}", "static zzco m26832d() {\n return new zzco(\"Failed to parse the message.\");\n }", "public void test516370() throws Exception\n {\n // line 10 column 1 - Warning: <h2> ID \"_ValidID2\" uses XML ID syntax\n // line 11 column 1 - Warning: <h2> ID \":ValidID3\" uses XML ID syntax\n // line 13 column 1 - Warning: <h2> attribute \"id\" has invalid value \".InvalidID1\"\n // line 14 column 1 - Warning: <h2> attribute \"id\" has invalid value \"2InvalidID2\"\n // line 15 column 1 - Warning: <h2> attribute \"id\" lacks value\n\n executeTidyTest(\"516370.xhtml\");\n assertWarnings(5);\n assertLogContains(\"XML ID syntax\");\n }", "public final boolean synpred2_css21() {\n state.backtracking++;\n int start = input.mark();\n try {\n synpred2_css21_fragment(); // can never throw exception\n } catch (RecognitionException re) {\n System.err.println(\"impossible: \"+re);\n }\n boolean success = !state.failed;\n input.rewind(start);\n state.backtracking--;\n state.failed=false;\n return success;\n }", "public abstract String getDefaultStylesheet ();", "public String getCurrentcss() {\n return clean(currentcss);\n }", "public void testCOLOUR2() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 121, \"sable\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public static interface Style extends CssResource {\r\n\r\n\t\t/**\r\n\t\t * Applied to buttons.\r\n\t\t */\r\n\t\tString button();\r\n\r\n\t\t/**\r\n\t\t * Applied to disabled buttons.\r\n\t\t */\r\n\t\tString disabledButton();\r\n\r\n\t\t/**\r\n\t\t * Applied to the details text.\r\n\t\t */\r\n\t\tString pageDetails();\r\n\r\n\t\tString pageDetails2();\r\n\t\t\r\n\t\tString imogPagerLayout();\r\n\t}", "public void test431964() throws Exception\n {\n // line 7 column 1 - Warning: <table> attribute \"height\" lacks value\n // line 7 column 1 - Warning: <table> proprietary attribute \"height\"\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML Proprietary\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"431964.html\");\n assertWarnings(2);\n }", "public void test435922() throws Exception\n {\n // line 6 column 1 - Warning: <input> isn't allowed in <body> elements\n // line 7 column 3 - Warning: inserting implicit <form>\n // line 7 column 3 - Warning: missing </form>\n // line 7 column 3 - Warning: <form> lacks \"action\" attribute\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"435922.html\");\n assertWarnings(4);\n }", "public static void processCSS(File file) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n int init, end;\n\n while ((line = in.readLine()) != null) {\n if ((init = line.indexOf(\"/*~RTL \")) != -1) {\n end = line.indexOf(\"*/\");\n if (end == -1)\n end = line.length();\n vLines.add(line.substring(init + 7, end) + \"\\n\");\n } else {\n vLines.add(line + \"\\n\");\n }\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.close();\n }", "public SimpleStyle() {\n\t\t// set default values\n\t\tthis.foregroundColor = -1;\n\t\t// others are null: VM DONE\n\t}", "private void loadRuleSets() throws CSSException {\n StyleSheet stylesheet = cssCode.getParsedCSS();\n for (RuleBlock block : stylesheet) {\n if (block instanceof RuleSet) {\n\n StringBuilder selectorString = new StringBuilder();\n RuleSet ruleSet = (RuleSet) block;\n\n List<CombinedSelector> selectors = ruleSet.getSelectors();\n Iterator<CombinedSelector> selectorsIterator = selectors.iterator();\n while (selectorsIterator.hasNext()) {\n CombinedSelector selector = selectorsIterator.next();\n selectorString.append(selector.toString());\n if (selectorsIterator.hasNext()) {\n selectorString.append(\", \");\n }\n }\n\n List<CSSRule> cssRules = new ArrayList<>();\n CSSRule cssRule;\n Declaration.Source source;\n DeclarationPosition declarationPosition;\n\n for (Declaration declaration : ruleSet) {\n cssRule = new CSSRule(declaration.getProperty(), \"\");\n\n source = declaration.getSource();\n if (source == null) {\n declarationPosition = null;\n } else {\n declarationPosition = new DeclarationPosition(source.getLine(), source.getPosition());\n }\n cssRule.setDeclarationPosition(declarationPosition);\n\n cssRules.add(cssRule);\n }\n\n CSSRuleSet cssRuleSet = new CSSRuleSet(selectorString.toString(), cssRules);\n\n this.cssRuleBlocks.add(cssRuleSet);\n\n // add record to the position-declaration map\n for (CSSRule iCssRule : cssRuleSet.getCssRules()) {\n this.declarationPositionMap.put(\n iCssRule.getDeclarationPosition(),\n new DeclarationSource(cssRuleSet, iCssRule)\n );\n }\n }\n }\n }", "@Override public String getUserAgentStylesheet() {\r\n return getClass().getResource(\"switch.css\").toExternalForm();\r\n }", "protected ScriptStyle(int val, String s)\r\n/* 10: */ {\r\n/* 11: 54 */ this.value = val;\r\n/* 12: 55 */ this.string = s;\r\n/* 13: */ \r\n/* 14: 57 */ ScriptStyle[] oldstyles = styles;\r\n/* 15: 58 */ styles = new ScriptStyle[oldstyles.length + 1];\r\n/* 16: 59 */ System.arraycopy(oldstyles, 0, styles, 0, oldstyles.length);\r\n/* 17: 60 */ styles[oldstyles.length] = this;\r\n/* 18: */ }", "protected void extraExplosions_EM() {\n }", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private HepRepColor() {\n }", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "public void test427827() throws Exception\n {\n // line 6 column 1 - Warning: missing </a> before <a>\n // line 7 column 6 - Warning: discarding unexpected </a>\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"427827.html\");\n assertWarnings(2);\n }", "public void test438956() throws Exception\n {\n // line 3 column 1 - Warning: plain text isn't allowed in <head> elements\n // line 6 column 1 - Warning: discarding unexpected <body>\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"438956.html\");\n\n assertWarnings(2);\n }", "public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}", "public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }", "public void updateSyntaxStyles() {\n }", "public void test431883() throws Exception\n {\n executeTidyTest(\"431883.html\");\n\n assertLogContains(\"Doctype given is \\\"-//W3C//DTD HTML 4.0\");\n }", "StyleValue getCSSValue();", "@org.junit.Test\n public void compElemBadName2() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName3() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"foo:error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "private LineStyleUtils() {\n\n }", "public abstract TC createStyle();", "abstract protected InlineStyle createInlineStyle(Node owner);", "@org.junit.Test\n public void compElemBadName6() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xmlns' Mary Holstege :) element { fn:QName(\\\"http://example.com/some-uri\\\",\\\"xmlns:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName4() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xml' and namespace URI is not 'http://www.w3.org/XML/1998/namespace' Mary Holstege :) element { fn:QName(\\\"http://example.com/not-XML-uri\\\",\\\"xml:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "public Spider()\r\n/* 24: */ {\r\n/* 25: 21 */ setBackground(Color.WHITE);\r\n/* 26: */ }", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "private void loadCssForThisClass() {\n\t\tString className = getClass().getName();\n\t\tString cssPath = className.replace(\".\", \"/\") + \".css\";\n\t\tURL cssUrl = getClass().getClassLoader().getResource(cssPath);\n\t\tloadCss(cssUrl);\n\n\t\t// System.out.println(\"CSS:\\n\" + getCssContent(cssUrl) );\n\t}", "private int _parseStyle(\n String value\n )\n {\n if (value == null)\n return -1;\n\n if (value.equalsIgnoreCase(XMLConstants.PLAIN_FONT_STYLE))\n return Font.PLAIN;\n if (value.equalsIgnoreCase(XMLConstants.ITALIC_FONT_STYLE))\n return Font.ITALIC;\n if (value.equalsIgnoreCase(XMLConstants.BOLD_FONT_STYLE))\n return Font.BOLD;\n\n _LOG.warning(_STYLE_ERROR);\n\n return -1;\n }", "public void mo1962e() throws cf {\r\n }", "@org.junit.Test\n public void constrCompelemCompname19() {\n final XQuery query = new XQuery(\n \"element {xs:untypedAtomic('el em')} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@org.junit.Test\n public void constrCompelemCompname18() {\n final XQuery query = new XQuery(\n \"element {'el em'} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@Override\n\tpublic void compile() {\n\t\t\n\t}", "public String nextCSSString()\n {\n if (empty())\n return null;\n int ch = input.charAt(position);\n int endQuote = ch;\n if (ch != '\\'' && ch != '\"')\n return null;\n\n StringBuilder sb = new StringBuilder();\n position++;\n ch = nextChar();\n while (ch != -1 && ch != endQuote)\n {\n if (ch == '\\\\') {\n // Escaped char sequence\n ch = nextChar();\n if (ch == -1) // EOF: do nothing\n continue;\n if (ch == '\\n' || ch == '\\r' || ch == '\\f') { // a CSS newline\n ch = nextChar();\n continue; // Newline: consume it\n }\n int hc = hexChar(ch);\n if (hc != -1) {\n int codepoint = hc;\n for (int i=1; i<=5; i++) {\n ch = nextChar();\n hc = hexChar(ch);\n if (hc == -1)\n break;\n codepoint = codepoint * 16 + hc;\n }\n sb.append((char) codepoint);\n continue;\n }\n // Other chars just unescape to themselves\n // Fall through to append\n }\n sb.append((char) ch);\n ch = nextChar();\n }\n return sb.toString();\n }", "public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}", "private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}", "public WebXStyleElementImpl(String prefix, WebXDocumentImpl owner) {\n super(prefix, owner);\n }", "public void test431874() throws Exception\n {\n executeTidyTest(\"431874.html\");\n assertWarnings(2);\n }", "public MalformedHexadecimalColourException(String message) {\n super(message);\n }", "public static String cssColor(final char c) {\n\tfinal short[] array = _cssColor0(c);\n\treturn \"rgb(\"+array[0]+\",\"+array[1]+\",\"+array[2]+\")\";\n\t}", "public void testCOLOUR6() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 125, \"or\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "private void cleanStyles(Element articleContent) {\n for (Element e : articleContent.getAllElements()) {\n e.removeAttr(\"style\");\n }\n }", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Override\n\tpublic final boolean isCSS1Compat() {\n\t\treturn getCompatMode().equals(\"CSS1Compat\");\n\t}", "public void test553414() throws Exception\n {\n executeTidyTest(\"553414.html\");\n assertLogContains(\"given is \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\n assertLogContains(\"looks like XHTML 1.0 Transitional\");\n assertWarnings(1);\n }", "Map<String, String> styles(String group);", "public DTMDOMException(short code) {\n/* 49 */ super(code, \"\");\n/* */ }", "protected boolean isFreeStyle(){\r\n\t\treturn false;\r\n\t}", "public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}", "@Test(expected = SDLParseException.class)\n public final void testBadHead1 () throws IOException {\n \tparser.load(makeReader (\":This::= 'lol';\"));\n }" ]
[ "0.5973445", "0.57924896", "0.5707429", "0.56147325", "0.5371038", "0.53400475", "0.53336716", "0.5310589", "0.52381855", "0.52341753", "0.521552", "0.5170459", "0.5143138", "0.5118289", "0.51159304", "0.51095194", "0.50751805", "0.5003203", "0.49782643", "0.4964525", "0.49439517", "0.49215955", "0.4910257", "0.4906586", "0.4902893", "0.48919174", "0.48802352", "0.48691526", "0.4857048", "0.48558944", "0.48380992", "0.4829993", "0.47949314", "0.47877726", "0.4778216", "0.47365764", "0.47248808", "0.47235098", "0.47041565", "0.4698876", "0.46811846", "0.4676324", "0.46747047", "0.46652225", "0.46504402", "0.4640285", "0.46323684", "0.46099505", "0.4600028", "0.45902044", "0.45806146", "0.45705408", "0.45702106", "0.4568396", "0.45504656", "0.45501962", "0.4546296", "0.45457664", "0.45405415", "0.45370024", "0.45334682", "0.45316738", "0.45296916", "0.45284107", "0.45252785", "0.45109853", "0.45066327", "0.45037565", "0.44925922", "0.44865912", "0.447994", "0.44771212", "0.44749972", "0.4474647", "0.44703895", "0.44692358", "0.44645423", "0.44645387", "0.4464331", "0.44581458", "0.44563648", "0.44505405", "0.4446042", "0.44423825", "0.44412744", "0.44382757", "0.44293243", "0.44291645", "0.4422003", "0.44192794", "0.44118664", "0.4402977", "0.43943492", "0.43921876", "0.43901235", "0.43857443", "0.43793264", "0.43738326", "0.43720227", "0.43693823", "0.4366559" ]
0.0
-1
These are not valid CSS
@Override public boolean visit(CssUrl x, Context ctx) { out.printOpt("/* CssUrl */"); out.newlineOpt(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd2s6()\n {\n // CSS Validation errors are checked by CSSValidator.\n }", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n assertEquals(\"spaces\", \"justatest\", Encodings.toCSSString(\"just a test\"));\n assertEquals(\"special\", \"a\", Encodings.toCSSString(\"&*%$#a%#!@()\"));\n }", "@Override\n public String getCSSStyle() {\n return null;\n }", "public BlockUIThemedCSS()\n\t{\n\t\t//No config required\n\t}", "void tag2() \n\t{\n\t\t/* c_style_tag: This is a C style tag. */\n\t}", "private String cssFileForHtml() {\r\n\t\treturn \"<style>table, td, th {\"\r\n\t\t\t\t+ \"border: 1px solid #ddd;\"\r\n\t\t\t\t+ \"text-align: left;}\"\r\n\t\t\t\t+ \"table {\"\r\n\t\t\t\t+ \"border-collapse: collapse;\"\r\n\t\t\t\t+ \"width: 100%;}\"\r\n\t\t\t\t+ \"th, td {\"\r\n\t\t\t\t+ \"padding: 10px;\"\r\n\t\t\t\t+ \"color:#000000;\"\r\n\t\t\t\t+ \"font-family: 'Roboto', sans-serif;}td{\"\r\n\t\t\t\t+ \"font-size: smaller;}\"\r\n\t\t\t\t+ \"th{background-color:#EEEEEE;color:#000000;}tr{background-color:#FFFFFF;}\"\r\n\t\t\t\t+ \"tr:hover{background-color:#EEEEEE}</style>\";\r\n\t}", "public void testW3C() \n throws FileNotFoundException, ParseException\n {\n String str_file = str_Directory + \"/\" + \"w3c-css1-test.css\";\n Parser parser = new Parser(new java.io.FileInputStream(str_file));\n\n parser.setHandler(this);\n parser.Parse();\n }", "@Override\n public String getCSSClass() {\n return null;\n }", "@Override\n public boolean visit(CssDef x, Context ctx) {\n out.printOpt(\"/* CssDef */\");\n out.newlineOpt();\n return false;\n }", "@Override\n public boolean visit(CssExternalSelectors x, Context ctx) {\n out.printOpt(\"/* @external\");\n for (String className : x.getClasses()) {\n out.printOpt(\" \");\n out.printOpt(className);\n }\n out.printOpt(\"; */\");\n out.newlineOpt();\n return false;\n }", "public void validateRpd9s1()\n {\n String exprString = \"//@style\";\n assertFalse(Type.ERROR, \"rpd9s1.attr\", ((Boolean) evaluate(getElement(ELEM_BODY), exprString,\n XPathConstants.BOOLEAN)));\n assertFalse(Type.ERROR, \"rpd9s1.tag\",\n getChildren(getElement(ELEM_BODY), \"style\").getNodeList().getLength() > 0);\n }", "public void test450389() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 44 column 1 - Warning: <font> attribute \"color\" has invalid value \"reddish\"\n // line 72 column 1 - Warning: <font> attribute \"color\" has invalid value \"#FF\"\n // line 76 column 1 - Warning: <font> attribute \"color\" has invalid value \"grurple\"\n // line 77 column 1 - Warning: <font> attribute \"color\" has invalid value \"#grurple\"\n // line 78 column 1 - Warning: <font> attribute \"color\" has invalid value \"#1234567\"\n // Info: Document content looks like HTML 3.2\n\n executeTidyTest(\"450389.html\");\n assertWarnings(6);\n }", "private void addCss() {\n StyleLink jqueryLink = new StyleLink(\"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\");\n page.addHeader(jqueryLink);\n StyleLink jqueryTooltipLink = new StyleLink(\"/css/jquery.ui.tooltip.css\");\n page.addHeader(jqueryTooltipLink);\n StyleLink cssLink = new StyleLink(\"/css/lockss-new.css\");\n page.addHeader(cssLink);\n }", "public interface Style extends CssResource {\n\n /**\n * The style for the panel that contains\n * the whole user record\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecord();\n\n /**\n * The style for the name of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String nameLabel();\n\n /**\n * The style for the username of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabel();\n\n /**\n * The style for the user avatar image\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImage();\n\n /**\n * The style for the remove image\n *\n * @author Johannes Gryffenberg <[email protected]>\n * @since 26 Feb 2013\n *\n * @return The name of the compiled style\n */\n String removeImageStyle();\n\n /**\n * The style for the user record when it is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecordSelected();\n\n /**\n * The style for the username when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabelSelected();\n\n /**\n * The style for the avatar when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImageSelected();\n }", "public BuiltInStyle(int xfind, int sn)\r\n/* 10: */ {\r\n/* 11:46 */ super(Type.STYLE);\r\n/* 12: */ \r\n/* 13:48 */ this.xfIndex = xfind;\r\n/* 14:49 */ this.styleNumber = sn;\r\n/* 15: */ }", "private String getCSS() {\r\n StringBuffer css = new StringBuffer();\r\n css.append(\"<style type='text/css'>\");\r\n css.append(\"<!--\");\r\n css.append(\"\tA.pagina:link, A.pagina:visited, A.pagina:active, A.pagina:hover {\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-STYLE: normal;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-DECORATION: none ;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:link {\");\r\n css.append(\"\t\tCOLOR: #0039ba;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:visited {\");\r\n css.append(\"\t\tCOLOR: #6c8bc3;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:active {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:hover {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tTR.pagina{\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-ALIGN: center;\");\r\n css.append(\"\t\tCOLOR: gray;\");\r\n css.append(\"\t}\");\r\n css.append(\"-->\");\r\n css.append(\"</style>\");\r\n return (css.toString());\r\n }", "public static String getCSS()\n {\n \treturn \"table.relations \"+\n\t\t \"{ \" +\n\t\t\t\" margin: 1em 1em 1em 2em;\" +\n\t\t\t\" border-collapse: collapse;\" +\n\t\t\t\" width:90%;\" +\n\t\t \"}\" +\n\t\t\"table.relations td\" + \n\t\t\"{\" +\n\t\t\" border-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tbackground: #fff;\" +\n\t\t\"\tpadding: 6px 6px 6px 12px;\" +\n\t\t\"\tcolor: #6D929B;\" +\n\t\t\"}\" +\n\t\t\"table.relations th\" + \n\t\t\"{\" +\n\t\t\"\tfont: bold 10px \\\"Trebuchet MS\\\", Verdana, Arial, Helvetica,\" +\n\t\t\"\tsans-serif;\" +\n\t\t\"\tcolor: #003399;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-top: 1px solid #C1DAD7;\" +\n\t\t\"\tletter-spacing: 2px;\" +\n\t\t\"\ttext-transform: uppercase;\" +\n\t\t\"\ttext-align: left;\" +\n\t\t\"\tpadding: 3px 3px 3px 6px;\" +\n\t\t\"\tbackground: #B0C4DE;\" +\n\t\t\"}\";\n }", "protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}", "void tag3() \n\t{\n\t\t// c++_style_tag: This is a C++ style tag.\n\t}", "public String toCSS(){\n return new StringBuilder()\n .append(\"display:\")\n .append(this.toString().replace(\"_\", \"-\"))\n .append(\";\").toString();\n }", "@Override\n\tprotected NSArray<String> additionalCSSFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.css\" } );\n\t}", "private void writeCss(HttpServletRequest request,\n HttpServletResponse response) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n List<String> namespaces = Lists.newArrayList(context.getPreloads());\n DefinitionService definitionService = Aura.getDefinitionService();\n Client.Type type = Aura.getContextService().getCurrentContext().getClient().getType();\n Mode mode = context.getMode();\n StringBuffer sb = new StringBuffer();\n \n for (String ns : namespaces) {\n String key = type.name() + \"$\" + ns;\n \n String nsCss = !mode.isTestMode() ? cssCache.get(key) : null;\n if (nsCss == null) {\n DefDescriptor<ThemeDef> matcher = definitionService.getDefDescriptor(String.format(\"css://%s.*\", ns),\n ThemeDef.class);\n Set<DefDescriptor<ThemeDef>> descriptors = definitionService.find(matcher);\n List<ThemeDef> nddefs = new ArrayList<ThemeDef>();\n \n sb.setLength(0);\n for(DefDescriptor<ThemeDef> descriptor : descriptors){\n //\n // This could use the generic routine above except for this brain dead little\n // gem.\n //\n if(!descriptor.getName().toLowerCase().endsWith(\"template\")){\n ThemeDef def = descriptor.getDef();\n if(def != null){\n nddefs.add(def);\n }\n }\n }\n \n context.setPreloading(true);\n Appendable tmp = mode.isTestMode() ? response.getWriter() : sb;\n preloadSerialize(nddefs, ThemeDef.class, tmp);\n if (!mode.isTestMode()) {\n nsCss = sb.toString();\n cssCache.put(key, nsCss);\n }\n }\n \n if (nsCss != null) {\n \tresponse.getWriter().append(nsCss);\n }\n }\n }", "public PXStylesheetParser() {\n this(null);\n }", "protected WebXStyleElementImpl() {\n }", "abstract protected AbstractCSSStyleSheet getUserImportantStyleSheet();", "@Test \n public void CSSParserTest() throws Exception{\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n String cssString = \"\";\n try {\n BufferedReader in = new BufferedReader(\n new FileReader(\n \"./test-file/testFile.txt\"));\n String line;\n while ((line = in.readLine()) != null) {\n cssString += line;\n cssString += \"\\n\";\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n Document doc = new Document();\n {\n Element html = doc.createElement(\"html\");\n Element head = doc.createElement(\"head\");\n Element body = doc.createElement(\"body\");\n Node text = doc.createTextNode(\"test message\");\n html.appendChild(head);\n html.appendChild(body);\n body.appendChild(text);\n doc.appendChild(html);\n }\n /**Get doc from UIParser result whether is not null \n * \n */\n assertNotNull(doc.documentElement());\n \n /**Setting doc Style from CSSParser\n * \n */\n CSSParser CSSParser = new CSSParser();\n CSSParser.parser(cssString, doc); \n \n Element html = doc.documentElement(); \n \n /** Test whether the tag Name is correct\n * \n */\n assertEquals(\"tagName of root element should be <html>\", \"html\", html.tagName());\n \n /**Use html getStyle that it is not null\n * \n */\n Style style = html.getStyle();\n assertNotNull(style);\n \n /** Test whether the background is black\n * \n */\n assertEquals(\"background should be black\", \"black\", style.getProperty(\"background\"));\n \n /** Test whether the width is correct\n * \n */\n assertEquals(\"width should be 100\", \"100px\", style.getProperty(\"width\"));\n \n \n /**Get the child list of documentElement and test whether the child count correct \n * \n */\n NodeList list = html.childNodes();\n assertEquals(\"list length should be one\",list.length(),2);\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n assertEquals(\"first child of <html> should be <head>\", \"head\", list.item(0).nodeName());\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n Node body = list.item(1);\n assertEquals(\"second child of <html> should be <body>\", \"body\", body.nodeName());\n \n /**Get Style from element getStyle whether it is null or not\n * \n */\n Element bodyElement = (Element) body;\n Style bodyStyle = bodyElement.getStyle();\n assertNotNull(bodyStyle);\n \n /** Test whether the margin-top is correct\n * \n */\n assertEquals(\"margin-top should be 10px\", \"10px\", bodyStyle.getProperty(\"margin-top\"));\n \n /** Test whether the text-color is correct\n * \n */\n assertEquals(\"text-color should be blue\", \"blue\", bodyStyle.getProperty(\"text-color\"));\n }", "abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();", "@Override\n public boolean visit(CssEval x, Context ctx) {\n out.printOpt(\"/* CssEval */\");\n out.newlineOpt();\n return false;\n }", "List<CSSParseException> getExceptions();", "public String getCss() {\n return clean(css);\n }", "public CssBorderWidth() {\n }", "public void test552861() throws Exception\n {\n executeTidyTest(\"552861.html\");\n // should complain about invalid \"with\" attribute\n assertWarnings(1);\n }", "@Test\n public void test037() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"`ymkk& +k:vlY+SnG\");\n Block block0 = (Block)table0.style();\n }", "public void ardublockStyling(Document doc) {\n\t\tif (styleList != null) {\n\t\t\tXPathFactory factory = XPathFactory.newInstance();\n\t\t\tfor (String[] style : styleList) {\n\t\t\t\tXPath xpath = factory.newXPath();\n\t\t\t\ttry {\n\t\t\t\t\t// XPathExpression expr = xpath.compile(\"//BlockGenus[@name[starts-with(.,\\\"Tinker\\\")]]/@color\");\n\t\t\t\t\tXPathExpression expr = xpath.compile(style[0]);\n\t\t\t\t\tNodeList bgs = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);\n\t\t\t\t\tfor (int i = 0; i < bgs.getLength(); i++) {\n\t\t\t\t\t\tNode bg = bgs.item(i);\n\t\t\t\t\t\tbg.setNodeValue(style[1]);\n\t\t\t\t\t\t// bg.setAttribute(\"color\", \"128 0 0\");\n\t\t\t\t\t}\n\t\t\t\t} catch (XPathExpressionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private PrngFixes() {\n }", "@Test\n public void eofHandling() {\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \" \");\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \"\\t\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em;\");\n assertLine(Language.CSS, new Line(Language.CSS, COMMENT), \"/* comment */\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em; /* with comment */\");\n }", "@Override\n protected Node newNode() {\n return new WebXStyleElementImpl();\n }", "public void test427810() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 8 column 1 - Warning: <blink> is not approved by W3C\n // line 9 column 1 - Warning: <wbr> is not approved by W3C\n // line 10 column 1 - Warning: <nobr> is not approved by W3C\n // Info: Document content looks like HTML Proprietary\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"427810.html\");\n assertWarnings(4);\n }", "String getCssFilter();", "public interface Css extends CssResource {\n String button();\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "public void styleMe(){\n\t}", "protected void tidy(final CSSRule cssRule) {\n\t\tif(cssRule instanceof CSSStyleRule) { //TODO fix\n\t\t\tfinal CSSStyleRule cssStyleRule = (CSSStyleRule)cssRule; //TODO fix\n\t\t\ttidy(cssStyleRule.getStyle()); //tidy the style declaration\n\t\t}\n\t}", "static zzco m26832d() {\n return new zzco(\"Failed to parse the message.\");\n }", "public void test516370() throws Exception\n {\n // line 10 column 1 - Warning: <h2> ID \"_ValidID2\" uses XML ID syntax\n // line 11 column 1 - Warning: <h2> ID \":ValidID3\" uses XML ID syntax\n // line 13 column 1 - Warning: <h2> attribute \"id\" has invalid value \".InvalidID1\"\n // line 14 column 1 - Warning: <h2> attribute \"id\" has invalid value \"2InvalidID2\"\n // line 15 column 1 - Warning: <h2> attribute \"id\" lacks value\n\n executeTidyTest(\"516370.xhtml\");\n assertWarnings(5);\n assertLogContains(\"XML ID syntax\");\n }", "public final boolean synpred2_css21() {\n state.backtracking++;\n int start = input.mark();\n try {\n synpred2_css21_fragment(); // can never throw exception\n } catch (RecognitionException re) {\n System.err.println(\"impossible: \"+re);\n }\n boolean success = !state.failed;\n input.rewind(start);\n state.backtracking--;\n state.failed=false;\n return success;\n }", "public abstract String getDefaultStylesheet ();", "public String getCurrentcss() {\n return clean(currentcss);\n }", "public void testCOLOUR2() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 121, \"sable\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public static interface Style extends CssResource {\r\n\r\n\t\t/**\r\n\t\t * Applied to buttons.\r\n\t\t */\r\n\t\tString button();\r\n\r\n\t\t/**\r\n\t\t * Applied to disabled buttons.\r\n\t\t */\r\n\t\tString disabledButton();\r\n\r\n\t\t/**\r\n\t\t * Applied to the details text.\r\n\t\t */\r\n\t\tString pageDetails();\r\n\r\n\t\tString pageDetails2();\r\n\t\t\r\n\t\tString imogPagerLayout();\r\n\t}", "public void test431964() throws Exception\n {\n // line 7 column 1 - Warning: <table> attribute \"height\" lacks value\n // line 7 column 1 - Warning: <table> proprietary attribute \"height\"\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML Proprietary\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"431964.html\");\n assertWarnings(2);\n }", "public void test435922() throws Exception\n {\n // line 6 column 1 - Warning: <input> isn't allowed in <body> elements\n // line 7 column 3 - Warning: inserting implicit <form>\n // line 7 column 3 - Warning: missing </form>\n // line 7 column 3 - Warning: <form> lacks \"action\" attribute\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"435922.html\");\n assertWarnings(4);\n }", "public static void processCSS(File file) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n int init, end;\n\n while ((line = in.readLine()) != null) {\n if ((init = line.indexOf(\"/*~RTL \")) != -1) {\n end = line.indexOf(\"*/\");\n if (end == -1)\n end = line.length();\n vLines.add(line.substring(init + 7, end) + \"\\n\");\n } else {\n vLines.add(line + \"\\n\");\n }\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.close();\n }", "public SimpleStyle() {\n\t\t// set default values\n\t\tthis.foregroundColor = -1;\n\t\t// others are null: VM DONE\n\t}", "private void loadRuleSets() throws CSSException {\n StyleSheet stylesheet = cssCode.getParsedCSS();\n for (RuleBlock block : stylesheet) {\n if (block instanceof RuleSet) {\n\n StringBuilder selectorString = new StringBuilder();\n RuleSet ruleSet = (RuleSet) block;\n\n List<CombinedSelector> selectors = ruleSet.getSelectors();\n Iterator<CombinedSelector> selectorsIterator = selectors.iterator();\n while (selectorsIterator.hasNext()) {\n CombinedSelector selector = selectorsIterator.next();\n selectorString.append(selector.toString());\n if (selectorsIterator.hasNext()) {\n selectorString.append(\", \");\n }\n }\n\n List<CSSRule> cssRules = new ArrayList<>();\n CSSRule cssRule;\n Declaration.Source source;\n DeclarationPosition declarationPosition;\n\n for (Declaration declaration : ruleSet) {\n cssRule = new CSSRule(declaration.getProperty(), \"\");\n\n source = declaration.getSource();\n if (source == null) {\n declarationPosition = null;\n } else {\n declarationPosition = new DeclarationPosition(source.getLine(), source.getPosition());\n }\n cssRule.setDeclarationPosition(declarationPosition);\n\n cssRules.add(cssRule);\n }\n\n CSSRuleSet cssRuleSet = new CSSRuleSet(selectorString.toString(), cssRules);\n\n this.cssRuleBlocks.add(cssRuleSet);\n\n // add record to the position-declaration map\n for (CSSRule iCssRule : cssRuleSet.getCssRules()) {\n this.declarationPositionMap.put(\n iCssRule.getDeclarationPosition(),\n new DeclarationSource(cssRuleSet, iCssRule)\n );\n }\n }\n }\n }", "protected ScriptStyle(int val, String s)\r\n/* 10: */ {\r\n/* 11: 54 */ this.value = val;\r\n/* 12: 55 */ this.string = s;\r\n/* 13: */ \r\n/* 14: 57 */ ScriptStyle[] oldstyles = styles;\r\n/* 15: 58 */ styles = new ScriptStyle[oldstyles.length + 1];\r\n/* 16: 59 */ System.arraycopy(oldstyles, 0, styles, 0, oldstyles.length);\r\n/* 17: 60 */ styles[oldstyles.length] = this;\r\n/* 18: */ }", "@Override public String getUserAgentStylesheet() {\r\n return getClass().getResource(\"switch.css\").toExternalForm();\r\n }", "protected void extraExplosions_EM() {\n }", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private HepRepColor() {\n }", "@Override\r\n protected void parseAttributes()\r\n {\n\r\n }", "public void test427827() throws Exception\n {\n // line 6 column 1 - Warning: missing </a> before <a>\n // line 7 column 6 - Warning: discarding unexpected </a>\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"427827.html\");\n assertWarnings(2);\n }", "public void test438956() throws Exception\n {\n // line 3 column 1 - Warning: plain text isn't allowed in <head> elements\n // line 6 column 1 - Warning: discarding unexpected <body>\n // Info: Doctype given is \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n // Info: Document content looks like HTML 4.01 Transitional\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"438956.html\");\n\n assertWarnings(2);\n }", "public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}", "public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }", "public void updateSyntaxStyles() {\n }", "public void test431883() throws Exception\n {\n executeTidyTest(\"431883.html\");\n\n assertLogContains(\"Doctype given is \\\"-//W3C//DTD HTML 4.0\");\n }", "StyleValue getCSSValue();", "@org.junit.Test\n public void compElemBadName2() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName3() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace URI is 'http://www.w3.org/2000/xmlns/' Mary Holstege :) element { fn:QName(\\\"http://www.w3.org/2000/xmlns/\\\",\\\"foo:error\\\")} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "private LineStyleUtils() {\n\n }", "public abstract TC createStyle();", "abstract protected InlineStyle createInlineStyle(Node owner);", "@org.junit.Test\n public void compElemBadName6() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xmlns' Mary Holstege :) element { fn:QName(\\\"http://example.com/some-uri\\\",\\\"xmlns:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@org.junit.Test\n public void compElemBadName4() {\n final XQuery query = new XQuery(\n \"(: 3.7.3.1 Computed Element Constructor per XQ.E19 XQDY0096 if namespace prefix is 'xml' and namespace URI is not 'http://www.w3.org/XML/1998/namespace' Mary Holstege :) element { fn:QName(\\\"http://example.com/not-XML-uri\\\",\\\"xml:error\\\") } {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "private void loadCssForThisClass() {\n\t\tString className = getClass().getName();\n\t\tString cssPath = className.replace(\".\", \"/\") + \".css\";\n\t\tURL cssUrl = getClass().getClassLoader().getResource(cssPath);\n\t\tloadCss(cssUrl);\n\n\t\t// System.out.println(\"CSS:\\n\" + getCssContent(cssUrl) );\n\t}", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "public Spider()\r\n/* 24: */ {\r\n/* 25: 21 */ setBackground(Color.WHITE);\r\n/* 26: */ }", "private int _parseStyle(\n String value\n )\n {\n if (value == null)\n return -1;\n\n if (value.equalsIgnoreCase(XMLConstants.PLAIN_FONT_STYLE))\n return Font.PLAIN;\n if (value.equalsIgnoreCase(XMLConstants.ITALIC_FONT_STYLE))\n return Font.ITALIC;\n if (value.equalsIgnoreCase(XMLConstants.BOLD_FONT_STYLE))\n return Font.BOLD;\n\n _LOG.warning(_STYLE_ERROR);\n\n return -1;\n }", "public void mo1962e() throws cf {\r\n }", "@org.junit.Test\n public void constrCompelemCompname19() {\n final XQuery query = new XQuery(\n \"element {xs:untypedAtomic('el em')} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "@org.junit.Test\n public void constrCompelemCompname18() {\n final XQuery query = new XQuery(\n \"element {'el em'} {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0074\")\n );\n }", "public String nextCSSString()\n {\n if (empty())\n return null;\n int ch = input.charAt(position);\n int endQuote = ch;\n if (ch != '\\'' && ch != '\"')\n return null;\n\n StringBuilder sb = new StringBuilder();\n position++;\n ch = nextChar();\n while (ch != -1 && ch != endQuote)\n {\n if (ch == '\\\\') {\n // Escaped char sequence\n ch = nextChar();\n if (ch == -1) // EOF: do nothing\n continue;\n if (ch == '\\n' || ch == '\\r' || ch == '\\f') { // a CSS newline\n ch = nextChar();\n continue; // Newline: consume it\n }\n int hc = hexChar(ch);\n if (hc != -1) {\n int codepoint = hc;\n for (int i=1; i<=5; i++) {\n ch = nextChar();\n hc = hexChar(ch);\n if (hc == -1)\n break;\n codepoint = codepoint * 16 + hc;\n }\n sb.append((char) codepoint);\n continue;\n }\n // Other chars just unescape to themselves\n // Fall through to append\n }\n sb.append((char) ch);\n ch = nextChar();\n }\n return sb.toString();\n }", "@Override\n\tpublic void compile() {\n\t\t\n\t}", "public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}", "public WebXStyleElementImpl(String prefix, WebXDocumentImpl owner) {\n super(prefix, owner);\n }", "private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}", "public void test431874() throws Exception\n {\n executeTidyTest(\"431874.html\");\n assertWarnings(2);\n }", "public MalformedHexadecimalColourException(String message) {\n super(message);\n }", "public static String cssColor(final char c) {\n\tfinal short[] array = _cssColor0(c);\n\treturn \"rgb(\"+array[0]+\",\"+array[1]+\",\"+array[2]+\")\";\n\t}", "public void testCOLOUR6() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 125, \"or\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "private void cleanStyles(Element articleContent) {\n for (Element e : articleContent.getAllElements()) {\n e.removeAttr(\"style\");\n }\n }", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Override\n\tpublic final boolean isCSS1Compat() {\n\t\treturn getCompatMode().equals(\"CSS1Compat\");\n\t}", "public void test553414() throws Exception\n {\n executeTidyTest(\"553414.html\");\n assertLogContains(\"given is \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\n assertLogContains(\"looks like XHTML 1.0 Transitional\");\n assertWarnings(1);\n }", "Map<String, String> styles(String group);", "public DTMDOMException(short code) {\n/* 49 */ super(code, \"\");\n/* */ }", "protected boolean isFreeStyle(){\r\n\t\treturn false;\r\n\t}", "public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}", "@Test(expected = SDLParseException.class)\n public final void testBadHead1 () throws IOException {\n \tparser.load(makeReader (\":This::= 'lol';\"));\n }" ]
[ "0.5973912", "0.5794228", "0.57078785", "0.5615098", "0.5370872", "0.5340339", "0.5335011", "0.531088", "0.52385175", "0.5234265", "0.521601", "0.5170423", "0.5143826", "0.5118981", "0.51159275", "0.51103413", "0.507524", "0.497901", "0.49647295", "0.4944563", "0.49213776", "0.49104887", "0.49067795", "0.4903879", "0.4892505", "0.48820668", "0.4869646", "0.48574498", "0.4856679", "0.48387995", "0.4830736", "0.47953108", "0.47876063", "0.4778855", "0.47359392", "0.47250676", "0.4722885", "0.47036874", "0.4699784", "0.46818987", "0.46768257", "0.46750134", "0.46660173", "0.46501756", "0.46404037", "0.4632461", "0.46098796", "0.4600562", "0.4590831", "0.45814452", "0.45706865", "0.4570184", "0.45691642", "0.4551324", "0.45510754", "0.4546093", "0.45459974", "0.45394954", "0.45378143", "0.4533149", "0.4530778", "0.45294562", "0.45281807", "0.4525622", "0.45116258", "0.45062453", "0.45041132", "0.44948763", "0.4487992", "0.448139", "0.44769615", "0.44750422", "0.44747594", "0.4471574", "0.44705585", "0.44650692", "0.4464735", "0.4463905", "0.44588658", "0.44562367", "0.44519663", "0.44474015", "0.44423115", "0.44422275", "0.4438584", "0.4429831", "0.4429681", "0.44220313", "0.44196078", "0.44128355", "0.4403459", "0.4395445", "0.4393065", "0.43908694", "0.4386018", "0.437947", "0.43737462", "0.43711227", "0.43699938", "0.43659517" ]
0.5003789
17
TODO Autogenerated method stub
@Override public void run() { MimeMessage msg=javaMailSender.createMimeMessage(); MimeMessageHelper helper=null; try { helper = new MimeMessageHelper(msg,true,"utf-8"); } catch (MessagingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { helper.setTo(to); helper.setSubject(subject); helper.setText(text,true); helper.setFrom(getFromAddress()); } catch (MessagingException e) { // TODO Auto-generated catch block e.printStackTrace(); } javaMailSender.send(msg); System.out.println("send ---------"); }
{ "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
Communication abstraction for writing data stream
public interface WriteOnlyChannel { /** * Write message packet * @param data message packet * @return True if success ele False */ boolean write(byte[] data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void writeToStream(DataOutputStream dataOutputStream);", "public abstract void write(DataOutput out) throws IOException;", "public abstract void writeData(DataOutput dout) throws IOException;", "public interface StreamReceiver{\r\n\t/**\r\n\t * Writes an array of bytes to the object holding one end of the pipe.\r\n\t * \r\n\t * @param b The byte array to be written.\r\n\t */\r\n\tpublic abstract void write(byte[] b);\r\n\t\r\n}", "public abstract void writeToStream(java.io.DataOutputStream output) throws java.io.IOException;", "@Override\n public void stream(T data) {\n channel.write(new DataMessage<>(data));\n }", "protected abstract void _write(DataOutput output) throws IOException;", "void writeTo(DataSink dataSink) throws IOException;", "public abstract void write (DataOutputStream outStream)\r\n throws IOException;", "public abstract void serialize(DataOutputStream dataOutputStream) throws IOException;", "public interface ObjectOutput extends DataOutput, AutoCloseable {\n /**\n * Write an object to the underlying storage or stream. The class that implements this interface\n * defines how the object is written.\n *\n * @param obj the object to be written\n * @exception IOException Any of the usual Input/Output related exceptions.\n */\n public void writeObject(Object obj) throws IOException;\n\n /**\n * Writes a byte. This method will block until the byte is actually written.\n * \n * @param b the byte\n * @exception IOException If an I/O error has occurred.\n */\n public void write(int b) throws IOException;\n\n /**\n * Writes an array of bytes. This method will block until the bytes are actually written.\n * \n * @param b the data to be written\n * @exception IOException If an I/O error has occurred.\n */\n public void write(byte b[]) throws IOException;\n\n /**\n * Writes a sub array of bytes.\n * \n * @param b the data to be written\n * @param off the start offset in the data\n * @param len the number of bytes that are written\n * @exception IOException If an I/O error has occurred.\n */\n public void write(byte b[], int off, int len) throws IOException;\n\n /**\n * Flushes the stream. This will write any buffered output bytes.\n * \n * @exception IOException If an I/O error has occurred.\n */\n public void flush() throws IOException;\n\n /**\n * Closes the stream. This method must be called to release any resources associated with the\n * stream.\n * \n * @exception IOException If an I/O error has occurred.\n */\n public void close() throws IOException;\n}", "public interface Writable {\n void readData(DataInput input) throws IOException;\n void writeData(DataOutput output) throws IOException;\n}", "public interface DataWriter {\n\n\t/**\n\t * Prepare the data writer\n\t * \n\t * @param fields\n\t * the field names\n\t * @throws TransportException\n\t * if fields are invalid\n\t */\n\tvoid prepare(List<String> fields) throws TransportException;\n\n\t/**\n\t * Write the specified values\n\t * \n\t * @param values\n\t * the values to write\n\t * @throws TransportException\n\t * if writing fails\n\t */\n\tvoid write(List<Object> values) throws TransportException;\n\n\t/**\n\t * Commit the data\n\t * \n\t * @throws TransportException\n\t * if commit fails\n\t */\n\tvoid commit() throws TransportException;\n\n}", "public interface ByteVectorIO {\n public void send(byte[] b) throws IOException;\n\n public byte[] get() throws IOException;\n\n public void close();\n}", "public void onEncodeSerialData(StreamWriter streamWriter) {\n }", "public void write(DataOutputStream out) throws IOException;", "public interface DataWriter extends DataAdapter {\n\n /**\n * add an item to the list of pending work to be written.\n *\n * @param record DataRecord to add\n */\n void addItem(DataRecord record);\n\n /**\n * flush the list of work to be written\n */\n void flushBatch();\n\n /**\n * called by the system just prior to a normal shutdown.\n */\n void finish();\n\n\n}", "@Override\n public void write() {\n\n }", "public interface IDataIO<RESULT, DATA>\n{\n\t/**\n\t * @param data\n\t * Input data.\n\t * @return Output value.\n\t */\n\tpublic DATA write(RESULT data);\n\n\t/**\n\t * @param data\n\t * Input data.\n\t * @return Output value.\n\t */\n\tpublic RESULT read(DATA data);\n}", "public interface IOStreamConnectorListener extends EventListener {\n /**\n * Implement to be informed when data is sent from the <code>InputStream</code>\n * to the <code>OutputStream</code>\n *\n * @param data the data sent\n * @param count the number of bytes in <code>data</code> that were sent\n */\n public void data(byte[] data, int count);\n}", "void write();", "public interface OSMEntitySink {\n\n public void writeBegin() throws IOException;\n\n public void writeNode(long id, Node node) throws IOException; // TODO rename id parameters to nodeId, wayId, relationId throughout\n\n public void writeWay(long id, Way way) throws IOException;\n\n public void writeRelation(long id, Relation relation) throws IOException;\n\n public void writeEnd() throws IOException;\n\n}", "@Override\n\tpublic void send(OutputStream stream) throws IOException {\n\t\tstream.write(this.data);\n\t}", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "void writeTo(DataSink dataSink, boolean overWrite) throws IOException;", "public abstract void write(NetOutput out) throws IOException;", "private void write( byte[] data) throws IOException {\n ByteBuffer buffer = ByteBuffer.wrap(data);\n\n int write = 0;\n // Keep trying to write until buffer is empty\n while(buffer.hasRemaining() && write != -1)\n {\n write = channel.write(buffer);\n }\n\n checkIfClosed(write); // check for error\n\n if(ProjectProperties.DEBUG_FULL){\n System.out.println(\"Data size: \" + data.length);\n }\n\n key.interestOps(SelectionKey.OP_READ);// make key read for reading again\n\n }", "public interface WritableObject {\n\n\t/** Write this object to the specified {@link DataTransferOutput} stream.\n\t * @param outputStream the data output stream to write the data to\n\t * @throws IOException if there is an error writing data to the output stream\n\t */\n\tpublic void writeData(DataTransferOutput outputStream) throws IOException;\n\n}", "private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }", "public interface Sink {\r\n\t\r\n\t/**\r\n\t * Check if the sink is still active\r\n\t * @return\r\n\t */\r\n\tboolean isActive();\r\n\t\r\n\t/**\r\n\t * Set the error flag\r\n\t */\r\n\tvoid setError();\r\n\t\r\n\t/**\r\n\t * Check if the sink has been object of an error\r\n\t * @return true if an error happened to the sink\r\n\t */\r\n\tboolean isError();\r\n\t\r\n\t/**\r\n\t * Write data to the sink.\r\n\t * @param data Byte array containing the data to write\r\n\t * @param offset Offset at which the data begins\r\n\t * @param length Length of the data\r\n\t * @param time Current time in milliseconds (begin at Unix Epoch).\r\n\t * @return \r\n\t */\r\n\tboolean write(byte[] data, int offset, int length, long time);\r\n\t\r\n\t/**\r\n\t * Close the sink and the underlaying stream (if any).\r\n\t * @throws IOException\r\n\t */\r\n\tvoid close();\r\n\t\r\n}", "OutputStream getOutputStream();", "public void write(DataOutput dataOutput) throws IOException {\n }", "public interface WriteResource {\r\n \r\n static String path = \"write\";\r\n \r\n /**\r\n * Send the point to the server using the line-protocol format\r\n * \r\n * @param point the point to be sent\r\n * \r\n * @throws InfluxDbApiNotFoundException\r\n * resource or database not found\r\n * @throws InfluxDbApiBadrequestException\r\n * request unacceptable, not understood.\r\n */\r\n void write(Point point) throws InfluxDbApiNotFoundException, InfluxDbApiBadrequestException, InfluxDbTransportException;\r\n \r\n /**\r\n * Send the batch to the server using the line-protocol format\r\n * \r\n * @param batch the batch to be sent\r\n * \r\n * @throws InfluxDbApiNotFoundException\r\n * resource or database not found\r\n * @throws InfluxDbApiBadrequestException\r\n * request unacceptable, not understood.\r\n */\r\n void write(Batch batch) throws InfluxDbApiNotFoundException, InfluxDbApiBadrequestException, InfluxDbTransportException;\r\n\r\n /**\r\n * Free linked resources\r\n * \r\n */\r\n void close();\r\n}", "@Override\n public void write(Data dataPacket) throws IOException {\n }", "protected OutputStream _createDataOutputWrapper(DataOutput out)\n/* */ {\n/* 1520 */ return new DataOutputAsStream(out);\n/* */ }", "public interface NetObjectWriter {\n\n boolean put(Object o);\n\n void put(final Object data, final long delay);\n\n}", "protected void write(byte[] bytes, int offset, int length) {\n/* 114 */ if (this.socket == null) {\n/* 115 */ if (this.connector != null && !this.immediateFail) {\n/* 116 */ this.connector.latch();\n/* */ }\n/* 118 */ if (this.socket == null) {\n/* 119 */ String msg = \"Error writing to \" + getName() + \" socket not available\";\n/* 120 */ throw new AppenderLoggingException(msg);\n/* */ } \n/* */ } \n/* 123 */ synchronized (this) {\n/* */ try {\n/* 125 */ getOutputStream().write(bytes, offset, length);\n/* 126 */ } catch (IOException ex) {\n/* 127 */ if (this.retry && this.connector == null) {\n/* 128 */ this.connector = new Reconnector(this);\n/* 129 */ this.connector.setDaemon(true);\n/* 130 */ this.connector.setPriority(1);\n/* 131 */ this.connector.start();\n/* */ } \n/* 133 */ String msg = \"Error writing to \" + getName();\n/* 134 */ throw new AppenderLoggingException(msg, ex);\n/* */ } \n/* */ } \n/* */ }", "public void writePacket(DataOutputStream dataOutputStream) throws IOException;", "public abstract void write(T dataElement);", "public void writeTo(OutputStream os) throws IOException, MessagingException {\n/* 96 */ LineOutputStream los = null;\n/* 97 */ if (os instanceof LineOutputStream) {\n/* 98 */ los = (LineOutputStream)os;\n/* */ } else {\n/* 100 */ los = new LineOutputStream(os);\n/* */ } \n/* */ \n/* */ \n/* 104 */ Enumeration hdrLines = getAllHeaderLines();\n/* 105 */ while (hdrLines.hasMoreElements()) {\n/* 106 */ los.writeln(hdrLines.nextElement());\n/* */ }\n/* */ \n/* 109 */ los.writeln();\n/* */ \n/* */ \n/* 112 */ getDataHandler().writeTo(os);\n/* 113 */ os.flush();\n/* */ }", "public DataOutputStream openDataOutputStream() throws IOException {\n\n\tthrow new IllegalArgumentException(\"Not supported\");\n }", "DataStreamApi getDataStreamApi();", "public void write(byte[] buffer);", "public abstract int writeData(int address, byte[] buffer, int length);", "@Override\n public int writeData(OutputStream out, T data) throws Exception\n {\n OutputStreamWriter w = new OutputStreamWriter(out, \"UTF-8\");\n w.write(_serializer.deepSerialize(data));\n w.close();\n return -1;\n }", "void write(StreamOption streamOpt);", "public interface Writer {\n void write(Call call);\n}", "@Override\n\tprotected void setData(DataStream dataStream) throws IOException {\n\t\t\n\t}", "@Override\n public void write(byte[] buf) throws IOException;", "public interface IStreamConnector extends IConnector {\r\n\r\n\t/** \r\n\t * Returns an input stream that can be used to receive data. This\r\n\t * method should only be called once per connector, although a connector can\r\n\t * declare that it supports multiple calls to this method. The specific type\r\n\t * returned by this method can be queries using the get type method. \r\n\t * \r\n\t * @return An input stream that can be used to receive data. \r\n\t * @throws IOException Thrown if the connector cannot open an input stream.\r\n\t */\r\n\tpublic InputStream getInputStream() throws IOException;\r\n\t\r\n\t/**\r\n\t * Returns an output stream that can be used to transfer data. Be\r\n\t * aware that this method should only be called once per connector. The \r\n\t * specific type returned by this method is defined by the get type method.\r\n\t * \r\n\t * @return An output stream that can be used to transfer data.\r\n\t * @throws IOException Thrown if the connector cannot open an output stream.\r\n\t */\r\n\tpublic OutputStream getOutputStream() throws IOException;\r\n\t\r\n}", "public interface _Socket {\n boolean isConnected();\n ByteBuffer getData() throws IOException;\n void sendData(ByteBuffer byteBuffer) throws IOException;\n void close() throws IOException;\n\n}", "public void processConnection(DataInputStream dis, DataOutputStream dos);", "public void writeSysCall() {\n clientChannel.write(writeBuffer, this, writeCompletionHandler);\n }", "protected abstract void sendInternal(ByteBuffer outputBuffer) throws IOException;", "@Override\n\tpublic void write(OutStream outStream) {\n\t}", "@Override\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "@Override\n\tpublic void writeTo(OutputStream outstream) throws IOException {\n\t\tsuper.writeTo(new WrapperOutputStream(outstream, this.listener));\n\t}", "void notifyWrite();", "int writeTo(byte[] iStream, int pos, ORecordVersion version);", "public abstract void write(byte[] b);", "Write createWrite();", "public abstract void write(O value) throws IOException;", "DataStreams createDataStreams();", "public void streamWrite(byte[] buffer,int bufferOffset,int nrOfBytes) throws VlException\n {\n if (this instanceof VStreamWritable)\n {\n VStreamWritable wfile = (VStreamWritable) (this);\n OutputStream ostr = wfile.getOutputStream(); // do not append\n\n try\n {\n ostr.write(buffer, bufferOffset, nrOfBytes);\n ostr.flush(); \n ostr.close(); // Close between actions !\n }\n catch (IOException e)\n {\n throw new VlIOException(\"Failed to write to file:\" + this, e);\n }\n }\n else\n {\n throw new nl.uva.vlet.exception.NotImplementedException(\"File type does not support (remote) write access\");\n }\n }", "OutputStream getOutputStream() throws IOException;", "private void sendData(String message) {\n\t\t\ttry {\n\t\t\t\toutput.writeObject(message);\n\t\t\t\toutput.flush(); // flush output to client\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"\\nError writing object\");\n\t\t\t}\n\t\t}", "public abstract Pipe deliver( Pipe sink );", "@Override\n public void write(final byte[] data) throws IOException {\n write(data, 0, data.length);\n }", "private void writeData(String data) {\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n }\n\n String message = data;\n byte[] msgBuffer = message.getBytes();\n\n try {\n outStream.write(msgBuffer);\n } catch (IOException e) {\n }\n }", "public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n\n // Share the sent message with the UI activity.\n /*Message writtenMsg = handler.obtainMessage(\n MessageConstants.MESSAGE_WRITE, -1, -1, mmBuffer);\n writtenMsg.sendToTarget();*/\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when sending data\", e);\n\n // Send a failure message back to the activity.\n /*Message writeErrorMsg =\n handler.obtainMessage(MessageConstants.MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(\"toast\",\n \"Couldn't send data to the other device\");\n writeErrorMsg.setData(bundle);\n handler.sendMessage(writeErrorMsg);*/\n }\n }", "void onBytesWritten(int bytesWritten);", "protected abstract void write (Object val);", "public void writeObject ();", "public interface Output {\n\n void putString(String string);\n\n // Basic Data Types\n /**\n * Write number\n *\n * @param num\n * Number\n */\n void writeNumber(Number num);\n\n /**\n * Write boolean\n *\n * @param bol\n * Boolean\n */\n void writeBoolean(Boolean bol);\n\n /**\n * Write string\n *\n * @param string\n * String\n */\n void writeString(String string);\n\n /**\n * Write date\n *\n * @param date\n * Date\n */\n void writeDate(Date date);\n\n void writeNull();\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Collection<?> array);\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object[] array);\n\n /**\n * Write primitive array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object array);\n\n /**\n * Write map.\n *\n * @param map\n * Map to write\n */\n void writeMap(Map<Object, Object> map);\n\n /**\n * Write array as map.\n *\n * @param array\n * Array to write\n */\n void writeMap(Collection<?> array);\n\n /**\n * Write object.\n *\n * @param object\n * Object to write\n */\n void writeObject(Object object);\n\n /**\n * Write map as object.\n *\n * @param map\n * Map to write\n */\n void writeObject(Map<Object, Object> map);\n\n /**\n * Write recordset.\n *\n * @param recordset\n * Recordset to write\n */\n void writeRecordSet(RecordSet recordset);\n\n /**\n * Write XML object\n *\n * @param xml\n * XML document\n */\n void writeXML(Document xml);\n\n /**\n * Write ByteArray object (AMF3 only).\n *\n * @param array\n * object to write\n */\n void writeByteArray(ByteArray array);\n\n /**\n * Write a Vector&lt;int&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorInt(Vector<Integer> vector);\n\n /**\n * Write a Vector&lt;uint&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorUInt(Vector<Long> vector);\n\n /**\n * Write a Vector&lt;Number&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorNumber(Vector<Double> vector);\n\n /**\n * Write a Vector&lt;Object&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorObject(Vector<Object> vector);\n\n /**\n * Write reference to complex data type\n *\n * @param obj\n * Referenced object\n */\n void writeReference(Object obj);\n\n /**\n * Whether object is custom\n *\n * @param custom\n * Object\n * @return true if object is of user type, false otherwise\n */\n boolean isCustom(Object custom);\n\n /**\n * Write custom (user) object\n *\n * @param custom\n * Custom data type object\n */\n void writeCustom(Object custom);\n\n /**\n * Clear references\n */\n void clearReferences();\n}", "public interface MyDestination {\n void write(String str);\n}", "public interface PortDataInterface {\n /**\n * 数据接收\n * @param bytes 接收到的数据\n */\n void onDataReveiced(byte[] bytes);\n\n}", "public abstract <T> SerializationStream writeObject(T t);", "public synchronized void write(String data){\n\t\tlog.debug(\"[SC] Writing \"+data, 4);\n\t\twriteBuffer.add(data.getBytes());\n\t}", "@Override\r\n public void write(byte[] buffer) throws IOException {\r\n inWrite1 = true;\r\n try {\r\n super.write(buffer);\r\n if (!inWrite3) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, buffer.length);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, buffer.length, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite1 = false;\r\n } catch (IOException e) {\r\n inWrite1 = false;\r\n throw e;\r\n }\r\n }", "@Override\r\n\tpublic void writeObject(Object obj) throws IOException {\n\t\t\r\n\t\tif (obj instanceof HandShake ) {\r\n\t\t\t((HandShake) obj).write(this);\r\n\t\t} else if (obj instanceof Message){\r\n\t\t\t((Message) obj).write(this);\r\n\t\t} else {\r\n\t\t\tthrow new UnsupportedOperationException(\" Message is not supported to write \");\r\n\t\t}\r\n\t}", "public abstract void stream(int port);", "@Override\n public void onWrite() {\n onChannelPreWrite();\n }", "public void writeTo(OutputStream arg0) throws IOException {\n\t\t\r\n\t}", "int writeTo(OutputStream out) throws IOException;", "@Override\n public void write(byte[] buf, int offset, int size) throws IOException;", "@InterfaceAudience.Private\npublic interface ByteBufferWriter {\n\n /**\n * Writes <code>len</code> bytes from the specified ByteBuffer starting at offset <code>off</code>\n * @param b the data.\n * @param off the start offset in the data.\n * @param len the number of bytes to write.\n * @exception IOException if an I/O error occurs.\n */\n void write(ByteBuffer b, int off, int len) throws IOException;\n\n /**\n * Writes an <code>int</code> to the underlying output stream as four bytes, high byte first.\n * @param i the <code>int</code> to write\n * @throws IOException if an I/O error occurs.\n */\n // This is pure performance oriented API been added here. It has nothing to do with\n // ByteBuffer and so not fully belong to here. This allows an int to be written at one go instead\n // of 4 (4 bytes one by one).\n // TODO remove it from here?\n void writeInt(int i) throws IOException;\n}", "public interface IPacketTransporter {\n\n DataInputStream getReceiveStream();\n\n DataOutputStream getSendStream();\n\n /**\n * Blocks until a packet is available. The packet identifier is returned, \n * and the packet is available for reading on the Receive stream.\n */\n int ReceivePacket();\n\n /**\n * Returns the oldest packet in the received packet queue.\n * If no packet is available this function immediately returns -1;\n * The packet identifier is returned, \n * and the packet is available for reading on the Receive stream.\n */\n int ReceiveAvailablePacket();\n\n /**\n * Sends a packet with given identifier. (non-blocking)\n * The data written to the SendStream since the last call to SendPacket is sent.\n */\n void SendPacket(int packetIdentifier);\n \n \n \n \n \n \n \n \n void onPacketReceived(int packetIdentifier, byte[] dgram, int offset, int length);\n \n \n \n}", "public void write(OutputStream arg0) throws IOException {\n\n\t}", "public synchronized void sendData(PrintWriter stream){\r\n\t\t\tstream.println(\"3\");\r\n\t\t\tstream.println(Integer.toString(x));\r\n\t\t\tstream.println(Integer.toString(y));\r\n\t\t\tstream.println(Integer.toString(health));\r\n\t\t\tstream.println(Integer.toString(level));\r\n\t\t}", "public void write(byte[] buffer) { //이건 보내주는거\n try {\n mmOutStream.write(buffer);\n\n // Disabled: Share the sent message back to the main thread\n mHandler.obtainMessage(MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); //MH주석풀엇음 //what arg1, arg2 obj\n\n } catch (IOException e) {\n Log.e(TAG, \"Exception during write\");\n }\n }", "@Override\n\tpublic void sendData(int type, byte[] data) {\n\t\t\n\t}", "protected abstract OutputStream getStream() throws IOException;", "public interface CommandHandler {\n void handleInput(String msg, DataInputStream input, DataOutputStream output);\n}", "public void write(WriteOnly data) {\n\t\tdata.writeData(\"new data\"); // Ok\n\t}", "native int _writeSerialPort(int port, byte data[]);", "@Override\n public void writeTo(DataOutput dout) throws IOException {\n\n if (!isHeadless()) {\n dout.writeShort(getTransactionID());\n dout.writeShort(getProtocolID());\n dout.writeShort(getDataLength());\n }\n dout.writeByte(getUnitID());\n dout.writeByte(getFunctionCode());\n writeData(dout);\n }", "SocketWriter newSocketWriter(SocketConnection connection);", "public void sendData(IoBuffer outData) {\n\t\ttry {\n\t\t\tsession.write(outData);\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract interface WriteCallback\n{\n\tpublic abstract void onSuccess();\n\n\tpublic abstract void onError();\n}", "void assignDataReceived(Serializable dataReceived);" ]
[ "0.7459129", "0.73183465", "0.725648", "0.72015345", "0.71079195", "0.709727", "0.7057771", "0.6996505", "0.69439685", "0.6677554", "0.6668438", "0.6651484", "0.6611916", "0.6567557", "0.6566653", "0.65660733", "0.65152276", "0.6512818", "0.65064543", "0.6498987", "0.64874357", "0.64716345", "0.64695966", "0.64463925", "0.64383715", "0.6424484", "0.6411866", "0.6369284", "0.6345483", "0.63304615", "0.62939155", "0.62820476", "0.62455326", "0.6233051", "0.61961275", "0.61940825", "0.61690164", "0.6154455", "0.61470634", "0.61323774", "0.6131212", "0.61283314", "0.6125687", "0.6103158", "0.61014247", "0.6083229", "0.607839", "0.6076915", "0.6073361", "0.60719603", "0.6063238", "0.60446244", "0.6040305", "0.60329205", "0.6024803", "0.60179186", "0.6015714", "0.6012924", "0.59950095", "0.59814817", "0.5981016", "0.59690785", "0.5957959", "0.5947051", "0.59355164", "0.5923352", "0.5921824", "0.59153783", "0.5910599", "0.5909402", "0.59044987", "0.5900641", "0.5893504", "0.58772117", "0.5876911", "0.5876091", "0.58585507", "0.58578277", "0.5856452", "0.58562475", "0.5854104", "0.5853354", "0.5847201", "0.58295244", "0.5823743", "0.5823685", "0.581624", "0.5811349", "0.5810507", "0.5809882", "0.5804257", "0.58022314", "0.5795559", "0.57865703", "0.57830244", "0.5779493", "0.57734734", "0.577318", "0.57716715", "0.57716596" ]
0.70096153
7
Destination if super peer network is complete graph
int getNextHopPort(Message next) { if (next instanceof ExchangeMessage) { Exchange destinationExchange = ((ExchangeMessage)next).getDestination(); return getExchangeNextPort(destinationExchange); } else { Continent destinationContinent = ((SuperPeerMessage) next).getDestination(); if (destinationContinent == null) { System.out.println("no destination?"); next.print(); } return getContinentNextPort(destinationContinent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDestination();", "boolean hasDestination();", "public boolean hasDestination() {\n return result.hasDestination();\n }", "public boolean get_destination() {\r\n return (final_destination);\r\n }", "public boolean hasDestination() {\n return destination_ != null;\n }", "public boolean aPourDestination(Sommet un_sommet) {\n return (destination == un_sommet);\n }", "@Override\r\n public boolean isConnected(V start, V destination) {\r\n return !shortestPath(start, destination).isEmpty();\r\n }", "public boolean hasDestination() {\n return destinationBuilder_ != null || destination_ != null;\n }", "boolean hasRouteDest();", "public boolean isDestination(Node node)\r\n {\r\n if(node == End)\r\n return true;\r\n else \r\n return false;\r\n }", "private boolean finalDestination(OverlayNodeSendsData event) {\n\t\tif (event.getDestID() == myAssignedID)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}", "private boolean hasPath(GraphNode origin, GraphNode destination) {\n if (origin.node.getName().equals(outputNode.getName()) || destination.node.getName().equals(inputNode.getName()))\n return false;\n\n Queue<GraphNode> queue = new LinkedList<GraphNode>();\n queue.offer(origin);\n\n while(!queue.isEmpty()) {\n GraphNode current = queue.poll();\n if (current == destination) {\n return true;\n }\n else {\n for (GraphEdge e : current.to) {\n queue.offer(e.to);\n }\n }\n }\n return false;\n }", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public Vertex getDestination() {\n return destination;\n }", "public Node getDestination() {\n return this.destination;\n }", "private boolean isReachable(String current, String destination) {\n if (current.equals(destination)) {\n return true;\n } else if (visited.contains(current) || graph.get(current) == null) {\n return false;\n }\n\n // similar to dfs\n visited.add(current);\n for (Object vertex : graph.get(current)) {\n if (isReachable((String) vertex, destination))\n return true;\n }\n\n return false;\n }", "public boolean isFinalDestination(String destinationIp) {\n for (Neighbour neighbour : interfaces) {\n if (destinationIp.equals(neighbour.getAddress())) {\n return true;\n }\n }\n return false;\n }", "@Override\r\n\tpublic boolean connect(VertexInterface<T> endVertex) {\n\t\treturn false;\r\n\t}", "public void findDestination() {\n\t\t\n\t}", "public boolean hasRouteDest() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }", "public Object getDestination() {\n/* 339 */ return this.peer.getTarget();\n/* */ }", "public V getDestination() {\r\n\r\n\t\tV result = null;\r\n\t\tif ((counter <= links.size()) && (counter > 0)) {\r\n\t\t\tresult = succNodes.get(counter - 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "Destination getDestination();", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "public boolean isDirected();", "public boolean isDirected();", "public boolean hasRouteDest() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }", "boolean isDirected();", "public void tunnel() {\r\n\t\tboolean status = true;\r\n\t\tfor (CellStorage i : node) {\r\n\t\t\tif (i.getCell().tunnelTo != null) {\r\n\t\t\t\tCellStorage tunnelTo = null;\r\n\t\t\t\t// Searching for destinated node from the tunnel\r\n\t\t\t\tfor (int k = 0; k < node.size(); k++) {\r\n\t\t\t\t\tif (node.get(k).getCell() == i.getCell().tunnelTo) {\r\n\t\t\t\t\t\ttunnelTo = node.get(k);\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\ti.setTunnel(tunnelTo);\r\n\r\n\t\t\t\t// Calling validateConnection method to make sure that no duplicated connection\r\n\t\t\t\t// is made.\r\n\t\t\t\t// Create new connection if no duplicate.\r\n\r\n\t\t\t\tstatus = validateConnection(i, tunnelTo);\r\n\t\t\t\tif (status == false) {\r\n\t\t\t\t\tHashMapConnectedNodes tunnelSet = new HashMapConnectedNodes();\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(i.getIndex(), i);\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(tunnelTo.getIndex(), tunnelTo);\r\n\t\t\t\t\thshMConnectedNodes.add(tunnelSet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "T getDestination(T nodeOrigin, F flow);", "public Town getDestination() {\r\n\t\treturn this.destination;\r\n\t}", "public Optional<Boolean> isDestinationPositionAfter();", "public boolean is_set_destPellet() {\n return this.destPellet != null;\n }", "public void makeDestinationRequest() {\n this._hasDestinationRequests = true;\n }", "public boolean hasAvailableConnections(Router current){\n boolean destinationAvailable = false;\n for (Connection c : current.getConnections()){\n //if there is a router that has not been visited\n if (c.getDestination().getVisit() == false){\n destinationAvailable = true;\n }\n }\n return destinationAvailable;\n }", "public void updateDestination(){\r\n\t\tdestination.update_pc_arrivalFlows(flows);\r\n\t}", "@java.lang.Override\n public boolean hasNetwork() {\n return stepInfoCase_ == 17;\n }", "public String getDestination() {\r\n return this.destination;\r\n }", "int getDestination();", "private NetworkProfile getFinalDestination(NetworkProfile dst) {\n NetworkProfile fdst = null;\n// if (dst.isNameProfile()) {\n// //라우팅 스토어에서 검색\n// fdst = dst;\n// } else {\n fdst = dst;\n// }\n return fdst;\n }", "@java.lang.Override\n public boolean hasNetwork() {\n return stepInfoCase_ == 17;\n }", "public static void connectNetwork(int src, int dest, boolean printPath)\r\n\t{\r\n\t\tint v = routers;\r\n\t\t\r\n\t\tint parent[] = new int[v];//parent node array\r\n\t\tint dist[] = new int[v];// distance array\r\n\t\tboolean visited[] = new boolean[v];// visited will be either true or false\r\n\t\t\r\n\t\t// initialize parent, distance arrays\r\n\t\tfor (int i = 0; i < v; i++ ) { \r\n\t\t\tvisited[i] = false;\r\n\t\t\tparent[i] = -1;\r\n\t\t\tdist[i] = Integer.MAX_VALUE;\r\n\t\t}\r\n\t\t\r\n\t\t// initialize the source distance as zero\r\n\t\tdist[src] = 0;\r\n\t\t\r\n\t\t// get minimum edge from the unvisited nodes\r\n\t\tfor (int count = 0; count < v-1; count++) { // loop for all v nodes\r\n\t\t\t\r\n\t\t\tint start = -1;\r\n\t\t\tint min = Integer.MAX_VALUE;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\tif (visited[i] == false && dist[i] < min) {\r\n\t\t\t\t\tmin = dist[i];\r\n\t\t\t\t\tstart = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// minimum distance is computed for all connected edges\r\n\t\t\tif (start == -1) \r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t// update the current node as visited\r\n\t\t\tvisited[start] = true;\r\n\t\t\t\r\n\t\t\t// update all adjacent nodes' distance array\r\n\t\t\tfor (int end = 0; end < v; end++) {\r\n\t\t\t\tif ((visited[end] != true) && (graph[start][end] != -1) &&\r\n\t\t\t\t\t\t(dist[start] != Integer.MAX_VALUE) &&\r\n\t\t\t\t\t\t(dist[start] + graph[start][end] < dist[end])) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdist[end] = dist[start] + graph[start][end];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// start node is the parent node in BFS tree\r\n\t\t\t\t\tparent[end] = start;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tif (dest != -1) {\r\n\t\t\t\r\n\t\t\t// Case#4: shortest path between source and destination nodes \r\n\t\t\tif (parent[dest] == -1) {\r\n\t\t\t\tSystem.out.println(\"There is no path from \" + (src+1) + \" to \" + (dest+1) + \" exists.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Shortest distance from \" + (src+1) + \" to \" + (dest+1) + \" is: \" + dist[dest]);\r\n\t\t\t\tSystem.out.print(\"Corresponding Shortest Path is: \");\r\n\t\t\t\tprintNodes(parent, parent[dest], src);\r\n\t\t\t\tSystem.out.println(dest+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n System.out.println(\"The Shortest Distance from node you entered, \"+ (src+1) + \" are\\n\");\r\n //Printing shortest path length\r\n\t\t\tSystem.out.println(\"Destination\\tDistance\\n========================\");\r\n for (int i = 0; i < v; i++) {\r\n System.out.println(\"\\t\"+ (i+1) + \"\\t \"+ dist[i]); // Printing the node number and distance\r\n }\r\n \r\n\t\t\tif (printPath == true) {\r\n\t\t\t\t\r\n\t\t\t\t// case#2: Print all shortest paths from source node\r\n\t\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\t\tif (i == src)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse if (parent[i] == -1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Shortest path from \" + (src+1) + \" to \" + (i+1) + \" doesn't exist.\");\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.print(\"Shortest Path from \" + (src+1) + \" to \" + (i+1) + \" is: \");\r\n\t\t\t\t\tprintNodes(parent, parent[i], src);\r\n\t\t\t\t\tSystem.out.println(i+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private void phaseOne(){\r\n\r\n\t\twhile (allNodes.size() < endSize){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//Pick a random node from allNodes\r\n\t\t\t\tint idx = random.nextInt(allNodes.size());\r\n\t\t\t\tNode node = allNodes.get(idx);\r\n\r\n\t\t\t\t//Get all relationships of node\t\t\t\t\r\n\t\t\t\tIterable<Relationship> ite = node.getRelationships(Direction.BOTH);\r\n\t\t\t\tList<Relationship> tempRels = new ArrayList<Relationship>();\r\n\r\n\t\t\t\t//Pick one of the relationships uniformly at random.\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\ttempRels.add(rel);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tidx = random.nextInt(tempRels.size());\r\n\t\t\t\tRelationship rel = tempRels.get(idx);\r\n\t\t\t\tNode neighbour = rel.getOtherNode(node);\r\n\r\n\t\t\t\t//Add the neighbour to allNodes\r\n\t\t\t\tif (!allNodes.contains(neighbour)){\r\n\t\t\t\t\tallNodes.add(neighbour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.success();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If reached here, then phase one completed successfully.\r\n\t\treturn;\r\n\t}", "@Override\r\n\tpublic boolean connect(VertexInterface<T> endVertex, double edgeWeight) {\n\t\treturn false;\r\n\t}", "private void transferLocal(Graph graph) {\n Set<NodePair> nonadjacencies = nonadjacencies(graph);\n for (Graph pag : input) {\n for (Edge edge : pag.getEdges()) {\n NodePair graphNodePair = new NodePair(graph.getNode(edge.getNode1().getName()), graph.getNode(edge.getNode2().getName()));\n if (nonadjacencies.contains(graphNodePair)) {\n continue;\n }\n if (!graph.isAdjacentTo(graphNodePair.getFirst(), graphNodePair.getSecond())) {\n graph.addEdge(new Edge(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint1(), edge.getEndpoint2()));\n continue;\n }\n Endpoint first = edge.getEndpoint1();\n Endpoint firstCurrent = graph.getEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst());\n if (!first.equals(Endpoint.CIRCLE)) {\n if ((first.equals(Endpoint.ARROW) && firstCurrent.equals(Endpoint.TAIL)) ||\n (first.equals(Endpoint.TAIL) && firstCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), edge.getEndpoint1());\n }\n }\n Endpoint second = edge.getEndpoint2();\n Endpoint secondCurrent = graph.getEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond());\n if (!second.equals(Endpoint.CIRCLE)) {\n if ((second.equals(Endpoint.ARROW) && secondCurrent.equals(Endpoint.TAIL)) ||\n (second.equals(Endpoint.TAIL) && secondCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint2());\n }\n }\n }\n for (Triple triple : pag.getUnderLines()) {\n Triple graphTriple = new Triple(graph.getNode(triple.getX().getName()), graph.getNode(triple.getY().getName()), graph.getNode(triple.getZ().getName()));\n if (graphTriple.alongPathIn(graph)) {\n graph.addUnderlineTriple(graphTriple.getX(), graphTriple.getY(), graphTriple.getZ());\n definiteNoncolliders.add(graphTriple);\n }\n }\n }\n }", "@Override\n protected InetAddress getIntendedDestination(CallPeerSipImpl peer)\n {\n return peer.getProtocolProvider()\n .getIntendedDestination(peer.getPeerAddress()).getAddress();\n }", "private void processDetect(String destinationIP) {\n WeightedGraph graph = WeightedGraph.createFromLSD(this.routerDesc, this.lsd);\n WeightedGraph.Vertex root = graph.getVertex(this.routerDesc.simulatedIPAddress);\n WeightedGraph.Vertex target = graph.getVertex(destinationIP);\n\n if(target == null) {\n LOG.info(\"No target found\");\n return;\n }\n\n graph.execute(root);\n\n List<WeightedGraph.Vertex> path = graph.getPath(target);\n if(path == null) {\n LOG.info(\"No path found\");\n } else {\n WeightedGraph.Vertex from = null;\n StringBuilder pathBuild = new StringBuilder();\n\n for(WeightedGraph.Vertex v : path) {\n if(from != null) {\n WeightedGraph.Edge e = graph.getEdge(from, v);\n pathBuild.append(\" ->(\").append(e.cost).append(\") \");\n }\n\n pathBuild.append(v.value + \" \");\n from = v;\n }\n\n LOG.info(pathBuild.toString());\n }\n }", "@Override\r\n protected boolean isGoal(Point node) {\r\n return (node.equals(finish));\r\n }", "public boolean isDestinationValid() {\n return destValid;\n }", "public String getDestination() {\r\n return destination;\r\n }", "public String getDestination() {\n return this.destination;\n }", "public String getDestination() {\r\n\t\treturn this.destination;\r\n\t}", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "public void connector(String start, String finish){\r\n\t \tclearVisited();\r\n\t \tboolean found = false;\r\n\t \tQueue<Vertex> vertexList = new LinkedList<Vertex>();\r\n\t \tvertexList.add(myGraph[getId(start)]);\r\n\t \tmyGraph[getId(start)].visited = true;\r\n\t \twhile (!vertexList.isEmpty() && !found) {\t\r\n\t\t\tVertex current = vertexList.remove();\r\n\t\t\tAdjVertex friend = current.adjVertexHead;\r\n\t\t\twhile(friend.next != null && !found){\t\r\n\t\t\t\t\tif (!friend.visited) {\t //if we have not visted this, make it visited and add it to the queue\r\n\t\t\t\t\t\tfriend.visited = true;\t\r\n\t\t\t\t\t\tvertexList.add(myGraph[getId(friend.name)]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(friend.name.compareToIgnoreCase(finish) == 0){ //if we found what we want, backtrack the path\r\n\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\tbackTrack(start, friend, current);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfriend = friend.next;\r\n\t\t\t}\t\r\n\t \t}\r\n\t \tif(!found){\r\n\t \t\tSystem.out.println(\"There is no connection between \" +start+ \" and \" +finish);\r\n\t \t\tSystem.out.println();\r\n\t \t}\r\n\t}", "public boolean percolates() {\n return uf.connected(source, sink);\n }", "public void checkHostGraphAndNextStep() {\r\n\t\tif (this.hostGraph != null) {\r\n\t\t\tthis.stepPanel.setStep(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tthis.gragraNames.setSelectedIndex(-1);\r\n\t\t}\r\n\t}", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "private void source_to_dest_path(int source, int dest, int[] forward_dist_tab, int[] list_Prevoius_Node, ArrayList<Integer> del_router)\n\t{\n\t\tif(del_router != null && del_router.contains(dest))\n\t\t\tSystem.out.println(\"Router \"+ (dest+1) +\" is deleted\");\n\t\telse if(del_router != null && del_router.contains(source))\n\t\t\tSystem.out.println(\"Router \"+ (source+1) +\" is deleted\");\n\t\telse\n\t\t{\n\t\t\tint[] prevNodes_List = list_Prevoius_Node;\n\t\t\tint k = dest;\n\t\t\tString path = \"\" + (dest+1);\n\t\t\t\n\t\t\t//Check if node is reachable that if it is connected in the graph then only proceed further\n\t\t\tif(forward_dist_tab[dest] != INFINITE_DIST)\n\t\t\t{\n\t\t\t\twhile(prevNodes_List[k] != source)\n\t\t\t\t{\n\t\t\t\t\tpath += \" >- \" + (prevNodes_List[k] + 1);\n\t\t\t\t\tk = prevNodes_List[k];\n\t\t\t\t}\n\t\t\t\t//for source node\n\t\t\t\tpath += \" >- \" + (source+1);\n\t\t\t\t\n\t\t\t\t//Back traversal is done using the previous node list\n\t\t\t\tString disp_path= new StringBuilder(path).reverse().toString();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nShortest distance from \"+ (source+1) +\" to \"+ (dest+1) +\":\");\n\t\t\t\tSystem.out.println(\"PATH: \"+ disp_path);\n\t\t\t\tSystem.out.println(\"COST: \" + forward_dist_tab[dest]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\nRouter \"+ (dest+1) +\" is dead or unreachable.\");\n\t\t\t}\n\t\t}\n\t}", "public List<Node> getShortestPathToDestination(Node destination) {\n List<Node> path = new ArrayList<Node>();\n\n\n\n for (Node node = destination; node != null; node = node.previous){\n Log.i(\"bbb\", \"get path \"+node._waypointName);\n path.add(node);\n }\n\n // reverse path to get correct order\n Collections.reverse(path);\n return path;\n }", "public String getDestination() {\r\n\t\treturn destination;\r\n\t}", "public static boolean getOnePathToARGState1(ARGState pLastElement, ARGState destination) {\n Set<ARGState> seenElements = new HashSet<ARGState>();\n\n // each element of the path consists of the abstract state and the outgoing\n // edge to its successor\n\n ARGState currentARGState = pLastElement;\n // add the error node and its -first- outgoing edge\n // that edge is not important so we pick the first even\n // if there are more outgoing edges\n\n\n\n seenElements.add(currentARGState);\n\n while (!currentARGState.getParents().isEmpty() && currentARGState.getStateId() != destination.getStateId()) {\n Iterator<ARGState> parents = currentARGState.getParents().iterator();\n\n ARGState parentElement = parents.next();\n //System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n while (!seenElements.add(parentElement) && parents.hasNext()) {\n // while seenElements already contained parentElement, try next parent\n parentElement = parents.next();\n // System.out.println(currentARGState.getStateId()+\":\"+parentElement);\n }\n\n currentARGState = parentElement;\n }\n if (currentARGState.getStateId() != destination.getStateId())\n return false;\n // System.out.println(\"跳出getOnePathTo\");\n return true;\n }", "public int getDestination() {\n\t\treturn finalDestination;\n\t}", "public String getDestination() {\n return destination;\n }", "@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public Sommet destination() {\n return destination;\n }", "boolean isAllOnDestination(){\n\n if(player.getCurrentX()-player.getDestinationX()!=0 || player.getCurrentY()-player.getDestinationY()!=0)\n return false;\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n if(item.getCurrentX()-item.getDestinationX()!=0 || item.getCurrentY()-item.getDestinationY()!=0)\n return false;\n }\n return true;\n }", "public Location getDestination() {\r\n return destination;\r\n }", "public boolean hasLanded ();", "@Test\n public void directedRouting_noUTurnAtVirtualEdge() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(3, 4).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(4, 5).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(5, 0).setDistance(1).set(speedEnc, 10, 0);\n NodeAccess na = graph.getNodeAccess();\n na.setNode(0, 1, 0);\n na.setNode(1, 1, 1);\n na.setNode(2, 1, 2);\n na.setNode(3, 0, 2);\n na.setNode(4, 0, 1);\n na.setNode(5, 0, 0);\n\n LocationIndexTree locationIndex = new LocationIndexTree(graph, graph.getDirectory());\n locationIndex.prepareIndex();\n Snap snap = locationIndex.findClosest(1.1, 0.5, EdgeFilter.ALL_EDGES);\n QueryGraph queryGraph = QueryGraph.create(graph, snap);\n\n assertEquals(Snap.Position.EDGE, snap.getSnappedPosition(), \"wanted to get EDGE\");\n assertEquals(6, snap.getClosestNode());\n\n // check what edges there are on the query graph directly, there should not be a direct connection from 1 to 0\n // anymore, but only the virtual edge from 1 to 6 (this is how the u-turn is prevented).\n assertEquals(new HashSet<>(Arrays.asList(0, 2)), GHUtility.getNeighbors(graph.createEdgeExplorer().setBaseNode(1)));\n assertEquals(new HashSet<>(Arrays.asList(6, 2)), GHUtility.getNeighbors(queryGraph.createEdgeExplorer().setBaseNode(1)));\n\n EdgeIteratorState virtualEdge = GHUtility.getEdge(queryGraph, 6, 1);\n int outEdge = virtualEdge.getEdge();\n EdgeToEdgeRoutingAlgorithm algo = createAlgo(queryGraph, weighting);\n Path path = algo.calcPath(6, 0, outEdge, ANY_EDGE);\n assertEquals(nodes(6, 1, 2, 3, 4, 5, 0), path.calcNodes());\n assertEquals(5 + virtualEdge.getDistance(), path.getDistance(), 1.e-3);\n }", "boolean isForwarding();", "public Location getDestination()\r\n\t{ return this.destination; }", "public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}", "public boolean percolates()\n {\n return uf.connected(topVirtualSite, bottomVirtualSite);\n }", "public boolean hasNextHop()\n {\n return getHopCount() < route.size()-1;\n }", "boolean hasRoute(Node to);", "@Test\n public void connectionNotFound() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 0);\n\n Path path = calcPath(0, 3, 0, 1);\n assertNotFound(path);\n }", "@Test\n public void notConnectedDueToRestrictions() {\n int sourceNorth = graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10).getEdge();\n int sourceSouth = graph.edge(0, 3).setDistance(2).set(speedEnc, 10, 10).getEdge();\n int targetNorth = graph.edge(1, 2).setDistance(3).set(speedEnc, 10, 10).getEdge();\n int targetSouth = graph.edge(3, 2).setDistance(4).set(speedEnc, 10, 10).getEdge();\n\n assertPath(calcPath(0, 2, sourceNorth, targetNorth), 0.4, 4, 400, nodes(0, 1, 2));\n assertNotFound(calcPath(0, 2, sourceNorth, targetSouth));\n assertNotFound(calcPath(0, 2, sourceSouth, targetNorth));\n assertPath(calcPath(0, 2, sourceSouth, targetSouth), 0.6, 6, 600, nodes(0, 3, 2));\n }", "public String getDestination() {\n\t\treturn destination;\n\t}", "public Location getDestination(){\n\t\treturn destination;\n\t}", "@EventHandler\n\tpublic void onTravelToNether(PlayerPortalEvent e) {\n\t\tPlayerTR trPlayer = TaskRun.getPlayer(e.getPlayer());\n\t\tif (e.getTo().getWorld().getEnvironment() == Environment.NETHER) {\n\t\t\ttrPlayer.completeTask(1);\n\t\t}\n\t}", "public boolean isBipartiteUndirectedGraph (){\r\n int[] vertices = new int[getNumV()];\r\n for (int i = 0; i < getNumV(); ++i)\r\n vertices[i] = -1;\r\n\r\n vertices[0] = 1;\r\n\r\n Stack <Integer> q = new Stack<Integer>();\r\n q.push(0);\r\n\r\n while (!q.isEmpty()) {\r\n int current = q.pop();\r\n Iterator<Edge> iter = edgeIterator(current);\r\n while (iter.hasNext()) {\r\n Edge edge = iter.next();\r\n int neighbor = edge.getDest();\r\n if (vertices[neighbor] == -1) {\r\n vertices[neighbor] = 1 - vertices[current];\r\n q.push(neighbor);\r\n }\r\n else if (vertices[neighbor] == vertices[current])\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean poolTransfer() {\n \t\treturn !isTransfering();\n \t}", "public int getDestination() {\r\n\t\treturn destination;\r\n\t}", "@Override\n\t\tpublic boolean isStopNode(TraversalPosition tp) {\n\t\t\t// System.out.println( \"\\nVisited nodes: \" + count++);\n\t\t\tStop currentStop = cache.get(tp.currentNode());\n\t\t\tif (currentStop.getStation().equals(dest)) {\n\t\t\t\treturn true;\n\t\t\t} else if ((currentStop.getTime() > stopTime))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "public abstract boolean SourceSinkSide( Communicator comm);", "boolean hasDestinationId();", "public java.lang.String getDestination()\n {\n return this._destination;\n }", "public boolean isNetwork() {\r\n \t\treturn (network != null);\r\n \t}", "@Override\n public Location getDestination() {\n return _destinationLocation != null ? _destinationLocation : getOrigin();\n }", "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "@Test\n public void tr1()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n assertFalse(graph.reachable(sources, targets));\n }", "private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public java.lang.String getDestination(){return this.destination;}", "DestinationGraph(final DatasetGraphTDB dsg, Node graphNode, boolean showProgress, boolean collectStats) {\n this.dsg = dsg;\n this.graphName = graphNode;\n this.collectStats = collectStats;\n // Choose NodeTupleTable.\n NodeTupleTable nodeTupleTable;\n if ( graphNode == null || Quad.isDefaultGraph(graphNode) )\n nodeTupleTable = dsg.getTripleTable().getNodeTupleTable();\n else {\n NodeTupleTable ntt = dsg.getQuadTable().getNodeTupleTable();\n nodeTupleTable = new NodeTupleTableView(ntt, graphName);\n }\n startedEmpty = dsg.isEmpty();\n monitor = createLoadMonitor(dsg, \"triples\", showProgress);\n loaderTriples = new LoaderNodeTupleTable(nodeTupleTable, \"triples\", monitor);\n this.prefixMap = dsg.prefixes();\n }", "private static boolean initializeDestination(DimLink link, DDProperties properties)\n \t{\n \t\tif (link.hasDestination())\n \t\t{\n \t\t\treturn true;\n \t\t}\n \n \t\t//Check the destination type and respond accordingly\n \t\t//FIXME: Add missing link types.\n \t\t//FIXME: Add code for restoring the destination-side door.\n \t\tswitch (link.linkType())\n \t\t{\n \t\t\tcase LinkTypes.DUNGEON:\n \t\t\t\treturn PocketBuilder.generateNewDungeonPocket(link, properties);\n \t\t\tcase LinkTypes.POCKET:\n \t\t\t\treturn PocketBuilder.generateNewPocket(link, properties);\n \t\t\tcase LinkTypes.NORMAL:\n \t\t\t\treturn true;\n \t\t\tdefault:\n \t\t\t\tthrow new IllegalArgumentException(\"link has an unrecognized link type.\");\n \t\t}\n \t}", "private boolean display_Forward_Table(int[][] matrixTopo ,int source, int[] forward_tab_dist, int[] list_Prevoius_Nodes, ArrayList<Integer> del_router) \n\t{\n\t\tint last_visited_prev = 0;\n\t\tboolean retVal = true;\n\t\t\n\t\t//If the router is deleted then don't check further. First check if it is not null otherwise exception\n\t\tif(del_router != null && del_router.contains(source))\n\t\t{\n\t\t\tSystem.out.println(\"Router \"+ (source+1) +\" is removed from topology\");\n\t\t\tretVal = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"\\nRouter \" + (source + 1) + \" Connection Table\");\n\t\t\tSystem.out.println(\"Destination\\tInterface\");\n\t\t\tSystem.out.println(\"===========================\");\n\t\t\t\n\t\t\tfor(int n=0; n<matrixTopo.length; n++)\n\t\t\t{\n\t\t\t\t//for source node just display '-' else find the previous node\n\t\t\t\tif(n == source)\n\t\t\t\t\tSystem.out.println((source + 1) + \"\\t\\t - \");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlast_visited_prev = n;\n\t\t\t\t\t//if it is source node or already previous node then exit else iterate to find the min dist node\n\t\t\t\t\twhile(!(list_Prevoius_Nodes[last_visited_prev] == last_visited_prev || list_Prevoius_Nodes[last_visited_prev] == source))\n\t\t\t\t\t{\n\t\t\t\t\t\tlast_visited_prev = list_Prevoius_Nodes[last_visited_prev]; //iterate till first previous node\n\t\t\t\t\t}\n\t\t\t\t\tif(forward_tab_dist[n] == INFINITE_DIST)\n\t\t\t\t\t\tSystem.out.println((n+1) + \"\\t\\t Router is Down or Unreachable\"); //when a node is disconnected to the graph or in case of deleted router\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println((n+1) + \"\\t\\t \" + (last_visited_prev + 1));\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//If router is deleted from the topology then return false indicating the same\n\t\treturn retVal;\n\t}", "private void checkFlowFromTo(\n NodeAdaptor source, NodeAdaptor target) {\n if (source.isChoreographyActivity() && target.isChoreographyActivity()) {\n Collection<NodeAdaptor> nodesWithoutParticipation =\n getFinalTasksWithoutParticipant(source,\n ((ChoreographyNodeAdaptor) target).getActiveParticipant());\n if (!nodesWithoutParticipation.isEmpty()) {\n validator.addMessage(\n \"initiatorOfChoreographyActivityNotParticipantInPriorActivity\",\n target, nodesWithoutParticipation);\n }\n }\n }", "private boolean addSuperNode(String sourceOrDestination, String[] sourceOrDestinationArray){\r\n boolean dsNotFound = false;\r\n Node superNode = new Node(sourceOrDestination, 0);\r\n for(int i = 0; i < sourceOrDestinationArray.length; i ++){\r\n //ds = find the node with the source/destination name\r\n Node ds = findNode(sourceOrDestinationArray[i]);\r\n //if destination and exists make edge from destination to \"superSink\"\r\n if(ds != null && sourceOrDestination.equals(\"superSink\")) {\r\n Edge newEdge = new Edge(ds, superNode, Integer.MAX_VALUE, 0);\r\n ds.addEdge(newEdge);\r\n }\r\n //if source and exists make edge from \"superSource\" to source\r\n else if(ds != null && sourceOrDestination.equals(\"superSource\")){\r\n Edge newEdge = new Edge(superNode, ds, Integer.MAX_VALUE, 0);\r\n superNode.addEdge(newEdge);\r\n }\r\n // either source or destination not found\r\n else {\r\n dsNotFound = true;\r\n }\r\n }\r\n //add new nodes at index 0;\r\n nodes.add(0, superNode);\r\n return dsNotFound;\r\n }", "public boolean teleport(Entity destination) {\n/* 571 */ return teleport(destination.getLocation());\n/* */ }", "@Test\n public void tr2()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(0,1);\n assertTrue(graph.reachable(sources, targets));\n\n\n }" ]
[ "0.68056655", "0.68056655", "0.67859805", "0.65452594", "0.64842176", "0.6359753", "0.6305807", "0.6258821", "0.62287104", "0.6188288", "0.6141103", "0.6010745", "0.6001916", "0.5970328", "0.5927852", "0.58891195", "0.58823013", "0.58717155", "0.58693045", "0.5844953", "0.5840085", "0.5825161", "0.58102477", "0.57948154", "0.578087", "0.578087", "0.5773467", "0.57452106", "0.5736477", "0.57304966", "0.56884277", "0.5676797", "0.56648684", "0.5653438", "0.564645", "0.563036", "0.5612608", "0.5599725", "0.55971825", "0.55736965", "0.5567379", "0.5545994", "0.5544727", "0.5542957", "0.55392706", "0.55385935", "0.55311066", "0.55213517", "0.55204785", "0.55066687", "0.5503419", "0.54835445", "0.5482255", "0.5480526", "0.54785377", "0.5477595", "0.54754543", "0.54687965", "0.5458095", "0.5449993", "0.5438649", "0.5433885", "0.5429469", "0.54268676", "0.5422095", "0.5419685", "0.54029673", "0.5398013", "0.53951925", "0.53951657", "0.53913057", "0.5382629", "0.5375119", "0.5370674", "0.53702843", "0.53642523", "0.53626275", "0.5358995", "0.5353841", "0.5341223", "0.5340682", "0.5332991", "0.53278685", "0.5327058", "0.5299005", "0.5283465", "0.5279304", "0.5277522", "0.5274975", "0.5268926", "0.526794", "0.52604806", "0.52539635", "0.52528477", "0.5252591", "0.5243094", "0.52421224", "0.52402925", "0.52330875", "0.52237445", "0.5223357" ]
0.0
-1
If managed by another super peer
int getExchangeNextPort(Exchange destinationExchange) { if (destinationExchange.continent() != myExchange.continent()) return destinationExchange.continent().portNum(); // If managed by this super peer else return destinationExchange.portNum(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract P getAsPeer() throws DataException;", "Uuid getActivePeer() throws RemoteException, NotBoundException;", "private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];\n \n if (!peer.equals(this.localP2pService)) {\n // Send a message to the remote peer to record me\n peer.register(this.localP2pService);\n // Add the peer in my group of acquaintances\n this.acqGroup.add(peer);\n }\n } catch (Exception e) {\n logger.debug(\"The peer at \" + peerUrl +\n \" couldn't be contacted\", e);\n }\n }\n }", "public interface PeerRMI extends Remote {\n\n\t/**\n\t * Allows the backup of a document amongst the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString backup(String request) throws RemoteException;\n\n\t/**\n\t * Allows the enhanced backup of a document amongst the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString backupENH(String request) throws RemoteException;\n\t\n\t/**\n\t * Allows the deletion of a document saved in the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString delete(String request) throws RemoteException;\n\n\t/**\n\t * Allows the enhanced deletion of a document saved in the peers of the network\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString deleteENH(String request) throws RemoteException;\n\n\t/**\n\t * Allows the restoration of a document saved in the other peers of the network, the restored file will be saved in the peer-iniatior\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString restore(String request) throws RemoteException;\n\n\t/**\n\t * Allows the restoration of a document saved in the other peers of the network, the restored file will be saved in the peer-iniatior\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString restoreENH(String request) throws RemoteException;\n\n\t/**\n\t * Allows the enhanced reclaim of space of the initiator-peer\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString reclaim(String request) throws RemoteException;\n\n\t/**\n\t * Allows the user to get the state of the initiator-peer\n\t * @param request\n\t * \t\t\t\tString containing the details about the request\n\t * @return\n\t * \t\t\t\tString containing the status of the execution\n\t * @throws RemoteException\n\t */\n\tString state() throws RemoteException;\n}", "protected abstract boolean sharedConnectionEnabled();", "@Override\n\tpublic boolean canConnect() {\n return false;\n }", "public abstract P getPeer() throws DataException;", "public Peer getPeer();", "private boolean createPeer() {\n\t\tIH2HSerialize serializer = new FSTSerializer(false, new SCSecurityClassProvider());\n\t\th2hNode = H2HNode.createNode(FileConfiguration.createDefault(), new SpongyCastleEncryption(serializer), serializer);\n\t\tif (h2hNode.connect(networkConfig)) {\n\t\t\tLOG.debug(\"H2HNode successfully created.\");\n\n\t\t\tFutureBootstrap bootstrap = h2hNode.getPeer().peer().bootstrap().inetAddress(networkConfig.getBootstrapAddress()).ports(networkConfig.getBootstrapPort()).start();\n\t\t\tbootstrap.awaitUninterruptibly();\n\t\t\tboostrapAddresses = bootstrap.bootstrapTo();\n\t\t\treturn true;\n\t\t} else {\n\t\t\tLOG.error(\"H2HNode cannot connect.\");\n\t\t\treturn false;\n\t\t}\n\n\n\t}", "public interface IPeerManager\r\n{\r\n /**\r\n * Add a new PeerEndpoint to the list of peers\r\n * \r\n * @param peer\r\n */\r\n void addPeerEndpoint(PeerEndpoint peer);\r\n\r\n /**\r\n * Returns a current snapshot of all known peers\r\n * \r\n * @return An iterable list of all the peers\r\n */\r\n Set<String> getPeerSnapshot();\r\n\r\n /**\r\n * Returns the PeerEnpoint matching the key\r\n * \r\n * @param key\r\n * @return the requested PeerEndpoint\r\n */\r\n PeerEndpoint getPeerEndpoint(String key);\r\n\r\n /**\r\n * Deletes the PeerEndpoint matching the provided key\r\n * \r\n * @param key\r\n */\r\n void removePeerEndpoint(String key);\r\n\r\n /**\r\n * Returns the number of currentlyn known peers\r\n * \r\n * @return number of currently known peers\r\n */\r\n int getPeerCount();\r\n}", "public void setPeer(Peer peer);", "@Override\n\tpublic boolean connect() {\n\t\treturn false;\n\t}", "public interface PeerInfoService extends PeerInfoCallback {\r\n}", "@Override\n public boolean isConnectable() {\n return true;\n }", "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 boolean connectAs(String uname) {\n\t\tboolean noProblems = true; // no problems have been encountered\n \n\t\t// First Message: A->B: Alice || E_kB(Alice || nonce_A)\n\t\tbyte[] nonce_user = ComMethods.genNonce();\n\t\tComMethods.report(accountName+\" has randomly generated a 128-bit nonce_user = \"+(new String(nonce_user))+\".\",simMode);\n\n\t\tbyte[] unameBytes = uname.getBytes();\n\t\tbyte[] srvrNameBytes = \"SecretServer\".getBytes();\n\n\t\tbyte[] pload = ComMethods.concatByteArrs(unameBytes, nonce_user);\n\t\tpload = SecureMethods.encryptRSA(pload, serv_n, BigInteger.valueOf(serv_e), simMode);\n\n\t\tbyte[] message1 = ComMethods.concatByteArrs(unameBytes,pload);\n\n\t\tComMethods.report(accountName+\" is sending SecretServer the name \"+uname+\", concatenated with '\"+uname+\" || nonce_user' encrypted under RSA with the SecretServer's public key.\", simMode);\t\t\n\t\tbyte[] response1 = sendServer(message1,false);\n\n\t\tif (!checkError(response1)) {\n\t\t\tresponse1 = SecureMethods.decryptRSA(response1, my_n, my_d, simMode);\n\t\t\tComMethods.report(accountName+\" has decrypted the SecretServer's message using \"+accountName+\"'s private RSA key.\", simMode);\n\t\t} else {\n\t\t\tComMethods.report(accountName+\" has received the SecretServer's error message.\", simMode);\n\t\t}\n\n\t\t// Test for proper formatting of the second message in the protocol\n\t\tif (!Arrays.equals(Arrays.copyOf(response1,nonce_user.length), nonce_user) || !Arrays.equals(Arrays.copyOfRange(response1, nonce_user.length, nonce_user.length+srvrNameBytes.length), srvrNameBytes)) {\n\n\t\t\tnoProblems = false;\n\t\t\tSystem.out.println(\"ERROR ~ something went wrong.\");\n\t\t} else {\n\t\t\tbyte[] nonce_srvr = Arrays.copyOfRange(response1, nonce_user.length + srvrNameBytes.length, response1.length);\n\t\t\tComMethods.report(accountName+\" now has nonce_srvr.\", simMode);\n\n\t\t\t// Third Message: A->B: E_kB(nonce_B || kS)\n\t\t\tsessionKey = ComMethods.genNonce();\n\t\t\tComMethods.report(accountName+\" has generated a random 128-bit session key.\", simMode);\n\t\t\t\n\t\t\tbyte[] message2 = ComMethods.concatByteArrs(nonce_srvr, sessionKey);\n\t\t\tmessage2 = SecureMethods.encryptRSA(message2, serv_n, BigInteger.valueOf(serv_e), simMode);\n\t\t\tComMethods.report(accountName+\" is sending the SecretServer the concatenation of nonce_srvr and the session key, encrypted under RSA using the SecretServer's public key.\", simMode);\n\n\t\t\tbyte[] response2 = sendServer(message2, true);\n\t\t\tif (!checkError(response2)) {\n\t\t\t\tresponse2 = SecureMethods.processPayload(srvrNameBytes, response2, 11, sessionKey, simMode);\n\t\t\t\tComMethods.report(accountName+\" has decrypted the SecretServer's message using the symmetric session key that \"+accountName+\" just generated.\", simMode);\t\t\t\t\n\t\t\t} else {\n\t\t\t\tComMethods.report(accountName+\" has received the SecretServer's error message.\", simMode);\n\t\t\t}\n\n\t\t\t// Test formatting of the 4th message in the protocol\n\t\t\tbyte[] expected = \"understood\".getBytes();\n\t\t\tif (!Arrays.equals(Arrays.copyOf(response2, expected.length), expected)) {\n\t\t\t\tnoProblems = false;\n\t\t\t\tComMethods.report(\"ERROR ~ something went wrong with the fourth message in the Bilateral Authentication Protocol.\", simMode);\n\t\t\t} else {\n\t\t\t\tcounter = 12; // counter to be used in future messages\n\t\t\t}\n\t\t}\n\n\t\tif (noProblems) {\n\t\t\tusername = uname;\n\t\t}\n\n\t\treturn noProblems; \n\t}", "@Override\r\n\tpublic boolean isConnected() {\n\t\treturn false;\r\n\t}", "private void handshake() {\n Log.d(TAG, \"handshake: called\");\n\n if (takeBertyService()) {\n if (takeBertyCharacteristics()) {\n // Speed up connection\n requestMtu(PeerDevice.MAX_MTU);\n\n // send local PID\n if (!write(getPIDCharacteristic() ,mLocalPID.getBytes(), true)) {\n Log.e(TAG, String.format(\"handshake error: failed to send local PID: device=%s\", getMACAddress()));\n disconnect();\n }\n\n // get remote PID\n if (!read(getPIDCharacteristic())) {\n Log.e(TAG, String.format(\"handshake error: failed to read remote PID: device=%s\", getMACAddress()));\n disconnect();\n }\n\n return ;\n }\n }\n Log.e(TAG, String.format(\"handshake error: failed to find berty service: device=%s\", getMACAddress()));\n disconnect();\n }", "public void start() throws LoginFailedException {\n\t\ttry {\n\t\t\tServerSocket socket = new ServerSocket(0, 0, InetAddress.getByName(\"192.168.1.122\"));\n\t\t\tInetAddress address = socket.getInetAddress();\n\t\t\tint port = socket.getLocalPort();\n\n\t\t\t/* ServerSocket opened just to get free port */\n\t\t\tsocket.close();\n\n\t\t\tBindings bindings = new Bindings().addAddress(address);\n\t\t\tpeer = new PeerBuilderDHT(new PeerBuilder(new Number160(random)).bindings(bindings).ports(port).start()).start();\n\t\t\tSystem.out.println(\"Created peer with ID: \" + peer.peerID().toString());\n\n\t\t\t/* Specifies what to do when message is received */\n\t\t\tpeer.peer().objectDataReply(new ObjectDataReply() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic Object reply(PeerAddress sender, Object request) throws Exception {\n\t\t\t\t\tif (request instanceof String) {\n\t\t\t\t\t\tString payload = (String) request;\n\t\t\t\t\t\tint notaryAndIDSeparatorIndex = payload.indexOf(\"_\");\n\t\t\t\t\t\tint idAndUsernameSeparatorIndex = payload.indexOf(\"_\", notaryAndIDSeparatorIndex+1);\n\t\t\t\t\t\tint usernameAndMessageSeparatorIndex = payload.lastIndexOf(\"_\");\n\t\t\t\t\t\tif (notaryAndIDSeparatorIndex > 0 && idAndUsernameSeparatorIndex > 0 && usernameAndMessageSeparatorIndex > 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tString notary = payload.substring(0, notaryAndIDSeparatorIndex);\n\t\t\t\t\t\t\t\tboolean isSigned = false;\n\t\t\t\t\t\t\t\tif(notary.compareTo(\"0\") == 0) {\n\t\t\t\t\t\t\t\t\tisSigned = false;\n\t\t\t\t\t\t\t\t} else if (notary.compareTo(\"1\") == 0) {\n\t\t\t\t\t\t\t\t\tisSigned = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(delegate != null) {\n\t\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\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\tString messageIDStr = payload.substring(notaryAndIDSeparatorIndex + 1, idAndUsernameSeparatorIndex);\n\t\t\t\t\t\t\t\tlong messageID = Long.parseLong(messageIDStr);\n\t\t\t\t\t\t\t\tString username = payload.substring(idAndUsernameSeparatorIndex+1, usernameAndMessageSeparatorIndex);\n\t\t\t\t\t\t\t\tString message = payload.substring(usernameAndMessageSeparatorIndex+1, payload.length());\n\n\t\t\t\t\t\t\t\tMessage messageObj = new Message();\n\t\t\t\t\t\t\t\tmessageObj.setMessage(message);\n\t\t\t\t\t\t\t\tmessageObj.setNotary(isSigned);\n\t\t\t\t\t\t\t\tContact contact = new Contact(username);\n\t\t\t\t\t\t\t\tMessageResult result = new MessageResult(messageID);\n\n\t\t\t\t\t\t\t\tFutureDirect ackMessage = peer.peer().sendDirect(sender).object(\"ack_\" + messageID).start();\n\t\t\t\t\t\t\t\tackMessage.addListener(new BaseFutureAdapter<FutureDirect>() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void operationComplete(FutureDirect future) throws Exception {\n\t\t\t\t\t\t\t\t\t\tif (future.isSuccess()) {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Successfully acknowledged incoming message!\");\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Failed to acknowledge incoming message!\");\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Reason is: \" + future.failedReason());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(messageObj, contact, result, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\t\t\tSystem.err.println(\"Failed casting message ID to long!\");\n\t\t\t\t\t\t\t\tnfe.printStackTrace();\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (payload.startsWith(\"ack\") && payload.indexOf(\"_\") > 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tString messageIDStr = payload.substring(payload.indexOf(\"_\")+1, payload.length());\n\t\t\t\t\t\t\t\tlong messageID = Long.parseLong(messageIDStr);\n\t\t\t\t\t\t\t\tMessageResult result = new MessageResult(messageID);\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveAck(result, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\t\t\tSystem.err.println(\"Failed casting message ID to long!\");\n\t\t\t\t\t\t\t\tnfe.printStackTrace();\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveAck(null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if(payload.compareTo(\"ping\") == 0) {\n\t\t\t\t\t\t\tFutureDirect pingACKMessage = peer.peer().sendDirect(sender).object(\"pingACK_\" + peerInfo.getUsername()).start();\n\t\t\t\t\t\t\tpingACKMessage.addListener(new BaseFutureAdapter<FutureDirect>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void operationComplete(FutureDirect future) throws Exception {\n\t\t\t\t\t\t\t\t\tif (future.isFailed()) {\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Failed to send ping ACK!\");\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Reason is: \" + future.failedReason());\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Successfully sent ping ACK message!\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if(payload.startsWith(\"pingACK_\")) {\n\t\t\t\t\t\t\tString username = payload.substring(payload.indexOf(\"_\") + 1, payload.length());\n\t\t\t\t\t\t\tContact contact = new Contact(username);\n\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\tdelegate.didUpdateOnlineStatus(contact, true, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t delegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpeerInfo.setInetAddress(address);\n\t\t\tpeerInfo.setPort(port);\n\t\t\tpeerInfo.setPeerAddress(peer.peerAddress());\n\n\t\t\tSystem.out.println(\"Client peer started on IP \" + address + \" on port \" + port);\n\t\t\tSystem.out.println(\"Bootstrapping peer...\");\n\t\t\tbootstrap();\n\t\t} catch (IOException ie) {\n\t\t\tie.printStackTrace();\n\n\t\t\tif (delegate != null) {\n\t\t\t\tdelegate.didLogin(null, P2PLoginError.SOCKET_OPEN_ERROR);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void establishConnectionWithYourTower() {\n }", "public interface IThingPeerData {\r\n\r\n}", "@Override\n default ManagerPrx ice_preferSecure(boolean b)\n {\n return (ManagerPrx)_ice_preferSecure(b);\n }", "protected final boolean sharedConnectionEnabled() {\n\t\treturn true;\n\t}", "@Override\n protected void connectionEstablished()\n {\n peer.resetConnectionClosed();\n\n // send our handshake directly as it doesn't fit into peer message\n // and there is always space in send buffer on new connection\n //enqueue(pmCache.handshake(torrent.getTorrentId(), torrent.getClientId()));\n }", "@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}", "@Override\n default ManagerPrx ice_secure(boolean b)\n {\n return (ManagerPrx)_ice_secure(b);\n }", "private boolean canAddPeer(InetAddress candidate) {\n\t\treturn peers.size() < maximumConnections && !peers.containsKey(candidate) && !candidate.equals(externalIP) && !candidate.equals(internalIP) && !candidate.isLoopbackAddress();\n\t}", "boolean isRepliable();", "boolean isIsRemote();", "public abstract String getPeerNameCandidate();", "boolean needSeparateConnectionForDdl();", "@Override\n\tprotected void populateRemoteHost() {\n\t\tthrow noSocket();\n\t}", "public interface CallPeerSecurityListener extends EventListener\n{\n\t/**\n\t * The handler for the security event received. The security event represents an indication of\n\t * change in the security status.\n\t *\n\t * @param securityEvent\n\t * the security event received\n\t */\n\tpublic void securityOn(CallPeerSecurityOnEvent securityEvent);\n\n\t/**\n\t * The handler for the security event received. The security event represents an indication of\n\t * change in the security status.\n\t *\n\t * @param securityEvent\n\t * the security event received\n\t */\n\tpublic void securityOff(CallPeerSecurityOffEvent securityEvent);\n\n\t/**\n\t * The handler for the security event received. The security event represents a timeout trying\n\t * to establish a secure connection. Most probably the other peer doesn't support it.\n\t *\n\t * @param securityTimeoutEvent\n\t * the security timeout event received\n\t */\n\tpublic void securityTimeout(CallPeerSecurityTimeoutEvent securityTimeoutEvent);\n\n\t/**\n\t * The handler of the security message event.\n\t *\n\t * @param event\n\t * the security message event.\n\t */\n\tpublic void securityMessageReceived(CallPeerSecurityMessageEvent event);\n\n\t/**\n\t * The handler for the security event received. The security event for starting establish a\n\t * secure connection.\n\t *\n\t * @param securityStartedEvent\n\t * the security started event received\n\t */\n\tpublic void securityNegotiationStarted(\n\t\tCallPeerSecurityNegotiationStartedEvent securityStartedEvent);\n}", "public abstract boolean SourceSinkSide( Communicator comm);", "public boolean join(){\n\t\tif (joined) return true;\n\t\t\n StructuredDocument creds = null;\n try {\n AuthenticationCredential authCred = new AuthenticationCredential(peerGroup, null, creds );\n MembershipService membership = peerGroup.getMembershipService();\n Authenticator auth = membership.apply( authCred );\n \n // Check if everything is okay to join the group\n if (auth.isReadyForJoin()){\n Credential myCred = membership.join(auth);\n StructuredTextDocument doc = (StructuredTextDocument)\n myCred.getDocument(new MimeMediaType(\"text/plain\"));\n }\n else\n log.error(\"You cannot join repository\");\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n log.info(\"Joined to Virtual Repository (low-level)\");\n //change DatabaseDiscovery\n DatabaseDiscovery dd = new DatabaseDiscovery(peerGroup.getParentGroup());\n \n try {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n //looking for cmu service\n try {\n\t\t\tmanagementModule = dd.obtainManagementServ(peerGroup.getPeerID().toString());\n\t\t} catch (GridException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n \n \n //point to discovery service in joined group\n new DatabaseDiscovery(peerGroup);\n\n this.joined = true; \n \n\t\treturn true;\n\t}", "private void manageConnectedSocket(BluetoothSocket acceptSocket) {\n\n }", "public boolean setupOwnAddress() {\n\t\tboolean success = false;\n\t\ttry {\n\t\t\tthis.ownAddress = NetworkLayer.getOwnAddress(); // TODO replace by discover?\n\t\t\tthis.showNamedMessage(\"Client listing on: \" + this.ownAddress);\n\t\t\tthis.showNamedMessage(\"NOTE: depending on detection method,\"\n\t\t\t\t\t+ \" this may NOT be the actual interface used\");\n\t\t\tthis.showNamedMessage(\"Discovered preferred local address: \" \n\t\t\t\t\t+ NetworkLayer.discoverLocalAddress());\n\t\t\tsuccess = true;\n\t\t} catch (UnknownHostException e) {\n\t\t\tthis.showNamedMessage(\"Could not determine own address: \" + e.getLocalizedMessage());\n\t\t} \n\t\treturn success;\n\t}", "public abstract boolean isDataConnectionAsDesired();", "public int getLocalPeerID()\n {\n return localPeerID;\n }", "@Override\n protected void onFailureComponentConnectionRequest(PlatformComponentProfile remoteParticipant) {\n System.out.println(\"************ Crypto Addresses -> FAILURE CONNECTION.\");\n checkFailedDeliveryTime(remoteParticipant.getIdentityPublicKey());\n }", "@Override\n\tpublic boolean isRemote() {\n\t\treturn remote;\n\t}", "PeerConnectionInformation peerConnectionInformation();", "public synchronized void start() throws IOException, ClassNotFoundException, RemoteReadException, InstantiationException, IllegalAccessException, InterruptedException\n\t{\n\t\t// Start up the peer. 06/14/2017, Bing Li\n\t\tif (!this.peer.isStarted())\n\t\t{\n\t\t\tthis.peer.start();\n\t\t}\n\n\t\t// Retrieve all of the registered IP addresses of the distributed nodes in the cluster from the registry server. 07/05/2017, Bing Li\n\t\tClusterIPResponse ipResponse = (ClusterIPResponse)this.peer.read(RegistryConfig.PEER_REGISTRY_ADDRESS, RegistryConfig.PEER_REGISTRY_PORT, new ClusterIPRequest());\n\t\tif (ipResponse.getIPs() != null)\n\t\t{\n\t\t\t// Add the IP addresses to the client pool. 07/05/2017, Bing Li\n\t\t\tfor (IPAddress ip : ipResponse.getIPs().values())\n\t\t\t{\n\t\t\t\tthis.peer.getClientPool().addIP(ip.getIP(), ip.getPort());\n\t\t\t}\n\n\t\t\t// Initialize the cluster root IP address broadcast notifier. 07/05/2017, Bing Li\n\t\t\tthis.rootIPBroadcastNotifier = new ClusterRootBroadcastNotifier<IPAddress, OldRootIPAddressBroadcastNotification, RootIPAddressBroadcastNotificationCreator>(this.peer.getClientPool(), MulticastConfig.MULTICASTOR_POOL_SIZE, MulticastConfig.RESOURCE_WAIT_TIME, new RootIPAddressBroadcastNotificationCreator());\n\t\t\t// Broadcast the root IP address to each child in the cluster. 07/05/2017, Bing Li\n\t\t\tthis.rootIPBroadcastNotifier.notifiy(new IPAddress(this.peer.getPeerID(), this.peer.getPeerIP(), this.peer.getPort()), MulticastConfig.ROOT_BRANCH_COUNT, MulticastConfig.SUB_BRANCH_COUNT);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Initialize the cluster root IP address broadcast notifier. 07/05/2017, Bing Li\n\t\t\tthis.rootIPBroadcastNotifier = new ClusterRootBroadcastNotifier<IPAddress, OldRootIPAddressBroadcastNotification, RootIPAddressBroadcastNotificationCreator>(this.peer.getClientPool(), MulticastConfig.MULTICASTOR_POOL_SIZE, MulticastConfig.RESOURCE_WAIT_TIME, new RootIPAddressBroadcastNotificationCreator());\n\t\t}\n\t}", "protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }", "@Override\n default ManagerPrx ice_connectionCached(boolean newCache)\n {\n return (ManagerPrx)_ice_connectionCached(newCache);\n }", "protected abstract boolean isConnected();", "public Service() {\n if (peers[0] == null) {\n Service.peers[0] = new Peer(clave7);\n Service.peers[1] = new Peer(clave8);\n Service.peers[2] = new Peer(clave9);\n Service.peers[0].addPeer(new EntradaTEncam(clave1, HOSTS[0], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave2, HOSTS[0], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave3, HOSTS[0], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave4, HOSTS[1], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave5, HOSTS[1], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave6, HOSTS[1], PUERTO));\n //Service.peers[0].addPeer(new EntradaTEncam(clave7, HOSTS[2], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave8, HOSTS[2], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave9, HOSTS[2], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave1, HOSTS[0], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave2, HOSTS[0], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave3, HOSTS[0], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave4, HOSTS[1], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave5, HOSTS[1], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave6, HOSTS[1], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave7, HOSTS[2], PUERTO));\n //Service.peers[1].addPeer(new EntradaTEncam(clave8, HOSTS[2], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave9, HOSTS[2], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave1, HOSTS[0], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave2, HOSTS[0], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave3, HOSTS[0], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave4, HOSTS[1], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave5, HOSTS[1], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave6, HOSTS[1], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave7, HOSTS[2], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave8, HOSTS[2], PUERTO));\n //Service.peers[2].addPeer(new EntradaTEncam(clave9, HOSTS[2], PUERTO));\n }\n }", "@Override\r\n\tpublic ServerBean connect() throws RemoteException {\n\t\tSystem.out.println(\"coming from DealServerImp\");\r\n\t\treturn null;\r\n\t}", "private void attachServerPeer(DiameterRequestFacade request) {\n\t\tif (request != null && request.getServerPeer() == null) {\n\t\t\tLocalPeer localPeer = Utils.getClientLocalPeer(request.getHandlerName());\n\t\t\trequest.setServerPeer(localPeer);\n\t\t}\n\t}", "boolean isEphemeral();", "public boolean hasEndpoint2() { return true; }", "protected int numPeers() {\n\t\treturn peers.size();\n\t}", "@Override\n public InetSocketAddress getICERemoteHostAddress(String streamName)\n {\n return null;\n }", "public static boolean isUnchokable(PEPeer peer, boolean allow_snubbed) {\n return (peer.getPeerState() == PEPeer.TRANSFERING && !peer.isSeed() && !peer.isRelativeSeed() && peer.isInterested()\n && !peer.isUploadDisabled() && (!peer.isSnubbed() || allow_snubbed));\n }", "@Override\n\tpublic void communicate(Vertebra otherVertebra) {\n\t\t\n\t}", "Inertial getInertial();", "Peer getLeader() {\n return leader;\n }", "public boolean hasLanded ();", "boolean hasRemoteHost();", "private void addStreamToLocalPeer() {\n //creating local mediastream\n MediaStream stream = peerConnectionFactory.createLocalMediaStream(\"102\");\n stream.addTrack(localAudioTrack);\n stream.addTrack(localVideoTrack);\n localPeer.addStream(stream);\n }", "@Override\n\tpublic void conferenceroom() {\n\t\t\n\t}", "public void byeHost(Host aHost);", "@Override public boolean getOnlineStatus(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getOnlineStatus, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "protected LWWindowPeer getWindowPeerOrSelf() {\n return getWindowPeer();\n }", "private void handlePasv() {\n // Using fixed IP for connections on the same machine\n // For usage on separate hosts, we'd need to get the local IP address from\n // somewhere\n // Java sockets did not offer a good method for this\n String myIp = \"127.0.0.1\";\n String myIpSplit[] = myIp.split(\"\\\\.\");\n\n int p1 = dataPort / 256;\n int p2 = dataPort % 256;\n\n sendMsgToClient(\"227 Entering Passive Mode (\" + myIpSplit[0] + \",\" + myIpSplit[1] + \",\" + myIpSplit[2] + \",\"\n + myIpSplit[3] + \",\" + p1 + \",\" + p2 + \")\");\n\n openDataConnectionPassive(dataPort);\n\n }", "public void announcePeer() throws Exception{\n \n Socket socket = new Socket(connect, inPort);\n\n BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);\n //System.out.println(\"Sending \" + cmd); \n // Tells another peer what is given in cmd\n pw.println(cmd);\n //System.out.println(\"Command sent\");\n String answer = br.readLine();\n System.out.println(answer);\n PeerConfig.writeInLogs(answer);\n\n pw.close();\n //br.close();\n socket.close();\n\n return ;\n }", "@Override\n public void connectionLost(Throwable cause) {\n }", "public interface FingerService extends Remote {\n\n String connectedUsers() throws RemoteException;\n}", "public boolean beforeDownstream() {\n return true;\n }", "private void starter(QuorumPeer self, QuorumCnxManager manager) {\n this.self = self;\n proposedLeader = -1;\n proposedZxid = -1;\n\n sendqueue = new LinkedBlockingQueue<>();\n recvqueue = new LinkedBlockingQueue<>();\n this.messenger = new Messenger(manager);\n }", "public java.lang.Boolean getByhand() throws java.rmi.RemoteException;", "public void onPeerConnectionClosed();", "@Override\r\n\tpublic void testPrivateBelongsToOtherUser() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateBelongsToOtherUser();\r\n\t\t}\r\n\t}", "@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "public boolean needsConnectionLeftOpen() {\n return false;\n }", "@Override\n public InetSocketAddress getICERemoteRelayedAddress(String streamName)\n {\n return null;\n }", "abstract String getRemoteAddress();", "PeerUid(int uid) {\n this.uid = uid;\n }", "private void InitiateRelevantActiveTransaction() {\n try {\n /**\n * Create a client socket with the host,\n * port, and timeout information.\n */\n mSocket = new Socket();\n mSocket.bind(null);\n mSocket.connect((new InetSocketAddress(mPeer.mIPAddr, Constants.WELCOME_SOCKET_PORT)), 3000);\n } catch (UnknownHostException e) {\n e.printStackTrace();\n return;\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n if (mSocket == null) {\n return;\n }\n\n switch (mQueryCode) {\n case Constants.CONNECTION_CODE_DISCOVER: {\n ActiveDiscoveryProcedure();\n break;\n }\n }\n\n }", "abstract PeerType getPeerType();", "@Override\n\tpublic String getPeerName() {\n\t\treturn null;\n\t}", "@Override\n protected void prot() {\n }", "public static void doHighLatencyPeers(ArrayList<PEPeer> peers_to_choke, ArrayList<PEPeer> peers_to_unchoke, boolean allow_snubbed) {\n\n if (peers_to_choke.size() == 0) {\n\n return;\n }\n\n // System.out.println( \"doHLP: \" + peers_to_choke + \", \" + peers_to_unchoke );\n\n Iterator<PEPeer> choke_it = peers_to_choke.iterator();\n\n int to_remove = 0;\n\n while (choke_it.hasNext()) {\n\n PEPeer peer = choke_it.next();\n\n if (AENetworkClassifier.categoriseAddress(peer.getIp()) != AENetworkClassifier.AT_PUBLIC) {\n\n if (isUnchokable(peer, allow_snubbed)) {\n\n // System.out.println( \" removed \" + peer );\n\n choke_it.remove();\n\n to_remove++;\n\n } else {\n\n // it isn't unchokable so we need to choke it whatever\n\n }\n }\n }\n\n // if we've removed any chokes then we need to balance things by removing an equal number\n // of unchokes\n\n if (to_remove > 0) {\n\n ListIterator<PEPeer> unchoke_it = peers_to_unchoke.listIterator(peers_to_unchoke.size());\n\n // preferrably balance with high latency peers\n\n while (unchoke_it.hasPrevious()) {\n\n PEPeer peer = unchoke_it.previous();\n\n if (AENetworkClassifier.categoriseAddress(peer.getIp()) != AENetworkClassifier.AT_PUBLIC) {\n\n // System.out.println( \" balanced with \" + peer );\n\n unchoke_it.remove();\n\n to_remove--;\n\n if (to_remove == 0) {\n\n return;\n }\n }\n }\n\n if (to_remove > 0) {\n\n unchoke_it = peers_to_unchoke.listIterator(peers_to_unchoke.size());\n\n while (unchoke_it.hasPrevious()) {\n\n PEPeer peer = unchoke_it.previous();\n\n unchoke_it.remove();\n\n to_remove--;\n\n if (to_remove == 0) {\n\n return;\n }\n }\n }\n }\n }", "public static synchronized Boolean addKnownPeers(udpSocket peer) {\n if ((knownPeers.size() - outgoing.size() + 1) <= Integer.parseInt(config.get(\"maximumIncommingConnections\"))) {\n knownPeers.add(peer);\n if (peer.type != \"client from server\") {\n outgoing.add(peer);\n }\n log.info(\"Added peer to udppeerlist\");\n return true;\n }\n log.info(\"Did not add peer to udppeerlist\");\n return false;\n }", "public NewsletterPeer getPeer()\n {\n return peer;\n }", "protected void connectionEstablished() {}", "@Override\r\n protected void onConnected() {\n \r\n }", "public interface P2P {\n\n\t/**\n\t * Start the P2P system with given servent and router system\n\t * \n\t * @param servent\n\t * @param router\n\t */\n\tpublic void start(NServent servent, Router router);\n\n\t/**\n\t * disconnect from the p2p network\n\t */\n\tpublic void stop();\n\n\t/**\n\t * connect to a p2p network\n\t */\n\tpublic void connectTo(NAddress address) throws IOException;\n\n\t/**\n\t * send msg to all users\n\t * \n\t * @param msg\n\t */\n\tpublic void broadcast(Object msg);\n\n\t/**\n\t * send msg to some users contained in dests set\n\t * \n\t * @param msg\n\t */\n\tpublic void anycast(Set<P2PUser> dests, Object msg);\n\n\t/**\n\t * send the message msg to user dest, the routing system will be used\n\t * \n\t * @param dest\n\t * @param msg\n\t * @throws IOException\n\t */\n\tpublic void sendTo(P2PUser dest, Object msg) throws IOException;\n\n\t/**\n\t * get the p2p network user set\n\t * \n\t * @return\n\t */\n\tpublic Set<P2PUser> getUsers();\n\n\t/**\n\t * Find the user with the address given, return null if not present\n\t * \n\t * @param address\n\t * @return user with address given\n\t */\n\tpublic P2PUser getUser(NAddress address);\n\n\t/**\n\t * Find the user binded with the pair given, return null if not present\n\t * \n\t * @param address\n\t * @return user with address given\n\t */\n\tpublic P2PUser getUser(NPair pair);\n\n\t/**\n\t * Set the handler, its functions will be called when a corresponding event\n\t * will occur\n\t * \n\t * @param handler\n\t */\n\tpublic void setP2PHandler(P2PHandler handler);\n\n\t/**\n\t * Return the Router currently used by the P2P system\n\t * \n\t * @return\n\t */\n\tpublic Router getRouter();\n\n\t/**\n\t * Return the NServent currently used by P2P the system\n\t * \n\t * @return\n\t */\n\tpublic NServent getNServent();\n}", "public boolean isReliable() {\n return false;\n }", "public boolean isReliable() {\n return false;\n }", "public void connect() throws PersistenceMechanismException {\n\t\t\r\n\t}", "@Override\n public boolean isSystemCommunity() {\n return false;\n }", "public Peer start() throws IOException {\n\t\tboolean isBehindFirewallSet = false;\n\t\tif (behindFirewall == null) {\n\t\t\tbehindFirewall = false;\n\t\t} else {\n\t\t\tisBehindFirewallSet = true;\n\t\t}\n\n\t\tboolean isTcpPortSet = false;\n\t\tif (tcpPort == -1) {\n\t\t\ttcpPort = Ports.DEFAULT_PORT;\n\t\t} else {\n\t\t\tisTcpPortSet = true;\n\t\t}\n\t\t\n\t\tboolean isUdpPortSet = false;\n\t\tif (udpPort == -1) {\n\t\t\tudpPort = Ports.DEFAULT_PORT;\n\t\t} else {\n\t\t\tisUdpPortSet = true;\n\t\t}\n\t\t\n\t\tif (channelServerConfiguration == null) {\n\t\t\tchannelServerConfiguration = createDefaultChannelServerConfiguration();\n\t\t} \n\t\t\n\t\t//post config\n\t\tif(isBehindFirewallSet) {\n\t\t\tchannelServerConfiguration.behindFirewall(behindFirewall);\n\t\t}\n\t\tif(isTcpPortSet || isUdpPortSet) {\n\t\t\tchannelServerConfiguration.ports(new Ports(tcpPort, udpPort));\n\t\t}\n\t\t\n\t\tif(tcpPortForwarding == -1 && udpPortForwarding == -1) {\n\t\t\tchannelServerConfiguration.portsForwarding(new Ports());\n\t\t} else {\n\t\t\tchannelServerConfiguration.portsForwarding(new Ports(tcpPortForwarding, udpPortForwarding));\n\t\t}\n\t\t\n\t\tif (channelClientConfiguration == null) {\n\t\t\tchannelClientConfiguration = createDefaultChannelClientConfiguration();\n\t\t}\n\t\tif (keyPair == null) {\n\t\t\tkeyPair = EMPTY_KEY_PAIR;\n\t\t}\n\t\tif (p2pID == -1) {\n\t\t\tp2pID = 1;\n\t\t}\n\t\t\n\t\t\n\t\tif (bindings == null) {\n\t\t\tbindings = new Bindings();\n\t\t} else {\n\t\t\tchannelServerConfiguration.bindings(bindings);\n\t\t\tchannelClientConfiguration.bindings(bindings);\n\t\t}\n\t\tif (peerMap == null) {\n\t\t\tpeerMap = new PeerMap(new PeerMapConfiguration(peerId));\n\t\t}\n\n\t\tif (masterPeer == null && scheduledExecutorService == null) {\n\t\t\tscheduledExecutorService = Executors.newScheduledThreadPool(1);\n\t\t}\n\n\t\tif(sendBehavior == null) {\n\t\t\tsendBehavior = new DefaultSendBehavior();\n\t\t}\n\t\t\n\t\tfinal PeerCreator peerCreator;\n\t\tif (masterPeer != null) {\n\t\t\tpeerCreator = new PeerCreator(masterPeer.peerCreator(), peerId, keyPair);\n\t\t} else {\n\t\t\tpeerCreator = new PeerCreator(p2pID, peerId, keyPair, channelServerConfiguration,\n\t\t\t channelClientConfiguration, scheduledExecutorService, sendBehavior);\n\t\t}\n\n\t\tfinal Peer peer = new Peer(p2pID, peerId, peerCreator);\n\t\t//add shutdown hook to master peer\n\t\tif (masterPeer != null) {\n\t\t\tmasterPeer.addShutdownListener(new Shutdown() {\n\t\t\t\t@Override\n\t\t\t\tpublic BaseFuture shutdown() {\n\t\t\t\t\treturn peer.shutdown();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tPeerBean peerBean = peerCreator.peerBean();\n\t\t\n\t\tpeerBean.addPeerStatusListener(peerMap);\n\t\t\n\t\tConnectionBean connectionBean = peerCreator.connectionBean();\n\n\t\tpeerBean.peerMap(peerMap);\n\t\tpeerBean.keyPair(keyPair);\n\n\t\tif (bloomfilterFactory == null) {\n\t\t\tpeerBean.bloomfilterFactory(new DefaultBloomfilterFactory());\n\t\t}\n\n\t\tif (broadcastHandler == null) {\n\t\t\tbroadcastHandler = new StructuredBroadcastHandler();\n\t\t}\n\t\tbroadcastHandler.init(peer);\n\t\t\n\t\t// set/enable RPC\n\n\t\tif (isEnableHandShakeRPC()) {\n\t\t\tPingRPC pingRPC = new PingRPC(peerBean, connectionBean);\n\t\t\tpeer.pingRPC(pingRPC);\n\t\t}\n\t\t\n\t\tif (isEnableQuitRPC()) {\n\t\t\tQuitRPC quitRPC = new QuitRPC(peerBean, connectionBean);\n\t\t\tquitRPC.addPeerStatusListener(peerMap);\n\t\t\tpeer.quitRPC(quitRPC);\n\t\t}\n\n\t\tif (isEnableNeighborRPC()) {\n\t\t\tNeighborRPC neighborRPC = new NeighborRPC(peerBean, connectionBean);\n\t\t\tpeer.neighborRPC(neighborRPC);\n\t\t}\n\n\t\tif (isEnableDirectDataRPC()) {\n\t\t\tDirectDataRPC directDataRPC = new DirectDataRPC(peerBean, connectionBean);\n\t\t\tpeer.directDataRPC(directDataRPC);\n\t\t}\n\n\t\tif (isEnableBroadcast()) {\n\t\t\tBroadcastRPC broadcastRPC = new BroadcastRPC(peerBean, connectionBean, broadcastHandler);\n\t\t\tpeer.broadcastRPC(broadcastRPC);\n\t\t}\n\t\t\n\t\tif (isEnableRouting() && isEnableNeighborRPC()) {\n\t\t\tDistributedRouting routing = new DistributedRouting(peerBean, peer.neighborRPC());\n\t\t\tpeer.distributedRouting(routing);\n\t\t}\n\n\t\tif (maintenanceTask == null && isEnableMaintenance()) {\n\t\t\tmaintenanceTask = new MaintenanceTask();\n\t\t}\n\n\t\tif (maintenanceTask != null) {\n\t\t\tmaintenanceTask.init(peer, connectionBean.timer());\n\t\t\tmaintenanceTask.addMaintainable(peerMap);\n\t\t}\n\t\tpeerBean.maintenanceTask(maintenanceTask);\n\n\t\t\t\t\n\t\tfor (PeerInit peerInit : toInitialize) {\n\t\t\tpeerInit.init(peer);\n\t\t}\n\t\t\n\t\treturn peer;\n\t}", "public interface HostPlayer {\n /**\n * the client shall register itself as the client to the host\n * the host shall return its reference\n * @param client reference of the client\n */\n HostPlayer registerClient(ClientPlayer client);\n /**\n *the client needs to acknowledge the ready flag called by the host\n */\n void clientReady();\n /**\n * the client should recieve and evaluate the results received from the host\n * acknowledge true if results match, ack false if result mismatch with local calculation\n * @param resultMatch true if the received the calculations matched\n */\n void ackResult(boolean resultMatch);\n\n /**\n *acknowledge the request for a new game if requested\n * @param isAccepted true if the request for new game accepted\n */\n void newGame(boolean isAccepted);\n}", "@Override\n \t\t\t\tpublic void doDettachFromParent() {\n \n \t\t\t\t}", "public boolean poolTransfer() {\n \t\treturn !isTransfering();\n \t}", "private void InitiatePassiveTransaction() {\n if (!ReceiveDiscoveryMessage()) //if query message reception was unsuccessful.\n return;\n }", "@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPresenceValues, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "@Override\n protected void prepareHandshakeMessageContents() {\n }", "@Override\n public void onFailure(Throwable t) {\n if (t instanceof InvalidQueryException\n || (t instanceof ServerError\n && t.getMessage().contains(\"Unknown keyspace/cf pair (system.peers_v2)\"))) {\n isPeersV2 = false;\n MoreFutures.propagateFuture(peersFuture, selectPeersFuture(connection));\n } else {\n peersFuture.setException(t);\n }\n }" ]
[ "0.60303426", "0.5993176", "0.588819", "0.57969815", "0.5782097", "0.57497543", "0.57394135", "0.56609446", "0.5638646", "0.5570255", "0.55648893", "0.5545788", "0.54917055", "0.54855824", "0.5481312", "0.5439556", "0.5423415", "0.5422636", "0.54157466", "0.541572", "0.5404583", "0.5395379", "0.5378829", "0.5376939", "0.53736037", "0.53736037", "0.53686434", "0.5333178", "0.53271884", "0.5306004", "0.5288929", "0.5280496", "0.5278529", "0.52590674", "0.5252616", "0.5248829", "0.5224979", "0.52104956", "0.520064", "0.51939833", "0.51852393", "0.5184033", "0.5172219", "0.5163076", "0.51585424", "0.51394844", "0.5133246", "0.5117298", "0.5107425", "0.5090101", "0.5088093", "0.5084408", "0.5083407", "0.5079341", "0.5073688", "0.50726795", "0.5071834", "0.5067267", "0.5063443", "0.5056958", "0.5053155", "0.50520635", "0.5037137", "0.5033679", "0.5025183", "0.50227916", "0.50198215", "0.5016988", "0.5013361", "0.50099444", "0.50092345", "0.5009079", "0.5006949", "0.5003438", "0.50015867", "0.50013924", "0.49979547", "0.49950296", "0.49946803", "0.49946094", "0.49911845", "0.4990077", "0.4989326", "0.49825364", "0.4981009", "0.49798098", "0.49792394", "0.49678347", "0.49620768", "0.49608022", "0.49608022", "0.49596366", "0.49568605", "0.49533632", "0.49509686", "0.49501348", "0.49491224", "0.49487594", "0.4947275", "0.49461362", "0.49459493" ]
0.0
-1
Performs authorization on given DatagramPacket.
protected int authorizeProbeRequest(DatagramPacket packet) throws Exception { int offset = 0; ByteArrayInputStream bis = new ByteArrayInputStream(packet.getData()); DataInputStream in = new DataInputStream(bis); long t1 = in.readLong(); double q1 = in.readDouble(); int length = in.readInt(); byte[] digest = new byte[length]; in.readFully(digest); offset = 8 + 8 + 4 + digest.length; byte[] local = Util.createDigest(passcode, t1, q1); if(!MessageDigest.isEqual(digest, local)) throw new Exception("Authorization failed! Make sure correct passcode is used"); return offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void manageDeniedPacket(MeetingPacket packet) {\n Console.comment(\"=> Denied packet from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnDenied != null) {\n this.callbackOnDenied.denied() ;\n }\n }", "public void doAuthorize() {\n authorizeBehavior.authorizd();\n }", "public void setAuthorizationHandler(AuthorizationHandler handler)\n {\n subscribtionPacketListener.setHandler(handler);\n }", "private void authorize() {\r\n\r\n\t}", "public boolean auth(boolean reauth) throws IOException {\r\n log.debug(\"auth Authentication method starts\");\r\n if(alreadyAuthorized && !reauth) {\r\n \tlog.debug(\"auth Already Authorized.\");\r\n \treturn true;\r\n }\r\n\r\n AuthCmdPayload sendPayload = new AuthCmdPayload();\r\n log.debug(\"auth Sending CmdPacket with AuthCmdPayload: cmd=\" + Integer.toHexString(sendPayload.getCommand())\r\n + \" len=\" + sendPayload.getPayload().getData().length);\r\n\r\n log.debug(\"auth AuthPayload initial bytes to send: {}\", DatatypeConverter.printHexBinary(sendPayload.getPayload().getData()));\r\n\r\n DatagramPacket recvPack = sendCmdPkt(10000, 2048, sendPayload);\r\n\r\n byte[] data = recvPack.getData();\r\n \r\n if(data.length <= 0) {\r\n log.error(\"auth Received 0 bytes on initial request.\");\r\n alreadyAuthorized = false;\r\n return false;\r\n }\r\n\r\n log.debug(\"auth recv encrypted data bytes (\" + data.length +\") after initial req: {}\", DatatypeConverter.printHexBinary(data));\r\n\r\n byte[] payload = null;\r\n try {\r\n log.debug(\"auth Decrypting encrypted data\");\r\n\r\n payload = decryptFromDeviceMessage(data);\r\n\r\n log.debug(\"auth Decrypted. len=\" + payload.length);\r\n\r\n } catch (Exception e) {\r\n log.error(\"auth Received datagram decryption error. Aborting method\", e);\r\n alreadyAuthorized = false;\r\n return false;\r\n }\r\n\r\n log.debug(\"auth Packet received payload bytes: \" + DatatypeConverter.printHexBinary(payload));\r\n\r\n key = subbytes(payload, 0x04, 0x14);\r\n\r\n log.debug(\"auth Packet received key bytes: \" + DatatypeConverter.printHexBinary(key));\r\n\r\n if (key.length % 16 != 0) {\r\n log.error(\"auth Received key len is not a multiple of 16! Aborting\");\r\n alreadyAuthorized = false;\r\n return false;\r\n }\r\n\r\n // recreate AES object with new key\r\n aes = new AES(iv, key);\r\n\r\n id = subbytes(payload, 0x00, 0x04);\r\n\r\n log.debug(\"auth Packet received id bytes: \" + DatatypeConverter.printHexBinary(id) + \" with ID len=\" + id.length);\r\n\r\n log.debug(\"auth End of authentication method\");\r\n alreadyAuthorized = true;\r\n\r\n return true;\r\n }", "protected abstract void handlePacket(DatagramPacket packet);", "public abstract boolean isAdminPacket();", "void permissionGranted(int requestCode);", "private void managePacket(MeetingPacket packet) {\n switch (packet.getState()) {\n\n /*\n * The request was accepted. We can now\n * contact the other user in the correct\n * port.\n */\n case ACCEPTED: this.manageAcceptedPacket(packet) ; break ;\n\n /*\n * The request was refused. We need to remove\n * the packet from the temporary list.\n */\n case DENIED: this.manageDeniedPacket(packet) ; break ;\n }\n }", "@UpnpAction(out = {@UpnpOutputArgument(name = \"Result\", stateVariable = \"A_ARG_TYPE_Result\")})\n/* */ public int isAuthorized(@UpnpInputArgument(name = \"DeviceID\", stateVariable = \"A_ARG_TYPE_DeviceID\") String deviceID) {\n/* 118 */ return 1;\n/* */ }", "public LockssReceivedDatagram(DatagramPacket packet) {\n this.packet = packet;\n }", "public void checkPermission (Socket socket, LogEvent evt) throws ISOException\n {\n if (specificIPPerms.isEmpty() && wildcardAllow == null && wildcardDeny == null)\n return;\n\n String ip= socket.getInetAddress().getHostAddress (); // The remote IP\n\n // first, check allows or denies for specific/whole IPs (no wildcards)\n Boolean specificAllow= specificIPPerms.get(ip);\n if (specificAllow == Boolean.TRUE) { // specific IP allow\n evt.addMessage(\"access granted, ip=\" + ip);\n return;\n\n } else if (specificAllow == Boolean.FALSE) { // specific IP deny\n throw new ISOException(\"access denied, ip=\" + ip);\n\n } else { // no specific match under the specificIPPerms Map\n // We check the wildcard lists, deny first\n if (wildcardDeny != null) {\n for (String wdeny : wildcardDeny) {\n if (ip.startsWith(wdeny)) {\n throw new ISOException (\"access denied, ip=\" + ip);\n }\n }\n }\n if (wildcardAllow != null) {\n for (String wallow : wildcardAllow) {\n if (ip.startsWith(wallow)) {\n evt.addMessage(\"access granted, ip=\" + ip);\n return;\n }\n }\n }\n\n // Reaching this point means that nothing matched our specific or wildcard rules, so we fall\n // back on the default permission policies and log type\n switch (ipPermLogPolicy) {\n case DENY_LOG: // only allows were specified, default policy is to deny non-matches and log the issue\n throw new ISOException (\"access denied, ip=\" + ip);\n // break;\n\n case ALLOW_LOG: // only denies were specified, default policy is to allow non-matches and log the issue\n evt.addMessage(\"access granted, ip=\" + ip);\n break;\n\n case DENY_LOGWARNING: // mix of allows and denies were specified, but the IP matched no rules!\n // so we adopt a deny policy but give a special warning\n throw new ISOException (\"access denied, ip=\" + ip + \" (WARNING: the IP did not match any rules!)\");\n // break;\n\n case ALLOW_NOLOG: // this is the default case when no allow/deny are specified\n // the method will abort early on the first \"if\", so this is here just for completion\n break;\n }\n\n }\n // we should never reach this point!! :-)\n }", "public int checkPolicy(String sub, String obj, int operation) {\n try {\n if(mService == null) {\n this.mService = ICAGADroidSecurityManagerInterface.Stub.asInterface(ServiceManager.getService(REMOTE_SERVICE_NAME));\n }\n if (mService != null) {\n return mService.checkPolicy(sub, obj, operation);\n }\n } catch (RemoteException ex) {\n Log.e(TAG, \"Unable to connect the remote CAGADroidSecurityManager\");\n }\n\n // CAGADroid operates in targeted (default to allow) mode\n return CAGADroidConstants.ACTION_ALLOW;\n }", "void checkPermission(T request) throws AuthorizationException;", "@Override\n public void handle(AuthDataEvent event, Channel channel)\n {\n PacketReader reader = new PacketReader(event.getBuffer());\n ChannelBuffer buffer =ChannelBuffers.buffer(ByteOrder.LITTLE_ENDIAN, 1024);\n buffer.writeBytes(event.getBuffer());\n \n int ptype = buffer.readUnsignedShort();\n \n //Skip over the length field since it's checked in decoder\n reader.setOffset(2);\n\n int packetType = reader.readUnSignedShort();\n\n switch (packetType)\n {\n /*\n * Auth Request\n * 0\t ushort 52\n * 2\t ushort 1051\n * 4\t string[16]\t Account_Name\n * 20\t string[16]\t Account_Password\n * 36\t string[16]\t GameServer_Name\n */\n case PacketTypes.AUTH_REQUEST:\n String username = reader.readString(16).trim();\n String password = reader.readString(16).trim();\n String server = reader.readString(16).trim();\n\n //If valid forward to game server else boot them\n if (db.isUserValid(username, \"root\"))\n {\n byte []packet = AuthResponse.build(db.getAcctId(username), \"127.0.0.1\", 8080);\n \n event.getClient().getClientCryptographer().Encrypt(packet);\n \n ChannelBuffer buf = ChannelBuffers.buffer(packet.length);\n \n buf.writeBytes(packet);\n \n ChannelFuture complete = channel.write(buf);\n \n //Close the channel once packet is sent\n complete.addListener(new ChannelFutureListener() {\n\n @Override\n public void operationComplete(ChannelFuture arg0) throws Exception {\n arg0.getChannel().close();\n }\n });\n \n } else\n channel.close();\n \n \n MyLogger.appendLog(Level.INFO, \"Login attempt from \" + username + \" => \" + password + \" Server => \" + server);\n break;\n \n default:\n MyLogger.appendLog(Level.INFO, \"Unkown packet: ID = \" + packetType + new String(event.getBuffer())); \n break;\n }\n }", "@Override\n public void authPacketArrived(int reasonCode, MqttProperties properties) {\n log.warning(() -> \"MQTT auth packet arrived: reasonCode=\" + reasonCode + \" properties=\" + properties);\n }", "public void packetReceived(Pdu packet);", "public boolean handlePerm(Player player, String perm);", "@Override\n\tpublic void packetReceived(NIOSocket socket, byte[] packet) {\n\t\trouter.routeUser(this, new String(packet));\n\t}", "boolean hasPermission(final Player sniper, final String permission);", "public void deliver(Packet packet) {\n \n }", "private void ParsePacket(byte[] packet) {\n byte status = packet[9];\n byte b2 = packet[10];\n byte b1 = packet[11];\n byte b0 = packet[12];\n\n for (int i = 0; i < cmdTableList.size(); i++) {\n if (cmdTableList.get(i).cmd[7] == b2 && cmdTableList.get(i).cmd[8] == b1 && cmdTableList.get(i).cmd[9] == b0) {\n mResponseIdx = i;\n break;\n }\n }\n\n byte[] cmd = cmdTableList.get(mResponseIdx).cmd;\n\n Log.d(TAG, \" status:\" + status);\n Log.d(TAG, \" addr:\" + \"\" + b2 + \" \" + b1 + \" \" + b0);\n\n if (status == (byte) 0x00 &&\n b2 == cmd[7] &&\n b1 == cmd[8] &&\n b0 == cmd[9]) {\n isCmdPass = true;\n cmdTableList.get(mResponseIdx).isPass = true;\n } else isCmdPass = false;\n\n Log.d(\"cmd pass: \", \"\" + isCmdPass);\n AirohaOtaLog.LogToFile(\"PROGRAM RESULT: \" + isCmdPass + \"\\n\");\n }", "@Override\n\tpublic boolean isCommandAuthorized(){\n\t\treturn true;\n\t}", "protected void setBasicAuthorization(String hostName, int hostPort, String realm, String userid, String pswd)\r\n {\r\n\r\n AuthorizationInfo.addBasicAuthorization(hostName, hostPort, realm, userid, pswd);\r\n // Inform the HTTPConnection that our Proxy Host,\r\n // Port is a proxyServer.\r\n HTTPConnection.setProxyServer(hostName, hostPort);\r\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "public void processPacket(DatagramPacket packet)\n\t{\n\t\tPacketOrganizer packetorganizer = new PacketOrganizer();\n\n\t\t//Construct RTP packet\n\t\tbyte[] data = packet.getData();\n\n\t\tRtpPacket rtpPacket = new RtpPacket(data, data.length);\n\t\tthis.totalPacketDataReceived += rtpPacket.getPayloadLength();\n//\t\tSystem.out.println(\"Total packet length: \" + this.totalPacketDataReceived);\n\t\t//Send rtpPacket to jitter buffer\n\t\ttry {\n\t\t\tjitterBuffer.write(rtpPacket);\n\t\t} catch (InterruptedException | IllegalMonitorStateException e) {\n\t\t\tif (e instanceof IllegalMonitorStateException) {\n\t\t\t\t//System.out.println(\"Illeage state monitor exception. Blocking thread.\");\n\n\t\t\t}\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Print out packet.\n\n\t}", "private void getAUTH_REQUEST() throws Exception {\n\t\t\n\t\tboolean status = true;\n\t\tboolean status2 = false;\n\t\tString msg = \"\";\n\t\t\n\t\t//File filePK = new File(\"identity\");\n\t\n\t\ttry {\n\t\t\t\n\t\t\tmsg = br.readLine();\n\t\t\tGetTimestamp(\"Received Authorization Request from Client: \" + msg);\n\t\t\t\n\t\t\tJSONObject REQUEST = (JSONObject) parser.parse(msg);\n\t String identity = REQUEST.get(\"identity\").toString();\n\t\t\t\n\t\t\t\n\t if((identity.contains(\"aaron@krusty\"))) {\n\n\t \tGetTimestamp(\"Authorization Request from Client is approved: \");\n\n\t \tGetTimestamp(\"Client Publickey is stored: \" ) ;\n\n\t \tString tosend = encrypt1(getSharedKey(), getClientPublicKey());\n\n\t \tGetTimestamp(\"Server sharedkey is being encrypted with Client's publickey to be sent: \") ;\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"AES128\", tosend);\n\t \tRESPONSE.put(\"status\", status);\n\t \tRESPONSE.put(\"message\", \"public key found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tGetTimestamp(\"Sending Authorization Response to Client: \");\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\n\n\t }\n\t else {\n\n\t \tSystem.out.println(\"Client \" + REQUEST.get(\"identity\") + \" has been rejected\");\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"status\", status2);\n\t \tRESPONSE.put(\"message\", \"public key not found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\t \tcloseConnection();\n\t }\n\t\t\t\t\n\t\t\t\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\tif (msg.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"Client has signed out!\");\n\t\t\tcloseConnection();\n\n\t\t} else {\t\n\t\t\tgetMessage();\n\t\t}\n\t}", "void onPrivMsg(TwitchUser sender, TwitchMessage message);", "void onChallengeResponseReceived(@NonNull final RawAuthorizationResult response);", "public void analyzeUDPCommand(byte[] buffer, DatagramPacket packet)\n\t{\n\t\tString recieved = new String(packet.getData(), 0, packet.getLength());\n\n\t\tif(recieved.equals(\"end\"))\n\t\t{\n\t\t\tcloseUDPServer();\n\t\t} else\n\t\t{\n\t\t\tprocessPacket(packet);\n\t\t}\n\t}", "@Override\n\tpublic void authorize(String resourceName, String action, String rpcName)\n\t\t\tthrows Exception {\n\t}", "public void sendArpResponse(Packet packet) {\n Packet p = new Packet();\n Ethernet e = Ethernet.makeArpEthernet();\n e.setSrcMac(this.getMacAddress());\n e.setDestMac(packet.getSrcMac());\n p.setL2(e);\n\n Arp arp = Arp.makeArpResponse();\n arp.setSendIp(((Arp) packet.getL3()).getRecvIp());\n arp.setRecvIp(((Arp) packet.getL3()).getSendIp());\n arp.setSendMac(this.getMacAddress());\n arp.setRecvMac(packet.getSrcMac());\n p.setL3(arp);\n this.handleOut(packet);\n }", "protected abstract String getAuthorization();", "private void checkFlags(Packet packet) { \n if (checkAvailableFilesListCorrectFlags(packet)) {\n //System.out.println(\" AFL packet\");\n this.availableFilesListPacketDealer(packet);\n } else if (checkDownloadingCorrectFlags(packet)) {\n //System.out.println(\" DOWN packet\");\n this.downloadingPacketDealer(packet);\n } else if (checkStatisticsCorrectFlags(packet)) {\n //System.out.println(\" STAT packet\");\n this.statisticsPacketDealer(packet);\n } else if (checkPauseCorrectFlags(packet)) {\n //System.out.println(\" PAU packet\");\n this.pausePacketDealer(packet);\n } else if (checkResumeCorrectFlags(packet)) {\n //System.out.println(\" RES packet\");\n this.resumePacketDealer(packet);\n } else if (checkDownloadingFilesListCorrectFlags(packet)) {\n //System.out.println(\" DFL packet\");\n this.downloadingFilesListPacketDealer(packet);\n } else if (checkPausedFilesListCorrectFlags(packet)) {\n //System.out.println(\" PFL packet\");\n this.pausedFilesListPacketDealer(packet);\n } else if (checkUploadingCorrectFlags(packet)) {\n //System.out.println(\" UP packet\");\n this.uploadingPacketDealer(packet);\n } else if (checkExitCorrectFlags(packet)) {\n //System.out.println(\" EXIT packet\");\n this.exitPacketDealer(packet);\n } else {\n this.packetIncorrect(packet);\n \n } \n }", "private void manageAcceptedPacket(MeetingPacket packet) {\n Console.comment(\"=> Meeting response packet accepted from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnAccepted != null) {\n this.callbackOnAccepted.handle(packet.getSourceUser()) ;\n }\n }", "@Override\n\tprotected void doFilterInternal(HttpServletRequest request, \n\t\t\tHttpServletResponse response, \n\t\t\tFilterChain chain) throws IOException, ServletException {\n\t\t\n\t\tString header = request.getHeader(\"Authorization\");\n\t\tif (header != null && header.startsWith(\"Bearer \"))\t{\n\t\t\tUsernamePasswordAuthenticationToken auth = this.getAuthentication(header.substring(7));\n\n\t\t\tif (auth != null) {\n\t\t\t\tSecurityContextHolder.getContext().setAuthentication(auth);\n\t\t\t} else if (!SecurityConfig.verifyPermissionURI(request.getRequestURI())){\n\t\t\t\tonUnsuccessfulAuthentication(request, response, new SessionAuthenticationException(\"Unauthorized - invalid session\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!SecurityConfig.verifyPermissionURI(request.getRequestURI())) {\n\t\t\tonUnsuccessfulAuthentication(request, response, new SessionAuthenticationException(\"Unauthorized\"));\n\t\t\treturn;\n\t\t}\n\n\t\tchain.doFilter(request, response);\n\t}", "@Override\n public void onGranted() {\n }", "@Override\n\t\tpublic void gotPacket(Packet packet) {\n\t\t\tif(packet.contains(IpV4Packet.class)){\t\n\t\n\t\t\t\tbyte[] rec = obtainPackets4Source(packet);\n\t\t\t\t\n\t\t\t\t//if(!useBatch4Pcap){\n\t\t\t\t//\tpublishEntry(topic,rec);\n\t\t\t\t//}else{\n\t\t\t\t if(rec!=null){\n\t\t\t\t\tcacheUpdate(topic,rec);\n\t\t\t\t }else{\n\t\t\t\t\t log.warn(\"packet is null!\");\n\t\t\t\t }\n\t\t\t\t//}\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n\tpublic void ApplicationPacketAction(flexyNetPacket arg0, int arg1) {\n\t\t\n\t}", "public void send(Packet packet);", "public int sendPacket(DatagramPacket p){\r\n\t\t\r\n\t\tpacket = p;\r\n\t\ttry{\r\n\t\t\tsock.send(packet);\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tLogger.write(\"Errore invio pacchetto: \"+ex.getMessage());\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 0;\r\n\t\t\r\n\t}", "@Override\n public void run() {\n final boolean isAuthorized = authzManager.checkClient(socket);\n /* not an authorized client, close this connection */\n if (!isAuthorized) {\n if (logger.isLoggable(Level.INFO)) {\n logger.log(Level.INFO, \"Client \" + socket + \"it' not authorized. Closing connection...\");\n }\n close();\n }\n\n // register in authorization manager for periodic checks of permissions\n authzManager.registerClient(socket);\n\n // ok pal, let's I agree to talk to you\n super.run();\n }", "@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request,\n\t\t\tMap<String, String> additionalAttrs) {\n\t\tlog.trace (\"Entering decide()\");\n\t\t\n\t\tboolean decision = false;\n\t\t\n\t\t// Extract interesting parts of the HTTP request\n\t\tString method = request.getMethod();\n\t\tAuthzResource resource = new AuthzResource(request.getRequestURI());\n\t\tString subject = (request.getHeader(SUBJECT_HEADER));\t\t // identity of the requester\n\t\tString subjectgroup = (request.getHeader(SUBJECT_HEADER_GROUP)); // identity of the requester by group Rally : US708115\n\n\t\tlog.trace(\"Method: \" + method + \" -- Type: \" + resource.getType() + \" -- Id: \" + resource.getId() + \n\t\t\t\t\" -- Subject: \" + subject);\n\t\t\n\t\t// Choose authorization method based on the resource type\n\t\tResourceType resourceType = resource.getType();\n\t\tif (resourceType != null) {\n\n\t\t\tswitch (resourceType) {\n\n\t\t\tcase FEEDS_COLLECTION:\n\t\t\t\tdecision = allowFeedsCollectionAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tcase SUBS_COLLECTION:\n\t\t\t\tdecision = allowSubsCollectionAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tcase FEED:\n\t\t\t\tdecision = allowFeedAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tcase SUB:\n\t\t\t\tdecision = allowSubAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tdecision = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"Exit decide(): \" + method + \"|\" + resourceType + \"|\" + resource.getId() + \"|\" + subject + \" ==> \" + decision);\n\t\t\n\t\treturn new AuthRespImpl(decision);\n\t}", "void handlePacket(String devReplyStr);", "void makeAuthorizationRequest(OnAuthCompleteListener onAuthCompleteListener);", "private interface PacketHandler{\n\t\tpublic void onPacket(ByteBuffer data) throws Exception;\n\t}", "@Override\n public void onGranted() {\n }", "@Override\n public void onGranted() {\n }", "@OAuthPostAuthorization\n public void postAuthorize() {\n }", "private void internalAuthenticate(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// check P1 and P2\r\n\t\tif ((buffer[ISO7816.OFFSET_P1] != ALG_SHA1_PKCS1) || buffer[ISO7816.OFFSET_P2] != BASIC)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t// receive the data that needs to be signed\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\t// we do not support Lc=0x97, only Lc=0x16\r\n\t\tif ((lc == 0x97) || (byteRead == 0x97))\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\tif ((lc != 0x16) || (byteRead != 0x16))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t// the first data byte must be \"94\" and the second byte is the length\r\n\t\t// (20 bytes)\r\n\t\tif ((buffer[ISO7816.OFFSET_CDATA] != (byte) 0x94) || (buffer[ISO7816.OFFSET_CDATA + 1] != (byte) 0x14))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t// use the basic private key\r\n\t\tJCSystem.beginTransaction();\r\n\t\t////@ open valid(); // auto\r\n\t\t\r\n\t\t//@ transient_byte_arrays_mem(messageBuffer);\r\n\t\t//@ assert transient_byte_arrays(?as);\r\n\t\t//@ foreachp_remove(messageBuffer, as);\r\n\t\t//@ open transient_byte_array(messageBuffer);\r\n\r\n\t\tif (basicKeyPair == null)\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\r\n\t\t//VF: bovenstaande is mogelijk bug in programma!\r\n\t\tcipher.init(basicKeyPair.getPrivate(), Cipher.MODE_ENCRYPT);\r\n\t\t// prepare the message buffer to the PKCS#1 (v1.5) structure\r\n\t\tpreparePkcs1ClearText(messageBuffer, ALG_SHA1_PKCS1, lc);\r\n\t\t// copy the challenge (SHA1 hash) from the APDU to the message buffer\r\n\t\tUtil.arrayCopy(buffer, (short) (ISO7816.OFFSET_CDATA + 2), messageBuffer, (short) 108, (short) 20);\r\n\t\t// generate signature\r\n\t\tcipher.doFinal(messageBuffer, (short) 0, (short) 128, buffer, (short) 0);\r\n\t\t// if T=0, store signature in sigBuffer so that it can latter be sent\r\n\t\tif (APDU.getProtocol() == APDU.PROTOCOL_T1) {\r\n\t\t\tUtil.arrayCopy(buffer, (short) 0, responseBuffer, (short) 0, (short) 128);\r\n\t\t\t// in case T=1 protocol, send the signature immediately in a\r\n\t\t\t// response APDU\r\n\t\t} else {\r\n\t\t\t// send first 128 bytes (= 1024 bit) of buffer\r\n\t\t\tapdu.setOutgoingAndSend((short) 0, (short) 128);\r\n\t\t}\r\n\t\t// decrement internal authenticate counter\r\n\t\t//internalAuthenticateCounter--;\r\n\t\t//@ close transient_byte_array(messageBuffer);\r\n\t\t//@ foreachp_unremove(messageBuffer, as);\r\n\t\t\r\n\t\t////@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t}", "public void interact(MachineInteractPacket packet) {\n }", "public void sendRequest(Pdu packet);", "@Override\n public void onPermissionGranted() {\n }", "public void deliverPacket(Packet packet_) {\n queue.enqueue(packet_);\n sender.wakeUp();\n }", "void SendPacket(int packetIdentifier);", "public boolean doesPrincipalHavePermission(\n IAuthorizationPrincipal principal,\n String owner,\n String activity,\n String target,\n IPermissionPolicy policy)\n throws AuthorizationException;", "public void sendPacket(Packet pPacket) {\n mPacket = pPacket;\r\n \r\n \r\n }", "Set<AttributeDefPrivilege> getPrivs(GrouperSession grouperSession, AttributeDef attributeDef, Subject subj);", "public void sendResponse(Pdu packet);", "private AuthPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protected void tellCanAccess(InetAddress address) {\n\t\tif (!this.agent.isFirstConnection) {\n\t\t\tthis.udpClient.sendUDP(\"canAccess \"+this.agent.getUsername(), address);\n\t\t\t// Une nouvelle personne veut qu'on se connecte à son serveur : on lui donne notre IP d'abord (pour faire le lien IP <-> Username)\n\t\t}\n\t}", "public int send(Packet packet) throws IllegalAccessException {\n return send(packet.toByteArray());\n }", "public interface PermissionListener {\n\n void onGranted(); //授权\n\n void onDenied(List<String> deniedPermission); //拒绝 ,并传入被拒绝的权限\n}", "@Override\n\tpublic void analysisPacket(SocketPacket packet) {\n\t\tActionResult result = submitIRCodeMatch(packet);\n\t\tint resultCode = result.getResultCode();\n\t\tMap<String, Object> replyBody = new HashMap<>();\n\t\tString deviceId = \"\";\n\t\tString strIRCode = \"\";\n\t\tif (result.getOutputObject() != null) {\n\t\t\tDevice device = (Device) result.getOutputObject();\n\t\t\tdeviceId = device.getDeviceId();\n\t\t\tif (device.getStandardIRCode() !=null){\n\t\t\t\tstrIRCode = MyBase64.encode(device.getStandardIRCode().getIRCodeData());\n\t\t\t}\n\t\t}\n\t\treplyBody.put(\"DeviceId\", deviceId);\n\t\treplyBody.put(\"IRCode\", strIRCode);\n\n\t\tsend.sendPacket(packet, packet.getControllerId(), packet.getExtensionId(),\n\t\t\t\tSocketPacket.COMMAND_ID_SUBMIT_MATCH_IRCODE, resultCode, \"1.0\",\n\t\t\t\treplyBody);\n\t}", "@Override\n\tprotected void doIsPermitted(String arg0, Handler<AsyncResult<Boolean>> arg1) {\n\t\t\n\t}", "@Override\n public void onPermissionGranted() {\n }", "@Override\n\tpublic void grant(User subject, Permission permission)\n\t{\n\t\t//TODO figure out how to implement since we're using role based permissions\n\t}", "public AuthPacket()\n\t{\n\t\tuserID = \"\";\n\t\tpassword = \"\";\n\t\tstudentName = \"\";\n\t\tnew_password = \"\";\n\t\tchangePass = false;\n\t\tgrantAccess = false;\n\t\tstandard = -1;\n\t\terrorCode = -1;\n\t}", "private void respAuth() throws Exception {\n DataOutputStream dos = new DataOutputStream(os);\n dos.writeInt(1);\n dos.writeByte(Message.MSG_RESP_AUTH);\n if (haslogin) {\n dos.writeByte(Message.SUCCESS_AUTH);\n } else {\n dos.writeByte(Message.FAILED_AUTH);\n }\n }", "@Override\n public void checkPermission(final Permission permission) {\n List<Class> stack = Arrays.asList(getClassContext());\n\n // if no blacklisted classes are in the stack (or not recursive)\n if (stack.subList(1, stack.size()).contains(getClass()) || Collections.disjoint(stack, classBlacklist)) {\n // allow everything\n return;\n }\n // if null/custom and blacklisted classes present, something tried to access this class\n if (permission == null || permission instanceof StudentTesterAccessPermission) {\n throw new SecurityException(\"Security check failed.\");\n }\n // else iterate over all active policies and call their respective methods\n PermissionContext pc = new PermissionContext(stack, permission, instance);\n for (var policy : policies) {\n try {\n policy.getConsumer().accept(pc);\n } catch (SecurityException e) {\n triggered = true;\n // Illegal attempt caught, log an error or do smth\n LOG.severe(String.format(\"Illegal attempt caught: %s\", permission.toString()));\n throw e;\n }\n\n }\n }", "private void checkAuthorization(RoutingContext context, List<CaptureMap> resolvedCaptureCollections,\n Handler<AsyncResult<Boolean>> handler) {\n AuthHandler auth = context.get(AuthenticationController.AUTH_HANDLER_PROP);\n if (auth != null && auth instanceof RedirectAuthHandlerBt) {\n MemberUtil.getCurrentUser(context, getNetRelay(), result -> {\n if (result.failed()) {\n handler.handle(Future.failedFuture(result.cause()));\n } else {\n IAuthenticatable member = result.result();\n if (member == null) {\n // this is an error\n handler.handle(Future.failedFuture(\n new IllegalArgumentException(\"This should not happen, we need an instance of IAuthenticatable here\")));\n } else {\n checkAuthorization(resolvedCaptureCollections, auth, member, handler);\n }\n }\n });\n } else {\n handler.handle(Future.succeededFuture(true));\n }\n }", "void privilegeCopy(GrouperSession grouperSession, AttributeDef attributeDef1, AttributeDef attributeDef2, Privilege priv)\r\n throws InsufficientPrivilegeException, GrantPrivilegeException, SchemaException;", "void requestNeededPermissions(int requestCode);", "Privilege getPrivilege();", "Transfer updateAuthorizationData(Long id, Transfer.Status status, AuthorizationLevel nextLevel, Calendar processDate);", "public interface IAuthorizationCompletionCallback {\n /**\n * Send the authorization challenge response back to the activity.\n *\n * @param response challenge response\n */\n void onChallengeResponseReceived(@NonNull final RawAuthorizationResult response);\n\n void setPKeyAuthStatus(boolean status);\n}", "public void onPermissionGranted() {\n\n }", "public abstract void\n verifyOriginalPacket_(CertificateV2 trustedCertificate);", "private boolean isAuthorized() {\n return true;\n }", "public void sendBindResponse(Pdu packet);", "public void performAbility() { return; }", "private static boolean isAuthorized(\n @Nonnull Authorizer authorizer,\n @Nonnull String actor,\n @Nonnull ConjunctivePrivilegeGroup requiredPrivileges,\n @Nonnull Optional<ResourceSpec> resourceSpec) {\n for (final String privilege : requiredPrivileges.getRequiredPrivileges()) {\n // Create and evaluate an Authorization request.\n final AuthorizationRequest request = new AuthorizationRequest(actor, privilege, resourceSpec);\n final AuthorizationResult result = authorizer.authorize(request);\n if (AuthorizationResult.Type.DENY.equals(result.getType())) {\n // Short circuit.\n return false;\n }\n }\n return true;\n }", "private SMTP checkAuth(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString auth = request.getHeader(\"Authorization\");\n\t\t\n\t\tif (auth == null) {\n\t\t\tsend(response, 401, \"Authorisation Needed\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\t\n\t\tString[] creds = auth.split(\" \");\n\t\tif (!creds[0].equalsIgnoreCase(\"Basic\")) {\n\t\t\tsend(response, 501, \"Only Basic authentication is available - \" + creds[0] + \" is not acceptable\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcreds[1] = new String(Base64.decode(creds[1]));\n\t\t} catch (Base64DecodingException e) {\n\t\t\tsend(response, 400, \"invalid base64 in authorization header\");\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tint split = creds[1].indexOf(\":\");\n\t\t\tif (split == -1) {\n\t\t\t\tsend(response, 400, \"malformed authorization header (missing colon)\");\n\t\t\t}\n\t\t\tSMTP a = new SMTP(getSettings(creds[1].substring(0, split),\n\t\t\t\t\t \t\t\t creds[1].substring(split + 1)));\n\t\t\treturn a;\n\t\t} catch (AuthenticationFailedException e) {\n\t\t\tsend(response, 401, \"Authentication Failed\");\n\t\t} catch (MessagingException e ) {\n\t\t\tsend(response, 500, \"Internal Server error\");\n\t\t}\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n int i = 3;\n boolean state;\n do {\n if (i == 0) {\n System.out.println(\"Acess denied\");\n break;\n }\n state = auth();\n if (!state) {\n i--;\n if (i >= 1) {\n System.out.println(\"You have \" + i + \" chances\");\n }\n } else {\n System.out.println(\"Acess granted\");\n }\n } while (!state);\n }", "@Override\n public void onPacket(PacketEvent event) {\n User user = event.getUser();\n\n switch (event.getType()) {\n\n case Packet.Client.USE_ENTITY: {\n WrappedInUseEntityPacket useEntityPacket = new WrappedInUseEntityPacket(event.getPacket(), user.getPlayer());\n\n if (useEntityPacket.getAction() == WrappedInUseEntityPacket.EnumEntityUseAction.ATTACK) {\n\n float yawDifference = MathUtil.wrapAngleTo180_float(Math.abs(user.getCurrentLocation().getYaw()\n - user.getLastLocation().getYaw()));\n\n if (yawDifference > 99.99 && user.getMovementProcessor().getDeltaXZ() > 0.005) {\n if (yawDifference != 360) {\n flag(user, \"Head Snapping\", \"\"+yawDifference);\n }\n }\n }\n break;\n }\n\n case Packet.Client.FLYING:\n case Packet.Client.LOOK:\n case Packet.Client.POSITION_LOOK:\n case Packet.Client.POSITION: {\n\n /* float yawDifference = Math.abs(user.getCurrentLocation().getYaw()\n - user.getLastLocation().getYaw());\n\n yawGCD = MathUtil.gcd((long) (yawDifference * offset), (long) (lastDeltaYaw * offset));\n double yawGcd = yawGCD / offset;\n mouseX = (int) (Math.abs((yawDifference)) / yawGcd);\n\n lastDeltaYaw = yawDifference; */\n\n break;\n }\n\n }\n }", "public void nextPacket(PcapHeader header, JBuffer buffer, T user);", "@Override\n\tpublic void parse(Packet packet) {\n\t}", "private void dispatch(byte[] packet)\n\t{\n\t\ttry\n\t\t{\n\t\t\tSPELLmessage smsg = SPELLmessageFactory.createMessage(packet);\n\t\t\tif (smsg != null)\n\t\t\t{\n\t\t\t\tString msgId = smsg.getSender() + \"-\" + smsg.getReceiver();\n\t\t\t\tif (smsg instanceof SPELLmessageResponse || smsg instanceof SPELLmessageError)\n\t\t\t\t{\n\t\t\t\t\tmsgId += \":\" + smsg.getSequence();\n\t\t\t\t\tm_interface.incomingResponse(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageNotify || smsg instanceof SPELLmessagePrompt)\n\t\t\t\t{\n\t\t\t\t\tm_interface.incomingMessage(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageRequest)\n\t\t\t\t{\n\t\t\t\t\tmsgId += \":\" + smsg.getSequence();\n\t\t\t\t\tm_interface.incomingRequest(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageNotifyAsync || smsg instanceof SPELLmessageDisplay || smsg instanceof SPELLmessageOneway)\n\t\t\t\t{\n\t\t\t\t\tm_interface.incomingMessage(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageEOC)\n\t\t\t\t{\n\t\t\t\t\tLogger.warning(\"Received EOC from server\", Level.COMM, this);\n\t\t\t\t\tsetWorking(false);\n\t\t\t\t\tm_interface.commFailure(\"Connection lost\", \"Server sent EOC\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString msg = \"CANNOT PROCESS MSG TYPE: \" + packet;\n\t\t\t\t\tSystem.err.println(msg);\n\t\t\t\t\tLogger.error(msg, Level.COMM, this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tSystem.err.println(packet);\n\t\t\tex.printStackTrace();\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.COMM, this);\n\t\t}\n\t}", "public void testAllowDeterminedByRuleOrder()\n {\n assertTrue(_ruleSet.addGroup(\"aclgroup\", Arrays.asList(new String[] {\"usera\"})));\n \n _ruleSet.grant(1, \"usera\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"aclgroup\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "@Listen\r\n public void onPacket(PacketEvent e) {\r\n\r\n if (e.getType().equalsIgnoreCase(Packet.Client.POSITION)) {\r\n if ((System.currentTimeMillis() - e.getUser().getCombatData().getLastUseEntityPacket()) < 1000L\r\n && Math.abs(e.getTo().getPitch() - e.getFrom().getPitch()) > 0.01) {\r\n double yaw = e.getUser().getMovementData().getTo().getYaw();\r\n double sensitivity = e.getUser().getMiscData().getClientSensitivity();\r\n\r\n float f = (float) (sensitivity * 0.6F + 0.2F);\r\n float gcd = f * f * f * 1.2F;\r\n\r\n yaw = -yaw % gcd;\r\n\r\n double real = Math.abs(e.getUser().getMovementData().getTo().getYaw());\r\n\r\n if (real == e.getUser().getCheckData().lastAimMDiff && yaw == e.getUser().getCheckData().lastAimMDiff2) {\r\n\r\n if ((System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) < 1500L) {\r\n e.getUser().getCheckData().aimMVerbose++;\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && (System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) > 1000l)\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMPossibleLag = System.currentTimeMillis();\r\n\r\n if (e.getUser().getCheckData().aimMVerbose > 2) {\r\n flag(e.getUser(), \"verbose=\"+e.getUser().getCheckData().aimMVerbose, \"spoof=\"+yaw, \"real=\"+real);\r\n }\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && TimeUtils.secondsFromLong(e.getUser().getCheckData().lastAimMPossibleLag) > 2L) {\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMDiff = real;\r\n e.getUser().getCheckData().lastAimMDiff2 = yaw;\r\n\r\n }\r\n }\r\n }", "public void nextPacket(JPacket packet, String user) {\r\n\t\t\t}", "public void authorizeTransaction() {}", "@Override\n public void processPacket(UUID playerUUID, PacketBase packet) {\n System.out.println();\n System.out.println(\"Processing packet @ \" + packet);\n System.out.println();\n if(packet instanceof ClientSendInputPacket) {\n Direction direction = ((ClientSendInputPacket) packet).getClientInputType().getDirection();\n Player movingPlayer = currentPlayers.get(playerUUID);\n movingPlayer.getPlayerEntity().move(movingPlayer.getPlayerEntity().getLocation().getOffsetDirectionLocation(direction), EntityMovementType.WALKING);\n }\n }", "@Override\n public void checkPermission(Permission perm) {\n }", "abstract public boolean checkAuth(String userId) throws IOException;", "@Override\n\t\t\tpublic void authenticated(AuthResponse r) {\n\t\t\t\tif (r != null && r.error() == null) {\n//\t\t\t\t\tSystem.out.println(\" auth making api call\");\n\t\t\t\t\ttrigger.setEnabled(false); // .removeFromParent(); // .setEnabled(false);//.getStyle().setProperty(\"visibility\", \"hidden\");\n\t\t\t\t\tready.authenticated(r); \n//\t\t\t\t\tready.run();\n\t\t\t\t} else {\n//\t\t\t\t\tSystem.out.println(\" auth not making api call\");\n\t\t\t\t\ttrigger.setEnabled(true);\n\t\t\t\t\ttrigger.addTriggerHandler(new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// handleAuthClick();\n\t\t\t\t\t\t\tGAPI.get()\n\t\t\t\t\t\t\t\t\t.auth()\n\t\t\t\t\t\t\t\t\t.authorize(AuthRequest.create().client_id(clientId).scope(scope).immediate(false),\n\t\t\t\t\t\t\t\t\t\t\thandleAuthResult);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}", "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\t Authorization getAuthorization()\n { return (Authorization) this.getHeader(AuthorizationHeader.NAME); }", "public void packetReceived(NIOSocket socket, byte[] packet)\n {\n String message = new String(packet).trim();\n\n // Ignore empty lines\n if (message.length() == 0) return;\n\n // Reset inactivity timer.\n scheduleInactivityEvent();\n\n // In this protocol, the first line entered is the name.\n if (m_name == null)\n {\n // User joined the chat.\n m_name = message;\n System.out.println(this + \" logged in.\");\n m_server.broadcast(this, m_name + \" has joined the chat.\");\n m_socket.write((\"Welcome \" + m_name + \". There are \" + m_server.m_users.size() + \" user(s) currently logged in.\").getBytes());\n return;\n }\n m_server.broadcast(this, m_name + \": \" + message);\n }", "@Override\n public boolean execute(Context ctx) {\n AccessContext accessCtx = (AccessContext)ctx;\n HttpServletRequest req = accessCtx.getHttpRequest();\n HttpServletResponse resp = accessCtx.getHttpResponse();\n String contextPath = req.getContextPath();\n LogUtils.logDebug(logger, \"getContextPath: \", contextPath);\n\n if (this.authLevel >= AUTH_LEVEL_LOGGED_IN) {\n if (!accessCtx.containsAttribute(AccessContext.KEY_USER_ITEM)) {\n throw new IllegalStateException(\n \"User Item was not found, perhaps LoadUserItemCommand was not executed\");\n }\n }\n // From this point accessCtx.getUserItem is a valid entry.\n\n if (this.authLevel >= AUTH_LEVEL_LOGGED_IN) {\n if (accessCtx.getUserItem() == null) {\n try {\n if (accessCtx.getDatasetItem() == null) {\n // If datasetItem not exists, redirect to login page.\n String redirUrl = contextPath + AccessFilter.REDIRECT_LOGIN;\n LogUtils.logDebug(logger,\n \"Not logged in, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } else {\n // If datasetItem exists, then redirect to Dataset Overview page.\n String redirUrl = contextPath + AccessFilter.REDIRECT_DATASET_INFO\n + \"?datasetId=\" + accessCtx.getDatasetId()\n + \"&access_redir=1\";\n LogUtils.logDebug(logger,\n \"(1)Not authorized for this dataset, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n\n // from this point accessCtx.getUserItem is a valid object.\n\n if (this.authLevel == AUTH_LEVEL_AUTHORIZED_FOR_DS) {\n if (!accessCtx.containsAttribute(AccessContext.KEY_IS_AUTHORIZED_FOR_DS)) {\n throw new IllegalStateException(\n \"IsAuthorizedForDataset was not set. \"\n + \"Perhaps LoadDatsetCommand was not executed.\");\n }\n\n if (!accessCtx.isAuthorizedForDataset()) {\n try {\n String redirUrl = contextPath + AccessFilter.REDIRECT_DATASET_INFO\n + \"?datasetId=\" + accessCtx.getDatasetId()\n + \"&access_redir=1\";\n LogUtils.logDebug(logger,\n \"(2)Not authorized for this dataset, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n\n if (this.authLevel == AUTH_LEVEL_ADMIN) {\n if (!accessCtx.getUserItem().getAdminFlag()) {\n try {\n String redirUrl = AccessFilter.REDIRECT_INDEX_JSP;\n LogUtils.logDebug(logger,\n \"Not admin, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n return false;\n }" ]
[ "0.57649076", "0.575914", "0.5664304", "0.55496037", "0.5496955", "0.54357165", "0.5266186", "0.5136592", "0.5108895", "0.5072046", "0.506507", "0.504859", "0.50130594", "0.5012161", "0.49993733", "0.4957722", "0.4942805", "0.49035406", "0.4902781", "0.49001288", "0.4893326", "0.4890058", "0.48463842", "0.48454052", "0.48354617", "0.4830952", "0.4801826", "0.47493774", "0.474412", "0.47422144", "0.47401443", "0.47283068", "0.47277892", "0.4704384", "0.47028816", "0.4702504", "0.46975678", "0.4687867", "0.4650992", "0.46413952", "0.46334177", "0.46293345", "0.4620544", "0.46125793", "0.46060908", "0.45996457", "0.45875695", "0.45875695", "0.4570224", "0.4565864", "0.4554412", "0.45430452", "0.4511516", "0.45086724", "0.4504124", "0.4502803", "0.44920653", "0.44867897", "0.44856054", "0.44798598", "0.44723463", "0.4471195", "0.44697285", "0.4466924", "0.44587663", "0.44585794", "0.44559315", "0.44473886", "0.44415975", "0.44409186", "0.444082", "0.4437717", "0.44292802", "0.44275668", "0.4421404", "0.4420302", "0.4418005", "0.4414736", "0.4414555", "0.44063458", "0.44041318", "0.4403684", "0.4392643", "0.43860456", "0.43718052", "0.43653613", "0.43617466", "0.43580574", "0.43469143", "0.4345463", "0.43453678", "0.43397853", "0.4334071", "0.43279377", "0.43273622", "0.43272358", "0.43187866", "0.4316259", "0.43146825", "0.43089142" ]
0.61064327
0
Handles a probe. For each key that is handled, the key and its result should be in the returned map.
Map<String,String> handleProbe(String... keys);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Map<String, Serializable> getEventKeyAndIdMap();", "@Test\n public void mapKeys() {\n check(MAPKEYS);\n query(\"for $i in \" + MAPKEYS.args(\n MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i+1\"))) + \" order by $i return $i\", \"1 2 3\");\n query(\"let $map := \" + MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i + 1\")) +\n \"for $k in \" + MAPKEYS.args(\"$map\") + \" order by $k return \" +\n MAPGET.args(\"$map\", \"$k\"), \"2 3 4\");\n }", "int locate(Entry probe)\n {\n if (keys == null)\n sortedKeys();\n int lo = 0, hi = keys.length - 1;\n while (lo <= hi) {\n int mid = (lo + hi) / 2;\n int cmp = comparator.compare(probe, keys[mid]);\n if (cmp < 0)\n hi = mid - 1;\n else if (cmp > 0)\n lo = mid + 1;\n else\n return mid; // found\n }\n return lo;\n }", "public static Map getInfo(String key) throws Exception {\r\n return (Hashtable) Listener.cachedContent.get(key);\r\n }", "public abstract void map(String key, String value) throws Exception;", "ProbeResult run();", "String lookupKey(String key) throws CommunicationFailureException, TimeoutReachedException, NoSuccessorsExceptions;", "public abstract Function<E, K> keyExtractor();", "private static Map<String, Set<String>> getPotionToReagentsTestCaseMap()\n\t{\n\t\t// Set up the potions manual for this particular test case.\n\t\tList<PotionInfo> potionsManual = getPotionsManual();\n\n\t\t// Build a potion -> reagents map from this potions manual.\n\t\tMap<String, Set<String>> map = PotionMaster.potionToReagentsMap(potionsManual);\n\n\t\t// Check that the resulting map has exactly the right contents.\n\t\tif (!checkPotionToReagentsMapContents(map))\n\t\t{\n\t\t\tSystem.out.println(\"Incorrect map. Aborting test case.\");\n\t\t\tPotionInfo.printMap(map);\n\n\t\t\t// Kill the program.\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\treturn map;\n\t}", "public abstract boolean lookup(Key key);", "public Map<String, C0148k> call() throws Exception {\n HashMap hashMap = new HashMap();\n long elapsedRealtime = SystemClock.elapsedRealtime();\n hashMap.putAll(m471c());\n hashMap.putAll(m472d());\n StringBuilder sb = new StringBuilder();\n sb.append(\"finish scanning in \");\n sb.append(SystemClock.elapsedRealtime() - elapsedRealtime);\n C0135c.m449h().mo273b(\"Fabric\", sb.toString());\n return hashMap;\n }", "private int probe(K key, int i, int size)\r\n\t{\r\n\t\t// Use quadratic probing of the form: (i^2 + i) / 2\r\n\t\treturn (hash(key) + ((int) (Math.pow(i, 2) + i) >> 2)) % size;\r\n\t}", "public Object map(String key, Object input);", "String lookupKeyBasic(String key) throws CommunicationFailureException, TimeoutReachedException, NoSuccessorsExceptions;", "public static void main(String[] args) {\n\t\t\n\t\tMap<Integer,Employee> map = new HashMap<Integer, Employee>();\n\t\tMap<String, Employee> hashMap = new HashMap();\n\t\tMap<Employee, Integer> hashMap1 = new HashMap();\n\t\tfor (int i =1; i<=10; i++){\n\t\t\t\n\t\t\tmap.put(i, new Employee(i+3, \"Manish\"+(i+3)));\n\t\t}\n\t\tSystem.out.println(map);\n\t\t\n\t\tEmployee emp1 = new Employee(4, \"Manish3\");\n\t\t//Use of Contains\n\t\tSystem.out.println(map.containsValue(emp1)); \n\t\t\n\t\t//Key Set\n\t\tSystem.out.println(map.keySet());\n\t\t\n\t\t//retrieve entry set\n\t\tSystem.out.println(map.entrySet());\n\t\t\n\t\t//map.forEach(action);; TO DO- need to understand this method\n\t\t\n\n\t\t//Returns in sorted order when Key is natural (permitives or String or Enum)\n\t\thashMap.put(\"A\", new Employee(1, \"Manish\"));\n\t\thashMap.put(\"C\", new Employee(3, \"Gaurav\"));\n\t\thashMap.put(\"B\", new Employee(2, \"Vinay\"));\n\t\tSystem.out.println(hashMap);\n\t\t\n\t\t//maintains insertion order when key is Object type(dont have any natural order)\n\t\thashMap1.put(new Employee(1, \"Manish\"),1);\n\t\thashMap1.put(new Employee(3, \"Gaurav\"),3);\n\t\thashMap1.put(new Employee(2, \"Vinay\"),2);\n\t\tSystem.out.println(hashMap1);\n\t\tHashMap<Long, String> masterRoomPoolMapping = new HashMap<Long, String>();\n\t\tmasterRoomPoolMapping.put(new Long(123), \"Manish\");\n\t\tmasterRoomPoolMapping.put(new Long(124), \"Manish\");\n\t\tmasterRoomPoolMapping.put(new Long(125), \"Manish\");\n\t\tSystem.out.println(\"***************************************************\");\n\t\tSet<Long> keySet = masterRoomPoolMapping.keySet();\n\t\tSet<Long> newKeySet = new HashSet<Long>();\n\t\tfor(Long key : keySet){\n\t\t\tnewKeySet.add(new Long(key));\n\t\t}\n\t\tSystem.out.println(\"newKeySet***************************************************\");\n\t\tif(newKeySet.contains(new Long(123)))\n\t\t\tnewKeySet.remove(new Long(123));\n\t\tfor(Long key : newKeySet){\n\t\t\tSystem.out.println(key);\n\t\t}\n\t\tSystem.out.println(\"keySet1***************************************************\");\n\t\tSet<Long> keySet1 = masterRoomPoolMapping.keySet();\n\t\tfor(Long key : keySet1){\n\t\t\tSystem.out.println(masterRoomPoolMapping.get(key));\n\t\t}\n\t\tSystem.out.println(\"***************************************************\");\n\t\tSystem.out.println(masterRoomPoolMapping);\n\t}", "protected abstract void initKeyNameMapping(Context context, HashMap<String, RemoteKey> keyMapping);", "public V lookup(K key);", "public <K> Map<String, ?> get(K key);", "private Map<DoubleArrayWrapper, List<Example>> createKeyMapping(ExampleSet exampleSet, Attribute[] keyAttributes,\n\t\t\tAttribute[] matchKeyAttributes) {\n\t\tMap<DoubleArrayWrapper, List<Example>> keyMapping = new HashMap<>();\n\n\t\tassert keyAttributes.length == matchKeyAttributes.length;\n\n\t\t// create mapping from nominal values of keyAttributes to matchKeyAttributes\n\t\tMap<Attribute, Map<Double, Double>> valueMapping = null;\n\t\tif (matchKeyAttributes != null) {\n\t\t\tvalueMapping = new HashMap<>();\n\t\t\tfor (int attributeNumber = 0; attributeNumber < keyAttributes.length; ++attributeNumber) {\n\t\t\t\tif (keyAttributes[attributeNumber].isNominal()) {\n\t\t\t\t\tMap<Double, Double> valueMap = new HashMap<>();\n\t\t\t\t\t// TODO: iterate over getMappint().values() rather than relying on the\n\t\t\t\t\t// assumption that values appear in increasing order\n\t\t\t\t\tfor (int valueNumber = 0; valueNumber < keyAttributes[attributeNumber].getMapping()\n\t\t\t\t\t\t\t.size(); ++valueNumber) {\n\t\t\t\t\t\tString valueString = keyAttributes[attributeNumber].getMapping().mapIndex(valueNumber);\n\t\t\t\t\t\tvalueMap.put((double) valueNumber,\n\t\t\t\t\t\t\t\t(double) matchKeyAttributes[attributeNumber].getMapping().mapString(valueString));\n\t\t\t\t\t}\n\t\t\t\t\tvalueMapping.put(keyAttributes[attributeNumber], valueMap);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdouble[] keyValues;\n\n\t\tfor (Example example : exampleSet) {\n\t\t\tboolean continueIteration = false;\n\t\t\t// fetch key values from example\n\t\t\tkeyValues = getKeyValues(example, keyAttributes);\n\t\t\tif (valueMapping != null) {\n\t\t\t\t// remap keyValues to match values of other attributes:\n\t\t\t\tfor (int i = 0; i < keyValues.length; ++i) {\n\t\t\t\t\tif (Double.isNaN(keyValues[i])) {\n\t\t\t\t\t\tcontinueIteration = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (keyAttributes[i].isNominal()) {\n\t\t\t\t\t\tkeyValues[i] = valueMapping.get(keyAttributes[i]).get(keyValues[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (continueIteration) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// check if this key is in keyMapping. If not, add:\n\t\t\tList<Example> keyExamples = keyMapping.get(new DoubleArrayWrapper(keyValues));\n\t\t\tif (keyExamples != null) {\n\t\t\t\t// add current example:\n\t\t\t\tkeyExamples.add(example);\n\t\t\t} else {\n\t\t\t\t// create set and add to keyMapping:\n\t\t\t\tkeyExamples = new LinkedList<>();\n\t\t\t\tkeyExamples.add(example);\n\t\t\t\tkeyMapping.put(new DoubleArrayWrapper(keyValues), keyExamples);\n\t\t\t}\n\t\t}\n\t\t;\n\t\treturn keyMapping;\n\t}", "public static void main(String[] args) {\n\t\t HashMap<Integer, String> map = new HashMap<Integer, String>();\r\n map.put(1, \"Java\");\r\n map.put(2, \"Python\");\r\n map.put(3, \"Selenium\");\r\n int keyToBeChecked = 5;\r\n System.out.println(\"HashMap: \"+ map);\r\n\t\tIterator<Map.Entry<Integer, String> >\r\n\t\titerator = map.entrySet().iterator();\r\n\t\tboolean isKeyPresent = false;\r\n\t\twhile (iterator.hasNext()) {\r\n\t\tMap.Entry<Integer, String> entry = iterator.next();\r\n\t\tif (keyToBeChecked == entry.getKey()) {\r\n\t\t\r\n\t\t isKeyPresent = true;\r\n\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Does key \"+ keyToBeChecked+ \" exists: \"+ isKeyPresent);\r\n\t}", "public abstract boolean apply( String inputKey, Object input, WalkedPath walkedPath, Map<String,Object> output );", "public HashMap<String, String> getLovKeyMappings(HashMap<String, String> lov2osdMap) {\n\t\t// ...\n\t\treturn lov2osdMap;\n\t}", "private static Map<String, Set<String>> getReagentToPotionsTestCaseMap()\n\t{\n\t\t// Set up the potions manual for this particular test case.\n\t\tList<PotionInfo> potionsManual = getPotionsManual();\n\n\t\t// Build a reagent -> potions map from this potions manual.\n\t\tMap<String, Set<String>> map = PotionMaster.reagentToPotionsMap(potionsManual);\n\n\t\t// Check that the resulting map has exactly the right contents.\n\t\tif (!checkReagentToPotionsMapContents(map))\n\t\t{\n\t\t\tSystem.out.println(\"Incorrect map. Aborting test case.\");\n\t\t\tPotionInfo.printMap(map);\n\n\t\t\t// Kill the program.\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\treturn map;\n\t}", "public void probe(String event) {\n profile.add(event);\n }", "String getLookupKey();", "Object visitMapOfObjects(MapOfObjectsNode node, Object state);", "@Override\r\n public Map<K, ICacheElement<K, V>> processGetMatching(final String pattern)\r\n {\r\n final Map<K, ICacheElement<K, V>> elements = new HashMap<>();\r\n Set<K> keyArray = null;\r\n storageLock.readLock().lock();\r\n try\r\n {\r\n keyArray = new HashSet<>(keyHash.keySet());\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n final Set<K> matchingKeys = getKeyMatcher().getMatchingKeysFromArray(pattern, keyArray);\r\n\r\n for (final K key : matchingKeys)\r\n {\r\n final ICacheElement<K, V> element = processGet(key);\r\n if (element != null)\r\n {\r\n elements.put(key, element);\r\n }\r\n }\r\n return elements;\r\n }", "protected Map getKeyMethodMap() {\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"cmd.planilla.lista\", \"lista\");\n\t\tmap.put(\"cmd.planilla.buscar\", \"buscar\");\n\t\tmap.put(\"cmd.planilla.verificar\", \"verificar\");\n\t\tmap.put(\"cmd.planilla.cargar\", \"cargar\");\n\t\tmap.put(\"cmd.planilla.actualizar\", \"actualizar\");\n\t\tmap.put(\"cmd.planilla.generar\", \"generar\");\n\t\tmap.put(\"cmd.planilla.cargaFin\", \"cargaFin\");\n\t\tmap.put(\"cmd.planilla.descEmpleadoFiador\", \"descEmpleadoFiador\");\n\t\tmap.put(\"cmd.planilla.verReporte\", \"verReporte\");\n\t\treturn map;\n\t}", "public abstract Map<Object,Map<String,Integer>> getEventHandlerCounts();", "protected Map initDefaultLookupMap(HttpServletRequest request) {\r\n\t\tMap lookupMap = new HashMap();\r\n\t\tthis.keyMethodMap = this.getKeyMethodMap();\r\n\r\n\t\tModuleConfig moduleConfig = (ModuleConfig) request\r\n\t\t\t\t.getAttribute(Globals.MODULE_KEY);\r\n\r\n\t\tMessageResourcesConfig[] mrc = moduleConfig\r\n\t\t\t\t.findMessageResourcesConfigs();\r\n\r\n\t\t// Look through all module's MessageResources\r\n\t\tfor (int i = 0; i < mrc.length; i++) {\r\n\t\t\tMessageResources resources = this.getResources(request, mrc[i]\r\n\t\t\t\t\t.getKey());\r\n\r\n\t\t\t// Look for key in MessageResources\r\n\t\t\tIterator iter = this.keyMethodMap.keySet().iterator();\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tString key = (String) iter.next();\r\n\t\t\t\tString text = resources.getMessage(Locale.ENGLISH, key);\r\n\r\n\t\t\t\t// Found key and haven't added to Map yet, so add the text\r\n\t\t\t\tif ((text != null) && !lookupMap.containsKey(text)) {\r\n\t\t\t\t\tlookupMap.put(text, key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lookupMap;\r\n\t}", "Map<String, String> getKeys(GetKeysOptions opts) throws P4JavaException;", "public V get(Object key) { return _map.get(key); }", "private static void iterateThroughHashMapJava8(Map<String, Integer> crunchifyMap) {\n\t\tcrunchifyMap.forEach((k, v) -> {\n\t\t\tSystem.out.println(\"Key: \" + k + \"\\t\\t Value: \" + v);\n\t\t});\n \n\t}", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowerEntry(@Nullable final K key);", "XClass getMapKey();", "void collect(Object key, float score);", "public static void main(String[] args) {\n\n\t\tHashMap<String,String> hm = new HashMap<String, String>();\n\t\t\n\t\thm.put(\"e\",\"a1\");\n\t\thm.put(\"b\",\"a1\");\n\t\thm.put(\"a\",\"a2\");\n\t\t \n\t\thm.put(\"a\",\"a5\");\n\t\t\n\t\tSet s = hm.entrySet();\n\t\tIterator it = s.iterator();\n\t\t\n\t\tfor(Map.Entry me : hm.entrySet())\n\t\t\tSystem.out.println(me.getKey()+\" \"+me.getValue());\n\t\t\n\t\t\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tMap.Entry mentry = (Map.Entry) it.next();\n\t\t\tSystem.out.println(mentry.getKey() +\" \"+mentry.getValue());\n\t\t\t\n\t\t}\n\t\t\n\tMap<String,String> thmp = \tnew TreeMap<String,String> (hm);\n\tSystem.out.println();\n\tfor(Map.Entry g : thmp.entrySet())\n\t\tSystem.out.println(g.getKey()+\" \"+g.getValue());\n\t\n\t\n\tSystem.out.println(hm.containsKey(\"a\")+\" \"+hm.containsValue(\"a5\"));\n\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void prepareKeys() {\n\t\tfor (RecordKey key : paramHelper.getPushingKeys())\n\t\t\taddReadKey(key);\n\t}", "@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}", "@Override\n\t\tpublic void map(Text key, Text value,\n\t\t\t\tOutputCollector<Text, Text> output, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\tfor (String word : words) {\n\t\t\t\tif (key.toString().equals(word)) {\n\t\t\t\t\tString[] outVals = parseOutValue(value.toString(), filemap)\n\t\t\t\t\t\t\t.split(\"\\n\");\n\t\t\t\t\tfor (String val : outVals) {\n\t\t\t\t\t\tString outkey = val.substring(0, val.indexOf('['));\n\t\t\t\t\t\tString outval = word + \"::\"\n\t\t\t\t\t\t\t\t+ val.substring(val.indexOf(':') + 1);\n\t\t\t\t\t\toutput.collect(new Text(outkey), new Text(outval));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "HashMap <String, Command> getMap();", "@Override\n public void process(HashMap<K, V> tuple)\n {\n for (Map.Entry<K, V> e: tuple.entrySet()) {\n MutableDouble val = basemap.get(e.getKey());\n if (!doprocessKey(e.getKey())) {\n continue;\n }\n if (val == null) { // Only process keys that are in the basemap\n val = new MutableDouble(e.getValue().doubleValue());\n basemap.put(cloneKey(e.getKey()), val);\n continue;\n }\n double change = e.getValue().doubleValue() - val.value;\n double percent = (change/val.value)*100;\n if (percent < 0.0) {\n percent = 0.0 - percent;\n }\n if (percent > percentThreshold) {\n HashMap<V,Double> dmap = new HashMap<V,Double>(1);\n dmap.put(cloneValue(e.getValue()), percent);\n HashMap<K,HashMap<V,Double>> otuple = new HashMap<K,HashMap<V,Double>>(1);\n otuple.put(cloneKey(e.getKey()), dmap);\n alert.emit(otuple);\n }\n val.value = e.getValue().doubleValue();\n }\n }", "protected abstract Map<Map<String, Serializable>, String> getWaitersMap();", "@Override\n\tpublic void handleKeyInputs(Map<Integer, Boolean> keys) {\n\t\t\n\t}", "private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }", "protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}", "protected JavaPairRDD<K, Tuple2<K, V>> performMappingPart(JavaRDD<KeyValueObject<KEYIN, VALUEIN>> pInputs) {\n guaranteePathReader();\n IMapperFunction map = getMap();\n\n MapFunctionAdaptor<KEYIN, VALUEIN, K, V> ma = new MapFunctionAdaptor<KEYIN, VALUEIN, K, V>(map);\n\n JavaRDD<KeyValueObject<K, V>> mappedKeys = pInputs.flatMap(ma);\n JavaPairRDD<K, Tuple2<K, V>> kkv = mappedKeys.mapToPair(new KeyValuePairFunction<K, V>());\n kkv = kkv.sortByKey();\n return kkv;\n }", "public void filter(Map<String,String> output, String key, String value,\n\t\t\tfinal ResultURIConverter uriConverter, CaptureSearchResult result);", "public static Map<String, String> getPromLookupDetails(int envId, String platform) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria promLookCriteria = session.createCriteria(PromLookupEntity.class, \"promLook\");\n\t\tpromLookCriteria.createCriteria(\"promLook.component\", \"comp\");\n\t\tpromLookCriteria.add(Restrictions.eq(\"comp.platform\", platform));\n\t\tpromLookCriteria.add(Restrictions.eq(\"promLook.environment.environmentId\", envId));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<PromLookupEntity> promLookEntityList = promLookCriteria.list();\n\t\tMap<String, String> mapPromLook = new HashMap<String, String>();\n\t\tfor(PromLookupEntity promLookEntity : promLookEntityList){\n\t\t\tif(promLookEntity.getComponent() != null){\n\t\t\t\tif(platform.equals(SurveillerConstants.K8S_PLATFORM)){\n\t\t\t\t\tmapPromLook.put(promLookEntity.getComponent().getComponentName()+\"/\"+promLookEntity.getHttpPath(), promLookEntity.getHttpPath());\n\t\t \t}else{\n\t\t \t\tmapPromLook.put(promLookEntity.getComponent().getParentComponent().getComponentName()+\"/\"+promLookEntity.getComponent().getComponentName(), promLookEntity.getHttpPath());\n\t\t \t}\t\t \n\t\t\t}\n\t }\n\t\ttxn.commit();\n\t\treturn mapPromLook;\n\t}", "@Override\r\n public SortedMap<K, V> subMap(final K fromKey, final K toKey) {\n return null;\r\n }", "Map<K,V> readFromStore(Collection<K> keys);", "static Map<String, Handlers> getIntentMap()\n\t{\n\t\tMap<String, Handlers> h_map = new HashMap<>();\n\t\t\n\t\t\n\t\th_map.put (ADDRESS_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (ADDRESS_ASSOCIATE , Handlers.LINK_CREATE);\n\t\th_map.put (ADDRESS_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (EVENT_ADD , Handlers.NODE_CREATE_AND_LINK);\n\t\th_map.put (EVENT_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (GROUP_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_MEMBER_ADD , Handlers.LINK_CREATE);\n\t\th_map.put (GROUP_MEMBER_DELETE, Handlers.LINK_DELETE);\n\t\th_map.put (PERSON_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (PERSON_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (SUBSCRIPTION_ADD , Handlers.NODE_CREATE_AND_MULTILINK);\n\t\th_map.put (SUBSCRIPTION_DELETE, Handlers.NODE_DELETE);\n\t\th_map.put (USER_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (USER_REGISTER , Handlers.REGISTER_USER);\n\n\t\treturn h_map;\n\t}", "public static void main(String[] args) {\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"a\", \"A\");\r\n map.put(\"b\", \"B\");\r\n map.put(\"c\", \"C\");\r\n \r\n \r\n int h = (new TestMap()).hashCode();\r\n \r\n String a = map.get(\"a\");\r\n \r\n \r\n \r\n \r\n for (String o : map.keySet()){\r\n \tSystem.out.println(o);\r\n \tSystem.out.println(map.get(o));\r\n \t\r\n }\r\n \r\n Map<String, String> map2 = new HashMap<String, String>();\r\n map2.putAll(map);\r\n \r\n for (Map.Entry<String, String> o : map2.entrySet()){\r\n \tSystem.out.println(o.getKey());\r\n \tSystem.out.println(o.getValue());\r\n }\r\n \r\n System.out.println(map2.containsValue(\"A\")); \r\n System.out.println(map2.equals(map)); \r\n\r\n\t}", "public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }", "public interface ProcessHandler<T> {\n public T handle(Map<String, Object> kvs);\n}", "protected Map<MDSKey, byte[]> getKV(Set<MDSKey> ids) {\n Map<MDSKey, byte[]> resultMap = new HashMap<>();\n List<Get> getList = new ArrayList<>();\n for (MDSKey id : ids) {\n getList.add(new Get(id.getKey()));\n }\n List<Row> rowList = table.get(getList);\n for (Row row : rowList) {\n if (row.isEmpty()) {\n continue;\n }\n\n byte[] value = row.get(COLUMN);\n if (value == null) {\n continue;\n }\n MDSKey key = new MDSKey(row.getRow());\n resultMap.put(key, value);\n }\n return resultMap;\n }", "public Object lookupConfigurationEntry(String key);", "public static void addToMap()\n {\n Map<String, Integer> map = new HashMap<>();\n\n BiConsumer<String, Integer> mapAdderEveryTime = (s, i) -> map.put(s, i);\n\n mapAdderEveryTime.accept(\"key1\", 4);\n mapAdderEveryTime.accept(\"key2\", 4);\n\n BiConsumer<String, Integer> mapAdderIfPresent = (s, i) -> {\n map.computeIfPresent(s, (key, value) -> (value % 4 == 0) ? 0 : value +1);\n };\n\n mapAdderIfPresent.accept(\"key1\", 1);\n\n System.out.println(map);\n }", "Object visitMapOfReferences(MapOfReferencesNode node, Object state);", "public static void main(String[] args) {\n\t\tHashMap<Integer, String> hm=new HashMap<>();\n\t\thm.put(25, \"Bharath\");\n\t\thm.put(50,\"Ramesh\");\n\t\thm.put(75,\"Ashish\");\n\t\tSystem.out.println(hm);\n\t\tSystem.out.println(hm.containsKey(15));\n\t\tSystem.out.println(hm.containsValue(\"Ramesh\"));\n\n\t\tTreeMap<Integer, String> tm=new TreeMap<>();\n\t\ttm.putAll(hm);\n\t\tSystem.out.println(tm);\n\t\tSystem.out.println(tm.firstKey());\n\t\tSystem.out.println(tm.lastKey()); \n\t}", "abstract protected Map<String, T> lookup(List<String> values);", "private Map<String, Object> generatePubServerHandlerMap() throws PSNotFoundException {\n\n IPSPublisherService pubsvc = PSPublisherServiceLocator.getPublisherService();\n\n Map<String, Object> handlerMap = new HashMap<>();\n\n IPSDeliveryType tmp = pubsvc.loadDeliveryType(\"ftp\");\n handlerMap.put(\"ftp\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"ftp_only\");\n handlerMap.put(\"ftp_only\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"ftps\");\n handlerMap.put(\"ftps\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"ftps_only\");\n handlerMap.put(\"ftps_only\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"sftp\");\n handlerMap.put(\"sftp\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"sftp_only\");\n handlerMap.put(\"sftp_only\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"filesystem\");\n handlerMap.put(\"filesystem\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"filesystem_only\");\n handlerMap.put(\"filesystem_only\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"database\");\n handlerMap.put(\"database\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"amazon_s3\");\n handlerMap.put(\"amazon_s3\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n tmp = pubsvc.loadDeliveryType(\"amazon_s3_only\");\n handlerMap.put(\"amazon_s3_only\",\n PSBaseServiceLocator.getBean(tmp.getBeanName()));\n\n return handlerMap;\n }", "public abstract Map getProbabilities(String[] path);", "ProcessOperation<Map<String, Object>> map();", "@Override\n\tprotected Map getKeyMethodMap() {\n\t\treturn null;\n\t}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n HashMap<String,MapElements> testing1 = new HashMap<String, MapElements>();\n\n for(DataSnapshot snapshot:dataSnapshot.getChildren())\n {\n Log.d(TAG, \"SNAPSHOT \"+snapshot.getKey());\n String Key = snapshot.getKey();\n\n //Log.d(TAG, \"SPECIFIC\" +snapshot.child(Key).getValue().toString());\n\n }\n }", "Map<ParameterKeys, Object> process(final Map<ParameterKeys, Object> params) throws NullPointerException, IllegalArgumentException;", "UrlMap findByKey(String key);", "public abstract Map<String, Protein> getProteins();", "@Override\n public final void onHit(final K key) {\n if (!freqHitMap.containsKey(key)) {\n freqHitMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqHitMap.put(key, freqHitMap.get(key) + 1);\n }", "protected void loadKeys() {\n\t\tArrayList<String> lines = ContentLoader.getAllLinesOptList(this.keyfile);\n\t\tfor (String line : lines) {\n\t\t\tString[] parts = line.split(\"=\");\n\t\t\ttry {\n\t\t\t\tint fileID = Integer.parseInt(parts[0].trim());\n\t\t\t\tString restLine = parts[1].trim();\n\t\t\t\tString ccMethodName = restLine;\n\t\t\t\tif (restLine.indexOf('/') > 0) {\n\t\t\t\t\tint leftHashIndex = restLine.indexOf('/');\n\t\t\t\t\tccMethodName = restLine.substring(0, leftHashIndex).trim();\n\t\t\t\t}\n\t\t\t\t// String key = parts[0] + \".java\";\n\t\t\t\tkeyMap.put(fileID, ccMethodName);\n\t\t\t} catch (Exception exc) {\n\t\t\t\tSystem.err.println(line);\n\t\t\t}\n\t\t}\n\t}", "public Map getKeyMethodMap() {\r\n\t\tMap map = new HashMap();\r\n\r\n\t\tString pkg = this.getClass().getPackage().getName();\r\n\t\tResourceBundle methods = ResourceBundle.getBundle(pkg\r\n\t\t\t\t+ \".LookupMethods\");\r\n\r\n\t\tEnumeration keys = methods.getKeys();\r\n\r\n\t\twhile (keys.hasMoreElements()) {\r\n\t\t\tString key = (String) keys.nextElement();\r\n\t\t\tmap.put(key, methods.getString(key));\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}", "@SuppressWarnings(\"serial\")\n protected Object getMetrics(Map<String, Object> keyMap, String key)\n throws BaseCollectionException {\n Object metrics = null;\n if (keyMap.containsKey(key)) {\n metrics = (Object) keyMap.get(key);\n }\n return metrics;\n }", "private static Map<String,List<Integer>> getProvisionIdMapStream(Map<String,List<Integer>> nameMapIdMap,Map<String,Integer> mapIdProbIdMap){\n return null;\n }", "public void initMap()\r\n/* */ {\r\n///* 36 */ putHandler(\"vwkgcode\", PDWkHeadTailVWkgcodeHandler.class);\r\n///* 37 */ putHandler(\"fcapacitycalc\", PDWkHeadTailFcapacitycalcHandler.class);\r\n///* 38 */ putHandler(\"bprodline\", PDWkHeadTailBprodlineHandler.class);\r\n/* */ }", "public abstract void processResult(\n Operation operation, Object resultObj, Map<String, Object> keyMap)\n throws BaseCollectionException;", "@Override\n\t@TimeComplexity(\"O(s + log n)\")\n\tpublic Iterable<Entry<K, V>> subMap(K fromKey, K toKey){\n\t/* TCJ\n\t * Performs a binary search: log n\n\t * Scans through each index within binarysearch range: s \n\t */\n\t\treturn snapShot(findIndex(fromKey), toKey);\n\t}", "protected abstract Object _get(String key);", "private static void handleJoin(DatagramPacket packet){\n byte[] packetData = packet.getData();\n InetAddress packetAddr = packet.getAddress();\n if(packetData[0]== (byte)'W') {\n if (!map.containsKey(packetAddr)) {\n byte[] bytes = new byte[8];\n for (int i = 0; i < 8; i++) {\n bytes[i] = packetData[i + 1];\n }\n String name = \"\";\n for (int i = 9; i < packetData.length; i++) {\n name += (char) packetData[i];\n }\n System.out.println(\"Adding \"+name+\":\"+packetAddr.getHostAddress());\n DH dh = new DH(BigInteger.valueOf('&'));\n BigInteger[] bigs = dh.generateRandomKeys(BigInteger.valueOf(77));\n// DH.getSharedSecretKey(bigs[0],BigInteger.valueOf(77),new BigInteger(bytes));\n map.put(packetAddr, new Client(DH.getSharedSecretKey(bigs[0], BigInteger.valueOf(77), new BigInteger(bytes)),name));\n map.get(packetAddr).setB(new BigInteger(bytes));\n map.get(packetAddr).setAddress(packetAddr);\n map.get(packetAddr).lives=5;\n System.out.println(Arrays.toString(bigs) + \":\" + new BigInteger(bytes));\n sendWRQResponse(bigs[1], packet);\n }\n }\n }", "public interface MapP2P<K, V> {\n\n /** Adds key and value in associative array */\n boolean put(K key, V value);\n\n /** Gets from associative array particular value which associated with received key */\n V get(K key);\n\n /** Removes from associative array particular value which associated with received key */\n V remove(K key);\n\n /** Adds in current map other collection which implements interface MapP2P */\n boolean addAll(MapP2P<K, V> mapP2P);\n\n /** Returns information informing whether the given key is in the collection */\n boolean containsKey(K key);\n\n /** Returns information informing whether the given value is in the collection */\n boolean containsValue(Object value);\n\n /** Returns amount element which stored in the associative array */\n int size();\n\n /** Removes all elements (key-value) from collection */\n void clear();\n\n /** Returns set of nodes which contains key-value */\n Set<Node<K, V>> entrySet();\n\n /** Returns information about whether there are elements on the current associative array */\n boolean isEmpty();\n\n /** Interface for Node that contains key and value */\n interface Node<K, V> {\n /** Returns the key of current node */\n K getKey();\n /** Returns the value of current node */\n V getValue();\n }\n\n /** Performs the given action for each node in this map */\n default void forEach(BiConsumer<? super K, ? super V> action) {\n Objects.requireNonNull(action);\n for (Node<K, V> node : entrySet()) {\n action.accept(node.getKey(), node.getValue());\n }\n }\n\n}", "public HashMap<String, String> getInfo(String masterKey) {\n try {\n return this.featureInfoHashMap.get(masterKey);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public void execFunzzySearchMapGeneByRangeFunc(){\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n if(this.searchParam.contains(\":\")==true || this.searchParam.startsWith(\"chr\") == true){\n String chrom = \"\";\n int pstart = -1;\n int pend = -1;\n if(this.searchParam.indexOf(\":\") > -1 ){\n int idex = this.searchParam.indexOf(\":\");\n chrom = this.searchParam.substring(0,idex );\n System.out.println(\"chrom=\"+chrom);\n map.put(\"chrom\",chrom);\n if(this.searchParam.indexOf(\"-\") > -1 ){\n int idex1 = this.searchParam.indexOf(\"-\");\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, idex1));\n pend = Integer.parseInt(this.searchParam.substring(idex1+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n map.put(\"endpos\",pend);\n }else {\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n }\n\n }else if(this.searchParam.startsWith(\"chr\") == true){\n map.put(\"chrom\",this.searchParam);\n\n\n }\n }\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"null\") ==false && this.searchSpecies.equals(\"all\") == false){\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null && this.searchTrait.equals(\"null\") ==false && this.searchTrait.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null && this.pvalue.equals(\"null\") ==false && this.pvalue.length()>0){\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n\n List<MapGeneBean> tmplist = (List<MapGeneBean>) baseService.findResultList(\"cn.big.gvk.dm.MapGene.selectMapGeneCountByPosition\",map);\n if(tmplist != null && tmplist.size()>0){\n mapGeneBeanList = new ArrayList<MapGeneBean>();\n\n for(MapGeneBean tbean: tmplist){\n Map cmp = new HashMap();\n cmp.put(\"gid\",tbean.getGid());\n MapGeneBean genebean = (MapGeneBean) baseService.findObjectByObject(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",cmp);\n if(genebean != null ){\n\n Map t = new HashMap();\n t.put(\"gId\",genebean.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n genebean.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n genebean.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n genebean.setPublicationCount(publication.getPublicationCount());\n }\n mapGeneBeanList.add(genebean) ;\n }\n\n }\n }\n\n StringBuffer sb = new StringBuffer() ;\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "Map<String, Long> hits();", "Map<String, Handler> handlers();", "String getKey(String keyName)\n throws P4JavaException;", "@Override\n\t\t\t\t\tpublic Attribute handleMapKey(Element parent, FTypeRef src) {\n\t\t\t\t\t\treturn super.handleMapKey(parent, src);\n\t\t\t\t\t}", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Map<SwapKey, byte[]> readAll(@Nullable String spaceName,\n Iterable<SwapKey> keys, SwapContext ctx) throws IgniteSpiException;", "public void acceptPrimaryKeyMap(Entity entity, Map<String, ? extends Object> primaryKeyMap)\r\n { doAcceptPrimaryKeyMap((TTrxtypes)entity, primaryKeyMap, _epsMap); }", "public native void forEach(Action3<V, K, Map<K, V>> callbackfn);", "@Override\n\tpublic HashMap<String, String> handleReturnMessage(HashMap<String, String> map, Object returnMessage) {\n\t\treturn null;\n\t}", "public final AstValidator.map_key_return map_key() throws RecognitionException {\n AstValidator.map_key_return retval = new AstValidator.map_key_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree QUOTEDSTRING433=null;\n\n CommonTree QUOTEDSTRING433_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:667:9: ( QUOTEDSTRING )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:667:11: QUOTEDSTRING\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n QUOTEDSTRING433=(CommonTree)match(input,QUOTEDSTRING,FOLLOW_QUOTEDSTRING_in_map_key3547); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n QUOTEDSTRING433_tree = (CommonTree)adaptor.dupNode(QUOTEDSTRING433);\n\n\n adaptor.addChild(root_0, QUOTEDSTRING433_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "@Override\n public void handle(Map<String, Object> map) {\n String param = map.get(CoreType.param.toString()).toString();\n\n\n String sessionId = map.get(CoreType.sessionId.toString()).toString();\n AVLTree<Integer, Integer> avl = UtilTREE.getAVL(sessionId);\n\n avl.eachLeft();\n map.put(CoreType.result.toString(), JSON.toJSON(avl).toString());\n }", "@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }", "public static void getMapDetails(){\n\t\tmap=new HashMap<String,String>();\r\n\t map.put(getProjName(), getDevID());\r\n\t //System.out.println(\"\\n[TEST Teamwork]: \"+ map.size());\r\n\t \r\n\t // The HashMap is currently empty.\r\n\t\tif (map.isEmpty()) {\r\n\t\t System.out.println(\"It is empty\");\r\n\t\t \r\n\t\t System.out.println(\"Trying Again:\");\r\n\t\t map=new HashMap<String,String>();\r\n\t\t map.put(getProjName(), getDevID());\r\n\t\t \r\n\t\t System.out.println(map.isEmpty());\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t//retrieving values from map\r\n\t Set<String> keys= map.keySet();\r\n\t for(String key : keys){\r\n\t \t//System.out.println(key);\r\n\t System.out.println(key + \": \" + map.get(key));\r\n\t }\r\n\t \r\n\t //searching key on map\r\n\t //System.out.println(\"Map Value: \"+map.containsKey(toStringMap()));\r\n\t System.out.println(\"Map Value: \"+map.get(getProjName()));\r\n\t \r\n\t //searching value on map\r\n\t //System.out.println(\"Map Key: \"+map.containsValue(getDevID()));\r\n\t \r\n\t\t\t\t\t // Put keys into an ArrayList and sort it.\r\n\t\t\t\t\t\t//ArrayList<String> list = new ArrayList<String>();\r\n\t\t\t\t\t\t//list.addAll(keys);\r\n\t\t\t\t\t\t//Collections.sort(list);\r\n\t\t\t\t\r\n\t\t\t\t\t\t// Display sorted keys and their values.\r\n\t\t\t\t\t\t//for (String key : list) {\r\n\t\t\t\t\t\t// System.out.println(key + \": \" + map.get(key));\r\n\t\t\t\t\t\t//}\t\t\t \r\n\t}", "public void probe(int x, int y) {\n\t\tif (answerMap[x][y] == -1) {\n\t\t\tisSafe = false;\n\t\t\tcoveredMap[x][y] = SIGN_NETTLE;\n\t\t}\n\t\telse {\n\t\t\tcoveredMap[x][y] = (char) ('0' + answerMap[x][y]);\n\t\t}\n\t\tfor (int i = 0; i < unknown.size(); i++) {\n\t\t\tif (unknown.get(i)[0] == x && unknown.get(i)[1] == y) {\n\t\t\t\tunknown.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (answerMap[x][y] == 0) {\n\t\t\tdiscoverZeroNeighbors(x, y);\n\t\t}\n\t}", "protected void handleLookUp(Message m) {\n for(IP routeIP: m.getRoutePath()) {\n if(ip.getAddr().equals(routeIP.getAddr()) && ip.getPort() == routeIP.getPort()) {\n return;\n }\n }\n\n // dont spread if step over MAX_HOP\n if( m.getHop() >= m.MAX_HOP ){\n return;\n }\n m.hopAddOne();\n\n m.routePathAddRear(this.ip);\n spread(m);\n }", "public void reDistributeKeys() {\n predKey = chord.getPredecessorKey();\n if (predKey == 0) {\n return;\n }\n if (map.isEmpty()) {\n return;\n }\n\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<Integer, FileLocation> entry = (Map.Entry) it.next();\n //If I am not a successor of this Entry, put in in toDistribute Stack\n if (!Hasher.isBetween(predKey, entry.getKey(), nodeKey)) {\n toDistribute.push(new Entry(entry));\n }\n }\n\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "private int probe(Random generator, K key) {\n boolean found = false;\n\n int index = generator.nextInt(hashTable.length);\n\n int removedStateIndex = -1; // Index of first location in\n // removed state\n\n while (!found && (hashTable[index] != null)) {\n if (hashTable[index].isIn()) {\n if (key.equals(hashTable[index].getKey())) {\n found = true; // Key found\n } else // Follow probe sequence\n {\n index = generator.nextInt(hashTable.length); // Linear probing\n }\n } else // Skip entries that were removed\n {\n // Save index of first location in removed state\n if (removedStateIndex == -1) {\n removedStateIndex = index;\n }\n index = generator.nextInt(hashTable.length); // Linear probing\n } // end if\n totalProbes++;\n } // end while\n\n\n // Assertion: Either key or null is found at hashTable[index]\n if (found || (removedStateIndex == -1) )\n return index; // Index of either key or null\n else\n return removedStateIndex; // Index of an available location\n }" ]
[ "0.5208409", "0.51307195", "0.5094214", "0.497805", "0.48507345", "0.4822445", "0.48088157", "0.47971117", "0.4776938", "0.47719628", "0.47570637", "0.47412628", "0.47248417", "0.47244775", "0.4705883", "0.4692584", "0.46747306", "0.46436495", "0.46232322", "0.46109688", "0.46101987", "0.45886183", "0.45515445", "0.454052", "0.45385525", "0.45249298", "0.4520845", "0.45172006", "0.4503792", "0.4496494", "0.44911766", "0.44901082", "0.44886428", "0.4475889", "0.44645166", "0.44537574", "0.4446888", "0.44468564", "0.44458544", "0.44330472", "0.44247636", "0.44224423", "0.44055417", "0.44003797", "0.4391775", "0.43906146", "0.4388895", "0.43884555", "0.4380801", "0.43757206", "0.4370313", "0.43565372", "0.4355782", "0.43544632", "0.43528524", "0.43441457", "0.4340104", "0.4331193", "0.4330235", "0.43248585", "0.43210387", "0.4320956", "0.43137383", "0.43115252", "0.43087673", "0.4306523", "0.4306449", "0.43063006", "0.42964748", "0.42960134", "0.4288942", "0.42876345", "0.4285475", "0.4272797", "0.42689583", "0.42666405", "0.42627695", "0.4261313", "0.4255442", "0.42506546", "0.42402834", "0.4232469", "0.42257974", "0.42246544", "0.42241743", "0.42233938", "0.42161855", "0.421482", "0.42109507", "0.42048272", "0.4201814", "0.41999757", "0.4194159", "0.41919178", "0.41905653", "0.4185881", "0.41847444", "0.4182559", "0.4179911", "0.41790292" ]
0.7572158
0
Returns a list of supported keys
String[] supportedKeys();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<String> getAllKeys();", "List<String> getKeys();", "ApiKeys listKeys();", "StringList keys();", "public List<K> keys();", "@Override\n List<String> keys();", "public KeySet getKeys();", "public List<String> keys()\n {\n return new ArrayList<String>(keys);\n }", "public List<String> getKeys(){\n return Collections.unmodifiableList(keys);\n }", "public List<NeonKey> getKeys();", "Set<String> getKeys();", "java.util.List<String>\n getPartitionKeyList();", "public final Enumeration getKeys() {\n/* 130 */ return getBundle().getKeys();\n/* */ }", "public ABLKeys Keys() {\r\n\t\treturn new ABLKeys(BrickFinder.getDefault().getKeys());\r\n\t}", "public String[] getKeys() {\n\t\treturn _keys;\n\t}", "java.util.List<com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key> getKeyList();", "public Collection<TapKey> findAllKeys();", "public abstract Enumeration keys();", "@VisibleForTesting\n List<Object> getKeysForTest() {\n return keys;\n }", "String[] getPropertyKeys();", "@Override\n\tpublic Enumeration<String> getKeys() {\n\t\treturn _resourceBundle.getKeys();\n\t}", "public Iterable<Key> keys();", "public Iterable<Key> keys();", "private List getConsumerKeyWhitelist() {\n\n return HandlerUtils.getConsumerKeyList();\n }", "public synchronized Enumeration<Short> keys() {\n return new Enumerator(KEYS);\n }", "public Iterable<String> keys()\r\n { return keysWithPrefix(\"\"); }", "public String[] fetchAllKeys();", "public String getKeys() {\r\n return keys;\r\n }", "public List<String> getKinitCommandAsList() {\n List<String> kinitCommandAsList = new ArrayList<>();\n kinitCommandAsList.add(kerberosKinitLocation);\n kinitCommandAsList.add(kerberosPrincipal);\n kinitCommandAsList.add(\"-kt\");\n kinitCommandAsList.add(kerberosKeytab);\n return kinitCommandAsList;\n }", "public Iterable<String> keys() { return keysWithPrefix(\"\"); }", "public Enumeration<Object> keys ();", "@Override\n\tpublic Enumeration<String> getKeys() {\n\t\treturn null;\n\t}", "@Override\r\n\t\t\t\t\t\tpublic Enumeration<String> getKeys() {\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}", "java.util.List<String>\n getClusteringKeyList();", "List<QueryKey> listQueryKeys();", "Map<String, String> getKeys(GetKeysOptions opts) throws P4JavaException;", "public Enumeration getKeys() {\n // Not yet implemented -sorta\n return m_sql_bundle.getKeys();\n }", "@Override\n\t\t\tpublic Set<String> getKeys() {\n\t\t\t\treturn null;\n\t\t\t}", "@ZenCodeType.Method\n @ZenCodeType.Getter(\"keys\")\n default Set<String> getKeys() {\n \n return doesNot(\"is not indexable by keys\");\n }", "public Set<Character> getExtensionKeys() {\n/* 1006 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public List<KeyDesc> getKeyDescs() {\n\t\treturn _keyDescs;\n\t}", "public Iterable<String> getPropertyKeys();", "public Set<String> getKeyList() throws IOException {\n if (dataCollector.getCollectorType().equals(DataCollector.COLLECTOR_TYPE_LIST)) {\n return dataCollector.getResult().getComparatorList().keySet();\n } else {\n throw new IOException(\"only allowed for \" + DataCollector.COLLECTOR_TYPE_LIST);\n }\n }", "public Enumeration getKeys() {\r\n PropertiesHolder propertiesHolder = this.getMergedProperties(Locale.getDefault());\r\n return propertiesHolder.getProperties().keys();\r\n }", "public KeyPeg[] getKeys() {\n return this.keys;\n }", "@Override\n public Iterable<String> configKeys() {\n Set<String> result = new HashSet<>();\n result.add(CONFIG_NAME);\n\n result.addAll(upgradeProviders.stream()\n .flatMap(it -> it.configKeys().stream())\n .collect(Collectors.toSet()));\n\n return result;\n }", "List<PropertyKeySetting> getPropertyKeySettings();", "public Iterable<K> keys();", "public List<String> getKeys()\n\t{\n\t\treturn new ArrayList<>(pairs.keySet());\n\t}", "Integer[] getKeys();", "public java.util.List<String> getTagKeys() {\n if (tagKeys == null) {\n tagKeys = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n tagKeys.setAutoConstruct(true);\n }\n return tagKeys;\n }", "public Set<Character> getExtensionKeys() {\n return _extensions.getExtensionKeys();\n }", "protected Set<String> handleKeySet() {\n return new HashSet<String>(Arrays.asList(\"okKey\", \"cancelKey\"));\n }", "public String[] getKeysWithVariants() {\n Set keySet = new HashSet( values.keySet() );\n if( defaultValues != null ) {\n keySet.addAll( defaultValues.keySet() );\n }\n keySet.addAll( cssValues.keySet() );\n return ( String[] )keySet.toArray( new String[ keySet.size() ] );\n }", "public Request<List<Key>> list() {\n HttpUrl.Builder builder = baseUrl\n .newBuilder()\n .addEncodedPathSegments(\"api/v2/keys/signing\");\n String url = builder.build().toString();\n return new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.GET, new TypeReference<List<Key>>() {\n });\n }", "public Set<String> getFullKeyList() throws IOException {\n if (dataCollector.getCollectorType().equals(DataCollector.COLLECTOR_TYPE_LIST)) {\n return dataCollector.getKeyList();\n } else {\n throw new IOException(\"only allowed for \" + DataCollector.COLLECTOR_TYPE_LIST);\n }\n }", "private String[] getKeys() {\n\t\tSharedPreferences prefs = EReaderApplication.getAppContext()\n\t\t\t\t.getSharedPreferences(ACCOUNT_PREFS_NAME, 0);\n\t\tString key = prefs.getString(ACCESS_KEY_NAME, null);\n\t\tString secret = prefs.getString(ACCESS_SECRET_NAME, null);\n\t\tif (key != null && secret != null) {\n\t\t\tString[] ret = new String[2];\n\t\t\tret[0] = key;\n\t\t\tret[1] = secret;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public Set<String> keySet() {\r\n return keys.keySet();\r\n }", "Set<K> keys();", "private Set<String> getKeys() {\n return bookDB.keySet();\n }", "public static Enumeration<String> getKeys() {\n\t\tif (rb == null) {\n\t\t\treinit();\n\t\t}\n\n\t\treturn rb.getKeys();\n\t}", "public String[] getKeys() {\n Set keySet;\n if( defaultValues != null ) {\n keySet = defaultValues.keySet();\n } else {\n keySet = values.keySet();\n }\n return ( String[] )keySet.toArray( new String[ keySet.size() ] );\n }", "Listof<K> sortedKeys();", "static String[] getKey() {\n return key;\n }", "public List<Object[]> getPartitionKeys();", "public static Keys getKeys(Context ctx) {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n String keyEnc = prefs.getString(SHORTCUT_KEYS_PREF, null);\n if (keyEnc == null) {\n return null;\n }\n\n try {\n return Keys.decode(keyEnc);\n } catch (IllegalArgumentException e) {\n return null;\n }\n }", "public Set<String> getClassKeys();", "public ArrayList getKeys() {\r\n return this.keys;\r\n }", "List<DTOKeyPair> getStochasticKeys();", "Set<String> getMetadataKeys();", "Set<String> listCapabilities();", "@Override\n\tprotected boolean isKeySupported(final String key) {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Override\n\tpublic Set<String> keySet() {\n\t\treturn null;\n\t}", "public Set<String> getLocaleKeywordKeys() {\n return _extensions.getLocaleKeywordKeys();\n }", "public String[] getKeyNames() \n {\n DBField f[] = this.getKeyFields();\n String kn[] = new String[f.length];\n for (int i = 0; i < f.length; i++) {\n kn[i] = f[i].getName();\n }\n return kn;\n }", "AdminKeys getAdminKeys();", "public static List<String> getSupportedVersions () {\n if (instBySupportedVersion == null) {\n init();\n }\n return new ArrayList(instBySupportedVersion.keySet());\n }", "@Override\n\tpublic Set<K> keySet() {\n\t\treturn keys;\n\t}", "@Override\n public Set<K> keySet() {\n return keys;\n }", "public Set keyNames() {\n return new LinkedHashSet<>( asList( idName() ) );\n }", "public static Iterator getKeys() {\n\t\tConfigManager cg = getConfigManager(null);\n\t\tIterator returnValue = null;\n\t\tif (cg != null) {\n\t\t\treturnValue = cg.getConfig().getKeys();\n\t\t}\n\t\treturn returnValue;\n\t}", "public List<K> sortedKeyList() {\n return sortedKeyList( false );\n }", "public String[] getKeys() {\n SharedPreferences prefs = getSharedPreferences(ACCOUNT_PREFS_NAME, 0);\n String key = prefs.getString(ACCESS_KEY_NAME, null);\n String secret = prefs.getString(ACCESS_SECRET_NAME, null);\n if (key != null && secret != null) {\n \tString[] ret = new String[2];\n \tret[0] = key;\n \tret[1] = secret;\n \treturn ret;\n } else {\n \treturn null;\n }\n }", "public com.google.protobuf.ProtocolStringList\n getPartitionKeyList() {\n return partitionKey_.getUnmodifiableView();\n }", "@Test\n\tpublic void getMyKeyNames() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tks.createNewMyKeyPair(\"never\");\n\t\tks.createNewMyKeyPair(\"gonna\");\n\t\tks.createNewMyKeyPair(\"give\");\n\t\tks.createNewMyKeyPair(\"you\");\n\t\tks.createNewMyKeyPair(\"up\");\n\t\tSet<String> names = ks.getMyKeyNames();\n\t\tassertTrue(\"incorrect number of names\", names.size() == 5);\n\t\tassertTrue(\"should contain name\", names.contains(\"never\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"gonna\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"give\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"you\"));\n\t\tassertTrue(\"should contain name\", names.contains(\"up\"));\n\t}", "public Iterable<String> getKeys(String keyPrefix);", "public List<String> keysAsString() {\n\t\treturn iter.getItems().stream().map(e -> new String(e)).collect(toList());\n\t}", "Lista<K> keySet();", "@Nullable\r\n List<KeyPair> getKeyPair();", "static List<Integer> getTestKeys() {\n var list = Arrays.asList(3, 8, 1, 9, 2, 4, 0, 5);\n\n return list;\n }", "public String[] getKeys(){\n int paddingCount = 1;\n List<String> result = new ArrayList<String>();\n String lastKey = null;\n for (Property x : this.getProperties()) {\n String newKey = new String(x.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.add(newKey);\n lastKey = newKey;\n }\n return result.toArray(new String[]{});\n }", "public static synchronized Set<Class<?>> keySet() {\n\t\treturn ClassRegistry.dictionary.keySet();\n\t}", "public List<String> getKeys(HelixConfigScope scope) {\n if (scope == null || scope.getType() == null) {\n LOG.error(\"Fail to getKeys. Invalid config scope: {}.\", scope);\n return null;\n }\n\n if (!ZKUtil.isClusterSetup(scope.getClusterName(), _zkClient)) {\n LOG.error(\"Fail to getKeys. Cluster {} is not setup yet.\", scope.getClusterName());\n return Collections.emptyList();\n }\n\n String zkPath = scope.getZkPath();\n String mapKey = scope.getMapKey();\n List<String> retKeys = null;\n\n if (scope.isFullKey()) {\n ZNRecord record = _zkClient.readData(zkPath);\n if (mapKey == null) {\n retKeys = new ArrayList<String>(record.getSimpleFields().keySet());\n } else {\n retKeys = new ArrayList<String>(record.getMapField(mapKey).keySet());\n }\n } else {\n if (scope.getType() == ConfigScopeProperty.PARTITION) {\n ZNRecord record = _zkClient.readData(zkPath);\n retKeys = new ArrayList<String>(record.getMapFields().keySet());\n } else {\n retKeys = _zkClient.getChildren(zkPath);\n }\n }\n\n if (retKeys != null) {\n Collections.sort(retKeys);\n }\n return retKeys;\n }", "public wbemdisp.ISWbemNamedValueSet getKeys () throws java.io.IOException, com.linar.jintegra.AutomationException;", "public static List<KeyValue<String, String>> getAllKeyValues() {\n return keyValueList;\n }", "public java.util.List<KEY> childKeyList()\n\t{\n\t\tjava.util.List<KEY> childKeyList = new java.util.ArrayList<KEY>();\n\n\t\treturn ChildKeyList (\n\t\t\tthis,\n\t\t\tchildKeyList\n\t\t) ? childKeyList : null;\n\t}", "public K[] getKeys() {\n return keys.clone();\n }", "@SuppressWarnings(\"unchecked\")\n public Set<String> keySet() {\n return (Set<String>) (Set<?>) userConfig.keySet();\n }", "public boolean[] getKeyUsage() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getKeyUsage():boolean[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getKeyUsage():boolean[]\");\n }", "private List<String> putKeysInList() {\n List<String> stringList = new LinkedList<>();\n for (String node : registeredNodes.keySet()) {\n stringList.add(node);\n }\n return stringList;\n }" ]
[ "0.76228404", "0.75808704", "0.7300495", "0.70509917", "0.69880027", "0.6930967", "0.6887215", "0.6841824", "0.6753614", "0.6743327", "0.6719763", "0.6694221", "0.66929454", "0.66109455", "0.6608897", "0.6602957", "0.6578649", "0.6576632", "0.6565148", "0.6561529", "0.6531948", "0.6506831", "0.6506831", "0.6481842", "0.6460661", "0.6453", "0.64486295", "0.6445902", "0.643527", "0.6419025", "0.6407917", "0.63918847", "0.63565105", "0.63472885", "0.63226575", "0.63211495", "0.6297048", "0.62800246", "0.62797755", "0.6273682", "0.626131", "0.6256988", "0.6254072", "0.62537545", "0.6234276", "0.623309", "0.6232962", "0.6231176", "0.62309235", "0.6230529", "0.62247086", "0.6194649", "0.6188201", "0.6187985", "0.6162303", "0.61603427", "0.6154871", "0.6151754", "0.61503303", "0.6137351", "0.61323124", "0.6123402", "0.61178994", "0.61146426", "0.6111462", "0.61079913", "0.60838664", "0.6083082", "0.60720986", "0.60588264", "0.6058341", "0.6056735", "0.60501486", "0.60320175", "0.603093", "0.60309035", "0.60155773", "0.60151464", "0.60029334", "0.6001905", "0.5995484", "0.5989012", "0.5962158", "0.59620404", "0.5960801", "0.5950335", "0.59362453", "0.5930768", "0.59303474", "0.5926424", "0.59059286", "0.59056133", "0.58916396", "0.5886694", "0.58812875", "0.5880902", "0.58555305", "0.58446556", "0.5844426", "0.5843515" ]
0.90807533
0
TODO Autogenerated method stub
@Override public String popupSearch(String criteria) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
the first iterator should be the initial results
@Override protected Iterator<? extends Map<String, AttributeValue>> nextIterator(final int count) { if (count == 1) { return currentResult.getItems().iterator(); } // subsequent chained iterators will be obtained from dynamoDB // pagination if ((currentResult.getLastEvaluatedKey() == null) || currentResult.getLastEvaluatedKey().isEmpty()) { return null; } else { request.setExclusiveStartKey(currentResult.getLastEvaluatedKey()); currentResult = dynamoDBClient.query(request); return currentResult.getItems().iterator(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterator iterator () {\n return new MyIterator (first);\n }", "public RunIterator iterator() {\n // Replace the following line with your solution.\n return new RunIterator(runs.getFirst());\n // You'll want to construct a new RunIterator, but first you'll need to\n // write a constructor in the RunIterator class.\n \n \n }", "iterator(){current = start;}", "public abstract Iterator initialStateIterator ();", "private static void iterator() {\n\t\t\r\n\t}", "public void setFirstResult(int begin) {\n\r\n\t}", "public ListIterator() {current=first.next;}", "private void setNextIterator() {\n\t\t\t\n\t\t\tfor (int i = index; i < inconsistencies.size(); i++){\n\t\t\t\tSet<LPGInconsistency> inconsistencyList = inconsistencies.get(i);\n\t\t\t\tif (!inconsistencyList.isEmpty()) {\n\t\t\t\t\titerator = inconsistencyList.iterator();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tindex++;\n\t\t\t}\n\t\t}", "public Iterator<Item> iterator() { return new RandomIterator();}", "public void setIteratorBegin() {\n iter = (next > 0 ? 0 : -1);\n }", "@Override\n\tpublic Iterator<T> iteratorPreOrder() {\n\t\treturn null;\n\t}", "private Iterator<Integer> getIterator(Iterator<Iterator<Integer>> iter) {\n Iterator<Integer> iterator = null;\n while (iter.hasNext()) {\n iterator = iter.next();\n break;\n }\n return iterator;\n }", "@Override\n\tpublic Iterator<T> iteratorPostOrder() {\n\t\treturn null;\n\t}", "public ArrayIterator() {\n next = first;\n }", "@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }", "@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }", "@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }", "private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n if (!currentIterator.hasNext()) {\n // we want advance to next iterator only when this iterator is exhausted\n if (index < intMaps.length - 1) {\n // we can advance to next iterator only if currentIterator is not the last iterator\n ++index;\n if (!fetched[index]) {\n GetAllCustomMap.this.fetchValuesForIndex(index);\n }\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n // we can not advance to next iterator because this iterator is the last iterator\n }\n } else {\n // we do not want to advance to next iterator because this iterator is not fully exhausted\n }\n }\n }", "void setFirstResult(int offset);", "@Override\n public Iterator<E> iterator() {\n return new InsideIterator(first);\n }", "@Override\n public Iterator<SimilarResult<T>> iterator() {\n lock();\n return Iterators.limit(getResults().iterator(), maxSize);\n }", "@Override\n public Iterator<T> preOrden(){\n return (super.preOrden());\n }", "@Override\n\tpublic Iterator<Integer> iterator() {\n\t\treturn null;\n\t}", "public ListIterator iterator()\n {\n return new ListIterator(firstLink);\n }", "@Test\n public void testNext_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n Integer expResult = 1;\n Integer result = instance.next();\n assertEquals(expResult, result);\n }", "public Iterator iterator()\n {\n JEditorPane x=new JEditorPane(\"text/html\", this.html);\n Document doc = x.getDocument();\n showModel(doc);\n return new GeneralResultIterator(this);\n }", "public Iterator<Integer> fromA() {return this.fromA.iterator();}", "protected EmptyIterator() {\n\t\t\tsuper();\n\t\t}", "OIterator<V> before();", "@Test\r\n public void iteratorWorksInFirst() throws Exception {\r\n Iterator<Integer> it = sInt.iterator();\r\n assertTrue(it.hasNext());\r\n assertEquals(1, (int) it.next());\r\n Iterator<String> it2 = sStr.iterator();\r\n assertTrue(it2.hasNext());\r\n assertEquals(\"kek\", it2.next());\r\n }", "private void resetIterator() {\n\t\titerator = head;\n\t}", "public Iterator next() {\n return new FilterIterator(succ.iterator(), filter);\n }", "@Override\r\n\tpublic Iterator<Item> iterator() \r\n\t{\r\n\t\treturn new rqIterator();\r\n\t}", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "@Test\r\n public void sequentialHasNextInvocationDoesntAffectRetrievalOrder() {\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(2));\r\n assertThat(it.next(), is(4));\r\n assertThat(it.next(), is(6));\r\n }", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "@Test\r\n\tpublic void testIterator()\r\n\t{\r\n\t\tInteger[] results =\r\n\t\t{ 5, 7, 3 };\r\n\t\tint i = 0;\r\n\t\tfor (Integer item : threeElementsInOrder)\r\n\t\t{\r\n\t\t\tassertEquals(results[i], item);\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void setAllLocalResults() {\n TreeMap<FlworKey, List<FlworTuple>> keyValuePairs = mapExpressionsToOrderedPairs();\n // get only the values(ordered tuples) and save them in a list for next() calls\n keyValuePairs.forEach((key, valueList) -> valueList.forEach((value) -> _localTupleResults.add(value)));\n\n _child.close();\n if (_localTupleResults.size() == 0) {\n this._hasNext = false;\n } else {\n this._hasNext = true;\n }\n }", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "public void setIterator(Iterator iterator) {\n/* 96 */ this.iterator = iterator;\n/* */ }", "private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }", "@Override\n protected void runOneIteration() throws Exception {\n }", "@Override\n public Iterator<T> postOrden(){\n return (super.postOrden());\n }", "default Iterator<T> iterator(ResultSet rs) {\r\n\t\treturn new ResultSetIterator<>(rs, this);\r\n\t}", "public Iterator<S> iterator() {\n\t\t// ..\n\t\treturn null;\n\t}", "@Override\n\tpublic void initIterator() {\n\t\tcurrentUser = 0;\n\t}", "Iterator<T> iterator();", "public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }", "@Override\n public Iterator<Object> iterator() {\n return new MyIterator();\n }", "@Test\n public void loopTest() {\n Object[] resultActual = new Object[] {this.work1, this.work2, this.work3, this.work4};\n Object[] resultExpected = new Object[4];\n int index = 0;\n while (this.it.hasNext()) {\n resultExpected[index++] = this.it.next();\n }\n assertThat(resultActual, is(resultExpected));\n }", "@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }", "public AllByRowsIterator() {\n\t\t\tsuper();\n\t\t\tlastIndex = numCols * numRows;\n\t\t}", "@Override\n public Iterator iterator() {\n return new PairIterator();\n }", "SearchResult findNext(SearchResult result);", "IteratorExp createIteratorExp();", "public DNode<E> iterator()\n {\n \treturn first;\t\t\n }", "public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }", "private ValueIterator()\n {\n currentIndex = 0;\n numberLeft = numberOfEntries;\n }", "@Override\n\tpublic Iterator iterator() {\n\t\treturn null;\n\t}", "SingelIterator() {\n neste = listehode;\n forrige = listehode;\n }", "@Override\n public Iterator<T> impNiveles(){\n return (super.impNiveles());\n }", "@Test\n public void test2() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(546,\"org.apache.commons.collections4.iterators.IteratorIterableEvoSuiteTest.test2\");\n IteratorIterable<Object> iteratorIterable0 = new IteratorIterable<Object>((Iterator<?>) null);\n Iterator<Object> iterator0 = iteratorIterable0.iterator();\n assertNotNull(iterator0);\n }", "Iterator<Map.Entry<String, Integer>> getNextPair(){\r\n return entrySet.iterator();\r\n }", "@Override\n public Iterator iterator() {\n\n Iterator<RadarContent> iterator = new Iterator<RadarContent>() {\n\n ProfileQueue pq = new ProfileQueue(arrProfiles);\n int iCursor;\n\n /*\n * Check for next available profile\n */\n @Override\n public boolean hasNext() {\n return !pq.isEmpty() && pq.arrProfiles[iCursor++] != null;\n }\n\n /**\n * Return the next profile and advance the cursor\n */\n @Override\n public RadarContent next() {\n RadarContent p = pq.arrProfiles[iCursor];\n iCursor++;\n return p;\n }\n };\n\n return iterator;\n\n }", "private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }", "@Override\n public Iterator<Pair<K, V>> iterator() {\n return new Iterator<Pair<K, V>>() {\n private int i = 0, j = -1;\n private boolean _hasNext = true;\n\n @Override\n public boolean hasNext() {\n return _hasNext;\n }\n\n @Override\n public Pair<K, V> next() {\n Pair<K, V> r = null;\n if (j >= 0) {\n List<Pair<K, V>> inl = l.get(i);\n r = inl.get(j++);\n if (j > inl.size())\n j = -1;\n }\n else {\n for (; i < l.size(); ++i) {\n List<Pair<K, V>> inl = l.get(i);\n if (inl == null)\n continue;\n r = inl.get(0);\n j = 1;\n }\n }\n if (r == null)\n _hasNext = false;\n return r;\n }\n };\n }", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "@Override\n public Iterator<Piedra> iterator() {\n return piedras.iterator();\n \n //crear un iterator propio\n// return new Iterator<Piedra>(){\n// int index=0;\n// @Override\n// public boolean hasNext() {\n// return piedras.size()>index;\n// }\n//\n// @Override\n// public Piedra next() {\n// return piedras.get(index++);\n// }\n// \n// };\n }", "@Test\n public void testIterator_Forward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n assertEquals(baseList.get(i++), instance.next());\n }\n\n }", "@Override\r\n\tpublic Iterator<Item> iterator() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Iterator createIterator() {\n\t\treturn bestSongs.values().iterator();\r\n\t}", "@Override\n public Iterator<Integer> convert(Iterator<Iterator<Integer>> it) throws IteratorException {\n return new Iterator<Integer>() {\n\n private Iterator<Integer> currentIterator;\n\n {\n if (it != null && it.hasNext()) {\n this.currentIterator = it.next();\n } else {\n throw new IteratorException(\"Iterator<Iterator<Integer>> must be not null!\");\n }\n }\n\n /**\n * This method returned true if the iterator has more elements.\n *\n * @return true if the iterator has more elements.\n */\n @Override\n public boolean hasNext() {\n boolean result = false;\n if (checkCurrentIterator(this.currentIterator) && this.currentIterator.hasNext()) {\n return true;\n } else if (it.hasNext()) {\n this.currentIterator = getIterator(it);\n return this.hasNext();\n }\n return result;\n\n }\n\n /**\n * This method returns the next even element in the iteration.\n *\n * @return the next even element in the iteration.\n */\n @Override\n public Integer next() {\n Integer result = null;\n if (checkCurrentIterator(this.currentIterator) && this.currentIterator.hasNext()) {\n while (this.currentIterator.hasNext()) {\n return this.currentIterator.next();\n }\n } else if (it.hasNext()) {\n this.currentIterator = getIterator(it);\n return this.next();\n }\n return result;\n }\n\n /**\n * This method return the next Iterator.\n *\n * @return the next Iterator.\n */\n private Iterator<Integer> getIterator(Iterator<Iterator<Integer>> iter) {\n Iterator<Integer> iterator = null;\n while (iter.hasNext()) {\n iterator = iter.next();\n break;\n }\n return iterator;\n }\n\n /**\n * This method checked Iterator<Integer> iter.\n *\n * @param iter Iterator<Integer> iter.\n * @return true if Iterator<Integer> iter not null.\n */\n private boolean checkCurrentIterator(Iterator<Integer> iter) {\n return iter != null;\n }\n };\n }", "public Iterator<Item> iterator() { return new ListIterator(); }", "public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public Iterator<ResultItem> iterateItems() {\r\n\t\treturn items.iterator();\r\n\t}", "@Override\n\tpublic Iterator<E> iterator()\n\t{\n\t\treturn new Iterator<E>() {\n\t\t\tprivate Node<E> current = first;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn current.next != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next()\n\t\t\t{\n\t\t\t\tif (hasNext())\n\t\t\t\t{\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\treturn current.value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<Tuple>();\n for (Field key : m_aggregateData.keySet()) {\n \tTuple nextTuple = new Tuple(m_td);\n \tint recvValue;\n \t\n \tswitch (m_op) {\n \tcase MIN: case MAX: case SUM:\n \t\trecvValue = m_aggregateData.get(key);\n \t\tbreak;\n \tcase COUNT:\n \t\trecvValue = m_count.get(key);\n \t\tbreak;\n \tcase AVG:\n \t\trecvValue = m_aggregateData.get(key) / m_count.get(key);\n \t\tbreak;\n \tdefault:\n \t\trecvValue = setInitData(); // shouldn't reach here\n \t}\n \t\n \tField recvField = new IntField(recvValue);\n \tif (m_gbfield == NO_GROUPING) {\n \t\tnextTuple.setField(0, recvField);\n \t}\n \telse {\n \t\tnextTuple.setField(0, key);\n \t\tnextTuple.setField(1, recvField);\n \t}\n \ttuples.add(nextTuple);\n }\n return new TupleIterator(m_td, tuples);\n }", "private IteratorImpl() {\r\n\t\t\titeratorModificationCount = modificationCount;\r\n\r\n\t\t\tnextEntry = table[0] == null ? findNextNonNullTableRowEntry() : table[0];\r\n\t\t}", "@Override\n Iterator<T> iterator();", "private static List<NoSQLResult> getNextResultsGroupFromIterator(final Iterator<ListDO> resultsIterator) {\n if (!resultsIterator.hasNext()) {\n return null;\n }\n List<NoSQLResult> resultGroup = new LinkedList<>();\n int itemsRetrieved = 0;\n do {\n // Retrieve the item from the paginated results.\n final ListDO item = resultsIterator.next();\n // Add the item to a group of results that will be displayed later.\n resultGroup.add(new NoSQLListResult(item));\n itemsRetrieved++;\n } while ((itemsRetrieved < RESULTS_PER_RESULT_GROUP) && resultsIterator.hasNext());\n return resultGroup;\n }", "@Override\n public Iterator<Item> iterator() {\n return new DequeIterator<Item>(first);\n }", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn null;\n\t}", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "public ListIterator<T> getAllByRowsIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "@Test\n public void test0() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(544,\"org.apache.commons.collections4.iterators.IteratorIterableEvoSuiteTest.test0\");\n EntrySetMapIterator<Integer, Object>[] entrySetMapIteratorArray0 = (EntrySetMapIterator<Integer, Object>[]) Array.newInstance(EntrySetMapIterator.class, 7);\n ObjectArrayIterator<EntrySetMapIterator<Integer, Object>> objectArrayIterator0 = new ObjectArrayIterator<EntrySetMapIterator<Integer, Object>>(entrySetMapIteratorArray0, 0, 0);\n IteratorIterable<Object> iteratorIterable0 = new IteratorIterable<Object>((Iterator<?>) objectArrayIterator0, true);\n }", "@Override\n public Iterator<T> iterator() {\n return this;\n }", "public T iterator();", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "BooleanIterator iterator(int startIndex);", "@Test\n public void whenAddOneToEmptyTreeThenIteratorHasNext() {\n tree.add(1);\n\n Iterator<Integer> iterator = this.tree.iterator();\n\n assertThat(iterator.next(), is(1));\n }", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "Iterator<E> iterator();" ]
[ "0.69654363", "0.68909234", "0.66740113", "0.6621274", "0.6526146", "0.651893", "0.6443589", "0.6375632", "0.6369007", "0.6230805", "0.62198424", "0.62057513", "0.61757976", "0.61628336", "0.6146952", "0.6139478", "0.61265576", "0.612571", "0.6113114", "0.6105997", "0.6087346", "0.60524756", "0.6007552", "0.5993188", "0.5989867", "0.59469134", "0.5944972", "0.5941416", "0.5937071", "0.59327954", "0.591822", "0.5915719", "0.59124243", "0.591119", "0.59065235", "0.59063685", "0.59020495", "0.5900932", "0.5894661", "0.588654", "0.58857477", "0.5884654", "0.58796966", "0.5873174", "0.5859093", "0.5857611", "0.5851289", "0.58308476", "0.582926", "0.5813559", "0.5801607", "0.5798031", "0.57967216", "0.57940364", "0.57845974", "0.5783082", "0.5782187", "0.5779366", "0.57779807", "0.5772759", "0.57722586", "0.5765228", "0.57602566", "0.5758724", "0.57421184", "0.57417536", "0.57391554", "0.57331544", "0.5727469", "0.57240087", "0.5714963", "0.5713086", "0.5710442", "0.57079005", "0.5705029", "0.5701217", "0.5695755", "0.5691616", "0.56878215", "0.56819063", "0.5676643", "0.5676043", "0.5666725", "0.5666725", "0.5666725", "0.56643426", "0.56608415", "0.5658729", "0.5654487", "0.5652636", "0.5650878", "0.56408644", "0.56408644", "0.56407344", "0.5640243", "0.56358415", "0.56358415", "0.56358415", "0.56358415", "0.56344384" ]
0.6267054
9
This method can be called before End Of DoInBackground an here you can even manipulate the response Main usage is to use the background thread to save some data from response or parse.It will be called only if there is no error. If you want to chain calls here you can also save call next request.
void inTheEndOfDoInBackground(NetworkResponse networkResponse);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected Response<JSONArray> parseNetworkResponse (NetworkResponse response){\n// This thread is on background thread\n// Handle parsing logic here?\n try {\n String jsonString =\n new String(\n response.data,\n HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET));\n JSONArray jsonArray = new JSONArray(jsonString);\n\n// Parse on background thread\n parseResponse(jsonArray);\n\n return Response.success(jsonArray, HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException | JSONException e) {\n return Response.error(new ParseError(e));\n }\n }", "@Override\n protected String doInBackground(String... params){\n\n try {\n //1. Create okHttp Client object\n OkHttpClient client = new OkHttpClient();\n\n Endpoint endpoint = new Endpoint();\n\n //2. Define request being sent to the server\n\n Request request = new Request.Builder()\n .url(endpoint.getUrl())\n .header(\"Connection\", \"close\")\n .build();\n\n //3. Transport the request and wait for response to process next\n Response response = client.newCall(request).execute();\n String result = response.body().string();\n setCode(response.code());\n return result;\n }\n catch(Exception e) {\n return null;\n }\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n if (pd.isShowing()) {\n pd.dismiss();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n if (e instanceof SocketTimeoutException) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Snackbar.make(findViewById(android.R.id.content), str_mesg, Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }\n });\n }\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n\n if (response != null) {\n try {\n String details = response.body().string();\n JSONObject jobj = new JSONObject(details);\n\n str_flag = jobj.getString(AppConstant.TAG_flaglogo);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (str_userType.equals(\"Company\")) {\n manager.createLogin(str_token, str_token_type, str_name, str_contactperson, str_username, str_loginId, str_companyId,\n str_customerId, str_employeeId, str_userType, str_profile, str_flag, str_weburl, str_telephone, str_country, str_payment);\n\n Intent in = new Intent(getApplicationContext(), MainActivity.class);\n in.putExtra(\"BackStack\", \"4\");\n startActivity(in);\n finish();\n }\n }\n });\n } catch (final JSONException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(TAG, \"Json parsing error: \" + e.getMessage());\n str_error = \"Json parsing error: \";\n new InserErrorLog().execute();\n }\n });\n } catch (final SocketTimeoutException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n e.printStackTrace();\n str_error = e.getMessage();\n new InserErrorLog().execute();\n }\n });\n } catch (final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n e.printStackTrace();\n str_error = e.getMessage();\n new InserErrorLog().execute();\n }\n });\n } catch (final NullPointerException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n str_error = e.getMessage();\n new InserErrorLog().execute();\n }\n });\n } catch (final Exception e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n str_error = e.getMessage();\n new InserErrorLog().execute();\n }\n });\n }\n }\n }\n });\n }\n }", "@Override\n\t\tprotected Void doInBackground(String... params) {\n\t\t\tpostData();\n\t\t\treturn null;\n\t\t}", "@Override\n protected String doInBackground(Request... requests) {\n httpClient = utils.createAuthenticatedClient(\"1011\",\"Test@123\");\n MediaType JSON = MediaType.parse(\"application/json\");\n RequestBody body = RequestBody.create(JSON, pidData_json);\n Request request = new Request.Builder()\n .url(\"https://aepsapi.gramtarang.org:8008/mint/aeps/ipbalanceenquiry\")\n .addHeader(\"AdhaarNumber\", en_aadhaar)\n .addHeader(\"Bankid\", selected_bank_id)\n .addHeader(\"phnumber\", agentphn)\n .addHeader(\"name\", en_name)\n .addHeader(\"imeiNumber\", androidId)\n .addHeader(\"latitude\", latitude)\n .addHeader(\"longitude\", longitude)\n .addHeader(\"outletid\",outletid)\n .addHeader(\"Accept\", \"*/*\")\n /* .addHeader(\"AdhaarNumber\", \"123456781190\")\n .addHeader(\"Bankid\", \"1234\")\n .addHeader(\"phnumber\", \"7896541230\")\n .addHeader(\"name\", \"Testinggg\")\n .addHeader(\"imeiNumber\", \"1234567890\")\n .addHeader(\"latitude\", \"17.7509436\")\n .addHeader(\"longitude\", \"83.2457357\")\n .addHeader(\"outletid\",\"12345\")*/\n\n .post(body)\n .build();\n httpClient.newCall(request).enqueue(new Callback() {\n @Override\n\n //of the api calling got failed then it will go for onFailure,inside this we have added one alertDialog\n public void onFailure(Call call, IOException e) {\n Log.d(\"TAG\",\"IN API CALL FAILURE\"+e);\n //loadingDialog.dismissDialog();\n // Toast.makeText(activity_Aeps_BalanceEnquiry.this, \"Server not Connected.\", Toast.LENGTH_SHORT).show();\n }\n\n //if API call got success then it will go for this onResponse also where we are collection\n //the response as well\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n assert response.body() != null;\n //the response we are getting from api\n response_String = response.body().string();\n\n // Toast.makeText(activity_Aeps_BalanceEnquiry.this, response_String, Toast.LENGTH_SHORT).show();\n\n\n //JSON PARSING\n if (response_String != null) {\n JSONObject jsonResponse = null;\n try {\n jsonResponse = new JSONObject(response_String);\n status = jsonResponse.getString(\"status\");\n status_code = jsonResponse.getString(\"statuscode\");\n bank_RRN = jsonResponse.getString(\"ipay_uuid\");\n data = jsonResponse.getString(\"data\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n try {\n\n JSONObject jsonData = new JSONObject(data);\n transaction_status = jsonData.getString(\"status\");\n balance = jsonData.getString(\"balance\");\n fpTransId = jsonData.getString(\"opr_id\");\n merchant_transid = jsonData.getString(\"ipay_id\");\n timestamp = jsonData.getString(\"timestamp\");\n } catch (JSONException e) {\n\n } catch (NullPointerException e) {\n }\n\n\n //PASSING INTENT DATA\n Intent intent = new Intent(activity_Aeps_BalanceEnquiry.this, activity_Aeps_BalanceEnq_Receipt.class);\n intent.putExtra(\"balance\", balance);\n intent.putExtra(\"merchant_transid\", merchant_transid);\n intent.putExtra(\"timestamp\", timestamp);\n intent.putExtra(\"aadhaar\", en_aadhaar);\n intent.putExtra(\"bank_name\", selected_bank_name);\n intent.putExtra(\"agent_id\", agentId);\n intent.putExtra(\"rrn_no\", bank_RRN);\n intent.putExtra(\"custName\", en_name);\n intent.putExtra(\"message\", message);\n intent.putExtra(\"fpTransId\", fpTransId);\n intent.putExtra(\"message\", message);\n intent.putExtra(\"status\", status);\n intent.putExtra(\"status_code\", status_code);\n intent.putExtra(\"transaction_type\", transaction_type);\n startActivity(intent);\n\n\n\n } else {\n Toast.makeText(activity_Aeps_BalanceEnquiry.this, \"You are not getting any Response From Bank !! \", Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n return null;\n }", "@Override\n protected PostEntityObject doInBackground(\n String... params) {\n Response response = null;\n try {\n //OKHttp3사용ㄴ\n OkHttpClient toServer = new OkHttpClient.Builder()\n .connectTimeout(15, TimeUnit.SECONDS)\n .readTimeout(15, TimeUnit.SECONDS)\n .build();\n Request request = new Request.Builder()\n .url(NetworkDefineConstant.SERVER_URL_POST_DETAIL + \"/\" + postkey)\n .build();\n\n Log.e(\"modify\", NetworkDefineConstant.SERVER_URL_POST_DETAIL + \"/\" + postkey);\n //동기 방식\n\n response = toServer.newCall(request).execute();\n\n ResponseBody responseBody = response.body();\n\n\n boolean flag = response.isSuccessful();\n\n if (flag) {\n return ParseDataParseHandler.getJSONExDetailList(\n new StringBuilder(responseBody.string()));\n }\n } catch (UnknownHostException une) {\n // e(\"aaa\", une.toString());\n } catch (UnsupportedEncodingException uee) {\n // e(\"bbb\", uee.toString());\n } catch (Exception e) {\n // e(\"ccc\", e.toString());\n } finally {\n if (response != null) {\n response.close();\n }\n }\n return null;\n\n\n }", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\t getCallDetails();\n\t\t\treturn null;\n\t\t}", "@Override\n protected Boolean doInBackground(String... params) {\n Boolean prepared;\n //progress.show();\n try {\n String str;\n HttpClient myClient = new DefaultHttpClient();\n HttpGet get = new HttpGet(params[0]);\n HttpResponse myResponse = myClient.execute(get);\n BufferedReader br = new BufferedReader(new InputStreamReader(myResponse.getEntity().getContent()));\n while ((str = br.readLine()) != null) {\n serverResponse = str;\n Log.d(\"Address Activity: \", str);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n prepared = true;\n return prepared;\n }", "protected HttpUtils.HttpResult doInBackground() {\n\t\tHttpUtils.HttpResult result = null;\n if (context != null && !HttpUtils.isOnline(context)) {\n result = new HttpUtils.HttpResult();\n result.setEnvelope(context.getString(R.string.error_internet_not_connected));\n result.setCode(HttpUtils.HttpResult.BAD_REQUEST);\n result.setMessage(context.getString(R.string.error_connecting_message));\n return result;\n }\n\t\tif (RequestType.POST == requestType) {\n\t\t\tresult = HttpUtils.post(url, envelope, headers);\n\t\t} else if (RequestType.GET == requestType) {\n\t\t\tresult = HttpUtils.get(url, headers);\n\t\t}\n\t\treturn result;\n\t}", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected String doInBackground(String... params) {\n RequestDataBean.setLocation(params[0]);\n HttpRequestInfo respones = new HttpRequestInfo().fun(RequestDataBean\n .getData());\n if (respones.getMessage().arg1 == 1) {\n try {\n //WeatherInfoUtil weatherInfo = new WeatherInfoUtil();\n String weather = respones.getResponse();\n WeatherInfoUtil.JsonParser(weather);\n ResponseWeather rw = new ResponseWeather();\n rw = WeatherInfoUtil.getJresponseWeather();\n if (rw.getError()!=null&&rw.getError().equals(\"0\")) {\n mWeatherMap.put(city, weather);\n return \"0\";\n }else{\n return \"11110\";\n }\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return \"999\";\n }", "@Override\n\t\tprotected void onPostExecute(NetworkTaskResult result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tthis.handleResponse(result);\n\t\t}", "protected void onPostExecute(SendMessage response) {\n\n Log.i(\"response\", String.valueOf(response) + Error);\n// if (response.getStatus().equalsIgnoreCase(\"true\")) {\n// Intent intent = new Intent(Lo.this, MainActivity.class);\n// startActivity(intent);\n\n// } else {\n// Toast.makeText(ChatActivity.this, response.getStatus(), Toast.LENGTH_LONG).show();\n// }\n\n\n // Show Response Json On Screen (activity)\n // uiUpdate.setText(Content);\n\n /****************** Start Parse Response JSON Data *************/\n\n // String OutputData = \"\"\n// \tSharedPreferences sp = getApplicationContext()\n\n\n }", "@Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n JSONObject mdata = new JSONObject();\n\n try {\n ResponseBody mObj = response.body();\n mdata = new JSONObject(mObj.string());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n switch (response.code()) {\n case 500:\n// showMessage(mContext, \"Sorry! Something went wrong. Please try after sometime\");\n mUtilities.writeLog(\"500:Server error\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n case 400:\n// showMessage(mContext, \"Sorry! Unexpected error occurred. Please try after sometime\");\n mUtilities.writeLog(\"400:Bad request\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n case 404:\n// showMessage(mContext, \"Sorry! Unexpected error occurred. Please try after sometime\");\n mUtilities.writeLog(\"404:Page Not Found\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n case 200:\n mOnRequestComplete.requestComplete(mMethod, mdata);\n break;\n case 201:\n mOnRequestComplete.requestComplete(mMethod, mdata);\n break;\n default:\n// showMessage(mContext, \"Sorry! Unexpected error occurred. Please try after sometime\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n }\n }", "@Override\n public void onResponse(String response, int id) {\n processData(response);\n\n OkHttpUtils.get().url(Constants.BANNER_URL).build().execute(new StringCallback() {\n @Override\n public void onError(Call call, Exception e, int id) {\n Log.e(\"TAG\", \"\" + e.getMessage());\n }\n\n @Override\n public void onResponse(final String response, int id) {\n //Log.e(\"TAG\", \"\" + response);\n /*MainActivity activity = (MainActivity) mContext;\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {*/\n processData1(response);\n adapter = new ThemAdapter(mContext, resultBean, result);\n rvThem.setAdapter(adapter);\n GridLayoutManager manager = new GridLayoutManager(mContext, 1);\n rvThem.setLayoutManager(manager);\n swipeRefreshLayout.setRefreshing(false);\n /* }\n });*/\n\n }\n });\n }", "@Override\n protected Void doInBackground(Void... voids) {\n response = creatingURLConnection(URL_STRING);\n return null;\n }", "@Override\n protected void onCancelled(String result) {\n\n try{\n\n mDoInBackground.onCancelled(result);\n\n }catch(Exception ex){\n\n ErrorHandler.logError(ex);\n }\n }", "@Override\r\n protected Void doInBackground(Void... params) {\r\n try {\r\n return postDataToApi();\r\n } catch (Exception e) {\r\n mLastError = e;\r\n cancel(true);\r\n return null;\r\n }\r\n }", "@Override\n protected String doInBackground(Void... voids) {\n RequestHandler requestHandler = new RequestHandler();\n\n //creating request parameters\n HashMap<String, String> params = new HashMap<>();\n params.put(\"id_masjid\", pengumuman.getIdMasjid());\n params.put(\"nama_pengumuman\", pengumuman.getMnamapengumuman());\n params.put(\"tanggal_pengumuman\", pengumuman.getTanggalPengumuman());\n params.put(\"waktu_pengumuman\", pengumuman.getWaktuPengumuman());\n params.put(\"deskripsi_pengumuman\", pengumuman.getDeskripsiPengumuman());\n params.put(\"cp_pengumuman\", pengumuman.getContactPerson());\n\n //returing the response\n return requestHandler.sendPostRequest(URLs.URL_TAMBAHPENGUMUMAN, params);\n }", "@Override\n protected String doInBackground(String... strings) {\n String response = \"\";\n try {\n URL url = new URL(strings[0]);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"GET\");\n con.setConnectTimeout(5000);\n con.setReadTimeout(5000);\n con.connect();\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n\n String inputLine;\n StringBuffer content = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n content.append(inputLine);\n }\n in.close();\n response = content.toString();\n parseValuesFromResponse(response, strings[1]);\n } catch (Exception e){\n e.printStackTrace();\n }\n return null;\n }", "void doCountryList()\n {\n final ProgressDialog progressDialog2=new ProgressDialog(ChefEditKitchenPart2.this);\n progressDialog2.setMessage(\"loading...\");\n progressDialog2.show();\n progressDialog2.setCancelable(false);\n progressDialog2.setCanceledOnTouchOutside(false);\n String url;\n\n url =WebServiceURL.COUNTRY_LIST;\n\n StringRequest postRequest = new StringRequest(Request.Method.POST, url,\n new Response.Listener<String>()\n {\n @Override\n public void onResponse(String response) {\n parseCountry(response);\n if(progressDialog2!=null)\n progressDialog2.dismiss();\n Log.d(\"Response\", response);\n }\n },\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError error) {\n if(progressDialog2!=null)\n progressDialog2.dismiss();\n System.out.println(\"Error==========\"+error);\n Toast.makeText(ChefEditKitchenPart2.this, \"Have a Network Error Please check Internet Connection.\", Toast.LENGTH_LONG).show();\n }\n }\n ){\n @Override\n protected Map<String, String> getParams()\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"format\",\"json\");\n return params;\n }\n };\n // Adding request to volley request queue\n AppController.getInstance().addToRequestQueue(postRequest);\n AppController.getInstance().getRequestQueue().getCache().remove(url);\n AppController.getInstance().getRequestQueue().getCache().clear();\n }", "@Override\n\t\t\tprotected Object doInBackground(Object... params) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n public void onResponse(String response, final int id) {\n final MsgBean result = new Gson().fromJson(response, MsgBean.class);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n --wait;\n\n if (result.code == 200) {\n\n success++;\n SignData saveData = uploadMap.get(id);\n //Log.i(TAG, \"result 200 \" + id + \" saveData : \" + saveData);\n\n if (saveData != null) {\n //Log.i(TAG, \"saveData id \" + saveData.getId());\n DBUtils.getInstance().delData(saveData.getId());\n }\n } else {\n //tv_success.setText(String.valueOf(++success));\n //tv_wait.setText(String.valueOf(++wait));\n //Toast.makeText(mContext, \"上传失败id: \" + data.eufilecode, Toast.LENGTH_SHORT).show();\n }\n\n if (System.currentTimeMillis() - lastChange > 500 || wait < 100) {\n tv_wait.setText(String.valueOf(wait));\n tv_success.setText(String.valueOf(success));\n lastChange = System.currentTimeMillis();\n }\n\n //Log.i(TAG, \"total:\" + total + \" success:\" + success + \" wait: \" + wait);\n if(wait == 0){\n Log.i(TAG, \"------------------- total:\" + total + \" success:\" + success + \" wait: \" + wait);\n uploadEnd();\n }\n }});\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "protected void onPostExecute (String result) \n\t{\n\t\t\n\t\tif(result == null)\n\t\t{\n\t\t\t\n\t\t\tLog.e(\"post execution \", \"result null\");\n\t\t\t//ThreadClassForHttpRequest http = new ThreadClassForHttpRequest(view, txt_titles, txt_links, txt_path, frameAnimation);\n\t\t\t//http.execute(parameters);\n\t\t\tToast.makeText(context, \"Yahoo Response Failure\", Toast.LENGTH_LONG).show();\n\t\t\tframeAnimation.stop();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tframeAnimation.stop();\n\t\tfor(int i=0; i<9; i++)\n\t\t{\n\t\t\tview[i].setImageBitmap(pic[i]);\n\t\t}\n\t\t\n\t\ttxt_links.setText(allLinks);\n\t\ttxt_titles.setText(allTitles);\n\t\tString path;\n\t\tpath = txt_path.getText().toString();\n\t\t\n\t\tpath = path + \"-->#\" + parameters[0] + \"#\" + parameters[1];\n\t\t\n\t\ttxt_path.setText(path);\n\t\t\n\t\t//Log.e(\"thread titles\", allTitles);\n\t\t\n\t}", "@Override\n protected String doInBackground(String... url) {\n\n // For storing data from web service\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n Log.e(\"place json\", data);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... params) {\n try {\n String NewsData;\n //define the url we have to connect with\n URL url = new URL(params[0]);\n //make connect with url and send request\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n //waiting for 7000ms for response\n urlConnection.setConnectTimeout(7000);//set timeout to 5 seconds\n\n try {\n //getting the response data\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n //convert the stream to string\n Operations operations = new Operations(getApplicationContext());\n NewsData = operations.ConvertInputToStringNoChange(in);\n //send to display data\n publishProgress(NewsData);\n } finally {\n //end connection\n urlConnection.disconnect();\n }\n\n } catch (Exception ex) {\n }\n return null;\n }", "@Override\r\n\t\tprotected String doInBackground(String... arg0) {\n\t\t\t xmlInput = (EditText) findViewById(R.id.xmlInput);\r\n\t\t response = new xmlRequest().XMLUrlHttpRequest(xmlInput.getText().toString());\r\n\r\n\t\t\tString parsedData = \"\";\r\n\t \r\n\t try {\r\n\t \r\n\t Log.w(\"AndroidParseXMLActivity\", \"Start\");\r\n\t SAXParserFactory spf = SAXParserFactory.newInstance();\r\n\t SAXParser sp = spf.newSAXParser();\r\n\t XMLReader xr = sp.getXMLReader();\r\n\t \r\n\t Bookhandler XMLHandler = new Bookhandler();\r\n\t xr.setContentHandler(XMLHandler);\r\n\t InputSource inStream = new InputSource();\r\n\t \r\n\t inStream.setCharacterStream(new StringReader(response));\r\n\t \r\n\t xr.parse(inStream);\r\n\t Log.w(\"response\",response);\r\n\t int i=0;\r\n\t ArrayList<BookData> BooksList = XMLHandler.getBooksList();\r\n\t for(;i<BooksList.size();i++){\r\n\t BookData book = BooksList.get(i);\r\n\t parsedData = parsedData + \"Book \"+(i+1) +\"Detail----->\\n\";\r\n\t parsedData = parsedData + \"Book Number: \" + book.getBookNumber() + \"\\n\";\r\n\t parsedData = parsedData + \"Description: \" + book.getDescription() + \"\\n\";\r\n\t parsedData = parsedData + \"Price: \" + book.getPrice() + \"\\n\";\r\n\t parsedData = parsedData + \"Rating: \"+ book.getRating() + \"\\n\";\r\n\t \r\n\t }\r\n\t Log.w(\"i==\",String.valueOf(i));\r\n\t Log.w(\"Data\",parsedData);\r\n\r\n\t Log.w(\"ParsingXml and populating\", \"Done\");\r\n\t }\r\n\t catch (Exception e) {\r\n\t Log.w(\"AndroidParseXMLActivity\",e );\r\n\t }\r\n\t \r\n\t return parsedData;\r\n\t\t\r\n\t\t}", "@Override\n protected Void doInBackground(Void... voids) {\n return null;\n }", "@Override\n protected Void doInBackground(Void... voids) {\n return null;\n }", "@Override\n protected Void doInBackground(Void... voids) {\n return null;\n }", "@Override\n protected String doInBackground(String... url) {\n\n // For storing data from web service\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = loadUrl(url[0]);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "protected void onPostExecute(JSONObject jsonresponse) {\n Log.i(\"Json Response\", \"f\" + jsonresponse);\n if(jsonresponse!=null) {\n try {\n Boolean postres = jsonresponse.getBoolean(\"error\");\n if (postres.equals(false) && jsonresponse.getString(\"TID\")!=null) {\n Integer coins = jsonresponse.getInt(\"currency_value\");\n if(this.asyncall!=null) {\n\n this.asyncall.asyncComplete(jsonresponse);\n }\n } else {\n // Toast.makeText(mActivity.getApplicationContext(), \"Oopps! error please try again after sometime\", Toast.LENGTH_LONG)\n // .show();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n\n }else {\n\n // Toast.makeText(mActivity.getApplicationContext(), \"error\", Toast.LENGTH_LONG)\n // .show();\n }\n\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "public void HttpWebCall(final String PreviousListViewClickedItem){\n\n class HttpWebCallFunction extends AsyncTask<String,Void,String> {\n\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n pDialog = ProgressDialog.show(ShowSingleRecordActivity.this,\"Loading Data\",null,true,true);\n }\n\n @Override\n protected void onPostExecute(String httpResponseMsg) {\n\n super.onPostExecute(httpResponseMsg);\n\n pDialog.dismiss();\n\n //Storing Complete JSon Object into String Variable.\n FinalJSonObject = httpResponseMsg ;\n\n //Parsing the Stored JSOn String to GetHttpResponse Method.\n new GetHttpResponse(ShowSingleRecordActivity.this).execute();\n\n }\n\n @Override\n protected String doInBackground(String... params) {\n\n ResultHash.put(\"StudentID\",params[0]);\n\n ParseResult = httpParse.postRequest(ResultHash, HttpURL);\n\n return ParseResult;\n }\n }\n\n HttpWebCallFunction httpWebCallFunction = new HttpWebCallFunction();\n\n httpWebCallFunction.execute(PreviousListViewClickedItem);\n }", "@Override\n public void onResponse(Call<ResponseContent> call, Response<ResponseContent> response) {//obtener datos\n\n try{\n\n ResponseContent data = response.body();\n\n boolean answer = ValidateResponse( data );\n\n if( answer ){\n\n Toast.makeText(CONTEXTO.getApplicationContext(),\n mss.msmServices.getString(data.getBody().getString(1).toString()),\n Toast.LENGTH_SHORT).show(); // muestro mensaje enviado desde el servidor\n\n }else{\n Log.i( mss.TAG, data.getBody().toString() );\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n new ServicesPeticion().SaveError(e,\n new Exception().getStackTrace()[0].getMethodName().toString(),\n this.getClass().getName());//Envio la informacion de la excepcion al server\n }\n\n\n }", "@Override\n protected String doInBackground(String... url) {\n\n // For storing data from web service\n String data = \"\";\n\n try{\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... url) {\n\n // For storing data from web service\n String data = \"\";\n\n try{\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... url) {\n\n // For storing data from web service\n String data = \"\";\n\n try{\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... url) {\n\n // For storing data from web service\n String data = \"\";\n\n try{\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n return data;\n }", "@Override\n protected Boolean doInBackground(String... params) {\n Boolean prepared;\n try {\n String str;\n HttpClient myClient = new DefaultHttpClient();\n HttpGet get = new HttpGet(params[0]);\n HttpResponse myResponse = myClient.execute(get);\n BufferedReader br = new BufferedReader(new InputStreamReader(myResponse.getEntity().getContent()));\n while ((str = br.readLine()) != null) {\n //serverResponse1 = str;\n Log.d(\"CustomerRegistration: \", str);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n prepared = true;\n return prepared;\n }", "@Override\n protected Boolean doInBackground(String... params) {\n Boolean prepared;\n try {\n String str;\n HttpClient myClient = new DefaultHttpClient();\n HttpGet get = new HttpGet(params[0]);\n HttpResponse myResponse = myClient.execute(get);\n BufferedReader br = new BufferedReader(new InputStreamReader(myResponse.getEntity().getContent()));\n while ((str = br.readLine()) != null) {\n //serverResponse1 = str;\n Log.d(\"CustomerRegistration: \", str);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n prepared = true;\n return prepared;\n }", "@Override\r\n\t protected void onPostExecute(String result) {\r\n\t super.onPostExecute(result);\r\n\t \r\n\t ParserTask parserTask = new ParserTask();\r\n\t \r\n\t // Invokes the thread for parsing the JSON data\r\n\t parserTask.execute(result);\r\n\t }", "@Override\r\n\t protected String doInBackground(String... url) {\r\n\t \r\n\t // For storing data from web service\r\n\t String data = \"\";\r\n\t \r\n\t try{\r\n\t // Fetching the data from web service\r\n\t data = downloadUrl(url[0]);\r\n\t }catch(Exception e){\r\n\t Log.d(\"Background Task\",e.toString());\r\n\t }\r\n\t return data;\r\n\t }", "@Override\n\t\t\t\tprotected Void doInBackground(Void... params)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}", "@Override\n protected StringBuilder doInBackground(String... params) {\n return postData(params[0],params[1],params[2],params[3]);\n }", "public void onPostExecute(String str) {\n super.onPostExecute(str);\n try {\n UploadLocationDataActivity.this.progressDialog.dismiss();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str2 = \"Something went wrong. Please try again.\";\n if (str != null) {\n String str3 = \"UploadLocationData\";\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(\"response....\");\n sb.append(str);\n Log.d(str3, sb.toString());\n if (new JSONObject(str).optString(\"statusCode\").equalsIgnoreCase(DiskLruCache.VERSION_1)) {\n Utility.showAlertDialog(UploadLocationDataActivity.this, \"File uploaded successfully\");\n } else {\n Toast.makeText(UploadLocationDataActivity.this, str2, 1).show();\n }\n } catch (Exception e2) {\n e2.printStackTrace();\n Toast.makeText(UploadLocationDataActivity.this, str2, 1).show();\n }\n } else {\n Toast.makeText(UploadLocationDataActivity.this, str2, 1).show();\n }\n }", "public void onPostExecute(String str) {\n super.onPostExecute(str);\n try {\n UploadLocationDataActivity.this.progressDialog.dismiss();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str2 = \"Something went wrong. Please try again.\";\n if (str != null) {\n String str3 = \"UploadLocationData\";\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(\"response....\");\n sb.append(str);\n Log.d(str3, sb.toString());\n if (new JSONObject(str).optString(\"statusCode\").equalsIgnoreCase(DiskLruCache.VERSION_1)) {\n Utility.showAlertDialog(UploadLocationDataActivity.this, \"File uploaded successfully\");\n } else {\n Toast.makeText(UploadLocationDataActivity.this, str2, 1).show();\n }\n } catch (Exception e2) {\n e2.printStackTrace();\n Toast.makeText(UploadLocationDataActivity.this, str2, 1).show();\n }\n } else {\n Toast.makeText(UploadLocationDataActivity.this, str2, 1).show();\n }\n }", "@Override\n public void onResponse(Call<Departments> call, Response<Departments> response) {\n try\n {\n if(dialog != null && dialog.isShowing())\n {\n dialog.dismiss();\n }\n\n int statusCode = response.code();\n if (statusCode == 200 || statusCode == 201) {\n\n Departments s = response.body();\n\n if(s!=null){\n\n Toast.makeText(getContext(), \"Department Creted Successfully \", Toast.LENGTH_SHORT).show();\n\n dialogs.dismiss();\n showalertbox();\n\n\n\n }\n\n\n\n\n }else {\n Toast.makeText(getActivity(), \"Failed Due to \"+response.message(), Toast.LENGTH_SHORT).show();\n }\n }\n catch (Exception ex)\n {\n\n if(dialog != null && dialog.isShowing())\n {\n dialog.dismiss();\n }\n ex.printStackTrace();\n }\n// callGetStartEnd();\n }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif(resp.contains(\"success\"))\n\t\t\t{\n\t\t\t\tparsingmethod();\n\t\t\t\tToast.makeText(getApplicationContext(), resp, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tToast.makeText(getApplicationContext(), resp, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\treturn null;\n\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n protected Void doInBackground(String ... params) {\n HttpClient httpclient = new DefaultHttpClient();\n\n HttpPost httppost_ac_wemo_on;\n httppost_ac_wemo_on = new HttpPost(url_ac_wemo_on);\n\n\n try {\n\n // Execute HTTP Post Request\n HttpResponse response_1 = httpclient.execute(httppost_ac_wemo_on);\n\n// HttpResponse response_7 = httpclient.execute(httppost);\n// HttpResponse response_8 = httpclient.execute(httppost);\n// HttpResponse response_9 = httpclient.execute(httppost);\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n Log.e(\"salim\",e.getMessage().toString());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n Log.e(\"salim\",e.getMessage().toString());\n\n }\n\n return null;\n }", "@Override\n protected Integer doInBackground(String... urlString) {\n try {\n \tCargarDatos();\n \n } catch (Exception exception) {\n\n }\n return null ;\n }", "@Override\n protected Void doInBackground(Void... voids) {\n HttpHandler handler = new HttpHandler();\n\n // Realizar llamada a url y obtener respuesta\n String[] mIdsArray;\n Log.i(\"URL\", url_by_gps + \"lat=\" + mLocation.getLatitude() + \"&lon=\" + mLocation.getLongitude() + \"&units=\" + mode + \"&appid=\" + API_KEY);\n String jsonStr = handler.makeServiceCall(url_by_gps + \"lat=\" + mLocation.getLatitude() + \"&lon=\" + mLocation.getLongitude() + \"&units=\" + mode + \"&appid=\" + API_KEY + \"&lang=es\");\n Log.i(TAG, \"Respuesta de api: \" + jsonStr);\n if (jsonStr != null) {\n try {\n\n //JSONArray jsonArray = new JSONArray(jsonStr);\n JSONObject jsonObj = new JSONObject(jsonStr);\n weatherData = new WeatherData(jsonObj);\n\n URL url = new URL(url_img + weatherData.getWeather().getIcon() + IMG_EXTENSION);\n Bitmap image = BitmapFactory.decodeStream(url.openConnection().getInputStream());\n weatherData.getWeather().setIconBitmap(image);\n//url.openConnection().\n Log.i(\"AG\", \"Finaliza seteo\");\n url.openConnection().getInputStream().close();\n } catch (final JSONException e) {\n Log.e(TAG, \"Json parsing error: \" + e.getMessage());\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(),\n \"Json parsing error: \" + e.getMessage(),\n Toast.LENGTH_LONG).show();\n }\n });\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } else {\n Log.e(TAG, \"No es posible obtener json del server.\");\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(),\n \"No es posible obtener json del server. Revisar LogCat por posibles errores!\",\n Toast.LENGTH_LONG).show();\n }\n });\n }\n\n\n return null;\n }", "@Override\n\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n protected JSONObject doInBackground(String... url) {\n JSONObject data = null;\n\n try {\n // Fetching the data from web service\n data = new NetworkManager().makeHttpGetConnectionWithJsonOutput(url[0]);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n public void processFinish(String result) {\n MyAsyncTask getGlobalModel = new MyAsyncTask(MainActivity.this, file, \"\",\"\",\"getModel\", new MyAsyncTask.AsyncResponse() {\n @Override\n public void processFinish(String result) {\n Log.i(\"Output: GetGlobalModel\", result);\n }\n });\n getGlobalModel.execute();\n Toast.makeText(MainActivity.this, \"Fetched Global Model Successfully\", Toast.LENGTH_SHORT).show();\n Log.i(\"Output: isModelUpdated\", \"Done\");\n\n }", "@Override\r\n protected String doInBackground(String... url) {\r\n\r\n // For storing data from web service\r\n String data = \"\";\r\n\r\n try{\r\n // Fetching the data from web service\r\n data = downloadUrl(url[0]);\r\n }catch(Exception e){\r\n Log.d(\"Background Task\",e.toString());\r\n }\r\n return data;\r\n }", "@Override\r\n public void onResponse(JSONArray response) {\n parseData(response, requestCount);\r\n }", "@Override\r\n\t\tprotected String doInBackground(String... arg0)\r\n\t\t{\n\t\t\treturn \"something\";\r\n\t\t}", "@Override\n protected void onPostExecute(String result) {\n HomeFragment.ParserTask parserTask = new HomeFragment.ParserTask();\n\n // Start parsing the Google places in JSON format\n // Invokes the \"doInBackground()\" method of the class ParseTask\n try {\n JSONObject jsonObj = new JSONObject(result);\n String code = jsonObj.getString(\"status\");\n\n if(code.equals(\"OVER_QUERY_LIMIT\")){\n Toast.makeText(getActivity(),\n \"API Status: [Over Query Limit]\", Toast.LENGTH_SHORT).show();\n }\n else{\n parserTask.execute(result);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected Object doInBackground(Object[] objects)\n {\n URL url = null; \n\n try\n {\n url = new URL(requestUrl);\n }\n catch (MalformedURLException e)\n {\n e.printStackTrace();\n }\n\n // Create and open HTTP connection\n HttpURLConnection connection = null;\n try\n {\n connection = (HttpURLConnection) url.openConnection();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n\n try\n {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(line);\n }\n\n bufferedReader.close();\n\n return stringBuilder.toString();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n connection.disconnect();\n }\n\n return null;\n }", "@Override\n protected String doInBackground(Void... voids) {\n RequestHandler requestHandler = new RequestHandler();\n\n //creating request parameters\n HashMap<String, String> params = new HashMap<>();\n params.put(\"id_pengumuman\", pengumuman.getMidpengumuman());\n params.put(\"nama_pengumuman\", pengumuman.getMnamapengumuman());\n params.put(\"tanggal_pengumuman\", pengumuman.getTanggalPengumuman());\n params.put(\"waktu_pengumuman\", pengumuman.getWaktuPengumuman());\n params.put(\"deskripsi_pengumuman\", pengumuman.getDeskripsiPengumuman());\n params.put(\"cp_pengumuman\", pengumuman.getContactPerson());\n\n //returing the response\n return requestHandler.sendPostRequest(URLs.URL_EDITPENGUMUMAN, params);\n }", "@Override\n public void onResponse(Call call, Response response) throws IOException {\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }", "protected Void doInBackground(String... urls) {\n /************ Make Post Call To Web Server ***********/\n /*****************************************************/\n return null;\n }", "@Override\n\t\t protected Void doInBackground(Void... params) {\n\t\t \tUnidataSuperActivity.setDone(false);\n\t\t \t\n\t\t \t/* Gets the URL address of the data wanted\n\t\t \t * URL comes from the Super, which is set by the MainActivity\n\t\t \t */\n\t\t URL textUrl;\n\t\t String address = UnidataSuperActivity.getURL();\n\t\t \n\t\t /* Converts the URL into a temporary XML file, which then is converted into a String\n\t\t * Uses the Commons IO library for FileUtils\n\t\t */\n\t\t try {\n\t\t textUrl = new URL(address);\n\t\t System.out.println(textUrl);\n\t\t File testFile2 = File.createTempFile(\"temp2\", \".dat\");\n\t\t testFile2.deleteOnExit();\n\t\t FileUtils.copyURLToFile(textUrl, testFile2);\n\t\t textResult = FileUtils.readFileToString(testFile2);\n\t\t \n\t\t } catch (MalformedURLException e) {\n\t\t e.printStackTrace();\n\t\t textResult = e.toString(); \n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t textResult = e.toString(); \n\t\t }\n\t\t \n\t\t /* sets the XML String in the super class so it can be parsed in the main thread\n\t\t * and then lets the main thread know it has finished\n\t\t */\n\t\t UnidataSuperActivity.setXML(textResult);\n\t\t UnidataSuperActivity.setDone(true);\n\n\t\t return null;\n\t\t \n\t\t }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(Call call, Response response) throws IOException {\n Log.d(\"OUTY\", response.body().string());\n\n\n if (response.isSuccessful()){\n try{\n startActivity(newIntent);\n JSONObject ob = new JSONObject(response.body().string());\n\n // Check submission status and inform user\n if(ob.get(\"status\").equals(\"submissionSuccess\")){\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n status.setText(\"Login Success\");\n\n // Move to next Activity\n startActivity(newIntent);\n }\n });\n\n } else {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n status.setText(\"Submission Fail\");\n }\n });\n }\n\n }catch (Exception e){\n System.out.println(e);\n }\n }\n }", "protected String doInBackground(String... args) {\n try {\n Log.v(TAG, \"In Do in Background\");\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(\"email\", username));\n params.add(new BasicNameValuePair(\"pwd\", password));\n // getting JSON string from URL\n JSONObject json =jParser.makeHttpRequest(url_all_login, \"POST\", params);\n //Object Parsing Failed here hence by using trail guide using JSONParser.alternateJSONArray to parse user data.\n //Hence not using json instance of object using a BACKUP static variable of Parser class for proccessing.\n //To use this backup utility theme the process should be standard and return unique or two out put only or ether way use three logical step\n if(json != null) {\n // As if login fails it returns object handling fail logic here.\n //We can make it general by sending array from server side so we can only use alternateJSONArray variable\n\n }\n if(JSONParser.alternateJSONArray != null)\n {\n Log.v(TAG, \"USING BACKUP ARRAY\");\n //Check your log cat for JSON futher details\n for (int jsonArrayElementIndex=0; jsonArrayElementIndex < JSONParser.alternateJSONArray.length(); jsonArrayElementIndex++) {\n JSONObject jsonObjectAtJsonArrayElementIndex = JSONParser.alternateJSONArray.getJSONObject(jsonArrayElementIndex);\n userid=jsonObjectAtJsonArrayElementIndex.getString(\"u_id\");\n otpkey=jsonObjectAtJsonArrayElementIndex.getString(\"OTP\");\n vrfy=jsonObjectAtJsonArrayElementIndex.getString(\"is_verified\");\n Log.v(TAG,\"\" +userid);\n Log.v(TAG,\"\" +otpkey);\n Log.v(TAG,\"\" +vrfy);\n if(jsonObjectAtJsonArrayElementIndex.getString(\"email\").equals(username) && jsonObjectAtJsonArrayElementIndex.getString(\"mobile\").equals(password))\n {\n Log.v(TAG,\"Login Successful Now setting loginflag true\");\n loginflag = true;\n }\n }\n\n\n }\n else\n {\n //JSON is null ether no data or 204 returned by server\n }\n } catch (Exception e) {\n e.printStackTrace();\n Log.v(TAG, \"Exception at end :\" + e.toString());\n //Log.e(\"TAG\", \"Error......!RecoverIt\");\n }\n\n return null ;\n }", "@Override\n protected Object doInBackground(Object[] objects) {\n\n return null;\n }", "@Override\n public void onResponse(Call call, final Response response) {\n if (response.isSuccessful()) {\n try {\n String body = response.body().string();\n// Logger.LOGD(TAG, \"Set Task Option Result: \" + body);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n showToast(R.string.file_not_found);\n } catch (IOException e) {\n e.printStackTrace();\n showToast(R.string.app_exception);\n }\n showToast(R.string.success_save_aria_setting);\n }\n }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif(hs.contains(\"success\"))\n\t\t\t{\n\t\t\t\tparsingmethod();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tToast.makeText(getApplicationContext(), hs, Toast.LENGTH_SHORT).show();\n\t\t\t\toslist.add(null);\n\t\t\t\tmlist.setAdapter(null);\n\t\t\t}\n\t\t}", "@Override\n protected Boolean doInBackground(String... params) {\n Boolean prepared;\n try {\n String str;\n HttpClient myClient = new DefaultHttpClient();\n HttpGet get = new HttpGet(params[0]);\n HttpResponse myResponse = myClient.execute(get);\n BufferedReader br = new BufferedReader(new InputStreamReader(myResponse.getEntity().getContent()));\n while ((str = br.readLine()) != null) {\n serverResponse = str;\n Log.d(\"CustomerRegistration: \", str);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n prepared = true;\n return prepared;\n }", "@Override\n protected Boolean doInBackground(String... params) {\n Boolean prepared;\n try {\n String str;\n HttpClient myClient = new DefaultHttpClient();\n HttpGet get = new HttpGet(params[0]);\n HttpResponse myResponse = myClient.execute(get);\n BufferedReader br = new BufferedReader(new InputStreamReader(myResponse.getEntity().getContent()));\n while ((str = br.readLine()) != null) {\n serverResponse = str;\n Log.d(\"CustomerRegistration: \", str);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n prepared = true;\n return prepared;\n }", "@Override\n protected String doInBackground(String... strings) {\n try {\n Client c = new Client(Constants.URL_PROGNOSISCALCULATOR);\n c.setLongTimeout();\n request = strings[0];\n String response = c.sendPostJSON(strings[0]);\n\n ArrayList<PrognosisCalculationResult> items = new ArrayList<>();\n if(response.charAt(0) == '{') {\n JSONObject error = new JSONObject(response);\n if(error.has(\"Error Description\")) {\n this.error = error.getString(\"Error Description\");\n }\n } else {\n JSONArray array = new JSONArray(response);\n for (int i = 0; i < array.length(); i++) {\n JSONObject o = array.getJSONObject(i);\n PrognosisCalculationItem p = new PrognosisCalculationItem(o.getJSONObject(\"prognosis\"));\n Service s = new Service(o.getJSONObject(\"service\"));\n items.add(new PrognosisCalculationResult(p, s));\n }\n this.items = items;\n }\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n protected Void doInBackground(Void... params)\n {\n\t\t\t/* This is the part where the JSON parsing called, and this part\n\t\t\t * fills the List<EventInfo> events with event objects\n\t\t\t */\n //Get the current thread's token\n synchronized (this)\n {\n\n events=createList();\n // This ends the spinner\n publishProgress(100);\n }\n\n return null;\n }", "@Override\n public void onFailure(Call call, IOException e) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n cancelProgressDialog();\n Toast.makeText(getContext(), \"获取数据失败,请稍后再试...\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "@Override\n protected Double doInBackground(String... params) {\n postData(params[0], params[1]);\n return null;\n }", "protected Double doInBackground(String... params) \n\t\t{\n\t\t\tpostData(params[0],params[1],params[2],params[3],params[4],params[5]);\n\t\t\treturn null;\n\t\t}", "private void ListenerForAsynctask() {\n\t\tAsyncTaskCall.setCallback(new CallbacksFromAsynctask() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onCallbackRecieved(int requestCode, int statuscode,\r\n\t\t\t\t\tString result) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\td.dismissCustomSpinProgress();\r\n\t\t\t\tSystem.out.println(\"s\" + statuscode + \"r\" + requestCode);\r\n\t\t\t\tif (statuscode == 1) {\r\n\t\t\t\t\tif (requestCode == 1) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tJSONObject obj = new JSONObject(result);\r\n\t\t\t\t\t\t\tSystem.out.println(\"res\" + result);\r\n\t\t\t\t\t\t\tif (obj.optString(\"is_present\").equals(\"2\")) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"service login success....\");\r\n\r\n\t\t\t\t\t\t\t\tToast.makeText(TrainerHomeActivity.this,\r\n\t\t\t\t\t\t\t\t\t\t\"Success\", 500).show();\r\n\t\t\t\t\t\t\t\tIntent i = new Intent(TrainerHomeActivity.this,\r\n\t\t\t\t\t\t\t\t\t\tHomeActivity.class);\r\n\t\t\t\t\t\t\t\tstartActivity(i);\r\n\t\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\t\toverridePendingTransition(\r\n\t\t\t\t\t\t\t\t\t\tR.anim.open_translate,\r\n\t\t\t\t\t\t\t\t\t\tR.anim.close_translate);\r\n\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// if failed\r\n\t\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\t\t\t\t\t\t\t\"Something went wrong, please try again later!\",\r\n\t\t\t\t\t\t\t\t\t\t500).show();\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t// d.showSingleButtonDialog(\r\n\t\t\t\t\t\t\t\t\t// TrainerHomeActivity.this,\r\n\t\t\t\t\t\t\t\t\t// \"Internal Error\");\r\n\r\n\t\t\t\t\t\t\t\t\td.showSingleButtonDialog(\r\n\t\t\t\t\t\t\t\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\t\t\t\t\t\t\t\t\"Internal Error\");\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetdata(number);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "@Override\n public void onResponse(Call call, final Response response) throws IOException {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n try {\n// responseText.setText(response.body().string());\n Log.d(\"Flask Server\",response.body().string());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n });\n }", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\ttry {\n\t\t\t\tif (getNews() == null) {\n\t\t\t\t\tprocessNewsInitial();\n\t\t\t\t} else {\n\t\t\t\t\tprocessNews();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String resp;\n\n try {\n String parsedString = \"\";\n\n String path = \"http://www.emanuelebriano.it/json_server.php\";\n\n OutputStream os = null;\n InputStream is = null;\n HttpURLConnection conn = null;\n\n //Log.i(Constants.AppTAG, \" preparing input of the POST\");\n\n //constants\n URL url = new URL(path);\n\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"Europe/Rome\"));\n\n JSONObject postDataParams = new JSONObject();\n postDataParams.put(\"APIKey\", \"Mad\");\n postDataParams.put(\"function\", \"weblog\");\n String message = \"[\" + Constants.randomID + \"]\" + msg;\n postDataParams.put(\"message\", message);\n\n conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(15000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n\n os = conn.getOutputStream();\n BufferedWriter writer = new BufferedWriter(\n new OutputStreamWriter(os, \"UTF-8\"));\n writer.write(getPostDataString(postDataParams));\n\n //Log.i(Constants.AppTAG, \" preparing to write \" + getPostDataString(postDataParams));\n\n writer.flush();\n writer.close();\n os.close();\n\n int responseCode = conn.getResponseCode();\n\n //Log.i(Constants.AppTAG, \" response code: \" + String.valueOf(responseCode));\n\n if (responseCode == HttpsURLConnection.HTTP_OK)\n {\n\n } else {\n resp = new String(\"false : \" + responseCode);\n }\n\n JSONObject jObj = null;\n\n // return JSON String\n return jObj;\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@Override\n\t\tprotected Void doInBackground(String... arg0) {\n\t\t\tdoSomething();\n\t\t\treturn null;\n\t\t}", "@Override\r\n\t\t\tpublic void onResponse(Call arg0, Response response) throws IOException {\n\t\t\t\tString resultmsg = response.body().string();\r\n\t\t\t\tString result=\"\";\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tresult = URLDecoder.decode(resultmsg, \"UTF-8\");\r\n//\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t\tFLogger.e(Global.INNER_TAG, \"解析数据出错\");\r\n//\t\t\t\t}\r\n\t\t\t\t// 是否有响应\r\n\t\t\t\tif (response.isSuccessful()) {\r\n\t\t\t\t\tFLogger.e(Global.INNER_TAG, \"success\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tonResult(callback, result.toString(),true);\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tFLogger.e(Global.INNER_TAG, \"failed\");\r\n\t\t\t\t\tonResult(callback, result.toString(),false);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n protected void onPostExecute(final Void unused) {\n super.onPostExecute(unused);\n Log.i(\"Dict\", \"Done processing\");\n delegate.processFinish(result);\n }", "@Override\n\tprotected Result doInBackground(Params... params)\n\t{\n\t\treturn null;\n\t}", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n\n try{\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n\n return data;\n }", "@Override\n protected Void doInBackground(Void... voids) {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BaseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n WeatherService service = retrofit.create(WeatherService.class);\n Call<CurrentWeatherCallResult> call = service.getCurrentWeatherDataLatLng(String.valueOf(latLng.latitude), String.valueOf(latLng.longitude), AppId);\n call.enqueue(new Callback<CurrentWeatherCallResult>() {\n @Override\n public void onResponse(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Response<CurrentWeatherCallResult> response) {\n if (response.code() == 200 && response.body() != null) {//TODO DEFINE 200\n\n CurrentWeatherCallResult currentWeatherCallResult = response.body();\n CurrentWeather currentWeather =\n new CurrentWeather(\n position,\n currentWeatherCallResult.weather.get(0).description,\n currentWeatherCallResult.weather.get(0).icon,\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_max - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp_min - 273)),\n String.valueOf(Math.round((double) currentWeatherCallResult.main.temp - 273)),\n currentWeatherCallResult.name);\n Intent i;\n switch (position) {\n case -2:\n i = new Intent(\"CURRENT_WEATHER_SEARCH_A\");\n break;\n case -1:\n i = new Intent(\"CURRENT_WEATHER\");\n break;\n default:\n i = new Intent(\"CURRENT_WEATHER_F\");\n break;\n\n\n }\n i.putExtra(\"CURRENT_WEATHER_OBJECT\", currentWeather);\n mContext.sendBroadcast(i);\n }\n }\n\n @Override\n public void onFailure(@NonNull Call<CurrentWeatherCallResult> call, @NonNull Throwable t) {\n t.getMessage();\n }\n });\n return null;\n }", "@Override\n protected JSONArray doInBackground(String... params) {\n String url = params[0];\n Log.i(TAG,\"do In Background is called\");\n return getJSONFromUrl(url);\n }", "@Override\n public void onResumeWithResponse(BaseGlobalPostListFragment fragment) {\n if (!wasSuccessful()) {\n fragment.onLoadingFailure();\n }\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n final ArrayList<Post> posts = PostStore.getListData(response);\n if (posts == null) {\n manager.addCallback(new CallbackManager.Callback<BaseGlobalPostListFragment>() {\n @Override\n public void execute(BaseGlobalPostListFragment object) {\n //no more posts\n object.noMore = true;\n object.onLoadingComplete();\n }\n });\n //nothing to do here\n return;\n }\n\n final int nextOffset = StoreUtil.getNextOffset(response);\n\n //process all post data\n for (Post post : posts) {\n post.setFullView(false);\n post.processData();\n post.setCallbackManager(manager);\n }\n\n //update fragment\n manager.addCallback(new CallbackManager.Callback<BaseGlobalPostListFragment>() {\n @Override\n public void execute(BaseGlobalPostListFragment object) {\n object.postsAdapter.addAll(posts);\n if (nextOffset != -1) object.offset = nextOffset;\n object.onLoadingComplete();\n }\n });\n }\n }).start();\n }", "protected Object doInBackground(Object... objects) {\n\t\t\tString myurl = (String) objects[0];\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\tHttpPost httpPost = new HttpPost(myurl);\n\t\t\tList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);\n\t\t\tnameValuePairs.add(new BasicNameValuePair(\"content\", output));\n\t\t\ttry {\n\t\t\t\thttpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tclient.execute(httpPost);\n\t\t\t} catch (ClientProtocolException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"Yay2\");\n\t\t\ttry {\n\t\t\t\tHttpResponse response = client.execute(httpPost);\n\t\t\t\tStatusLine statusLine = response.getStatusLine();\n\t\t\t\tint statusCode = statusLine.getStatusCode();\n\t\t\t\tSystem.out.println(\"Yay3\");\n\t\t\t\tif (statusCode == 200) {\n\t\t\t\t\tHttpEntity entity = response.getEntity();\n\t\t\t\t\tInputStream content = entity.getContent();\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(content));\n\t\t\t\t\tSystem.out.println(\"Yay4\");\n\t\t\t\t\tString line;\n\t\t\t\t\t//List<String> diary = new ArrayList<String>();\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tbuilder.append(line);\n\t\t\t\t\t\t//diary.add(line);\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Failed to download\");\n\t\t\t\t}\n\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn builder.toString();\n\t\t}", "@Override\n protected void onPostExecute(String s) {\n\n super.onPostExecute(s);\n loading.dismiss();\n parseAndShow(s);\n //startTime = SystemClock.uptimeMillis();\n //handler.postDelayed(updateTimerThread, 0);\n //startTimer();\n\n }", "@Override\r\n protected Codigos doInBackground(Void... voids) {\n try {\r\n\r\n FormBody.Builder formBuilder = new FormBody.Builder()\r\n .add(\"usuarioId\", usuarioId)\r\n .add(\"ubicaciones\", jsonLocalizador);\r\n\r\n RequestBody formBody = formBuilder.build();\r\n Request request = new Request.Builder()\r\n .url(RestUrl.REST_ACTION_GUARDAR_UBICACION)\r\n .post(formBody)\r\n .build();\r\n\r\n Response response = client.newCall(request).execute();\r\n respuesta = response.body().string();\r\n Gson gson = new Gson();\r\n String jsonInString = respuesta;\r\n return codigo = gson.fromJson(jsonInString, Codigos.class);\r\n\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n if(e.getMessage().contains(\"Failed to connect to\")){\r\n codigo = new Codigos();\r\n codigo.setCodigo(1);\r\n return codigo;\r\n }else{\r\n codigo = new Codigos();\r\n codigo.setCodigo(404);\r\n return codigo;\r\n }\r\n }\r\n }", "protected void onPostExecute(String response) {\n FragmentActivity activity = activityReference.get();\r\n\r\n // Check the current activity is still running\r\n if (!(activity == null || activity.isFinishing())){\r\n\r\n // Hide progress bar\r\n ProgressBar progressBar = activity.findViewById(R.id.progressBar);\r\n progressBar.setVisibility(View.GONE);\r\n\r\n // Unserialize response\r\n ResponseOrionLyrics responseOrion;\r\n try {\r\n // Get result from request\r\n JSONObject jsonObject = new JSONObject(response).optJSONObject(\"result\");\r\n // Unserialized result to a ResponseOrionLyrics object\r\n responseOrion = new Gson().fromJson(jsonObject.toString(), ResponseOrionLyrics.class);\r\n }catch (JSONException err){\r\n Log.d(\"Error\", err.toString());\r\n responseOrion = new ResponseOrionLyrics(\"Aucune music disponible\");\r\n }\r\n\r\n View view = activity.findViewById(R.id.fragment_lyrics);\r\n\r\n // If valid response\r\n if (responseOrion.isValid()){\r\n // Add music to history and store it\r\n Music music = new Music(responseOrion);\r\n musicHistory = Utils.addMusic(activity, musicHistory, music);\r\n\r\n // Face different name used for same music between Spotify and Orion\r\n if (!music.getArtist().equals(artist) || !music.getTitle().equals(song)){\r\n Music music_2 = new Music(song, artist);\r\n music_2.setLyrics(music.getLyrics());\r\n music_2.setAlreadySearch(true);\r\n musicHistory = Utils.addMusic(activity, musicHistory, music_2);\r\n }\r\n // Store in history\r\n Utils.storeMusicHistory(activity, this.musicHistory);\r\n\r\n // Show results\r\n HomeFragmentDirections.ActionHomeFragmentToLyricsResultFragment action =\r\n HomeFragmentDirections.actionHomeFragmentToLyricsResultFragment(music);\r\n Navigation.findNavController(view).navigate(action);\r\n }\r\n // If invalid response\r\n else{\r\n Music music = new Music(song, artist);\r\n\r\n // Add music to history and store it\r\n musicHistory = Utils.addMusic(activity, musicHistory, music);\r\n Utils.storeMusicHistory(activity, this.musicHistory);\r\n\r\n // Start not found activity\r\n HomeFragment.showNotFoundDialog(activity, activity.getApplicationContext(),view, song, artist);\r\n }\r\n }\r\n }" ]
[ "0.68671584", "0.6799056", "0.67134106", "0.65297973", "0.6515256", "0.6501733", "0.64625525", "0.64483565", "0.640729", "0.64049333", "0.6390008", "0.6328438", "0.6282712", "0.6278639", "0.62621474", "0.62494504", "0.6220453", "0.6210496", "0.61833483", "0.61785096", "0.61713505", "0.6167943", "0.6160097", "0.6157131", "0.6156782", "0.6133338", "0.61318076", "0.61307865", "0.61293113", "0.61293113", "0.61293113", "0.6127318", "0.61270374", "0.6123927", "0.61210173", "0.6117351", "0.61048245", "0.61048245", "0.61048245", "0.61048245", "0.61039734", "0.61039734", "0.61019707", "0.61010677", "0.6098417", "0.6091564", "0.6087093", "0.6087093", "0.6086707", "0.6074771", "0.6060543", "0.6060543", "0.6060543", "0.60519063", "0.6051509", "0.60514736", "0.6051466", "0.6043816", "0.6043223", "0.6040808", "0.60392123", "0.6017342", "0.6012005", "0.601118", "0.60072935", "0.60055435", "0.5997893", "0.59940165", "0.5978366", "0.59758323", "0.5973889", "0.59602565", "0.59598315", "0.5959029", "0.59563845", "0.5954816", "0.5954816", "0.59525037", "0.5944915", "0.5940087", "0.5924933", "0.5923742", "0.59222674", "0.5920414", "0.5916301", "0.59096456", "0.5907648", "0.5900995", "0.58898956", "0.5889031", "0.5886525", "0.5884252", "0.58822054", "0.58763254", "0.5870763", "0.58638304", "0.5863803", "0.58629805", "0.5860608", "0.58578736" ]
0.74437445
0
Action for linking to the unconfirmed POs page
public String openShowUnconfirmed(){ return SUCCESS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/confirm\", method = RequestMethod.GET)\n\t public String confirm(ModelMap map, javax.servlet.http.HttpServletRequest request) \n\t {\n\t\t HttpSession session = request.getSession();\n\t\t if (session.getAttribute(\"user\") == null) {\n\t\t\t map.addAttribute(\"error\", \"Error, You need to login before completing the purchase\");\n\t\t } else {\n\t\t\t // clear items from cart as order has completed \n\t\t\t List<Cart> cartItems = new ArrayList<Cart>();\n\t\t\t if (session.getAttribute(\"cartItems\") != null)\n\t\t\t\t cartItems = (List<Cart>) session.getAttribute(\"cartItems\");\n\t\n\t\t\t map.addAttribute(\"cartItems\", cartItems);\n\t\t\t\n\t\t }\n\t\t\n\t return \"confirm\"; \n\t }", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "public void ClickConfirmationPage() {\r\n\t\tconfirmation.click();\r\n\t\t\tLog(\"Clicked the \\\"Confirmation\\\" button on the Birthdays page\");\r\n\t}", "@Then(\"^user is on Your Account page$\")\r\n public void user_is_on_Your_Account_page() throws Throwable {\n throw new PendingException();\r\n }", "@Then(\"^i should redirected to confirmation page$\")\n public void i_should_redirected_to_confirmation_page() throws Throwable {\n throw new PendingException();\n }", "public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }", "public KPAUISignOnFccPage clickRefillPrescriptionLink(){\n getRefillPrescriptionLink().click();\n return new KPAUISignOnFccPage(driver);\n }", "public String cancelar()\r\n/* 519: */ {\r\n/* 520:545 */ String url = \"\";\r\n/* 521:546 */ if (this.facturaProveedorSRI.getFacturaProveedor() != null) {\r\n/* 522:547 */ url = \"/paginas/compras/procesos/facturaProveedor?faces-redirect=true\";\r\n/* 523: */ } else {\r\n/* 524:549 */ url = \"/paginas/financiero/contabilidad/procesos/compraCajaChica?faces-redirect=true\";\r\n/* 525: */ }\r\n/* 526:551 */ return url;\r\n/* 527: */ }", "public void goToConfirmation() {\n ((AccountIdentifierRegistrationFragment) getParentFragment()).showChildFragment(PhoneNumberRegistrationConfirmationFragment.newInstance(this.airPhone, this.dataPassedIn.toBuilder().accountSource(AccountSource.Phone).build()), true);\n }", "public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}", "@Override\n public void clickPositive() {\n meetingManager.undoConfirm(chosenTrade, chosenTrader);\n Toast.makeText(this, \"Successfully undo confirm\", Toast.LENGTH_SHORT).show();\n viewList();\n\n }", "public void needconfirmstion(Pending_appoint_Owner pending_appoint_owner) {\n //TODO\n newOwners.put(pending_appoint_owner.grantee.getId(), pending_appoint_owner);\n user.add_msg(\"a new Owner is being appointed for store:\" + getStore().getName()\n + \"- required your confirmation - \" + pending_appoint_owner.grantee.getId());\n }", "@RequestMapping(\"/finalConfirm\")\n public String finalConfirm(Model model, Principal principal){\n model.addAttribute(\"user\", new User());\n model.addAttribute(\"categories\", categoryRepository.findAll());\n model.addAttribute(\"carts\", cartRepository.findAll());\n model.addAttribute(\"user_id\", userRepository.findByUsername(principal.getName()).getId());\n\n\n// model.addAttribute(\"carts\", cartRepository.findAll());\n\n SimpleMailMessage msg = new SimpleMailMessage(); //send confirmation email\n msg.setTo(userService.getUser().getEmail()); //add comma in between emails to send to multiple accounts\n msg.setTo(userService.getUser().getEmail()); //add comma in between emails to send to multiple accounts\n\n msg.setSubject(\"Thank you for your order\");\n msg.setText(\"Thank you for your order \\n You will arrive within 10 days\");\n\n javaMailSender.send(msg);\n\n Cart currentCart = cartRepository.findByEnabledAndUser(true, userService.getUser());\n currentCart.setEnabled(false);\n cartRepository.save(currentCart);\n\n return \"finalConfirm\";\n\n }", "public void cot_nuevacotizacion(){\n try{\n FacesContext context = FacesContext.getCurrentInstance();\n context.getExternalContext().redirect(\"cot_nuevacotizacion.xhtml\");\n }\n catch(Exception e ){\n System.out.println(\"Error: \"+e);\n }\n }", "@Action( ACTION_CONFIRM_REMOVE_REFERENCE )\r\n public String getConfirmRemoveReference( HttpServletRequest request )\r\n {\r\n int nId = Integer.parseInt( request.getParameter( PARAMETER_ID_REFERENCE ) );\r\n UrlItem url = new UrlItem( getActionUrl( ACTION_REMOVE_REFERENCE ) );\r\n url.addParameter( PARAMETER_ID_REFERENCE, nId );\r\n String strMessageUrl = AdminMessageService.getMessageUrl( request, MESSAGE_CONFIRM_REMOVE_REFERENCE, url.getUrl( ), AdminMessage.TYPE_CONFIRMATION );\r\n return redirect( request, strMessageUrl );\r\n }", "void resetConfirm(){\n\t\tconfirmed = false;\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserallaccountsConfirmationPageNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the StandardUser All accounts Navigationlinks for the confirmation Page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifyAllAccountsViewName(userProfile)\n\t\t.EnterValid_StandardUserdata(userProfile) \t \t \t\t\n\t\t.AddNewUserNavigationVerification() //have to update navigation link\n\t\t.UserConfirmationPageNavigations();\t \t \t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tconfirm(ObservationDetails.this, R.string.details, R.string.view_on_inat_confirmation, \n\t\t\t\t\t\tR.string.yes, R.string.no, \n\t\t\t\t\t\tnew Runnable() { public void run() {\n\t\t\t\t\t\t\tString inatNetwork = mApp.getInaturalistNetworkMember();\n\t\t\t\t\t\t\tString inatHost = mApp.getStringResourceByName(\"inat_host_\" + inatNetwork);\n\n\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ti.setData(Uri.parse(\"http://\" + inatHost + \"/observations/\" + mObservation.getInt(\"id\")));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}, \n\t\t\t\t\t\tnull);\n\n\t\t\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "public void clickOnWithoutNotificationTemplate() {\r\n\r\n\t\treportStep(\"About to click on With out Notification Template\", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(withOutTemplateNotification)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Without Notification template \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\treportStep(\"Failed to click on the Without Notification template \", \"FAIL\");\r\n\t\t}\r\n\t}", "public void generateEnquireLink();", "@Override\r\n\tpublic String getActionURL(String oid, String view, String action) {\n\t\treturn null;\r\n\t}", "void redirectToNotification();", "private void cancel(ActionEvent e){\r\n // Clear textfields\r\n clearFields();\r\n // If coming from appt management screen, go back there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n // Otherwise, set the current client to null and go to the landing page \r\n else {\r\n currClient = null;\r\n LandingPage.returnToLandingPage();\r\n }\r\n }", "@Override\n public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) {\n StringBuffer actions = new StringBuffer();\n Account theAccount = (Account) businessObject;\n List<HtmlData> anchorHtmlDataList = new ArrayList<HtmlData>();\n Person user = GlobalVariables.getUserSession().getPerson();\n AnchorHtmlData urlDataCopy = getUrlData(businessObject, KRADConstants.MAINTENANCE_COPY_METHOD_TO_CALL, pkNames);\n\n if (theAccount.isActive()) {\n anchorHtmlDataList.add(getUrlData(businessObject, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL, pkNames));\n }\n else {\n String principalId = user.getPrincipalId();\n String namespaceCode = KFSConstants.PermissionNames.EDIT_INACTIVE_ACCOUNT.namespace;\n String permissionName = KFSConstants.PermissionNames.EDIT_INACTIVE_ACCOUNT.name;\n\n IdentityManagementService identityManagementService = SpringContext.getBean(IdentityManagementService.class);\n boolean isAuthorized = identityManagementService.hasPermission(principalId, namespaceCode, permissionName);\n\n if (isAuthorized) {\n anchorHtmlDataList.add(getUrlData(businessObject, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL, pkNames));\n }\n else {\n urlDataCopy.setPrependDisplayText(\"&nbsp;&nbsp;&nbsp;&nbsp;\");\n }\n }\n anchorHtmlDataList.add(urlDataCopy);\n\n return anchorHtmlDataList;\n }", "public void cancelBankDdPrintLocation() {\n\t\tSystem.out.println(\"inside cancel \");\n\t\ttry{\n\t\t\tExternalContext context = FacesContext.getCurrentInstance().getExternalContext(); \n\t\t\tcontext.redirect(\"../login/login.xhtml\");\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Then(\"^the user expects to see the Myaccount link$\")\n public void the_user_expects_to_see_the_Myaccount_link() throws Throwable {\n throw new PendingException();\n }", "@Deprecated\r\n public String confirmPartialPurchase() {\r\n purchaseController.getTickets().add(ticket);\r\n ticket = null;\r\n return Screen.PAYMENT_SCREEN.getOutcome();\r\n }", "public String navigatePlanoEnsinoList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"PlanoEnsino_items\", this.getSelected().getPlanoEnsinoList());\n }\n return \"/pages/prime/planoEnsino/index\";\n }", "public void onDiscardClick(){\n if (mHomeChecked){ // at Home Checkmark\n NavUtils.navigateUpFromSameTask(EditSymptomActivity.this);\n }\n if (!mHomeChecked) { // at BackPressed\n finish();\n }\n }", "void confirm();", "@After\n \tpublic void confirm() {\n \t\tcheckGlobalStatus();\n \n \t\tIterator<CyNetworkView> viewIt = viewManager.getNetworkViewSet().iterator();\n \n \t\tCyNetworkView view = viewIt.next(); \n \t\tCyNetwork network = view.getModel();\n \t\t\n \t\tcheckNetwork(network);\n \t\tcheckNetworkView(network);\n \t\tcheckAttributes(network);\n \t}", "@SuppressWarnings({\"UnusedDeclaration\"})\n public ActionForward checkOutConfirm(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws UnartigSessionExpiredException, UAPersistenceException\n {\n ActionMessages msgs;\n ShoppingCartLogic shoppingCartLogic = new ShoppingCartLogic(request);\n String customerIpAddress;\n msgs = new ActionMessages();\n checkSessionExpired(request);\n HttpSession session = request.getSession(true);\n ShoppingCart sc = (ShoppingCart) session.getAttribute(Registry._NAME_SHOPPING_CART_SESSION);\n CheckOutForm coForm = (CheckOutForm) form;\n if (!isTokenValid(request))\n {\n // unexpected error; show order-not-ok message as confirmation message\n _logger.warn(\"wrong token! probably caused by a double submission\");\n msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"warnings.invalid.token\"));\n // stop here, no processing of the order\n } else\n {\n saveToken(request);\n\n _logger.debug(\"coForm.isAcceptTermsCondition() = \" + coForm.isAcceptTermsCondition());\n\n if (!coForm.isAcceptTermsCondition())\n { // terms & conditions not accepted ... return, show error message\n _logger.debug(\"coForm.isAcceptTermsCondition() = \" + coForm.isAcceptTermsCondition());\n _logger.debug(\"going back\");\n msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"errors.acceptTermsCondition.required\"));\n saveMessages(request.getSession(), msgs);\n return mapping.findForward(\"coError\");\n }\n shoppingCartLogic.setShoppingCart(sc);\n shoppingCartLogic.setCheckOutForm(coForm);\n shoppingCartLogic.setLocale((Locale) request.getSession().getAttribute(Globals.LOCALE_KEY));\n // retrieve the remote ip-address that will be stored for the records.\n customerIpAddress = request.getRemoteAddr();\n int photoOrderReturnCode;\n // use the shopping cart logic to store the order definitively\n try\n {\n photoOrderReturnCode = shoppingCartLogic.storeAndExecuteOrder(customerIpAddress);\n Customer customer = shoppingCartLogic.getCustomer();\n // keep the customer-userid in the session\n// session.setAttribute(Registry._NAME_CUSTOMER_ID_SESSION_ATTR, customer.getCustomerId());\n // keep the order details to be used with google analytics in the request\n session.setAttribute(Registry._NAME_SHOPPING_CART_ATTR, sc);\n // todo null pointer exception possible\n session.setAttribute(\"GAorderId\", shoppingCartLogic.getOrder().getOrderId());\n session.setAttribute(\"GAorderItems\", shoppingCartLogic.getPriceProducttypeConsolidatedItems());\n session.setAttribute(\"GAcustomerCity\", coForm.getCity());\n // delete the shopping cart. Creditcard infos!!\n SessionHelper.remove(request, Registry._NAME_SHOPPING_CART_SESSION);\n // return code is not success\n if (photoOrderReturnCode!= PhotoOrderIF._SUCCESS)\n {\n _logger.info(\"Return code from photo order: \" + photoOrderReturnCode);\n handlePhotoOrderError(request, msgs, photoOrderReturnCode);\n return mapping.findForward(\"checkOutCcException\");\n }\n } catch (UnartigException e)\n {\n // unexpected error; show order-not-ok message as confirmation message\n msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"errors.creditcard.unknownerror\"));\n _logger.error(\"unexpected error; preparing error massage for customer and sending confirmation page\");\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n throw new RuntimeException();\n }\n }\n saveMessages(request.getSession(), msgs);\n // is this enough for keeping the error-messages alive ???\n DebugUtils.debugActionMessage(request);\n // reset cc infos\n coForm.setCreditCardNumber(\"\");\n coForm.setCreditCardExpiryMonth(\"\");\n coForm.setCreditCardExpiryYear(\"\");\n coForm.setCreditCardHolderName(\"\");\n return mapping.findForward(\"checkOutConfirmOut\");\n }", "@SuppressWarnings(\"deprecation\")\n\t\t\t\tpublic void onClick(View v) \n\t {\n\t \tif (emailCheckedBool == true)\n\t \t{\n\t \tString[] to = {\"[email protected]\", \"[email protected]\"}; \n\t String[] cc = {\"[email protected]\"}; \n\t \tsendEmail(to, cc,getApplicationContext().getResources().getString(R.string.support),\n\t \"Email Contents will go here\");\n\t \t}\n\t \t\n\t \t\n\t \t// for the pending intent\n\t \t\n\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\n\t\t\t\t\t// messages to be added to the notification \n\t\t\t\t\tCharSequence contentTitle = \"Thank You For Youre Booking\";\n\t\t\t\t\tCharSequence contentText = \"Recommened Service for Car-Hire\";\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// an intent to open a webpage\n\t\t\t\t\tIntent msgIntent = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t.parse(\"http://www.autoeurope.ie/\"));\n\t\t\t\t\t\n\t\t\t\t\t// the pending intent to flag the new task \n\t\t\t\t\tPendingIntent intent = PendingIntent.getActivity(Confirmation.this, 0, msgIntent,\n\t\t\t\t\t\t\tIntent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\n\t\t\t\t\tmsg.defaults |= Notification.DEFAULT_SOUND;\n\t\t\t\t\tmsg.flags |= Notification.FLAG_AUTO_CANCEL;\n\n\t\t\t\t\tmsg.setLatestEventInfo(context, contentTitle, contentText,\n\t\t\t\t\t\t\tintent);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tmNManager.notify(NOTIFY_ID, msg);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// start next activty \n\t\t\t\t\t\n\t\t\t\t\tstartBookingDetails();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t \t\n\t }", "@RequestMapping(value = {\"/report/list\"}, method = RequestMethod.GET)\n public ModelAndView confirmReport() {\n ModelAndView mav = new ModelAndView();\n mav.addObject(\"reportList\", adminReportSearchService.reportList());\n mav.setViewName(\"/admin/mReport\");\n\n return mav;\n }", "@UiHandler(\"talksLink\")\r\n\tprotected void onClickTalksLink(ClickEvent event) {\r\n\t\tnavigation.goTo(TalkListPage.class, PageStates.empty());\r\n\t}", "public void checkUnresultedReferral() {\n info(\"We will check, if there is already unresulted referral\");\n BaseWingsSteps.logInAs(Roles.STAFF);\n StaffHomeForm staffHomeForm = new StaffHomeForm();\n if (!staffHomeForm.checkUnresultedReferralsPresent()) {\n Participant participant = new Participant(AccountUtils.getParticipantAccount());\n JobOrder jobOrder = new JobOrder(AccountUtils.getEmployerAccount());\n User staff = new User(Roles.STAFF);\n ReferralSteps.createReferral(participant, jobOrder, staff);\n ReferralSteps.setUnresultedReferralCreationDate(participant);\n BaseWingsSteps.logInAs(Roles.STAFF);\n }\n\n logStep(\"Select unresulted referral->Details->Edit\");\n staffHomeForm.selectUnresultedReferrals();\n }", "@Secured(\"@\")\n public void doBackPage() {\n infoOrderDetail = false;\n haveDepositPrice = false;\n orderStockTag.resetOrderStock();\n }", "public void clickOnNOButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"No\"));\r\n\t}", "private void redirectTo( Part p ) {\n Set<Long> ids = Collections.emptySet();\n setResponsePage( new RedirectPage( SegmentLink.linkStringFor( p, ids ) ) );\n }", "public void confirmFlight();", "@Override\r\n\t\tpublic void onClick(View view)\r\n\t\t{\n\t\t showForgotIdDialog();\r\n\t\t}", "public void onClick$cancelEditClientButton() {\n\t\tExecutions.sendRedirect(\"queryClients.zul\");\n\t}", "public boolean onCancelClicked() {\n setRedirect(UserListPage.class);\n return false;\n }", "public static WebElement btn_clickInqNowForUnvPdtAtPdtListing() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[@id='unverifpparea']//a[contains(text(),'Inquire Now')])[position()=1]\"));\r\n \t\tAdd_Log.info(\"Inquire Now button for Unverified Product is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Inquire Now button for Unverified Product is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void clickOnProceedToCheckoutButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnProceedToCheckoutButton.click();\n\n \t}", "public void Checkout_button() {\n\t\tthis.endUser.checkOut();\n\t\tthis.defaultSetup();\n\t}", "public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}", "protected boolean showUnsavedChanges ()\n {\n return showConfirm(\"m.unsaved_changes\", \"t.unsaved_changes\");\n }", "@Given(\"^customer is on home page$\")\n\tpublic void customer_is_on_home_page() throws Throwable {\n\t throw new PendingException();\n\t}", "@Override\n\tpublic void showConfirmation(Customer customer, List<Item> items, double totalPrice, int loyaltyPointsEarned) {\n\t}", "@Execute(validator = true, input = \"error.jsp\", urlPattern = \"confirmpage/{crudMode}/{id}\")\n /* CRUD COMMENT: END */\n /* CRUD: BEGIN\n @Execute(validator = true, input = \"error.jsp\", urlPattern = \"confirmpage/{crudMode}/{${table.primaryKeyPath}}\")\n CRUD: END */\n public String confirmpage() {\n if (crudTableForm.crudMode != CommonConstants.CONFIRM_MODE) {\n throw new ActionMessagesException(\"errors.crud_invalid_mode\",\n new Object[] { CommonConstants.CONFIRM_MODE,\n crudTableForm.crudMode });\n }\n \n loadCrudTable();\n \n return \"confirm.jsp\";\n }", "@FXML private void opinionViewOnAction() {\n try {\n reportLabel.setText(\"\");\n if (activeUser != null) {\n if (getOpinionAuthor().equals(activeUser.getUsername())) {\n deleteButton.setDisable(false);\n reportButton.setDisable(true);\n } else {\n deleteButton.setDisable(true);\n reportButton.setDisable(false);\n }\n }\n } catch (RuntimeException err) {}\n }", "public KPAUISignOnFccPage clickAppointmentsLink(){\n getMakeAnAppointmentLink().click();\n return new KPAUISignOnFccPage(driver);\n }", "@Action( ACTION_CONFIRM_REMOVE_REFCERTIFICATIONLEVEL )\n public String getConfirmRemoveRefCertificationLevel( HttpServletRequest request )\n {\n int nId = Integer.parseInt( request.getParameter( PARAMETER_ID_REFCERTIFICATIONLEVEL ) );\n UrlItem url = new UrlItem( getActionUrl( ACTION_REMOVE_REFCERTIFICATIONLEVEL ) );\n url.addParameter( PARAMETER_ID_REFCERTIFICATIONLEVEL, nId );\n\n String strMessageUrl = AdminMessageService.getMessageUrl( request, MESSAGE_CONFIRM_REMOVE_REFCERTIFICATIONLEVEL, url.getUrl( ),\n AdminMessage.TYPE_CONFIRMATION );\n\n return redirect( request, strMessageUrl );\n }", "@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}", "private void validaCheckoutDestaqueDoAnuncio() {\n\t\tHttpServletRequest req = cmsUtilsIliketoo.getMyrequest().getRequest();\n\t\tif(req.getRequestURI().contains(\"CheckoutFeatured\")){\n\t\t\t//operacao de checkout para comprar destaque de anuncios\n\t\t\tDB db = (DB) req.getAttribute(Str.CONNECTION_DB);\n\t\t\tString idAnuncio = req.getParameter(\"id_announce\");\n\t\t\tif(idAnuncio != null && !idAnuncio.isEmpty()){\n\t\t\t\tAnnounce anuncio = (Announce) new AnnounceDAO(db, req).readById(idAnuncio, Announce.class);\n\t\t\t\tif(anuncio != null){\n\t\t\t\t\treq.getSession().setAttribute(\"anuncioDestaqueCheckout\", anuncio);\n\t\t\t\t\tlog.info(\"Servlet Paypal Novo Checkout para anuncio - Processo de compra de destaque do anuncio... idAnuncio=\" + idAnuncio);\n\t\t\t\t}else{\n\t\t\t\t\tlog.info(\"Servlet Paypal Novo Checkout para destaque de anuncios - registro do anuncio nao encontrado no bd... idAnuncio=\" + idAnuncio);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStandardUserspecificaccountsConfirmationPageNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Superuser Specific accounts Navigationlinks for the confirmation Page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewName(userProfile)\t \t \t\t \t \n\t\t.AddNewUserNavigationVerification() \n\t\t.UserConfirmationPageNavigations();\t \t \t\t\n\t}", "public void onClickRecall(View view) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(this)\n .setTitle(\"Confirm Recall\")\n .setMessage(\"Are you sure you to retrieve the last order?\")\n .setNegativeButton(\"No\", null)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n loadPreferences();\n }\n });\n dialog.show();\n }", "public static Result index() {\n // Check that the email matches a confirmed user before we redirect\n String email = ctx().session().get(\"email\");\n if (email != null) {\n User user = User.findByEmail(email);\n if (user != null && user.validated) {\n return GO_DASHBOARD;\n } else {\n Logger.debug(\"Clearing invalid session credentials\");\n session().clear();\n }\n }\n\n return GO_HOME;\n }", "@Override\n public void showConfirm() {\n calledMethods.add(\"showConfirm\");\n }", "public static URL getUrlForRequestDeleteAccRop()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/account/rop_cancellation_request\";\r\n return str2url( strUrl );\r\n }", "@Then(\"^click on checkout$\")\r\n\tpublic void click_on_checkout() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.checkout());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "public Resolution undoCheckOut() throws ServiceException {\r\n vocabularyService.undoCheckOut(vocabularyFolder.getId(), getUserName());\r\n addSystemMessage(\"Checked out version successfully deleted\");\r\n RedirectResolution resolution = new RedirectResolution(VocabularyFolderActionBean.class);\r\n resolution.addParameter(\"vocabularyFolder.identifier\", vocabularyFolder.getIdentifier());\r\n resolution.addParameter(\"vocabularyFolder.workingCopy\", false);\r\n return resolution;\r\n }", "@Override\n\tpublic List<String> unpaidOnlinePay(List<String> waybillNos) {\n\t\treturn null;\n\t}", "public void btnShowUnpaid_onClick(View view) {\n setTitle(R.string.title_booklist_unpaid);\n\n mBookingList = mDataSource.getAllBookings();\n ArrayList<Booking> mUnpaidBookings = new ArrayList<>();\n\n for(int i=0;i<mBookingList.size();i++){\n if(mBookingList.get(i).isPaid()==0)\n mUnpaidBookings.add(mBookingList.get(i));\n }\n\n mAdapter = new BookingListAdapter(this, mUnpaidBookings);\n mRV.setAdapter(mAdapter);\n mRV.setLayoutManager(new LinearLayoutManager(this));\n }", "@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/ConsultarIndiceEjecucionAnio\";\r\n\t}", "List<String> viewPendingApprovals();", "public static WebElement btn_clickInqAllForUnvPdtAtInqBar() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'inquiryCon')]//a[contains(text(),'Inquire All')])[last()]\"));\r\n \t\t\r\n \t\tWebDriverWait wait = new WebDriverWait(driver, 25);\r\n \twait.until(ExpectedConditions.elementToBeClickable(element));\r\n \tAdd_Log.info(\"Inquire All button for Unverified Product is click on the page.\");\r\n \t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Inquire All button for Unverified Product is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void pending()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Pending\")).click();\n\t}", "@When(\"^User should see Review Confirmation Message$\")\n\tpublic void user_should_see_Review_Confirmation_Message() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getreviewconfirmmsg(), 70);\n\t\treviewConfirmationPageObjects.verifyreviewconfirmation();\n\t}", "public void sol_historiasolicitud(){\n try{\n FacesContext context = FacesContext.getCurrentInstance();\n context.getExternalContext().redirect(\"sol_historialsolicitud.xhtml\");\n }\n catch(Exception e){\n System.out.println(\"Error: \"+e);\n }\n }", "public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }", "@FXML\n public void handheldsCancelLink(ActionEvent actionEvent) {\n //set a warning alert\n Alert alert = new Alert(Alert.AlertType.WARNING);\n\n // if a ticket was selected remove it from DB\n if(linksComboBox.getValue()!= null) {\n alert.setTitle(\"Link Cancel\");\n alert.setHeaderText(null);\n alert.setContentText(\"Are You Sure you want to cancel selected Link?\");\n alert.getButtonTypes().clear();\n alert.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n\n //TODO: cancellation based on current time.\n if (alert.getResult() == ButtonType.YES)//delete operation from database\n {\n App.getOcsfClient(this).updateLinks(linksComboBox.getValue(), false);\n linksList.remove(linksComboBox.getValue());\n alert.setHeaderText(null);\n alert.setContentText(\"Link Canceled\");\n } else {\n alert.setHeaderText(null);\n alert.setContentText(\"Link Did Not Canceled\");\n }\n alert.getButtonTypes().clear();\n alert.getButtonTypes().addAll(ButtonType.OK);\n alert.showAndWait();\n updateScreen();\n }\n else{\n alert.setHeaderText(null);\n alert.setContentText(\"No Link Selected\");\n alert.getButtonTypes().clear();\n alert.getButtonTypes().addAll(ButtonType.OK);\n alert.showAndWait();\n }\n }", "@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString resetUrl = \"#activateacc;uid=\" + user.getRefId();\r\n\t\t\t\tWindow.open(resetUrl, \"Password Reset\", \"\");\r\n\t\t\t}", "public ActionForward perform(\n\t\tActionMapping mapping,\n\t\tActionForm form,\n\t\tHttpServletRequest request,\n\t\tHttpServletResponse response) {\n\t\t\n\t\tLocale locale = getLocale(request);\n\t\tMessageResources messages = getResources();\n\t\tString action = request.getParameter(\"FormAction\");\n\t\tUserLogin ul = (UserLogin)request.getSession().getAttribute(Constants.USERLOGIN_KEY);\n\t\tif(action == null) action = \"QueryForList\";\n\t\t\n\t\tif (action.equals(\"QueryForList\")) {\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t} \n\t\t\n\t\tif (action.equals(\"PAConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() == null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.insert(pcm, ul);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PAUNConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() != null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(null);\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"Confirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getApprovalDate() == null) {\n\t\t\t\t\t\t\tpcm.setApprovalDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tpcm.setPayStatus(\"confirmed\");\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t//\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PostToFA\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\t\t\t\t\t//\tif(pac.getReturnDate()!=null){\n\t\t\t\t\t\t\tpcm.setPayStatus(\"Posted\");\n\t\t\t\t\t\t\ths.save(pcm);\n\t\t\t\t\t//\t}\n\t\t\t\t\t}\n\t\t//\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"ExcelPrint\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\t\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n//\t\t\t\t\tGet Excel Template Path =============================================\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\t\n\t\t\t\t\tString TemplatePath = GetTemplateFolder();\n\t\t\t\t\tif (TemplatePath == null) return null;\n\t\t\t\t\t\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\t\n\t\t\t\t\t//Start to output the excel file\n\t\t\t\t\tresponse.reset();\n\t\t\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\\\"\"+ SaveToFileName + \"\\\"\");\n\t\t\t\t\tresponse.setContentType(\"application/octet-stream\");\n\t\t\t\t\t\n\t\t\t\t\t//Use POI to read the selected Excel Spreadsheet\n\t\t\t\t\tHSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(TemplatePath+\"\\\\\"+ExcelTemplate));\n\t\t\t\t\t//Select the first worksheet\n\t\t\t\t\tHSSFSheet sheet = wb.getSheet(FormSheetName);\n\t\t\t\t\t\n\t\t\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n\t\t\t\t\tString status =\"\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tHSSFCell cell = null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t//List\n\t\t\t\t\tHSSFCellStyle boldTextStyle = sheet.getRow(ListStartRow).getCell((short)0).getCellStyle();\n\t\t\t\t\tHSSFCellStyle dateStyle = sheet.getRow(1).getCell((short)7).getCellStyle();\n\t\t\t\t\tHSSFCellStyle numberFormatStyle = sheet.getRow(ListStartRow).getCell((short)6).getCellStyle();\n\t\t\t\t\t\n\t\t\t\t\tint ExcelRow = ListStartRow;\n\t\t\t\t\t\n\t\t\t\t\tHSSFRow HRow = null;\n\t\t\t\t\tHRow = sheet.createRow(1);\n\t\t\t\t\tcell = HRow.createCell((short)7);\n\t\t\t\t\tcell.setCellValue(new Date());\n\t\t\t\t\tcell.setCellStyle(dateStyle);\n\t\t\t\t\t\n\t\t\t\t\t//in order to make groups\n\t\t\t\t\t\n\t\t\t\t\tshort cellNumber = 0;\n\t\t\t\t\t\n\t\t\t\t\t//write the titles\n\t\t\t\t\tHRow = sheet.createRow(titleRow);\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Ticket Code\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Project ID\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Staff Name\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Description\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Bill To\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Create Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight No.\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Paid By\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Confirm Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Price\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Vendor\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t//write contents\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\n\t\t\t\t\t\tcellNumber = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tHRow = sheet.createRow(ExcelRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getFormCode());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster()==null ? \"\" : pcm.getProjectMaster().getProjId());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getUserLogin().getName());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t cell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getPayType()== null? pcm.getProjectMaster().getProjName() : pcm.getPayType());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster().getBillTo() == null ? \"\" : pcm.getProjectMaster().getBillTo().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCreatedate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getRefno());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getClaimType().equals(\"CN\") ? \"Company\" : \"Customer\");\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCostdate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getApprovalDate()==null? \"\" : df.format(pcm.getApprovalDate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getTotalvalue());\n\t\t\t\t\t\t\tcell.setCellStyle(numberFormatStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getVendor()==null?\"\":pcm.getVendor().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpcm.setExportDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tExcelRow++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t\t//写入Excel工作表\n\t\t\t\t\twb.write(response.getOutputStream());\n\t\t\t\t\t//关闭Excel工作薄对象\n\t\t\t\t\tresponse.getOutputStream().close();\n\t\t\t\t\tresponse.setStatus( HttpServletResponse.SC_OK );\n\t\t\t\t\tresponse.flushBuffer();\n//------------------------------------------\t\t\t\t\t\n\t\t\t\t\t\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t//\tList result = findQueryResult(request);\n\t\t//\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\treturn (mapping.findForward(\"success\"));\n\t}", "@RequestMapping(value = { \"/checkoutComfirmation\" }, method = RequestMethod.GET)\n public String shoppingCartConfirmationReview(HttpServletRequest request, Model model, Authentication authentication,\n ModelMap map) {\n\n if (authentication != null) {\n Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();\n List<String> roles = new ArrayList<String>();\n for (GrantedAuthority a : authorities) {\n roles.add(a.getAuthority());\n }\n if (isUser(roles)) {\n map.addAttribute(\"header\", \"header_user\");\n map.addAttribute(\"footer\", \"footer_user\");\n } else if (isAdmin(roles)) {\n map.addAttribute(\"header\", \"header_admin\");\n map.addAttribute(\"footer\", \"footer_admin\");\n }\n } else {\n map.addAttribute(\"header\", \"header_login\");\n map.addAttribute(\"footer\", \"footer_login\");\n }\n CartInfo cartInfo = Utils.getCartInSession(request);\n\n if (cartInfo == null || cartInfo.isEmpty()) {\n\n return \"redirect:/shoppingCart\";\n } else if (!cartInfo.isValidCustomer()) {\n\n return \"redirect:/checkout\";\n }\n model.addAttribute(\"myCart\", cartInfo);\n model.addAttribute(\"cartForm\", cartInfo);\n\n return \"checkoutComfirmation\";\n }", "public void sol_nuevasolicitud(){\n try{\n FacesContext context = FacesContext.getCurrentInstance();\n context.getExternalContext().redirect(\"sol_nuevasolicitud.xhtml\");\n }\n catch(Exception e){\n System.out.println(\"Error: \"+e);\n }\n }", "@RequestMapping(value = \"cancelTicketForm\", method = RequestMethod.GET)\r\n\tpublic String showcancelTicketForm() {\r\n\t\treturn WEB_PASSENGER_CANCEL_TICKET;\r\n\t}", "@Override\n\tpublic void processConfirmItemButtonClick(ProcessConfirmItemObjectEvent e) {\n\t\t\n\t}", "public TelaConfirmarVacinacao() {\n super (\"Covid Not Found - Confirmar vacina\");\n initComponents();\n setLocationRelativeTo(null);\n }", "@When(\"^customer selecting the new message and verifies the target page$\")\r\n\tpublic void customer_selecting_the_new_message_and_verifies_the_target_page() throws Throwable {\n\t\tthrow new PendingException();\r\n\t}", "@Override\n public void onClick(View v) \n {\n AlertDialog.Builder builder = \n new AlertDialog.Builder(Favorites.this);\n\n builder.setTitle(R.string.confirmTitle); // title bar string\n\n // provide an OK button that simply dismisses the dialog\n builder.setPositiveButton(R.string.erase,\n new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int button)\n {\n clearButtons(); // clear all saved searches from the map\n \n // get a SharedPreferences.Editor to clear searches\n SharedPreferences.Editor preferencesEditor = \n savedSiteList.edit();\n \n preferencesEditor.clear(); // remove all url name/site_name pairs\n preferencesEditor.apply(); // the changes\n } \n } \n );\n \n builder.setCancelable(true);\n builder.setNegativeButton(R.string.cancel, null);\n \n // set the message to display\n builder.setMessage(R.string.confirmMessage);\n \n // create AlertDialog from the AlertDialog.Builder\n AlertDialog confirmDialog = builder.create();\n confirmDialog.show(); // display the Dialog\n }", "@Jpf.Action(forwards = { @Jpf.Forward(name = \"success\", path = \"vacantes.jsp\") })\n\tpublic Forward verVacantes() throws Exception{\n\t\tForward forward = new Forward(\"success\");\n\t\tforward.addActionOutput(\"usuario\", getCurrentUser());\n\t\tif(getRequest().isUserInRole(\"RH\")){\n\t\t\tforward.addActionOutput(\"userRH\", true);\n\t\t}\n\t\tCollection<Vacante> vacantes = UcmUtil.getVacantes(getRequest());\n\t\tgetRequest().setAttribute(\"vacantes\", vacantes);\n\t\t\n\t\treturn forward;\n\t}", "public Result viewCoupons() {\n CouponReceiveCenter receiveCenter = CouponReceiveCenter.find.byId(session().get(\"email\"));\n return ok(\n views.html.allcoupons.render(receiveCenter)\n );\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJournalTableModel.performEpublicationCheckout(journal, studentInfo, facultyInfo);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The E-Copy of the Journal-paper have been checked-out\");\r\n\t\t\t\tJournalDetailModule.this.setVisible(false);\r\n\t\t\t\tJournalDetailModule.this.dispose();\r\n\t\t\t\treturn;\r\n\t\t\t}", "public PDAction getPO() {\n/* 247 */ COSDictionary po = (COSDictionary)this.actions.getDictionaryObject(\"PO\");\n/* 248 */ PDAction retval = null;\n/* 249 */ if (po != null)\n/* */ {\n/* 251 */ retval = PDActionFactory.createAction(po);\n/* */ }\n/* 253 */ return retval;\n/* */ }", "public void setUnproved() {\n\t\tproveState = UNPROVED;\n\t}", "public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "@RequestMapping(value={\"/confirmaccount\"}, method = RequestMethod.GET)\n public String confirmAccount (Model model,\n \t\t@RequestParam(value = \"token\", required = false) String token) {\n \n model.addAttribute(\"title\", messages.getMessage(\"text.login.tittle\", null, LocaleContextHolder.getLocale()));\n \t//si el token no es nulo\n if (token != null) {\n \t\n \t//Buscamos el token\n \tConfirmationToken confirm = confirmationTokenDao.findConfirmationToken(token);\n \t\n \t//si no existe el token, enviamos que no existe\n if (confirm == null) {\n model.addAttribute(\"error\", messages.getMessage(\"auth.message.invalidToken\", null, LocaleContextHolder.getLocale()));\n return \"aplication/login\";\n \n //si existe el token\n } else {\n \t\n \t//extraemos el usuario y lo activamos\n \tUser user = confirm.getUser();\n \tuser.setEnabled(true);\n \tuserDao.update(user);\n \t\n \t//borramos el token y reenviamos a login con un mensaje de correcto\n \t\tconfirmationTokenDao.remove(confirm);\n \t\t\n \tmodel.addAttribute(\"success\", messages.getMessage(\"auth.message.useractivated\", null, LocaleContextHolder.getLocale()));\n \t\n return \"aplication/login\";\n }\n \n //si el token es nulo\n } else {\n \treturn \"redirect:/login?lang=\" + LocaleContextHolder.getLocale().getLanguage();\n }\n \n }", "public String thuchienAction(){\n\t\tXuatReport();\n\t\tresetFormB4135=null;\n\t\treturn \"B4160_Chonmenuxuattaptin\";\n\t}", "public String back2() {\r\n\t\treturn \"/private/admin/Aktienerfassen?faces-redirect=true\";\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tApprovementHandler.viewApprovements(userID);\n\t\t\t}", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "public String navigateDetalleofertaCollection() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Detalleoferta_items\", this.getSelected().getDetalleofertaCollection());\n }\n return \"/detalleoferta/index\";\n }", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "public static MozuUrl discardDraftsUrl()\r\n\t{\r\n\t\tUrlFormatter formatter = new UrlFormatter(\"/api/commerce/catalog/admin/publishing/discarddrafts\");\r\n\t\treturn new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;\r\n\t}", "@Override\r\n\tpublic void onNaviCancel() {\n\r\n\t}" ]
[ "0.53972524", "0.5357304", "0.5337827", "0.52822155", "0.5280365", "0.52706385", "0.52315557", "0.5172084", "0.5156449", "0.51471156", "0.5140357", "0.5126218", "0.5125702", "0.5125321", "0.50870353", "0.5064774", "0.5061478", "0.5056874", "0.5055508", "0.5055508", "0.5055508", "0.50349516", "0.5021283", "0.5008594", "0.49920854", "0.49657777", "0.4962374", "0.49438053", "0.49386966", "0.49343193", "0.49217638", "0.49207816", "0.49136075", "0.490708", "0.48861566", "0.48711243", "0.48682573", "0.486715", "0.48609748", "0.4837692", "0.48332834", "0.48331895", "0.482264", "0.48182586", "0.48126775", "0.48113", "0.48108912", "0.47990593", "0.47825083", "0.47739327", "0.47567117", "0.4752347", "0.4743463", "0.4741505", "0.47320065", "0.47242475", "0.47226366", "0.47219458", "0.4719698", "0.47193074", "0.47166342", "0.47120216", "0.47064131", "0.4702824", "0.470167", "0.46981075", "0.46942902", "0.4692764", "0.46909326", "0.46840343", "0.4677559", "0.46724764", "0.46681362", "0.46655166", "0.46648538", "0.46585092", "0.46572044", "0.4650134", "0.46495658", "0.46458024", "0.4643501", "0.4640408", "0.4635509", "0.46325257", "0.4627838", "0.46277088", "0.46225446", "0.4621663", "0.462119", "0.46203604", "0.46171033", "0.46132004", "0.461149", "0.46107167", "0.4606559", "0.46053886", "0.46005487", "0.45972902", "0.45915335", "0.45913345" ]
0.5407733
0
Use getter method to query database
public ArrayList<Unconfirmed> getUnconfirmedList() { unconfirmedList=new ArrayList<Unconfirmed>(); Connection conn = null; CallableStatement coll = null; try { //query database for the information conn = dataSource.getConnection(); //calling the stored procedure which returns a cursor to the data //PROCEDURE GET_UNCONFIRMED(v_cursor_unconfirmed OUT CURSOR_IF); coll = conn.prepareCall("{call PCBVI.PKG_TESTRECORDS.GET_UNCONFIRMED(?,?)}"); //prepare input and output arguments coll.setString(1, formData.getWorkstationNr()); coll.registerOutParameter(2, OracleTypes.CURSOR); coll.execute(); //get cursor ResultSet rs = (ResultSet) coll.getObject(2); //and process data while (rs.next()) { /*System.out.println( rs.getString(1)+'\t' +rs.getString(2)+'\t' +rs.getString(3)); */ // add the values Unconfirmed unconfirmed=new Unconfirmed(); unconfirmed.setPoNo(rs.getString(1)); unconfirmed.setWorkstationNr(rs.getString(2)); unconfirmed.setWorkstationDescription(rs.getString(3)); unconfirmed.setSide(rs.getString(4)); unconfirmedList.add(unconfirmed); } } catch (Exception e) { e.printStackTrace(); } finally { if (conn != null) { try { conn.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } if (coll != null) { try { coll.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } return unconfirmedList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Statement queryToRetrieveData();", "protected String getRetrievalQuery()\n {\n return immutableGetRetrievalQuery();\n }", "Query query();", "public Query getQuery ()\n {\n\n\treturn this.q;\n\n }", "public void Query() {\n }", "public DatabaseQuery getQuery() {\n return query;\n }", "Object getDB();", "public Query getQuery()\n {\n return query;\n }", "private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "public void customerQuery(){\n }", "public String getQuery(){\n return this.query;\n }", "public abstract String createQuery();", "public EODataSource queryDataSource();", "public String query() {\n return this.query;\n }", "@Override\r\n\tpublic Object getQuestionear() throws DataAccessException,SQLException {\n\t\tlogger.info(\"start : getQuestionear UsersMngDaoImpl \");\r\n\t\tObject obj = questionRepository.findAll();\r\n\t\tlogger.info(\"End : getQuestionear UsersMngDaoImpl \");\r\n\t\treturn obj;\r\n\t}", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "private void getDatabase(){\n\n }", "IQuery getQuery();", "private String getSelectQuery() {\n String query = null;\n try {\n query = crudQueryComposer.composeReadQuery();\n } catch (MissingPropertyException e) {\n logger.error(e);\n }\n return query;\n }", "public interface IDBQuery {\n String query();\n}", "@SqlQuery(\"select * from account\")\r\n public List<accountDB> get();", "public QueryResult<T> getResult();", "protected final String immutableGetRetrievalQuery()\n {\n return m__strRetrievalQuery;\n }", "private QueryService getQueryService() {\n return queryService;\n }", "protected abstract T fetch();", "@Override\n\tprotected Cursor query()\n\t{\n\t\treturn null;\n\t}", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "@Override\n\tpublic Object query(String sql) {\n\t\tSystem.out.println(\"HotelDAO.query sql:\" + sql);\n\t\tLinkedList<HotelBean> hotelBeans = new LinkedList<>();\n\t\ttry {\n\t\t\t//建立数据库链接\n\t\t\tConnection c = openDBConnection();\n\t\t\tStatement st = c.createStatement();\n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tHotelBean hotelBean = new HotelBean();\n\t\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\t\tint columns = rsmd.getColumnCount();\n\t\t\t\tfor(int i = 0; i < columns; i++) {\n\t\t\t\t\tswitch (rsmd.getColumnName(i + 1)) {\n\t\t\t\t\tcase \"hotel_number\":\n\t\t\t\t\t\thotelBean.setHotelNumber(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"hotel_name\":\n\t\t\t\t\t\thotelBean.setHotelName(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"address\":\n\t\t\t\t\t\thotelBean.setAddress(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"location_city\":\n\t\t\t\t\t\thotelBean.setLocationCity(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thotelBeans.add(hotelBean);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tst.close();\n\t\t\t//关闭数据库链接\n\t\t\tcloseDBConnection(c);\n\t\t\treturn hotelBeans;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Error executing sql.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public Database getDatabase() {\n return m_database;\n }", "T queryForId(ID id) throws SQLException, DaoException;", "public interface ResultSetGetter {\n\n /**\n * Perform the right getter on a ResultSet and returns the value as an\n * Object. A mapper class is needed to achieve this pattern. See\n * ResultSetterFactory.\n *\n * @see ResultSetterFactory\n * @param rs The sql ResultSet that currently points to the cell of the the\n * record that you want to retrieve.\n * @param columnName The name of the columns in the sql database of which\n * you want to retrieve the value.\n * @return The value of the of the cell where the given ResultSet points to.\n * @throws SQLException Something with getting the data from the ResultSet\n * went wrong.\n */\n public Object getResult(ResultSet rs, String columnName) throws SQLException;\n\n}", "@Override\n protected PreparedStatement getObject() {\n try {\n return this.proxy.prepareStatement(\"SELECT * FROM country\");\n } catch (SQLException sex) {\n throw new UnsupportedOperationException(\"cannot provide object for testing\", sex);\n }\n }", "public EntityAisle getByMatricule(int matricule ){\n\n\n DatabaseHelper databaseHelper = DatabaseHelper.getInstance(this.mExecutionContext);\n SQLiteDatabase sqLiteDatabase = databaseHelper.getReadableDatabase();\n\n EntityAisle result = null;\n\n Cursor cursor = null;\n try {\n\n cursor = sqLiteDatabase.query(ConfigDAO.TABLE_AISLE, null, ConfigDAO.COLUMN_RAYON_ID +\" = \" + matricule , null, null, null, null, null);\n\n /**\n // If you want to execute raw query then uncomment below 2 lines. And comment out above line.\n\n String SELECT_QUERY = String.format(\"SELECT %s, %s, %s, %s, %s FROM %s\", Config.COLUMN_Employee_ID, Config.COLUMN_Employee_NAME, Config.COLUMN_Employee_REGISTRATION, Config.COLUMN_Employee_EMAIL, Config.COLUMN_Employee_PHONE, Config.TABLE_Employee);\n cursor = sqLiteDatabase.rawQuery(SELECT_QUERY, null);\n */\n\n if(cursor!=null)\n if(cursor.moveToFirst()){\n List<EntityAisle> AisleList = new ArrayList<>();\n do {\n int id = cursor.getInt(cursor.getColumnIndex(ConfigDAO.COLUMN_RAYON_ID));\n String name = cursor.getString(cursor.getColumnIndex(ConfigDAO.COLUMN_RAYON_NAME));\n\n\n\n AisleList.add(new EntityAisle(id, name));\n } while (cursor.moveToNext());\n result = AisleList.get(0);\n return result;\n }\n } catch (Exception e){\n Log.i(TAG, \"getAllAisle: \"+e.getMessage());\n Toast.makeText(this.mExecutionContext, \"Operation failed\", Toast.LENGTH_SHORT).show();\n } finally {\n if(cursor!=null)\n cursor.close();\n sqLiteDatabase.close();\n }\n\n return result;\n }", "public String query() {\n return this.innerProperties() == null ? null : this.innerProperties().query();\n }", "private FechaCierreXModulo queryData() {\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Los filtros son \"\n\t\t\t\t\t+ this.filterBI.getBean().toString());\n\n\t\t\t// Notification.show(\"Los filtros son \"\n\t\t\t// + this.filterBI.getBean().toString());\n\n\t\t\tFechaCierreXModulo item = mockData(this.filterBI.getBean());\n\n\t\t\treturn item;\n\n\t\t} catch (Exception e) {\n\t\t\tLogAndNotification.print(e);\n\t\t}\n\n\t\treturn new FechaCierreXModulo();\n\t}", "public ResultSet get () {\n\n try {\n String sql = \"SELECT * FROM course INNER JOIN `faculty` ON faculty.faculty_id = course.faculty_id\";\n stmt = conn.prepareStatement(sql);\n System.out.println(sql);\n\n return stmt.executeQuery();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public DB getDB() {\n\treturn _db;\n }", "public abstract boolean retrieve();", "public java.lang.String getQuery()\n {\n return this.query;\n }", "public String getQuery() {\n return _query;\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "protected abstract void retrievedata();", "Reserva Obtener();", "@Override\n\tpublic ObservableList<Book> read() {\n\t\tObservableList<Book> list=FXCollections.observableArrayList();\n\t\tString query=\"Select * from Book\";\n\t\tStatement statement;\n\t\tResultSet resultSet;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tresultSet=statement.executeQuery(query);\n\t\t\tBook books;\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tbooks=new Book(resultSet.getString(\"id\"),resultSet.getString(\"Title\"),resultSet.getString(\"Author\"),resultSet.getString(\"State\"));\n\t\t\t\tlist.add(books);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public abstract DbQuery getQuery(String queryName);", "SelectQuery createSelectQuery();", "@Override\n public FasciaOrariaBean doRetrieveByKey(int id) throws SQLException {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria WHERE id=?\";\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n statement.setInt(1, id);\n System.out.println(\"DoRetrieveByKey\" + statement);\n ResultSet rs = statement.executeQuery();\n if (rs.next()) {\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n return bean;\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return null;\n }", "public String getQuery() {\n return this.query;\n }", "@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }", "@GET\n @Path(\"/database/get\")\n public Response getDatabase() throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }", "@Override\n public User get(int id) {\n\n String sqlGet = sqlQuery + \" where u.id=:id\";\n //Этот класс предназначен для передачи в простой Map значений параметров методам NamedParameterJdbcTemplate класса.\n MapSqlParameterSource parameterSource = new MapSqlParameterSource()\n .addValue(\"id\",id);\n List<User> list = namedParameterJdbcTemplate.query(sqlGet,parameterSource, new UserRowMapper());\n\n return DataAccessUtils.singleResult(list);//Возвращает один объект результата из данной коллекции.\n }", "@Override\n\tpublic JSONArray searchData(String queryString)throws Exception { CALL DAO get database data\n\t\t//\n\t\ttry {\n\t\t\tJSONArray result=new JSONArray();\n\t\t\t//return null;\n result=testDB.getDataFromDB(queryString);\n\t\t\t//System.out.print(result.toString());\n\t\t\treturn result;\n\t\t\t//throw new Exception(\"Test Exception\");\n\t\t}catch(Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public String getQuery() {\r\n return query;\r\n }", "@Override\r\n public VehiculoModel consultarVehiculo(String placa) {\n Connection conn = null;\r\n VehiculoModel vehiculo = null; //defino un objeto de vehiculo como nulo\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Select * from vehiculo where vehPlaca=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql); //se prepara para la query\r\n statement.setString(1, placa);\r\n ResultSet result = statement.executeQuery(sql);\r\n while(result.next()){\r\n vehiculo = new VehiculoModel(result.getString(1), result.getString(2), result.getString(3), \r\n result.getInt(4), result.getInt(5), result.getString(6), result.getInt(7));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError: \" + ex.getMessage());\r\n }\r\n \r\n return vehiculo;\r\n }", "public Cursor retrieve()\n {\n String[] columns={Constants.ROW_ID,Constants.FIRSTNAME,Constants.LASTNAME};\n Cursor c=null;\n c=db.query(Constants.TB_NAME,columns,null,null,null,null,null);\n return c;\n }", "public Integer getQuery() {\n return this.query;\n }", "public java.lang.String getQuery() {\r\n return query;\r\n }", "@Override\n public Asesor getAsesor(String numeroPersonal) {\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where numeroPersonal =?\");\n orden.setString(1, numeroPersonal);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n numeroPersonal = resultadoConsulta.getString(1);\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }", "protected ResultSet getResultSet ()\n throws SQLException\n {\n if ( this.refId == Id.UNDEFINED )\n return this.dbHelper.queryData(this.type, this.id, this.getDbColumns());\n else\n return this.dbHelper.queryDataOfRefTarget\n (this.fromDocType, this.type, this.refId, this.getDbColumns());\n }", "String getRetrieveResourceQuery();", "@Override\n\tpublic String query(Map<String, Object> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}", "public T get(int objectId) throws SQLException;", "@SuppressWarnings(\"unchecked\")\n\tpublic U accessObject()\n\t{\n\t\treturn (primaryKey == null)?(null):\n\t\t (U)bean(GetUnity.class).getUnited(primaryKey);\n\t}", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public Object get(String arg0, int arg1) {\n\t\treturn this.bdb.get(arg0,arg1);\n\t}", "public static Item getItem( ) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n \n\tString query = \"select * from Item\";\n\ttry {\n ps = connection.prepareStatement(query);\n\t ResultSet rs = null;\n\t rs = ps.executeQuery();\n \n\t Item item = new Item();\n \n\t if (rs.next()) {\n\t\titem.setAttribute(rs.getString(1));\n\t\titem.setItemname(rs.getString(2));\n\t\titem.setDescription(rs.getString(3));\n\t\titem.setPrice(rs.getDouble(4));\n\t }\n\t rs.close();\n\t ps.close();\n\t return item;\n\t} catch (java.sql.SQLException sql) {\n\t sql.printStackTrace();\n\t return null;\n\t}\n }", "public Database<T> getDatabase();", "@Override\n\tpublic List queryAll() throws Exception {\n\t\treturn null;\n\t}", "@Override\n public Optional<Quote> findById(String ticker) {\n String selectSql = \"SELECT * FROM \" + TABLE_NAME + \" where ticker = '\" + ticker + \"'\";\n List<Quote> quotes = jdbcTemplate\n .query(selectSql, BeanPropertyRowMapper.newInstance(Quote.class));\n if(quotes.size()==1){\n Quote outQuote = quotes.get(0);\n return Optional.ofNullable(outQuote);\n }else{\n throw new DataRetrievalFailureException(\"cannot Get data\");\n }\n\n }", "public QueryGeneral() {\n try {\n connection = ConnectionDB.getInstance().getConnection();\n } catch (SQLException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n } catch (ClassNotFoundException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n }\n }", "public DatabaseConnection getDatabaseConnection() {\n return query.getDatabaseConnection();\n }", "public String getQuery() {\n return query;\n }", "public String getQuery() {\n return query;\n }", "public String getQuery() {\n return query;\n }", "@Override\n\tpublic Larik get(final String... parameters) {\n\t\treturn this.execute(query, new PreparedStatementCallback<Larik>() {\n\n\t\t\t@Override\n\t\t\tpublic Larik doInPreparedStatement(PreparedStatement arg0)\n\t\t\t\t\tthrows SQLException, DataAccessException {\n\t\t\t\tLarik result = new Larik(clones(), parameters);\n\n\t\t\t\tsetArgs(arg0, parameters);\n\t\t\t\tResultSet rs = arg0.executeQuery();\n\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tresult.add(rs.getString(1));\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t}", "public int query() {\n return count;\n }", "public Cursor getData(){\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"select * from \" + Table_name, null);\n return res;\n }", "public String getData(int id){\n String _data = \"\";\n dbOperation operationObj = new dbOperation(getActivity());\n operationObj.open();\n MyTable fields = new MyTable();\n String condition2 = fields.getID() + \" ='\" + id + \"'\";\n String[] dbFields4 = {fields.getScore()};\n Cursor cursor2 = operationObj.getTableRow(fields.getTableName(),dbFields4,condition2,fields.getID() + \" ASC \",\"1\");\n if(cursor2.getCount() > 0)\n {\n cursor2.moveToFirst();\n do{\n _data = cursor2.getString(0);\n }while(cursor2.moveToNext());\n }else{\n _data = \"error\";\n }\n cursor2.close();\n cursor2.deactivate();\n operationObj.close();\n return _data;\n }", "public Object get(Object key) {\n byte[] byteKey = keySerde.toBytes(key);\n byte[] result = null;\n try {\n result = db.get(byteKey);\n } catch (RocksDBException e) {\n log.error(\"can not get the value for key: \" + key);\n }\n\n if (result == null) {\n log.info(key + \" does not exist in the rocksDb\");\n return null;\n } else {\n return valueSerde.fromBytes(result);\n }\n }", "@JsonIgnore\n public String getQuery() {\n return _query;\n }", "@Override\r\n public List<Anggota> getAll() {\r\n List<Anggota> datas = new ArrayList<>();\r\n String query = \"SELECT *From Anggota\";\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\r\n return datas;\r\n\r\n }", "@Override\n\tpublic List<Persona> getPersona() throws SQLException {\n\t\tList<Persona> listaPersona1 = new ArrayList<Persona>();\n\t\t\n Single<List<DbRow>> rows = dbClient.execute(exec -> exec\n \t\t.createQuery(\"select * from persona;\").execute()).collectList();\n \n try {\n List<DbRow> listasPersonas = rows.get();\n \n if(!listasPersonas.isEmpty()) {\n \t\n \tfor(int i=0; i< listasPersonas.size(); i++) {\n \t\tPersona p = new Persona();\n \t\tp.setId((int)listasPersonas.get(i).column(\"id\").value());\n \t\tp.setNombre((String)listasPersonas.get(i).column(\"nombre\").value());\n \t\tp.setDireccion((String)listasPersonas.get(i).column(\"direccion\").value());\n \t\tp.setCorreo((String)listasPersonas.get(i).column(\"correo\").value()); \t\t\n \t\tlistaPersona1.add(p);\n \t}\n \t\n }\n // listasPersonas.forEach(System.out::println);\n \n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (ExecutionException e) {\n e.printStackTrace();\n return null;\n }\n return listaPersona1;\n\t\t\n\t}", "String getDatabase();", "interface Retrieve {}", "DataReader reader();", "@Inject\n public ImmutableRetrieve(final CqlSession session, @MutableReadConsistency final ConsistencyLevel consistency) {\n super(session, \"SELECT quads FROM \" + IMMUTABLE_TABLENAME + \" WHERE identifier = :identifier ;\", consistency);\n }", "public String getQuery() {\n return query;\n }", "public interface DatabaseTool {\r\n\r\n\t\r\n\t/**\r\n\t * Get all objects from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will default follow\r\n\t * complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed..\r\n\t * @param clazz to be retrieved.\r\n\t * @return of all classes that is retrieved.\r\n\t */\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> clazz);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param id of the object to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(Class<E> clazz, int id);\r\n\t\r\n\t/**\r\n\t * Set a single object from the values. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> void setObject(String sql, E e);\r\n\t\r\n\t/**\r\n\t * Get all objects from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed..\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return of all classes that is retrieved.\r\n\t */\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param id of the object to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(Class<E> clazz, int id, boolean follow);\r\n\t\r\n\t/**\r\n\t * Set a single object from the values. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> void setObject(String sql, E e, boolean follow);\r\n\t\r\n\t/**\r\n\t * This will help write a object to a persistent store. \r\n\t * \r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Writeable> void storeObject(String sql, E e);\r\n\t\r\n\t/**\r\n\t * This will remove a object from the database. \r\n\t * \r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Writeable> void write(String sql);\r\n\r\n\t/**\r\n\t * Read from the database. It will return a cached result set. This result set is closed\r\n\t * and does not keep connection to the database.\r\n\t * \r\n\t * @param sql to be executed.\r\n\t * @return a cached result set.\r\n\t */\r\n\tpublic <E extends Writeable> ResultSet read(CharSequence sql);\r\n\t\r\n\t/**\r\n\t * Read from the database. It will first create a prepared statement before doing the read.\r\n\t * \r\n\t * @param sql to be executed. It must contain the amount ? as the length of the objects.\r\n\t * @return a cached result set.\r\n\t */\r\n\tpublic <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);\r\n\t\r\n\tpublic <E extends Retrievable> List<E> getObjects(ResultSet resultSet, Class<E> clazz, boolean follow);\r\n\t\r\n\tpublic <E extends Retrievable> E getObject(ResultSet resultSet, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * @param sql that is update/insert or both\r\n\t * @param objects that is to be used in store as parameters to the sql..\r\n\t * @return number of rows updated.\r\n\t */\r\n\tpublic int write(String sql, Object... objects);\r\n\t\r\n\tpublic int writeGetID(String sql, Object... objects);\r\n\t\r\n\tpublic QueryRunner getQueryRunner();\r\n\t\r\n\tpublic Retriver getRetriver();\r\n\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz, Object... objects);\r\n\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> class1, Object... objects);\r\n\r\n\tpublic <E> E getValue(final String sql, final Class<E> clazz, final String column, final Object... objects);\r\n\t\r\n\tpublic List<Object> getValues(final String sql, final Object... objects);\r\n\t\r\n\tpublic String getServer();\r\n}", "@Override\r\n\tpublic Log get(int id) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tLog log = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetById);\r\n\t\t\tps.setInt(1, id);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tlog = generate(rs);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn log;\r\n\t}", "@Override\n public List<Beheerder> select() {\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "T get(PK id);", "@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}", "public final String getQuery() {\n return this.query;\n }", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "String query();", "public QueryModel getQueryModel()\n {\n return _queryModel;\n }", "public DB getDB() {\n return database;\n }", "public Cursor getData(String sql){\n SQLiteDatabase database = getReadableDatabase();\n return database.rawQuery(sql,null);\n }", "T getQueryInfo();", "public Query advancedQuery() \n {\n return null;\n }" ]
[ "0.7154065", "0.68586844", "0.677319", "0.6693695", "0.668159", "0.6567042", "0.65376145", "0.6448092", "0.6374059", "0.63704044", "0.635585", "0.6336171", "0.6303989", "0.62502754", "0.623499", "0.6222621", "0.6151698", "0.61268795", "0.6114705", "0.60500896", "0.6048086", "0.6032046", "0.6025458", "0.6020276", "0.60191923", "0.59971446", "0.5991956", "0.5988153", "0.59850806", "0.5981845", "0.5964884", "0.59556496", "0.5955355", "0.59349823", "0.59323907", "0.59281707", "0.59265286", "0.592071", "0.5920156", "0.5912718", "0.5912129", "0.59042484", "0.5899715", "0.5891589", "0.5887567", "0.5882987", "0.5877774", "0.5873542", "0.58681834", "0.5862497", "0.5853591", "0.58401436", "0.5821756", "0.5810679", "0.5808101", "0.5796185", "0.5795013", "0.57868046", "0.57834613", "0.57832116", "0.57825637", "0.5782187", "0.57798654", "0.5775219", "0.57701707", "0.57656235", "0.57565", "0.5755915", "0.5751141", "0.57482255", "0.5745239", "0.5741754", "0.5741263", "0.5741263", "0.5741263", "0.5726796", "0.57256484", "0.57232356", "0.57196146", "0.57180965", "0.57173043", "0.5716281", "0.57144666", "0.5711123", "0.5708947", "0.57061094", "0.57001", "0.56978816", "0.5696829", "0.56919277", "0.5689683", "0.5688839", "0.5685121", "0.56792706", "0.56772065", "0.56764406", "0.56746745", "0.5672106", "0.56692386", "0.5669106", "0.5669008" ]
0.0
-1
Created by Clariones on 6/8/2016.
public interface OnProgressChangedListener { void onProgressChanged(RoundSeekBar roundSeekBar, float progress); void onStartTrackingTouch(RoundSeekBar roundSeekBar); void onStopTrackingTouch(RoundSeekBar roundSeekBar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void poetries() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public int describeContents() { return 0; }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public void init() {}", "public void mo38117a() {\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 anularFact() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void mo4359a() {\n }", "public void gored() {\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\tpublic void emprestimo() {\n\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\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\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\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "private void m50366E() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override public int describeContents() { return 0; }", "private UsineJoueur() {}", "@Override\n public int getOrder() {\n return 0;\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "private TMCourse() {\n\t}", "@Override\n public int getOrder() {\n return 4;\n }", "Consumable() {\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public void initialize() {\n \n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}" ]
[ "0.6180507", "0.60019314", "0.5956347", "0.59269506", "0.58972836", "0.58972836", "0.58885384", "0.58487445", "0.5839412", "0.58074665", "0.579705", "0.5776885", "0.5760034", "0.5717962", "0.5663572", "0.5656878", "0.5651625", "0.564859", "0.5632363", "0.5614433", "0.56062406", "0.5603763", "0.55976427", "0.55942667", "0.5591074", "0.5556589", "0.5551578", "0.5551578", "0.5548296", "0.55468005", "0.5544614", "0.5541861", "0.5541861", "0.5541861", "0.5541861", "0.5541861", "0.5541861", "0.5540404", "0.5537776", "0.55261785", "0.55238503", "0.55238503", "0.55238503", "0.55238503", "0.55238503", "0.55119747", "0.5504534", "0.54669785", "0.54614234", "0.54613787", "0.5459984", "0.5459984", "0.5443684", "0.54405874", "0.54349434", "0.54308087", "0.54265404", "0.5424389", "0.5424389", "0.5417356", "0.5415429", "0.5412865", "0.5412865", "0.5412865", "0.54109406", "0.53925896", "0.53925896", "0.53925896", "0.5392158", "0.5390411", "0.5378347", "0.5378347", "0.5378347", "0.5375499", "0.53722876", "0.5363602", "0.5362925", "0.53624153", "0.5361002", "0.5354296", "0.5351635", "0.5349067", "0.53425", "0.5341596", "0.53321946", "0.5328344", "0.5326149", "0.5326106", "0.53255653", "0.53186697", "0.5315979", "0.5310546", "0.5309284", "0.53070635", "0.5305358", "0.5302106", "0.5301114", "0.53006864", "0.5299513", "0.5289547", "0.5289547" ]
0.0
-1
Creation of testreport.html in the specified path
private BufferedWriter createWriter(String filePath, String fileName) throws IOException { String fullPath = filePath + "/" + fileName; File file = new File(fullPath); boolean exists = new File(filePath).exists(); if (!exists) { file.mkdir(); } FileWriter writer = new FileWriter(file); BufferedWriter bufferWriter = new BufferedWriter(writer); return bufferWriter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}", "public void fnCreateHtmlReport(String strTestName) {\r\n\r\n //Set the default Operation count as 0\r\n g_OperationCount = 0;\r\n \r\n //Number of default Pass and Fail cases to 0\r\n g_iPassCount = 0;\r\n g_iFailCount = 0;\r\n \r\n //Snapshot count to start from 0\r\n g_iSnapshotCount = 0;\r\n \r\n //script name\r\n g_strScriptName = strTestName;\t\t\r\n\r\n //Set the name for the Test Case Report File\r\n g_strTestCaseReport = Environment.get(\"HTMLREPORTSPATH\") + \"\\\\Report_\" + g_strScriptName + \".html\";\r\n \r\n //Snap Shot folder\r\n g_strSnapshotFolderName = Environment.get(\"SNAPSHOTSFOLDER\") + \"\\\\\" + g_strScriptName;\r\n \r\n //Delete the Summary Folder if present\r\n\t\tFile file = new File(g_strSnapshotFolderName);\r\n\r\n\t\tif (file.exists()) {\r\n\t\t\tfile.delete();\r\n\t\t}\r\n\r\n\t\t//Make a new snapshot folder\r\n\t\tfile.mkdir();\r\n\r\n\t\t//Open the report file to write the report\r\n\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport);\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Write the Test Case name and allied headers into the file\r\n //Write the Test Case name and allied headers into the file\r\n\t\t//Close the html file\r\n\t\ttry \r\n\t\t{\t\t\r\n\t\t\tnew PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=ORANGE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank Automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TABLE BORDER=0 BORDERCOLOR=WHITE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Name:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>\" + g_strScriptName + \"</B></FONT></TD></TR>\");\r\n\t //new PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Iteration:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B> </B></FONT></TD></TR>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><BR/><TABLE WIDTH=100% CELLPADDING=3>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TH BGCOLOR=ORANGE WIDTH=5%><FONT FACE=VERDANA SIZE=2>Step No.</FONT></TH><TH BGCOLOR=ORANGE WIDTH=28%><FONT FACE=VERDANA SIZE=2>Step Description</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Expected Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Obtained Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=7%><FONT FACE=VERDANA SIZE=2>Result</FONT></TH></TR>\");\r\n\t\t\r\n\t\t\tfoutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Get the start time of the execution\r\n\t\tg_StartTime = new Date();\r\n\r\n\t}", "public String generateHtmlReport() {\n try {\n LogManager.suitLogger.info(\"Generating HTML report...\");\n writer = createWriter();\n writer.println(new String(api.core.htmlreport()));\n writer.flush();\n writer.close();\n Thread.sleep(2000);\n return new File(Config.getReportsLocation() + File.separator + \"penetration-test-report.html\").getAbsolutePath();\n } catch (Exception e) {\n LogManager.suitLogger.error(\"Failed to generate penetration test html report. \", e);\n }\n return null;\n }", "private void buildReport() throws IOException {\n try (InputStream template = Thread.currentThread().getContextClassLoader().getResourceAsStream(TEMPLATE_DIR + \"/\" + TEMPLATE_NAME)) {\n reportDoc = Jsoup.parse(template, null, \"\");\n Element diffReportContainer = reportDoc.select(\".diffReport\").first();\n Element diffResultTable = diffReportContainer.select(\".diffResult\").first().clone();\n\n diffReportContainer.empty();\n\n for (SimpleImmutableEntry<String, List<File>> diffResult : fileDiffResults) {\n diffReportContainer.appendChild(getDiffTable(diffResultTable, diffResult));\n }\n }\n }", "@Test\r\n\tpublic void extendReports() throws IOException {\n\t\tString File = \"./Reports/report.html\";\r\n\t\tExtentHtmlReporter html = new ExtentHtmlReporter(File);\r\n\t\thtml.setAppendExisting(true);\r\n\t\t//to write on the created html file\r\n\t\tExtentReports extents = new ExtentReports();\r\n\t\textents.attachReporter(html);\r\n\t\t\r\n\t\tExtentTest createAccountTest = extents.createTest(\"TC001\", \"CreateAccount\");\r\n\t\tcreateAccountTest.pass(\"username entered\", MediaEntityBuilder.createScreenCaptureFromPath(\"./../snaps/img1.png\").build());\r\n\t\textents.flush();\r\n\t\t\r\n\r\n\t}", "public void summaryReport() {\r\n\r\n\t\tString strTimeStamp = new SimpleDateFormat(\"yyyy-MM-dd-HH-mm-ss\").format(new Date());\r\n\t\tString reportPath = new File(\"Report\").getAbsolutePath();\r\n\t\tint stepPassed = 0;\r\n\t\tint stepFailed = 0;\r\n\t\tString cssData = \"\";\r\n\r\n\t\ttry {\r\n\t\t\tString cssPath = new File(\"Report\\\\Style\\\\style.css\").getAbsolutePath();\r\n\t\t\tbufferedReader = new BufferedReader(new FileReader(cssPath));\r\n\r\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\t\tString line = bufferedReader.readLine();\r\n\t\t\twhile (line != null) {\r\n\t\t\t\tstringBuilder.append(line);\r\n\t\t\t\tstringBuilder.append(System.lineSeparator());\r\n\t\t\t\tline = bufferedReader.readLine();\r\n\t\t\t}\r\n\t\t\tcssData = stringBuilder.toString();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tLog.error(\"Exception occure in reading file\" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tbufferedReader.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tLog.error(\"Exception occure in reading file\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tFile HTMLDir = new File(reportPath + \"\\\\HTMLReport\");\r\n\t\tif (!HTMLDir.exists()) {\r\n\t\t\ttry {\r\n\t\t\t\tHTMLDir.mkdir();\r\n\t\t\t} catch (SecurityException ex) {\r\n\t\t\t\tLog.error(\"Error in creating HTMLReport directory\" + ex.getMessage());\r\n\t\t\t\t// log.error(\"Error in creating Detail directory\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString htmlname = HTMLDir + \"\\\\\" + strTimeStamp + \".html\";\r\n\t\tString logoPath = new File(\"Report\\\\Style\\\\logo.png\").getAbsolutePath();\r\n\t\tfor (ReportBean reportValue : GlobalVariables.getReportList()) {\r\n\t\t\tif (reportValue.getStatus().equalsIgnoreCase(\"Failed\")) {\r\n\t\t\t\tstepFailed++;\r\n\t\t\t} else if (reportValue.getStatus().equalsIgnoreCase(\"Passed\")) {\r\n\t\t\t\tstepPassed++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tstrBufferReportAppend = new StringBuffer();\r\n\t\ttry {\r\n\t\t\tbufferedWriter = new BufferedWriter(new FileWriter(htmlname));\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.error(\"Error in wrinting the file\" + e.getMessage());\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<html><head><script type=\\\"text/javascript\\\" src=\\\"https://www.gstatic.com/charts/loader.js\\\"></script>\");\r\n\t\tstrBufferReportAppend.append(\"<script src=\\\"https://www.google.com/jsapi\\\"></script>\");\r\n\t\tstrBufferReportAppend.append(\"<style>\" + cssData);\r\n\t\tstrBufferReportAppend.append(\"</style>\");\r\n\t\tstrBufferReportAppend.append(\"</head><body>\");\r\n\t\tstrBufferReportAppend.append(\"<table class=\\\"width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend.append(\"<table class=\\\"width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td><img src=file:\\\\\\\\\" + logoPath + \"></td>\" + \"<td class=\\\"headertext\\\">\"\r\n\t\t\t\t+ reportHeader + \"</td>\");\r\n\r\n\t\tstrBufferReportAppend.append(\"</tr></table><hr></hr>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend.append(\"<table class=\\\"width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td class=\\\"width50\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<table cellpadding=3 cellspacing=1>\");\r\n\t\tstrBufferReportAppend\r\n\t\t.append(\"<tr><td class=\\\"width50 bold\\\">Execution Start Time</td><td class=\\\"width50 bold\\\">\"\r\n\t\t\t\t+ GlobalVariables.getStrStartTime() + \"</td></tr>\");\r\n\t\tstrBufferReportAppend\r\n\t\t.append(\"<tr><td class=\\\"width50 bold\\\">Execution End Time</td><td class=\\\"width50 bold\\\">\"\r\n\t\t\t\t+ GlobalVariables.getStrEndTime() + \"</td></tr>\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"<tr><td class=\\\"width50 bold\\\">Total TestSteps Executed</td><td class=\\\"width50 bold\\\">\"\r\n\t\t\t\t\t\t+ (stepFailed + stepPassed) + \"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td class=\\\"width50 green\\\">Passed</td><td class=\\\"width50 green\\\">\" + stepPassed + \"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td class=\\\"width50 red\\\">Failed</td><td class=\\\"width50 red\\\">\" + stepFailed + \"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"</table></td>\");\r\n\t\tstrBufferReportAppend.append(\"<td class=\\\"width50\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<table>\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td class=\\\"width25\\\">\");\r\n\t\tstrBufferReportAppend.append(\"</td>\");\r\n\t\tstrBufferReportAppend.append(\"<td class=\\\"width25\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<script type=\\\"text/javascript\\\">\");\r\n\t\tstrBufferReportAppend.append(\"google.charts.load('current', {'packages':['corechart']});\");\r\n\t\tstrBufferReportAppend.append(\"google.charts.setOnLoadCallback(drawDetailsChart);\");\r\n\t\tstrBufferReportAppend.append(\"function drawDetailsChart() {\");\r\n\t\tstrBufferReportAppend.append(\"var data = new google.visualization.DataTable();\");\r\n\t\tstrBufferReportAppend.append(\"data.addColumn('string', 'Test Execution Detail Graph');\");\r\n\t\tstrBufferReportAppend.append(\"data.addColumn('number', 'Count');\");\r\n\t\tstrBufferReportAppend.append(\"data.addRows([\");\r\n\t\tstrBufferReportAppend.append(\"['Passed',\" + stepPassed + \"],\");\r\n\t\tstrBufferReportAppend.append(\"['Failed',\" + stepFailed + \"]]);\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"var options = {'title':'Test Step Details Graph',colors: ['#12C909', '#C3100A'],pieHole: 0.3,\");\r\n\t\tstrBufferReportAppend.append(\"'width':300,\");\r\n\t\tstrBufferReportAppend.append(\"'height':170};\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"var chart = new google.visualization.PieChart(document.getElementById('detailsChart_div'));\");\r\n\t\tstrBufferReportAppend.append(\"chart.draw(data, options); } </script>\");\r\n\t\tstrBufferReportAppend.append(\"<div id=\\\"detailsChart_div\\\"></div>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr></table>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr></table><hr></hr></td></tr>\");\r\n\t}", "private void startReport() {\r\n // initialize the HtmlReporter\r\n htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\")\r\n + jsonConfig.get(\"extentReportPath\") + \"testReport.html\");\r\n\r\n //initialize ExtentReports and attach the HtmlReporter\r\n extent = new ExtentReports();\r\n extent.attachReporter(htmlReporter);\r\n\r\n //To add system or environment info by using the setSystemInfo method.\r\n extent.setSystemInfo(\"OS\", (String) jsonConfig.get(\"osValue\"));\r\n switch ((String) jsonConfig.get(\"browserToBeUsed\")) {\r\n case \"FF\":\r\n extent.setSystemInfo(\"Browser\", \"Firefox\");\r\n break;\r\n case \"CH\":\r\n extent.setSystemInfo(\"Browser\", \"Chrome\");\r\n break;\r\n case \"IE\":\r\n extent.setSystemInfo(\"Browser\", \"Internet Explorer\");\r\n break;\r\n }\r\n\r\n //configuration items to change the look and feel\r\n //add content, manage tests etc\r\n htmlReporter.config().setChartVisibilityOnOpen(true);\r\n htmlReporter.config().setDocumentTitle(\"Test Report\");\r\n htmlReporter.config().setReportName(\"Test Report\");\r\n htmlReporter.config().setTestViewChartLocation(ChartLocation.TOP);\r\n htmlReporter.config().setTheme(Theme.STANDARD);\r\n htmlReporter.config().setTimeStampFormat(\"EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'\");\r\n }", "public void fnCreateSummaryReport(){\r\n //Setting counter value\r\n g_iTCPassed = 0;\r\n g_iTestCaseNo = 0;\r\n g_SummaryStartTime = new Date();\r\n \r\n\t\ttry \r\n\t\t{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t\t\t//Close the html file\r\n\t new PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=BLACK>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\"); \r\n\t new PrintStream(foutStrm).println(\"<TABLE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\"); \r\n\t new PrintStream(foutStrm).println(\"<TR COLS=6 BGCOLOR=ORANGE><TD WIDTH=10%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>TC No.</B></FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Name</B></FONT></TD><TD BGCOLOR=ORANGE WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Status</B></FONT></TD><TD WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Duration</B></FONT></TD></TR>\");\r\n\t \r\n\t //Close the object\r\n\t foutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\tfoutStrm = null;\r\n }", "public static void setReport()\n {\n ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(\"\\\\C:\\\\Users\\\\shir halevi\\\\Desktop\\\\qaexpert\\\\buyMe\\\\reports\\\\extent.html\");\n htmlReporter.setAppendExisting(true);\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n test = extent.createTest(\"BuyMeSanityTestWeb\", \"This is a BuyMe Sanity Test Web\");\n extent.setSystemInfo(\"Tester\", \"Shir\");\n test.log(Status.INFO, \"@Before class\");\n }", "public void CreateTestResultFile()\n\t{ \n\t\tDate dNow = new Date( );\n\t\tSimpleDateFormat ft =new SimpleDateFormat (\"MMddYYYY\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFileOutputStream fos = new FileOutputStream(System.getProperty(\"user.dir\")+\"//PG HealthCheck List_\"+ft.format(dNow)+\".xls\");\n\t HSSFWorkbook workbook = new HSSFWorkbook();\n\t HSSFSheet worksheet = workbook.createSheet(\"PG Functionality - Country\");\n\t HSSFRow row1 = worksheet.createRow(0);\n\t row1.createCell(0).setCellValue(\"Availability of Data\");\n\t HSSFRow row = worksheet.createRow(1);\n\t row.createCell(0).setCellValue(\"Testcase\");\n\t row.createCell(1).setCellValue(\"TestRunStatus\");\n\t row.createCell(2).setCellValue(\"Remarks\");\n\t workbook.write(fos);\n\t fos.close();\n\t \t \n\t } \n\t\tcatch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t\t\t\n\t\t\n\t}", "public static void main(String[] args) {\r\n // Getting directory of file.\r\n String userDirectory = System.getProperty(\"user.dir\");\r\n File pathOfHTML = new File(userDirectory + \"\\\\\" + NAMEOFHTML);\r\n SearchFiles searchFiles = new SearchFiles();\r\n BuildHTML report = new BuildHTML();\r\n // Create HTML table of files from this directory.\r\n report.createHTML(pathOfHTML, searchFiles.searchFiles(new File(userDirectory)));\r\n }", "@BeforeTest\n\tpublic void startReport() {\n\t\t// ExtentReports(String filePath,Boolean replaceExisting)\n\t\t// filepath - path of the file, in .htm or .html format - path where your report\n\t\t// needs to generate.\n\t\t// replaceExisting - Setting to overwrite (TRUE) the existing file or append to\n\t\t// it\n\t\t// True (default): the file will be replaced with brand new markup, and all\n\t\t// existing data will be lost. Use this option to create a brand new report\n\t\t// False: existing data will remain, new tests will be appended to the existing\n\t\t// report. If the the supplied path does not exist, a new file will be created.\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\") + \"/test-output/ExtentReport.html\", true);\n\t\t// extent.addSystemInfo(\"Environment\",\"Environment Name\")\n\t\textent.addSystemInfo(\"Host Name\", \"SoftwareTestingMaterial\").addSystemInfo(\"Environment\", \"Automation Testing\")\n\t\t\t\t.addSystemInfo(\"User Name\", \"Rajkumar SM\");\n\t}", "@Test\n public void testWizardReport() {\n testReporterConfig(Reporter.ALL_2017_4_24, \"WizardReport.txt\");\n }", "public String getReportPath();", "private void generateOutputHTML() {\n\n\t\t\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"data/web/template.html\"));\n\t\t\tPrintStream out = new PrintStream(\"data/web/output\"+count+\".html\");\n\t\t\tSystem.setOut(out);\n\t\t\t\n\t\t\twhile (in.hasNext()) {\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tSystem.out.print(line);\n\t\t\t\t\n\t\t\t\tif (line.equals(\"<title>\")) System.out.println(\"Path #\" +count);\n\t\t\t\t\n\t\t\t\n\t\t\t\tif (line.equals(\"<body>\")) { \t\t\t\t// this is where all the good stuff goes..\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<div class='bodyHeader'>\");\n\t\t\t\t\tSystem.out.println(\"<p><strong>in order path for driver #\" +count+ \" \" + \"</strong></p>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<br><br><hr class='hrStyle'/>\");\n\t\t\t\t\t\n\t\t\t\t\t// Creating info about the path in a table format\n\t\t\t\t\tSystem.out.println(\"<div class='pathInfo'>\");\n\t\t\t\t\tSystem.out.println(\"<table class='infoTable' cellpadding='3' cellspacing='10'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>City: </td><td> \" + list.get(0).getCity()+ \" - \" + list.get(0).getState() + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Number of stops: </td><td> \" + (list.size()-1) + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Store: </td><td> \" + list.get(1).getName().toUpperCase()+ \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"</table>\");\n\t\t\t\t\t\n//TODO: get starting address --- System.out.println(\"Starting address: \" + list.get(0).getAddress());\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t\t\n\t\t\t\t\t//create ordered table/list of path\n\t\t\t\t\tSystem.out.println(\"<div class='pathList'>\");\t\n\t\t\t\t\tSystem.out.println(\"<table class='pathTable' cellspacing='15'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><th>Order</th><th>Address</th><th></th><th>Latitude , Longitude</th></tr>\");\n\t\t\t\t\tint i = 1;\n\t\t\t\t\tfor (Location c: list) {\n\t\t\t\t\t// creating table row for each stop in route\n\t\t\t\t\t\tSystem.out.println(\"<tr>\" + \"<td>\"+(i++)+\"</td>\" + c.toHTMLString() +\"</tr>\");\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</ol>\");\n\t\t\t\t\tSystem.out.println(\"<br>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t\t//opening html file to the default browser in the system\n\t\t\tFile htmlFile = new File(\"data/web/output\"+count+\".html\");\n\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(e.getLocalizedMessage());\n\t\t} \n\t}", "private void generateTestExecution(ITestResult result) throws IOException{\r\n\t\t//create the html file with current running class and test name\r\n\t\tfout = createRequiredFile(result.getName());\r\n\t\t\r\n\t\t//Write initial html codes neccessary for report\r\n\t\tstartHtmlPage(fout,result);\r\n\t\t\r\n\t\t//get all the attributes set during the test execution\r\n\t\tObject[] array = result.getAttributeNames().toArray();\r\n\t\t\r\n\t\t//Above got values are not in sort. So, Sorting that based on time\r\n\t\tArrays.sort(array);\r\n\t\t\r\n\t\t//Iterating the array value to generate report\r\n \tfor(Object name : array){\r\n \t\t\t\r\n \t\t\t//Each and every array value contains, All the info about the particular action\r\n \t\t\t//And Values combined using deliminator. So, split using deliminator\r\n\t \t\tString temp[] = result.getAttribute((String) name).toString().split(\"####\");\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'Fail' means that step failed \r\n\t \t\tif(temp[3].toLowerCase().contains(\"fail\")){\r\n\t \t\t\t//If Fail create '<tr>' tag with 'status_failed' class(Which is used for create 'red' background color for failed cases)\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_failed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\t\r\n\t \t\t\t//create the screenshot path\r\n\t \t\t\tString pathToScreenshot = \"../Failure_Screenshot/\"+temp[5]+\".jpg\";\r\n\t \t\t\t\r\n\t \t\t\t//creating mapping for failed step(Link to screen shot and embed the screenshot in that step)\r\n\t \t\t\ttemp[4] = \"<a href=\\'\" + pathToScreenshot + \"\\'> <img src=\\'\" + pathToScreenshot + \"\\' height=\\\"100\\\" width=\\\"100\\\"> </a>\";\r\n\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'title' means that is title\r\n\t \t\telse if(temp[3].toLowerCase().contains(\"title\")){\r\n\t \t\t\t//So, If it is a title then create '<tr>' tag with class name 'title'\r\n\t \t\t\tfout.println(\"<tr class=\\\"title\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\tfout.println(\"<td colspan=\\\"6\\\">\"+ temp[0] + \"</td>\");\r\n\t \t\t\tfout.println(\"</tr>\");\r\n\t \t\t\tcontinue;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Else status is passed\r\n\t \t\telse{\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_passed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//this will create separate '<td>' for messages inside the action\r\n\t \t\tfor(String temp1 : temp){\r\n\t \t\t\t\tfout.println(\"<td>\"+ temp1 + \"</td>\");\r\n\r\n\t \t\t}\r\n\t \t//end up '<tr>' tag\t\r\n\t \tfout.println(\"</tr>\");\r\n \t}\r\n \t\r\n \t//this used for write some end up html tags\r\n \tonFinish();\r\n \t\r\n\t}", "public void setup_report() {\n try {\n output = new PrintWriter(new FileWriter(filename));\n } catch (IOException ioe) {}\n }", "public void createDeatilsPage(String deatils, ITestResult r) {\n\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\twriter = createHTMLWriter(folderToSave + \"\\\\support\", r.getName() + \"_\" + r.getStartMillis() + \".html\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"unable to create \" + r.getName() + \"_\" + r.getEndMillis());\n\t\t\treturn;\n\t\t}\n\t\twriter.println(\n\t\t\t\t\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\\\">\");\n\t\twriter.println(\"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\");\n\t\twriter.println(\n\t\t\t\t\"<head><style>.class-green{background-color:green;} .class-blue{background-color:blue;}</style><script> \"\n\t\t\t\t\t\t+ \"function goBack() \" + \"{ \" + \"window.history.back() } </script></head> \");\n\t\twriter.println(\"<body><table border=\\\"1\\\" CELLPADDING=\\\"1\\\" CELLSPACING=\\\"1\\\">\");\n\t\twriter.println(\"<thead><tr><th COLSPAN=\\\"2\\\"><h4>Execution Steps for \" + r.getName() + \"</h4></th></tr>\"\n\t\t\t\t+ \"<tr><th>Step No</th> <th>Action Details</th></tr>\" + \"</thead>\");\n\t\twriter.println(deatils);\t\t\n\t\twriter.println(\"</tbody></table> \");\n\t\tif (r.getAttribute(\"LOGSRC\") != null) {\n\t\t\twriter.println(\n\t\t\t\t\t\"</br><br/><a href='\" + r.getName() + \"_\" + r.getStartMillis() + \".png'>Reference Screen</a>\");\n\t\t}\n\t\t// writer.println(\"</br><br/><input type=\\\"button\\\" value=\\\"Back To Test\n\t\t// Cases\\\" onclick=\\\"goBack()\\\"/> </body>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "@SuppressWarnings(\"unchecked\")\n private void generateHTMLReport(IReportRunnable report, HttpServletResponse response, HttpServletRequest request) {\n IRunAndRenderTask runAndRenderTask = birtEngine.createRunAndRenderTask(report);\n response.setContentType(birtEngine.getMIMEType(\"html\"));\n IRenderOption options = new RenderOption();\n HTMLRenderOption htmlOptions = new HTMLRenderOption(options);\n htmlOptions.setOutputFormat(\"html\");\n htmlOptions.setBaseImageURL(\"/\" + reportsPath + imagesPath);\n htmlOptions.setImageDirectory(imageFolder);\n htmlOptions.setImageHandler(htmlImageHandler);\n runAndRenderTask.setRenderOption(htmlOptions);\n runAndRenderTask.getAppContext().put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST, request);\n\n try {\n htmlOptions.setOutputStream(response.getOutputStream());\n runAndRenderTask.run();\n } catch (Exception e) {\n throw new RuntimeException(e.getMessage(), e);\n } finally {\n runAndRenderTask.close();\n }\n }", "public static ExtentReports extentReportGenerator() \n\t{\n\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\";\n//\tExtentSparkReporter reporter=new ExtentSparkReporter(path);\n//\t\treporter.config().setEncoding(\"utf-8\");\n//\t\treporter.config().setReportName(\"Automation Test Results\");\n//\t\treporter.config().setDocumentTitle(\"Automation Reports\");\n//\t\treporter.config().setTheme(Theme.STANDARD);\n\t\t\n\t\tExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(path);\t\n\t\thtmlReporter.setAppendExisting(true);\n\t\thtmlReporter.config().setEncoding(\"utf-8\");\n\t\thtmlReporter.config().setDocumentTitle(\"Automation Reports\");\n\t\thtmlReporter.config().setReportName(\"Automation Test Results\");\n\t\thtmlReporter.config().setTheme(Theme.STANDARD);\n\t\tLocale.setDefault(Locale.ENGLISH);\n\t\t\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlReporter);\n\t\textent.setSystemInfo(\"Tester\", \"Sonu\");\n\t\t\n\t\t\n\t\t\n\t\treturn extent;\n\t}", "public void detailReport() {\r\n\t\tint testStepId = 1;\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><table class=\\\"width100\\\"><tr><td><div class=\\\"headertext1 bold\\\">Test Execution Detail Report</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Execution Browser Name: \"+ GlobalVariables.getBrowserName() + \"</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Test Case Name: \"+ GlobalVariables.getTestCaseName() + \"</div></td></tr>\");\r\n\t\t\r\n\t\t\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"<table colspan=3 border=0 cellpadding=3 cellspacing=1 class=\\\"reporttable width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><th class=\\\"auto-style1\\\">Test Step No</th>\" + \"<th class=\\\"auto-style2\\\">Action</th>\"\r\n\t\t\t\t+ \"<th class=\\\"auto-style3\\\">Actual Result</th>\" + \"<th class=\\\"auto-style4\\\">Status</th></tr>\");\r\n\t\tfor (ReportBean reportValue : GlobalVariables.getReportList()) {\r\n\r\n\t\t\tif (reportValue.getStatus().equalsIgnoreCase(\"Passed\")) {\r\n\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 green\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t} else if (reportValue.getStatus().equalsIgnoreCase(\"Failed\")) {\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 red\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tstrBufferReportAppend.append(\"</table>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"</table></td></tr></table></body></html>\");\r\n\t}", "private void createHTMLFile(Webpage webpage) {\n String filepath = \"resources/tempHTML\" +Thread.currentThread().getName() +\".html\";\n\n try {\n //Create HTML file\n File file = new File(filepath);\n OutputStreamWriter fW = new OutputStreamWriter(new FileOutputStream(file), Charset.forName(\"UTF-8\").newEncoder());\n fW.write(webpage.getHTML());\n fW.flush();\n fW.close();\n\n //Set HTML file size\n webpage.setFileSize(Utils.getFileSize(filepath));\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void createReport(Report report);", "private void cleanReporter(){\n File file = new File(\"test-report.html\");\n file.delete();\n\n }", "@BeforeTest\n\tpublic void startReport() {\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\")+\"//extent-reports//myreport.html\",true);\n\t\textent.addSystemInfo(\"Host Name\", \"LocalHost\");\n\t\textent.addSystemInfo(\"Environment\", \"QA\");\n\t\textent.addSystemInfo(\"User Name\", \"Prasanta\");\n\t\textent.loadConfig(new File(System.getProperty(\"user.dir\")+\"//ReportsConfig.xml\"));\n\t}", "public void fnWriteTestSummary(String strTestCaseName, String strResult, String strDuration){\r\n \tString sColor,sRowColor;\r\n \r\n //Close the file\r\n try{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t //Check color result\r\n\t if (strResult.toUpperCase().equals(\"PASSED\") || strResult.toUpperCase().equals(\"PASS\")){\r\n\t sColor = \"GREEN\";\r\n\t g_iTCPassed ++;\r\n\t }\r\n\t else if (strResult.toUpperCase().equals(\"FAILED\") || strResult.toUpperCase().equals(\"FAIL\")){\r\n\t \tsColor = \"RED\";\r\n\t }\r\n\t else{\r\n\t \tsColor = \"ORANGE\";\r\n\t }\r\n\t\r\n\t g_iTestCaseNo++;\r\n\t\r\n\t if (g_iTestCaseNo % 2 == 0){sRowColor = \"#EEEEEE\";}\r\n\t else{sRowColor = \"#D3D3D3\";}\r\n\t \r\n\t //Write the result of Individual Test Case\r\n\t new PrintStream(foutStrm).println (\"<TR COLS=3 BGCOLOR=\" + sRowColor + \"><TD WIDTH=10%><FONT FACE=VERDANA SIZE=2>\" + g_iTestCaseNo + \"</FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA SIZE=2>\" + strTestCaseName + \"</FONT></TD><TD WIDTH=15%><A HREF='\" + strTestCaseName + \".html'><FONT FACE=VERDANA SIZE=2 COLOR=\" + sColor + \"><B>\" + strResult + \"</B></FONT></A></TD><TD WIDTH=15%><FONT FACE=VERDANA SIZE=2>\" + strDuration+ \"</FONT></TD></TR>\");\r\n \r\n \tfoutStrm.close();\r\n }\r\n catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n foutStrm = null;\r\n\r\n }", "public static void rep_WriteResults(String strTemplatePath, String strOutputPath) {\n String strStatus;\n strStatus = \"Pass\";\n intPassCount = 0;\n intFailCount = 0;\n intInfoCount = 0;\n try {\n String reportIn = new String(Files.readAllBytes(Paths.get(strTemplatePath)));\n for (int i = 0; i < details.size(); i++) {\n //if statement to prevent duplication of test step numbers in the report\n if (i == 0) {\n\n\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else if (details.get(i).getResult().equals(\"Step\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=left width=100><font color=\\\"blue\\\">\" + details.get(i).getResult() + \"</font></td><td><font color=\\\"blue\\\">\" +\n details.get(i).getResultText() + \"</font></td></tr>\" + resultPlaceholder);\n\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n\n\n } else if (details.get(i).getintTestStep() == details.get(i - 1).getintTestStep()) {\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n } else {\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else if (details.get(i).getResult().equals(\"Step\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=left width=100><font color=\\\"blue\\\">\" + details.get(i).getResult() + \"</font></td><td><font color=\\\"blue\\\">\" +\n details.get(i).getResultText() + \"</font></td></tr>\" + resultPlaceholder);\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n }\n\n }\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</table>\");\n String currentDate = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\n\n\n String currentTime = CommonFunctionTest.com_CurrentTime();\n String reportPath = strOutputPath + \"\\\\report_\" + currentDate + \"_\" + currentTime + \"_\" + strStatus + \".html\";\n\n Files.write(Paths.get(reportPath), reportIn.getBytes(), StandardOpenOption.CREATE);\n\n } catch (Exception e) {\n System.out.println(\"Error when writing report file:\\n\" + e.toString());\n }\n }", "public void generateReport() {\n ReportGenerator rg = ui.getReportGenerator();\n if (rg == null || !rg.isVisible()) {\n ui.openReportGenerator();\n rg = ui.getReportGenerator();\n }\n Image img = getImage();\n if (img == null) {\n return;\n }\n rg.addImage(img, \"Plot\");\n }", "public String generateResultsReport(HashMap<String, Integer> data) throws IOException {\n Date today = new Date();\n\n String resultData = generateJsonDataForReport(data);\n String directoryPath = properties.getProperty(\"path.to.reports\");\n String fileLocation = directoryPath + \"dataTrendsResults\" + \"_\" + today.getTime() + \".html\";\n try {\n\n File directory = new File(directoryPath);\n if (!directory.exists()) {\n directory.mkdirs();\n }\n\n File report = new File(fileLocation);\n FileOutputStream os = new FileOutputStream(report);\n OutputStreamWriter osw = new OutputStreamWriter(os);\n Writer writer = new BufferedWriter(osw);\n writer.write(generatePageReportHtml(resultData));\n writer.close();\n } catch (IOException e) {\n System.out.println(\"There was a problem writing the report to \" + fileLocation + \", exception: \" + e.getMessage());\n }\n\n return fileLocation;\n }", "@Test\n\tpublic void testUsingTempFolder1() throws IOException {\n\t\tFile createdFile= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title</title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = \"This is title\"; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile);\n\t\tassertEquals(res,result); \n\t}", "@GET\n @Path(\"/report\")\n @NotAuthenticated\n public Response getReport() {\n \n try {\n File design = opalRuntime.getFileSystem().getLocalFile(resolveFileInFileSystem(\"/report-templates/\" + name + \".rptdesign\"));\n if(!design.exists()) {\n return Response.status(Status.NOT_FOUND).build();\n }\n File reports = opalRuntime.getFileSystem().getLocalFile(resolveFileInFileSystem(\"/reports/\" + name));\n if(!reports.exists()) {\n if(!reports.mkdirs()) {\n return Response.serverError().build();\n }\n }\n File report = new File(reports, name + \"-\" + System.currentTimeMillis() + \".pdf\");\n reportService.render(\"PDF\", null, design.getAbsolutePath(), report.getAbsolutePath());\n if(report.exists()) {\n return Response.ok().build();\n } else {\n return Response.serverError().build();\n }\n } catch(Exception e) {\n e.printStackTrace();\n return Response.serverError().build();\n }\n }", "@Override\r\npublic void onTestSuccess(ITestResult arg0) {\n\tExtentReports er = new ExtentReports(\"./Report/Report.html\");\r\n\tExtentTest t1 = er.startTest(\"TC001\");\r\n\tt1.log(LogStatus.PASS, \"Passed\");\r\n\tSystem.out.println(\"balle\");\r\n\ter.endTest(t1);\r\n\ter.flush();\r\n\ter.close();\r\n\r\n\t}", "Report createReport();", "public void createTemplate(ReportContent reportContent, String fileName) {\n\n ArrayList<Detail> detailList = reportContent.getDetails();\n\n // create Test Data\n HashMap<String, Object> parameter = createBasicParameters(reportContent);\n\n // read and modify file\n \n \n File file = Main_Gui.openFile(\"report_template.jrxml\", \"report template\", \".jrxml\");\n\n try {\n // define namespace of the jrxml-file and document\n Namespace ns = Namespace\n .getNamespace(\"http://jasperreports.sourceforge.net/jasperreports\");\n Document doc = new SAXBuilder(false).build(file);\n\n // set Color of the result conistency ratio (red, if Cr is higher than\n // the critical CR --> else: black)\n @SuppressWarnings(\"unchecked\")\n List<Element> list = doc.getRootElement().getChild(\"detail\", ns)\n .getChild(\"band\", ns).getChildren();\n\n \n for (Element element : list) {\n\n if (element.getName().equals(\"textField\")\n && element.getChild(\"textFieldExpression\", ns)\n .getText()\n .equals(\"$P{RESULT_CONSISTENCY_RATIO}\")) {\n\n setConsistencyRatioColor(\n reportContent.getResultConsistencyRatio(), element,\n ns);\n }\n }\n\n // addDetail band(s)\n for (Detail detail : detailList) {\n this.addDetailFrame(doc, ns, parameter, detail);\n\n }\n\n // remove detail pattern band (last band under \"detail\" in \"report_template.jrxml\")\n doc.getRootElement().getChild(\"detail\", ns).getChildren().remove(4);\n\n // create output of the modified template \n XMLOutputter out = new XMLOutputter();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n out.output(doc, baos);\n\n ByteArrayInputStream bais = new ByteArrayInputStream(\n baos.toByteArray());\n\n // -----------\n // --JASPER\n // ----------\n \n // compile, fill and export the report as PDF-file to the given path\n JasperReport jasperReport = JasperCompileManager\n .compileReport(bais);\n\n JasperPrint jasperPrint = JasperFillManager.fillReport(\n jasperReport, parameter,\n new net.sf.jasperreports.engine.JREmptyDataSource(1));\n\n JasperExportManager.exportReportToPdfFile(jasperPrint, fileName);\n\n } catch (JRException e) {\n // print out standard exception\n e.printStackTrace();\n } catch (JDOMException e1) {\n // print out standard exception\n e1.printStackTrace();\n } catch (IOException e1) {\n // print out standard exception\n \n //!!NOT YET IMPLEMENTED!!:\n //show user dialog, if file which shall be overwritten is still opened.\n \n e1.printStackTrace();\n }\n\n }", "void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }", "public synchronized static ExtentReports getReporter(String filePath) {\n\t\t if (report == null) {\r\n\t\t \treport = new ExtentReports(path.concat(\"Report\\\\Purchase_Admin_Report.html\"));\r\n\t\t \r\n\t\t report\r\n\t\t .addSystemInfo(\"Host Name\", \"Priti\") //Environment Setup For Report\r\n\t\t .addSystemInfo(\"Environment\", \"QA\");\r\n\t\t }\r\n\t\t \r\n\t\t return report;\r\n\t\t}", "@BeforeTest\n\tpublic void config() {\n\t\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\"; //after + we want new path to add to it\n\t\tExtentSparkReporter reporter=new ExtentSparkReporter(path);// this is responsible for creating report\n\t\treporter.config().setReportName(\"Web Automation Akhil\");\n\t\treporter.config().setDocumentTitle(\"Test Results\");\n\t\t\n\t\tExtentReports extent=new ExtentReports();// this is main class for Tracking the things.\n\t\textent.attachReporter(reporter); // Here is link of config with main class\n\t\textent.setSystemInfo(\"Tester\", \"Akhilesh Rawat\");\n\t}", "@Parameters({ \"report_name\" })\n\t@BeforeSuite\n\tpublic void setUp() {\n\t\tString reportName = \"Report-\" + getCurrentDateNTime(\"yyyy-MM-dd-HH-mm-ss\");\n\t\t//String reportFileName = reportName + \".html\";\n\t\tString reportFileName = \"TestExecutionReport.html\";\n\t\treports = new ExtentReports(\"./ExecutionReport/\" + reportFileName, true);\n\t\treports.loadConfig(new File(\"extent-config.xml\"));\n\t}", "private static void createAxeHtmlReportFile(SearchContext context, Results results, String destination,\n Set<ResultType> requestedResults) throws IOException, ParseException {\n context = (context instanceof WrapsElement)\n ? ((WrapsElement) context).getWrappedElement() : context;\n\n HashSet<String> selectors = new HashSet<>();\n final int violationCount = getCount(results.getViolations(), selectors);\n final int incompleteCount = getCount(results.getIncomplete(), selectors);\n final int passCount = getCount(results.getPasses(), selectors);\n final int inapplicableCount = getCount(results.getInapplicable(), selectors);\n\n String stringBuilder = \"<!DOCTYPE html>\\r\\n\" + \"<html lang=\\\"en\\\">\" + \"<head>\"\n + \"<meta charset=\\\"utf-8\\\">\"\n + \"<meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\"\n + \"<title>Accessibility Check</title><style></style>\"\n + \"</head>\" + \"<body><content></content><script></script></body>\" + \"</html>\";\n\n Document doc = Jsoup.parse(stringBuilder);\n\n doc.select(\"style\").append(getCss(context));\n\n Element contentArea = doc.select(\"content\").first();\n\n Element reportTitle = new Element(\"h1\");\n reportTitle.text(\"Accessibility Check\");\n contentArea.appendChild(reportTitle);\n\n Element metaFlex = new Element(\"div\");\n metaFlex.attributes().put(\"id\", \"metadata\");\n contentArea.appendChild(metaFlex);\n\n Element contextGroup = new Element(\"div\");\n contextGroup.attributes().put(\"id\", \"context\");\n metaFlex.appendChild(contextGroup);\n\n Element contextHeader = new Element(\"h3\");\n contextHeader.text(\"Context:\");\n contextGroup.appendChild(contextHeader);\n\n Element contextContent = new Element(\"div\");\n contextContent.attributes().put(classString, \"emOne\");\n contextContent.attributes().put(\"id\", \"reportContext\");\n getContextContent(results, contextContent);\n contextGroup.appendChild(contextContent);\n\n Element imgGroup = new Element(\"div\");\n imgGroup.attributes().put(\"id\", \"image\");\n metaFlex.appendChild(imgGroup);\n\n Element imageHeader = new Element(\"h3\");\n imageHeader.appendText(\"Image:\");\n imgGroup.appendChild(imageHeader);\n\n Element imageContent = new Element(\"img\");\n imageContent.attributes().put(classString, \"thumbnail\");\n imageContent.attributes().put(\"id\", \"screenshotThumbnail\");\n imageContent.attributes().put(\"alt\", \"A Screenshot of the page\");\n imageContent.attributes().put(\"width\", \"33%\");\n imageContent.attributes().put(\"height\", \"auto\");\n imgGroup.appendChild(imageContent);\n\n Element countsGroup = new Element(\"div\");\n countsGroup.attributes().put(\"id\", \"counts\");\n metaFlex.appendChild(countsGroup);\n\n Element countsHeader = new Element(\"h3\");\n countsHeader.appendText(\"Counts:\");\n countsGroup.appendChild(countsHeader);\n\n Element countsContent = new Element(\"div\");\n countsContent.attributes().put(classString, \"emOne\");\n getCountContent(violationCount, incompleteCount, passCount, inapplicableCount, requestedResults, countsContent);\n countsGroup.appendChild(countsContent);\n\n Element resultsFlex = new Element(\"div\");\n resultsFlex.attributes().put(\"id\", \"results\");\n contentArea.appendChild(resultsFlex);\n\n\n if (results.isErrored()) {\n Element errorHeader = new Element(\"h2\");\n errorHeader.appendText(\"SCAN ERRORS:\");\n contentArea.appendChild(errorHeader);\n\n Element errorContent = new Element(\"div\");\n errorContent.attributes().put(\"id\", \"ErrorMessage\");\n errorContent.appendText(results.getErrorMessage());\n contentArea.appendChild(errorContent);\n }\n\n if (violationCount > 0 && requestedResults.contains(ResultType.Violations)) {\n getReadableAxeResults(results.getViolations(), ResultType.Violations.name(), resultsFlex);\n }\n\n if (incompleteCount > 0 && requestedResults.contains(ResultType.Incomplete)) {\n getReadableAxeResults(results.getIncomplete(), ResultType.Incomplete.name(), resultsFlex);\n }\n\n if (passCount > 0 && requestedResults.contains(ResultType.Passes)) {\n getReadableAxeResults(results.getPasses(), ResultType.Passes.name(), resultsFlex);\n }\n\n if (inapplicableCount > 0 && requestedResults.contains(ResultType.Inapplicable)) {\n getReadableAxeResults(results.getInapplicable(), ResultType.Inapplicable.name(), resultsFlex);\n }\n\n Element modal = new Element(\"div\");\n modal.attributes().put(\"id\", \"modal\");\n contentArea.appendChild(modal);\n\n Element modalClose = new Element(\"div\");\n modalClose.text(\"X\");\n modalClose.attributes().put(\"id\", \"modalclose\");\n modal.appendChild(modalClose);\n\n Element modalImage = new Element(\"img\");\n modalImage.attributes().put(\"id\", \"modalimage\");\n modal.appendChild(modalImage);\n\n Element script = doc.select(\"script\").first();\n script.text(getJavascriptToString());\n\n FileUtils.writeStringToFile(new File(destination), doc.outerHtml(), StandardCharsets.UTF_8);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\thtmlReporter = new ExtentHtmlReporter(\"C:\\\\Users\\\\Suresh Mylam\\\\eclipse-workspace\\\\TestNG_Listners\\\\Reports\\\\TestReport.html\");\r\n\t\textent = new ExtentReports();\r\n\t\textent.attachReporter(htmlReporter);\r\n\t\ttest= extent.createTest(\"TEst123\");\r\n\t\ttest.pass(\"pass\");\r\n\t\ttest.fail(\"fail\");\r\n\t\ttest.info(\"info\");\r\n\t\textent.flush();\r\n\t\tSystem.out.println(\"Done\");\r\n\r\n\t}", "public void writeHTMLFile(String path) throws IOException {\n String index = slurp(getClass().getResourceAsStream(INDEX));\n String d3js = slurp(getClass().getResourceAsStream(D3JS));\n\n FileWriter fw = new FileWriter(path + HTML_EXT);\n ObjectWriter writer = new ObjectMapper().writer(); // .writerWithDefaultPrettyPrinter();\n fw.write(index.replace(TITLE_PLACEHOLDER, path)\n .replace(D3JS_PLACEHOLDER, d3js)\n .replace(DATA_PLACEHOLDER, writer.writeValueAsString(toJson())));\n fw.close();\n }", "@Test\n\tpublic void testUsingTempFolder2() throws IOException {\n\t\tFile createdFile1= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title<title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile1));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = null; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile1);\n\t\tassertEquals(res,result); \n\t}", "void saveHtmFile(String htmFileName, String path) throws IOException\r\n \t{\r\n \t\tString filePath = path + \"/\" + htmFileName + \".html\";\r\n \t\tFileWriter out = new FileWriter( filePath );\r\n \t\tout.write(getTemplateContent());\r\n \t\tout.close();\r\n \t}", "@BeforeClass\n\tpublic void setup() {\n\t\treport2 = new ExtentReports(\"./Reports/ElfuScripts.html\");\n\n\t}", "private void initReportWriter() {\n\t\tfinal XMLOutputFactory xmlof = XMLOutputFactory.newInstance();\r\n\r\n\t\t// Create an XML stream writer\r\n\t\tfinal File reportFile = new File(getOutputDirectory(), \"report.xml\");\r\n\t\ttry {\r\n\t\t\treportWriter = xmlof.createXMLStreamWriter(new FileWriter(reportFile));\r\n\r\n\t\t} catch (final XMLStreamException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (final IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void generateReport()\r\n {\r\n ProfilerGUI reportGUI = new ProfilerGUI(map,mapCountTracker);\r\n //reportGUI.\r\n }", "private static void createTestFile(String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Jenkins Test : \"+new Date() + \" ==> Writing : \" + Math.random());\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "private HtmlExporter createHtmlTemplate( final HtmlExporter aExporter )\n {\n aExporter.addCssStyle( \"body { font-family: sans-serif; } \" );\n aExporter.addCssStyle( \"table { border-width: 1px; border-spacing: 0px; border-color: gray;\"\n + \" border-collapse: collapse; border-style: solid; margin-bottom: 15px; } \" );\n aExporter.addCssStyle( \"table th { border-width: 1px; padding: 2px; border-style: solid; border-color: gray;\"\n + \" background-color: #E0E0FF; text-align: center; font-weight: bold; font-family: sans-serif; } \" );\n aExporter.addCssStyle( \"table td { border-width: 1px; padding: 2px; border-style: solid; border-color: gray;\"\n + \" font-family: monospace; } \" );\n aExporter.addCssStyle( \".date { text-align: right; font-size: x-small; margin-bottom: 15px; } \" );\n aExporter.addCssStyle( \".w100 { width: 100%; } \" );\n aExporter.addCssStyle( \".w30 { width: 30%; } \" );\n aExporter.addCssStyle( \".w20 { width: 20%; } \" );\n aExporter.addCssStyle( \".w15 { width: 15%; } \" );\n aExporter.addCssStyle( \".w10 { width: 10%; } \" );\n\n final Element body = aExporter.getBody();\n body.addChild( H1 ).addContent( \"Asm45 Analysis results\" );\n body.addChild( HR );\n body.addChild( DIV ).addAttribute( \"class\", \"date\" ).addContent( \"{date-now}\" );\n\n Element table, tr, thead, tbody;\n\n table = body.addChild( TABLE ).addAttribute( \"class\", \"w100\" );\n tbody = table.addChild( TBODY );\n tr = tbody.addChild( TR );\n tr.addChild( TH ).addAttribute( \"colspan\", \"2\" ).addContent( \"Bus configuration\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"IDA0/..IDA15/\" );\n tr.addChild( TD ).addContent( \"0..15\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BSC0/..BSC5/\" );\n tr.addChild( TD ).addContent( \"16..21\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"SMC/\" );\n tr.addChild( TD ).addContent( \"{smc-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"STM/\" );\n tr.addChild( TD ).addContent( \"{stm-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"EBG\" );\n tr.addChild( TD ).addContent( \"{ebg-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BYTE\" );\n tr.addChild( TD ).addContent( \"{byte-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BL\" );\n tr.addChild( TD ).addContent( \"{bl-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"WRT/\" );\n tr.addChild( TD ).addContent( \"{wrt-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"SYNC\" );\n tr.addChild( TD ).addContent( \"{sync-bus-config}\" );\n\n tbody = table.addChild( TBODY );\n tr = tbody.addChild( TR );\n tr.addChild( TH ).addAttribute( \"colspan\", \"2\" ).addContent( \"Statistics\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"Decoded words\" );\n tr.addChild( TD ).addContent( \"{decoded-words}\" );\n\n table = body.addChild( TABLE ).addAttribute( \"class\", \"w100\" );\n thead = table.addChild( THEAD );\n tr = thead.addChild( TR );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Index\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Clocks\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Block\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Address\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Value\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Bus Grant\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Type\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w30\" ).addContent( \"Event\" );\n tbody = table.addChild( TBODY );\n tbody.addContent( \"{decoded-data}\" );\n\n return aExporter;\n }", "String renderReport(T config);", "@AfterClass\n\tpublic static void generateReport() {\n\t\tCucumberReportingConfig.reportConfig();\n\t\n\t}", "public static ExtentReports getReportInstance() {\n\t\tif (report == null) {\n\n\t\t\tString reportName = \"HTMLreport_\" + getTimeStamp() + \".html\";\n\t\t\tExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\") +\n\t\t\t\t\t\"\\\\src\\\\test\\\\resources\\\\test_result\\\\\" + reportName);\n\t\t\n\t\t\treport = new ExtentReports();\n\t\t\treport.attachReporter(htmlReporter);\n\n\t\t\treport.setSystemInfo(\"OS\", \"Windows 10\");\n\t\t\treport.setSystemInfo(\"Environment\", \"UAT\");\n\t\t\treport.setSystemInfo(\"Browsers\", \"Chrome and Edge\");\n\n\t\t\thtmlReporter.config().setDocumentTitle(\"Identify New Bikes - HTML Report\");\n\t\t\thtmlReporter.config().setReportName(\"UI Test Report\");\n\t\t\thtmlReporter.config().setTimeStampFormat(\"MMM dd, yyyy HH:mm:ss\");\n\t\t}\n\n\t\treturn report;\n\t}", "@Test\n\tpublic void generateSummaryReport(){\n\t\tWebDriver driver = new FirefoxDriver();\n\t\t//Maximize chrome window\n\t\t//driver.manage().window().maximize();\n\t\t// Alternatively the same thing can be done like this\n // driver.get(\"http://www.google.com\");\n\t\tdriver.navigate().to(determineUrl());\n\t\t// Find the text input element by its name\n\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\tuser_name.sendKeys(user);\n\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\tpassword.sendKeys(password_login);\n\t\tpassword.submit();\n\t\t//Expand Venue drop-down\n\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t//driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n\t\t//Pass Venue under test\n\t\tselect_venue.sendKeys(venue);\n\t\t\n\t\tselect_venue.submit();\n\t\t//Generate Summary report\n\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\treport.click();\n\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\tselect_report.sendKeys(\"Summary Report\");\n\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\tselect_event.sendKeys(event);\n\t\tselect_event.submit();\n\t\tdriver.close();\n\t\t\n\t}", "public void generateReport(TaxChallan bean, HttpServletRequest request, HttpServletResponse response, String reportPath) {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tReportDataSet rds = new ReportDataSet();\r\n\t\t\tString type = bean.getReportType();\r\n\t\t\trds.setReportType(type);\r\n\t\t\tString fileName = \"T.D.S.-TCS TAX CHALLAN\"+Utility.getRandomNumber(1000);\r\n\t\t\tString reportPathName=reportPath+fileName+\".\"+type;\r\n\t\t\trds.setFileName(fileName);\r\n\t\t\trds.setPageSize(\"A4\");\r\n\t\t\trds.setReportHeaderRequired(false);\r\n\t\t\trds.setShowPageNo(true);\r\n\t\t\torg.paradyne.lib.ireportV2.ReportGenerator rg=null;\r\n\t\t\t/* Added by Prashant*/\r\n\t\t\tif(reportPath.equals(\"\")){\r\n\t\t\t\trg = new org.paradyne.lib.ireportV2.ReportGenerator(rds, session, context, request);\r\n\t\t\t}else{\r\n\t\t\t\tlogger.info(\"################# ATTACHMENT PATH #############\"+reportPath+fileName+\".\"+type);\r\n\t\t\t\trg = new org.paradyne.lib.ireportV2.ReportGenerator(rds, reportPath ,session, context, request);\r\n\t\t\t\trequest.setAttribute(\"reportPath\", reportPath+fileName+\".\"+type);\r\n\t\t\t\trequest.setAttribute(\"fileName\", fileName+\".\"+type);\r\n\t\t\t\trequest.setAttribute(\"action\", \"TaxChallan_input.action\");\r\n\t\t\t}\r\n\t\t\trg = getReport(rg, bean);\r\n\t\t\trg.process();\r\n\t\t\tif(reportPath.equals(\"\")){\r\n\t\t\t\trg.createReport(response);\r\n\t\t\t}else{\r\n\t\t\t\t/* Generates the report as attachment*/\r\n\t\t\t\trg.saveReport(response);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void fnWriteToHtmlOutput(String strDescription, String strExpectedValue, String strObtainedValue, String strResult) {\r\n \tString sStep;\r\n \tif (Dictionary.containsKey(\"STEP\")){\r\n \t\tsStep = Dictionary.get(\"STEP\") + \"<NS>\" + strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t\tDictionary.remove(\"STEP\");\r\n \t}else{\r\n \t\tsStep = strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t}\r\n \t\t\r\n \tDictionary.put(\"STEP\", sStep);\r\n \t\r\n //Declaring Variables\r\n String snapshotFilePath,sRowColor;\r\n\r\n //Open the test case report for writing\r\n //Open the HTML file\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n \r\n //Increment the Operation Count\r\n g_OperationCount = g_OperationCount + 1;\r\n \r\n //Row Color\r\n if (g_OperationCount % 2 == 0)\r\n {\r\n sRowColor = \"#EEEEEE\";\r\n }\r\n else\r\n {\r\n sRowColor = \"#D3D3D3\";\r\n \r\n }\r\n \r\n //Check if the result is Pass or Fail\r\n if (strResult.toUpperCase().equals(\"PASS\")){ \r\n //Increment the Pass Count\r\n g_iPassCount++;\r\n //Increment the snapshot count\r\n g_iSnapshotCount++;\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n \r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n //new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \"</B></FONT></TD></TR>\");\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n }\r\n else\r\n {\r\n if (strResult.toUpperCase().equals(\"FAIL\")){\r\n //Increment the SnapShot count\r\n g_iSnapshotCount++ ;\r\n\r\n //Increment the Fail Count\r\n g_iFailCount++;\r\n\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n\r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=RED><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n \r\n }else if (strResult.toUpperCase().equals(\"DONE\")){ \r\n \tstrResult = \"Pass\";\r\n //Write Results into the file\r\n \tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount +\"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\"+ strDescription +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\"+ strObtainedValue +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=LimeGreen><B>\"+ strResult +\"</B></FONT></TD></TR>\");\r\n }\r\n \r\n }\r\n try\r\n {\t\t\t\r\n \t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n }", "public GenerateReport() {\n initComponents();\n displayLogs();\n }", "public void testOutput(String path) {\n\t\ttestOutput(path, false);\n\t}", "@Test\n\tpublic void generateOrderTakerSummaryReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Order Taker Summary Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "@Test\n\tpublic void generateLineItemReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Line Item Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "boolean generateReport();", "public void detailTestPath() {\n // Get test run file\n File report_path = new File(System.getProperty(PATH) + TESTNG);\n // Check if the path exists\n if (!report_path.exists()) {\n System.out.println(SEE_THE_DETAIL_TEST__REPORT_ + System.getProperty(PATH) + LOGXML);\n // Get error log file\n File path = new File(System.getProperty(PATH) + ERROR_LOGLOGTXT);\n // If file exists then display error log file path\n if (path.exists()) {\n System.out.println(SEE_THE_DETAIL_ERROR__REPORT_ + System.getProperty(PATH) + ERROR_LOGLOGTXT);\n }\n }\n }", "private void startHtmlPage(PrintWriter out,ITestResult result)\r\n\t{\r\n\t\tout.println(\"<html>\");\r\n\t\tout.println(\"<head>\");\r\n\t\tout.println(\"<meta content=\\\"text/html; charset=UTF-8\\\" http-equiv=\\\"content-type\\\"/><meta content=\\\"cache-control\\\" http-equiv=\\\"no-cache\\\"/><meta content=\\\"pragma\\\" http-equiv=\\\"no-cache\\\"/>\");\r\n\t\tout.println(\"<style type=\\\"text/css\\\">\");\r\n\t\tout.println(\"body, table {\");\r\n\t\tout.println(\"font-family: Verdana, Arial, sans-serif;\");\r\n\t\tout.println(\"font-size: 12;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"table {\");\r\n\t\tout.println(\"border-collapse: collapse;\");\r\n\t\tout.println(\"border: 1px solid #ccc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"th, td {\");\r\n\t\tout.println(\"padding-left: 0.3em;\");\r\n\t\tout.println(\"padding-right: 0.3em;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"a {\");\r\n\t\tout.println(\"text-decoration: none;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".title {\");\r\n\t\tout.println(\"font-style: italic;\");\r\n\t\tout.println(\"background-color: #B2ACAC;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".selected {\");\r\n\t\tout.println(\"background-color: #ffffcc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".status_done {\");\r\n\t\tout.println(\"background-color: #eeffee;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_passed {\");\r\n\t out.println(\"background-color: #ccffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_failed {\");\r\n\t out.println(\"background-color: #ffcccc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_maybefailed {\");\r\n\t out.println(\"background-color: #ffffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".breakpoint {\");\r\n\t out.println(\"background-color: #cccccc;\");\r\n\t out.println(\"border: 1px solid black;\");\r\n\t out.println(\"}\");\r\n\t out.println(\"</style>\");\r\n\t out.println(\"<title>Test results</title>\");\r\n\t out.println(\"</head>\");\r\n\t out.println(\"<body>\");\r\n\t out.println(\"<h1>Test results </h1>\");\r\n\t out.println(\"<h2>Test Name: \"+className+\".\"+result.getName()+\"</h2>\");\r\n\t \r\n\t out.println(\"<table border=\\\"1\\\">\");\r\n\t out.println(\"<tbody>\");\r\n\t out.println(\"<tr>\");\r\n\t out.println(\"<td><b>Selenium-Command</b></td>\");\r\n\t out.println(\"<td><b>Parameter-1</b></td>\");\r\n\t\tout.println(\"<td><b>Parameter-2</b></td>\");\r\n\t\tout.println(\"<td><b>Status</b></td>\");\r\n\t\tout.println(\"<td><b>Screenshot</b></td>\");\r\n\t\tout.println(\"<td><b>Calling-Class with Linenumber</b></td>\");\r\n\t\tout.println(\"</tr>\");\r\n\t\t\r\n\t}", "public void fnCloseHtmlReport() {\r\n\r\n\t\t//Declaring variables\r\n\r\n\t\tString strTestCaseResult = null;\r\n\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Get the current time\r\n\t\tg_EndTime = new Date();\r\n\t\t\r\n\t\t//Fetch the time difference\r\n\t\tString strTimeDifference = fnTimeDiffference(g_StartTime.getTime(),g_EndTime.getTime());\r\n\t\t\r\n\t\t//Close the html file\r\n\t\ttry {\t\t\r\n\t //Write the number of test steps passed/failed and the time which the test case took to run\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR></TR><TR><TD BGCOLOR=BLACK WIDTH=5%></TD><TD BGCOLOR=BLACK WIDTH=28%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Time Taken : \"+ strTimeDifference + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Pass Count : \" + g_iPassCount + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Fail Count : \" + g_iFailCount + \"</b></FONT></TD><TD BGCOLOR=Black WIDTH=7%></TD></TR>\");\r\n\t //Close the HTML tags\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><TABLE WIDTH=100%><TR><TD ALIGN=RIGHT><FONT FACE=VERDANA COLOR=ORANGE SIZE=1>&copy; Tieto NetBank Automation - Integrated Customer Management</FONT></TD></TR></TABLE></BODY></HTML>\");\r\n\t\t\t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Check if test case passed or failed\r\n\r\n\t\tif (g_iFailCount != 0) {\r\n\t\t\tstrTestCaseResult = \"Fail\";\r\n\t\t} else \r\n\t\t{\r\n\t\t\tstrTestCaseResult = \"Pass\";\r\n\t\t}\r\n\t\t\r\n //fnCloseHtmlReport = strTestCaseResult\r\n \r\n //Write into the Summary Report\r\n fnWriteTestSummary (\"Report_\"+ Dictionary.get(\"TEST_NAME\") + \"-\" + Dictionary.get(\"ACTION\"),strTestCaseResult,strTimeDifference);\r\n\t\t\r\n\t}", "protected void writeReportFile(String sPathTemplate, QueryHandler handler)\n {\n char cDelim = getDelim();\n String sDesc = getDescTemplate();\n File fileOut = getFile(sPathTemplate);\n PrintStream streamOut = getPrintStream(fileOut);\n List listDisplay = m_listDisplay;\n\n // Write out report description and headers for new output files\n if (m_fHeaders && fileOut.length() == 0)\n {\n sDesc = replaceMacros(sDesc, null);\n if (sDesc.length() > 0)\n {\n writeDescription(streamOut, sDesc);\n }\n writeHeader(streamOut, listDisplay, cDelim);\n }\n\n boolean fDetail = false; // true if any column's value is row dependent\n for (Iterator iterCol = listDisplay.iterator(); iterCol.hasNext();)\n {\n ReportColumnView columnView = (ReportColumnView) iterCol.next();\n if (columnView != null)\n {\n fDetail |= columnView.isRowDetail() && columnView.isVisible();\n }\n }\n\n if (fDetail)\n {\n // write the details;\n for (Iterator iter = handler.getGroupKeys().iterator(); iter.hasNext(); )\n {\n writeDetail(streamOut, listDisplay, iter.next(), cDelim);\n }\n }\n else\n {\n // Write the aggregates and constants only\n Iterator iter = handler.getGroupKeys().iterator();\n\n // group-keys are row identifiers; any row will do for aggregates\n Object oFirstKey = iter.hasNext()\n ? iter.next()\n : null;\n\n writeDetail(streamOut, listDisplay, oFirstKey, cDelim);\n }\n streamOut.close();\n }", "public static void reportes(){\n try {\n /**Variable necesaria para abrir el archivo creado*/\n Desktop pc=Desktop.getDesktop();\n /**Variables para escribir el documento*/\n File f=new File(\"Reporte_salvajes.html\");\n FileWriter w=new FileWriter(f);\n BufferedWriter bw=new BufferedWriter(w);\n PrintWriter pw=new PrintWriter(bw);\n \n /**Se inicia el documento HTML*/\n pw.write(\"<!DOCTYPE html>\\n\");\n pw.write(\"<html>\\n\");\n pw.write(\"<head>\\n\");\n pw.write(\"<title>Reporte de los Pokemons Salvajes</title>\\n\");\n pw.write(\"<style type=\\\"text/css\\\">\\n\" +\n \"body{\\n\" +\n \"background-color:rgba(117, 235, 148, 1);\\n\" +\n \"text-align: center;\\n\" +\n \"font-family:sans-serif;\\n\" +\n \"}\\n\"\n + \"table{\\n\" +\n\"\t\t\tborder: black 2px solid;\\n\" +\n\"\t\t\tborder-collapse: collapse;\\n\" +\n\" }\\n\"\n + \"#td1{\\n\" +\n\" border: black 2px solid;\\n\"\n + \" background-color: skyblue;\\n\" +\n\" }\\n\" +\n\" #td2{\\n\" +\n\" border: black 2px solid;\\n\"\n + \" background-color: white;\\n\" +\n\" }\\n\"\n +\"</style>\");\n pw.write(\"<meta charset=\\\"utf-8\\\">\");\n pw.write(\"</head>\\n\");\n /**Inicio del cuerpo*/\n pw.write(\"<body>\\n\");\n /**Título del reporte*/\n pw.write(\"<h1>Reporte de los Pokemons Salvajes</h1>\\n\");\n /**Fecha en que se genero el reporte*/\n pw.write(\"<h3>Documento Creado el \"+fecha.get(Calendar.DAY_OF_MONTH)+\n \"/\"+((int)fecha.get(Calendar.MONTH)+1)+\"/\"+fecha.get(Calendar.YEAR)+\" a las \"\n +fecha.get(Calendar.HOUR)+\":\"+fecha.get(Calendar.MINUTE)+\":\"+fecha.get(Calendar.SECOND)+\"</h3>\\n\");\n \n pw.write(\"<table align=\\\"center\\\">\\n\");\n //Se escriben los títulos de las columnas\n pw.write(\"<tr>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[0]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[1]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[2]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[3]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[4]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[5]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[6]+\"</td>\\n\");\n pw.write(\"</tr>\\n\");\n for (int i = 0; i < pokemon.ingresados; i++) {\n //Se determina si el pokemon es salvaje\n if(pokemon.Capturado[i]==false){\n pw.write(\"<tr>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Id[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Tipo[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Nombre[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Vida[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.ptAt[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">Salvaje</td>\\n\");\n //Se determina si el pokemon esta vivo o muerto\n String estado;\n if (pokemon.Estado[i]==true) {\n estado=\"Vivo\";\n }else{estado=\"Muerto\";}\n pw.write(\"<td id=\\\"td2\\\">\"+estado+\"</td>\\n\");\n pw.write(\"</tr>\\n\");\n }\n }\n pw.write(\"</table><br>\\n\");\n \n pw.write(\"</body>\\n\");\n pw.write(\"</html>\\n\");\n /**Se finaliza el documento HTML*/\n \n /**Se cierra la capacidad de escribir en el documento*/ \n pw.close();\n /**Se cierra el documento en el programa*/\n bw.close();\n /**Se abre el documento recien creado y guardado*/\n pc.open(f);\n } catch (Exception e) {\n System.err.println(\"Asegurese de haber realizado las actividades previas \"\n + \"relacionadas\");\n }\n }", "@Test\n\tpublic void generateCashierSummaryReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Cashier Summary Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "@Test\n\tpublic void generateBatchReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t//Generate Batch report\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Batch Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\t\t\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public void foreachResultCreateHTML(ParameterHelper _aParam)\n {\n // TODO: auslagern in eine function, die ein Interface annimmt.\n String sInputPath = _aParam.getInputPath();\n File aInputPath = new File(sInputPath);\n// if (!aInputPath.exists())\n// {\n// GlobalLogWriter.println(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\");\n// assure(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\", false);\n// }\n\n // call for a single ini file\n if (sInputPath.toLowerCase().endsWith(\".ini\") )\n {\n callEntry(sInputPath, _aParam);\n }\n else\n {\n // check if there exists an ini file\n String sPath = FileHelper.getPath(sInputPath); \n String sBasename = FileHelper.getBasename(sInputPath);\n\n runThroughEveryReportInIndex(sPath, sBasename, _aParam);\n \n // Create a HTML page which shows locally to all files in .odb\n if (sInputPath.toLowerCase().endsWith(\".odb\"))\n {\n String sIndexFile = FileHelper.appendPath(sPath, \"index.ini\");\n File aIndexFile = new File(sIndexFile);\n if (aIndexFile.exists())\n { \n IniFile aIniFile = new IniFile(sIndexFile);\n\n if (aIniFile.hasSection(sBasename))\n {\n // special case for odb files\n int nFileCount = aIniFile.getIntValue(sBasename, \"reportcount\", 0);\n ArrayList<String> aList = new ArrayList<String>();\n for (int i=0;i<nFileCount;i++)\n {\n String sValue = aIniFile.getValue(sBasename, \"report\" + i);\n\n String sPSorPDFName = getPSorPDFNameFromIniFile(aIniFile, sValue);\n if (sPSorPDFName.length() > 0)\n {\n aList.add(sPSorPDFName);\n }\n }\n if (aList.size() > 0)\n {\n // HTML output for the odb file, shows only all other documents.\n HTMLResult aOutputter = new HTMLResult(sPath, sBasename + \".ps.html\" );\n aOutputter.header(\"content of DB file: \" + sBasename);\n aOutputter.indexSection(sBasename);\n \n for (int i=0;i<aList.size();i++)\n {\n String sPSFile = aList.get(i);\n\n // Read information out of the ini files\n String sIndexFile2 = FileHelper.appendPath(sPath, sPSFile + \".ini\");\n IniFile aIniFile2 = new IniFile(sIndexFile2);\n String sStatusRunThrough = aIniFile2.getValue(\"global\", \"state\");\n String sStatusMessage = \"\"; // aIniFile2.getValue(\"global\", \"info\");\n aIniFile2.close();\n\n\n String sHTMLFile = sPSFile + \".html\";\n aOutputter.indexLine(sHTMLFile, sPSFile, sStatusRunThrough, sStatusMessage);\n }\n aOutputter.close();\n\n// String sHTMLFile = FileHelper.appendPath(sPath, sBasename + \".ps.html\");\n// try\n// {\n//\n// FileOutputStream out2 = new FileOutputStream(sHTMLFile);\n// PrintStream out = new PrintStream(out2);\n//\n// out.println(\"<HTML>\");\n// out.println(\"<BODY>\");\n// for (int i=0;i<aList.size();i++)\n// {\n// // <A href=\"link\">blah</A>\n// String sPSFile = (String)aList.get(i);\n// out.print(\"<A href=\\\"\");\n// out.print(sPSFile + \".html\");\n// out.print(\"\\\">\");\n// out.print(sPSFile);\n// out.println(\"</A>\");\n// out.println(\"<BR>\");\n// }\n// out.println(\"</BODY></HTML>\");\n// out.close();\n// out2.close();\n// }\n// catch (java.io.IOException e)\n// {\n// \n// }\n }\n }\n aIniFile.close();\n }\n\n }\n }\n }", "@Test\n\tpublic void generateTotalsReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Totals Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "private void storeToHtmlFile( final File aSelectedFile, final Asm45DataSet aAnalysisResult )\n {\n try\n {\n toHtmlPage( aSelectedFile, aAnalysisResult );\n }\n catch ( final IOException exception )\n {\n // Make sure to handle IO-interrupted exceptions properly!\n if ( !HostUtils.handleInterruptedException( exception ) )\n {\n LOG.log( Level.WARNING, \"HTML export failed!\", exception );\n }\n }\n }", "@Test\n\tpublic void generateSpecialInstructionsReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Special Instructions Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "@Test\n\tpublic void generateTicketsReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Tickets Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "@Test\n\tpublic void generateGreen4LoyaltyReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t//Generate Batch report\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Green4 Loyalty Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public static void embedMessageAsHTMLInReport(Config testConfig ,String message) {\t\t\n\t\tString msg = \"<p style=\\\"color:red;\\\">\"+message.replace(\"\\n\", \"</br>\")+\"</span>\";\n\t\ttestConfig.testScenario.embed(msg.getBytes(), \"text/html\");\n\t\ttestConfig.testLog = testConfig.testLog.concat(msg);\n\t}", "@BeforeClass\r\n\tpublic void initiate()\r\n\t{\r\n\t\treporter = new ExtentHtmlReporter(\"./Reports/TestReport.html\");\r\n\t\textent = new ExtentReports();\r\n\t\textent.attachReporter(reporter);\r\n\t}", "public static void createResponseReportTxt(String fileName) {\r\n\t\t\ttry {\r\n\t\t\tConnector con = new Connector();\r\n\t\t\tcon.connect();\r\n\t\t\t\r\n\t\t\tResultSet resultSet = con.MakeQuery(\"SELECT \\\"studentEmail\\\" FROM \\\"\" + fileName+\"\\\"\");\r\n\t\t\t\r\n\t\t\twhile(resultSet.next()) {\r\n\t\t\t\tString email = resultSet.getString(1);\r\n\t\t\t\temail = email.substring(0, 6);\r\n\t\t\t\tString userHomePath = System.getProperty(\"user.home\");\r\n\t\t\t\tFile gradeReport = new File(userHomePath+\"\\\\Documents\\\\Reports\\\\Responses\\\\\"+fileName+ email+\".answers.txt\");\r\n\t\t\t\tif (gradeReport.createNewFile()){\r\n\t\t \t}else{\r\n\t\t \t}\r\n\t\t\t}\r\n\t \t\t \r\n\t\t\t//Change file to where ever Harris wants\r\n\t\t\t//userHomePath is the default user default account \r\n\t\t\t//Ex. C:\\Users\\as12660\r\n\t\t\r\n\t \t} catch (IOException e) {\r\n\t \t\te.printStackTrace();\r\n\t \t} catch (Exception ie) {\r\n\t \t\tie.printStackTrace();\r\n\t\t}\r\n\t}", "public void createXMLFileForGatePass(Report report) {\n\t\ttry{\n\t\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\trootElement.appendChild(studentList);\n\t\t\t\n\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\tstudentList.appendChild(roll);\n\t\t\t\n\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\n\t}", "@Override\r\npublic void onTestFailure(ITestResult arg0) {\n\tExtentReports er = new ExtentReports(\"./Report/Report.html\");\r\n\tExtentTest t1 = er.startTest(\"TC001\");\r\n\tt1.log(LogStatus.PASS, \"Passed\");\r\n\tSystem.out.println(\"vballe\");\r\n\ter.endTest(t1);\r\n\ter.flush();\r\n\ter.close();\r\n}", "private void createRequiredDirectory(String outdir, String className) throws IOException\r\n\t{\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\t\t\r\n\t\t//used to create directory\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report/Failure_Screenshot\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory + \"/custom-test-report\" + \"/\" + className);\r\n\t\tscreenshotDir.mkdir();\r\n\t}", "private static BufferedWriter createFileWriter(String filePath) {\n String[] pathComponents = filePath.split(\"/data/\");\n //to avoid heavy nesting in output, replace nested directory with filenames\n\n String output = pathComponents[0] + \"/out/rule_comparisons/\" + pathComponents[1].replace(\"/\",\"-\");\n\n File file = new File(output);\n try {\n //create file in this location if one does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n return new BufferedWriter(new FileWriter(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void makeReport() throws IOException{\n File report = new File(\"Report.txt\");\n BufferedWriter reportWriter = new BufferedWriter(new FileWriter(report));\n BufferedReader bookReader = new BufferedReader(new FileReader(\"E-Books.txt\"));\n String current;\n while((current = bookReader.readLine()) != null ){\n String[] tokens = current.split(\",\");\n reportWriter.write(tokens[0].trim()+\" for \"+tokens[1].trim()+\" with redemption Code \"+tokens[2].trim()+\n \" is assigned to \"+tokens[4].trim()+\" who is in \"+tokens[5].trim()+\" grade.\");\n reportWriter.write(System.lineSeparator());\n reportWriter.flush();\n }\n reportWriter.close();\n bookReader.close();\n new reportWindow();\n }", "public static void rep_WriteStack(String strTemplatePath, String strOutputPath) {\n try {\n String reportIn = new String(Files.readAllBytes(Paths.get(strTemplatePath)));\n for (int i = details_Stack.size() - 1; i >= 0; i--) {\n if (i == details_Stack.size() - 1) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"<tr><td>\" + details_Stack.get(i).getMethodNme() + \"</td><td>\" + details_Stack.get(i).getIntlineNm() + \"</td><td>\" + details_Stack.get(i).getFileNme() + \"</td><td>\" + details_Stack.get(i).getClassNme() + \"</td></tr>\" + resultPlaceholder);\n } else {\n //if statement to prevent duplication of test step numbers in the report\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"<tr><td>\" + details_Stack.get(i).getMethodNme() + \"</td><td>\" + details_Stack.get(i).getIntlineNm() + \"</td><td>\" + details_Stack.get(i).getFileNme() + \"</td><td>\" + details_Stack.get(i).getClassNme() + \"</td><td>\" + details_Stack.get(i).getPassedVars() + \"</td></tr>\" + resultPlaceholder);\n }\n }\n\n String currentDate = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\n\n\n String currentTime = CommonFunctionTest.com_CurrentTime();\n String reportPath = strOutputPath + \"\\\\Appium_stackTrace_\" + currentDate + \"_\" + currentTime + \".html\";\n\n Files.write(Paths.get(reportPath), reportIn.getBytes(), StandardOpenOption.CREATE);\n\n } catch (Exception e) {\n System.out.println(\"Error when writing report file:\\n\" + e.toString());\n }\n }", "public void generateReport(List<XmlSuite> xmlSuites, List<ISuite>suites, \r\n\t\tString outputDirectory){//creating a method that takes three arguments,\r\n\t//to generate a report, arguments list requirements, \r\n\t//using a mechanism called List, which gets the array input\r\n\t//script will go back to xml suites, and look for \"suites\" which are the classes we created\r\n\t//we will create an xml file to contain all the classes within our test cases\r\n\t//PASS, FAIL, or SKIP will be string outputs; String outputDirectory\r\n\t//XML Suite: big time testing based on testing type\r\n\t//ISuite: pages we are working on; classes created to perform action; under test folder\r\n\t\r\n\textent = new ExtentReports(outputDirectory + File.separator\r\n\t\t\t+ \"Extent.html\", true);\r\n\t//creating an object for extent report, creating a virtual object to save all output to save all results\r\n\t//as a string, file seperator is not needed, it doesn't matter how u received the result\r\n\t//seperate them and consolidate the results\r\n\t//telling you how to save the file name, html is easy to open on any device and lightweight\r\n\t//outputDirectory: SKIP, PASS, FAIL\r\n\t//the reason for boolean option: if yu receive results, generate report//if yu dont then dont generate\r\n\tfor(ISuite suite : suites){//for loop is created\r\n\t\t//map obtains a key value, not duplicate, and then maps it to one location, which is the\r\n\t\t//extent report\r\n\t\t//an interface in java, between key value and location (between status and extent report)\r\n\t\t//will make sure how to map and seperate results under each class\r\n\t\tMap<String, ISuiteResult>result = suite.getResults();\r\n\t\r\n\tfor(ISuiteResult r : result.values()){\r\n\t\tITestContext context =r.getTestContext();//for each of the classes, create log status\r\n\t\t//test context: script that we are running, results from it\r\n\t\t//: is a conditional operator, which lists the conditions, which lists out the conditions\r\n\t\t//script should be able to run \r\n\t\t//one suite, or multiple suites in one shot\r\n\t\t//making context\r\n\t\t\r\n\t\t\r\n\t\tbuildTestNo(context.getPassedTests(), LogStatus.PASS);\r\n\t\tbuildTestNo(context.getFailedTests(), LogStatus.FAIL);\r\n\t\t//retrieving status using results/context\r\n\t\tbuildTestNo(context.getSkippedTests(), LogStatus.SKIP);\r\n\t\t\t\r\n\t}\r\n}\r\nextent.flush();//take results and place on html file\r\nextent.close();\r\n\r\n}", "public void createXMLFileForExamResultNew(Report reportData) {\n\t\ttry{\n\t\t\tFile outDir = new File(reportData.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tfor(Student student : reportData.getStudentList()){\n\t\t\t\tString final_weitage=null;\n\t\t\t\tint total_weitage = 0;\t\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((reportData.getSchoolDetails().getSchoolDetailsName() != null ? reportData.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (reportData.getAcademicYear().getAcademicYearName()!= null ? reportData.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement report = doc.createElement(\"report\");\n\t\t\t\treport.appendChild(doc.createTextNode(\"MARKS STATEMENT\"));\n\t\t\t\tstudentList.appendChild(report);\n\t\t\t\n\t\t\t\tElement termdate = doc.createElement(\"termdate\");\n\t\t\t\ttermdate.appendChild(doc.createTextNode((reportData.getSchoolDetails().getExamName()!=null?reportData.getSchoolDetails().getExamName():\"--------\")));\n\t\t\t\tstudentList.appendChild(termdate);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t\tElement bloodgroup = doc.createElement(\"bloodgroup\");\n\t\t\t\tbloodgroup.appendChild(doc.createTextNode((student.getBloodGroup()!=null?student.getBloodGroup():\"NA\")));\n\t\t\t\tstudentList.appendChild(bloodgroup);\n\t\t\t\t\n\t\t\t\tif(student.getResource()!=null){\n\t\t\t\t\tElement fathername = doc.createElement(\"fathername\");\n\t\t\t\t\tfathername.appendChild(doc.createTextNode((student.getResource().getFatherFirstName()!=null?student.getResource().getFatherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(fathername);\n\t\t\t\t\t\n\t\t\t\t\tElement mothername = doc.createElement(\"mothername\");\n\t\t\t\t\tmothername.appendChild(doc.createTextNode((student.getResource().getMotherFirstName()!=null?student.getResource().getMotherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(mothername);\n\t\t\t\t\t\n\t\t\t\t\tElement dob = doc.createElement(\"dob\");\n\t\t\t\t\tdob.appendChild(doc.createTextNode((student.getResource().getDateOfBirth()!=null?student.getResource().getDateOfBirth():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(dob);\n\t\t\t\t\t}\n\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\tif(examObj.getExamName().equalsIgnoreCase(\"PerioDic Test\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"PTexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Note Book\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"NBexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Sub Enrichment\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"SEexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Half Yearly Exam\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"HYexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\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\n\t\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\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 String subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\t\tString subjectTotalChar = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"grade\");\n\t\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*for(Exam examObj:studentResult.getExamList() ){\n\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\tElement examMarks = doc.createElement(\"exammarks\"); //For Term 2\n\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\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\n\t\t\t\t\t\t\t\t/*String subjectTotalCharecter = \"\";\n\t\t\t\t\t\t\t\tElement totalTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\ttotalTerm2.appendChild(doc.createTextNode((subjectTotalCharecter!=null?subjectTotalCharecter:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(totalTerm2);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\tgradeTerm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeTerm2);*/\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term2\")){\n\t\t\t\t\tSystem.out.println(\"within term2\");\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(Subject subjectObj : studentResult.getSubjectList()){\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\tfor(Exam examObj:subjectObj.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\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\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalString!=null?subjectTotalString:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t System.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\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\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//String subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT1\") || reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT2\") ||reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT3\")){\n\t\t\t\tDouble allTotal = 0.00 ;\n\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\n\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement maxmarks = doc.createElement(\"maxmarks\");\n\t\t\t\t\t\tmaxmarks.appendChild(doc.createTextNode((examObj.getExamName()!=null?examObj.getExamName():\"\")));\n\t\t\t\t\t\tsubject.appendChild(maxmarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\") || examObj.getGrade().equalsIgnoreCase(\"NA\")){\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0.0;\n\t\t\t\t\t\t\t\tallTotal = allTotal + 0.0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\tallTotal = allTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\n\t\t\t\t\t/*Element total = doc.createElement(\"total\");\n\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectString!=null?subjectString:\"\")));\n\t\t\t\t\tsubject.appendChild(total);*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString allTotalString = String.format( \"%.2f\", allTotal ) ;\n\t\t\t\t\n\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\ttotal.appendChild(doc.createTextNode((allTotalString!=null?allTotalString:\"\")));\n\t\t\t\tstudentList.appendChild(total);\n\t\t\t}\n\t\t\t\t\t\tif(student.getCoScholasticResultList()!=null && student.getCoScholasticResultList().size()!=0){\n\t\t//\t\t\t\t\tSystem.out.println(\"##....... \"+student.getCoScholasticResultList().size());\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Element coscholasticmarks = doc.createElement(\"coscholasticmarks\");\n\t\t\t\t\t\t\t\t\t//studentList.appendChild(coscholasticmarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"physicalEducation\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticphysicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm2.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"discipline\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticdisciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"healtheducation\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*\tElement coscholastichealtheducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm2.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"workeducation\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticworkeducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm2.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm2);*/\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\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(reportData.getXmlFilePath()+reportData.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t\t}catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tlogger.error(e);\n\t\t\t}\n\t\t}", "boolean createReport(String lang, String reportId, String fileName, Object... params) throws Exception;", "@Test\n\tpublic void generateVenueInventorySummaryReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Venue Inventory Summary Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "private void reportToFile() {\n try {\n fileWriter = new FileWriter(\"GameStats.txt\");\n fileWriter.write(reportContent);\n fileWriter.close();\n }\n catch (IOException ioe) {\n System.err.println(\"IO Exception thrown while trying to write to file GameStats.txt\");\n }\n }", "@Override\n public void generateReport(final List<XmlSuite> xmlSuites,\n final List<ISuite> suites, final String outputDirectory) {\n try {\n for (ISuite suite : suites) {\n html = new HtmlCanvas();\n html.html().head();\n\n writeCss();\n html.title().content(\"Fedora API Test Suite Report\")._head()\n .body();\n html.h1().content(\"Fedora API Test Suite Summary\");\n\n html.h2().content(\"for \" + TestParameters.get().getImplementationName() + \" \" +\n TestParameters.get().getImplementationVersion());\n\n // Getting the results for the said suite\n final Map<String, ISuiteResult> suiteResults = suite.getResults();\n final ISuiteResult suiteResult = suiteResults.get(\"Fedora API Specification Tests\");\n\n if (suiteResult == null) {\n throw new RuntimeException(\"Unable to find expected test-suite: \" +\n \"'Fedora API Specification Tests', configured in the <suite> tag of 'testng.xml'!\");\n }\n\n final ITestContext tc = suiteResult.getTestContext();\n passedTests = tc.getPassedTests();\n failedTests = tc.getFailedTests();\n skippedTests = tc.getSkippedTests();\n\n // Display results summary\n displayResultsSummary();\n\n //Display methods summary\n makeMethodSummaryTable();\n\n // Add footer\n displayFooter();\n\n // send html to a file\n createWriter(html.toHtml());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectoryPath) {\n\t\t\n\t\t//------------------------ Pre-Checks ----------------------------------\n\t\t\n\t\t//------------------------ CONSTANTS -----------------------------------\n\t\t\n\t\t//------------------------ Variables -----------------------------------\n\t\t\n\t\t//------------------------ Code ----------------------------------------\n\t\toutputDirectoryPath = outputDirectoryOverride == null ? outputDirectoryPath : outputDirectoryOverride;\n\t\tFile outputDirectory = new File(outputDirectoryPath);\n\t\tif(!outputDirectory.exists() && !outputDirectory.mkdirs()) {\n\t\t\tthrow new RuntimeException(\"Could not create Output Directory: \" + outputDirectoryPath + \"!\");\n\t\t}\n\t\t\n\t\tfor(ISuite suite : suites) {\n\t\t\t\n\t\t\tMap<String, ISuiteResult> suiteResults = suite.getResults();\n\t\t\tfor(String testName : suiteResults.keySet()) {\n\t\t\t\t\n\t\t\t\tITestContext testContent = suiteResults.get(testName).getTestContext();\n\t\t\t\t\n\t\t\t\tlogResults(testContent);\n\t\t\t} // END LOOP - XML Test.\n\t\t} // END LOOP - XML Test Suite.\n\t\t\n\t\ttry {\n\t\t\tFileUtils.write(new File(outputDirectoryPath, reportFileName + \".txt\"), stringBuilder, StandardCharsets.UTF_8);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tthrow new RuntimeException(\"Could not write results to file!\\n\\n\" + stringBuilder);\n\t\t}\n\t}", "@Override\n void createReport(final Format reportFormat,\n final long start, final long end) {\n makeBriefReport(reportFormat, \"Informe breu\", start, end);\n writeToFile();\n getFormat().finishPrinting();\n }", "public void showReport() throws FileNotFoundException{\n String reportName = \"configuration_site\";\n String reportDefFileName=\"report/defination\"+File.separator+reportName+\".jasper\";\n \n try {\n \t\n \t//Get a stream to read the file\n // InputStream is = new FileInputStream(reportDefFileName);\n \n //Fill the report with parameter, connection and the stream reader \n JasperPrint jp = JasperFillManager.fillReport(reportDefFileName, null, conn);\n \n //Viewer for JasperReport\n JRViewer jv = new JRViewer(jp);\n \n //Insert viewer to a JFrame to make it showable\n JFrame jf = new JFrame();\n jf.getContentPane().add(jv);\n jf.validate();\n jf.setVisible(true);\n jf.setSize(new Dimension(800,600));\n jf.setLocation(300,100);\n jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n } catch (JRException ex) {\n ex.printStackTrace();\n }\n }", "public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }", "public static IReport createReport(File f) throws ArfException {\r\n \treturn new Report(Report.getAssetReportCollection(f));\r\n }", "public void generateReport(){\n String fileOutput = \"\";\n fileOutput += allCustomers()+\"\\n\";\n fileOutput += getNoAccounts()+\"\\n\";\n fileOutput += getTotalDeposits()+\"\\n\";\n fileOutput += accountsOfferingLoans()+\"\\n\";\n fileOutput += accountsReceivingLoans()+\"\\n\";\n fileOutput += customersOfferingLoans()+\"\\n\";\n fileOutput += customersReceivingLoans()+\"\\n\";\n System.out.println(fileOutput);\n writeToFile(fileOutput);\n }", "public void createPdf(String filePath) throws DocumentException, FileNotFoundException, BadElementException, IOException, SQLException {\r\n Calendar date = Calendar.getInstance();\r\n String dato;\r\n dato = \"\"+date.get(Calendar.YEAR)+\"-\"+MyUtil.p0(date.get(Calendar.MONTH)+1)+\"-\"+MyUtil.p0((date.get(Calendar.DAY_OF_MONTH)))+\"-\";\r\n \r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n fileName = dato + name + \".pdf\";\r\n \r\n Document document = new Document();\r\n PdfWriter.getInstance(document, new FileOutputStream(filePath+fileName));\r\n document.open();\r\n addContent(document);\r\n document.close();\r\n\r\n }", "@Test\r\n public void test()\r\n {\r\n Assert.assertEquals(\"<table>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<th></th>\\n\" +\r\n \"\\t<th>Sunny</th>\\n\" +\r\n \"\\t<th>Rainy</th>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week1</td>\\n\" +\r\n \"\\t<td>5</td>\\n\" +\r\n \"\\t<td>2</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week2</td>\\n\" +\r\n \"\\t<td>3</td>\\n\" +\r\n \"\\t<td>4</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"</table>\", new HtmlReportPrinter().print(report));\r\n }", "public String createHTML(String websiteName, String author){\n directory = path + websiteName + \"/index.html\";\n\n String html = \"<title>\" + websiteName + \"</title>\\n<meta>\" + author + \"</meta>\";\n\n File file = new File(directory);\n\n try{\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\n writer.write(html);\n writer.close();\n return directory;\n }catch(Exception e){\n return \"Directory is messed up\";\n }\n }", "@Test\r\n\tpublic void testExport() {\r\n\t\tSystem.out.println(\"testExport\");\r\n\t\tList<String[]> text = new ArrayList();\r\n\t\ttext.add(\"1;2;3\".split(\";\"));\r\n\t\ttext.add(\"4;5;6\".split(\";\"));\r\n\t\ttext.add(\"7;8;9\".split(\";\"));\r\n\t\tString expResult = \"<!DOCTYPE html><html> <head> <title> Export File HTML </title>\\n\"\r\n\t\t\t+ \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\"> <link rel=\\\"icon\\\" type=\\\"image/ico\\\" href=\\\"http://www.isep.ipp.pt/favicon.ico\\\"> </head> <body> <div> <img src=\\\"http://www.dei.isep.ipp.pt/images/topo_index.png\\\" alt=\\\"Logotipo ISEP\\\"> </div> <hr> <div> <TABLE> <TR> <TD align='center'>&nbsp;1&nbsp;</TD> <TD align='center'>&nbsp;2&nbsp;</TD> <TD align='center'>&nbsp;3&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;4&nbsp;</TD> <TD align='center'>&nbsp;5&nbsp;</TD> <TD align='center'>&nbsp;6&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;7&nbsp;</TD> <TD align='center'>&nbsp;8&nbsp;</TD> <TD align='center'>&nbsp;9&nbsp;</TD> </TR> </TABLE> <br> </div> <hr> </body></html>\";\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString result = instance.export(text);\r\n\t\tassertEquals(expResult, result);\r\n\r\n\t}", "@BeforeSuite\n public void setUp() {\n htmlReporter = new ExtentHtmlReporter(\"Reports.html\");\n // create ExtentReports and attach reporter(s)\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n }", "public static void makeHtmlFile(String s,PrintWriter pw,String first,String second,String third)\n \t{\n \t pw.println(\"<!DOCTYPE html><html lang=\\\"en\\\"><head><meta charset=\\\"UTF-8\\\"><title>\"+s+\"</title><link rel=\\\"stylesheet\\\" href=\\\"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css\\\"></head>\");\n \t pw.println(\"<body id=\\\"body\\\"><div class=main id=\\\"main\\\"> </div>\");\n \t pw.println(\"<div id=\\\"\"+ first+\"\\\" class=\"+\"\\\"#\"+first+\"\\\"><h3>\"+first+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+second+\"\\\" class=\\\"#\"+second+\"\\\"><h3>\"+second+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+third+\"\\\" class=\\\"#\"+third+\"\\\"><h3>\"+third+\"</h3></div>\");\n \t pw.println(\"<script src=\\\"Main.js\\\"></script>\");\n \t pw.println(\"</body></html>\");\n\t \t pw.close();\n\t }", "public String createCoverageReport() throws Exception{\n\t\tList<TestSuite> suites = getSuites();\t\n\t\treturn priorj.createCoverageReport(suites);\n\t}" ]
[ "0.72767955", "0.71278775", "0.70800376", "0.68805534", "0.6586752", "0.6577133", "0.65279883", "0.64211804", "0.6374791", "0.6253028", "0.62437934", "0.6234215", "0.6227239", "0.61922926", "0.61661816", "0.616595", "0.6134314", "0.60609686", "0.6042792", "0.60250694", "0.600906", "0.597906", "0.5977547", "0.5973918", "0.5968419", "0.59637594", "0.5934744", "0.591116", "0.5888573", "0.5881145", "0.5867536", "0.581722", "0.58006364", "0.57926744", "0.5775637", "0.576854", "0.5761638", "0.5747277", "0.57299894", "0.57267934", "0.57156587", "0.56980354", "0.5696698", "0.56818616", "0.5677968", "0.5676909", "0.56745183", "0.5659606", "0.5634291", "0.5626655", "0.5625373", "0.5621588", "0.5599468", "0.55774", "0.55741477", "0.5542323", "0.5525536", "0.5499756", "0.5486475", "0.5478641", "0.5471055", "0.5466244", "0.5448627", "0.543615", "0.5430084", "0.5426853", "0.5416792", "0.5412748", "0.54119587", "0.5405404", "0.5404337", "0.5397498", "0.5396199", "0.539502", "0.53727305", "0.5364007", "0.5362042", "0.5360323", "0.53593284", "0.53431904", "0.5336978", "0.5335447", "0.5333012", "0.5301854", "0.52846104", "0.52727515", "0.526951", "0.5261949", "0.52608854", "0.52567375", "0.5251719", "0.5244722", "0.5233443", "0.52310556", "0.52181756", "0.5215408", "0.52103096", "0.5201513", "0.5199201", "0.51943624", "0.51912755" ]
0.0
-1
Used to create the HTML
private void createHTML(BufferedWriter writer) throws IOException { String startHead = "<html><head>" // I have used roberto font,Please // link the appropriate font + "<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>" + "<link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet'>" + cssFileForHtml() + "</head><script src='https://d3js.org/d3.v4.min.js'></script><body style=' background-color: #F5F5F5'>"; writer.write(startHead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HTML createHTML();", "@Override\n\tpublic String generateHTML() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString level = \"\\t\";\n\t\tstringBuilder.append(level.repeat(levelCount)+\"<div>\\n\");\n\t\tlevelCount++;\n\t\tfor (HTMLGenerator htmlGenerator : tags) {\n\t\t\tstringBuilder.append(level.repeat(levelCount)+htmlGenerator.generateHTML());\n\t\t}\n\t\tstringBuilder.append(\"</div>\\n\");\n\t\treturn stringBuilder.toString();\n\t}", "public String create()\n {\n return createHtml();\n }", "public String getHTMLPage() {\r\n String s = \"<html><body>\" + MySystem.lineBreak;\r\n s += \"<h1>Room Control module</h1>\" + MySystem.lineBreak;\r\n s += \"<p>This module controls any on/off-node connected to ARNE bus.</p>\" + MySystem.lineBreak;\r\n s += \"<h2>Controls:</h2>\";\r\n s += \"<center><p><table border=\\\"1\\\" cellpadding=\\\"3\\\" cellspacing=\\\"0\\\">\";\r\n Iterator it = roomObjects.keySet().iterator();\r\n while (it.hasNext()) {\r\n GenRoomObject o = (GenRoomObject)roomObjects.get(it.next());\r\n if (o!=null) {\r\n if (o.displHTML) { //if display this object (configured in modGenRoomControl.xml)\r\n s += \"<tr><td>\" + o.name + \"</td><td>[<a href=\\\"toggle:\" + o.name + \"\\\">toggle</a>]</td><td>[<a href=\\\"on:\" + o.name + \"\\\">ON</a>]</td><td>[<a href=\\\"off:\" + o.name + \"\\\">OFF</a>]</td></tr></tr>\";\r\n }\r\n }\r\n }\r\n s += \"</table></center>\";\r\n s += \"</body></html>\";\r\n return s;\r\n }", "private void generateOutputHTML() {\n\n\t\t\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"data/web/template.html\"));\n\t\t\tPrintStream out = new PrintStream(\"data/web/output\"+count+\".html\");\n\t\t\tSystem.setOut(out);\n\t\t\t\n\t\t\twhile (in.hasNext()) {\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tSystem.out.print(line);\n\t\t\t\t\n\t\t\t\tif (line.equals(\"<title>\")) System.out.println(\"Path #\" +count);\n\t\t\t\t\n\t\t\t\n\t\t\t\tif (line.equals(\"<body>\")) { \t\t\t\t// this is where all the good stuff goes..\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<div class='bodyHeader'>\");\n\t\t\t\t\tSystem.out.println(\"<p><strong>in order path for driver #\" +count+ \" \" + \"</strong></p>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<br><br><hr class='hrStyle'/>\");\n\t\t\t\t\t\n\t\t\t\t\t// Creating info about the path in a table format\n\t\t\t\t\tSystem.out.println(\"<div class='pathInfo'>\");\n\t\t\t\t\tSystem.out.println(\"<table class='infoTable' cellpadding='3' cellspacing='10'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>City: </td><td> \" + list.get(0).getCity()+ \" - \" + list.get(0).getState() + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Number of stops: </td><td> \" + (list.size()-1) + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Store: </td><td> \" + list.get(1).getName().toUpperCase()+ \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"</table>\");\n\t\t\t\t\t\n//TODO: get starting address --- System.out.println(\"Starting address: \" + list.get(0).getAddress());\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t\t\n\t\t\t\t\t//create ordered table/list of path\n\t\t\t\t\tSystem.out.println(\"<div class='pathList'>\");\t\n\t\t\t\t\tSystem.out.println(\"<table class='pathTable' cellspacing='15'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><th>Order</th><th>Address</th><th></th><th>Latitude , Longitude</th></tr>\");\n\t\t\t\t\tint i = 1;\n\t\t\t\t\tfor (Location c: list) {\n\t\t\t\t\t// creating table row for each stop in route\n\t\t\t\t\t\tSystem.out.println(\"<tr>\" + \"<td>\"+(i++)+\"</td>\" + c.toHTMLString() +\"</tr>\");\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</ol>\");\n\t\t\t\t\tSystem.out.println(\"<br>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t\t//opening html file to the default browser in the system\n\t\t\tFile htmlFile = new File(\"data/web/output\"+count+\".html\");\n\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(e.getLocalizedMessage());\n\t\t} \n\t}", "private void createDOMTree(){\n\t\t\tElement rootEle = dom.createElement(\"html\");\r\n\t\t\tdom.appendChild(rootEle);\r\n\t\t\t\r\n\t\t\t//\t\t\tcreates <head> and <title> tag\r\n\t\t\tElement headEle = dom.createElement(\"head\");\r\n\t\t\tElement titleEle = dom.createElement(\"title\");\r\n\t\t\t\r\n\t\t\t//\t\t\tset value to <title> tag\r\n\t\t\tText kuerzelText = dom.createTextNode(\"Auswertung\");\r\n\t\t\ttitleEle.appendChild(kuerzelText);\r\n\t\t\theadEle.appendChild(titleEle);\r\n\t\t\t\r\n\t\t\tElement linkEle = dom.createElement(\"link\");\r\n\t\t\tlinkEle.setAttribute(\"rel\", \"stylesheet\");\r\n\t\t\tlinkEle.setAttribute(\"type\", \"text/css\");\r\n\t\t\tlinkEle.setAttribute(\"href\", \"./format.css\");\r\n\t\t\theadEle.appendChild(linkEle);\r\n\t\t\t\r\n\t\t\trootEle.appendChild(headEle);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tElement bodyEle = dom.createElement(\"body\");\r\n\t\t\tElement divEle = dom.createElement(\"div\");\r\n\t\t\tdivEle.setAttribute(\"id\", \"cont\");\r\n\t\t\t\r\n\t\t\tVector<String> tmp = myData.get(0);\r\n\t\t\tElement h2Ele = dom.createElement(\"h2\");\r\n\t\t\tString h1Str = \"\";\r\n\t\t\tfor(Iterator i = tmp.iterator(); i.hasNext(); )\r\n\t\t\t{\r\n\t\t\t\th1Str = h1Str + (String)i.next() + \" \";\r\n\t\t\t}\r\n\t\t\tText aText = dom.createTextNode(h1Str);\r\n\t\t\th2Ele.appendChild(aText);\r\n\t\t\tdivEle.appendChild(h2Ele);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tElement tableEle = dom.createElement(\"table\");\r\n//\t\t\ttableEle.setAttribute(\"border\", \"1\");\r\n\t\t\t\r\n\t\t\ttmp = myData.get(0);\r\n\t\t\tElement trHeadEle = createTrHeadElement(tmp);\r\n\t\t\ttableEle.appendChild(trHeadEle);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tIterator it = myData.iterator();\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\ttmp = (Vector<String>)it.next();\r\n\t\t\t\tElement trEle = createTrElement(tmp);\r\n\t\t\t\ttableEle.appendChild(trEle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdivEle.appendChild(tableEle);\r\n\t\t\tbodyEle.appendChild(divEle);\r\n\t\t\trootEle.appendChild(bodyEle);\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void createHtml(ModelItemList list) {\n\t\t\n\t}", "String renderHTML();", "private HTMLElement generateHTMLElement() {\n \t\t// this is the outermost element, so it has no indent\n \t\tint indentLevel = 0;\n \t\tHTMLElement html = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_HTML, indentLevel, true);\n \t\tHTMLElement head = generateHeadElement(indentLevel + 1);\n \t\tHTMLElement body = generateBodyElement(indentLevel + 1);\n \t\thtml.addContent(head);\n \t\thtml.addContent(body);\n \t\treturn html;\n \t}", "private String generateHtmlLayout(String title, List<HtmlData> data) {\n return html(\n head(\n title(title),\n link().withRel(\"stylesheet\").withHref(\"asciidoctor.css\")\n ),\n body(\n generateHeader(title),\n generateBody(data)\n )\n ).withStyle(\"padding: 10px 30px\").renderFormatted();\n }", "String getHtml() {\n Map<String, Object> context = new HashMap<>();\n context.put(\"tileRows\", mTileRows);\n context.put(\"rows\", mRows);\n context.put(\"columns\", Lists.newArrayList(mColumnsByStartMillis.values()));\n context.put(\"numColumnsPerDay\", getSegmentStartTimes().length);\n context.put(\"nowColumnStart\", mNowColumn.start);\n context.put(\"nowDate\", mNow.toLocalDate());\n context.put(\"orders\", mOrders);\n context.put(\"dataCellsByConceptId\", getJsonDataDump());\n return renderTemplate(\"assets/chart.html\", context);\n }", "public String createHtml()\n {\n StringBuffer strEditor = new StringBuffer();\n\n strEditor.append(\"<div>\");\n String encodedValue = escapeXml(value.replaceAll(\"((\\r?\\n)+|\\t*)\", \"\"));\n\n if (check(request.getHeader(\"user-agent\")))\n {\n strEditor.append(createInputForVariable(instanceName, instanceName, encodedValue));\n // create config html\n String configStr = config.getUrlParams();\n if (configStr != null && configStr.length() > 0)\n {\n configStr = configStr.substring(1);\n strEditor.append(createInputForVariable(null, instanceName.concat(\"___Config\"), configStr));\n }\n\n // create IFrame\n String sLink = basePath.concat(\"/editor/fckeditor.html?InstanceName=\").concat(instanceName);\n if (toolbarSet != null && toolbarSet.length() > 0)\n {\n sLink += \"&Toolbar=\".concat(toolbarSet);\n }\n XHtmlTagTool iframeTag = new XHtmlTagTool(\"iframe\", XHtmlTagTool.SPACE);\n iframeTag.addAttribute(\"id\", instanceName.concat(\"___Frame\"));\n iframeTag.addAttribute(\"src\", sLink);\n iframeTag.addAttribute(\"width\", width);\n iframeTag.addAttribute(\"height\", height);\n iframeTag.addAttribute(\"frameborder\", \"no\");\n iframeTag.addAttribute(\"scrolling\", \"no\");\n strEditor.append(iframeTag);\n\n }\n else\n {\n XHtmlTagTool textareaTag = new XHtmlTagTool(\"textarea\", encodedValue);\n textareaTag.addAttribute(\"name\", instanceName);\n textareaTag.addAttribute(\"rows\", \"4\");\n textareaTag.addAttribute(\"cols\", \"40\");\n textareaTag.addAttribute(\"wrap\", \"virtual\");\n textareaTag.addAttribute(\"style\", \"width: \".concat(width).concat(\"; height: \").concat(height));\n }\n strEditor.append(\"</div>\");\n return strEditor.toString();\n }", "private void startHtmlPage(PrintWriter out,ITestResult result)\r\n\t{\r\n\t\tout.println(\"<html>\");\r\n\t\tout.println(\"<head>\");\r\n\t\tout.println(\"<meta content=\\\"text/html; charset=UTF-8\\\" http-equiv=\\\"content-type\\\"/><meta content=\\\"cache-control\\\" http-equiv=\\\"no-cache\\\"/><meta content=\\\"pragma\\\" http-equiv=\\\"no-cache\\\"/>\");\r\n\t\tout.println(\"<style type=\\\"text/css\\\">\");\r\n\t\tout.println(\"body, table {\");\r\n\t\tout.println(\"font-family: Verdana, Arial, sans-serif;\");\r\n\t\tout.println(\"font-size: 12;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"table {\");\r\n\t\tout.println(\"border-collapse: collapse;\");\r\n\t\tout.println(\"border: 1px solid #ccc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"th, td {\");\r\n\t\tout.println(\"padding-left: 0.3em;\");\r\n\t\tout.println(\"padding-right: 0.3em;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"a {\");\r\n\t\tout.println(\"text-decoration: none;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".title {\");\r\n\t\tout.println(\"font-style: italic;\");\r\n\t\tout.println(\"background-color: #B2ACAC;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".selected {\");\r\n\t\tout.println(\"background-color: #ffffcc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".status_done {\");\r\n\t\tout.println(\"background-color: #eeffee;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_passed {\");\r\n\t out.println(\"background-color: #ccffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_failed {\");\r\n\t out.println(\"background-color: #ffcccc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_maybefailed {\");\r\n\t out.println(\"background-color: #ffffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".breakpoint {\");\r\n\t out.println(\"background-color: #cccccc;\");\r\n\t out.println(\"border: 1px solid black;\");\r\n\t out.println(\"}\");\r\n\t out.println(\"</style>\");\r\n\t out.println(\"<title>Test results</title>\");\r\n\t out.println(\"</head>\");\r\n\t out.println(\"<body>\");\r\n\t out.println(\"<h1>Test results </h1>\");\r\n\t out.println(\"<h2>Test Name: \"+className+\".\"+result.getName()+\"</h2>\");\r\n\t \r\n\t out.println(\"<table border=\\\"1\\\">\");\r\n\t out.println(\"<tbody>\");\r\n\t out.println(\"<tr>\");\r\n\t out.println(\"<td><b>Selenium-Command</b></td>\");\r\n\t out.println(\"<td><b>Parameter-1</b></td>\");\r\n\t\tout.println(\"<td><b>Parameter-2</b></td>\");\r\n\t\tout.println(\"<td><b>Status</b></td>\");\r\n\t\tout.println(\"<td><b>Screenshot</b></td>\");\r\n\t\tout.println(\"<td><b>Calling-Class with Linenumber</b></td>\");\r\n\t\tout.println(\"</tr>\");\r\n\t\t\r\n\t}", "public String getHtml() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor(StringContainer sc : container) {\n\t\t\tsb.append(sc.getString());\n\t\t}\n\t\treturn \"<html><body>\"+sb.toString()+\"</body></html>\";\n\t}", "protected void createContents() {\n\n\t}", "public String toString(){\n String html = \"<html>\\n<head>\\n</head>\\n<body>\";\n for (int i=0; i< dom.size(); i++){\n html+= dom.get(i);\n }\n /* TODO\nLoop through the elemments of the dom and append them to html */\n return html+\"</body>\\n</html>\";\n }", "@Override\n\tpublic Html makeHtml(Map<String, String> attributes, Head headObj, Body bodyObj) {\n\t\treturn new Html( attributes, headObj, bodyObj );\n\t}", "public ContainerTag generateBody(List<HtmlData> data) {\n return div();\n }", "protected void BuildHtmlHeader(PrintWriter out, String title) throws IOException\n {\n out.println(\"<HTML>\");\n out.println(\"<head>\");\n out.println(\"<link rel=\\\"stylesheet\\\" href=\\\"/css/nny.css\\\" type=\\\"text/css\\\">\");\n out.println(\"<TITLE>\");\n out.println(title);\n out.println(\"</TITLE>\");\n out.println(\"<SCRIPT LANGUAGE=\\\"JavaScript\\\" SRC=\\\"/javascript/data_validation.js\\\"></SCRIPT>\");\n out.println(\"</head>\");\n /*\n if (navbarTemplate != null)\n {\n if (header_tp == null)\n {\n header_tp = new TemplateProcessor(template_path_ + navbarTemplate);\n }\n out.println(header_tp.process().toString());\n }*/\n out.flush();\n }", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "@GET\r\n @Produces(\"text/html\")\r\n public String getHtml() {\r\n return \"<html><body>the solution is :</body></html> \";\r\n }", "public String makeHTML(String DataLine) {\n\t\tDataLine = \"<HTML><BODY>\" + \"<b>\" + DataLine + \"</b>\" + \"</BODY></HTML>\";\n\n\n\t\treturn DataLine;\n\t}", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "public static void main(String[] args) {\n\t\tint i = 0;\r\n\t\tif( i == 0) {\r\n\t\t\tSystem.out.println(\"HTML_Template\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Italic String\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Underline, select, UL & OL\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Button\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Button value Special Characters\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Blank\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Textbox, Special Chars\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Radio & Checkbox\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Blank Commit Msg \");\r\n\t\t\tSystem.out.println(\"HTML_Template : Image Check New\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Kovair To Jira\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Kovair To Jira at 11.07AM\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Kovair To Jira at 11.07AM SyncBack\");\r\n\t\t\tSystem.out.println(\"HTML_Template : TP-134\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Any Random Key\");\r\n\t\t\tSystem.out.println(\"HTML_Template : Test Flowqqq\");\r\n\t\t}\r\n\t}", "public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }", "private void createTitleContent(BufferedWriter writer) throws IOException {\r\n\t\tString title = data.getSuiteName();\r\n\t\tString titleTag = \"<div style='height: 50px; width: inherit; box-shadow: 1px 1px 1px #888888;background-color: #616161;'>\";\r\n\t\tString label = \"<label style='font-weight: bold;position: absolute;padding-left: 16px;color: white;padding-top: 8px;\"\r\n\t\t\t\t+ \"font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ title\r\n\t\t\t\t+ \"</label></div>\";\r\n\t\twriter.write(titleTag);\r\n\t\twriter.write(label);\r\n\t}", "public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }", "public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }", "private String buildHTMLForType(final int typeRequest)\n {\n \n final StringBuilder b = new StringBuilder(32);\n int startSize = 0;\n \n if (typeRequest == OTHER) {\n b.append(\"&nbsp;<b><font color=gray>Merge sources:</font></b>\");\n startSize = b.length();\n buildHTMLForMergeSources(b);\n } else {\n buildHTMLFilteredAndOrganized(b, typeRequest);\n // attempting to force a tiny last-line height to push rollover bottom edge down by a few pixels:\n // b.append(\"<font size=-14 color=gray>---\"); // can't get small enough: font size has floor on it\n }\n if (DEBUG.Enabled) {\n Log.debug(\"got HTMLforType \" + typeRequest + \" [\" + b + \"]\");\n if (b.length() == startSize) {\n Log.debug(\"no html added, building debug html...\");\n b.append(buildDebugHTML(typeRequest));\n }\n }\n \n return b.toString();\n }", "public static void makeHtmlFile(String s,PrintWriter pw,String first,String second,String third)\n \t{\n \t pw.println(\"<!DOCTYPE html><html lang=\\\"en\\\"><head><meta charset=\\\"UTF-8\\\"><title>\"+s+\"</title><link rel=\\\"stylesheet\\\" href=\\\"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css\\\"></head>\");\n \t pw.println(\"<body id=\\\"body\\\"><div class=main id=\\\"main\\\"> </div>\");\n \t pw.println(\"<div id=\\\"\"+ first+\"\\\" class=\"+\"\\\"#\"+first+\"\\\"><h3>\"+first+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+second+\"\\\" class=\\\"#\"+second+\"\\\"><h3>\"+second+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+third+\"\\\" class=\\\"#\"+third+\"\\\"><h3>\"+third+\"</h3></div>\");\n \t pw.println(\"<script src=\\\"Main.js\\\"></script>\");\n \t pw.println(\"</body></html>\");\n\t \t pw.close();\n\t }", "private HtmlExporter createHtmlTemplate( final HtmlExporter aExporter )\n {\n aExporter.addCssStyle( \"body { font-family: sans-serif; } \" );\n aExporter.addCssStyle( \"table { border-width: 1px; border-spacing: 0px; border-color: gray;\"\n + \" border-collapse: collapse; border-style: solid; margin-bottom: 15px; } \" );\n aExporter.addCssStyle( \"table th { border-width: 1px; padding: 2px; border-style: solid; border-color: gray;\"\n + \" background-color: #E0E0FF; text-align: center; font-weight: bold; font-family: sans-serif; } \" );\n aExporter.addCssStyle( \"table td { border-width: 1px; padding: 2px; border-style: solid; border-color: gray;\"\n + \" font-family: monospace; } \" );\n aExporter.addCssStyle( \".date { text-align: right; font-size: x-small; margin-bottom: 15px; } \" );\n aExporter.addCssStyle( \".w100 { width: 100%; } \" );\n aExporter.addCssStyle( \".w30 { width: 30%; } \" );\n aExporter.addCssStyle( \".w20 { width: 20%; } \" );\n aExporter.addCssStyle( \".w15 { width: 15%; } \" );\n aExporter.addCssStyle( \".w10 { width: 10%; } \" );\n\n final Element body = aExporter.getBody();\n body.addChild( H1 ).addContent( \"Asm45 Analysis results\" );\n body.addChild( HR );\n body.addChild( DIV ).addAttribute( \"class\", \"date\" ).addContent( \"{date-now}\" );\n\n Element table, tr, thead, tbody;\n\n table = body.addChild( TABLE ).addAttribute( \"class\", \"w100\" );\n tbody = table.addChild( TBODY );\n tr = tbody.addChild( TR );\n tr.addChild( TH ).addAttribute( \"colspan\", \"2\" ).addContent( \"Bus configuration\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"IDA0/..IDA15/\" );\n tr.addChild( TD ).addContent( \"0..15\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BSC0/..BSC5/\" );\n tr.addChild( TD ).addContent( \"16..21\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"SMC/\" );\n tr.addChild( TD ).addContent( \"{smc-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"STM/\" );\n tr.addChild( TD ).addContent( \"{stm-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"EBG\" );\n tr.addChild( TD ).addContent( \"{ebg-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BYTE\" );\n tr.addChild( TD ).addContent( \"{byte-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BL\" );\n tr.addChild( TD ).addContent( \"{bl-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"WRT/\" );\n tr.addChild( TD ).addContent( \"{wrt-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"SYNC\" );\n tr.addChild( TD ).addContent( \"{sync-bus-config}\" );\n\n tbody = table.addChild( TBODY );\n tr = tbody.addChild( TR );\n tr.addChild( TH ).addAttribute( \"colspan\", \"2\" ).addContent( \"Statistics\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"Decoded words\" );\n tr.addChild( TD ).addContent( \"{decoded-words}\" );\n\n table = body.addChild( TABLE ).addAttribute( \"class\", \"w100\" );\n thead = table.addChild( THEAD );\n tr = thead.addChild( TR );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Index\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Clocks\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Block\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Address\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Value\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Bus Grant\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Type\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w30\" ).addContent( \"Event\" );\n tbody = table.addChild( TBODY );\n tbody.addContent( \"{decoded-data}\" );\n\n return aExporter;\n }", "protected abstract void renderControlOn(KmHtmlBuilder out);", "private StringBuilder createHtml(Match match)\r\n {\r\n\r\n MatchEquipe bleu = match.getBleu();\r\n MatchEquipe gris = match.getGris();\r\n MatchEquipe noir = match.getNoir();\r\n\r\n StringBuilder html = new StringBuilder();\r\n\r\n html.append(\"<input id=\\\"buttonMatch\" + match.getIdMatch() + \"\\\" src=\\\" \" + PLUS_SRC\r\n + \"\\\" type=\\\"image\\\" onclick=\\\"toggleVisibility('Match\" + match.getIdMatch() + \"');\\\">\" + RN);\r\n\r\n html.append(\"<div id=\\\"Match\" + match.getIdMatch() + \"Plus\\\" style=\\\"visibility: visible; display: block;\\\">\"\r\n + RN);\r\n html.append(\"D�tail du match<br><br>\" + RN);\r\n html.append(\"<table class=\\\"tableau_match\\\" cellspacing=\\\"0\\\">\" + RN);\r\n html.append(\"<tbody><tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Match #\" + match.getIdMatch() + \"</td>\" + RN);\r\n\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"bleu\\\">\" + bleu.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"gris\\\">\" + gris.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"noir\\\">\" + noir.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riodes gagn�es</td>\" + RN);\r\n\r\n if(!bleu.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + bleu.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n\r\n if(!gris.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + gris.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n\r\n if(!noir.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + noir.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"</tbody></table>\" + RN);\r\n html.append(\"</div>\" + RN);\r\n\r\n html.append(\"<div id=\\\"Match\" + match.getIdMatch() + \"Moins\\\" style=\\\"display: none;\\\">\" + RN);\r\n\r\n html.append(\"Réduire le détail du match\" + RN);\r\n html.append(\"<br><br>\" + RN);\r\n\r\n html.append(\"<table class=\\\"tableau_match\\\" cellspacing=\\\"0\\\">\" + RN);\r\n html.append(\"<tbody><tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\"> Match #\" + idMatch.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"bleu\\\">\" + equipeBleu.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"gris\\\">\" + equipeGris.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"noir\\\">\" + equipeNoir.getText() + \"</td>\" + RN);\r\n html.append(\"</tr> \" + RN);\r\n html.append(\"<tr> \" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riode</td>\" + RN);\r\n\r\n if(forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(forfaitGris.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Pointage</td>\" + RN);\r\n\r\n // p�riodes Bleu\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>\" + P1B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7B.getText() + \"</td>\" + RN);\r\n }\r\n\r\n // P�riode Gris\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>\" + P1G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7G.getText() + \"</td>\" + RN);\r\n }\r\n\r\n // P�riode noir\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>\" + P1N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Prolongation 1</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7B.getText() + \"</td>\" + RN);\r\n }\r\n\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7G.getText() + \"</td>\" + RN);\r\n }\r\n\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riodes gagn�es</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Prolongation 2�me position</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22B.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22G.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Esprit sportif</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Points championnats</td>\" + RN);\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\" </tr>\" + RN);\r\n html.append(\"</tbody>\" + RN);\r\n html.append(\"</table>\" + RN);\r\n\r\n html.append(\"<strong>Arbitres</strong> : \" + arbitreChef.getText() + \" & \" + arbitreAdjoint.getText() + RN);\r\n\r\n return html.append(\"</div>\" + RN);\r\n }", "public IndicadoresEficaciaHTML() {\n/* 163 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 165 */ buildDocument();\n/* */ }", "private String formatEventsAsHtml() {\n StringBuffer html = new StringBuffer();\n\n html.append(\"<b><u>Build events:</u></b><br>\\n\");\n html.append(\"<table border=0 cellspacing=0 cellpadding=1 width=\\\"100%\\\">\\n\");\n for (int idx = 0; idx < events.size(); idx++) {\n BuildEvent currentEvent = (BuildEvent) events.get(idx);\n html.append(formatEventAsHtml(currentEvent));\n }\n html.append(\"</table>\\n\");\n\n return html.toString();\n }", "public void generateDetailHtml(String filename)\n {\n\tString htmlFileName = \"ddetail.html\";\n\tString panelSection = null;\n\tFileWriter writer = null;\n\tif (filename != null)\n htmlFileName = filename;\n\ttry \n\t {\n\t writer = new FileWriter(htmlFileName);\n\t writer.write(\"<HTML><BODY>\\n\");\n\t Iterator panelIter = panelTable.values().iterator();\n while (panelIter.hasNext())\n\t {\n\t\tPanelInfo panel = (PanelInfo) panelIter.next();\n\t\tif (panel.isPrimary())\n\t\t {\n\t\t panelSection = generatePanelDetails(panel);\n\t\t writer.write(panelSection);\n\t\t }\n\t\t}\n\t writer.write(\"</BODY></HTML>\\n\");\n\t writer.close();\n\t }\n\n\tcatch (IOException ioe)\n\t {\n\t System.out.println(\"Error creating or writing to \" + htmlFileName);\n\t ioe.printStackTrace();\n\t }\n\t}", "public String toHTML(String page) {\n String htm = \"<tr><td> \" + name + \" </td><td> \" + artist.getName() +\n \" </td><td> \" + album.getName() + \" </td><td style=\\\"text-align:justify\\\"> \";\n if (page ==\"description\") {\n htm += description + \"</td>\";\n } else {\n htm += \"<div class= \\\"menu\\\"><form action=\\\"/description\\\" method=\\\"POST\\\"><button name=\\\"descSongID\\\" value=\\\"\" + id +\n \"\\\" type=\\\"submit\\\">Show Description</button></form></td></div>\\n\";\n }\n if (page.equals(\"playlist\")) {\n htm += \"<div class= \\\"menu\\\"><td><form action=\\\"/playlist\\\" method=\\\"POST\\\"><button name=\\\"DeleteSongID\\\" value=\\\"\" + id +\n \"\\\" type=\\\"submit\\\">Delete</button></form></td></div>\\n\";\n } else if (page.equals(\"allSongs\")) {\n htm += \"<div class= \\\"menu\\\"><td><form action=\\\"/playlist\\\" method=\\\"POST\\\"><button name=\\\"AddSongID\\\" value=\\\"\" + id +\n \"\\\" type=\\\"submit\\\">Add</button></form></td></div>\\n\";\n }\n htm += \"</tr>\";\n return htm;\n }", "private static String createHTMLString(Map<String,String[]> reviewsMap) {\n String htmlString = templateHTML;\n String body = \"<h2>\"+\"Reviews from Amazon\"+\"</h2>\\n\";\n body += \"<ul>\\n\";\n for (String reviewId : reviewsMap.keySet()) {\n String[] review = reviewsMap.get(reviewId);\n String rating = review[0];\n String link = review[1];\n String sentiment = review[2];\n String entity = review[3];\n body += \"<li>\\n\";\n body += \"<a href=\\\"\" + link+\"\\\"\";\n String color = colorFromSentiment(sentiment);\n body += \" style=\\\"color:\"+color+\";\\\"> \";\n body += link + \"</a>\\n\";\n body += \"<p>\" + entity +\"</p>\\n\";\n String sarcasm = getSarcasm(rating, sentiment);\n body += \"<p>\" + sarcasm +\"</p>\\n\";\n body += \"</li>\\n\";\n }\n body += \"</ul>\\n\";\n htmlString = htmlString.replace(\"$body\", body);\n return htmlString;\n }", "@Override\n public void prepareHtmlDataList() {\n makeGCDataInfoOutputData();\n makeLaunchDataInfoOutputData();\n }", "private String renderBody() {\n return \"\";\n }", "public String getHtmlString() {\r\n\t\tString getHtmlString = \"\";\r\n\t\tgetHtmlString += \"<h1>\" + this.title + \"</h1>\";\r\n\t\tfor (int i = 0; i < portfolioSize; i++) {\r\n\t\t\tgetHtmlString += stockStatus[i].getHtmlDescription();\r\n\t\t}\r\n\t\tgetHtmlString += \"<br>Total portfolio value: \"\r\n\t\t\t\t+ getStocksValue(stockStatus) + \"$, Total Stocks value: \"\r\n\t\t\t\t+ getTotalValue(stockStatus) + \"$, Balnce :\" + getBalance()\r\n\t\t\t\t+ \"$ </br>\";\r\n\t\treturn getHtmlString;\r\n\t}", "public void foreachResultCreateHTML(ParameterHelper _aParam)\n {\n // TODO: auslagern in eine function, die ein Interface annimmt.\n String sInputPath = _aParam.getInputPath();\n File aInputPath = new File(sInputPath);\n// if (!aInputPath.exists())\n// {\n// GlobalLogWriter.println(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\");\n// assure(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\", false);\n// }\n\n // call for a single ini file\n if (sInputPath.toLowerCase().endsWith(\".ini\") )\n {\n callEntry(sInputPath, _aParam);\n }\n else\n {\n // check if there exists an ini file\n String sPath = FileHelper.getPath(sInputPath); \n String sBasename = FileHelper.getBasename(sInputPath);\n\n runThroughEveryReportInIndex(sPath, sBasename, _aParam);\n \n // Create a HTML page which shows locally to all files in .odb\n if (sInputPath.toLowerCase().endsWith(\".odb\"))\n {\n String sIndexFile = FileHelper.appendPath(sPath, \"index.ini\");\n File aIndexFile = new File(sIndexFile);\n if (aIndexFile.exists())\n { \n IniFile aIniFile = new IniFile(sIndexFile);\n\n if (aIniFile.hasSection(sBasename))\n {\n // special case for odb files\n int nFileCount = aIniFile.getIntValue(sBasename, \"reportcount\", 0);\n ArrayList<String> aList = new ArrayList<String>();\n for (int i=0;i<nFileCount;i++)\n {\n String sValue = aIniFile.getValue(sBasename, \"report\" + i);\n\n String sPSorPDFName = getPSorPDFNameFromIniFile(aIniFile, sValue);\n if (sPSorPDFName.length() > 0)\n {\n aList.add(sPSorPDFName);\n }\n }\n if (aList.size() > 0)\n {\n // HTML output for the odb file, shows only all other documents.\n HTMLResult aOutputter = new HTMLResult(sPath, sBasename + \".ps.html\" );\n aOutputter.header(\"content of DB file: \" + sBasename);\n aOutputter.indexSection(sBasename);\n \n for (int i=0;i<aList.size();i++)\n {\n String sPSFile = aList.get(i);\n\n // Read information out of the ini files\n String sIndexFile2 = FileHelper.appendPath(sPath, sPSFile + \".ini\");\n IniFile aIniFile2 = new IniFile(sIndexFile2);\n String sStatusRunThrough = aIniFile2.getValue(\"global\", \"state\");\n String sStatusMessage = \"\"; // aIniFile2.getValue(\"global\", \"info\");\n aIniFile2.close();\n\n\n String sHTMLFile = sPSFile + \".html\";\n aOutputter.indexLine(sHTMLFile, sPSFile, sStatusRunThrough, sStatusMessage);\n }\n aOutputter.close();\n\n// String sHTMLFile = FileHelper.appendPath(sPath, sBasename + \".ps.html\");\n// try\n// {\n//\n// FileOutputStream out2 = new FileOutputStream(sHTMLFile);\n// PrintStream out = new PrintStream(out2);\n//\n// out.println(\"<HTML>\");\n// out.println(\"<BODY>\");\n// for (int i=0;i<aList.size();i++)\n// {\n// // <A href=\"link\">blah</A>\n// String sPSFile = (String)aList.get(i);\n// out.print(\"<A href=\\\"\");\n// out.print(sPSFile + \".html\");\n// out.print(\"\\\">\");\n// out.print(sPSFile);\n// out.println(\"</A>\");\n// out.println(\"<BR>\");\n// }\n// out.println(\"</BODY></HTML>\");\n// out.close();\n// out2.close();\n// }\n// catch (java.io.IOException e)\n// {\n// \n// }\n }\n }\n aIniFile.close();\n }\n\n }\n }\n }", "private static void writeHtmlBody(SimpleWriter out,\n SortingMachine<Pair<String, Integer>> words, String inputName,\n int n) {\n\n out.println(\"<body>\");\n out.println(\"<h2> Top \" + n + \" words in \" + inputName + \" </h2>\");\n out.println(\"<hr>\");\n\n out.println(\"<div class=\\\"cdiv\\\">\\r\\n\" + \"<p class=\\\"cbox\\\">\");\n\n while (words.size() > 0) {\n Map.Pair<String, Integer> pair = words.removeFirst();\n\n int font = (48 - 11) * (pair.value() - 30);\n font /= (500 - 30);\n font += 11;\n out.println(\"<span style='cursor:default' class=\\\"f\" + font\n + \"\\\" title=\\\"count: \" + pair.value() + \"\\\">\" + pair.key()\n + \" </span>\");\n }\n\n out.println(\"</p>\");\n out.println(\"</div>\");\n\n }", "private void createComponents()\n\t{\n\t\t// Create search results' table header\n\t\tm_ResultHeader = new PrinterLabel(1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\"PRINTER\",\"VENDOR\",\"TENSION (ksi)\",\"COMPRESSION (ksi)\",\"IMPACT (lb-ft)\",\"MATERIALS\",\"TOLERANCE (in)\",\"FINISH (\\u00B5in)\", false);\n\t\tm_ResultHeader.setBackground(Color.lightGray);\n\t\t// Add tool tips for long header categories before adding to GUI\n\t\tm_ResultHeader.getMaterials().setToolTipText(\"Range of Materials\");\n\t\tm_PrinterList = ToolBox.generatePrinterList();\n\t}", "private String getAdvTemplate(){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\r\n\t\t\t sb.append(\"<tpl for=\\\".\\\">\");\r\n\t\t\t\tsb.append(\"<div class=\\\"x-combo-list-item\\\" >\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-lft {gender}\\\"></span>\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-lft\\\">{name}</span>\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-rgt\\\">{age} Yrs</span>\");\r\n\t\t\t\tsb.append(\"</div>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}", "BODY createBODY();", "public String getHtml(PbReturnObject retObj) {\n\r\n StringBuilder tableBuilder = new StringBuilder();\r\n// \r\n// \r\n //try\r\n {\r\n\r\n // retObj = execSelectSQL(sqlQuery);\r\n if (retObj != null && retObj.getRowCount() > 0) {\r\n tableBuilder = tableBuilder.append(\"<table class=\\\"tablesorter\\\" border =1 cellpadding=1 cellspacing=1> \");\r\n tableBuilder.append(\"<tr>\");\r\n for (int iloop = 0; iloop < CrossTabfinalOrder.size(); iloop++) {\r\n tableBuilder = tableBuilder.append(\"<td>\").append(CrossTabfinalOrder.get(iloop)).append(\"</td>\");\r\n }\r\n tableBuilder.append(\"</tr>\");\r\n for (int iloop = 0; iloop < finalColViewSortedValues.length; iloop++) {\r\n tableBuilder.append(\"<tr>\");\r\n for (int k = 0; k < rowViewCount; k++) {\r\n// ArrayList a =nonViewByMapNew.get(retObj.getColumnNames()[k]);\r\n// if(a!=null){\r\n// tableBuilder=tableBuilder.append(\"<td>\").append(a.toString()).append(\"</td>\");\r\n// }else\r\n tableBuilder = tableBuilder.append(\"<td>\").append(retObj.getColumnNames()[k]).append(\"</td>\");\r\n }\r\n\r\n for (int k = 0; k < finalColViewSortedValues[iloop].size(); k++) {\r\n if (finalColViewSortedValues[iloop].get(k) != null) {\r\n tableBuilder = tableBuilder.append(\"<td>\").append(finalColViewSortedValues[iloop].get(k)).append(\"</td>\");\r\n } else {\r\n tableBuilder = tableBuilder.append(\"<td>\").append(\"SubTotal\").append(\"</td>\");\r\n }\r\n }\r\n// for(int k=rowViewCount+finalColViewSortedValues[0].size();k<retObj.getColumnCount();k++){\r\n// tableBuilder=tableBuilder.append(\"<td>\").append(retObj.getColumnNames()[k]).append(\"</td>\");\r\n// }\r\n\r\n tableBuilder.append(\"</tr>\");\r\n }\r\n// \r\n for (int i = 0; i < retObj.getRowCount(); i++) {\r\n tableBuilder.append(\"<tr>\");\r\n for (int j = 0; j < CrossTabfinalOrder.size() + rowViewCount; j++) {\r\n if (retObj.getFieldValue(i, j) != null) {\r\n if (j < rowViewCount) {\r\n tableBuilder.append(\"<td>\").append(retObj.getFieldValueString(i, j)).append(\"</td>\");\r\n } else {\r\n //\r\n tableBuilder.append(\"<td>\").append(retObj.getFieldValueString(i, CrossTabfinalOrder.get(j - rowViewCount).toString())).append(\"</td>\");\r\n\r\n }\r\n } else {\r\n tableBuilder.append(\"<td>\").append(\"--\").append(\"</td>\");\r\n }\r\n\r\n }\r\n tableBuilder.append(\"</tr>\");\r\n }\r\n tableBuilder.append(\"</table>\");\r\n }\r\n }\r\n// catch (Exception ex) {\r\n// logger.error(\"Exception:\",ex);\r\n// \r\n// }\r\n// \r\n return tableBuilder.toString();\r\n }", "private static void createTopStoriesPage(XMLTree xml, SimpleWriter out)\n {\n \tout.println(\"<!DOCTYPE html>\");\n \tout.println(\"<html>\");\n \tout.println(\"<head>\");\n \tout.println(\"<title>\" + xml.attributeValue(\"title\") + \"</title>\");\n \tout.println(\"</head>\");\n \tout.println(\"<h1>\" + xml.attributeValue(\"title\") + \"</h1>\");\n \tout.println(\"<ul>\");\n \t\n \t// for each child (each feed) create the file, process the feed, and display the list item)\n \tfor(int i = 0; i < xml.numberOfChildren(); i++)\n \t{\n \t\tSimpleWriter newOut = new SimpleWriter1L(\"src/\" + xml.child(i).attributeValue(\"file\"));\n \t\tprocessFeed(xml.child(i).attributeValue(\"url\"), xml.child(i).attributeValue(\"file\"), newOut);\n \t\tout.println(\"<li><a href=\\\"\" + xml.child(i).attributeValue(\"file\") + \"\\\">\" + xml.child(i).attributeValue(\"name\") + \"</a></li>\");\n \t\tnewOut.close();\n \t}\n \t\n \tout.println(\"</ul>\");\n \tout.println(\"</html>\");\n }", "public String toString()\n {\n return getHtml();\n }", "private String getTemplate(){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\r\n\t\t\t sb.append(\"<tpl for=\\\".\\\">\");\r\n\t\t\t\tsb.append(\"<div class=\\\"x-combo-list-item\\\" >\");\r\n\t\t\t\tsb.append(\"<span><b>{name}</b></span>\"); \t\t\t \t\r\n\t\t\t\tsb.append(\"</div>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}", "public String toHTML () {\n // TODO barely more than a stub\n // TODO should use CSS rather than header tags\n StringBuffer ret = new StringBuffer ( );\n ret.append (\"<div class=\\\"comment\\\"\" +\n \"style=\\\"margin-left: \" +\n Integer.toString (nestLevel * 24) +\n \"pt\\\">\\n\");\n ret.append (\"<span class=\\\"cmtcredit\\\">Posted by \" + poster + \n \" at \" + date + \"</span><br>\");\n if (subject != null) {\n ret.append (\"<span class=\\\"cmtsubj\\\">\" + subject + \"</span><br>\\n\");\n }\n ret.append (\"<div class=\\\"cmtbody\\\">\" + body + \"</div>\\n\");\n String ipaddr = properties.get (\"poster_ip\");\n if (ipaddr != null) {\n ret.append (\"<br>&nbsp;<br>IP address: \" + ipaddr + \"<br>\\n\");\n }\n if (!replies.isEmpty ()) {\n ret.append (\"<p class=\\\"fill2\\\"></p>\\n\");\n }\n for (Comment rep : replies) {\n ret.append (rep.toHTML());\n }\n ret.append (\"<p class=\\\"fill2\\\"></p>\\n\");\n ret.append (\"</div>\"); // Close div class comment\n return ret.toString();\n }", "private String getReleaseNotesHtml() {\r\n\t\tString pkgName = _act.getPackageName();\r\n\t\tResources res = _act.getResources();\r\n\t\tint resId = res.getIdentifier(releaseNotesXml, \"xml\", pkgName);\r\n\t\tXmlResourceParser parser = res.getXml(resId);\r\n\r\n\t\tString html = \"<html><head>\" + css + \"</head><body>\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint eventType = parser.getEventType();\r\n\t\t\twhile (eventType != XmlPullParser.END_DOCUMENT) {\r\n\t\t\t\tif ((eventType == XmlPullParser.START_TAG) && (parser.getName().equals(\"release\"))){\r\n\t\t\t\t\thtml = html + parseReleaseNotesXML(parser);\r\n\t\t\t\t}\r\n\t\t\t\teventType = parser.next();\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch (XmlPullParserException e)\r\n\t\t{\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tparser.close();\r\n\t\t}\r\n\t\thtml = html + \"</body></html>\";\r\n\t\treturn html;\r\n\t}", "protected String createBasicTestData() {\n BaseSignatureTestData baseData = baseTestInfo.getBaseTestData();\n String basicParameterBody = createBasicParameterRepresentation(baseData);\n StringBuilder basicTestDataPanel = new StringBuilder();\n basicTestDataPanel\n .append(\"<ul id=\\\"tabs\\\" class=\\\"nav nav-tabs\\\" data-tabs=\\\"tabs\\\">\");\n basicTestDataPanel\n .append(\"<li class=\\\"active\\\"><a href=\\\"#basic-parameters\\\" \"\n + \"data-toggle=\\\"tab\\\">Basic parameters</a></li>\");\n basicTestDataPanel\n .append(\"<li><a href=\\\"#std-out\\\" data-toggle=\\\"tab\\\">Standard output</a></li>\");\n basicTestDataPanel\n .append(\"<li><a href=\\\"#std-err\\\" data-toggle=\\\"tab\\\">Standard error</a></li>\");\n basicTestDataPanel.append(\"</ul>\");\n basicTestDataPanel\n .append(\"<div id=\\\"my-tab-content\\\" class=\\\"tab-content\\\">\");\n basicTestDataPanel\n .append(\"<div class=\\\"tab-pane active\\\" id=\\\"basic-parameters\\\">\");\n basicTestDataPanel.append(basicParameterBody);\n basicTestDataPanel.append(\"</div>\");\n basicTestDataPanel.append(\"<div class=\\\"tab-pane\\\" id=\\\"std-out\\\">\");\n basicTestDataPanel.append(\"<pre class=\\\"pre-scrollable\\\">\"\n + baseTestInfo.getStdOut() + \"</pre>\");\n basicTestDataPanel.append(\"</div>\");\n basicTestDataPanel.append(\"<div class=\\\"tab-pane\\\" id=\\\"std-err\\\">\");\n basicTestDataPanel.append(\"<pre class=\\\"pre-scrollable\\\">\"\n + baseTestInfo.getStdErr() + \"</pre>\");\n basicTestDataPanel.append(\"</div>\");\n basicTestDataPanel.append(\"</div>\");\n return basicTestDataPanel.toString();\n }", "public static void htmlExtractor() throws IOException {\t\n\t\tString inizio=\"Inizio:\"+new Date();\n\t\tfinal File sourceDocDir = new File(\"datasetWarc\");\n\t\tif (sourceDocDir.canRead()) {\n\t\t\tif (sourceDocDir.isDirectory()) {\n\t\t\t\tString[] files = sourceDocDir.list();\n\t\t\t\t// an IO error could occur\n\t\t\t\tif (files != null) {\n\t\t\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\t\t\tSystem.out.println(files[i]);\n\t\t\t\t\t\tFromWarcToHtml.WarcExtractor(new File(sourceDocDir, files[i]));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\n\n\t\t}\n\n\t\tSystem.out.println(\"Tempo Estrazione HTML:\"+\"Inizio: \"+inizio+\"Fine: \"+new Date());\n\n\t}", "private static void writeHtmlHeader(SimpleWriter out, String inputName,\n int n) {\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title> Top \" + n + \"words in \" + inputName);\n out.println(\"</title>\");\n out.println(\n \"<link href='http://cse.osu.edu/software/2231/web-sw2/assignments/projects/tag-cloud-generator/data/tagcloud.css' rel=\\\"stylesheet\\\" type=\\\"text/css\\\">\");\n out.println(\"</head>\");\n }", "protected String generateEditModeHTML() throws DynamicExtensionsSystemException\r\n\t{\r\n\t\tString defaultValue = (String) this.value;\r\n\t\tif (value == null)\r\n\t\t{\r\n\t\t\tdefaultValue = ControlsUtility.getDefaultValue(this.getAbstractAttribute());\r\n\t\t\tif (defaultValue == null)\r\n\t\t\t{\r\n\t\t\t\tdefaultValue = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString htmlComponentName = getHTMLComponentName();\r\n String output=null;\r\n\t\t/*String output = \"<input class='\"\r\n\t\t\t\t+ cssClass\r\n\t\t\t\t+ \"' name='\"\r\n\t\t\t\t+ htmlComponentName\r\n\t\t\t\t+ \"' id='\"\r\n\t\t\t\t+ htmlComponentName\r\n\t\t\t\t+ \"' value='\"\r\n\t\t\t\t+ defaultValue\r\n\t\t\t\t+ \"'/>\"\r\n\t\t\t\t+ \"<A onclick=\\\"showCalendar('\"\r\n\t\t\t\t+ htmlComponentName\r\n\t\t\t\t+ \"', \"\r\n\t\t\t\t+ DynamicExtensionsUtility.getCurrentYear()\r\n\t\t\t\t+ \", \"\r\n\t\t\t\t+ DynamicExtensionsUtility.getCurrentMonth()\r\n\t\t\t\t+ \", \"\r\n\t\t\t\t+ DynamicExtensionsUtility.getCurrentDay()\r\n\t\t\t\t+ \", 'MM-dd-yyyy', 'dataEntryForm', '\"\r\n\t\t\t\t+ htmlComponentName\r\n\t\t\t\t+ \"', event, 1900, 2020);\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n\t\t\t\t+ \"<DIV id=slcalcod\"\r\n\t\t\t\t+ htmlComponentName\r\n\t\t\t\t+ \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";*/\r\n \r\n /*String output = \"<input class='\"\r\n + cssClass\r\n + \"' name='\"\r\n + htmlComponentName\r\n + \"' id='\"\r\n + htmlComponentName\r\n + \"' value='\"\r\n + defaultValue\r\n + \"'/>\"\r\n + \"<A onclick=\\\"printMonthYearCalendar('\"\r\n + htmlComponentName\r\n + \"', \"\r\n + DynamicExtensionsUtility.getCurrentMonth()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \");\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n + \"<DIV id=slcalcod\"\r\n + htmlComponentName\r\n + \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";*/\r\n \r\n /*String output = \"<input class='\"\r\n + cssClass\r\n + \"' name='\"\r\n + htmlComponentName\r\n + \"' id='\"\r\n + htmlComponentName\r\n + \"' value='\"\r\n + defaultValue\r\n + \"'/>\"\r\n + \"<A onclick=\\\"printMonthYearCalendar('\"\r\n + htmlComponentName\r\n + \"', \"\r\n + DynamicExtensionsUtility.getCurrentMonth()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \");\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n + \"<DIV id=slcalcod\"\r\n + htmlComponentName\r\n + \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";*/\r\n\t\t/* Obtain the date format */\r\n\t\tAttributeTypeInformationInterface attributeTypeInformationInterface = ((AttributeInterface) this\r\n\t\t\t\t.getAbstractAttribute()).getAttributeTypeInformation();\r\n\t\tString dateFormat = ControlsUtility.getDateFormat(attributeTypeInformationInterface);\r\n\t\tif (dateFormat.equals(ProcessorConstants.DATE_ONLY_FORMAT))\r\n\t\t{\r\n output = \"<input class='\"\r\n + cssClass\r\n + \"' name='\"\r\n + htmlComponentName\r\n + \"' id='\"\r\n + htmlComponentName\r\n + \"' value='\"\r\n + defaultValue\r\n + \"'/>\"\r\n + \"<A onclick=\\\"showCalendar('\"\r\n + htmlComponentName\r\n + \"', \"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentMonth()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentDay()\r\n + \", 'MM-dd-yyyy', 'dataEntryForm', '\"\r\n + htmlComponentName\r\n + \"', event, 1900, 2020);\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n + \"<DIV id=slcalcod\"\r\n + htmlComponentName\r\n + \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";\r\n\t\t\toutput += \"<SCRIPT>printCalendar('\" + htmlComponentName + \"',\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentDay() + \",\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentMonth() + \",\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentYear() + \");</SCRIPT>\" + \"</DIV>\"\r\n\t\t\t\t\t+ \"[MM-DD-YYYY]&nbsp;\";\r\n\t\t}\r\n\t\telse if (dateFormat.equals(ProcessorConstants.DATE_TIME_FORMAT))\r\n\t\t{\r\n output = \"<input class='\"\r\n + cssClass\r\n + \"' name='\"\r\n + htmlComponentName\r\n + \"' id='\"\r\n + htmlComponentName\r\n + \"' value='\"\r\n + defaultValue\r\n + \"'/>\"\r\n + \"<A onclick=\\\"showCalendar('\"\r\n + htmlComponentName\r\n + \"', \"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentMonth()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentDay()\r\n + \", 'MM-dd-yyyy', 'dataEntryForm', '\"\r\n + htmlComponentName\r\n + \"', event, 1900, 2020);\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n + \"<DIV id=slcalcod\"\r\n + htmlComponentName\r\n + \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";\r\n\t\t\toutput += \"<SCRIPT>printTimeCalendar('\" + htmlComponentName + \"',\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentDay() + \",\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentMonth() + \",\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentYear() + \",\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentHours() + \",\"\r\n\t\t\t\t\t+ DynamicExtensionsUtility.getCurrentMinutes() + \");</SCRIPT>\" + \"</DIV>\"\r\n\t\t\t\t\t+ \"[MM-DD-YYYY HH:MM]&nbsp;\";\r\n\t\t}\r\n else if (dateFormat.equals(ProcessorConstants.MONTH_YEAR_FORMAT))\r\n {\r\n output = \"<input class='\"\r\n + cssClass\r\n + \"' name='\"\r\n + htmlComponentName\r\n + \"' id='\"\r\n + htmlComponentName\r\n + \"' value='\"\r\n + defaultValue\r\n + \"'/>\"\r\n + \"<A onclick=\\\"showCalendar('\"\r\n + htmlComponentName\r\n + \"', \"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentMonth()\r\n + \", \"\r\n + 0\r\n + \", 'MM-yyyy', 'dataEntryForm', '\"\r\n + htmlComponentName\r\n + \"', event, 1900, 2020);\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n + \"<DIV id=slcalcod\"\r\n + htmlComponentName\r\n + \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";\r\n /*output = \"<input class='\"\r\n + cssClass\r\n + \"' name='\"\r\n + htmlComponentName\r\n + \"' id='\"\r\n + htmlComponentName\r\n + \"' value='\"\r\n + defaultValue\r\n + \"'/>\"\r\n + \"<A onclick=\\\"printMonthYearCalendar('\"\r\n + htmlComponentName\r\n + \"', \"\r\n + DynamicExtensionsUtility.getCurrentMonth()\r\n + \", \"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \");\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n + \"<DIV id=slcalcod\"\r\n + htmlComponentName\r\n + \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";*/\r\n output += \"<SCRIPT>printMonthYearCalendar('\" + htmlComponentName + \"',\"\r\n + DynamicExtensionsUtility.getCurrentMonth() + \",\"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \");</SCRIPT>\" + \"</DIV>\"\r\n + \"[MM-YYYY]&nbsp;\";\r\n }\r\n else if (dateFormat.equals(ProcessorConstants.YEAR_ONLY_FORMAT))\r\n {\r\n /*output += \"<SCRIPT>printYearCalendar('\" + \"attributeDefaultValue\" + \"',\"\r\n + DynamicExtensionsUtility.getCurrentYear() + \",\"\r\n + \");</SCRIPT>\" + \"</DIV>\"\r\n + \"[YYYY]&nbsp;\";\r\n output += \"<SCRIPT>printYearCalendar('\" + htmlComponentName + \"',\"\r\n + DynamicExtensionsUtility.getCurrentDay() + \",\"\r\n + DynamicExtensionsUtility.getCurrentMonth() + \",\"\r\n + DynamicExtensionsUtility.getCurrentYear() + \",\"\r\n + DynamicExtensionsUtility.getCurrentHours() + \",\"\r\n + DynamicExtensionsUtility.getCurrentMinutes() + \");</SCRIPT>\" + \"</DIV>\"\r\n + \"[MM-DD-YYYY HH:MM]&nbsp;\";*/\r\n output = \"<input class='\"\r\n + cssClass\r\n + \"' name='\"\r\n + htmlComponentName\r\n + \"' id='\"\r\n + htmlComponentName\r\n + \"' value='\"\r\n + defaultValue\r\n + \"'/>\"\r\n + \"<A onclick=\\\"showCalendar('\"\r\n + htmlComponentName\r\n + \"', \"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \", \"\r\n + 0\r\n + \", \"\r\n + 0\r\n + \", 'yyyy', 'dataEntryForm', '\"\r\n + htmlComponentName\r\n + \"', event, 1900, 2020);\\\" href=\\\"javascript://\\\"><IMG alt=\\\"This is a Calendar\\\" src=\\\"images/calendar.gif\\\" border=0 /></A>\"\r\n + \"<DIV id=slcalcod\"\r\n + htmlComponentName\r\n + \" style=\\\"Z-INDEX: 10; LEFT: 100px; VISIBILITY: hidden; POSITION: absolute; TOP: 100px\\\">\";\r\n output += \"<SCRIPT>printYearCalendar('\" + htmlComponentName + \"',\"\r\n + DynamicExtensionsUtility.getCurrentYear()\r\n + \");</SCRIPT>\" + \"</DIV>\"\r\n + \"[YYYY]&nbsp;\";\r\n }\r\n\r\n\t\treturn output;\r\n\t}", "private void buildview() {\n\t\tCssLayout cd= new CssLayout();\n\t\t\n\t\t//table.setSizeFull();\n\t\t\t\n\t\t\ttable.setContainerDataSource(container);\n\t\t\ttable.setVisibleColumns(new Object[]{\"Name\",\"Component\",\"Indication\",\"Comment\",\"MethodofAdministration\"});\n\t\t\ttable.setColumnHeader(\"MethodofAdministration\", \"Method of Administration\");\n\t\t\t\n\t\t\ttable.setWidth(\"100%\");\n\t\t\tcd.addComponent(table);\n\t\t\tcd.setSizeFull();\n\t\t\tsetContent(cd);\n\t\t\n\t}", "public String generatePageReportHtml(String result) {\n try {\n ContainerTag html = html(\n head(\n title(\"News Trends Stats\"),\n script().withSrc(\"https://code.jquery.com/jquery-3.2.1.slim.min.js\"),\n script().withSrc(\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js\"),\n script().withSrc(\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js\"),\n script().withSrc(\"https://code.highcharts.com/highcharts.js\"),\n script().withSrc(\"https://code.highcharts.com/modules/wordcloud.js\"),\n script().withType(\"text/javascript\").withSrc(\"news.js\"),\n link().withRel(\"stylesheet\").withHref(\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\"),\n link().withRel(\"stylesheet\").withHref(\"styles.css\")\n ),\n body(\n div(\n attrs(\".jumbotron\"),\n h1(\"News Trends Stats\").attr(\"class=\\\"center\\\"\")\n ),\n div(\n attrs(\".container\"),\n div(attrs(\"#result-alert-error.alert.alert-danger.hidden\"))\n .withText(\"There was a problem retrieving the data. You may have exceeded your developer account limit for the news API. Please limit the number of days and try again.\"),\n div(attrs(\"#wordMapData.hidden\")).withText(\"#dataToReplace\"),\n div(attrs(\"#wordMapContainer\")),\n div(\n attrs(\"#wordLists.row\"),\n div(attrs(\"#top20.col-md-6\")),\n div(attrs(\"#bottom20.col-md-6\"))\n )\n )\n )\n );\n\n return html.render().replace(\"#dataToReplace\", result);\n } catch (Exception e) {\n System.out.println(\"There was an exception while generating the html report: \" + e.getMessage());\n return html(body(h3(\"There was an exception while generating the html report: \" + e.getMessage()))).render();\n }\n }", "public String html() {\n\t\treturn HtmlFunction.html(this);\n\t}", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "protected Element createDivAndAddToDocument() {\r\n\t\tfinal Element div = DOM.createDiv();\r\n\t\tdiv.setInnerHTML(this.getCurrentTestName());\r\n\t\tDOM.setStyleAttribute(div, Css.BACKGROUND_COLOR, \"lime\");\r\n\t\tthis.addElement(div);\r\n\t\treturn div;\r\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\t//Builds the html looking string.\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"<\").append(type.toString().toLowerCase());\n\t\tfor(Entry<String, String> attrEntry : attributes.entrySet())\n\t\t{\n\t\t\tbuilder.append(\" \")\n\t\t\t\t.append(attrEntry.getKey())\n\t\t\t\t.append(\"=\")\n\t\t\t\t.append(attrEntry.getValue());\n\t\t}\n\t\tbuilder.append(\">\");\n\t\tif(getText() != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n\").append(getText()).append(\"\\n\");\n\t\t}\n\t\t//Append each of the children.\n\t\tfor(HtmlTag child : getChildren())\n\t\t{\n\t\t\tbuilder.append(child.toString().replaceAll(\"(?m)^\", \" \"));\n\t\t}\n\t\t//Append the closing tag.\n\t\tbuilder.append(\"\\n</\").append(type.toString().toLowerCase()).append(\">\");\n\t\treturn builder.toString();\n\t}", "public static HashMap<String, String> OutputHtml() {\n\t\treturn methodMap(\"html\");\n\t}", "public void createDeatilsPage(String deatils, ITestResult r) {\n\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\twriter = createHTMLWriter(folderToSave + \"\\\\support\", r.getName() + \"_\" + r.getStartMillis() + \".html\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"unable to create \" + r.getName() + \"_\" + r.getEndMillis());\n\t\t\treturn;\n\t\t}\n\t\twriter.println(\n\t\t\t\t\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\\\">\");\n\t\twriter.println(\"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\");\n\t\twriter.println(\n\t\t\t\t\"<head><style>.class-green{background-color:green;} .class-blue{background-color:blue;}</style><script> \"\n\t\t\t\t\t\t+ \"function goBack() \" + \"{ \" + \"window.history.back() } </script></head> \");\n\t\twriter.println(\"<body><table border=\\\"1\\\" CELLPADDING=\\\"1\\\" CELLSPACING=\\\"1\\\">\");\n\t\twriter.println(\"<thead><tr><th COLSPAN=\\\"2\\\"><h4>Execution Steps for \" + r.getName() + \"</h4></th></tr>\"\n\t\t\t\t+ \"<tr><th>Step No</th> <th>Action Details</th></tr>\" + \"</thead>\");\n\t\twriter.println(deatils);\t\t\n\t\twriter.println(\"</tbody></table> \");\n\t\tif (r.getAttribute(\"LOGSRC\") != null) {\n\t\t\twriter.println(\n\t\t\t\t\t\"</br><br/><a href='\" + r.getName() + \"_\" + r.getStartMillis() + \".png'>Reference Screen</a>\");\n\t\t}\n\t\t// writer.println(\"</br><br/><input type=\\\"button\\\" value=\\\"Back To Test\n\t\t// Cases\\\" onclick=\\\"goBack()\\\"/> </body>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "public void format (StringBuilder buf) {\n buf.append(\"<div class='thingBox'><a href='\");\n buf.append(DeploymentConfig.serverURL).append(\"#\").append(token).append(\"'>\");\n if (desc != null) {\n buf.append(\"<img src='\").append(desc.getMediaPath()).append(\"'>\");\n }\n buf.append(\"<div class='Name'>\").append(escapeHTML(name)).append(\"</div>\");\n buf.append(\"</a></div>\\n\");\n }", "public static String getHTML() {\n if (create()) {\n return tag.getInnerHTML();\n }\n return \"\";\n }", "public void generateHtml(String title, List<HtmlData> data, FilePathToUrl filePathToUrl)\n throws IOException {\n String content = generateHtmlLayout(title, data);\n createFile(filePathToUrl.getFilePath(), content);\n FileUtil.saveResource(getClass().getResourceAsStream(\"/docs/stylesheets/asciidoctor.css\"),\n \"asciidoctor.css\", false);\n }", "public String toHTML() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<tr>\");\n sb.append(\"<td>\");\n sb.append(this.name);\n sb.append(\"</td>\");\n sb.append(\"<td>\");\n sb.append(this.nextAlarm);\n sb.append(\"</td>\");\n sb.append(\"</tr>\");\n return sb.toString();\n }", "@Override\n public void doTag() throws JspException, IOException {\n setAttributes();\n\n String layout = getBodyContent();\n jspContext.getOut().write(layout);\n }", "private native String getTemplate()/*-{\r\n\t\t\t\treturn ['<tpl for=\".\">', \r\n\t\t\t '<div class=\"x-customer-item\">', \r\n\t\t\t\t '<div class=\"name\">{name}</div>', \r\n\t\t\t\t '<div class=\"email\">E-mail:{email}</div>', \r\n\t\t\t\t '<div class=\"purchases\">Purchases:{purchases}</div>', \r\n\t\t\t '</div>', \r\n\t\t\t '</tpl>', \r\n\t\t\t ''].join(\"\");\r\n\t\t\t}-*/;", "private void buildRTF() {\n\t\n}", "@Override\n\tpublic void outputHtml(ModelItemList list) {\n\t\t\n\t}", "public void fnWriteToHtmlOutput(String strDescription, String strExpectedValue, String strObtainedValue, String strResult) {\r\n \tString sStep;\r\n \tif (Dictionary.containsKey(\"STEP\")){\r\n \t\tsStep = Dictionary.get(\"STEP\") + \"<NS>\" + strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t\tDictionary.remove(\"STEP\");\r\n \t}else{\r\n \t\tsStep = strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t}\r\n \t\t\r\n \tDictionary.put(\"STEP\", sStep);\r\n \t\r\n //Declaring Variables\r\n String snapshotFilePath,sRowColor;\r\n\r\n //Open the test case report for writing\r\n //Open the HTML file\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n \r\n //Increment the Operation Count\r\n g_OperationCount = g_OperationCount + 1;\r\n \r\n //Row Color\r\n if (g_OperationCount % 2 == 0)\r\n {\r\n sRowColor = \"#EEEEEE\";\r\n }\r\n else\r\n {\r\n sRowColor = \"#D3D3D3\";\r\n \r\n }\r\n \r\n //Check if the result is Pass or Fail\r\n if (strResult.toUpperCase().equals(\"PASS\")){ \r\n //Increment the Pass Count\r\n g_iPassCount++;\r\n //Increment the snapshot count\r\n g_iSnapshotCount++;\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n \r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n //new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \"</B></FONT></TD></TR>\");\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n }\r\n else\r\n {\r\n if (strResult.toUpperCase().equals(\"FAIL\")){\r\n //Increment the SnapShot count\r\n g_iSnapshotCount++ ;\r\n\r\n //Increment the Fail Count\r\n g_iFailCount++;\r\n\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n\r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=RED><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n \r\n }else if (strResult.toUpperCase().equals(\"DONE\")){ \r\n \tstrResult = \"Pass\";\r\n //Write Results into the file\r\n \tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount +\"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\"+ strDescription +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\"+ strObtainedValue +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=LimeGreen><B>\"+ strResult +\"</B></FONT></TD></TR>\");\r\n }\r\n \r\n }\r\n try\r\n {\t\t\t\r\n \t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n }", "public static String setupText(String RegistrationCode) {\n return \"<style>\" +\n \"@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');\" +\n \"</style>\" +\n \"<body>\\n\" +\n \" <div class=\\\"es-wrapper-color\\\">\\n\" +\n \" <table class=\\\"es-wrapper\\\" width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-email-paddings\\\" valign=\\\"top\\\">\\n\" +\n \" <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"es-content esd-header-popover\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"es-header\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-stripe\\\" esd-custom-block-id=\\\"7681\\\" align=\\\"center\\\">\\n\" +\n \" <table class=\\\"es-header-body\\\" style=\\\"background-color: #8884cc;\\\" width=\\\"550\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bgcolor=\\\"#74cfb7\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-structure es-p15t es-p15b es-p15r es-p15l\\\" align=\\\"left\\\">\\n\" +\n \" <table class=\\\"es-left\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" align=\\\"left\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"es-m-p0r es-m-p20b esd-container-frame\\\" width=\\\"328\\\" valign=\\\"top\\\" align=\\\"center\\\">\\n\" +\n \" <table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-block-text es-m-txt-c es-p5\\\" align=\\\"left\\\">\\n\" +\n \" <h1 style=\\\"color: #ffffff; line-height: 100%; font-family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\">Confirm your Registration<br></h1>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" <table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" align=\\\"right\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr class=\\\"es-hidden\\\">\\n\" +\n \" <td class=\\\"es-m-p20b esd-container-frame\\\" esd-custom-block-id=\\\"7704\\\" width=\\\"172\\\" align=\\\"left\\\">\\n\" +\n \" <table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td>\\n\" +\n \" <table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" align=\\\"right\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td align=\\\"center\\\" class=\\\"esd-empty-container\\\" style=\\\"display: none;\\\"></td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" <table class=\\\"es-content\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-stripe\\\" align=\\\"center\\\">\\n\" +\n \" <table class=\\\"es-content-body\\\" width=\\\"550\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bgcolor=\\\"#ffffff\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-structure es-p20t es-p35r es-p35l\\\" esd-custom-block-id=\\\"7685\\\" align=\\\"left\\\">\\n\" +\n \" <table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-container-frame\\\" width=\\\"480\\\" valign=\\\"top\\\" align=\\\"center\\\">\\n\" +\n \" <table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-block-image es-p40t es-p25b es-p35r es-p35l\\\" align=\\\"center\\\" style=\\\"font-size: 0px; font-family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\"><a target=\\\"_blank\\\" href=\\\"<ahref=&quot;https://icon-library.net/icon/add-reminder-icon-2.html&quot;title=&quot;AddReminderIcon#348522&quot;\\\"><imgsrc=&quot;https://icon-library.net//images/add-reminder-icon/add-reminder-icon-2.jpg&quot;width=&quot;350&quot;/></a>\\\"><img top=200px src=\\\"https://www.pngkey.com/png/full/442-4421724_handshake-icon.png\\\" alt style=\\\"display: block;\\\" width=\\\"120\\\"></a></td>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-block-text\\\" align=\\\"center\\\">\\n\" +\n \" <h2 sytle=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\">\" +\"Welcome!\"+ \"</h2> \\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-block-text es-p15t es-p10b es-p40l\\\" align=\\\"left\\\">\\n\" +\n \" <p style=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\"><strong></strong></p>\\n\" +\n \" <p style=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\"><strong></br>Thank you for joining the MemTool Community!</strong></p>\\n\" +\n \" <p style=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\"><strong>MemTool is a memorization Tool for users who want a more efficient, organized, fun learning experience.</strong></p>\\n\" +\n \" <p style=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\"><strong>We are really excited to have you on board. First, you need to confirm your registration by using your personal registrationcode below in the program! </strong></p>\\n\" +\n \" <p style=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\"><strong>Your Registrationcode: \" + RegistrationCode + \"</strong></p>\\n\" +\n \" <p style=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\"><strong>Our Best, </p> Your MemTool Team</strong></p>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-block-spacer es-p20t es-p15b\\\" align=\\\"center\\\" style=\\\"font-size:0\\\">\\n\" +\n \" <table width=\\\"100%\\\" height=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" border=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td style=\\\"border-bottom: 3px solid #eeeeee; background: rgba(0, 0, 0, 0) none repeat scroll 0% 0%; height: 1px; width: 100%; margin: 0px;\\\"></td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-structure es-p20t es-p40b es-p35r es-p35l\\\" esd-custom-block-id=\\\"7685\\\" align=\\\"left\\\">\\n\" +\n \" <table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-container-frame\\\" width=\\\"480\\\" valign=\\\"top\\\" align=\\\"center\\\">\\n\" +\n \" <table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-block-text es-p20t\\\" align=\\\"right\\\">\\n\" +\n \" <p style=\\\"front family: roboto, 'helvetica neue', helvetica, arial, sans-serif;\\\">This mail was created automatically by MemTool<br>Please do not reply<br><br>*for a proper view, please disable darkmode</p>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" <table class=\\\"es-content\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"es-content\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-stripe\\\" esd-custom-block-id=\\\"7766\\\" align=\\\"center\\\">\\n\" +\n \" <table class=\\\"es-content-body\\\" style=\\\"border-bottom:10px solid #ffd42c;background-color: #ffffff;\\\" width=\\\"550\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bgcolor=\\\"#ffd42c\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" <td class=\\\"esd-structure\\\" align=\\\"left\\\">\\n\" +\n \" <table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"es-footer\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" <table class=\\\"esd-footer-popover es-content\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" align=\\\"center\\\">\\n\" +\n \" <tbody>\\n\" +\n \" <tr>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </td>\\n\" +\n \" </tr>\\n\" +\n \" </tbody>\\n\" +\n \" </table>\\n\" +\n \" </div>\\n\" +\n \"</body>\\n\" +\n \"\\n\" +\n \"</html>\";\n }", "public String getHtmlRepresentation() {\n\t\treturn getHtmlRepresentation(constraintSets);\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "public String getHtml() {\n return html;\n }", "private void printBoardAndCandidatesHtmlFile() {\n printBoardAndCandidatesHtmlFile(\"java-implementation/target/classes/sudokuBoard.html\", sudokuBoard);\n }", "public AdmClientePreferencialHTML() {\n/* 191 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 193 */ buildDocument();\n/* */ }", "public static String getPollsHTML() {\r\n\t\tPollsController pc = new PollsController(PC.filterPolls(\"\", true, 0));\r\n\t\treturn xmlToHTML(\"/WEB-INF/PollsMainTransform.xsl\", pc,\r\n\t\t\t\tPollsController.class);\r\n\t}", "private void createBody(Composite parent) {\r\n\t\tcomposite = new Composite(parent, SWT.NONE);\r\n\t\tcomposite.setBackground(Display.getCurrent().getSystemColor(\r\n\t\t\t\tSWT.COLOR_WHITE));\r\n\t\tcomposite.setLayout(null);\r\n\t\tcomposite.setBounds(new Rectangle(0, 0, 360, 207));\r\n\r\n\r\n\t\tLabel msLogo = new Label(composite, SWT.NO_BACKGROUND);\r\n\t\tlogo = new Image(shell.getDisplay(),IMAGE_PATH + \"logo_up.gif\");\r\n\t\tmsLogo.setImage(logo);\r\n\t\tmsLogo.setBounds(new Rectangle(20, 55, 96, 96));\r\n\t\t\r\n\t\t/*labelLogo = new Label(composite, SWT.NO_BACKGROUND);\r\n\t\tlogo = new Image(shell.getDisplay(),IMAGE_PATH+ \"logo_down.png\");\r\n\t\tlabelLogo.setImage(logo);\r\n\t\tlabelLogo.setBounds(new Rectangle(5, 5 + 96 + 5, 96, 96));\r\n*/\r\n\r\n\r\n\t\tlabelHeader = new Label(composite, SWT.NONE);\r\n\t\tlabelHeader.setForeground(SWTResourceManager.getColor(255, 128, 128));\r\n\t\tlabelHeader.setBounds(new Rectangle(130, 15, 168, 30));\r\n\t\tlabelHeader.setFont(new Font(Display.getDefault(), \"Tahoma\", 14,SWT.NORMAL));\r\n\t\tlabelHeader.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r\n\t\tlabelHeader.setText(\"关于CTC仿真系统\");\r\n\r\n\t\tlinkWeb = new Link(composite, SWT.NONE);\r\n\t\tlinkWeb.setBounds(new Rectangle(175, 140, 63, 18));\r\n\t\tlinkWeb.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r\n\t\tlinkWeb.setText(\"<a>详细信息</a>\");\r\n\t\tlinkWeb.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tProgram.launch(\"http://www.bjtu.edu.cn/\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\temailLink = new Link(composite, SWT.NONE);\r\n\t\temailLink.setBounds(new Rectangle(145, 180, 153, 18));\r\n\t\temailLink.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r\n\t\temailLink.setText(\"<a>版权所有© CTC开发小组</a>\");\r\n\t\temailLink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tProgram.launch(\"mailto:[email protected]\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tlabelHeader_1 = new Label(composite, SWT.NONE);\r\n\t\tlabelHeader_1.setBounds(130, 55, 113, 30);\r\n\t\tlabelHeader_1.setFont(SWTResourceManager.getFont(\"Tahoma\", 14, SWT.NONE));\r\n\t\tlabelHeader_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlabelHeader_1.setText(\"版本:V1.0\");\r\n\r\n\t\tlabelHeader_2 = new Label(composite, SWT.NONE);\r\n\t\tlabelHeader_2.setBounds(130, 100, 208, 30);\r\n\t\tlabelHeader_2.setFont(SWTResourceManager.getFont(\"Tahoma\", 14, SWT.NONE));\r\n\t\tlabelHeader_2.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlabelHeader_2.setText(\"开发者:CTC开发小组\");\r\n\t}", "public interface Telematics {\n\n void report(VehicleInfo vehicleInfo) throws IOException;\n\n String HTML = \"<html>\\n\" +\n \"<title>Vehicle Telematics Dashboard</title>\\n\" +\n \"<body>\\n\" +\n \"<h1 align=\\\"center\\\">Averages for num_vehicles vehicles</h1>\\n\" +\n \"<table align=\\\"center\\\">\\n\" +\n \" <tr>\\n\" +\n \" <th>Odometer (miles) |</th><th>Consumption (gallons) |</th><th>Last Oil Change |</th><th>Engine Size (liters)</th>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td align=\\\"center\\\">odometer_average</td><td align=\\\"center\\\">consumption_average</td><td align=\\\"center\\\">oc_average</td align=\\\"center\\\"><td align=\\\"center\\\">es_average</td>\\n\" +\n \" </tr>\\n\" +\n \"</table>\\n\" +\n \"<h1 align=\\\"center\\\">History</h1>\\n\" +\n \"<table align=\\\"center\\\" border=\\\"1\\\">\\n\" +\n \" <tr>\\n\" +\n \" <th>VIN</th><th>Odometer (miles)</th><th>Consumption (gallons)</th><th>Last Oil Change</th><th>Engine Size (liters)</th>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td align=\\\"center\\\">0123456</td><td align=\\\"center\\\">111.1</td><td align=\\\"center\\\">222.2</td><td align=\\\"center\\\">333.3</td align=\\\"center\\\"><td align=\\\"center\\\">2.0</td>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td align=\\\"center\\\">45435</td><td align=\\\"center\\\">123</td><td align=\\\"center\\\">234</td><td align=\\\"center\\\">345</td align=\\\"center\\\"><td align=\\\"center\\\">4.5</td>\\n\" +\n \" </tr>\\n\" +\n \"</table>\\n\" +\n \"</body>\\n\" +\n \"</html>\\n\";\n\n\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 }", "@Override\n \tprotected void produceVisibleOutput(QContent qc,boolean bInit,boolean bPlain)\n \t\tthrows OmException\n \t{\n \t\tif(bPlain)\n \t\t{\n \t\t\t// Put text equivalent\n \t\t\tElement eDiv=qc.createElement(\"div\"); // Can't use span because they aren't allowed to contain things\n \t\t\teDiv.setAttribute(\"style\",\"display:inline\");\n \t\t\taddLangAttributes(eDiv);\n \t\t\tqc.addInlineXHTML(eDiv);\n \t\t\tXML.createText(eDiv,getString(\"alt\"));\n \t\t\tqc.addTextEquivalent(getString(\"alt\"));\n \n \t\t\t// Markers are not supported in plain mode\n \t\t\treturn;\n \t\t}\n \n \t\t// If image has changed, send new version\n \t\tif(bChanged)\n \t\t{\n \t\t\tbyte[] imageData;\n \t\t\tString mimeType;\n \t\t\tif (getString(PROPERTY_TYPE).equals(\"png\")) {\n \t\t\t\timageData = QContent.convertPNG(bi);\n \t\t\t\tmimeType = \"image/png\";\n \t\t\t} else if (getString(PROPERTY_TYPE).equals(\"jpg\")) {\n \t\t\t\timageData = QContent.convertJPG(bi);\n \t\t\t\tmimeType = \"image/jpeg\";\n \t\t\t} else {\n \t\t\t\tthrow new OmUnexpectedException(\"Unknown canvas type. Only png and jpg are valid.\");\n \t\t\t}\n \t\t\tMessageDigest md;\n \t\t\ttry {\n \t\t\t\tmd = MessageDigest.getInstance(\"SHA-1\");\n \t\t\t} catch (NoSuchAlgorithmException e) {\n \t\t\t\tthrow new OmUnexpectedException(e);\n \t\t\t}\n \t\t\tfilename = \"canvas-\" + getID() + \"-\" +\n \t\t\t\t\tStrings.byteArrayToHexString(md.digest(imageData)) + \".\" + getString(PROPERTY_TYPE);\n \t\t\tqc.addResource(filename, mimeType, imageData);\n \t\t}\n \n \t\tElement eEnsureSpaces=qc.createElement(\"div\");\n \t\teEnsureSpaces.setAttribute(\"class\",\"canvas\");\n \t\taddLangAttributes(eEnsureSpaces);\n \t\tqc.addInlineXHTML(eEnsureSpaces);\n \t\tXML.createText(eEnsureSpaces,\" \");\n \n \t\tString sImageID=QDocument.ID_PREFIX+getID()+\"_img\";\n \t\tElement eImg=XML.createChild(eEnsureSpaces,\"img\");\n \t\teImg.setAttribute(\"id\",sImageID);\n \t\teImg.setAttribute(\"onmousedown\",\"return false;\"); // Prevent Firefox drag/drop\n \t\teImg.setAttribute(\"src\",\"%%RESOURCES%%/\"+filename);\n \t\teImg.setAttribute(\"alt\",getString(\"alt\"));\n \n \t\t// Get zoom, marker size and hotspot position.\n \t\tdouble dZoom=getQuestion().getZoom();\n \t\tint iMarkerSize;\n \t\tif (dZoom>=2.0)\n \t\t{\n \t\t\tiMarkerSize=31;\n \t\t}\n \t\telse if (dZoom>=1.5)\n \t\t{\n \t\t\tiMarkerSize=23;\n \t\t}\n \t\telse\n \t\t{\n \t\t\tiMarkerSize=15;\n \t\t}\n \n \t\tint[] hotspotPositions=parseHotspotProperty(getString(PROPERTY_MARKERHOTSPOT),iMarkerSize);\n \n \t\tString sMarkerPrefix=getString(PROPERTY_MARKERIMAGE);\n \t\tif(bInit && !lMarkers.isEmpty())\n \t\t{\n \t\t\tif (sMarkerPrefix==null)\n \t\t\t{\n \t\t\t\tsetString(PROPERTY_MARKERIMAGE, \"canvasm\");\n \t\t\t\tsMarkerPrefix=\"canvasm\"+iMarkerSize;\n \t\t\t\ttry\n \t\t\t\t{\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\".gif\",\"image/gif\",\n \t\t\t\t\t\tIO.loadResource(CanvasComponent.class,sMarkerPrefix+\".gif\"));\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\"d.gif\",\"image/gif\",\n \t\t\t\t\t\tIO.loadResource(CanvasComponent.class,sMarkerPrefix+\"d.gif\"));\n \t\t\t\t}\n \t\t\t\tcatch(IOException e)\n \t\t\t\t{\n \t\t\t\t\tthrow new OmUnexpectedException(e);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tsMarkerPrefix+=iMarkerSize;\n \t\t\t\ttry\n \t\t\t\t{\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\".gif\",\"image/gif\",\n \t\t\t\t\t\t\tgetQuestion().loadResource(sMarkerPrefix+\".gif\"));\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\"d.gif\",\"image/gif\",\n \t\t\t\t\t\t\tgetQuestion().loadResource(sMarkerPrefix+\"d.gif\"));\n \t\t\t\t}\n \t\t\t\tcatch(IOException e)\n \t\t\t\t{\n \t\t\t\t\tthrow new OmDeveloperException(\"Marker image not found: \"+sMarkerPrefix, e);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\telse\n \t\t{\n \t\t\tsMarkerPrefix+=iMarkerSize;\n \t\t}\n \t\tif(!lMarkers.isEmpty())\n \t\t{\n \t\t\tElement eScript=XML.createChild(eEnsureSpaces,\"script\");\n \t\t\teScript.setAttribute(\"type\",\"text/javascript\");\n \t\t\tXML.createText(eScript,\n \t\t\t\t\"addOnLoad(function() { canvasInit('\"+getID()+\"','\"+QDocument.ID_PREFIX+\"',\"+\n \t\t\t\tisEnabled()+\",\"+hotspotPositions[0]+\",\"+hotspotPositions[1]+\",\"+\n \t\t\t\t((int)(dZoom * 4.0)) + \",'\"+\n \t\t\t\t(getQuestion().isFixedColour() ? getQuestion().getFixedColourFG() : \"black\")+\n \t\t\t\t\"','\"+\n \t\t\t\t(getQuestion().isFixedColour() ? getQuestion().getFixedColourBG() :\n \t\t\t\t\tconvertHash(getBackground()))+\n \t\t\t\t\"',\" + (int)(dZoom * 10.0)+\n \t\t\t\t\"); });\");\n \t\t\tElement eDynamic=XML.createChild(eEnsureSpaces,\"div\");\n \t\t\teDynamic.setAttribute(\"id\",QDocument.ID_PREFIX+getID()+\"_dynamic\");\n \t\t}\n \n\t\tint iIndex=0;\n \t\tfor(Marker m : lMarkers)\n \t\t{\n \t\t\tElement eMarker=XML.createChild(eEnsureSpaces,\"img\");\n\t\t\teMarker.setAttribute(\"id\",QDocument.ID_PREFIX+getID()+\"_marker\"+iIndex);\n \t\t\teMarker.setAttribute(\"src\",\"%%RESOURCES%%/\"+sMarkerPrefix+\n \t\t\t\t(isEnabled() ? \"\" : \"d\") + \".gif\");\n \t\t\teMarker.setAttribute(\"class\",\"canvasmarker\");\n \t\t\tif(isEnabled())\teMarker.setAttribute(\"tabindex\",\"0\");\n \t\t\tElement eScript=XML.createChild(eEnsureSpaces,\"script\");\n \t\t\teScript.setAttribute(\"type\",\"text/javascript\");\n \t\t\tWorld w=m.sWorld==null ? null : getWorld(m.sWorld);\n \t\t\tXML.createText(eScript,\n \t\t\t\t\"addOnLoad(function() { canvasMarkerInit('\"+getID()+\"','\"+QDocument.ID_PREFIX+\"','\"+\n \t\t\t\tm.sLabelJS.replaceAll(\"'\",\"\\\\\\\\'\")+\"',\"+\n \t\t\t\tgetWorldFactors(w,dZoom)+\"); });\");\n \t\t\tElement eInputX=XML.createChild(eEnsureSpaces,\"input\");\n \t\t\teInputX.setAttribute(\"type\",\"hidden\");\n \t\t\teInputX.setAttribute(\"value\",\"\"+(int)(m.iX*dZoom));\n\t\t\teInputX.setAttribute(\"name\",QDocument.ID_PREFIX+\"canvasmarker_\"+getID()+\"_\"+iIndex+\"x\");\n \t\t\teInputX.setAttribute(\"id\",eInputX.getAttribute(\"name\"));\n \t\t\tElement eInputY=XML.createChild(eEnsureSpaces,\"input\");\n \t\t\teInputY.setAttribute(\"type\",\"hidden\");\n \t\t\teInputY.setAttribute(\"value\",\"\"+(int)(m.iY*dZoom));\n\t\t\teInputY.setAttribute(\"name\",QDocument.ID_PREFIX+\"canvasmarker_\"+getID()+\"_\"+iIndex+\"y\");\n \t\t\teInputY.setAttribute(\"id\",eInputY.getAttribute(\"name\"));\n \n\t\t\tif(isEnabled()) qc.informFocusable(QDocument.ID_PREFIX+getID()+\"_marker\"+iIndex,bPlain);\n \t\t}\n \t\tfor(MarkerLine ml : lLines)\n \t\t{\n \t\t\tWorld w=ml.sWorld==null ? null : getWorld(ml.sWorld);\n \n \t\t\tElement eScript=XML.createChild(eEnsureSpaces,\"script\");\n \t\t\teScript.setAttribute(\"type\",\"text/javascript\");\n \t\t\tXML.createText(eScript,\n \t\t\t\t\"addOnLoad(function() { canvasLineInit('\"+getID()+\"','\"+QDocument.ID_PREFIX+\"',\"+\n \t\t\t\tml.iFrom+\",\"+ml.iTo+\",'\"+ml.sLabelJS.replaceAll(\"'\",\"\\\\\\\\'\")+\"',\" +\n \t\t\t\tgetWorldFactors(w,dZoom)+\n \t\t\t\t\"); });\");\n \t\t}\n \n \t\tXML.createText(eEnsureSpaces,\" \");\n \t\tqc.addTextEquivalent(getString(\"alt\"));\n \t}", "public void writeToHTML(Match match) {\n ArrayList<String> template = new ArrayList<>();\n ArrayList<String> html = new ArrayList<>();\n ArrayList<Player> roster = new ArrayList<>();\n roster.addAll(match.getRoster().getAllPlayers());\n \n Scanner read = null;\n String fileTemplate = \"template.html\";\n String filePrint = match.getDate().toStringShort() \n + \"_\" + match.getOpponent() + \".html\";\n \n try {\n FileInputStream fileIn = new FileInputStream(fileTemplate);\n read = new Scanner(fileIn);\n }\n catch(FileNotFoundException e) {\n displayErrorMessage(\"File not found\", filePrint);\n }\n while(read.hasNext()) {\n template.add(read.nextLine());\n }\n read.close();\n \n String line = \"\";\n \n for(int i=0; i<template.size(); i++) {\n line = template.get(i);\n \n // Check match for null values\n String date, opponent, start, location, type;\n if(match.getDate().toStringShort().equals(\"0-00-00\")) {\n date = \"\"; \n } else {\n date = match.getDate().toStringShort();\n }\n if(match.getOpponent() == null) {\n opponent = \"\";\n } else {\n opponent = match.getOpponent();\n }\n if(match.getDate().toStringTime().equals(\"00:00\")) {\n start = \"\";\n } else {\n start = match.getDate().toStringTime();\n }\n if(match.getLocation() == null) {\n location = \"\";\n } else {\n location = match.getLocation();\n }\n if(match.getMatchType() == MatchType.none) {\n type = \"\";\n } else {\n type = match.getMatchType().toString();\n }\n \n // Replace values\n if(line.contains(\"$match\")) {\n line = line.replace(\"$match\",\n date + \" - \" + opponent);\n html.add(line);\n } else if(line.contains(\"$start\")) {\n line = line.replace(\"$start\", start);\n html.add(line);\n } else if(line.contains(\"$location\")) {\n line = line.replace(\"$location\", location);\n html.add(line);\n } else if(line.contains(\"$type\")) {\n line = line.replace(\"$type\", type);\n html.add(line);\n } else if(line.contains(\"$number\")) {\n \n // Replace values for each player\n for(int j=0; j<roster.size(); j++) {\n String temp = line;\n Player player = roster.get(j);\n String number, firstName=null, lastName, name=\"\", position;\n \n // Check player for null values\n if(player.getNumber() < 0) {\n number = \"\";\n } else {\n number = Integer.toString(player.getNumber());\n }\n if(player.getLastname() == null) {\n lastName = \"\"; \n } else {\n lastName = player.getLastname();\n name += lastName;\n }\n if(player.getFirstname() == null) {\n firstName = \"\";\n } else {\n firstName = String.valueOf(player.getFirstname().charAt(0));\n if(!(lastName.equals(\"\"))) {\n name += \", \";\n }\n name += firstName + \".\";\n }\n if(player.getPreferredPosition() == PositionType.none) {\n position = \"\";\n } else {\n position = player.getPreferredPosition().toString();\n }\n \n // Replace values in temp line\n temp = temp.replace(\"$number\", number);\n temp = temp.replace(\"$name\", name);\n temp = temp.replace(\"$position\",position);\n \n html.add(temp);\n } \n } else {\n html.add(line);\n }\n }\n PrintWriter write = null;\n try {\n FileOutputStream fileOut = new FileOutputStream(filePrint);\n write = new PrintWriter(fileOut);\n \n for(int i=0; i < html.size(); i++) {\n write.println(html.get(i));\n }\n }\n catch(FileNotFoundException e)\n {\n displayErrorMessage(\"File not found\", filePrint);\n }\n write.close();\n \n Alert printAlert = new Alert(Alert.AlertType.INFORMATION, filePrint + \" is ready for printing\", ButtonType.OK);\n printAlert.setTitle(\"Print Information\");\n printAlert.setHeaderText(null);\n printAlert.showAndWait();\n if(printAlert.getResult() == ButtonType.OK);\n }", "public String toString() {\r\n HtmlTable htmlTable= createHtmlTable();\r\n String html= htmlTable.toString();\r\n if (StringUtils.isBlank(height) && StringUtils.isBlank(width)) {\r\n return html;\r\n }\r\n String outer= StringUtils.trimToEmpty(cssClassOuterTable);\r\n if (StringUtils.isNotEmpty(outer)) {\r\n outer= \"class='\" + outer + \"' \";\r\n }\r\n \r\n html= Printf.p(HTML_SIZE_CONTROL_TABLE, outer, height, width, html);\r\n return html;\r\n }", "private String getHtmlRepresentation(List<ColumnConstraintSet<R, ?>> filters) {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tbuf.append(\"<table valign=top cellspacing=5 cellpadding=0>\");\n\t\tbuf.append(\"<tr>\");\n\t\t// The first row has an empty first column\n\t\t// so that additional rows can display an \"AND\"\n\t\tbuf.append(\"<td></td><td>\");\n\t\tbuf.append(filters.get(0).getHtmlRepresentation());\n\t\tbuf.append(\"</td></tr>\");\n\t\tGColor gray = Palette.GRAY;\n\t\tString grayHex = gray.toHexString();\n\t\tfor (int i = 1; i < filters.size(); i++) {\n\t\t\tbuf.append(\"<tr><td style=\\\"color:\").append(grayHex).append(\"\\\"> \");\n\t\t\tbuf.append(filters.get(i).getLogicOperation());\n\t\t\tbuf.append(\"&nbsp;</td><td>\");\n\t\t\tbuf.append(filters.get(i).getHtmlRepresentation());\n\t\t\tbuf.append(\"</td></tr>\");\n\t\t}\n\t\tbuf.append(\"</table>\");\n\t\tbuf.append(\"</html>\");\n\n\t\treturn buf.toString();\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "public void createHTMLpage(String jarFilename) {\r\n\t\tJFileChooser chooser = OSPRuntime.createChooser(\"HTML\", new String[] { \"html\" });\r\n\t\tchooser.setSelectedFile(new File(getModelClassname() + \".html\"));\r\n\t\tString filename = OSPRuntime.chooseFilename(chooser, popupTriggeredBy, true); // true = to save\r\n\t\tif (filename == null)\r\n\t\t\treturn;\r\n\t\tif (filename.lastIndexOf('.') < 0)\r\n\t\t\tfilename += \".html\";\r\n\r\n\t\tComponent mainWindow = getView().getComponent(getMainWindow());\r\n\t\tDimension size = new Dimension(100, 100);\r\n\t\tif (mainWindow != null)\r\n\t\t\tsize = mainWindow.getSize();\r\n\r\n\t\tString name = getClass().getName();\r\n\t\t// System.out.println (\"Classname = \"+name);\r\n\t\tif (name.endsWith(\"Simulation\"))\r\n\t\t\tname = name.substring(0, name.length() - 10);\r\n\t\tname += \"Applet.class\";\r\n\t\tString programName = getModelClassname();\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\tbuffer.append(\"<html>\\n\");\r\n\t\tbuffer.append(\" <head>\\n\");\r\n\t\tbuffer.append(\" <title>\" + programName + \" HTML</title>\\n\");\r\n\t\tbuffer.append(\" </head>\\n\");\r\n\t\tbuffer.append(\" <body >\\n\");\r\n\t\tbuffer.append(\" <applet code=\\\"\" + name + \"\\\"\\n\");\r\n\t\tbuffer.append(\" codebase=\\\".\\\" archive=\\\"\" + jarFilename + \"\\\"\\n\");\r\n\t\tbuffer.append(\" name=\\\"\" + programName + \"\\\" id=\\\"\" + programName + \"\\\"\\n\");\r\n\t\tbuffer.append(\" width=\\\"\" + size.width + \"\\\" height=\\\"\" + size.height + \"\\\">\\n\");\r\n\t\tbuffer.append(\" <param name=\\\"permissions\\\" value=\\\"sandbox\\\">\\n\");\r\n\t\tbuffer.append(\" </applet>\\n\");\r\n\t\tbuffer.append(\" </body>\\n\");\r\n\t\tbuffer.append(\"</html>\\n\");\r\n\r\n\t\ttry {\r\n\t\t\tFileWriter fout = new FileWriter(filename);\r\n\t\t\tfout.write(buffer.toString());\r\n\t\t\tfout.close();\r\n\t\t} catch (Exception exc) {\r\n\t\t\texc.printStackTrace();\r\n\t\t\tJOptionPane.showMessageDialog(popupTriggeredBy, \"Error saving file: \" + filename, \"File Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "protected GuiTestObject html_main() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"html_main\"));\n\t}", "public abstract String visualizar();", "private String getTemplate(boolean all){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\t\t\t \r\n\t\t\t if(!all){\r\n\t\t\t \tsb.append(\"<tpl if=\\\"age &gt; 30\\\">\");\r\n\t\t\t }else{\r\n\t\t\t \tsb.append(\"<tpl>\");\r\n\t\t\t }\r\n\t\t\t sb.append(\"<p>Age: {age}</p>\");\r\n\t\t\t\tsb.append(\"<p>Sex: {gender}</p>\");\r\n\t\t\t\tsb.append(\"<p>Name: {name}</p>\"); \t\t\t \t\r\n\t\t\t\tsb.append(\"<p>Email: {email}</p>\");\r\n\t\t\t\tsb.append(\"<p>Reviews : </p>\");\r\n\t\t\t\tsb.append(\"<ul>\");\r\n\t\t\t\tsb.append(\"<tpl for=\\\"reviews\\\">\");\t\r\n\t\t\t\tsb.append(\"<li>{title}</li>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t\tsb.append(\"</ul>\");\r\n\t\t\t\tsb.append(\"<hr />\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}", "private void buildOutput() {\n\t\tsalesSlip.addName(itemField.getText());\n\t\tsalesSlip.addPrice(Double.parseDouble(costField.getText()), Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.addQuantity(Integer.parseInt(quantityField.getText()));\n\t\tsalesSlip.updatePrice();\n\t\t\n\t\ttextArea.append(salesSlip.generateOutput(salesSlip.numItems-1));\n\t\ttextArea.append(\"\\n\");\n\t\t\n\t\ttotalArea.setText(\"$\" + salesSlip.totalPrice);\n\t}", "@Override\n public Writable formatEntities(CustomList<Entity> entities) {\n /* Create the HTML table. */\n HtmlElem table = new HtmlElem(\"table\");\n table.withAttr(\"Border\",\"1\");\n\n /* Define columns name and insert it to the classes. */\n HtmlElem trHeaders = new HtmlElem(\"tr\");\n trHeaders.with(th(text(\"Class ID\")))\n .with(th(text(\"Course Name\")))\n .with(th(text(\"Academic Year\")))\n .with(th(text(\"Academic Semester\")));\n table.with(trHeaders);\n\n /* For each class in the classes list insert it to the table. */\n HtmlElem trData;\n for (int i = 0; i < entities.size(); i++) {\n /* Get current class. */\n Class _class = (Class) entities.get(i);\n\n /* Create the table row that will contain the representation of the class. */\n trData = new HtmlElem(\"tr\");\n String semYear = String.valueOf(_class.getaYear()) + Utils.semMap.get(_class.getaSemester());\n trData.with(td(a(\"/courses/\" + acr + \"/classes/\" + semYear + \"/\" + _class.getId(), _class.getId())))\n .with(td(text(_class.getcName())))\n .with(td(a(\"/courses/\" + acr + \"/classes/\" + semYear, String.valueOf(_class.getaYear()))))\n .with(td(a(\"/courses/\" + acr + \"/classes/\" + semYear, _class.getaSemester())));\n\n /* Add the current row to the table. */\n table.with(trData);\n }\n return table;\n }", "private static void outputHeader(XMLTree channel, SimpleWriter out) {\n assert channel != null : \"Violation of: channel is not null\";\n assert out != null : \"Violation of: out is not null\";\n assert channel.isTag() && channel.label().equals(\"channel\") : \"\"\n + \"Violation of: the label root of channel is a <channel> tag\";\n assert out.isOpen() : \"Violation of: out.is_open\";\n\n int start = 0;\n int titleIndex = getChildElement(channel, \"title\");\n int descriptionIndex = getChildElement(channel, \"description\");\n int itemIndex = getChildElement(channel, \"item\");\n int linkIndex = getChildElement(channel, \"link\");\n \n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n // if there's no title print that\n\t\tif(channel.child(titleIndex).numberOfChildren() == 0)\n\t\t{\n\t\t\tout.println(\"<head>\");\n\t\t\tout.println(\"<title> Empty Title </title>\");\n\t\t\tout.println(\"<a href=\" + channel.child(linkIndex).child(0) + \"><h1>\" + channel.child(titleIndex).child(0) + \"</h1>\");\n\t\t\tout.println(\"</head>\");\n\t\t}\n\t\t// else print title\n\t\telse\n\t\t{\n\t\t\tout.println(\"<head>\");\n\t\t\tout.println(\"<title>\" + channel.child(titleIndex).child(0) + \"</title>\");\n \t\tout.println(\"<a href=\\\"\" + channel.child(linkIndex).child(0) +\"\\\"><h1> \" + channel.child(titleIndex).child(0) + \"</h1></a>\");\n \t\tout.println(\"</head>\");\n\t\t}\n\t\t\n\t\t// if no description\n\t\tif(channel.child(descriptionIndex).numberOfChildren() == 0)\n\t\t{\n\t\t\tout.println(\"<p>\");\n\t\t\tout.println(\"No description\");\n\t\t\tout.println(\"</p>\");\n\t\t}\n\t\t// else print description\n\t\telse\n\t\t{\n\t\t\tout.println(\"<p>\");\n\t\t\tout.println(channel.child(descriptionIndex).child(0));\n\t\t\tout.println(\"</p>\");\n\t\t} \n\t\t\n\t\t// print out basic setup for the table\n\t\tout.println(\"<table border=\\\"1\\\">\");\n\t\tout.println(\"<tr>\");\n \tout.println(\"<th>Date</th>\");\n \tout.println(\"<th>Source</th>\");\n \tout.println(\"<th>News</th>\");\n \tout.println(\"</tr>\");\n \t\n \tfor(int i = 0; i < channel.numberOfChildren() - itemIndex; i++)\n \t{\n \t\tprocessItem(channel.child(itemIndex + i), out);\n \t}\n }", "public void generateComponentHTML(JspWriter p) throws IOException\r\n\t{\r\n\t\tJspLink link = (JspLink) getHelper().getController().getComponent(getName());\r\n\t\tif (link == null)\r\n\t\t\treturn;\r\n\t\tHtmlComponent comp = getHelper().getComponent();\r\n\t\tint startRow = -1;\r\n\t\tif (_title != null)\r\n\t\t\tlink.setTitle(_title);\r\n DataTableTag dt = getHelper().getDataTableTag();\r\n ListTag l = getHelper().getListTag();\r\n if (l!=null && dt!= null && (DataTableTag) findAncestorWithClass(l, DataTableTag.class) == dt)\r\n {\r\n dt=null;\r\n }\r\n\t\tif (dt != null)\r\n\t\t{\r\n\t\t\tstartRow = dt.getStartRow();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (l != null)\r\n\t\t\t{\r\n\t\t\t\tstartRow = l.getRow();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (comp != null)\r\n\t\t{\r\n\t\t\tTagWriter w = getTagWriter();\r\n\t\t\tw.setWriter(p);\r\n\t\t\tlink.generateHTML(w, _box, startRow);\r\n\t\t}\r\n\t}", "protected void render(){}", "private void buildReport() throws IOException {\n try (InputStream template = Thread.currentThread().getContextClassLoader().getResourceAsStream(TEMPLATE_DIR + \"/\" + TEMPLATE_NAME)) {\n reportDoc = Jsoup.parse(template, null, \"\");\n Element diffReportContainer = reportDoc.select(\".diffReport\").first();\n Element diffResultTable = diffReportContainer.select(\".diffResult\").first().clone();\n\n diffReportContainer.empty();\n\n for (SimpleImmutableEntry<String, List<File>> diffResult : fileDiffResults) {\n diffReportContainer.appendChild(getDiffTable(diffResultTable, diffResult));\n }\n }\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "@GET\r\n @Produces(\"application/xml\")\r\n public String getHtml() {\r\n // TODO return proper representation object\r\n \tString sql = \"SELECT GENDER, COUNT( PATIENT_ID ) AS NUMBEROFPATIENTS \" +\r\n \t\t\t\"FROM clinicaldetection, patient \" +\r\n \t\t\t\"WHERE clinicaldetection.PATIENT_ID = patient.PID \" +\r\n \t\t\t\"AND TIMES =1 \" +\r\n \t\t\t\"AND HBSAG =0 \" +\r\n \t\t\t\"AND PATIENT_ID \" +\r\n \t\t\t\"IN ( \" +\r\n \t\t\t\"SELECT PATIENT_ID \" +\r\n \t\t\t\"FROM CLINICALDETECTION \" + \r\n \t\t\t\"WHERE TIMES =3 \" +\r\n \t\t\t\"AND ANTIHBS =0 \" +\r\n \t\t\t\") \" +\r\n \t\t\t\"GROUP BY GENDER \";\r\n\r\n \t\r\n \treturn bean.query(sql);\r\n }" ]
[ "0.77029985", "0.7597029", "0.7174825", "0.67939687", "0.6660979", "0.66118747", "0.65626425", "0.6535208", "0.64895177", "0.64866114", "0.63923806", "0.6374149", "0.63368577", "0.63082355", "0.63055325", "0.6268277", "0.6239669", "0.6147816", "0.6143532", "0.61104035", "0.6108778", "0.60398567", "0.6039562", "0.60357773", "0.60083485", "0.6002185", "0.6000056", "0.5999438", "0.5986093", "0.5972263", "0.59713966", "0.5938724", "0.59249175", "0.5868433", "0.58572", "0.58430547", "0.5832639", "0.58052343", "0.580472", "0.5786072", "0.577399", "0.57439214", "0.5731331", "0.57073057", "0.57022595", "0.5700166", "0.5693735", "0.56925553", "0.5687332", "0.56815356", "0.5670573", "0.5670001", "0.5649438", "0.5623373", "0.56188107", "0.5607215", "0.5600879", "0.55969137", "0.55934507", "0.55918247", "0.55818594", "0.5576216", "0.5566185", "0.5565806", "0.5559904", "0.55542743", "0.5550554", "0.5532644", "0.55207497", "0.55186087", "0.55146515", "0.5499488", "0.5497016", "0.549198", "0.548469", "0.5482259", "0.54810816", "0.5481006", "0.54809505", "0.54764676", "0.5468352", "0.5467553", "0.5465803", "0.5464058", "0.54612577", "0.54487485", "0.544117", "0.5435051", "0.54326", "0.54294044", "0.54282135", "0.54254967", "0.54206586", "0.5415479", "0.5414775", "0.54146874", "0.5412898", "0.5407145", "0.54044276", "0.5404106" ]
0.64603704
10
CSS file for the table
private String cssFileForHtml() { return "<style>table, td, th {" + "border: 1px solid #ddd;" + "text-align: left;}" + "table {" + "border-collapse: collapse;" + "width: 100%;}" + "th, td {" + "padding: 10px;" + "color:#000000;" + "font-family: 'Roboto', sans-serif;}td{" + "font-size: smaller;}" + "th{background-color:#EEEEEE;color:#000000;}tr{background-color:#FFFFFF;}" + "tr:hover{background-color:#EEEEEE}</style>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTableCSS() {\n return \"k-data-table\";\n }", "@Override\n @Source({CellTable.Style.DEFAULT_CSS, \"../exercise/ScoresCellTableStyleSheet.css\"})\n TableResources.TableStyle cellTableStyle();", "public static String getCSS()\n {\n \treturn \"table.relations \"+\n\t\t \"{ \" +\n\t\t\t\" margin: 1em 1em 1em 2em;\" +\n\t\t\t\" border-collapse: collapse;\" +\n\t\t\t\" width:90%;\" +\n\t\t \"}\" +\n\t\t\"table.relations td\" + \n\t\t\"{\" +\n\t\t\" border-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tbackground: #fff;\" +\n\t\t\"\tpadding: 6px 6px 6px 12px;\" +\n\t\t\"\tcolor: #6D929B;\" +\n\t\t\"}\" +\n\t\t\"table.relations th\" + \n\t\t\"{\" +\n\t\t\"\tfont: bold 10px \\\"Trebuchet MS\\\", Verdana, Arial, Helvetica,\" +\n\t\t\"\tsans-serif;\" +\n\t\t\"\tcolor: #003399;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-top: 1px solid #C1DAD7;\" +\n\t\t\"\tletter-spacing: 2px;\" +\n\t\t\"\ttext-transform: uppercase;\" +\n\t\t\"\ttext-align: left;\" +\n\t\t\"\tpadding: 3px 3px 3px 6px;\" +\n\t\t\"\tbackground: #B0C4DE;\" +\n\t\t\"}\";\n }", "private void paint_table() {\n jScrollPane1.getViewport().setBackground(Color.WHITE);\n tabela.getTableHeader().setFont(new Font(\"Tahoma\", Font.BOLD, 12));\n tabela.getTableHeader().setOpaque(false);\n tabela.getTableHeader().setBackground(new Color(102, 102, 255));\n tabela.getTableHeader().setForeground(new Color(255, 255, 255));\n tabela.setRowHeight(50);\n }", "public TableEx() {\r\n setStyleName(\"gwtEx-Table\");\r\n rf = getRowFormatter();\r\n this.addClickHandler(tableClickTable);\r\n }", "public CMARichTableCell() {\n super(\"table-cell\");\n }", "private String getCSS() {\r\n StringBuffer css = new StringBuffer();\r\n css.append(\"<style type='text/css'>\");\r\n css.append(\"<!--\");\r\n css.append(\"\tA.pagina:link, A.pagina:visited, A.pagina:active, A.pagina:hover {\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-STYLE: normal;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-DECORATION: none ;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:link {\");\r\n css.append(\"\t\tCOLOR: #0039ba;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:visited {\");\r\n css.append(\"\t\tCOLOR: #6c8bc3;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:active {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:hover {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tTR.pagina{\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-ALIGN: center;\");\r\n css.append(\"\t\tCOLOR: gray;\");\r\n css.append(\"\t}\");\r\n css.append(\"-->\");\r\n css.append(\"</style>\");\r\n return (css.toString());\r\n }", "public void setTableStyleClass(String tableStyleClass)\r\n {\r\n _tableStyleClass = tableStyleClass;\r\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "Table getTable();", "@Override\n public void styleComponent(JComponent component) {\n JTable jTable = (JTable) component;\n super.styleComponent(jTable.getTableHeader());\n jTable.getTableHeader().setBorder(new LineBorder(Color.WHITE, 1));\n Font font = new Font(\"Helvetica\", Font.PLAIN, 30);\n jTable.setFont(font);\n Font headingFont = new Font(\"Helvetica\", Font.BOLD, 30);\n jTable.getTableHeader().setFont(headingFont);\n jTable.setRowHeight(100);\n jTable.setFillsViewportHeight(true);\n jTable.setShowGrid(false);\n super.styleComponent(((JComponent) jTable.getParent()));\n\n }", "public DayWiseClassTimeTable() {\n initComponents();\n jXTable1.setHorizontalScrollEnabled(true);\n jXTable1.setHighlighters(HighlighterFactory.createAlternateStriping());\n model = new TimeTableModel(3).createDefaultModel();\n jXTable1.setModel(model);\n \n loadClassAndSection();\n }", "public static StringBuilder getCss(boolean asTable) {\r\n\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tif (asTable) {\r\n\t\t\tsb.append(\"<style type=\\\"text/css\\\">\\n\");\r\n\r\n\t\t\tsb.append(\"body {\\n\");\r\n\t\t\tsb\r\n\t\t\t\t\t.append(\"font-family: Nokia Standard Multiscript, Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"font-size: 0.8em;\\n\");\r\n\t\t\tsb.append(\"color: #0055B7;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h1 {\\n\");\r\n\t\t\tsb.append(\"padding: 30px 0 0 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"#date {\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"hr {\\n\");\r\n\t\t\tsb.append(\"height: 1px;\\n\");\r\n\t\t\tsb.append(\"background-color: cccccc;\\n\");\r\n\t\t\tsb.append(\"color: #cccccc;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h2 h3 {\\n\");\r\n\t\t\tsb.append(\"padding: 10px 0 10px 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report {\\n\");\r\n\t\t\t// sb.append(\"table-layout: fixed\\n\");\r\n\t\t\tsb.append(\"width: 100%;\\n\");\r\n\t\t\tsb.append(\"border: 1px solid #e0dfe3;\\n\");\r\n\t\t\tsb.append(\"border-collapse: collapse;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"table-layout: fixed\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report th {\\n\");\r\n\t\t\tsb.append(\"text-align: left;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"background-color: #f9fafd;\\n\");\r\n\t\t\tsb.append(\"color: #595a5f;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 1px #999999 solid;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report th.featureName {\\n\");\r\n\t\t\tsb.append(\"background-color: #f2f2f3;\\n\");\r\n\t\t\tsb.append(\"font: #595a5f Tahoma, Verdana, Arial bold;\\n\");\r\n\t\t\tsb.append(\"font-size: 1.1em;\\n\");\r\n\t\t\tsb.append(\"border-top: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-top-style: double;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-bottom-style: double;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report td {\\n\");\r\n\t\t\tsb.append(\"word-wrap: normal;\\n\");\r\n\t\t\tsb.append(\"border: 1px #EBEBEB;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"border-style: solid; \\n\");\r\n\t\t\tsb.append(\"vertical-align: top;\\n\");\r\n\t\t\tsb.append(\"font: Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"_font-size: 0.8em;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary {\\n\");\r\n\t\t\tsb.append(\"border: 1px solid #e0dfe3;\\n\");\r\n\t\t\tsb.append(\"border-collapse: collapse;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary th {\\n\");\r\n\t\t\tsb.append(\"text-align: left;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"background-color: #f9fafd;\\n\");\r\n\t\t\tsb.append(\"color: #595a5f;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 1px #999999 solid;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary th.featureName {\\n\");\r\n\t\t\tsb.append(\"background-color: #f2f2f3;\\n\");\r\n\t\t\tsb.append(\"font: #595a5f Tahoma, Verdana, Arial bold;\\n\");\r\n\t\t\tsb.append(\"font-size: 1.1em;\\n\");\r\n\t\t\tsb.append(\"border-top: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-top-style: double;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-bottom-style: double;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary td {\\n\");\r\n\t\t\tsb.append(\"word-wrap: break-word;\\n\");\r\n\t\t\tsb.append(\"border: 1px #EBEBEB;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"border-style: solid; \\n\");\r\n\t\t\tsb.append(\"vertical-align: top;\\n\");\r\n\t\t\tsb.append(\"font: Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"_font-size: 0.8em;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".currentValue {\\n\");\r\n\t\t\tsb.append(\"background-color: #a3e5a9;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"</style>\\n\");\r\n\r\n\t\t} else {\r\n\t\t\tsb.append(\"<style type=\\\"text/css\\\">\\n\");\r\n\t\t\tsb.append(\"body {\\n\");\r\n\t\t\tsb.append(\"word-wrap: break-word;\\n\");\r\n\t\t\tsb\r\n\t\t\t\t\t.append(\"font-family: Nokia Standard Multiscript, Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"color: #0055B7;\\n\");\r\n\t\t\tsb.append(\"padding: 0 0 0 10px;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h1#reportName {\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"padding: 30px 0 0 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"#date {\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"page-break-after: always;\\n\");\r\n\t\t\tsb.append(\"padding: 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h2#tocHeader {\\n\");\r\n\t\t\tsb.append(\"padding: 20px 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"margin: inherit;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"ul.toc, ul.toc ul {\\n\");\r\n\t\t\tsb.append(\"font-size: 12px;\\n\");\r\n\t\t\tsb.append(\"margin: inherit;\\n\");\r\n\t\t\tsb.append(\"list-style-type: none;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"hr {\\n\");\r\n\t\t\tsb.append(\"page-break-after: always;\\n\");\r\n\t\t\tsb.append(\"height: 1px;\\n\");\r\n\t\t\tsb.append(\"background-color: cccccc;\\n\");\r\n\t\t\tsb.append(\"color: #cccccc;\\n\");\r\n\t\t\tsb.append(\"width: 100%;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".group, .subgroup, .feature, .setting {\\n\");\r\n\t\t\tsb.append(\"padding: 10px 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".subsetting {\\n\");\r\n\t\t\tsb.append(\"padding: 10px 0 0 20px;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h2, h3, h4, h5, h6 {\\n\");\r\n\t\t\tsb.append(\"padding: 0px;\\n\");\r\n\t\t\tsb.append(\"margin: 0px;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".description {\\n\");\r\n\t\t\tsb.append(\"font-size: 12px;\\n\");\r\n\t\t\tsb.append(\"margin: 0 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"padding: 0px;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".settingValues {\\n\");\r\n\t\t\tsb.append(\"padding: 0px;\\n\");\r\n\t\t\tsb.append(\"margin: 5px 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"font-size: 12px;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".Property {\\n\");\r\n\t\t\tsb.append(\"float: left;\\n\");\r\n\t\t\tsb.append(\"width: 200px;\\n\");\r\n\t\t\tsb.append(\"clear: both;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".Value {\\n\");\r\n\t\t\tsb.append(\"position: relative;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".PropertySum {\\n\");\r\n\t\t\tsb.append(\"float: left;\\n\");\r\n\t\t\tsb.append(\"margin-left: 50px;\\n\");\r\n\t\t\tsb.append(\"width: 200px;\\n\");\r\n\t\t\tsb.append(\"clear: both;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"</style>\\n\");\r\n\t\t}\r\n\t\treturn sb;\r\n\t}", "@Override\n\tpublic void configTable() {\n\t\tString[][] colNames = { { \"Name\", \"name\" }, { \"Ward No\", \"wardNo\" }, { \"Max. patients\", \"maxPatients\" }, { \"No of Patients\", \"patientCount\" },\n\t\t\t\t{ \"No of Employees\", \"employeeCount\" }};\n\n\t\tfor (String[] colName : colNames) {\n\t\t\tTableColumn<Ward, String> col = new TableColumn<>(colName[0]);\n\t\t\tcol.setCellValueFactory(new PropertyValueFactory<>(colName[1]));\n\t\t\ttable.getColumns().add(col);\n\t\t}\n\n\t\ttable.setItems(tableData);\n\t\t\n\t}", "public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }", "public MyJTable createResultJTable(){\r\n\t\tmodel = new DefaultTableModel(getTableData(getRowNumber(), getTitle(), getAuthor(), getHyperLink(), getYear(), getAbstract(), getPublisher(), getMark(), getIsDuplicate(), getDigitalLibrary()), getColumnName()) {\r\n\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\tClass<?>[] types = new Class<?>[] { Integer.class, String.class, String.class, URL.class, String.class, String.class, String.class, Boolean.class, Boolean.class, String.class};\r\n\r\n\t\t\tpublic Class<?> getColumnClass(int columnIndex) {\r\n\t\t\t\treturn types[columnIndex];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*public Class getColumnClass(int col) {\r\n\t\t\t\tif (col == 6) return Boolean.class;\r\n\t\t\t\telse return Object.class;\r\n\t\t\t}*/\r\n\t\t};\r\n\t\t\r\n\t\tMyJTable table = new MyJTable(model);\r\n\t\t//Sap xep noi dung cac dong trong table theo thu tu alpha B.\r\n\t\t//Cho phep sap xep theo tu cot rieng biet\r\n\t\tTableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(table.getModel());\r\n\t\ttable.setRowSorter(sorter);\r\n\t\t\r\n\t\t/*\r\n\t\t * Set width of table column \r\n\t\t */\r\n\t\ttable.setShowGrid(true);\r\n\t\ttable.setShowVerticalLines(true);\r\n\t\ttable.setShowHorizontalLines(true);\r\n\t\ttable.setRowHeight(25);\r\n\t\t//table.getColumn(\"links\")//;\r\n\t\tDefaultTableCellRenderer dtcr = new DefaultTableCellRenderer(); \r\n\t\tdtcr.setHorizontalAlignment(SwingConstants.CENTER); \r\n\t\t\r\n\t\tTableCellRenderer tcr = table.getDefaultRenderer(Integer.class);\r\n\t\tDefaultTableCellRenderer renderer = (DefaultTableCellRenderer)tcr; \r\n\t\trenderer.setHorizontalAlignment(SwingConstants.CENTER); \r\n\t\t\r\n\t\ttable.getColumn(DBSAResourceBundle.res.getString(\"duplicate\")).setWidth(0);\r\n\t\ttable.getColumn(DBSAResourceBundle.res.getString(\"duplicate\")).setMinWidth(0);\r\n\t\ttable.getColumn(DBSAResourceBundle.res.getString(\"duplicate\")).setMaxWidth(0);\r\n\t\t\r\n\t\ttable.getColumn(\"dlsName\").setWidth(0);\r\n\t\ttable.getColumn(\"dlsName\").setMinWidth(0);\r\n\t\ttable.getColumn(\"dlsName\").setMaxWidth(0);\r\n\t\t\r\n\t\tfor(int i = 0; i < 8; i++){\r\n\t\t\tTableColumn col = table.getColumnModel().getColumn(i);\r\n\t\t\tif(i == 0){\r\n\t\t\t\tcol.setPreferredWidth(5);\r\n\t\t\t}else if(i == 1){\r\n\t\t\t\tcol.setPreferredWidth(200);\r\n\t\t\t}else if(i == 2){\r\n\t\t\t\tcol.setPreferredWidth(150);\r\n\t\t\t}else if(i == 3){\r\n\t\t\t\tcol.setPreferredWidth(150);\r\n\t\t\t}else if(i == 4){\r\n\t\t\t\tcol.setPreferredWidth(20);\r\n\t\t\t}else if (i == 5){\r\n\t\t\t\tcol.setPreferredWidth(400);\r\n\t\t\t}else if(i == 6){\r\n\t\t\t\tcol.setPreferredWidth(70);\r\n\t\t\t}else if(i == 7){\r\n\t\t\t\tcol.setPreferredWidth(5);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn table;\r\n\t}", "private void addCss() {\n StyleLink jqueryLink = new StyleLink(\"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\");\n page.addHeader(jqueryLink);\n StyleLink jqueryTooltipLink = new StyleLink(\"/css/jquery.ui.tooltip.css\");\n page.addHeader(jqueryTooltipLink);\n StyleLink cssLink = new StyleLink(\"/css/lockss-new.css\");\n page.addHeader(cssLink);\n }", "public HtmlTableCell(){\n\n }", "public MyJTable createResultJTable(){\r\n\t\tmodel = new DefaultTableModel(getTableData(getRowNumber(), getTitle(), getAuthor(), getHyperLink(), getYear(), getAbstract(), getPublisher(), getMark(), getIsDuplicate(), getID()), getColumnName()) {\r\n\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\tClass<?>[] types = new Class<?>[] { Integer.class, String.class, String.class, URL.class, String.class, String.class, String.class, Boolean.class, Boolean.class, Integer.class};\r\n\r\n\t\t\tpublic Class<?> getColumnClass(int columnIndex) {\r\n\t\t\t\treturn types[columnIndex];\r\n\t\t\t}\r\n\t\t\r\n\t\t};\r\n\t\t\r\n\t\tMyJTable table = new MyJTable(model);\r\n\t\t//Sap xep noi dung cac dong trong table theo thu tu alpha B.\r\n\t\t//Cho phep sap xep theo tu cot rieng biet\r\n\t\tTableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(table.getModel());\r\n\t\ttable.setRowSorter(sorter);\r\n\t\t\r\n\t\t/*\r\n\t\t * Set width of table column \r\n\t\t */\r\n\t\ttable.setShowGrid(true);\r\n\t\ttable.setShowVerticalLines(true);\r\n\t\ttable.setShowHorizontalLines(true);\r\n\t\ttable.setRowHeight(25);\r\n\t\t//table.getColumn(\"links\")//;\r\n\t\tDefaultTableCellRenderer dtcr = new DefaultTableCellRenderer(); \r\n\t\tdtcr.setHorizontalAlignment(SwingConstants.CENTER); \r\n\t\t\r\n\t\tTableCellRenderer tcr = table.getDefaultRenderer(Integer.class);\r\n\t\tDefaultTableCellRenderer renderer = (DefaultTableCellRenderer)tcr; \r\n\t\trenderer.setHorizontalAlignment(SwingConstants.CENTER); \r\n\t\t\r\n\t\ttable.getColumn((\"duplicate\")).setWidth(0);\r\n\t\ttable.getColumn((\"duplicate\")).setMinWidth(0);\r\n\t\ttable.getColumn((\"duplicate\")).setMaxWidth(0);\r\n\t\t\r\n\t\ttable.getColumn((\"id\")).setWidth(0);\r\n\t\ttable.getColumn((\"id\")).setMinWidth(0);\r\n\t\ttable.getColumn((\"id\")).setMaxWidth(0);\r\n\t\t\r\n\t\tfor(int i = 0; i < 8; i++){\r\n\t\t\tTableColumn col = table.getColumnModel().getColumn(i);\r\n\t\t\tif(i == 0){\r\n\t\t\t\tcol.setPreferredWidth(30);\r\n\t\t\t}else if(i == 1){\r\n\t\t\t\tcol.setPreferredWidth(300);\r\n\t\t\t}else if(i == 2){\r\n\t\t\t\tcol.setPreferredWidth(200);\r\n\t\t\t}else if(i == 3){\r\n\t\t\t\tcol.setPreferredWidth(150);\r\n\t\t\t}else if(i == 4){\r\n\t\t\t\tcol.setPreferredWidth(60);\r\n\t\t\t}else if (i == 5){\r\n\t\t\t\tcol.setPreferredWidth(150);\r\n\t\t\t}else if(i == 6){\r\n\t\t\t\tcol.setPreferredWidth(80);\r\n\t\t\t}else if(i == 7){\r\n\t\t\t\tcol.setPreferredWidth(30);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn table;\r\n\t}", "public table() {\n initComponents();\n }", "public CursosTable() {\n \n \n }", "private void addTable()\r\n {\r\n // Create the table\r\n table = new JTable();\r\n table.setAutoCreateRowSorter(true);\r\n table.setColumnSelectionAllowed(false);\r\n table.getTableHeader().setReorderingAllowed(false);\r\n table.setModel(new JarModel());\r\n \r\n // Center the column headings\r\n ((DefaultTableCellRenderer) table.getTableHeader().\r\n getDefaultRenderer()).setHorizontalAlignment(SwingConstants.CENTER);\r\n \r\n // Set the column widths\r\n table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);\r\n table.getColumnModel().getColumn(0).setPreferredWidth(100);\r\n table.getColumnModel().getColumn(0).setMaxWidth(250);\r\n table.getColumnModel().getColumn(2).setPreferredWidth(140);\r\n table.getColumnModel().getColumn(2).setMaxWidth(250);\r\n table.getColumnModel().getColumn(3).setPreferredWidth(100);\r\n table.getColumnModel().getColumn(3).setMaxWidth(250);\r\n table.getColumnModel().getColumn(4).setPreferredWidth(100);\r\n table.getColumnModel().getColumn(4).setMaxWidth(250);\r\n \r\n // Sort on the first column\r\n table.getRowSorter().toggleSortOrder(0);\r\n \r\n table.getColumnModel().getColumn(0).setCellRenderer(new BooleanColorCellRenderer());\r\n table.getColumnModel().getColumn(2).setCellRenderer(new DateCellRenderer());\r\n \r\n // Add the table to the panel\r\n add(new JScrollPane(table), BorderLayout.CENTER);\r\n }", "public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "public void style() {\n\n\t\tfinal ArrayList<String> cssClasses = new ArrayList<>();\n\t\tif (!this.styles.isEmpty()) {\n\t\t\tthis.styles.forEach(s -> {\n\t\t\t\tcssClasses.add(s.getCss());\n\t\t\t});\n\t\t}\n\n\t\t// replace the cell styles with the new set\n\t\tthis.add(AttributeModifier.replace(\"class\", StringUtils.join(cssClasses, \" \")));\n\t}", "public PdfPTable createTable() {\n\t\tPdfPTable t = new PdfPTable(2);\n\t\tt.setWidthPercentage(100);\n\t\tt.setHorizontalAlignment(Element.ALIGN_LEFT);\n\t\tt.getDefaultCell().setBorder(Rectangle.NO_BORDER);\n\t\t// set up the table headers for albums\n\t\tif (state.equals(\"a\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell artistCell = new PdfPCell();\n\t\t\tartistCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase artist = new Phrase(\"Artist\", bold);\n\t\t\tartistCell.addElement(artist);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(artistCell);\n\t\t}\n\t\t// set up the table headers for publications\n\t\telse if (state.equals(\"p\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell devisorCell = new PdfPCell();\n\t\t\tdevisorCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase devisor = new Phrase(\"Devisor\", bold);\n\t\t\tdevisorCell.addElement(devisor);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(devisorCell);\n\t\t}\n\t\ttry {\n\t\t\tResultSet results = db.searchTableByName(table, \"\", true);\n\t\t\twhile(results.next()) {\n\t\t\t\t// add album info to table\n\t\t\t\tif (state.equals(\"a\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"artist\"));\n\t\t\t\t}\n\t\t\t\t// add publication info to table\n\t\t\t\telse if (state.equals(\"p\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"devisor\"));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn t;\n\t}", "public TempTable() {\r\n\t\t\tsuper();\r\n\t\t\tthis.clauses = new ArrayList<TempTableHeaderCell>();\r\n\t\t}", "public JScrollPane createTable() {\n dataModel = new AbstractTableModel() {\n public int getColumnCount() { return names.length; }\n public int getRowCount() { return data.length;}\n public Object getValueAt(int row, int col) {return data[row][col];}\n public String getColumnName(int column) {return names[column];}\n public Class getColumnClass(int c) {return String.class;}\n //public boolean isCellEditable(int row, int col) {return true;}\n public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; }\n };\n\n // Create the table\n tableView = new JTable(dataModel);\n\n // Show colors by rendering them in their own color.\n DefaultTableCellRenderer colorRenderer = new DefaultTableCellRenderer() {\n public void setValue(Object value) {\n\tif (value instanceof Color) {\n\t Color c = (Color)value;\n\t setForeground(c);\n\t setText(c.getRed() + \", \" + c.getGreen() + \", \" + c.getBlue());\n\t}\n }\n\n };\n tableView.setRowHeight(20);\n\n scrollpane = new JScrollPane(tableView);\n tableView.setPreferredScrollableViewportSize(new Dimension(200, 70));\n return scrollpane;\n }", "public static String get_cell_style_id(){\r\n\t\t_cell_style_id ++;\r\n\t\treturn \"cond_ce\" + _cell_style_id;\r\n\t}", "private Table getHeaderForAssetDetailTable() {\n\n\t\tTableHeaderData facilityHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Facility\"));\n\t\tfacilityHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\tTableHeaderData workCenterHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Work Center\"));\n\t\tworkCenterHeaderData.addAttribute(\"style\", \"width: 15%\");\n\n\t\tTableHeaderData assetNumberHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Asset\"));\n\t\tassetNumberHeaderData.addAttribute(\"style\", \"width: 20%\");\n\n\t\tTableHeaderData descriptionHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Description\"));\n\t\tdescriptionHeaderData.addAttribute(\"style\", \"width: 35%\");\n\n\t\tTableHeaderData statusHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Active\"));\n\t\tstatusHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\tTableHeaderData editHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Edit\"));\n\t\teditHeaderData.addAttribute(\"style\", \"width: 16%\");\n\n\t\tArrayList<TableHeaderData> headers = new ArrayList<TableHeaderData>();\n\t\theaders.add(facilityHeaderData);\n\t\theaders.add(workCenterHeaderData);\n\t\theaders.add(assetNumberHeaderData);\n\t\theaders.add(descriptionHeaderData);\n\t\theaders.add(statusHeaderData);\n\t\theaders.add(editHeaderData);\n\n\t\tTableHeader tableHeader = new TableHeader(headers);\n\t\ttableHeader.addAttribute(\"style\", \"text-align: center;\");\n\t\tTable table = new Table();\n\t\ttable.setTableHeader(tableHeader);\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 610px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\treturn table;\n\n\t}", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "public void paramTable() {\n jTable2.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);\n mode = (DefaultTableModel) jTable2.getModel();\n dtcm = (DefaultTableColumnModel) jTable2.getColumnModel();\n\n jTable2.setRowHeight(40);\n largeurColoneMax(dtcm, 0, 70);\n largeurColoneMax(dtcm, 3, 50);\n largeurColoneMax(dtcm, 4, 100);\n largeurColoneMax(dtcm, 6, 90);\n largeurColoneMax(dtcm, 9, 70);\n\n TableCellRenderer tbcProjet = getTableCellRenderer();\n TableCellRenderer tbcProjet2 = getTableHeaderRenderer();\n for (int i = 0; i < jTable2.getColumnCount(); i++) {\n TableColumn tc = jTable2.getColumnModel().getColumn(i);\n tc.setCellRenderer(tbcProjet);\n tc.setHeaderRenderer(tbcProjet2);\n\n }\n\n }", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "public CustomerTableModel() {\n\t\t\tsetColumnNames(COLUMN_TITLES);\n\t\t\tsetColumnClasses(COLUMN_CLASSES);\n\t\t}", "public Table buildAssetDetailsTable(ManufacturingOrder dto) {\n\n\t\tTable table = new Table();\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 610px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\tif (dto.getAssetConfig() != null && dto.getAssetConfig().size() > 0) {\n\n\t\t\tint count = 0;\n\n\t\t\tfor (AssetConfig asset : dto.getAssetConfig()) {\n\n\t\t\t\tTableRow row = new TableRow();\n\n\t\t\t\tTableData facility = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(asset.getFacility())));\n\t\t\t\tfacility.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\n\t\t\t\tTableData workCenterCode = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(asset.getWorkCenterCode())));\n\t\t\t\tworkCenterCode.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 15% ; vertical-align: middle\");\n\n\t\t\t\tTableData description = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(asset.getDescription())));\n\t\t\t\tdescription.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 35% ; vertical-align: middle\");\n\n\t\t\t\tTableData assetNumber = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(/*asset.getAssetNumber()*/\"123456789123456\")));\n\t\t\t\tassetNumber.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 20% ; vertical-align: middle\");\n\n\t\t\t\tString statusFlag = asset.getStatus();\n\n\t\t\t\tTableData status;\n\t\t\t\tif (!\"A\".equalsIgnoreCase(statusFlag)) {\n\t\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chkbox\\\" value=\\\"A\\\" />\"));\n\t\t\t\t} else {\n\t\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chkbox\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\t\t}\n\t\t\t\tstatus.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\t\t\t\tstatus.addAttribute(\"disabled\", \"disabled\");\n\n\t\t\t\tTableData editImage = new TableData(new Image(\n\t\t\t\t\t\t\"static/images/edit.jpg\", \"Edit\"));\n\t\t\t\teditImage.addAttribute(\"style\", \"width: 10%\");\n\t\t\t\teditImage.addAttribute(\"onClick\", \"javascript:edit('\" + count\n\t\t\t\t\t\t+ \"','\"\n\t\t\t\t\t\t+ validateDisplayField(asset.getWorkCenterCode())\n\t\t\t\t\t\t+ \"','\" + asset.getFacility() + \"','\"\n\t\t\t\t\t\t+ validateDisplayField(asset.getDescription()) + \"','\"\n\t\t\t\t\t\t+ asset.getAssetNumber() + \"','\" + asset.getStatus()\n\t\t\t\t\t\t+ \"');\");\n\t\t\t\teditImage.addAttribute(\"style\", \"cursor: pointer;\");\n\n\t\t\t\trow.addTableData(facility);\n\t\t\t\trow.addTableData(workCenterCode);\n\t\t\t\trow.addTableData(assetNumber);\n\t\t\t\trow.addTableData(description);\n\t\t\t\trow.addTableData(status);\n\t\t\t\trow.addTableData(editImage);\n\n\t\t\t\tif (count % 2 == 0) {\n\t\t\t\t\trow.addAttribute(\"class\", \"normalRow\");\n\t\t\t\t} else {\n\t\t\t\t\trow.addAttribute(\"class\", \"alternateRow\");\n\t\t\t\t}\n\t\t\t\ttable.addTableRow(row);\n\t\t\t\tcount++;\n\n\t\t\t}\n\t\t}\n\n\t\treturn table;\n\t}", "public DisplayTable() {\n initComponents();\n }", "protected void setStyleName(FlexTable flexTable) {\n\n\t\tint index = flexTable.getRowCount() - 1;\n\n\t\tif (index == 0) {\n\n\t\t\tString cellStyleName = CSS_HEADING;\n\n\t\t\tint count = flexTable.getCellCount(index);\n\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tflexTable.getCellFormatter().addStyleName(index, i, cellStyleName);\n\t\t\t}\n\t\t} else {\n\n\t\t\tint count = flexTable.getCellCount(index);\n\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tif (i != count - 1) {\n\t\t\t\t\tflexTable.getCellFormatter().addStyleName(index, i, CSS_CONTENT);\n\t\t\t\t} else {\n\t\t\t\t\tflexTable.getCellFormatter().addStyleName(index, i, CSS_MENU);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public JTable () {\r\n\t\t// Initialisation de la taille de la banque du milieu de table\r\n\t\tbanque = new JBanque(TAILLE*5, TAILLE);\r\n\t\t\r\n\t\t// Initialisation des collections de joueurs et de cartes\r\n\t\tcartes = new HashMap<Integer, JPanel>();\r\n\t\tjoueurs = new HashMap<Integer, JPanel>();\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\tjoueurs.put(i, new JVide(joueur_lg, joueur_ht));\r\n\t\t\tif (i < 5) {\r\n\t\t\t\tcartes.put(i, new JVide(carte_lg, carte_ht));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Récupération de l'image de la table pour le fond\r\n\t\ttable = Toolkit.getDefaultToolkit().getImage(\"Images/poker1.png\");\r\n\t\tresized = table.getScaledInstance(1000, 500, Image.SCALE_DEFAULT);\r\n\t\t\r\n\t\t// Affichage des cartes et des joueurs\r\n\t\tthis.formerTable();\r\n\t\t\r\n\t\tthis.setPreferredSize(new Dimension(1000, 500));\r\n\t\tthis.setVisible(true);\r\n\t}", "public SwitchColTable() {\r\r\r\r\n }", "public AllTablesHaveColumnsRule() {\n super();\n\n this.countOp = this.addProperty(new ChoiceProperty<>(\n \"count_op\",\n ComparisonOperator.class, ComparisonOperator.GTE, ComparisonOperator.getChoices(),\n \"Počet sloupců\", \"Operátor pro ověření počtu řádků v tabulkách\", this.getGenericLabel()\n ));\n this.count = this.addProperty(new Property<>(\n \"count\",\n Integer.class, 1,\n \"...\", \"Všechny tabulky v databázi musí obsahovat zadaný počet sloupců\", this.getGenericLabel()\n ));\n\n this.columnType = this.addProperty(new ChoiceProperty<>(\n \"column_type\",\n ColumnType.class, ColumnType._ANY, ColumnType.getChoices(),\n \"Typ sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnName = this.addProperty(new Property<>(\n \"column_name\",\n String.class, \"\",\n \"Název sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnIsPrimary = this.addProperty(new ChoiceProperty<>(\n \"column_primary\",\n YesNoType.class, YesNoType._ANY, YesNoType.getChoices(),\n \"Primární klíč\", \"Ověří, zda je sloupec součástí primárního klíče\", this.getGenericLabel()\n ));\n }", "ByteDataTable()\n\t{\n\t\tsuper();\n\n\t\tdouble cellWidth = WIDEST_BYTE_STRING.getBoundsInLocal().getWidth();\n\t\tArrayList<TableColumn<Row, String>> columns = new ArrayList<TableColumn<Row, String>>();\n\t\tfor (int i = 0; i < NUM_COLUMNS; ++i) {\n\t\t\tTableColumn<Row, String> col = new TableColumn<Row, String>(COLUMN_HEADINGS[i]);\n\t\t \tcol.setCellValueFactory(new HexTableCell(\"columns\", i));\n\t\t\tcol.setPrefWidth(cellWidth);\n\t\t\tcolumns.add(col);\n \t\t}\n\n\t\tsetColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\t\tgetColumns().setAll(columns);\n\t}", "public Table buildNewAssetTable(ManufacturingOrder dto) {\n\n\t\tTable table = new Table();\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 500px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\tTableRow row = new TableRow();\n\n\t\tInputField assetNumberText = new InputField(\"assetNumber\", \"\",\n\t\t\t\tInputType.TEXT);\n\t\tassetNumberText.addAttribute(\"maxlength\", \"6\");\n\t\tassetNumberText.addAttribute(\"size\", \"10\");\n\t\tTableData asset = null;\n\t\tif (dto.getEditFlag()) {\n\t\t\tasset = new TableData(new SimpleText(dto.getAssetNumber()));\n\t\t\tasset.addAttribute(\"style\", \"width: 10% ; vertical-align: middle\");\n\n\t\t} else {\n\t\t\tasset = new TableData(assetNumberText);\n\t\t\tasset.addAttribute(\"style\", \"width: 30%\");\n\t\t}\n\t\tString desc = \"\";\n\n\t\tif (dto.getEditFlag()) {\n\t\t\tdesc = dto.getDescription();\n\t\t}\n\n\t\tInputField description = new InputField(\"descrip\", desc, InputType.TEXT);\n\t\tdescription.addAttribute(\"maxlength\", \"100\");\n\t\tdescription.addAttribute(\"size\", \"30\");\n\t\tTableData descriptionText = new TableData(description);\n\t\tdescriptionText.addAttribute(\"style\", \"width: 40%\");\n\n\t\tTableData status = null;\n\t\tif (dto.getEditFlag()) {\n\n\t\t\tif (dto.getStatus() == null || !(\"A\".equals(dto.getStatus()))) {\n\n\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\"/>\"));\n\t\t\t} else {\n\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\t}\n\n\t\t\tTableData facility = new TableData(new SimpleText(dto\n\t\t\t\t\t.getSelectedFacility()));\n\t\t\tfacility.addAttribute(\"style\",\n\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\n\t\t\tTableData workCenter = new TableData(new SimpleText(dto\n\t\t\t\t\t.getWorkCenterCode()));\n\t\t\tworkCenter.addAttribute(\"style\",\n\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\t\t\trow.addTableData(facility);\n\t\t\trow.addTableData(workCenter);\n\t\t\tstatus.addAttribute(\"style\", \"width: 10%\");\n\t\t\tdescriptionText.addAttribute(\"style\", \"width: 30%\");\n\n\t\t} else {\n\t\t\tstatus = new TableData(\n\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\tstatus.addAttribute(\"style\", \"width: 20%\");\n\t\t}\n\t\trow.addTableData(asset);\n\t\trow.addTableData(descriptionText);\n\t\trow.addTableData(status);\n\n\t\trow.addAttribute(\"class\", \"normalRow\");\n\n\t\ttable.addTableRow(row);\n\n\t\treturn table;\n\t}", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "private void createTableArea() {\n\t\tthis.tableModel = new MessagesTableModel();\n\t\tthis.conversation = new JTable(this.tableModel);\n\t\tthis.conversation.setRowSelectionAllowed(false);\n\t\tthis.conversation.getColumn(\"Pseudo\").setMaxWidth(150);\n\t\tthis.conversation.getColumn(\"Message\").setWidth(200);\n\t\tthis.conversation.getColumn(\"Heure\").setMaxWidth(50);\n\t\tthis.conversation.getColumn(\"Message\").setCellRenderer(new WrapTableCellRenderer());\n\t\tthis.conversation.getColumn(\"Pseudo\").setCellRenderer(new ColorTableCellRenderer());\n\t\tthis.scrollPane = new JScrollPane(conversation);\n\t}", "public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }", "private void InitColorTable(){\n\n }", "private void styleRows() {\n int rows = fieldTable.getRowCount();\n for (int row = 1; row < rows; row++ ) {\n fieldTable.getFlexCellFormatter().addStyleName(row, 0, \"metadataTableCell\");\n fieldTable.getFlexCellFormatter().addStyleName(row, 1, \"metadataTableCell\");\n fieldTable.getFlexCellFormatter().addStyleName(row, 2, \"metadataTableCell\");\n if (row % 2 == 0) {\n fieldTable.getRowFormatter().removeStyleName(row, \"metadataTableOddRow\");\n fieldTable.getRowFormatter().addStyleName(row, \"metadataTableEvenRow\");\n } else {\n fieldTable.getRowFormatter().removeStyleName(row, \"metadataTableEvenRow\");\n fieldTable.getRowFormatter().addStyleName(row, \"metadataTableOddRow\");\n }\n }\n }", "public ARCTable() {\n initComponents();\n table = new MyJTable();\n tableScrollPane.setViewportView(table);\n }", "public EditingTable() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private Table getHeaderForNewAssetTable(ManufacturingOrder dto) {\n\n\t\tTableHeaderData assetNumberHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Asset #\"));\n\t\tassetNumberHeaderData.addAttribute(\"style\", \"width: 22%\");\n\n\t\tTableHeaderData descriptionHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Description\"));\n\n\t\tTableHeaderData statusHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Active\"));\n\n\t\tArrayList<TableHeaderData> headers = new ArrayList<TableHeaderData>();\n\n\t\tif (dto.getEditFlag()) {\n\n\t\t\tTableHeaderData facilityHeaderData = new TableHeaderData(\n\t\t\t\t\tnew SimpleText(\"Facility\"));\n\t\t\tfacilityHeaderData.addAttribute(\"style\", \"width:10%\");\n\n\t\t\tTableHeaderData workCenterHeaderData = new TableHeaderData(\n\t\t\t\t\tnew SimpleText(\"Work Center\"));\n\t\t\tworkCenterHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\t\tTableHeaderData assetHeaderData = new TableHeaderData(\n\t\t\t\t\tnew SimpleText(\"Asset\"));\n\t\t\tassetHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\t\tstatusHeaderData.addAttribute(\"style\", \"width: 10%\");\n\t\t\tdescriptionHeaderData.addAttribute(\"style\", \"width: 30%\");\n\t\t\theaders.add(facilityHeaderData);\n\t\t\theaders.add(workCenterHeaderData);\n\t\t\theaders.add(assetHeaderData);\n\t\t\theaders.add(descriptionHeaderData);\n\t\t\theaders.add(statusHeaderData);\n\t\t} else {\n\t\t\tdescriptionHeaderData.addAttribute(\"style\", \"width: 30%\");\n\t\t\tstatusHeaderData.addAttribute(\"style\", \"width: 15%\");\n\n\t\t\theaders.add(assetNumberHeaderData);\n\t\t\theaders.add(descriptionHeaderData);\n\t\t\theaders.add(statusHeaderData);\n\n\t\t}\n\n\t\tTableHeader tableHeader = new TableHeader(headers);\n\t\ttableHeader.addAttribute(\"style\", \"text-align: center;\");\n\t\tTable table = new Table();\n\t\ttable.setTableHeader(tableHeader);\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 500px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\treturn table;\n\n\t}", "public Practice_JTable() {\n initComponents();\n }", "public TableObject()\r\n {\r\n\tsuper(ObjectType.Table);\r\n\tglobal = false;\r\n }", "public CellTable<Attribute> getTable() {\n\n\t\tretrieveData();\n\n\t\t// Table data provider.\n\t\tdataProvider = new ListDataProvider<Attribute>(list);\n\n\t\t// Cell table\n\t\ttable = new PerunTable<Attribute>(list);\n\n\t\t// Connect the table to the data provider.\n\t\tdataProvider.addDataDisplay(table);\n\n\t\t// Sorting\n\t\tListHandler<Attribute> columnSortHandler = new ListHandler<Attribute>(dataProvider.getList());\n\t\ttable.addColumnSortHandler(columnSortHandler);\n\n\t\t// set empty content & loader\n\t\ttable.setEmptyTableWidget(loaderImage);\n\n\t\t// checkbox column column\n\t\tif (checkable) {\n\t\t\t// table selection\n\t\t\ttable.setSelectionModel(selectionModel, DefaultSelectionEventManager.<Attribute> createCheckboxManager(0));\n\t\t\ttable.addCheckBoxColumn();\n\t\t}\n\n\t\t// Create ID column.\n\t\ttable.addIdColumn(\"Attr ID\", null, 90);\n\n\t\t// Name column\n\t\tColumn<Attribute, Attribute> nameColumn = JsonUtils.addColumn(new PerunAttributeNameCell());\n\n\t\t// Description column\n\t\tColumn<Attribute, Attribute> descriptionColumn = JsonUtils.addColumn(new PerunAttributeDescriptionCell());\n\n\t\t// Value column\n\t\tColumn<Attribute, Attribute> valueColumn = JsonUtils.addColumn(new PerunAttributeValueCell());\n\t\tvalueColumn.setFieldUpdater(new FieldUpdater<Attribute, Attribute>() {\n\t\t\tpublic void update(int index, Attribute object, Attribute value) {\n\t\t\t\tobject = value;\n\t\t\t\tselectionModel.setSelected(object, object.isAttributeValid());\n\t\t\t}\n\t\t});\n\n\t\t// updates the columns size\n\t\tthis.table.setColumnWidth(nameColumn, 200.0, Unit.PX);\n\n\t\t// Sorting name column\n\t\tnameColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(nameColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_NAME));\n\n\t\t// Sorting description column\n\t\tdescriptionColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(descriptionColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_DESCRIPTION));\n\n\t\t// Add sorting\n\t\tthis.table.addColumnSortHandler(columnSortHandler);\n\n\t\t// Add the columns.\n\t\tthis.table.addColumn(nameColumn, \"Name\");\n\t\tthis.table.addColumn(valueColumn, \"Value\");\n\t\tthis.table.addColumn(descriptionColumn, \"Description\");\n\n\t\treturn table;\n\n\t}", "private void generateTableC_AndTable_D(){\n\n // just seeing some header cell width\n for(int x=0; x<this.headerCellsWidth.size(); x++){\n Log.v(\"TableMainLayout.java\", this.headerCellsWidth.get(x)+\"\");\n }\n\n for(DataObject dataObject : this.dataObjects){\n\n TableRow tableRowForTableC = this.tableRowForTableC(dataObject);\n TableRow tableRowForTableD = this.taleRowForTableD(dataObject);\n\n this.tableC.addView(tableRowForTableC);\n this.tableD.addView(tableRowForTableD);\n\n }\n }", "Table createTable();", "public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}", "public Table(ElementStructure structure) {\n\t\tsuper(structure);\n\t\tfields = structure.data.fieldArray(vis.positionFields());\n\t\tpadding = ModelUtil.getPadding(vis, StyleTarget.makeElementTarget(null), 2);\n\t\tpadding.top += 15; // For the titles\n\t\tfraction = divideColumnSpace(fields);\n\t\tStyleTarget styleTarget = StyleTarget.makeElementTarget(\"text\");\n\t\tfontSize = ModelUtil.getFontSize(vis, styleTarget, 12);\n\t}", "public AttlistTableModel () {\n super();\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public final void setTableHeader() {\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.date\"));\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.percent.solved\"));\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.log.type\"));\n }", "private ByaTableModel() {\n\t}", "public interface Style extends CssResource {\n\n /**\n * The style for the panel that contains\n * the whole user record\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecord();\n\n /**\n * The style for the name of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String nameLabel();\n\n /**\n * The style for the username of the user\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabel();\n\n /**\n * The style for the user avatar image\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImage();\n\n /**\n * The style for the remove image\n *\n * @author Johannes Gryffenberg <[email protected]>\n * @since 26 Feb 2013\n *\n * @return The name of the compiled style\n */\n String removeImageStyle();\n\n /**\n * The style for the user record when it is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecordSelected();\n\n /**\n * The style for the username when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabelSelected();\n\n /**\n * The style for the avatar when the record is selected\n *\n * @author Ruan Naude <[email protected]>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImageSelected();\n }", "private RTable getJavaSystemPropertiesTable() {\n if (javaSystemPropertiesTable == null) {\n javaSystemPropertiesTable = new RTable();\n javaSystemPropertiesTable.setName(\"javaSystemPropertiesTable\");\n javaSystemPropertiesTable\n .setModelConfiguration(\"{/showTableheader true /autoTableheader false /showtooltip false /showIcons false /columns {{/result \\\"result=value\\\"/version \\\"2.0\\\"/tooltip \\\"\\\"/icon \\\"\\\"/header \\\"Name\\\"/field \\\"Name\\\"/columnWidth \\\"200\\\"}{/result \\\"result=value\\\"/version \\\"2.0\\\"/tooltip \\\"\\\"/icon \\\"\\\"/header \\\"Value\\\"/field \\\"Value\\\"/columnWidth \\\"500\\\"}}}\");\n }\n return javaSystemPropertiesTable;\n }", "public ObjectTableCellRenderer() {\r\n\t\tsuper();\r\n\t}", "void initTable();", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "public static void buildTable() {\r\n\t\t//This method keeps the user from editing the table\r\n\t\ttableModel = new DefaultTableModel() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t//All cells false\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttableModel.setNumRows(dblogic.getSize());\r\n\t\ttableModel.setColumnCount(COL_COUNT);\r\n\t\ttableModel.setColumnIdentifiers(columnNames);\r\n\t\ttable.setRowSelectionAllowed(true);\r\n\t\ttable.setColumnSelectionAllowed(false);\r\n\t\ttable.setDragEnabled(false);\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\ttable.setModel(tableModel);\r\n\r\n\t\t//Build rows\r\n\t\tfor (int i = 0; i < dblogic.getSize(); i++) {\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronSinceString(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "private JTable getJTable() {\r\n\t\tif (jTable == null) {\r\n\t\t\tjTable = new JTable(model){\r\n\t\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic TableCellRenderer getCellRenderer( int row, int col ) {\r\n\t\t\t\t\tTableCellRenderer renderer = super.getCellRenderer(row,col);\r\n\t\t\t\t\tif ( (col == 1 )|| (col == 2) )\r\n\t\t\t\t\t\t((JLabel)renderer).setHorizontalAlignment( SwingConstants.LEFT);\r\n\t\t\t\t\t\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t((JLabel)renderer).setHorizontalAlignment( SwingConstants.CENTER );\r\n\t\t\t\t\treturn renderer;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tjTable.setShowGrid(true);\r\n\t\t\tjTable.getColumnModel().getColumn(0).setPreferredWidth(45);\r\n\t\t\tjTable.getColumnModel().getColumn(1).setPreferredWidth(120);\r\n\t\t\tjTable.getColumnModel().getColumn(2).setPreferredWidth(55);\r\n\t\t\tjTable.getColumnModel().getColumn(3).setPreferredWidth(180);\r\n\t\t\tjTable.getColumnModel().getColumn(4).setPreferredWidth(130);\r\n\t\t\tjTable.getColumnModel().getColumn(5).setPreferredWidth(50);\r\n\t\t\tjTable.getColumnModel().getColumn(6).setPreferredWidth(55);\r\n\r\n\t\t}\r\n\r\n\t\treturn jTable;\r\n\t}", "public String getTable()\n {\n return table;\n }", "private EstabelecimentoTable() {\n\t\t\t}", "TableRow tableRowForTableC(DataObject dataObject){\n\n TableRow.LayoutParams params = new TableRow.LayoutParams( this.headerCellsWidth.get(0),LayoutParams.MATCH_PARENT);\n\n\n TableRow tableRowForTableC = new TableRow(this.context);\n\n View view = dataObject.getDataviews().get(0);\n tableRowForTableC.addView(view,params);\n\n return tableRowForTableC;\n }", "public CampTableModel() {\n setColumnIdentifiers(new Object[] { Text.CAMP_ID.text(), Text.CAMP_LOCATION.text(), Text.CAMP_NAME.text() });\n }", "public customer_table() {\n initComponents();\n getContentPane().setBackground(Color.pink);\n Toolkit tk=Toolkit.getDefaultToolkit();\n int w=(int)tk.getScreenSize().getWidth();\n int h=(int)tk.getScreenSize().getHeight();\n this.setSize(w, h);\n String ss=\"SELECT *FROM `customer`\";\n Showtable(ss);\n a.setText(\"\"+Autoid());\n d.setText(\"@gmail.com\");\n e.setText(\"+880 \");\n \n }", "public Window_Table() {\n initComponents();\n \n \n \n }", "public CustomEnchantmentTable() {\n super(\n NimbleServer.enchantmentConfig.getEnchantmentTableSize(),\n NimbleServer.enchantmentConfig.getWindowDisplay());\n }", "@Override\n public String getCSSStyle() {\n return null;\n }", "public void initTable();", "public PantallaPaginas() {\r\n initComponents();\r\n framePaginas=new DefaultTableModel();\r\n framePaginas.addColumn(\"Num Pagina\");\r\n framePaginas.addColumn(\"Bit Residencia\");\r\n framePaginas.addColumn(\"Info Relevante\"); \r\n framePaginas.addRow(new Object []{null, null, null});\r\n tablaPaginas.setModel(framePaginas);\r\n Window[] w=PantallaProcesos.getWindows();\r\n w[1].setLocation(w[0].getWidth()+5, w[0].getY());\r\n\r\n TableColumn tcol;\r\n //va recrriendo las columnas\r\n for(int i=0;i<3;i++)\r\n {\r\n tcol= tablaPaginas.getColumnModel().getColumn(i);\r\n tcol.setCellRenderer(new CustomTableCellRenderer());\r\n }\r\n }", "String getBaseTable();", "private ConfigurationHTMLPrinter startTable() {\n return println(\"<table border='0' cellspacing='0' cellpadding='0'>\").incrementIndent();\n }", "public void readCompleteTable()\n\t{\n\t\topen();\n\t\tList<Map<Object, String>> tbl = HtmlTable.rowsFrom(table);\n\t\t//System.out.println(tbl);\n\n\t}", "public AbstractSQLTableModel()\n\t{\n\t\ttry\n\t\t{\n\t\t\tthis.prefix = TableHelper.getPrefixForTable(this.getDBTableName());\n\t\t} catch( SQLException e ) {\n\t\t\tApplicationLogger.logError(\"cannot aquire prefix for \" + this.getDBTableName() );\n\t\t\tApplicationLogger.logError(e);\n\t\t}\n\t\tsetupDBColumns();\n\t}", "protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}", "public Estadisticas() {\n initComponents();\n \n llenar_tabla();\n setCellRender(tbResult);\n }", "private void buildTables(){\r\n\t\tarticleTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\tarticleTable.setPageLength(5);\r\n\t\tlabel = new Label(\"No article found\");\r\n\t\tlabel2 = new Label(\"No image found\");\r\n\t\timageTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\timageTable.setPageLength(5);\r\n\t}", "public interface Table\n extends Tabular\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /**\n * Define the name of a column\n *\n * @param index the position in the header starting with 0\n * @param name the name to be used for this column\n * @return this to allow chaining\n */\n Table setColumn(int index, String name);\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Retrieve the value of the given row and column\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n\n String getValue(String column, int row);\n\n /**\n * Retrieve the configuration parameters of this table.\n *\n * As there can be many implementations of a table and these implementations are configured in a different manner,\n * this is the place where these parameters can be retrieved in a uniform manner and passed to other layers, e.g. to\n * configure appropriate writers and readers or simply to setup the respective factories.\n *\n * @return the not-null list of (key, value) pairs that configure this particular table\n */\n Map<String, String> getParameters();\n}", "@Override\n protected void installDefaults() {\n super.installDefaults();\n //行高设置为25看起来会舒服些\n table.setRowHeight(25);\n //不显示垂直的网格线\n table.setShowVerticalLines(false);\n //设置单元格间的空白(默认是1个像素宽和高)\n //说明:设置本参数可以实现单元格间的间隔空制,间隔里通常是实现网格线的绘制,但\n //网格维绘制与否并不影响间隔的存在(如果间隔存在但网格线不绘的话它就是是透明的空\n //间),参数中width表示水平间隔,height表示垂直间隔,为0则表示没有间隔\n table.setIntercellSpacing(new Dimension(0, 1));\n }", "private static void setTableWithData()\n {\n /* Se establecen el tamaño de la tabla */\n table.setSize(1280, 630);\n table.setMaximumSize(new Dimension(1280, 630));\n table.setMinimumSize(new Dimension(1280, 630));\n\n /* Se garantiza que cada fila (album) tiene un alto proporcional de acuerdo con el numero de cancioens */\n Iterator iteratorPerRow = listSizePerRow.iterator();\n int sizePerRow, i;\n i = 0;\n while (iteratorPerRow.hasNext())\n {\n sizePerRow = (Integer) iteratorPerRow.next(); \n table.setRowHeight(i, sizePerRow);\n i++;\n }\n\n /* Se setea el ancho de cada columna */\n setSize(table, JSoundsMainWindowViewController.ALBUM_COVER_COLUMN, 200);\n setSize(table, JSoundsMainWindowViewController.ALBUM_INFO_COLUMN, 230);\n setSize(table, JSoundsMainWindowViewController.NUMBER_SONG_COLUMN, 50);\n setSize(table, JSoundsMainWindowViewController.LIST_SONG_COLUMN, 400);\n setSize(table, JSoundsMainWindowViewController.GENDER_SONG_COLUMN, 230);\n\n /* Renderizado del la imagen del album */\n JLabelTableRenderer jltcr = new JLabelTableRenderer();\n jltcr.setVerticalAlignment(SwingConstants.TOP);\n jltcr.setHorizontalAlignment(SwingConstants.CENTER);\n\n table.getColumnModel().getColumn(0).setCellRenderer(jltcr);\n\n\n /* Renderizados de cada columna */\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellEditor(new JListTableEditor()); \n }", "public void initialize() {\n ResourceMap resourceMap = BDApp.getResourceMap(LoadTestReportTable.class);\n for (int i = 0; i < LoadTestReportTableModel.columnNames.length; i++) {\n TableColumn column = getColumnModel().getColumn(i);\n column.setResizable(true);\n final String headerText = resourceMap.getString(LoadTestReportTableModel.columnNames[i] + \"ColumnHeader.text\");\n column.setHeaderValue(headerText);\n int width = resourceMap.getInteger(LoadTestReportTableModel.columnNames[i] + \"Column.width\");\n column.setPreferredWidth(width);\n if (headerText.length() == 0) {\n column.setMinWidth(width);\n column.setMaxWidth(width);\n }\n // Install our special column renderer.\n column.setCellRenderer(specialCellRenderer);\n }\n cvsHeaders = resourceMap.getString(\"cvsHeaders.text\");\n }", "private void continuarInicializandoComponentes() {\n javax.swing.table.TableColumn columna1 = tablaDetalle.getColumn(\"Id\");\n columna1.setPreferredWidth(10); \n javax.swing.table.TableColumn columna2 = tablaDetalle.getColumn(\"Tipo\");\n columna2.setPreferredWidth(250); \n javax.swing.table.TableColumn columna3 = tablaDetalle.getColumn(\"Número\");\n columna3.setPreferredWidth(50); \n DefaultTableCellRenderer tcrr = new DefaultTableCellRenderer();\n tcrr.setHorizontalAlignment(SwingConstants.RIGHT);\n DefaultTableCellRenderer tcrc = new DefaultTableCellRenderer();\n tcrc.setHorizontalAlignment(SwingConstants.CENTER);\n tablaDetalle.getColumnModel().getColumn(0).setCellRenderer(tcrc);\n tablaDetalle.getColumnModel().getColumn(2).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(3).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(4).setCellRenderer(tcrr);\n }", "protected int getTableCondtion()\n\t\t{\n\t\t\treturn Condtion ;\n\t\t}", "private void createTable(Table table) {\n\t\t// Set up the table\n\t\ttable.setLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\t// Add the column (Task)\n\t\tTableColumn lTaskColumn = new TableColumn(table, SWT.NONE);\n\t\tlTaskColumn.setText(\"Task\");\n\n\t\t// Add the column (Operation)\n\t\tTableColumn lOperationColumn = new TableColumn(table, SWT.NONE);\n\t\tlOperationColumn.setText(\"Operation\");\n\n\t\t// Add the column (Duration)\n\t\tTableColumn lDurationColumn = new TableColumn(table, SWT.NONE);\n\t\tlDurationColumn.setText(\"Duration\");\n\n\t\t// Add the column (Timeout)\n\t\tTableColumn lTimeoutColumn = new TableColumn(table, SWT.NONE);\n\t\tlTimeoutColumn.setText(\"Timed Out\");\n\n\t\t// Add the column (TEF Result)\n\t\tTableColumn lResultColumn = new TableColumn(table, SWT.NONE);\n\t\tlResultColumn.setText(\"Build/TEF Result\");\n\n\t\t// Add the column (TEF RunWsProgram)\n\t\tTableColumn lTEFRunWsProgColumn = new TableColumn(table, SWT.NONE);\n\t\tlTEFRunWsProgColumn.setText(\"TEF RunWsProgram Result\");\n\n\t\t// Pack the columns\n\t\tfor (int i = 0, n = table.getColumnCount(); i < n; i++) {\n\t\t\tTableColumn lCol = table.getColumn(i);\n\t\t\tlCol.setResizable(true);\n\t\t\tlCol.setWidth(lCol.getText().length());\n\t\t\tlCol.pack();\n\t\t}\n\n\t\t// Turn on the header and the lines\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\n\t}", "public PdfPTable getTable(DatabaseConnection connection)\n throws SQLException, DocumentException, IOException {\n PdfPTable table = new PdfPTable(new float[] { 1, 2, 2, 5, 1 });\n table.setTableEvent(new PressPreviews());\n table.setWidthPercentage(100f);\n table.getDefaultCell().setPadding(5);\n table.getDefaultCell().setBorder(PdfPCell.NO_BORDER);\n table.getDefaultCell().setCellEvent(new PressPreviews());\n for (int i = 0; i < 2; i++) {\n table.addCell(\"Location\");\n table.addCell(\"Date/Time\");\n table.addCell(\"Run Length\");\n table.addCell(\"Title\");\n table.addCell(\"Year\");\n }\n table.getDefaultCell().setBackgroundColor(null);\n table.setHeaderRows(2);\n table.setFooterRows(1);\n List<Screening> screenings = PojoFactory.getPressPreviews(connection);\n Movie movie;\n for (Screening screening : screenings) {\n movie = screening.getMovie();\n table.addCell(screening.getLocation());\n table.addCell(String.format(\"%s %2$tH:%2$tM\",\n screening.getDate().toString(), screening.getTime()));\n table.addCell(String.format(\"%d '\", movie.getDuration()));\n table.addCell(movie.getMovieTitle());\n table.addCell(String.valueOf(movie.getYear()));\n }\n return table;\n }", "public void customiseStatusCells() {\n TableColumn column = table.getVisibleLeafColumn(5);\n column.setCellFactory(new Callback<TableColumn, TableCell>() {\n public TableCell call(TableColumn p) {\n //cell implementation\n return new styleCell();\n }\n });\n }", "private void createTable() {\n\t\tfreqTable = new TableView<>();\n\n\t\tTableColumn<WordFrequency, Integer> column1 = new TableColumn<WordFrequency, Integer>(\"No.\");\n\t\tcolumn1.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"serialNumber\"));\n\n\t\tTableColumn<WordFrequency, String> column2 = new TableColumn<WordFrequency, String>(\"Word\");\n\t\tcolumn2.setCellValueFactory(new PropertyValueFactory<WordFrequency, String>(\"word\"));\n\n\t\tTableColumn<WordFrequency, Integer> column3 = new TableColumn<WordFrequency, Integer>(\"Count\");\n\t\tcolumn3.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"count\"));\n\n\t\tList<TableColumn<WordFrequency, ?>> list = new ArrayList<TableColumn<WordFrequency, ?>>();\n\t\tlist.add(column1);\n\t\tlist.add(column2);\n\t\tlist.add(column3);\n\n\t\tfreqTable.getColumns().addAll(list);\n\t}", "public JTable getJrTbl() {\n\t\tForMngJrArticleModel fmngJr = new ForMngJrArticleModel();\n\t\tDefaultTableModel defModel = new DefaultTableModel(0,7);\n\t\tJTable jTblForJr = new JTable(defModel);\n\t\tfor(int i =0; i<getJrArtArrayList().size();i++) {\n\t\t\tfmngJr = getJrArtArrayList().get(i);\n\t\t\t//condition to check if there is id of the logged in researcher in the loaned out to column \n\t\t\tif(fmngJr.getNmOfRe().contains(loggedReseId)) {\n\t\t\t\tObject[] objData = {fmngJr.getArNmOfJr(), fmngJr.getAuthNmOfJr(),fmngJr.getNmOfJr(), fmngJr.getYrOfJr(), fmngJr.getVolOfJr(),fmngJr.getIssOfJr(),fmngJr.getPgOfJr()};\n\t\t\t\tdefModel.addRow(objData);\n\t\t\t}\n\t\t}\n\n\t\tString reColTitles[] = {\"Name of Article\", \"Author/s\",\"Journal Title\", \"<html>Publication<br>Year</html>\",\"Volume No.\",\"Issue No.\",\"Page No.\"};\n\t\tdefModel.setColumnIdentifiers(reColTitles);\n\t\tjTblForJr.setRowHeight(28);\n\n\t\tJTableHeader tblHeader = jTblForJr.getTableHeader();\n\t\ttblHeader.setPreferredSize(new Dimension(100,35));\n\t\ttblHeader.setBackground(new Color(21, 34, 49));\n\t\ttblHeader.setForeground(Color.WHITE);\n\n\t\treturn jTblForJr;\n\t}", "private void loadTableProperties(Annotated instance) {\n parseClass(instance);\n DefaultTableModel model = createTableModel(properties);\n jTable1.setModel(model);\n }", "public LookupTable() {\r\n initComponents();\r\n txtPageSize.setText(BeanUtil.concat(pageSize));\r\n }", "public String toString() {\r\n HtmlTable htmlTable= createHtmlTable();\r\n String html= htmlTable.toString();\r\n if (StringUtils.isBlank(height) && StringUtils.isBlank(width)) {\r\n return html;\r\n }\r\n String outer= StringUtils.trimToEmpty(cssClassOuterTable);\r\n if (StringUtils.isNotEmpty(outer)) {\r\n outer= \"class='\" + outer + \"' \";\r\n }\r\n \r\n html= Printf.p(HTML_SIZE_CONTROL_TABLE, outer, height, width, html);\r\n return html;\r\n }", "@Override\n public void tableRows_()\n {\n }" ]
[ "0.7615267", "0.71239954", "0.698854", "0.61612904", "0.6047937", "0.6028834", "0.5983246", "0.5920456", "0.5865872", "0.5858108", "0.584289", "0.58401966", "0.58355975", "0.5765366", "0.5727499", "0.5699916", "0.56432307", "0.5642302", "0.5629317", "0.56112856", "0.56102115", "0.56033254", "0.5588444", "0.5577386", "0.5565222", "0.5563754", "0.5558721", "0.5558589", "0.55558944", "0.5532303", "0.5516245", "0.55127275", "0.55066925", "0.5502208", "0.54898536", "0.54874015", "0.5467859", "0.5463512", "0.5459818", "0.5449325", "0.5448675", "0.5427891", "0.54166687", "0.5413537", "0.5396503", "0.5392535", "0.5392425", "0.53922063", "0.5381284", "0.5366053", "0.53504074", "0.5348535", "0.5341753", "0.5337067", "0.5333361", "0.532565", "0.53205544", "0.5297977", "0.5295931", "0.52925605", "0.52775115", "0.52744657", "0.5274245", "0.526762", "0.52670544", "0.5258495", "0.5256209", "0.5251152", "0.5250473", "0.52454966", "0.5221877", "0.52197725", "0.5218724", "0.5218441", "0.5208049", "0.51971155", "0.51886386", "0.51737493", "0.5169924", "0.51694983", "0.51693696", "0.51683414", "0.5153334", "0.5148246", "0.5145822", "0.5144787", "0.51411915", "0.51391244", "0.5137552", "0.5136517", "0.513258", "0.51307225", "0.5130548", "0.5130342", "0.5130163", "0.51266134", "0.5124595", "0.5124515", "0.5123779", "0.5118606" ]
0.75674707
1
Used to finish the HTML
private void endHTML(BufferedWriter writer) throws IOException { String startHead = "</body></html>"; writer.write(startHead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}", "void doAfterEndTag() {\r\n }", "private ConfigurationHTMLPrinter epilogue() {\n return endTable().decrementIndent().println(\"</body\").decrementIndent().println(\"</html>\");\n }", "protected void afterBody(final XMLOutput output) throws JellyTagException, SAXException\n\t{\t\n\t\toutput.write(\"</div>\\n\") ;\n\t}", "protected void BuildHtmlFooter(PrintWriter out) throws IOException\n {\n out.println(\"</BODY></HTML>\");\n out.flush();\n }", "private static String footer() {\r\n String output = \"\";\r\n\r\n output += \"\\n\\\\end{document}\";\r\n\r\n return output;\r\n }", "protected String completeHtml(String data) {\n if (data.indexOf(\"<html>\") == -1) {\n\t\t\tdata = \"<html><head></head><body style='margin:0;padding:0;'>\"\n\t\t\t\t\t+ data + \"</body></html>\";\n }\n\n\t\treturn data;\n\t}", "private static void writeHtmlFooter(SimpleWriter out) {\n out.println(\"</body>\");\n out.println(\"</html>\");\n }", "SiteWriterTemplate finishBunch() throws Exception;", "public int doEndTag()throws JspException{\r\n\t\ttry{\r\n\t\t\tout.println(\"After body.\");\r\n\t\t}catch(IOException ex){\r\n\t\t\tthrow new JspException(\"IOException- \" + ex.toString());\r\n\t\t}\r\n\t\t// this saying keep going evaluate page after this:\r\n\t\treturn EVAL_PAGE;\r\n\t}", "public void closeStartTag() throws XMLStreamException {\n flushNamespace();\n clearNeedsWritingNs();\n if (this.isEmpty) {\n write(\"/>\");\n this.isEmpty = false;\n return;\n }\n write(HtmlObject.HtmlMarkUp.CLOSE_BRACKER);\n }", "public void closeEndTag() throws XMLStreamException {\n write(HtmlObject.HtmlMarkUp.CLOSE_BRACKER);\n }", "public void fiPosEnd (){\n body=body(\n div(h1(\"Problem Resolved\").withClass(\"heading1\"),\n p(),\n p(),\n h1(\"Troubleshooting Process Completed Successfully\").withClass(\"heading1\"),\n br(),\n p(img().attr(\"height\",75).\n attr(\"width\",75).\n withSrc(\"cnfV_Green.png\")).\n attr(\"align\",\"center\")\n ).withDir(\"ltr\")).attr(\"onload\",\"highlight();\");\n }", "private void startHtmlPage(PrintWriter out,ITestResult result)\r\n\t{\r\n\t\tout.println(\"<html>\");\r\n\t\tout.println(\"<head>\");\r\n\t\tout.println(\"<meta content=\\\"text/html; charset=UTF-8\\\" http-equiv=\\\"content-type\\\"/><meta content=\\\"cache-control\\\" http-equiv=\\\"no-cache\\\"/><meta content=\\\"pragma\\\" http-equiv=\\\"no-cache\\\"/>\");\r\n\t\tout.println(\"<style type=\\\"text/css\\\">\");\r\n\t\tout.println(\"body, table {\");\r\n\t\tout.println(\"font-family: Verdana, Arial, sans-serif;\");\r\n\t\tout.println(\"font-size: 12;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"table {\");\r\n\t\tout.println(\"border-collapse: collapse;\");\r\n\t\tout.println(\"border: 1px solid #ccc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"th, td {\");\r\n\t\tout.println(\"padding-left: 0.3em;\");\r\n\t\tout.println(\"padding-right: 0.3em;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"a {\");\r\n\t\tout.println(\"text-decoration: none;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".title {\");\r\n\t\tout.println(\"font-style: italic;\");\r\n\t\tout.println(\"background-color: #B2ACAC;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".selected {\");\r\n\t\tout.println(\"background-color: #ffffcc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".status_done {\");\r\n\t\tout.println(\"background-color: #eeffee;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_passed {\");\r\n\t out.println(\"background-color: #ccffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_failed {\");\r\n\t out.println(\"background-color: #ffcccc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_maybefailed {\");\r\n\t out.println(\"background-color: #ffffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".breakpoint {\");\r\n\t out.println(\"background-color: #cccccc;\");\r\n\t out.println(\"border: 1px solid black;\");\r\n\t out.println(\"}\");\r\n\t out.println(\"</style>\");\r\n\t out.println(\"<title>Test results</title>\");\r\n\t out.println(\"</head>\");\r\n\t out.println(\"<body>\");\r\n\t out.println(\"<h1>Test results </h1>\");\r\n\t out.println(\"<h2>Test Name: \"+className+\".\"+result.getName()+\"</h2>\");\r\n\t \r\n\t out.println(\"<table border=\\\"1\\\">\");\r\n\t out.println(\"<tbody>\");\r\n\t out.println(\"<tr>\");\r\n\t out.println(\"<td><b>Selenium-Command</b></td>\");\r\n\t out.println(\"<td><b>Parameter-1</b></td>\");\r\n\t\tout.println(\"<td><b>Parameter-2</b></td>\");\r\n\t\tout.println(\"<td><b>Status</b></td>\");\r\n\t\tout.println(\"<td><b>Screenshot</b></td>\");\r\n\t\tout.println(\"<td><b>Calling-Class with Linenumber</b></td>\");\r\n\t\tout.println(\"</tr>\");\r\n\t\t\r\n\t}", "public FreeMindWriter endRichText() {\n out.println( \" </body>\\n</html>\\n</richcontent>\" );\n return this; \n }", "protected String parseAndSaveHtml() {\n\t\t// the line of the html code\n\t\tString inputLine;\n\n\t\t// creates the folder's name from the domain name\n\t\tString folderName = nameFolder();\n\t\tFile folderNameFile = new File(path + folderName);\n\n\t\t// checks if there is already a folder with the same name\n\t\tif (!existsFolder(folderNameFile)) {\n\t\t\tmakeFolder(folderNameFile);\n\t\t}\n\n\t\t// creates the file with a random unique name\n\t\tString fileName = generateFileName(folderName);\n\t\tFile file = new File(path + folderName + \"\\\\\" + fileName + \".txt\");\n\n\t\ttry {\n\t\t\t// streams which help to read from the url\n\t\t\tInputStreamReader is = new InputStreamReader(url.openStream(), \"UTF-8\");\n\t\t\tBufferedReader br = new BufferedReader(is);\n\t\t\tbr.mark(0);\n\n\t\t\t// streams which help to write from the url\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos, \"UTF-8\");\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n\t\t\t// reads line by line the html code\n\t\t\twhile ((inputLine = br.readLine()) != null) {\n\t\t\t\tbw.write(inputLine);\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbw.close(); //closes the writer stream\n\n\t\t\treturn path + folderName + \"\\\\\" + fileName + \".txt\";\n\t\t} catch (IOException e) {\n\t\t\tfile.delete();\n\t\t\treturn null;\n\t\t}\n\n\t}", "private void generateOutputHTML() {\n\n\t\t\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"data/web/template.html\"));\n\t\t\tPrintStream out = new PrintStream(\"data/web/output\"+count+\".html\");\n\t\t\tSystem.setOut(out);\n\t\t\t\n\t\t\twhile (in.hasNext()) {\n\t\t\t\tString line = in.nextLine();\n\t\t\t\tSystem.out.print(line);\n\t\t\t\t\n\t\t\t\tif (line.equals(\"<title>\")) System.out.println(\"Path #\" +count);\n\t\t\t\t\n\t\t\t\n\t\t\t\tif (line.equals(\"<body>\")) { \t\t\t\t// this is where all the good stuff goes..\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<div class='bodyHeader'>\");\n\t\t\t\t\tSystem.out.println(\"<p><strong>in order path for driver #\" +count+ \" \" + \"</strong></p>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"<br><br><hr class='hrStyle'/>\");\n\t\t\t\t\t\n\t\t\t\t\t// Creating info about the path in a table format\n\t\t\t\t\tSystem.out.println(\"<div class='pathInfo'>\");\n\t\t\t\t\tSystem.out.println(\"<table class='infoTable' cellpadding='3' cellspacing='10'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>City: </td><td> \" + list.get(0).getCity()+ \" - \" + list.get(0).getState() + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Number of stops: </td><td> \" + (list.size()-1) + \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"<tr><td>Store: </td><td> \" + list.get(1).getName().toUpperCase()+ \"</td></tr>\");\n\t\t\t\t\tSystem.out.println(\"</table>\");\n\t\t\t\t\t\n//TODO: get starting address --- System.out.println(\"Starting address: \" + list.get(0).getAddress());\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t\t\n\t\t\t\t\t//create ordered table/list of path\n\t\t\t\t\tSystem.out.println(\"<div class='pathList'>\");\t\n\t\t\t\t\tSystem.out.println(\"<table class='pathTable' cellspacing='15'>\");\n\t\t\t\t\tSystem.out.println(\"<tr><th>Order</th><th>Address</th><th></th><th>Latitude , Longitude</th></tr>\");\n\t\t\t\t\tint i = 1;\n\t\t\t\t\tfor (Location c: list) {\n\t\t\t\t\t// creating table row for each stop in route\n\t\t\t\t\t\tSystem.out.println(\"<tr>\" + \"<td>\"+(i++)+\"</td>\" + c.toHTMLString() +\"</tr>\");\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"</ol>\");\n\t\t\t\t\tSystem.out.println(\"<br>\");\n\t\t\t\t\tSystem.out.println(\"</div>\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t\t//opening html file to the default browser in the system\n\t\t\tFile htmlFile = new File(\"data/web/output\"+count+\".html\");\n\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(e.getLocalizedMessage());\n\t\t} \n\t}", "public void endResponse()\n\t\t\t{\n\t\t\t\tsend(\"</response>\", false);\n\t\t\t}", "public void fiNegEnd (){\n body=body(\n div(h1(\"Problem not Resolved\").withClass(\"heading1\"),\n h1(\"Please Contact Next Maintenance Level\").withClass(\"heading1\")).\n withDir(\"ltr\")).\n attr(\"onload\",\"highlight();\");\n }", "public int doAfterBody() throws JspException {\n /* Render the output */\n if (bodyContent != null) {\n TagUtils.getInstance().writePrevious(pageContext,\n bodyContent.getString());\n bodyContent.clearBody();\n }\n\n return (SKIP_BODY);\n }", "@Override\n public void onPageFinished(WebView view, String url) {\n browser.loadUrl(\"javascript:HtmlOut.processHTML\" +\n \"('<html>'+document.getElementsByTagName('html')[0].innerHTML+'</html>');\");\n }", "HTML createHTML();", "protected void endOutput() throws JspException, SAXException {\n if (uriExpr != null && uri == null)\n uri = evalString(\"uri\", uriExpr);\n if (nameExpr != null && qname == null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1)\n name = qname.substring(colonIndex + 1);\n else\n name = qname;\n }\n serializer.getHandler().endElement(uri, name, qname);\n }", "String renderHTML();", "private void tagClose() {\n if( tagOpen ) {\n out.println( \">\" ); \n tagOpen = false;\n }\n }", "public void endSvgFile(){\n\t\toutput += \"</g>\\n\" + \n\t\t\t\t\t\"</g>\\n\" +\n\t\t\t\t\t\"</svg>\\n\";\n\t}", "@Override\n public int doEndTag() {\n return EVAL_PAGE;\n }", "private String renderBody() {\n return \"\";\n }", "public int doEndTag() {\r\n return EVAL_PAGE;\r\n }", "SiteWriterTemplate finishSites() throws Exception;", "@Override\n public void doTag() throws JspException, IOException {\n setAttributes();\n\n String layout = getBodyContent();\n jspContext.getOut().write(layout);\n }", "public void endDocument() { }", "public ContainerTag generateBody(List<HtmlData> data) {\n return div();\n }", "@Override\n\tpublic int doAfterBody() throws JspException {\n \tBodyContent bodyContent = getBodyContent();\n \tif( bodyContent != null) {\n \t\ttry {\n \t\t\tbodyContent.getEnclosingWriter().write( bodyContent.getString());\n \t\t} catch( IOException e) {\n \t\t\tlogger.error( \"Error writing body content\", e);\n \t\t}\n \t\tbodyContent.clearBody();\n \t\t}\n\n\t\tMap result = getNextRecord();\n\t\t\t\n\t\tif( result != null) {\n\t\t\tsetResultInPageContext( result);\n\n\t\t\treturn EVAL_BODY_BUFFERED;\n\t\t} else {\n\t\t\treturn SKIP_BODY;\n\t\t}\n\t}", "@Override\n\tpublic String generateHTML() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString level = \"\\t\";\n\t\tstringBuilder.append(level.repeat(levelCount)+\"<div>\\n\");\n\t\tlevelCount++;\n\t\tfor (HTMLGenerator htmlGenerator : tags) {\n\t\t\tstringBuilder.append(level.repeat(levelCount)+htmlGenerator.generateHTML());\n\t\t}\n\t\tstringBuilder.append(\"</div>\\n\");\n\t\treturn stringBuilder.toString();\n\t}", "private void finish() {\n }", "public static void htmlExtractor() throws IOException {\t\n\t\tString inizio=\"Inizio:\"+new Date();\n\t\tfinal File sourceDocDir = new File(\"datasetWarc\");\n\t\tif (sourceDocDir.canRead()) {\n\t\t\tif (sourceDocDir.isDirectory()) {\n\t\t\t\tString[] files = sourceDocDir.list();\n\t\t\t\t// an IO error could occur\n\t\t\t\tif (files != null) {\n\t\t\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\t\t\tSystem.out.println(files[i]);\n\t\t\t\t\t\tFromWarcToHtml.WarcExtractor(new File(sourceDocDir, files[i]));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\n\n\t\t}\n\n\t\tSystem.out.println(\"Tempo Estrazione HTML:\"+\"Inizio: \"+inizio+\"Fine: \"+new Date());\n\n\t}", "private void printStatusHtmlEnd\n\t\t(PrintWriter out)\n\t\t{\n\t\tout.println (\"<P>\");\n\t\tout.println (\"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"Web interface:&nbsp;&nbsp;\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.print (\"<A HREF=\\\"\");\n\t\tprintWebInterfaceURL (out);\n\t\tout.print (\"\\\">\");\n\t\tprintWebInterfaceURL (out);\n\t\tout.println (\"</A>\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"Powered by Parallel Java:&nbsp;&nbsp;\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"<A HREF=\\\"http://www.cs.rit.edu/~ark/pj.shtml\\\">http://www.cs.rit.edu/~ark/pj.shtml</A>\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"Developed by Alan Kaminsky:&nbsp;&nbsp;\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"<A HREF=\\\"http://www.cs.rit.edu/~ark/\\\">http://www.cs.rit.edu/~ark/</A>\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"</TABLE>\");\n\t\tout.println (\"</BODY>\");\n\t\tout.println (\"</HTML>\");\n\t\t}", "public void endDocument ()\n\t\t{\n\t\t\t//System.out.println(\"End document\");\n\t\t}", "protected void page () throws HTMLParseException {\r\n while (block.restSize () == 0) {\r\n switch (nextToken) {\r\n case END:\r\n return;\r\n case LT:\r\n lastTagStart = tagStart;\r\n tagmode = true;\r\n match (LT);\r\n tag (lastTagStart);\r\n break;\r\n case COMMENT:\r\n //block.addToken (new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n match (COMMENT);\r\n break;\r\n case SCRIPT:\r\n //block.addToken (new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n addTokenCheck(new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n match (SCRIPT);\r\n break;\r\n case STRING:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n break;\r\n case MT:\r\n if(!tagmode) {\r\n scanString();\r\n }\r\n default:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n }\r\n }\r\n }", "public void endDocument()\r\n\t{\r\n\t /* marc_out.add(\"=008 \" + running_date + \"s\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\sbm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" + language + \"\\\\d\"); */ /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=008 \" + running_date + \"s\" + comp_date + \"\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\obm\\\\\\\\\\\\000\\\\0\\\\\" + language + \"\\\\d\"); /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=264 30$a[Washington, D. C.] :$bGeorge Washington University,$c\" + comp_date + \".\"); /** 20130430: rev 260*/\r\n\t}", "@Override\n public void run() {\n mHunterSeeker.onFinishPage(emailsOnPage, lastHtmlResult);\n onSendUpdate(\"RegexUtils.purify returned \" + emailsOnPage.size() + \" items\");\n }", "public void endData()\n\t\t\t{\n\t\t\t\tsend(\"</data>\", false);\n\t\t\t}", "public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }", "public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }", "public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }", "@Override\n\t\t public void onPageFinished(WebView view, String url) {\n\t\t webView.loadUrl(\"javascript:HTMLOUT.processHTML(document.documentElement.outerHTML);\");\n\t\t }", "public void run()\n {\n mkdStack = translateMacroStack(mkdStack);\n //translate mkd to html\n translateMkdToHtml();\n //send html string to global variable\n Compiler.htmlString = htmlStackToString();\n }", "public static String printFooter()\r\n\t{\r\n\t\treturn \"</html></body>\";\r\n\t}", "@Override\n\tpublic void endDocument() {\n\t\t\n\t}", "public void endDocument() {\n }", "public HTMLParser () {\r\n this.pagepart = null;\r\n }", "public int doAfterBody() throws JspTagException {\n try {\n BodyContent body = getBodyContent();\n JspWriter out = body.getEnclosingWriter();\n\n /* Parse records and output as formatted list */\n BufferedReader contentReader = new BufferedReader(body.getReader());\n String record = \"\";\n while ((record = contentReader.readLine()) != null) {\n if (record.trim().length() > 0) {\n out.println(formatListItem(record.trim()));\n }\n }\n\n }\n catch (IOException e) {\n throw new JspTagException(e.toString());\n }\n return SKIP_BODY;\n }", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "@Override\n\tpublic String getTail(Handler h) {\n\t\tStringBuffer buf = new StringBuffer(100);\n\t\tbuf.append(\"\\t\\t</table>\\n\");\n\t\tbuf.append(\"\\t</body>\\n\");\n\t\tbuf.append(\"</html>\");\n\t\t\n\t\treturn buf.toString();\n\t}", "protected void onPostExecute(String filename) {\r\n\t\t\t// dismiss the dialog once got all details\r\n\t\t\tpDialog.dismiss();\r\n\t\t\ttampil.loadData(html, \"text/html\", \"UTF-8\");\r\n\t\t\t// tampil.setText(html));\r\n\r\n\t\t}", "private void postHTMLDynamic(BufferedReader reader, int cnt) throws IOException {\n String htmlLine = reader.readLine();\n while (htmlLine != null) {\n if(htmlLine.equals(VISITED_TEMPLATE)){\n int indx = htmlLine.indexOf('X');\n String tmp = htmlLine.substring(0, indx) + cnt + htmlLine.substring(indx+1);\n htmlLine = tmp;\n }\n out.println(htmlLine);\n htmlLine = reader.readLine();\n }\n reader.close();\n }", "public void close(){\r\n Transformer t = null;\r\n\t\ttry {\r\n\t\t\tt = TransformerFactory.newInstance().newTransformer();\r\n\t\t\tt.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\tt.setOutputProperty(OutputKeys.INDENT, \"yes\"); \r\n\t\t\tt.transform(new DOMSource(document), new StreamResult(new FileOutputStream(XMLFileName))); \t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "@Override\n public void prepareHtmlDataList() {\n makeGCDataInfoOutputData();\n makeLaunchDataInfoOutputData();\n }", "private void handlePP() {\n String inner = document.body().html();\n inner.replaceAll(\"<p></p>\", \"<p>\");\n document.body().html(inner);\n }", "public void generatePostFooter (\n HttpServletRequest request, HttpServletResponse response)\n throws IOException\n {\n BuildHtmlFooter(new PrintWriter (response.getOutputStream()));\n }", "@Override\n\tpublic void visit(Page page) {\n\t\t\n\t\ttry{\n\t\t\tfin=\"\";\n\t\t\tif(flag == 0){\n\t\t\t\tfw = new FileWriter(wrtFile);\n\t\t\t\tfw1 = new FileWriter(wrtFile1);\n\t\t\t\tvisit_url = new HashSet<String>();\n\t\t\t\tall_txt = new HashSet<String>();\n\t\t\t\teng_sen = new ArrayList<String>();\n\t\t\t}\n\t\t\tflag++;\n\t\t\tsynchronized (this) {\n\t\t\t\tif(page.getParseData() instanceof HtmlParseData){\n\t\t\t\t\tHtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\t\t\t\t\tString html = htmlParseData.getHtml();\n\t\t\t\t\tString url = page.getWebURL().getURL().toLowerCase();\n\t\t\t\t\t//System.out.println(\"VISIT: \"+ url);\n\t\t\t\t\t//System.out.println(\"HTML: \"+ html);\n\t\t\t\t\tDocument doc = Jsoup.parse(html);\n\t\t\t\t\tdoc.removeClass(\"twitter-tweet\");\n\t\t\t\t\tElements links = doc.select(\"div\");\n\t\t\t\t\tIterator<Element> it = links.iterator();\n\t\t\t\t\t\n\t\t\t\t\tString text=\"\";\n\t\t\t\t\tElement link;\n\t\t\t\t\tElements children;\n\t\t\t\t\twhile(it.hasNext()){\n\t\t\t\t\t\tlink = it.next();\n\t\t\t\t\t\tif(link.attr(\"class\").equals(\"desc\")){\n\t\t\t\t\t\t\t//System.out.println(\"Division Class: \"+ link.attr(\"class\"));\n\t\t\t\t\t\t\t//text.replaceAll(\",\", \"(COMMA)\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tchildren = link.children();\n\t\t\t\t\t\t\tif(!children.isEmpty()){\n\t\t\t\t\t\t\t\tIterator<Element> child_it = children.iterator();\n\t\t\t\t\t\t\t\tElement child;\n\t\t\t\t\t\t\t\twhile(child_it.hasNext()){\n\t\t\t\t\t\t\t\t\tchild = child_it.next(); \n\t\t\t\t\t\t\t\t\tif(child.attr(\"data-lang\").equals(\"en\") || child.attr(\"class\").equals(\"instagram-media\") || child.text().contains(\"Read Also\")){\n\t\t\t\t\t\t\t\t\t\tchild.text(\"\");\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\tif(!text.contains(link.text())){\t\t\n\t\t\t\t\t\t\t\tif(!link.text().matches(\".*Updated (Mon|Tue|Wed|Thu|Fri|Sat|Sun).*\")){\n\t\t\t\t\t\t\t\t\ttext += link.text();\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}\n\t\t\t\t\t\t\t//System.out.println(\"Text: \"+ text);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(link.attr(\"class\").equals(\"caption\")){\n\t\t\t\t\t\t\t//System.out.println(\"Division Class: \"+ link.attr(\"class\"));\n\t\t\t\t\t\t\t//text.replaceAll(\",\", \"(COMMA)\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tchildren = link.children();\n\t\t\t\t\t\t\tif(!children.isEmpty()){\n\t\t\t\t\t\t\t\tIterator<Element> child_it = children.iterator();\n\t\t\t\t\t\t\t\tElement child;\n\t\t\t\t\t\t\t\twhile(child_it.hasNext()){\n\t\t\t\t\t\t\t\t\tchild = child_it.next(); \n\t\t\t\t\t\t\t\t\tif(child.attr(\"data-lang\").equals(\"en\") || child.attr(\"class\").equals(\"instagram-media\") || child.text().contains(\"Read Also\")){\n\t\t\t\t\t\t\t\t\t\tchild.text(\"\");\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\tif(!text.contains(link.text())){\t\t\n\t\t\t\t\t\t\t\tif(!link.text().matches(\".*Updated (Mon|Tue|Wed|Thu|Fri|Sat|Sun).*\")){\n\t\t\t\t\t\t\t\t\ttext += link.text();\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}\n\t\t\t\t\t\t\t//System.out.println(\"Text: \"+ text);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(text != \"\"){\n\t\t\t\t\t\tif(!visit_url.contains(url) && !all_txt.contains(text)){\n\t\t\t\t\t\t\tfin = text+\"\\n\";\n\t\t\t\t\t\t\tfin1 = url+\"\\n\";\n\t\t\t\t\t\t\t//System.out.println(\"Text: \"+ text);\n\t\t\t\t\t\t\t//System.out.println(\"URL: \"+ url);\n\t\t\t\t\t\t\tFiles.write(Paths.get(wrtFile), fin.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t\t\t\tFiles.write(Paths.get(wrtFile1), fin1.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t\t\t\tall_txt.add(text);\n\t\t\t\t\t\t\tvisit_url.add(url);\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}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void openEndTag() throws XMLStreamException {\n write(\"</\");\n }", "public static void makeHtmlFile(String s,PrintWriter pw,String first,String second,String third)\n \t{\n \t pw.println(\"<!DOCTYPE html><html lang=\\\"en\\\"><head><meta charset=\\\"UTF-8\\\"><title>\"+s+\"</title><link rel=\\\"stylesheet\\\" href=\\\"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css\\\"></head>\");\n \t pw.println(\"<body id=\\\"body\\\"><div class=main id=\\\"main\\\"> </div>\");\n \t pw.println(\"<div id=\\\"\"+ first+\"\\\" class=\"+\"\\\"#\"+first+\"\\\"><h3>\"+first+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+second+\"\\\" class=\\\"#\"+second+\"\\\"><h3>\"+second+\"</h3></div>\");\n \t pw.println(\"<div id=\\\"\"+third+\"\\\" class=\\\"#\"+third+\"\\\"><h3>\"+third+\"</h3></div>\");\n \t pw.println(\"<script src=\\\"Main.js\\\"></script>\");\n \t pw.println(\"</body></html>\");\n\t \t pw.close();\n\t }", "public void fnCloseHtmlReport() {\r\n\r\n\t\t//Declaring variables\r\n\r\n\t\tString strTestCaseResult = null;\r\n\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Get the current time\r\n\t\tg_EndTime = new Date();\r\n\t\t\r\n\t\t//Fetch the time difference\r\n\t\tString strTimeDifference = fnTimeDiffference(g_StartTime.getTime(),g_EndTime.getTime());\r\n\t\t\r\n\t\t//Close the html file\r\n\t\ttry {\t\t\r\n\t //Write the number of test steps passed/failed and the time which the test case took to run\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR></TR><TR><TD BGCOLOR=BLACK WIDTH=5%></TD><TD BGCOLOR=BLACK WIDTH=28%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Time Taken : \"+ strTimeDifference + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Pass Count : \" + g_iPassCount + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Fail Count : \" + g_iFailCount + \"</b></FONT></TD><TD BGCOLOR=Black WIDTH=7%></TD></TR>\");\r\n\t //Close the HTML tags\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><TABLE WIDTH=100%><TR><TD ALIGN=RIGHT><FONT FACE=VERDANA COLOR=ORANGE SIZE=1>&copy; Tieto NetBank Automation - Integrated Customer Management</FONT></TD></TR></TABLE></BODY></HTML>\");\r\n\t\t\t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Check if test case passed or failed\r\n\r\n\t\tif (g_iFailCount != 0) {\r\n\t\t\tstrTestCaseResult = \"Fail\";\r\n\t\t} else \r\n\t\t{\r\n\t\t\tstrTestCaseResult = \"Pass\";\r\n\t\t}\r\n\t\t\r\n //fnCloseHtmlReport = strTestCaseResult\r\n \r\n //Write into the Summary Report\r\n fnWriteTestSummary (\"Report_\"+ Dictionary.get(\"TEST_NAME\") + \"-\" + Dictionary.get(\"ACTION\"),strTestCaseResult,strTimeDifference);\r\n\t\t\r\n\t}", "@Override\n public void close()\n {\n for ( Map.Entry<String,CharacterSet> rule : fragmentRules.entrySet() )\n {\n CharacterSet set = rule.getValue();\n output.append( \"fragment \" );\n lexerRule( rule.getKey() ).append( \" : \" );\n if ( CharacterSet.ANY.equals( set.name() ) )\n {\n set.accept( new AnyCharacterExceptFormatter( output ) );\n }\n else\n {\n output.append( '[' );\n set.accept( new SetFormatter( output ) );\n output.append( ']' );\n }\n output.println( \" ;\" ).println(); // PRF was \" ;\\n\"\n }\n }", "private void postErrorPage() throws IOException {\n out.println(OK);\n System.out.println(NO);\n out.println(htmlType);\n out.println(closed);\n out.println(\"Content-Length: \" + ERROR_FILE.length());\n out.println(ENDLINE);\n String htmlLine = ERROR_READER.readLine();\n while (htmlLine != null) {\n out.println(htmlLine);\n htmlLine = ERROR_READER.readLine();\n }\n ERROR_READER.close();\n }", "private static void go2(){\n\t\tString concreateURL = \"http://www.yixinhealth.com/%E5%8C%96%E9%AA%8C%E5%92%8C%E6%A3%80%E6%9F%A5/%E5%BF%83%E7%94%B5%E5%9B%BE/\"; \n\t\tConnection c = Jsoup.connect(concreateURL); \n\t\tc.timeout(10000);\n\t\ttry {\n\t\t\tDocument doc = c.get();\n\t\t\t//System.out.println(doc.html()); \n\t\t\t//System.out.println(doc.getElementById(\"content_area\").html());\n\t\t\t//Element eles = doc.getElementById(\"content_area\");\n\t\t\t//System.out.println(eles.html());\n\t\t\t\n\t\t\t//Below code is for the multiple link page\n\t\t\t//Elements eles2 = eles.getElementsByAttributeValue(\"style\", \"text-align: center;\");\n\t\t\t//System.out.println(eles2.html());\n\t\t\t/*for(Element ele: eles2){\n\t\t\t\tElements link = ele.getElementsByTag(\"a\");\n\t\t\t\t//System.out.println(link.html());\n\t\t\t\tfor (int i=0;i<link.size();i++) {\n\t\t\t\t\tSystem.out.println(link.get(i).attr(\"href\"));\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(eles2.html());\n\t\t\tElement eles = doc.getElementById(\"content_area\");\n\t\t\tElements eles2 = eles.getElementsByTag(\"img\");\n\t\t\tfor(int i=0;i<eles2.size();i++){\n\t\t\t\teles2.get(i).parent().attr(\"style\", \"text-align:center\");\n\t\t\t\teles2.get(i).parent().parent().nextElementSibling().attr(\"style\", \"text-align:center\");\n\t\t\t\teles2.get(i).attr(\"style\", \"width:50%\");\n\t\t\t}\n\t\t\t\n\t\t\tElements eles3 = eles.getElementsByClass(\"j-header\");\n\t\t\tfor (Element ele : eles3) {\n\t\t\t\tElements eleHeader = ele.getElementsByTag(\"h2\");\n\t\t\t\teleHeader.attr(\"style\", \"text-align:center\");\n\t\t\t}\n\t\t\tSystem.out.println(eles.html());\n\t\t\t\n\t\t\t//Below code is help to clear out the share icon to like Sina weibo\n\t\t\tElements eles4 = eles.getElementsByClass(\"bshare-custom\");\n\t\t\t//eles4.remove();\n\t\t\t\n\t\t\t//Elements eles3 = eles.getElementsByClass(\"n*j-imageSubtitle\");\n\t\t\t//System.out.println(eles3.size());\n\t\t\t/*for(int i=0;i<eles3.size();i++){\n\t\t\t\teles3.get(i).attr(\"style\", \"text-align:center;width:50%\");\n\t\t\t}\n\t\t\tSystem.out.println(eles.html());*/\n\t\t\t//System.out.println(eles2.get(0).attr(\"src\"));\n\t\t\t/*Element eles = doc.getElementById(\"content_area\");\n\t\t\tElements eles2 = eles.getElementsByClass(\"j-header\");\n\t\t\tfor (Element ele : eles2) {\n\t\t\t\tElements eleHeader = ele.getElementsByTag(\"h2\");\n\t\t\t\tSystem.out.println(\"Title---->\"+eleHeader.html()); \n\t\t\t}\n\t\t\tElements elesBody = eles.getElementsByClass(\"j-text\");\n\t\t\tSystem.out.println(\"Body---->\"+elesBody.html()); */\n\t\t\t//System.out.println(eles2.html()); \n /*List<String> nameList = new ArrayList<String>(); \n for (Element ele : eles) {\n \tString text = ele.select(\"h*\").text();\n \tSystem.out.println(text); \n String text = ele.select(\"span\").first().text(); \n if (text.length() > 1 && text.startsWith(\"▲\")) { \n \n if (Integer.parseInt(text.substring(1)) > 30) { \n // 在这里.html()和.text()方法获得的内容是一样的 \n System.out.println(ele.select(\"a\").first().html()); \n nameList.add(ele.select(\"a\").first().text()); \n } \n } \n } */\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@InnerAccess void visitEnd ()\n\t{\n\t\tclassWriter.visitEnd();\n\t}", "public void closeElement() throws IOException {\r\n if (this.elements.size() <= 1) return;\r\n Element elt = popElement();\r\n this.depth--;\r\n // this is an empty element\r\n if (this.isNude) {\r\n writer.write('/');\r\n this.isNude = false;\r\n // the element contains text\r\n } else {\r\n if (elt.hasChildren) this.indent();\r\n this.writer.write('<');\r\n this.writer.write('/');\r\n int x = elt.qName.indexOf(' ');\r\n if (x < 0)\r\n this.writer.write(elt.qName);\r\n else\r\n this.writer.write(elt.qName.substring(0, x));\r\n }\r\n // restore previous mapping if necessary\r\n restorePrefixMapping(elt);\r\n this.writer.write('>');\r\n if (super.indent) this.writer.write('\\n');\r\n }", "public void finish() { \n\t\t\n\t}", "public void createDeatilsPage(String deatils, ITestResult r) {\n\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\twriter = createHTMLWriter(folderToSave + \"\\\\support\", r.getName() + \"_\" + r.getStartMillis() + \".html\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"unable to create \" + r.getName() + \"_\" + r.getEndMillis());\n\t\t\treturn;\n\t\t}\n\t\twriter.println(\n\t\t\t\t\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\\\">\");\n\t\twriter.println(\"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\");\n\t\twriter.println(\n\t\t\t\t\"<head><style>.class-green{background-color:green;} .class-blue{background-color:blue;}</style><script> \"\n\t\t\t\t\t\t+ \"function goBack() \" + \"{ \" + \"window.history.back() } </script></head> \");\n\t\twriter.println(\"<body><table border=\\\"1\\\" CELLPADDING=\\\"1\\\" CELLSPACING=\\\"1\\\">\");\n\t\twriter.println(\"<thead><tr><th COLSPAN=\\\"2\\\"><h4>Execution Steps for \" + r.getName() + \"</h4></th></tr>\"\n\t\t\t\t+ \"<tr><th>Step No</th> <th>Action Details</th></tr>\" + \"</thead>\");\n\t\twriter.println(deatils);\t\t\n\t\twriter.println(\"</tbody></table> \");\n\t\tif (r.getAttribute(\"LOGSRC\") != null) {\n\t\t\twriter.println(\n\t\t\t\t\t\"</br><br/><a href='\" + r.getName() + \"_\" + r.getStartMillis() + \".png'>Reference Screen</a>\");\n\t\t}\n\t\t// writer.println(\"</br><br/><input type=\\\"button\\\" value=\\\"Back To Test\n\t\t// Cases\\\" onclick=\\\"goBack()\\\"/> </body>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "public void endElement(String uri, String localName, String qName) {\n CodeWriter out = getTranslaterContext().getCodeWriter();\n out.printIndent().println(\"sfsContentHandler.characters(\" + sb.toString().trim() + \");\");\n }", "protected void finishUp() {\r\n // pushOutput(table, 0);\r\n viewDone(\"Done\");\r\n }", "public Frysak_11_closing_document() {\r\n }", "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "protected void finish() {\n }", "public void buildClassFooter() {\n\t\twriter.writeFooter();\n\t}", "@Override\n public void xhtmlSuccess(String xhtml)\n {\n cur_html = xhtml;\n markdown_failed = false;\n refreshDisplay();\n }", "public void finalize()\n\t{\n\t\tif (!isClosed) {\n\t\t\t// System.out.println(\"SimWriter: finalize() - writing closing bracket to file...\");\n\t\t\twList.writeToFile(\"\\n ]\", 0);\n\t\t\tisClosed = true;\n\t\t}\n\t\t//System.out.println(\"SimWriter: finalize() done\");\n\t}", "protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (bufferedOutputStream != null) {\n\n // make sure the writer flushes everything to the underlying output stream\n if (bufferedWriter != null) {\n bufferedWriter.flush();\n }\n\n // send the buffered response to the client\n bufferedOutputStream.writeBufferTo(getResponse().getOutputStream());\n\n }\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not flush response buffer\", e);\n }\n\n }", "@Override\n\tpublic void finish() {\n\t\t\n\t}", "private static void writeHtmlBody(SimpleWriter out,\n SortingMachine<Pair<String, Integer>> words, String inputName,\n int n) {\n\n out.println(\"<body>\");\n out.println(\"<h2> Top \" + n + \" words in \" + inputName + \" </h2>\");\n out.println(\"<hr>\");\n\n out.println(\"<div class=\\\"cdiv\\\">\\r\\n\" + \"<p class=\\\"cbox\\\">\");\n\n while (words.size() > 0) {\n Map.Pair<String, Integer> pair = words.removeFirst();\n\n int font = (48 - 11) * (pair.value() - 30);\n font /= (500 - 30);\n font += 11;\n out.println(\"<span style='cursor:default' class=\\\"f\" + font\n + \"\\\" title=\\\"count: \" + pair.value() + \"\\\">\" + pair.key()\n + \" </span>\");\n }\n\n out.println(\"</p>\");\n out.println(\"</div>\");\n\n }", "private static void outputFooter(SimpleWriter out) {\n assert out != null : \"Violation of: out is not null\";\n assert out.isOpen() : \"Violation of: out.is_open\";\n\n out.println(\"</table>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }", "protected void end() {\n \n \n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\twebView.loadDataWithBaseURL(\"\", html, \"text/html\",\"UTF-8\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.gc();\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}", "public void elementEnd() {\n\t\t\t\t\t\tblipsText.append(\"\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\tpublic int doEndTag() throws JspException {\n\t\treturn EVAL_PAGE;\r\n\t}", "public void update(){\n\t\tresponse = buildHtml(new ArrayList<HtmlElement>(elements));\n\t}", "public void WriteEndElement() throws IOException {\r\n\tCerrarElemento();\r\n\tif(!pila.isEmpty()) bw.write(\"</\" + (String)pila.pop() + \">\");\r\n }", "public void startDocument() throws IOException {\n FacesContext context = FacesContext.getCurrentInstance();\n UIViewRoot viewRoot = context.getViewRoot();\n HtmlPage page = FacesUtils.getHtmlPage(viewRoot);\n if (page == null || !page.isRendered()) {\n HtmlPageRenderer renderer = getHtmlPageRenderer(context);\n if (renderer != null) {\n renderer.encodePageBegin(context, viewRoot);\n }\n }\n }", "public void endParsing();", "protected void end() {\n\r\n\t}", "@Override\n public void endDocument() throws SAXException {\n System.out.println(\"End\");\n }", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "String getLastHtml();", "private void Html_footer_Summary(int total, int pass, int fail, int skipp, long timetoexecute) {\n\n\t\thtmlWriter.println(\"<br/><a href='../test-output/index.html'>TestNG default Report</a>\");\n\t\thtmlWriter.flush();\n\t}", "public void generateOutputAndClose() {\n\n try{\n Thread.sleep(1000);\n }catch(Exception e){\n\n }\n\n RecursionStore.finishGuiProcessing();\n\n DependencyGraph dg = DependencyGraph.getGraph();\n String outputName = _argumentsParser.getOutputFileName();\n\n try {\n dg.generateOutput(RecursionStore.getBestState(), outputName);\n System.out.println(\"Finished\");\n if(!_argumentsParser.displayVisuals()){\n System.exit(0);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public int doEndTag() throws JspException \n\t{\n\t\twrite(FORM_END);\n\t\treturn EVAL_PAGE;\n\t}", "public void finish(TemplateView view) {\n for (CalleeInfo callee : callees) {\n Callee result = new Callee\n (\n callee.info.getLine(), callee.name, \n unescape(unit.read(callee.info)), callee.isTemplate\n );\n \n view.addCallee(result);\n }\n \n // clean the source and then unescape previously escaped codes\n cleanSource();\n \n // set the resulting buffer as the source code\n view.setSourceCode(unescape(buffer.toString()));\n }" ]
[ "0.7486674", "0.6360721", "0.62351084", "0.62213385", "0.6202414", "0.62020206", "0.6181606", "0.6087693", "0.60756195", "0.6033457", "0.60160786", "0.5945805", "0.59310764", "0.5910174", "0.5909636", "0.5861734", "0.5840931", "0.57960147", "0.5791981", "0.5789775", "0.5783126", "0.57602245", "0.57577443", "0.57378066", "0.5716836", "0.5706029", "0.56989586", "0.569853", "0.5617693", "0.5595959", "0.5593389", "0.5581073", "0.55667144", "0.5561253", "0.55607796", "0.55569243", "0.5546641", "0.55430377", "0.5534938", "0.5533165", "0.5521051", "0.548857", "0.54643404", "0.5456193", "0.544727", "0.5446422", "0.5441189", "0.5435783", "0.53973675", "0.5392148", "0.5388947", "0.5386441", "0.53725874", "0.537037", "0.5363626", "0.5359578", "0.5353509", "0.5350847", "0.53486276", "0.53478175", "0.5346365", "0.53456575", "0.5344386", "0.53417647", "0.53387517", "0.53256166", "0.5324496", "0.5322371", "0.53183085", "0.53160864", "0.53106153", "0.53087306", "0.5307441", "0.53005904", "0.5287676", "0.5275964", "0.52749276", "0.5273797", "0.527058", "0.52673644", "0.5266614", "0.52540535", "0.52533704", "0.52356136", "0.5234017", "0.5223105", "0.52195215", "0.52162045", "0.521422", "0.5212786", "0.5199526", "0.51967865", "0.51967573", "0.519523", "0.51846874", "0.5179137", "0.5175607", "0.517498", "0.51729864", "0.5168937" ]
0.67236596
1
writes the title area which contain the name
private void createTitleContent(BufferedWriter writer) throws IOException { String title = data.getSuiteName(); String titleTag = "<div style='height: 50px; width: inherit; box-shadow: 1px 1px 1px #888888;background-color: #616161;'>"; String label = "<label style='font-weight: bold;position: absolute;padding-left: 16px;color: white;padding-top: 8px;" + "font-family: Roboto, sans-serif;'>" + title + "</label></div>"; writer.write(titleTag); writer.write(label); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, true, true));\n\t\t\n\t\tJLabel title = GUIComponents.createLabel(YAETMMainView.PROGRAM, new Point(45, 12));\n\t\ttitle.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\n\t\t\n\t\tJLabel titleExtend = GUIComponents.createLabel(YAETMMainView.PROGRAMEXT, new Point(10, 33));\n\t\ttitleExtend.setSize(200, 20);\n\t\ttitleExtend.setFont(new Font(\"Arial\", Font.PLAIN, 11));\n\t\t\n\t\ttitlePanel.add(titleExtend);\n\t\ttitlePanel.add(title);\n\t\tpanel.add(titlePanel);\n\t}", "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}", "public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }", "public void printTitle()\n {\n System.out.println(title);\n }", "private String addTitle(StringBuilder finalText) {\n\t\t// One Parameter: DisplayName\n\t\tMainController.titleName = parameters[0];\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|title:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}", "protected void drawTitle(){\n titleBox = new Rectangle(155,380, 490, 200);\n titleBorder = new Rectangle(150, 375, 500, 210);\n titleBorder.setFillColor(pink);\n titleBorder.setFilled(true);\n titleBox.setFillColor(Color.BLACK);\n titleBox.setFilled(true);\n title = new Image(206, 400, \"124-hw4/BreakoutText/breakoutText.png\");\n\n canvas.add(titleBorder);\n canvas.add(titleBox);\n canvas.add(title);\n }", "public void setTitlePanel() {\n\t\ttitleview = new TitlePanelView();\n\t\ttitleview.createView();\n\t\tnorthpanel.add(titleview.getView());\n\t\n\t}", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "public static void printTitle( String title )\r\n {\n }", "public void setTitle(String title) { this.title = title; }", "private void constructTitlePanel() {\n titlePanel = new JPanel();\n titlePanel.setPreferredSize(relativeSize(0.8f, 0.03f));\n \n JLabel titleLabel = new JLabel(\"JMarkets Server Interface\");\n titleLabel.setFont(new Font(\"Arial\", Font.BOLD, 18));\n titleLabel.setForeground(new Color(102, 51, 0));\n \n titlePanel.add(titleLabel);\n }", "public void makeTitle(JPanel upperPanel) {\n JLabel mainTitleLabel = new JLabel(\" Courses\");\n mainTitleLabel.setIcon(createImageIcon(\"./images/coursesIconWhite.png\"));\n mainTitleLabel.setFont(new Font(\"Proxima Nova\", Font.BOLD, 30));\n mainTitleLabel.setForeground(Color.white);\n mainTitleLabel.setBorder(new EmptyBorder(70, 70, 70, 0));\n upperPanel.add(mainTitleLabel, BorderLayout.CENTER);\n }", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void updateTitle()\n {\n String frameName =\n SWTStringUtil.insertEllipsis(frame.getName(),\n StringUtil.NO_FRONT,\n SWTStringUtil.DEFAULT_FONT);\n\n view.setWindowTitle(modificationFlag\n + FRAME_PREFIX\n + \": \"\n + project.getName()\n + \" > \"\n + design.getName()\n + \" > \"\n + frameName\n + ((OSUtils.MACOSX) ? \"\" : UI.WINDOW_TITLE));\n }", "private void setWindowTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title){\n \tthis.title = title;\n }", "void setTitle(java.lang.String title);", "void showTitle(String title);", "public void setTitle(String title){\n this.title = title;\n }", "public void setTitle(java.lang.String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "TITLE createTITLE();", "public void displayTitle() {\n\t\tthis.theScreen.setFont(Preferences.TITLE_FONT);\n\t\tthis.theScreen.setColor(Preferences.TITLE_COLOR);\n\t\tthis.theScreen.drawString(Preferences.TITLE,\n\t\t\t\tPreferences.TITLE_X, Preferences.TITLE_Y);\n\t}", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "@Override\r\n\tpublic void getTitle() {\n\t\t\r\n\t}", "public void prepareTitle()\n {\n DuelTitle title = new DuelTitle();\n addObject(title, 539, 186);\n }", "@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}", "@Override\n public void title()\n {\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "private Node createTitle() {\n\t\tText titleText = new Text(\" Restaurant Inventory Management \");\n\t\ttitleText.setFont(Font.font(\"Arial\", FontWeight.BOLD, 40));\n\t\ttitleText.setTextAlignment(TextAlignment.CENTER);\n\t\t\n\n\t\treturn titleText;\n\t}", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "public Text createTitle() {\n\t\tText title = new Text(\"Selecteer Gasten\");\n\t\ttitle.getStyleClass().add(\"h1\");\n\t\ttitle.setFont(Font.font(22));\n\t\treturn title;\t\t\n\t}", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\n\tthis.title = title;\n}", "public void setTitle(String title) {\n this.title = title;\n }", "protected void setTitle(String title) {\n this.title = title;\n }", "@Override\r\n\tpublic void getTitle(String title) {\n\t\t\r\n\t}", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "@Override\n public void title_()\n {\n }", "private void setTitle(String userTitle){\n title = userTitle;\n }", "@Override\r\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\r\n\t}", "private void createYourListsTitle() {\n\t\tjlYourLists = new JLabel(\"PLAYLISTS\");\t\t\n\t\tjlYourLists.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourLists.setForeground(new Color(250,250,250));\n\t}", "@Override\r\n public void create() {\r\n super.create();\r\n setTitle(title);\r\n }", "protected abstract void setTitle();", "public void setTitle(String title) {\r\n _title = title;\r\n }", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "@Override\n\tpublic void setTitle(String type, String name) {\n\t\ttxtTitle.setText(String.format(\"%s:%s\", new String[]{type,name}));\n\t}", "@Override\n public void setTitle(String title) throws IOException {\n title = title.replace(\"\\007\", \"\");\n writeOSCSequenceToTerminal((\"2;\" + title + \"\\007\").getBytes());\n }", "private void createYourMusicTitle() {\n\t\tjpYourMusic = new JPanel(new GridLayout(1,1));\n\t\tjpYourMusic.setOpaque(false);\n\t\tJLabel jlYourMusic = new JLabel(\"YOUR MUSIC\");\t\t\n\t\tjlYourMusic.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourMusic.setForeground(new Color(250,250,250));\n\t\tjpYourMusic.add(jlYourMusic);\n\t}", "public void setTitle(java.lang.String title)\n {\n this.title = title;\n }", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "public static void header(String title){\n byte titlelength = (byte)title.length();\n System.out.println(\"+================================================+\");\n System.out.printf(\"|%-\" + ((48 - titlelength) / 2) + \"s%\" + titlelength + \"s%-\" + ((49 - titlelength) / 2) + \n \"s|\" + EOF, \"\", title.toUpperCase(), \"\");\n System.out.println(\"+================================================+\");\n }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "public void titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}", "public void setTitle(String titleTemplate);", "private JPanel getTitlePanel() {\n JPanel main = ProgramPresets.createPanel();\n main.setLayout(new FlowLayout());\n JLabel tron1 = new JLabel(ProgramPresets.TRON);\n JLabel tron2 = new JLabel(ProgramPresets.TRON);\n mainTitle = ProgramPresets.createCenteredTitle(TITLE);\n subTitle = ProgramPresets.createCenteredTitle(SUB_TITLE);\n JPanel mainSub = ProgramPresets.createPanel();\n mainSub.setLayout(new GridLayout(2, 1));\n mainSub.add(mainTitle);\n mainSub.add(subTitle);\n main.add(tron1);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(mainSub);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(tron2);\n return main;\n }", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_scienceApp.setTitle(title);\n\t}", "private Label setTitle() {\r\n Label title = new Label(TITLE);\r\n title.setFont(Font.font(null, FontWeight.BOLD, null, TITLESZE));\r\n return title;\r\n }" ]
[ "0.77259374", "0.7406076", "0.73762506", "0.7072767", "0.69870585", "0.69742095", "0.6967268", "0.6927267", "0.6919898", "0.690527", "0.68823665", "0.6880833", "0.6869453", "0.68519795", "0.68468356", "0.6840883", "0.6822386", "0.68170834", "0.68072206", "0.6781503", "0.67796254", "0.67796254", "0.67796254", "0.67796254", "0.67796254", "0.6771455", "0.6771455", "0.6771455", "0.6762176", "0.67529994", "0.6745162", "0.67444813", "0.67381763", "0.67373234", "0.6723339", "0.6718781", "0.6718663", "0.6718663", "0.67168325", "0.6716683", "0.67149866", "0.67068374", "0.67068374", "0.67068374", "0.67068374", "0.6696572", "0.6696572", "0.6696572", "0.6695609", "0.6690452", "0.66728497", "0.66728497", "0.6658711", "0.6654253", "0.66323215", "0.663052", "0.6626742", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6622585", "0.6621484", "0.66098404", "0.660778", "0.6606834", "0.6578789", "0.6569151", "0.656906", "0.65689445", "0.65689445", "0.65689445", "0.65689445", "0.65689445", "0.65682125", "0.6565226", "0.65614855", "0.65607023", "0.65561575", "0.655485", "0.6553784", "0.6543396", "0.6532634", "0.6525848", "0.65158033", "0.6509507", "0.6484387" ]
0.7516708
1
Parent function for creating container and number of test tag and test methods
private void createTotalTest(BufferedWriter writer) throws IOException { // Creates the layout String layout = "<div style ='height: 100px;width: inherit;'>"; // Creates the child div String displayTotalTestLayout = "<div style='width: 260px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;'>"; // Creates Total Test Tag count writer.write(layout); writer.write(displayTotalTestLayout); createTotalTestCase(writer); createTotalTestMethod(writer); writer.write("</div></div>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TestContainer createTestContainer();", "T createContainer();", "Container createContainer();", "@Test\n public void test() throws IOException, InterruptedException {\n CountDownLatch latch = new CountDownLatch(1);\n\n try (\n GenericContainer<?> container = new GenericContainer<>(TestImages.TINY_IMAGE)\n .withCommand(\"true\")\n .withStartupCheckStrategy(new OneShotStartupCheckStrategy())\n ) {\n container.start();\n String createdAt = container.getContainerInfo().getCreated();\n\n // Request all events between startTime and endTime for the container\n try (\n EventsResultCallback response = DockerClientFactory\n .instance()\n .client()\n .eventsCmd()\n .withContainerFilter(container.getContainerId())\n .withEventFilter(\"create\")\n .withSince(Instant.parse(createdAt).getEpochSecond() + \"\")\n .exec(\n new EventsResultCallback() {\n @Override\n public void onNext(@NotNull Event event) {\n // Check that a create event for the container is received\n if (\n event.getId().equals(container.getContainerId()) &&\n event.getStatus().equals(\"create\")\n ) {\n latch.countDown();\n }\n }\n }\n )\n ) {\n response.awaitStarted(5, TimeUnit.SECONDS);\n latch.await(5, TimeUnit.SECONDS);\n }\n }\n }", "public IBodyElementsContainerTest(String name) {\n\t\tsuper(name);\n\t}", "public Container newContainer();", "TestNode createTestNode();", "public static void main(String[] args) {\n\t\tTestGeneric t=new TestGeneric();\n\t\tt.testAdd();\n\t\tt.testForEach();\n\t\tt.testChild();\n\t\tt.testForEach();\n\t\tt.testBasicType();\n\t\t\n\n\t}", "@Test\n public void whenCreateContainerShouldReturnTheIntegerType() {\n SimpleArray<Integer> arr = new SimpleArray<>(2);\n arr.add(2);\n arr.add(1);\n\n assertThat(arr.get(0), is(2));\n assertThat(arr.get(1), is(1));\n }", "public TestsAsset() {\n tests = new LinkedList<TestBean>();\n }", "public GenericTest()\n {\n }", "TestTarget createTestTarget();", "@Override\n void performTest() {\n new Base();\n new Child();\n }", "@Override\n void performTest() {\n new Base();\n new Child();\n }", "@Override\n void performTest() {\n new Base();\n new Child();\n }", "TestBlock createTestBlock();", "public void testGetSeriesCount() {\n TaskSeriesCollection c = createCollection1();\n }", "@Test\n void fillContainerTest() {\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n assertEquals(Resource.SHIELD,container.takeResource());\n }", "@Override\n public void test() {\n \n }", "private static List<TestSetup> getTests() {\n PivotPicker middlePiv = Quick::alwaysPickMiddle;\n\n // Pivot Pickers\n PivotPicker leftPiv = Quick::alwaysPickLeftmost;\n PivotPicker rightPiv = Quick::alwaysPickRightmost;\n PivotPicker motPiv = Quick::medianOfThree;\n PivotPicker[] pivots = {leftPiv, middlePiv, rightPiv, motPiv};\n String[] pivotNames = {\"Always Pick Leftmost\", \"Always Pick Middle\", \"Always Pick Rightmost\", \"Median Of Three\"};\n\n // Partitioning methods\n Partitioner jonPart = (array, left, right, pivot) -> partition_Jon(array, left, right, pivot);\n Partitioner lomutoPart = Quick::partition_Lomuto;\n Partitioner hoarePart = Quick::partition_Hoare;\n Partitioner[] partitioners = {lomutoPart, hoarePart};\n String[] partNames = {\"lomuto\", \"hoare\"};\n\n // Subsort methods and sizes\n Subsort insertionSub = Quick::insertionSort;\n Subsort[] subsorts = {insertionSub};\n String[] subsortNames = {\"insertion\"};\n List<Integer> sizes = new ArrayList<>();\n for (int i = 3; i < 128; i = 1 + (int) (i * 1.45)) {\n sizes.add(i);\n }\n Integer[] subsortSizes = sizes.toArray(new Integer[sizes.size()]);\n\n // Data generators\n Generator randomGen = (size) -> {\n return generateArray(100, 999, size);\n };\n Generator sortedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = i;\n }\n return arr;\n };\n Generator reversedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = arr.length - i;\n }\n return arr;\n };\n Generator[] generators = {\n randomGen,\n //sortedGen, reversedGen,\n //(size) -> { return generateArray(10000, 99999, size, 0xDEADBEEF); },\n //(size) -> { return generateArray(10000, 99999, size, 0xCAFEBABE); },\n //(size) -> { return generateArray(10000, 99999, size, 0xBAADF00D); },\n\n };\n String[] generatorNames = {\n \"Random\",\n //\"sorted\", \"reversed\",\n //\"Sequence:0xDEADBEEF\",\n //\"Sequence:0xCAFEBABE\",\n //\"Sequence:0xBAADF00D\",\n };\n\n // Default test data\n TestSetup defaultTest = new TestSetup(\"Default\", null, null, 0, null, null);\n\n List<TestSetup> tests = new ArrayList<>();\n tests.add(defaultTest);\n List<TestSetup> temp = new ArrayList<>();\n { // Block for creating partition method variants\n\n\n // Create variations of the test with different partitioning methods\n for (TestSetup setup : tests) {\n\n for (int i = 0; i < partitioners.length; i++) {\n TestSetup variant = new TestSetup(setup, partNames[i]);\n variant.part = partitioners[i];\n temp.add(variant);\n }\n }\n }\n\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n // Create variations of the test with different pivot picking methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < pivots.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" + \" + pivotNames[i]);\n variant.pivp = pivots[i];\n temp.add(variant);\n }\n }\n\n { // Block for creating generator (dataset) variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different data generation methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < generators.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" on \" + generatorNames[i] + \" data\");\n variant.gen = generators[i];\n temp.add(variant);\n }\n }\n }\n\n\n { // Block for creating subsort variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different subsort methods and thresholds\n for (TestSetup setup : tests) {\n temp.add(setup);\n\n for (int i = 0; i < subsorts.length; i++) {\n // And also one version for each size!\n for (int k = 0; k < subsortSizes.length; k++) {\n TestSetup variant = new TestSetup(setup, setup.name + \"+\" + subsortNames[i] + \" below \" + subsortSizes[k]);\n variant.sst = subsortSizes[k];\n variant.ssort = subsorts[i];\n //temp.add(variant);\n\n TestSetup variant_finalSort = new TestSetup(variant, variant.name + \" once at end\");\n variant_finalSort.sortFinal = true;\n temp.add(variant_finalSort);\n }\n }\n }\n }\n\n\n // Return completed variation list\n return temp;\n }", "@Test\r\n\tpublic void createChapterDriver() {\r\n\t\tfinal Object testingData[][] = {\r\n\t\t\t{ // Successful test\r\n\t\t\t\t\"producer3\", 305, null\r\n\t\t\t}, { // Content without year\r\n\t\t\t\t\"producer1\", 305, IllegalArgumentException.class\r\n\t\t\t}, { // A user tries to create an content \r\n\t\t\t\t\"user3\", 305, IllegalArgumentException.class\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < testingData.length; i++)\r\n\t\t\tthis.createChapterTemplate((String) testingData[i][0], (Integer) testingData[i][1], (Class<?>) testingData[i][2]);\r\n\t}", "@Test\n void refillingContainerTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n container.fillContainer(Resource.COIN);\n assertEquals(Resource.COIN,container.takeResource());\n }", "protected abstract Item createTestItem1();", "@Test\n public void countInfosTest() {\n // TODO: test countInfos\n }", "public Multi2Test( String testName )\n {\n super( testName );\n }", "public void testStorageContainerAdd() //Container Added only with the existing values of Storage Type\r\n\t{\n\t\tString[] arr = getDataObject().getValues();\r\n\r\n\t\tStorageContainerForm storageContainerForm = new StorageContainerForm();\r\n\t\tsetRequestPathInfo(\"/OpenStorageContainer\");\r\n\t\taddRequestParameter(\"operation\",\"add\");\r\n\t\taddRequestParameter(\"pageOf\",\"pageOfStorageContainer\");\r\n\t\tsetActionForm(storageContainerForm);\r\n\t\tactionPerform();\r\n\t\tverifyForward(\"success\");\r\n\r\n\t\tsetRequestPathInfo(\"/StorageContainer\");\r\n\t\taddRequestParameter(\"operation\",\"add\");\r\n\t\taddRequestParameter(\"pageOf\",\"pageOfStorageContainer\");\r\n\t\tsetActionForm(storageContainerForm);\r\n\t\tactionPerform();\r\n\t\tverifyForward(\"pageOfStorageContainer\");\r\n\r\n\t\tstorageContainerForm=(StorageContainerForm)getActionForm();\r\n\t\tstorageContainerForm.setTypeId(Long.parseLong(arr[0]));\r\n\t\tstorageContainerForm.setSelectedContainerName(arr[1]);\r\n\t\tstorageContainerForm.setSiteId(Long.parseLong(arr[2]));\r\n\t\tstorageContainerForm.setNoOfContainers(Integer.parseInt(arr[3]));\r\n\t\tstorageContainerForm.setDefaultTemperature(arr[4]);\r\n\t\tstorageContainerForm.setOneDimensionCapacity(Integer.parseInt(arr[5]));\r\n\t\tstorageContainerForm.setTwoDimensionCapacity(Integer.parseInt(arr[6]));\r\n\t\tstorageContainerForm.setActivityStatus(arr[7]);\r\n\r\n\t\tlong[] arr1={Long.parseLong(arr[8].trim())};\r\n\t\tstorageContainerForm.setHoldsStorageTypeIds(arr1);\r\n\r\n\t\tString[] arr2={(arr[9].trim())};\r\n\t\tstorageContainerForm.setHoldsSpecimenClassTypes(arr2);\r\n\r\n\t\tString[] arr3={(arr[10].trim())};\r\n\t\tstorageContainerForm.setHoldsTissueSpType(arr3);\r\n\r\n\t\tString[] arr4={(arr[11].trim())};\r\n\t\tstorageContainerForm.setHoldsFluidSpType(arr4);\r\n\r\n\t\tString[] arr5={(arr[12].trim())};\r\n\t\tstorageContainerForm.setHoldsCellSpType(arr5);\r\n\r\n\t\tString[] arr6={(arr[13].trim())};\r\n\t\tstorageContainerForm.setHoldsMolSpType(arr6);\r\n\r\n\r\n\t\tsetRequestPathInfo(\"/StorageContainerAdd\");\r\n\t\taddRequestParameter(\"operation\",\"add\");\r\n\t\taddRequestParameter(\"pageOf\",\"pageOfStorageType\");\r\n\t\tsetActionForm(storageContainerForm);\r\n\t\tactionPerform();\r\n\t\tverifyForward(\"success\");\r\n\t\tverifyActionMessages(new String[]{\"object.add.successOnly\"});\r\n\t}", "TestFirstBlock createTestFirstBlock();", "@Timeout(10)\n @TestFactory\n public DynamicContainer generateTestsForAllClasses() throws URISyntaxException {\n List<DynamicNode> tests = new ArrayList<>();\n\n if (structureOracleJSON == null) {\n fail(\"The ClassTest test can only run if the structural oracle (test.json) is present. If you do not provide it, delete ClassTest.java!\");\n }\n\n for (int i = 0; i < structureOracleJSON.length(); i++) {\n JSONObject expectedClassJSON = structureOracleJSON.getJSONObject(i);\n JSONObject expectedClassPropertiesJSON = expectedClassJSON.getJSONObject(JSON_PROPERTY_CLASS);\n\n // Only test the classes that have additional properties (except name and package) defined in the structure oracle.\n if (expectedClassPropertiesJSON.has(JSON_PROPERTY_NAME) && expectedClassPropertiesJSON.has(JSON_PROPERTY_PACKAGE) && hasAdditionalProperties(expectedClassPropertiesJSON)) {\n String expectedClassName = expectedClassPropertiesJSON.getString(JSON_PROPERTY_NAME);\n String expectedPackageName = expectedClassPropertiesJSON.getString(JSON_PROPERTY_PACKAGE);\n ExpectedClassStructure expectedClassStructure = new ExpectedClassStructure(expectedClassName, expectedPackageName, expectedClassJSON);\n tests.add(dynamicTest(\"testClass[\" + expectedClassName + \"]\", () -> testClass(expectedClassStructure)));\n }\n }\n if (tests.size() == 0) {\n fail(\"No tests for classes available in the structural oracle (test.json). Either provide attributes information or delete ClassTest.java!\");\n }\n // Using a custom URI here to workaround surefire rendering the JUnit XML without the correct test names.\n return dynamicContainer(getClass().getName(), new URI(getClass().getName()), tests.stream());\n }", "public Tests(){\n \n }", "SUT createSUT();", "ViewContainer createViewContainer();", "@Override\n\tpublic IOProcessor create(Interpreter interpreter) {\n\t\tTestCustomIOProc ioProc = new TestCustomIOProc();\n\t\tioProc.interpreter = interpreter;\n\t\tioProc.swigReleaseOwnership();\n\t\treturn ioProc;\n\t}", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "@Test\n public void testCreate() {\n\n }", "public static Containers<Integer, String> getContainers() {\n\t\t// TODO fix this function\n\t\t//do singleton thingy\n\t\tif (cont == null) {\n\t\t\tcont = new HW0Runner<Integer, String>();\n\t\t}\n\t\treturn cont;\n\t}", "TeststepBlock createTeststepBlock();", "public Compose4jTest(String testName) {\n super(testName);\n }", "public void testGetColumnCount() {\n TaskSeriesCollection c = createCollection1();\n }", "@Test\n public void testCircle()\n {\n testCircleConstructor(5, 6);\n testCircleConstructor(11, 20);\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public interface TestType {\n /**\n * Marker interface for tests that use the Enterprise data set for use with {@link org.junit.experimental.categories.Category}\n */\n interface DataSetEnterprise {}\n\n /**\n * Marker interface for tests that use the Lite data set for use with {@link org.junit.experimental.categories.Category}\n */\n interface DataSetLite {}\n\n /**\n * Marker interface for tests that use the Premium data set for use with {@link org.junit.experimental.categories.Category}\n */\n interface DataSetPremium {}\n\n /**\n * Marker interface for tests that take a long time\n */\n interface Lengthy {}\n\n /**\n * Marker Interface for API Tests for use with {@link org.junit.experimental.categories.Category}\n */\n interface TypeApi {}\n\n /**\n * Marker Interface for HTTP Header Tests for use with {@link org.junit.experimental.categories.Category}\n */\n interface TypeHttpHeader {}\n\n /**\n * Marker Interface for Memory Tests for use with {@link org.junit.experimental.categories.Category}\n */\n interface TypeMemory {}\n\n /**\n * Marker Interface for Metadata Tests for use with {@link org.junit.experimental.categories.Category}\n */\n interface TypeMetadata {}\n\n /**\n * Marker Interface for Performance Tests for use with {@link org.junit.experimental.categories.Category}\n */\n interface TypePerformance {}\n \n /**\n * Marker Interface for Unit Tests for use with {@link org.junit.experimental.categories.Category}\n */\n interface TypeUnit{}\n}", "protected abstract Item createTestItem2();", "default D createTest(){\n return create();\n }", "@Test\n public void testCreateIndexType() throws Exception {\n//TODO: Test goes here... \n }", "@Test\n public void childrenTest() {\n // TODO: test children\n }", "public Instances makeTestSet(String position) throws Exception;", "@Override\n\tpublic void test() {\n\t\t\n\t}", "public TestDriverProgram(){\n iTestList = new SortableArray(iSize); // tests if parameterized constructor works\n iTestFileList = new SortableArray(); // tests if default constructor works\n runAllTests(); // run all of the tests\n }", "private void createUIComponents() {\n }", "@Before //Object created of the NumStack class\n public void setUp() {\n numStackTest = new NumStack();\n }", "@Test public void testNode() {\n \n }", "public test() {\n\t\tsuper();\n\t}", "@Test\n public void processContainerSubStatementContainer() throws IOException, ParserException {\n\n YangNode node = manager.getDataModel(\"src/test/resources/ContainerSubStatementContainer.yang\");\n\n assertThat((node instanceof YangModule), is(true));\n\n // Check whether the node type is set properly to module.\n assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));\n\n // Check whether the module name is set correctly.\n YangModule yangNode = (YangModule) node;\n assertThat(yangNode.getName(), is(\"Test\"));\n\n // Check whether the container is child of module\n YangContainer yangContainer = (YangContainer) yangNode.getChild();\n assertThat(yangContainer.getName(), is(\"ospf\"));\n\n // Check whether the container is child of container\n YangContainer yangContainer1 = (YangContainer) yangContainer.getChild();\n assertThat(yangContainer1.getName(), is(\"valid\"));\n }", "@Test\n public void testBuildContainer() throws Exception {\n System.out.println(\"buildContainer\");\n JTextArea ta = new JTextArea();\n //Create temp host file\n try {\n //\"False\" in file writer for no append\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"hosts\", false)));\n out.println(\"[email protected]\");\n out.flush();\n } catch (Exception e) {\n\n }\n ArrayList<File> files = new ArrayList<File>();\n Docker instance = new Docker(\"ubuntu\", \"git\", files, \"sh6791\", \"matrix\", \"v1\", \"saqhuss\", \"dockersh6791\", \"[email protected]\");\n instance.buildDockerfile();\n instance.buildContainer(ta);\n Process p;\n String line = null;\n StringBuilder sb = new StringBuilder();\n try {\n p = Runtime.getRuntime().exec(new String[]{\"docker\", \"images\"});\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n } catch (Exception e) {\n\n }\n assertEquals(sb.toString().split(\"\\n\")[1].split(\" \")[0].trim(), \"saqhuss/matrix\");\n Files.delete(Paths.get(\"Dockerfile\"));\n Files.delete(Paths.get(\"hosts\"));\n Files.delete(Paths.get(\"id_rsa\"));\n Files.delete(Paths.get(\"id_rsa.pub\"));\n Files.delete(Paths.get(\"authorized_keys\"));\n }", "protected abstract void initContainers(int verticesNumber, int edgesNumber);", "void write(TestResultContainer testResultContainer);", "@Test\n\tpublic void test() {\n\t\t\n\t\t//first add a instance operation component\n\t\t//Same as the test case in AddInstanceOperationGlobalActionTest\n\t\tPaintPanel panel = new PaintPanel();\n\t\tAddInstanceOperationGlobalAction addInsCompAction = new AddInstanceOperationGlobalAction();\n\t\tassertEquals(0, panel.getPaintComponents().size());\n\t\taddInsCompAction.setConstructorToSet(String.class.getConstructors()[0]);\n\t\taddInsCompAction.execute(panel);\n\t\tassertEquals(1, panel.getPaintComponents().size());\n\t\tassertTrue(panel.getPaintComponents().get(0) instanceof InstanceOperationComponent);\n\t\t\n\t\t//add a method based on the operation component\n\t\tAddInstanceMethodGlobalAction addInsMthAction = new AddInstanceMethodGlobalAction();\n\t\t//specify the instance operation component to add method on\n\t\taddInsMthAction.setInsComp(addInsCompAction.getInsComp());\n\t\t//take the first method of String for example\n\t\taddInsMthAction.setMethodToSet(String.class.getMethods()[0]);\n\t\taddInsMthAction.execute(panel);\n\t\tassertEquals(2, panel.getPaintComponents().size());\n\t\tassertTrue(panel.getPaintComponents().get(1) instanceof MethodPaintComponent);\n\t}", "protected TestBench() {}", "public void testGenericMethod() {\n \n }", "@Test\n public void test01()\n {\n MetaClass.forClass(Class, reflectorFactory)\n }", "public CuboidCountTest(String testName) {\n super(testName);\n }", "@Test\n void isEmptyTest(){\n Container container = new Container();\n assertTrue(container.isEmpty());\n }", "public void testGetStartValue2() {\n TaskSeriesCollection c = createCollection2();\n TaskSeriesCollection c3 = createCollection3();\n }", "protected abstract Item createTestItem3();", "@Test\n\tpublic void addNewOuterComponentTest2()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName, \n\t\t\t\t\tcompGroup, compVersion, compType.toString());\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "public void setUp() {\n // Create mutable field.\n fieldMutable = new Field(\"name\", \"value\", \"description\", false);\n\n fieldReadOnly = new Field(\"name\", \"value\", \"description\", true);\n\n conditionReadOnly = new Condition(\"name\", new NodeList(new Node[0]), \"description\", true, \"name = 'test'\");\n\n // Create node list.\n nodeList = new NodeList(new Node[] {fieldReadOnly, fieldMutable});\n\n // Create mutable loop.\n loopMutable = new Loop(\"loop\", nodeList, \"description\", false);\n\n // Create read-only loop.\n loopReadOnly = new Loop(\"loop\", nodeList, \"description\", true);\n }", "Testcase createTestcase();", "private void createTotalTestMethod(BufferedWriter writer)\r\n\t\t\tthrows IOException {\r\n\t\tString parent = \"<label style='position: inherit;top: 57px;'>\";\r\n\t\tString content = \"<span style='color: #000000;font-weight: bold;padding-left: 8px;font-family: Roboto, sans-serif;'>Total TestMethod</span>\";\r\n\t\tString total = \"<span style='margin-left: 83px;color: #000000;font-weight: bold;font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ data.getNumberOfTest() + \"</span></label>\";\r\n\t\twriter.write(parent + content + total);\r\n\t}", "@Before\r\n public void setupTestCases() {\r\n instance = new ShoppingListArray();\r\n }", "@Test\n public void testSize() {\n System.out.println(\"size\");\n instance = new Stack();\n int expResult = 10;\n for (int i = 0; i < 10; i++) {\n instance.push(i*3);\n }\n assertEquals(expResult, instance.size());\n }", "@Override\n\tpublic void testEngine() {\n\t\t\n\t}", "public RenderableTest()\n {\n }", "public void testGetStartValue() {\n TaskSeriesCollection c = createCollection1();\n TaskSeriesCollection c3 = createCollection3();\n }", "@Test\n public void testObject()\n throws Exception\n {\n initialize();\n genericTests();\n for (int i = 0; i < 10; i++)\n {\n permutateObjects();\n genericTests();\n } // for\n }", "@Test\n\tpublic void addNewOuterComponentTest3()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\tString fileName = \"smallBom.xml\";\n\t\ttry (InputStream stream = getClass().getResourceAsStream(\"/\" + fileName))\n\t\t{\n\t\t\tBom sbom = SBomFileUtils.processInputStream(stream);\n\t\t\t\n\t\t\tList<Tool> orgTools = sbom.getMetadata().getTools();\n\t\t\t\n\t\t\tString toolName = \"testTool\";\n\t\t\tString toolVersion = \"1.1.2\";\n\t\t\t\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent expectedComponent = new Component();\n\t\t\texpectedComponent.setName(compName);\n\t\t\texpectedComponent.setGroup(compGroup);\n\t\t\texpectedComponent.setVersion(compVersion);\n\t\t\texpectedComponent.setType(compType);\n\t\t\t\n\t\t\tComponentUtilities.addNewOuterComponent(sbom, toolName, toolVersion, compName,\n\t\t\t\t\tcompGroup, compVersion, null);\n\t\t\t\n\t\t\tMetadata metadata = sbom.getMetadata();\n\t\t\tComponent actualComponent = metadata.getComponent();\n\t\t\t\n\t\t\tComponentComparator comparator = new ComponentComparator();\n\t\t\t\n\t\t\tif (comparator.equals(expectedComponent, actualComponent))\n\t\t\t\twatcher.getLogger().info(\"Successfuly created a new Metadata Component!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Failed to create the new Metadata Component:\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ComponentUtilities.toString(expectedComponent, \"\t\t\") +\n\t\t\t\t\t\t\"\\n\tActual: \" + ComponentUtilities.toString(actualComponent, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(comparator.equals(expectedComponent, actualComponent));\n\t\t\t\n\t\t\tList<Tool> tools = metadata.getTools();\n\t\t\tif ((orgTools.size() + 1) == tools.size())\n\t\t\t\twatcher.getLogger().info(\"Got the correct number of Tools (original plus one).\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT get the expected number of Tools.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + (orgTools.size() + 1) +\n\t\t\t\t\t\t\"\\n\tGot: \" + tools.size());\n\t\t\t\n\t\t\tAssert.assertEquals((orgTools.size() + 1), tools.size());\n\t\t\t\n\t\t\tTool expectedTool = new Tool();\n\t\t\texpectedTool.setName(toolName);\n\t\t\texpectedTool.setVendor(\"Lockheed Martin\");\n\t\t\texpectedTool.setVersion(toolVersion);\n\t\t\t\n\t\t\tTool actualTool = tools.get(0);\n\t\t\tToolsCustomComparator toolComparator = new ToolsCustomComparator();\n\t\t\t\n\t\t\tif (toolComparator.equals(expectedTool, actualTool))\n\t\t\t\twatcher.getLogger().info(\"Created Expected Tool!\");\n\t\t\telse\n\t\t\t\twatcher.getLogger().warn(\"Did NOT create the expected tool.\" +\n\t\t\t\t\t\t\"\\n\tExpected: \" + ToolsUtils.toString(expectedTool, \"\t\t\") + \"\\n\" +\n\t\t\t\t\t\t\"\\n\tGot: \" + ToolsUtils.toString(actualTool, \"\t\t\"));\n\t\t\t\n\t\t\tAssert.assertTrue(toolComparator.equals(expectedTool, actualTool));\n\t\t}\n\t\tcatch (SBomCommonsException sbomE)\n\t\t{\n\t\t\tString error = \"Unexpected error occurred while attempting to read SWBom from \" +\n\t\t\t\t\t\"input stream!\";\n\t\t\twatcher.getLogger().error(error, sbomE);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting create a new Outer \" +\n\t\t\t\t\t\"empty component (with tool).\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "protected Container createContainer() {\n\treturn new EditorContainer();\n }", "@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }", "private void test() {\n\n\t}", "TestViewpoint createTestViewpoint();", "private test5() {\r\n\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n private void create() {\n components.clear();\n\n if (content != null) {\n content.clearChildren();\n }\n else {\n content = new Container();\n content.setInsets(INSETS);\n }\n\n GuiComponent guiComponent = (GuiComponent) getReflectedItem().getValue();\n\n // let the user choose which type of backgroundComponent they want.\n Label label = content.addChild(new Label(\"Type\"), 0, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n Container backgroundTypeContainer = content.addChild(new Container(), 0, 1);\n\n ColorRGBA oldColor = BackgroundUtils.getBackgroundColor(guiComponent);\n\n Button colorOnlyBgButton = backgroundTypeContainer.addChild(new Button(\"Color Only\"), 0, 0);\n colorOnlyBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof QuadBackgroundComponent)) {\n setValue(new QuadBackgroundComponent(oldColor));\n create();\n }\n });\n\n Button colorAndImageBgButton = backgroundTypeContainer.addChild(new Button(\"Color and Image\"), 0, 1);\n colorAndImageBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof TbtQuadBackgroundComponent)) {\n setValue(BackgroundComponents.gradient(oldColor));\n create();\n }\n });\n\n if (guiComponent instanceof QuadBackgroundComponent) {\n\n try {\n\n Method getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n // margin\n getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 2, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 2, 1);\n components.add(marginComponent);\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n else if (guiComponent instanceof TbtQuadBackgroundComponent) {\n\n TbtQuadBackgroundComponent backgroundComponent = (TbtQuadBackgroundComponent) guiComponent;\n\n try {\n Method getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n label = content.addChild(new Label(\"Image\"), 2, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n Button browseImageButton = content.addChild(new Button(\"Select Background Image...\"), 2, 1);\n browseImageButton.setTextVAlignment(VAlignment.Center);\n browseImageButton.addClickCommands(source -> {\n\n JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n jfc.setDialogTitle(\"Select a Background Image...\");\n jfc.setMultiSelectionEnabled(false);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n jfc.addChoosableFileFilter(filter);\n int returnValue = jfc.showOpenDialog(null);\n\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n\n File file = jfc.getSelectedFile();\n\n\n try {\n\n byte[] imageData = Files.readAllBytes(file.toPath());\n byte[] stringData = Base64.getEncoder().encode(imageData);\n\n String imageString = new String(stringData);\n\n // PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n // panelBackground.setBase64Image(imageString);\n\n Texture texture = new TextureUtils().fromBase64(imageString);\n\n backgroundComponent.setTexture(texture);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n });\n\n // margin\n getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 3, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 3, 1);\n components.add(marginComponent);\n\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n\n//\n// this.content = new RollupPanel(\"\", contentContainer, null);\n// this.content.setOpen(false);\n//\n// // background Image\n// Container bgImageContainer = contentContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Last, FillMode.Last)), 0, 0);\n// Label bgImageLabel = bgImageContainer.addChild(new Label(\"Background Image\"), 0, 0);\n// bgImageLabel.setTextVAlignment(VAlignment.Center);\n// bgImageLabel.setInsets(new Insets3f(0.0F, 2.0F, 0.0F, 5.0F));\n// Button browseImageButton = bgImageContainer.addChild(new Button(\"Browse...\"), 0, 1);\n// Button removeImageButton = bgImageContainer.addChild(new Button(\"Remove\"), 0, 2);\n// bgImageContainer.addChild(new Container(), 0, 3);\n//\n// browseImageButton.addClickCommands(source -> {\n//\n// JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n// jfc.setDialogTitle(\"Select a Background Image...\");\n// jfc.setMultiSelectionEnabled(false);\n// jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n// jfc.setAcceptAllFileFilterUsed(false);\n// FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n// jfc.addChoosableFileFilter(filter);\n// int returnValue = jfc.showOpenDialog(null);\n//\n// if (returnValue == JFileChooser.APPROVE_OPTION) {\n//\n// File file = jfc.getSelectedFile();\n//\n// try {\n// byte[] imageData = Files.readAllBytes(file.toPath());\n// byte[] stringData = Base64.getEncoder().encode(imageData);\n//\n// String imageString = new String(stringData);\n//\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(imageString);\n//\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// }\n//\n// });\n//\n// removeImageButton.addClickCommands(source -> {\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(\"\");\n// });\n//\n//\n// try {\n//\n// // color\n// Method get = PanelBackground.class.getMethod(\"getColor\");\n// Method set = PanelBackground.class.getMethod(\"setColor\", ColorRGBA.class);\n//\n// ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(getReflectedProperty().getValue(), get, set);\n// bgColorComponent.setPropertyName(\"Color\");\n// contentContainer.addChild(bgColorComponent.getPanel());\n// components.add(bgColorComponent);\n//\n// // insetTop\n// get = PanelBackground.class.getMethod(\"getInsetTop\");\n// set = PanelBackground.class.getMethod(\"setInsetTop\", int.class);\n//\n// IntComponent insetTopComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetTopComponent.setPropertyName(\"Inset Top\");\n// contentContainer.addChild(insetTopComponent.getPanel());\n// components.add(insetTopComponent);\n//\n// // insetLeft\n// get = PanelBackground.class.getMethod(\"getInsetLeft\");\n// set = PanelBackground.class.getMethod(\"setInsetLeft\", int.class);\n//\n// IntComponent insetLeftComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetLeftComponent.setPropertyName(\"Inset Left\");\n// contentContainer.addChild(insetLeftComponent.getPanel());\n// components.add(insetLeftComponent);\n//\n// // insetBottom\n// get = PanelBackground.class.getMethod(\"getInsetBottom\");\n// set = PanelBackground.class.getMethod(\"setInsetBottom\", int.class);\n//\n// IntComponent insetBottomComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetBottomComponent.setPropertyName(\"Inset Bottom\");\n// contentContainer.addChild(insetBottomComponent.getPanel());\n// components.add(insetBottomComponent);\n//\n// // insetRight\n// get = PanelBackground.class.getMethod(\"getInsetRight\");\n// set = PanelBackground.class.getMethod(\"setInsetRight\", int.class);\n//\n// IntComponent insetRightComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetRightComponent.setPropertyName(\"Inset Right\");\n// contentContainer.addChild(insetRightComponent.getPanel());\n// components.add(insetRightComponent);\n//\n// // zOffset\n// get = PanelBackground.class.getMethod(\"getzOffset\");\n// set = PanelBackground.class.getMethod(\"setzOffset\", float.class);\n//\n// FloatComponent zOffsetComponent = new FloatComponent(getReflectedProperty().getValue(), get, set);\n// zOffsetComponent.setPropertyName(\"Z-Offset\");\n// contentContainer.addChild(zOffsetComponent.getPanel());\n// components.add(zOffsetComponent);\n//\n// } catch (NoSuchMethodException e) {\n// e.printStackTrace();\n// }\n\n\n }", "public TestArithmetic()\n {\n }", "protected abstract void executeTests() throws BuilderException;" ]
[ "0.7049684", "0.60375047", "0.60198504", "0.57963365", "0.57901925", "0.57009244", "0.5679445", "0.5628712", "0.5600697", "0.55818605", "0.55360043", "0.54559356", "0.5448229", "0.5448229", "0.5448229", "0.5442585", "0.54381496", "0.5391781", "0.53827745", "0.5372731", "0.536139", "0.5356528", "0.53375125", "0.53239465", "0.53149384", "0.5310695", "0.53023374", "0.52756375", "0.52752185", "0.5273063", "0.5267061", "0.52577454", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.52545077", "0.5251634", "0.52406955", "0.5233031", "0.5228334", "0.52280504", "0.5225421", "0.5224654", "0.5216912", "0.5205457", "0.52046424", "0.51916736", "0.5190843", "0.5189492", "0.5183344", "0.51833236", "0.51822054", "0.517741", "0.5171868", "0.5162715", "0.51599693", "0.5154965", "0.5154527", "0.51513845", "0.5148569", "0.51454526", "0.51448524", "0.5141071", "0.51409745", "0.51394284", "0.5131614", "0.51286745", "0.51240975", "0.5122814", "0.51130855", "0.510885", "0.5107546", "0.51048034", "0.5100026", "0.50991595", "0.50982225", "0.50949407", "0.509438", "0.5078138", "0.50763834", "0.50686145", "0.50649023", "0.5064197", "0.5058951", "0.50586724", "0.50557625" ]
0.54267067
17
Writes the number of test tags present in the result
private void createTotalTestCase(BufferedWriter writer) throws IOException { String parent = "<label style='margin-top: 8px;position: absolute;'>"; String content = "<span style='display: inline;color: #000000;margin-left: 8px;font-weight: bold;font-family: Roboto, sans-serif;'>Total TestCases</span>"; String total = "<span style='display: inline;color: #000000;margin-left: 100px;font-weight: bold;font-family: Roboto, sans-serif;'>" + data.getNumberOfTestTags() + "</span></label>"; writer.write(parent + content + total); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTagCount();", "private void createTotalTest(BufferedWriter writer) throws IOException {\r\n\t\t// Creates the layout\r\n\t\tString layout = \"<div style ='height: 100px;width: inherit;'>\";\r\n\t\t// Creates the child div\r\n\t\tString displayTotalTestLayout = \"<div style='width: 260px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;'>\";\r\n\r\n\t\t// Creates Total Test Tag count\r\n\t\twriter.write(layout);\r\n\t\twriter.write(displayTotalTestLayout);\r\n\t\tcreateTotalTestCase(writer);\r\n\t\tcreateTotalTestMethod(writer);\r\n\t\twriter.write(\"</div></div>\");\r\n\t}", "public void testGetTagList() throws IOException {\n\n part.setBasedata(\"http://localhost/~luisdanielibanesgonzalez/datasets/MiniBase.nt\");\n part.reload();\n\n List<TrioMonoid> tags = part.getTagList();\n assertEquals(16,tags.size());\n for(TrioMonoid tm : tags){\n assertEquals(1,tm.getTokens().size());\n assertEquals(1,tm.getCoeffs().size());\n assertEquals(new Long(1),tm.getCoeffs().get(0));\n System.out.println(tm.toString());\n }\n\n \n }", "int getExamplesCount();", "int getExamplesCount();", "public String[] getAllTagCount() {\n\t\tString result = \"\";\n\t\tfor (String tag : this.getTagList().keySet()) {\n\t\t\tresult += tag;\n\t\t\tresult += \" \";\n\t\t\tresult += getCount(tag);\n\t\t\tresult += \"\\n\";\n\t\t}\n\t\treturn result.split(\"\\n\");\n\t}", "public void testCount()\n\t{\n\t\tinfo.append(a1);\n\t\tinfo.append(a2);\n\t\tinfo.append(a3);\n\t\tassertEquals(3,info.getSynonymsCount());\n\t}", "private void createTotalTestMethod(BufferedWriter writer)\r\n\t\t\tthrows IOException {\r\n\t\tString parent = \"<label style='position: inherit;top: 57px;'>\";\r\n\t\tString content = \"<span style='color: #000000;font-weight: bold;padding-left: 8px;font-family: Roboto, sans-serif;'>Total TestMethod</span>\";\r\n\t\tString total = \"<span style='margin-left: 83px;color: #000000;font-weight: bold;font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ data.getNumberOfTest() + \"</span></label>\";\r\n\t\twriter.write(parent + content + total);\r\n\t}", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public int getTagCount() {\n return tag_.size();\n }", "private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}", "void countTagStatistics(){\t\n\t\thtmlParsed.traverse(new NodeVisitor() {\n\t\t\tdouble count = 0.;\n\t\t\tString tagName = \"\";\n\t\t public void head(Node node, int depth) {\n\t\t \tif (node instanceof Element) {\n\t\t \t\ttagName = ((Element) node).tagName();\n\t\t \t\tif(countTags.containsKey(tagName)){\n\t\t \t\t\tcount = countTags.get(tagName) + 1.;\n\t\t \t\t\tcountTags.put(tagName, count);\n\t\t \t\t}\n\t\t \t\telse if(tagName.matches(\"^[a-zA-Z:]+\"))\n\t\t \t\t\t\tcountTags.put(tagName, 1.);\n\t\t \t}\n\t\t }\n\t\t public void tail(Node node, int depth) {\n\t\t }\n\t\t});\t\n\t\t\t\n\t}", "int docValueCount() throws IOException;", "public int runCount() {\n return testCount;\n }", "@Test\n public void countInfosTest() {\n // TODO: test countInfos\n }", "int countByExample(TagDataExample example);", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "private int getTotalTestCase() {\n\t\treturn passedtests.size() + failedtests.size() + skippedtests.size();\n\t}", "@Test\n public void test2() throws IOException {\n FileStore files = new FileStoreMemory();\n files.put(\"test.txt\", TestData.FILE_CONTENT.getBytes());\n BlockStore blocks = new BlockStoreMemory();\n\n CapturePrintStream out = CapturePrintStream.create();\n\n List<String> args = Arrays.asList(\"test.txt\");\n new StoreTagPutMain(blocks, files, out, args).run();\n\n out.flush();\n\n List<Tag> tags = tags(out);\n assertEquals(1, tags.size());\n assertEquals(\"6\", tags.get(0).get(\"size\"));\n assertEquals(\"sha-256:5891b5b522d5df086d0ff0b110fbd9d2\"\n + \"1bb4fc7163af34d08286a2e846f6be03\", tags.get(0).get(\"hash\"));\n }", "int countByExample(CfgPrintTemplateAttrExample example);", "@Test\r\n\tvoid testCount() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.count();\r\n\t\tassertEquals(3, output);\r\n\t}", "public int getTagsNumber()\n {\n return tags.size();\n }", "void write(TestResult testResult);", "void write(TestResultContainer testResultContainer);", "private int numTags(int tagname) {\n\t\tCVSTag[] tags = logEntry.getTags();\n\t\tint count = 0;\n\t\tfor (CVSTag tag : tags) {\n\t\t\tif (tag.getType() == tagname) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "@DISPID(11) //= 0xb. The runtime will prefer the VTID if present\r\n @VTID(18)\r\n int count();", "public int getWriteFormatCount();", "public static long getTestCount() {\n return mTestCount;\n }", "@Test\n public void countTest() {\n // TODO: test count\n }", "int getStatMetadataCount();", "public int countTestCases() {\n return 1;\n }", "@Override\n public int countTestCases()\n {\n return 1;//_testCaseCount;\n }", "@Test\r\n\tvoid testCount2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(1);\r\n\t\ttest.add(2);\r\n\t\ttest.add(3);\r\n\t\ttest.add(4);\r\n\t\ttest.add(5);\r\n\t\ttest.add(6);\r\n\t\ttest.add(7);\r\n\t\ttest.add(8);\r\n\t\ttest.add(9);\r\n\t\ttest.add(10);\r\n\t\ttest.add(11);\r\n\t\tint output = test.count();\r\n\t\tassertNotEquals(10, output);\r\n\t}", "public int getTagCount() {\n if (tagBuilder_ == null) {\n return tag_.size();\n } else {\n return tagBuilder_.getCount();\n }\n }", "int getMetadataCount();", "int getMetadataCount();", "int getMetadataCount();", "int getMetadataCount();", "public int numTags() {\n return mTags.size();\n }", "public long getRecordWrittern() {\n long count = 0;\n for (OutputStats out : outputs) {\n long rec = out.getNumberRecords();\n if (rec > 0) count += rec;\n }\n return count;\n }", "@Test\n public void shouldCountLinesOfTestCode() throws Exception {\n initializeOSGiProjectWithTestCodeInsideBundles();\n resetOutput();\n getShell().execute(\"osgi lot\");\n assertTrue(getOutput().contains(\"Total lines of test code:4\"));\n }", "@Test\n public void uuidCountTest() {\n // TODO: test uuidCount\n }", "int getContentsCount();", "void writeRepetitionCount(int count);", "@Test\n\tpublic void testGetCounts() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, \"CGGGGCTC\");\n\t\tp.addLocusFunction(LocusFunction.CODING);\n\t\tresult.add(p);\n\t\tresult.add(getPileUpFromFile(cellBC, \"CGCGGGAC\")); // this read doesn't overlap the SNP so it isn't added!\n\t\tresult.add(getPileUpFromFile(cellBC, \"CTGGGCTC\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GGAATGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"GTGCCGTG\"));\n\t\tresult.add(getPileUpFromFile(cellBC, \"TCGCAGAC\"));\n\n\t\t// the code coverage gods are pleased.\n\t\tAssert.assertEquals(result.getCell(), cellBC);\n\t\tAssert.assertEquals(result.getSNPInterval(), snpInterval);\n\n\t\tAssert.assertNotNull(result.toString());\n\n\t\t// get the unfiltered results.\n\t\tObjectCounter<Character> umiCounts = result.getUMIBaseCounts();\n\t\tObjectCounter<Character> umiCountsExpected = new ObjectCounter<>();\n\t\tumiCountsExpected.incrementByCount('A', 2);\n\t\tumiCountsExpected.incrementByCount('G', 3);\n\t\tAssert.assertEquals(umiCounts, umiCountsExpected);\n\n\t\tObjectCounter<Character> readCounts = result.getReadBaseCounts();\n\t\tObjectCounter<Character> readCountsExpected = new ObjectCounter<>();\n\t\treadCountsExpected.incrementByCount('A', 2);\n\t\treadCountsExpected.incrementByCount('G', 5);\n\t\tAssert.assertEquals(readCounts, readCountsExpected);\n\n\t\tSet<LocusFunction> expected = new HashSet<>(Arrays.asList(LocusFunction.CODING));\n\t\tAssert.assertEquals(result.getLocusFunctions(), expected);\n\n\t}", "@Test\n public void testSize()\n {\n System.out.println(\"size\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertTrue(token.size() == 159);\n }", "int getResponsesCount();", "@XmlAttribute\r\n public Integer getCount() {\r\n return count;\r\n }", "int getInstrumentCount();", "@Test\r\n public void testCount() {\r\n System.out.println(\"count\");\r\n nc1.addNumber(n1);\r\n int expResult = 1;\r\n int result = nc1.count();\r\n assertEquals(expResult, result);\r\n \r\n }", "@java.lang.Override\n public int getCustomTagsCount() {\n return customTags_.size();\n }", "private void writeResult(String testClassName, List<TestResult> results)\n throws IOException, ParserConfigurationException, TransformerException {\n // XML writer logic taken from:\n // http://www.genedavis.com/library/xml/java_dom_xml_creation.jsp\n\n DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n doc.setXmlVersion(\"1.1\");\n\n Element root = doc.createElement(\"testcase\");\n root.setAttribute(\"name\", testClassName);\n doc.appendChild(root);\n\n for (TestResult result : results) {\n Element test = doc.createElement(\"test\");\n\n // name attribute\n test.setAttribute(\"name\", result.testMethodName);\n\n // success attribute\n boolean isSuccess = result.isSuccess();\n test.setAttribute(\"success\", Boolean.toString(isSuccess));\n\n // time attribute\n long runTime = result.runTime;\n test.setAttribute(\"time\", String.valueOf(runTime));\n\n // Include failure details, if appropriate.\n if (!isSuccess) {\n Failure failure = result.failure;\n String message = failure.getMessage();\n test.setAttribute(\"message\", message);\n\n String stacktrace = failure.getTrace();\n test.setAttribute(\"stacktrace\", stacktrace);\n }\n\n // stdout, if non-empty.\n if (result.stdOut != null) {\n Element stdOutEl = doc.createElement(\"stdout\");\n stdOutEl.appendChild(doc.createTextNode(result.stdOut));\n test.appendChild(stdOutEl);\n }\n\n // stderr, if non-empty.\n if (result.stdErr != null) {\n Element stdErrEl = doc.createElement(\"stderr\");\n stdErrEl.appendChild(doc.createTextNode(result.stdErr));\n test.appendChild(stdErrEl);\n }\n\n root.appendChild(test);\n }\n\n // Create an XML transformer that pretty-prints with a 2-space indent.\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer trans = transformerFactory.newTransformer();\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n trans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n\n // Write the result to a file.\n File outputFile = new File(outputDirectory, testClassName + \".xml\");\n OutputStream output = new BufferedOutputStream(new FileOutputStream(outputFile));\n StreamResult streamResult = new StreamResult(output);\n DOMSource source = new DOMSource(doc);\n trans.transform(source, streamResult);\n output.close();\n }", "int getNodeCount();", "int getNodeCount();", "@Test\n public void shouldCountLinesOfTestCodeInsideTestBundles() throws Exception {\n initializeOSGiProjectWithTestBundles();\n resetOutput();\n getShell().execute(\"osgi lot\");\n assertTrue(currentOsgiProject.get().getLinesOfTestCode().equals(2L));\n assertTrue(getOutput().contains(\"Total lines of test code:2\"));\n }", "private void assertCountEvent(int exepectedCount, String eleementName, String json) {\n\n// System.out.println(\"debug \"+eleementName+\" \"+matchEventCount(eleementName, json));\n assertEquals(\"For event '\" + eleementName + \"' expecting count\", exepectedCount, matchEventCount(eleementName, json));\n }", "int getResponseCount();", "private void writeTestLines() {\n for (String L : testLines) {\n pages.write(L);\n }\n }", "int getEventMetadataCount();", "@Override\n\tpublic int count() {\n\t\treturn 4;\n\t}", "public int getN() {\n return writeResult.getN();\n }", "@Test(timeout=2000)\n public void countTest()\n {\n int[] mixed = {1,5,3,8,10,34,62,31,45,20};\n int mixedOdds = 5;\n int mixedEvens = 5;\n int[] even = {2,4,6,8,10,20,30,58};\n int[] odd = {1,3,5,7,9,11,13,15,19};\n int[] singleEven = {2};\n int[] singleOdd = {1};\n \n assertEquals( \"Counting odds in array of mixed odds and evens failed.\", mixedOdds, OddsEvens.count( mixed, true ) );\n assertEquals( \"Counting evens in array of mixed odds and evens failed.\", mixedEvens, OddsEvens.count( mixed, false ) );\n assertEquals( \"Counting odds in an array of all evens failed.\", 0, OddsEvens.count( even, true ) );\n assertEquals( \"Counting evens in an array of all evens failed.\", even.length, OddsEvens.count( even, false ) );\n assertEquals( \"Counting odds in an array of all odds failed.\", odd.length, OddsEvens.count( odd, true ) );\n assertEquals( \"Counting evens in an array of all odds failed.\", 0, OddsEvens.count( odd, false ) );\n assertEquals( \"Counting odds in an array of a single even failed.\", 0, OddsEvens.count( singleEven, true ) );\n assertEquals( \"Counting evens in an array of a single even failed.\", 1, OddsEvens.count( singleEven, false ) );\n assertEquals( \"Counting odds in an array of a single odd failed.\", 1, OddsEvens.count( singleOdd, true ) );\n assertEquals( \"Counting evens in an array of a single odd failed.\", 0, OddsEvens.count( singleOdd, false ) );\n }", "public Long getElementCount();", "@Override\n\tpublic void test() {\n\t\tSystem.out.println(countAndSay(5));\n\t\t\n\t}", "int getResultsCount();", "int getResultsCount();", "@Test\n\tpublic void testGetCount_1()\n\t\tthrows Exception {\n\t\tTreeData fixture = new TreeData((IFile) null, \"\", 1, 1);\n\n\t\tint result = fixture.getCount();\n\n\t\t// add additional test code here\n\t\tassertEquals(1, result);\n\t}", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }", "int findAllCount() ;", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "int getShotAnnotationsCount();", "int getShotAnnotationsCount();", "@Test\n\tpublic void testCountItems() {\n\t\tFile test = new File(\"X:\\\\Documents\\\\PS9 Test\");\n\t\tassertEquals(13,Explorer.countItems(test));\n\t}", "@Override\n public int count() {\n return this.bench.size();\n }", "int getTagSize();", "@Test\n public void test1() throws IOException {\n FileStore files = new FileStoreMemory();\n files.put(\"test.txt\", TestData.FILE_CONTENT.getBytes());\n BlockStore blocks = new BlockStoreMemory();\n\n CapturePrintStream out = CapturePrintStream.create();\n\n List<String> args = Arrays.asList(\"test.txt\");\n new StoreTagPutMain(blocks, files, out, args).run();\n\n out.flush();\n\n List<Tag> tags = tags(out);\n assertEquals(1, tags.size());\n assertEquals(\"test.txt\", tags.get(0).get(\"name\"));\n assertEquals(\"file\", tags.get(0).get(\"type\"));\n assertEquals(TestData.KEY_CONTENT_AES128.getFullKey().toString(), tags\n .get(0).get(\"data\"));\n }", "@BeforeSuite\n\tpublic void numofTestCases() throws ClassNotFoundException {\n\t\tappiumService.TOTAL_NUM_OF_TESTCASES=GetMethods.TotalTestcase(\"_Stability_\", this.getClass());\n\n\n\n\t}", "@VTID(13)\n int getCount();", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "@Override\r\n\tpublic int searchOutCount(String text) {\n\t\treturn productRaw_OutDao.searchCount(text);\r\n\t}", "int getMetaInformationCount();", "int getMetaInformationCount();", "int getMetaInformationCount();", "int getMetaInformationCount();", "int getMetaInformationCount();", "public int countResults() \n {\n return itsResults_size;\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1296));\n classWriter0.version = 49;\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (-1046), \"|%\", \"|%\", \"|%\", \"|%\");\n int int0 = fieldWriter0.getSize();\n assertEquals(30, int0);\n }", "int countByExample(GrpTagExample example);", "public int getTestSize(){\n return testSetSize;\n }", "private void getNodesCount(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int countNodes = SimApi.getNodesCount();\n response.getWriter().write(Integer.toString(countNodes));\n }" ]
[ "0.64137185", "0.6076882", "0.59360975", "0.5895079", "0.5895079", "0.589139", "0.5879491", "0.58425087", "0.5821475", "0.58209896", "0.58142275", "0.5798486", "0.5740122", "0.57028025", "0.56978196", "0.566094", "0.5660648", "0.5660648", "0.5660648", "0.5660648", "0.5660648", "0.56597364", "0.56545055", "0.5639532", "0.56277895", "0.56249595", "0.5605566", "0.5602958", "0.55788386", "0.5577592", "0.5553805", "0.5538059", "0.55362755", "0.5511206", "0.5502489", "0.55015147", "0.5487212", "0.54732317", "0.54528016", "0.54528016", "0.54528016", "0.54528016", "0.5443704", "0.5439615", "0.54380214", "0.54372466", "0.54291695", "0.5423602", "0.5415639", "0.5384611", "0.53813803", "0.537296", "0.53549004", "0.53539324", "0.5353643", "0.534914", "0.5349063", "0.5349063", "0.5344231", "0.53433585", "0.5330853", "0.5326633", "0.5318209", "0.5308733", "0.5301566", "0.5299888", "0.5297381", "0.52839595", "0.5277846", "0.5277846", "0.526025", "0.5248612", "0.5244198", "0.5239781", "0.52393574", "0.52393574", "0.52393574", "0.52393574", "0.5233771", "0.5233771", "0.52212155", "0.52137667", "0.5207579", "0.5205173", "0.52047145", "0.52020955", "0.52004665", "0.52004665", "0.52004665", "0.51981723", "0.519536", "0.519536", "0.519536", "0.519536", "0.519536", "0.5193844", "0.5191462", "0.5188721", "0.51793694", "0.5177718" ]
0.6722355
0
Writes the total number of test methods present
private void createTotalTestMethod(BufferedWriter writer) throws IOException { String parent = "<label style='position: inherit;top: 57px;'>"; String content = "<span style='color: #000000;font-weight: bold;padding-left: 8px;font-family: Roboto, sans-serif;'>Total TestMethod</span>"; String total = "<span style='margin-left: 83px;color: #000000;font-weight: bold;font-family: Roboto, sans-serif;'>" + data.getNumberOfTest() + "</span></label>"; writer.write(parent + content + total); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getTotalTestCase() {\n\t\treturn passedtests.size() + failedtests.size() + skippedtests.size();\n\t}", "public int getTestMethodCount() {\r\n Method[] methods = this.getClass().getMethods();\r\n int count = 0;\r\n for (int i = 0; i < methods.length; i++) {\r\n if (methods[i].getName().startsWith(\"test\") && methods[i].getParameterTypes().length == 0\r\n && methods[i].getReturnType().getName().equals(\"void\")) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "public int countTestCases() {\n return 1;\n }", "@Override\n public int countTestCases()\n {\n return 1;//_testCaseCount;\n }", "public int runCount() {\n return testCount;\n }", "int getMethodsCount();", "private void createTotalTestCase(BufferedWriter writer) throws IOException {\r\n\t\tString parent = \"<label style='margin-top: 8px;position: absolute;'>\";\r\n\t\tString content = \"<span style='display: inline;color: #000000;margin-left: 8px;font-weight: bold;font-family: Roboto, sans-serif;'>Total TestCases</span>\";\r\n\t\tString total = \"<span style='display: inline;color: #000000;margin-left: 100px;font-weight: bold;font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ data.getNumberOfTestTags() + \"</span></label>\";\r\n\t\twriter.write(parent + content + total);\r\n\t}", "@BeforeSuite\n\tpublic void numofTestCases() throws ClassNotFoundException {\n\t\tappiumService.TOTAL_NUM_OF_TESTCASES=GetMethods.TotalTestcase(\"_Stability_\", this.getClass());\n\n\n\n\t}", "@Test\n public void countTest() {\n // TODO: test count\n }", "@Test\n public void countInfosTest() {\n // TODO: test countInfos\n }", "@Override\n public int count() {\n return this.bench.size();\n }", "@Override\n public int getTestCaseTotal() {\n return parameters.length;\n }", "private void createTotalTest(BufferedWriter writer) throws IOException {\r\n\t\t// Creates the layout\r\n\t\tString layout = \"<div style ='height: 100px;width: inherit;'>\";\r\n\t\t// Creates the child div\r\n\t\tString displayTotalTestLayout = \"<div style='width: 260px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;'>\";\r\n\r\n\t\t// Creates Total Test Tag count\r\n\t\twriter.write(layout);\r\n\t\twriter.write(displayTotalTestLayout);\r\n\t\tcreateTotalTestCase(writer);\r\n\t\tcreateTotalTestMethod(writer);\r\n\t\twriter.write(\"</div></div>\");\r\n\t}", "public int getTestAnnotationsCount() {\r\n Method[] methods = this.getClass().getMethods();\r\n int count = 0;\r\n for (Method method : methods) {\r\n if (method.getAnnotations() != null) {\r\n for (Annotation annotation : method.getAnnotations()) {\r\n if (annotation.annotationType().equals(Test.class)) {\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n return count;\r\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"H\", \"/i%NB\", \"LocalVariableTable\", stringArray0, false, false);\n methodWriter0.exceptionCount = 1;\n methodWriter0.getSize();\n int int0 = methodWriter0.getSize();\n assertEquals(38, int0);\n }", "public void testCount()\n\t{\n\t\tinfo.append(a1);\n\t\tinfo.append(a2);\n\t\tinfo.append(a3);\n\t\tassertEquals(3,info.getSynonymsCount());\n\t}", "public static void incTestCount() {\n mTestCount++;\n }", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "int getExamplesCount();", "int getExamplesCount();", "@Test\n public void shouldCountLinesOfTestCode() throws Exception {\n initializeOSGiProjectWithTestCodeInsideBundles();\n resetOutput();\n getShell().execute(\"osgi lot\");\n assertTrue(getOutput().contains(\"Total lines of test code:4\"));\n }", "@Override\n\tpublic void test() {\n\t\tSystem.out.println(countAndSay(5));\n\t\t\n\t}", "public static long getTestCount() {\n return mTestCount;\n }", "@Test\r\n public void testCount() {\r\n System.out.println(\"count\");\r\n nc1.addNumber(n1);\r\n int expResult = 1;\r\n int result = nc1.count();\r\n assertEquals(expResult, result);\r\n \r\n }", "int totalWritten();", "public int countMethods( ) {\n\t\tfinal MonitoringLogService monitoringLogService = getService( MonitoringLogService.class );\n\t\tfinal List<MethodCall> methods = monitoringLogService.getMethods( );\n\t\treturn methods.size( );\n\t}", "private void shouldCountTests(String fileName) {\n prepareScenarioWithTestFile(fileName);\n jasmineFile = new JasmineFile(getProject(), virtualFile);\n jasmineFile.buildTreeNodeSync();\n\n // When you count the tests.\n TestCounts testCounts = jasmineFile.getTestCounts();\n\n // Then ensure there are counts for all the items.\n assertEquals(2, testCounts.getIncludedCount());\n assertEquals(2, testCounts.getExcludedCount());\n assertEquals(6, testCounts.getTestCount());\n }", "@Test\r\n\tvoid testCount() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.count();\r\n\t\tassertEquals(3, output);\r\n\t}", "public void incrementerTest() {\n\t\tthis.nbTests++;\n\t}", "@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_TESTUNIT);\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}", "@Override\n\tpublic void count() {\n\t\t\n\t}", "public int getTestSize(){\n return testSetSize;\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n\tpublic void testCountItems() {\n\t\tFile test = new File(\"X:\\\\Documents\\\\PS9 Test\");\n\t\tassertEquals(13,Explorer.countItems(test));\n\t}", "@Before\n\tpublic void setUp() {\n\t\ttest_count++;\n\t\tSystem.out.println(\"Test \"+ test_count);\n\t}", "public void methodsStoring(HashSet<String> selectedMethods, String filename) {\n try {\n int count = 0;\n File file = new File(filename);\n FileWriter fileWriter = new FileWriter(file);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n for (String string : selectedMethods) {\n if (testListedMethods.contains(string)){\n bufferedWriter.write(string + \"\\n\");\n count ++;\n }\n }\n bufferedWriter.flush();\n System.out.print(count);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public int getNumPaMethods(){\r\n\t\treturn classStat.getNPaM();\r\n\t}", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "int getTotalCount();", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "public long getRecordWrittern() {\n long count = 0;\n for (OutputStats out : outputs) {\n long rec = out.getNumberRecords();\n if (rec > 0) count += rec;\n }\n return count;\n }", "@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}", "void writeRepetitionCount(int count);", "@Test\r\n public void testTotalNumberOfQuestion() {\r\n Application.loadQuestions();\r\n assertEquals(Application.allQuestions.size(), 2126);\r\n }", "@com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor\n @gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getTotalNumChecks() {\n return ((com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods\")).getTotalNumChecks();\n }", "@com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor\n @gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getTotalNumChecks() {\n return ((com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods\")).getTotalNumChecks();\n }", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "@Override\r\n\tpublic int getTotal() {\n\t\treturn mapper.count();\r\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Test\n public void testInvokeCountValueMethod() throws MBeanException, InstanceNotFoundException, ReflectionException {\n long result = CSJmxStats.invokeCountValueMethod();\n //Result should be 5\n assertEquals(count, result);\n }", "@Test\r\n\tvoid testCount2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(1);\r\n\t\ttest.add(2);\r\n\t\ttest.add(3);\r\n\t\ttest.add(4);\r\n\t\ttest.add(5);\r\n\t\ttest.add(6);\r\n\t\ttest.add(7);\r\n\t\ttest.add(8);\r\n\t\ttest.add(9);\r\n\t\ttest.add(10);\r\n\t\ttest.add(11);\r\n\t\tint output = test.count();\r\n\t\tassertNotEquals(10, output);\r\n\t}", "int getMockUpdatesCount();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "public int countAll();", "private void writeTestLines() {\n for (String L : testLines) {\n pages.write(L);\n }\n }", "void write(TestResult testResult);", "@Override\n\tpublic int count() {\n\t\treturn 4;\n\t}", "int getFileCount();", "@Test\n public void SelectCount(){\n\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-4015));\n byte[] byteArray0 = new byte[0];\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n ByteVector byteVector0 = new ByteVector(2);\n methodWriter0.visitFrame((-4015), 191, (Object[]) null, (-4058), (Object[]) null);\n }", "int getResponsesCount();", "public void incCount() { }", "@Test\n public void shouldCountLinesOfTestCodeInsideTestBundles() throws Exception {\n initializeOSGiProjectWithTestBundles();\n resetOutput();\n getShell().execute(\"osgi lot\");\n assertTrue(currentOsgiProject.get().getLinesOfTestCode().equals(2L));\n assertTrue(getOutput().contains(\"Total lines of test code:2\"));\n }", "public long getBytesWritten() { \n long count = 0;\n for (OutputStats out : outputs) {\n long n = out.getBytes(); \n if (n > 0) count += n;\n }\n return count;\n }", "int getSourceFileCount();", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "long getNumberOfComparisons();", "int getInstrumentCount();", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "@Test\n public void testCount() {\n System.out.println(\"**** count *****\");\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 3;\n int result = instance.count();\n assertEquals(expResult, result);\n }", "@Test\n @Order(6)\n void tabuSizeTest() {\n for (String taillardFilename : SearchTestUtil.taillardFilenames) {\n System.out.println(\"-----------------\");\n System.out.println(\"Run \" + taillardFilename);\n System.out.println(\"-----------------\");\n tabuSizeTestWith(taillardFilename);\n }\n }" ]
[ "0.7015256", "0.70057595", "0.6865361", "0.68290806", "0.6711967", "0.6680549", "0.66531944", "0.66397035", "0.6500015", "0.64717484", "0.64684707", "0.63966084", "0.63091314", "0.6290859", "0.62888175", "0.6280821", "0.6248653", "0.62234753", "0.61962074", "0.61962074", "0.6154603", "0.6144266", "0.6106285", "0.6094863", "0.60758597", "0.60496736", "0.5995271", "0.5978143", "0.5945877", "0.59153926", "0.5886392", "0.5868761", "0.58619773", "0.5851077", "0.5846304", "0.58193713", "0.5796569", "0.5796247", "0.5796247", "0.5796247", "0.5793714", "0.57860506", "0.57860506", "0.57860506", "0.57860506", "0.5777512", "0.5777512", "0.5777512", "0.5777512", "0.5777512", "0.57665056", "0.5754617", "0.57545614", "0.57259804", "0.57246625", "0.5723208", "0.57175446", "0.57152474", "0.5713108", "0.5713108", "0.5713108", "0.5713108", "0.5713108", "0.5713108", "0.5713108", "0.5713108", "0.57066095", "0.5701021", "0.5691732", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.56903374", "0.5674557", "0.56690365", "0.56656307", "0.5665241", "0.5658452", "0.56582326", "0.56580913", "0.5651156", "0.56492025", "0.56387335", "0.5629614", "0.5617239", "0.5617239", "0.56086165", "0.5603282", "0.55946964", "0.55946964", "0.55946964", "0.5593581", "0.5587662" ]
0.7070574
0
Creates the total time spent for the test to get finished
private void createTotalTime(BufferedWriter writer) throws IOException { Map<String, String> dataMap = data.getTotalTime(); String parent = "<div style='width: 260px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;left: 281px;'>"; String subChild = "<label style='position: absolute;margin-top: 5px;'>"; String totalTimeLabel = "<span style='font-weight: bold;color: #000000;padding-left: 8px;font-family: Roboto, sans-serif;'>Total Time</span></label>"; String subChild1 = "<label style='margin-top: 57px;position: absolute;'>"; String totatlTime = "<span style='font-weight: bold;color: #000000;padding-left: 8px;font-family: Roboto, sans-serif;'>" + dataMap.get("total-time") + "</span></label></div>"; writer.write(parent + subChild + totalTimeLabel + subChild1 + totatlTime); String startTimePanel = "<div style='width: 260px;background-color: #00E676;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;left: 554px;'>"; String labelTime = "<label style='position: absolute;margin-left: 8px;'>"; String startTimeLabel = "<span style='font-weight: bold;color: gray;padding-top: 3px;font-family: Roboto, sans-serif;'>Start Time</span></label>"; String timeContainer = "<label style='position: absolute;margin-top: 58px;padding-left: 118px;font-weight: bold;color: white;'><span style='font-family: Roboto, sans-serif;font-size:smaller'>"; String startTime = dataMap.get("start-time") + "</span></label></div>"; writer.write(startTimePanel + labelTime + startTimeLabel + timeContainer + startTime); String endTimePanel = "<div style='width: 260px;background-color: #F44336;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;left: 828px;'>"; String endlabelTime = "<label style='position: absolute;margin-left: 8px;'>"; String endTimeLabel = "<span style='font-weight: bold;color: gray;padding-top: 3px;font-family: Roboto, sans-serif;'>End Time</span></label>"; String endTimeContainer = "<label style='position: absolute;margin-top: 58px;padding-left: 118px; font-weight: bold;color: white;'><span style='font-family: Roboto, sans-serif;font-size:smaller'>"; String endTime = dataMap.get("end-time") + "</span></label></div>"; writer.write(endTimePanel + endlabelTime + endTimeLabel + endTimeContainer + endTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}", "TimeSpent createTimeSpent();", "public long getTimeTaken();", "public void setFinishTime() {\r\n\t\t\tthis.finishTime = RNG.MAXINT;\r\n\t\t}", "public long totalTime() {\n\t\tlong ret = 0;\n\t\tfor (Task l : plan) {\n\t\t\tret += l.getTaskLength();\n\t\t}\n\n\t\treturn ret;\n\t}", "@Override\n public long getTotalHarvestingTime()\n {\n return 0;\n }", "public long getTotalTime() {\n var timeStarted = getStartTime();\n var timeFinished = getEndTime();\n return timeStarted.until(timeFinished, SECONDS);\n }", "@Test\n public void durationTest() {\n // TODO: test duration\n }", "public int getTotalTime();", "private static int timeSpent(Step s) {\n return s.getName().getBytes()[0] - 64 + PENALTY_TIME;\n }", "int getTestDuration() {\n return config.big ? TEST_TIME_SECONDS : TEST_TIME_SECONDS / 10;\n }", "public double getFinishTime(){return finishTime;}", "public void endTime() throws IOException {\n\t\t\t long finish = System.currentTimeMillis();\n\t\t\t \n\t\t\t// Cleaning:\n\t\t\t fileCleaner(\"match.log\");\n\t\t\t fileCleaner(\"max.log\");\n\t\t\t fileCleaner(\"order.log\");\n\t\t\t fileCleaner(\"xml.log\");\n\t\t\t fileCleaner(\"error.log\");\n\t\t\t fileCleaner(\"reason.log\");\n\t\t\t fileCleaner(\"finish.time\");\n\t\t\t \n\t\t\t fileWriter(\"finish.time\", convertLongToString(finish));\n\t\t\t// Scanning Test Counter record:\n\t\t\t int n = 1;\n\t\t\t if (fileExist(\"test.num\", false)) { \n\t\t\t\t if (! fileScanner(\"test.num\").equals(null)) { n = Integer.valueOf(fileScanner(\"test.num\")); }\n\t\t\t }\n\t\t\t fileWriterPrinter(\"\\n Finish: \" + getCurrentDateTimeFull());\n\t\t\t fileWriterPrinter( \" Duration: \" + testRunTime(\"start.time\", finish)); \n\t\t\t if (n > 1) { fileWriterPrinter(\" Subtotal: \" + testRunTime(\"ini.time\", finish) + \"\\n\"); }\n\t\t\t else { fileWriterPrinter(); }\n\t\t\t// Append an End Log record:\n\t\t if (fileExist(\"run.log\", false)) {\n\t\t \t fileWriter(\"run.log\", \"\\n Finish: \" + getCurrentDateTimeFull());\n\t\t \t fileWriter(\"run.log\", \" Duration: \" + testRunTime(\"start.time\", finish));\n \t if (n > 1) { fileWriter(\"run.log\", \" Subtotal: \" + testRunTime(\"ini.time\", finish)); }\n\t\t }\n }", "DurationTracker timeSpentTaskWait();", "public int getTimeTaken() {\n return this.getTreeNode().getBuilding().getTotalTimeTaken();\n }", "@Override\n public void run() {\n long startTime = System.nanoTime();\n\n int value = 0;\n int i = 0;\n MainActivity tester = new MainActivity();\n System.gc();\n\n for (; i < testCases; i++) {\n value += tester.intMethod(value);\n }\n\n long finishTime = System.nanoTime();\n\n Log.d(\"MAIN ACTIVITY\",\n \"************** math = \" + tester.intMethod(100));\n\n long totalTime = finishTime - startTime;\n\n long displayTime1 = (totalTime / 1000);\n long displayTime2 = (displayTime1 / 1000);\n long displayTime3 = (displayTime2 / 1000);\n Log.d(\"MAIN ACTIVITY\", \"value: \" + value + \" total time: \"\n + totalTime + \" display: \" + displayTime1 + \", \"\n + displayTime2 + \", \" + displayTime3);\n longToChange = displayTime1;\n Toast.makeText(\n getApplicationContext(),\n \"Total: \" + value + \" Total Time : \" + displayTime1\n + \" μs. \" + displayTime2 + \" ms. \" + displayTime3\n + \" ns.\", Toast.LENGTH_LONG).show();\n\n }", "public void Times() \n {\n if(status.getStatus_NUM() == 1 || status.getStatus_NUM() == 2 || status.getStatus_NUM() == 3)\n { //Waiting Time\n startWaitingTime = System.nanoTime();\n if(status.getStatus_NUM() != 1 || status.getStatus_NUM() != 2 || status.getStatus_NUM() != 3)\n {\n endWaitingTime = System.nanoTime();\n }\n \n totalWaitingTime += endWaitingTime - startWaitingTime;\n }\n //When it is running status \n else if(status.getStatus_NUM() == 0)\n {\n //Running Time\n startRunningTime = System.nanoTime();\n //Add a process\n if(status.getStatus_NUM() != 0)\n {\n endRunningTime = System.nanoTime();\n }\n \n totalRunningTime += endRunningTime - startRunningTime;\n }\n //When it is terminated\n else\n {\n System.out.println(\"Terminated\");\n System.out.println(\"Total Running Time : \" + totalRunningTime);\n System.out.println(\"Total Waiting Time : \" + totalWaitingTime);\n }\n }", "private int getTotalTestCase() {\n\t\treturn passedtests.size() + failedtests.size() + skippedtests.size();\n\t}", "private int calcTotalTime() {\n\t\tint time = 0;\n\t\tfor (Taxi taxi : taxis) {\n\t\t\ttime += taxi.calcTotalTime();\n\t\t}\n\t\treturn time;\n\t}", "public int getTotalRunTime() {\n return totalRunTime;\n }", "long getTotalDoExamTime();", "public void timePassed() { }", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "@Override\n public double explorationTime(){\n return timespent;\n }", "public long getElapsedTime(){\n long timePassed = endTime - startTime;\n return timePassed;\n }", "public void timePassed() {\r\n }", "public void timePassed() {\r\n }", "private void dumpResults(long startTime, long endTime) {\n \n Log.info(TAG_LOG, \"***************************************\");\n \n if (testResults != null) {\n int tot = 0;\n int failed = 0;\n int success = 0;\n int skipped = 0;\n for(int i=0;i<testResults.size();++i) {\n StringBuffer res = new StringBuffer();\n \n TestStatus status = (TestStatus)testResults.elementAt(i);\n String url = status.getScriptName();\n \n res.append(\"Script=\").append(url);\n String r;\n switch (status.getStatus()) {\n case TestStatus.SUCCESS:\n r = \"SUCCESS\";\n success++;\n break;\n case TestStatus.FAILURE:\n r = \"FAILURE\";\n failed++;\n // Record that we had an error\n errorCode = -1;\n break;\n case TestStatus.SKIPPED:\n r = \"SKIPPED\";\n skipped++;\n break;\n default:\n r = \"UNDEFINED\";\n break;\n }\n \n res.append(\" Result=\").append(r);\n String detailedError = status.getDetailedError();\n tot++;\n if (detailedError != null) {\n res.append(\" Error=\").append(detailedError);\n }\n Log.info(TAG_LOG, res.toString());\n }\n Log.info(TAG_LOG, \"---------------------------------------\");\n Log.info(TAG_LOG, \"Total number of tests: \" + tot);\n Log.info(TAG_LOG, \"Total number of success: \" + success);\n Log.info(TAG_LOG, \"Total number of failures: \" + failed);\n Log.info(TAG_LOG, \"Total number of skipped: \" + skipped);\n long secs = (endTime - startTime) / 1000;\n Log.info(TAG_LOG, \"Total execution time: \" + secs);\n } else {\n Log.info(TAG_LOG, \"No tests performed\");\n }\n Log.info(TAG_LOG, \"***************************************\");\n }", "private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }", "long getElapsedTime();", "private void incrementDuration(TestResult result) {\n long currentTime = System.currentTimeMillis();\n result.setDuration((float) (currentTime - lastTime) / (float) 1000);\n lastTime = currentTime;\n totalDuration += result.getDuration();\n totalTunitDurations += result.getDuration();\n }", "public int getTimeToComplete() {\n // one level is ten minutes long\n int totalTime = numberOfLevels * 10;\n if (is3D) {\n // if it's 3d then it take twice as long because its harder\n totalTime = totalTime * 2;\n }\n \n return totalTime;\n }", "@Override\n public void run() {\n long startTime = System.nanoTime();\n\n int value = 0;\n int i = 0;\n LibInterfaceOneTest app2class = new LibInterfaceOneTest(\n getApplicationContext());\n System.gc();\n\n for (; i < testCases; i++) {\n value += app2class.testMethodCall2(value);\n }\n\n long finishTime = System.nanoTime();\n\n long totalTime = finishTime - startTime;\n\n long displayTime1 = (totalTime / 1000);\n long displayTime2 = (displayTime1 / 1000);\n long displayTime3 = (displayTime2 / 1000);\n Log.d(\"MAIN ACTIVITY\", \"Total: \" + value + \" total time: \"\n + totalTime + \" display: \" + displayTime1 + \", \"\n + displayTime2 + \", \" + displayTime3);\n longToChange = displayTime1;\n Toast.makeText(\n getApplicationContext(),\n \"Total Time : \" + displayTime1 + \" μs. \" + displayTime2\n + \" ms. \" + displayTime3 + \" ns.\",\n Toast.LENGTH_LONG).show();\n\n }", "public void timeToRunDec()\n\t{\n\t\tthis.time_to_run -- ;\n\t}", "public void timePassed() {\n }", "public void timePassed() {\n }", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public void testTime()\n {\n SudokuTimer test = new SudokuTimer();\n\n mTimer.start();\n test.start();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n assertTrue(mTimer.toString().equals(test.toString()));\n\n mTimer.stop();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n assertFalse(mTimer.toString().equals(test.toString()));\n\n test.stop();\n mTimer.start();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n mTimer.stop();\n\n //checks to the nearest second\n assertEquals(mTimer.getElapsedTime() / 1000,\n test.getElapsedTime() / 1000);\n }", "public int runCount() {\n return testCount;\n }", "public void timePassed() {\r\n\r\n }", "public long timeAlg(){\n long startTime = System.nanoTime();\n \n this.doTheAlgorithm();\n \n long endTime = System.nanoTime();\n long elapsedTime = endTime - startTime;\n \n return elapsedTime;\n }", "@Override\n public void run() {\n long startTime = System.nanoTime();\n\n int value = 0;\n int i = 0;\n System.gc();\n\n for (; i < testCases; i++) {\n value += MainActivity.intMethod2(value);\n }\n\n long finishTime = System.nanoTime();\n\n long totalTime = finishTime - startTime;\n\n long displayTime1 = (totalTime / 1000);\n long displayTime2 = (displayTime1 / 1000);\n long displayTime3 = (displayTime2 / 1000);\n Log.d(\"MAIN ACTIVITY\", \"total time: \" + totalTime + \" display: \"\n + displayTime1 + \", \" + displayTime2 + \", \" + displayTime3);\n longToChange = displayTime1;\n Toast.makeText(\n getApplicationContext(),\n \"Value: \" + value + \"Total Time : \" + displayTime1\n + \" μs. \" + displayTime2 + \" ms. \" + displayTime3\n + \" ns.\", Toast.LENGTH_LONG).show();\n\n }", "private String calculateTime(long startTime, long endTime) {\r\n\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.00\");\r\n\r\n\t\tdouble timeTaken = ((endTime - startTime) / 1000000000.0);\r\n\r\n\t\tString timeTakenStr = df.format(timeTaken);\r\n\r\n\t\treturn timeTakenStr;\r\n\t}", "public int totalTime() {\n int time = 0;\n for (List l : lists.getList()) time += l.obtainTotalTime();\n return time;\n }", "public Double waitTimeCalculatior(long start) {\n\t\t\t\tdouble difference = (System.currentTimeMillis() - start);\n\t\t\t\treturn difference;\n\t\t\t}", "public int totalTime()\n {\n return departureTime - arrivalTime;\n }", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "private static void writeExecutionTime() {\n \t\n \tendMs = System.currentTimeMillis();\n \tlong elapsed = endMs - startMs;\n \tlong hours = elapsed / 3600000;\n long minutes = (elapsed % 3600000) / 60000;\n long seconds = ((elapsed % 3600000) % 60000) / 1000;\n \n try {\n \t\n \tFileSystem fs = FileSystem.get(Mediator.getConfiguration());\n \tPath outputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/time.txt\");\n \tOutputStream os = fs.create(outputPath);\n \tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os));\n \t\n \t/**\n \t * Write total execution time\n \t */\n \tbw.write(\"Total execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+(elapsed/1000)+\" seconds)\\n\");\n \t\n \t/**\n \t * Write Mappers execution time avg.\n \t */\n \tPath inputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/\"+Mediator.TIME_STATS_DIR);\n \tFileStatus[] status = fs.listStatus(inputPath);\n \tBufferedReader br = null;\n \tString buffer;\n \tlong sumMappers = 0;\n \tint numMappers = 0;\n \tfor (FileStatus fileStatus:status){\n \t\t// Read Stage 1\n \t\tif (fileStatus.getPath().getName().contains(\"mapper\")){\n \t\t\tnumMappers ++;\n \t\t\tbr=new BufferedReader(new InputStreamReader(fs.open(fileStatus.getPath())));\n \t\t\tbuffer = br.readLine();\n \t\t\tsumMappers += Long.parseLong(buffer.substring(buffer.indexOf(\":\")+1).trim());\n \t\t}\n \t\tbr.close();\n \t}\n \t// Write AVG\n \telapsed = sumMappers / numMappers;\n \thours = elapsed / 3600;\n minutes = (elapsed % 3600) / 60;\n seconds = (elapsed % 3600) % 60;\n bw.write(\"Mappers avg. execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+elapsed+\" seconds)\\n\");\n \t\n \tbw.close();\n \tos.close();\n \t\n \t// Remove time stats directory\n \tfs.delete(inputPath,true);\n \t\n }\n catch(Exception e){\n \tSystem.err.println(\"\\nERROR WRITING EXECUTION TIME\");\n\t\t\te.printStackTrace();\n }\n \t\n }", "public static String testRunTime(String startFileName) throws IOException {\n\t\t\t long finish = System.currentTimeMillis();\n\t\t\t String startingTime = fileScanner(startFileName);\n\t\t\t long start = convertStringToLong(startingTime);\n\t\t\t return convertTimeMillisecondsAsLongToDuration(finish - start);\n\t\t\t}", "@Override\r\n public void timePassed() {\r\n }", "long elapsedTime();", "@Test\n public void testTimelyTest() {\n }", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "public static String testRunTime(String startFileName, long finishTimeMilliseconds) throws IOException {\n\t\t\t long finish = finishTimeMilliseconds;\n\t\t\t String startingTime = fileScanner(startFileName);\n\t\t\t long start = convertStringToLong(startingTime);\n\t\t\t return convertTimeMillisecondsAsLongToDuration(finish - start);\n\t\t\t}", "public String getEstimatedRemainingTime() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return \"N/A\";\n \n long eta = d-(System.currentTimeMillis()-startTime);\n if(eta<=0) return \"N/A\";\n \n return Util.getTimeSpanString(eta);\n }", "@AfterEach\n private void afterEachEnd()\n {\n System.out.println(\"Test Completed \" + testInfo.getDisplayName());\n System.out.println(\"After Each Clean Test........\");\n System.out.println(\"Elapsed TIme : \" + ELAPSED_TIME + \" ns\");\n LOGGER.info(\"Elapsed TIme for \" + testInfo.getDisplayName() + \" : \" + ELAPSED_TIME);\n }", "@Override\n public void timePassed() {\n }", "public void countTimer() {\n\t\t\n\t\ttimerEnd = System.currentTimeMillis();\n\t}", "long getExecutionTime();", "public long calculateExecutionTime(int[][] solutiongrid){ \n long startTime = System.currentTimeMillis();\n //Run the program\n validateSudoku(solutiongrid); \n long endTime = System.currentTimeMillis();\n long totalTime = endTime - startTime; \n \n return totalTime;\n }", "private long calculateTimeToWait(int min, int max, long totalRunningTime)\n {\n double randomNumber = Math.random();\n\n if (randomNumber < 0.003)\n return Random.nextInt(60523, 127443);\n\n if (randomNumber < 0.05)\n return Random.nextInt(2519, 28111);\n\n long waitTime = (long) Random.nextInt(min, max);\n return (long) Math.floor(waitTime * (1 / (1 - (totalRunningTime / FIVE_HOURS_MILLIS))));\n }", "public abstract void setTotalRunTime();", "public int getSimulationTime() {\n return clock.getTimeCount();\n }", "Double getTotalSpent();", "public String getTotalTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getCookTime() + recipe.getPrepTime());\r\n } else {\r\n return \"\";\r\n }\r\n }", "private void incrementFailures() {\n totalFailures++;\n totalTunitFailures++;\n }", "void endTests() {\n\t\tthis.progressBar.setProgress(1.0);\n\t\tthis.percent.setText(\"Done\");\n\t}", "public static void calTime() {\n time = new Date().getTime() - start;\n }", "public double getTotalTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\t\tboolean hasObsChild = false ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs )\n\t\t\t{\n\t\t\t\thasObsChild = true ;\n\t\t\t\telapsedTime += (( SpObs )child).getElapsedTime() ;\n\t\t\t}\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t{\n\t\t\t\telapsedTime += (( SpMSB )child).getTotalTime() ;\n\t\t\t}\n\t\t}\n\n\t\t// If there is an Obs child, we should add a slew time as well,\n\t\t// which is just the instrument slew time times the number of\n\t\t// targets. We don't do this if the child is an MSB since this\n\t\t// already adds a slew time\n\t\tdouble slewTime = 0. ;\n\t\tif( hasObsChild )\n\t\t{\n\t\t\tSpInstObsComp inst = SpTreeMan.findInstrument( this ) ;\n\t\t\tif( inst != null )\n\t\t\t\tslewTime = inst.getSlewTime() * size() ;\n\t\t}\n\n\t\t// Get the total number of repeats for each target\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\telapsedTime += slewTime ;\n\n\t\treturn elapsedTime ;\n\t}", "public void timestepCompleted(Simulation simulation) {\n }", "public TestResults run() {\n\t\treturn run(getConfiguredDuration());\n\t}", "private long calculatePostTime() {\n return System.currentTimeMillis();\n }", "public int totalTime(){\n\t\t\n\t\tint time=0;\n\t\t\n\t\n\t\tfor(int i=0; (i<songList.length);i++){\n\t\t\t\n\t\t\tif(songList[i]!=null){\n\t\t\t\n\t\t\ttime+= songList[i].getDuration();\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn time;\n\t\t\n\t}", "public double getElapsedTime(){\n double CurrentTime = System.currentTimeMillis();\n double ElapseTime = (CurrentTime - startTime)/1000;\n return ElapseTime;\n }", "public TestInfo runTest() throws Exception {\n\t\tMap<List<Integer>, String[]> pathMap = getImplementation().getSymbolicExecutionCost(cfg);\n\t\t//begin with random testing\n\t\tList<Integer> path = getImplementation().randomTesting(cfg); //start with a random testing\n\t\tremoveVisitedNode(path);\n\t\ttestInfo.rm_number++;\n\t\ttestInfo.totalCost = testInfo.totalCost + path.size() - 1;\n\t\tPath inputSeed = new Path(path, 0);\n\t\t\n\t\tList<Path> workList = new ArrayList<>();\n\t\tworkList.add(inputSeed);\n\t\t\n\t\t//if there is unvisited nodes\n\t\twhile(!workList.isEmpty() && !unvisited.isEmpty()){\n\t\t\tPath input = workList.get(0);\n\t\t\tworkList.remove(0);\n\t\t\tList<Path> childInputs = expandExecution(input);\n\t\t\tif(!childInputs.isEmpty()){\n\t\t\t\tfor(int i = 0; i < childInputs.size(); i++){\n\t\t\t\t\tPath newInput = childInputs.get(i);\n\t\t\t\t\tList<Integer> newPath = newInput.path;\n\t\t\t\t\t\n\t\t\t\t\t//update the test information\n\t\t\t\t\tnewPath = getImplementation().symbolicExecution(cfg, testInfo, newPath);\n\t\t\t\t\ttestInfo.totalCost = testInfo.totalCost + newPath.size() - 1;\n\t\t\t\t\t\n\t\t\t\t\t//remove nodes are visited in this testcase\n\t\t\t\t\tremoveVisitedNode(newPath);\n\t\t\t\t\tnewInput.path = newPath;\n\t\t\t\t\t\n\t\t\t\t\tworkList.add(newInput);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttestInfo.coverageRatio = 1 - (double)unvisited.size() / node_number;\n\t\t//print the test information\n\t\treturn testInfo;\n\t}", "private void createTotalTestMethod(BufferedWriter writer)\r\n\t\t\tthrows IOException {\r\n\t\tString parent = \"<label style='position: inherit;top: 57px;'>\";\r\n\t\tString content = \"<span style='color: #000000;font-weight: bold;padding-left: 8px;font-family: Roboto, sans-serif;'>Total TestMethod</span>\";\r\n\t\tString total = \"<span style='margin-left: 83px;color: #000000;font-weight: bold;font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ data.getNumberOfTest() + \"</span></label>\";\r\n\t\twriter.write(parent + content + total);\r\n\t}", "public String elapsedTime() {\n return totalWatch.toString();\n }", "public static double toc() {\n\t\treturn System.currentTimeMillis() / 1000d - t;\n\t}", "public void timePassed() {\nreturn;\n}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "@Override\n\tpublic String getFinishTime() {\n\t\treturn finishTime;\n\t}", "@Test\n public void testTotalSeconds(){\n \tCountDownTimer s = new CountDownTimer(2, 45, 15);\n \tassertEquals(CountDownTimer.totalSeconds(s), 9915);\n \t\n \ts = new CountDownTimer();\n \tassertEquals(CountDownTimer.totalSeconds(s), 0);\n \t\n \ts = new CountDownTimer(\"1:00:30\");\n \tassertEquals(CountDownTimer.totalSeconds(s), 3630);\n }", "public void testStoppedTime() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset103.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 3, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 160, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 2568121, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 4364, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 2801954, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 25963, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 151, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 2721420, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 0, jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 0, jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 36651675, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 4364, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last timestamp not correct.\", 2801954, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 2827917, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 9, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 4, jvmRun.getStoppedTimeThroughput());\n Assert.assertFalse(Analysis.WARN_GC_STOPPED_RATIO + \" analysis incorrectly identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n Assert.assertEquals(\"Inverted parallelism event count not correct.\", 0, jvmRun.getInvertedParallelismCount());\n }", "public static void printExecutionTime() {\n long endTime = System.currentTimeMillis();\n\n logger.info(\"Completed Execution in: \" + (endTime - ClientExecutorEngine.getStartTime())/1000.0 + \" seconds.\");\n }", "public void testSummaryStatsStoppedTime() {\n File testFile = new File(\"src/test/data/dataset41.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertTrue(JdkUtil.LogEventType.G1_YOUNG_PAUSE.toString() + \" collector not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.G1_YOUNG_PAUSE));\n Assert.assertTrue(JdkUtil.LogEventType.APPLICATION_STOPPED_TIME.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.APPLICATION_STOPPED_TIME));\n Assert.assertEquals(\"GC Event count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 2192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 2847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 964, jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 3884, jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 3884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 4884, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 99, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 78, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "public double DiskServiceTime()\r\n\t{\r\n\t\tdouble rand = 0.0;\r\n\t\tdouble sum = 0.0;\r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tsum += Math.random();\r\n\t\t}\r\n\t\tsum = (sum - 10.0/2.0) / Math.sqrt(10.0/12.0);\r\n\t\trand = 20.0 * sum - 100.0;\r\n\t\trand = Math.abs(rand);\r\n\t\treturn rand;\r\n\t}", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "@Test\n public void testGetTotalTime() {\n System.out.println(\"getTotalTime\");\n CharterDto instance = new CharterDto(\"Test name\");\n String expResult = \"13246579\";\n instance.setTotalTime(expResult);\n String result = instance.getTotalTime();\n assertEquals(expResult, result);\n }", "@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }", "@Test\n public void currentProgressTest() {\n\n smp.checkAndFillGaps();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n\n assertEquals(5, smp.getCurrentProgress());\n assertEquals(30, smp.getUnitsTotal() - smp.getCurrentProgress());\n assertEquals(Float.valueOf(30), smp.getEntriesCurrentPace().lastEntry().getValue());\n assertTrue(smp.getEntriesCurrentPace().size() > 0);\n assertFalse(smp.isFinished());\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-YY\", Locale.getDefault());\n\n for (Map.Entry<Date, Float> entry : smp.getEntriesCurrentPace().entrySet()) {\n System.out.println(dateFormat.format(entry.getKey()) + \" : \" + entry.getValue());\n }\n\n\n for (int i = 0; i < 30; i++) {\n smp.increaseCurrentProgress();\n }\n\n assertTrue(smp.isFinished());\n\n smp.increaseCurrentProgress();\n\n assertEquals(Float.valueOf(0), smp.getEntriesCurrentPace().lastEntry().getValue());\n\n }", "@Override\n\t\tpublic final double time() throws Throwable {\n\t\t\tinit();\n\t\t\ttimer.lap();\n\t\t\ttimed();\n\t\t\tdouble time = timer.lap();\n\t\t\tcleanup();\n\t\t\treturn time;\n\t\t}", "public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }", "public Long getLastRunDuration();", "public double computeElapsedTime() {\r\n\r\n long now = System.currentTimeMillis();\r\n\r\n elapsedTime = (double) (now - startTime);\r\n\r\n // if elasedTime is invalid, then set it to 0\r\n if (elapsedTime <= 0) {\r\n elapsedTime = (double) 0.0;\r\n }\r\n\r\n return (double) (elapsedTime / 1000.0); // return in seconds!!\r\n }", "public int getTotalWait() {\n return totalWait;\n }", "public static long getTotalHitTime() {\r\n return _time;\r\n }", "public static void main(String[] args) {\n double SumOfTimes = 0;\n for(int j=0; j<100; j++) {\n\n TimeCounter timer = new TimeCounter();\n timer.StartToCount();\n\n for (int i = 1; i <= 100000; i++) {\n if (i % 3 == 0) {\n System.out.print(\"fizz \");\n }\n if (i % 5 == 0) {\n System.out.print(\"buzz\");\n }\n if (i % 3 != 0 && i % 5 != 0) {\n System.out.print(i);\n }\n System.out.println();\n }\n\n timer.FinishToCount();\n SumOfTimes+=timer.GetCountedTime();\n\n }\n System.out.println(\"Average time = \"+SumOfTimes/100); // Average time = 0.318....... (in my processor)\n }", "public void testStatistics(){\n Profile profile = new Profile(\"id1\");\n GeoLocation uni_loc = new GeoLocation(0.0, 0.0);\n ArrayList<Trial> trials = new ArrayList<>();\n\n for (int i=1; i<101; i++){\n TrialIntCount trial = new TrialIntCount(\"\"+i, uni_loc, profile, 0);\n if (i<40 && i%2==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if (i>= 40 && i<80 && i%3==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if ( i >= 80 && i%5==0) {\n trial.setCount(i);\n TrialIntCount trial2 = new TrialIntCount(\"1\"+i, uni_loc, profile, 0);\n trial2.setCount(i);\n\n trials.add(trial);\n trials.add(trial2);\n }\n }\n\n this.exp = new Experiment(\"foo\");\n this.exp.addTrials(trials);\n\n assertEquals(\"removeDupes does not work\", 37, this.exp.removeDupes().length);\n assertEquals(\"frequencies does not work\", 15, exp.frequencies().length);\n assertEquals(\"median does not work\", \"46.5\", exp.getMedian());\n assertEquals(\"Q1 does not work\", \"23.00\", exp.getQ1());\n assertEquals(\"Q3 does not work\", \"76.50\", exp.getQ3());\n assertEquals(\"std does not work\", \"30.39\", exp.getStd());\n assertEquals(\"mean does not work\", \"49.05\", exp.getMean());\n\n }", "@Override\n public void run() {\n long startTime = System.nanoTime();\n\n int value = 99;\n int i = 0;\n System.gc();\n\n int time1 = MainActivity.intMethod2(value);\n MainActivity tester = new MainActivity();\n int time2 = tester.intMethod(value);;\n \n long finishTime = System.nanoTime();\n\n long totalTime = finishTime - startTime;\n\n long displayTime1 = (totalTime / 1000);\n long displayTime2 = (displayTime1 / 1000);\n long displayTime3 = (displayTime2 / 1000);\n Log.d(\"MAIN ACTIVITY\", \"total time: \" + totalTime + \" display: \"\n + displayTime1 + \", \" + displayTime2 + \", \" + displayTime3);\n longToChange = displayTime1;\n Toast.makeText(\n getApplicationContext(),\n \"Value: \" + value + \"Total Time : \" + displayTime1\n + \" μs. \" + displayTime2 + \" ms. \" + displayTime3\n + \" ns.\", Toast.LENGTH_LONG).show();\n\n }", "public int getDuration() {\n\t\treturn (int) ((endTime.getTime()-startTime.getTime())/1000) + 1;\n\t}", "@Test\n public void testGetTotalTime() throws Exception {\n HeterogeneousComputingEnv envTest = nestedDependency();\n\n ScheduleChromosome chromosomeTest = new ScheduleChromosome(envTest);\n\n // Guarantee that task 0 and 2 are in the same core and 1 in the other\n chromosomeTest.toSeq().get(0).mutate(ScheduleAllele.of(envTest, 0, 0));\n chromosomeTest.toSeq().get(1).mutate(ScheduleAllele.of(envTest, 1, 1));\n chromosomeTest.toSeq().get(2).mutate(ScheduleAllele.of(envTest, 2, 0));\n\n // Create the factory\n StatsFactory statsFact = new StatsFactory(envTest, fitnessCalc);\n Stats stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(5, stat.getTotalTime(), EPSILON);\n\n // Test case 2 - last 2 tasks in parallel\n envTest = oneRootTwoDepenendantTasks();\n\n chromosomeTest = new ScheduleChromosome(envTest);\n\n // Guarantee that task 0 and 2 are in the same core and 1 in the other\n chromosomeTest.toSeq().get(0).mutate(ScheduleAllele.of(envTest, 0, 0));\n chromosomeTest.toSeq().get(1).mutate(ScheduleAllele.of(envTest, 1, 1));\n chromosomeTest.toSeq().get(2).mutate(ScheduleAllele.of(envTest, 2, 0));\n\n // Create the factory\n statsFact = new StatsFactory(envTest, fitnessCalc);\n stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(3, stat.getTotalTime(), EPSILON);\n\n // Test case 3 - chained tasks in same processor\n envTest = chaindedDependency();\n\n chromosomeTest = new ScheduleChromosome(envTest);\n\n // Create the factory\n statsFact = new StatsFactory(envTest, fitnessCalc);\n stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(3, stat.getTotalTime(), EPSILON);\n\n // Test case 4 - independent tasks\n envTest = independentTasks();\n\n chromosomeTest = new ScheduleChromosome(envTest);\n\n // Guarantee that task 0 and 2 are in the same core and 1 in the other\n chromosomeTest.toSeq().get(0).mutate(ScheduleAllele.of(envTest, 0, 0));\n chromosomeTest.toSeq().get(1).mutate(ScheduleAllele.of(envTest, 1, 1));\n chromosomeTest.toSeq().get(2).mutate(ScheduleAllele.of(envTest, 2, 0));\n\n // Create the factory\n statsFact = new StatsFactory(envTest, fitnessCalc);\n stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(2, stat.getTotalTime(), EPSILON);\n\n }" ]
[ "0.6401252", "0.6314534", "0.63071066", "0.6282415", "0.62772757", "0.6246136", "0.6238247", "0.6210263", "0.619057", "0.61849916", "0.6151384", "0.61501586", "0.6113842", "0.60913396", "0.6020052", "0.60033", "0.6000083", "0.5957959", "0.5946031", "0.59365433", "0.5904115", "0.5899912", "0.5894649", "0.5894324", "0.588743", "0.58773875", "0.58773875", "0.58674604", "0.58637863", "0.5863377", "0.58505917", "0.5827777", "0.58230364", "0.5784618", "0.5784039", "0.5784039", "0.5774199", "0.57735145", "0.57640433", "0.57591707", "0.5755155", "0.57472825", "0.57419574", "0.5706514", "0.5683284", "0.5676301", "0.56422937", "0.56361246", "0.56346405", "0.5624237", "0.5596015", "0.5595139", "0.55917203", "0.55863804", "0.55838627", "0.557435", "0.55731106", "0.55494297", "0.5532916", "0.5507052", "0.5501782", "0.5486306", "0.54627967", "0.5451667", "0.54474205", "0.5434523", "0.5430921", "0.5430797", "0.5410826", "0.541054", "0.5408948", "0.5402073", "0.53999144", "0.53910285", "0.5378611", "0.537724", "0.536789", "0.53617084", "0.5354092", "0.5347146", "0.5341403", "0.5330787", "0.5328878", "0.5313753", "0.5311373", "0.53052974", "0.5304866", "0.5304631", "0.5303506", "0.53017014", "0.5298679", "0.5297397", "0.529585", "0.5292589", "0.52798384", "0.5279053", "0.52784485", "0.5273656", "0.5273438", "0.5273088", "0.5270024" ]
0.0
-1
JavaScript function for creating barchart
private String generateChart() { int passedTestCount = data.getNumberofTestPassed(); int skippedTestCount = data.getNumberofTestSkipped(); int failedTestCount = data.getNumberofTestFailed(); String script = "<script>var svg = d3.select('svg')," + "margin = {top: 30, right: 20, bottom: 20, left: 50}," + "width = +svg.attr('width') - margin.left - margin.right," + "height = +svg.attr('height') - margin.top - margin.bottom;" + "var x = d3.scaleBand().range([0, 450])," + "y = d3.scaleLinear().rangeRound([230, 0]);" + "var g = svg.append('g').attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');" + "var data = [{'name':'Pass','value':" + passedTestCount + "},{'name':'FaiL','value':" + failedTestCount + "},{'name':'Skip','value':" + skippedTestCount + "}];" + "var max = 0;" + "var index = 0;" + "for(index=0;index<data.length;index++) {" + "if(max<data[index]['value']) {" + "max = data[index]['value']; } }" + "max = max%2 ==0? max : max +1;" + "x.domain(data.map(function(d) { return d.name; }));" + "y.domain([0, max]);" + "g.append('g').attr('class', 'axis axis--x')" + ".attr('transform', 'translate(0,' + height + ')')" + ".call(d3.axisBottom(x)).attr('stroke', '#000000');" + "g.append('g').attr('class', 'axis axis--y')" + ".call(d3.axisLeft(y).ticks(3)).attr('stroke', '#000000')" + ".append('text').attr('transform', 'rotate(-90)').attr('y', 6)" + ".attr('dy', '0.71em').attr('text-anchor', 'end');" + "d3.selectAll('line').attr('stroke', '#000000');" + "d3.selectAll('path').attr('stroke', '#000000');" + "var temp=0;" + "g.selectAll('.bar').data(data).enter().append('rect').attr('class', 'bar')" + ".attr('x', function(d) {return x(d.name)+50; })" + ".attr('y', function(d) { return y(d.value); })" + ".attr('width', 50)" + ".attr('height', function(d) { return height - y(d.value); }).attr('fill','#ff9900')" + ".attr('data-name',function(d){return d.name})" + ".attr('data-value',function(d){return d.value}).attr('height', 0).transition().duration(1000).delay(200).attr('height', function (d, i) {return height - y(d.value);});;</script>"; return script; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initBarChart() {\n\t\tBarChart<String, Number> chartLinguagens = new BarChart<String, Number>(new CategoryAxis(), new NumberAxis());\n\t\t// define o espaçamento entre as barras.\n\t\tchartLinguagens.setCategoryGap(30);\n\t\t// inserindo o title do grafico\n\t\tchartLinguagens.setTitle(\"Ranking de Linguagens de Programação Mar/2013\");\n\t\t// seta nome e valor de cada linguagem apresentada no grafico\n\t\tXYChart.Data<String, Number> dataJava = new XYChart.Data<String, Number>(\"Java\", 18.156);\n\t\tXYChart.Data<String, Number> dataC = new XYChart.Data<String, Number>(\"C\", 17.141);\n\t\tXYChart.Data<String, Number> dataObjectiveC = new XYChart.Data<String, Number>(\"Objective-C\", 10.230);\n\t\tXYChart.Data<String, Number> dataCPlus = new XYChart.Data<String, Number>(\"C++\", 9.115);\n\t\tXYChart.Data<String, Number> dataCSharp = new XYChart.Data<String, Number>(\"C#\", 6.597);\n\t\tXYChart.Series<String, Number> seriesData = new XYChart.Series<String, Number>();\n\t\t// rodapé ???\n\t\tseriesData.setName(\"Porcentagem (%)\");\n\n\t\tseriesData.getData().addAll(dataJava, dataC, dataObjectiveC, dataCPlus, dataCSharp);\n\n\t\tchartLinguagens.getData().add(seriesData);\n\t\t/* Indicar o BarChart em um painel principal... */\n\t\tpane.getChildren().add(chartLinguagens);\n\t}", "public void generateBarChart(float[] act, float[] act1)\n {\n\n HorizontalBarChart barChart= (HorizontalBarChart) findViewById(R.id.chart);\n /*\n ArrayList<BarEntry> entries = new ArrayList<>();\n entries.add(new BarEntry(4f, 0));\n entries.add(new BarEntry(8f, 1));\n entries.add(new BarEntry(6f, 2));\n entries.add(new BarEntry(12f, 3));\n entries.add(new BarEntry(18f, 4));\n entries.add(new BarEntry(10f, 6));\n entries.add(new BarEntry(14f, 7));\n entries.add(new BarEntry(2f, 5));\n\n BarDataSet dataset1 = new BarDataSet(entries, \"# of Calls\");\n */\n\n ArrayList<String> labels = new ArrayList<String>();\n labels.add(\"Food\");\n labels.add(\"Cloth\");\n labels.add(\"Travelling\");\n labels.add(\"Stationary\");\n labels.add(\"Furniture\");\n labels.add(\"Medicine\");\n labels.add(\"Bill\");\n labels.add(\"Utensils\");\n\n\n /* for create Grouped Bar chart*/\n ArrayList<BarEntry> group1 = new ArrayList<>();\n group1.add(new BarEntry(act1[0], 0));\n group1.add(new BarEntry(act1[1], 1));\n group1.add(new BarEntry(act1[2], 2));\n group1.add(new BarEntry(act1[3], 3));\n group1.add(new BarEntry(act1[4], 4));\n group1.add(new BarEntry(act1[5], 5));\n group1.add(new BarEntry(act1[6], 6));\n group1.add(new BarEntry(act1[7], 7));\n\n ArrayList<BarEntry> group2 = new ArrayList<>();\n group2.add(new BarEntry(act[0], 0));\n group2.add(new BarEntry(act[1], 1));\n group2.add(new BarEntry(act[2], 2));\n group2.add(new BarEntry(act[3], 3));\n group2.add(new BarEntry(act[4], 4));\n group2.add(new BarEntry(act[5], 5));\n group2.add(new BarEntry(act[6], 6));\n group2.add(new BarEntry(act[7], 7));\n\n BarDataSet barDataSet1 = new BarDataSet(group1, \"Planned Amount\");\n //barDataSet1.setColor(Color.rgb(0, 155, 0));\n barDataSet1.setColor(getResources().getColor(R.color.darkgreen));\n\n BarDataSet barDataSet2 = new BarDataSet(group2, \"Actual Amount\");\n barDataSet2.setColor(getResources().getColor(R.color.purered));\n\n\n ArrayList<IBarDataSet> dataset = new ArrayList<>();\n dataset.add(barDataSet1);\n dataset.add(barDataSet2);\n /**/\n\n BarData data = new BarData(labels,dataset);\n// // dataset.setColors(ColorTemplate.COLORFUL_COLORS); //\n barChart.setData(data);\n barChart.animateY(5000);\n barChart.setDescription(\"Expense Graph\");\n barChart.setDescriptionPosition(2f, 2f);\n\n }", "public Parent createBarGraph(ObservableList<HappinessReport> data) {\n xAxis = new CategoryAxis();\n xAxis.setLabel(\"Country\");\n //Yaxis Creation\n yAxis = new NumberAxis();\n yAxis.setLabel(\"Score\");\n //Chart Creation\n barchart = new BarChart<>(xAxis, yAxis);\n barchart.setTitle(\"Horizontal Bar Chart Example\");\n //Country and Score Data load into chart\n for (int intx = 0; intx < data.size(); intx++) {\n XYChart.Series barChartSeries = new XYChart.Series<>();\n barChartSeries.getData().add(new XYChart.Data(String.valueOf(data.get(intx).getCountry()), data.get(intx).getScore()));\n barchart.getData().add(barChartSeries);\n }\n barchart.setTitle(\"Horizontal Bar Chart Example\");\n barchart.setLegendVisible(false);\n return barchart;\n }", "private BarData generateDataBar() {\n\n ArrayList<BarEntry> entries = new ArrayList<>();\n\n for (int i = 0; i < 12; i++) {\n entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));\n }\n\n BarDataSet d = new BarDataSet(entries, \"New DataSet 1\");\n // 设置相邻的柱状图之间的距离\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n // 设置高亮的透明度\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n return cd;\n }", "public void showBarChart() {\r\n\r\n // Count classes\r\n int neutralCountPred = 0;\r\n int negativeCountPred = 0;\r\n int positiveCountPred = 0;\r\n\r\n int neutralCountAnsw = 0;\r\n int negativeCountAnsw = 0;\r\n int positiveCountAnsw = 0;\r\n\r\n for(Integer pred : predictions.values()) {\r\n switch (pred.intValue()) {\r\n case 0:\r\n negativeCountPred++;\r\n break;\r\n case 1:\r\n neutralCountPred++;\r\n break;\r\n case 2:\r\n positiveCountPred++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"PREDICTED \\nnegativeCountPred = %d, neutralCountPred = %d, positiveCountPred = %d\", negativeCountPred,\r\n neutralCountPred, positiveCountPred);\r\n\r\n for(Integer answer : rightAnswers.values()) {\r\n switch (answer.intValue()) {\r\n case 0:\r\n negativeCountAnsw++;\r\n break;\r\n case 1:\r\n neutralCountAnsw++;\r\n break;\r\n case 2:\r\n positiveCountAnsw++;\r\n break;\r\n default:\r\n System.err.println(\"Illegal class index\");\r\n break;\r\n }\r\n }\r\n System.out.printf(\"\\nRIGHT ANSWERS \\nnegativeCountAnsw = %d, neutralCountAnsw = %d, positiveCountAnsw = %d\", negativeCountAnsw,\r\n neutralCountAnsw, positiveCountAnsw);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries1 = new XYChart.Series();\r\n dataSeries1.setName(\"Predicted\");\r\n dataSeries1.getData().add(new XYChart.Data(\"Neutral\", neutralCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Positive\", positiveCountPred));\r\n dataSeries1.getData().add(new XYChart.Data(\"Negative\", negativeCountPred));\r\n resultChart.getData().add(dataSeries1);\r\n\r\n // Predicted classes\r\n XYChart.Series<String, Number> dataSeries2 = new XYChart.Series();\r\n dataSeries2.setName(\"Right answers\");\r\n dataSeries2.getData().add(new XYChart.Data(\"Neutral\", neutralCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Positive\", positiveCountAnsw));\r\n dataSeries2.getData().add(new XYChart.Data(\"Negative\", negativeCountAnsw));\r\n resultChart.getData().add(dataSeries2);\r\n\r\n }", "private BarData generateDataBar() {\n String year = year_txt.getText().toString();\n String month1 =Utilities.getMonth(months,month_txt.getText().toString());\n ArrayList<BarEntry> entries = new ArrayList<>();\n ArrayList<TransactionBeans> transactionBeans = transactionDB.getTransactionRecordsMonth(month1,year);\n for (int i = 0; i < transactionBeans.size(); i++) {\n TransactionBeans beans = transactionBeans.get(i);\n entries.add(new BarEntry(i, (int) (Double.parseDouble(beans.getIncome()))));\n }\n\n BarDataSet d = new BarDataSet(entries, \"\");\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n cd.setDrawValues(false);\n return cd;\n }", "public static String exampleBarChart2() {\n final int MAX_MEDALS = 51;\n Data goldData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(MAX_MEDALS, 36, 23, 19, 16));\n Data silverData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(21, 38, 21, 13, 10));\n Data bronzeData= DataUtil.scaleWithinRange(0, MAX_MEDALS, Arrays.asList(28, 36, 28, 15, 15));\n BarChartPlot gold = Plots.newBarChartPlot(goldData, GOLD, \"Gold\");\n BarChartPlot silver = Plots.newBarChartPlot(silverData, SILVER, \"Silver\");\n BarChartPlot bronze = Plots.newBarChartPlot(bronzeData, Color.BROWN, \"Bronze\");\n BarChart chart = GCharts.newBarChart(gold, silver, bronze);\n\n // Defining axis info and styles\n AxisStyle axisStyle = AxisStyle.newAxisStyle(BLACK, 13, AxisTextAlignment.CENTER);\n AxisLabels country = AxisLabelsFactory.newAxisLabels(\"Country\", 50.0);\n country.setAxisStyle(axisStyle);\n AxisLabels countries = AxisLabelsFactory.newAxisLabels(\"Germany\", \"United Kingdom\", \"Russia\", \"USA\", \"China\");\n countries.setAxisStyle(axisStyle);\n AxisLabels medals = AxisLabelsFactory.newAxisLabels(\"Medals\", 50.0);\n medals.setAxisStyle(axisStyle);\n AxisLabels medalCount = AxisLabelsFactory.newNumericRangeAxisLabels(0, MAX_MEDALS);\n medalCount.setAxisStyle(axisStyle);\n\n\n // Adding axis info to chart.\n chart.addXAxisLabels(medalCount);\n chart.addXAxisLabels(medals);\n chart.addYAxisLabels(countries);\n chart.addYAxisLabels(country);\n chart.addTopAxisLabels(medalCount);\n chart.setHorizontal(true);\n chart.setSize(450, 650);\n chart.setSpaceBetweenGroupsOfBars(30);\n\n chart.setTitle(\"2008 Beijing Olympics Medal Count\", BLACK, 16);\n ///51 is the max number of medals.\n chart.setGrid((50.0/MAX_MEDALS)*20, 600, 3, 2);\n chart.setBackgroundFill(Fills.newSolidFill(LIGHTGREY));\n LinearGradientFill fill = Fills.newLinearGradientFill(0, Color.newColor(\"E37600\"), 100);\n fill.addColorAndOffset(Color.newColor(\"DC4800\"), 0);\n chart.setAreaFill(fill);\n String url = chart.toURLString();\n return url;\n }", "public static void main(String[] args) {\r\n\r\n // create a chart\r\n double[][] data = new double[][] {\r\n {56.0, -12.0, 34.0, 76.0, 56.0, 100.0, 67.0, 45.0},\r\n {37.0, 45.0, 67.0, 25.0, 34.0, 34.0, 100.0, 53.0},\r\n {43.0, 54.0, 34.0, 34.0, 87.0, 64.0, 73.0, 12.0}};\r\n CategoryDataset dataset = DatasetUtilities.createCategoryDataset(\r\n \"Series \", \"Type \", data);\r\n\r\n JFreeChart chart = null;\r\n boolean drilldown = true;\r\n\r\n if (drilldown) {\r\n CategoryAxis categoryAxis = new CategoryAxis(\"Category\");\r\n ValueAxis valueAxis = new NumberAxis(\"Value\");\r\n BarRenderer renderer = new BarRenderer();\r\n renderer.setBaseToolTipGenerator(\r\n new StandardCategoryToolTipGenerator());\r\n renderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator(\r\n \"bar_chart_detail.jsp\"));\r\n \r\n // add URLs to the series names in the legend...\r\n renderer.setLegendItemURLGenerator(new CategorySeriesLabelGenerator() \r\n {\r\n public String generateLabel(CategoryDataset dataset, int series) {\r\n return \"series.html?series=\" + (series + 1);\r\n }\r\n \r\n });\r\n \r\n // add tool tips to the series names in the legend...\r\n renderer.setLegendItemToolTipGenerator(new CategorySeriesLabelGenerator() \r\n {\r\n public String generateLabel(CategoryDataset dataset, int series) {\r\n return \"Tool tip for series \" + (series + 1);\r\n }\r\n \r\n });\r\n CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, \r\n valueAxis, renderer);\r\n plot.setOrientation(PlotOrientation.VERTICAL);\r\n chart = new JFreeChart(\"Bar Chart\", JFreeChart.DEFAULT_TITLE_FONT,\r\n plot, true);\r\n }\r\n else {\r\n chart = ChartFactory.createBarChart(\r\n \"Vertical Bar Chart\", // chart title\r\n \"Category\", // domain axis label\r\n \"Value\", // range axis label\r\n dataset, // data\r\n PlotOrientation.VERTICAL,\r\n true, // include legend\r\n true,\r\n false\r\n );\r\n }\r\n chart.setBackgroundPaint(java.awt.Color.white);\r\n \r\n // save it to an image\r\n try {\r\n ChartRenderingInfo info = new ChartRenderingInfo(\r\n new StandardEntityCollection());\r\n File file1 = new File(\"barchart100.png\");\r\n ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);\r\n\r\n // write an HTML page incorporating the image with an image map\r\n File file2 = new File(\"barchart100.html\");\r\n OutputStream out = new BufferedOutputStream(\r\n new FileOutputStream(file2));\r\n PrintWriter writer = new PrintWriter(out);\r\n writer.println(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\");\r\n writer.println(\"\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\");\r\n writer.println(\"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\">\");\r\n writer.println(\"<head><title>JFreeChart Image Map Demo</title></head>\");\r\n writer.println(\"<body><p>\");\r\n ImageMapUtilities.writeImageMap(writer, \"chart\", info);\r\n writer.println(\"<img src=\\\"barchart100.png\\\" \"\r\n + \"width=\\\"600\\\" height=\\\"400\\\" usemap=\\\"#chart\\\" alt=\\\"barchart100.png\\\"/>\");\r\n writer.println(\"</p></body>\");\r\n writer.println(\"</html>\");\r\n writer.close();\r\n\r\n }\r\n catch (IOException e) {\r\n System.out.println(e.toString());\r\n }\r\n\r\n }", "public static void barChart(String title, int[] arr) \n {\n CategoryChartBuilder builder = new CategoryChartBuilder();\n builder.width(800);\n builder.height(600);\n builder.title(\"Int array values\");\n builder.xAxisTitle(\"Index\");\n builder.yAxisTitle(\"Number\");\n\n // Add data and title to the chart\n CategoryChart chart = builder.build();\n chart.addSeries(title, null, arr);\n\n // display the chart:\n new SwingWrapper(chart).displayChart();\n }", "JFreeChart generateBox();", "private void createBarChart(FoodEmissions emissions, Context context) {\n ArrayList<BarEntry> barEntries = new ArrayList<>();\n ArrayList<String> labelNames = new ArrayList<>();\n labelNames.add(\"Meat\");\n labelNames.add(\"Dairy\");\n labelNames.add(\"Plant\");\n labelNames.add(\"Total\");\n barEntries.add(new BarEntry(0, Float.parseFloat(emissions.getMeat())));\n barEntries.add(new BarEntry(1, Float.parseFloat(emissions.getDairy())));\n barEntries.add(new BarEntry(2, Float.parseFloat(emissions.getPlant())));\n barEntries.add(new BarEntry(3, Float.parseFloat(emissions.getTotal())));\n LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n RelativeLayout relativeLayout = (RelativeLayout) li.inflate(R.layout.emission_chart_layout, null);\n BarChart chart = relativeLayout.findViewById(R.id.bar_chart);\n //Customization to the BarCharts look\n BarDataSet set = new BarDataSet(barEntries, \"CO2 Emissions (in Kg)\");\n set.setColors(ColorTemplate.COLORFUL_COLORS);\n set.setValueTextSize(20f);\n Description description = new Description();\n description.setText(\"\");\n chart.setDescription(description);\n BarData data = new BarData(set);\n chart.setData(data);\n Legend legend = chart.getLegend();\n legend.setTextSize(15f);\n XAxis xAxis = chart.getXAxis();\n xAxis.setValueFormatter(new IndexAxisValueFormatter(labelNames));\n xAxis.setPosition(XAxis.XAxisPosition.TOP);\n xAxis.setDrawGridLines(false);\n xAxis.setGranularity(1f);\n xAxis.setLabelCount(labelNames.size());\n AlertDialog builder = new AlertDialog.Builder(context)\n .setNegativeButton(\"Close\", null)\n .setView(relativeLayout)\n .setCancelable(false)\n .create();\n builder.show();\n }", "private BarData generateBarData() {\n ArrayList<BarEntry> entries2 = new ArrayList<BarEntry>();\n\n /*\n for (int index = 0; index < itemcount; index++) {\n entries1.add(new BarEntry(0, 25));\n\n // stacked\n entries2.add(new BarEntry(0, new float[]{13, 13}));\n }*/\n entries2.add(new BarEntry(0, 3f));\n\n\n// BarDataSet set1 = new BarDataSet(entries1, \"Bar 1\");\n// set1.setColor(Color.rgb(60, 220, 78));\n// set1.setValueTextColor(Color.rgb(60, 220, 78));\n// set1.setValueTextSize(10f);\n// set1.setAxisDependency(YAxis.AxisDependency.LEFT);\n\n BarDataSet set2 = new BarDataSet(entries2, \"\");\n// set2.setStackLabels(new String[]{\"Stack 1\", \"Stack 2\"});\n// set2.setColors(new int[]{Color.rgb(61, 165, 255), Color.rgb(23, 197, 255)});\n set2.setColor(getResources().getColor(R.color.chart_red));\n set2.setValueTextColor(Color.rgb(61, 165, 255));\n\n set2.setValueTextSize(10f);\n set2.setHighlightEnabled(false);\n\n set2.setAxisDependency(YAxis.AxisDependency.LEFT);\n\n float barWidth = (hoursArray.size() + 1) * 2f; // x2 dataset\n // (0.45 + 0.02) * 2 + 0.06 = 1.00 -> interval per \"group\"\n\n BarData d = new BarData(set2);\n d.setBarWidth(barWidth);\n d.setValueTextSize(0f);\n\n // make this BarData object grouped\n// d.groupBars(0, groupSpace, barSpace); // start at x = 0\n\n return d;\n }", "public void chart() {\r\n setLayout(new FlowLayout());\r\n String[] testNumbers = {\"LINEAR SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"};\r\n Object[][] testResult = {{\"500\", lin[0][0], lin[0][1], lin[0][2], lin[0][3], lin[0][4], lin[0][5], lin[0][6], lin[0][7], lin[0][8], lin[0][0], linAvAndDev[0][0], linAvAndDev[0][1]},\r\n {\"10,000\", lin[1][0], lin[1][1], lin[1][2], lin[1][3], lin[1][4], lin[1][5], lin[1][6], lin[1][7], lin[1][8], lin[1][9], linAvAndDev[1][0], linAvAndDev[1][1]},\r\n {\"100,000\", lin[2][0], lin[2][1], lin[2][2], lin[2][3], lin[2][4], lin[2][5], lin[2][6], lin[2][7], lin[2][8], lin[2][9], linAvAndDev[2][0], linAvAndDev[2][1]},\r\n {\"1,000,000\", lin[3][0], lin[3][1], lin[3][2], lin[3][3], lin[3][4], lin[3][5], lin[3][6], lin[3][7], lin[3][8], lin[3][9], linAvAndDev[3][0], linAvAndDev[3][1]},\r\n {\"5,000,000\", lin[4][0], lin[4][1], lin[4][2], lin[4][3], lin[4][4], lin[4][5], lin[4][6], lin[4][7], lin[4][8], lin[4][9], linAvAndDev[4][0], linAvAndDev[4][1]},\r\n {\"7,000,000\", lin[5][0], lin[5][1], lin[5][2], lin[5][3], lin[5][4], lin[5][5], lin[5][6], lin[5][7], lin[5][8], lin[5][9], linAvAndDev[5][0], linAvAndDev[5][1]},\r\n {\"10,000,000\", lin[6][0], lin[6][1], lin[6][2], lin[6][3], lin[6][4], lin[6][5], lin[6][6], lin[6][7], lin[6][8], lin[6][9], linAvAndDev[6][0], linAvAndDev[6][1]},\r\n {\"BINARY SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"},\r\n {\"500\", bin[0][0], bin[0][1], bin[0][2], bin[0][3], bin[0][4], bin[0][5], bin[0][6], bin[0][7], bin[0][8], bin[0][9], linAvAndDev[7][0], linAvAndDev[7][1]},\r\n {\"10,000\", bin[1][0], bin[1][1], bin[1][2], bin[1][3], bin[1][4], bin[1][5], bin[1][6], bin[1][7], bin[1][8], bin[1][9], linAvAndDev[8][0], linAvAndDev[8][1]},\r\n {\"100,000\", bin[2][0], bin[2][1], bin[2][2], bin[2][3], bin[2][4], bin[2][5], bin[2][6], bin[2][7], bin[2][8], bin[2][9], linAvAndDev[9][0], linAvAndDev[9][1]},\r\n {\"1,000,000\", bin[3][0], bin[3][1], bin[3][2], bin[3][3], bin[3][4], bin[3][5], bin[3][6], bin[3][7], bin[3][8], bin[3][9], linAvAndDev[10][0], linAvAndDev[10][1]},\r\n {\"5,000,000\", bin[4][0], bin[4][1], bin[4][2], bin[4][3], bin[4][4], bin[4][5], bin[4][6], bin[4][7], bin[4][8], bin[4][9], linAvAndDev[11][0], linAvAndDev[11][1]},\r\n {\"7,000,000\", bin[5][0], bin[5][1], bin[5][2], bin[5][3], bin[5][4], bin[5][5], bin[5][6], bin[5][7], bin[5][8], bin[5][9], linAvAndDev[12][0], linAvAndDev[12][1]},\r\n {\"10,000,000\", bin[6][0], bin[6][1], bin[6][2], bin[6][3], bin[6][4], bin[6][5], bin[6][6], bin[6][7], bin[6][8], bin[6][9], linAvAndDev[13][0], linAvAndDev[13][1]}};\r\n chart = new JTable(testResult, testNumbers);\r\n chart.setPreferredScrollableViewportSize(new Dimension(1500, 500)); // SETS SIZE OF CHART.\r\n chart.setFillsViewportHeight(true);\r\n JScrollPane scrollPane = new JScrollPane(chart);\r\n add(scrollPane);\r\n }", "private void showBars() {\n graph.removeAllSeries();\n Log.d(\"ShowGraph \", \"started\");\n Log.d(\"Tuples length \", tuples.size() + \"\");\n ArrayList<Double> vkupno = new ArrayList<Double>();\n //vo vkupno, sekoj element, e vkupnata vrednost za nutrientot pod toj broj\n int brNutrienti = values.size();\n Log.d(\"Values length\", brNutrienti + \"\");\n for (int i = 0; i < brNutrienti; i++) {\n vkupno.add(i, 0.0);\n }\n Iterator<String> it = values.iterator();\n String currentNutrient = null;\n double dodadi = 0;\n for (int j = 0; j < brNutrienti; j++) {\n currentNutrient = it.next();\n for (int i = 0; i < tuples.size(); i++) {\n Tuple currentTuple = tuples.get(i);\n if (currentNutrient.equals(\"Protein\")) {\n dodadi = (currentTuple.getProtein()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Total lipid (fat)\")) {\n dodadi = (currentTuple.getLipid()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Carbohydrate\")) {\n dodadi = (currentTuple.getCarbohydrate()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Glucose\")) {\n dodadi = (currentTuple.getGlucose()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Calcium\")) {\n dodadi = (currentTuple.getCalcium()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Iron\")) {\n dodadi = (currentTuple.getIron()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Magnesium\")) {\n dodadi = (currentTuple.getMagnesium()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Zinc\")) {\n dodadi = (currentTuple.getZinc()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin C\")) {\n dodadi = (currentTuple.getVitaminC()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Thiamin\")) {\n dodadi = (currentTuple.getThiamin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Riboflavin\")) {\n dodadi = (currentTuple.getRibofavin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Niacin\")) {\n dodadi = (currentTuple.getNiacin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin B6\")) {\n dodadi = (currentTuple.getVitaminB6()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin B12\")) {\n dodadi = (currentTuple.getVitaminB12()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"VitaminA\")) {\n dodadi = (currentTuple.getVitaminA()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin D\")) {\n dodadi = (currentTuple.getVitaminD()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin E\")) {\n dodadi = (currentTuple.getVitaminE()) * currentTuple.getQuantity() / 100;\n }\n dodadi = dodadi + vkupno.get(j);\n vkupno.set(j, dodadi);\n dodadi = 0;\n }\n }\n Log.d(\"Posle polenje na vkupno\", \"sfsfsdf\");\n //posle ova vo vkupno se sodrzhat y vrednostite za grafikot\n DataPoint[] dpArray = new DataPoint[vkupno.size()];\n for (int i = 0; i < vkupno.size(); i++) {\n dpArray[i] = new DataPoint(i + 1, vkupno.get(i));\n intake.add(vkupno.get(i));\n Log.d(\"y(\" + i + \")=\", vkupno.get(i) + \"\");\n }\n BarGraphSeries<DataPoint> series = new BarGraphSeries<DataPoint>(dpArray);\n graph.addSeries(series);\n // styling\n series.setValueDependentColor(new ValueDependentColor<DataPoint>() {\n @Override\n public int get(DataPoint data) {\n return Color.rgb((int) data.getX() * 255 / 4, (int) Math.abs(data.getY() * 255 / 6), 100);\n }\n });\n series.setSpacing(1);\n series.setDataWidth(0.2);\n // draw values on top\n series.setDrawValuesOnTop(true);\n series.setValuesOnTopColor(Color.BLACK);\n /* StaticLabelsFormatter staticLabelsFormatter = new StaticLabelsFormatter(graph);\n staticLabelsFormatter.setHorizontalLabels(new String[] {\"CH\", \"F\", \"Pr\",\"Mi\"});\n graph.getGridLabelRenderer().setLabelFormatter(staticLabelsFormatter);\n */\n //graph.getLegendRenderer().setVisible(true);\n graph.getLegendRenderer().setAlign(LegendRenderer.LegendAlign.TOP);\n }", "private static JFreeChart createChart(CategoryDataset dataset) {\n\t\t//the title of the chart depending of the attributes chosen by the user\n\t\tif (queryNumber==0) {domainLabel=\"Per day\";}\n\t\telse if (queryNumber==1) {domainLabel=\"Per hour\";}\n\t\telse if (queryNumber==2) {domainLabel=\"Per minute\";}\n\t\t\n\t\t// setting the title \n\t\tString rangeLabel=\"Average (ms)\";\n\t\t// create the chart...\n\t\tJFreeChart chart = ChartFactory.createBarChart(\n\t\t\t\t\"Static\", // chart title\n\t\t\t\tdomainLabel, // domain axis label\n\t\t\t\trangeLabel, // range axis label\n\t\t\t\tdataset, // data\n\t\t\t\tPlotOrientation.VERTICAL, // orientation\n\t\t\t\tfalse, // include legend\n\t\t\t\ttrue, // tooltips\n\t\t\t\tfalse // URLs\n\t\t\t\t);\n\t\t\n\t\t//setting the title preferences and format\n\t\tchart.getTitle().setFont(fontStatic);\n\t\tchart.getTitle().setPaint(Color.red);\n\t\tchart.setBackgroundPaint(Color.white);\n\t\tCategoryPlot plot = chart.getCategoryPlot();\n\t\tplot.setBackgroundPaint(Color.lightGray);\n\t\tplot.setDomainGridlinePaint(Color.white);\n\t\tplot.setDomainGridlinesVisible(true);\n\t\tplot.setRangeGridlinePaint(Color.white);\n\t\tfinal NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n\t\tchart.getCategoryPlot().getRangeAxis().setLabelPaint(Color.RED);\n\t\tchart.getCategoryPlot().getDomainAxis().setLabelPaint(Color.RED);\n\t\trangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\t\tBarRenderer renderer = (BarRenderer) plot.getRenderer();\n\t\trenderer.setDrawBarOutline(false);\n\t\tfor (int i =0;i<25;i++) renderer.setSeriesPaint(i, Color.BLUE);\n\t\treturn chart;\n\t}", "@Override\n\tprotected final JFreeChart createChart() {\n\t\tJFreeChart jFreeChart=null;\n\t\tIntervalXYDataset dataset=createDataset();\n\t\t\n\t\tjFreeChart=ChartFactory.createXYBarChart(title,xalabel, dateAxis, yalabel,dataset, por, legend, tooltips, urls);\n\t\t\n\t\tXYPlot plot=(XYPlot)jFreeChart.getPlot();\n\t\tpreRender(plot);\n\t\treturn jFreeChart; \n\t}", "private BarData getBarData(ArrayList<Column> columns, String Label){\n\n ArrayList<BarEntry> valueSet = new ArrayList<>();\n\n for(int i = 0; i < columns.size(); i++){\n valueSet.add(new BarEntry(i, columns.get(i).getColVal()));\n }\n\n BarDataSet barDataSet = new BarDataSet(valueSet, Label);\n barDataSet.setColors(ColorTemplate.COLORFUL_COLORS);\n barDataSet.setValueFormatter(new IValueFormatter() {\n @Override\n public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {\n if (value == 0f)\n return \"\";\n return String.valueOf((int)value);\n }\n });\n\n\n return new BarData(barDataSet);\n }", "public static String exampleBarChart() {\n BarChartPlot team1 = Plots.newBarChartPlot(Data.newData(25, 43, 12, 30), Color.BLUEVIOLET, \"Team A\");\n BarChartPlot team2 = Plots.newBarChartPlot(Data.newData(8, 35, 11, 5), Color.ORANGERED, \"Team B\");\n BarChartPlot team3 = Plots.newBarChartPlot(Data.newData(10, 20, 30, 30), Color.LIMEGREEN, \"Team C\");\n\n // Instantiating chart.\n BarChart chart = GCharts.newBarChart(team1, team2, team3);\n\n // Defining axis info and styles\n AxisStyle axisStyle = AxisStyle.newAxisStyle(Color.BLACK, 13, AxisTextAlignment.CENTER);\n AxisLabels score = AxisLabelsFactory.newAxisLabels(\"Score\", 50.0);\n score.setAxisStyle(axisStyle);\n AxisLabels year = AxisLabelsFactory.newAxisLabels(\"Year\", 50.0);\n year.setAxisStyle(axisStyle);\n\n // Adding axis info to chart.\n chart.addXAxisLabels(AxisLabelsFactory.newAxisLabels(\"2002\", \"2003\", \"2004\", \"2005\"));\n chart.addYAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, 100));\n chart.addYAxisLabels(score);\n chart.addXAxisLabels(year);\n\n chart.setSize(600, 450);\n chart.setBarWidth(100);\n chart.setSpaceWithinGroupsOfBars(20);\n chart.setDataStacked(true);\n chart.setTitle(\"Team Scores\", Color.BLACK, 16);\n chart.setGrid(100, 10, 3, 2);\n chart.setBackgroundFill(Fills.newSolidFill(Color.ALICEBLUE));\n LinearGradientFill fill = Fills.newLinearGradientFill(0, Color.LAVENDER, 100);\n fill.addColorAndOffset(Color.WHITE, 0);\n chart.setAreaFill(fill);\n String url = chart.toURLString();\n return url;\n }", "public void generateChart(){\n String[][] contents = retrieveFields();\n\n// String msg = \"test - \";\n// printCells(contents);\n\n String[] houseDisplay = new String[12];\n houseDisplay = new String[]{\"6\",\"4\",\"2\",\"1\",\"4\",\"6\",\"3\",\"5\",\"7/8\",\"\",\"5\",\"3\"};\n display(houseDisplay);\n }", "public void getRegionalDistrictData(final String mRegion,final String mWeek){\n mSTKCStockOutBarRegional = new STKCStockOutBarRegional() {\n @Override\n protected void onPostExecute(String results) {\n //dialog.dismiss();\n if (!results.equalsIgnoreCase(\"error\")) {\n try {\n JSONObject obj = new JSONObject(results);\n if(obj.getString(\"status\").equalsIgnoreCase(\"ok\")) {\n\n Log.e(\"District GraphData\", \"\"+results);\n\n JSONArray res = obj.getJSONArray(\"results\");\n\n String[] drugs = new String[res.length()];\n\n for(int i= 0; i< res.length();i++){\n JSONArray array = res.getJSONArray(i);\n barEntries.add(new BarEntry(i+1, (float) array.getDouble(2)));\n barEntries1.add(new BarEntry(i+1, (float) array.getDouble(1)));\n drugs[i] = array.getString(3);\n }\n // [\"UcOzqLVFJVo\",0,0,\"Kyotera District\"]\n\n BarDataSet barDataSet = new BarDataSet(barEntries,\"Stockouts\");\n barDataSet.setColor(Color.parseColor(\"#7CB5EC\"));\n Collections.sort(barEntries, new EntryXComparator());\n BarDataSet barDataSet1 = new BarDataSet(barEntries1,\"Clients at risk(*100) -Paediatrics\");\n barDataSet1.setColors(Color.parseColor(\"#000000\"));\n Collections.sort(barEntries1, new EntryXComparator());\n\n\n BarData data = new BarData(barDataSet,barDataSet1);\n barChart.setData(data);\n\n barProg.setVisibility(View.GONE);\n\n XAxis xAxisB = barChart.getXAxis();\n xAxisB.setValueFormatter(new IndexAxisValueFormatter(drugs));\n barChart.getAxisLeft().setAxisMinimum(0);\n xAxisB.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxisB.setGranularity(1);\n xAxisB.setLabelRotationAngle(45);\n xAxisB.setCenterAxisLabels(true);\n xAxisB.setGranularityEnabled(true);\n\n barChart.setFitBars(true);\n\n float barSpace = 0.01f;\n float groupSpace = 0.1f;\n int groupCount = 12;\n\n //IMPORTANT *****\n data.setBarWidth(0.15f);\n barChart.getXAxis().setAxisMinimum(0);\n barChart.getXAxis().setAxisMaximum(0 + barChart.getBarData().getGroupWidth(groupSpace, barSpace) * groupCount);\n barChart.groupBars(0, groupSpace, barSpace); // perform the \"explicit\" grouping\n //***** IMPORTANT\n\n Log.e(\"here GraphData 2\", \"\"+res.length());\n\n\n\n }else{\n Toast.makeText(getActivity(), \"message failed!\", Toast.LENGTH_SHORT).show();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n } catch (JSONException localJSONException) {\n Log.e(\"gettingjson\", localJSONException.toString());\n localJSONException.printStackTrace();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n }\n }\n @Override\n protected void onPreExecute()\n {\n //dialog = ProgressDialog.show(getActivity(), \"\", \"Loading Data...\", true);\n //dialog.setCancelable(true);\n }\n\n };\n mSTKCStockOutBarRegional.execute(mRegion, mWeek);\n\n }", "private void createchart() {\n int successcount = 0;\n int failedcount = 0;\n \n DefaultPieDataset barchartdata = new DefaultPieDataset();\n \n if(system == null && enterprise == null){\n for(Enterprise ent: network.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n else if(network == null && enterprise == null){\n for(Network net: system.getNetworkList()){\n for(Enterprise ent: net.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n }\n else{\n for(WorkRequest request: enterprise.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n \n barchartdata.setValue( \"Successful Trials\",new Double(successcount));\n barchartdata.setValue(\"Failed trials\",new Double(failedcount));\n\n JFreeChart pieChart = ChartFactory.createPieChart(\"Successful versus failed trials\",barchartdata, false, true, false);\n final PiePlot plot=(PiePlot) pieChart.getPlot();\n ChartPanel barPanel = new ChartPanel(pieChart);\n\n dashboardpanel.removeAll();\n dashboardpanel.setLayout(new java.awt.BorderLayout());\n dashboardpanel.add(barPanel, BorderLayout.CENTER);\n dashboardpanel.validate();\n \n }", "private void nastavGraf() {\n barChart = (BarChart) findViewById(R.id.bargraph);\n\n ArrayList<BarEntry> barEntries = new ArrayList<>();\n ArrayList<String> theDates = new ArrayList<>();\n\n // ziskame zaznamy z tabuľky Steps a naplnime graf\n List<HashMap<String, String>> zoznam = mDatabaseHelper.getSteps();\n HashMap<String, String> mapa = new HashMap<>();\n for (int i = 0; i < zoznam.size(); i++) {\n if (i == 3) break;\n mapa = zoznam.get(i);\n theDates.add(mapa.get(\"datum\"));\n barEntries.add(new BarEntry(Float.parseFloat(mapa.get(\"kroky\")), i));\n }\n\n BarDataSet barDataSet = new BarDataSet(barEntries, \"Steps\");\n int redColorValue = Color.parseColor(\"#ff1744\");\n barDataSet.setColor(redColorValue);\n BarData theData = new BarData(theDates, barDataSet);\n\n barChart.setData(theData);\n barChart.getLegend().setEnabled(false);\n barChart.setDescription(null);\n }", "private JFreeChart getBarChart()\n {\n loadData();\n \n // Create the vertical bar chart\n final JFreeChart chart = ChartFactory.createBarChart(getTitle(), \"\", \"\", getCategoryDataset(),\n PlotOrientation.HORIZONTAL, false, true, false);\n final CategoryPlot categoryplot = (CategoryPlot) chart.getPlot();\n categoryplot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);\n categoryplot.setRangePannable(true);\n categoryplot.setNoDataMessage(\"No data available\");\n \n final BarRenderer barrenderer = (BarRenderer) categoryplot.getRenderer();\n barrenderer.setItemLabelAnchorOffset(9D);\n barrenderer.setBaseItemLabelsVisible(true);\n barrenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());\n // barrenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator(\"{1} = {2}\", new DecimalFormat(\"0\")));\n final CategoryAxis categoryaxis = categoryplot.getDomainAxis();\n categoryaxis.setCategoryMargin(0.25D);\n \n categoryaxis.setUpperMargin(0.02D);\n categoryaxis.setLowerMargin(0.02D);\n final NumberAxis numberaxis = (NumberAxis) categoryplot.getRangeAxis();\n numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n numberaxis.setUpperMargin(0.10000000000000001D);\n ChartUtilities.applyCurrentTheme(chart);\n \n// if (useLegend())\n// {\n// // pieplot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator(\"{0} ({1})\"));\n// chart.getLegend().setPosition(RectangleEdge.RIGHT);\n// // pieplot.setLegendLabelToolTipGenerator(new StandardPieSectionLabelGenerator(\"{0}: {2}%\"));\n// }\n \n return chart;\n }", "public SketchBarChart() {\n super(\"bar_sketch\");\n }", "public void goToBarChart(ActionEvent event) throws SQLException {\n\t\tconn = MySqlConnection.ConnectDb();\n\n\t\tCategoryAxis xAxis = new CategoryAxis();\n\t\txAxis.setLabel(\"Category\");\n\t\tNumberAxis yAxis = new NumberAxis();\n\t\tyAxis.setLabel(\"Amount\");\n\n\t\tBarChart<String, Number> barChart = new BarChart<String, Number>(xAxis, yAxis);\n\n\t\tXYChart.Series<String, Number> xyChart = new XYChart.Series<String, Number>();\n\t\t\n\t\tString sql = \"select category, amount from Account order by amount asc\";\n\t\tps = conn.prepareStatement(sql);\n\t\trs = ps.executeQuery();\n\n\t for(Account acc: lists) {\n\t xyChart.getData().add(new XYChart.Data<String, Number>(acc.getCategory(), acc.getAmount()));\n\t }\n\n\t\tbarChart.getData().add(xyChart);\n\t\tbarChart.setLegendVisible(false);\n\n\t\tScene scene = new Scene(barChart, 500, 500);\n\t\tStage stage = new Stage();\n\t\tstage.setScene(scene);\n\t\tstage.show();\n\t}", "private void setupBarChart() {\n mBarChart.setOnChartValueSelectedListener(this);\n mBarChart.getDescription().setEnabled(false);\n mBarChart.setDrawBorders(true);\n mBarChart.setBorderWidth(1.f);\n mBarChart.setBorderColor(Color.parseColor(\"#616161\"));\n mBarChart.setPinchZoom(true);\n mBarChart.setDrawBarShadow(false);\n mBarChart.setDrawGridBackground(false);\n mBarChart.setTouchEnabled(true);\n mBarChart.setDoubleTapToZoomEnabled(false);\n\n Legend l = mBarChart.getLegend();\n l.setVerticalAlignment(Legend.LegendVerticalAlignment.TOP);\n l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.RIGHT);\n l.setOrientation(Legend.LegendOrientation.VERTICAL);\n l.setDrawInside(true);\n l.setYOffset(0f);\n l.setXOffset(10f);\n l.setYEntrySpace(0f);\n l.setTextSize(8f);\n\n// List<String> list = new ArrayList<String>();\n// for(Report report: mReportList){\n// list.add(report.monthYear);\n// }\n// final String[] stringMonthYear = list.toArray(new String[0]);\n\n XAxis xAxis = mBarChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setPosition(XAxis.XAxisPosition.TOP);\n xAxis.setCenterAxisLabels(true);\n xAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n int n = (int) value;\n switch (n) {\n case 0:\n if(mReportList.size()<1){\n break;\n }\n return mReportList.get(0).monthYear;\n case 1:\n if(mReportList.size()<2){\n break;\n }\n return mReportList.get(1).monthYear;\n case 2:\n if(mReportList.size()<3){\n break;\n }\n return mReportList.get(2).monthYear;\n case 3:\n if(mReportList.size()<4){\n break;\n }\n return mReportList.get(3).monthYear;\n }\n if (n < 0) {\n return \"Tháng\";\n } else{\n return \"Tháng\";\n }\n }\n });\n\n YAxis leftAxis = mBarChart.getAxisLeft();\n leftAxis.setValueFormatter(new LargeValueFormatter());\n leftAxis.setDrawGridLines(false);\n leftAxis.setSpaceTop(35f);\n leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n\n mBarChart.getAxisRight().setEnabled(false);\n\n float groupSpace = 0.04f;\n float barSpace = 0.03f; // x2 dataset\n float barWidth = 0.45f; // x2 dataset\n // (0.45 + 0.03) * 2 + 0.04 = 1.00 -> interval per \"group\"\n\n int startMonth = 0;\n\n ArrayList<BarEntry> yValsThu = new ArrayList<BarEntry>();\n ArrayList<BarEntry> yValsChi = new ArrayList<BarEntry>();\n\n int i = 0;\n for (Report report : mReportList) {\n yValsThu.add(new BarEntry(i, (float) report.incomeTotal));\n yValsChi.add(new BarEntry(i, (float) report.expenseTotal));\n i++;\n }\n\n BarDataSet setThu, setChi;\n\n if (mBarChart.getData() != null && mBarChart.getData().getDataSetCount() > 0) {\n\n setThu = (BarDataSet) mBarChart.getData().getDataSetByIndex(0);\n setChi = (BarDataSet) mBarChart.getData().getDataSetByIndex(1);\n setThu.setValues(yValsThu);\n setChi.setValues(yValsChi);\n mBarChart.getData().notifyDataChanged();\n mBarChart.notifyDataSetChanged();\n\n } else {\n // create 4 DataSets\n setThu = new BarDataSet(yValsThu, \"Thu\");\n setThu.setColor(Color.parseColor(\"#64dd17\"));\n setChi = new BarDataSet(yValsChi, \"Chi\");\n setChi.setColor(Color.parseColor(\"#2196f3\"));\n\n BarData data = new BarData(setThu, setChi);\n data.setValueFormatter(new LargeValueFormatter());\n\n mBarChart.setData(data);\n }\n\n // specify the width each bar should have\n mBarChart.getBarData().setBarWidth(barWidth);\n\n // restrict the x-axis range\n mBarChart.getXAxis().setAxisMinimum(startMonth);\n\n // barData.getGroupWith(...) is a helper that calculates the width each group needs based on the provided parameters\n mBarChart.getXAxis().setAxisMaximum(startMonth + mBarChart.getBarData().getGroupWidth(groupSpace, barSpace) * mReportList.size());\n mBarChart.groupBars(startMonth, groupSpace, barSpace);\n for (IBarDataSet set : mBarChart.getData().getDataSets()) {\n ((BarDataSet) set).setBarBorderWidth(1.f);\n ((BarDataSet) set).setBarBorderColor(Color.parseColor(\"#616161\"));\n }\n mBarChart.invalidate();\n mBarChart.animateY(800);\n\n //[END Setup Bar Char]\n }", "public static void graph(){\n\t\t double[][] valuepairs = new double[2][];\n\t\t valuepairs[0] = mutTotal; //x values\n\t\t valuepairs[1] = frequency; //y values\n\t\t DefaultXYDataset set = new DefaultXYDataset();\n\t\t set.addSeries(\"Occurances\",valuepairs); \n\t\t XYBarDataset barset = new XYBarDataset(set, .8);\n\t\t JFreeChart chart = ChartFactory.createXYBarChart(\n\t\t \"Mutation Analysis\",\"Number of Mutations\",false,\"Frequency\",\n\t\t barset,PlotOrientation.VERTICAL,true, true, false);\n\t\t JFrame frame = new JFrame(\"Mutation Analysis\");\n\t\t frame.setContentPane(new ChartPanel(chart));\n\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t frame.pack();\n\t\t frame.setVisible(true);\n\t\t }", "public void generateBar(String path,List<Object[]> list) {\r\n\t\t\r\n\t\t//create DataSet using list\r\n\t\tDefaultCategoryDataset dataset=new DefaultCategoryDataset();\r\n\t\tfor(Object[] ob : list) {\r\n\t\t//order value, key label text\r\n\t\tdataset.setValue(new Double(ob[1].toString()), ob[0].toString(), \"UomType Details\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//2.convert to JFreeChart using chartFactory\r\n\t\tJFreeChart chart=ChartFactory.createBarChart(\"UomType\", \"uomTypes\", \"count\", dataset);\r\n\t\t\r\n\t\t//3.save as Image using charts\r\n\t\ttry {\r\n\t\t\tChartUtils.saveChartAsJPEG(new File(path+\"/resources/images/UomTypetBar.jpg\"), chart, 300, 300);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private BarData generateDataBar(int cnt) {\n\n ArrayList<BarEntry> entries = new ArrayList<BarEntry>();\n\n for (int i = 0; i < 12; i++) {\n entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));\n }\n\n BarDataSet d = new BarDataSet(entries, \"New DataSet \" + cnt);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n return cd;\n }", "public static JFreeChart createBarChart (String xAxisTitle,\n String yAxisTitle,\n CategoryDataset ds)\n {\n JFreeChart chart = ChartFactory.createBarChart (null,\n xAxisTitle,\n yAxisTitle,\n ds,\n PlotOrientation.VERTICAL,\n true,\n true,\n true);\n\n chart.setBackgroundPaint(Color.white);\n\n // get a reference to the plot for further customisation...\n final CategoryPlot plot = chart.getCategoryPlot();\n plot.setBackgroundPaint (UIUtils.getComponentColor ());\n plot.setDomainGridlinePaint (UIUtils.getBorderColor ());\n plot.setRangeGridlinePaint (UIUtils.getBorderColor ());\n /*\n plot.setAxisOffset (new RectangleInsets (5D,\n 5D,\n 5D,\n 5D));\n*/\n plot.setDomainCrosshairVisible (true);\n plot.setRangeCrosshairVisible (true);\n plot.setDomainGridlinePaint (UIUtils.getColor (\"#cfcfcf\"));\n plot.setRangeGridlinePaint (UIUtils.getColor (\"#cfcfcf\"));\n\n // set the range axis to display integers only...\n final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n rangeAxis.setNumberFormatOverride (Environment.getNumberFormatter ());\n\n // disable bar outlines...\n final BarRenderer renderer = (BarRenderer) plot.getRenderer();\n renderer.setDrawBarOutline(false);\n renderer.setItemMargin (0);\n /*\n // set up gradient paints for series...\n final GradientPaint gp0 = new GradientPaint(\n 0.0f, 0.0f, Color.blue,\n 0.0f, 0.0f, Color.lightGray\n );\n final GradientPaint gp1 = new GradientPaint(\n 0.0f, 0.0f, Color.green,\n 0.0f, 0.0f, Color.lightGray\n );\n final GradientPaint gp2 = new GradientPaint(\n 0.0f, 0.0f, Color.red,\n 0.0f, 0.0f, Color.lightGray\n );\n renderer.setSeriesPaint(0, gp0);\n renderer.setSeriesPaint(1, gp1);\n renderer.setSeriesPaint(2, gp2);\n*/\n final CategoryAxis domainAxis = plot.getDomainAxis();\n domainAxis.setCategoryLabelPositions(\n CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / -0.6)\n );\n\n return chart;\n\n }", "void setupBars() {\n\n // ID, Horiz, Left\n bars.add(new LedBar(0, false, true));\n bars.add(new LedBar(1, true, true));\n bars.add(new LedBar(2, false, false));\n bars.add(new LedBar(3, false, true));\n bars.add(new LedBar(4, true, true));\n bars.add(new LedBar(5, true, false));\n bars.add(new LedBar(6, true, false));\n bars.add(new LedBar(7, true, false));\n bars.add(new LedBar(8, true, false));\n bars.add(new LedBar(9, true, true));\n bars.add(new LedBar(10, false, true));\n bars.add(new LedBar(11, false, false));\n bars.add(new LedBar(12, true, true));\n bars.add(new LedBar(13, false, false));\n bars.add(new LedBar(14, false, true));\n\n // hnext, hprev, vbro\n bars.get(0).setLinks(null, null, bars.get(4));\n bars.get(1).setLinks(bars.get(4), bars.get(8), bars.get(3));\n bars.get(2).setLinks(null, null, bars.get(5));\n bars.get(3).setLinks(null, null, bars.get(1));\n bars.get(4).setLinks(bars.get(9), bars.get(1), bars.get(0));\n bars.get(5).setLinks(bars.get(6), bars.get(12), bars.get(2));\n bars.get(6).setLinks(bars.get(7), bars.get(5), bars.get(11));\n bars.get(7).setLinks(bars.get(8), bars.get(6), bars.get(13));\n bars.get(8).setLinks(bars.get(1), bars.get(7), null); //Only one that hasn't got a vertical 'brother'\n bars.get(9).setLinks(bars.get(12), bars.get(4), bars.get(14));\n bars.get(10).setLinks(null, null, bars.get(12));\n bars.get(11).setLinks(null, null, bars.get(6));\n bars.get(12).setLinks(bars.get(5), bars.get(9), bars.get(10));\n bars.get(13).setLinks(null, null, bars.get(7));\n bars.get(14).setLinks(null, null, bars.get(9));\n\n verticals.add(0);\n verticals.add(2);\n verticals.add(3);\n verticals.add(10);\n verticals.add(11);\n verticals.add(13);\n verticals.add(14);\n }", "void setBarchart(Map<Integer, Integer> data, String year) {\r\n\r\n\t\tbc.getData().clear();\r\n\t\t// bc.setLegendVisible(false);\r\n\r\n\t\tXYChart.Series series1 = new XYChart.Series();\r\n\t\tseries1.setName(\"\" + year);\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jan\", data.get(0)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Feb\", data.get(1)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Mar\", data.get(2)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Apr\", data.get(3)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"May\", data.get(4)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jun\", data.get(5)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jal\", data.get(6)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Aug\", data.get(7)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Sep\", data.get(8)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Oct\", data.get(9)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Nav\", data.get(10)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Dec\", data.get(11)));\r\n\r\n\t\tbc.getData().addAll(series1);\r\n\t}", "public void outputBarChart() {\n System.out.println(\"Grade distribution\");\n\n // storage frequency of the grades in each interval 10 grades\n int[] frequency = new int[11];\n\n // for each grade, increment the frequency appropriates\n for (int grade : grades)\n ++frequency[grade / 10];\n\n // for each frequency of the grade, print bar on the chart\n for (int count =0; count < frequency.length; count++) {\n // generates output of the bar label (\"00-99: \", ..., \"90-99: \", \"100: \")\n if (count == 10)\n System.out.printf(\"%5d: \", 100);\n else\n System.out.printf(\"%02d-%02d: \", count * 10, count * 10 + 9);\n\n // prints the asterisk bar\n for (int stars =0; stars < frequency[count]; stars++)\n System.out.print(\"*\");\n\n System.out.println();\n }\n }", "JFreeChart generateHist();", "public void MakeBar() {\n\t\tBarButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetBarChartImage())));\t\n\t\tBarButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Bar chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(BarButton);\t\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_analysis,container,false);\n\n cases_bar = view.findViewById(R.id.cases_bar);\n //Appearance of Bar chart\n cases_bar.getDescription().setEnabled(false);\n cases_bar.setDrawValueAboveBar(false);\n cases_bar.animateY(5000);\n cases_bar.animateX(5000);\n\n XAxis xAxis = cases_bar.getXAxis();\n xAxis.setValueFormatter(new ValueFormatter() {\n @Override\n public String getFormattedValue(float value) {\n return YEARS[(int) value];\n }\n });\n\n YAxis axisLeft = cases_bar.getAxisLeft();\n axisLeft.setGranularity(100f);\n axisLeft.setAxisMinimum(0);\n\n YAxis axisRight = cases_bar.getAxisRight();\n axisLeft.setGranularity(100f);\n axisLeft.setAxisMinimum(0);\n\n\n ArrayList <BarEntry> cases = new ArrayList<>();\n cases.add(new BarEntry(0,2144));\n cases.add(new BarEntry(1,2230));\n cases.add(new BarEntry(2,1480));\n cases.add(new BarEntry(3,1131));\n cases.add(new BarEntry(4,1089));\n\n\n\n BarDataSet bardataset = new BarDataSet(cases, \"Cases\");\n\n ArrayList<IBarDataSet> labels = new ArrayList<>();\n labels.add(bardataset);\n\n BarData data = new BarData( labels);\n cases_bar.setData(data); // set the data and list of labels\n data.setValueTextSize(12f);\n bardataset.setColors(ColorTemplate.COLORFUL_COLORS);\n\n return view;\n }", "private PanelTester()\n {\n /**/\n //f.add(new CardSelector(0, 0, width, height, \"TEST\"));\n\n // 73 Total\n// Slice[] slices2 = { new Slice(5, Color.BLACK,\"BLACK\"),\n// new Slice(33, Color.GREEN,\"GREEN\"),\n// new Slice(20, Color.YELLOW,\"YELLOW\"), new Slice(15, Color.RED,\"RED\") };\n//\n// Slice[] slices = { new Slice(0.64, Color.GREEN, \"Organic\"),\n// new Slice(52.6590008, Color.BLUE, \"Conventional\" ),\n// new Slice(46.7009992, Color.RED, \"GMO\" ) };\n//\n// ArrayList<Slice> sliceArray = new ArrayList<>();\n// for( int i = 0; i < slices.length ; i++)\n// {\n// sliceArray.add( slices[i] );\n// }\n// f.add(new PieChart( f.getBounds(), sliceArray ) );\n// Rectangle temp = new Rectangle(0,0,100,100);\n //f.add(new ChartKey(temp, sliceArray ));\n /**/\n\n\n\n f.add(new AvailableCropsBar(\"test\", new Color(134,255, 109,255),100,60,20,300,50));\n\n\n\n\n\n //f.pack();\n }", "private void initBars()\n\t{\n\t\tfor (int i = 0; i < Constants.MAX_VALUE; i++)\n\t\t{\n\t\t\trows[i] = new Bar();\n\t\t\tcolumns[i] = new Bar();\n\t\t\tgrids[i] = new Bar();\n\t\t}\n\n\t\tfor (int rowIndex = 0; rowIndex < this.nodes.length; rowIndex++)\n\t\t{\n\t\t\tNode[] row = this.nodes[rowIndex];\n\t\t\tfor (int colIndex = 0; colIndex < row.length; colIndex++)\n\t\t\t{\n\t\t\t\tNode node = row[colIndex];\n\n\t\t\t\t// Make Rows\n\t\t\t\tthis.rows[rowIndex].nodes[colIndex] = node;\n\t\t\t\tnode.setRow(this.rows[rowIndex]);\n\n\t\t\t\t// Make Columns\n\t\t\t\tthis.columns[colIndex].nodes[rowIndex] = node;\n\t\t\t\tnode.setColumn(this.columns[colIndex]);\n\n\t\t\t\t// Make Grid\n\t\t\t\t// the index of Grid Array\n\t\t\t\tint gridIndex = colIndex / 3 + (rowIndex / 3) * 3;\n\n\t\t\t\t// the index of nodes array of one grid object\n\t\t\t\tint gridNodeIndex = colIndex % 3 + (rowIndex % 3) * 3;\n\t\t\t\tthis.grids[gridIndex].nodes[gridNodeIndex] = node;\n\t\t\t\tnode.setGrid(this.grids[gridIndex]);\n\t\t\t}\n\t\t}\n\t}", "public void MakeBar3D() {\n\t\tBarButton3D = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(\n\t\t\t\t\tGet3DBarChartImage())));\n\t\tBarButton3D.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\t\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"3D Bar Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new BarChart3D(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tChartTypeInterface.add(BarButton3D);\n\t}", "private void initChart() {\r\n /*mCurrentSeries = new XYSeries(\"Sample Data\");\r\n mDataset.addSeries(mCurrentSeries);\r\n mCurrentRenderer = new XYSeriesRenderer();\r\n mRenderer.addSeriesRenderer(mCurrentRenderer);*/\r\n \t\r\n \tList<Integer> MyListValue = new ArrayList<Integer>();\r\n\t\t/*for (int i = 0; i < SpeakingTimeList.size(); i++){\r\n\t\t\tMyListValue.add(SpeakingTimeList.get(i));\r\n\t\t}*/\r\n\t\tfor (int i = 0; i < participantAndSpeakingTimeList.size(); i++){\r\n\t\t\tMyListValue.add(participantAndSpeakingTimeList.get(i).getValue());\r\n\t\t}\r\n\t\t\r\n\t\t/*MyList.add(25);\r\n\t\tMyList.add(10);\r\n\t\tMyList.add(15);\r\n\t\tMyList.add(20);*/\r\n\t\t\t\t\r\n\t\tint[] y = new int[MyListValue.size()];\r\n\t\tfor (int i = 0; i < MyListValue.size(); i++) \r\n\t\t\ty[i] = MyListValue.get(i);\r\n\t\t\r\n\t\t//int y[] = {25,10,15,20};\r\n\t \r\n CategorySeries series = new CategorySeries(\"Speaking time in secondes\");\r\n for(int i=0; i < y.length; i++){\r\n series.add(\"Bar\"+(i+1),y[i]);\r\n }\r\n \r\n dataSet = new XYMultipleSeriesDataset(); // collection of series under one object.,there could any\r\n dataSet.addSeries(series.toXYSeries()); // number of series\r\n \r\n //customization of the chart\r\n \r\n XYSeriesRenderer renderer = new XYSeriesRenderer(); // one renderer for one series\r\n renderer.setColor(Color.parseColor(\"#0099FF\"));\r\n renderer.setDisplayChartValues(true);\r\n renderer.setChartValuesSpacing((float) 5.5d);\r\n renderer.setLineWidth((float) 10.5d);\r\n \r\n \r\n mRenderer = new XYMultipleSeriesRenderer(); // collection multiple values for one renderer or series\r\n mRenderer.addSeriesRenderer(renderer);\r\n mRenderer.setChartTitle(\"Speaking time per participant\");\r\n// mRenderer.setXTitle(\"xValues\");\r\n mRenderer.setYTitle(\"Time in secondes\");\r\n mRenderer.setZoomButtonsVisible(true); mRenderer.setShowLegend(true);\r\n mRenderer.setShowGridX(true); // this will show the grid in graph\r\n mRenderer.setShowGridY(true); \r\n// mRenderer.setAntialiasing(true);\r\n mRenderer.setBarSpacing(.5); // adding spacing between the line or stacks\r\n mRenderer.setApplyBackgroundColor(true);\r\n mRenderer.setBackgroundColor(Color.BLACK);\r\n mRenderer.setXAxisMin(0);\r\n mRenderer.setYAxisMin(0);\r\n //mRenderer.setXAxisMax(5);\r\n /*mRenderer.setXAxisMax(ParticipantsList.size()+1);*/\r\n mRenderer.setXAxisMax(participantAndSpeakingTimeList.size()+1);\r\n //mRenderer.setYAxisMax(100);\r\n mRenderer.setYAxisMax(Math.round(getMaxValue()/10)*10+10);\r\n// \r\n \r\n mRenderer.setXLabels(0);\r\n \r\n mRenderer.setXLabelsAngle(90);\r\n mRenderer.setXLabelsAlign(Align.LEFT);\r\n \r\n /*for (int i = 0; i < ParticipantsList.size(); i++){\r\n\t\t\tmRenderer.addXTextLabel(i+1, ParticipantsList.get(i));\r\n\t\t}*/\r\n for (int i = 0; i < participantAndSpeakingTimeList.size(); i++){\r\n\t\t\tmRenderer.addXTextLabel(i+1, participantAndSpeakingTimeList.get(i).getName());\r\n\t\t}\r\n \r\n /*mRenderer.addXTextLabel(1,\"Income\");\r\n mRenderer.addXTextLabel(2,\"Saving\");\r\n mRenderer.addXTextLabel(3,\"Expenditure\");\r\n mRenderer.addXTextLabel(4,\"NetIncome\");*/\r\n \r\n mRenderer.setPanEnabled(true, true); // will fix the chart position\r\n //Intent intent = ChartFactory.getBarChartIntent(context, dataSet, mRenderer,Type.DEFAULT);\r\n \r\n //return intent;\r\n\r\n\t\r\n\t}", "ArrayList<JFreeChart> generateAll();", "public BarChart() {\n\n\t\t//set the initial size of the store for curve data\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tcvV.add(new CurveData());\n\t\t}\n\n\t\tbarChartPanel.add(GP, BorderLayout.CENTER);\n\n\t\tBorder etchedBorder = BorderFactory.createEtchedBorder();\n\t\tborder = BorderFactory.createTitledBorder(etchedBorder, \"Title\");\n\t\tborder.setTitleColor(Color.blue);\n\t\tbarChartPanel.setBorder(border);\n\n\t\tMarkerFormat = new MarkerFormat(barColumns);\n\n\t\tGP.setSmartGL(false);\n\t\tGP.setNumberFormatX(MarkerFormat);\n\n\t\tGP.addHorLimitsListener(\n\t\t\t\t\t\t\t\tnew ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tint nClmns = barColumns.size();\n\t\t\t\tint nMaxLines = 0;\n\t\t\t\tjava.util.Iterator<BarColumn> itr = barColumns.iterator();\n\t\t\t\twhile (itr.hasNext()) {\n\t\t\t\t\tBarColumn bc = itr.next();\n\t\t\t\t\tif (nMaxLines < bc.size()) {\n\t\t\t\t\t\tnMaxLines = bc.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (nClmns > 0 && nMaxLines > 0) {\n\t\t\t\t\t//int iMin = GP.getScreenX(GP.getCurrentMinX());\n\t\t\t\t\t//int iMax = GP.getScreenX(GP.getCurrentMaxX());\n\t\t\t\t\tint iMin = GP.getScreenX(GP.getInnerMinX());\n\t\t\t\t\tint iMax = GP.getScreenX(GP.getInnerMaxX());\n\n\t\t\t\t\twidth = (int) ((iMax - iMin) / (1.9 * nMaxLines * nClmns));\n\t\t\t\t\tif (width < 1) {\n\t\t\t\t\t\twidth = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int i = 1, n = Math.min(nClmns * nMaxLines + 1, cvV.size()); i < n; i++) {\n\t\t\t\t\t\tCurveData cd = cvV.get(i);\n\t\t\t\t\t\tcd.setLineWidth(width);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tRunnable runRefresh =\n\t\t\t\tnew Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tGP.refreshGraphJPanel();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tThread mThread = new Thread(runRefresh);\n\t\t\t\tmThread.start();\n\t\t\t}\n\t\t});\n\n\t\t//operations with clicked point object\n\t\tJLabel infoLabel = new JLabel(\" Clicked Point Info: \", JLabel.CENTER);\n\n\t\tFunctionGraphsJPanel.ClickedPoint cpObj = GP.getClickedPointObject();\n\t\tcpObj.xValueLabel = new JLabel(\"X-Marker=\", JLabel.RIGHT);\n\t\tcpObj.xValueFormat = MarkerFormat;\n\t\tcpObj.xValueText = new JTextField(10);\n\t\tcpObj.xValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.xValueText.setForeground(Color.blue);\n\n\t\tcpObj.yValueLabel = new JLabel(\" Value=\", JLabel.RIGHT);\n\t\tcpObj.yValueFormat = fortranFrmt;\n\t\tcpObj.yValueText = new JTextField(12);\n\t\tcpObj.yValueText.setHorizontalAlignment(JTextField.CENTER);\n\t\tcpObj.yValueText.setForeground(Color.blue);\n\n\t\tJPanel infoPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 4, 0));\n\t\tinfoPanel.add(infoLabel);\n\t\tinfoPanel.add(cpObj.xValueLabel);\n\t\tinfoPanel.add(cpObj.xValueText);\n\t\tinfoPanel.add(cpObj.yValueLabel);\n\t\tinfoPanel.add(cpObj.yValueText);\n\n\t\tbarChartPanel.add(infoPanel, BorderLayout.SOUTH);\n\t}", "public LecturerBarChart() {\n initComponents();\n }", "@Override\r\n\tprotected void generateChart() throws Exception {\n\t\t\r\n\t}", "public Chart initializeChart();", "public BarChartPanel(String chartTitle, String xAxis, String yAxis, CategoryDataset dataset) {\n\t\t// Plotting a new chart object with, graph title, x-axis title, y-axis title, and dataset which is provided\n\t\tchart = ChartFactory.createBarChart(chartTitle, xAxis, yAxis, dataset, PlotOrientation.VERTICAL, true, true, false);\n\t\t\t\t\n\t\t// Styling the chart\t\n\t\tStandardChartTheme theme = (StandardChartTheme) org.jfree.chart.StandardChartTheme.createJFreeTheme();\n\t\ttheme.setTitlePaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setExtraLargeFont(UI.APPLICATION_THEME_FONT_18_PLAIN); // title\n\t\ttheme.setLargeFont(UI.APPLICATION_THEME_FONT_17_PLAIN); // axis-title\n\t\ttheme.setRegularFont(UI.APPLICATION_THEME_FONT_15_PLAIN);\n\t\ttheme.setRangeGridlinePaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setPlotOutlinePaint((Paint)UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setPlotBackgroundPaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setChartBackgroundPaint(UI.APPLICATION_THEME_TERTIARY_COLOR);\n\t\ttheme.setDomainGridlinePaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.setAxisOffset(new RectangleInsets(0, 0, 0, 0));\n\t\ttheme.setBarPainter(new StandardBarPainter());\n\t\ttheme.setAxisLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\ttheme.apply(chart);\n\t\tchart.getCategoryPlot().setOutlineVisible(false);\n\t\tchart.getCategoryPlot().getRangeAxis().setAxisLineVisible(false);\n\t\tchart.getCategoryPlot().getRangeAxis().setTickMarksVisible(false);\n\t\tchart.getCategoryPlot().setRangeGridlineStroke(new BasicStroke());\n\t\tchart.getCategoryPlot().getRangeAxis().setTickLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\tchart.getCategoryPlot().getDomainAxis().setTickLabelPaint(UI.APPLICATION_THEME_SECONDARY_COLOR);\n\t\tValueAxis yAxisRange = chart.getCategoryPlot().getRangeAxis();\n\t\tyAxisRange.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n\t\tchart.setTextAntiAlias(true);\n\t\tchart.setAntiAlias(true);\n\t\tchart.getCategoryPlot().getRenderer().setSeriesPaint(0, UI.APPLICATION_THEME_PRIMARY_COLOR);\n\t\tBarRenderer rend = (BarRenderer) chart.getCategoryPlot().getRenderer();\n\t\trend.setShadowVisible(true);\n\t\trend.setShadowXOffset(2);\n\t\trend.setShadowYOffset(0);\n\t\trend.setShadowPaint(UI.APPLICATION_THEME_QUATERNARY_COLOR);\n\t\trend.setMaximumBarWidth(0.1);\n\t\tchart.removeLegend();\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) { \n \n XYChart.Series series = new XYChart.Series<>();\n \n \n series.setName(\"Gagnant\");\n series.getData().add(new XYChart.Data(\"Jan\", 100));\n series.getData().add(new XYChart.Data(\"Fev\", 170));\n series.getData().add(new XYChart.Data(\"Mars\", 197));\n series.getData().add(new XYChart.Data(\"Avr\", 160));\n series.getData().add(new XYChart.Data(\"Mai\", 165));\n series.getData().add(new XYChart.Data(\"Juin\", 179));\n series.getData().add(new XYChart.Data(\"Juil\", 195));\n series.getData().add(new XYChart.Data(\"Aout\", 140));\n series.getData().add(new XYChart.Data(\"Sept\", 121));\n series.getData().add(new XYChart.Data(\"Oct\", 173));\n series.getData().add(new XYChart.Data(\"Nov\", 185));\n series.getData().add(new XYChart.Data(\"Dec\", 150));\n \n XYChart.Series perdant = new XYChart.Series<>();\n perdant.setName(\"Perdant\");\n \n perdant.getData().add(new XYChart.Data(\"Jan\", 80));\n perdant.getData().add(new XYChart.Data(\"Fev\", 60));\n perdant.getData().add(new XYChart.Data(\"Mars\", 80));\n perdant.getData().add(new XYChart.Data(\"Avr\", 70));\n perdant.getData().add(new XYChart.Data(\"Mai\", 70));\n perdant.getData().add(new XYChart.Data(\"Juin\", 60));\n perdant.getData().add(new XYChart.Data(\"Juil\", 100));\n perdant.getData().add(new XYChart.Data(\"Aout\", 80));\n perdant.getData().add(new XYChart.Data(\"Sept\", 50));\n perdant.getData().add(new XYChart.Data(\"Oct\", 79));\n perdant.getData().add(new XYChart.Data(\"Nov\", 70));\n perdant.getData().add(new XYChart.Data(\"Dec\", 12));\n \n\n Tooltip tooltip = new Tooltip(\"Le nombre de gagnants ou cours des mois augmentent souvent.\");\n areaChart.getStylesheets().add(\"-fx-color:green;\");\n areaChart.getData().addAll(series, perdant);\n BarChart.getStylesheets().add(\"chart-bar series<1> bar-legend-symbol default-color<red>\");\n BarChart.getData().addAll(perdant);\n\n\n }", "public void BarChartForViolationFines() {\n\t\t\n\t\t// Dataset Generation\t\t\n\n\t\tDefaultCategoryDataset dataset = new DefaultCategoryDataset();\t\t\t\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tString key = sortedKeysByVioDesc.get(i);\n\t\t\tdataset.addValue(ticketByVioFine.get(key), \"Violation Fine\", key);\n\t\t}\t\t\t\n\t\tCategoryDataset plotDataset = dataset;\n\n\t\t// JFreeChart Call for BarChart and passing formats\n\t\tJFreeChart barChart2 = ChartFactory.createBarChart(\n\t\t\t\t\"Parking Tickets by Violation Fee\", \n\t\t\t\t\"Ticket Description\", \n\t\t\t\t\"Ticket Fee ($)\", \n\t\t\t\tplotDataset, \n\t\t\t\tPlotOrientation.VERTICAL, \n\t\t\t\tfalse, //legend\n\t\t\t\ttrue, //tool tip\n\t\t\t\tfalse // use to generate URL\n\t\t\t\t);\t\n\n\t\t// Turing label by 45 degree to show full label\n\t\tCategoryPlot cplot2 = barChart2.getCategoryPlot();\n\t\tCategoryAxis xAxis = (CategoryAxis)cplot2.getDomainAxis();\n\t\txAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);\n\t\t\n\t\t//Chart panel generation\n ChartPanel chartPanel2 = new ChartPanel(barChart2);\n chartPanel2.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));\n chartPanel2.setBackground(Color.white);\n add(chartPanel2);\n pack();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setVisible(true);\n try {\n \tfinal ChartRenderingInfo chartInfo2 = new ChartRenderingInfo(new StandardEntityCollection());\n \tfinal File file4 = new File(\"BarChartForViolationFee.png\");\n ChartUtilities.saveChartAsPNG(file4, barChart2, 800, 800, chartInfo2);\n }\n catch (Exception e) {\n }\n\t}", "private void initialize() {\r\n\t\t//frame = new JFrame();\r\n\t\tframe.setSize(725, 482);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t//frame.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\tDefaultCategoryDataset dataset= new DefaultCategoryDataset();\r\n\t\t//JOptionPane.showMessageDialog(null, \"BUTTON CLICKED!!!\");\r\n\t\t//LableMessage.setText(\"BUTTON CLICKED!!!\");\r\n\t\t\r\n\t\t//Pain, Drowsiness, Nausea, Anxiety, and Depression\r\n\t\tdataset.setValue(2, \"day1\",\"Pain\");\r\n\t\tdataset.setValue(5, \"day2\",\"Pain\");\r\n\t\tdataset.setValue(4, \"day3\",\"Pain\");\r\n\t\tdataset.setValue(6, \"day1\", \"Drowsiness\");\r\n\t\tdataset.setValue(10, \"day2\", \"Drowsiness\");\r\n\t\tdataset.setValue(8, \"day3\", \"Drowsiness\");\r\n\t\tdataset.setValue(1, \"day1\", \"Nausea\");\r\n\t\tdataset.setValue(7, \"day2\", \"Nausea\");\r\n\t\tdataset.setValue(5, \"day3\", \"Nausea\");\r\n\t\tdataset.setValue(3,\"day1\",\"Anxiety\");\t\r\n\t\tdataset.setValue(8,\"day2\",\"Anxiety\");\r\n\t\tdataset.setValue(9,\"day3\",\"Anxiety\");\r\n\t\tdataset.setValue(8, \"day1\", \"Depression\");\r\n\t\tdataset.setValue(7, \"day2\", \"Depression\");\r\n\t\tdataset.setValue(9, \"day3\", \"Depression\");\r\n\t\tint test[] = new int[7];\r\n\t\tfor (int i=0;i<7; i++)\r\n\t\t{\r\n\t\t\ttest[i]=5;\r\n\t\t}\r\n\t\tDefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\t\t//dataset2 = dataSetInit(P1.getEnterSymptomLevel(),P1.getPreviousSymptomLevel1(),P1.getPreviousSymptomLevel2());\r\n\t\tdataset2 = dataSetInit(test,test,test);\r\n\t\t//P1.getEnter\r\n\t\t//DefaultCategoryDataset dataset2= new DefaultCategoryDataset();\r\n\r\n\t\t//JFreeChart chart= ChartFactory.createBarChart(P1.firstName+\" \"+P1.lastName,\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\r\n\t\tJFreeChart chart= ChartFactory.createBarChart3D(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,true,true,true);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Symptom Report\",\"Symptoms\", \"Levels\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\tchart.setBackgroundPaint(Color.lightGray);\r\n\t\t//JFreeChart chart2= ChartFactory.createBarChart(\"Grade Report\",\"Student Name\", \"Marks\", dataset2, PlotOrientation.VERTICAL,false,true,false);\r\n\t\t\r\n\t\tChartPanel chartPanel = new ChartPanel(chart);\r\n\t\tchartPanel.setPreferredSize(new Dimension(700,350));\r\n\t\tPan.add(chartPanel);\r\n\t\t\r\n\t\tframe.getContentPane().add(Pan);\r\n\t\tCategoryPlot p=chart.getCategoryPlot();\r\n\t\tp.setRangeGridlinePaint(Color.red);\r\n\t\tp.setBackgroundPaint(Color.WHITE);\r\n\t\tframe.setVisible(true);\r\n//\t\tChartFrame frame= new ChartFrame(\"Bar Graph Test\",chart,false);\r\n//\t\t\r\n//\t\tframe.setVisible(true);\r\n//\t\tframe.setSize(700,350);\r\n//\t\tframe.setResizable(false);\r\n\t\t//frame2 =new JFrame()\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_study_result, container, false);\n// BarChart chart1 = (BarChart) view.findViewById(R.id.barchart1);\n// BarChart chart2=view.findViewById(R.id.barchart2);\n// BarChart chart3=view.findViewById(R.id.barchart3);\n// BarChart chart4=findViewById(R.id.barchart4);\n// BarChart chart5=findViewById(R.id.barchart5);\n// BarChart chart6=findViewById(R.id.barchart6);\n\n\n\n\n\n\n\n\n\n return view;\n }", "private Chart(){}", "BossBar createBossBar(String title, BossColor color, BossStyle style);", "void setBarchartorder(Map<Integer, Integer> data, String year) {\r\n\r\n\t\tbc1.getData().clear();\r\n\t\tbc1.setLegendVisible(false);\r\n\r\n\t\tXYChart.Series series1 = new XYChart.Series();\r\n\t\tseries1.setName(\"\" + year);\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jan\", data.get(0)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Feb\", data.get(1)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Mar\", data.get(2)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Apr\", data.get(3)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"May\", data.get(4)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jun\", data.get(5)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Jal\", data.get(6)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Aug\", data.get(7)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Sep\", data.get(8)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Oct\", data.get(9)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Nav\", data.get(10)));\r\n\t\tseries1.getData().add(new XYChart.Data(\"Dec\", data.get(11)));\r\n\r\n\t\tbc1.getData().addAll(series1);\r\n\t}", "BossBar createBossBar(String title, float health, BossColor color, BossStyle style);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_statistics, container, false);\n ((SideNavigationActivity) getActivity()).setActionBarTitle(\"Statistieken\");\n ((SideNavigationActivity) getActivity()).setSelectedMenuItem(R.id.statistics);\n\n BarChart chart = (BarChart) v.findViewById(R.id.chart);\n final String[] quarters = new String[]{LocalDate.now().minusDays(4).toString(), LocalDate.now().minusDays(3).toString(), LocalDate.now().minusDays(2).toString(), LocalDate.now().minusDays(1).toString(), LocalDate.now().toString()};\n\n IAxisValueFormatter formatter = new IAxisValueFormatter() {\n\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return quarters[(int) value];\n }\n };\n\n List<BarEntry> entries = new ArrayList<BarEntry>();\n\n StatsDao statsDao = AppDatabase.getInstance(getContext()).statsDao();\n entries.add(new BarEntry(4, statsDao.countStats(LocalDate.now().toString())));\n entries.add(new BarEntry(3, statsDao.countStats(LocalDate.now().minusDays(1).toString())));\n entries.add(new BarEntry(2, statsDao.countStats(LocalDate.now().minusDays(2).toString())));\n entries.add(new BarEntry(1, statsDao.countStats(LocalDate.now().minusDays(3).toString())));\n entries.add(new BarEntry(0, statsDao.countStats(LocalDate.now().minusDays(4).toString())));\n\n BarDataSet dataSet = new BarDataSet(entries, \"Aantal recepten bekeken per dag\");\n\n List<IBarDataSet> dataSets = new ArrayList<IBarDataSet>();\n dataSets.add(dataSet);\n\n BarData data = new BarData(dataSets);\n\n chart.setData(data);\n\n XAxis xAxis = chart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setValueFormatter(formatter);\n\n chart.getDescription().setEnabled(false);\n chart.invalidate();\n\n ((TextView) v.findViewById(R.id.StatsCountAllValue)).setText(String.valueOf(statsDao.countAllStats()));\n return v;\n\n }", "private void setupDailyBarChart() {\r\n BarChart chart = findViewById(R.id.chart);\r\n chart.getDescription().setEnabled(false);\r\n chart.setExtraOffsets(0, 0, 0, 10);\r\n chart.setNoDataText(getResources().getString(R.string.loading_graph));\r\n chart.getPaint(Chart.PAINT_INFO).setTextSize(Utils.convertDpToPixel(16f));\r\n chart.getLegend().setEnabled(false);\r\n\r\n // Show time on x-axis at three hour intervals\r\n XAxis xAxis = chart.getXAxis();\r\n xAxis.setValueFormatter(new IAxisValueFormatter() {\r\n @Override\r\n public String getFormattedValue(float value, AxisBase axis) {\r\n int valueInt = (int) value;\r\n if(valueInt == 0) {\r\n return \"12am\";\r\n } else if(valueInt > 0 && valueInt < 12) {\r\n return valueInt + \"am\";\r\n } else if(valueInt == 12) {\r\n return \"12pm\";\r\n } else {\r\n return (valueInt - 12) + \"pm\";\r\n }\r\n }\r\n });\r\n\r\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\r\n xAxis.setDrawGridLines(false);\r\n xAxis.setTextSize(14f);\r\n // show label for every three hours\r\n xAxis.setGranularity(3.0f);\r\n xAxis.setLabelCount(8);\r\n xAxis.setGranularityEnabled(true);\r\n\r\n // Show non-sedentary hours on left y-axis\r\n YAxis yAxisLeft = chart.getAxisLeft();\r\n yAxisLeft.setAxisMinimum(0f);\r\n yAxisLeft.setTextSize(14f);\r\n yAxisLeft.setGranularity(1.0f); // show integer values on y axis\r\n yAxisLeft.setGranularityEnabled(true);\r\n\r\n YAxis yAxisRight = chart.getAxisRight();\r\n yAxisRight.setEnabled(false);\r\n }", "private void initPieChart() {\n\t\tPieChart chartLinguagens = new PieChart();\n\t\tchartLinguagens.setTitle(\"Ranking de Linguagens de Programação Mar/2013\");\n\t\tObservableList<PieChart.Data> datas = FXCollections.observableArrayList(\n\t\t\t\tnew PieChart.Data(\"Java\", 18.156),\n\t\t\t\tnew PieChart.Data(\"C\", 17.141), \n\t\t\t\tnew PieChart.Data(\"Objective-C\", 10.230),\n\t\t\t\tnew PieChart.Data(\"C++\", 9.115), \n\t\t\t\tnew PieChart.Data(\"C#\", 6.597), \n\t\t\t\tnew PieChart.Data(\"Outros\", 38.761));\n\t\tchartLinguagens.setData(datas);\n\t\tpane.getChildren().add(chartLinguagens);\n\t}", "private BarChart.Options getOptions() {\n\t\tBarChart.Options options = BarChart.Options.create();\n\t\toptions.set3D(raised);\n\t\tif (label != null){options.setTitle(label);}\n\t\treturn options;\n\t}", "public void graficoBarras(String pQuery, Double pTiempoRelacional,\n Double pTiempoEmpotrada, Double pTiempoMemoria) {\n\n DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\n dataset.addValue(pTiempoRelacional, \"a\", \"Relacional\");\n dataset.addValue(pTiempoEmpotrada, \"a\", \"Empotrada\");\n dataset.addValue(pTiempoMemoria, \"a\", \"En memoria\");\n\n JFreeChart chart = ChartFactory.createBarChart(\n \"Resultados de la operación\", // El titulo de la gráfica \n \"Query ejecutado: \" + pQuery, // Etiqueta de categoria \n \"Tiempo (ms)\", // Etiqueta de valores \n dataset, // Datos \n PlotOrientation.VERTICAL, // orientacion \n false, // Incluye Leyenda \n true, // Incluye tooltips \n false // URLs? \n );\n\n ChartFrame frame = new ChartFrame(\"Graficador\", chart);\n frame.pack();\n frame.setVisible(true);\n }", "@Test\n public void test25() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n AxisLocation axisLocation0 = AxisLocation.TOP_OR_RIGHT;\n AxisLocation axisLocation1 = axisLocation0.getOpposite();\n combinedRangeCategoryPlot0.setRangeAxisLocation(0, axisLocation0, true);\n SortOrder sortOrder0 = combinedRangeCategoryPlot0.getColumnRenderingOrder();\n CategoryItemRenderer[] categoryItemRendererArray0 = new CategoryItemRenderer[7];\n StatisticalBarRenderer statisticalBarRenderer0 = new StatisticalBarRenderer();\n categoryItemRendererArray0[0] = (CategoryItemRenderer) statisticalBarRenderer0;\n StackedAreaRenderer stackedAreaRenderer0 = new StackedAreaRenderer(true);\n categoryItemRendererArray0[1] = (CategoryItemRenderer) stackedAreaRenderer0;\n CombinedRangeXYPlot combinedRangeXYPlot0 = new CombinedRangeXYPlot();\n Paint paint0 = combinedRangeXYPlot0.getRangeTickBandPaint();\n WaterfallBarRenderer waterfallBarRenderer0 = null;\n try {\n waterfallBarRenderer0 = new WaterfallBarRenderer((Paint) null, (Paint) null, (Paint) null, (Paint) null);\n } catch(IllegalArgumentException e) {\n //\n // Null 'firstBarPaint' argument\n //\n assertThrownBy(\"org.jfree.chart.renderer.category.WaterfallBarRenderer\", e);\n }\n }", "private CategoryDataset createDataset() {\n\t \n\t \tvar dataset = new DefaultCategoryDataset();\n\t \n\t\t\tSystem.out.println(bic);\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> entry : bic.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t Integer value = entry.getValue();\n\t\t\t dataset.setValue(value, \"# Bicicletas\", key);\n\t \n\t\t\t}\n\t return dataset;\n\t \n\t }", "private void setBarData(String report){\n\n int[] value = {0,0,0,0};\n String[] label = {\"Text Message\", \"Instagram\", \"Facebook Messenger\", \"Whatsapp\"} ;\n\n try {\n JSONObject jsonObject = new JSONObject(report);\n\n //Messages\n if(jsonObject.has(\"Text Message\"))\n {\n value[0] = jsonObject.getInt(\"Text Message\");\n }\n\n// if(jsonObject.has(\"com.samsung.android.messaging\"))\n// {\n// value[0] = jsonObject.getInt(\"com.samsung.android.messaging\");\n// }\n//\n// if(jsonObject.has(\"com.android.mms\"))\n// {\n// value[0] = jsonObject.getInt(\"com.android.mms\");\n// }\n\n //Instagram\n if(jsonObject.has(\"Instagram\"))\n {\n value[1] = jsonObject.getInt(\"Instagram\");\n }\n\n //Facebook messenger\n if(jsonObject.has(\"Facebook Messenger\"))\n {\n value[2] = jsonObject.getInt(\"Facebook Messenger\");\n }\n\n //Whatsapp\n if(jsonObject.has(\"Whatsapp\"))\n {\n value[3] = jsonObject.getInt(\"Whatsapp\");\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n //Put the values in the JSON to a Hashmap for sorting values and showing the map appropriately.\n Map<String, Integer> unsortMap = new HashMap<String, Integer>();\n unsortMap.put(label[0], value[0]);\n unsortMap.put(label[1], value[1]);\n unsortMap.put(label[2], value[2]);\n unsortMap.put(label[3], value[3]);\n\n //Sort\n List<Entry<String, Integer>> list = new LinkedList<Entry<String, Integer>>(unsortMap.entrySet());\n\n // Sorting the list based on values\n Collections.sort(list, new Comparator<Entry<String, Integer>>()\n {\n public int compare(Entry<String, Integer> o1,\n Entry<String, Integer> o2)\n {\n\n return o2.getValue().compareTo(o1.getValue());\n }\n });\n\n // Maintaining insertion order with the help of LinkedList\n Map<String, Integer> sortedMap = new LinkedHashMap<String, Integer>();\n for (Entry<String, Integer> entry : list)\n {\n sortedMap.put(entry.getKey(), entry.getValue());\n }\n\n List<Integer> sortedValues = new ArrayList<Integer>(sortedMap.values());\n List<String> sortedKey = new ArrayList<String>(sortedMap.keySet());\n\n //BAR CHART IMPLEMENTATION\n ArrayList<BarEntry> barEntries = new ArrayList<>();\n\n //change it based on the values gotten from GET\n barEntries.add(new BarEntry(1, sortedValues.get(0)));\n barEntries.add(new BarEntry(2, sortedValues.get(1)));\n barEntries.add(new BarEntry(3, sortedValues.get(2)));\n barEntries.add(new BarEntry(4, sortedValues.get(3)));\n\n BarDataSet barDataSet = new BarDataSet(barEntries,\"Social Media Platforms\");\n barDataSet.setColors(ColorTemplate.PASTEL_COLORS);\n BarData theData = new BarData(barDataSet);\n theData.setValueFormatter(new IValueFormatter() {\n @Override\n public String getFormattedValue(float value, com.github.mikephil.charting.data.Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {\n return String.valueOf((int)(value)) ;\n }\n });\n barChart.setData(theData);\n //barChart.invalidate();\n\n barChart.getAxisLeft().setAxisMinimum(0);\n barChart.getAxisRight().setAxisMinimum(0);\n barChart.setDrawBarShadow(false);\n barChart.setDrawValueAboveBar(true);\n //barChart.setMaxVisibleValueCount(10);\n barChart.setExtraOffsets(30,30,30,60);\n barChart.setPinchZoom(false);\n barChart.setDrawGridBackground(false);\n barChart.getAxisLeft().setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return String.valueOf((int) Math.floor(value));\n }\n });\n barChart.getAxisRight().setEnabled(false);\n\n XAxis xAxis = barChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setCenterAxisLabels(true);\n xAxis.setDrawGridLines(false);\n xAxis.setLabelRotationAngle(-45);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setAxisMinimum(0f);\n xAxis.setAxisMaximum(barEntries.size()+1);\n xAxis.setValueFormatter(new IndexAxisValueFormatter(sortedKey));\n barChart.getXAxis().setAxisMaximum(0 + barChart.getBarData().getGroupWidth(0.4f, 0.02f) * 5);\n\n YAxis leftAxis = barChart.getAxisLeft();\n leftAxis.removeAllLimitLines();\n leftAxis.setTypeface(Typeface.DEFAULT);\n leftAxis.setPosition(YAxis.YAxisLabelPosition.OUTSIDE_CHART);\n leftAxis.setTextColor(Color.BLACK);\n leftAxis.setDrawGridLines(false);\n leftAxis.setAxisMinimum(0f);\n leftAxis.setGranularityEnabled(true);\n leftAxis.setGranularity(1f);\n leftAxis.setAxisMaximum(leftAxis.getAxisMaximum()+1);\n\n barChart.invalidate();\n\n }", "private void displayCalorieData(JSONObject[] jsonObjects) {\r\n int[] caloriesOut = {};\r\n boolean displayGoal = false;\r\n\r\n try {\r\n // Get calories burned for each day\r\n JSONArray caloriesArray = jsonObjects[0].getJSONArray(\"activities-calories\");\r\n caloriesOut = new int[caloriesArray.length()];\r\n\r\n for(int i = 0; i < caloriesArray.length(); i++) {\r\n int calsOut = Integer.parseInt(caloriesArray.getJSONObject(i)\r\n .getString(\"value\"));\r\n caloriesOut[i] = calsOut;\r\n }\r\n\r\n // Get calorie burn goal, if it was requested\r\n if(jsonObjects.length > 1) {\r\n displayGoal = true;\r\n JSONObject jsonObject = jsonObjects[1];\r\n caloriesOutGoal = Integer.parseInt(jsonObject.getJSONObject(\"goals\")\r\n .getString(\"caloriesOut\"));\r\n }\r\n\r\n } catch(JSONException | NullPointerException e) {\r\n fitbitRequestError();\r\n return;\r\n }\r\n\r\n BarChart chart = findViewById(R.id.chart);\r\n\r\n ArrayList<BarEntry> entries = new ArrayList<>();\r\n int[] barColours = new int[7];\r\n\r\n // For each day in the week create a bar showing the data\r\n // If there is no data create a bar with value 0 so the day is still shown on the graph\r\n for (int i = 0; i < 7; i++) {\r\n float yValue = 0f;\r\n if (i < caloriesOut.length) {\r\n yValue = (float) caloriesOut[i];\r\n }\r\n\r\n entries.add(new BarEntry((float) i, yValue));\r\n\r\n barColours[i] = getResources().getColor(getProgressColour((int) yValue,\r\n caloriesOutGoal));\r\n }\r\n\r\n // Show data on chart\r\n BarDataSet dataSet = new BarDataSet(entries, \"\");\r\n dataSet.setColors(barColours);\r\n dataSet.setDrawValues(false);\r\n BarData barData = new BarData(dataSet);\r\n\r\n chart.setData(barData);\r\n chart.getLegend().setEnabled(false);\r\n\r\n chart.invalidate();\r\n\r\n if(displayGoal) {\r\n // Show calorie burn goal\r\n String unit = getResources().getString(R.string.cal_burn_unit);\r\n TextView textViewSummary = findViewById(R.id.tv_goal_summary);\r\n if(caloriesOutGoal > 0) {\r\n textViewSummary.setText(getResources().getString(R.string.goal_value_unit,\r\n caloriesOutGoal, unit));\r\n } else {\r\n textViewSummary.setText(getResources().getString(R.string.no_goal_set));\r\n }\r\n }\r\n }", "private void setupBarChart(final GregorianCalendar period, boolean isMonth) {\n if (isMonth) {\n setupBarChartMonth(period);\n } else setupBarChartWeek(period);\n\n //disabling chart description\n Description description = new Description();\n description.setEnabled(false);\n barChart.setDescription(description);\n barChart.getBarData().setDrawValues(false);\n\n //creates a bit of empty space on the sides of the chart\n barChart.setFitBars(true);\n\n //disabling background grid\n barChart.getXAxis().setDrawGridLines(false);\n barChart.getAxisLeft().setDrawGridLines(false);\n// barChart.getAxisRight().setDrawGridLines(false);\n\n //working with legend. It is set of colors below a chart\n Legend legend = barChart.getLegend();\n legend.setEnabled(false);\n\n XAxis xaxis = barChart.getXAxis();\n if (isMonth) {\n xaxis.setLabelCount(15);\n } else {\n xaxis.setLabelCount(6);\n }\n xaxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n\n YAxis yLAxis = barChart.getAxisLeft();\n yLAxis.setAxisMaximum(1.4f);\n yLAxis.setAxisMinimum(0.0f);\n yLAxis.setLabelCount(4);\n yLAxis.setDrawZeroLine(true);\n yLAxis.setGranularityEnabled(true);\n yLAxis.setGranularity(0.25f);\n\n YAxis yRAxis = barChart.getAxisRight();\n yRAxis.setAxisMaximum(1.4f);\n yRAxis.setAxisMinimum(0.0f);\n yRAxis.setLabelCount(4);\n yRAxis.setDrawZeroLine(true);\n yRAxis.setGranularityEnabled(true);\n yRAxis.setGranularity(0.25f);\n\n yLAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return Float.toString(value / 1.2f);\n }\n });\n yRAxis.setValueFormatter(new IAxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return Float.toString(value / 1.2f);\n }\n });\n\n barChart.setScaleEnabled(false);\n barChart.setTouchEnabled(false);\n\n //updating chart\n barChart.invalidate();\n }", "private void drawChart() throws ParseException {\n Calendar cal = new GregorianCalendar();\n cal.setTime(new Date());\n cal.set(Calendar.DAY_OF_MONTH, -7);\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n Date startTime = cal.getTime();\n Date dayEnd = new Date();\n\n historyChart.setBackgroundColor(Color.WHITE);\n historyChart.setDrawBorders(true);\n\n\n ArrayList<String> xAxis = new ArrayList<>();\n ArrayList<Float> calories = new ArrayList<>();\n ArrayList<Float> calcium = new ArrayList<>();\n ArrayList<Float> sodium = new ArrayList<>();\n ArrayList<Float> carbs = new ArrayList<>();\n ArrayList<Float> cholestrol = new ArrayList<>();\n ArrayList<Float> iron = new ArrayList<>();\n ArrayList<Float> protien = new ArrayList<>();\n ArrayList<Float> sugar = new ArrayList<>();\n ArrayList<Float> totalfat = new ArrayList<>();\n\n NutritionHistory instance = NutritionHistory.getInstance();\n NutritionHistory.getInstance().getNutritionInformation(startTime, dayEnd, nutritionInformation -> {\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n FirebaseUser mCurrentUser = FirebaseAuth.getInstance().getCurrentUser();\n mDatabase.child(\"account\").child(mCurrentUser.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n double caloriesNeeded = 2000L;\n for (DataSnapshot data : dataSnapshot.getChildren()) {\n switch (data.getKey()) {\n case \"calories\":\n caloriesNeeded = Double.parseDouble(String.valueOf(data.getValue()));\n }\n }\n\n NutrientConverter converter = new NutrientConverter(caloriesNeeded);\n\n NutritionInformation.NutritionInformationBuilder builder = new NutritionInformation.NutritionInformationBuilder();\n NutritionInformation current = builder.build();\n\n Long[] days = nutritionInformation.keySet().stream().toArray(Long[]::new);\n Arrays.sort(days);\n\n for(Long day: days) {\n xAxis.add(sdf2.format(new Date(day)).toString());\n calories.add(converter.convert(\"Calories\", (float) nutritionInformation.get(day).getCalories()));\n calcium.add(converter.convert(\"Calcium\", (float) nutritionInformation.get(day).getCalcium()));\n sodium.add(converter.convert(\"Sodium\", (float)nutritionInformation.get(day).getSodium()));\n carbs.add(converter.convert(\"Carbohydrates\", (float) nutritionInformation.get(day).getCarbohydrates()));\n cholestrol.add(converter.convert(\"Cholesterol\", (float)nutritionInformation.get(day).getCholesterol()));\n iron.add(converter.convert(\"Iron\", (float)nutritionInformation.get(day).getIron()));\n protien.add(converter.convert(\"Protein\", (float)nutritionInformation.get(day).getProtein()));\n sugar.add(converter.convert(\"Sugar\", (float)nutritionInformation.get(day).getSugar()));\n totalfat.add(converter.convert(\"Total Fat\", (float)nutritionInformation.get(day).getTotalFat()));\n }\n Log.i(\"HERE\", xAxis.toString());\n LineDataSet dataCalories = addValues(\"Calories\", calories);\n dataCalories.setColor(Color.RED);\n dataCalories.setLineWidth(2f);\n\n LineDataSet dataCalcium = addValues(\"Calcium\",calcium);\n dataCalcium.setColor(Color.rgb(181, 126\t, 220));\n dataCalcium.setLineWidth(2f);\n\n LineDataSet dataSodium = addValues(\"Sodium\", sodium);\n dataSodium.setColor(Color.BLUE);\n dataSodium.setLineWidth(2f);\n\n LineDataSet dataCarbs = addValues(\"Carbohydrates\",carbs);\n dataCarbs.setColor(Color.GREEN);\n dataCarbs.setLineWidth(2f);\n\n LineDataSet dataCholesterol = addValues(\"Cholesterol\", cholestrol);\n dataCholesterol.setColor(Color.YELLOW);\n dataCholesterol.setLineWidth(2f);\n\n LineDataSet dataIron = addValues(\"Iron\",iron);\n dataIron.setColor(Color.BLACK);\n dataIron.setLineWidth(2f);\n\n LineDataSet dataProtein = addValues(\"Protein\", protien);\n dataProtein.setColor(Color.CYAN);\n dataProtein.setLineWidth(2f);\n\n LineDataSet dataSugar = addValues(\"Sugar\",sugar);\n dataSugar.setColor(Color.MAGENTA);\n dataSugar.setLineWidth(2f);\n\n LineDataSet dataTotalFat = addValues(\"Total Fat\", totalfat);\n dataTotalFat.setColor(Color.rgb(248\t,131, 121));\n dataTotalFat.setLineWidth(2f);\n\n LineData lineData = new LineData(dataCalories, dataCalcium ,dataSodium, dataCarbs, dataIron, dataSugar, dataProtein, dataTotalFat, dataCholesterol);\n historyChart.setData(lineData);\n historyChart.getXAxis().setDrawAxisLine(true);\n historyChart.setVisibleXRange(0, xAxis.size() - 1);\n historyChart.getXAxis().setValueFormatter(new MyXAxisValueFormatter(xAxis));\n historyChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n historyChart.enableScroll();\n historyChart.getDescription().setEnabled(false);\n historyChart.getXAxis().setLabelCount(7, true);\n historyChart.setExtraBottomOffset(20f);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n });\n\n designChart(xAxis);\n historyChart.invalidate();\n }", "public void paintComponent(Graphics g)\n {\n Graphics2D g2 = (Graphics2D) g;\n \n //draws the lines\n g2.drawLine(0,200,800,200);\n g2.drawLine(0,400,800,400);\n \n //draws the bars on the bar graph\n int counter = 55;\n \n for(int i = 0; i < 30; i++)\n {\n bar[i] = new Rectangle();\n bar[i].x = counter;\n bar[i].y = 400 - a[i] * 3;\n bar[i].width = 15;\n bar[i].height = a[i] * 3;\n \n int color = 0;\n color = a[i];\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(bar[i]);\n g2.setColor(Color.BLACK);\n g2.draw(bar[i]);\n \n if(a[i] != 0)\n {\n Font font = new Font(\"Arial\", Font.BOLD, 12);\n g2.setFont(font);\n \n if(a[i] / 10 == 0)\n {\n g2.drawString(\"0\" + a[i] , counter+1, 390-a[i]*3);\n }\n else\n g2.drawString(\"\" + a[i] , counter+1, 390-a[i]*3);\n }\n \n counter = counter + 24;\n }\n \n Font font1 = new Font(\"Arial\", Font.PLAIN, 12);\n g2.setFont(font1);\n \n //draws the values\n for(int i = 0; i < 10; i++)\n {\n g2.drawString(i + \"\", i*75 + 60, 215);\n }\n \n \n \n \n //draws the buckets\n for(int i = 0; i < k; i++)\n {\n g2.drawString(\"Bucket\", 1, 215);\n g2.drawString(\"Values\", 1, 415);\n \n \n if(zero.size() != 0)\n {\n for(int j = 0; j < zero.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 50;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n \n int color = 0;\n color = zero.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(one.size() != 0)\n {\n for(int j = 0; j < one.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 125;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = one.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(two.size() != 0)\n {\n for(int j = 0; j < two.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 200;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = two.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(three.size() != 0)\n {\n for(int j = 0; j < three.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 275;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = three.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n \n if(four.size() != 0)\n {\n for(int j = 0; j < four.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 350;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = four.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(five.size() != 0)\n {\n for(int j = 0; j < five.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 425;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = five.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(six.size() != 0)\n {\n for(int j = 0; j < six.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 500;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = six.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(seven.size() != 0)\n {\n for(int j = 0; j < seven.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 575;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = seven.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(eight.size() != 0)\n {\n for(int j = 0; j < eight.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 650;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = eight.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n if(nine.size() != 0)\n {\n for(int j = 0; j < nine.size(); j++)\n {\n rect[j] = new Rectangle();\n rect[j].x = 725;\n rect[j].y = 185 - j*15;\n rect[j].width = 25;\n rect[j].height = 15;\n g2.draw(rect[j]);\n \n \n int color = 0;\n color = nine.get(j);\n \n if(color > 0 && color <=4)\n g2.setColor(Color.RED);\n if(color > 4 && color <=9)\n g2.setColor(Color.ORANGE);\n if(color > 9 && color <=14)\n g2.setColor(Color.YELLOW);\n if(color > 14 && color <=19)\n g2.setColor(Color.GREEN);\n if(color > 19 && color <=24)\n g2.setColor(Color.CYAN);\n if(color > 24 && color <=29)\n g2.setColor(Color.BLUE);\n if(color > 29 && color <=34)\n g2.setColor(Color.PINK);\n if(color > 34 && color <=39)\n g2.setColor(Color.MAGENTA);\n if(color > 39 && color <=44)\n g2.setColor(Color.LIGHT_GRAY); \n if(color > 44 && color <=49)\n g2.setColor(Color.DARK_GRAY);\n if(color == 50)\n g2.setColor(Color.BLACK);\n \n g2.fill(rect[j]);\n g2.setColor(Color.BLACK);\n g2.draw(rect[j]);\n }\n }\n }\n \n //copies original array to an array list\n //copies final array to an array list\n ArrayList<Integer> startingArrayList = new ArrayList<Integer>();\n ArrayList<Integer> finalArrayList = new ArrayList<Integer>();\n for(int i = 0; i < 30; i++)\n {\n startingArrayList.add(b[i]);\n finalArrayList.add(a[i]);\n }\n \n //displays original and final array\n Font font3 = new Font(\"Arial\", Font.PLAIN, 13);\n g2.setFont(font3); \n g2.drawString(\"The number of comparisons are: 0\", 2, 475);\n g2.drawString(\"The number of swaps are: \" + s, 2, 500);\n g2.drawString(\"The original numbers are: \" + startingArrayList, 2, 525);\n g2.drawString(\"The sorted numbers are: \" + finalArrayList, 2, 550);\n }", "public JFreeChart createChart(CategoryDataset dataset) {\n CategoryAxis categoryAxis = new CategoryAxis(\"\");\n ValueAxis valueAxis = new NumberAxis(\"\");\n valueAxis.setVisible(false);\n BarRenderer renderer = new BarRenderer() {\n\n @Override\n public Paint getItemPaint(int row, int column) {\n return Color.blue;\n// switch (column) {\n// case 0:\n// return Color.red;\n// case 1:\n// return Color.yellow;\n// case 2:\n// return Color.blue;\n// case 3:\n// return Color.orange;\n// case 4:\n// return Color.gray;\n// case 5:\n// return Color.green.darker();\n// default:\n// return Color.red;\n// }\n }\n };\n renderer.setDrawBarOutline(false);\n renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());\n renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(\n ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER));\n renderer.setBaseItemLabelsVisible(Boolean.TRUE);\n renderer.setBarPainter(new StandardBarPainter());\n CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis, renderer);\n JFreeChart chart = new JFreeChart(\"\", JFreeChart.DEFAULT_TITLE_FONT, plot, false);\n chart.setBackgroundPaint(Color.white);\n return chart;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_five, container, false);\n initView(view);\n\n entries.add(new BarEntry(new float[]{16f,20f}, 0));\n entries.add(new BarEntry(new float[]{20f,25f}, 1));\n\n barDataSet = new BarDataSet(entries, \"\");\n barDataSet.setColors(new int[]{Color.GREEN,Color.YELLOW});\n barDataSet.setValueFormatter(new PercentFormatter());\n barDataSet.setStackLabels(new String[]{\"有违法\",\"无违法\"});\n barDataSet.setValueTextSize(20);\n barData = new BarData(s, barDataSet);\n mBar2chart.setData(barData);\n mBar2chart.setDescription(\"\");\n mBar2chart.getAxisRight().setEnabled(false);\n mBar2chart.getLegend().setPosition(Legend.LegendPosition.RIGHT_OF_CHART_CENTER);\n XAxis xAxis = mBar2chart.getXAxis();\n xAxis.setTextSize(15);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setDrawGridLines(false);\n\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_stat, container, false);\r\n final BarChart barChart = root.findViewById(R.id.barchart);\r\n Db db = new Db(getContext());\r\n int b = db.getCountScans(uid, \"bar\");\r\n int q = db.getCountScans(uid, \"qr\");\r\n if (b == 0 && q == 0) {\r\n android.support.v7.app.AlertDialog ad = new android.support.v7.app.AlertDialog.Builder(\r\n getContext()).create();\r\n ad.setTitle(\"No Scans\");\r\n ad.setMessage(\"Nothing scanned yet.\");\r\n ad.setIcon(R.drawable.emptybox);\r\n ad.show();\r\n\r\n }\r\n else{\r\n ArrayList<BarEntry> barEntries = new ArrayList<>();\r\n barEntries.add(new BarEntry(0, b));\r\n barEntries.add(new BarEntry(1, q));\r\n BarDataSet dataSet = new BarDataSet(barEntries, \"Scanned Items\");\r\n dataSet.setColors(ColorTemplate.JOYFUL_COLORS);\r\n dataSet.setDrawValues(true);\r\n BarData data = new BarData(dataSet);\r\n // Format data as percentage\r\n //data.setValueFormatter(new PercentFormatter());\r\n barChart.setData(data);\r\n final ArrayList<String> xVals = new ArrayList<>();\r\n xVals.add(\"Bar\");\r\n xVals.add(\"QR \");\r\n // Display labels for bars\r\n barChart.getXAxis().setValueFormatter(new IndexAxisValueFormatter(xVals));\r\n barChart.getXAxis().setLabelCount(2);\r\n barChart.getAxisLeft().setAxisMaximum(40);}\r\n return root;\r\n }", "private void createChart() {\n // Preparing...\n String selectedDate = periodComboBox.getSelectedItem().toString();\n String selectedPeriod = periodComboBox.getSelectedItem().toString();\n String periodType = periodTypeComboBox.getSelectedItem().toString();\n periodList = new ArrayList<>();\n PieChart chart;\n\n switch (periodType) {\n case \"Monthly\":\n // Configuring panel\n chartPanel.removeAll();\n chartPanel.revalidate();\n\n // Gathering data\n periodList = new ArrayList<>();\n monthlyTotals.stream().filter((w) -> (w.getDate().equals(selectedDate))).forEach((w) -> {\n periodList.add(w);\n });\n\n // Creating chart\n if (pieChartRadioButton.isSelected()) {\n chart = new PieChart(selectedPeriod + \" Totals\", periodList);\n chartPanel.add(chart.getContentPane());\n chart.pack();\n } else if (barGraphRadioButton.isSelected()) {\n BarGraph bg = new BarGraph(\"\", selectedPeriod + \" Totals\", periodList);\n chartPanel.add(bg.getContentPane());\n bg.pack();\n }\n\n // Displaying\n chartPanel.repaint();\n break;\n case \"Yearly\":\n // Configuring panel\n chartPanel.removeAll();\n chartPanel.revalidate();\n\n // Gathering data\n periodList = new ArrayList<>();\n yearlyTotals.stream().filter((w) -> (w.getDate().equals(selectedDate))).forEach((w) -> {\n periodList.add(w);\n });\n\n // Creating chart\n if (pieChartRadioButton.isSelected()) {\n chart = new PieChart(selectedPeriod + \" Totals\", periodList);\n chartPanel.add(chart.getContentPane());\n chart.pack();\n } else if (barGraphRadioButton.isSelected()) {\n BarGraph bg = new BarGraph(\"\", selectedPeriod + \" Totals\", periodList);\n chartPanel.add(bg.getContentPane());\n bg.pack();\n }\n\n // Displaying\n chartPanel.repaint();\n break;\n case \"Historical\":\n // Configuring panel\n chartPanel.removeAll();\n chartPanel.revalidate();\n\n // Creating chart\n if (pieChartRadioButton.isSelected()) {\n chart = new PieChart(\"Historical Totals\", historicalTotals);\n chartPanel.add(chart.getContentPane());\n chart.pack();\n } else if (barGraphRadioButton.isSelected()) {\n BarGraph bg = new BarGraph(\"\", \"Historical Totals\", historicalTotals);\n chartPanel.add(bg.getContentPane());\n bg.pack();\n }\n\n // Displaying\n chartPanel.repaint();\n }\n }", "public JFreeChart render();", "@Override\n\tpublic GraphicalView makeChart(Context context) {\n\t\tXYMultipleSeriesRenderer renderer = getRenderer(context);\n\t\tchartView = ChartFactory.getBarChartView(context, getDataset(),renderer, Type.DEFAULT);\n\t\t// Return the view so it can be showed.\n\t\treturn chartView;\n\t}", "private static JFreeChart createChart(CategoryDataset dataset) {\n JFreeChart chart = ChartFactory.createLineChart(\n \"Line Chart\", null /* x-axis label*/, \n \"Range\" /* y-axis label */, dataset);\n chart.addSubtitle(new TextTitle(\" Its is generated to show patient History \" \n ));\n chart.setBackgroundPaint(Color.white);\n CategoryPlot plot = (CategoryPlot) chart.getPlot();\n\tNumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();\n rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\n // Line renderer = (BarRenderer) plot.getRenderer();\n // renderer.setDrawBarOutline(false);\n // LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer(); \n//renderer.setItemMargin(3); \n//renderer.setItemLabelsVisible(true);\n chart.getLegend().setFrame(BlockBorder.NONE);\n return chart;\n }", "public JFreeChart createChart(IntervalXYDataset paramIntervalXYDataset) {\n\n\n JFreeChart jfreechart = ChartFactory.createXYBarChart(\n \"Spread Example\", //title\n \"Resource\", //xAxisLabel\n false, //dateAxis\n \"Timing\", //yAxisLabel\n paramIntervalXYDataset, //dataset\n PlotOrientation.VERTICAL, //orientation\n true, //legend\n true, //tooltips\n false); //urls\n\n\n\n XYPlot xyplot = (XYPlot) jfreechart.getPlot();\n\n xyplot.setBackgroundPaint(Color.white);\n xyplot.setRangeGridlinePaint(Color.darkGray);//vertical\n xyplot.setDomainGridlinePaint(Color.LIGHT_GRAY);//horizontal\n\n// xyplot.setDomainAxis(createTimeAxis());\n xyplot.setDomainAxis(createSymbolAxis());\n\n xyplot.setFixedLegendItems(createLegend());\n\n MyXYBarRenderer xyBarRenderer = new MyXYBarRenderer();\n xyBarRenderer.setUseYInterval(true);\n\n xyBarRenderer.setShadowVisible(false);\n\n xyBarRenderer.setDrawBarOutline(true);\n xyBarRenderer.setBaseOutlinePaint(Color.DARK_GRAY);\n\n xyBarRenderer.setBaseItemLabelFont(new Font(\"Arial\", Font.PLAIN, 10));\n\n xyBarRenderer.setMargin(0.2);\n xyplot.setRenderer(0, xyBarRenderer, true);\n\n//xyBarRenderer.\n\n\n MyXYBarPainter barPainter = new MyXYBarPainter((XYTaskDataset) paramIntervalXYDataset);\n barPainter.setPainterType(MyXYBarPainter.PainterType.GRADIENT);\n xyBarRenderer.setBarPainter(barPainter);\n\n\n\n //Item-Label:\n xyBarRenderer.setBaseItemLabelsVisible(true);\n xyBarRenderer.setBaseItemLabelGenerator(createItemLabelGenerator());\n xyBarRenderer.setBasePositiveItemLabelPosition(createItemLabelPosition());\n\n\n\n xyBarRenderer.setBaseToolTipGenerator(createTooltipGenerator());\n\n\n\n//PeriodAxis xaxis= new PeriodAxis(\"kk\");\n\n xyplot.setRangeAxis(createTimeAxis());\n// xyplot.setRangeAxis(createSymbolAxis());\n\n\n\n// DateAxis xaxis = new DateAxis();\n// xaxis.setVerticalTickLabels(true);\n// xyplot.setRangeAxis(xaxis);\n xyplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);\n\n// ChartUtilities.applyCurrentTheme(jfreechart);\n\n return jfreechart;\n }", "public HistogramTest(String title) {\r\n super(title);\r\n IntervalXYDataset dataset = createDataset();\r\n JFreeChart chart = createChart(dataset);\r\n ChartPanel chartPanel = new ChartPanel(chart);\r\n chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));\r\n chartPanel.setMouseZoomable(true, false);\r\n setContentPane(chartPanel);\r\n }", "public void draw(int[] moduleMarks) {\n\t\t\r\n\t\tboolean[] coreModule = new boolean[] { true, false, true, true, true, true }; // creating a boolean array to work out if a module is core or not\r\n\t\t\r\n\t\tBar x = new Bar(); // creating an object called 'x' which will be the x axis on my graph\r\n\t\tx.makeVisible(); // making the object visible\r\n\t\tx.changeSize(200, 5); // making the object into the shape of a thin line\r\n\t\tx.changeColour(Colour.BLACK); // making the line black\r\n\t\tx.moveVertical(200); //aligning the line so it is in the correct place\r\n\t\t\r\n\t\tBar y = new Bar(); // creating an object called 'y' which will be the y axis on my graph\r\n\t\ty.makeVisible(); // making the object visible\r\n\t\ty.changeSize(5, 200); // making the object into the shape of a thin line\r\n\t\ty.changeColour(Colour.BLACK); // making the line black\r\n\t\t\r\n\t\tint xPosition = 5; // Stating x position for the bars\r\n\t\tint xDistance = 23; // the distance the bars are moved to the right\r\n\t\r\n\t\tfor (int i = 0; i < moduleMarks.length; i++){ // creating a for loop for creating the bars\r\n\t\t\t\r\n\t\t\tBar j = new Bar(); // making an object j which will by the bars for each module\r\n\t\t\tj.makeVisible(); // making the bars visible\r\n\t\t\tj.moveHorizontal(xPosition); // sets the horizontal position of the bars to 'xPosition'\r\n\t\t\txPosition += xDistance; // each time a new bar is created it adds the xDistance to the previous position.\r\n\t\t\tj.changeSize(20, moduleMarks[i]); //changing the size of the bars depending on the results\r\n\t\t\tj.moveVertical(200 - moduleMarks[i]); // changes the height of the bars depending on the marks\r\n\t\t\t\r\n\t\t\tif (moduleMarks[i] > 70){ //changes the colour of the bars depending on the result which the student got\r\n\t\t\t\tj.changeColour(Colour.MAGENTA);\r\n\t\t\t}\r\n\t\t\telse if(moduleMarks[i] >= 40){\r\n\t\t\t\tj.changeColour(Colour.GREEN);\r\n\t\t\t}\r\n\t\t\telse if(moduleMarks[i] < 40 && moduleMarks[i] > 35 && coreModule[i] == true){\r\n\t\t\t\tj.changeColour(Colour.YELLOW);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tj.changeColour(Colour.RED);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) {\n/* */ double x1;\n/* 228 */ if (!getItemVisible(row, column)) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 234 */ if (!(dataset instanceof StatisticalCategoryDataset)) {\n/* 235 */ super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass);\n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 240 */ int visibleRow = state.getVisibleSeriesIndex(row);\n/* 241 */ if (visibleRow < 0) {\n/* */ return;\n/* */ }\n/* 244 */ int visibleRowCount = state.getVisibleSeriesCount();\n/* */ \n/* 246 */ StatisticalCategoryDataset statDataset = (StatisticalCategoryDataset)dataset;\n/* */ \n/* 248 */ Number meanValue = statDataset.getMeanValue(row, column);\n/* 249 */ if (meanValue == null) {\n/* */ return;\n/* */ }\n/* 252 */ PlotOrientation orientation = plot.getOrientation();\n/* */ \n/* */ \n/* */ \n/* 256 */ if (getUseSeriesOffset()) {\n/* 257 */ x1 = domainAxis.getCategorySeriesMiddle(column, dataset\n/* 258 */ .getColumnCount(), visibleRow, visibleRowCount, \n/* */ \n/* 260 */ getItemMargin(), dataArea, plot.getDomainAxisEdge());\n/* */ } else {\n/* */ \n/* 263 */ x1 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea, plot\n/* 264 */ .getDomainAxisEdge());\n/* */ } \n/* 266 */ double y1 = rangeAxis.valueToJava2D(meanValue.doubleValue(), dataArea, plot\n/* 267 */ .getRangeAxisEdge());\n/* */ \n/* */ \n/* */ \n/* */ \n/* 272 */ Number sdv = statDataset.getStdDevValue(row, column);\n/* 273 */ if (pass == 1 && sdv != null) {\n/* */ double lowVal, highVal;\n/* 275 */ RectangleEdge yAxisLocation = plot.getRangeAxisEdge();\n/* 276 */ double valueDelta = sdv.doubleValue();\n/* */ \n/* 278 */ if (meanValue.doubleValue() + valueDelta > rangeAxis\n/* 279 */ .getRange().getUpperBound()) {\n/* 280 */ highVal = rangeAxis.valueToJava2D(rangeAxis\n/* 281 */ .getRange().getUpperBound(), dataArea, yAxisLocation);\n/* */ }\n/* */ else {\n/* */ \n/* 285 */ highVal = rangeAxis.valueToJava2D(meanValue.doubleValue() + valueDelta, dataArea, yAxisLocation);\n/* */ } \n/* */ \n/* */ \n/* 289 */ if (meanValue.doubleValue() + valueDelta < rangeAxis\n/* 290 */ .getRange().getLowerBound()) {\n/* 291 */ lowVal = rangeAxis.valueToJava2D(rangeAxis\n/* 292 */ .getRange().getLowerBound(), dataArea, yAxisLocation);\n/* */ }\n/* */ else {\n/* */ \n/* 296 */ lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue() - valueDelta, dataArea, yAxisLocation);\n/* */ } \n/* */ \n/* */ \n/* 300 */ if (this.errorIndicatorPaint != null) {\n/* 301 */ g2.setPaint(this.errorIndicatorPaint);\n/* */ } else {\n/* */ \n/* 304 */ g2.setPaint(getItemPaint(row, column));\n/* */ } \n/* 306 */ if (this.errorIndicatorStroke != null) {\n/* 307 */ g2.setStroke(this.errorIndicatorStroke);\n/* */ } else {\n/* */ \n/* 310 */ g2.setStroke(getItemOutlineStroke(row, column));\n/* */ } \n/* 312 */ Line2D line = new Line2D.Double();\n/* 313 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 314 */ line.setLine(lowVal, x1, highVal, x1);\n/* 315 */ g2.draw(line);\n/* 316 */ line.setLine(lowVal, x1 - 5.0D, lowVal, x1 + 5.0D);\n/* 317 */ g2.draw(line);\n/* 318 */ line.setLine(highVal, x1 - 5.0D, highVal, x1 + 5.0D);\n/* 319 */ g2.draw(line);\n/* */ } else {\n/* */ \n/* 322 */ line.setLine(x1, lowVal, x1, highVal);\n/* 323 */ g2.draw(line);\n/* 324 */ line.setLine(x1 - 5.0D, highVal, x1 + 5.0D, highVal);\n/* 325 */ g2.draw(line);\n/* 326 */ line.setLine(x1 - 5.0D, lowVal, x1 + 5.0D, lowVal);\n/* 327 */ g2.draw(line);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 332 */ Shape hotspot = null;\n/* 333 */ if (pass == 1 && getItemShapeVisible(row, column)) {\n/* 334 */ Shape shape = getItemShape(row, column);\n/* 335 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 336 */ shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);\n/* */ }\n/* 338 */ else if (orientation == PlotOrientation.VERTICAL) {\n/* 339 */ shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);\n/* */ } \n/* 341 */ hotspot = shape;\n/* */ \n/* 343 */ if (getItemShapeFilled(row, column)) {\n/* 344 */ if (getUseFillPaint()) {\n/* 345 */ g2.setPaint(getItemFillPaint(row, column));\n/* */ } else {\n/* */ \n/* 348 */ g2.setPaint(getItemPaint(row, column));\n/* */ } \n/* 350 */ g2.fill(shape);\n/* */ } \n/* 352 */ if (getDrawOutlines()) {\n/* 353 */ if (getUseOutlinePaint()) {\n/* 354 */ g2.setPaint(getItemOutlinePaint(row, column));\n/* */ } else {\n/* */ \n/* 357 */ g2.setPaint(getItemPaint(row, column));\n/* */ } \n/* 359 */ g2.setStroke(getItemOutlineStroke(row, column));\n/* 360 */ g2.draw(shape);\n/* */ } \n/* */ \n/* 363 */ if (isItemLabelVisible(row, column)) {\n/* 364 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 365 */ drawItemLabel(g2, orientation, dataset, row, column, y1, x1, \n/* 366 */ (meanValue.doubleValue() < 0.0D));\n/* */ }\n/* 368 */ else if (orientation == PlotOrientation.VERTICAL) {\n/* 369 */ drawItemLabel(g2, orientation, dataset, row, column, x1, y1, \n/* 370 */ (meanValue.doubleValue() < 0.0D));\n/* */ } \n/* */ }\n/* */ } \n/* */ \n/* 375 */ if (pass == 0 && getItemLineVisible(row, column) && \n/* 376 */ column != 0) {\n/* */ \n/* 378 */ Number previousValue = statDataset.getValue(row, column - 1);\n/* 379 */ if (previousValue != null) {\n/* */ \n/* */ \n/* 382 */ double x0, previous = previousValue.doubleValue();\n/* */ \n/* 384 */ if (getUseSeriesOffset()) {\n/* 385 */ x0 = domainAxis.getCategorySeriesMiddle(column - 1, dataset\n/* 386 */ .getColumnCount(), visibleRow, visibleRowCount, \n/* */ \n/* 388 */ getItemMargin(), dataArea, plot\n/* 389 */ .getDomainAxisEdge());\n/* */ } else {\n/* */ \n/* 392 */ x0 = domainAxis.getCategoryMiddle(column - 1, \n/* 393 */ getColumnCount(), dataArea, plot\n/* 394 */ .getDomainAxisEdge());\n/* */ } \n/* 396 */ double y0 = rangeAxis.valueToJava2D(previous, dataArea, plot\n/* 397 */ .getRangeAxisEdge());\n/* */ \n/* 399 */ Line2D line = null;\n/* 400 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 401 */ line = new Line2D.Double(y0, x0, y1, x1);\n/* */ }\n/* 403 */ else if (orientation == PlotOrientation.VERTICAL) {\n/* 404 */ line = new Line2D.Double(x0, y0, x1, y1);\n/* */ } \n/* 406 */ g2.setPaint(getItemPaint(row, column));\n/* 407 */ g2.setStroke(getItemStroke(row, column));\n/* 408 */ g2.draw(line);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 413 */ if (pass == 1) {\n/* */ \n/* 415 */ EntityCollection entities = state.getEntityCollection();\n/* 416 */ if (entities != null) {\n/* 417 */ addEntity(entities, hotspot, dataset, row, column, x1, y1);\n/* */ }\n/* */ } \n/* */ }", "private void addBarGraphRenderers() {\n Paint paint = new Paint();\n paint.setStrokeWidth(50f);\n paint.setAntiAlias(true);\n paint.setColor(Color.argb(200, 56, 138, 252));\n BarGraphRenderer barGraphRendererBottom = new BarGraphRenderer(16, paint, false);\n mVisualizerView.addRenderer(barGraphRendererBottom);\n\n Paint paint2 = new Paint();\n paint2.setStrokeWidth(12f);\n paint2.setAntiAlias(true);\n paint2.setColor(Color.argb(200, 181, 111, 233));\n BarGraphRenderer barGraphRendererTop = new BarGraphRenderer(4, paint2, true);\n mVisualizerView.addRenderer(barGraphRendererTop);\n }", "public void updateChart() {\n\t\tdouble val_min = Double.MAX_VALUE;\n\t\tdouble val_max = -Double.MAX_VALUE;\n\t\tVector<CurveData> cdV = new Vector<CurveData>();\n\n\t\tint maxMarkLength = 1;\n\t\tint nClmns = barColumns.size();\n\t\tint nMaxLines = 0;\n\t\tfor ( final BarColumn bc : barColumns ) {\n\t\t\tif (bc.show()) {\n\t\t\t\tfor (int j = 0; j < bc.size(); j++) {\n\t\t\t\t\tif (val_min > bc.value(j)) {\n\t\t\t\t\t\tval_min = bc.value(j);\n\t\t\t\t\t}\n\t\t\t\t\tif (val_max < bc.value(j)) {\n\t\t\t\t\t\tval_max = bc.value(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (nMaxLines < bc.size()) {\n\t\t\t\tnMaxLines = bc.size();\n\t\t\t}\n\t\t\tif (maxMarkLength < bc.marker().length()) {\n\t\t\t\tmaxMarkLength = bc.marker().length();\n\t\t\t}\n\t\t}\n\n\t\tString tmp_str = \"\";\n\t\tfor (int i = 0; i < maxMarkLength; i++) {\n\t\t\ttmp_str = tmp_str + \" \";\n\t\t}\n\t\temptyStr = tmp_str;\n\n\t\t//System.out.println(\"debug =========== val_min=\" + val_min + \" val_max=\" + val_max);\n\n\t\tif (val_min * val_max > 0.) {\n\t\t\tif (val_min > 0.) {\n\t\t\t\tval_min = 0.;\n\t\t\t} else {\n\t\t\t\tval_max = 0.;\n\t\t\t}\n\t\t}\n\n\t\tint iMin = GP.getScreenX(GP.getCurrentMinX());\n\t\tint iMax = GP.getScreenX(GP.getCurrentMaxX());\n\t\t//System.out.println(\"debug iMin=\" + iMin + \" iMax=\" + iMax);\n\t\twidth = (int) ((iMax - iMin) / (1.9 * nMaxLines * nClmns));\n\t\t//System.out.println(\"debug width=\" + width);\n\t\tif (width < 1) {\n\t\t\twidth = 1;\n\t\t}\n\n\t\t//make line from\n\t\tCurveData cd = cvV.get(0);\n\t\tif (nClmns > 0) {\n\t\t\tcd.clear();\n\t\t\tcd.addPoint(0., 0.);\n\t\t\tcd.addPoint(1.0 * (nClmns + 1), 0.);\n\t\t\tcd.setColor(Color.black);\n\t\t\tcd.setLineWidth(1);\n\t\t\tcd.findMinMax();\n\t\t\tcdV.add(cd);\n\t\t}\n\n\t\tint cvCount = 1;\n\t\tfor (int i = 1; i <= nClmns; i++) {\n\t\t\tBarColumn bc = barColumns.get(i - 1);\n\t\t\tif (bc.show()) {\n\t\t\t\tdouble d_min = i - 0.35;\n\t\t\t\tdouble d_max = i + 0.35;\n\t\t\t\tint nL = bc.size();\n\t\t\t\tdouble st = (d_max - d_min) / nL;\n\t\t\t\tfor (int j = 0; j < nL; j++) {\n\t\t\t\t\tif (bc.show(j)) {\n\t\t\t\t\t\tif(cvCount < cvV.size()){\n\t\t\t\t\t\t\tcd = cvV.get(cvCount);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcd = new CurveData();\n\t\t\t\t\t\t\tcvV.add(cd);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcd.clear();\n\t\t\t\t\t\tcd.addPoint(d_min + (j + 0.5) * st, 0.);\n\t\t\t\t\t\tcd.addPoint(d_min + (j + 0.5) * st, bc.value(j));\n\t\t\t\t\t\tcd.setLineWidth(width);\n\t\t\t\t\t\tif (bc.getColor(j) == null) {\n\t\t\t\t\t\t\tcd.setColor(bcColor.getColor(j));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcd.setColor(bc.getColor(j));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcd.findMinMax();\n\t\t\t\t\t\tcdV.add(cd);\n\t\t\t\t\t\tcvCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//System.out.println(\"debug ===========start plotting=============== nClmns= \" + nClmns);\n\t\tif (val_min < val_max) {\n\t\t\tformatter.makeAnalysis(val_min, val_max);\n\t\t\tGP.setNumberFormatY(formatter.getFormat());\n\t\t\tGP.setLimitsAndTicksY(formatter.getMin(), formatter.getMax(), formatter.getStep());\n\t\t}\n\n\t\tif (barColumns.size() >= 10) {\n\t\t\tGP.getCurrentGL().setXminOn(false);\n\t\t\tGP.getCurrentGL().setXmaxOn(false);\n\t\t}\n\n\t\tif (cdV.size() > 0) {\n\t\t\tGP.setCurveData(cdV);\n\t\t} else {\n\t\t\tGP.removeAllCurveData();\n\t\t}\n\t}", "public GraphicalView execute(Context context) {\r\n double[] minValues = new double[] { 4300, 3500, 5300, 4900, 3800, 2900, };\r\n double[] maxValues = new double[] { 8000,7000, 9700, 8600, 7000, 6500};\r\n\r\n XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();\r\n RangeCategorySeries series = new RangeCategorySeries(\"波动情况\");\r\n int length = minValues.length;\r\n for (int k = 0; k < length; k++) {\r\n series.add(minValues[k], maxValues[k]);\r\n }\r\n dataset.addSeries(series.toXYSeries());\r\n int[] colors = new int[] { Color.CYAN };\r\n XYMultipleSeriesRenderer renderer = buildBarRenderer(colors);\r\n setChartSettings(renderer, \"好友们最近一周的能量波动范围\", \"用户\", \"能量值\", 0.5, 6.5,\r\n 2000, 12000, Color.GRAY, Color.LTGRAY);\r\n renderer.setBarSpacing(1);\r\n renderer.setXLabels(0);\r\n renderer.setYLabels(10);\r\n renderer.addXTextLabel(1, \"任东卫\");\r\n renderer.addXTextLabel(2, \"罗智宜\");\r\n renderer.addXTextLabel(3, \"郭子涵\");\r\n renderer.addXTextLabel(4, \"谢以荷\");\r\n renderer.addXTextLabel(5, \"赵一援\");\r\n renderer.addXTextLabel(6, \"萧之雁\");\r\n renderer.addYTextLabel(3000, \"心情差\");\r\n renderer.addYTextLabel(4500, \"心情有点差\");\r\n renderer.addYTextLabel(6000, \"心情一般\");\r\n renderer.addYTextLabel(8500, \"心情棒\");\r\n renderer.setMargins(new int[] {30, 70, 30, 70});\r\n renderer.setYLabelsAlign(Align.RIGHT);\r\n SimpleSeriesRenderer r = renderer.getSeriesRendererAt(0);\r\n r.setDisplayChartValues(true);\r\n r.setChartValuesTextSize(12);\r\n r.setChartValuesSpacing(3);\r\n r.setGradientEnabled(true);\r\n r.setGradientStart(4000, Color.parseColor(\"#B0C4DE\"));\r\n r.setGradientStop(8000, Color.parseColor(\"#00AAAA\"));\r\n return ChartFactory.getRangeBarChartView(context, dataset, renderer, Type.DEFAULT);\r\n }", "public void drawChart() {\n ArrayList<Entry> confuse = new ArrayList<>();\n ArrayList<Entry> attention = new ArrayList<>();\n ArrayList<Entry> engagement = new ArrayList<>();\n ArrayList<Entry> joy = new ArrayList<>();\n ArrayList<Entry> valence = new ArrayList<>();\n // point = \"Brow Furrow: \\n\";\n String dum = null, dum2 = null;\n for (int i = 0; i < size; i++) {\n //point += (\"\" + Emotion.getBrowFurrow(i).getL() + \" seconds reading of \" + Emotion.getBrowFurrow(i).getR() + \"\\n\");\n dum2 = Emotion.getBrowFurrow(i).getL().toString();\n dum = Emotion.getBrowFurrow(i).getR().toString();\n confuse.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getAttention(i).getL().toString();\n dum = Emotion.getAttention(i).getR().toString();\n attention.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getEngagement(i).getL().toString();\n dum = Emotion.getEngagement(i).getR().toString();\n engagement.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getJoy(i).getL().toString();\n dum = Emotion.getJoy(i).getR().toString();\n joy.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n dum2 = Emotion.getValence(i).getL().toString();\n dum = Emotion.getValence(i).getR().toString();\n valence.add(new Entry((float)Double.parseDouble(dum2), Float.parseFloat(dum)));\n }\n\n LineDataSet data1 = new LineDataSet(confuse,\"Confuse\");\n LineDataSet data2 = new LineDataSet(attention,\"Attention\");\n LineDataSet data3 = new LineDataSet(engagement,\"Engagement\");\n LineDataSet data4 = new LineDataSet(joy,\"Engagement\");\n LineDataSet data5 = new LineDataSet(valence,\"Valence\");\n data1.setColor(Color.BLUE);\n data1.setDrawCircles(false);\n data2.setColor(Color.YELLOW);\n data2.setDrawCircles(false);\n data3.setColor(Color.GRAY);\n data3.setDrawCircles(false);\n data4.setColor(Color.MAGENTA);\n data4.setDrawCircles(false);\n data5.setColor(Color.GREEN);\n data5.setDrawCircles(false);\n\n\n dataSets.add(data1);\n dataSets.add(data2);\n dataSets.add(data3);\n dataSets.add(data4);\n dataSets.add(data5);\n }", "public ChartPanel createChartPanel(QueryResult myResult) throws Exception {\n\n myChart = makeChart(myResult);\n\n // create the chart frame and display it \n ChartPanel myChartPanel = new ChartPanel(myChart);\n\n return myChartPanel;\n }", "public void getPaedCommodSTKA(final String mUid,final String mYear, final String mWeekNo){\n mCombComdtySTKC = new CombComdtySTKC() {\n @Override\n protected void onPostExecute(String results) {\n // dialog.dismiss();\n if (!results.equalsIgnoreCase(\"error\")) {\n try {\n JSONObject objAdults = new JSONObject(results);\n if(objAdults.getString(\"status\").equalsIgnoreCase(\"ok\")) {\n Log.e(\"here CombData\", \"\"+results);\n JSONArray mRes = objAdults.getJSONArray(\"results\");\n\n String[] weeks = new String[mRes.length()];\n\n for(int i= 0; i< mRes.length();i++){\n JSONArray array = mRes.getJSONArray(i);\n ClientRisk.add(new BarEntry(i+1, array.getInt(2)));\n StockoutRates.add(new Entry(i+1,(float) array.getDouble(1)));\n ReportingRates.add(new Entry(i+1, (float) array.getDouble(3)));\n weeks[i] = array.getString(0);\n\n }\n Collections.sort(ClientRisk, new EntryXComparator());\n Collections.sort(StockoutRates, new EntryXComparator());\n Collections.sort(ReportingRates, new EntryXComparator());\n mChart.setDrawGridBackground(true);\n mChart.setDrawBarShadow(false);\n mChart.setClickable(false);\n mChart.setHighlightFullBarEnabled(false);\n // draw bars behind lines\n mChart.setDrawOrder(new CombinedChart.DrawOrder[]{\n CombinedChart.DrawOrder.BAR, CombinedChart.DrawOrder.LINE\n });\n\n mChart.setOnTouchListener(new View.OnTouchListener(){\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return false;\n }\n });\n //Set the Legends Orientation\n Legend l = mChart.getLegend();\n l.setWordWrapEnabled(true);\n l.setVerticalAlignment(Legend.LegendVerticalAlignment.BOTTOM);\n l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.CENTER);\n l.setOrientation(Legend.LegendOrientation.HORIZONTAL);\n\n //Set Right And Left Axis\n YAxis rightAxis = mChart.getAxisRight();\n rightAxis.setDrawGridLines(false);\n rightAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n //rightAxis.setAxisMaximum(80000f);\n\n YAxis leftAxis = mChart.getAxisLeft();\n leftAxis.setDrawGridLines(false);\n leftAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)\n leftAxis.setAxisMaximum(80f);\n\n //Set X-Axis Lables\n XAxis xAxis = mChart.getXAxis();\n xAxis.setAxisMinimum(0f);\n xAxis.setGranularity(1f);\n xAxis.setValueFormatter(new IndexAxisValueFormatter(weeks));\n xAxis.setLabelRotationAngle(45);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setGranularityEnabled(true);\n xAxis.setLabelCount(12);\n\n\n\n CombinedData combdata = new CombinedData();\n combdata.setData(generateLineData());\n combdata.setData(generateLineData2());\n combdata.setData(generateBarData());\n xAxis.setAxisMaximum(combdata.getXMax() + 0.25f);\n mChart.setData(combdata);\n mChart.invalidate();\n\n\n\n }else{\n Toast.makeText(getActivity(), \"message failed!\", Toast.LENGTH_SHORT).show();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n } catch (JSONException localJSONException) {\n Log.e(\"gettingjson\", localJSONException.toString());\n localJSONException.printStackTrace();\n if(dialog.isShowing()){\n dialog.dismiss();\n }\n }\n }\n }\n @Override\n protected void onPreExecute()\n {\n //dialog = ProgressDialog.show(getActivity(), \"\", \"Loading Data...\", true);\n //dialog.setCancelable(true);\n }\n\n };\n mCombComdtySTKC.execute(mUid,mYear,mWeekNo);\n\n }", "private void addBarGraphRenderers() {\n Paint paint = new Paint();\n paint.setStrokeWidth(12f);\n paint.setAntiAlias(true);\n paint.setColor(Color.argb(200, 56, 138, 252));\n BarGraphRenderer barGraphRendererBottom = new BarGraphRenderer(4, paint, false, false);\n mVisualizerView.addRenderer(barGraphRendererBottom);\n\n Paint paint2 = new Paint();\n paint2.setStrokeWidth(12f);\n paint2.setAntiAlias(true);\n paint2.setColor(Color.argb(200, 181, 111, 233));\n BarGraphRenderer barGraphRendererTop = new BarGraphRenderer(4, paint2, true, true);\n mVisualizerView.addRenderer(barGraphRendererTop);\n }", "private void drawHighPrices(Graphics g , int contentHeight) {\n // declare local variables:\n int buffer;\n int actualBars;\n int dataMinimum;\n int heightDifference;\n int highPrices[];\n int dataArray[];\n double scale;\n // end of local variables declaration\n\n\n // check fro logical error\n if(data == null) {\n // exit from method\n return;\n } // end of if statement\n\n // check for logical error\n if(data.getHighPrices() == null || data.getHighPrices().length < 2) {\n // exit from method\n return;\n } // end of if statement\n\n\n // find the data minimum\n dataMinimum = ChartData.getMinimum(data.getHighPrices(bars));\n\n // resolve the data array\n highPrices = data.getHighPrices(bars);\n dataArray = new int[highPrices.length];\n System.arraycopy(highPrices, 0, dataArray, 0, highPrices.length);\n\n // resolve the actual bars\n actualBars = dataArray.length;\n\n // find the heightDifference\n heightDifference = ChartData.getMaximum(data.getHighPrices(bars)) - dataMinimum;\n\n // check if the heightDifference is too big and reduce it\n buffer = heightDifference / 50;\n if( buffer > 0) {\n heightDifference = heightDifference / buffer;\n } // end of if statement\n\n //\n for(int c = 0; c < actualBars; c++) {\n //\n dataArray[c] = dataArray[c] - dataMinimum;\n } // end of for loop;\n\n //\n if(buffer > 0) {\n //\n for(int c=0; c < actualBars; c++) {\n //\n dataArray[c] = dataArray[c] / buffer;\n } // end of for loop\n\n } // end of if statement\n\n\n // resolve the scale\n scale = contentHeight / heightDifference;\n\n // select color\n g.setColor(format.getHighPricesColor());\n\n // main drawing loop\n for(int c = 0; c < actualBars -1 ; c++) {\n //\n g.drawLine(getWidth()-textAreaLenght-c*barLenght,\n getHeight()- 30 - (int) Math.round(dataArray[c]*scale),\n getWidth()-textAreaLenght- ( (c+1)*barLenght ),\n getHeight()- 30 - (int) Math.round(dataArray[c+1]*scale));\n } // end of for loop\n\n }", "private void createChart() {\n\t\tchartSpace = CTChartSpace.Factory.newInstance();\n\t\tchart = chartSpace.addNewChart();\n\t\tCTPlotArea plotArea = chart.addNewPlotArea();\n\n\t\tplotArea.addNewLayout();\n\t\tchart.addNewPlotVisOnly().setVal(true);\n\n\t\tCTPrintSettings printSettings = chartSpace.addNewPrintSettings();\n\t\tprintSettings.addNewHeaderFooter();\n\n\t\tCTPageMargins pageMargins = printSettings.addNewPageMargins();\n\t\tpageMargins.setB(0.75);\n\t\tpageMargins.setL(0.70);\n\t\tpageMargins.setR(0.70);\n\t\tpageMargins.setT(0.75);\n\t\tpageMargins.setHeader(0.30);\n\t\tpageMargins.setFooter(0.30);\n\t\tprintSettings.addNewPageSetup();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.blood_suger_analysis_diagram);\n\t\tBarChart barChart1 = (BarChart) findViewById(R.id.bloodSugerAnalysisDiagramChart1);\n\t\tBarChart barChart2 = (BarChart) findViewById(R.id.bloodSugerAnalysisDiagramChart2);\n\t\tPieChart pieChart = (PieChart) findViewById(R.id.bloodSugerAnalysisDiagramChart3);\n\t\tdouble[] chart1Values = { 18.0, 15 };\n\t\tdouble[] chart2Values = { 18.0, 15, 24, 20 };\n\n\t\tsetChart1(barChart1, chart1Values);\n\t\tsetchart2(barChart2, chart2Values);\n\t\tint normalCount = 3;\n\t\tint highCount = 2;\n\t\tint lowCount = 5;\n\t\tsetChart3(pieChart, lowCount, normalCount, highCount);\n\t}", "private void initBarChartConfiguration(final Activity activity, BarChart barChart) {\n barChart.setDrawBarShadow(false);\n barChart.setDrawValueAboveBar(true);\n barChart.setDescription(\"\");\n barChart.setMaxVisibleValueCount(50);\n barChart.setPinchZoom(false);\n barChart.setDrawGridBackground(false);\n\n // xAxis\n XAxis xl = barChart.getXAxis();\n xl.setGranularity(1f);\n xl.setCenterAxisLabels(true);\n xl.setValueFormatter(new AxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n if (activity != null) {\n if (value == 0)\n return activity.getResources().getString(R.string.pre_operation);\n if (value == 1)\n return activity.getResources().getString(R.string.in_operation);\n if (value == 2)\n return activity.getResources().getString(R.string.post_operation);\n }\n return \"-\";\n }\n\n @Override\n public int getDecimalDigits() {\n return 0;\n }\n });\n\n // yAxis\n YAxis leftAxis = barChart.getAxisLeft();\n leftAxis.setValueFormatter(new AxisValueFormatter() {\n @Override\n public String getFormattedValue(float value, AxisBase axis) {\n return String.valueOf((int) value);\n }\n\n @Override\n public int getDecimalDigits() {\n return 0;\n }\n });\n leftAxis.setDrawGridLines(false);\n leftAxis.setSpaceTop(30f);\n leftAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true\n barChart.getAxisRight().setEnabled(false);\n barChart.getAxisLeft().setEnabled(false);\n }", "private void drawBars(Graphics g) {\n // declare local variables:\n int numberOfDigits=1;\n // end of local variables declaration\n\n\n // draw the bars\n for(int c = 0; c < bars ; c++) {\n // set the drawing colour\n g.setColor(Color.WHITE);\n\n // check the number of digits of c\n if( c > 8) {\n numberOfDigits = 2;\n } // end of if statement\n\n // check if bar number should be drawn\n if(c%3==0) {\n // set the colour\n g.setColor(new Color(190, 130, 0) );\n // draw bar number\n g.drawString(Integer.toString(c+1) ,\n getWidth()- (textAreaLenght+barLenght)- barLenght*c -( 3*numberOfDigits ),\n getHeight()-8);\n } // end of if statement\n\n // draw vertical mini line\n g.drawLine(getWidth()- (textAreaLenght+barLenght)- barLenght*c, getHeight()-24,\n getWidth()- (textAreaLenght+barLenght)- barLenght*c, getHeight()-20);\n\n\n } // end of for loop\n\n }", "public interface BarGraphsApi {\n\n void loadVisualizationApi(Runnable callback);\n\n Widget createBarGraph(\n String title, String[] labels, Float[] values, Float maxValue);\n}", "@Test\n public void test28() throws Throwable {\n double[][] doubleArray0 = new double[4][3];\n double[] doubleArray1 = new double[0];\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[1];\n doubleArray2[0] = 4394.831255689545;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[5];\n doubleArray3[0] = 4394.831255689545;\n doubleArray3[1] = 4394.831255689545;\n doubleArray3[2] = 4394.831255689545;\n doubleArray3[3] = 4394.831255689545;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[3];\n doubleArray4[0] = 4394.831255689545;\n doubleArray4[1] = 4394.831255689545;\n doubleArray0[3] = doubleArray4;\n DefaultIntervalCategoryDataset defaultIntervalCategoryDataset0 = new DefaultIntervalCategoryDataset(doubleArray0, doubleArray0);\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"org.jfree.data.xy.DefaultWindDataset\");\n Month month0 = new Month();\n ZoneOffset zoneOffset0 = ZoneOffset.MAX;\n ZoneInfo zoneInfo0 = (ZoneInfo)TimeZone.getTimeZone((ZoneId) zoneOffset0);\n PeriodAxis periodAxis0 = new PeriodAxis(\"'Ypi)?q\", (RegularTimePeriod) month0, (RegularTimePeriod) month0, (TimeZone) zoneInfo0);\n LayeredBarRenderer layeredBarRenderer0 = new LayeredBarRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultIntervalCategoryDataset0, (CategoryAxis) categoryAxis3D0, (ValueAxis) periodAxis0, (CategoryItemRenderer) layeredBarRenderer0);\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n CategoryItemRendererState categoryItemRendererState0 = new CategoryItemRendererState(plotRenderingInfo0);\n StandardEntityCollection standardEntityCollection0 = (StandardEntityCollection)categoryItemRendererState0.getEntityCollection();\n ChartRenderingInfo chartRenderingInfo1 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo1 = chartRenderingInfo1.getPlotInfo();\n categoryPlot0.zoomRangeAxes(4394.831255689545, plotRenderingInfo1, (Point2D) null, false);\n }", "public TotalBayar()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n \n List list = new List();\n addObject(list, 300, 60);\n \n List1 list1 = new List1();\n addObject(list1, 300, 120);\n \n /*List2 list2 = new List2();\n addObject(list2, 300, 170);\n \n List3 list3 = new List3();\n addObject(list3, 300, 220);\n \n List4 list4 = new List4();\n addObject(list4, 300, 270);\n */\n Kembali kembali = new Kembali();\n addObject(kembali, 300, 350);\n }", "@Override//隔离\r\n\tpublic String getXmlString() {\n\t\tdouble sum=0.0;\r\n\t\tString xAxisName=\"\";\r\n//\t\tString xAxisName=\"调查问卷统计结果\";\r\n\t\tString xmlStr=\"\";\r\n\t xmlStr=\"<chart caption='\"+xAxisName+\"' xAxisName='\"\r\n\t \t+\"' yAxisName='' showValues='1' decimals='0' formatNumberScale='0' \" +\r\n\t \t\t\t\"baseFontSize='14' outCnvBaseFontSize='14'>\";\r\n\r\n\t String[][] array={{\"非常满意\",\"1\"},{\"满意\",\"2\"},{\"一般\",\"3\"},{\"不满意\",\"4\"}};\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t /*for(int i=0;i<array.length;i++){\r\n\t \tString HQL=\" select count(*) from XzfyQuestionnaire x\";\r\n\t\t HQL+=\" where x.selectValue='\"+array[i][1]+\"'\";\r\n\t\t List list=super.find(HQL);\r\n\t\t \r\n\t\t if(!list.isEmpty()){\r\n\t\t \tsum+=((Long)(list.get(0))).doubleValue();\r\n\t\t }\t \t\r\n\t }\r\n\t \r\n\t for(int i=0;i<array.length;i++){\r\n\t \tString HQL=\" select round(count(*)/\"+sum+\"*100,2) from XzfyQuestionnaire x\";\r\n\t\t HQL+=\" where x.selectValue='\"+array[i][1]+\"'\";\r\n\t\t List list=super.find(HQL);\r\n\t\t \r\n\t\t if(!list.isEmpty()){\r\n//\t\t \tSystem.out.println(\"被执行!\");\r\n\t\t \txmlStr+=\"<set label='\"+array[i][0]+\"' value='\";\r\n\t\t \txmlStr+=((Double)(list.get(0))).toString()+\r\n//\t\t \t\"%\"+\r\n\t\t \t\"' />\";\r\n\t\t }\t \t \t\r\n\t }*/\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t for(int i=0;i<array.length;i++){\r\n\t \tString HQL=\" select count(*) from XzfyQuestionnaire x\";\r\n\t\t HQL+=\" where x.selectValue='\"+array[i][1]+\"'\";\r\n\t\t List list=super.find(HQL);\r\n\t\t \r\n\t\t if(!list.isEmpty()){\r\n//\t\t \tSystem.out.println(\"被执行!\");\r\n\t\t \txmlStr+=\"<set label='\"+array[i][0]+\"' value='\";\r\n\t\t \txmlStr+=((Long)(list.get(0))).toString()+\"' />\";\r\n\t\t }\t \t\r\n\t }\r\n\t \r\n\t \r\n\t xmlStr+=\"</chart>\";\r\n// \tSystem.out.println(xmlStr); \r\n\t return xmlStr;\r\n\t}", "private void populateCharts() {\n\t\tpopulatePieChart1();\n\t\tpopulatePieChart2();\n\t\tpopulateBarChart1();\n\t\tpopulateBarChart2();\n\t}", "@Test\n public void test79() throws Throwable {\n DefaultBoxAndWhiskerCategoryDataset defaultBoxAndWhiskerCategoryDataset0 = new DefaultBoxAndWhiskerCategoryDataset();\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\":HD:3P^w7T\");\n DateAxis dateAxis0 = new DateAxis();\n DefaultPolarItemRenderer defaultPolarItemRenderer0 = new DefaultPolarItemRenderer();\n Color color0 = (Color)defaultPolarItemRenderer0.getBaseFillPaint();\n subCategoryAxis0.setSubLabelPaint(color0);\n StackedBarRenderer3D stackedBarRenderer3D0 = new StackedBarRenderer3D(729.43602760018, 729.43602760018, true);\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultBoxAndWhiskerCategoryDataset0, (CategoryAxis) subCategoryAxis0, (ValueAxis) dateAxis0, (CategoryItemRenderer) stackedBarRenderer3D0);\n BasicStroke basicStroke0 = (BasicStroke)categoryPlot0.getRangeGridlineStroke();\n categoryPlot0.setDomainAxis(2052, (CategoryAxis) subCategoryAxis0, true);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) categoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, true);\n ChartRenderingInfo chartRenderingInfo0 = chartPanel0.getChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = chartRenderingInfo0.getPlotInfo();\n ScrollPane scrollPane0 = null;\n try {\n scrollPane0 = new ScrollPane();\n } catch(HeadlessException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.GraphicsEnvironment\", e);\n }\n }", "public static Chart getChart(String type){\n\t\tChart chart = new Chart(Quality.Advanced, type);\r\n\t\tchart.getView().setBackgroundColor(Color.BLACK);\r\n\t\tchart.getView().setAxeSquared(true);\r\n\t\tchart.getAxeLayout().setGridColor(Color.WHITE);\r\n\t\tchart.getAxeLayout().setFaceDisplayed(false);\r\n\t\taddLight( chart, new Coord3d(0,-100,100));\r\n\t\tsceneHisto(chart);\t\t\r\n\t\treturn chart;\r\n\t}", "public void generateChart(int[] dataValues) {\n\t\t/*\n\t\t * The XYSeriesCollection object is a set XYSeries series (dataset) that\n\t\t * can be visualized in the same chart\n\t\t */\n\t\tXYSeriesCollection dataset = new XYSeriesCollection();\n\t\t/*\n\t\t * The XYSeries that are loaded in the dataset. There might be many\n\t\t * series in one dataset.\n\t\t */\n\t\tXYSeries data = new XYSeries(\"random values\");\n\n\t\t/*\n\t\t * Populating the XYSeries data object from the input Integer array\n\t\t * values.\n\t\t */\n\t\tfor (int i = 0; i < dataValues.length; i++) {\n\t\t\tdata.add(i, dataValues[i]);\n\t\t}\n\n\t\t// add the series to the dataset\n\t\tdataset.addSeries(data);\n\n\t\tboolean legend = false; // do not visualize a legend\n\t\tboolean tooltips = false; // do not visualize tooltips\n\t\tboolean urls = false; // do not visualize urls\n\n\t\t// Declare and initialize a createXYLineChart JFreeChart\n\t\tJFreeChart chart = ChartFactory.createXYLineChart(\"Grades Histogram\", \"Grades\", \"Frequency\", dataset,\n\t\t\t\tPlotOrientation.VERTICAL, legend, tooltips, urls);\n\n\t\t/*\n\t\t * Initialize a frame for visualizing the chart and attach the\n\t\t * previously created chart.\n\t\t */\n\t\tChartFrame frame = new ChartFrame(\"First\", chart);\n\t\tframe.pack();\n\t\t// makes the previously created frame visible\n\t\tframe.setVisible(true);\n\t}", "private void initPieChart(){\n }", "private void addDataSet() {\n Log.d(TAG, \"addDataSet started\");\n ArrayList<PieEntry> yEntrys = new ArrayList<>();\n ArrayList<String> xEntrys = new ArrayList<>();\n\n for(int i = 0; i < yData.length; i++){\n yEntrys.add(new PieEntry(yData[i] , i));\n }\n\n for(int i = 1; i < xData.length; i++){\n xEntrys.add(xData[i]);\n }\n\n //Create the data set\n PieDataSet pieDataSet = new PieDataSet(yEntrys, \"Popularity stat\");\n pieDataSet.setSliceSpace(2);\n pieDataSet.setValueTextSize(12);\n pieDataSet.setValueTextColor(Color.WHITE);\n\n\n\n //Add colors to dataset\n ArrayList<Integer> colors = new ArrayList<>();\n colors.add(Color.BLUE);\n colors.add(Color.RED);\n colors.add(Color.GREEN);\n colors.add(Color.CYAN);\n colors.add(Color.YELLOW);\n colors.add(Color.MAGENTA);\n\n pieDataSet.setColors(colors);\n\n //Add legend to chart\n Legend legend = pieChart.getLegend();\n legend.setForm(Legend.LegendForm.DEFAULT);\n legend.setPosition(Legend.LegendPosition.ABOVE_CHART_CENTER);\n\n //Create pie data object\n PieData pieData = new PieData(pieDataSet);\n pieChart.setData(pieData);\n pieChart.invalidate();\n }", "private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n JTable curTable = jTable1;\n Curpan = jPanel3;\n\n if (jCheckBox1.isSelected()) {\n int succ = curTable.getRowCount();\n Cloud cloud = new Cloud();\n JPanel panel = new JPanel();\n panel.setLayout(new MigLayout(\"wrap 7\"));\n for (int i = 0; i < succ; i++) {\n for (int j = 0; j < Integer.parseInt(curTable.getModel().getValueAt(i, 1).toString()); j++) {\n cloud.addTag(curTable.getModel().getValueAt(i, 0).toString());\n }\n }\n for (Tag tag : cloud.tags()) {\n final JLabel label = new JLabel(tag.getName());\n label.setOpaque(false);\n label.setFont(label.getFont().deriveFont((float) tag.getWeight() * 10));\n panel.add(label);\n }\n // panel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\n Curpan.removeAll();\n Curpan.revalidate();\n panel.setSize(300, 300);\n Curpan.setLayout(new BorderLayout());\n Curpan.add(panel, BorderLayout.CENTER);\n Curpan.revalidate();\n panel.setVisible(true);\n Curpan.setVisible(true);\n\n } else {\n int succ = curTable.getRowCount();\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n for (int i = 0; i < succ; i++) {\n dataset.addValue(i, curTable.getModel().getValueAt(i, 0).toString(), curTable.getModel().getValueAt(i, 1).toString());\n }\n JFreeChart barChart = ChartFactory.createBarChart(\n \"\",\n \"frequency\",\n \"count\",\n dataset,\n PlotOrientation.VERTICAL,\n true, true, false);\n ChartPanel chartPanel = new ChartPanel(barChart);\n chartPanel.setPreferredSize(new java.awt.Dimension(300, 300));\n\n Curpan.removeAll();\n Curpan.revalidate();\n Curpan.setLayout(new BorderLayout());\n Curpan.add(chartPanel, BorderLayout.CENTER);\n Curpan.revalidate();\n chartPanel.setVisible(true);\n Curpan.setVisible(true);\n\n }\n }" ]
[ "0.72888404", "0.6890042", "0.68212146", "0.6759424", "0.66809595", "0.6607822", "0.6590629", "0.65559506", "0.6419748", "0.639181", "0.6284878", "0.6248159", "0.6245647", "0.62393105", "0.6230054", "0.6225162", "0.6218282", "0.61721087", "0.61629236", "0.6155867", "0.61357826", "0.60363954", "0.60357964", "0.6022523", "0.6003331", "0.5994346", "0.59672576", "0.5953837", "0.59275776", "0.5918698", "0.5913986", "0.5845699", "0.5805385", "0.5795594", "0.57887125", "0.5783907", "0.57721186", "0.5751131", "0.5726047", "0.5716754", "0.5703823", "0.5702738", "0.5685617", "0.5675959", "0.5662751", "0.566243", "0.5648059", "0.56180507", "0.56013733", "0.5589744", "0.5580217", "0.55768156", "0.5575425", "0.556405", "0.553441", "0.55317765", "0.552602", "0.55237305", "0.5477403", "0.54703766", "0.545241", "0.5451448", "0.54491687", "0.5448315", "0.5444109", "0.54155624", "0.5411472", "0.5397988", "0.53964204", "0.53923094", "0.53842264", "0.5372958", "0.5363277", "0.53453076", "0.53433144", "0.53321195", "0.5331188", "0.5328742", "0.53275037", "0.53272337", "0.5313172", "0.5309843", "0.52890146", "0.5287956", "0.5285291", "0.52734494", "0.52688456", "0.52443933", "0.5225953", "0.52227104", "0.5218466", "0.521774", "0.52167565", "0.5208049", "0.52075887", "0.52070045", "0.52000624", "0.51929015", "0.5190941", "0.5180244" ]
0.5945126
28
Creates the table for writing individual test result
private void createTable(BufferedWriter writer, ResultTable tableData) throws IOException { int height = (37 * tableData.getDataCount()) + 56 + (tableData.getExpectionMessageData().size() * 4); String container = "<div style='width: 766px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;;height: " + height + "px;position: absolute;top: 165px;left: 554px'>"; String table = "<table style='top:10px;position:absolute;width: 750px;left:8px;'><tbody>"; String headers = "<tr><th>TestCase Id</th><th>Method Name</th><th>Servrity</th><th>Time Taken</th><th>Result</th></tr>"; writer.write(container + table + headers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeTableContents(BufferedWriter writer, ISuite suite,\r\n\t\t\tResultTable table) throws IOException {\r\n\r\n\t\tMap<String, ResultVo> dataMap = table.getResultData();\r\n\t\tString closer = \"</tbody></table></div>\";\r\n\t\tdataMap.forEach((key, value) -> {\r\n\t\t\tString datagenerator = \"\";\r\n\t\t\tString message = value.getExpectionMessage() != null ? value\r\n\t\t\t\t\t.getExpectionMessage() : \"\";\r\n\t\t\tSystem.out.println(message);\r\n\t\t\tdatagenerator = \"<tr><td>\" + value.getTestCaeId() + \"</td><td>\"\r\n\t\t\t\t\t+ value.getMethodName() + \"</td><td>\" + value.getPrioirty()\r\n\t\t\t\t\t+ \"</td><td>\" + value.getTotalTime() + \"</td>\";\r\n\r\n\t\t\tswitch (value.getResult().toString()) {\r\n\t\t\tcase \"pass\":\r\n\t\t\t\tdatagenerator += \"<td style='color:#4CAF50;font-weight:bold;'>\"\r\n\t\t\t\t\t\t+ value.getResult() + \"</td>\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"fail\":\r\n\t\t\t\tdatagenerator += \"<td style='color:#EF5350;font-weight:bold;'>\"\r\n\t\t\t\t\t\t+ \"<i class='material-icons' style='font-size: 16px;'>&#xE002;</i><span>\"\r\n\t\t\t\t\t\t+ value.getResult() + \"</span></td>\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"skip\":\r\n\t\t\t\tdatagenerator += \"<td style='color:#4FC3F7;font-weight:bold;'>\"\r\n\t\t\t\t\t\t+ value.getResult() + \"</td>\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\twriter.write(datagenerator);\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\twriter.write(closer);\r\n\t}", "private void createStressTestStatusTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column nodeId = new Column(\"NODE_ID\");\n nodeId.setMappedType(\"VARCHAR\");\n nodeId.setPrimaryKey(true);\n nodeId.setRequired(true);\n nodeId.setSize(\"50\");\n Column status = new Column(\"STATUS\");\n status.setMappedType(\"VARCHAR\");\n status.setSize(\"10\");\n status.setRequired(true);\n status.setDefaultValue(\"NEW\");\n Column startTime = new Column(\"START_TIME\");\n startTime.setMappedType(\"TIMESTAMP\");\n Column endTime = new Column(\"END_TIME\");\n endTime.setMappedType(\"TIMESTAMP\");\n\n Table table = new Table(STRESS_TEST_STATUS, runId, nodeId, status, startTime, endTime);\n\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public CreateTable(Object result) {\r\n this.result = result;\r\n columnNames = new String[1];\r\n columnNames[0] = \"Result\";\r\n tableData = new Object[1][1];\r\n tableData[0][0] = this.result;\r\n }", "private void createStressTestControlTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column clientCommitSleepMs = new Column(\"CLIENT_COMMIT_SLEEP_MS\");\n clientCommitSleepMs.setMappedType(\"BIGINT\");\n Column clientCommitRows = new Column(\"CLIENT_COMMIT_ROWS\");\n clientCommitRows.setMappedType(\"BIGINT\");\n Column serverCommitSleepMs = new Column(\"SERVER_COMMIT_SLEEP_MS\");\n serverCommitSleepMs.setMappedType(\"BIGINT\");\n Column serverCommitRows = new Column(\"SERVER_COMMIT_ROWS\");\n serverCommitRows.setMappedType(\"BIGINT\");\n Column payloadColumns = new Column(\"PAYLOAD_COLUMNS\");\n payloadColumns.setMappedType(\"INTEGER\");\n Column initialSeedSize = new Column(\"INITIAL_SEED_SIZE\");\n initialSeedSize.setMappedType(\"BIGINT\");\n Column duration = new Column(\"DURATION_MINUTES\");\n duration.setMappedType(\"BIGINT\");\n\n Table table = new Table(STRESS_TEST_CONTROL, runId, clientCommitSleepMs, clientCommitRows, serverCommitSleepMs, serverCommitRows,\n payloadColumns, initialSeedSize, duration);\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public void createTable(double pixelSize, String unit) {\r\n\r\n ResultsTable table = new ResultsTable();\r\n for (Cell cell : cells) {\r\n table.incrementCounter();\r\n table.addValue(\"Cell #\", cell.cellNum);\r\n table.addValue(\"Area (square \" + unit + \")\", cell.getArea() * pixelSize * pixelSize);\r\n }\r\n String title = \"Results\";\r\n table.show(title);\r\n }", "public void CreateTestResultFile()\n\t{ \n\t\tDate dNow = new Date( );\n\t\tSimpleDateFormat ft =new SimpleDateFormat (\"MMddYYYY\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFileOutputStream fos = new FileOutputStream(System.getProperty(\"user.dir\")+\"//PG HealthCheck List_\"+ft.format(dNow)+\".xls\");\n\t HSSFWorkbook workbook = new HSSFWorkbook();\n\t HSSFSheet worksheet = workbook.createSheet(\"PG Functionality - Country\");\n\t HSSFRow row1 = worksheet.createRow(0);\n\t row1.createCell(0).setCellValue(\"Availability of Data\");\n\t HSSFRow row = worksheet.createRow(1);\n\t row.createCell(0).setCellValue(\"Testcase\");\n\t row.createCell(1).setCellValue(\"TestRunStatus\");\n\t row.createCell(2).setCellValue(\"Remarks\");\n\t workbook.write(fos);\n\t fos.close();\n\t \t \n\t } \n\t\tcatch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t\t\t\n\t\t\n\t}", "public void testCreateTable() {\n LOG.info(\"Entering testCreateTable.\");\n\n // Specify the table descriptor.\n HTableDescriptor htd = new HTableDescriptor(tableName);\n\n // Set the column family name to info.\n HColumnDescriptor hcd = new HColumnDescriptor(\"info\");\n\n // Set data encoding methods,HBase provides DIFF,FAST_DIFF,PREFIX\n // and PREFIX_TREE\n hcd.setDataBlockEncoding(DataBlockEncoding.FAST_DIFF);\n\n // Set compression methods, HBase provides two default compression\n // methods:GZ and SNAPPY\n // GZ has the highest compression rate,but low compression and\n // decompression effeciency,fit for cold data\n // SNAPPY has low compression rate, but high compression and\n // decompression effeciency,fit for hot data.\n // it is advised to use SANPPY\n hcd.setCompressionType(Compression.Algorithm.SNAPPY);\n\n htd.addFamily(hcd);\n\n Admin admin = null;\n try {\n // Instantiate an Admin object.\n admin = conn.getAdmin();\n if (!admin.tableExists(tableName)) {\n LOG.info(\"Creating table...\");\n admin.createTable(htd);\n LOG.info(admin.getClusterStatus());\n LOG.info(admin.listNamespaceDescriptors());\n LOG.info(\"Table created successfully.\");\n } else {\n LOG.warn(\"table already exists\");\n }\n } catch (IOException e) {\n LOG.error(\"Create table failed.\");\n } finally {\n if (admin != null) {\n try {\n // Close the Admin object.\n admin.close();\n } catch (IOException e) {\n LOG.error(\"Failed to close admin \", e);\n }\n }\n }\n LOG.info(\"Exiting testCreateTable.\");\n }", "public void doCreateTable();", "private void generateTestExecution(ITestResult result) throws IOException{\r\n\t\t//create the html file with current running class and test name\r\n\t\tfout = createRequiredFile(result.getName());\r\n\t\t\r\n\t\t//Write initial html codes neccessary for report\r\n\t\tstartHtmlPage(fout,result);\r\n\t\t\r\n\t\t//get all the attributes set during the test execution\r\n\t\tObject[] array = result.getAttributeNames().toArray();\r\n\t\t\r\n\t\t//Above got values are not in sort. So, Sorting that based on time\r\n\t\tArrays.sort(array);\r\n\t\t\r\n\t\t//Iterating the array value to generate report\r\n \tfor(Object name : array){\r\n \t\t\t\r\n \t\t\t//Each and every array value contains, All the info about the particular action\r\n \t\t\t//And Values combined using deliminator. So, split using deliminator\r\n\t \t\tString temp[] = result.getAttribute((String) name).toString().split(\"####\");\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'Fail' means that step failed \r\n\t \t\tif(temp[3].toLowerCase().contains(\"fail\")){\r\n\t \t\t\t//If Fail create '<tr>' tag with 'status_failed' class(Which is used for create 'red' background color for failed cases)\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_failed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\t\r\n\t \t\t\t//create the screenshot path\r\n\t \t\t\tString pathToScreenshot = \"../Failure_Screenshot/\"+temp[5]+\".jpg\";\r\n\t \t\t\t\r\n\t \t\t\t//creating mapping for failed step(Link to screen shot and embed the screenshot in that step)\r\n\t \t\t\ttemp[4] = \"<a href=\\'\" + pathToScreenshot + \"\\'> <img src=\\'\" + pathToScreenshot + \"\\' height=\\\"100\\\" width=\\\"100\\\"> </a>\";\r\n\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'title' means that is title\r\n\t \t\telse if(temp[3].toLowerCase().contains(\"title\")){\r\n\t \t\t\t//So, If it is a title then create '<tr>' tag with class name 'title'\r\n\t \t\t\tfout.println(\"<tr class=\\\"title\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\tfout.println(\"<td colspan=\\\"6\\\">\"+ temp[0] + \"</td>\");\r\n\t \t\t\tfout.println(\"</tr>\");\r\n\t \t\t\tcontinue;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Else status is passed\r\n\t \t\telse{\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_passed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//this will create separate '<td>' for messages inside the action\r\n\t \t\tfor(String temp1 : temp){\r\n\t \t\t\t\tfout.println(\"<td>\"+ temp1 + \"</td>\");\r\n\r\n\t \t\t}\r\n\t \t//end up '<tr>' tag\t\r\n\t \tfout.println(\"</tr>\");\r\n \t}\r\n \t\r\n \t//this used for write some end up html tags\r\n \tonFinish();\r\n \t\r\n\t}", "TABLE createTABLE();", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "Table createTable();", "public static final String generateTableTestCase(){\n\t\n\t\tint[] operators = new int[]{AND,AND_AND,DIVIDE,GREATER,GREATER_EQUAL,\n\t\t\t\tLEFT_SHIFT,LESS,LESS_EQUAL,MINUS,MULTIPLY,OR,OR_OR,PLUS,REMAINDER,\n\t\t\t\tRIGHT_SHIFT,UNSIGNED_RIGHT_SHIFT,XOR};\n\t\n\t\tclass Decode {\n\t\t\tpublic final String constant(int code){\n\t\t\t\tswitch(code){ \n\t\t\t\t\tcase T_boolean \t: return \"true\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_byte\t\t: return \"((byte) 3)\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_char\t\t: return \"'A'\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_double\t: return \"300.0d\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_float\t: return \"100.0f\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_int\t\t: return \"1\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_long\t\t: return \"7L\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangString\t: return \"\\\"hello-world\\\"\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_null\t\t: return \"null\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_short\t: return \"((short) 5)\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangObject\t: return \"null\";} //$NON-NLS-1$\n\t\t\t\treturn \"\";} //$NON-NLS-1$\n\t\n\t\t\tpublic final String type(int code){\n\t\t\t\tswitch(code){ \n\t\t\t\t\tcase T_boolean \t: return \"z\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_byte\t\t: return \"b\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_char\t\t: return \"c\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_double\t: return \"d\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_float\t: return \"f\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_int\t\t: return \"i\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_long\t\t: return \"l\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangString\t: return \"str\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_null\t\t: return \"null\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_short\t: return \"s\"; //$NON-NLS-1$\n\t\t\t\t\tcase T_JavaLangObject\t: return \"obj\";} //$NON-NLS-1$\n\t\t\t\treturn \"xxx\";} //$NON-NLS-1$\n\t\t\t\n\t\t\tpublic final String operator(int operator){\n\t\t\t\t\tswitch (operator) {\n\t\t\t\t\tcase EQUAL_EQUAL :\treturn \"==\"; //$NON-NLS-1$\n\t\t\t\t\tcase LESS_EQUAL :\treturn \"<=\"; //$NON-NLS-1$\n\t\t\t\t\tcase GREATER_EQUAL :return \">=\"; //$NON-NLS-1$\n\t\t\t\t\tcase LEFT_SHIFT :\treturn \"<<\"; //$NON-NLS-1$\n\t\t\t\t\tcase RIGHT_SHIFT :\treturn \">>\"; //$NON-NLS-1$\n\t\t\t\t\tcase UNSIGNED_RIGHT_SHIFT :\treturn \">>>\"; //$NON-NLS-1$\n\t\t\t\t\tcase OR_OR :return \"||\"; //$NON-NLS-1$\n\t\t\t\t\tcase AND_AND :\t\treturn \"&&\"; //$NON-NLS-1$\n\t\t\t\t\tcase PLUS :\t\t\treturn \"+\"; //$NON-NLS-1$\n\t\t\t\t\tcase MINUS :\t\treturn \"-\"; //$NON-NLS-1$\n\t\t\t\t\tcase NOT :\t\t\treturn \"!\"; //$NON-NLS-1$\n\t\t\t\t\tcase REMAINDER :\treturn \"%\"; //$NON-NLS-1$\n\t\t\t\t\tcase XOR :\t\t\treturn \"^\"; //$NON-NLS-1$\n\t\t\t\t\tcase AND :\t\t\treturn \"&\"; //$NON-NLS-1$\n\t\t\t\t\tcase MULTIPLY :\t\treturn \"*\"; //$NON-NLS-1$\n\t\t\t\t\tcase OR :\t\t\treturn \"|\"; //$NON-NLS-1$\n\t\t\t\t\tcase TWIDDLE :\t\treturn \"~\"; //$NON-NLS-1$\n\t\t\t\t\tcase DIVIDE :\t\treturn \"/\"; //$NON-NLS-1$\n\t\t\t\t\tcase GREATER :\t\treturn \">\"; //$NON-NLS-1$\n\t\t\t\t\tcase LESS :\t\t\treturn \"<\";\t} //$NON-NLS-1$\n\t\t\t\treturn \"????\";} //$NON-NLS-1$\n\t\t}\n\t\n\t\t\t\n\t\tDecode decode = new Decode();\n\t\tString s;\n\t\n\t\ts = \"\\tpublic static void binaryOperationTablesTestCase(){\\n\" + //$NON-NLS-1$\n\t\n\t\t\t\"\\t\\t//TC test : all binary operation (described in tables)\\n\"+ //$NON-NLS-1$\n\t\t\t\"\\t\\t//method automatically generated by\\n\"+ //$NON-NLS-1$\n\t\t\t\"\\t\\t//org.eclipse.jdt.internal.compiler.ast.OperatorExpression.generateTableTestCase();\\n\"+ //$NON-NLS-1$\n\t\t\n\t\t\t\"\\t\\tString str0;\\t String str\\t= \"+decode.constant(T_JavaLangString)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tint i0;\\t int i\\t= \"+decode.constant(T_int)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tboolean z0;\\t boolean z\\t= \"+decode.constant(T_boolean)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tchar c0; \\t char c\\t= \"+decode.constant(T_char)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tfloat f0; \\t float f\\t= \"+decode.constant(T_float)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tdouble d0;\\t double d\\t= \"+decode.constant(T_double)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tbyte b0; \\t byte b\\t= \"+decode.constant(T_byte)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tshort s0; \\t short s\\t= \"+decode.constant(T_short)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tlong l0; \\t long l\\t= \"+decode.constant(T_long)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\t\\tObject obj0; \\t Object obj\\t= \"+decode.constant(T_JavaLangObject)+\";\\n\"+ //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"\\n\"; //$NON-NLS-1$\n\t\n\t\tint error = 0;\t\t\n\t\tfor (int i=0; i < operators.length; i++)\n\t\t{\tint operator = operators[i];\n\t\t\tfor (int left=0; left<16;left++)\n\t\t\tfor (int right=0; right<16;right++)\n\t\t\t{\tint result = (OperatorSignatures[operator][(left<<4)+right]) & 0x0000F;\n\t\t\t\tif (result != T_undefined)\n\t\n\t\t\t\t\t//1/ First regular computation then 2/ comparaison\n\t\t\t\t\t//with a compile time constant (generated by the compiler)\n\t\t\t\t\t//\tz0 = s >= s;\n\t\t\t\t\t//\tif ( z0 != (((short) 5) >= ((short) 5)))\n\t\t\t\t\t//\t\tSystem.out.println(155);\n\t\n\t\t\t\t{\ts += \"\\t\\t\"+decode.type(result)+\"0\"+\" = \"+decode.type(left); //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$\n\t\t\t\t\ts += \" \"+decode.operator(operator)+\" \"+decode.type(right)+\";\\n\"; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$\n\t\t\t\t\tString begin = result == T_JavaLangString ? \"\\t\\tif (! \" : \"\\t\\tif ( \"; //$NON-NLS-2$ //$NON-NLS-1$\n\t\t\t\t\tString test = result == T_JavaLangString ? \".equals(\" : \" != (\"; //$NON-NLS-2$ //$NON-NLS-1$\n\t\t\t\t\ts += begin\t+decode.type(result)+\"0\"+test //$NON-NLS-1$\n\t\t\t\t\t\t\t\t+decode.constant(left)+\" \" //$NON-NLS-1$\n\t\t\t\t\t\t\t\t+decode.operator(operator)+\" \" //$NON-NLS-1$\n\t\t\t\t\t\t\t\t+decode.constant(right)+\"))\\n\"; //$NON-NLS-1$\n\t\t\t\t\ts += \"\\t\\t\\tSystem.out.println(\"+ (++error) +\");\\n\"; //$NON-NLS-1$ //$NON-NLS-2$\n\t\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\n\t\treturn s += \"\\n\\t\\tSystem.out.println(\\\"binary tables test : done\\\");}\"; //$NON-NLS-1$\n\t}", "private void createStressTestRowOutgoingTable(int payloadColumns) {\n Column[] defaultColumns = getDefaultStressTestRowColumns();\n Table table = new Table(STRESS_TEST_ROW_OUTGOING, defaultColumns);\n List<Column> payloads = getPayloadColumns(payloadColumns);\n\n table.addColumns(payloads);\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "void createdOutput(TestResult tr, Section section, String outputName);", "tbls createtbls();", "private void createTableWithTestData(final DataSource dataSource) throws Exception {\n // create table\n Connection conn = dataSource.getConnection();\n Statement st = conn.createStatement();\n st.execute(CREATE_TEST_TABLE);\n conn.commit();\n st.close();\n conn.close();\n\n // fill with values\n conn = dataSource.getConnection();\n // prevent auto commit for batching\n conn.setAutoCommit(false);\n PreparedStatement ps = conn.prepareStatement(INSERT);\n // fill with values\n for (int i = 0; i < EXPECTED_COUNT; i++) {\n ps.setString(1, String.valueOf(i));\n ps.addBatch();\n }\n ps.executeBatch();\n conn.commit();\n ps.close();\n conn.close();\n }", "private void makeTable(PdfPTable table) {\n table.addCell(createTitleCell(\"Part Name\"));\n table.addCell(createTitleCell(\"Description\"));\n table.addCell(createTitleCell(\"Price\"));\n table.addCell(createTitleCell(\"Initial Stock\"));\n table.addCell(createTitleCell(\"Initial Cost, £\"));\n table.addCell(createTitleCell(\"Used\"));\n table.addCell(createTitleCell(\"Delivery\"));\n table.addCell(createTitleCell(\"New Stock\"));\n table.addCell(createTitleCell(\"Stock Cost, £\"));\n table.addCell(createTitleCell(\"Threshold\"));\n table.completeRow();\n \n addRow(table, emptyRow);\n \n for (Object[] row : data) addRow(table, row);\n \n addRow(table, emptyRow);\n \n PdfPCell c = createBottomCell(\"Total\");\n c.enableBorderSide(Rectangle.LEFT);\n table.addCell(c);\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(String.format(\"%.2f\", initialTotal)));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n PdfPCell l = createBottomCell(String.format(\"%.2f\", nowTotal));\n l.enableBorderSide(Rectangle.RIGHT);\n table.addCell(l);\n table.addCell(createBlankCell(\"\"));\n table.completeRow();\n }", "ExpRunTable createRunTable(String name, UserSchema schema, ContainerFilter cf);", "public void detailReport() {\r\n\t\tint testStepId = 1;\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><table class=\\\"width100\\\"><tr><td><div class=\\\"headertext1 bold\\\">Test Execution Detail Report</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Execution Browser Name: \"+ GlobalVariables.getBrowserName() + \"</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Test Case Name: \"+ GlobalVariables.getTestCaseName() + \"</div></td></tr>\");\r\n\t\t\r\n\t\t\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"<table colspan=3 border=0 cellpadding=3 cellspacing=1 class=\\\"reporttable width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><th class=\\\"auto-style1\\\">Test Step No</th>\" + \"<th class=\\\"auto-style2\\\">Action</th>\"\r\n\t\t\t\t+ \"<th class=\\\"auto-style3\\\">Actual Result</th>\" + \"<th class=\\\"auto-style4\\\">Status</th></tr>\");\r\n\t\tfor (ReportBean reportValue : GlobalVariables.getReportList()) {\r\n\r\n\t\t\tif (reportValue.getStatus().equalsIgnoreCase(\"Passed\")) {\r\n\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 green\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t} else if (reportValue.getStatus().equalsIgnoreCase(\"Failed\")) {\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 red\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tstrBufferReportAppend.append(\"</table>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"</table></td></tr></table></body></html>\");\r\n\t}", "public static void makeTable2() throws FileNotFoundException {\n\t\tFile dir = new File(\"testinstances\");\n\t\tFile[] directoryListing = dir.listFiles();\n\n\t\tPrintStream out = new PrintStream(new FileOutputStream(\"table2.txt\"));\n\t\tSystem.setOut(out);\n\n\t\tif (directoryListing != null) {\n\t\t\tString res = \"\";\n\t\t\tfor (File file : directoryListing) {\n\t\t\t\ttry {\n\t\t\t\t\tfloat best = Integer.MAX_VALUE;\n\t\t\t\t\tdouble longestTime = Double.MIN_VALUE;\n\t\t\t\t\tfloat sumCosts = 0;\n\t\t\t\t\tdouble sumTimes = 0;\n\n\t\t\t\t\tProblem p = Parser.parseInstance(file.toString());\n\t\t\t\t\tfloat optimum = p.getOptimalCost();\n\t\t\t\t\tString name = file.toString().replace(\".txt\", \"\");\n\n\t\t\t\t\tres = name.replace(\"testinstances/\", \"\") + \" & \"\n\t\t\t\t\t\t\t+ p.getNumberOfJobs() + \" & \"\n\t\t\t\t\t\t\t+ p.getNumberOfMachines() + \" & \"\n\t\t\t\t\t\t\t+ Math.round(p.getOptimalCost());\n\n\t\t\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\t\t\tlong startTime = System.nanoTime();\n\t\t\t\t\t\tSolution s = TabuSearch.tabuSearch(p);\n\t\t\t\t\t\tlong elapsedTimeNano = (System.nanoTime() - startTime);\n\t\t\t\t\t\tdouble elapsedTime = ((double) elapsedTimeNano) / 1E9;\n\t\t\t\t\t\tfloat c = s.getCost();\n\n\t\t\t\t\t\tif (c < best)\n\t\t\t\t\t\t\tbest = c;\n\t\t\t\t\t\tif (elapsedTime > longestTime) {\n\t\t\t\t\t\t\tlongestTime = elapsedTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsumCosts += c;\n\t\t\t\t\t\tsumTimes += elapsedTime;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tres += \" & \" + Math.round(best);\n\t\t\t\t\tif (optimum != -1) {\n\t\t\t\t\t\tfloat delta = best - optimum;\n\t\t\t\t\t\tres += \" & \" + delta / optimum * 100; // Delta Z %\n\t\t\t\t\t}\n\n\t\t\t\t\tres += \" & \" + sumCosts / 5; // Z_av\n\t\t\t\t\tres += \" & \" + sumTimes / 5; // T_av\n\t\t\t\t\tres += \" & \" + longestTime; // T_max\n\t\t\t\t\tres += \" \\\\\\\\\"; // new line in LaTeX table\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t} finally {\n\t\t\t\t\tSystem.out.println(res);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void operator_table() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new DataTableNode(\"t\", typeOf(DataTable.class), typeOf(String.class)));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n context.put(\"t\", new BasicDataTable.Builder<>().build());\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!TABLE\"));\n }", "@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }", "private void createTable(Table table) {\n\t\t// Set up the table\n\t\ttable.setLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\t// Add the column (Task)\n\t\tTableColumn lTaskColumn = new TableColumn(table, SWT.NONE);\n\t\tlTaskColumn.setText(\"Task\");\n\n\t\t// Add the column (Operation)\n\t\tTableColumn lOperationColumn = new TableColumn(table, SWT.NONE);\n\t\tlOperationColumn.setText(\"Operation\");\n\n\t\t// Add the column (Duration)\n\t\tTableColumn lDurationColumn = new TableColumn(table, SWT.NONE);\n\t\tlDurationColumn.setText(\"Duration\");\n\n\t\t// Add the column (Timeout)\n\t\tTableColumn lTimeoutColumn = new TableColumn(table, SWT.NONE);\n\t\tlTimeoutColumn.setText(\"Timed Out\");\n\n\t\t// Add the column (TEF Result)\n\t\tTableColumn lResultColumn = new TableColumn(table, SWT.NONE);\n\t\tlResultColumn.setText(\"Build/TEF Result\");\n\n\t\t// Add the column (TEF RunWsProgram)\n\t\tTableColumn lTEFRunWsProgColumn = new TableColumn(table, SWT.NONE);\n\t\tlTEFRunWsProgColumn.setText(\"TEF RunWsProgram Result\");\n\n\t\t// Pack the columns\n\t\tfor (int i = 0, n = table.getColumnCount(); i < n; i++) {\n\t\t\tTableColumn lCol = table.getColumn(i);\n\t\t\tlCol.setResizable(true);\n\t\t\tlCol.setWidth(lCol.getText().length());\n\t\t\tlCol.pack();\n\t\t}\n\n\t\t// Turn on the header and the lines\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\n\t}", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"O\\\"6T\");\n File file0 = MockFile.createTempFile(\"<*kYz\", \"BLOB\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(file0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "public void createTable() {\r\n\t\tclient.createTable();\r\n\t}", "public void createTempTable() throws Exception {\n Db db = getDb();\n try {\n db.enter();\n _logger.info(\"Creating temporary table t_http_log_data\");\n PreparedStatement createTable = db.prepareStatement(create_temp_table);\n db.executeUpdate(createTable);\n } catch (Exception e) {\n _logger.fatal(\"Error when creating temporary table t_http_log_data\", e);\n throw e;\n } finally {\n db.exit();\n }\n st_insert_temp_table = db.prepareStatement(sql_insert_temp_table);\n }", "@Test\n public void createHighScoreTableTest() {\n assertTrue(database.createHighScoreTable(testTable));\n database.clearTable(testTable);\n }", "public void testCreateTable1() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n createTable();\n }", "public void writeResultData() {\n\n// DatabaseLoader databaseLoader = new DatabaseLoader();\n TestResultDeployer testResultDeployer = new TestResultDeployer();\n MySqlDatabaseManager mySqlDatabaseManager;\n try {\n EnvironmentBuilder environmentBuilder = new EnvironmentBuilder();\n DashboardVariables dashboardVariables = environmentBuilder.getFrameworkSettings().getDashboardVariables();\n if (dashboardVariables.getEnableDashboard().equalsIgnoreCase(\"true\")) {\n String databaseName = dashboardVariables.getDbName();\n\n mySqlDatabaseManager = new MySqlDatabaseManager(dashboardVariables.getJdbcUrl(), dashboardVariables.\n getDbUserName(), dashboardVariables.getDbPassword());\n// databaseLoader.createDatabase();\n mySqlDatabaseManager.execute(\"INSERT INTO \" + databaseName + \".WA_BUILD_HISTORY VALUES()\");\n DirectoryScanner scan = new DirectoryScanner();\n scan.setBasedir(ProductConstant.REPORT_LOCATION + File.separator + \"reports\" + File.separator);\n String[] fileList = new String[]{\"*/testng-results.xml\"};\n scan.setIncludes(fileList);\n scan.scan();\n String[] fileset = scan.getIncludedFiles();\n for (int i = 0; i <= fileset.length - 1; i++) {\n testResultDeployer.writeResult(ProductConstant.REPORT_LOCATION + \"reports\" +\n File.separator + fileset[i]);\n log.info(fileset[i] + \" write to database\");\n }\n }\n } catch (ClassNotFoundException e) {\n log.error(e);\n } catch (SQLException e) {\n log.error(e);\n } /*catch (IOException e) {\n log.error(e);\n }*/\n }", "public static void rep_WriteResults(String strTemplatePath, String strOutputPath) {\n String strStatus;\n strStatus = \"Pass\";\n intPassCount = 0;\n intFailCount = 0;\n intInfoCount = 0;\n try {\n String reportIn = new String(Files.readAllBytes(Paths.get(strTemplatePath)));\n for (int i = 0; i < details.size(); i++) {\n //if statement to prevent duplication of test step numbers in the report\n if (i == 0) {\n\n\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else if (details.get(i).getResult().equals(\"Step\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=left width=100><font color=\\\"blue\\\">\" + details.get(i).getResult() + \"</font></td><td><font color=\\\"blue\\\">\" +\n details.get(i).getResultText() + \"</font></td></tr>\" + resultPlaceholder);\n\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n\n\n } else if (details.get(i).getintTestStep() == details.get(i - 1).getintTestStep()) {\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n } else {\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else if (details.get(i).getResult().equals(\"Step\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=left width=100><font color=\\\"blue\\\">\" + details.get(i).getResult() + \"</font></td><td><font color=\\\"blue\\\">\" +\n details.get(i).getResultText() + \"</font></td></tr>\" + resultPlaceholder);\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n }\n\n }\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</table>\");\n String currentDate = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\n\n\n String currentTime = CommonFunctionTest.com_CurrentTime();\n String reportPath = strOutputPath + \"\\\\report_\" + currentDate + \"_\" + currentTime + \"_\" + strStatus + \".html\";\n\n Files.write(Paths.get(reportPath), reportIn.getBytes(), StandardOpenOption.CREATE);\n\n } catch (Exception e) {\n System.out.println(\"Error when writing report file:\\n\" + e.toString());\n }\n }", "void write(TestResult testResult);", "public void createTapTable(TableConfig tableConfig) throws ConfigurationException;", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"Illegal column type format: \");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "public String createTable() {\n\n String statement = \"CREATE TABLE \" + tableName + \"( \";\n\n //go through INTEGER, FLOAT, TEXT columns\n Iterator iterator = Iterables.filter(columns.entrySet(), entry -> entry.getValue().getType() instanceof String).iterator();\n\n while (iterator.hasNext()) {\n Map.Entry<Element, FieldData> fieldDataEntry = (Map.Entry<Element, FieldData>) iterator.next();\n statement += fieldDataEntry.getValue().createColumn() + \",\";\n }\n\n return (new StringBuilder(statement).replace(statement.length() - 1, statement.length(), \"\").toString() + \")\").toUpperCase();\n }", "public static void createTable(SQLiteDatabase db) {\n String sql = \"CREATE TABLE \" + TABLE_NAME + \"(\"\n + _ID + \" INTEGER PRIMARY KEY, \"\n + COL_DATE + \" DATETIME, \"\n + COL_RESULT + \" TEXT, \"\n + COL_UNIT + \" TEXT, \"\n + COL_ROW + \" TEXT\"\n + \");\";\n\n db.execSQL(sql);\n }", "private TempTable createTempTable() throws Exception{\n\t\treturn new TempTableFile();\n\t}", "private void createTransactionsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE transactions \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY, \"\n\t\t\t\t\t+ \"owner INT, amount DOUBLE, source BIGINT, sourceType VARCHAR(20), target BIGINT, targetType VARCHAR(20), comment VARCHAR(255), time BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table transactions\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of transactions table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "public void testCreateTable2() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n props.setProperty(SqlDbManager.PARAM_DATASOURCE_DATABASENAME,\n\t\t new File(tempDirPath, \"db/TestSqlDbManager\")\n\t\t\t .getCanonicalPath());\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n createTable();\n }", "@Test\n public void testTableFactoryCreate() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertEquals(1, tableController.getTableMap().get(2).size());\n }", "@Test\n\tpublic void armarGananciasDeLosResultantes() {\n\t\t/*\n\t\t * me salieron 24 arboles, que me interesan los campos \n\t\t * NodeID_24 : para saber que hoja del arbol fue \n\t\t * PredictedProbability_2_24 : para saber que probabilidad de baja mas 2 fue \n\t\t * SampleAssignment_24 : para saber si fue tomado para test o train tengoq ue correr el script siguient para persistirlo en la DB\n\t\t * \n\t\t * los nombres de las variables van como anteriorlmente , el inicial no\n\t\t * tiene subindice, pero se lo cambi oy le pongo 0 cosa de que arranque\n\t\t * en 0\nIF (A_default_prob >= 0.025 AND clase_int=2) A_default_ganancia=7800. \nEXECUTE. \nRECODE A_default_ganancia (SYSMIS=-200). \nEXECUTE.\n\nSAVE TRANSLATE /TYPE=ODBC \n /CONNECT='DSN=dmkd-dmf;' \n /ENCRYPTED \n /MISSING=RECODE \n /SQL='CREATE TABLE historico_201503_default_tree_result (numero_de_cliente double , foto_mes double , A_default_node double , A_default_prob double, A_default_ganancia double )' \n /REPLACE \n /TABLE='SPSS_TEMP' \n /KEEP=numero_de_cliente, foto_mes, A_default_node, A_default_prob ,A_default_ganancia\n /SQL='INSERT INTO historico_201503_default_tree_result (numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia) SELECT numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia FROM SPSS_TEMP' \n /SQL='DROP TABLE SPSS_TEMP'. \nEXECUTE.\nDATASET CLOSE.\nEXECUTE.\n\n\nPredictedProbability_2_24\n\t\t * \n\t\t */\n\t\t// de 0 a 24\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tString outFolder = ArbolFileSources.userFolder + \"/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_2_dm_finanzas/entregable/historia/\";\n\t\tString timeStampFolder = UtilidadesGenerales.getTimeStamp(null, null);\n\t\tStringBuilder build = new StringBuilder();\n\t\tfor (int i = 0; i < 25; i++) {\n\t\t\t\n\t\t\tString nombreProba = \"PredictedProbability_2_\"+i;\n\t\t\tString nombreGanancia= \"ganancia_\"+i;\n\t\t\tString nombreNodo= \"NodeID_\"+i;\n\t\t\tString nombreTrain= \"SampleAssignment_\"+i;\n\t\t\tString nombreTabla = \"corridaCiega_\"+i;\n\t\t\t\n\t\t\t/* recode de ganancia */\n\t\t\tbuild.append(\"IF (PredictedProbability_2_\").append(i).append(\" >= 0.025 AND clase_int=2 ) ganancia_\").append(i).append(\"=7800.\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\tbuild.append(\"RECODE ganancia_\").append(i).append(\"(SYSMIS=-200).\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\t\n\t\t\t \n\t\t\t/* save sql */\n\t\t\tbuild.append(\"SAVE TRANSLATE /TYPE=ODBC\").append(separator);\n\t\t\tbuild.append(\"/CONNECT='DSN=dmkd-dmf;'\").append(separator);\n\t\t\tbuild.append(\"/ENCRYPTED \").append(separator);\n\t\t\tbuild.append(\"/MISSING=RECODE \").append(separator);\n\t\t\tbuild.append(\"/SQL='CREATE TABLE \").append(nombreTabla).append(\" (numero_de_cliente double , foto_mes double , '+\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" double ) '\").append(separator);\n\t\t\t\n \n\t\t\tbuild.append(\"/REPLACE \").append(separator);\n\t\t\tbuild.append(\"/TABLE='SPSS_TEMP' \").append(separator);\n\t\t\tbuild.append(\"/KEEP=numero_de_cliente, foto_mes, \").append(separator);\n\t\t\tbuild.append(nombreProba).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreGanancia).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreNodo).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreTrain).append(\" \").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='INSERT INTO \").append(nombreTabla).append(\" (numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' ) SELECT numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' FROM SPSS_TEMP'\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='DROP TABLE SPSS_TEMP'.\").append(separator); \n\t\t\tbuild.append(\"EXECUTE.\").append(separator).append(separator);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tUtilidadesGenerales.writeToFile(build.toString(), \"UTF-8\", outFolder + timeStampFolder + \"_syntax_corridaCiega_.txt\");\n\t}", "@Test\r\n public void test()\r\n {\r\n Assert.assertEquals(\"<table>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<th></th>\\n\" +\r\n \"\\t<th>Sunny</th>\\n\" +\r\n \"\\t<th>Rainy</th>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week1</td>\\n\" +\r\n \"\\t<td>5</td>\\n\" +\r\n \"\\t<td>2</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week2</td>\\n\" +\r\n \"\\t<td>3</td>\\n\" +\r\n \"\\t<td>4</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"</table>\", new HtmlReportPrinter().print(report));\r\n }", "private static void printCreateTable(DynamoDBMapper mapper) {\n\t\tSystem.out.println(\"*** Printing CreateTableRequest\");\n\t\tCreateTableRequest req = mapper.generateCreateTableRequest(DynamoDBMovie.class);\n\t\tSystem.out.println(req);\n\t\tSystem.out.println(\"*** Done\");\n\t}", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate static void createTestData() {\n\t\t\n\t\tusers.put(\"User0\", objectHandler.createUser(25.0));\n\t\tusers.put(\"User1\", objectHandler.createUser(1.0));\n\t\t\n\t\tdocuments.put(\"Doc0\", objectHandler.createDocument(\"mydoc\", 25, '4', 'C'));\n\t\tdocuments.put(\"Doc1\", objectHandler.createDocument(\"another\", 15, '3', 'B'));\n\t\t\n\t\tusers.get(\"User0\").addDocument(documents.get(\"Doc0\"));\n\t\tusers.get(\"User1\").addDocument(documents.get(\"Doc1\"));\n\t\t\n\t\tPrinterCapability capability1 = objectHandler.createPrinterCapability(true, false, true, true);\n\t\tPrinterCapability capability2 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\tPrinterCapability capability3 = objectHandler.createPrinterCapability(false, true, true, false);\n\t\t\n\t\tPrinterPricing pricing = objectHandler.createPrinterPricing(0.03, 0.14, 0.06, 0.24);\n\t\t\n\t\tPrinterCapacity capacity1 = objectHandler.createPrinterCapacity(25, 0, 10, 30);\n\t\tPrinterCapacity capacity2 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\tPrinterCapacity capacity3 = objectHandler.createPrinterCapacity(0, 10, 15, 0);\n\t\t\n\t\tprinters.put(\"Printer0\", objectHandler.createPrinter(\"A4All\", capability1, pricing, capacity1, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer1\", objectHandler.createPrinter(\"A3B\", capability2, pricing, capacity2, objectHandler.createPrinterStatus()));\n\t\tprinters.put(\"Printer2\", objectHandler.createPrinter(\"A3B-rip\", capability3, pricing, capacity3, objectHandler.createPrinterStatus()));\n\t\t\n\t\tVDMSet status = new VDMSet();\n\t\tstatus.add(\"needFixing\");\n\t\tprinters.get(\"Printer2\").break_(status);\n\t}", "TD createTD();", "private String createStatisticsStringHtmlTable(String allRows, List<String> list) {\n String tmpListAsString = list.toString();\n\n if (!tmpListAsString.contains(\"Scenario\")) {\n allRows += \"<tr><td>\";\n\n tmpListAsString = tmpListAsString.replace(\",\", \"</td><td>\");\n tmpListAsString = tmpListAsString.replace(\"[\", \"\");\n tmpListAsString = tmpListAsString.replace(\"]\", \"\");\n\n allRows += tmpListAsString + \"</td></tr>\";\n }\n\n return allRows;\n }", "private void createTable() {\n\t\tfreqTable = new TableView<>();\n\n\t\tTableColumn<WordFrequency, Integer> column1 = new TableColumn<WordFrequency, Integer>(\"No.\");\n\t\tcolumn1.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"serialNumber\"));\n\n\t\tTableColumn<WordFrequency, String> column2 = new TableColumn<WordFrequency, String>(\"Word\");\n\t\tcolumn2.setCellValueFactory(new PropertyValueFactory<WordFrequency, String>(\"word\"));\n\n\t\tTableColumn<WordFrequency, Integer> column3 = new TableColumn<WordFrequency, Integer>(\"Count\");\n\t\tcolumn3.setCellValueFactory(new PropertyValueFactory<WordFrequency, Integer>(\"count\"));\n\n\t\tList<TableColumn<WordFrequency, ?>> list = new ArrayList<TableColumn<WordFrequency, ?>>();\n\t\tlist.add(column1);\n\t\tlist.add(column2);\n\t\tlist.add(column3);\n\n\t\tfreqTable.getColumns().addAll(list);\n\t}", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "public void fnWriteTestSummary(String strTestCaseName, String strResult, String strDuration){\r\n \tString sColor,sRowColor;\r\n \r\n //Close the file\r\n try{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t //Check color result\r\n\t if (strResult.toUpperCase().equals(\"PASSED\") || strResult.toUpperCase().equals(\"PASS\")){\r\n\t sColor = \"GREEN\";\r\n\t g_iTCPassed ++;\r\n\t }\r\n\t else if (strResult.toUpperCase().equals(\"FAILED\") || strResult.toUpperCase().equals(\"FAIL\")){\r\n\t \tsColor = \"RED\";\r\n\t }\r\n\t else{\r\n\t \tsColor = \"ORANGE\";\r\n\t }\r\n\t\r\n\t g_iTestCaseNo++;\r\n\t\r\n\t if (g_iTestCaseNo % 2 == 0){sRowColor = \"#EEEEEE\";}\r\n\t else{sRowColor = \"#D3D3D3\";}\r\n\t \r\n\t //Write the result of Individual Test Case\r\n\t new PrintStream(foutStrm).println (\"<TR COLS=3 BGCOLOR=\" + sRowColor + \"><TD WIDTH=10%><FONT FACE=VERDANA SIZE=2>\" + g_iTestCaseNo + \"</FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA SIZE=2>\" + strTestCaseName + \"</FONT></TD><TD WIDTH=15%><A HREF='\" + strTestCaseName + \".html'><FONT FACE=VERDANA SIZE=2 COLOR=\" + sColor + \"><B>\" + strResult + \"</B></FONT></A></TD><TD WIDTH=15%><FONT FACE=VERDANA SIZE=2>\" + strDuration+ \"</FONT></TD></TR>\");\r\n \r\n \tfoutStrm.close();\r\n }\r\n catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n foutStrm = null;\r\n\r\n }", "private static void assembleRosterTable(){\n for (int i = 0; i < 10; i++) {\n rosterTable.insertRow(i);\n }\n }", "boolean createTable();", "public Creator_4_tables() {\n// this.sourceUnits = sourceUnits;\n sourceUnits = new HashMap<String, PojoSourceCreatorUnit>();\n sourceTemplatePool.logEnvOnSrcCreate = app.cfg.getCfgBean().logEnvOnSrcCreate;\n env.setLogLeading(\"--cfenv--\");\n }", "void write(TestResultContainer testResultContainer);", "public PdfPTable createTable() {\n\t\tPdfPTable t = new PdfPTable(2);\n\t\tt.setWidthPercentage(100);\n\t\tt.setHorizontalAlignment(Element.ALIGN_LEFT);\n\t\tt.getDefaultCell().setBorder(Rectangle.NO_BORDER);\n\t\t// set up the table headers for albums\n\t\tif (state.equals(\"a\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell artistCell = new PdfPCell();\n\t\t\tartistCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase artist = new Phrase(\"Artist\", bold);\n\t\t\tartistCell.addElement(artist);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(artistCell);\n\t\t}\n\t\t// set up the table headers for publications\n\t\telse if (state.equals(\"p\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell devisorCell = new PdfPCell();\n\t\t\tdevisorCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase devisor = new Phrase(\"Devisor\", bold);\n\t\t\tdevisorCell.addElement(devisor);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(devisorCell);\n\t\t}\n\t\ttry {\n\t\t\tResultSet results = db.searchTableByName(table, \"\", true);\n\t\t\twhile(results.next()) {\n\t\t\t\t// add album info to table\n\t\t\t\tif (state.equals(\"a\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"artist\"));\n\t\t\t\t}\n\t\t\t\t// add publication info to table\n\t\t\t\telse if (state.equals(\"p\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"devisor\"));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn t;\n\t}", "private static void TAtest() throws Exception {\n\t\tString qry0 = \"drop table student;\";\n\t\tplannerOpt.executeUpdate(qry0);;\n\t\tString qry1 = \"CREATE TABLE classroom\\n\" + \n\t\t\t\t\"\t(id\t\t\t\tINT NOT NULL,\\n\" + \n\t\t\t\t\"\t name\t\t\tString(32) NOT NULL,\\n\" + \n\t\t\t\t\"\t length FLOAT,\\n\" + \n\t\t\t\t\"\t height FLOAT,\\n\" + \n\t\t\t\t\" width DOUBLE,\\n\" + \n\t\t\t\t\"\t PRIMARY KEY(id)\\n\" + \n\t\t\t\t\"\t);\";\n\t\tString qry2 = \"DROP TABLE classroom;\";\n\t\tString qry3 = \"CREATE TABLE student\\n\" + \n\t\t\t\t\"\t(id\t\t\t\tINT NOT NULL, \\n\" + \n\t\t\t\t\"\t name\t\t\tString(32) NOT NULL, \\n\" + \n\t\t\t\t\"\t dept_name\t\tString(32), \\n\" + \n\t\t\t\t\"\t height FLOAT,\\n\" + \n\t\t\t\t\"\t weight DOUBLE,\\n\" + \n\t\t\t\t\"\t PRIMARY KEY (id) );\";\n\t\tplannerOpt.executeUpdate(qry1);\n\t\tplannerOpt.executeUpdate(qry2);\n\t\tplannerOpt.executeUpdate(qry3);\n\t\t\n\t\tString qry4 =\"INSERT INTO student VALUES(0,'0','History',167.1,42.9);\";\n\t\tString qry5 = \"INSERT INTO student VALUES(1,'1','Geology',171.7,46.7);\";\n\t\tString qry6 = \"INSERT INTO student VALUES(2,'2','Physics',188.7,78.4);\";\n\t\tString qry7 = \"INSERT INTO student VALUES(3,'3','English',197.4,43.4);\";\n\t\tString qry8 = \"INSERT INTO student VALUES(4,'4','History',180.9,80.9);\";\n\t\tString qry9 = \"INSERT INTO student VALUES(5,'5','English',166.9,80.4);\"; \n\t\tString qry9_1 = \"INSERT INTO student VALUES(498,'498','Physics',156.9,86.1);\";\n\t\tString qry10 = \"INSERT INTO student VALUES(499,'499','History',175.0,67.9);\";\t\n\t\tplannerOpt.executeUpdate(qry4);\n\t\tplannerOpt.executeUpdate(qry5);\n\t\tplannerOpt.executeUpdate(qry6);\n\t\tplannerOpt.executeUpdate(qry7);\n\t\tplannerOpt.executeUpdate(qry8);\n\t\tplannerOpt.executeUpdate(qry9);\n\t\tplannerOpt.executeUpdate(qry9_1);\n\t\tplannerOpt.executeUpdate(qry10);\n\t\t\n\t\tString qry11 = \"DELETE FROM student WHERE name = '499';\";\n\t\tString qry12 = \"UPDATE student SET height = 250.0 WHERE id = 498;\";\n\t\tplannerOpt.executeUpdate(qry11);\n\t\tplannerOpt.executeUpdate(qry12);\n\t\t\n\t\tString qry = \"select * from student\";\n\t\tp = plannerOpt.createQueryPlan(qry);\n\t\texecPlan(p);\n\t\t\n\t\tString qry12_1 = \"DROP TABLE department;\";\n\t\tplannerOpt.executeUpdate(qry12_1);\n\t\tString qry13 = \"CREATE TABLE department\" + \n\t\t\t\t\"\t(dept_name\t\tString(32),\" + \n\t\t\t\t\"\t building\t\tString(15),\" + \n\t\t\t\t\"\t budget\t\t LONG,\\n\" + \n\t\t\t\t\"\t PRIMARY KEY (dept_name)\\n\" + \n\t\t\t\t\"\t);\";\n\t\tString qry14 = \"INSERT INTO department VALUES('Biology','Candlestick',647610);\"; \n\t\tString qry15 = \"INSERT INTO department VALUES('History','Taylor',699140);\";\n\t\tString qry16 = \"INSERT INTO department VALUES('Physics','Wrigley',942162);\"; \n\t\tString qry17 = \"INSERT INTO department VALUES('English','Palmer',611042);\";\n\t\tString qry18 = \"INSERT INTO department VALUES('Finance','Candlestick',866831);\";\n\t\tString qry19 = \"INSERT INTO department VALUES('Geology','Palmer',406557);\";\n\t\tplannerOpt.executeUpdate(qry13);\n\t\tplannerOpt.executeUpdate(qry14);\n\t\tplannerOpt.executeUpdate(qry15);\n\t\tplannerOpt.executeUpdate(qry16);\n\t\tplannerOpt.executeUpdate(qry17);\n\t\tplannerOpt.executeUpdate(qry18);\n\t\tplannerOpt.executeUpdate(qry19);\n\t\t\n\t\tString qry20 = \"SHOW TABLE department;\";\n\t\tSystem.out.println(plannerOpt.executeShow(qry20));\n\t\t\n\t\tString qry21_1 = \"SELECT * from department\";\n\t\tp = plannerOpt.createQueryPlan(qry21_1);\n\t\texecPlan(p);\n//\t\t\n//\t\tqry21_1 = \"SELECT * from student, department\";\n//\t\tp = plannerOpt.createQueryPlan(qry21_1);\n//\t\texecPlan(p);\n\n\t\tString qry21 = \"SELECT student.name, student.dept_name, department.budget FROM student JOIN department ON student.dept_name = department.dept_name WHERE student.height > 180.0;\";\n\t\tp = plannerOpt.createQueryPlan(qry21);\n\t\texecPlan(p);\n\t\t\n\t\tString qry22 = \"SELECT * FROM student;\";\n\n\t\tString qry23 = \"SELECT id, name FROM student WHERE id = 250;\";\n\t}", "private void makeTable() {\n String [] cols = new String[] {\"Planets\", \"Weights (in lbs)\", \"Weights (in kgs)\"};\n model = new DefaultTableModel(result,cols) {\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n table = new JTable(model);\n JScrollPane scrollPane = new JScrollPane(table);\n scrollPane.setPreferredSize(new Dimension(310,155));\n middlePanel.add(scrollPane);\n revalidate();\n repaint();\n }", "public static void createTable() {\n\n // Create statement\n Statement statement = null;\n try {\n statement = Database.getDatabase().getConnection().createStatement();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n // Attempt to create table\n try {\n statement.execute(\n \"CREATE TABLE \" + Constants.SANITATION_TABLE + \"(\" +\n \"requestID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),\" +\n \"nodeID VARCHAR(100) References \" + Constants.LOCATION_TABLE + \" (nodeID), \" +\n \"priority VARCHAR(10), \" +\n \"status VARCHAR(100), \" +\n \"description VARCHAR(100), \" +\n \"requesterID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"requestTime TIMESTAMP, \" +\n \"servicerID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"claimedTime TIMESTAMP, \" +\n \"completedTime TIMESTAMP, \" +\n \"CONSTRAINT priority_enum CHECK (priority in ('LOW', 'MEDIUM', 'HIGH')), \" +\n \"CONSTRAINT status_enum CHECK (status in ('INCOMPLETE', 'COMPLETE')))\"\n );\n } catch (SQLException | NullPointerException e) {\n e.printStackTrace();\n }\n }", "@Test\n\tpublic void driverCreateReport() {\n\t\tfinal Object testingData[][] = {\n\t\t\t{\n\t\t\t\t\"2019/04/23\", \"example\", \"player1\", null\n\t\t\t},//1. All fine\n\t\t\t{\n\t\t\t\t\"2019/04/23\", \"\t\t\", \"player1\", ConstraintViolationException.class\n\t\t\t},//2. Description = blank\n\t\t\t{\n\t\t\t\t\"2019/04/23\", null, \"player1\", ConstraintViolationException.class\n\t\t\t},//3. Description = null\n\n\t\t};\n\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.templateCreateReport(this.convertStringToDate((String) testingData[i][0]), (String) testingData[i][1], (String) testingData[i][2], (Class<?>) testingData[i][3]);\n\t}", "Rows createRows();", "public void createTable() {\r\n CreateTableRequest request = new CreateTableRequest()\r\n .withAttributeDefinitions(new AttributeDefinition(\r\n \"Username\", ScalarAttributeType.S))\r\n .withKeySchema(new KeySchemaElement(\"Username\", KeyType.HASH))\r\n .withProvisionedThroughput(new ProvisionedThroughput(\r\n new Long(5), new Long(5)))\r\n .withTableName(\"IST440Users\");\r\n\r\n creds = new BasicAWSCredentials(\"no\", \"nope\");\r\n client = AmazonDynamoDBClientBuilder.standard().\r\n withRegion(\"us-east-1\")\r\n .withCredentials(new AWSStaticCredentialsProvider(creds))\r\n .build();\r\n\r\n db = new DynamoDB(client);\r\n table = db.getTable(\"IST440Users\");\r\n \r\n \r\n tableDescription = table.describe();\r\n System.out.printf(\"%s: %s \\t ReadCapacityUnits: %d \\t WriteCapacityUnits: %d\\n\",\r\n tableDescription.getTableStatus(),\r\n tableDescription.getTableName(),\r\n tableDescription.getProvisionedThroughput().getReadCapacityUnits(),\r\n tableDescription.getProvisionedThroughput().getWriteCapacityUnits()); \r\n }", "@Override\n public void createTable() throws Exception {\n }", "private String createTableSQL()\n\t{\n\t\tStringBuffer str = new StringBuffer();\n\n\t\t// Keep track of the list of fields\n\t\tList<String> listFields = new ArrayList<String>();\n\n\t\t// Table command\n\t\tstr.append(\"CREATE TABLE \" + getFullPath() + \"( \");\n\t\tstr.append(createStandardGZFields());\n\n\t\t// Loop through all InputFields\n\t\tfor (InputFieldSet fieldSet : function.getInputFieldSets())\n\t\t{\n\t\t\tfor (InputField inputField : fieldSet.getInputFields())\n\t\t\t{\n\t\t\t\t// Phase 2 does not support repeating fields being journalled\n\t\t\t\tif (!Field.isRepeating(inputField))\n\t\t\t\t{\n\t\t\t\t\t// Field\n\t\t\t\t\tString fieldName = SQLToolbox.cvtToSQLFieldName(inputField.getId());\n\n\t\t\t\t\t// add if not yet existing\n\t\t\t\t\tif (listFields.indexOf(fieldName) == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr.append(\", \");\n\t\t\t\t\t\tString fieldDataType = inputField.getDataType();\n\t\t\t\t\t\tString fieldType = SQLToolbox.cvtToSQLFieldType(fieldDataType, inputField.getSize(), inputField\n\t\t\t\t\t\t\t\t\t\t.getDecimals());\n\t\t\t\t\t\tString fieldDefault = SQLToolbox.cvtToSQLDefault(fieldDataType);\n\t\t\t\t\t\tstr.append(fieldName + \" \" + fieldType + \" \" + \" not null default \" + fieldDefault);\n\t\t\t\t\t\tlistFields.add(fieldName);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End\n\t\tstr.append(\" ) \");\n\t\t// RCDFMT \" + getJournalRcdName());\n\n\t\treturn str.toString();\n\t}", "private void createTables() {\n\t\tStatement s = null;\n\t\ttry {\n\t\t\ts = conn.createStatement();\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString createString = \"CREATE TABLE targeteprs (\" +\n\t\t\t\t\t \"targetepr varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"processID varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"operation varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"status varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"uniqueID varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"correlationKey varchar(255) NOT NULL, \"+\n\t\t\t\t\t \"correlationValue varchar(255) NOT NULL)\";\n\t\t//System.out.println(\"CREATE: \" + createString);\n\t\tSystem.out.println(\"--> Created targetepr table.\");\n\t\ttry {\n\t\t\tthis.insertQuery(createString);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tcreateString = \"CREATE TABLE workflow (\" +\n\t\t\t\t\t \"uniqueID varchar(100) NOT NULL, \" +\n\t\t\t\t\t \"processID varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"operation varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"status varchar(255) NOT NULL, \" +\n\t\t\t\t\t \"correlationKey varchar(255) NOT NULL, \"+\n\t\t\t\t\t \"correlationValue varchar(255) NOT NULL)\";\n\t\t//System.out.println(\"CREATE: \" + createString);\n\t\tSystem.out.println(\"--> Created workflow table.\");\n\t\ttry {\n\t\t\tthis.insertQuery(createString);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "void create(DataTableDef def) throws IOException;", "@TestFactory\n Stream<DynamicTest> testStreamFactoryTableDataTest() {\n List<String[]> testData = Arrays.stream(new Object[][]{\n {\"Col 1, Row 1\", \"Col 2, Row 1\", dummyFruits.get(1).getType().toString()},\n {\"Col 1, Row 2\", \"Col 2, Row 2\", dummyFruits.get(2).getType().toString()}\n })\n .map(objects -> Arrays.stream(objects).map(Object::toString).toArray(String[]::new))\n .collect(Collectors.toList());\n\n return testData.stream()\n .map(strings -> DynamicTest.dynamicTest(testData.toString(), () -> Assertions.assertNotNull(testData)));\n }", "private void createTotalTestCase(BufferedWriter writer) throws IOException {\r\n\t\tString parent = \"<label style='margin-top: 8px;position: absolute;'>\";\r\n\t\tString content = \"<span style='display: inline;color: #000000;margin-left: 8px;font-weight: bold;font-family: Roboto, sans-serif;'>Total TestCases</span>\";\r\n\t\tString total = \"<span style='display: inline;color: #000000;margin-left: 100px;font-weight: bold;font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ data.getNumberOfTestTags() + \"</span></label>\";\r\n\t\twriter.write(parent + content + total);\r\n\t}", "@Override\r\n\tpublic void createFile(FacebookClient fbClient, ITable table,\r\n\t\t\tString outputFile) {\n\t}", "public boolean createTable(String input) throws IOException{\n\t\tString orgQuery = input;\n\t\torgQuery = orgQuery.trim();\n\t\tString query = input.toLowerCase().trim();\n\t\tboolean queryFailed = false;\n\t\t//Schema Instance \n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\n\t\t//TableSchemaManager Instance\n\t\tTableSchemaManager currentTableSchemaManager = TableSchemaManager.getTableSchemaManagerInstance();\n\n\t\t//Extracting Table name\n\t\ttableName = orgQuery.substring(query.indexOf(\"table \")+6,query.indexOf(\"(\")).trim();\n\n\t\t//Updating SCHEMA.TABLE.TBL\n\t\tif(updateInformationSchemaTable()){\n\t\t\tqueryFailed = true;\n\t\t\treturn queryFailed;\n\t\t}\n\n\t\t//Extracting Table contents\n\t\tString tableContentsWithQuotes = orgQuery.substring(orgQuery.indexOf(\"(\")+1,orgQuery.length());\n\t\tString tableContents = tableContentsWithQuotes.replace(\"))\", \")\");\n\t\ttableContents = tableContents.trim();\n\n\t\tTableSchemaManager.ordinalMap = new TreeMap<Integer,List<String>>();\n\t\tTableSchemaManager.tableMap = new TreeMap<String,TreeMap<Integer,List<String>>>();\n\t\t\n\t\t//Creating n instances of Table helper\n\t\tString[] createTableContents = tableContents.split(\"\\\\,\"); \n\t\tnoOfColumns = createTableContents.length;\n\t\tCreateTableHelper[] th = new CreateTableHelper[noOfColumns];\n\n\t\t\n\t\t//Handles single row of Create Table \n\t\tfor(int item = 0; item < noOfColumns ; item++){\n\t\t\tth[item] = new CreateTableHelper(); \n\t\t\t//To remove any leading or trailing spaces\n\t\t\tcreateTableContents[item] = createTableContents[item].trim();\n\t\t\tString columnName = createTableContents[item].substring(0, createTableContents[item].indexOf(\" \"));\n\t\t\tth[item].setColumnName(columnName);\n\n\t\t\t//Setting Primary Key\n\t\t\tString primaryKeyExp = \"(.*)[pP][rR][iI][mM][aA][rR][yY](.*)\";\n\t\t\tif (createTableContents[item].matches(primaryKeyExp))\n\t\t\t\tth[item].setPrimaryKey(true);\n\t\t\telse\n\t\t\t\tth[item].setPrimaryKey(false);\n\n\t\t\t//Setting Null Value\t\n\t\t\tString notNullExp = \"(.*)[nN][uU][lL][lL](.*)\";\n\t\t\tif (createTableContents[item].matches(notNullExp))\n\t\t\t\tth[item].setNull(true);\n\t\t\telse\n\t\t\t\tth[item].setNull(false);\n\n\t\t\t//Extracting data types \n\t\t\t//BYTE\n\t\t\tString byteExp = \"(.*)[bB][yY][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(byteExp)){\n\t\t\t\tth[item].setDataType(\"BYTE\");\n\t\t\t}\n\t\t\t//SHORT\n\t\t\tString shortExp = \"(.*)[sS][hH][oO][rR][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(shortExp)){\n\t\t\t\tth[item].setDataType(\"SHORT\");\n\t\t\t}\n\t\t\t//INT\n\t\t\tString intExp = \"(.*)[iI][nN][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(intExp)){\n\t\t\t\tth[item].setDataType(\"INT\");\n\t\t\t}\n\t\t\t//LONG\n\t\t\tString longExp = \"(.*)[lL][oO][nN][gG](.*)\";\n\t\t\tif (createTableContents[item].matches(longExp)){\n\t\t\t\tth[item].setDataType(\"LONG\");\n\t\t\t}\n\t\t\t//CHAR\n\t\t\tString charExp = \"(.*)[cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(charExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"CHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//VARCHAR\n\t\t\tString varcharExp = \"(.*)[vV][aA][rR][cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(varcharExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"VARCHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//FLOAT\n\t\t\tString floatExp = \"(.*)[fF][lL][oO][aA][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(floatExp)){\n\t\t\t\tth[item].setDataType(\"FLOAT\");\t\t\t\t\n\t\t\t}\n\t\t\t//DOUBLE\n\t\t\tString doubleExp = \"(.*)[dD][oO][uU][bB][lL][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(doubleExp)){\n\t\t\t\tth[item].setDataType(\"DOUBLE\");\n\t\t\t}\n\t\t\t//DATETIME\n\t\t\tString dateTimeExp = \"(.*)[dD][aA][tT][eE][tT][iI][mM][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateTimeExp)){\n\t\t\t\tth[item].setDataType(\"DATETIME\");\n\t\t\t}\n\t\t\t//DATE\n\t\t\tString dateExp = \"(.*)[dD][aA][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateExp)){\n\t\t\t\tth[item].setDataType(\"DATE\");\n\t\t\t}\n\n\t\t\tcurrentTableSchemaManager.newTableSchema(\n\t\t\t\t\ttableName,\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\n\t\t\t//Updating SCHEMA.COLUMNS.TBL\n\t\t\tupdateInformationSchemaColumn(\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\t\t\t//Create tables to insert index\n\t\t\tString newTableIndexName = currentSchemaName + \".\" + tableName + \".\" +th[item].getColumnName()+ \".tbl.ndx\";\n\t\t\tRandomAccessFile newTableIndexFile = new RandomAccessFile(newTableIndexName, \"rw\");\n\t\t\tnewTableIndexFile.close();\n\n\t\t}\n\n\t\tTableSchemaManager.tableMap.put(tableName, TableSchemaManager.ordinalMap);\n\t\tcurrentTableSchemaManager.updateTableSchema(currentSchemaName,tableName);\n\t\t\n\t\t//Create tables to insert data \n\t\tString newTableDataName = currentSchemaName + \".\" + tableName + \".tbl\";\n\t\tRandomAccessFile newTableDataFile = new RandomAccessFile(newTableDataName, \"rw\");\n\t\tnewTableDataFile.close();\n\t\treturn queryFailed;\n\t}", "TH createTH();", "private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n keys.add(i);\n }\n }", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n File file0 = FileUtil.canonicalFile(\"drop tablealter materkalized viewjcsh%4%|@v9 as alter materkalized on drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29 and drop tablealter materkalized viewjcsh%4%|@v9.java.lang.Object@4d3d5d29 = alter materkalized .java.lang.Object@4d3d5d29\");\n MockFileOutputStream mockFileOutputStream0 = new MockFileOutputStream(file0, true);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(mockFileOutputStream0, false);\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "public abstract String[] createTablesStatementStrings();", "public void createTmpTable(GenericService genericService, String nonce) {\n // Get the current method name\n String methodName = new Throwable().getStackTrace()[0].getMethodName();\n\n // To time how long function takes to run\n Stopwatch stopwatch = Stopwatch.createStarted();\n\n // Use non-external table so that temporary file can be removed with table drop\n String sql =\n \"CREATE TABLE %s (%s)\"\n + \" STORED AS ORC LOCATION '%s' TBLPROPERTIES ('ORC.COMPRESS' = 'ZLIB')\";\n String query = String.format(\n sql,\n genericService.getTmpTableName() + \"_\" + nonce,\n genericService.getSchemaStr(),\n genericService.getOutputPath(nonce)\n );\n jdbcTemplate.execute(query);\n\n stopwatch.stop(); // Optional\n log.info(\"[{} - {}] -> Time elapsed: [{}] ms\",\n genericService.getTableName(),\n methodName,\n stopwatch.elapsed(TimeUnit.MILLISECONDS)\n );\n }", "public ParameterTable createOutputParameters() {\r\n final ParameterTable table = new ParameterTable();\r\n\r\n try {\r\n table.put(new ParameterImage(AlgorithmParameters.RESULT_IMAGE));\r\n } catch (final ParserException e) {\r\n // this shouldn't really happen since there isn't any real parsing going on...\r\n e.printStackTrace();\r\n }\r\n\r\n return table;\r\n }", "public ParameterTable createOutputParameters() {\r\n final ParameterTable table = new ParameterTable();\r\n\r\n try {\r\n table.put(new ParameterImage(AlgorithmParameters.RESULT_IMAGE));\r\n } catch (final ParserException e) {\r\n // this shouldn't really happen since there isn't any real parsing going on...\r\n e.printStackTrace();\r\n }\r\n\r\n return table;\r\n }", "public void createTables() throws Exception{\n\t\tcreate_table(\"tab_global\", \"param\", 1);\n\t\t\n\t\tPut put = new Put(Bytes.toBytes(\"row_userid\"));\n\t\tlong id = 0;\n\t\tput.add(Bytes.toBytes(\"param\"), \n\t\t\t\tBytes.toBytes(\"userid\"), \n\t\t\t\tBytes.toBytes(id));\n\t\tHTable ht = new HTable(conf, \"tab_global\");\n\t\tht.put(put);\n\t\t\n\t\tcreate_table(\"tab_user2id\", \"info\", 1);\n\t\tcreate_table(\"tab_id2user\", \"info\", 1);\n\t\t\n\t\t//table_follow\t{userid}\tname:{userid}\n\t\tcreate_table(\"tab_follow\", \"name\", 1);\n\t\t\n\t\t//table_followed\trowkey:{userid}_{userid} CF:userid\n\t\tcreate_table(\"tab_followed\", \"userid\", 1);\n\t\t\n\t\t//tab_post\trowkey:postid\tCF:post:username post:content post:ts\n\t\tcreate_table(\"tab_post\", \"post\", 1);\n\t\tput = new Put(Bytes.toBytes(\"row_postid\"));\n\t\tid = 0;\n\t\tput.add(Bytes.toBytes(\"param\"), \n\t\t\t\tBytes.toBytes(\"postid\"), \n\t\t\t\tBytes.toBytes(id));\n\t\tht.put(put);\n\t\t\n\t\t//tab_inbox\t\trowkey:userid+postid\tCF:postid\n\t\tcreate_table(\"tab_inbox\", \"postid\", 1);\n\t\tht.close();\n\t}", "public String getCreateTemporaryTableString() {\n \t\treturn \"create table\";\n \t}", "void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }", "public String createTable(){\r\n return \"CREATE TABLE Doctor \" +\r\n \"(idDoctor decimal primary key, \" +\r\n \"firstNameDoctor char(14), \" +\r\n \"lastNameDoctor char(14), \" +\r\n \"costPerVisit integer,\" +\r\n \"qualification varchar(32))\";\r\n }", "protected void createTable() throws Exception {\n startService();\n assertEquals(true, sqlDbManager.isReady());\n\n Connection conn = sqlDbManager.getConnection();\n assertNotNull(conn);\n assertFalse(sqlDbManager.tableExists(conn, \"testtable\"));\n assertTrue(sqlDbManager.createTableIfMissing(conn, \"testtable\",\n\t\t\t\t\t TABLE_CREATE_SQL));\n assertTrue(sqlDbManager.tableExists(conn, \"testtable\"));\n sqlDbManager.logTableSchema(conn, \"testtable\");\n assertFalse(sqlDbManager.createTableIfMissing(conn, \"testtable\",\n\t\t\t\t\t TABLE_CREATE_SQL));\n }", "public TableCreation(Table table) {\n this.table = table;\n }", "private void writeResults(File tempFile, BackupPolicy backupPolicy)\n throws IOException {\n Writer out;\n try {\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile), StandardCharsets.UTF_8));\n } catch (IOException e) {\n execStatus = Status.error(\"Problem writing result file for test: \" + getTestName());\n resultsFile = null; // file not successfully written after all\n throw e;\n }\n\n try {\n // redundant, is done in setResult\n // needed though if setResult isn't being called\n props = PropertyArray.put(props, EXEC_STATUS, execStatus.toString());\n\n // file header\n out.write(JTR_V2_HEADER);\n out.write(lineSeparator);\n\n // date and time\n out.write(\"#\" + new Date().toString());\n out.write(lineSeparator);\n\n // checksum header and data\n //out.write(JTR_V2_CHECKSUM);\n //out.write(Long.toHexString(computeChecksum()));\n //out.write(lineSeparator);\n /*\n if (debug) { // debugging code\n out.write(\"# debug: test desc checksum: \");\n out.write(Long.toHexString(computeChecksum(desc)));\n out.write(lineSeparator);\n\n for (Iterator iter = desc.getParameterKeys(); iter.hasNext(); ) {\n // don't rely on enumeration in a particular order\n // so simply add the checksum products together\n String KEY = (String) (iter.next());\n out.write(\"# debug: test desc checksum key \" + KEY + \": \");\n out.write(Long.toHexString(computeChecksum(KEY) * computeChecksum(desc.getParameter(KEY))));\n out.write(lineSeparator);\n }\n\n out.write(\"# debug: test env checksum: \");\n if (env == null)\n out.write(\"null\");\n else\n out.write(Long.toHexString(computeChecksum(env)));\n out.write(lineSeparator);\n\n out.write(\"# debug: test props checksum: \");\n out.write(Long.toHexString(computeChecksum(props)));\n out.write(lineSeparator);\n\n out.write(\"# debug: test sections checksum: \");\n out.write(Long.toHexString(computeChecksum(sections)));\n out.write(lineSeparator);\n\n for (int I = 0; I < sections.length; I++) {\n out.write(\"# debug: test section[\" + I + \"] checksum: \");\n out.write(Long.toHexString(computeChecksum(sections[I])));\n out.write(lineSeparator);\n\n String[] NAMES = sections[I].getOutputNames();\n for (int J = 0; J < NAMES.length; J++) {\n out.write(\"# debug: test section[\" + I + \"] name=\" + NAMES[J] + \" checksum: \");\n out.write(Long.toHexString(computeChecksum(NAMES[J])));\n out.write(lineSeparator);\n\n out.write(\"# debug: test section[\" + I + \"] name=\" + NAMES[J] + \" output checksum: \");\n out.write(Long.toHexString(computeChecksum(sections[I].getOutput(NAMES[J]))));\n out.write(lineSeparator);\n }\n }\n }*/\n\n // description header and data\n out.write(JTR_V2_TESTDESC);\n out.write(lineSeparator);\n\n Map<String, String> tdProps = new HashMap<>();\n desc.save(tdProps);\n PropertyArray.save(PropertyArray.getArray(tdProps), out);\n out.write(lineSeparator);\n\n // test environment header and data\n if (env != null) {\n out.write(JTR_V2_ENVIRONMENT);\n out.write(lineSeparator);\n PropertyArray.save(env, out);\n out.write(lineSeparator);\n }\n\n // test result props header and data\n out.write(JTR_V2_RESPROPS);\n out.write(lineSeparator);\n PropertyArray.save(props, out);\n out.write(lineSeparator);\n\n // get sections into memory\n // I hope the out stream is not the same as the resultFile!\n if (sections == null) {\n throw new JavaTestError(\"Cannot write test result - it contains no sections.\");\n }\n\n for (Section section : sections) {\n section.save(out);\n }\n\n out.write(lineSeparator);\n out.write(JTR_V2_TSTRESULT);\n out.write(execStatus.toString());\n out.write(lineSeparator);\n out.close();\n } // try\n catch (IOException e) {\n // This exception could be raised when trying to create the directory\n // for the test results; opening the results file, or closing it.\n execStatus = Status.error(\"Write to temp. JTR file failed (old JTR intact): \" +\n tempFile.getPath());\n resultsFile = null; // file not successfully written after all\n throw e;\n } // catch\n\n try {\n backupPolicy.backupAndRename(tempFile, resultsFile);\n\n // now that it has been successfully written out, make the object\n // a candidate for shrinking\n addToShrinkList();\n } // try\n catch (IOException e) {\n // This exception could be raised when trying to create the directory\n // for the test results; opening the results file, or closing it.\n execStatus = Status.error(\"Problem writing result file: \" +\n resultsFile.getPath());\n resultsFile = null; // file not successfully written after all\n throw e;\n } // catch\n }", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "public void writeTableResults(\n GenericService genericService,\n TableResult tableResult,\n String nonce\n ) throws IOException {\n // Get the current method name\n String methodName = new Throwable().getStackTrace()[0].getMethodName();\n\n // To time how long function takes to run\n Stopwatch stopwatch = Stopwatch.createStarted();\n\n OrcFileWriter.writeTableResults(\n genericService.getOutputPath(nonce) + genericService.getFilename(),\n genericService.getStructStr(),\n tableResult,\n defaultFs,\n datanodeUseHostname,\n clientUseHostname\n );\n stopwatch.stop(); // Optional\n log.info(\"[{} - {}] -> Time elapsed: [{}] ms\",\n genericService.getTableName(),\n methodName,\n stopwatch.elapsed(TimeUnit.MILLISECONDS));\n }", "private void makeReportsInTable(Context context, TableLayout tlResultTable, ArrayList<TaskEntity> taskArray, String[] tasksNames) {\n TableRow tableHeader = makeRow(\n context,\n getString(R.string.header_task_name),\n getString(R.string.header_times_occur),\n getString(R.string.header_average_time)\n );\n tlResultTable.addView(tableHeader);\n\n for (String taskName : tasksNames) {\n int timesOccur = 0;\n long secondsTaskWorked = 0;\n\n for (TaskEntity task : taskArray) {\n boolean hasMatch = task.getTaskName().equalsIgnoreCase(taskName);\n if (hasMatch) {\n secondsTaskWorked += task.getSecondsWorked();\n if (task.isNotInterrupted()) {\n timesOccur++;\n }\n }\n }\n\n if (secondsTaskWorked != 0) {\n float averageTime = timesOccur != 0 ? (float) (secondsTaskWorked / timesOccur) : (float) secondsTaskWorked;\n TableRow row = makeRow(context, taskName, String.valueOf(timesOccur), Utils.convertSecondsInTmeString(averageTime));\n tlResultTable.addView(row);\n }\n }\n }", "@Test\n public void testPrueba() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM prueba\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toYellow(\"[WARNING]\") + \" Table 'prueba' does not exist, needed by ServerTest!!\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Table prueba will be created.\");\n try {\n conn.createStatement().executeUpdate(\"CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba created.\");\n } catch (SQLException e1) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table prueba could not be created.\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Create it manually by running: CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n Assert.fail(e1.getMessage());\n }\n }\n }", "public void analyzeCreateTableStmt(TCreateTableSqlStatement stmt) {\n\t\tString tableName=stmt.getTargetTable().toString();\n\t\tif(Input.tablesInfo.get(tableName)!=null){System.out.println(\"Table already exists..\"); return;}\n\t\tTColumnDefinition column;\n\t\ttry \n\t\t{\n\t\tFile file =new File(\"Resources/metadata.txt\");\n\t\tString NF=\"Resources/\"+tableName+\".csv\";\n\t\tFile newFile =new File(NF);\n\t\tif(!newFile.exists())\n\t\t\tnewFile.createNewFile();\n\t\tif(!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\t\n\t\t\tFileWriter fileWritter = new FileWriter(file,true);\n\t\t\tBufferedWriter bufferWritter = new BufferedWriter(fileWritter);\n\t\t\t//bufferWritter.newLine(); \n\t\t\tbufferWritter.write(\"<begin_table>\".trim());\n\t\t\tbufferWritter.newLine(); bufferWritter.write(tableName);\n\t\t\n\t\t\tfor(int i=0;i<stmt.getColumnList().size();i++)\n\t\t{\n bufferWritter.newLine();\n column = stmt.getColumnList().getColumn(i);\n bufferWritter.write(column.getColumnName().toString().trim());\n \n }\n\t\t\n\t\tbufferWritter.newLine();\n\t\tbufferWritter.write(\"<end_table>\".trim());bufferWritter.newLine(); \n\t\tbufferWritter.close();\n\t\tSystem.out.println(\"Table created successfully...\");\n\t\t}\t\n\t\t catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "private String createStatusTable(ExportTask task, String studyId) throws BridgeExporterException,\n SynapseException {\n // Delegate table creation to SynapseHelper.\n long dataAccessTeamId = manager.getDataAccessTeamIdForStudy(studyId);\n long principalId = manager.getSynapsePrincipalId();\n String projectId = manager.getSynapseProjectIdForStudyAndTask(studyId, task);\n String tableName = getStatusTableName(studyId);\n String synapseTableId = synapseHelper.createTableWithColumnsAndAcls(COLUMN_LIST, dataAccessTeamId, principalId,\n projectId, tableName);\n\n // write back to DDB table\n manager.setSynapseTableIdToDdb(task, SynapseHelper.DDB_TABLE_SYNAPSE_META_TABLES,\n SynapseHelper.DDB_KEY_TABLE_NAME, getStatusTableName(studyId), synapseTableId);\n\n return synapseTableId;\n }", "@Override\n public Pipe execute(DBMS engine) throws DBxicException {\n engine.storManager.createTable(table);\n engine.catalog.saveCatalog();\n return new MessageThroughPipe(\"Table \" + table.getName() + \" successfully created\");\n }", "TableFull createTableFull();", "public HtmlTable createTable() {\n\t\tHtmlTable table = null;\n\t\tif (recordList != null) {\n\t\t\ttable = new HtmlTable();\n\t\t\tint irow = 0;\n\t\t\tfor (CSVRecord record : recordList) {\n\t\t\t\tHtmlTr tr = createTr(record, irow);\n\t\t\t\ttable.appendChild(tr);\n\t\t\t\tirow++;\n\t\t\t}\n\t\t}\n\t\treturn table;\n\t}", "public void fnWriteToHtmlOutput(String strDescription, String strExpectedValue, String strObtainedValue, String strResult) {\r\n \tString sStep;\r\n \tif (Dictionary.containsKey(\"STEP\")){\r\n \t\tsStep = Dictionary.get(\"STEP\") + \"<NS>\" + strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t\tDictionary.remove(\"STEP\");\r\n \t}else{\r\n \t\tsStep = strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t}\r\n \t\t\r\n \tDictionary.put(\"STEP\", sStep);\r\n \t\r\n //Declaring Variables\r\n String snapshotFilePath,sRowColor;\r\n\r\n //Open the test case report for writing\r\n //Open the HTML file\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n \r\n //Increment the Operation Count\r\n g_OperationCount = g_OperationCount + 1;\r\n \r\n //Row Color\r\n if (g_OperationCount % 2 == 0)\r\n {\r\n sRowColor = \"#EEEEEE\";\r\n }\r\n else\r\n {\r\n sRowColor = \"#D3D3D3\";\r\n \r\n }\r\n \r\n //Check if the result is Pass or Fail\r\n if (strResult.toUpperCase().equals(\"PASS\")){ \r\n //Increment the Pass Count\r\n g_iPassCount++;\r\n //Increment the snapshot count\r\n g_iSnapshotCount++;\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n \r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n //new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \"</B></FONT></TD></TR>\");\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n }\r\n else\r\n {\r\n if (strResult.toUpperCase().equals(\"FAIL\")){\r\n //Increment the SnapShot count\r\n g_iSnapshotCount++ ;\r\n\r\n //Increment the Fail Count\r\n g_iFailCount++;\r\n\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n\r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=RED><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n \r\n }else if (strResult.toUpperCase().equals(\"DONE\")){ \r\n \tstrResult = \"Pass\";\r\n //Write Results into the file\r\n \tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount +\"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\"+ strDescription +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\"+ strObtainedValue +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=LimeGreen><B>\"+ strResult +\"</B></FONT></TD></TR>\");\r\n }\r\n \r\n }\r\n try\r\n {\t\t\t\r\n \t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n }", "@Override\n public void setUp() throws SQLException {\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"ENTRY\\\" (\" +\n \"\\\"SHARED_ID\\\" SERIAL PRIMARY KEY, \" +\n \"\\\"TYPE\\\" VARCHAR, \" +\n \"\\\"VERSION\\\" INTEGER DEFAULT 1)\");\n\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"FIELD\\\" (\" +\n \"\\\"ENTRY_SHARED_ID\\\" INTEGER REFERENCES \\\"ENTRY\\\"(\\\"SHARED_ID\\\") ON DELETE CASCADE, \" +\n \"\\\"NAME\\\" VARCHAR, \" +\n \"\\\"VALUE\\\" TEXT)\");\n\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"METADATA\\\" (\"\n + \"\\\"KEY\\\" VARCHAR,\"\n + \"\\\"VALUE\\\" TEXT)\");\n }", "public void createTables(){\n Map<String, String> name_type_map = new HashMap<>();\n List<String> primaryKey = new ArrayList<>();\n try {\n name_type_map.put(KEY_SINK_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_DETAIL, MyDatabase.TYPE_VARCHAR);\n primaryKey.add(KEY_SINK_ADDRESS);\n myDatabase.createTable(TABLE_SINK, name_type_map, primaryKey, null);\n }catch (MySQLException e){ //数据表已存在\n e.print();\n }\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_DETAIL, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_ADDRESS,MyDatabase.TYPE_VARCHAR);\n primaryKey.clear();\n primaryKey.add(KEY_NODE_PARENT);\n primaryKey.add(KEY_NODE_ADDRESS);\n myDatabase.createTable(TABLE_NODE, name_type_map, primaryKey, null);\n }catch (MySQLException e){\n e.print();\n }\n\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_DATA_TIME, MyDatabase.TYPE_TIMESTAMP);\n name_type_map.put(KEY_DATA_VAL, MyDatabase.TYPE_FLOAT);\n primaryKey.clear();\n primaryKey.add(KEY_DATA_TIME);\n primaryKey.add(KEY_NODE_ADDRESS);\n primaryKey.add(KEY_NODE_PARENT);\n myDatabase.createTable(TABLE_DATA, name_type_map, primaryKey, null);\n }catch (MySQLException e) {\n e.print();\n }\n }", "String storeTable(String name) {\n PrintWriter writer = null;\n Table t = tables.get(name);\n\n try {\n\n /** Boolean decides if to overwrite the file if false, or continue if true */\n FileWriter fw = new FileWriter(name + \".tbl\", false);\n writer = new PrintWriter(fw);\n\n writer.println(t.getColString());\n\n int i = 1;\n for (; i < t.rowSize(); i += 1) {\n writer.println(t.getRowString(i));\n }\n\n writer.print(t.getRowString(i));\n writer.close();\n return \"\";\n\n } catch (IOException e) {\n return \"ERROR: Invalid Table\";\n } catch (NullPointerException e) {\n return \"ERROR: Invalid Table\";\n }\n\n\n }" ]
[ "0.6828514", "0.6703705", "0.667444", "0.66656023", "0.6605279", "0.6580757", "0.65010434", "0.63868105", "0.63551503", "0.6345023", "0.63424236", "0.6320532", "0.6306808", "0.62933105", "0.628145", "0.62417716", "0.62350935", "0.6206074", "0.6134093", "0.61173934", "0.6056673", "0.60156965", "0.60143244", "0.6012658", "0.60065114", "0.5992765", "0.59852195", "0.59679186", "0.59587294", "0.5950898", "0.5943121", "0.5940931", "0.594012", "0.59238285", "0.5911865", "0.5906281", "0.58953583", "0.58837944", "0.5850986", "0.58505625", "0.58472145", "0.58420277", "0.58408934", "0.58391243", "0.5825891", "0.5813985", "0.58119744", "0.5811754", "0.58105", "0.57840055", "0.57598007", "0.57533264", "0.5744586", "0.57363755", "0.57349294", "0.57294405", "0.5726941", "0.57238513", "0.5723338", "0.57197016", "0.57152754", "0.5714592", "0.5714152", "0.57086146", "0.5706473", "0.56865937", "0.56743634", "0.56743026", "0.5674206", "0.5664584", "0.56610227", "0.5654441", "0.56463015", "0.56409407", "0.5638197", "0.56323546", "0.5630675", "0.5622839", "0.55979556", "0.55979556", "0.5596194", "0.559616", "0.5591054", "0.559083", "0.5587352", "0.55871475", "0.5577472", "0.55756694", "0.5573848", "0.557331", "0.5571936", "0.5571715", "0.5568708", "0.55616254", "0.5561322", "0.5550627", "0.5534626", "0.553275", "0.55313665", "0.5530422" ]
0.72318166
0
Writes the Tables contents which has individual test results
private void writeTableContents(BufferedWriter writer, ISuite suite, ResultTable table) throws IOException { Map<String, ResultVo> dataMap = table.getResultData(); String closer = "</tbody></table></div>"; dataMap.forEach((key, value) -> { String datagenerator = ""; String message = value.getExpectionMessage() != null ? value .getExpectionMessage() : ""; System.out.println(message); datagenerator = "<tr><td>" + value.getTestCaeId() + "</td><td>" + value.getMethodName() + "</td><td>" + value.getPrioirty() + "</td><td>" + value.getTotalTime() + "</td>"; switch (value.getResult().toString()) { case "pass": datagenerator += "<td style='color:#4CAF50;font-weight:bold;'>" + value.getResult() + "</td>"; break; case "fail": datagenerator += "<td style='color:#EF5350;font-weight:bold;'>" + "<i class='material-icons' style='font-size: 16px;'>&#xE002;</i><span>" + value.getResult() + "</span></td>"; break; case "skip": datagenerator += "<td style='color:#4FC3F7;font-weight:bold;'>" + value.getResult() + "</td>"; break; } try { writer.write(datagenerator); } catch (Exception e) { e.printStackTrace(); } }); writer.write(closer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void writeResults() {\n\t\t//Sort hashMap before sending to file\n\t\tTreeSet<Word> mySet = new TreeSet<>(hm.values());\n\n\t\t//Create result.txt file and write treeMap out to it\n\t\tWriter writer = null;\n\t\ttry {\n\t\t\t//System.out.println(\"Here\");\n\t\t\twriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"output\\\\results.txt\")));\n\t\t\tfor (Word word : mySet) {\n\t\t\t\twriter.write(word.getValue() + \"\\t\" + word.getCount() + \"\\n\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\twriter.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "void write(TestResult testResult);", "private void writeTestLines() {\n for (String L : testLines) {\n pages.write(L);\n }\n }", "private void createTable(BufferedWriter writer, ResultTable tableData)\r\n\t\t\tthrows IOException {\r\n\t\tint height = (37 * tableData.getDataCount()) + 56\r\n\t\t\t\t+ (tableData.getExpectionMessageData().size() * 4);\r\n\t\tString container = \"<div style='width: 766px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;;height: \"\r\n\t\t\t\t+ height + \"px;position: absolute;top: 165px;left: 554px'>\";\r\n\t\tString table = \"<table style='top:10px;position:absolute;width: 750px;left:8px;'><tbody>\";\r\n\t\tString headers = \"<tr><th>TestCase Id</th><th>Method Name</th><th>Servrity</th><th>Time Taken</th><th>Result</th></tr>\";\r\n\r\n\t\twriter.write(container + table + headers);\r\n\r\n\t}", "public static void rep_WriteResults(String strTemplatePath, String strOutputPath) {\n String strStatus;\n strStatus = \"Pass\";\n intPassCount = 0;\n intFailCount = 0;\n intInfoCount = 0;\n try {\n String reportIn = new String(Files.readAllBytes(Paths.get(strTemplatePath)));\n for (int i = 0; i < details.size(); i++) {\n //if statement to prevent duplication of test step numbers in the report\n if (i == 0) {\n\n\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else if (details.get(i).getResult().equals(\"Step\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=left width=100><font color=\\\"blue\\\">\" + details.get(i).getResult() + \"</font></td><td><font color=\\\"blue\\\">\" +\n details.get(i).getResultText() + \"</font></td></tr>\" + resultPlaceholder);\n\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n\n\n } else if (details.get(i).getintTestStep() == details.get(i - 1).getintTestStep()) {\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n \"\" + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n } else {\n if (details.get(i).getResult().equals(\"Pass\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"green\\\">\" + details.get(i).getResult() + \"</font></td><td align=left width=1040>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intPassCount++;\n } else if (details.get(i).getResult().equals(\"Fail\")) {\n strStatus = \"Fail\";\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"red\\\">\" + details.get(i).getResult() + \"</font></td><td>\" +\n details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intFailCount++;\n } else if (details.get(i).getResult().equals(\"Step\")) {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=left width=100><font color=\\\"blue\\\">\" + details.get(i).getResult() + \"</font></td><td><font color=\\\"blue\\\">\" +\n details.get(i).getResultText() + \"</font></td></tr>\" + resultPlaceholder);\n } else {\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</td><td align=center width=60>\" +\n details.get(i).getintTestStep() + \"</td><td align=center width=100><font color=\\\"black\\\">\" + details.get(i).getResult() + \"</font></td><td>\" + details.get(i).getResultText() + \"</td></tr>\" + resultPlaceholder);\n intInfoCount++;\n }\n }\n\n }\n reportIn = reportIn.replaceFirst(resultPlaceholder, \"</table>\");\n String currentDate = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\n\n\n String currentTime = CommonFunctionTest.com_CurrentTime();\n String reportPath = strOutputPath + \"\\\\report_\" + currentDate + \"_\" + currentTime + \"_\" + strStatus + \".html\";\n\n Files.write(Paths.get(reportPath), reportIn.getBytes(), StandardOpenOption.CREATE);\n\n } catch (Exception e) {\n System.out.println(\"Error when writing report file:\\n\" + e.toString());\n }\n }", "void write(TestResultContainer testResultContainer);", "public void writeResults() {\n gfmBroker.storeResults(this.responses, fileOutputPath);\n }", "public void fnWriteTestSummary(String strTestCaseName, String strResult, String strDuration){\r\n \tString sColor,sRowColor;\r\n \r\n //Close the file\r\n try{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t //Check color result\r\n\t if (strResult.toUpperCase().equals(\"PASSED\") || strResult.toUpperCase().equals(\"PASS\")){\r\n\t sColor = \"GREEN\";\r\n\t g_iTCPassed ++;\r\n\t }\r\n\t else if (strResult.toUpperCase().equals(\"FAILED\") || strResult.toUpperCase().equals(\"FAIL\")){\r\n\t \tsColor = \"RED\";\r\n\t }\r\n\t else{\r\n\t \tsColor = \"ORANGE\";\r\n\t }\r\n\t\r\n\t g_iTestCaseNo++;\r\n\t\r\n\t if (g_iTestCaseNo % 2 == 0){sRowColor = \"#EEEEEE\";}\r\n\t else{sRowColor = \"#D3D3D3\";}\r\n\t \r\n\t //Write the result of Individual Test Case\r\n\t new PrintStream(foutStrm).println (\"<TR COLS=3 BGCOLOR=\" + sRowColor + \"><TD WIDTH=10%><FONT FACE=VERDANA SIZE=2>\" + g_iTestCaseNo + \"</FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA SIZE=2>\" + strTestCaseName + \"</FONT></TD><TD WIDTH=15%><A HREF='\" + strTestCaseName + \".html'><FONT FACE=VERDANA SIZE=2 COLOR=\" + sColor + \"><B>\" + strResult + \"</B></FONT></A></TD><TD WIDTH=15%><FONT FACE=VERDANA SIZE=2>\" + strDuration+ \"</FONT></TD></TR>\");\r\n \r\n \tfoutStrm.close();\r\n }\r\n catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n foutStrm = null;\r\n\r\n }", "private void writeResults(File tempFile, BackupPolicy backupPolicy)\n throws IOException {\n Writer out;\n try {\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile), StandardCharsets.UTF_8));\n } catch (IOException e) {\n execStatus = Status.error(\"Problem writing result file for test: \" + getTestName());\n resultsFile = null; // file not successfully written after all\n throw e;\n }\n\n try {\n // redundant, is done in setResult\n // needed though if setResult isn't being called\n props = PropertyArray.put(props, EXEC_STATUS, execStatus.toString());\n\n // file header\n out.write(JTR_V2_HEADER);\n out.write(lineSeparator);\n\n // date and time\n out.write(\"#\" + new Date().toString());\n out.write(lineSeparator);\n\n // checksum header and data\n //out.write(JTR_V2_CHECKSUM);\n //out.write(Long.toHexString(computeChecksum()));\n //out.write(lineSeparator);\n /*\n if (debug) { // debugging code\n out.write(\"# debug: test desc checksum: \");\n out.write(Long.toHexString(computeChecksum(desc)));\n out.write(lineSeparator);\n\n for (Iterator iter = desc.getParameterKeys(); iter.hasNext(); ) {\n // don't rely on enumeration in a particular order\n // so simply add the checksum products together\n String KEY = (String) (iter.next());\n out.write(\"# debug: test desc checksum key \" + KEY + \": \");\n out.write(Long.toHexString(computeChecksum(KEY) * computeChecksum(desc.getParameter(KEY))));\n out.write(lineSeparator);\n }\n\n out.write(\"# debug: test env checksum: \");\n if (env == null)\n out.write(\"null\");\n else\n out.write(Long.toHexString(computeChecksum(env)));\n out.write(lineSeparator);\n\n out.write(\"# debug: test props checksum: \");\n out.write(Long.toHexString(computeChecksum(props)));\n out.write(lineSeparator);\n\n out.write(\"# debug: test sections checksum: \");\n out.write(Long.toHexString(computeChecksum(sections)));\n out.write(lineSeparator);\n\n for (int I = 0; I < sections.length; I++) {\n out.write(\"# debug: test section[\" + I + \"] checksum: \");\n out.write(Long.toHexString(computeChecksum(sections[I])));\n out.write(lineSeparator);\n\n String[] NAMES = sections[I].getOutputNames();\n for (int J = 0; J < NAMES.length; J++) {\n out.write(\"# debug: test section[\" + I + \"] name=\" + NAMES[J] + \" checksum: \");\n out.write(Long.toHexString(computeChecksum(NAMES[J])));\n out.write(lineSeparator);\n\n out.write(\"# debug: test section[\" + I + \"] name=\" + NAMES[J] + \" output checksum: \");\n out.write(Long.toHexString(computeChecksum(sections[I].getOutput(NAMES[J]))));\n out.write(lineSeparator);\n }\n }\n }*/\n\n // description header and data\n out.write(JTR_V2_TESTDESC);\n out.write(lineSeparator);\n\n Map<String, String> tdProps = new HashMap<>();\n desc.save(tdProps);\n PropertyArray.save(PropertyArray.getArray(tdProps), out);\n out.write(lineSeparator);\n\n // test environment header and data\n if (env != null) {\n out.write(JTR_V2_ENVIRONMENT);\n out.write(lineSeparator);\n PropertyArray.save(env, out);\n out.write(lineSeparator);\n }\n\n // test result props header and data\n out.write(JTR_V2_RESPROPS);\n out.write(lineSeparator);\n PropertyArray.save(props, out);\n out.write(lineSeparator);\n\n // get sections into memory\n // I hope the out stream is not the same as the resultFile!\n if (sections == null) {\n throw new JavaTestError(\"Cannot write test result - it contains no sections.\");\n }\n\n for (Section section : sections) {\n section.save(out);\n }\n\n out.write(lineSeparator);\n out.write(JTR_V2_TSTRESULT);\n out.write(execStatus.toString());\n out.write(lineSeparator);\n out.close();\n } // try\n catch (IOException e) {\n // This exception could be raised when trying to create the directory\n // for the test results; opening the results file, or closing it.\n execStatus = Status.error(\"Write to temp. JTR file failed (old JTR intact): \" +\n tempFile.getPath());\n resultsFile = null; // file not successfully written after all\n throw e;\n } // catch\n\n try {\n backupPolicy.backupAndRename(tempFile, resultsFile);\n\n // now that it has been successfully written out, make the object\n // a candidate for shrinking\n addToShrinkList();\n } // try\n catch (IOException e) {\n // This exception could be raised when trying to create the directory\n // for the test results; opening the results file, or closing it.\n execStatus = Status.error(\"Problem writing result file: \" +\n resultsFile.getPath());\n resultsFile = null; // file not successfully written after all\n throw e;\n } // catch\n }", "private void printResults() {\n\t\tfor (Test test : tests) {\n\t\t\ttest.printResults();\n\t\t}\n\t}", "public void writeTableResults(\n GenericService genericService,\n TableResult tableResult,\n String nonce\n ) throws IOException {\n // Get the current method name\n String methodName = new Throwable().getStackTrace()[0].getMethodName();\n\n // To time how long function takes to run\n Stopwatch stopwatch = Stopwatch.createStarted();\n\n OrcFileWriter.writeTableResults(\n genericService.getOutputPath(nonce) + genericService.getFilename(),\n genericService.getStructStr(),\n tableResult,\n defaultFs,\n datanodeUseHostname,\n clientUseHostname\n );\n stopwatch.stop(); // Optional\n log.info(\"[{} - {}] -> Time elapsed: [{}] ms\",\n genericService.getTableName(),\n methodName,\n stopwatch.elapsed(TimeUnit.MILLISECONDS));\n }", "private void writeResults() {\n File externalStorage = Environment.getExternalStorageDirectory();\n if (!externalStorage.canWrite()) {\n Log.v(TAG, \"sdcard is not writable\");\n return;\n }\n File resultFile = new File(externalStorage, RESULT_FILE);\n resultFile.setWritable(true, false);\n try {\n BufferedWriter rsWriter = new BufferedWriter(new FileWriter(resultFile));\n Log.v(TAG, \"Saved results in: \" + resultFile.getAbsolutePath());\n java.text.DecimalFormat df = new java.text.DecimalFormat(\"######.##\");\n\n for (int ct=0; ct < IPTestListJB.TestName.values().length; ct++) {\n IPTestListJB.TestName t = IPTestListJB.TestName.values()[ct];\n final float r = mResults[ct];\n float r2 = rebase(r, t);\n String s = new String(\"\" + t.toString() + \", \" + df.format(r) + \", \" + df.format(r2));\n rsWriter.write(s + \"\\n\");\n }\n rsWriter.close();\n } catch (IOException e) {\n Log.v(TAG, \"Unable to write result file \" + e.getMessage());\n }\n }", "public static void makeTable2() throws FileNotFoundException {\n\t\tFile dir = new File(\"testinstances\");\n\t\tFile[] directoryListing = dir.listFiles();\n\n\t\tPrintStream out = new PrintStream(new FileOutputStream(\"table2.txt\"));\n\t\tSystem.setOut(out);\n\n\t\tif (directoryListing != null) {\n\t\t\tString res = \"\";\n\t\t\tfor (File file : directoryListing) {\n\t\t\t\ttry {\n\t\t\t\t\tfloat best = Integer.MAX_VALUE;\n\t\t\t\t\tdouble longestTime = Double.MIN_VALUE;\n\t\t\t\t\tfloat sumCosts = 0;\n\t\t\t\t\tdouble sumTimes = 0;\n\n\t\t\t\t\tProblem p = Parser.parseInstance(file.toString());\n\t\t\t\t\tfloat optimum = p.getOptimalCost();\n\t\t\t\t\tString name = file.toString().replace(\".txt\", \"\");\n\n\t\t\t\t\tres = name.replace(\"testinstances/\", \"\") + \" & \"\n\t\t\t\t\t\t\t+ p.getNumberOfJobs() + \" & \"\n\t\t\t\t\t\t\t+ p.getNumberOfMachines() + \" & \"\n\t\t\t\t\t\t\t+ Math.round(p.getOptimalCost());\n\n\t\t\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\t\t\tlong startTime = System.nanoTime();\n\t\t\t\t\t\tSolution s = TabuSearch.tabuSearch(p);\n\t\t\t\t\t\tlong elapsedTimeNano = (System.nanoTime() - startTime);\n\t\t\t\t\t\tdouble elapsedTime = ((double) elapsedTimeNano) / 1E9;\n\t\t\t\t\t\tfloat c = s.getCost();\n\n\t\t\t\t\t\tif (c < best)\n\t\t\t\t\t\t\tbest = c;\n\t\t\t\t\t\tif (elapsedTime > longestTime) {\n\t\t\t\t\t\t\tlongestTime = elapsedTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsumCosts += c;\n\t\t\t\t\t\tsumTimes += elapsedTime;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tres += \" & \" + Math.round(best);\n\t\t\t\t\tif (optimum != -1) {\n\t\t\t\t\t\tfloat delta = best - optimum;\n\t\t\t\t\t\tres += \" & \" + delta / optimum * 100; // Delta Z %\n\t\t\t\t\t}\n\n\t\t\t\t\tres += \" & \" + sumCosts / 5; // Z_av\n\t\t\t\t\tres += \" & \" + sumTimes / 5; // T_av\n\t\t\t\t\tres += \" & \" + longestTime; // T_max\n\t\t\t\t\tres += \" \\\\\\\\\"; // new line in LaTeX table\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t} finally {\n\t\t\t\t\tSystem.out.println(res);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void writeResultData() {\n\n// DatabaseLoader databaseLoader = new DatabaseLoader();\n TestResultDeployer testResultDeployer = new TestResultDeployer();\n MySqlDatabaseManager mySqlDatabaseManager;\n try {\n EnvironmentBuilder environmentBuilder = new EnvironmentBuilder();\n DashboardVariables dashboardVariables = environmentBuilder.getFrameworkSettings().getDashboardVariables();\n if (dashboardVariables.getEnableDashboard().equalsIgnoreCase(\"true\")) {\n String databaseName = dashboardVariables.getDbName();\n\n mySqlDatabaseManager = new MySqlDatabaseManager(dashboardVariables.getJdbcUrl(), dashboardVariables.\n getDbUserName(), dashboardVariables.getDbPassword());\n// databaseLoader.createDatabase();\n mySqlDatabaseManager.execute(\"INSERT INTO \" + databaseName + \".WA_BUILD_HISTORY VALUES()\");\n DirectoryScanner scan = new DirectoryScanner();\n scan.setBasedir(ProductConstant.REPORT_LOCATION + File.separator + \"reports\" + File.separator);\n String[] fileList = new String[]{\"*/testng-results.xml\"};\n scan.setIncludes(fileList);\n scan.scan();\n String[] fileset = scan.getIncludedFiles();\n for (int i = 0; i <= fileset.length - 1; i++) {\n testResultDeployer.writeResult(ProductConstant.REPORT_LOCATION + \"reports\" +\n File.separator + fileset[i]);\n log.info(fileset[i] + \" write to database\");\n }\n }\n } catch (ClassNotFoundException e) {\n log.error(e);\n } catch (SQLException e) {\n log.error(e);\n } /*catch (IOException e) {\n log.error(e);\n }*/\n }", "private static void LOG() {\n if (!RESULTFILE.exists()) {\n\n if (!RESULTFILE.getParentFile().exists()) {\n RESULTFILE.getParentFile().mkdirs();\n }\n\n try {\n RESULTFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + RESULTFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(RESULTFILE, true));\n bw.write(\"rank\" + \"\\t\" + \"DBID\" + \"\\n\");\n bw.close();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(RESULTFILE));\n out.writeObject(RESULTS);\n out.close();\n\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n }\n\n /**\n * print also SQL query into a sql file\n *\n */\n if (!SQLFILE.exists()) {\n if (!SQLFILE.getParentFile().exists()) {\n SQLFILE.getParentFile().mkdirs();\n }\n try {\n SQLFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + SQLFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(SQLFILE, true));\n bw.write(UNKNOWN.getSortedQuery() + \"\\n\");\n bw.close();\n } catch (Exception e) {\n System.err.println(\"Konnte nicht in Datei \" + SQLFILE + \" schreiben!\");\n }\n }\n }", "private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }", "public void fnWriteToHtmlOutput(String strDescription, String strExpectedValue, String strObtainedValue, String strResult) {\r\n \tString sStep;\r\n \tif (Dictionary.containsKey(\"STEP\")){\r\n \t\tsStep = Dictionary.get(\"STEP\") + \"<NS>\" + strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t\tDictionary.remove(\"STEP\");\r\n \t}else{\r\n \t\tsStep = strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t}\r\n \t\t\r\n \tDictionary.put(\"STEP\", sStep);\r\n \t\r\n //Declaring Variables\r\n String snapshotFilePath,sRowColor;\r\n\r\n //Open the test case report for writing\r\n //Open the HTML file\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n \r\n //Increment the Operation Count\r\n g_OperationCount = g_OperationCount + 1;\r\n \r\n //Row Color\r\n if (g_OperationCount % 2 == 0)\r\n {\r\n sRowColor = \"#EEEEEE\";\r\n }\r\n else\r\n {\r\n sRowColor = \"#D3D3D3\";\r\n \r\n }\r\n \r\n //Check if the result is Pass or Fail\r\n if (strResult.toUpperCase().equals(\"PASS\")){ \r\n //Increment the Pass Count\r\n g_iPassCount++;\r\n //Increment the snapshot count\r\n g_iSnapshotCount++;\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n \r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n //new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \"</B></FONT></TD></TR>\");\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n }\r\n else\r\n {\r\n if (strResult.toUpperCase().equals(\"FAIL\")){\r\n //Increment the SnapShot count\r\n g_iSnapshotCount++ ;\r\n\r\n //Increment the Fail Count\r\n g_iFailCount++;\r\n\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n\r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=RED><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n \r\n }else if (strResult.toUpperCase().equals(\"DONE\")){ \r\n \tstrResult = \"Pass\";\r\n //Write Results into the file\r\n \tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount +\"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\"+ strDescription +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\"+ strObtainedValue +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=LimeGreen><B>\"+ strResult +\"</B></FONT></TD></TR>\");\r\n }\r\n \r\n }\r\n try\r\n {\t\t\t\r\n \t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n }", "public void detailReport() {\r\n\t\tint testStepId = 1;\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><table class=\\\"width100\\\"><tr><td><div class=\\\"headertext1 bold\\\">Test Execution Detail Report</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Execution Browser Name: \"+ GlobalVariables.getBrowserName() + \"</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Test Case Name: \"+ GlobalVariables.getTestCaseName() + \"</div></td></tr>\");\r\n\t\t\r\n\t\t\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"<table colspan=3 border=0 cellpadding=3 cellspacing=1 class=\\\"reporttable width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><th class=\\\"auto-style1\\\">Test Step No</th>\" + \"<th class=\\\"auto-style2\\\">Action</th>\"\r\n\t\t\t\t+ \"<th class=\\\"auto-style3\\\">Actual Result</th>\" + \"<th class=\\\"auto-style4\\\">Status</th></tr>\");\r\n\t\tfor (ReportBean reportValue : GlobalVariables.getReportList()) {\r\n\r\n\t\t\tif (reportValue.getStatus().equalsIgnoreCase(\"Passed\")) {\r\n\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 green\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t} else if (reportValue.getStatus().equalsIgnoreCase(\"Failed\")) {\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 red\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tstrBufferReportAppend.append(\"</table>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"</table></td></tr></table></body></html>\");\r\n\t}", "private void writeResult(String testClassName, List<TestResult> results)\n throws IOException, ParserConfigurationException, TransformerException {\n // XML writer logic taken from:\n // http://www.genedavis.com/library/xml/java_dom_xml_creation.jsp\n\n DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n doc.setXmlVersion(\"1.1\");\n\n Element root = doc.createElement(\"testcase\");\n root.setAttribute(\"name\", testClassName);\n doc.appendChild(root);\n\n for (TestResult result : results) {\n Element test = doc.createElement(\"test\");\n\n // name attribute\n test.setAttribute(\"name\", result.testMethodName);\n\n // success attribute\n boolean isSuccess = result.isSuccess();\n test.setAttribute(\"success\", Boolean.toString(isSuccess));\n\n // time attribute\n long runTime = result.runTime;\n test.setAttribute(\"time\", String.valueOf(runTime));\n\n // Include failure details, if appropriate.\n if (!isSuccess) {\n Failure failure = result.failure;\n String message = failure.getMessage();\n test.setAttribute(\"message\", message);\n\n String stacktrace = failure.getTrace();\n test.setAttribute(\"stacktrace\", stacktrace);\n }\n\n // stdout, if non-empty.\n if (result.stdOut != null) {\n Element stdOutEl = doc.createElement(\"stdout\");\n stdOutEl.appendChild(doc.createTextNode(result.stdOut));\n test.appendChild(stdOutEl);\n }\n\n // stderr, if non-empty.\n if (result.stdErr != null) {\n Element stdErrEl = doc.createElement(\"stderr\");\n stdErrEl.appendChild(doc.createTextNode(result.stdErr));\n test.appendChild(stdErrEl);\n }\n\n root.appendChild(test);\n }\n\n // Create an XML transformer that pretty-prints with a 2-space indent.\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer trans = transformerFactory.newTransformer();\n trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n trans.setOutputProperty(OutputKeys.INDENT, \"yes\");\n trans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n\n // Write the result to a file.\n File outputFile = new File(outputDirectory, testClassName + \".xml\");\n OutputStream output = new BufferedOutputStream(new FileOutputStream(outputFile));\n StreamResult streamResult = new StreamResult(output);\n DOMSource source = new DOMSource(doc);\n trans.transform(source, streamResult);\n output.close();\n }", "public void write(String outputFolder, String name) throws IOException {\n for (Gender gender : this.keySet1()) {\n for (EventScoringTable scoreTable : this.get(gender).values()) {\n File outFile = new File(String.format(\"%s/Table %s - %s - %s.csv\",\n outputFolder,\n name,\n gender,\n scoreTable.getEvent().getIaafName()\n ));\n if (outFile.getParentFile().mkdirs()) {\n System.out.println(\"Created directory: \" + outFile.getParent());\n }\n\n FileWriter fileWriter = new FileWriter(outFile);\n fileWriter.write(String.format(\"%s,%s%n\", \"performance\", \"points\"));\n\n for (Entry<Double, Integer> score : scoreTable.getPerformancePoints().entrySet()) {\n fileWriter.write(String.format(Locale.ENGLISH,\n \"%.2f,%d%n\",\n score.getKey(),\n score.getValue()\n ));\n }\n fileWriter.close();\n }\n }\n System.out.println(\"Written conversion tables to: \" + outputFolder);\n }", "private void convertTestCaseResults(ArrayList<String> realIds,String file, ArrayList<String> tests) {\n \t\t\ttry {\t\t\n \t\t\t\tFileWriter writer = new FileWriter(file);\n \t\t\t\tlistener.getLogger().println(\"inizio ad aggiungere test case\"); \t\t\t \n \t\t\t\twriter.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n \t\t\t\twriter.write(\"<testsuite>\\n\");\n \t\t\t\tIterator<String> itreal = realIds.iterator();\n \t\t\t\tIterator<String> ittest = tests.iterator();\n \t\t\t\twhile (itreal.hasNext() && ittest.hasNext()) {\n\t \t\t\t\t//Legge il file mxlog\n\t \t\t\t\tFile tr = new File(\"C:/Users/utente/Desktop/InvertSample/ScenariosAndTestCases/\"+itreal.next()+\".mxlog\");\t \n\t \t \tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t \t\t DocumentBuilder db;\n\t \t\t\ttry {\n\t \t\t\t\tdb = dbf.newDocumentBuilder();\n\t \t\t\t\tDocument doc = db.parse(tr);\n\t \t\t\t doc.getDocumentElement().normalize();\n\t \t\t\t XPath xpath = XPathFactory.newInstance().newXPath();\n\t \t\t\t XPathExpression xExpress = xpath.compile(\"//Str\");\n\t \t\t\t NodeList nl = (NodeList) xExpress.evaluate(doc, XPathConstants.NODESET);\n\t \t\t\t int index = nl.getLength()-1; \n\t \t\t\t if(nl != null){\n\t\t \t\t\t\t\twriter.write(\"\\t<testcase classname=\\\"TC\\\" name=\\\"\"+ittest.next()+\"\\\">\\n\");\n\t\t \t\t\t\t\tString esito=nl.item(index).getTextContent();\n\t\t \t\t\t\t\tesito=esito.substring(esito.lastIndexOf(\" \")+1);\n\t\t \t\t\t\t\tlistener.getLogger().println(esito); \n\t\t \t\t\t\t\tif(esito.equals(\"PASS\")){\n\t\t \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\telse if(esito.equals(\"FAILURE\")){\n\t\t \t\t\t\t\t\twriter.write(\"\\t\\t<failure>\\n\\t\\t\\tProva testo difetto failure (4-7)\\n\\t\\t</failure>\\n\");\n\t\t \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n\t\t \t\t\t\t\t}else{\n\t\t \t\t\t\t\t\twriter.write(\"\\t\\t<error>\\n\\t\\t\\tProva testo difetto errore(5-9)\\n\\t\\t</error>\\n\");\n\t\t \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n\t\t \t\t\t\t\t}\n\t\t \t\t\t }else{\n\t\t\t \t\t\t \tlistener.getLogger().println(\"nl vuota\");\n\t\t\t \t\t\t }\n\t \t\t\t} catch (ParserConfigurationException | SAXException | IOException | XPathExpressionException e) {\n\t \t\t\t\tContactPolarion(listener);\n\t \t\t\t\tlistener.getLogger().println(e.getMessage());\n\t \t\t\t}\n \t\t\t\t}\n \t\t\twriter.write(\"</testsuite>\\n\");\n \t\t\t\twriter.flush();\n \t\t\t\twriter.close();\n \t\t\t\n \t\t\t} catch (Exception e) {\n \t\t\t\tContactPolarion(listener);\n \t\t\t\tlistener.getLogger().println(e.getMessage());\n \t\t\t\tlistener.getLogger().println(\"dotest: \\n\"+e.getMessage());\n \t\t\t}\t\n\t\t\t}", "void createdOutput(TestResult tr, Section section, String outputName);", "private void generateTestExecution(ITestResult result) throws IOException{\r\n\t\t//create the html file with current running class and test name\r\n\t\tfout = createRequiredFile(result.getName());\r\n\t\t\r\n\t\t//Write initial html codes neccessary for report\r\n\t\tstartHtmlPage(fout,result);\r\n\t\t\r\n\t\t//get all the attributes set during the test execution\r\n\t\tObject[] array = result.getAttributeNames().toArray();\r\n\t\t\r\n\t\t//Above got values are not in sort. So, Sorting that based on time\r\n\t\tArrays.sort(array);\r\n\t\t\r\n\t\t//Iterating the array value to generate report\r\n \tfor(Object name : array){\r\n \t\t\t\r\n \t\t\t//Each and every array value contains, All the info about the particular action\r\n \t\t\t//And Values combined using deliminator. So, split using deliminator\r\n\t \t\tString temp[] = result.getAttribute((String) name).toString().split(\"####\");\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'Fail' means that step failed \r\n\t \t\tif(temp[3].toLowerCase().contains(\"fail\")){\r\n\t \t\t\t//If Fail create '<tr>' tag with 'status_failed' class(Which is used for create 'red' background color for failed cases)\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_failed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\t\r\n\t \t\t\t//create the screenshot path\r\n\t \t\t\tString pathToScreenshot = \"../Failure_Screenshot/\"+temp[5]+\".jpg\";\r\n\t \t\t\t\r\n\t \t\t\t//creating mapping for failed step(Link to screen shot and embed the screenshot in that step)\r\n\t \t\t\ttemp[4] = \"<a href=\\'\" + pathToScreenshot + \"\\'> <img src=\\'\" + pathToScreenshot + \"\\' height=\\\"100\\\" width=\\\"100\\\"> </a>\";\r\n\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//After split up, If the third array value contains 'title' means that is title\r\n\t \t\telse if(temp[3].toLowerCase().contains(\"title\")){\r\n\t \t\t\t//So, If it is a title then create '<tr>' tag with class name 'title'\r\n\t \t\t\tfout.println(\"<tr class=\\\"title\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t\tfout.println(\"<td colspan=\\\"6\\\">\"+ temp[0] + \"</td>\");\r\n\t \t\t\tfout.println(\"</tr>\");\r\n\t \t\t\tcontinue;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//Else status is passed\r\n\t \t\telse{\r\n\t \t\t\tfout.println(\"<tr class=\\\"status_passed\\\" title=\\\"\\\" alt=\\\"\\\">\");\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t//this will create separate '<td>' for messages inside the action\r\n\t \t\tfor(String temp1 : temp){\r\n\t \t\t\t\tfout.println(\"<td>\"+ temp1 + \"</td>\");\r\n\r\n\t \t\t}\r\n\t \t//end up '<tr>' tag\t\r\n\t \tfout.println(\"</tr>\");\r\n \t}\r\n \t\r\n \t//this used for write some end up html tags\r\n \tonFinish();\r\n \t\r\n\t}", "public void writeOutputTableInfo(OutputInfo oti) {\n conf.set(getOutputTableInfoKey(), Writables.writeToEncodedStr(oti));\n }", "private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}", "String storeTable(String name) {\n PrintWriter writer = null;\n Table t = tables.get(name);\n\n try {\n\n /** Boolean decides if to overwrite the file if false, or continue if true */\n FileWriter fw = new FileWriter(name + \".tbl\", false);\n writer = new PrintWriter(fw);\n\n writer.println(t.getColString());\n\n int i = 1;\n for (; i < t.rowSize(); i += 1) {\n writer.println(t.getRowString(i));\n }\n\n writer.print(t.getRowString(i));\n writer.close();\n return \"\";\n\n } catch (IOException e) {\n return \"ERROR: Invalid Table\";\n } catch (NullPointerException e) {\n return \"ERROR: Invalid Table\";\n }\n\n\n }", "private void printTable(String table, String cols, String where,\n int expected) throws SQLException {\n\n int rows = 0;\n ResultSet rs = stmt.executeQuery(\"SELECT \" + cols + \" FROM \" + table + \" \" + where);\n ResultSetMetaData rsmd = rs.getMetaData();\n String result = \"Table \" + table + \", expecting \" + expected\n + \" rows total:\\n\";\n\n while (rs.next()) {\n for (int i = 0; i < rsmd.getColumnCount(); i++) {\n result += rsmd.getColumnLabel(i + 1) + \":\"\n + rs.getString(i + 1) + \":\";\n }\n\n result += \"\\n\";\n\n rows++;\n }\n\n rs.close();\n System.out.println(result);\n assertEquals(expected, rows);\n }", "public void writeFile(String[] results) {\n\t\ttry {\n\t\t\tFile file = new File(outputFile);\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\tfor(int i = 0; i < results.length; i++) {\n\t\t\t\tString[] tuple = testTuples.get(i);\n\t\t\t\t// convert String[] to String\n\t\t\t\tString tupleString = \"\";\n\t\t\t\tfor(int j = 0; j < tuple.length; j++) {\n\t\t\t\t\ttupleString += tuple[j] + \",\";\n\t\t\t\t}\n\t\t\t\twriter.write(tupleString + results[i] + \"\\n\");\n\t\t\t}\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void output(FileWriter outputFile, Map<Query, List<Evaluation>> evalData, FactDatabase source, FactDatabase target) {\n\t\tPrintWriter out = new PrintWriter(outputFile, true);\n\t\tif(source != null && target != null){\n\t\t\tfor(Query rule: evalData.keySet()){\n\t\t\t\tfor(Evaluation eval: evalData.get(rule)){\n\t\t\t\t\tout.print(rule.getRuleString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.first);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.second);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.third);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tdetermineSource(eval, source, target);\n\t\t\t\t\tout.print(eval.source.toString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.println(eval.result.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tfor(Query rule: evalData.keySet()){\n\t\t\t\tfor(Evaluation eval: evalData.get(rule)){\n\t\t\t\t\tout.print(rule.getRuleString());\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.first);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.print(eval.fact.second);\n\t\t\t\t\tout.print(\"\\t\");\n\t\t\t\t\tout.println(eval.fact.third);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tout.close();\n\t}", "public void writeToFile(String outputName) throws Exception{\n if (trials == null || data == null) throw new Exception(\"Must read marker and data file before writing it out\");\n BufferedWriter bw = new BufferedWriter(new FileWriter(outputName));\n \n //.. write out the headers\n for (int i= FIRSTPROBEINDEX; i < header.length; i++) {\n bw.write(header[i]);\n bw.write(\",\");\n }\n \n //.. write out condition\n bw.write(\"condition\");\n \n bw.write(\"\\n\");\n int rowNum =0;\n \n //.. write out actual data\n for (String [] row : data) {\n if (row.length!= header.length) System.out.println(\"Row has \" + row.length + \" whereas header has \" + header.length);\n String label =null;\n for (int i = FIRSTPROBEINDEX; i < row.length; i++) {\n label = getLabel(rowNum); //.. will be null if it doesn't exist\n \n if (label != null ) {\n bw.write(row[i]);\n bw.write(\",\");\n }\n }\n if (label!=null) {\n //System.out.println(\"Writing \" + getLabel(rowNum));\n String condition = getLabel(rowNum);\n bw.write(condition);\n bw.write(\"\\n\");\n \n //.. this is a hack since my program gives an error if a conditon jsut has one line\n if (condition.equals(\"passed\")) duplicateLastLine(bw, row, condition,20 );\n \n }\n rowNum++;\n }\n \n bw.close();\n }", "public void CreateTestResultFile()\n\t{ \n\t\tDate dNow = new Date( );\n\t\tSimpleDateFormat ft =new SimpleDateFormat (\"MMddYYYY\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFileOutputStream fos = new FileOutputStream(System.getProperty(\"user.dir\")+\"//PG HealthCheck List_\"+ft.format(dNow)+\".xls\");\n\t HSSFWorkbook workbook = new HSSFWorkbook();\n\t HSSFSheet worksheet = workbook.createSheet(\"PG Functionality - Country\");\n\t HSSFRow row1 = worksheet.createRow(0);\n\t row1.createCell(0).setCellValue(\"Availability of Data\");\n\t HSSFRow row = worksheet.createRow(1);\n\t row.createCell(0).setCellValue(\"Testcase\");\n\t row.createCell(1).setCellValue(\"TestRunStatus\");\n\t row.createCell(2).setCellValue(\"Remarks\");\n\t workbook.write(fos);\n\t fos.close();\n\t \t \n\t } \n\t\tcatch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t\t\t\n\t\t\n\t}", "public void writeTablePages(String s, Hashtable<String, Table> allTables)\n\t\t\tthrows IOException {\n\t\tFile metaFile = new File(s);\n\t\tmetaFile.createNewFile();\n\t\tFileWriter fw = new FileWriter(metaFile);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tString hashTable = allTables.toString();\n\t\tString temp = hashTable.substring(1, hashTable.length() - 1);\n\t\tString[] data = temp.split(\", \");\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tString row = \"\";\n\t\t\tString[] temp2 = data[i].split(\"=\");\n\t\t\tTable T = allTables.get(temp2[0]);\n\t\t\trow += temp2[0];\n\t\t\trow += \",\";\n\t\t\trow += T.Npages;\n\t\t\tbw.write(row);\n\t\t\tbw.newLine();\n\t\t}\n\t\tbw.close();\n\n\t}", "@Test\n\tpublic void testWriteToFile() {\n\t\tArrayList<ArrayList<String>> risultatoAnalisi = \n\t\t\t\tnew ArrayList<ArrayList<String>>();\n\t\toutput.setAnalysisResult(risultatoAnalisi);\n\t\tString percorso = \"\";\n\t\toutput.setOutputFileFolder(percorso);\n\t\ttry {\n\t\t\toutput.writeToFile();\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Problem when writing to specified path.\");\n\t\t}\n\t\tassertTrue(new File(percorso + \"analysis.txt\").exists());\n\t\t/*\n\t\t * Ora passo un path corretto e controllo che venga creato il fiile\n\t\t */\n\t\tpercorso = \"test-dir\";\n\t\toutput.setOutputFileFolder(percorso);\n\t\ttry {\n\t\t\toutput.writeToFile();\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Problem when writing to specified path.\");\n\t\t}\n\t\tassertTrue(new File(percorso + File.separator + \"analysis.txt\").exists());\n\t\t/*\n\t\t * Ripeto il test con valori da scrivere\n\t\t */\n\t\tArrayList<String> datiCasuali = new ArrayList<String>();\n\t\tdatiCasuali.add(\"27\");\n\t\trisultatoAnalisi.add(datiCasuali);\n\t\tdatiCasuali.add(\"12\");\n\t\trisultatoAnalisi.add(datiCasuali);\n\t\tdatiCasuali.add(\"3245543\");\n\t\trisultatoAnalisi.add(datiCasuali);\n\t\toutput.setAnalysisResult(risultatoAnalisi); \n\t\tpercorso = \"\";\n\t\toutput.setOutputFileFolder(percorso);\t\t\n\t\ttry {\n\t\t\toutput.writeToFile();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Problem when writing to specified path.\");\n\t\t}\n\t\tassertTrue(new File(percorso + \"analysis.txt\").exists());\n\t}", "protected void write_results(String output) {\r\n\t\t// File OutputFile = new File(output_train_name.substring(1,\r\n\t\t// output_train_name.length()-1));\r\n\t\ttry {\r\n\t\t\tFileWriter file_write = new FileWriter(output);\r\n\r\n\t\t\tfile_write.write(IS.getHeader());\r\n\r\n\t\t\t// now, print the normalized data\r\n\t\t\tfile_write.write(\"@data\\n\");\r\n\t\t\tfor (int i = 0; i < ndatos; i++) {\r\n\t\t\t\tif (!filtered[i]) {\r\n\t\t\t\t\tfile_write.write(X[i][0]);\r\n\t\t\t\t\tfor (int j = 1; j < nvariables; j++) {\r\n\t\t\t\t\t\tfile_write.write(\",\" + X[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfile_write.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfile_write.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"IO exception = \" + e);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "public void printResults() {\n getUtl().getOutput().add(\"~~ Results ~~\\n\");\n for (int i = 0; i < getHeroes().size(); i++) {\n if (getHeroes().get(i).isDead()) {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" dead\\n\");\n } else {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" \"\n + getHeroes().get(i).getLevel() + \" \"\n + getHeroes().get(i).getXp() + \" \"\n + getHeroes().get(i).getHp() + \" \"\n + getHeroes().get(i).getPosX() + \" \"\n + getHeroes().get(i).getPosY() + \"\\n\");\n }\n }\n // Write output to given outputPath.\n getGameFileWriter().write(getUtl().getOutput());\n for (int i = 0; i < getUtl().getOutput().size(); i++) {\n // Write output to console as well.\n System.out.print(getUtl().getOutput().get(i));\n }\n }", "public void logResult() {\r\n resTime = resTime * 1000;\r\n int b = (int) Math.round(resTime);\r\n resTime = (double) b / 1000;\r\n double averageTime = resTime / countTESTS;\r\n averageTime = averageTime * 1000;\r\n int i = (int) Math.round(averageTime);\r\n averageTime = (double) i / 1000;\r\n try (FileWriter writer = new FileWriter(\".//result.txt\")) {\r\n writer.write(resultOpen);\r\n writer.write(resultTitle);\r\n writer.write(resultSource);\r\n writer.write(resultLinkByName);\r\n writer.write(resultLinkByHref);\r\n writer.write(\"Total tests: \" + countTESTS + \"\\n\");\r\n writer.write(\"Passed/Failed: \" + PASSED_TEST + \"/\" + FAILED_TEST + \"\\n\");\r\n writer.write(\"Total time: \" + resTime + \"\\n\");\r\n writer.write(\"Average time: \" + averageTime + \"\\n\");\r\n writer.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void writeTables(DirectoryCache cache, Map<ResourceLocation, LootTable> tables) {\n Path outputFolder = this.generator.getOutputFolder();\n tables.forEach((key, lootTable) -> {\n Path path = outputFolder.resolve(\"data/\" + key.getNamespace() + \"/loot_tables/\" + key.getPath() + \".json\");\n try {\n IDataProvider.save(GSON, cache, LootTableManager.toJson(lootTable), path);\n } catch (IOException e) {\n Occultism.LOGGER.error(\"Couldn't write loot table {}\", path, e);\n }\n });\n }", "public void getSummary() { \n int randomTableNumber = (int)(Math.random() * 7) + 1;\n System.out.println(\"============================\");\n\n if (blnTakeOut == true) {\n System.out.println(\"Takeout order: \");\n } else if (blnTakeOut == false) {\n System.out.println(\"Table #\" + randomTableNumber + \"'s order: \");\n }\n\n for (int i = 0; i < itemsInOrder.size(); i++) {\n itemsInOrder.get(i).getSummary();\n }\n\n System.out.println(\"============================\");\n }", "static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.size(); i++){\n\t \t\tout.write(operations.get(i).getDetails() );\n\t \t}\n\t\t\t\n\t\t\t//Close the output stream\n\t\t\tout.close();\n\t\t}\n \tcatch (Exception e){//Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\tSystem.out.print(\"Operations file written.\\n\");\n\n \t\n }", "public static void makeTable1() throws FileNotFoundException {\n\n\t\tFile dir = new File(\"testinstances\");\n\t\tFile[] directoryListing = dir.listFiles();\n\t\tPrintStream out = new PrintStream(new FileOutputStream(\"table1.txt\"));\n\t\tSystem.setOut(out);\n\n\t\tif (directoryListing != null) {\n\t\t\tfor (File file : directoryListing) {\n\t\t\t\tSolution s, s2, s3, s4, s5;\n\t\t\t\tProblem p = Parser.parseInstance(file.toString());\n\t\t\t\tProblem p2 = Parser.parseInstance(file.toString());\n\t\t\t\tProblem p3 = Parser.parseInstance(file.toString());\n\t\t\t\tProblem p4 = Parser.parseInstance(file.toString());\n\t\t\t\tProblem p5 = Parser.parseInstance(file.toString());\n\t\t\t\ttry {\n\t\t\t\t\tlong startTime = System.nanoTime();\n\t\t\t\t\ts = TabuSearch.getInitialSolution(p);\n\t\t\t\t\ts2 = TabuSearch.getInitialSolution(p2);\n\t\t\t\t\ts3 = TabuSearch.getInitialSolution(p3);\n\t\t\t\t\ts4 = TabuSearch.getInitialSolution(p4);\n\t\t\t\t\ts5 = TabuSearch.getInitialSolution(p5);\n\t\t\t\t\tlong elapsedTimeNano = (System.nanoTime() - startTime); // in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// nanoseconds\n\t\t\t\t\tdouble elapsedTime = ((double) elapsedTimeNano) / 1E9;\n\t\t\t\t\tfloat min = Float.min(s.getCost(), s2.getCost());\n\t\t\t\t\tmin = Float.min(min, s3.getCost());\n\t\t\t\t\tmin = Float.min(min, s4.getCost());\n\t\t\t\t\tmin = Float.min(min, s5.getCost());\n\n\t\t\t\t\tstartTime = System.nanoTime();\n\t\t\t\t\ts = TabuSearch.getInitialSolutionOnlyLeft(p);\n\t\t\t\t\ts2 = TabuSearch.getInitialSolutionOnlyLeft(p2);\n\t\t\t\t\ts3 = TabuSearch.getInitialSolutionOnlyLeft(p3);\n\t\t\t\t\ts4 = TabuSearch.getInitialSolutionOnlyLeft(p4);\n\t\t\t\t\ts5 = TabuSearch.getInitialSolutionOnlyLeft(p5);\n\t\t\t\t\tlong elapsedTime2Nano = (System.nanoTime() - startTime); // in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// nanoseconds\n\t\t\t\t\tdouble elapsedTime2 = ((double) elapsedTime2Nano) / 1E9;\n\t\t\t\t\tfloat min2 = Float.min(s.getCost(), s2.getCost());\n\t\t\t\t\tmin2 = Float.min(min2, s3.getCost());\n\t\t\t\t\tmin2 = Float.min(min2, s4.getCost());\n\t\t\t\t\tmin2 = Float.min(min2, s5.getCost());\n\n\t\t\t\t\tSystem.out.println(file.toString().replace(\".txt\", \"\")\n\t\t\t\t\t\t\t+ \" & \" + p.getNumberOfJobs() + \" & \"\n\t\t\t\t\t\t\t+ p.getNumberOfMachines() + \" & \"\n\t\t\t\t\t\t\t+ Math.round(p.getOptimalCost()) + \" & \"\n\t\t\t\t\t\t\t+ Math.round(min) + \" & \" + elapsedTime + \" & \"\n\t\t\t\t\t\t\t+ Math.round(min2) + \" & \" + elapsedTime2 + \"\\\\\\\\\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"error\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public synchronized void writeResults(WorkDirectory workDir, BackupPolicy backupPolicy)\n throws IOException {\n if (isMutable()) {\n throw new IllegalStateException(\"This TestResult is still mutable - set the status!\");\n }\n\n // could attempt a reload() I suppose\n if (props == null) {\n props = emptyStringArray;\n }\n\n String wrp = getWorkRelativePath(desc).replace('/', File.separatorChar);\n resultsFile = workDir.getFile(wrp);\n\n File resultsDir = resultsFile.getParentFile();\n resultsDir.mkdirs(); // ensure directory created for .jtr file\n\n File tempFile = createTempFile(workDir, backupPolicy);\n try {\n writeResults(tempFile, backupPolicy);\n } finally {\n if (tempFile.exists()) {\n tempFile.delete();\n }\n }\n }", "public void Report() throws IOException {\n\t\tFile outputFile = new File(outputPath);\n\n\t\tif(!outputFile.exists()) {\n\t\t\toutputFile.createNewFile();\n\t\t}\n\t\t\n\t\tFileWriter writer = new FileWriter(outputPath);\n\t\tLinkedHashMap<Word, Integer> sortedResult = sortByValue();\n\t\tfloat frequency;\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(Map.Entry<Word, Integer> entry: sortedResult.entrySet()) {\n\t\t\tsb.setLength(0);\n\t\t\t\n\t\t\tfor(char c: entry.getKey().getCharacters()) {\n\t\t\t\tsb.append(c + \", \");\n\t\t\t}\n\t\t\t\n\t\t\tsb.delete(sb.length()-2, sb.length());\n\t\t\tfrequency = (float)entry.getValue()/(float)total_targets;\n\t\t\twriter.write(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\\n\");\n\t\t\t\n\t\t\tSystem.out.println(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\");\n\t\t}\n\t\tfrequency = (float)total_targets/(float)total;\n\t\t\n\t\tSystem.out.println(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\");\n\t\twriter.write(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\\n\");\n\t\t\n\t\twriter.close();\n\t}", "public static void writeIntoCSVFromTable() {\n try {\n backItUp(ROOT);\n backItUp(ROOT + Calendar.getInstance().getTime() + \"/\");\n } catch (Throwable e) {\n itsLogger.error(e.getMessage(), e);\n }\n\n }", "private void writeStatsToFile() {\n\t\tString fileName = \"TypeaheadStats.dat\";\n\t\tString contents = \"Typeahead_Tasks,Index_Hits,Hit_Ratio,Avg_Time,Suffix_Time,Pruning\\n\";\n\t\tcontents += numOfSearchTasks + \n\t\t\t\t\",\" + numOfIndexHits + \n\t\t\t\t\",\" + 1.0 * numOfIndexHits / numOfSearchTasks + \n\t\t\t\t\",\" + totalTime / numOfSearchTasks +\n\t\t\t\t\",\" + suffixTreeTime / numOfSearchTasks + \n\t\t\t\t\",\" + pruningPercentage / numOfSearchTasks;\n\t\tFileManager.writeToFile(fileName, contents);\n\t}", "public void fnCreateSummaryReport(){\r\n //Setting counter value\r\n g_iTCPassed = 0;\r\n g_iTestCaseNo = 0;\r\n g_SummaryStartTime = new Date();\r\n \r\n\t\ttry \r\n\t\t{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t\t\t//Close the html file\r\n\t new PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=BLACK>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\"); \r\n\t new PrintStream(foutStrm).println(\"<TABLE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\"); \r\n\t new PrintStream(foutStrm).println(\"<TR COLS=6 BGCOLOR=ORANGE><TD WIDTH=10%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>TC No.</B></FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Name</B></FONT></TD><TD BGCOLOR=ORANGE WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Status</B></FONT></TD><TD WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Duration</B></FONT></TD></TR>\");\r\n\t \r\n\t //Close the object\r\n\t foutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\tfoutStrm = null;\r\n }", "@Test\r\n public void test()\r\n {\r\n Assert.assertEquals(\"<table>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<th></th>\\n\" +\r\n \"\\t<th>Sunny</th>\\n\" +\r\n \"\\t<th>Rainy</th>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week1</td>\\n\" +\r\n \"\\t<td>5</td>\\n\" +\r\n \"\\t<td>2</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week2</td>\\n\" +\r\n \"\\t<td>3</td>\\n\" +\r\n \"\\t<td>4</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"</table>\", new HtmlReportPrinter().print(report));\r\n }", "private static void writeOutput (int[][] outData) {\r\n\t\tString outFile = \"Input_\" + outData.length + \".txt\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile fileLocation = new File(outFile);\t\t\r\n\t\t\tPrintWriter Writer = new PrintWriter(fileLocation, \"UTF-8\");\t\r\n\t\t\tfor (int i = 0; i < outData.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < outData[i].length; j++) {\r\n\t\t\t\t\tif (outData[i][j] == INFINITY) {\r\n\t\t\t\t\t\tWriter.print(\"NA\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tWriter.print(outData[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (j != outData[i].length - 1) {\r\n\t\t\t\t\t\tWriter.print(\"\\t\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tWriter.println();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tWriter.close();\r\n\t\t} catch (Exception ex) {\r\n System.out.println(ex.toString()); \r\n\t\t}\r\n\t}", "private void createTotalTestCase(BufferedWriter writer) throws IOException {\r\n\t\tString parent = \"<label style='margin-top: 8px;position: absolute;'>\";\r\n\t\tString content = \"<span style='display: inline;color: #000000;margin-left: 8px;font-weight: bold;font-family: Roboto, sans-serif;'>Total TestCases</span>\";\r\n\t\tString total = \"<span style='display: inline;color: #000000;margin-left: 100px;font-weight: bold;font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ data.getNumberOfTestTags() + \"</span></label>\";\r\n\t\twriter.write(parent + content + total);\r\n\t}", "public synchronized void saveTable() \n\t{\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(tableFile);\n\t\t\t\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\toos.writeObject(htRecords);\n\t\t\toos.close();\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Cannot save : FileNotFoundException\",e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Cannot save : IOException\",e);\n\t\t}\n\t}", "public void generateReport(){\n String fileOutput = \"\";\n fileOutput += allCustomers()+\"\\n\";\n fileOutput += getNoAccounts()+\"\\n\";\n fileOutput += getTotalDeposits()+\"\\n\";\n fileOutput += accountsOfferingLoans()+\"\\n\";\n fileOutput += accountsReceivingLoans()+\"\\n\";\n fileOutput += customersOfferingLoans()+\"\\n\";\n fileOutput += customersReceivingLoans()+\"\\n\";\n System.out.println(fileOutput);\n writeToFile(fileOutput);\n }", "public void SerializeTable(ObjectOutputStream out) {\n\t\t\n\t}", "private void writeFinalReports() {\n\t\tSystem.out.println(\"Printing data to output files ...\");\n\t\twritePropertyData();\n\t\twriteClassData();\n\t\tSystem.out.println(\"Finished printing data.\");\n\t}", "@Then(\"^the results should be displayed and saved in csv file$\")\n\tpublic void the_results_should_be_displayed_and_saved_in_csv_file() throws Throwable {\n\t\thomepage.waitForPageToLoad(homepage.getTitle());\n\t\thomepage.waitForVisibility(homepage.searchResults);\n\t\tList<WebElement> allSearchResults = homepage.findElements(homepage.searchResults);\n\n\t\ttry{\n\n\t\t\tfile = new File(csvFilePath);\n\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\tpw = new PrintWriter(new File(csvFilePath));\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\n\t\t\t//for header\n\t\t\tsb.append(\"Title\");\n\t\t\tsb.append(\" , \");\n\t\t\tsb.append(\"Link\");\n\t\t\tsb.append('\\n');\n\n\t\t\t// writing the required data to CSV file\n\t\t\tfor (WebElement result : allSearchResults){\n\n\t\t\t\tsb.append(result.getText());\n\t\t\t\tsb.append(\" , \");\n\t\t\t\tsb.append(result.getAttribute(\"href\"));\n\t\t\t\tsb.append('\\n');\n\t\t\t}\n\n\t\t\tpw.write(sb.toString());\n\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error while writing to csv file !!!\");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tpw.flush();\n\t\t\t\tpw.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t\tSystem.out.println(\"Error while flushing/closing fileWriter !!!\");\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void PrintToCsv() throws Exception {\n\t\tBufferedWriter bw1 = new BufferedWriter(new FileWriter(\"./data/output1.csv\"));\n\t\tBufferedWriter bw2 = new BufferedWriter(new FileWriter(\"./data/output2.csv\"));\n\t\tBufferedWriter bw3 = new BufferedWriter(new FileWriter(\"./data/output3.csv\"));\n\t\tBufferedWriter bw4 = new BufferedWriter(new FileWriter(\"./data/output4.csv\"));\n\t\t\n\t\t//print the name of attributes in Table\n\t\tPrint_attribute(bw1,bw2,bw3,bw4);\n\t\tIterator<String> iter = BugDBConnection.Domain.keySet().iterator();\n\t\ttry{\n\t\t\twhile(iter.hasNext()){\n\t\t\t\tString key = iter.next();\n\t\t\t\tdomain = key.split(\"-\")[0];\n\t\t\t\tproject = key.split(\"-\")[1];\n\n\t\t\t\tFieldSet fieldset = BugDBConnection.Domain.get(key);\n\t\t\t\tPrintQ1(bw1,fieldset.field);\n\t\t\t\tPrintQ2(bw2, fieldset.refield);\n\t\t\t\tPrintQ3(bw3, fieldset.f1, fieldset.f2, fieldset.f3, fieldset.f4);\n\t\t\t\tPrintQ4(bw4, fieldset.avg, fieldset.min, fieldset.max);\n\t\t\t\t\n\t\t\t}\n\t\t\tbw1.close();\n\t\t\tbw2.close();\n\t\t\tbw3.close();\n\t\t\tbw4.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void completedOutput(TestResult tr, Section section, String outputName);", "protected void storeAndWriteEvalResults(Evaluation aggregated,\n Instances headerNoSummary, int totalFolds, boolean testSetPresent,\n String seed, String outputPath) throws IOException {\n\n StringBuilder buff = new StringBuilder();\n String info = \"Summary - \";\n if (testSetPresent) {\n info += \"separate test set\";\n } else if (totalFolds == 1) {\n info += \"test on training\";\n } else {\n info +=\n totalFolds + \" fold cross-validation (seed=\" + seed + \"): \"\n + m_classifier.getClass().getCanonicalName() + \" \"\n + Utils.joinOptions(m_classifier.getOptions())\n + \"\\n(note: relative measures might be slightly \"\n + \"pessimistic due to the mean/mode of the target being computed on \"\n + \"all the data rather than on training folds)\";\n }\n info += \":\\n\";\n if (aggregated.predictions() != null) {\n info +=\n \"Number of predictions retained for computing AUC/AUPRC: \"\n + aggregated.predictions().size() + \"\\n\";\n }\n buff.append(info).append(\"\\n\\n\");\n buff.append(aggregated.toSummaryString()).append(\"\\n\");\n if (headerNoSummary.classAttribute().isNominal()) {\n try {\n buff.append(aggregated.toClassDetailsString()).append(\"\\n\");\n buff.append(aggregated.toMatrixString()).append(\"\\n\");\n } catch (Exception ex) {\n logMessage(ex);\n throw new IOException(ex);\n }\n }\n\n String evalOutputPath =\n outputPath\n + (outputPath.toLowerCase().contains(\"://\") ? \"/\" : File.separator)\n + \"evaluation.txt\";\n m_textEvalResults = buff.toString();\n PrintWriter writer = null;\n try {\n writer = openTextFileForWrite(evalOutputPath);\n writer.println(m_textEvalResults);\n } finally {\n if (writer != null) {\n writer.flush();\n writer.close();\n writer = null;\n }\n }\n\n OutputStream stream = null;\n try {\n Instances asInstances =\n WekaClassifierEvaluationReduceTask\n .evaluationResultsToInstances(aggregated);\n m_evalResults = asInstances;\n\n String arffOutputPath =\n outputPath\n + (outputPath.toLowerCase().contains(\"://\") ? \"/\" : File.separator)\n + \"evaluation.arff\";\n writer = openTextFileForWrite(arffOutputPath);\n writer.println(asInstances.toString());\n\n String csvOutputPath =\n outputPath\n + (outputPath.toLowerCase().contains(\"://\") ? \"/\" : File.separator)\n + \"evaluation.csv\";\n stream = openFileForWrite(csvOutputPath);\n CSVSaver saver = new CSVSaver();\n saver.setRetrieval(Saver.BATCH);\n saver.setInstances(asInstances);\n saver.setDestination(stream);\n saver.writeBatch();\n } catch (Exception ex) {\n logMessage(ex);\n throw new IOException(ex);\n } finally {\n if (writer != null) {\n writer.flush();\n writer.close();\n }\n if (stream != null) {\n stream.flush();\n stream.close();\n }\n }\n }", "public synchronized void getAllFromDbAndWriteIntoTempFiles() throws IOWrapperException, IOIteratorException{\r\n\r\n readFromDB = true;\r\n iow=new IOWrapper();\r\n iow.setupOutput(this.dbname,this.username,this.password,this.hostname,this.port);\r\n iow.setupInput(this.dbname,this.username,this.password,this.hostname,this.port);\r\n \r\n iter = iow.sendInputQuery(\"SELECT COUNT(*) FROM \"+nodetable);\r\n try {\r\n maxProgerss+=Integer.parseInt(((String[])iter.next())[0]); \r\n } catch (NullPointerException e) {maxProgerss+=100;}\r\n iter = iow.sendInputQuery(\"SELECT COUNT(*) FROM \"+edgetable);\r\n try {\r\n maxProgerss+=Integer.parseInt(((String[])iter.next())[0]);\r\n } catch (NullPointerException e) {maxProgerss+=100;}\r\n //iow.closeOutput();\r\n \r\n\r\n \r\n //nodelist\r\n iter = iow.select(nodetable,nodeCols);\r\n iow.setupOutput(Controller.NODES_TMP_FILENAME);\r\n while (iter.hasNext()) {\r\n singleProgress+=1;\r\n String[] data = (String[])iter.next();\r\n iow.writeLine(data[0]+\"\\t\"+data[1]);\r\n }\r\n iow.closeOutput();\r\n\t\r\n //edgelist\r\n iter=iow.select(edgetable,edgeCols);\r\n iow.setupOutput(Controller.EDGES_TMP_FILENAME);\r\n while (iter.hasNext()) {\r\n\t singleProgress+=1;\r\n String[] data = (String[])iter.next();\r\n iow.writeLine(data[0]+\"\\t\"+data[1]+\"\\t\"+data[2]);\r\n //System.out.println(\"wwsl: \"+data[0]+\"\\t\"+data[1]+\"\\t\"+data[2]);\r\n }\r\n iow.closeOutput();\r\n readFromDB=false;\r\n this.stillWorks=false;\r\n }", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "private void Html_footer_Summary(int total, int pass, int fail, int skipp, long timetoexecute) {\n\n\t\thtmlWriter.println(\"<br/><a href='../test-output/index.html'>TestNG default Report</a>\");\n\t\thtmlWriter.flush();\n\t}", "public void exportResultsToFile(){\r\n\t\t\t\t\r\n\t\t// This if clause shouldn't fire as the icon is grayed out if there is no tab open\r\n\t\tif(currentView == null \r\n\t\t\t\t|| currentView.getDynamicModelView() == null \r\n\t\t\t\t|| currentView.getDynamicModelView().getModel() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A tab must be open, and a model and table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(currentView.getDynamicModelView().getModel().getDefaultHistory() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tDynamicModelHistory history = currentView.getDynamicModelView().getModel().getDefaultHistory();\r\n\r\n\t\tStringBuffer buffer = new StringBuffer(30000);\r\n\r\n\t\tif(history != null && history.getTimePointCount() > 0 && history.getSnapshot(0) != null){\r\n\t\t\r\n\t\t\t// Get the filename\r\n\t\t\tYorkGUIUtils guiUtils = new YorkGUIUtils();\r\n\t\t\tString selectedFile = guiUtils.getUserToDefineFilename(this, propertiesMemento.getBaseDir(), \"txt csv\", \"Results files (.txt, .csv)\", JFileChooser.SAVE_DIALOG);\r\n\r\n\t\t\tif(selectedFile == null || guiUtils.wasCancelled()){\r\n\t\t\t\trequestFocusInWindow();\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\t\r\n\t\t\tlogger.info(\"Selected file for exporting results:\" + selectedFile);\r\n\t\t\r\n\t\t\tbuffer.append(\"time point\").append(\"\\t\");\r\n\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\tbuffer.append(t).append(\"\\t\");\r\n\t\t\t}\r\n\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(Iterator<String> it = history.getSnapshot(0).keySet().iterator(); it.hasNext();){\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\tbuffer.append(name).append(\"\\t\");\r\n\t\t\t\t// For all time points\r\n\t\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\t\tbuffer.append(history.getSnapshot(t).get(name).getOutputValue()).append(\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t}\r\n\t\t\tFileLoader.save(selectedFile, buffer.toString());\r\n\t\t}\r\n\t\telse{\r\n\t\t\tJOptionPane.showMessageDialog(this, \"No results available in the selected tab. Run the model first.\", \"Warning\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void writeData(JTable table, String value){\n\t\ttry{\n\t\t\tObjectOutputStream obj = new ObjectOutputStream(new FileOutputStream(value+\"_Details.sce\"));\n\t\t\tobj.writeObject(table);\n\t\t\tobj.close();\n\t\t}catch(IOException ex){\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t}", "private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}", "public void PrintResult() {\n try {\n res.beforeFirst();\n int columnsNumber = res.getMetaData().getColumnCount();\n while (res.next()) {\n for (int i = 1; i <= columnsNumber; i++) {\n if (i > 1) System.out.print(\", \");\n Object columnValue = res.getObject(i);\n System.out.print(res.getMetaData().getColumnName(i) + \" \" + columnValue);\n }\n System.out.println();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "static void outputComparisonTable(double [][]satisfactionRate) {\n \tSystem.out.print(\"\\t\");\n \tfor (int i = 0; i < satisfactionRate[0].length; i++) {\n\t\t\tSystem.out.print(\"run \" + (i+1) + \"\\t \");\n\t\t}\n \tSystem.out.println();\n \tfor (int i = 0; i < satisfactionRate.length; i++) {\n \t\tSystem.out.print((i+1) + \" vans\\t \");\n\t\t\tfor (int j = 0; j < satisfactionRate[i].length; j++) {\n\t\t\t\tSystem.out.print(((int)satisfactionRate[i][j]) + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n }", "@Override\n public void writeFile(String arg0, Map result) {\n\n // Initial variables\n ArrayList<HashMap> records;\n ArrayList<HashMap> recordT;\n ArrayList<HashMap> observeRecords; // Array of data holder for time series data\n BufferedWriter bwT; // output object\n StringBuilder sbData = new StringBuilder(); // construct the data info in the output\n HashMap<String, String> altTitleList = new HashMap(); // Define alternative fields for the necessary observation data fields; key is necessary field\n // P.S. Add alternative fields here\n HashMap titleOutput; // contain output data field id\n DssatObservedData obvDataList = DssatObservedData.INSTANCE; // Varibale list definition\n\n try {\n\n // Set default value for missing data\n setDefVal();\n\n // Get Data from input holder\n Object tmpData = getObjectOr(result, \"observed\", new Object());\n if (tmpData instanceof ArrayList) {\n records = (ArrayList) tmpData;\n } else if (tmpData instanceof HashMap) {\n records = new ArrayList();\n records.add((HashMap) tmpData);\n } else {\n return;\n }\n if (records.isEmpty()) {\n return;\n }\n\n observeRecords = new ArrayList();\n for (HashMap record : records) {\n recordT = getObjectOr(record, \"timeSeries\", new ArrayList());\n String trno = getValueOr(record, \"trno\", \"1\");\n if (!recordT.isEmpty()) {\n String[] sortIds = {\"date\"};\n Collections.sort(recordT, new DssatSortHelper(sortIds));\n for (HashMap recordT1 : recordT) {\n recordT1.put(\"trno\", trno);\n }\n observeRecords.addAll(recordT);\n }\n }\n\n // Initial BufferedWriter\n String fileName = getFileName(result, \"T\");\n if (fileName.endsWith(\".XXT\")) {\n String crid = DssatCRIDHelper.get2BitCrid(getValueOr(result, \"crid\", \"XX\"));\n fileName = fileName.replaceAll(\"XX\", crid);\n }\n arg0 = revisePath(arg0);\n outputFile = new File(arg0 + fileName);\n bwT = new BufferedWriter(new FileWriter(outputFile));\n\n // Output Observation File\n // Titel Section\n sbError.append(String.format(\"*EXP.DATA (T): %1$-10s %2$s\\r\\n\\r\\n\",\n fileName.replaceAll(\"\\\\.\", \"\").replaceAll(\"T$\", \"\"),\n getObjectOr(result, \"local_name\", defValBlank)));\n\n titleOutput = new HashMap();\n // TODO get title for output\n // Loop all records to find out all the titles\n for (HashMap record : observeRecords) {\n // Check if which field is available\n for (Object key : record.keySet()) {\n // check which optional data is exist, if not, remove from map\n if (obvDataList.isTimeSeriesData(key)) {\n titleOutput.put(key, key);\n\n } // check if the additional data is too long to output\n else if (key.toString().length() <= 5) {\n if (!key.equals(\"date\") && !key.equals(\"trno\")) {\n titleOutput.put(key, key);\n }\n\n } // If it is too long for DSSAT, give a warning message\n else {\n sbError.append(\"! Waring: Unsuitable data for DSSAT observed data (too long): [\").append(key).append(\"]\\r\\n\");\n }\n }\n // Check if all necessary field is available // P.S. conrently unuseful\n for (String title : altTitleList.keySet()) {\n\n // check which optional data is exist, if not, remove from map\n if (getValueOr(record, title, \"\").equals(\"\")) {\n\n if (!getValueOr(record, altTitleList.get(title), \"\").equals(\"\")) {\n titleOutput.put(title, altTitleList.get(title));\n } else {\n sbError.append(\"! Waring: Incompleted record because missing data : [\").append(title).append(\"]\\r\\n\");\n }\n\n } else {\n }\n }\n }\n\n // decompress observed data\n// decompressData(observeRecords);\n // Observation Data Section\n Object[] titleOutputId = titleOutput.keySet().toArray();\n Arrays.sort(titleOutputId);\n String pdate = getPdate(result);\n for (int i = 0; i < (titleOutputId.length / 39 + titleOutputId.length % 39 == 0 ? 0 : 1); i++) {\n\n sbData.append(\"@TRNO DATE\");\n int limit = Math.min(titleOutputId.length, (i + 1) * 39);\n for (int j = i * 39; j < limit; j++) {\n sbData.append(String.format(\"%1$6s\", titleOutput.get(titleOutputId[j]).toString().toUpperCase()));\n }\n sbData.append(\"\\r\\n\");\n\n for (HashMap record : observeRecords) {\n \n if (record.keySet().size() <= 2 && record.containsKey(\"trno\") && record.containsKey(\"date\")) {\n continue;\n }\n sbData.append(String.format(\" %1$5s\", getValueOr(record, \"trno\", \"1\")));\n sbData.append(String.format(\" %1$5s\", formatDateStr(getObjectOr(record, \"date\", defValI))));\n for (int k = i * 39; k < limit; k++) {\n\n if (obvDataList.isDapDateType(titleOutputId[k], titleOutput.get(titleOutputId[k]))) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(pdate, getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else if (obvDataList.isDateType(titleOutputId[k])) {\n sbData.append(String.format(\"%1$6s\", formatDateStr(getObjectOr(record, titleOutput.get(titleOutputId[k]).toString(), defValI))));\n } else {\n sbData.append(\" \").append(formatNumStr(5, record, titleOutput.get(titleOutputId[k]), defValI));\n }\n\n }\n sbData.append(\"\\r\\n\");\n }\n }\n // Add section deviding line\n sbData.append(\"\\r\\n\");\n\n // Output finish\n bwT.write(sbError.toString());\n bwT.write(sbData.toString());\n bwT.close();\n } catch (IOException e) {\n LOG.error(DssatCommonOutput.getStackTrace(e));\n }\n }", "public void printBoxTestResults(File outputFile) {\n\t\tString output = \"Input File;SecretA < SecretB;Optimal Box;Smallest Size;Confidence Interval;Graphic Overlaps Subset A;valid;invalid;Graphic Overlaps Subset B;valid;invalid;Graphic Significant Difference;valid;invalid;\";\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(outputFile));\n\t\t\tfor (int i=0; i < output.length(); i++){\n\t\t\t\tbw.write(output.charAt(i));\n\t\t\t}\n\t\t\tbw.write('\\n');\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"Error while writing the box test result csv.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tfor (BoxTestResults boxTest : this.boxTestResults) {\n\t\t\tboxTest.printBoxTestResult(outputFile);\n\t\t}\n\t}", "private static void textFilesOutput() {\n\n // make output directory if it doesn't already exist\n new File(\"output\").mkdirs();\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n try {\n airportFlightCounter.toTextFile();\n flightInventory.toTextFile();\n flightPassengerCounter.toTextFile();\n mileageCounter.toTextFile();\n } catch (FileNotFoundException e) {\n logger.error(\"Could not write to one or more text files - please close any open instances of that file\");\n e.printStackTrace();\n }\n\n logger.info(\"Output to text files completed\");\n }", "public void createTable(double pixelSize, String unit) {\r\n\r\n ResultsTable table = new ResultsTable();\r\n for (Cell cell : cells) {\r\n table.incrementCounter();\r\n table.addValue(\"Cell #\", cell.cellNum);\r\n table.addValue(\"Area (square \" + unit + \")\", cell.getArea() * pixelSize * pixelSize);\r\n }\r\n String title = \"Results\";\r\n table.show(title);\r\n }", "public void write(Writer w) throws Exception {\n w.write(\"% Rows\\tColumns\\n\");\n w.write(\"\" + getRowDimension() + \"\\t\" + getColumnDimension() + \"\\n\");\n w.write(\"% Matrix elements\\n\");\n for(int i = 0; i < getRowDimension(); i++) {\n for(int j = 0; j < getColumnDimension(); j++)\n w.write(\"\" + get(i, j) + \"\\t\");\n w.write(\"\\n\");\n }\n w.flush();\n }", "private void writeOutput() {\n\n textMergeScript.setCurrentDirectoryFromFile (chosenOutputFile);\n tabFileOutput = new TabDelimFile (chosenOutputFile);\n tabFileOutput.setLog (log);\n tabFileOutput.setDataLogging (false);\n boolean outputOK = true;\n try {\n tabFileOutput.openForOutput (list.getRecDef());\n } catch (IOException e) {\n outputOK = false;\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem opening Output File\",\n false);\n }\n if (outputOK) {\n list.openForInput();\n DataRecord inRec;\n int count = 0;\n do {\n inRec = list.nextRecordIn ();\n if (inRec != null) {\n try {\n tabFileOutput.nextRecordOut (inRec);\n count++;\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing to Output File\",\n true);\n }\n } // end if in rec not null\n } while (list.hasMoreRecords());\n\n list.close();\n\n try {\n tabFileOutput.close();\n } catch (IOException e) {\n }\n\n log.recordEvent(LogEvent.NORMAL,\n String.valueOf(count) + \" records output\",\n false);\n\n tabNameOutput = chosenOutputFile.getName();\n openOutputDataName.setText (tabNameOutput);\n if (usingDictionary) {\n tabFileName =\n new FileName (chosenOutputFile.getAbsolutePath());\n dictFile =\n new TabDelimFile (textMergeScript.getCurrentDirectory(),\n tabFileName.replaceExt(DICTIONARY_EXT));\n dictFile.setLog (log);\n try {\n dataDict.store (dictFile);\n } catch (IOException e) {\n log.recordEvent (LogEvent.MEDIUM,\n \"Problem writing Output Dictionary\",\n true);\n }\n } // end if using dictionary\n\n textMergeScript.recordScriptAction (\n ScriptConstants.OUTPUT_MODULE,\n ScriptConstants.OPEN_ACTION,\n ScriptConstants.NO_MODIFIER,\n ScriptConstants.NO_OBJECT,\n chosenOutputFile.getAbsolutePath());\n\n } // end if output ok\n\n }", "public static void writeReport(Collection<HitsHunter> sorted) {\n List<String> resArr = new ArrayList<>(10);\n for (HitsHunter hunter : sorted) {\n var res = Printer.printTotalResult(hunter);\n resArr.add(res);\n }\n CSVWriter.writeInFile(resArr, true);\n }", "public static void computeSummary() {\r\n\r\n String text = \"\\n\";\r\n\r\n //print the rank matrix\r\n\r\n text += \"\\\\begin{sidewaystable}[!htp]\\n\\\\centering\\\\scriptsize\\n\"\r\n + \"\\\\resizebox{\\\\textwidth}{!}{\\\\begin{tabular}{\\n\";\r\n text += \"|c\";\r\n for (int i = 0; i < columns; i++) {\r\n text += \"|r\";\r\n }\r\n text += \"|}\\n\\\\hline\\n\";\r\n\r\n for (int i = 0; i < columns; i++) {\r\n text += \"&(\" + (i + 1) + \") \";\r\n }\r\n text += \"\\\\\\\\\\n\\\\hline\\n\";\r\n for (int i = 0; i < columns; i++) {\r\n text += algorithms[i] + \" (\" + (i + 1) + \")\";\r\n for (int j = 0; j < columns; j++) {\r\n if (i != j) {\r\n text += \"& \" + wilcoxonRanks[i][j];\r\n } else {\r\n text += \"& -\";\r\n }\r\n }\r\n text += \"\\\\\\\\\\n\\\\hline\\n\";\r\n }\r\n\r\n text += \"\\n\" + \"\\\\end{tabular}}\\n\" + \"\\\\caption{Ranks computed by the Wilcoxon test}\\n\";\r\n text += \"\\n\\\\end{sidewaystable}\\n\";\r\n text += \"\\n \\\\clearpage \\n\\n\";\r\n\r\n Files.addToFile(outputSummaryFileName, text);\r\n\r\n //print the p-value matrix\r\n\r\n text = \"\\n\";\r\n\r\n text += \"\\\\begin{sidewaystable}[!htp]\\n\\\\centering\\\\scriptsize\\n\"\r\n + \"\\\\resizebox{\\\\textwidth}{!}{\\\\begin{tabular}{\\n\";\r\n text += \"|c\";\r\n for (int i = 0; i < columns; i++) {\r\n text += \"|c\";\r\n }\r\n text += \"|}\\n\\\\hline\\n\";\r\n\r\n for (int i = 0; i < columns; i++) {\r\n text += \"&(\" + (i + 1) + \") \";\r\n }\r\n text += \"\\\\\\\\\\n\\\\hline\\n\";\r\n\r\n if (rows <= 50) {\r\n for (int i = 0; i < columns; i++) {\r\n text += algorithms[i] + \" (\" + (i + 1) + \")\";\r\n for (int j = 0; j < columns; j++) {\r\n \r\n if (i < j) {//0.1\r\n text += \"& \" + getSymbol(i,j,exactPValues[i][j], exactPValues[j][i], 0.1) + \" \";\r\n }\r\n if (i == j) {\r\n text += \"& -\";\r\n }\r\n if (i > j) {//0.05\r\n text += \"& \" + getSymbol(i,j,exactPValues[i][j], exactPValues[j][i], 0.05) + \" \";\r\n }\r\n }\r\n \r\n text += \"\\\\\\\\\\n\\\\hline\\n\";\r\n }\r\n } else {\r\n for (int i = 0; i < columns; i++) {\r\n text += algorithms[i] + \" (\" + (i + 1) + \")\";\r\n for (int j = 0; j < columns; j++) {\r\n if (i < j) {//0.1\r\n text += \"& \" + getSymbol(i,j,asymptoticPValues[i][j], asymptoticPValues[j][i], 0.1) + \" \";\r\n }\r\n if (i == j) {\r\n text += \"& -\";\r\n }\r\n if (i > j) {//0.05\r\n text += \"& \" + getSymbol(i,j,asymptoticPValues[i][j], asymptoticPValues[j][i], 0.05) + \" \";\r\n }\r\n }\r\n text += \"\\\\\\\\\\n\\\\hline\\n\";\r\n }\r\n }\r\n\r\n text += \"\\n\" + \"\\\\end{tabular}}\\n\" + \"\\\\caption{Summary of the Wilcoxon test. \\\\textbullet = \"\r\n + \"the method in the row improves the method of the column. \\\\textopenbullet = \"\r\n + \"the method in the column improves the method of the row. Upper diagonal of level significance $\\\\alpha=0.9$,\"\r\n + \"Lower diagonal level of significance $\\\\alpha=0.95$}\\n\";\r\n text += \"\\n\\\\end{sidewaystable}\\n\";\r\n text += \"\\n \\\\clearpage \\n\\n\";\r\n\r\n Files.addToFile(outputSummaryFileName, text);\r\n\r\n text = \"\\n\";\r\n\r\n //print the summary table\r\n\r\n text += \"\\\\begin{table}[!htp]\\n\\\\centering\\\\scriptsize\\n\"\r\n + \"\\\\begin{tabular}{\\n\";\r\n text += \"|c|c|c|c|c|}\\n\\\\hline\\n\";\r\n text += \"&\\\\multicolumn{2}{c|}{$\\\\alpha=0.9$} & \\\\multicolumn{2}{c|}{$\\\\alpha=0.95$}\\\\\\\\\\\\hline\\n\";\r\n text += \"Method & + & $\\\\pm$ & + & $\\\\pm$ \";\r\n\r\n text += \"\\\\\\\\\\n\\\\hline\\n\";\r\n for (int i = 0; i < columns; i++) {\r\n text += algorithms[i]+\" & \"+wins90[i]+\" & \"+draw90[i]+\" & \"+wins95[i]+\" & \"+draw95[i];\r\n text += \"\\\\\\\\\\n\\\\hline\\n\";\r\n }\r\n\r\n text += \"\\n\" + \"\\\\end{tabular}\\n\" + \"\\\\caption{Wilcoxon test summary results}\\n\";\r\n text += \"\\n\\\\end{table}\\n\";\r\n text += \"\\n \\\\clearpage \\n\\n\";\r\n\r\n Files.addToFile(outputSummaryFileName, text);\r\n\r\n }", "private void convertScenarioResults(ArrayList<String> testcases, ArrayList<String> blocktests, String file, String testrun) {\n \t\t\ttry {\t\t\n \t\t\t\tFileWriter writer = new FileWriter(\"C:/JenkinsSlave/Results/Executed - \"+testrun+\".xml\");\n \t\t\t\tFile tr = new File(file+\".mxlog\");\t \n \t\t\t DocumentBuilder db;\n \t\t \tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n \t\t\t\tdb = dbf.newDocumentBuilder();\n \t\t\t\tDocument doc = db.parse(tr);\n \t\t\t doc.getDocumentElement().normalize();\n \t\t\t XPath xpath = XPathFactory.newInstance().newXPath();\n \t\t\t XPathExpression xExpress = xpath.compile(\"//Str\");\n \t\t\t NodeList nl = (NodeList) xExpress.evaluate(doc, XPathConstants.NODESET);\n \t\t\t ArrayList<String> ciao = new ArrayList<String>();\n \t\t\t if(nl != null){\n \t\t\t \twriter.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n \t\t\t\t\twriter.write(\"<testsuite>\\n\");\n \t\t\t\t int index=0;\n \t\t\t\t for(String testcase: testcases){\n \t\t\t\t \twriter.write(\"\\t<testcase classname=\\\"TC\\\" name=\\\"\"+testcase+\"\\\">\\n\");\n \t\t\t\t \tString testo=nl.item(index).getTextContent();\n \t\t\t\t \twhile(!testo.startsWith(\"Post \")){\n \t\t\t\t \t\tindex++;\n \t\t\t\t \t\ttesto=nl.item(index).getTextContent();\n \t\t\t\t \t}\n \t\t\t\t\t\t\tif(testo.substring(testo.lastIndexOf(\" \")+1).equals(\"passed.\")){\n \t\t\t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\telse if(testo.substring(testo.lastIndexOf(\" \")+1).equals(\"failed.\")){\n \t\t\t\t\t\t\t\twriter.write(\"\\t\\t<failure>\\n\\t\\t\\tTest Case was evaluated as failed\\n\\t\\t</failure>\\n\");\n \t\t\t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tindex++;\n \t\t\t\t \t}\n \t\t\t\t for(String block: blocktests){\n \t\t\t\t \twriter.write(\"\\t<testcase classname=\\\"TC\\\" name=\\\"\"+block+\"\\\">\\n\");\n \t\t\t\t \twriter.write(\"\\t\\t<error>\\n\\t\\t\\tTest Case not found\\n\\t\\t</error>\\n\");\n \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n \t\t\t\t }\n \t\t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\twriter.write(\"</testsuite>\\n\");\n \t\t\t\t\twriter.flush();\n \t\t\t\t\twriter.close();\n \t\t\t }else{\n \t\t\t \tContactPolarion(listener);\n \t\t\t }\n \t\t\t\t \n \t\t\t\t}catch(Exception e){\n \t\t\t\t\tContactPolarion(listener);\n \t\t\t\t\tlistener.getLogger().println(e.getMessage());\n \t\t\t\t}\n\t\t\t}", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }", "public void writeTable(Table table, String pathName, String filename){\n\n Record tempRow; \n String tempString;\n FileWriter fw;\n\n //create file\n try {\n fw = new FileWriter(pathName + filename);\n \n //add table name\n fw.write(table.getName());\n fw.write(\"\\n\");\n\n //add each row to a new line\n //get primary keys and loop over to add rows\n List<String> keys = table.getPrimaryKeys();\n for (int i = 0; i < keys.size(); i++){\n tempRow = table.getRow(keys.get(i));\n tempString = tempRow.getAllItemString();\n fw.write(tempString);\n fw.write(\"\\n\");\n }\n\n fw.close();\n } catch (IOException ex){\n System.out.println(\"ERROR: failed to create file \" + filename);\n }\n }", "@Test\n public void operator_table() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new DataTableNode(\"t\", typeOf(DataTable.class), typeOf(String.class)));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n context.put(\"t\", new BasicDataTable.Builder<>().build());\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!TABLE\"));\n }", "@Postprocess\n public void getReport() {\n try {\n BufferedWriter bufferWriter = new BufferedWriter(new FileWriter(logfile, false));\n if (!results.isEmpty()) {\n bufferWriter.write(\"===========================================================\\n\");\n bufferWriter.write(\"sys_milli,\\t\\tdb_micro,\\t\\ttime_diff\\n\");\n Collections.sort(results);\n for (MysqlheartbeatBean mhb : results) {\n bufferWriter.write(String.valueOf(mhb.getSysMilli()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro() - mhb.getSysMilli()) + \"\\n\");\n }\n bufferWriter.flush();\n }\n bufferWriter.close();\n } catch (IOException ex) {\n logger.log(Level.SEVERE, \"{0}: {1}\", new Object[]{toolName, ex.getMessage()});\n }\n }", "public void saveResult(PrintWriter P) {\n \n System.out.println(\"CaseListMem: Not implemented\");\n}", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "public void report() throws IOException {\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"comparisons.txt\", false));\n\t\tfor (Integer[] data : this.comparisons)\n\t\t\twriter.append(data[0] + \" \" + data[1] + \"\\n\");\n\t\twriter.close();\n\t}", "public void printTable(){\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\ttry {\n \t\t\tSystem.out.println(\"Bucket: \" + i);\n \t\t\tSystem.out.println(data.getFirst());\n \t\t\tSystem.out.println(\"+ \" + (data.getLength() - 1) + \" more at this bucket\\n\\n\");\n \t\t} catch (NoSuchElementException e) {\n \t\t\tSystem.out.println(\"This bucket is empty.\\n\\n\");\n \t\t}\n \t}\n }", "public static void writeObsDUT(Hashtable<String, Hashtable<Integer, Obs>> obsTable, String dstPath) {\n\n\t\ttry {\n\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"observation\");\n\t\t\tdoc.appendChild(rootElement);\n\n\t\t\tfor (Map.Entry<String, Hashtable<Integer, Obs>> entrySet : obsTable.entrySet()) {\n\t\t\t\tString userID = entrySet.getKey();\n\t\t\t\tElement dayElement = doc.createElement(\"week_day\");\n\t\t\t\trootElement.appendChild(dayElement);\n\n\t\t\t\t// set attribute to staff element\n\t\t\t\tAttr attr = doc.createAttribute(\"id\");\n\t\t\t\tattr.setValue(String.valueOf(userID));\n\t\t\t\tdayElement.setAttributeNode(attr);\n\t\t\t\t// System.out.println(pKey);\n\t\t\t\tHashtable<Integer, Obs> value = entrySet.getValue();\n\t\t\t\tfor (Map.Entry<Integer, Obs> entrySet1 : value.entrySet()) {\n\t\t\t\t\tInteger weekDay = entrySet1.getKey();\n\t\t\t\t\tObs obs = entrySet1.getValue();\n\n\t\t\t\t\tElement usrSeqElement = doc.createElement(\"user\");\n\t\t\t\t\tdayElement.appendChild(usrSeqElement);\n\n\t\t\t\t\tattr = doc.createAttribute(\"id\");\n\t\t\t\t\tattr.setValue(String.valueOf(weekDay));\n\t\t\t\t\tusrSeqElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"seq\");\n\t\t\t\t\tattr.setValue(obs.seq);\n\t\t\t\t\tusrSeqElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"viterbi\");\n\t\t\t\t\tattr.setValue(obs.vitPath);\n\t\t\t\t\tusrSeqElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"timestamp\");\n\t\t\t\t\tattr.setValue(obs.timeStamp);\n\t\t\t\t\tusrSeqElement.setAttributeNode(attr);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// write the content into xml file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(new File(dstPath));\n\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"File saved!\");\n\n\t\t} catch (ParserConfigurationException | TransformerException pce) {\n\t\t}\n\t}", "@Test\r\n\tpublic void testExport() {\r\n\t\tSystem.out.println(\"testExport\");\r\n\t\tList<String[]> text = new ArrayList();\r\n\t\ttext.add(\"1;2;3\".split(\";\"));\r\n\t\ttext.add(\"4;5;6\".split(\";\"));\r\n\t\ttext.add(\"7;8;9\".split(\";\"));\r\n\t\tString expResult = \"<!DOCTYPE html><html> <head> <title> Export File HTML </title>\\n\"\r\n\t\t\t+ \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\"> <link rel=\\\"icon\\\" type=\\\"image/ico\\\" href=\\\"http://www.isep.ipp.pt/favicon.ico\\\"> </head> <body> <div> <img src=\\\"http://www.dei.isep.ipp.pt/images/topo_index.png\\\" alt=\\\"Logotipo ISEP\\\"> </div> <hr> <div> <TABLE> <TR> <TD align='center'>&nbsp;1&nbsp;</TD> <TD align='center'>&nbsp;2&nbsp;</TD> <TD align='center'>&nbsp;3&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;4&nbsp;</TD> <TD align='center'>&nbsp;5&nbsp;</TD> <TD align='center'>&nbsp;6&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;7&nbsp;</TD> <TD align='center'>&nbsp;8&nbsp;</TD> <TD align='center'>&nbsp;9&nbsp;</TD> </TR> </TABLE> <br> </div> <hr> </body></html>\";\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString result = instance.export(text);\r\n\t\tassertEquals(expResult, result);\r\n\r\n\t}", "private void printTable(String type){\n\t\tSystem.out.println(\"\\n\\t\\t\\t\\t \" + type + \" Probing Analysis (Table size = \" + tableSize + \")\");\n\t\tSystem.out.println(\"\\t\\t ----- Inserts ------ ----------- Probes ---------- --------- Clusters ---------\");\n\t\tSystem.out.printf(\"%5s %10s %10s %10s %10s %10s %10s %10s %10s %10s\\n\", \n\t\t\t\t\"N\", \"lambda\", \"success\", \"failed\", \"total\", \"avg\", \"max\", \"number\", \"avg\", \"max\");\n\t}", "private void writeOutput( final PrintWriter writer ) throws InterruptedException, IOException {\n double[][] numbers = new double[DATA_ROWS][DATA_COLUMNS];\r\n for(int irow = 0; irow < DATA_ROWS; irow++) {\r\n for(int icol = 0; icol < DATA_COLUMNS; icol++) {\r\n //double number = rnd.nextDouble();\r\n double number = irow + ( (double) icol ) / 10. + ( (double) icol ) / 100. + ( (double) icol ) / 1000. + ( (double) icol ) / 10000. + ( (double) icol ) / 100000.;\r\n Thread.sleep( SLEEP_BETWEEN_COLUMNS ); //simulating a program that's doing some other work like db retrieval\r\n writer.print( number );\r\n writer.print( '\\t' );\r\n numbers[irow][icol] = number;\r\n }\r\n writer.println();\r\n System.out.println( \"wrote row \" + irow );\r\n }\r\n writer.flush();\r\n writer.close();\r\n checkOutput( numbers );\r\n }", "private static void appendTabResults(Integer runId, double cpuTime,double bestCost,LinkedList<Integer> bestTspList) throws java.io.IOException,java.io.FileNotFoundException,UnsupportedEncodingException{\n\n\t\t// <inputFilename>_<method>_<cutoff>_<runID>*.sol\n\t\tString fileName = Project.method+\".tab\";\n\t\tFileOutputStream fo = new FileOutputStream(fileName,true);\n\n\t\tString bestTspPath = new String();\n\t\tfor (int i=0;i<bestTspList.size();i++){\n\t\t\tbestTspPath += String.format(\"%d,\",bestTspList.get(i));\n\t\t}\n\n\t\tif ( bestTspList.getFirst().intValue() != bestTspList.getLast().intValue() ){\n\t\t\tbestTspPath += String.format(\"%d\",bestTspList.getFirst());\n\t\t}\n\n\t\tString msg = String.format(\"%s,%d,%.2f,%.0f,%d,%.2f,%d,%.0f,%s%n\",\n\t\t\tfileNameWithAbsolutePath.getName(),runId,Math.round((cpuTime/nanosecs)*100.0)/100.0,optimalCost,Math.round(bestCost),\n\t\t\tMath.round(((bestCost-Project.optimalCost)/Project.optimalCost)*100.0)/100.0,randomSeed,cutoffTimeSeconds,bestTspPath);\n\n\t\ttry {\n \t\t\tjava.nio.channels.FileLock lock = fo.getChannel().lock();\n \t\t\ttry {\n\t\t\t\tfo.write(msg.getBytes());\n\t\t\t\tfo.flush();\n \t\t\t} finally {\n \t\t\tlock.release();\n \t\t\t}\n\t\t} finally {\n \t\t\tfo.close();\n\t\t}\n\n\n\t\t/* \n\t \t * print the tab results by data file \n\t */\n\t\t// <inputFilename>_<method>_<cutoff>_<runID>*.sol\n\t\tfileName = Project.fileNameWithAbsolutePath.getName()+\".tab\";\n\t\tfo = new FileOutputStream(fileName,true);\n\n\t\tmsg = String.format(\"%s,%d,%.2f,%.0f,%d,%.2f,%d,%.0f,%s%n\",\n\t\t\tmethod,runId,Math.round((cpuTime/nanosecs)*100.0)/100.0,optimalCost,Math.round(bestCost),\n\t\t\tMath.round(((bestCost-Project.optimalCost)/Project.optimalCost)*100.0)/100.0,randomSeed,cutoffTimeSeconds,bestTspPath);\n\n\t\ttry {\n \t\t\tjava.nio.channels.FileLock lock = fo.getChannel().lock();\n \t\t\ttry {\n\t\t\t\tfo.write(msg.getBytes());\n\t\t\t\tfo.flush();\n \t\t\t} finally {\n \t\t\tlock.release();\n \t\t\t}\n\t\t} finally {\n \t\t\tfo.close();\n\t\t}\n\n\t}", "@Test\n\tpublic void testWriteToFile() {\n ArrayList<String> actualLines = new ArrayList<String>();\n\n\t\tactualLines.add(\"Course: Java\");\n\t\tactualLines.add(\"CourseID: 590\");\n\t\tactualLines.add(\"StudentName: Nikhil Kumar\");\n\t\t\n\t\t// Write to file\n\t\tmyFileWriter1.writeToFile(actualLines);\n\t\t\n\t\t// Read the written file to test its contents\n\t\tArrayList<String> expectedLines = readWrittenFile(\"output_test.txt\");\n\t\tassertEquals(expectedLines, actualLines);\n\t}", "public void writeReport() {\n\t\tint gridSize = 55; // Total character spaces between the borders\n\t\tprint(\"+-------------------------------------------------------+\");\n\t\tprint(String.format(\"|%s|\", centerName(gridSize)));\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t/*\n\t\t * Loops through each room in the hotel and prints out the relevant\n\t\t * information on a new line And draws southern, eastern and western\n\t\t * borders to allow it to connect up to the main table.\n\t\t */\n\t\tfor (int i = 0; i < myHotel.getSize(); i++) {\n\t\t\tprint(formatRooms(i).toUpperCase());\n\t\t\tprint(formatAmount(i).toUpperCase());\n\t\t\tprint(formatSleepAmount(i).toUpperCase());\n\t\t\tprint(formatOccupied(i).toUpperCase());\n\t\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t}\n\t\t/*\n\t\t * After every hotel room's information has been displayed The overall\n\t\t * hotel information is displayed such as total occupancy, if there is a\n\t\t * vacancy. And if there is a vacancy, the total amount of free rooms\n\t\t * and beds.\n\t\t */\n\t\tprint(String.format(\"| Hotel\\t\\t|\\tTotal Occupancy:\\t%s\\t|\", getHotel().getTotalOccupancy()).toUpperCase());\n\t\tprint(String.format(\"| information:\\t|\\tHas Vacancies:\\t\\t%s\\t|\", convertBoolean(getHotel().getVacancies()))\n\t\t\t\t.toUpperCase());\n\t\tif (getHotel().getVacancies()) {\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Rooms:\\t\\t%s\\t|\", getHotel().getEmptyRooms()).toUpperCase());\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Beds:\\t\\t%s\\t|\", getHotel().getTotalVacancy()).toUpperCase());\n\t\t}\n\t\t/*\n\t\t * Draws a final southern border to close the table\n\t\t */\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t}", "public void writeSimScore() throws IOException, MalformedURLException, ParseException {\n FileWriter fw = new FileWriter(new File(scoreFile+new Double(alphaValue).toString()+\".txt\")); \r\n BufferedWriter bw = new BufferedWriter(fw);\r\n\r\n int numQueries = queryList.size();\r\n for (int i = 0; i < numQueries; i++) {\r\n String query1 = queryList.get(i);\r\n for (int j = 0; j < numQueries; j++) {\r\n String query2 = queryList.get(j);\r\n double sim = alphaValue * scorematrix[i][j] + (1 - alphaValue) * calSemanticSim(i, j);\r\n bw.write(new Double(sim).toString());\r\n bw.write(\" \");\r\n }\r\n // System.out.println(\"entered \" + i);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n\r\n }", "public void writeTourResultsAllCarrier() {\n\t\tString fileName = this.outputFolder + \"total_tour_infos_per_vehicleType.csv\";\n\t\tFile file = new File(fileName);\n\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(fileName);\n\t\t\tbw.newLine();\n\t\t\tbw.write(\"____________________________________________________________________________\");\n\t\t\tbw.newLine();\n\n\t\t\tbw.write(\"personId; vehType Id;distance [m] ; distance [km] ;TravelTime [s]; TravelTime [h];\" +\n\t\t\t\t\t\"FuelConsumption[l]; Emission [t Co2]; FuelConsumptionRate[l/100m]; \" +\n\t\t\t\t\t\"EmissionRate [g/m]; \");\n\t\t\tbw.newLine();\n\n\n\n\t\t\t//\t\t\tKT:\n\t\t\tMap<Id<Person>, Double> personId2tourDistance = this.handler.getPersonId2TourDistances();\n\t\t\tMap<Id<Person>, Double> personId2tourTravelTimes = this.handler.getPersonId2TravelTimes();\n\n\t\t\tMap<Id<VehicleType>, VehicleTypeSpezificCapabilities> vehTypId2Capabilities = new TreeMap<Id<VehicleType>, VehicleTypeSpezificCapabilities>();\n\n\t\t\tCarrierVehicleTypes vehicleTypes = this.handler.getVehicleTypes();\n\n\t\t\t//preparation:\n\t\t\tfor (Id<VehicleType> vehicleTypeId : vehicleTypes.getVehicleTypes().keySet()){\n\t\t\t\tVehicleTypeSpezificCapabilities capabilities = this.handler.getVehTypId2Capabilities().get(vehicleTypeId);\n\t\t\t\tif (capabilities != null){\n\t\t\t\t\tvehTypId2Capabilities.put(vehicleTypeId, capabilities);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//write results:\n\t\t\tfor (Id<Person> personId :personId2tourDistance.keySet()) {\n\n\t\t\t\tDouble tourDistanceMeter = personId2tourDistance.get(personId);\n\t\t\t\tDouble tourTravelTimeSec = personId2tourTravelTimes.get(personId);\n\n\t\t\t\tId<VehicleType> vehTypeId = null;\n\n\t\t\t\tfor (Id<VehicleType> vehTypeIdsAvail : vehicleTypes.getVehicleTypes().keySet()) {\n\t\t\t\t\tif(personId.toString().contains(\"_\"+vehTypeIdsAvail.toString()+\"_\")){\n\t\t\t\t\t\tif (vehTypeIdsAvail.toString().endsWith(\"frozen\") == personId.toString().contains(\"frozen\")) {//only frozen\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t} else { //not \"frozen\"\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (vehTypeId == null) {\n\t\t\t\t\tlog.error(\"Vehicle type for person not defined: \" + personId);\n\t\t\t\t}\n\n\t\t\t\tdouble fuelConsuptionRate = (vehTypId2Capabilities.get(vehTypeId)).getFuelConsumtion()*1000; // Usually in l/100km\n\t\t\t\tdouble emissionsRatePerMeter = vehTypId2Capabilities.get(vehTypeId).getEmissionsPerMeter(); \n\n\t\t\t\tbw.write(personId + \";\" +\n\t\t\t\t\t\tvehTypeId + \";\" +\n\t\t\t\t\t\ttourDistanceMeter + \";\" + \n\t\t\t\t\t\ttourDistanceMeter/1000 + \";\" + //km\n\t\t\t\t\t\ttourTravelTimeSec + \";\" + \n\t\t\t\t\t\ttourTravelTimeSec/3600 + \";\" + \t//h\n\t\t\t\t\t\ttourDistanceMeter*fuelConsuptionRate/100/1000 + \";\" + // rate is in [liter/100km]\n\t\t\t\t\t\ttourDistanceMeter*emissionsRatePerMeter /1000000 +\";\" + \t// CO2-Ausstoss in t (= 1Mio g)\n\t\t\t\t\t\tfuelConsuptionRate+ \";\" + \n\t\t\t\t\t\temissionsRatePerMeter \n\t\t\t\t\t\t);\n\t\t\t\tbw.newLine();\n\n\t\t\t}\t\n\t\t\t\n\t\t\tlog.info(\"Output written to \" + fileName);\n\t\t\tbw.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void printTableMap() {\n StringBuilder sb = new StringBuilder();\n\n appendQuery(sb);\n appendTableMapBody(sb);\n\n sb.append(\" assertThat(tableMapEventBody.getTableId(), equalTo(\" + getTableId() + \"L));\\n\");\n sb.append(\" assertThat(tableMapEventBody.getTableRef().schemaName, equalTo(\\\"capture_binlog_events\\\"));\\n\");\n sb.append(\" assertThat(tableMapEventBody.getTableRef().tableName, equalTo(\\\"foo\\\"));\\n\");\n sb.append(\" assertThat(tableMapEventBody.getColumnTypes(), equalTo(new byte[] {0})); // todo: add appropriate types\\n\");\n sb.append(\" }\\n\");\n System.out.println(sb.toString());\n }", "public void saveResult() {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(new FileOutputStream(resultFile));\n\t\t\tout.println(record.resultToString());\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "private void writeRuleSetDetailToTSV(FileWriter writer, Claim claim) throws IOException\n {\n List<Rule> rules = claim.getRuleSet().getRule();\n \n for (Rule rule : rules)\n {\n writer.append(\"\\t\\tRule ID: \" + rule.getRuleID());\n writer.append(\"\\n\");\n writer.append(\"\\t\\tRule Name: \" + rule.getRuleName());\n writer.append(\"\\n\");\n writer.append(\"\\t\\tRule Comments: \" + rule.getRuleComments());\n writer.append(\"\\n\");\n \n writer.append(\"\\n\\n\");\n }\n \n }", "public void writeObsTU(Hashtable<Integer, Hashtable<Integer, String>> obsTable, String dstPath) {\n\n\t\ttry {\n\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"observation\");\n\t\t\tdoc.appendChild(rootElement);\n\n\t\t\tfor (Map.Entry<Integer, Hashtable<Integer, String>> entrySet : obsTable.entrySet()) {\n\t\t\t\tInteger userID = entrySet.getKey();\n\t\t\t\tElement dayElement = doc.createElement(\"week_day\");\n\t\t\t\trootElement.appendChild(dayElement);\n\n\t\t\t\t// set attribute to staff element\n\t\t\t\tAttr attr = doc.createAttribute(\"id\");\n\t\t\t\tattr.setValue(String.valueOf(userID));\n\t\t\t\tdayElement.setAttributeNode(attr);\n\t\t\t\t// System.out.println(pKey);\n\t\t\t\tHashtable<Integer, String> value = entrySet.getValue();\n\t\t\t\tfor (Map.Entry<Integer, String> entrySet1 : value.entrySet()) {\n\t\t\t\t\tInteger weekDay = entrySet1.getKey();\n\t\t\t\t\tString obs = entrySet1.getValue();\n\n\t\t\t\t\tElement usrSeqElement = doc.createElement(\"user\");\n\t\t\t\t\tdayElement.appendChild(usrSeqElement);\n\n\t\t\t\t\t// set attribute to staff element\n\t\t\t\t\tattr = doc.createAttribute(\"id\");\n\t\t\t\t\tattr.setValue(String.valueOf(weekDay));\n\t\t\t\t\tusrSeqElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"seq\");\n\t\t\t\t\t// attr.setValue(formatter.format(probability));\n\t\t\t\t\tattr.setValue(obs);\n\t\t\t\t\tusrSeqElement.setAttributeNode(attr);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// write the content into xml file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(new File(dstPath));\n\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"File saved!\");\n\n\t\t} catch (ParserConfigurationException | TransformerException pce) {\n\t\t}\n\t}", "public String getTabularResult() {\n StringBuilder builder = new StringBuilder();\n for (int c = 0; c < cols; ++c) {\n for (int r = 0; r < rows; ++r) {\n builder.append(puzzleMap.get(orderedKeys[r][c]).getValue());\n }\n builder.append(System.lineSeparator());\n }\n return builder.toString().trim();\n }", "public static void write(List<Individual> rows, List<Column> allColumns) {\n\t\tConnection c = null;\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/microsim\", \"postgres\", \"microsim2016\");\n\t\t\tc.setAutoCommit(false);\n\t\t\n\t\t\tString create = \"CREATE TABLE TOTAL(\";\n\t\t\tMap<Column, String> values = rows.get(0).getValues();\n\t\t\tfor (Column col : values.keySet()) {\n\t\t\t\tSource s = col.source;\n\t\t\t\tif (!s.equals(Source.MULTI_VALUE) && !s.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInteger.parseInt(values.get(col));\n\t\t\t\t\t\tcreate = create + col.datatype + \" BIGINT \" + \"NOT NULL, \";\n\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tcreate = create + col.datatype + \" VARCHAR \" + \"NOT NULL, \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcreate = create + \" PRIMARY KEY(id));\"; \n\t\t\tstmt = c.prepareStatement(create);\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\tfor (Individual i : rows) {\n\t\t\t\tString insert = \"INSERT INTO TOTAL \" +\n\t\t\t\t\t\t\t\t\"VALUES (\";\n\t\t\t\t\n\t\t\t\tMap<Column, String> iValues = i.getValues();\n\t\t\t\tfor (Column col : iValues.keySet()) {\n\t\t\t\t\tSource sc = col.source;\n\t\t\t\t\tif (!sc.equals(Source.MULTI_VALUE) && !sc.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\t\tString s = iValues.get(col);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tInteger.parseInt(s);\n\t\t\t\t\t\t\tinsert = insert + \" \" + s + \",\"; \n\t\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tinsert = insert + \" '\" + s + \"', \"; //doing this each time because need to add '' if a string and no user input\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tinsert = insert.substring(0, insert.length() - 2); //cut off last , \n\t\t\t\tinsert = insert + \");\"; \n\t\t\t\tstmt = c.prepareStatement(insert);\n\t\t\t\tstmt.executeUpdate();\t\t\t\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\tsubTables(rows, c, allColumns);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n\t System.exit(0);\n\t\t}\t\t\t\t\n\t}", "public void print() {\r\n this.table.printTable();\r\n }", "public void exportTableInfoDefinitions(FileEnvVar exportFile,\n boolean includeTableTypes,\n boolean includeInputTypes,\n boolean includeDataTypes,\n String outputType,\n boolean addEOFMarker,\n boolean addSOFMarker) throws CCDDException, Exception\n {\n // Placeholder\n }", "void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }" ]
[ "0.66862273", "0.6609117", "0.6558603", "0.65200853", "0.64827245", "0.64182705", "0.6329516", "0.6317114", "0.62767094", "0.62642384", "0.62100685", "0.6180135", "0.6103318", "0.6085099", "0.6031636", "0.6024378", "0.60028833", "0.5988324", "0.5987067", "0.5959152", "0.59159815", "0.5901723", "0.58981085", "0.58933806", "0.587857", "0.5822804", "0.58063895", "0.57977325", "0.5785142", "0.57788205", "0.5777659", "0.57706016", "0.57576317", "0.57552934", "0.5745352", "0.57261306", "0.5712877", "0.57107216", "0.57054484", "0.5666871", "0.5656282", "0.56559044", "0.56528187", "0.56524825", "0.5651105", "0.5649732", "0.56462824", "0.5645705", "0.56449586", "0.5634361", "0.5633867", "0.56300634", "0.5628199", "0.56194615", "0.5614315", "0.56140614", "0.561249", "0.56112933", "0.5610015", "0.55939347", "0.55865675", "0.55852693", "0.557926", "0.5576946", "0.5569027", "0.55485547", "0.554618", "0.5535458", "0.55296093", "0.5528375", "0.5525612", "0.5520294", "0.5503759", "0.550255", "0.54967487", "0.5490546", "0.54880697", "0.54854465", "0.54835844", "0.5473484", "0.54669493", "0.5466186", "0.54484844", "0.54462785", "0.5445744", "0.5445502", "0.54426986", "0.543148", "0.542582", "0.5417814", "0.54174215", "0.54135615", "0.5409521", "0.53979105", "0.5397742", "0.53910977", "0.5390444", "0.53818065", "0.5380675", "0.53788894" ]
0.73933667
0
Writes the class with exception test method with type of exception thrown
private void createExpectionalClassDiv(BufferedWriter writer, ResultTable table) throws IOException { Map<String, String> data = table.getExpectionMessageData(); int size = table.getExpectionMessageData().size(); if (size != 0) { int height = ((size - 1) * 77) + 120; String container = "<div style='width: 533px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: " + height + "px;position: absolute;top: 480px;'>"; String expectionalLabel = "<label style='font-weight: bold;position: absolute;padding-left: 8px;color: black;padding-top: 8px;font-family: Roboto, sans-serif;'>Expectional Test Method</label>"; int count = 0; String messageContainer = "", methodName = "", expectionMessage = ""; writer.write(container + expectionalLabel); for (Map.Entry<String, String> entry : data.entrySet()) { int top = 30 + (82 * count); messageContainer = "<div style='top: " + top + "px;position: absolute;width: 451px;height: 75px;background-color: #f8f9fa;margin-left: 36px;border :1px solid #ebedef;border-radius:4px;'>"; methodName = "<span style='display: block;margin-left: 4px;margin-top: 4px;font-family: Roboto, sans-serif;'>" + entry.getKey() + "</span>"; expectionMessage = "<span style='margin-top: 4px;position: absolute;margin-left: 8px;font-family: Roboto, sans-serif;color: #F44336;font-size: small;font-weight: bold;'>" + entry.getValue() + "</span></div>"; count++; writer.write(messageContainer + methodName + expectionMessage); } String containerClose = "<div>"; writer.write(containerClose); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test075() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n methodWriter0.visitMultiANewArrayInsn(\"dVw2Z7M){e/Y(#j\", (-615));\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, true, true);\n Label label0 = new Label();\n int int0 = 268435455;\n // Undeclared exception!\n try { \n methodWriter1.visitFieldInsn(268435455, \"\", \"Exceptions\", \"KY0B/+MuB[P.E(8)u)\");\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test\n\tpublic final void testWriteException() {\n\t\tLog.write(LogMessageSeverity.WARNING, LogWriteMode.QUEUED,\n\t\t\t\tnew RuntimeException(\"This is our test assertion exception\"), \"Unit Tests\",\n\t\t\t\t\"Test of logging exception attachment.\", null);\n\n\t\tLog.write(LogMessageSeverity.WARNING, LogWriteMode.QUEUED,\n\t\t\t\tnew RuntimeException(\"This is our top exception\",\n\t\t\t\t\t\tnew RuntimeException(\"This is our middle exception\",\n\t\t\t\t\t\t\t\tnew RuntimeException(\"This is our bottom exception\"))),\n\t\t\t\t\"Unit Tests\", \"Test of logging exception attachment with nested exceptions.\", null);\n\t}", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n classWriter0.firstField = fieldWriter0;\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n fieldWriter0.getSize();\n fieldWriter0.visitAnnotation(\"Exceptions\", false);\n classWriter1.newFloat((-2110.0F));\n item0.hashCode = 231;\n // Undeclared exception!\n try { \n frame0.execute(182, 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2450));\n String string0 = \"9~\\\"GM0+ ?&-(JmN[0f.\";\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"`abrPw?i1\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"oc[MfnZM[~MHOK iO\", (String[]) null, false, false);\n Object object0 = new Object();\n classWriter0.newInteger((-2450));\n classWriter0.newDouble((-2450));\n Item item0 = classWriter0.key3;\n // Undeclared exception!\n try { \n methodWriter0.visitFrame((-1), 2, (Object[]) null, 2, (Object[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n String[] stringArray0 = new String[0];\n classWriter0.visit(1, 1, \"InnerClasses\", \"\", \"EQIUR?\", stringArray0);\n classWriter0.newField(\"\", \"\", \"\\\"\");\n String[] stringArray1 = new String[4];\n stringArray1[0] = \"\\\"\";\n stringArray1[1] = \"char\";\n stringArray1[2] = \"boolean\";\n stringArray1[3] = \" ,G\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \" ,G\", \"<T'RwU+)i.UKJX>\", \"\", stringArray1, true, true);\n // Undeclared exception!\n try { \n methodWriter0.visitIntInsn(849, 849);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(285212630);\n Type type0 = Type.CHAR_TYPE;\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n type0.toString();\n ClassWriter classWriter1 = new ClassWriter((-1445));\n classWriter1.toByteArray();\n classWriter1.newClassItem(\"C\");\n Item item0 = classWriter1.newLong(0L);\n classWriter0.newLong(3671L);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n classWriter1.newConst(\"C\");\n classWriter0.newLong(3671L);\n // Undeclared exception!\n try { \n frame0.execute(122, (-4474), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(37);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2, \"rh~77R>(fu\", \"rh~77R>(fu\", \"rh~77R>(fu\", \"rh~77R>(fu\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAttribute((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(1);\n ClassWriter classWriter3 = new ClassWriter(1);\n Item item0 = classWriter3.key2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n byte[] byteArray0 = new byte[6];\n byteArray0[0] = (byte) (-99);\n byteArray0[1] = (byte)9;\n byteArray0[2] = (byte)99;\n byteArray0[3] = (byte) (-80);\n byteArray0[4] = (byte) (-80);\n byteArray0[5] = (byte) (-99);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Item item1 = classWriter1.newClassItem(\"\");\n ClassWriter classWriter4 = new ClassWriter(2);\n classWriter4.newLong((byte) (-78));\n // Undeclared exception!\n try { \n frame0.execute(18, (byte)7, classWriter1, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void writeExceptions(Method m) {\n Class<?>[] exceptions = m.getExceptionTypes();\n int size = exceptions.length;\n if (exceptions.length == 0)\n return;\n writer.print(\"throws \");\n for (int i = 0; i < size; i++) {\n writer.print(exceptions[i].getCanonicalName());\n if (i != size - 1)\n writer.print(\", \");\n }\n writer.print(\" \");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 0, \"O8\", \"\", \"O8\", \"O8\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAttribute((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2924);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2924, \"72q/<&vyM/Gk\", \"72q/<&vyM/Gk\", \"72q/<&vyM/Gk\", (Object) null);\n ByteVector byteVector0 = new ByteVector(2);\n byteVector0.length = 2924;\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.ByteVector\", e);\n }\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2438);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2438, \"jyY)^e *U#>@n8v((\", \"jyY)^e *U#>@n8v((\", \"jyY)^e *U#>@n8v((\", \"jyY)^e *U#>@n8v((\");\n ByteVector byteVector0 = classWriter0.pool;\n byteVector0.length = (-2808);\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static void provideDAOExceptionClass(final FileWriterWrapper writer)\n throws IOException {\n writer.write(\"public class DAOException extends Exception {\\n\\n\");\n writer.write(\" static final long serialVersionUID = \"\n + \"200710190246666L;\\n\\n\");\n writer.write(\" public DAOException(final String message, \"\n + \"final Exception e) {\\n\");\n writer.write(\" super(message, e);\\n\");\n writer.write(\" }\\n\\n\");\n writer.write(\"}\\n\");\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(1556);\n FieldWriter fieldWriter0 = null;\n try {\n fieldWriter0 = new FieldWriter(classWriter0, 2, \"!Wk\\\":Mn\", \"!Wk\\\":Mn\", \"!Wk\\\":Mn\", classWriter0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // value wheel.asm.ClassWriter@5\n //\n verifyException(\"wheel.asm.ClassWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(4096);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 4096, \"v~t_e\", \"v~t_e\", \"v~t_e\", \"v~t_e\");\n Attribute attribute0 = new Attribute(\"v~t_e\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1284));\n FieldWriter fieldWriter0 = null;\n try {\n fieldWriter0 = new FieldWriter(classWriter0, (-1284), \"\", \"\", \"\", classWriter0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // value wheel.asm.ClassWriter@5\n //\n verifyException(\"wheel.asm.ClassWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(9);\n Object object0 = new Object();\n FieldWriter fieldWriter0 = null;\n try {\n fieldWriter0 = new FieldWriter(classWriter0, 8, \"?0dqr\", \"ConstantVlue\", (String) null, object0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // value java.lang.Object@61854751\n //\n verifyException(\"wheel.asm.ClassWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 0, \"O8\", \"\", \"O8\", \"O8\");\n ByteVector byteVector0 = classWriter0.pool;\n byteVector0.length = (-208);\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test124() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte)7;\n byteArray0[1] = (byte) (-59);\n byteArray0[2] = (byte)9;\n byteArray0[3] = (byte) (-99);\n byteArray0[4] = (byte) (-51);\n byteArray0[5] = (byte) (-80);\n byteArray0[6] = (byte)7;\n byteArray0[7] = (byte) (-80);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n classWriter0.newClassItem(\"\");\n classWriter0.newLong((byte) (-80));\n // Undeclared exception!\n try { \n frame0.execute(16777220, (byte) (-99), classWriter1, item0);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(4096);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 4096, \"%tU\", \"%tU\", \"%tU\", \"%tU\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAttribute((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"H\";\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"H\", \"/i%NB\", \"LocalVariableTable\", stringArray0, false, false);\n classWriter0.visitField((-2450), \"7d4eT*xNPyD9C?Tx\", \"oc[MfnZM[~MHOK iO\", \"FF;+^g:3sF\", \"oc[MfnZM[~MHOK iO\");\n methodWriter0.visitIntInsn(3, 2);\n methodWriter0.exceptionCount = 1333;\n ByteVector byteVector0 = new ByteVector(309);\n methodWriter0.visitLocalVariable(\"[5 )\\\"'C/=@gj$kw)\", \"oc[MfnZM[~MHOK iO\", \"[\", label0, label0, 2);\n // Undeclared exception!\n try { \n methodWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Type type0 = Type.DOUBLE_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n ClassWriter classWriter0 = new ClassWriter(158);\n Item item0 = classWriter0.key2;\n Item item1 = new Item(10);\n // Undeclared exception!\n try { \n frame0.execute(176, 0, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Item item0 = classWriter1.newDouble((-1.0));\n ClassWriter classWriter2 = new ClassWriter(191);\n // Undeclared exception!\n try { \n frame0.execute(150, 22, classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(2);\n Item item0 = classWriter2.newLong(2);\n Item[] itemArray0 = new Item[4];\n itemArray0[0] = item0;\n itemArray0[1] = item0;\n Item item1 = classWriter1.newFieldItem(\"2r&\", \"wo1ywwg)N\", \"\");\n itemArray0[2] = item1;\n itemArray0[3] = item0;\n classWriter1.typeTable = itemArray0;\n Item item2 = classWriter1.newLong(2178L);\n // Undeclared exception!\n try { \n frame0.execute(164, 1, classWriter2, item2);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(1);\n Type type0 = Type.SHORT_TYPE;\n String string0 = \"6aRv\";\n Item item0 = classWriter0.newClassItem(\"6aRv\");\n // Undeclared exception!\n try { \n frame0.execute(190, 5, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n String string0 = \"dVw2Z7M){e/Y(#j\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n boolean boolean0 = false;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n MethodWriter methodWriter1 = methodWriter0.next;\n int int0 = 191;\n Label label0 = new Label();\n String string1 = \"+13DRn!N]ZO-7]\\\"&YI\";\n methodWriter0.visitTryCatchBlock((Label) null, label0, label0, \"+13DRn!N]ZO-7]\\\"&YI\");\n // Undeclared exception!\n try { \n methodWriter0.visitMaxs(191, 267386880);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n String string0 = \"H\";\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"H\";\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"H\", \"/i%NB\", \"LocalVariableTable\", stringArray0, false, false);\n classWriter0.visitField((-2450), \"7d4eT*xNPyD9C?Tx\", \"oc[MfnZM[~MHOK iO\", \"FF;+^g:]3sF\", \"oc[MfnZM[~MHOK iO\");\n int int0 = 3;\n int int1 = 4;\n methodWriter0.visitIntInsn(3, 4);\n methodWriter0.exceptionCount = 1333;\n ByteVector byteVector0 = new ByteVector(309);\n // Undeclared exception!\n try { \n methodWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(0);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \".`\");\n ClassWriter classWriter2 = new ClassWriter(2);\n ClassWriter classWriter3 = new ClassWriter(1);\n int[] intArray0 = new int[4];\n intArray0[0] = 1;\n intArray0[2] = 2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n intArray0[3] = 1;\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte) (-78);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Item item0 = classWriter0.newClassItem(\"v!:Z}rLQ%d\\\"\\\"]mu;m;\");\n classWriter3.newLong(1);\n // Undeclared exception!\n try { \n frame0.execute(8, 1, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(3002);\n Item item0 = classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(162);\n classWriter1.toByteArray();\n ClassWriter classWriter2 = new ClassWriter((-1514));\n Frame frame0 = new Frame();\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n // Undeclared exception!\n try { \n frame0.execute(1716, (-406), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(1988);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 1988, \"L\", \"L\", \"L\", \"L\");\n // Undeclared exception!\n try { \n fieldWriter0.put((ByteVector) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n int int0 = (-2450);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n String string0 = \"H\";\n String string1 = \"oQm>;z{ZYH6=AwV\";\n FileSystemHandling.shouldAllThrowIOExceptions();\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"Code\";\n stringArray0[1] = \"H\";\n stringArray0[2] = \"/i%NB\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"oQm>;z{ZYH6=AwV\", \"oc[MfnZM[~MHOK iO\", \"Code\", stringArray0, false, false);\n Integer integer0 = new Integer(1);\n int int1 = 185;\n // Undeclared exception!\n try { \n methodWriter0.visitMethodInsn(185, \"/i%NB\", \"H\", \"/i%NB\");\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "public static void provideNullityExceptionClass(final FileWriterWrapper writer)\n throws IOException {\n writer.write(\"public class NullityException extends Exception {\\n\\n\");\n writer.write(\" static final long serialVersionUID = \"\n + \"200710190250666L;\\n\\n\");\n writer.write(\" public NullityException(final String className, \"\n + \"final String field) {\\n\");\n writer.write(\" super(\\\"The field \\\" + field + \\\" of the class \"\n + \"\\\" + className + \\\" should not contain a null \"\n + \"value.\\\");\\n\");\n writer.write(\" }\\n\\n\");\n writer.write(\"}\\n\");\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n Label label0 = new Label();\n label0.getFirst();\n ClassWriter classWriter0 = new ClassWriter(3002);\n Item item0 = classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(1);\n ClassWriter classWriter2 = new ClassWriter((-201));\n int int0 = Frame.INTEGER;\n classWriter1.newInteger(172);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(12, (-1108), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-984));\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (-984), \"\", \"\", \"\", \"\");\n Attribute attribute0 = new Attribute(\"\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"\";\n stringArray0[1] = \"{uh\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"{uh\";\n classWriter0.visit(285212648, 184, \"{uh\", \"i&b}d$\", \"\", stringArray0);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n classWriter0.newClassItem(\"The size must be non-negative\");\n Item item0 = classWriter0.newLong(1048575);\n int int0 = 159;\n Item item1 = new Item(159, item0);\n classWriter1.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(21, 21, classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(159);\n ClassWriter classWriter1 = new ClassWriter(2);\n Item item0 = classWriter1.newFieldItem(\"y])rS3DhfdTg\", \"y])rS3DhfdTg\", \"\");\n classWriter0.visitSource(\"y])rS3DhfdTg\", \"\");\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte) (-73);\n byteArray0[1] = (byte) (-83);\n byteArray0[2] = (byte)109;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n byteArray0[3] = (byte)104;\n byteArray0[4] = (byte) (-85);\n byteArray0[5] = (byte)63;\n byteArray0[6] = (byte) (-65);\n byteArray0[7] = (byte) (-85);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Class<Object> class0 = Object.class;\n Type type0 = Type.getType(class0);\n Type[] typeArray0 = new Type[3];\n typeArray0[0] = type0;\n typeArray0[1] = type0;\n typeArray0[2] = type0;\n Type.getMethodDescriptor(type0, typeArray0);\n type0.getElementType();\n // Undeclared exception!\n try { \n frame0.execute(54, (byte)104, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n ClassWriter classWriter0 = new ClassWriter((-1312));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"value \";\n stringArray0[1] = \"\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"i&b}d$\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.thisName = null;\n stringArray0[4] = \"\";\n stringArray0[5] = \"Ac\";\n classWriter0.newClassItem(\"value \");\n Item item0 = classWriter0.newLong(0L);\n classWriter0.newFieldItem(\"\", \"\\\"}422X3^Z.n4y5<z!\", \"\");\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(76, 0, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(2);\n Item item0 = classWriter2.newLong(2);\n classWriter1.newLong(2178L);\n classWriter2.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(197, (-5054), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String[] stringArray0 = null;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n methodWriter0.visitInsn(14);\n FieldWriter fieldWriter0 = classWriter0.firstField;\n classWriter0.firstField = null;\n methodWriter0.getSize();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"dVw2Z7M){e/Y(#j\");\n Label label0 = new Label();\n Edge edge0 = label0.successors;\n methodWriter0.visitLineNumber(1, label0);\n methodWriter0.getSize();\n classWriter0.visitInnerClass(\"/#p[v!vM>^U#((tz?0\", \"Us\", \"dVw2Z7M){e/Y(#j\", (-4015));\n int int0 = 73;\n methodWriter0.visitMethodInsn(73, \"dVw2Z7M){e/Y(#j\", \"Code\", \"/#p[v!vM>^U#((tz?0\");\n // Undeclared exception!\n try { \n methodWriter0.visitInsn(3926);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n int int0 = 0;\n ClassWriter classWriter0 = new ClassWriter(0);\n String string0 = \"Code\";\n String[] stringArray0 = new String[6];\n stringArray0[0] = \"Code\";\n stringArray0[1] = \"Code\";\n stringArray0[2] = \"Code\";\n classWriter0.addUninitializedType(\"{=k(UmyU|{qe`7t,\", 0);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n stringArray0[3] = \"Code\";\n stringArray0[4] = \"Code\";\n stringArray0[5] = \"Code\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"Code\", \"Code\", \"Code\", stringArray0, false, false);\n // Undeclared exception!\n try { \n methodWriter0.visitFrame(0, 0, stringArray0, 182, stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 6\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 0, \"O8\", \"\", \"O8\", \"O8\");\n Attribute attribute0 = new Attribute(\"O8\");\n fieldWriter0.visitAttribute(attribute0);\n ByteVector byteVector0 = classWriter0.pool;\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(9);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 1596, \"ConstantVlue\", \"xWJwacYp%f=Qk\", \"eprF6eZaPtd\", (Object) null);\n // Undeclared exception!\n try { \n fieldWriter0.visitAttribute((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"\";\n stringArray0[1] = \"{uh\";\n stringArray0[2] = \"\";\n classWriter1.visitOuterClass(\"pUA>[s%>wi5%'noId\", \"\", \"{uh\");\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"{uh\";\n classWriter0.visit(285212648, 184, \"{uh\", \"i&b}d$\", \"\", stringArray0);\n Item item0 = classWriter0.newClassItem(\"The size must be non-negative\");\n Item item1 = classWriter1.key2;\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(183, 191, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n int int0 = Frame.INTEGER;\n Item item0 = classWriter1.newInteger(1);\n // Undeclared exception!\n try { \n frame0.execute(49, 2006, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2940));\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 6, \"ConstantValue\", \"?&>?R$\", \"cr$>d6@eC5z!\", \"?&>?R$\");\n // Undeclared exception!\n try { \n fieldWriter0.put((ByteVector) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.FieldWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(8);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 8, \"\", \"\", \"\", \"\");\n Attribute attribute0 = new Attribute(\"Signature\");\n fieldWriter0.visitAttribute(attribute0);\n ByteVector byteVector0 = classWriter0.pool;\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"tE\", \"Class not found\", \"&h'pH__a\", stringArray0, false, false);\n Object object0 = new Object();\n methodWriter0.visitFrame(76, (-1840700267), stringArray0, (-3070), stringArray0);\n // Undeclared exception!\n try { \n methodWriter0.visitFrame(8, (-1000), stringArray0, (-1000), stringArray0);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n label0.successor = label1;\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Cpd7(e\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n FileSystemHandling.shouldAllThrowIOExceptions();\n classWriter0.newUTF8(\"Cpd7(e\");\n Frame frame0 = label0.successor.frame;\n label0.frame = null;\n classWriter0.index = (-2463);\n stringArray0[6] = \"Cpd7(e\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Cpd7(e\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"oc[MfnZM[~MHOK iO\", \"~)yCTRxQ#s$y[Ly%\", \"oc[MfnZM[~MHOK iO\", stringArray0, true, false);\n classWriter0.newFieldItem(\"oc[MfnZM[~MHOK iO\", \"~hm$aI6.7xL0\", \"~hm$aI6.7xL0\");\n methodWriter0.visitJumpInsn(168, label0);\n methodWriter0.visitMaxs(1, (-969));\n // Undeclared exception!\n try { \n methodWriter0.visitVarInsn((-333), 32767);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -333\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(9);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 1596, \"ConstantVlue\", \"xWJwacYp%f=Qk\", \"eprF6eZaPtd\", (Object) null);\n Object object0 = new Object();\n FieldWriter fieldWriter1 = null;\n try {\n fieldWriter1 = new FieldWriter(classWriter0, 2, \"The list of names must not be null\", \"The list of names must not be null\", \":qO^Q~\", object0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // value java.lang.Object@6f18df94\n //\n verifyException(\"wheel.asm.ClassWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(0);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \".`\");\n ClassWriter classWriter2 = new ClassWriter(2);\n ClassWriter classWriter3 = new ClassWriter(1);\n int[] intArray0 = new int[4];\n intArray0[0] = 1;\n intArray0[2] = 2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n intArray0[3] = 1;\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte) (-78);\n byteArray0[1] = (byte) (-101);\n byteArray0[2] = (byte) (-80);\n byteArray0[3] = (byte) (-99);\n byteArray0[4] = (byte)7;\n byteArray0[5] = (byte)9;\n byteArray0[6] = (byte)99;\n byteArray0[7] = (byte) (-80);\n byteArray0[8] = (byte) (-51);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n frame0.inputLocals = intArray0;\n Item item0 = classWriter2.newClassItem(\"\");\n classWriter3.newLong(1);\n // Undeclared exception!\n try { \n frame0.execute(63, 2338, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-3081));\n ByteVector byteVector0 = new ByteVector(4);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2, \"/<pZ'q@6=nfTa}5<G9U\", \"7(I\\\"*\", \"/<pZ'q@6=nfTa}5<G9U\", \"7(I\\\"*\");\n Attribute attribute0 = new Attribute(\"`/5h{! 0@J?JAf\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(260);\n classWriter0.toByteArray();\n ClassWriter classWriter1 = new ClassWriter((-278));\n Frame frame1 = new Frame();\n Item item0 = classWriter1.key2;\n // Undeclared exception!\n try { \n frame0.execute(193, 980, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Item item1 = classWriter0.newLong((byte) (-99));\n Item item2 = new Item(189, item1);\n Item item3 = classWriter1.key3;\n Item item4 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(73, 10, classWriter1, item4);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n Type type0 = Type.CHAR_TYPE;\n classWriter0.visit(188, 3, \"SXFlGaXY\\\"E\", \"\", \"G4E?i<_\", (String[]) null);\n ClassWriter classWriter1 = new ClassWriter(185);\n MethodWriter methodWriter0 = classWriter0.firstMethod;\n Item item0 = classWriter1.newClassItem(\"Sensitive\");\n classWriter1.newLong(8);\n Item item1 = new Item(47, item0);\n byte[] byteArray0 = new byte[1];\n byteArray0[0] = (byte) (-99);\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"SXFlGaXY\\\"E\");\n classWriter1.toByteArray();\n ClassWriter classWriter2 = new ClassWriter(9);\n // Undeclared exception!\n try { \n frame0.execute(196, 267386880, classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n Item item0 = new Item(2);\n classWriter0.version = (-523);\n FileSystemHandling.shouldAllThrowIOExceptions();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"RunimeVisibleParaeterAnnotations\");\n String[] stringArray0 = new String[0];\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"RunimeVisibleParaeterAnnotations\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"AnnotationDefault\", \"AnnotationDefault\", \"RunimeVisibleParaeterAnnotations\", stringArray0, false, false);\n methodWriter0.visitMethodInsn(197, \"RunimeVisibleParaeterAnnotations\", \"RunimeVisibleParaeterAnnotations\", \"AnnotationDefault\");\n methodWriter0.visitMethodInsn(183, \"AnnotationDefault\", \"AnnotationDefault\", \"RunimeVisibleParaeterAnnotations\");\n int int0 = 4;\n // Undeclared exception!\n try { \n methodWriter0.visitFrame(4, 5, stringArray0, 188, stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test017() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1432);\n Type type0 = Type.BYTE_TYPE;\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(24, (-338), classWriter0, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "OOPExpectedException expect(Class<? extends Exception> expected);", "public static void test() throws Exception {\n\t}", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n // Undeclared exception!\n try { \n frame0.execute(184, 0, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2252));\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"Code\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"Code\";\n stringArray0[3] = \"Code\";\n stringArray0[4] = \"Code\";\n MethodWriter methodWriter0 = null;\n try {\n methodWriter0 = new MethodWriter(classWriter0, 1, \"\", \"\", \"Code\", stringArray0, true, false);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n Label label0 = new Label();\n label0.getFirst();\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(162);\n classWriter1.visitOuterClass(\"LNXn*Z.`tGd\\\"dR\", \"8}kxRrNjQ;\\\"/a\", (String) null);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(40);\n Item item0 = classWriter0.key2;\n Item item1 = new Item(2);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(60, (-345), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(131072);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(2, \"\", \"\", (String) null, \"\");\n Attribute attribute0 = new Attribute(\"\");\n fieldWriter0.visitAttribute(attribute0);\n ByteVector byteVector0 = classWriter0.pool;\n // Undeclared exception!\n try { \n fieldWriter0.put(byteVector0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048576);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n Item item0 = classWriter1.newFieldItem(\"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n MethodWriter methodWriter0 = classWriter1.lastMethod;\n classWriter1.lastMethod = null;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"QllX9_#%O~uxqo\");\n item0.strVal3 = \"qld m+eDWv\";\n // Undeclared exception!\n try { \n frame0.execute((-1044), (-3128), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2694);\n String string0 = \"\";\n MethodWriter methodWriter0 = null;\n try {\n methodWriter0 = new MethodWriter(classWriter0, (-2160), \"\", \"\", \"\", (String[]) null, true, true);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test132() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n int int0 = 184;\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"k58&{\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"org.apache.commons.io.filefilter.NameFileFilter\";\n stringArray0[5] = \"k58&{\";\n ClassWriter classWriter1 = new ClassWriter(184);\n Item item0 = classWriter0.key2;\n Item item1 = new Item((-2319));\n // Undeclared exception!\n try { \n frame0.execute(1, 184, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2463));\n classWriter0.newInteger((-2463));\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oW%6'2H,:}.eq\");\n classWriter0.newConst(\"oW%6'2H,:}.eq\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"double\";\n stringArray0[2] = \"oW%6'2H,:}.eq\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oW%6'2H,:}.eq\";\n stringArray0[6] = \"oW%6'2H,:}.eq\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"oc[MfnZM[~MHOK iO\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 3, \".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"double\", stringArray0, true, false);\n classWriter0.newNameTypeItem(\"~)yCTRxQ#s$y[Ly%\", \"Fj)3/|(;sZXz$\");\n Label label0 = new Label();\n int int0 = (-6307);\n methodWriter0.visitFrame(3, (-6307), stringArray0, (-2106), stringArray0);\n // Undeclared exception!\n try { \n methodWriter0.visitVarInsn((-2463), 1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2463\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(16777228);\n ClassWriter classWriter1 = new ClassWriter(2);\n Item item0 = classWriter0.newFieldItem(\"\", \"\", \"T~1S2uS7<aMtHqcUL\");\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame1.execute(154, 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test\n public void testDumpError() {\n \n class TestExceptions {\n \n int start(int a, int b) {\n return sum(a, b);\n }\n \n int sum(int a, int b) {\n int result;\n \n try {\n result = a + product(a, b);\n } catch (Exception e) {\n throw new IllegalArgumentException(\"3 descendant exception\", e);\n }\n \n return result;\n }\n \n int product(int a, int b) {\n int result;\n \n try {\n result = division(a, b) * b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"2 descendant exception\", e);\n }\n \n return result;\n }\n \n int division(int a, int b) {\n int result;\n \n try {\n result = a / b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"1 descendant exception\", e);\n }\n \n return result;\n }\n }\n \n try {\n TestExceptions test = new TestExceptions();\n test.start(1, 0);\n } catch (Throwable e) {\n ErrorContainer errorContainer = new ErrorContainer(e);\n \n StringWriter writer = new StringWriter();\n e.printStackTrace(new PrintWriter(writer));\n \n assertEquals(e.getClass().getName(), errorContainer.getClassName());\n assertEquals(e.getMessage(), errorContainer.getMessage());\n assertEquals(writer.toString(), errorContainer.getStackTrace());\n }\n \n }", "@CustomExceptionTest(ArithmeticException.class)\n public static void test5() {\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n classWriter0.index = 63485;\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 63485, \"O8\", \"\", \"O8\", \"O8\");\n ByteVector byteVector0 = classWriter0.pool;\n // Undeclared exception!\n fieldWriter0.put(byteVector0);\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2472);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2472, \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\");\n Attribute attribute0 = new Attribute(\"jyY)^e *Uz#>@n8v((\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2450));\n String string0 = \"9~\\\"GM0+ ?&-(JmN[0f.\";\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"`abrPw?i1\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"oc[MfnZM[~MHOK iO\", (String[]) null, false, false);\n Object object0 = new Object();\n classWriter0.newDouble((-2450));\n Item item0 = classWriter0.key3;\n // Undeclared exception!\n try { \n methodWriter0.visitFrame(1, 2, (Object[]) null, 2, (Object[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n String string0 = \"H\";\n classWriter0.addType(\"H\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n String string1 = \"Fj)3/|(;sZXz$\";\n boolean boolean0 = false;\n String string2 = null;\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"H\";\n stringArray0[1] = \"<inat>\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"<inat>\", \"Fj)3/|(;sZXz$\", (String) null, stringArray0, false, true);\n methodWriter0.visitVarInsn(191, (-1725718076));\n int int0 = 176;\n methodWriter0.visitInsn(176);\n Integer integer0 = new Integer(2);\n Label label0 = new Label();\n Label label1 = label0.successor;\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n // Undeclared exception!\n try { \n label0.visitSubroutine((Label) null, (-672L), 813);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"org.objectweb.asm.jip.Label\", e);\n }\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n ClassWriter classWriter0 = new ClassWriter((-1312));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"value \";\n stringArray0[1] = \"\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"\";\n stringArray0[5] = \"Ac\";\n stringArray0[6] = \"Zu.y \";\n stringArray0[7] = \"MI{W%eu4Z\";\n classWriter0.visit((-1048), 179, \"MI{W%eu4Z\", \"\", \"i&b}d$\", stringArray0);\n classWriter0.newClassItem(\"3U02Wj$(Z>8\");\n Item item0 = classWriter0.newLong(0);\n Item item1 = new Item(2, item0);\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(196, (-1312), classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter((-2826));\n classWriter0.visit(1872, 1048575, \"Sensitive\", \"\", \"\", (String[]) null);\n ClassWriter classWriter1 = new ClassWriter((-2077));\n MethodWriter methodWriter0 = classWriter1.firstMethod;\n classWriter0.lastMethod = null;\n classWriter0.newClassItem(\"\");\n Item item0 = classWriter0.newLong(0L);\n Item item1 = new Item(2, item0);\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)126;\n byteArray0[1] = (byte) (-85);\n byteArray0[2] = (byte) (-99);\n byteArray0[3] = (byte)11;\n byteArray0[4] = (byte)91;\n byteArray0[5] = (byte)91;\n byteArray0[6] = (byte) (-33);\n byteArray0[7] = (byte)74;\n byteArray0[8] = (byte)69;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"u;T>z)bm]K%a}Ta\");\n classWriter1.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(23, 1872, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(1);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"{uh\";\n stringArray0[5] = \"{uh\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"5A4qe@&:J-\\\"zg|\";\n stringArray0[5] = \"k58&{\";\n stringArray0[6] = \"i&b}d$\";\n stringArray0[7] = \"k58&{\";\n stringArray0[8] = \"i&b}d$\";\n Item item0 = classWriter1.newLong(16777221);\n Item item1 = new Item(184, item0);\n Item item2 = classWriter0.key3;\n // Undeclared exception!\n try { \n frame0.execute(199, 1, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(285212648);\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"\";\n stringArray0[1] = \"{uh\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"i&b}d$\";\n stringArray0[4] = \"{uh\";\n classWriter0.visit(285212648, 184, \"{uh\", \"i&b}d$\", \"\", stringArray0);\n classWriter0.newClassItem(\"The size must be non-negative\");\n Item item0 = classWriter0.newLong(1048575);\n Item item1 = new Item(159, item0);\n classWriter1.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(14, 14, classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n ClassWriter classWriter1 = new ClassWriter(1);\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BYTE_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(6);\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(13, 7, classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n Frame frame0 = new Frame();\n int int0 = 2196;\n ClassWriter classWriter0 = new ClassWriter(2196);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n int int1 = (-821);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\";\n stringArray0[1] = \"w{X;JM;Dl')dQG\";\n classWriter0.visit(1899, 496, \"5j#\", \"&l{u&egzGn.@\", \"\", stringArray0);\n ClassWriter classWriter2 = new ClassWriter(1);\n Item item0 = classWriter0.newClassItem(\"&l{u&egzGn.@\");\n Item item1 = classWriter1.newLong(1);\n Item item2 = new Item(158, item1);\n classWriter0.toByteArray();\n int int2 = 194;\n ClassWriter classWriter3 = new ClassWriter(194);\n // Undeclared exception!\n try { \n frame0.execute(64, 158, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Item item0 = classWriter1.newDouble((-1.0));\n ClassWriter classWriter2 = new ClassWriter(191);\n // Undeclared exception!\n try { \n frame0.execute(157, 22, classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.VOID_TYPE;\n Type type7 = Type.BOOLEAN_TYPE;\n Type type8 = Type.FLOAT_TYPE;\n Type type9 = Type.SHORT_TYPE;\n ClassWriter classWriter0 = new ClassWriter(9);\n Item item0 = classWriter0.key2;\n Item item1 = new Item((-1541));\n // Undeclared exception!\n try { \n frame0.execute(9, 0, (ClassWriter) null, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type0;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n ClassWriter classWriter0 = new ClassWriter(6);\n Item item0 = classWriter0.newLong(6);\n // Undeclared exception!\n try { \n frame0.execute(7, 5, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(159);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter1.newFieldItem(\"y])rS3DhfdTg\", \"y])rS3DhfdTg\", \"\");\n Item item0 = classWriter0.newLong(1);\n classWriter0.newLong(2);\n Item item1 = classWriter0.key2;\n // Undeclared exception!\n try { \n frame0.execute(159, 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n Label label0 = new Label();\n Label label1 = new Label();\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(162);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(40);\n Item item0 = classWriter0.key2;\n Item item1 = new Item(2);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(26, (-345), classWriter2, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048576);\n ClassWriter classWriter1 = new ClassWriter(285212630);\n Item item0 = classWriter1.newFieldItem(\"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\");\n classWriter1.toByteArray();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Frame frame1 = new Frame();\n classWriter0.visitField(1048576, \"%B\\\"F$,FHLc-:\", \"%B\\\"F$,FHLc-:\", \"u1;`1Jz{4~0\", (Object) null);\n // Undeclared exception!\n try { \n frame1.execute(191, 1, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(953);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 0, \"O8\", \"\", \"O8\", \"O8\");\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation((String) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test127() throws Throwable {\n Frame frame0 = new Frame();\n int int0 = 0;\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter0.visitSource(\"\", \"\");\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"\";\n stringArray0[1] = \"w{X;JM;Dl')dQG\";\n stringArray0[2] = \"w{X;JM;Dl')dQG\";\n classWriter1.visit((-821), 441, \"5j#\", \"5j#\", \"w{X;JM;Dl')dQG\", stringArray0);\n ClassWriter classWriter2 = new ClassWriter(1);\n classWriter1.newClassItem(\"\");\n Item item0 = classWriter1.newLong(2);\n Item item1 = new Item((-4709), item0);\n classWriter2.toByteArray();\n int int1 = (-1502);\n // Undeclared exception!\n try { \n frame0.execute((-1502), 0, classWriter2, item0);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter1.visitSource(\"n\", \"]\");\n int int0 = Frame.INTEGER;\n Item item0 = classWriter1.newInteger(4);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame1.execute(83, 4, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1790259326));\n classWriter0.newInteger((-2013884533));\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"LocalVariableTable\";\n stringArray0[1] = \"LocalVariableTable\";\n stringArray0[2] = \"cM6G}.\";\n stringArray0[3] = \"H\";\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2013884533), \"H\", \"cM6G}.\", \"cM6G}.\", stringArray0, false, false);\n methodWriter0.visitAnnotationDefault();\n // Undeclared exception!\n try { \n methodWriter0.visitLineNumber(1, (Label) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray0 = new int[5];\n intArray0[0] = 1;\n intArray0[1] = 2;\n intArray0[2] = 1;\n intArray0[3] = 0;\n intArray0[4] = 2;\n ClassWriter classWriter1 = new ClassWriter(0);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n ClassWriter classWriter2 = new ClassWriter(199);\n Item item0 = classWriter1.newLong(2);\n Type type0 = Type.VOID_TYPE;\n type0.getClassName();\n // Undeclared exception!\n try { \n frame0.execute(61, 184, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(285212630);\n Type type0 = Type.CHAR_TYPE;\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n type0.toString();\n Type[] typeArray0 = new Type[3];\n typeArray0[0] = type0;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"K,D*%TzaA!8;\");\n typeArray0[1] = type0;\n typeArray0[2] = type0;\n int[] intArray0 = new int[3];\n intArray0[0] = 1048575;\n intArray0[1] = 6;\n intArray0[2] = 7;\n frame0.inputStack = intArray0;\n frame0.initInputFrame(classWriter0, 9, typeArray0, 364);\n Item item0 = new Item();\n item0.set(1);\n item0.set(2649.52636);\n Frame frame1 = new Frame();\n frame0.merge(classWriter0, frame1, 1028);\n frame0.merge(classWriter0, frame1, 2);\n Type type1 = Type.INT_TYPE;\n // Undeclared exception!\n try { \n type0.getElementType();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2694);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2160), \"\", \"\", \"\", (String[]) null, false, false);\n // Undeclared exception!\n try { \n methodWriter0.visitMethodInsn(1, \"\", \"Qu&Dpe|l~l,7f={:f!\", (String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(441);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 441, \"N}o.<G8IO,,S#lU9s2Q\", \"N}o.<G8IO,,S#lU9s2Q\", \"N}o.<G8IO,,S#lU9s2Q\", \"N}o.<G8IO,,S#lU9s2Q\");\n Attribute attribute0 = new Attribute(\"N}o.<G8IO,,S#lU9s2Q\");\n fieldWriter0.visitAttribute(attribute0);\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Attribute\", e);\n }\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(32767);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"tE\";\n stringArray0[1] = \"tE\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 32767, \"&h'pH__a\", \"tE\", \"org.objectweb.asm.jip.Attribute\", stringArray0, false, false);\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 2, \"org.objectweb.asm.jip.Attribute\", \"_b}n0f['\", \"_b}n0f['\", stringArray0, false, false);\n Frame frame0 = new Frame();\n Label label0 = frame0.owner;\n MethodWriter methodWriter2 = classWriter0.firstMethod;\n methodWriter2.visitTypeInsn(262144, \"_b}n0f['\");\n methodWriter2.visitTypeInsn(1639, \"tE\");\n // Undeclared exception!\n try { \n methodWriter0.visitLocalVariable(\"tE\", \"tE\", \"org.objectweb.asm.jip.Attribute\", (Label) null, (Label) null, (-2699));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1790259326));\n Item item0 = new Item(1);\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"LocalVariableTable\";\n stringArray0[1] = \"LocalVariableTable\";\n stringArray0[2] = \"H\";\n stringArray0[3] = \"H\";\n FileSystemHandling.shouldAllThrowIOExceptions();\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1790259326), \"H\", \"Fj)3/|(;sZXz$\", \"LocalVariableTable\", stringArray0, false, true);\n methodWriter0.visitVarInsn(191, 1);\n methodWriter0.visitInsn(191);\n Integer integer0 = new Integer((-1790259326));\n Label label0 = new Label();\n Label label1 = label0.successor;\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n methodWriter0.visitJumpInsn(165, label0);\n // Undeclared exception!\n try { \n methodWriter0.visitLdcInsn(classWriter0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // value org.objectweb.asm.jip.ClassWriter@5\n //\n verifyException(\"org.objectweb.asm.jip.ClassWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n Frame frame0 = new Frame();\n EvoSuiteFile evoSuiteFile0 = null;\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.toByteArray();\n ClassWriter classWriter1 = new ClassWriter(1048575);\n Frame frame1 = new Frame();\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n Item item0 = classWriter0.newDouble((-1514));\n // Undeclared exception!\n try { \n frame1.execute((-181), 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test039() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(16777267);\n Class<Object> class0 = Object.class;\n Type.getType(class0);\n Type type0 = Type.BYTE_TYPE;\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, (String) null);\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"xzO!>TX45 #n,Nt&W\";\n classWriter0.visit(10, 3042, \"xzO!>TX45 #n,Nt&W\", \"xzO!>TX45 #n,Nt&W\", \"\", stringArray0);\n Class<Object> class1 = Object.class;\n Type.getInternalName(class1);\n Item item0 = classWriter0.newLong(10);\n Item item1 = new Item(158, item0);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\\\"Pm\\f^v\");\n Class<String> class2 = String.class;\n Type.getDescriptor(class2);\n // Undeclared exception!\n try { \n frame0.execute(16, 3, classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(description=\"Testing Report if Exception is Occurred (Throwing Exception Intentionally)\")\n\tpublic void test() {\n\t\tReporter.log(\"Running test Method from TC010 class\", true);\n\t\tthrow new IllegalStateException();\n\t}", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(162);\n classWriter0.toByteArray();\n Type type0 = Type.CHAR_TYPE;\n type0.toString();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[3];\n typeArray0[0] = type0;\n typeArray0[1] = type0;\n typeArray0[2] = type0;\n frame0.initInputFrame(classWriter0, 157, typeArray0, 4);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"zOfq\");\n ClassWriter classWriter1 = new ClassWriter(7);\n Frame frame1 = new Frame();\n frame0.merge(classWriter1, frame1, 3002);\n // Undeclared exception!\n try { \n frame1.merge(classWriter1, frame0, 0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1790259326));\n int int0 = (-2013884528);\n Item item0 = classWriter0.key;\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"H\";\n stringArray0[1] = \"H\";\n stringArray0[2] = \"cM6G}.\";\n stringArray0[3] = \"H\";\n String string0 = \"!`EadfDEPz-?X.0{\";\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"!`EadfDEPz-?X.0{\");\n classWriter0.newConst(\"cM6G}.\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1790259326), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"H\", stringArray0, true, false);\n Label label0 = new Label();\n // Undeclared exception!\n try { \n methodWriter0.visitJumpInsn((-2013884528), label0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2013884528\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n ByteVector byteVector0 = classWriter0.pool;\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The ar`ay of suffixe must ot be nul\", \"K#fT}Gl(X;x\", \"wheel.asm.MethodWriter\", (Object) null);\n byte[] byteArray0 = new byte[7];\n byteVector0.data = byteArray0;\n // Undeclared exception!\n try { \n fieldWriter0.getSize();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n }\n }" ]
[ "0.6716855", "0.66757256", "0.65256363", "0.64357257", "0.63761914", "0.6318617", "0.63160616", "0.6302777", "0.6285498", "0.6267788", "0.6256094", "0.6238078", "0.6235659", "0.6233495", "0.6229683", "0.6216009", "0.62150574", "0.6209174", "0.6196621", "0.61876", "0.6182865", "0.61696154", "0.6162455", "0.61341083", "0.613038", "0.6125804", "0.612573", "0.61179346", "0.61121386", "0.6089164", "0.6088714", "0.6087292", "0.6085962", "0.6065817", "0.6063555", "0.6057574", "0.6052319", "0.60376114", "0.6037496", "0.6036163", "0.60334396", "0.6027725", "0.602262", "0.6022581", "0.6021772", "0.6018352", "0.6014622", "0.59970427", "0.59956366", "0.599149", "0.5981008", "0.59758383", "0.59716475", "0.59709954", "0.59684366", "0.59607404", "0.59567136", "0.5956458", "0.5952845", "0.5952751", "0.59412545", "0.5937858", "0.5934621", "0.5934159", "0.59324247", "0.59294003", "0.59285", "0.5922964", "0.5922427", "0.5919505", "0.5915968", "0.5906569", "0.5900574", "0.58990043", "0.58787405", "0.5877299", "0.58740443", "0.5871751", "0.58660173", "0.58630854", "0.5852213", "0.585168", "0.58505124", "0.5849174", "0.5844195", "0.5842995", "0.58415204", "0.5837127", "0.5835678", "0.5822155", "0.5821818", "0.5813728", "0.58084387", "0.5808175", "0.5805858", "0.58033895", "0.5801505", "0.579122", "0.5788173", "0.5784204", "0.5771843" ]
0.0
-1
TODO Autogenerated method stub
public int getWidth() { return width; }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
public int getHeight() { return height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Created by alleyz on 2017/5/20 0020.
@Projection(name = "IdTeacher", types = TblTeacher.class) public interface Teacher { int getId(); String getUserCode(); String getLoginCode(); String getName(); String getSex(); String getDep(); String getBirthday(); String getEdu(); String getEntryTime(); String getPhone(); String getAddress(); String getPassword(); Integer getIsAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "public void mo38117a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void m50366E() {\n }", "private static void cajas() {\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}", "public void mo4359a() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void mo6081a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo21877s() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void interr() {\n\t}", "public void mo55254a() {\n }", "public void gored() {\n\t\t\n\t}", "public abstract void mo70713b();", "public void mo12930a() {\n }", "public void m23075a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo12628c() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "public abstract void mo56925d();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "private void m50367F() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo21779D() {\n }", "protected void mo6255a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void init() {\n\n\t}", "public void method_4270() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "static void feladat9() {\n\t}", "public void mo115190b() {\n }", "public void mo21825b() {\n }", "public void mo21878t() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo9848a() {\n }", "private final zzgy zzgb() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "static void feladat4() {\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo97908d() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n void init() {\n }", "public void mo21782G() {\n }", "public Pitonyak_09_02() {\r\n }", "public void mo21785J() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public final void mo91715d() {\n }", "public void mo23813b() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "static void feladat7() {\n\t}", "public void mo21793R() {\n }", "public void mo21787L() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "public void mo44053a() {\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 }", "void m1864a() {\r\n }", "@Override\n protected void initialize() {\n\n \n }", "public void mo1531a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo21791P() {\n }", "public void mo21794S() {\n }" ]
[ "0.5876914", "0.58446646", "0.5814295", "0.571806", "0.56330365", "0.56203175", "0.5619264", "0.5598179", "0.55643654", "0.55643654", "0.5535871", "0.5532638", "0.55072284", "0.5501122", "0.54911387", "0.5487997", "0.5487997", "0.5487997", "0.5487997", "0.5487997", "0.5487997", "0.5487997", "0.5464344", "0.54446733", "0.54419494", "0.5412448", "0.5399644", "0.5373221", "0.53718466", "0.53698146", "0.5367681", "0.5361775", "0.5354209", "0.5354182", "0.53476", "0.5341392", "0.5322286", "0.5317696", "0.5315139", "0.5313128", "0.5311813", "0.5297867", "0.5294873", "0.52933896", "0.529145", "0.5287036", "0.52840817", "0.5280927", "0.5277868", "0.52717286", "0.52717286", "0.52717286", "0.52717286", "0.52717286", "0.5270844", "0.5269712", "0.5267178", "0.5263223", "0.526207", "0.52615285", "0.525835", "0.5258119", "0.52578145", "0.52557755", "0.5243558", "0.5236479", "0.5235246", "0.52302235", "0.522985", "0.52257675", "0.52229166", "0.52189165", "0.5216285", "0.52161944", "0.5213966", "0.52136374", "0.52096885", "0.52077156", "0.52057505", "0.5203906", "0.52032", "0.5181332", "0.51810443", "0.5178165", "0.5170686", "0.51656413", "0.51656413", "0.51653564", "0.51637423", "0.5162606", "0.5162606", "0.5162606", "0.5162606", "0.5162606", "0.5162606", "0.5162421", "0.5161997", "0.5160725", "0.515874", "0.5154067", "0.5151068" ]
0.0
-1
Array that stores the main menu
public static void main(String[] args) { String [] mainMenu = {"Main Menu", "Search", "Stats", "Spells", "Bag", "Quests", "Shop", "Test", "Exit"}; //Array that stores the shop menu String [] shopMenu = {"Shop Menu", "Buy", "Sell", "Exit"}; //Array that stores the battle menu String [] battleMenu = {"Battle Menu", "Attack", "Run"}; //Array that stores the bag menu String [] bagMenu = {"Bag Menu", "Equip", "Use", "Exit"}; //Array that stores the spell menu String [] spellMenu = {"Spell Menu", "Exit"}; //Array that stores the stat menu String [] statMenu = {"Stat Menu", "Allocate Stats", "Exit"}; //Array that stores the quest menu String [] questMenu = {"Quest Menu", "Check", "Exit"}; //Array that stores the allocate stat menu String [] allocateStatMenu = {"Allocate Stats Menu", "Strength", "Intelligence", "Vitality", "Cancel"}; //Array that stores the blue moon city menu String [] blueMoonMenu = {"Blue Moon City", "General Goods", "Blacksmith", "Magic Shop", "Guild", "Exit"}; //Array that holds the blue moon general menu String [] blueMoonGeneralMenu = {"Blue Moon General Goods", "Buy", "Sell", "Exit"}; //Array that stores the blue moon blacksmith menu String [] blueMoonBlacksmithMenu = {"Blue Moon Blacksmith", "Buy", "Sell", "Exit"}; //Array that stores the blue moon guild menu String [] blueMoonGuildMenu = {"Blue Moon Guild", "Accept", "Drop", "Turn-In", "Exit"}; //Variable for the user choice String userChoice; Random rand = new Random(); //Variable to keep the program running Boolean done = false; //Instantiates the player player player1 = new player(); //Gets the player's character name player1.setPlayerName(getUserName()); //Loop that keeps the program running until exited while(!done){ //Variable for the level up loop Boolean doneLevel = false; //Calculates the players defense player1.setTotalDefense(playerTotalDefense(player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerGloves(), player1.getPlayerBoots(), player1.getPlayerDefense())); //Calculates the players attack player1.setTotalAttack(playerTotalAttack(player1.getPlayerWeapon(), player1.getPlayerAttack(), player1.getStrength())); //Checks to see if they player has leveled up while(!doneLevel){ if(player1.getPlayerExperience() > (player1.getPlayerLevel() * 100)){ //Increases the player's level by 1 player1.setPlayerLevel(levelUp(player1.getPlayerLevel())); //Subtracts the experience for the level up player1.setPlayerExperience((player1.getPlayerExperience() - ((player1.getPlayerLevel() - 1) * 100))); //Adds a stat point upon level up player1.setStatPoints(gainStatPoints(player1.getStatPoints())); //Fully heals the player player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth()); //Fully restores the players mp player1.setCurrentMP(player1.getMaxMP()); }else{ doneLevel = true; } } //Array that stores the player's stats Object [] playerStats = {player1.getPlayerName(), player1.getPlayerLevel(), player1.getPlayerExperience(), player1.getPlayerCurrentHealth(), player1.getPlayerMaxHealth(), player1.getCurrentMP(), player1.getMaxMP(), player1.getTotalAttack(), player1.getTotalDefense(), player1.getStrength(), player1.getIntelligence(), player1.getVitality(), player1.getStatPoints(), player1.getPlayerGold()}; //Displays the main menu and gets the user decision userChoice = getUserChoice(mainMenu); //Determines the next course of action switch(userChoice){ //****************************************************************************************************************************** //Starts the battle sequence case "1": //Boolean for the battle sequence Boolean battle = true; //Variable to hold the item dropped after monster death String loot; //Variable to hold which encounter was picked String encounterHolder; //Holds the encounter encounterHolder = encounter(player1.getPlayerLevel()); switch(encounterHolder){ //****************************************************************************************************************************** //Found a skeleton case "Skeleton": //Instantiates a skeleton skeleton Skeleton = new skeleton(); //Scales skeleton max health based on player level Skeleton.setSkeletonMaxHealth(skeletonHealthScale(Skeleton.getSkeletonMaxHealth(), player1.getPlayerLevel())); //Puts the skeleton at full health Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonMaxHealth()); //Scales skeleton attack based on player level Skeleton.setSkeletonAttack(skeletonAttackScale(Skeleton.getSkeletonAttack(), player1.getPlayerLevel())); //Starts the battle loop while(battle){ //Displays the battle menu userChoice = getUserChoice(battleMenu); //Checks the user decision switch(userChoice){ //****************************************************************************************************************************** //Attack option case "1": //Lists the potential attacks the player can make System.out.println("\t1) Basic Attack"); for(int i = 0; i < player1.getSpellList().length; i++){ if(player1.spellList[i].equals("")){ break; }else{ System.out.println("\t" + (i + 2) + ") " + player1.spellList[i]); } } //Gets the user decision userChoice = getUserInput("What attack do you want to do? \n(Type the name of the attack)"); switch(userChoice){ //****************************************************************************************************************************** //Basic Attack option case "Basic Attack": //Calculates the remaining health of the skeleton Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense())); //Tells the user how much damage they dealt to the skeleton System.out.println("You dealt " + playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense()) + " damage to the Skeleton!"); //Tells the user how much health the skeleton has remaining System.out.println("The Skeleton has " + Skeleton.getSkeletonCurrentHealth() + "/" + Skeleton.getSkeletonMaxHealth() + " health left!"); //Basic Attack break break; //****************************************************************************************************************************** //Fireball option case "Fireball": //Creates fireball spell fireball Fireball = new fireball(); //Calculates the fireball damage and calculates the skeleton health after taking damage Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel())); //Tells the player how much damage they dealt System.out.println("You dealt " + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + " damage with Fireball to the Skeleton"); //Tells the user how much health the skeleton has remaining System.out.println("The Skeleton has " + Skeleton.getSkeletonCurrentHealth() + "/" + Skeleton.getSkeletonMaxHealth() + " health left!"); //Reduces the players mp player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel())); //Fireball break break; default: System.out.println("Invalid option. Try again."); } //****************************************************************************************************************************** //Calculates the remaining health of the player player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense())); //Tells the player how much damage the skeleton dealto to the player System.out.println("The Skeleton dealt " + monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense()) + " damage to you!"); //Tells the user how much health they have left System.out.println("You have " + player1.getPlayerCurrentHealth() + "/" + player1.getPlayerMaxHealth() + " health left!"); System.out.println("You have " + player1.getCurrentMP() + "/" + player1.getMaxMP() + " MP"); //****************************************************************************************************************************** //Checks if skeleton is dead if(Skeleton.getSkeletonCurrentHealth() <= 0){ //Ends the battle while loop battle = false; //Tells the user they have killed the enemy System.out.println("You have killed the Skeleton!"); //Tells the user how much gold they gained System.out.println("You gained " + Skeleton.getSkeletonGoldDropped() + " gold"); //Adds the gold to the users gold amount player1.setPlayerGold(player1.getPlayerGold() + skeletonGoldScale(Skeleton.getSkeletonGoldDropped(), player1.getPlayerLevel())); //Tells the user how much experience they have gained System.out.println("You gain " + Skeleton.getSkeletonExperience() + " experience!"); //Calculates the player's experience player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Skeleton.getSkeletonExperience())); //Function is called to determine the item dropped and stores it in variable loot = itemDrop(rand.nextInt(5)); //Checks to see if an item was actually dropped if(loot.equals("")){ //Tells the user that no item was dropped System.out.println("No item dropped."); }else{ //Places the item in the first open space in the player's inventory player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag())); //Tells the user which item they god System.out.println("You got: " + loot + "!"); } } //****************************************************************************************************************************** //Checks if the player has died if(player1.getPlayerCurrentHealth() <= 0){ System.out.println("You have died"); //Exits the battle sequence battle = false; //Ends the game done = true; } //Attack option 1 break break; //****************************************************************************************************************************** //Run option case "2": //Runs from the battle and goes back to the main menu System.out.println("You have fled from the " + encounterHolder); //Ends the battle sequence battle = false; //Run option 2 break break; default: System.out.println("Invalid option. Try again."); } } //Skeleton encounter break break; //****************************************************************************************************************************** //Devil encounter case "Devil": //Creates a devil devil Devil = new devil(); //Scales skeleton max health based on player level Devil.setDevilMaxHealth(devilHealthScale(Devil.getDevilMaxHealth(), player1.getPlayerLevel())); //Puts the skeleton at full health Devil.setDevilCurrentHealth(Devil.getDevilMaxHealth()); //Scales skeleton attack based on player level Devil.setDevilAttack(devilAttackScale(Devil.getDevilAttack(), player1.getPlayerLevel())); //Starts the battle loop while(battle){ //Displays the battle menu userChoice = getUserChoice(battleMenu); //Checks the user decision switch(userChoice){ //****************************************************************************************************************************** //Attack option case "1": //Lists the potential attacks the player can make System.out.println("\t1) Basic Attack"); for(int i = 0; i < player1.getSpellList().length; i++){ if(player1.spellList[i].equals("")){ break; }else{ System.out.println("\t" + (i + 2) + ") " + player1.spellList[i]); } } //Gets the user decision userChoice = getUserInput("What attack do you want to do? \n(Type the name of the attack)"); switch(userChoice){ //****************************************************************************************************************************** //Basic Attack option case "Basic Attack": //Calculates the remaining health of the devil Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense())); //Tells the user how much damage they dealt to the devil System.out.println("You dealt " + playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense()) + " damage to the Devil!"); //Tells the user how much health the devil has remaining System.out.println("The Devil has " + Devil.getDevilCurrentHealth() + "/" + Devil.getDevilMaxHealth() + " health left!"); //Basic Attack break break; //****************************************************************************************************************************** //Fireball option case "Fireball": //Creates fireball spell fireball Fireball = new fireball(); //Calculates the fireball damage and calculates the devil health after taking damage Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel())); //Tells the user how much health the devil has remaining System.out.println("The Devil has " + Devil.getDevilCurrentHealth() + "/" + Devil.getDevilMaxHealth() + " health left!"); //Tells the player how much damage they dealt System.out.println("You dealt " + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + " damage with Fireball to the Devil"); //Reduces the players mp player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel())); //Fireball break break; default: System.out.println("Invalid option. Try again."); } //****************************************************************************************************************************** //Calculates the remaining health of the player player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense())); //Tells the player how much damage the devil dealt to the player System.out.println("The Devil dealt " + monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense()) + " damage to you!"); //Tells the user how much health they have left System.out.println("You have " + player1.getPlayerCurrentHealth() + "/" + player1.getPlayerMaxHealth() + " health left!"); System.out.println("You have " + player1.getCurrentMP() + "/" + player1.getMaxMP() + " MP"); //****************************************************************************************************************************** //Checks if the devil died if(Devil.getDevilCurrentHealth() <= 0){ //Ends the battle while loop battle = false; //Tells the user they have killed the enemy System.out.println("You have killed the Devil!"); //Tells the user how much gold they gained System.out.println("You gained " + Devil.getDevilGold() + " gold"); //Adds the gold to the users gold amount player1.setPlayerGold(player1.getPlayerGold() + devilGoldScale(Devil.getDevilGold(), player1.getPlayerLevel())); //Tells the user how much experience they have gained System.out.println("You gain " + Devil.getDevilExperience() + " experience!"); //Calculates the player's experience player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Devil.getDevilExperience())); //Function is called to determine the item dropped and stores it in variable loot = itemDrop(rand.nextInt(5)); //Checks to see if an item was actually dropped if(loot.equals("")){ //Tells the user that no item was dropped System.out.println("No item dropped."); }else{ //Places the item in the first open space in the player's inventory player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag())); //Tells the user which item they god System.out.println("You got: " + loot + "!"); } } //****************************************************************************************************************************** //Checks if the player has died if(player1.getPlayerCurrentHealth() <= 0){ System.out.println("You have died"); //Exits the battle sequence battle = false; //Ends the game done = true; } //Attack option break break; //****************************************************************************************************************************** //Run option case "2": //Runs from the battle and goes back to the main menu System.out.println("You have fled from the " + encounterHolder); //Ends the battle sequence battle = false; //Run option 2 break break; default: System.out.println("Invalid option. Try again."); } } //Devil encounter break break; //****************************************************************************************************************************** case "Blue Moon City": Boolean visit = false; while(!visit){ userChoice = getUserChoice(blueMoonMenu); switch(userChoice){ //****************************************************************************************************************************** //General Goods option case "1": blueMoonGeneralGoods BlueMoonGeneral = new blueMoonGeneralGoods(); //Creates healing potion healingPotion HealingPotion = new healingPotion(); //Creates greater healing potion greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion(); //Populates the shopkeeper's inventory with items BlueMoonGeneral.setInventory(populateBlueMoonGeneral(BlueMoonGeneral.getInventory())); //Displays the shop menu and asks the player what they want to do userChoice = getUserChoice(blueMoonGeneralMenu); //Variable for shop loop Boolean shopExit = false; while(!shopExit){ switch(userChoice){ //****************************************************************************************************************************** //Buy Item case "1": //Diplays the shop keeper inventory displayShopInventory(BlueMoonGeneral.getInventory()); //Gets what item the user wants to buy String buyChoice = getUserInput("What item do you want to buy? \n(Type the name of the item)"); switch(buyChoice){ //****************************************************************************************************************************** //Buy Healing Potion case "Healing Potion": //Checks to see if the player has the gold to buy the healing potion if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){ //Subtracts the price of the healing potion from the player's gold total player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice()); //Puts the healing potion in the player's bag player1.setPlayerBag(placeInBag("Healing Potion", player1.playerBag)); //Tells the player they bought a healing potion System.out.println("You bought Healing Potion"); //Quits the shop shopExit = true; //Healing Potion option break break; //If the player doesnt have the gold to buy a healing potino }else if(buyChoice.equals("Healing Potion") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){ //Tells the player they dont have the gold to buy a healing player System.out.println("You do not have the gold to buy that item!"); //Quits the shop shopExit = true; //Healing Potion option break break; } //****************************************************************************************************************************** //Buy Greater Healing Potion case "Greater Healing Potion": //Checks to see if the player has the gold to buy a greater healing potion if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){ //Subtracts the price of the greater healing potino from the players gold total player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice()); //Places the greater healing potion in the players bag player1.setPlayerBag(placeInBag("Greater Healing Potion", player1.playerBag)); //Tells the player they bought a greater healing potion System.out.println("You bought Greater Healing Potion"); //Quits the shop shopExit = true; //Greater Healing Potion option break break; //If they player doesnt have the gold to buy a greater healing potion }else if(buyChoice.equals("Greater Healing Potion") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){ //Tells the player they dont have the gold to buy a greater healing potion System.out.println("You do not have the gold to buy that item!"); //Quits the shop shopExit = true; //Greater Healing Potion option break break; } case "Exit": shopExit = true; break; default: System.out.println("Invalid option. Try again."); } //Buy option 1 break break; //****************************************************************************************************************************** //Sell Item case "2": //Variable to hold which item is being sold String itemSold; //Displays the items in the bag and asks for which item to sell itemSold = displayItemFromBag(player1.playerBag, "Sell"); //Adds the value of the sold item to the player's gold player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold)); //Removes the sold item from the player's bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold)); //Tells the player which item they sold and how much gold they gained System.out.println("You sold: " + itemSold); System.out.println("You gained: " + sellGold(itemSold) + " gold"); shopExit = true; //Sell option 2 break break; //****************************************************************************************************************************** //Exit Item case "3": shopExit = true; //Sell option 3 break break; default: System.out.println("Invalid option. Try again."); shopExit = true; break; } } //Blue Moon General Goods option 1 break break; //****************************************************************************************************************************** //Blacksmith option case "2": blueMoonBlacksmith BlueMoonBlacksmith = new blueMoonBlacksmith(); //Creates iron helmet ironHelmet IronHelmet = new ironHelmet(); //Creates iron chest plate ironChestPlate IronChestPlate = new ironChestPlate(); //Creates iron gloves ironGloves IronGloves = new ironGloves(); //Creates iron boots ironBoots IronBoots = new ironBoots(); //Populates the shopkeeper's inventory with items BlueMoonBlacksmith.setInventory(populateBlueMoonBlacksmith(BlueMoonBlacksmith.getInventory())); //Displays the shop menu and asks the player what they want to do displayShopInventory(BlueMoonBlacksmith.getInventory()); userChoice = getUserChoice(blueMoonBlacksmithMenu); //Variable for shop loop Boolean blacksmithExit = false; while(!blacksmithExit){ switch(userChoice){ //****************************************************************************************************************************** //Buy Item case "1": //Diplays the blacksmith inventory displayShopInventory(BlueMoonBlacksmith.getInventory()); //Gets what item the user wants to buy String buyChoice = getUserInput("What item do you want to buy? \n(Type the name of the item)"); switch(buyChoice){ //****************************************************************************************************************************** //Buy Iron Helmet case "Iron Helmet": //Checks to see if the player has the gold to buy the iron helmet if(player1.getPlayerGold() >= IronHelmet.getBuyPrice()){ //Subtracts the price of the iron helmet from the player's gold total player1.setPlayerGold(player1.getPlayerGold() - IronHelmet.getBuyPrice()); //Puts the iron helmet in the player's bag player1.setPlayerBag(placeInBag("Iron Helmet", player1.playerBag)); //Tells the player they bought a iron helmet System.out.println("You bought Iron Helmet"); //Quits the shop blacksmithExit = true; //Iron Helmet option break break; //If the player doesnt have the gold to buy a iron helmet }else if(buyChoice.equals("Iron Helmet") && (player1.getPlayerGold() < IronHelmet.getBuyPrice())){ //Tells the player they dont have the gold to buy a iron helmet System.out.println("You do not have the gold to buy that item!"); //Quits the shop blacksmithExit = true; //Healing Potion option break break; } //****************************************************************************************************************************** //Buy Iron Chest Plate case "Iron Chest Plate": //Checks to see if the player has the gold to buy a iron boots if(player1.getPlayerGold() >= IronChestPlate.getBuyPrice()){ //Subtracts the price of the iron chest plate from the players gold total player1.setPlayerGold(player1.getPlayerGold() - IronChestPlate.getBuyPrice()); //Places the iron chest plate in the players bag player1.setPlayerBag(placeInBag("Iron Chest Plate", player1.playerBag)); //Tells the player they bought a iron chest plate System.out.println("You bought Iron Chest Plate"); //Quits the shop blacksmithExit = true; //Iron Boots option break break; //If they player doesnt have the gold to buy a iron chest plate }else if(buyChoice.equals("Iron Chest Plate") && (player1.getPlayerGold() < IronChestPlate.getBuyPrice())){ //Tells the player they dont have the gold to buy a iron chest plate System.out.println("You do not have the gold to buy that item!"); //Quits the shop blacksmithExit = true; //Iron Chest Plate option break break; } //Buy iron boots case "Iron Boots": //Checks to see if the player has the gold to buy a iron boots if(player1.getPlayerGold() >= IronBoots.getBuyPrice()){ //Subtracts the price of the iron boots from the players gold total player1.setPlayerGold(player1.getPlayerGold() - IronBoots.getBuyPrice()); //Places the iron boots in the players bag player1.setPlayerBag(placeInBag("Iron Boots", player1.playerBag)); //Tells the player they bought a iron boots System.out.println("You bought Iron Boots"); //Quits the shop blacksmithExit = true; //Iron Boots option break break; //If they player doesnt have the gold to buy a iron boots }else if(buyChoice.equals("Iron Boots") && (player1.getPlayerGold() < IronBoots.getBuyPrice())){ //Tells the player they dont have the gold to buy a iron boots System.out.println("You do not have the gold to buy that item!"); //Quits the shop blacksmithExit = true; //Iron Boots option break break; } case "Iron Gloves": //Checks to see if the player has the gold to buy a iron gloves if(player1.getPlayerGold() >= IronGloves.getBuyPrice()){ //Subtracts the price of the iron gloves from the players gold total player1.setPlayerGold(player1.getPlayerGold() - IronGloves.getBuyPrice()); //Places the iron gloves in the players bag player1.setPlayerBag(placeInBag("Iron Gloves", player1.playerBag)); //Tells the player they bought a iron gloves System.out.println("You bought Iron Gloves"); //Quits the shop blacksmithExit = true; //Iron Gloves option break break; //If they player doesnt have the gold to buy a iron gloves }else if(buyChoice.equals("Iron Gloves") && (player1.getPlayerGold() < IronGloves.getBuyPrice())){ //Tells the player they dont have the gold to buy a iron gloves System.out.println("You do not have the gold to buy that item!"); //Quits the shop blacksmithExit = true; //Iron Chest Plate option break break; } default: System.out.println("Invalid option. Try again."); break; } //Buy option 1 break break; //****************************************************************************************************************************** //Sell Item case "2": //Variable to hold which item is being sold String itemSold; //Displays the items in the bag and asks for which item to sell itemSold = displayItemFromBag(player1.playerBag, "Sell"); //Adds the value of the sold item to the player's gold player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold)); //Removes the sold item from the player's bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold)); //Tells the player which item they sold and how much gold they gained System.out.println("You sold: " + itemSold); System.out.println("You gained: " + sellGold(itemSold) + " gold"); blacksmithExit = true; //Sell option 2 break break; //****************************************************************************************************************************** //Exit Item case "3": blacksmithExit = true; //Sell option 3 break break; default: System.out.println("Invalid option. Try again."); blacksmithExit = true; break; } } //Blue Moon Blacksmith option 1 break break; //****************************************************************************************************************************** //Magic Shop option case "3": //Blue Moon Magic Shop option 3 break break; //****************************************************************************************************************************** //Guild option case "4": blueMoonGuild BlueMoonGuild = new blueMoonGuild(); //Populates the shopkeeper's inventory with items BlueMoonGuild.setQuestList(populateBlueMoonGuild(BlueMoonGuild.getQuestList())); //Displays the guild menu and asks the player what they want to do userChoice = getUserChoice(blueMoonGuildMenu); //Variable for guild loop Boolean guildExit = false; while(!guildExit){ switch(userChoice){ //****************************************************************************************************************************** //Accept Quest case "1": displayQuestList(BlueMoonGuild.getQuestList()); String questChoice = getUserInput("What quest do you want to accept? Type in the name of the quest."); switch(questChoice){ case "Kill Skeletons": player1.setQuestList(placeQuest(player1.getQuestList(), "Kill Skeletons")); System.out.println("You have accepted the quest: Kill Skeletons"); guildExit = true; break; } //Accept quest option 1 break break; //****************************************************************************************************************************** //Drop Quest case "2": //Drop quest option 2 break break; //****************************************************************************************************************************** //Turn in quest option case "3": break; case "4": guildExit = true; break; default: System.out.println("Invalid option. Try again."); break; } } //Blue Moon Magic Shop option 4 break break; //****************************************************************************************************************************** //Exit option case "5": visit = true; //Blue Moon Exit option 5 break break; default: System.out.println("Invalid option. Try again."); } } //Blue Moon Encounter break; break; default: //Encounter break break; } //Search option 1 break break; //****************************************************************************************************************************** //Starts the stats sequence case "2": //Displays the player stats displayPlayerStats(playerStats, player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerWeapon(), player1.getPlayerGloves(), player1.getPlayerBoots()); userChoice = getUserChoice(statMenu); switch(userChoice){ //****************************************************************************************************************************** //Allocate Stats option case "1": userChoice = getUserChoice(allocateStatMenu); switch(userChoice){ //****************************************************************************************************************************** //Add Strength case "1": //Checks to see if the player has a stat point to spend if(player1.getStatPoints() > 0){ //Removes stat point player1.setStatPoints(removeStatPoints(player1.getStatPoints())); //Increases strength by 1 player1.setStrength(gainStrength(player1.getStrength())); }else{ //Tells the player they dont have any stat points to spend System.out.println("You don't have any stat points to allocate."); } //Strength option 1 break break; //****************************************************************************************************************************** //Add Intelligence case "2": //Checks to see if the player has a stat point to spend if(player1.getStatPoints() > 0){ //Removes stat point player1.setStatPoints(removeStatPoints(player1.getStatPoints())); //Increases intelligence by 1 player1.setIntelligence(gainIntelligence(player1.getIntelligence())); //Increases the players max mp based on intelligence player1.setMaxMP(maxMp(player1.getMaxMP())); }else{ //Tells the player they dont have any stat points to spend System.out.println("You don't have any stat points to allocate."); } //Intelligence option 2 break break; //****************************************************************************************************************************** //Add Vitality case "3": //Checks to see if the player has a stat point to spend if(player1.getStatPoints() > 0){ //Removes stat point player1.setStatPoints(removeStatPoints(player1.getStatPoints())); //Increases vitality by 1 player1.setVitality(gainVitality(player1.getVitality())); //Increases the players max health base on vitality player1.setPlayerMaxHealth(maxHealth(player1.getPlayerMaxHealth())); }else{ //Tells the player they dont have any stat points to spend System.out.println("You don't have any stat points to allocate."); } //Vitality opion 3 break break; //****************************************************************************************************************************** //Cancel case "4": //Cancel option 4 break break; default: System.out.println("Invalid option. Try again."); } //Allocate stats option 1 break break; //****************************************************************************************************************************** //Exits the stat menu case "2": //Exit option 2 break break; default: System.out.println("Invalid option. Try again."); } //Stats option 2 break break; //****************************************************************************************************************************** case "3": //Variable to store spell exit Boolean spellExit = false; //Loop to display spell list while(!spellExit){ //Display spell list displayBag(player1.getSpellList()); //Get user choice userChoice = getUserChoice(spellMenu); switch(userChoice){ //Exit option case "1": spellExit = true; //Exit option 1 break break; default: System.out.println("Invalid option. Try again."); } } //Spells option 3 break break; //****************************************************************************************************************************** //Starts the bag sequence case "4": //Variable for the bag sequence Boolean bagExit = false; //Variable to hold which item to equip String itemChosen; //Variable to hold which item was in the equipment slot String previousItem; //Enters the bag sequence based on user response while(!bagExit){ //Displays the player's bag displayBag(player1.getPlayerBag()); //Displays the bag menu userChoice = getUserChoice(bagMenu); //Checks user choice switch(userChoice){ //Equip an item sequence case "1": //Runs function to choose an item to equip itemChosen = displayItemFromBag(player1.playerBag, "Equip"); //Checks which item was chosen to equip switch(itemChosen){ //****************************************************************************************************************************** //If helmet was chosen to equip case "Leather Helmet": //Checks to see if a helmet is already equipped if(!player1.playerHelmet[0].equals("")){ //Puts the already equipped item in a variable previousItem = player1.playerHelmet[0]; //Puts the previously equipped item into the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerHelmet[0] = itemChosen; //Removes the newly equipped item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the item chosen player1.playerHelmet[0] = itemChosen; //Removes the item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Leather Helmet"); //Helmet option break break; //****************************************************************************************************************************** //If chest player was chosen to equip case "Leather Chest Plate": //Checks to see if a chest plate is already equipped if(!player1.playerChestPlate[0].equals("")){ //Puts the already equipped item in a variable previousItem = player1.playerChestPlate[0]; //Puts the previously equipped item into the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerChestPlate[0] = itemChosen; //Removes the newly equipped item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the item chosen player1.playerChestPlate[0] = itemChosen; //Removes the item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Leather Chest Plate"); //Chest Plate option break break; //****************************************************************************************************************************** //If short sword was chosen to equip case "Short Sword": //Checks to see if a weapon is already equipped if(!player1.playerWeapon[0].equals("")){ //Puts the already equipped item in a variable previousItem = player1.playerWeapon[0]; //Puts the previously equipped item into the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerWeapon[0] = itemChosen; //Removes the newly equipped item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the item chosen player1.playerWeapon[0] = itemChosen; //Removes the item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Short Sword"); //Short Sword option break break; //****************************************************************************************************************************** //If long sword was chosen to equip case "Long Sword": //Checks to see if a weapon is already equipped if(!player1.playerWeapon[0].equals("")){ //Puts the equipped item in a variable previousItem = player1.playerWeapon[0]; //Places the previous equipped item in the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerWeapon[0] = itemChosen; //Removes the new item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the selected item player1.playerWeapon[0] = itemChosen; //Removes the selected item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Long Sword"); //Long Sword option break break; //****************************************************************************************************************************** //If great sword was selected case "Great Sword": //Checks to see if a weapon is already equipped if(!player1.playerWeapon[0].equals("")){ //Puts the equipped item in a variable previousItem = player1.playerWeapon[0]; //Places the previous equipped item in the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerWeapon[0] = itemChosen; //Removes the new item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the selected item player1.playerWeapon[0] = itemChosen; //Removes the selected item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped GreatSword"); //Great Sword option break break; //****************************************************************************************************************************** //If iron helmet was selected case "Iron Helmet": //Checks to see if a helmet is already equipped if(!player1.playerHelmet[0].equals("")){ //Puts the equipped item in a variable previousItem = player1.playerHelmet[0]; //Places the previous equipped item in the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerHelmet[0] = itemChosen; //Removes the new item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the selected item player1.playerHelmet[0] = itemChosen; //Removes the selected item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Iron Helmet"); //Iron Helmet option break break; //****************************************************************************************************************************** //If iron chest plate was selected case "Iron Chest Plate": //Checks to see if a chest plate is already equipped if(!player1.playerChestPlate[0].equals("")){ //Puts the equipped item in a variable previousItem = player1.playerChestPlate[0]; //Places the previous equipped item in the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerChestPlate[0] = itemChosen; //Removes the new item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the selected item player1.playerChestPlate[0] = itemChosen; //Removes the selected item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Iron Chest Plate"); //Iron Chest Plate option break break; //****************************************************************************************************************************** //If iron boots was selected case "Iron Boots": //Checks to see if a boots is already equipped if(!player1.playerBoots[0].equals("")){ //Puts the equipped item in a variable previousItem = player1.playerBoots[0]; //Places the previous equipped item in the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerBoots[0] = itemChosen; //Removes the new item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the selected item player1.playerBoots[0] = itemChosen; //Removes the selected item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Iron Boots"); //Iron Boots option break break; //****************************************************************************************************************************** //If iron gloves was selected case "Iron Gloves": //Checks to see if a gloves is already equipped if(!player1.playerGloves[0].equals("")){ //Puts the equipped item in a variable previousItem = player1.playerGloves[0]; //Places the previous equipped item in the bag player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag())); //Equips the new item player1.playerGloves[0] = itemChosen; //Removes the new item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If no item was already equipped }else{ //Equips the selected item player1.playerGloves[0] = itemChosen; //Removes the selected item from the bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); } //Tells the player the item was equipped System.out.println("You equipped Iron Gloves"); //Iron Gloves option break break; //****************************************************************************************************************************** case "Exit": //Exit option break break; default: System.out.println("Invalid option. Try again."); } //Equip option 1 break break; //****************************************************************************************************************************** //Use Item case "2": //Displays the useable items from the bag itemChosen = displayItemFromBag(player1.playerBag, "Use"); switch(itemChosen){ //****************************************************************************************************************************** //Use healing potion case "Healing Potion": //Creates a healing potion healingPotion HealingPotion = new healingPotion(); //Checks to see if the player is injured if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){ //Tells the player they used a healing potion System.out.println("You used " + itemChosen); //Removes the healing potion from the players bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //Checks if the players missing health is less than the health restored by the healing potion if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < HealingPotion.getHealthGained())){ //Tells the player how much health they gained System.out.println("You gained " + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + " health"); //Sets the players health to max player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth()); //If the players missing health is greater than the health restored by the healing potion }else{ //Tells the player how much health they gained System.out.println("You gained " + HealingPotion.getHealthGained() + " health"); //Restores the players health by the amount given by the healing potion player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + HealingPotion.getHealthGained()); } //If you are not injured }else{ //Tells the player they cannot use a healing potion System.out.println("You are at full health and cannot use that item"); } //Healing Potion option break break; //****************************************************************************************************************************** //Use Greater Healing Potion case "Greater Healing Potion": //Creates a greater healing potion greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion(); //Checks to see if the player is injured if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){ //Tells the player they used a greater healing potion System.out.println("You used " + itemChosen); //Removes the greater healing potion from the players bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //If the players missing health is less than the health restored by the greater healing potion if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < GreaterHealingPotion.getHealthGained())){ //Tells the player how much health they gained System.out.println("You gained " + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + " health"); //Restores the player to max health player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth()); //If they players missing health is greater than the health restored by the greater healing potion }else{ //Tells the player how much health they gained System.out.println("You gained " + GreaterHealingPotion.getHealthGained() + " health"); //Restores the players health by the amount given by the greater healing potion player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + GreaterHealingPotion.getHealthGained()); } //If the player is not injured }else{ //Tells the player they cannot use a greater healing potion System.out.println("You are at full health and cannot use that item"); } //Greater Healing Potion option break break; //****************************************************************************************************************************** case "Scroll of Fireball": //Removes scroll of fireball from bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen)); //Tells the player they have learned the fireball spell System.out.println("You have learned: Fireball"); //Add fireball to spell list player1.setSpellList(placeInBag("Fireball", player1.getSpellList())); //Scroll of Fireball option break break; //****************************************************************************************************************************** case "Exit": //Exit option break break; default: System.out.println("Invalid Option. Try again."); }//Use option 2 break break; //****************************************************************************************************************************** //Exit case "3": //Exits the bag sequence bagExit = true; //Exit option 3 break break; default: System.out.println("Invalid option. Try again."); } }//Bag option 4 break break; //****************************************************************************************************************************** //Quests Menu case "5": Boolean questExit = false; while(!questExit){ //Displays the bag menu userChoice = getUserChoice(questMenu); //Checks user choice switch(userChoice){ //****************************************************************************************************************************** //Check quest option case "1": //Displays the player's bag displayQuest(player1.getQuestList()); String questChoice = getUserInput("Which quest do you want to check? Type in the name of the quest."); String[] questList = new String[16]; questList = player1.getQuestList(); switch(questChoice){ /*case "Kill Skeletons": for(int i = 0; i < questList.length; i++){ if(questList[1].getName().equals("Kill Skeletons")){ killSkeletonQuest kSQ = questList[1]; if(kSQ.isQuestComplete().equals("false")){ System.out.println("Quest Status: Incomplete"); } else { System.out.println("Quest Status: Complete"); } } } System.out.println(""); break;*/ } //Check quest option 1 break break; //****************************************************************************************************************************** //Exit option case "2": questExit = true; //Exit option 2 break break; default: System.out.println("Invalid option. Try again."); break; } } break; //*************************************************************************************************************************** //Starts the shop sequence case "6": //Creates the shopkeeper shopKeeper ShopKeeper = new shopKeeper(); //Creates healing potion healingPotion HealingPotion = new healingPotion(); //Creates greater healing potion greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion(); //Creates long sword longSword LongSword = new longSword(); //Creates great sword greatSword GreatSword = new greatSword(); //Populates the shopkeeper's inventory with items ShopKeeper.setShopKeeperInventory(populateShopKeeperInventory(ShopKeeper.getShopKeeperInventory())); //Displays the shop menu and asks the player what they want to do userChoice = getUserChoice(shopMenu); //Variable for shop loop Boolean shopExit = false; while(!shopExit){ switch(userChoice){ //****************************************************************************************************************************** //Buy item case "1": //Diplays the shop keeper inventory displayShopInventory(ShopKeeper.getShopKeeperInventory()); //Gets what item the user wants to buy String buyChoice = getUserInput("What item do you want to buy? \n(Type the name of the item)"); switch(buyChoice){ //****************************************************************************************************************************** //Buys healing potion case "Healing Potion": //Checks to see if the player has the gold to buy the healing potion if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){ //Subtracts the price of the healing potion from the player's gold total player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice()); //Puts the healing potion in the player's bag player1.setPlayerBag(placeInBag("Healing Potion", player1.playerBag)); //Tells the player they bought a healing potion System.out.println("You bought Healing Potion"); //Quits the shop shopExit = true; //Healing Potion option break break; //If the player doesnt have the gold to buy a healing potino }else if(buyChoice.equals("Healing Potion") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){ //Tells the player they dont have the gold to buy a healing player System.out.println("You do not have the gold to buy that item!"); //Quits the shop shopExit = true; //Healing Potion option break break; } //****************************************************************************************************************************** //Buys a greater healing potion case "Greater Healing Potion": //Checks to see if the player has the gold to buy a greater healing potion if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){ //Subtracts the price of the greater healing potino from the players gold total player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice()); //Places the greater healing potion in the players bag player1.setPlayerBag(placeInBag("Greater Healing Potion", player1.playerBag)); //Tells the player they bought a greater healing potion System.out.println("You bought Greater Healing Potion"); //Quits the shop shopExit = true; //Greater Healing Potion option break break; //If they player doesnt have the gold to buy a greater healing potion }else if(buyChoice.equals("Greater Healing Potion") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){ //Tells the player they dont have the gold to buy a greater healing potion System.out.println("You do not have the gold to buy that item!"); //Quits the shop shopExit = true; //Greater Healing Potion option break break; } //*************************************************************************************************************************** //Buys a long sword case "Long Sword": //Checks if the player has enough gold to buy a long sword if(player1.getPlayerGold() >= LongSword.getBuyPrice()){ //Subtracts the price of the long sword from the players gold total player1.setPlayerGold(player1.getPlayerGold() - LongSword.getBuyPrice()); //Places the long sword in the players bag player1.setPlayerBag(placeInBag("Long Sword", player1.playerBag)); //Tells the player they bought a long sword System.out.println("You bought Long Sword"); //Quits the shop shopExit = true; //Long Sword option break break; //If the player doesnt have the gold to buy a long sword }else if(buyChoice.equals("Long Sword") && (player1.getPlayerGold() < LongSword.getBuyPrice())){ //Tells the player they dont have the gold to buy a long sword System.out.println("You do not have the gold to buy that item!"); //Quits the shop shopExit = true; //Long Sword option break break; } //**************************************************************************************************************************** //Buys a great sword case "Great Sword": //Checks if teh player has enough gold to buy a great sword if(player1.getPlayerGold() >= GreatSword.getBuyPrice()){ //Subtracts the price of the great sword from the players gold total player1.setPlayerGold(player1.getPlayerGold() - GreatSword.getBuyPrice()); //Places the great sword in the players bag player1.setPlayerBag(placeInBag("Great Sword", player1.playerBag)); //Tells the player they bought a great sword System.out.println("You bought Great Sword"); //Quits the shop shopExit = true; //Great Sword option break break; //If the player doesnt have the gold to buy a great sword }else if(buyChoice.equals("Great Sword") && (player1.getPlayerGold() < GreatSword.getBuyPrice())){ //Tells the player they dont have the gold to buy a great sword System.out.println("You do not have the gold to buy that item!"); //Quits the shop shopExit = true; //Great Sword option break break; } //If any other option is typed default: System.out.println("Invalid option. Try again."); shopExit = true; break; } //Buy option 1 break break; //**************************************************************************************************************************** //Sell item case "2": //Variable to hold which item is being sold String itemSold; //Displays the items in the bag and asks for which item to sell itemSold = displayItemFromBag(player1.playerBag, "Sell"); //Adds the value of the sold item to the player's gold player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold)); //Removes the sold item from the player's bag player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold)); //Tells the player which item they sold and how much gold they gained System.out.println("You sold: " + itemSold); System.out.println("You gained: " + sellGold(itemSold) + " gold"); shopExit = true; //Sell option 2 break break; //*************************************************************************************************************************** //Exit shop case "3": shopExit = true; //Exit option 3 break break; default: System.out.println("Invalid option. Try again."); } } break; //**************************************************************************************************************************** //Starts the test sequence case "7": player1.setPlayerLevel(7); //Test option 6 break break; //**************************************************************************************************************************** //Exits out of the game case "8": System.out.println("Exiting the game"); done = true; //Exit option 7 break break; //Tells the user to try again default: System.out.println("Invalid option. Try again."); } } System.out.println("\nProgram Complete"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JMenuBar getMenuLista() {\n\t\tif (menuLista == null) {\n\t\t\tmenuLista = new JMenuBar();\n\t\t\tmenuLista.add(getFileMenu());\n\t\t\tmenuLista.add(getHelpMenu());\n\t\t}\n\t\treturn menuLista;\n\t}", "IMenu getMainMenu();", "String getMenus(MmtConfig cfg);", "private FlowPane setMainMenu() {\n FlowPane mainMenu = new FlowPane();\n mainMenu.setAlignment(Pos.CENTER);\n mainMenuButtons = new Button[3];\n String[] buttonText = {\"Flashcards\", \"Quizes\", \"Scores\"};\n for (int i = 0; i < mainMenuButtons.length; i++) {\n mainMenuButtons[i] = createButton(buttonText[i], TEXT_SIZE, 10);\n FlowPane.setMargin(mainMenuButtons[i], new Insets(10, 10, 30, 10));\n mainMenu.getChildren().add(mainMenuButtons[i]);\n }\n return mainMenu;\n }", "private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "public ArrayList<String> menuComBox();", "private JMenu getMMain() {\n\t\tif (mMain == null) {\n\t\t\tmMain = new JMenu();\n\t\t\tmMain.setText(\"Dosya\");\n\t\t\tmMain.add(getMiConfigure());\n\t\t\tmMain.add(getMiExit());\n\t\t}\n\t\treturn mMain;\n\t}", "public int menu(String[] menu);", "private void createMenuList() {\n SlideMenuItem menuItem0 = new SlideMenuItem(ContentFragment.CLOSE, R.drawable.ic_action_remove);\n list.add(menuItem0);\n SlideMenuItem menuItem = new SlideMenuItem(ContentFragment.GAMES, R.drawable.ic_action_gamepad);\n list.add(menuItem);\n\n SlideMenuItem menuItem3 = new SlideMenuItem(ContentFragment.FRIENDS, R.drawable.ic_action_person);\n list.add(menuItem3);\n SlideMenuItem menuItem4 = new SlideMenuItem(ContentFragment.SETTINGS, R.drawable.ic_action_settings);\n list.add(menuItem4);\n }", "private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public ChessMenuBar() {\n String[] menuCategories = {\"File\", \"Options\", \"Help\"};\n String[] menuItemLists =\n {\"New game/restart,Exit\", \"Toggle graveyard,Toggle game log\",\n \"About\"};\n for (int i = 0; i < menuCategories.length; i++) {\n JMenu currMenu = new JMenu(menuCategories[i]);\n String[] currMenuItemList = menuItemLists[i].split(\",\");\n for (int j = 0; j < currMenuItemList.length; j++) {\n JMenuItem currItem = new JMenuItem(currMenuItemList[j]);\n currItem.addActionListener(new MenuListener());\n currMenu.add(currItem);\n }\n this.add(currMenu);\n }\n }", "public static void Menus(String[] Menu){\r\n for(int i = 0;i<Menu.length;i++){\r\n System.out.print(Menu[i]);\r\n }\r\n }", "private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }", "public void initMenu(){\n\t}", "private void comparisonMenu() {\n comparisonMenuOptions();\n\n try {\n handeComparisonMenuCommands();\n } catch (Exception ex) {\n System.out.println(\"\\nYou must create the array first\\n\");\n }\n }", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "public void imprimeMenuArray() {\n\n for (int i = 0; i < menuArrayItems.length; i++) {\n System.out.println(menuArrayItems[i]);\n }\n }", "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "private List<MenuObject> getMenuObjects() {\n\n List<MenuObject> menuObjects = new ArrayList<>();\n\n MenuObject close = new MenuObject();\n close.setResource(R.drawable.close);\n\n /* MenuObject yourAccount = new MenuObject(\"YOUR ACCOUNT\");\n yourAccount.setResource(R.drawable.coins);\n\n MenuObject weeklyReport = new MenuObject(\"WEEKLY REPORT\");\n weeklyReport.setResource(R.drawable.graphup);*/\n\n MenuObject profile = new MenuObject(\"Profile\");\n profile.setResource(R.drawable.manageaccount);\n\n\n /* MenuObject homeWork = new MenuObject(\"HOME WORK\");\n homeWork.setResource(R.drawable.book2);\n\n MenuObject yourTeacher = new MenuObject(\"YOUR TEACHER\");\n yourTeacher.setResource(R.drawable.smile);\n MenuObject getKytabuHelp = new MenuObject(\"GET KYTABU HELP\");\n getKytabuHelp.setResource(R.drawable.kytabuhelp);*/\n\n menuObjects.add(close);\n /*menuObjects.add(yourAccount);\n menuObjects.add(weeklyReport);\n menuObjects.add(homeWork);*/\n menuObjects.add(profile);\n /* menuObjects.add(yourTeacher);\n menuObjects.add(getKytabuHelp);*/\n return menuObjects;\n }", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "@Override\n\tpublic List<Menu> getAllMainMenu() {\n\t\treturn this.menuDao.getAllMainMenu();\n\t}", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "public void readTheMenu();", "@Override\n public String[] displayMenu() {\n\n PersonalMatchDAO personalMatchDAO = new PersonalMatchDAO();\n personalMatchDAO.listAllPersonalMatches();\n\n String[] str = {selection};\n return str;\n\n }", "private void constructMenuItems()\n\t{\n\t\tthis.saveImageMenuItem = ComponentGenerator.generateMenuItem(\"Save Image\", this, KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));\n\t\tthis.quitMenuItem = ComponentGenerator.generateMenuItem(\"Quit\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));\n\t\tthis.undoMenuItem = ComponentGenerator.generateMenuItem(\"Undo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK));\n\t\tthis.redoMenuItem = ComponentGenerator.generateMenuItem(\"Redo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK));\n\t\tthis.removeImageMenuItem = ComponentGenerator.generateMenuItem(\"Remove Image from Case\", this);\n\t\tthis.antiAliasMenuItem = ComponentGenerator.generateMenuItem(\"Apply Anti Aliasing\", this);\n\t\tthis.brightenMenuItem = ComponentGenerator.generateMenuItem(\"Brighten by 10%\", this);\n\t\tthis.darkenMenuItem = ComponentGenerator.generateMenuItem(\"Darken by 10%\", this);\n\t\tthis.grayscaleMenuItem = ComponentGenerator.generateMenuItem(\"Convert to Grayscale\", this);\n\t\tthis.resizeMenuItem = ComponentGenerator.generateMenuItem(\"Resize Image\", this);\n\t\tthis.cropMenuItem = ComponentGenerator.generateMenuItem(\"Crop Image\", this);\n\t\tthis.rotate90MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 90\\u00b0 Right\", this);\n\t\tthis.rotate180MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 180\\u00b0 Right\", this);\n\t\tthis.rotate270MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 270\\u00b0 Right\", this);\n\t}", "public MainMenu getMainMenu() {\n return mainMenu;\n }", "public static void initMenuBars()\n\t{\n\t\tmenuBar = new JMenuBar();\n\n\t\t//Build the first menu.\n\t\tmenu = new JMenu(\"Options\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(menu);\n\n\t\t//a group of JMenuItems\n\t\tmenuItem = new JMenuItem(\"Quit\",\n\t\t KeyEvent.VK_T);\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmenuItem.getAccessibleContext().setAccessibleDescription(\n\t\t \"This doesn't really do anything\");\n\t\tmenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Both text and icon\",\n\t\t new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_B);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_D);\n\t\tmenu.add(menuItem);\n\n\t\t//a group of radio button menu items\n\t\tmenu.addSeparator();\n\t\tButtonGroup group = new ButtonGroup();\n\t\trbMenuItem = new JRadioButtonMenuItem(\"A radio button menu item\");\n\t\trbMenuItem.setSelected(true);\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_R);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\trbMenuItem = new JRadioButtonMenuItem(\"Another one\");\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_O);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\t//a group of check box menu items\n\t\tmenu.addSeparator();\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"A check box menu item\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_C);\n\t\tmenu.add(cbMenuItem);\n\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"Another one\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_H);\n\t\tmenu.add(cbMenuItem);\n\n\t\t//a submenu\n\t\tmenu.addSeparator();\n\t\tsubmenu = new JMenu(\"A submenu\");\n\t\tsubmenu.setMnemonic(KeyEvent.VK_S);\n\n\t\tmenuItem = new JMenuItem(\"An item in the submenu\");\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_2, ActionEvent.ALT_MASK));\n\t\tsubmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Another item\");\n\t\tsubmenu.add(menuItem);\n\t\tmenu.add(submenu);\n\n\t\t//Build second menu in the menu bar.\n\t\tmenu = new JMenu(\"Another Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_N);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"This menu does nothing\");\n\t\tmenuBar.add(menu);\n\t}", "private void createMenu()\n\t{\n\t\tfileMenu = new JMenu(\"File\");\n\t\thelpMenu = new JMenu(\"Help\");\n\t\ttoolsMenu = new JMenu(\"Tools\");\n\t\t\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\texit = new JMenuItem(\"Exit\");\t\t\n\t\treadme = new JMenuItem(\"Readme\");\n\t\tabout = new JMenuItem(\"About\");\n\t\tsettings = new JMenuItem(\"Settings\");\n\t\t\t\t\n\t\tfileMenu.add (exit);\n\t\t\n\t\thelpMenu.add (readme);\n\t\thelpMenu.add (about);\t\n\t\t\n\t\ttoolsMenu.add (settings);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(helpMenu);\t\t\n\t\t\t\t\n\t\tdefaultMenuBackground = menuBar.getBackground();\n\t\tdefaultMenuForeground = fileMenu.getForeground();\n\t\t\n\t}", "protected void createMenus(Activity activity, boolean isEntryPoint){\n \t\t\n \t\t//myTts = new TextToSpeechBeta(this, ttsInitListener);\n \t\t\n \t\tthis.isEntryPoint = isEntryPoint;\n \t\tthis.activity = activity;\n \t\t\n \t\tApplicationData applicationData = SplashActivity.getApplicationData();\n \t\tActiveMenus activeMenus = applicationData.getMenu();\n \t\t\n \t\t//TOP MENU\n \t\tif(activeMenus.getTopMenu() != null){\n \t\t\tRelativeLayout topLayout = (RelativeLayout) findViewById(R.id.topLayout);\n \t\t\tcreateCurrentMenu(topLayout, activeMenus.getTopMenu());\n \t\t}\n \t\t\n \t\t//BOTTOM MENU\n \t\tRelativeLayout bottomLayout = (RelativeLayout) findViewById(R.id.bottomLayout);\t\n \t\tif(activeMenus.getBottomMenu() != null){\n \t\t\tcreateCurrentMenu(bottomLayout, activeMenus.getBottomMenu());\n \t\t}else{\n \t\t\tbottomLayout.setVisibility(0);\n \t\t}\n \t\t\n \t\t//CONTEXT MENU\n \t\tif(activeMenus.getContextMenu() != null){\n \t\t\tthis.contextMenuXmlFileName = activeMenus.getContextMenu();\n \t\t}\n \t\t\n \t\t//SIDE MENU\n \t\tif(activeMenus.getSideMenu() != null){\n \t\t\tinitializeSideMenuList(activeMenus.getSideMenu());\n \t\t}\n \t}", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}", "private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }", "public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuItem(\"Exit \");\n\t\tJMenuItem preferences = new JMenuItem(\"Preferences \");\n\t\tJMenuItem about = new JMenuItem(\"About \");\n\n\n\t\tfile.add(open);\n\t\tfile.add(save);\n\t\tfile.addSeparator();\n\t\tfile.add(exit);\n\t\ttools.add(preferences);\n\t\thelp.add(about);\n\n\t\tmenuBar.add(file);\n\t\tmenuBar.add(tools);\n\t\tmenuBar.add(help);\n\t}", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "public static void main(String[] args){\n\n main_menu();\n\n }", "private void populateRecentMenu(){\r\n\t\trecentMenu.removeAll();\r\n\t\tString[] files = BibtexPrefs.getOpenedFiles();\r\n\t\trecentMenuItems = new JMenuItem[files.length];\r\n\t\tfor(int i = 0; i < files.length; i++){\r\n\t\t\trecentMenuItems[i] = new JMenuItem(files[i]);\r\n\t\t\trecentMenuItems[i].addActionListener(this);\r\n\t\t\trecentMenu.add(recentMenuItems[i]);\r\n\t\t}\r\n\t}", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public void viewMenu() {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\tmm.clear();\n\n\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\n\t\t\tString leftAlignFormat = \"| %-10s | %-37s | %-5s | %-12s | %n\";\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\n\t\t\t\n\t\t\tCollections.sort(mm); \n\t\t\tfor (AlacarteMenu item : mm) {\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tSystem.out.format(leftAlignFormat, item.getMenuName(), item.getMenuDesc(), item.getMenuPrice(),\n\t\t\t\t\t\titem.getMenuType());\n\t\t\t}\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (IOException e) {\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "public static void main(String[] args){\n Menu iniciar_menu = new Menu();\r\n }", "private JMenu getMActions() {\n\t\tif (mActions == null) {\n\t\t\tmActions = new JMenu();\n\t\t\tmActions.setText(\"Servisler\");\n mActions.add(getMiBilesikKutukSorgula());\n\t\t\tmActions.add(getMiKimlikNumarasindanKisiBilgisiSorgula());\n\t\t\tmActions.add(getMiKisiListesiSorgula());\n \n\t\t}\n\t\treturn mActions;\n\t}", "private HBox createMenu(BorderPane root) {\n HBox menu = new HBox();\n\n menu.setPadding(new Insets(30, 30, 30, 30));\n menu.setSpacing(30);\n menu.setBackground(new Background(new BackgroundFill(MENU_COLOR, CornerRadii.EMPTY, Insets.EMPTY)));\n menu.getChildren().addAll(createNewArrayButton(root), createArrSizeSliderWrapper(root),\n createNumOfThreadsSpinnerWrapper(), createExecuteMergeSortButton(root));\n\n return menu;\n }", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "public List getMenu() {\n createMenuGroupError = false;\n menulist = new Menus_List();\n return menulist.getMenu();\n }", "public MenuSection getMainMenu() {\n\t\treturn mainMenu;\n\t}", "C getMenu();", "MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}", "public void initializeMenuItems() {\n menuItems = new LinkedHashMap<TestingOption, MenuDrawerItem>();\n menuItems.put(TestingOption.TESTING_OPTION, create(TestingOption.TESTING_OPTION, getResources().getString(R.string.testing_section).toUpperCase(), MenuDrawerItem.SECTION_TYPE));\n menuItems.put(TestingOption.ANNOTATION_OPTION, create(TestingOption.ANNOTATION_OPTION, getResources().getString(R.string.option_annotation_POI), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VIEW_SETTINGS_OPTION, create(TestingOption.MAP_VIEW_SETTINGS_OPTION, getResources().getString(R.string.option_map_view_settings), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_CACHE_OPTION, create(TestingOption.MAP_CACHE_OPTION, getResources().getString(R.string.option_map_cache), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.LAST_RENDERED_FRAME_OPTION, create(TestingOption.LAST_RENDERED_FRAME_OPTION, getResources().getString(R.string.option_last_rendered_frame), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, create(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, getResources().getString(R.string.option_ccp_animation_custom_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.BOUNDING_BOX_OPTION, create(TestingOption.BOUNDING_BOX_OPTION, getResources().getString(R.string.option_bounding_box), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.INTERNALIZATION_OPTION, create(TestingOption.INTERNALIZATION_OPTION, getResources().getString(R.string.option_internalization), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATE_OPTION, create(TestingOption.ANIMATE_OPTION, getResources().getString(R.string.option_animate), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_STYLE_OPTION, create(TestingOption.MAP_STYLE_OPTION, getResources().getString(R.string.option_map_style), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.SCALE_VIEW_OPTION, create(TestingOption.SCALE_VIEW_OPTION, getResources().getString(R.string.option_scale_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.CALLOUT_VIEW_OPTION, create(TestingOption.CALLOUT_VIEW_OPTION, getResources().getString(R.string.option_callout_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTING_OPTION, create(TestingOption.ROUTING_OPTION, getResources().getString(R.string.option_routing), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTE_WITH_POINTS, create(TestingOption.ROUTE_WITH_POINTS, getResources().getString(R.string.option_routing_with_points),MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VERSION_OPTION, create(TestingOption.MAP_VERSION_OPTION, getResources().getString(R.string.option_map_version_information), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.OVERLAYS_OPTION, create(TestingOption.OVERLAYS_OPTION, getResources().getString(R.string.option_overlays), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POI_TRACKER, create(TestingOption.POI_TRACKER, getResources().getString(R.string.option_poi_tracker), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POSITION_LOGGING_OPTION, create(TestingOption.POSITION_LOGGING_OPTION, getResources().getString(R.string.option_position_logging), MenuDrawerItem.ITEM_TYPE));\n\n list = new ArrayList<MenuDrawerItem>(menuItems.values());\n drawerList.setAdapter(new MenuDrawerAdapter(DebugMapActivity.this, R.layout.element_menu_drawer_item, list));\n drawerList.setOnItemClickListener(new DrawerItemClickListener());\n\n }", "@Test\n public void testMenu() {\n MAIN_MENU[] menusDefined = MAIN_MENU.values();\n\n // get menu items\n List<String> menuList = rootPage.menu().items();\n _logger.debug(\"Menu items:{}\", menuList);\n // check the count\n Assert.assertEquals(menuList.size(), menusDefined.length, \"Number of menus test\");\n // check the names\n for (String item : menuList) {\n Assert.assertNotNull(MAIN_MENU.fromText(item), \"Checking menu: \" + item);\n }\n // check the navigation\n for (MAIN_MENU item : menusDefined) {\n _logger.debug(\"Testing menu:[{}]\", item.getText());\n rootPage.menu().select(item.getText());\n Assert.assertEquals(item.getText(), rootPage.menu().selected());\n }\n }", "MenuBar getRootMenuBar();", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "private void showFullMenu() {\n final Menu[] menu = MenuFactory.showMenu();\n System.out.println(\"Food_Id\" + \"\\t\" + \"Food_Name\" + \"\\t\" + \"Price\" + \"\\t\" + \"Prepration_Time\");\n for (final Menu m : menu) {\n System.out.println(m.getFoodId() + \"\\t\" + m.getFoodName() + \"\\t\" + m.getPrice() + \"\\t\" + m.getPreprationTime());\n }\n }", "private void getMenu() {\n compositeDisposable.add(mcApi.getMenu()\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Consumer<List<Category>>() {\n @Override\n public void accept(List<Category> categories) throws Exception {\n displayMenu(categories);\n }\n\n }));\n }", "private JMenuBar getMbMain() {\n\t\tif (mbMain == null) {\n\t\t\tmbMain = new JMenuBar();\n\t\t\tmbMain.add(getMMain());\n\t\t\tmbMain.add(getMActions());\n\t\t}\n\t\treturn mbMain;\n\t}", "public void getMenuItems(){ \n\t\tParseUser user = ParseUser.getCurrentUser();\n\t\tmenu = user.getParseObject(\"menu\");\n\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"Item\");\n\t\tquery.whereEqualTo(\"menu\", menu);\n\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(List<ParseObject> menuItems, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tlistMenuItems(menuItems);\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "@Override\n public List<MMenu> getMenus()\n {\n return null;\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }", "private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}", "public static void mainMenu() throws InterruptedException {\n\n // Calling the delay method to slow down the speed of the menu presentation\n delay();\n\n //Displaying the menu options by using the system out method\n System.out.println(\"Menu Main: \\n\");\n System.out.println(\"1 - Create a project\");\n System.out.println(\"2 - View projects\");\n System.out.println(\"3 - Completed projects\");\n System.out.println(\"4 - Customer information\");\n System.out.println(\"5 - Architect information\");\n System.out.println(\"6 - Project Manager Information\");\n System.out.println(\"7 - Structural Engineer Information\");\n System.out.println(\"8 - Past Due projects\\n\");\n System.out.println(\"0 - Exit\\n\");\n }", "private static void returnMenu() {\n\t\t\r\n\t}", "private MenuBar getMenuBar() {\n MenuBar menuBar = new MenuBar();\n // setup File menu\n Menu fileMenu = new Menu(\"File\");\n fileMenu.getItems().addAll(\n getMenuItem(\"New\", event -> startGame()),\n getMenuItem(\"Quit\", event -> quitGame())\n );\n\n // setup Level menu\n Menu levelMenu = new Menu(\"Level\");\n\n // for radio menu items, ensures only\n // one is selected at a time.\n ToggleGroup group = new ToggleGroup();\n\n levelMenu.getItems().addAll(\n getRadioMenuItem(\n \"Beginner - 9x9\",\n true,\n group,\n event -> setGameLevel(GameLevel.BEGINNER)\n ),\n\n getRadioMenuItem(\n \"Intermediate - 16x16\",\n false,\n group,\n event -> setGameLevel(GameLevel.INTERMEDIATE)\n ),\n\n getRadioMenuItem(\n \"Expert - 24x24\",\n false,\n group,\n event -> setGameLevel(GameLevel.EXPERT))\n );\n\n menuBar.getMenus().addAll(fileMenu, levelMenu);\n\n return menuBar;\n }", "private void createMenusNow()\n {\n JMenu debugMenu = myToolbox.getUIRegistry().getMenuBarRegistry().getMenu(MenuBarRegistry.MAIN_MENU_BAR,\n MenuBarRegistry.DEBUG_MENU);\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Print Summary\", e -> printSummary()));\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Tag Data Type\", e -> tagDataType()));\n }", "public static void main(String[] args) {\n Graphics.graphicsMainMenu();\r\n //Print main menu\r\n Menu.mainMenu();\r\n }", "private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "@Override\r\n public String[] getInputs() {\n String[] inputs = new String[1];\r\n\r\n // display the text of the main menu\r\n System.out.println(\"Main Menu\"\r\n + \"N - start new game\"\r\n + \"\\nS - Save Game\"\r\n + \"\\nG - Get and resume saved game\"\r\n + \"\\nH - Help\"\r\n + \"\\nQ - Quit\");\r\n \r\n // prompt for and get the menu input by the end user\r\n String value = this.getInput(\"Enter one of the menu options.\");\r\n \r\n // asssign the value input to the first position in the inputs array\r\n inputs[0] = value;\r\n return inputs;\r\n }", "public boolean getMain() {\r\n\t\treturn mainMenu;\r\n\t}", "public String getActivationMenu();", "public void addMenuItems()\n\t{\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setLayout(null);\n\t\tstartButton.setBounds(350, 225, 100, 50);\n\t\t\n\t\toptionsButton = new JButton(\"Options\");\n\t\toptionsButton.setLayout(null);\n\t\toptionsButton.setBounds(350, 275, 100, 50);\n\t\t\n\t\texitButton = new JButton(\"Exit\");\n\t\texitButton.setLayout(null);\n\t\texitButton.setBounds(350, 375, 100, 50);\n\t\texitButton.setActionCommand(\"exit\");\n\t\texitButton.addActionListener((ActionListener) this);\n\t\t\n\t\tmainMenuPanel.add(startButton);\n\t\tmainMenuPanel.add(optionsButton);\n\t\tmainMenuPanel.add(startButton);\n\t}", "private void showFullMenu() {\r\n Menu[] menu = MenuFactory.showMenu();\r\n System.out.println(\"Menu_Id \\t Food_Name \\t Food_Type \\t\\t Calories \\t Food_Amount\");\r\n for (Menu m : menu) {\r\n System.out.println(m.getFoodId() + \"\\t\\t\" + m.getFoodName() + \"\\t\\t\" + m.getFoodType() + \"\\t\\t\\t\" + m.getCalories() + \"\\t\\t\" + m.getFoodAmt());\r\n }\r\n }", "public List<Menu> getMenu() {\n return mMenu;\n }", "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }", "public Menu getStartMenu() {\n Menu menu = new Menu(new Point(475, 0), 672-475, 320, 8, 1, new Cursor(new Point(0, 7)), \"exit\");\n Button PokedexButton = new Button(new Point(475, 0), 672-475, 40, \"Pokédex\", new Point(0, 7), \"Pokédex\");\n Button PokemonButton = new Button(new Point(475, 40), 672-475, 40, \"Pokémon\", new Point(0, 6), \"Pokémon\");\n Button BagButton = new Button(new Point(475, 80), 672-475, 40, \"Bag\", new Point(0, 5), \"Bag\");\n Button PokenavButton = new Button(new Point(475, 120), 672-475, 40, \"Pokénav\", new Point(0, 4), \"Pokénav\");\n Button PlayerButton = new Button(new Point(475, 160), 672-475, 40, trainer.getName(), new Point(0, 3), trainer.getName());\n Button SaveButton = new Button(new Point(475, 200), 672-475, 40, \"save\", new Point(0, 2), \"Save\");\n Button OptionButton = new Button(new Point(475, 240), 672-475, 40, \"add_menu_other\", new Point(0, 1), \"Options\");\n Button ExitButton = new Button(new Point(475, 280), 672-475, 40, \"exit\", new Point(0, 0), \"exit\");\n menu.addButton(PokedexButton);\n menu.addButton(PokemonButton);\n menu.addButton(BagButton);\n menu.addButton(PokenavButton);\n menu.addButton(PlayerButton);\n menu.addButton(SaveButton);\n menu.addButton(OptionButton);\n menu.addButton(ExitButton);\n menu.getButton(menu.getCursor().getPos()).Highlight();\n return menu;\n }", "protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\n\t}", "private static void printMainMenu() {\n\t\tprintln(\"Main Menu:\");\n\t\tprintln(\"\\tI: Import Movie <Title>\");\n\t\tprintln(\"\\tD: Delete Movie <Title>\");\n\t\tprintln(\"\\tS: Sort Movies\");\n\t\tprintln(\"\\tA: Sort Actors\");\n\t\tprintln(\"\\tQ: Quit\");\n\t}", "public void menu() {\n\t\tsuper.menu();\n\n\t\tfor(JCheckBox cb : arrayCompo){\n\t\t\tcb.setPreferredSize(new Dimension(largeur-30, hauteur));\n\t\t\tgbc.gridy++;\n\t\t\tpan.add(cb, gbc);\n\t\t}\n\t}", "public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }", "public String getMenuids() {\n return menuids;\n }", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "public static void main(String[] args) {\n mainMenu();\n }", "public void addSubMenus() {\n configMenu.remove(colorMI);\r\n configMenu.remove(sizeMI);\r\n\r\n // set color and size as JMenu\r\n colorMenu = new JMenu(\"Color\");\r\n sizeMenu = new JMenu(\"Size\");\r\n\r\n // set new JMenuItem\r\n redColor = new JMenuItem(\"Red\");\r\n greenColor = new JMenuItem(\"Green\");\r\n blueColor = new JMenuItem(\"Blue\");\r\n sixteenSize = new JMenuItem(\"16\");\r\n twentySize = new JMenuItem(\"20\");\r\n twentyfourSize = new JMenuItem(\"24\");\r\n\r\n // add menu item to menu\r\n colorMenu.add(redColor);\r\n colorMenu.add(greenColor);\r\n colorMenu.add(blueColor);\r\n sizeMenu.add(sixteenSize);\r\n sizeMenu.add(twentySize);\r\n sizeMenu.add(twentyfourSize);\r\n\r\n // add menu\r\n configMenu.add(colorMenu);\r\n configMenu.add(sizeMenu);\r\n }", "public static String[] generarOpcionesMenu() {\r\n\t\tString[] opcionesMenu = new String[getValues().length + 1];\r\n\t\tint i = 0;\r\n\t\tfor (Color color : getValues()) {\r\n\t\t\topcionesMenu[i++] = color.name();\r\n\t\t}\r\n\t\topcionesMenu[i] = \"Salir\";\r\n\t\treturn opcionesMenu;\r\n\t}", "public static void updateMainMenu() {\n instance.updateMenu();\n }", "public List<MenuItem> getMenuItems(){\n return menuItems;\n }", "public org.parosproxy.paros.view.MainMenuBar getMainMenuBar() {\r\n\t\tif (mainMenuBar == null) {\r\n\t\t\tmainMenuBar = new org.parosproxy.paros.view.MainMenuBar();\r\n\t\t}\r\n\t\treturn mainMenuBar;\r\n\t}", "public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}", "public MainMenu() {\n\t\t\t fs = new Font [3];\n\t\t\t fs[0] = new Font(\"Lato\", Font.BOLD, 36);\n\t\t\t fs[1] = new Font(\"Open Sans\", 0 , 20);\n\t\t\t fs[2] = new Font(\"Open Sans\", 0 , 12);\n\t\t\t searchB = new JButton(\"Search\");\n\t\t\t sortB = new JButton(\"Sort\");\n\t\t\t graphB = new JButton(\"Graph\");\n\t\t\t backB = new JButton(\"Return\");\n\t\t\t menuL = new JLabel (\"Main Menu\");\n\t\t\t tA = new JTextArea ();\n\t\t\t searchB.setFont(fs[1]);\n\t\t\t sortB.setFont(fs[1]);\n\t\t\t graphB.setFont(fs[1]);\n\t\t\t backB.setFont(fs[2]);\n\t\t\t menuL.setFont(fs[0]);\n\t\t\t backB.setVisible(false);\n\t\t\t \n\t\t\t // UI elements to load in view\n\t\t\t add(menuL, BorderLayout.PAGE_START);\n\t\t\t add(searchB, BorderLayout.LINE_START);\n\t\t\t add(sortB, BorderLayout.CENTER);\n\t\t\t add(graphB, BorderLayout.LINE_END);\n\t\t\t add(backB, BorderLayout.PAGE_END);\n\t\t\t \n\t\t\t // listens to buttons pressed\n\t\t\t searchB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(1);\n\t\t\t }\n\t\t\t });\n\t\t\t sortB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(2);\n\t\t\t }\n\t\t\t });\n\t\t\t graphB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(3);\n\t\t\t }\n\t\t\t });\n\t\t\t backB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(0);\n\t\t\t }\n\t\t\t });\n\t\t }", "public abstract Tree extractMenuBarItems (Object obj) throws SAFSException;" ]
[ "0.66354907", "0.6571153", "0.6566472", "0.6493848", "0.64624745", "0.64410436", "0.6408587", "0.64080626", "0.6387247", "0.63797665", "0.6362269", "0.63349396", "0.631108", "0.63108397", "0.6307529", "0.62980455", "0.6294168", "0.62893736", "0.6282488", "0.62808555", "0.6275548", "0.62749416", "0.627459", "0.6268657", "0.62517416", "0.6246483", "0.62462103", "0.6230338", "0.6225637", "0.6224657", "0.6222135", "0.61988884", "0.61844045", "0.6177532", "0.61703414", "0.6169289", "0.616903", "0.61464447", "0.61412764", "0.61273897", "0.61229146", "0.6120279", "0.61137134", "0.61134315", "0.6104765", "0.61028546", "0.6079555", "0.60383177", "0.60229665", "0.60226357", "0.6018485", "0.5995414", "0.599338", "0.5991801", "0.59859455", "0.59653336", "0.5964404", "0.59527147", "0.59466714", "0.59462446", "0.59461755", "0.59433424", "0.59344757", "0.5932086", "0.59315896", "0.59039706", "0.5903833", "0.58963", "0.5896245", "0.58923143", "0.58873516", "0.58861125", "0.5885933", "0.58736986", "0.5873112", "0.585491", "0.58510554", "0.5847044", "0.58469653", "0.5840429", "0.5833363", "0.58203113", "0.5819396", "0.5815884", "0.5815385", "0.58012986", "0.5800998", "0.57952744", "0.57921857", "0.5783668", "0.5783344", "0.5780418", "0.57792294", "0.5771582", "0.57598585", "0.57527405", "0.57501936", "0.57496744", "0.57481766", "0.574805" ]
0.57650995
94
Function that prints the designated menu from the array and gets the user response
private static String getUserName(){ Scanner in = new Scanner(System.in); System.out.print("What is your character's name?"); return in.nextLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getUserChoice(String[] menu){\r\n System.out.println(\"\");\r\n for(int i = 0; i < menu.length; i++){\r\n if(i == 0){\r\n System.out.println(\"\\t--\" + menu[i] + \"--\"); \r\n }\r\n else{\r\n System.out.println(\"\\t\" + i + \") \" + menu[i]);\r\n }\r\n }\r\n System.out.print(\"Please enter your choice: \");\r\n Scanner in = new Scanner(System.in);\r\n return in.nextLine();\r\n }", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }", "protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "public static void menu() {\n\t\tSystem.out.println(\"\\nPlease select which type of argument to generate by entering the associated number.\\n\");\n\t\tfor(int i = 0; i < type.length; i++) {\n\t\t\tSystem.out.println((i+1)+\". \"+type[i]);\n\t\t}\n\t\tSystem.out.println(\"8. Quit\");\n\t}", "public static void printMenu(){\n System.out.print(\"1. List all writing groups\\n\" +\n \"2. List all the data for one writing group\\n\"+\n \"3. List all publishers\\n\"+\n \"4. List all the data for one publisher\\n\"+\n \"5. List all books\\n\"+\n \"6. List all the data for one book\\n\"+\n \"7. Insert new book\\n\"+\n \"8. Insert new publisher\\n\"+\n \"9. Remove a book\\n\"+\n \"10. Quit\\n\\n\");\n }", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "public static void Menus(String[] Menu){\r\n for(int i = 0;i<Menu.length;i++){\r\n System.out.print(Menu[i]);\r\n }\r\n }", "private String printMainMenu() {\n System.out.println(\"Please make a selection:\");\n System.out.println(\"1: List all tools\");\n System.out.println(\"2: Search for tool by toolName\");\n System.out.println(\"3: Search for tool by toolID\");\n System.out.println(\"4: Check item quantity\");\n System.out.println(\"5: Decrease item quantity\");\n System.out.println(\"6: Make New Order/Append Today's Order\");\n System.out.println(\"7: View Current Orders\");\n System.out.println(\"8: View Supplier List\");\n System.out.println(\"9: Quit\");\n String selection = this.userInput.nextLine();\n return selection;\n }", "private static void MainMenuRec(){\n System.out.println(\"Choose one of the following:\");\n System.out.println(\"-----------------------------\");\n System.out.println(\"1. Book room\");\n System.out.println(\"2. Check-out\");\n System.out.println(\"3. See room list\");\n System.out.println(\"4. Create a new available room\");\n System.out.println(\"5. Delete a room\");\n System.out.println(\"6. Make a room unavailable\");\n System.out.println(\"7. Make a (unavailable) room available\");\n System.out.println(\"8. Back to main menu\");\n System.out.println(\"-----------------------------\");\n }", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "private static void displayMenu() {\n System.out.println(\"Menu : \");\n System.out.println(\"Type any number for selection\");\n for (int i = 1; i <= totalPlayers; i++) {\n System.out.println(i + \")View \" + playerList.get(i - 1) + \" cards\");\n }\n System.out.println(\"8)Display Each Player's Hand Strength\");\n System.out.println(\"9)Declare Winner\");\n System.out.println(\"10)Exit\");\n }", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "private String print_Menu()\n\t{\n\t\tSystem.out.println(\"\\n----------CS542 Link State Routing Simulator----------\");\n\t\tSystem.out.println(\"(1) Create a Network Topology\");\n\t\tSystem.out.println(\"(2) Build a Forward Table\");\n\t\tSystem.out.println(\"(3) Shortest Path to Destination Router\");\n\t\tSystem.out.println(\"(4) Modify a Topology (Change the status of the Router)\");\n\t\tSystem.out.println(\"(5) Best Router for Broadcast\");\n\t\tSystem.out.println(\"(6) Exit\");\n\t\tSystem.out.print(\"Master Command: \");\n\n\t\treturn scan.next();\n\t}", "public static void Report() {\n\t\tfor (int i = 0; i < array.size(); i++) {\r\n\t\t\tSystem.out.println(array.get(i).getDetails());\t\t\t//Steps through the array and prints the details\r\n\t\t}\r\n\t\tAdmin.menuChoice();\r\n\t}", "public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "public void displayMenu() {\r\n\t\tSystem.out.println(\"Enter a number between 0 and 8 as explained below: \\n\");\r\n\t\tSystem.out.println(\"[\" + ADD_CUSTOMER + \"] Add a customer.\");\r\n\t\tSystem.out.println(\"[\" + ADD_MODEL + \"] Add a model.\");\r\n\t\tSystem.out.println(\"[\" + ADD_TO_INVENTORY + \"] Add a washer to inventory.\");\r\n\t\tSystem.out.println(\"[\" + PURCHASE + \"] Purchase a washer.\");\r\n\t\tSystem.out.println(\"[\" + LIST_CUSTOMERS + \"] Display all customers.\");\r\n\t\tSystem.out.println(\"[\" + LIST_WASHERS + \"] Display all washers.\");\r\n\t\tSystem.out.println(\"[\" + DISPLAY_TOTAL + \"] Display total sales.\");\r\n\t\tSystem.out.println(\"[\" + SAVE + \"] Save data.\");\r\n\t\tSystem.out.println(\"[\" + EXIT + \"] to Exit\");\r\n\t}", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }", "public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}", "public void PrintMenu() throws IOException {\r\n\t\t//loop the menu until the user chooses to quit\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.println(\"Welcome to the EnigmaMachine command interface!\");\r\n\t\t\tSystem.out.println(\"Enter 1 to add the plugs\");\r\n\t\t\tSystem.out.println(\"Enter 2 to add the rotors\");\r\n\t\t\tSystem.out.println(\"Enter 3 to add the reflector\");\r\n\t\t\tSystem.out.println(\"Enter 4 to enter the message\");\r\n\t\t\tSystem.out.println(\"Enter 5 to quit the menu and start the machine\");\r\n\t\t\t\r\n\t\t\tint option = this.readIntegerFromCmd();\r\n\t\t\t//jump to different method according to the input of the user\r\n\t\t\tif (option == 1) {\r\n\t\t\t\tthis.addPlug();\r\n\t\t\t}else if (option == 2) {\r\n\t\t\t\tthis.addRotors();\r\n\t\t\t}else if (option == 3) {\r\n\t\t\t\tthis.addReflector();\r\n\t\t\t}else if (option == 4) {\r\n\t\t\t\tthis.addMessage();\r\n\t\t\t}else if (option == 5) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n public final void display() {\r\n System.out.println(\"\\n\\t===============================================================\");\r\n System.out.println(\"\\tEnter the letter associated with one of the following commands:\");\r\n \r\n for (String[] menuItem : HelpMenuView.menuItems) {\r\n System.out.println(\"\\t \" + menuItem[0] + \"\\t\" + menuItem[1]);\r\n }\r\n System.out.println(\"\\t===============================================================\\n\");\r\n }", "private void processChoice() {\n switch (this.choice) {\n case 0:\n System.out.println(\"Log Out\");\n break;\n case 1:\n System.out.println(\"Open New Account\");\n break;\n case 2:\n System.out.println(\"View All Accounts\");\n break;\n case 3:\n System.out.println(\"View Transactions\");\n break;\n case 4:\n System.out.println(\"Transfer Funds\");\n break;\n default:\n System.out.println(\"Error! Invalid menu option\");\n break;\n }\n }", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "public static void menu() {\n\n\t\tSystem.out.println(\"\\n*** MENU ***: \");\n\t\tSystem.out.print(\"\\n1. Host current Date and Time\\n\" + \"2. Host uptime\\n\" + \"3. Host memory use\\n\"\n\t\t\t\t+ \"4. Host IPV4 socket connections\\n\" + \"5. Host current users\\n\" + \"6. Host running processes\\n\"\n\t\t\t\t+ \"7. Quit\\n\" + \"\\nSelect option: \");\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tmenuSelect = sc.nextInt();\n\t\t\tif (menuSelect < 1 || menuSelect > 7) {\n\t\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tswitch (menuSelect) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Date Request from Client\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"Uptime Request from Client\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Memory Use Request from Client\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"IPV4 Socket Connections Request from Client\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"Current Users Request from Client\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"Current OS Version Request from Client\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Quit\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tsc.close(); // close the Scanner object\n\t}", "public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "public static void printMenu(){\r\n try{\r\n Thread.sleep(100);\r\n }catch(Exception e){}\r\n System.out.println(\"Use numbers to choose a option:\");\r\n System.out.println(\"1.- New Order.\");\r\n System.out.println(\"2.- Add to exist Order.\");\r\n System.out.println(\"3.- Show Order.\");\r\n System.out.println(\"4.- Administration.\");\r\n System.out.println(\"5.- Exit.\");\r\n System.out.print(\"-> \");\r\n }", "public static void showMenu() {\n System.out.println(\"********************************************************************\");\n System.out.println(\"************************* Array Exercises **************************\");\n System.out.println(\"********************************************************************\");\n System.out.println(\" 1. Find how many elements are below and above the average |\");\n System.out.println(\" 2. Find how many elements are even and how many are odd |\");\n System.out.println(\" 3. Swap largest and smallest elements in the array |\");\n System.out.println(\" 4. Summing elements in each row and each column of 2-D array |\");\n System.out.println(\" 5. Find row of 2-D array which has the largest sum |\");\n System.out.println(\" 6. Display row(s) of 2-D array containing repeated elements |\");\n System.out.println(\" 7. Quit |\");\n System.out.println(\" -------------------------------------------------------------------\");\n System.out.println();\n System.out.print(\" > Enter your choice: \");\n }", "public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}", "public void showMenu(){\n\t\tSystem.out.println(\"******************************************************\");\n\t\tSystem.out.println(\"************Welcome to the holding program************\");\n\t\tSystem.out.println(\"******************************************************\");\n\t\tint option = -1;\n\t\twhile(option != 0){\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"***************Please, select an option***************\");\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"0. To exit of the program\");\n\t\t\tSystem.out.println(\"1. To add a public service company\");\n\t\t\tSystem.out.println(\"2. To add an university company\");\n\t\t\tSystem.out.println(\"3. To add a high school company\");\n\t\t\tSystem.out.println(\"4. To add a technological company\");\n\t\t\tSystem.out.println(\"5. To add a food company\");\n\t\t\tSystem.out.println(\"6. To add a medicine company\");\n\t\t\tSystem.out.println(\"7. Show the information of the holding\");\n\t\t\tSystem.out.println(\"8. Register a poll\");\n\t\t\tSystem.out.println(\"9. To add a employee\");\n\t\t\tSystem.out.println(\"10. Find the extension of a employee\");\n\t\t\tSystem.out.println(\"11. Find the mails of all the employees that are occupied a position\");\n\t\t\tSystem.out.println(\"12. To add a product\");\n\t\t\toption = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tswitch(option){\n\t\t\t\tcase 0:\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tpublicService();\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tuniversity();\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\thighSchool();\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\ttechnological();\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\tfood();\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tmedicine();\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\tSystem.out.println(theHolding.wholeInformation());\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\tregisterPoll();\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\taddEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\textensionEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\tmailsPosition();\n\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\taddProduct();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Select a correct option\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void printMovieMenu(){\n\t\tprint(\"Please choose from the options below\"+System.lineSeparator(), \"1.Search by Actor\", \"2.Search by Title\", \"3.Search by Genre\",\"4.Back to Login Menu\");\n\t}", "public void displayMenu() {\n\t\tSystem.out.println(\"\\n1 to see vehicles in a date interval\");\n\t\tSystem.out.println(\"2 to see a specific reservation\");\n\t\tSystem.out.println(\"3 to see all reservations\");\n\t\tSystem.out.println(\"9 to exit\\n\");\n\t\ttry {\n\t\t\tString in = reader.readLine();\n\t\t\tswitch (in) {\n\t\t\tcase \"1\":\n\t\t\t\tdisplayCarsInInterval();\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdisplaySpecificBooking();\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\tdisplayBookings();\n\t\t\t\tbreak;\n\t\t\tcase \"9\":\n\t\t\t\tSystem.out.println(\"Client application terminated\");\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Please insert a valid number\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unexpected problem with reading your input, please try again.\");\n\t\t}\n\t\tdisplayMenu();\n\t}", "public void controllerMenu(){\n\t\tint option=1;\n\t\t\n\t\twhile(option!=0){ \n\t\t\tSystem.out.println(\"You are in the air controller menu\");\n\t\t\tSystem.out.println(\"Write the number corresponding to the action you quant to perform:\");\n\t\t\tSystem.out.println(\"1. Add plane (basic info)\");\n\t\t\tSystem.out.println(\"2. Add detailed information of a plane\");\n\t\t\tSystem.out.println(\"3. Show airspace\");\n\t\t\tSystem.out.println(\"4. Encrypt plane\");\n\t\t\tSystem.out.println(\"5. Decrypt plane\");\n\t\t\tSystem.out.println(\"Press 0 to exit\");\n\t\t\t\n\t\t\toption = entry.nextInt();\n\t\t\t\n\t\t\tswitch(option){\t// switch with a method for each operation\n\t\t\t\tcase 1: \n\t\t\t\t\taddPlane();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: \n\t\t\t\t\tafegirInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: \n\t\t\t\t\tdisplayInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \n\t\t\t\t\tencrypt();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdesencriptar();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "public static void printMenu() {\n System.out.print(\"\\n(A)dd Item (R)emove Item (F)ind Item (I)nitialize Tree (N)ew Tree (Q)uit\\n\");\n }", "public void readTheMenu();", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "private void menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(menuTitle);\n\t\tfor(int i=1; i<menuArr.length; i++)\n\t\t{\n\t\t\tSystem.out.printf(\"%d.%s \", i, menuArr[i]);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"¼±Åà : \");\n\t\tint num = scan.nextInt();\n\t\tdata.number = num;\n\t\t\n\t}", "public static void showMenu(Keyboard[] kb)\r\n\t{\r\n\t\t// Testing what's in the array, possibly turn this into a method later\r\n\t\tfor (int j = 0; j < kb.length; j++)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSystem.out.printf ( \"Listing %s -\\n%s\\n\", j+1, kb[j].toStringMenu ( ));\r\n\t\t\t} \r\n\t\t\tcatch (NullPointerException e)\r\n\t\t\t{// exits the loop after the keyboards have all been printed\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}", "public int menu(String[] menu);", "public void printMenu()\n\t{\n\t\tSystem.out.println(SearchMenu.MENU_HEAD);\n\t\tSystem.out.println(SearchMenu.TYPE_MESSAGE );\n\t\tSystem.out.println(SearchMenu.QUIT);\n\t\tSystem.out.println(SearchMenu.MENU_TAIL);\n\t\tSystem.out.println(SearchMenu.INPUT_PROMPT);\n\t}", "public void getMenuChoice()\n {\n boolean finished = false;\n \n while(!finished)\n {\n printHeading();\n String choice = Menu.getMenuChoice(menuChoices);\n executeMenuChoice(choice);\n \n if(choice.startsWith(\"quit\"))\n {\n finished = true;\n }\n }\n }", "public void printMenu()\n\t{\n\t\tSystem.out.println(ChatMenu.MENU_HEAD);\n\t\tSystem.out.println(ChatMenu.TYPE_MESSAGE + ChatMaintainer.CS().getPartner());\n\t\tSystem.out.println(ChatMenu.QUIT);\n\t\tSystem.out.println(ChatMenu.MENU_TAIL);\n\t\tSystem.out.println(ChatMenu.INPUT_PROMPT);\n\t}", "public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public static void structEngineerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Structural Engineer's Information\");\n System.out.println(\"2 - Would you like to search for a Structural Engineer's Information\");\n System.out.println(\"3 - Adding a new Structural Engineer's Information\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public void customerMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Customer Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. View games and albums |\");\n System.out.println(\"| - Sorted by Ratings (Best to worst) |\");\n System.out.println(\"| - Sorted by Album Year (Most recent) |\");\n System.out.println(\"| - Sorted by Title (A-Z) |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 2. Search game by Genre |\");\n System.out.println(\"| 3. Search album by Year |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 4. Rent a game |\");\n System.out.println(\"| 5. Rent an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 6. Send message to customer |\");\n System.out.println(\"| 7. Send message to employee |\");\n System.out.println(\"| 8. Read my messages \" + messageController.checkNewMsg(activeId, \"Customer\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. Request membership upgrade |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 10. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> productSortView(activeId);\n case \"2\" -> dartController.searchProduct(\"Game\");\n case \"3\" -> dartController.searchProduct(\"Album\");\n case \"4\" -> dartController.checkRental(activeId, \"Game\");\n case \"5\" -> dartController.checkRental(activeId, \"Album\");\n case \"6\" -> messageController.buildMessage(activeId, \"Customer\", \"Customer\", null, \"message\", null);\n case \"7\" -> messageController.buildMessage(activeId, \"Customer\", \"Employee\", null, \"message\", null);\n case \"8\" -> messageController.openInbox(activeId, \"Customer\");\n case \"9\" -> userController.customerUpgradeRequest(activeId);\n case \"10\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\n }", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }", "static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "private static int HQmenu() {\n\t\tlogger.info(\"Entering HQmenu method -->\");\n\t\tint choice = 0;\n\t\tboolean ok;\n\t\tdo {\n\t\t\tok = true;\n\t\t\tSystem.out.println(\"Money Service HQ\");\n\t\t\tSystem.out.println(\"----------------\");\n\t\t\tSystem.out.println(\"What would you like to do?\");\n\t\t\tSystem.out.println(\"1 - Register a new exchange office\");\n\t\t\tSystem.out.println(\"2 - Get statistics for registered offices\");\n\t\t\tSystem.out.println(\"0 - Exit the HQ application\");\n\n\t\t\tSystem.out.print(\"Enter your choice: \");\n\t\t\tString userChoice = CLIHelper.input.next();\n\n\t\t\ttry {\n\t\t\t\tchoice = Integer.parseInt(userChoice);\n\t\t\t}catch(NumberFormatException e) {\n\t\t\t\tlogger.log(Level.WARNING, \"choice: \" + choice + \" made exception! \" + e);\n\t\t\t\tSystem.out.format(\"Your choice %s is not accepted!\\n\", userChoice);\n\t\t\t\tok = false;\n\t\t\t}\n\t\t}while(!ok);\n\n\t\tlogger.info(\"Exiting HQmenu method <--\");\n\t\treturn choice;\n\t}", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "private static void menu()\r\n\t{\r\n\t\tSystem.out.println(\"0. ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" Seed 5 URLs, set 3 keywords, creates 1000 Producers and 10 Consumers\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"1. Add seed url\");\r\n\t\tSystem.out.println(\"2. Add consumer (Parser)\");\r\n\t\tSystem.out.println(\"3. Add producer (Fetcher)\");\r\n\t\tSystem.out.println(\"4. Add keyword search\");\r\n\t\tSystem.out.println(\"5. Print stats\");\r\n\t}", "public String choiceMenu() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Move (W/A/S/D)\");\n\t\tSystem.out.println(\"Check Hero Info (I)\");\n\t\tSystem.out.println(\"Check Inventory (E)\");\n\t\tSystem.out.println(\"Check Map (M)\");\n\t\tSystem.out.println(\"End Turn (T)\");\n\t\tSystem.out.println(\"Quit (Q)\");\n\t\t\n\t\tString s = parseString().toUpperCase();\n\t\tboolean isValidString = false;\n\t\twhile(!isValidString) {\n\t\t\tif(s.equals(\"W\") || s.equals(\"A\") || s.equals(\"S\") || s.equals(\"D\") || s.equals(\"I\") \n\t\t\t\t\t|| s.equals(\"E\") || s.equals(\"M\") || s.equals(\"T\") || s.equals(\"Q\")) {\n\t\t\t\tisValidString = true;\t\n\t\t\t} else {\n\t\t\t\tprintErrorParse();\n\t\t\t\ts = parseString().toUpperCase();\n\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn s;\n\t}", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "public void employeeMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Employee Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Register a game |\");\n System.out.println(\"| 2. Remove a game |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 3. Register an album |\");\n System.out.println(\"| 4. Remove an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. Register a customer |\");\n System.out.println(\"| 6. Upgrade a customer |\");\n System.out.println(\"| 7. Remove a customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 8. Return rented item |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. View all games and albums (sorted) |\");\n System.out.println(\"| 10. View all customers |\");\n System.out.println(\"| 11. View all rentals and history |\");\n System.out.println(\"| 12. View total rent profit |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Send message to customer |\");\n System.out.println(\"| 14. Send message to employee |\");\n System.out.println(\"| 15. Read my messages \" + messageController.checkNewMsg(activeId, \"Employee\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 16. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> dartController.addGame();\n case \"2\" -> dartController.deleteProduct(\"Game\");\n case \"3\" -> dartController.addAlbum();\n case \"4\" -> dartController.deleteProduct(\"Album\");\n case \"5\" -> userController.addCustomer();\n case \"6\" -> userController.upgradeCustomerView(null);\n case \"7\" -> userController.deleteCustomer();\n case \"8\" -> dartController.returnRental();\n case \"9\" -> productSortView(activeId);\n case \"10\" -> userController.displayCustomers(false);\n case \"11\" -> dartController.viewCurrentRentals();\n case \"12\" -> dartController.viewRentalTotalProfit();\n case \"13\" -> messageController.buildMessage(activeId, \"Employee\", \"Customer\", null, \"message\", null);\n case \"14\" -> messageController.buildMessage(activeId, \"Employee\", \"Employee\", null, \"message\", null);\n case \"15\" -> messageController.openInbox(activeId, \"Employee\");\n case \"16\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\n }", "public void getAccess() {\n\t\t// Display menu options\n\t\tSystem.out.println(\n\t\t\t\"\\nWelcome to PittTours are you a:\" +\n\t\t\t\"\\n1: Administrator\" +\n\t\t\t\"\\n2: Customer\" +\n\t\t\t\"\\n3: Neither, Quit\\n\");\n\n\t\t// Get user input\n\t\tSystem.out.print(\"Enter menu choice: \");\n\t\tinputString = scan.nextLine();\n\t\t// Convert input to integer, if not convertable, set to 0 (invalid)\n\t\ttry { choice = Integer.parseInt(inputString);\n\t\t} catch(NumberFormatException e) {choice = 0;}\n\n\t\t// Handle user choices\n\t\tif(choice == 1)\n\t\t\tdisplayAdmInterface();\n\t\telse if(choice == 2)\n\t\t\tdisplayCusInterface();\n\t\telse if(choice == 3) {} // Simply drops back to main to properly exit\n\t\telse { // If invalid choice, recall method\n\t\t\tSystem.out.println(\"INVALID CHOICE\");\n\t\t\tgetAccess();\n\t\t}\n\t}", "private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }", "void askMenu();", "public static void f_menu(){\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"-------------Soft_AVERAGE_HEIGHT-----------------\");\n System.out.println(\"-------------version 1.0 23-oct-2020------------\");\n System.out.println(\"-------------make by Esteban Gaona--------------\");\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"-------------------------------------------------\");\n}", "private static void displayMenu() {\n\t\tSystem.out.println(\"\\n\\nWelcome to Seneca@York Bank!\\n\" +\n\t\t\t\t\"1. Open an account.\\n\" +\n\t\t\t\t\"2. Close an account.\\n\" +\n\t\t\t\t\"3. Deposit money.\\n\" +\n\t\t\t\t\"4. Withdraw money.\\n\" +\n\t\t\t\t\"5. Display accounts. \\n\" +\n\t\t\t\t\"6. Display a tax statement.\\n\" +\n\t\t\t\t\"7. Exit\\n\");\n\t}", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "private String initialMenu(String command) {\n System.out.println(\"1: Show Arrays On/Off\");\n System.out.println(\"2: Time comparison\");\n System.out.println(\"x: Stop the program\\n\");\n\n command = scanner.nextLine();\n\n return command;\n }", "public String promptMenu() {\n String selection;\n promptMenu: do {\n selection = promptString(\n \"\\n======== FLOORING PROGRAM MAIN MENU ========\\n\" + \n \"DISPLAY - Display Orders\\n\" + \n \"ADD - Add an Order\\n\" + \n \"EDIT - Edit an Order\\n\" + \n \"REMOVE - Remove an Order\\n\" + \n \"EXPORT - Export all data to file\\n\" + \n \"EXIT - Exit\\n\" +\n \"What would you like to do?\"\n );\n \n switch(selection.toLowerCase()) {\n case \"display\":\n case \"add\":\n case \"edit\":\n case \"remove\":\n case \"export\":\n case \"exit\":\n break promptMenu;\n default:\n continue;\n }\n } while(true);\n \n return selection;\n }", "public void printMenu()\n\t{\n\t\tSystem.out.println(ChatMenu.MENU_HEAD);\n\t\tSystem.out.println(ChatMenu.TYPE_MESSAGE);\n\t\tSystem.out.println(ChatMenu.QUIT);\n\t\tSystem.out.println(ChatMenu.MENU_TAIL);\n\t\tSystem.out.println(ChatMenu.INPUT_PROMPT);\n\t}", "public void stringPresentation () {\n System.out.println ( \"****** String Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n bookArrayList = new Request().postRequestBook();\n for (Book book: bookArrayList) {\n System.out.println(book.toString());\n }\n ClientEntry.showMenu ( );\n\n }", "@Override\n public String[] displayMenu() {\n\n PersonalMatchDAO personalMatchDAO = new PersonalMatchDAO();\n personalMatchDAO.listAllPersonalMatches();\n\n String[] str = {selection};\n return str;\n\n }", "public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }", "private static String mainMenu(){\n\t\tSystem.out.println(\"==================================\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"Please select from the following:\");\n\t\tSystem.out.println(\"1. Display all available courses and add course\");\n\t\tSystem.out.println(\"2. Display all enrolled courses and drop course\");\n\t\tSystem.out.println(\"3. Logout\");\n\t\tSystem.out.print(\"Enter the number of you request: \"); \n\t\tString selection = input.nextLine();\n\t\tSystem.out.println(\"\");\n\t\treturn selection;\n\t}", "public static String showMenu() {\n System.out.println(\"-------------------\");\n System.out.println(\"(1) - ADD A CARD\");\n System.out.println(\"(2) - REMOVE A CARD\");\n System.out.println(\"(3) - UPDATE A CARD\");\n System.out.println(\"(4) - SHOW THE COLLECTION\");\n System.out.println(\"(5) - SEARCH\");\n System.out.println(\"-------------------\");\n System.out.println(\"(C) - CHANGING PLAYER\");\n System.out.println(\"(A) - ADD TO DECK \");\n System.out.println(\"(X) - SHOW DECK\");\n System.out.println(\"-------------------\");\n\n return keyboardChoice.nextLine();\n }", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "void printMainMenu(){\n\t\tSystem.out.println(\"\\n\\nMarketo Music\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"1. Create Playlist: create <playlist name>\");\n\t\tSystem.out.println(\"2. Edit Playlist: edit <playlist id>\");\n\t\tSystem.out.println(\"3. Print Song: song <song id>\");\n\t\tSystem.out.println(\"4. Print Playlist: playlist <playlist id>\");\n\t\tSystem.out.println(\"5. Print All Songs or Playlists: print song/playlist\");\n\t\tSystem.out.println(\"6. Search Song: search artist/title <string of words to be searched>\");\n\t\tSystem.out.println(\"7. Sort songs: sort artist/title\");\n\t\tSystem.out.println(\"8. Quit: quit\");\n\t\tSystem.out.print(\"Enter a Command : \");\n\t}", "public static void printMenu()\r\n\t{\r\n\t\tSystem.out.println(\"A) Add Scene\");\r\n\t\tSystem.out.println(\"R) Remove Scene\");\r\n\t\tSystem.out.println(\"S) Show Current Scene\");\r\n\t\tSystem.out.println(\"P) Print Adventure Tree\");\r\n\t\tSystem.out.println(\"B) Go Back A Scene\");\r\n\t\tSystem.out.println(\"F) Go Forward A Scene \");\r\n\t\tSystem.out.println(\"G) Play Game\");\r\n\t\tSystem.out.println(\"N) Print Path To Cursor\");\r\n\t\tSystem.out.println(\"M) Move Scene\");\r\n\t\tSystem.out.println(\"Q) Quit\");\r\n\t\tSystem.out.println();\r\n\t}", "public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}", "public static void structEMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Structural Engineer Profile\");\n System.out.println(\"2 - Search for Structural Engineer Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "public static void menu(){\n System.out.println(\"-Ingrese el número correspondiente-\");\n System.out.println(\"------------ Opciones -------------\");\n System.out.println(\"------------ 1. Sumar -------------\");\n System.out.println(\"------------ 2. Restar ------------\");\n System.out.println(\"------------ 3. Multiplicar -------\");\n System.out.println(\"------------ 4. Dividir -----------\");\n }", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public void managerMenu() {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Manager Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Add an employee |\");\n System.out.println(\"| 2. Remove an employee |\");\n System.out.println(\"| 3. View all employees |\");\n System.out.println(\"| 4. View employees' total salary cost |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. View total rent profit |\");\n System.out.println(\"| 6. View most profitable item |\");\n System.out.println(\"| 7. View most frequent rented item |\");\n System.out.println(\"| 8. View best customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. Load user, product data file |\");\n System.out.println(\"| 10. Load rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 11. Save DART data file |\");\n System.out.println(\"| 12. Save Rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n\n DartController dart = new DartController();\n\n switch (userInput.toLowerCase()) {\n case \"1\" -> userController.addEmployee();\n case \"2\" -> userController.deleteEmployee();\n case \"3\" -> userController.displayEmployees(false);\n case \"4\" -> userController.calculateSalary();\n case \"5\" -> dart.viewRentalTotalProfit();\n case \"6\" -> dart.viewRentalProfitable();\n case \"7\" -> dart.viewRentalFrequency();\n case \"8\" -> dart.viewRentalBestCustomer();\n case \"9\" -> dart.loadProductData();\n case \"10\" -> dart.loadRentalData();\n case \"11\" -> dart.saveProductData();\n case \"12\" -> dart.saveRentalData();\n case \"13\" -> mainMenu();\n\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMainMenu\", String.valueOf(e));\n }\n }", "private void menuOptionOne(){\n SimulatorFacade.printTransactions();\n pressAnyKey();\n }", "private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }", "public static void printMenu(BankAgency ag) {\n\t\tSystem.out.println(\"Menu of \" + ag.getAgencyName() + \" (\" + ag.getAgencyLoc() + \")\");\n\t\tSystem.out.println(\"1 - List of the Agency accounts\");\n\t\tSystem.out.println(\"2 - See an account (by its number)\");\n\t\tSystem.out.println(\"3 - Operation on account\");\n\t\tSystem.out.println(\"4 - Account management\");\n\t\tSystem.out.println(\"0 - Quit\");\n\t\tSystem.out.print(\"Choice -> \");\n\t}", "public static void helper(){\n System.out.println(\"\\n0: Search Transaction\");\n System.out.println(\"1: New Transaction\");\n System.out.println(\"2: Query Transaction Detail\");\n System.out.println(\"back: return last menu\");\n }", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "private void printMainMenu() {\n\t\tSystem.out.println(\"1. Go adventuring\");\n\t\tSystem.out.println(\"2. Enter tavern\");\n\t\tSystem.out.println(\"3. Show details about your character\");\n\t\tSystem.out.println(\"4. Exit game\");\n\t}" ]
[ "0.73732364", "0.7139803", "0.708755", "0.70795655", "0.70733273", "0.7057461", "0.7019892", "0.69607294", "0.6954283", "0.69096076", "0.69074833", "0.6905256", "0.68914926", "0.68769926", "0.68746823", "0.6860502", "0.68484515", "0.6842767", "0.68419844", "0.6841047", "0.68265253", "0.6819991", "0.6818884", "0.6804372", "0.6804043", "0.6804005", "0.67817914", "0.6768407", "0.67558485", "0.675014", "0.67446244", "0.6725379", "0.67199", "0.6713929", "0.67058223", "0.67011744", "0.6679935", "0.6661194", "0.6650547", "0.66437274", "0.6643525", "0.6628782", "0.66235936", "0.6622683", "0.6615024", "0.6612409", "0.6604814", "0.65919274", "0.6579304", "0.6578103", "0.6577703", "0.6567505", "0.6560549", "0.6551255", "0.6550079", "0.65458024", "0.65416443", "0.6535866", "0.65343744", "0.6532325", "0.65322095", "0.653169", "0.6529289", "0.6529252", "0.65281826", "0.6516746", "0.6513398", "0.65091676", "0.65090925", "0.65064055", "0.6494556", "0.6492848", "0.6491611", "0.64910674", "0.64831835", "0.647735", "0.647629", "0.64755255", "0.64744365", "0.64680785", "0.64517915", "0.64504343", "0.6445275", "0.6445255", "0.6434651", "0.6430686", "0.64303887", "0.64300966", "0.6423598", "0.64166737", "0.6390668", "0.638993", "0.63870513", "0.6378137", "0.6376483", "0.63734394", "0.63688934", "0.63662946", "0.63613194", "0.63592994", "0.6357506" ]
0.0
-1
Function that displays the menu and gets the users choice
private static String getUserChoice(String[] menu){ System.out.println(""); for(int i = 0; i < menu.length; i++){ if(i == 0){ System.out.println("\t--" + menu[i] + "--"); } else{ System.out.println("\t" + i + ") " + menu[i]); } } System.out.print("Please enter your choice: "); Scanner in = new Scanner(System.in); return in.nextLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}", "public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}", "public void getMenuChoice()\n {\n boolean finished = false;\n \n while(!finished)\n {\n printHeading();\n String choice = Menu.getMenuChoice(menuChoices);\n executeMenuChoice(choice);\n \n if(choice.startsWith(\"quit\"))\n {\n finished = true;\n }\n }\n }", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "void askMenu();", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "private static void MainMenuRec(){\n System.out.println(\"Choose one of the following:\");\n System.out.println(\"-----------------------------\");\n System.out.println(\"1. Book room\");\n System.out.println(\"2. Check-out\");\n System.out.println(\"3. See room list\");\n System.out.println(\"4. Create a new available room\");\n System.out.println(\"5. Delete a room\");\n System.out.println(\"6. Make a room unavailable\");\n System.out.println(\"7. Make a (unavailable) room available\");\n System.out.println(\"8. Back to main menu\");\n System.out.println(\"-----------------------------\");\n }", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "public int displayMenuAndGetUserSelection(){\n view.promptInt(\"1. Create a Character\");\n view.promptInt(\"2. Update a Character\");\n view.promptInt(\"3. Display all Characters\");\n view.promptInt(\"4. Search for a Character\");\n view.promptInt(\"5. Delete a Character\");\n view.promptInt(\"6. Exit\");\n return view.promptInt(\"Select from one of the above choices\");\n }", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}", "private String printMainMenu() {\n System.out.println(\"Please make a selection:\");\n System.out.println(\"1: List all tools\");\n System.out.println(\"2: Search for tool by toolName\");\n System.out.println(\"3: Search for tool by toolID\");\n System.out.println(\"4: Check item quantity\");\n System.out.println(\"5: Decrease item quantity\");\n System.out.println(\"6: Make New Order/Append Today's Order\");\n System.out.println(\"7: View Current Orders\");\n System.out.println(\"8: View Supplier List\");\n System.out.println(\"9: Quit\");\n String selection = this.userInput.nextLine();\n return selection;\n }", "public String promptMenu() {\n String selection;\n promptMenu: do {\n selection = promptString(\n \"\\n======== FLOORING PROGRAM MAIN MENU ========\\n\" + \n \"DISPLAY - Display Orders\\n\" + \n \"ADD - Add an Order\\n\" + \n \"EDIT - Edit an Order\\n\" + \n \"REMOVE - Remove an Order\\n\" + \n \"EXPORT - Export all data to file\\n\" + \n \"EXIT - Exit\\n\" +\n \"What would you like to do?\"\n );\n \n switch(selection.toLowerCase()) {\n case \"display\":\n case \"add\":\n case \"edit\":\n case \"remove\":\n case \"export\":\n case \"exit\":\n break promptMenu;\n default:\n continue;\n }\n } while(true);\n \n return selection;\n }", "public static String showMenu() {\n System.out.println(\"-------------------\");\n System.out.println(\"(1) - ADD A CARD\");\n System.out.println(\"(2) - REMOVE A CARD\");\n System.out.println(\"(3) - UPDATE A CARD\");\n System.out.println(\"(4) - SHOW THE COLLECTION\");\n System.out.println(\"(5) - SEARCH\");\n System.out.println(\"-------------------\");\n System.out.println(\"(C) - CHANGING PLAYER\");\n System.out.println(\"(A) - ADD TO DECK \");\n System.out.println(\"(X) - SHOW DECK\");\n System.out.println(\"-------------------\");\n\n return keyboardChoice.nextLine();\n }", "private static String mainMenu(){\n\t\tSystem.out.println(\"==================================\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"Please select from the following:\");\n\t\tSystem.out.println(\"1. Display all available courses and add course\");\n\t\tSystem.out.println(\"2. Display all enrolled courses and drop course\");\n\t\tSystem.out.println(\"3. Logout\");\n\t\tSystem.out.print(\"Enter the number of you request: \"); \n\t\tString selection = input.nextLine();\n\t\tSystem.out.println(\"\");\n\t\treturn selection;\n\t}", "public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }", "public static void menu() {\n\n\t\tSystem.out.println(\"\\n*** MENU ***: \");\n\t\tSystem.out.print(\"\\n1. Host current Date and Time\\n\" + \"2. Host uptime\\n\" + \"3. Host memory use\\n\"\n\t\t\t\t+ \"4. Host IPV4 socket connections\\n\" + \"5. Host current users\\n\" + \"6. Host running processes\\n\"\n\t\t\t\t+ \"7. Quit\\n\" + \"\\nSelect option: \");\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tmenuSelect = sc.nextInt();\n\t\t\tif (menuSelect < 1 || menuSelect > 7) {\n\t\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tswitch (menuSelect) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Date Request from Client\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"Uptime Request from Client\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Memory Use Request from Client\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"IPV4 Socket Connections Request from Client\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"Current Users Request from Client\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"Current OS Version Request from Client\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Quit\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tsc.close(); // close the Scanner object\n\t}", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "private void processChoice() {\n switch (this.choice) {\n case 0:\n System.out.println(\"Log Out\");\n break;\n case 1:\n System.out.println(\"Open New Account\");\n break;\n case 2:\n System.out.println(\"View All Accounts\");\n break;\n case 3:\n System.out.println(\"View Transactions\");\n break;\n case 4:\n System.out.println(\"Transfer Funds\");\n break;\n default:\n System.out.println(\"Error! Invalid menu option\");\n break;\n }\n }", "protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }", "private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "private static void makeMenuChoice() {\r\n\t\tint value = Integer.MAX_VALUE;\r\n\t\twhile (value != 0) {\r\n\t\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\" Please make your choice, by entering the assigned number\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\" 1: Search for a specific item\");\r\n\t\t\tSystem.out.println(\" 2: View shops\");\r\n\t\t\tSystem.out.println(\" 3: View cart\");\r\n\t\t\tSystem.out.println(\" 4: Checkout cart\");\r\n\t\t\tSystem.out.println(\" 0: Quit\");\r\n\t\t\tvalue = getValidUserInput(scanner, 5);\r\n\t\t\tswitch (value) {\r\n\t\t\tcase 0: \r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(\" Bye!\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tsearchForItem();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tviewItems();\r\n\t\t\t\tbreak; \r\n\t\t\tcase 3:\r\n\t\t\t\tviewCart();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tcheckoutCart();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "private static int HQmenu() {\n\t\tlogger.info(\"Entering HQmenu method -->\");\n\t\tint choice = 0;\n\t\tboolean ok;\n\t\tdo {\n\t\t\tok = true;\n\t\t\tSystem.out.println(\"Money Service HQ\");\n\t\t\tSystem.out.println(\"----------------\");\n\t\t\tSystem.out.println(\"What would you like to do?\");\n\t\t\tSystem.out.println(\"1 - Register a new exchange office\");\n\t\t\tSystem.out.println(\"2 - Get statistics for registered offices\");\n\t\t\tSystem.out.println(\"0 - Exit the HQ application\");\n\n\t\t\tSystem.out.print(\"Enter your choice: \");\n\t\t\tString userChoice = CLIHelper.input.next();\n\n\t\t\ttry {\n\t\t\t\tchoice = Integer.parseInt(userChoice);\n\t\t\t}catch(NumberFormatException e) {\n\t\t\t\tlogger.log(Level.WARNING, \"choice: \" + choice + \" made exception! \" + e);\n\t\t\t\tSystem.out.format(\"Your choice %s is not accepted!\\n\", userChoice);\n\t\t\t\tok = false;\n\t\t\t}\n\t\t}while(!ok);\n\n\t\tlogger.info(\"Exiting HQmenu method <--\");\n\t\treturn choice;\n\t}", "public void displayMenu() {\n\t\tSystem.out.println(\"\\n1 to see vehicles in a date interval\");\n\t\tSystem.out.println(\"2 to see a specific reservation\");\n\t\tSystem.out.println(\"3 to see all reservations\");\n\t\tSystem.out.println(\"9 to exit\\n\");\n\t\ttry {\n\t\t\tString in = reader.readLine();\n\t\t\tswitch (in) {\n\t\t\tcase \"1\":\n\t\t\t\tdisplayCarsInInterval();\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdisplaySpecificBooking();\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\tdisplayBookings();\n\t\t\t\tbreak;\n\t\t\tcase \"9\":\n\t\t\t\tSystem.out.println(\"Client application terminated\");\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Please insert a valid number\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unexpected problem with reading your input, please try again.\");\n\t\t}\n\t\tdisplayMenu();\n\t}", "public static int menu()\n {\n \n int choix;\n System.out.println(\"MENU PRINCIPAL\");\n System.out.println(\"--------------\");\n System.out.println(\"1. Operation sur les membres\");\n System.out.println(\"2. Operation sur les taches\");\n System.out.println(\"3. Assignation de tache\");\n System.out.println(\"4. Rechercher les taches assigne a un membre\");\n System.out.println(\"5. Rechercher les taches en fonction de leur status\");\n System.out.println(\"6. Afficher la liste des taches assignees\");\n System.out.println(\"7. Sortir\");\n System.out.println(\"--------------\");\n System.out.print(\"votre choix : \");\n choix = Keyboard.getEntier();\n System.out.println();\n return choix;\n }", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}", "public static void startMenu() {\n\t\tSystem.out.println(\"|**********************************|\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"| Welcome to the Anny BankingApp! |\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"************************************\");\n\n\t\tSystem.out.println(\"Please select your option:\");\n\t\tSystem.out.println(\"\\t[c]reate a new Account\");\n\t\tSystem.out.println(\"\\t[l]ogin to Your Account!\");\n\t\tSystem.out.println(\"\\t[a]dmin Menu\");\n\t\tSystem.out.println(\"\\t[e]mployee Menu\");\n\t\tSystem.out.println(\"\\t[o]Log Out\");\n\n\t\t//create variable to grab the input\n\t\tString option =scan.nextLine();\n\n\n\t\t//this switch case will based on chioce the users made////can be lowercase or uppercase letter\n\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"c\":\n\t\t\tcreateNewAccount();\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\t\tloginToAccount();\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"a\":\n\t\t\tadminMenu();\n\t\t\tbreak;\n\t\tcase \"e\":\n\t\t\temployeeMenu();\n\t\t\tbreak;\n\t\tcase \"o\":\n\t\t\tSystem.out.println(\"You Successfully logged out, back to main menu!!!\");\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Try again\");\n\t\t\tstartMenu();//Return to startmenu if choice not match\n\t\t\tbreak;\n\t\t}\n\n\t}", "public void displayMenu() {\r\n\t\tSystem.out.println(\"Enter a number between 0 and 8 as explained below: \\n\");\r\n\t\tSystem.out.println(\"[\" + ADD_CUSTOMER + \"] Add a customer.\");\r\n\t\tSystem.out.println(\"[\" + ADD_MODEL + \"] Add a model.\");\r\n\t\tSystem.out.println(\"[\" + ADD_TO_INVENTORY + \"] Add a washer to inventory.\");\r\n\t\tSystem.out.println(\"[\" + PURCHASE + \"] Purchase a washer.\");\r\n\t\tSystem.out.println(\"[\" + LIST_CUSTOMERS + \"] Display all customers.\");\r\n\t\tSystem.out.println(\"[\" + LIST_WASHERS + \"] Display all washers.\");\r\n\t\tSystem.out.println(\"[\" + DISPLAY_TOTAL + \"] Display total sales.\");\r\n\t\tSystem.out.println(\"[\" + SAVE + \"] Save data.\");\r\n\t\tSystem.out.println(\"[\" + EXIT + \"] to Exit\");\r\n\t}", "public static void menu()\r\n {\n\t\t Scanner scan = new Scanner(System.in);\r\n\t\t System.out.println(\"Please enter your choice : \");\r\n\t\t int choice = scan.nextInt();\r\n\t\t switch(choice)\r\n\t\t {\r\n\t\t case 1:\r\n\t\t\t viewFiles();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 2: \r\n\t\t\t createNew();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 3: \r\n\t\t\t searchFile();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 4: \r\n\t\t deleteFile();\r\n\t\t goback();\r\n\t\t break;\r\n\t\t case 5: \r\n\t\t\t exit();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t \r\n\t\t default :\r\n\t\t\t System.out.println(\"please enter a only 1,2,3 or 4\");\r\n\t\t\t goback();\r\n\t }\r\n\t }", "private static void displayMenu() {\n System.out.println(\"Menu : \");\n System.out.println(\"Type any number for selection\");\n for (int i = 1; i <= totalPlayers; i++) {\n System.out.println(i + \")View \" + playerList.get(i - 1) + \" cards\");\n }\n System.out.println(\"8)Display Each Player's Hand Strength\");\n System.out.println(\"9)Declare Winner\");\n System.out.println(\"10)Exit\");\n }", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "public void getAccess() {\n\t\t// Display menu options\n\t\tSystem.out.println(\n\t\t\t\"\\nWelcome to PittTours are you a:\" +\n\t\t\t\"\\n1: Administrator\" +\n\t\t\t\"\\n2: Customer\" +\n\t\t\t\"\\n3: Neither, Quit\\n\");\n\n\t\t// Get user input\n\t\tSystem.out.print(\"Enter menu choice: \");\n\t\tinputString = scan.nextLine();\n\t\t// Convert input to integer, if not convertable, set to 0 (invalid)\n\t\ttry { choice = Integer.parseInt(inputString);\n\t\t} catch(NumberFormatException e) {choice = 0;}\n\n\t\t// Handle user choices\n\t\tif(choice == 1)\n\t\t\tdisplayAdmInterface();\n\t\telse if(choice == 2)\n\t\t\tdisplayCusInterface();\n\t\telse if(choice == 3) {} // Simply drops back to main to properly exit\n\t\telse { // If invalid choice, recall method\n\t\t\tSystem.out.println(\"INVALID CHOICE\");\n\t\t\tgetAccess();\n\t\t}\n\t}", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "public String choiceMenu() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Move (W/A/S/D)\");\n\t\tSystem.out.println(\"Check Hero Info (I)\");\n\t\tSystem.out.println(\"Check Inventory (E)\");\n\t\tSystem.out.println(\"Check Map (M)\");\n\t\tSystem.out.println(\"End Turn (T)\");\n\t\tSystem.out.println(\"Quit (Q)\");\n\t\t\n\t\tString s = parseString().toUpperCase();\n\t\tboolean isValidString = false;\n\t\twhile(!isValidString) {\n\t\t\tif(s.equals(\"W\") || s.equals(\"A\") || s.equals(\"S\") || s.equals(\"D\") || s.equals(\"I\") \n\t\t\t\t\t|| s.equals(\"E\") || s.equals(\"M\") || s.equals(\"T\") || s.equals(\"Q\")) {\n\t\t\t\tisValidString = true;\t\n\t\t\t} else {\n\t\t\t\tprintErrorParse();\n\t\t\t\ts = parseString().toUpperCase();\n\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn s;\n\t}", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "public static int dispAndGetMenu ( int menu ) {\n\t\tif ( menu == 0 ) { // if menu to display is main menu\n\t\t\tSystem.out.println ( \" Contacts Menu\" );\n\t\t\tSystem.out.println ( \"1. Add Contact\" );\n\t\t\tSystem.out.println ( \"2. Remove Contact\" );\n\t\t\tSystem.out.println ( \"3. Search for Contact\" );\n\t\t\tSystem.out.println ( \"4. Update Contact\" );\n\t\t\tSystem.out.println ( \"5. Show Contacts\" );\n\t\t\tSystem.out.println ( \"6. Quit\" );\n\t\t\tSystem.out.print ( \"Enter menu choice: \" );\n\t\t\treturn CheckInput.getIntRange ( 1, 6 ); // choose 1-6\n\t\t} else if ( menu == 2 ) { // submenu 2 for removing contacts\n\t\t\tSystem.out.print ( \"\\n\" );\n\t\t\tSystem.out.println ( \" Contact Removal Menu\" );\n\t\t\tSystem.out.println ( \"1. First and Last Name\" );\n\t\t\tSystem.out.println ( \"2. Index\" );\n\t\t\tSystem.out.print ( \"Remove by: \" );\n\t\t\treturn CheckInput.getIntRange ( 1, 2 ); // choose 1 or 2\n\t\t} else if ( menu == 3 ) { // submenu 3 for searching for a contact\n\t\t\tSystem.out.print ( \"\\n\" );\n\t\t\tSystem.out.println ( \" Contact Searching Menu\" );\n\t\t\tSystem.out.println ( \"1. Last Name\" );\n\t\t\tSystem.out.println ( \"2. Zip Code\" );\n\t\t\tSystem.out.print ( \"Search by: \" );\n\t\t\treturn CheckInput.getIntRange ( 1, 2 );\n\t\t} else { // submenu 4 for updating contacts\n\t\t\tSystem.out.print ( \"\\n\" );\n\t\t\tSystem.out.println ( \" Contact Updating Menu\" );\n\t\t\tSystem.out.println ( \"1. First Name\" );\n\t\t\tSystem.out.println ( \"2. Last Name\" );\n\t\t\tSystem.out.println ( \"3. Phone Number\" );\n\t\t\tSystem.out.println ( \"4. Address\" );\n\t\t\tSystem.out.println ( \"5. City \" );\n\t\t\tSystem.out.println ( \"6. Zip Code\" );\n\t\t\tSystem.out.print ( \"Update category: \" );\n\t\t\treturn CheckInput.getIntRange ( 1, 6 ); // choose 1-6\n\t\t}\n\t}", "public void readTheMenu();", "public static void displayMenu() {\n while (true) {\n m.display();\n int i = m.choice();\n m.execute1(i);\n }\n }", "private static void displayMenu() {\n\t\tSystem.out.println(\"\\n\\nWelcome to Seneca@York Bank!\\n\" +\n\t\t\t\t\"1. Open an account.\\n\" +\n\t\t\t\t\"2. Close an account.\\n\" +\n\t\t\t\t\"3. Deposit money.\\n\" +\n\t\t\t\t\"4. Withdraw money.\\n\" +\n\t\t\t\t\"5. Display accounts. \\n\" +\n\t\t\t\t\"6. Display a tax statement.\\n\" +\n\t\t\t\t\"7. Exit\\n\");\n\t}", "public void showMenu(){\n\t\tSystem.out.println(\"******************************************************\");\n\t\tSystem.out.println(\"************Welcome to the holding program************\");\n\t\tSystem.out.println(\"******************************************************\");\n\t\tint option = -1;\n\t\twhile(option != 0){\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"***************Please, select an option***************\");\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"0. To exit of the program\");\n\t\t\tSystem.out.println(\"1. To add a public service company\");\n\t\t\tSystem.out.println(\"2. To add an university company\");\n\t\t\tSystem.out.println(\"3. To add a high school company\");\n\t\t\tSystem.out.println(\"4. To add a technological company\");\n\t\t\tSystem.out.println(\"5. To add a food company\");\n\t\t\tSystem.out.println(\"6. To add a medicine company\");\n\t\t\tSystem.out.println(\"7. Show the information of the holding\");\n\t\t\tSystem.out.println(\"8. Register a poll\");\n\t\t\tSystem.out.println(\"9. To add a employee\");\n\t\t\tSystem.out.println(\"10. Find the extension of a employee\");\n\t\t\tSystem.out.println(\"11. Find the mails of all the employees that are occupied a position\");\n\t\t\tSystem.out.println(\"12. To add a product\");\n\t\t\toption = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tswitch(option){\n\t\t\t\tcase 0:\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tpublicService();\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tuniversity();\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\thighSchool();\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\ttechnological();\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\tfood();\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tmedicine();\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\tSystem.out.println(theHolding.wholeInformation());\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\tregisterPoll();\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\taddEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\textensionEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\tmailsPosition();\n\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\taddProduct();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Select a correct option\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private static int displayMenu() { // From Assignment2 Starter Code by Dave Houtman\r\n\t\tSystem.out.println(\"Enter a selection from the following menu:\");\r\n\t\tSystem.out.println(ADD_NEW_REGISTRANT + \". Enter a new registrant\\n\" \r\n\t\t\t\t+ FIND_REGISTRANT\t\t\t\t + \". Find registrant by registration number\\n\" \r\n\t\t\t\t+ LIST_REGISTRANTS \t\t\t\t + \". Display list of registrants\\n\"\r\n\t\t\t\t+ DELETE_REGISTRANT \t\t\t + \". Delete a registrant\\n\" \r\n\t\t\t\t+ ADD_NEW_PROPERTY \t\t\t\t + \". Register a new property\\n\"\r\n\t\t\t\t+ DELETE_PROPERTY \t\t\t\t + \". Delete property\\n\" \r\n\t\t\t\t+ CHANGE_PROPERTY_REGISTRANT \t + \". Change a property's registrant\\n\" \r\n\t\t\t\t+ LIST_PROPERTY_BY_REGNUM\t\t + \". Display all properties with the same registration number\\n\" \r\n\t\t\t\t+ LIST_ALL_PROPERTIES\t\t\t + \". Display all registered properties\\n\" \r\n\t\t\t\t+ LOAD_LAND_REGISTRY_FROM_BACKUP + \". Load land registry from backup\\n\" \r\n\t\t\t\t+ SAVE_LAND_REGISTRY_TO_BACKUP\t + \". Save land registry to backup\\n\" \r\n\t\t\t\t+ EXIT \t\t\t\t\t\t\t + \". Exit program\\n\");\r\n\t\tint ch = scan.nextInt();\r\n\t\tscan.nextLine(); // 'eat' the next line in the buffer\r\n\t\treturn ch;\r\n\t}", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public int showMenu() {\n // Print out menu for user choice\n System.out.println(\"==================== Login Program ====================\");\n System.out.println(\"1. Add User\");\n System.out.println(\"2. Login\");\n System.out.println(\"3. Exit\");\n System.out.print(\"Please choice one option: \");\n\n // Return number if method to check validate of input is done\n return this.checkValidate();\n }", "private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}", "public void menuDisplay() {\n\t\t\n\t\tjava.lang.System.out.println(\"\");\n\t\tjava.lang.System.out.println(\"~~~~~~~~~~~~Display System Menu~~~~~~~~~~~~\");\n\t\tjava.lang.System.out.println(\"**** Enter a Number from the Options Below ****\");\n\t\tjava.lang.System.out.println(\"Choice 1 – Print System Details\\n\" + \n\t\t\t\t\t\t \"Choice 2 - Display System Properties\\n\" +\n\t\t\t\t\t\t \"Choice 3 – Diagnose System\\n\" + \n\t\t\t\t\t\t \"Choice 4 – Set Details\\n\" + \n\t\t\t\t\t\t \"Choice 5 – Quit the program\");\n\t\t\n\t}", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "public static void menu() {\n\t\tSystem.out.println(\"\\nPlease select which type of argument to generate by entering the associated number.\\n\");\n\t\tfor(int i = 0; i < type.length; i++) {\n\t\t\tSystem.out.println((i+1)+\". \"+type[i]);\n\t\t}\n\t\tSystem.out.println(\"8. Quit\");\n\t}", "private static String getMainMenuChoice()\r\n {\r\n System.out.println(\"------Main Menu------\\n\"\r\n + \"Please choose:\\n\\t'A' to add a date to the database\"\r\n + \"\\n\\t'C' to calculate the balance\"\r\n + \"\\n\\t'E' to end Prgram\");\t\t\r\n\r\n String choice = scanner.nextLine();\r\n\r\n //validate a correction response\r\n choice = validateMainMenuChoice(choice);\r\n\r\n //return cleared entry\r\n return choice;\r\n }", "protected static int mainMenu() {\n System.out.println(\"Main Menu:\");\n System.out.println(\" 1 - Add a room\");\n System.out.println(\" 2 - Remove a room\");\n System.out.println(\" 3 - Schedule a room\");\n System.out.println(\" 4 - List Schedule\");\n System.out.println(\" 5 - List Rooms\");\n System.out.println(\" 6 - save Roomdetails\");\n System.out.println(\" 7 - save schedule\");\n System.out.println(\" 8 - save meeting\");\n System.out.println(\" 9 - import Roomdetails\");\n System.out.println(\" 10 -import schedule\");\n System.out.println(\" 11 -import meeting\");\n System.out.println(\"Enter your selection: \");\n\n return keyboard.nextInt();\n }", "private static void choiceMenu()\n\t{\n\t\t\n\t\tint choice;\n\t\tint userInteger;\n\t\t\n\t\tSystem.out.println(\"Welcome Master!\");\n\t\tuserInteger = getInt();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Here are your options:\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Option # 1. You may enter a new integer!\");\n\t\tSystem.out.println(\"Option # 2. You may print the number of odd digits, even digits, and zeros in the integer. >.>\");\n\t\tSystem.out.println(\"Option # 3. You may Print the prime numbers between two, and the integer. ^.^\");\n\t\tSystem.out.println(\"Option # 4. You have authorization to print the sum of the digits of the integer. O.O\");\n\t\tSystem.out.println(\"Option # 5. You are able to quit this program, leaving me cold, and alone in here. (>@.@)>\");\n\t\t\n\t\tchoice = getChoice();\n\t\t\n\t\t\t\t\n\t\t\n\t\twhile (choice != 5)\n\t\t{\n\t\t\tswitch (choice)\n\t\t\t{\n\t\t\t\tcase 1:\tuserInteger = getInt();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\tdisplayTypes(userInteger);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\tprimeCalc(userInteger);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \tdigitSum(userInteger);\n\t\t\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Your orders have been carried through master!\");\n\t\t\tSystem.out.println(\"Here are your options:\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Option # 1. You may enter a new integer!\");\n\t\t\tSystem.out.println(\"Option # 2. You may print the number of odd digits, even digits, and zeros in the integer. >.>\");\n\t\t\tSystem.out.println(\"Option # 3. You may Print the prime numbers between two, and the integer. ^.^\");\n\t\t\tSystem.out.println(\"Option # 4. You have authorization to print the sum of the digits of the integer. O.O\");\n\t\t\tSystem.out.println(\"Option # 5. You are able to quit this program, leaving me cold, and alone in here. (>@.@)>\");\n\t\t\tchoice = getChoice();\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Thank you, and Farewell Master!\");\n\t}", "public String choosenMenu() {\n String value = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n menu_id = Integer.parseInt(value);\n String user = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n if (user == null) {\n return \"choosenMenu\";\n } else {\n return \"chooseMenuUser\";\n }\n }", "public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }", "public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }", "private int showMenu() {\n System.out.println(\"\\nWelcome to PasswordManager!\");\n System.out.println(\"Choose from the following options:\");\n System.out.println(\"1. Get a username and password for a website.\");\n System.out.println(\"2. Add a website's username and password to the database.\");\n System.out.println(\"3. Delete a website's username and password from the database.\");\n System.out.println(\"4. Change a username for a website.\");\n System.out.println(\"5. Change a password for a website\");\n System.out.println(\"6. Delete your user. WARNING: This will delete all of your saved usernames and passwords.\");\n System.out.println(\"7. Print all websites and usernames in the database.\");\n System.out.println(\"8. Quit.\");\n\n return input.nextInt();\n }", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private static void displayCartMenu() {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please make your choice, by entering the assigned number\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" 1: Remove an item from the cart\");\r\n\t\tSystem.out.println(\" 2: Modify the number of a certain item in the cart\");\r\n\t\tSystem.out.println(\" 3: Checkout cart\");\r\n\t\tSystem.out.println(\" 0: Quit to main manu\");\r\n\t\tint value = getValidUserInput(scanner, 4);\r\n\t\tswitch (value) {\r\n\t\tcase 0:\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\" Going back to main menu\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tremoveItemFromCart();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tmodifyItemNumberInCart();\r\n\t\t\tbreak; \r\n\t\tcase 3:\r\n\t\t\tcheckoutCart();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\t\r\n\t}", "public static void actionMenu(int choice) {\n switch(choice) {\r\n case 1: \r\n \tPartie p = new Partie();\r\n \tp.lancerPartie();\r\n\r\n break;\r\n case 2:\r\n quit();\r\n break;\r\n default: //Si autre, alors on affiche un message d'erreur et on redemande un choix a l'utilisateur\r\n System.out.println(\"Valeur incorrecte\");\r\n actionMenu(afficherMenu());\r\n break;\r\n }\r\n }", "public static void structEngineerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Structural Engineer's Information\");\n System.out.println(\"2 - Would you like to search for a Structural Engineer's Information\");\n System.out.println(\"3 - Adding a new Structural Engineer's Information\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }", "public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}", "private void menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }", "public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgnoreCase(\"exit\")) {\r\n \t\t\t\t\tselected = options.get(sinput); //Find corresponding option.\r\n \r\n \t\t\t\t\tif (selected != null) //Sinput corresponds to an extant option.\r\n \t\t\t\t\t\tselected.select(); //Select the selected.\r\n \t\t\t\t\telse\r\n \t\t\t\t\t\tprint(sinput + \" is not a valid option\");\r\n \t\t\t\t} else\r\n \t\t\t\t\t{print(\"Returning to previous menu.\"); break;}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tErrorLog.debug (\"Quitting \" + name + \". Sinput:\"+sinput);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}", "private static String loginMenu(){\n\t\tSystem.out.println(\"==================================\");\n\t\tSystem.out.println(\"Welcome to the Registration System\");\n\t\tSystem.out.println(\"Please select from the following:\");\n\t\tSystem.out.println(\"1. Login\");\n\t\tSystem.out.println(\"2. Request Access\");\n\t\tSystem.out.println(\"3. Exit\");\n\t\tSystem.out.print(\"Enter the number of you request: \"); \n\t\tString selection = input.nextLine();\n\t\tSystem.out.println(\"\");\n\t\treturn selection;\n\t}", "private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "public abstract void displayMenu();", "public static void displayMenu(){\n //*Displays the Menu\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Food Item\", \"Size\", \"Options\", \"Price\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"---------\", \"----\", \"-------\", \"-----\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Drink\", \"S,M,L\", \"Sprite, Rootbeer, and Orange Fanta\", \"$5.50 for small, +$.50 for each size increase\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Burger\", \"N/A\", \"Extra Patty, bacon, cheese, lettuce\", \"$3.00 for a burger, +$.50 for additional toppings\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"tomato, pickles, onions\", \"\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Pizza\", \"S,M,L\", \"Pepperoni, sausage, peppers, chicken\", \"$5.00 for small, +$2.50 for each size increase,\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"salami, tomatoes, olives, anchovies\", \"+$1.00 for each extra topping\" );\n }", "private void ShowMenu() {\n\t\tSystem.out.println(\"Please enter a number between 0 and 6 to perform the below actions:\\n\" + \n\t\t\t\t\"0: Exit the program\\n\" + \n\t\t\t\t\"1: Show total population for all zip codes available\\n\" + \n\t\t\t\t\"2: Show the total parking fines per capita for each zip code available\\n\" + \n\t\t\t\t\"3: Show the average market value for residences in a specified zip code\\n\" + \n\t\t\t\t\"4: Show the average total livable area for residences in a specified zip code\\n\" + \n\t\t\t\t\"5: Show the total residential market value per capita for a specified zip code\\n\" +\n\t\t\t\t\"6: Show a sorted list of zip codes and their most common fine in that zip code. Values sorted by total livable area per capita\");\n\t}", "private int displayAppMenu() {\n\t\tint inputOption = -1;\n\t\tboolean isContinue = true;\n\t\tSystem.out.printf(\"Enter a selection from the following menu:\\r\\n\"\n\t\t\t\t+ \"1. Enter a new book\\r\\n\"\n\t\t\t\t+ \"2. Modify the book details. Enter the book isbn number\\r\\n\" \n\t\t\t\t+ \"3. Find a book by isbn number\\r\\n\"\n\t\t\t\t+ \"4. Display list of all books\\r\\n\\n\" \n\t\t\t\t+ \"5. Add a new user\\r\\n\" \n\t\t\t\t+ \"6. Modify user details\\r\\n\"\n\t\t\t\t+ \"7. Find a user by name\\r\\n\" \n\t\t\t\t+ \"8. Display all users\\r\\n\\n\"\n\t\t\t\t+ \"9. Add a loan. Link a user name to a book by isbn number\\r\\n\"\n\t\t\t\t+ \"10. Modify a loan. Loan is identified by isbn number\\r\\n\"\n\t\t\t\t+ \"11. Find a loan. Loan is identified by isbn number\\r\\n\" \n\t\t\t\t+ \"12. Display all loans\\r\\n\\n\"\n\t\t\t\t+ \"13. Delete a book\\r\\n\"\n\t\t\t\t+ \"14. Delete a user\\r\\n\" \n\t\t\t\t+ \"15. Delete a loan\\r\\n\\n\"\n\t\t\t\t+ \"0. Exit program\");\n\n\t\twhile (isContinue) {\n\t\t\tif (input.hasNextInt()) {\n\t\t\t\tinputOption = input.nextInt();\n\t\t\t\tisContinue = false;\n\n\t\t\t} else if (!input.hasNextInt()) {\n\n\t\t\t\tSystem.out.println(\"Please input a Integer\");\n\t\t\t\tinput.nextLine();\n\t\t\t}\n\t\t}\n\t\tinput.nextLine(); // clean up the input stream\n\t\treturn inputOption;\n\t}", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}", "public void controllerMenu(){\n\t\tint option=1;\n\t\t\n\t\twhile(option!=0){ \n\t\t\tSystem.out.println(\"You are in the air controller menu\");\n\t\t\tSystem.out.println(\"Write the number corresponding to the action you quant to perform:\");\n\t\t\tSystem.out.println(\"1. Add plane (basic info)\");\n\t\t\tSystem.out.println(\"2. Add detailed information of a plane\");\n\t\t\tSystem.out.println(\"3. Show airspace\");\n\t\t\tSystem.out.println(\"4. Encrypt plane\");\n\t\t\tSystem.out.println(\"5. Decrypt plane\");\n\t\t\tSystem.out.println(\"Press 0 to exit\");\n\t\t\t\n\t\t\toption = entry.nextInt();\n\t\t\t\n\t\t\tswitch(option){\t// switch with a method for each operation\n\t\t\t\tcase 1: \n\t\t\t\t\taddPlane();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: \n\t\t\t\t\tafegirInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: \n\t\t\t\t\tdisplayInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \n\t\t\t\t\tencrypt();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdesencriptar();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "void Menu();", "public static String menuSelection() throws ParseException {\n System.out.print(\"\\nWelcome to Poised!\");\n System.out.print(\"\\n1\\t-\\tAdd a new project\");\n System.out.print(\"\\n2\\t-\\tChange due date of a project\");\n System.out.print(\"\\n3\\t-\\tChange payment on project\");\n System.out.print(\"\\n4\\t-\\tUpdate contact details\");\n System.out.print(\"\\n5\\t-\\tFinalise a project\");\n System.out.print(\"\\nPlease make your selection: \");\n\n // User's selection determine which method should be called\n // If user's selection is '1', then user can create a new project\n int userSelection = input.nextInt();\n input.nextLine();\n if (userSelection == 1) {\n ProjectList.add(createProject());\n }\n\n // If user selection '2', then can amend the due date of the project\n else if (userSelection == 2) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n newDeadline(selectedProj);\n }\n\n // If user selects '3', then user can change the payment on the project\n else if (userSelection == 3) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n makePayment(selectedProj);\n }\n\n // If user selects '4', then user can update the details of either the\n // contractor, client or architect.\n else if (userSelection == 4) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n updateDetails(selectedProj);\n }\n\n // If user selects '5', then user can finalise the project\n else if (userSelection == 5) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n finalisation(selectedProj);\n }\n\n return menuSelection();\n }", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }", "public void menu(){\n int numero;\n \n //x.setVisible(true);\n //while(opc>=3){\n r = d.readString(\"Que tipo de conversion deseas hacer?\\n\"\n + \"1)Convertir de F a C\\n\"\n + \"2)Convertir de C a F\\n\"\n + \"3)Salir\"); \n opc=Character.getNumericValue(r.charAt(0));\n //}\n }" ]
[ "0.78617454", "0.77888733", "0.77836734", "0.77352965", "0.7731113", "0.772126", "0.7709751", "0.76850486", "0.7680551", "0.7660485", "0.7637709", "0.7635825", "0.7628438", "0.76157004", "0.755664", "0.7519815", "0.75177294", "0.7496024", "0.7495756", "0.74836737", "0.74546045", "0.7393993", "0.73895216", "0.73883665", "0.7377266", "0.7376645", "0.7353388", "0.73526764", "0.7348072", "0.7347696", "0.7342854", "0.7339177", "0.7271901", "0.7262664", "0.7256497", "0.72448844", "0.72442967", "0.72427833", "0.7235831", "0.72200036", "0.7217032", "0.72170305", "0.7216636", "0.7207234", "0.72021383", "0.72001964", "0.7186654", "0.7167999", "0.71582276", "0.7147308", "0.71428114", "0.71269727", "0.7124078", "0.71221006", "0.71204996", "0.71196043", "0.7100562", "0.70992494", "0.70905787", "0.70895475", "0.7083987", "0.70787823", "0.7074457", "0.7072422", "0.70640993", "0.70354754", "0.7031943", "0.7031209", "0.7028834", "0.7024742", "0.7018859", "0.70180106", "0.70125693", "0.70118576", "0.70000935", "0.69962156", "0.6989715", "0.6972394", "0.6963578", "0.6955465", "0.69513214", "0.69338393", "0.69289184", "0.6917569", "0.6878786", "0.68744195", "0.6865266", "0.68647784", "0.6862944", "0.68573207", "0.6856375", "0.6849131", "0.6840292", "0.6833634", "0.6832666", "0.68230623", "0.6816254", "0.68119437", "0.68115664", "0.6809761" ]
0.72782326
32
Function to get user input
private static String getUserInput(String prompt){ Scanner in = new Scanner(System.in); System.out.print(prompt); return in.nextLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUserInput();", "String getInput();", "String userInput(String question);", "String consoleInput();", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "String userInputFromTextArea();", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "private String getClientInput() {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String input = null;\n try {\n input = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return input;\n }", "String getUsersInput(String outForUser) throws IOException;", "public static String getString (String ask)\r\n {\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.print(ask + \" -> \");\r\n String input = keyboard.nextLine();\r\n return input;\r\n }", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "private static String getUserText()\n {\n\t// Reads the users input.\n\tBufferedReader optionReader = new BufferedReader(new InputStreamReader(System.in));\n\n\ttry\n\t {\n\t\treturn(optionReader.readLine());\n\t }\n\tcatch(Exception ex)\n\t {\n\t\treturn(null);\n\t }\n }", "public String getUserInput(String prompt) {\n Scanner scanner = new Scanner(System.in);\n\n // prompt for the user's name\n System.out.print(prompt);\n\n // get their input as a String\n String userInput = scanner.next();\n\n return userInput;\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public String getUserInput(String question) {\r\n System.out.print(question);\r\n return scanner.next();\r\n }", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "public void takeUserInput() {\n\t\t\r\n\t}", "private static String inputString() {\n Scanner userInput = new Scanner(System.in);\n System.out.print(\"Insert text: \");\n String inputText = userInput.nextLine();\n return inputText;\n }", "String getUserInput(String prompt) {\r\n System.out.print(prompt);\r\n try {\r\n return rdr.readLine();\r\n }\r\n catch (IOException ex) {\r\n return null;\r\n }\r\n }", "String ask();", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}", "private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}", "String promptString();", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public static String getUserInput() {\n\t\tif (testType == null) {\n\t\t\tuserInput = inputScanner.nextLine();\n\t\t} else if (testType.equalsIgnoreCase(\"makeReady\")) {\n\t\t\tcreateEnterTestSet();\n\t\t\tif (enterTestCount < enterCount)\n\t\t\t\tuserInput = (String) makeReadyEnters.get(enterTestCount++);\n\t\t}else if (testType.equalsIgnoreCase(\"sequenceTest\")) {\n\t\t\tcreateWrongSequenceTestSet();\n\t\t\tif (sequenceTestCount<wrongSeqCount)\n\t\t\t\tuserInput = (String) wrongSequenceAnswers.get(sequenceTestCount++);\n\t\t}\n\t\telse if (testType.equalsIgnoreCase(\"randomKeyPress\")) {\n\t\t\tcreatePlayfulSet();\n\t\t\tif (randomTestCount<randomCount)\n\t\t\t\tuserInput = (String) randomKeys.get(randomTestCount++);\n\t\t}\n\n\t\treturn userInput;\n\t}", "private static String getUserName(){\r\n Scanner in = new Scanner(System.in);\r\n System.out.print(\"What is your character's name?\");\r\n return in.nextLine();\r\n }", "private int getUserInput() {\n java.util.Scanner scanner = new java.util.Scanner(System.in);\n int input = scanner.nextInt();\n while(input < 1 || input > 3) {\n System.out.println(\"only enter 1 2 or 3.\");\n input = scanner.nextInt();\n }\n return input;\n }", "public static String promptCity(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the city: \");\n String output = scan.nextLine();\n return output;\n }", "public static void getInput() {\n\t\tSystem.out.print(\"Expression y=? \");\n\t\tScanner s = new Scanner(System.in);\n\t\texpression = s.nextLine();\n\t\texpression.toLowerCase();\n\t\tSystem.out.print(\"x? \");\n\t\tx = s.nextDouble();\n\t}", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "public static String inputName() throws IOException {\n String name; //The name\n \n //Prompt user to enter name\n System.out.println(\"Please enter the employee's name:\");\n \n //Get name\n name = input.readLine();\n System.out.println(\"\");\n \n //Return name\n return name;\n }", "public static String getInput(String arg1, String arg2, String arg3)\n\t{\n\t\tString input;\n\t\tdo\n\t\t{\n\t\t\tSystem.out.println(\"Select: \");\n\t\t\tSystem.out.println(\"1. \" + arg1);\n\t\t\tSystem.out.println(\"2. \" + arg2);\n\t\t\tSystem.out.println(\"3. \" + arg3);\n\t\t\tinput = scn.nextLine();\n\t\t} while(!(input.equals(\"1\") || input.equals(\"2\") || input.equals(\"3\")));\n\t\treturn input;\n\t}", "public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }", "public String getUserStringInput(String tips)\n {\n Scanner console = new Scanner(System.in);\n System.out.println(tips);\n return console.nextLine();\n }", "private static String getInputQuery() throws IOException {\n\n String inputQuery = \"\";\n\n System.out.print(\"Please enter a search term: \");\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n inputQuery = bReader.readLine();\n\n if (inputQuery.length() < 1) {\n // Use the string \"YouTube Developers Live\" as a default.\n inputQuery = \"YouTube Developers Live\";\n }\n return inputQuery;\n }", "public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }", "String askForData();", "public String getUserInput() {\n\t\tString input;\n\t\tinput = this.console.next();\n\t\treturn input;\n\t}", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "public static String getInput() {\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"please input a file name with prefix\");\r\n System.out.println(\"the files should be pleased in the same directory\");\r\n String name = input.next();\r\n return name;\r\n }", "private static String getFileNameInput() {\n Scanner fileNameScanner = new Scanner(System.in);\n System.out.println(\"Please enter name of file: \");\n return fileNameScanner.nextLine();\n }", "public static String promptStreetAddress(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the street address: \");\n String output = scan.nextLine();\n return output;\n }", "private static int getIntFromUser(String prompt)\n\t {\n\t System.out.print(prompt); // Prompt user to enter input value\n\t return input.nextInt(); // Read and return user's response\n\t }", "public String getUserDecision(){\n return input.nextLine();\n }", "public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }", "protected static int easyIn() {\n // ADDITIONAL CHECKS?\n int a;\n debug(\"Please enter your selection: \");\n scanner = new Scanner(System.in);\n\t\ta = scanner.nextInt();\n return a;\n }", "private static String getUserPage() \n\t{\n\t\tString userInput = \"\";\n\t\ttry \n\t\t{\n\t\t\tSystem.out.println(\"What page?\");\n\t\t\tSystem.out.print(\"-> \");\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\tuserInput = scanner.nextLine();\n\t\t\t\n\t\t\t// Check to see if their input is greater than the maxLength.\n\t\t\t// Error and quit with the message below if it is.\n\t\t\tif(userInput.length() > maxLength)\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Please request a page with fewer characters.\");\n\t\t\t}\n\t\t} catch (Exception e) \n\t\t{\n\t\t\terrorQuit(e.getMessage());\n\t\t}\t\t\n\t\treturn userInput;\n\t\t\t \n\t}", "private String stringKeyBoardInput() {\n\t\tString input = \"\";\n\t\tboolean tryAgain = true;\n\t\twhile (tryAgain) {\n\t\t\ttry {\n\t\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t\tinput = scanner.nextLine();\n\t\t\t\ttryAgain = false;\n\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}", "void requestInput();", "public void getPlayerInput() {\n System.out.println(\"Enter a Command: \");\n playerInput = inputScanner.nextLine();\n }", "public String getUserCommand() {\n out.print(\"Enter command: \");\n String fullInputLine = in.nextLine();\n\n return fullInputLine;\n }", "static Website collectInput()\n {\n Scanner input = new Scanner(System.in);\n\n System.out.println(\"Site name:\");\n String websiteName = input.next();\n System.out.println(\"Author: \");\n String websiteAuthor = input.next();\n\n System.out.println(\"Do you want a folder for JavaScript?\");\n //Calls equation to see if user put y or n\n boolean javScripFolder = Solution43.yesOrno();\n System.out.println(\"Do you want a folder for CSS?\");\n boolean cssFolder = Solution43.yesOrno();\n\n return new Website(websiteName,websiteAuthor,javScripFolder,cssFolder);\n\n }", "String userChosen();", "private static String readInput(){\n\t\ttry {\n\t\t\tInput = br.readLine();\n\t\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tSystem.out.println(\"IO error trying to read your name!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn Input;\n\t}", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "public static String dato(){\n String dato=null;\n \n try {\n Scanner leer=new Scanner(System.in);\n dato=leer.next();\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n return dato;\n }", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }", "public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}", "private static String getRoomCodeOrQ() {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter room code for more details \"\n\t + \"(or (q)uit to exit): \");\n String roomCode = input.next();\n return roomCode;\n }", "@java.lang.Override\r\n public String askName() {\r\n Hello.display(\"Welcome! What is your name?\");\r\n Scanner in = new Scanner(System.in);\r\n String name = in.next();\r\n return name;\r\n }", "private void checkUserInput() {\n }", "private static String getQuery(String query) {\n\t\tScanner reader = new Scanner(System.in);\n\t\tString state = \"\";\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Please Type in a \" + query + \":\");\n\t\t\ttry {\n\t\t\t\tstate = reader.nextLine();\n\t\t\t\treturn state;\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tSystem.out.println(\"Invalid Input\");\n\t\t\t}\n\t\t}\n\t}", "private String getPlayerChoice() {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter choice:\\nr = rock\\np = paper\\ns = scissors\\nq = quit\");\n return userInput.nextLine().toUpperCase(); \n }", "private String getSearchString(){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString phrase = null;\n\t\t\n\t\tSystem.out.print(\"Please enter the search phrase: \");\n\t\tphrase = scanner.nextLine();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\treturn phrase;\n\t}", "private String getUserInput(Scanner sc) {\n\t\t\n\t\tif (sc == null) {\n\t\t\treturn null;\n\t\t}\n\n\t System.out.print(\"\\nctransfer > \");\n\t return sc.nextLine();\n\t}", "static String readEntry(String prompt) {\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while(c != '\\n' && c != -1) {\n buffer.append((char)c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}", "private static String getReservCodeOrQ() \n {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter reservation code for more details \"\n\t + \"(or (q)uit to exit): \");\n String rvCode = input.next();\n return rvCode;\n }", "public void get_UserInput(){\r\n\t Scanner s = new Scanner(System.in);\r\n\t // get User inputs \r\n\t System.out.println(\"Please enter a number for Dry (double):\");\r\n\t DRY = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wet (double):\");\r\n\t WET = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for ISNOW (double):\");\r\n\t ISNOW = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wind(double):\");\r\n\t WIND = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for BUO (double):\");\r\n\t BUO = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Iherb (int):\");\r\n\t IHERB = s.nextInt(); \r\n\t System.out.println(\"****Data for parameters are collected****.\");\r\n\t System.out.println(\"Data for parameters are collected.\");\r\n\t dry=DRY;\r\n\t wet=WET;\r\n}", "INPUT createINPUT();", "private static char[] getInput() {\n char x = 'x';\n char o = 'o';\n char[] output = {x, o};\n System.out.print(\"Please choose x or o-\");\n String input = (sc.next()).toLowerCase();\n char mark = input.charAt(0);\n if (mark == x) {\n System.out.println(\"User has entered- \" + x);\n output[0] = x;\n System.out.println(\"Computer has entered- \" + o);\n output[1] = o;\n } else if (mark == o) {\n System.out.println(\"User has entered- \" + o);\n output[0] = o;\n System.out.println(\"Computer has entered- \" + x);\n output[1] = x;\n } else {\n System.out.println(\"Unknown entry. Defaulting to Player-x Computer-o\");\n }\n return output;\n }", "String getCommand(){\n\t\tString command=\"\";\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tcommand = br.readLine();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Somethinf went wrong with the system input!! Please try again.\");\n\t\t}\n\t\treturn command;\n\t}", "static void gatherInfo() {\n Scanner keyboard = new Scanner(System.in);\n System.out.print(\"Enter the type of measurement (inches, feet, etc.). >> \");\n measurementType = keyboard.nextLine();\n System.out.print(\"Enter the rectangle width. >> \");\n height = keyboard.nextDouble();\n System.out.print(\"Enter the rectangle height. >> \");\n width = keyboard.nextDouble();\n }", "Input createInput();", "public static int askUser(Scanner in)\n {\n System.out.println(\"What do you want, respectable human being?\");\n System.out.println(\"1. Add Reminder\");\n System.out.println(\"2. View Reminder\");\n System.out.println(\"3. Edit Reminder\");\n System.out.println(\"4. Delete Reminder\");\n System.out.println(\"5. Exit\");\n System.out.print(\"User Input : \");\n return in.nextInt();\n }", "public static String getVariable(){\n Scanner kb = new Scanner(System.in);\n String variable = null;\n\n System.out.println(\"Enter the variable you would like to solve for: \");\n variable = kb.nextLine().toLowerCase();\n\n // check to make sure it is a valid variable name\n if( !variable.equals(\"height\") && !variable.equals(\"volume\") && !variable.equals(\"radius\")){\n System.out.println(\"Please enter in a valid variable (i.e. height, volume, or radius)...\");\n getVariable();\n }\n\n return variable;\n }", "public String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }", "private int getInput()\n {\n int input = 0;\n Scanner scanner = new Scanner(System.in);\n\n try {\n input = scanner.nextInt();\n }\n catch(Exception e) {\n System.out.println(\"Vælg et tal fra menuen.\");\n scanner.nextLine();\n }\n\n return input;\n }", "public static String getString() {\n // Variable declarations\n String str = \"\"; // String object to hold user input\n\n // Prompt user to enter str\n str = scnr.nextLine();\n\n // Return the string\n return str;\n }", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "@Override\n public String readUserInput() {\n while (true) {\n System.out.println(\"\");\n System.out.print(\"Enter Information: \");\n Scanner in = new Scanner(System.in);\n String userInput = in.nextLine();\n\n if (!userInput.equals(\"0\")) {\n String[] parts = userInput.split(\",\");\n if (parts.length == 5) {\n if (DateSorting.isDateValid(\"dd-MM-yyyy\", parts[2])) {\n if (TodoList.tasks.get(parts[0]) == null) {\n return userInput;\n } else {\n System.out.println(\"A task with this ID already exists, try again: \");\n }\n } else {\n System.out.println(\"The date entered is invalid, try again: \");\n }\n } else {\n System.out.println(\"Please follow instructions, try again: \");\n }\n } else {\n return userInput;\n }\n }\n }", "public static String getString(String prompt)\n {\n System.out.print(prompt + \" \");\n return in.nextLine();\n }", "public String getAnswer(String input)\n\t{\n\t\tString answer = \"\";\n\t\t\n\t\tanswer = JOptionPane.showInputDialog(null, input);\n\t\t\n\t\treturn answer;\n\t}", "public static String promptAptNumber(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the apartment number (leave it empty if there no apt#): \");\n String output = scan.nextLine();\n return output;\n }", "public String userCommand(){\n return scanner.nextLine();\n }", "private static String getCountryInput(){\n System.out.println(countryPrompt);\n String s = sc.nextLine();\n while(!query.countryExists(s) && !s.equals(\"x\")){\n System.out.println(\"That country is not available. Please ensure correct spelling and capitalization\");\n System.out.println(countryPrompt);\n System.out.println(\"Enter 'x' to cancel this query\");\n s = sc.nextLine();\n }\n if(s.equals(\"x\")){\n return null;\n } else {\n return s;\n }\n\n }", "public void readInput()\n\t{\n\t\tString userInput;\n\t\tChoices choice;\n\t\t\n\t\tdo {\n\t\t\tlog.log(Level.INFO, \"Please give the inputs as:\\n\"\n\t\t\t\t\t+ \"ADDACCOUNT to add the account\\n\" \n\t\t\t\t\t+ \"DISPLAYALL to display all accounts\\n\"\n\t\t\t\t\t+ \"SEARCHBYACCOUNT to search by account\\n\"\n\t\t\t\t\t+ \"DEPOSIT to deposit into account\\n\"\n\t\t\t\t\t+ \"WITHDRAW to withdraw from the account\\n\"\n\t\t\t\t\t+ \"EXIT to end the application\"\n\t\t\t\t\t);\n userInput = scan.next();\n choice = Choices.valueOf(userInput);\n\n switch (choice) {\n case ADDACCOUNT : \taddAccount();\n \t\t\t\t\t\tbreak;\n \n case DISPLAYALL :\t\tdisplayAll();\n \t\t\t\t\t\tbreak;\n\n case SEARCHBYACCOUNT :\tsearchByAccount();\n \t\t\t\t\t\tbreak;\n \n case DEPOSIT :\t\t\tdepositAmount();\n \t\t\t\t\t\tbreak;\n \n case WITHDRAW :\t\t\twithDrawAmount();\n \t\t\t\t\t\tbreak;\n \n case EXIT:\t\t\t\tlog.log(Level.INFO, \"Application has ended successfully\");\n \t\t\t\t\t\tbreak;\n \n default: break;\n }\n } while(choice != Choices.EXIT);\n\t\t\n\t\tscan.close();\n\t}", "protected abstract void getInput();", "public static void main(String[] args) \n {\n Scanner sc = new Scanner(System.in); \n \n // String input\n System.out.print(\"What's your name? \"); \n String name = sc.nextLine(); \n \n // Print the values to check if input was correctly obtained. \n System.out.println(\"Name: \" + name); \n\n // Close the Scanner\n sc.close();\n }", "private static String getResponseTo(String s) { // get user input as a string\r\n\t\tSystem.out.print(s);\r\n\t\treturn (scan.nextLine());\r\n\t}", "public String getFilename(){\r\n Scanner scan = new Scanner(System.in);\r\n String input = scan.nextLine();\r\n return input;\r\n }", "public String getInput() throws IOException {\n\t\tSystem.out.print(\">> \");\n\t\treturn consoleIn.readLine();\n\t}", "public static int getUserInput(){\r\n String input;\r\n Integer selection;\r\n while(true){\r\n try {\r\n input = JOptionPane.showInputDialog(null, \"Please enter the desired side size or press cancel for default size,\\n\"\r\n + \"you should enter a valid integer between 3 and 100.\");\r\n if (input == null) {\r\n selection = DEFAULT_SIZE;\r\n }\r\n else {\r\n selection = Integer.parseInt(input);\r\n if (selection > UPPER_BOUND) selection = UPPER_BOUND;\r\n else if (selection < LOWER_BOUND) selection = LOWER_BOUND;\r\n }\r\n break;\r\n }\r\n catch (NumberFormatException e){\r\n continue;\r\n }\r\n }\r\n return selection;\r\n \r\n }", "public static String userInput()\r\n {\r\n Scanner link = new Scanner(System.in);\r\n String word = link.next();\r\n char[] chars = word.toCharArray();\r\n boolean checkWord = false; \r\n for(int i = 0; i < chars.length; i++)\r\n {\r\n char c = chars[i];\r\n if((c < 97 || c > 122))\r\n {\r\n checkWord = true;\r\n }\r\n }\r\n link.close();\r\n if(!checkWord)\r\n {\r\n return word;\r\n } \r\n else \r\n System.out.println(\"Not a valid input\");\r\n return null;\r\n }", "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 }" ]
[ "0.8718835", "0.82819515", "0.8056384", "0.7663325", "0.75341755", "0.74915034", "0.74326366", "0.74206245", "0.7382846", "0.73447585", "0.73234546", "0.730421", "0.72910964", "0.7277181", "0.72570086", "0.7253877", "0.7188444", "0.71350056", "0.71322817", "0.7125921", "0.71155035", "0.71061045", "0.7092217", "0.70148075", "0.6997003", "0.6991327", "0.69882685", "0.6977444", "0.6963159", "0.6926077", "0.6895434", "0.6876515", "0.684023", "0.681755", "0.68025833", "0.67578536", "0.67567664", "0.6750513", "0.67383206", "0.67370063", "0.67355347", "0.67354995", "0.6707957", "0.6707661", "0.67061615", "0.6691455", "0.66854", "0.6678117", "0.66721946", "0.6653259", "0.66532016", "0.66494596", "0.66425145", "0.6597572", "0.65718955", "0.65624255", "0.6557097", "0.6535236", "0.6532434", "0.65274656", "0.6527235", "0.6525147", "0.6523797", "0.65234905", "0.65221477", "0.652185", "0.65032816", "0.6500462", "0.64909357", "0.6474064", "0.6472134", "0.6470566", "0.6468305", "0.6466232", "0.64642143", "0.6463384", "0.64616615", "0.64606607", "0.64583063", "0.6457887", "0.64407384", "0.64397115", "0.64393747", "0.6394481", "0.6394238", "0.63837963", "0.6375704", "0.63688385", "0.6364501", "0.6361804", "0.63607144", "0.6355071", "0.63543546", "0.6348579", "0.63479537", "0.63475716", "0.6345696", "0.6342556", "0.6340336", "0.63388705" ]
0.76561403
4
Function that displays the player stats
private static void displayPlayerStats(Object[] stats, String[] helmetSlot, String[] chestSlot, String[] weaponSlot, String[] glovesSlot, String[] bootsSlot){ System.out.println("Name: " + stats[0]); System.out.println("Level: " + stats[1]); System.out.println("Experience: " + stats[2]); System.out.println("HP: " + stats[3] + "/" + stats[4]); System.out.println("MP: " + stats[5] + "/" + stats[6]); System.out.println("Attack: " + stats[7]); System.out.println("Defense: " + stats[8]); System.out.println("Strength: " + stats[9]); System.out.println("Intelligence: " + stats[10]); System.out.println("Vitality: " + stats[11]); System.out.println("Stat Points Available: " + stats[12]); System.out.println("Gold: " + stats[13]); System.out.println("Helmet: [" + helmetSlot[0] + "]" + "{" + getItemRarity(helmetSlot) + "}"); System.out.println("Chest Plate: [" + chestSlot[0] + "]" + "{" + getItemRarity(chestSlot) + "}"); System.out.println("Gloves: [" + glovesSlot[0] + "]" + "{" + getItemRarity(glovesSlot) + "}"); System.out.println("Boots: [" + bootsSlot[0] + "]" + "{" + getItemRarity(bootsSlot) + "}"); System.out.println("Weapon: [" + weaponSlot[0] + "]" + "{" + getItemRarity(weaponSlot) + "}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printPlayerStat(Player player);", "public static String printStats() {\n return \"Your Statistics:\" + \"\\n\" +\n \"Total Time in Game (Seconds): \" + timeElapsedSeconds + \"\\n\" +\n \"Total Points: \" + totalScore + \"\\n\" +\n \"Total Number of Taps on Screen: \" + counterClicks + \"\\n\" +\n \"Thanks for Playing!\";\n }", "public void outputStats (){\n System.out.println(\"Your sorcerer's stats:\");\n System.out.println(\"HP = \" + hp);\n System.out.println(\"Mana = \" + mana);\n System.out.println(\"Strength = \" + strength);\n System.out.println(\"Vitality = \" + vitality);\n System.out.println(\"Energy = \" + energy);\n }", "public void printPlayerStats(PlayerStats statistics) {\r\n\t\tSystem.out.print(statistics.playerStatsToString());\r\n\t}", "public void printAllPlayerStats(List<Player> players);", "public void stats() {\n\t\tSystem.out.println(\"The score is: \" + score \n\t\t\t\t+ \"\\nNumber of Astronauts rescused: \" + rescuedAstronauts \n\t\t\t\t+ \"\\nNumber of Astronauts roaming: \" + roamingAstronauts\n\t\t\t\t+ \"\\nNumber of Aliens rescued: \" + rescuedAliens\n\t\t\t\t+ \"\\nNumber of Aliens roaming: \" + roamingAliens);\n\t}", "public void showPlayerStats(Player player) {\n pIcon = new JLabel(player.getName() + \"'s turn\");\n pIcon.setBackground(Color.white);\n pIcon.setBorder(BorderFactory.createEtchedBorder(0));\n pIcon.setBounds(icon.getIconWidth() + 10, 240, 150, 20);\n bPane.add(pIcon, new Integer(2));\n\n //JButton pRank;\n pRank = new JLabel(\"Rank: \" + player.getRank());\n pRank.setBackground(Color.white);\n pRank.setBorder(BorderFactory.createEtchedBorder(0));\n pRank.setBounds(icon.getIconWidth() + 10, 270, 150, 20);\n bPane.add(pRank, new Integer(2));\n\n //JButton pCredits;\n pCredits = new JLabel(\"Credits: \" + player.getCredits());\n pCredits.setBackground(Color.white);\n pCredits.setBorder(BorderFactory.createEtchedBorder(0));\n pCredits.setBounds(icon.getIconWidth() + 10, 300, 150, 20);\n bPane.add(pCredits, new Integer(2));\n\n //JButton pDollars;\n pDollars = new JLabel(\"Dollars: \" + player.getDollars());\n pDollars.setBackground(Color.white);\n pDollars.setBorder(BorderFactory.createEtchedBorder(0));\n pDollars.setBounds(icon.getIconWidth() + 10, 330, 150, 20);\n bPane.add(pDollars, new Integer(2));\n\n //JButton pRehearsalTokens;\n pRehearsalTokens = new JLabel(\"Rehears Toks: \" + player.getRehearsalTokens());\n pRehearsalTokens.setBackground(Color.white);\n pRehearsalTokens.setBorder(BorderFactory.createEtchedBorder(0));\n pRehearsalTokens.setBounds(icon.getIconWidth() + 10, 360, 150, 20);\n bPane.add(pRehearsalTokens, new Integer(2));\n\n //JButton pRoom;\n pRoom = new JLabel(\"Room: \" + player.getRoom());\n pRoom.setBackground(Color.white);\n pRoom.setBorder(BorderFactory.createEtchedBorder(0));\n pRoom.setBounds(icon.getIconWidth() + 10, 390, 150, 20);\n bPane.add(pRoom, new Integer(2));\n\n //JButton pRole;\n if (player.getRole() == null) {\n pRole = new JLabel(\"Role: None\");\n } else {\n pRole = new JLabel(\"Role: \" + player.getRole().getName());\n }\n pRole.setBackground(Color.white);\n pRole.setBorder(BorderFactory.createEtchedBorder(0));\n pRole.setBounds(icon.getIconWidth() + 10, 420, 150, 20);\n bPane.add(pRole, new Integer(2));\n\n pDays = new JLabel(\"Day: \"+Deadwood.getInstance().getDays());\n pDays.setBackground(Color.red);\n pDays.setOpaque(true);\n pDays.setBorder(BorderFactory.createEtchedBorder(0));\n pDays.setBounds(icon.getIconWidth() + 10, 480, 150, 20);\n bPane.add(pDays, new Integer(2));\n }", "public static void showStats() {\n\n List<String> stats = statsList.subList(Math.max(statsList.size() - 3, 0), statsList.size());\n\n System.out.println(\"Stats:\");\n for(String stat : stats){\n System.out.println(stat);\n }\n }", "void printStats();", "public String playerStatsToString() {\r\n\t\t\tString stats = \"\";\r\n\t\t\tstats = stats + username + \"\\n\";\r\n\t\t\tstats = stats + numberOfWins + \"\\n\";\r\n\t\t\tstats = stats + numberOfGames + \"\\n\";\r\n\t\t\tstats = stats + numberOfAttacks + \"\\n\";\r\n\t\t\tstats = stats + numberOfSPAttacks + \"\\n\";\r\n\t\t\tstats = stats + numberOfMeals + \"\\n\";\r\n\t\t\treturn stats;\r\n\t\t}", "private void printStats()\n\t{\n\t\t// X\n\t\tSystem.out.println(\"X:\");\n\t\tfor(int i = 0; i < xPosList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(xPosList.get(i));\n\t\t}\n\n\t\t// Y\n\t\tSystem.out.println(\"Y:\");\n\t\tfor(int i = 0; i < yPosList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(yPosList.get(i));\n\t\t}\n\n\t\t// Time\n\t\tSystem.out.println(\"Time:\");\n\t\tfor(int i = 0; i < timeList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(timeList.get(i));\n\t\t}\n\t}", "private void displayPlayers() {\n\t\tfor (Player p: game.getPlayers()) {\n\t\t\tview.updateDisplay(p.getId(), p.getDeck().getNumberOfCards());\n\t\t}\n\t}", "public void showStats() {\r\n List<String> list = new ArrayList();\r\n for (int i = 1; i < 31; i++) {\r\n switch (i) {\r\n case 4:\r\n list.add(name);\r\n break;\r\n case 6:\r\n list.add(String.valueOf(stats.get(\"name\")));\r\n break;\r\n case 7:\r\n list.add(String.valueOf(stats.get(\"score\").split(\":\")[0]));\r\n break;\r\n case 8:\r\n list.add(\"Score\");\r\n break;\r\n case 9:\r\n list.add(String.valueOf(stats.get(\"score\").split(\":\")[1]));\r\n break;\r\n case 10:\r\n list.add(String.valueOf(stats.get(\"break\").split(\":\")[0]));\r\n break;\r\n case 11:\r\n list.add(\"Max Break\");\r\n break;\r\n case 12:\r\n list.add(String.valueOf(stats.get(\"break\").split(\":\")[1]));\r\n break;\r\n case 13:\r\n list.add(String.valueOf(stats.get(\"fouls\").split(\":\")[0]));\r\n break;\r\n case 14:\r\n list.add(\"Fouls\");\r\n break;\r\n case 15:\r\n list.add(String.valueOf(stats.get(\"fouls\").split(\":\")[1]));\r\n break;\r\n case 16:\r\n list.add(String.valueOf(stats.get(\"misses\").split(\":\")[0]));\r\n break;\r\n case 17:\r\n list.add(\"Misses\");\r\n break;\r\n case 18:\r\n list.add(String.valueOf(stats.get(\"misses\").split(\":\")[1]));\r\n break;\r\n case 19:\r\n list.add(String.valueOf(stats.get(\"pots\").split(\":\")[0]));\r\n break;\r\n case 20:\r\n list.add(\"Pots\");\r\n break;\r\n case 21:\r\n list.add(String.valueOf(stats.get(\"pots\").split(\":\")[1]));\r\n break;\r\n case 22:\r\n list.add(String.valueOf(stats.get(\"shots\").split(\":\")[0]));\r\n break;\r\n case 23:\r\n list.add(\"Shots\");\r\n break;\r\n case 24:\r\n list.add(String.valueOf(stats.get(\"shots\").split(\":\")[1]));\r\n break;\r\n case 25:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"potPercentage\").split(\":\")[0])) + \"%\");\r\n break;\r\n case 26:\r\n list.add(\"Pot Percentage\");\r\n break;\r\n case 27:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"potPercentage\").split(\":\")[1])) + \"%\");\r\n break;\r\n case 28:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"safetyPercentage\").split(\":\")[0])) + \"%\");\r\n break;\r\n case 29:\r\n list.add(\"Safety Percentage\");\r\n break;\r\n case 30:\r\n list.add(String.format(\"%.1f\", Double.parseDouble(stats.get(\"safetyPercentage\").split(\":\")[1])) + \"%\");\r\n break;\r\n default:\r\n list.add(\"\");\r\n }\r\n }\r\n\r\n GridView grid = new GridView(context);\r\n grid.setAdapter(new ArrayAdapter(context, android.R.layout.simple_list_item_1, list));\r\n grid.setNumColumns(3);\r\n\r\n new AlertDialog.Builder(context)\r\n .setNegativeButton(\"Back\", null)\r\n .setTitle(\"Match Statistics\")\r\n .setView(grid)\r\n .show();\r\n }", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "private static void displayStats() {\n\t\tint numPlay = 0;\n\t\tint numWon = 0;\n\t\tint sumGuess = 0;\n\t\tint minGuess = Integer.MAX_VALUE;\n\t\tint maxGuess = Integer.MIN_VALUE;\n\t\tdouble average = 0;\n\t\tint lastNumGuess = 0;\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tnumPlay++;\n\t\t\t\tlastNumGuess = Integer.parseInt(line);\n\t\t\t\tif (lastNumGuess > 0) { // a positive number of guesses indicates the user won the game\n\t\t\t\t\tnumWon++;\n\t\t\t\t\tminGuess = Math.min(minGuess, lastNumGuess);\n\t\t\t\t\tmaxGuess = Math.max(maxGuess, lastNumGuess);\n\t\t\t\t\tsumGuess += lastNumGuess;\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (FileNotFoundException exception) {\n\t\t\tSystem.out.println(\"It seems that you haven't played this game before. Keep playing to gather statistics!\");\n\t\t\treturn;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Sorry the software encountered an IO Error. Please try again later.\");\n\t\t}\n\t\tSystem.out.println(\"Below are the summary statistics: \");\n\t\tSystem.out.println(\"Number of games played: \" + numPlay);\n\t\tSystem.out.println(\"Number of games won: \" + numWon);\n\t\tSystem.out.println(String.format(\"Total number of guesses: %d\", sumGuess + 12 * (numPlay - numWon)));\n\t\tif (lastNumGuess < 1) {\n\t\t\tSystem.out.println(\"Last time you lost\");\n\t\t} else {\n\t\t\tSystem.out.println(String.format(\"Last time you won and made %d guess%s\", lastNumGuess,\n\t\t\t\t\t(lastNumGuess > 1 ? \"es\" : \"\")));\n\t\t}\n\t\tif (numWon > 0) {\n\t\t\tSystem.out.println(\"Minimum number of guesses to win: \" + minGuess);\n\t\t\tSystem.out.println(\"Maximum number of guesses to win: \" + maxGuess);\n\t\t\taverage = (double) sumGuess / numWon;\n\t\t\tSystem.out.println(String.format(\"Average number of guesses to win: %.2f\", average));\n\t\t}\n\t}", "public void printDetailedPlayer(Player player);", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "public void printStatistics() {\n\t// Skriv statistiken samlad så här långt\n stats.print();\n }", "@Override\n public PlayerStatistics getPlayerStats() {\n return this.playerStats;\n }", "public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }", "public String stats() { \r\n String stats; \r\n stats = getWins() + \" wins, \" + getLosses() + \" losses, \" \r\n + getSaves() + \" saves, \" + getEra() + \" ERA\"; \r\n return stats;\r\n }", "public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }", "public void printStats() {\n\n System.out.println(\"Number of Users Arrived: \" + numIn);\n System.out.println(\"Number of Users Exited: \" + numOut);\n System.out.println(\"Average Time Spent Waiting for Cab: \" + (totTimeWait / numIn));\n if (numOut != 0) {\n System.out.println(\"Average Time Spent Waiting and Travelling: \" + (totTime / numOut));\n }\n }", "public static void displayStats(int draws, int cpuWins, int playerWins, int rounds, String userName) {\n if(rounds == 1) {\n System.out.println(\"\\n\\nWe played \" + rounds + \" game of Rock Paper Scissors.\");\n }\n \n else {\n System.out.println(\"\\n\\nWe played \" + rounds + \" games of Rock Paper Scissors.\");\n }\n //Display final stats of all rounds, note the check for grammar!\n if(cpuWins == 1) {\n System.out.println(\"The computer won \" + cpuWins + \" time.\");\n }\n else {\n System.out.println(\"The computer won \" + cpuWins + \" times.\");\n }\n if(playerWins == 1) {\n System.out.println(userName + \" won \" + playerWins + \" time.\");\n }\n else {\n System.out.println(userName + \" won \" + playerWins + \" times.\");\n }\n if(draws == 1) {\n System.out.println(\"There was \" + draws + \" draw.\");\n }\n else {\n System.out.println(\"There were \" + draws + \" draws.\");\n }\n \n //if player is better than cpu\n if(playerWins > cpuWins) {\n System.out.println(\"You are a master at Rock, Paper, Scissors.\");\n }\n \n //if cpu is better than player\n if(cpuWins > playerWins) {\n System.out.println(\"I am a master at Rock, Paper, Scissors.\");\n }\n \n //if cpu and player are evenly matched\n if(playerWins == cpuWins) {\n System.out.println(\"We are evenly matched at this game.\");\n }\n }", "private void showCardStats() {\n TextView unlockedNum = findViewById(R.id.UnlockedNum);\n unlockedNum.setText(\n \" \" + this.masterDeck.retrieveUnlockedCardNames().size() +\n \" / \" + this.masterDeck.deckSize()\n );\n }", "public void statistics(){\n System.out.println(this.scoreboard.toString());\n }", "public static void displayStats(ArrayList<String> standings){\n\t\tString[] parts;\n\t\tdouble avg, gamesB; //variables for fucntion calls\n\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\tSystem.out.println(\"Teams: Wins: Loses: Pct: Games Behind:\" );\n\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\tfor(String standing : standings){\n\t\t\tparts = standing.split(\"\\t\");\n\t\t\tavg = getAvg(standing);\n\t\t\tSystem.out.printf(\"%-15s%-8s%-8s%6.2f \\n \", parts[0], parts[1], parts[2], avg);\n\t\t}//end for \n//\t\tSystem.out.println(standings);\n\t}", "public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }", "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 }", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public String currStats(){\n\t\treturn String.format(\"Damage: %f\\nRange (in tiles): %f\\nFire\"\n\t\t\t\t+ \" speed (shots per second): %d\\nUpgrade cost: %d\", damage,\n\t\t\t\trange / MainFrame.TILE_SIZE, initCooldown, getCostToUpgrade());\n\t}", "public void display (Player player) {\n player.setScoreboard(this.bukkitScoreboard);\n }", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "private void displayPlayerMenu () {\n System.out.println();\n System.out.println(\"Player Selection Menu:\");\n System.out.println(\n \"Timid player...........\" + TIMID);\n System.out.println(\n \"Greedy player..........\" + GREEDY);\n System.out.println(\n \"Clever player..........\" + CLEVER);\n System.out.println(\n \"Interactive player.....\" + INTERACTIVE);\n }", "private void paintStats(Graphics g) {\n\t\tg.setColor(Color.GRAY);\n\t\tg.fillRect(DIMENSIONS_SIZE, 0, DIMENSIONS_SIZE + 150, DIMENSIONS_SIZE);\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tFont textFont = new Font(\"Times New Roman\", Font.PLAIN, 20);\n\t\tg.setFont(textFont);\n\t\tg.drawString(\"Games Won: \" + playerWins, DIMENSIONS_SIZE + 10, DIMENSIONS_SIZE/3);\n\t\tg.drawString(\"Games Tied: \" + tieGames, DIMENSIONS_SIZE + 10, DIMENSIONS_SIZE/2);\n\t\tg.drawString(\"Games Lost: \" + aiWins, DIMENSIONS_SIZE + 10, 2*DIMENSIONS_SIZE/3);\n\t}", "private void showFinalResults(){\r\n\r\n System.out.println(\"Player\\t\\t:\\t\\tPoints\");\r\n for(Player player : this.sortedPlayers){\r\n System.out.println(player.toString());\r\n }\r\n System.out.println();\r\n }", "public void showPlayerStats(Player player)\n\t{\n\t\tsynchronized (offlineDataYml)\n\t\t{\n\t\t\tYamlConfiguration yaml = YamlConfiguration.loadConfiguration(offlineDataYml);\n\t\t\tif(!yaml.isSet(player.getUniqueId().toString()))\n\t\t\t{\n\t\t\t\t//no datas\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tDouble earnings = 0.0;\n\t\t\tDouble losses = 0.0;\n\t\t\t\n\t\t\t\n\t\t\tString earningspath = player.getUniqueId().toString() + \".earnings\";\n\t\t\tString lossespath = player.getUniqueId().toString() + \".losses\";\n\t\t\tif(yaml.isSet(earningspath))\n\t\t\t{\n\t\t\t\tearnings = yaml.getDouble(earningspath);\n\t\t\t}\n\t\t\tif(yaml.isSet(lossespath))\n\t\t\t{\n\t\t\t\tlosses = yaml.getDouble(lossespath);\n\t\t\t}\n\t\t\t\n\t\t\tyaml.set(player.getUniqueId().toString(), null); //delete node to reset\n\t\t\t\n\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-message\")\n\t\t\t.replace(\"%earnings%\", Main.econ.format(earnings))\n\t\t\t.replace(\"%losses%\", Main.econ.format(losses)));\n\t\t\t\n\t\t\tif(earnings > losses)\n\t\t\t{\n\t\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-plus\")\n\t\t\t\t.replace(\"%win%\", Main.econ.format(earnings - losses)));\n\t\t\t}\n\t\t\telse if(earnings < losses)\n\t\t\t{\n\t\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-minus\")\n\t\t\t\t.replace(\"%loss%\", Main.econ.format(losses - earnings)));\n\t\t\t} else\n\t\t\t{\n\t\t\t\tplayer.sendMessage(CasinoManager.getPrefix() + MessageManager.get(\"offlineearnmanager-join-equal\"));\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tyaml.save(offlineDataYml);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t\tCasinoManager.LogWithColor(ChatColor.RED + \"Error while trying to save offlinedata.yml! \" + e.getMessage());\n\t\t\t\te.printStackTrace(CasinoManager.getPrintWriterForDebug());\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void updateStats() {\n if (isEnglish) {\n String moves = NUM_MOVES + presenter.getNumMoves();\n String time = TIME_LEFT + presenter.getTimeLeft();\n String points = POINTS + presenter.getPoints();\n painterTextViewMoves.setText(moves);\n painterTextViewTime.setText(time);\n painterTextViewPoints.setText(points);\n } else {\n String moves = NUM_MOVES_CHINESE + presenter.getNumMoves();\n String time = TIME_LEFT_CHINESE + presenter.getTimeLeft();\n String points = POINTS_CHINESE + presenter.getPoints();\n painterTextViewTime.setText(time);\n painterTextViewMoves.setText(moves);\n painterTextViewPoints.setText(points);\n }\n }", "private void showStat() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your won! Congrates!\");\n\t\tSystem.out.println(\"The word is:\");\n\t\tSystem.out.println(\"->\\t\" + this.word.toString().replaceAll(\" \", \"\"));\n\t\tSystem.out.println(\"Your found the word with \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t}", "public static void tstatSheet(){\n\t\tSystem.out.println(\"\\tStats\");\n\t\tSystem.out.println(\"--------------------------\");\n\t\tSystem.out.println(\"Strength - \" + tstr + \"\\tMagic Power - \" + tmag);\n\t\tSystem.out.println(\"Luck - \" + tluc + \" \\tAccuaracy - \" + tacc);\n\t\tSystem.out.println(\"Defense - \" + tdef + \" \\tSpeed - \" + tspe);\n\t\tSystem.out.println(\"Health - \" + tHP + \" \\tMystic Energy - \" + tMP);\n\t}", "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "private void setStatTextViews() {\n TextView numLives = findViewById(R.id.lives);\n numLives.setText(String.valueOf(player.getLives()));\n\n TextView multiplier = findViewById(R.id.currMultiply);\n multiplier.setText(String.valueOf(player.getMultiplier()));\n\n TextView totalPoint = findViewById(R.id.currScore);\n totalPoint.setText(String.valueOf(player.getPoints()));\n }", "public PlayerStats getPlayerStats() {\n /* Get score and kills */\n String score = String.valueOf(this.getScoreCounter().getScore());\n String kills = Integer.toString(this.killCount);\n \n playerStats.setScoreId(\"1\"); /* This will be changed in SavePlayerStats */\n playerStats.setUserId(\"\"); /* This will be changed when SavePlayerStats */\n playerStats.setScore(score);\n playerStats.setKills(kills);\n playerStats.setNewTimestamp();\n \n return playerStats;\n }", "public HashMap<String, Double> getStats() {\n return playerStats; // stub\n }", "public static String showAllStats() {\n return showStats(allStats, \"All stats\");\n }", "public void displayWinner(Player player) {\n System.out.println(\"Partie terminée !\");\n System.out.println(player.getPlayerName()+\" remporte la partie avec les billes \"+player.getColor().toString(true));\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void displayStats(int lowAttack, int medAttack, int highAttack)\n\t{\n\t\tSystem.out.println (\"Summary of Combat\");\n\t\tSystem.out.println (\"Total Hits Overall: \" + numHits + \" Total Blocks Overall: \" + numBlocks);\n\t\tSystem.out.println (\"Attacker Proportions: \" + \"Low \" + lowAttack + \"% \" + \"Medium \" +\n\t\t\t\t\t\t\tmedAttack + \"% \" + \"High \" + highAttack + \"% \");\n\t\tSystem.out.print (\"Defender Proportions: \" + \"Low \");\n\t\tSystem.out.printf(\"%.2f\", (lowBlocks * 100)/(count+1));\n\t\tSystem.out.print(\"% \" + \"Medium \"); \n\t\tSystem.out.printf(\"%.2f\", ((medBlocks*100)/(count+1)));\n\t\tSystem.out.print(\"% \" + \"High \");\n\t\tSystem.out.printf(\"%.2f\", ((highBlocks*100)/(count+1)));\n\t\tSystem.out.println(\"% \");\t\t\n\t\n\t}", "public abstract void showStat();", "private static void initStatistics(Player p){\n }", "public String toString()\n {\n return \"Player's name: \" + playersName + \". Player's current score: \" + currentScore;\n }", "public static void displayStats2(ArrayList<String> standings){\n\t\t\tString[] parts;\n\t\t\tdouble avg;\n\t\t\tSystem.out.println(\"-----------------------------\");\n\t\t\tSystem.out.println(\"Teams: Pct:\" );\n\t\t\tSystem.out.println(\"-----------------------------\");\n\t\t\tfor(String standing : standings){\n\t\t\t\tparts = standing.split(\"\\t\");\n\t\t\t\tavg = getAvg(standing);\n\t\t\t\tSystem.out.printf(\"%-15s%6.2f\\n \", parts[0], avg);\n\t\t\t\t//System.out.println(parts[1]);\n\t\t\t\t//System.out.println(parts[2]);\n\t\t\t\t\n\t\t\t}//end for \n\t//\t\tSystem.out.println(standings);\n\t\t}", "private void updateStats()\n\t{\n\n\t\tint[] temp = simulation.getStatValue();\n\t\tfor(int i = 0; i < temp.length; i++)\n\t\t{\n\t\t\tthis.statsValues[i].setText(Integer.toString(temp[i]));\n\t\t}\n\t\t\n\t\tint[] temp2 = simulation.getNumberInEachLine();\n\t\tfor(int i = 0; i < temp2.length; i++)\n\t\t{\n\t\t\tthis.eatValues[i].setText(Integer.toString(temp2[i]));\n\t\t}\n\t}", "@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }", "private void updateInfo() {\n /* Show the current server address in use */\n String text = String.format(getResources().getString(R.string.main_activity_server_address),\n Utils.getAddress(), Utils.getPort());\n serverTextView.setText(text);\n\n /* Show information about current player */\n Player player = SharedDataManager.getPlayer(this);\n /* No player is logged in */\n if (player == null) {\n playerTextView.setText(getString(R.string.your_nickname));\n return;\n }\n /* Player is logged in, show some information about him */\n text = String.format(getResources().getString(R.string.main_activity_player_title),\n player.getNickname(), player.getScore());\n playerTextView.setText(text);\n }", "public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }", "static void showStatistics() throws IOException {\n System.out.println(\"You entered \" + initialSlots + \" for the number of slots on your wheel.\");\n System.out.println(\"You entered \" + initialZeroes + \" for the number of 0's or 00's on your wheel.\");\n System.out.println(\"You entered \" + initialVisits + \" for the number of times you visited to the casino.\");\n System.out.println(\"You entered $\" + initialDollars + \" for the amount of money you started with at every visit to the casino.\");\n System.out.println(\"You had $\" + dollarsRisked + \" for the total amount of money you brought to the casino over your visits.\");\n System.out.println(\"You walked away with $\" + moneyCount + \" total over \" + winCount + \" wins of your \" + initialVisits + \" total visits. This is %\" + df.format(percentWon) +\n \" of the $\" + dollarsRisked + \" you brought to the casino.\");\n System.out.println(\"Your most money won on a spin was $\" + biggestGain + \" across all your visits.\");\n // Prints to console if the user never won once on all their visits to the casino, otherwise lets them know the largest amount they walked away with\n if (largestWalkedAway < 1) {\n System.out.println(\"Sorry, you never walked away a winner across all \" + initialVisits + \" visits to the casino.\");\n } else {\n System.out.println(\"The most you ever walked away with on a visit to the casino was $\" + largestWalkedAway + \".\");\n }\n System.out.println(\"You came out a loser \" + lossCount + \" times out of your \" + initialVisits + \" visits.\" );\n // Prints to console only if the user never won once on all their visits to the casino\n if (completeLoss >= 1) {\n System.out.println(\"You completely lost all of your money in \" + completeLoss + \" visits.\");\n }\n // Gives the user of their average winnings/losses per visit of the casino\n System.out.println(\"You won an average of $\" + df.format(((float)runningTotal / initialVisits))+ \" each time you visited the casino.\");\n System.out.println(\"Out of \" + initialVisits + \" visits you walked away a winner \" + winCount + \" times. You walked away a loser \" + lossCount + \" times. \" +\n \"You broke even \" + brokeEven + \" times.\\n\");\n // Prompts the user to press Enter to exit the program\n System.out.println(\"Press Enter to exit.\");\n System.in.read();\n }", "public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }", "public void printScores() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Players \\t\" + \"Score\");\n\t\tSystem.out.println(\"---------------------\");\n\t\tfor (Player p : players) {\n\t\t\tSystem.out.println(p.name + \" \\t\\t\" + p.updateScores());\n\t\t}\n\t}", "private void calculateHeroStats() {\n int[] mods = calculateMods(heroRoll.hero, 40, skillOn);\n makePopupStat(hp, heroRoll, heroRoll.hero.HP, mods[0], getResources().getString(R.string.hp));\n makePopupStat(atk, heroRoll, heroRoll.hero.atk, mods[1], getResources().getString(R.string.atk));\n makePopupStat(spd, heroRoll, heroRoll.hero.speed, mods[2], getResources().getString(R.string.spd));\n makePopupStat(def, heroRoll, heroRoll.hero.def, mods[3], getResources().getString(R.string.def));\n makePopupStat(res, heroRoll, heroRoll.hero.res, mods[4], getResources().getString(R.string.res));\n\n int totalMods = mods[0] + mods[1] + mods[2] + mods[3] + mods[4];\n String bstText = heroRoll.getBST(getBaseContext()) < 0 ? \"?\" : heroRoll.getBST(getBaseContext()) - totalMods + \"\";\n bst.setText(getResources().getString(R.string.bst) + \" \" + bstText);\n bst.setTextColor(getResources().getColor(R.color.colorPrimary));\n }", "private void display(){\n out.println(\"\\n-STOCK EXCHANGE-\");\n out.println(\"Apple - Share Price: \" + game.apple.getSharePrice() + \" [\" + game.apple.top() + \"]\");\n out.println(\"BP - Share Price: \" + game.bp.getSharePrice() + \" [\" + game.bp.top() + \"]\");\n out.println(\"Cisco - Share Price: \" + game.cisco.getSharePrice() + \" [\" + game.cisco.top() + \"]\");\n out.println(\"Dell - Share Price: \" + game.dell.getSharePrice() + \" [\" + game.dell.top() + \"]\");\n out.println(\"Ericsson - Share Price: \" + game.ericsson.getSharePrice() + \" [\" + game.ericsson.top() + \"]\");\n\n out.println(\"\\n-PLAYERS-\");\n// System.out.println(playerList.toString());\n for (Player e : playerList) {\n if (e.equals(player)) {\n out.println(e.toString() + \" (you)\");\n } else {\n out.println(e.toString());\n }\n }\n }", "public void updateInfo(Player p, boolean isFirst) {\r\n\t\tif (p.isDead() || p.isFree()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Updating player info\");\r\n\t\t\r\n\t\t// Build embed with all stats\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setColor(p.getColor());\r\n\t\tembed.setTitle(\"**\"+Utils.getName(p.getPlayerID(),guild)+\"**'s Information\");\r\n\t\tembed.addField(\"Health :heart:\",\"``\"+p.getHealth()+\"``\", true);\r\n\t\tembed.addField(\"Board Clank :warning:\",\"``\"+p.getClankOnBoard()+\"``\", true);\r\n\t\tembed.addField(\"Bag Clank :briefcase:\",\"``\"+p.getClankInBag()+\"``\", true);\r\n\t\tembed.addField(\"**Skill** :diamond_shape_with_a_dot_inside:\",\"``\"+p.getSkill()+\"``\",true);\r\n\t\tembed.addField(\"**Boots** :boot:\",\"``\"+p.getBoots()+\"``\",true);\r\n\t\tembed.addField(\"**Swords** :crossed_swords:\",\"``\"+p.getSwords()+\"``\",true);\r\n\t\tembed.addField(\"Gold :moneybag:\",\"``\"+p.getGold()+\"``\",true);\r\n\t\t//embed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",\"``\"+Utils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\tembed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",Utils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\tif (p.getTeleports() > 0) {\r\n\t\t\tif (GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()].length > 0) {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"┃\"+\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()],GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()].length),true);\r\n\t\t\t} else {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tembed.addField(\"\",\"\",true);\r\n\t\t}\r\n\t\t\r\n\t\t// Set history as footer\r\n\t\tString history = \"\";\r\n\t\tfor (int i = p.getHistory().size()-1; i >= 0; i--) {\r\n\t\t\thistory += p.getHistory().get(i) + \" / \";\r\n\t\t}\r\n\t\tembed.setFooter(history, null);\r\n\t\t\r\n\t\tif (isFirst) {\r\n\t\t\tgameChannel.sendMessage(embed.build()).queueAfter(5000, TimeUnit.MILLISECONDS);\r\n\t\t} else {\r\n\t\t\tgameChannel.editMessageById(infoID, embed.build()).queue();\r\n\t\t\tupdateReactionsInfo(); // To allow for hiding rooms that can't be moved into\r\n\t\t}\r\n\t}", "public void printStats() {\n\t\tSystem.out.println(\"========== LCMFreq v0.96r18 - STATS ============\");\n\t\tSystem.out.println(\" Freq. itemsets count: \" + frequentCount);\n\t\tSystem.out.println(\" Total time ~: \" + (endTimestamp - startTimestamp)\n\t\t\t\t+ \" ms\");\n\t\tSystem.out.println(\" Max memory:\" + MemoryLogger.getInstance().getMaxMemory());\n\t\tSystem.out.println(\"=====================================\");\n\t}", "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}", "public void displayHotPlayers(Player fantasy) throws IOException {\n\t\tExportExcel.export(\"Week.xls\", 0, fantasy);\n\t\t\n\t\tMinHeap min = MinHeap.getInstance();\n\t\t\n\t\tHashMap<String, Integer> outputPlayers = new HashMap<String, Integer>();\n\t\t\n\t\tPercentLine[] topStats = min.getOverall(min.OVERALL);\n\t\tSystem.out.println(\"Overall Top Value\");\n\t\tUtil.displayHeap(topStats, min.OVERALL, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.POINTS);\n\t\tSystem.out.println(\"Overall Top Points\");\n\t\tUtil.displayHeap(topStats, min.POINTS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.REBOUNDS);\n\t\tSystem.out.println(\"Overall Top Rebounds\");\n\t\tUtil.displayHeap(topStats, min.REBOUNDS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.ASSISTS);\n\t\tSystem.out.println(\"Overall Top Assists\");\n\t\tUtil.displayHeap(topStats, min.ASSISTS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.THREES);\n\t\tSystem.out.println(\"Overall Top Threes\");\n\t\tUtil.displayHeap(topStats, min.THREES, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.STEALS);\n\t\tSystem.out.println(\"Overall Top Steals\");\n\t\tUtil.displayHeap(topStats, min.STEALS, outputPlayers);\n\t\t\n\t\ttopStats = MinHeap.getInstance().getOverall(min.BLOCKS);\n\t\tSystem.out.println(\"Overall Top Blocks\");\n\t\tUtil.displayHeap(topStats, min.BLOCKS, outputPlayers);\n\t\t\n\t\tSystem.out.println(\"Players +3 Categories\");\n\t\tUtil.display(outputPlayers);\n\t\t\n\t\ttopStats = MyTeam.getInstance().getList();\n\t\tSystem.out.println(ExportExcel.TEAM_PERFORMANCE + \"'s Performance over the last week\");\n\t\tUtil.displayHeap(topStats, min.OVERALL, outputPlayers);\n\t}", "public boolean showPlayer(){\n\t\t\n\t\tSystem.out.println(\"\\t\"+color+\"\\t \"+playermoney+\"\\t \\t\"+totalminions+\" \\t\"+totalbuildings+\" \\t\\t\"+personalityCard.cardName);\n\t\treturn true;\n\t}", "public void displayStats()\n {\n if(graph == null)\n {\n clearStats();\n }\n else\n { \n pathJTextArea.setText(graph.getPathString(pathList));\n costJTextField.setText(decimal.format(graph.getPathCost(pathList)));\n timeJTextField.setText(String.valueOf(timePassed));\n }\n }", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "public static void showStatistics(){\n\n }", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiation = owner.negotiation;\r\n\t\ttact = owner.tact;\r\n\t\tstrength = owner.strength;\r\n\r\n\t\txCoord = owner.xCoord;\r\n\t\tyCoord = owner.yCoord;\r\n\r\n\t\tmaxHealth = 2400 + ( perseverance * 200 );\r\n\r\n\t\thealth = maxHealth;\r\n\r\n\t\tsetDamages( );\r\n\t}", "private static void printStats()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords found: \" + keywordHits);\r\n\t\tSystem.out.println(\"Links found: \" + SharedLink.getLinksFound());\r\n\t\tSystem.out.println(\"Pages found: \" + SharedPage.getPagesDownloaded());\r\n\t\tSystem.out.println(\"Failed downloads: \" + SharedPage.getFailedDownloads());\r\n\t\tSystem.out.println(\"Producers: \" + fetchers);\r\n\t\tSystem.out.println(\"Consumers: \" + parsers);\r\n\t}", "public String info()\n {\n String display = \"The player has $\" + spendingMoney + \" left to spend, and has won \" + prizesWon;\n return display;\n }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "public String getPlayersStatus(){\n\t\tString pStatus = \"\";\n\t\tPlayer player;\n\t\tfor(int i = 0; i < this.players.size(); i++){\n\t\t\tplayer = this.players.get(i);\n\t\t\tpStatus += \"[\" +player.getName() + \": \";\n\t\t\tpStatus += Integer.toString(player.numCards()) + \"] \";\n\t\t} \n\t\t\n\t\treturn pStatus;\n\t}", "private static void displayStat() {\n Collection<Zone> zones = Universe.getInstance().getCarte().getCarte().values();\r\n System.out.println(\"Nb de personnes créées : \" + Universe.getInstance().getCarte().getPopulation().size());\r\n\r\n\r\n System.out.println(\"Nb de personnes créées en mer : \" + getPopulationByTile(Zone.Tile.SEA));\r\n System.out.println(\"Nb de personnes créées en plaine : \" + getPopulationByTile(Zone.Tile.EARTH));\r\n System.out.println(\"Nb de personnes créées en foret : \" + getPopulationByTile(Zone.Tile.FOREST));\r\n System.out.println(\"Nb de personnes créées en ville : \" + getPopulationByTile(Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer : \" + getSurfaceByTile(zones, Zone.Tile.SEA));\r\n System.out.println(\"Surface plaine : \" + getSurfaceByTile(zones, Zone.Tile.EARTH));\r\n System.out.println(\"Surface foret : \" + getSurfaceByTile(zones, Zone.Tile.FOREST));\r\n System.out.println(\"Surface ville : \" + getSurfaceByTile(zones, Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Densité mer : \" + new Double(getPopulationByTile(Zone.Tile.SEA) / getSurfaceByTile(zones, Zone.Tile.SEA)));\r\n System.out.println(\"Densité plaine : \" + new Double(getPopulationByTile(Zone.Tile.EARTH)) / new Double(getSurfaceByTile(zones, Zone.Tile.EARTH)));\r\n System.out.println(\"Densité foret : \" + new Double(getPopulationByTile(Zone.Tile.FOREST)) / new Double(getSurfaceByTile(zones, Zone.Tile.FOREST)));\r\n System.out.println(\"Densité ville : \" + new Double(getPopulationByTile(Zone.Tile.TOWN)) / new Double(getSurfaceByTile(zones, Zone.Tile.TOWN)));\r\n\r\n System.out.println(\"---------------\");\r\n System.out.println(\"Surface mer deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n }", "public void showResult(NimPlayer player1, NimPlayer player2) {\n String g1 = \"game\";\n String g2 = \"game\";\n\n // check the sigular\n if (player1.getWinTimes() >= 2) {\n g1 = \"games\";\n }\n if (player2.getWinTimes() >= 2) {\n g2 = \"games\";\n }\n System.out.println(player1.getName() + \" won \" +\n player1.getWinTimes() + \" \" + g1 + \" out of \" +\n player1.getTotalTimes() + \" played\");\n System.out.println(player2.getName() + \" won \" +\n player2.getWinTimes() + \" \" + g2 + \" out of \" +\n player2.getTotalTimes() + \" played\");\n }", "public void displayName(){\n player1.setText(p1.getName());\n player2.setText(p2.getName());\n }", "@Override\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\tsummaryPanel.updatePlayerStatus(player.getPlayerId());\n\t\t\t}", "private void showHealthLevel()\n {\n showText(\"Health Level: \" + healthLevel, 120, 25);\n }", "static String showPlayerGemsAndPokeballs()\n {\n return \"\\nYou have \" + Player.current.gems + \" gems and \" + Player.current.pokeballs + \" pokeball(s).\\n\";\n }", "public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }", "private void show() {\n System.out.println(team.toString());\n }", "public void statistics(){\n\t\tSystem.out.println(\"heads: \"+ heads+\"\\ttails: \"+tails);\n\t\t\n\t}", "public static void battleStatus(){\n Program.terminal.println(\"________________TURN \"+ turn +\"________________\");\n Program.terminal.println(\"\");\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\" |Name:\"+ currentMonster.name);\n Program.terminal.println(\" |HP: \" + currentMonster.currentHp+\"/\"+currentMonster.hp);\n Program.terminal.println(\" |\" + barGauge(1));\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\"\");\n Program.terminal.println(\"My HP:\" + MainCharacter.hpNow +\"/\"+ MainCharacter.hpMax + \" \" + barGauge(2));\n Program.terminal.println(\"My MP:\" + MainCharacter.mpNow +\"/\"+ MainCharacter.mpMax + \" \" + barGauge(3));\n Program.terminal.println(\"\");\n askAction();\n }", "public static Result showStats() {\n\t\tUser currentUser = SessionHelper.getCurrentUser(ctx());\n\t\tList<Blogger> bloggerList = Blogger.find.all();\n\t\tif(currentUser != null && currentUser.username.equals(\"blogger\")){\n\t\t\treturn ok(blog.render(bloggerList,currentUser));\n\t\t}\n\n\t\t// Null Catching\n\t\tif (currentUser == null) {\n\t\t\treturn redirect(routes.Application.index());\n\t\t}\n\t\t\n\t\tallProducts = ProductController.findProduct.where().eq(\"owner.username\", currentUser.username).findList();\n\t\t\n\t\tapplyTheStringViewForStats(currentUser);\n\t\n\t\treturn ok(statsproducts.render(currentUser, allProducts));\n\n\t}", "public void updateLabels() {\n\t\tfinal PlayerInfo player = ControllerImpl.getController().getCurrentPlayer();\n\t\tplayerLabel.setText(\"Player:\\n\" + player.getName());\n\t\tcashLabel.setText(\"Cash:\\n\" + player.getMoney());\n\t\tnetWorthLabel.setText(\"Net Worth:\\n\" + player.totalAssets());\n\t\tprisonLabel.setText(player.isInJail() ? \"In jail\" : \"Free\");\n\t}", "String getName() {\n return getStringStat(playerName);\n }", "public abstract void onBakestatsCommand(Player player);", "private static void displayUserTeam() {\n\t\tif (game.getCurrentRound()==1) {\n\t\t\tfor (int i = 0; i<11; i++) {\n\t\t\t\tplayerNameArray[i].setText(\"Name\");\n\t\t\t\timageArray[i].setIcon(MainGui.getShirt(\"noTeam\"));\n\t\t\t\tbuttonArray[i].setText(\"+\");\n\t\t\t}\n\t\t}\n\t}", "public String getStatsOfGames(){\n\n String res = \"\";\n\n if (games.size() <= 0){\n return \"No game registered in tournament\";\n }\n\n for(int num=0; num<games.size(); num++)\n {\n SoccerGames game = games.get(num);\n res += \"Game Id: \" + game.getGameId() + \" \"+ game.getHostTeam().getName() + \": \" + game.goalsScored +\n \" VS \" + game.getOpponentTeam().getName() + \": \" + game.concededGoal;\n\n }\n return res;\n }", "public boolean ShowStats(){\n if(!determineValid()){\n Main.errorNumber = WrongNumber;\n return false;\n }\n labelNames();\n groupDisplay.setText(\"\");\n groupDisplay.setText(groupDisplay.getText() + displayArray(racers.get(group.get(0))));\n\n for(int i = 1; i < group.size(); ++i){\n groupDisplay.setText(groupDisplay.getText() + \"\\n\\n\" + displayArray(racers.get(group.get(i))));\n\n }\n\n return true; //success\n }", "public void addPlayerToStats(Player player) {\n\t\tfindForPlayer(player);\n\t}", "public void theStats(Spy bond, Map grid, PowerUp p) {\r\n\t\tif(p != null){\r\n\t\t\tif (bond.getLives() != 0) {\r\n\t\r\n\t\t\tSystem.out.print(\"\\nThe spy has \" + bond.getLives()\r\n\t\t\t\t\t+ \" lives remaining.\");\r\n\t\t} else {\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.print(\"\\nThe spy has no lives remaining! Use your last well!\");\r\n\t\t}\r\n\t\tif (p.hasBullet() == 1) {\r\n\t\t\tSystem.out.print(\"\\nThe spy has \" + p.hasBullet()\r\n\t\t\t\t\t+ \" bullet remaining.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.print(\"\\nThe spy has no bullets remaining!\");\r\n\t\t}\r\n\t\tif (grid.ninjaCount() != 0) {\r\n\t\t\tSystem.out.println(\"\\nThere are \" + grid.ninjaCount()\r\n\t\t\t\t\t+ \" ninjas remaining!\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No ninjas remain! Happy briefcase hunting!\");\r\n\t\t}\r\n\t\t}\r\n\t}", "private static void displayStatistics(){\n\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Please enter Club Name: \");\n String clubName = scanner.nextLine();\n leagueManager.displayStatistics(clubName);\n }", "@Override\n\tpublic void getScoreCardByPlayer(Player player) {\n\t\tSystem.out.printf(\"%12s: \", player.getName());\n\t\tChance[] chances = player.getScoreCard().getChances();\n\t\tfor (int i = 0; i < chances.length; i++) {\n\t\t\tif (i == chances.length - 1) {\n\t\t\t\tSystem.out.printf(\"|~ %02d|%02d ~|\", chances[i].getThrow1(), chances[i].getThrow2());\n\t\t\t} else {\n\t\t\t\tSystem.out.printf(\"| %02d|%02d |\", chances[i].getThrow1(), chances[i].getThrow2());\n\t\t\t}\n\t\t}\n\t\tSystem.out.printf(\" => %03d \", player.getScoreCard().getTotalScore());\n\t\tSystem.out.printf(\"Total Spare: %02d \", player.getScoreCard().getTotalSpare());\n\t\tSystem.out.printf(\"Total Strike: %02d%n\", player.getScoreCard().getTotalStrike());\n\t}", "private void updateInfoLabel() {\n\n int achievementTotal = 0;\n int achievementDone = 0;\n\n for (Game game : tableView.getItems()) {\n if (game.isPopulated() && game.getHasStats()) {\n achievementTotal += game.achievementsTotalProperty().get();\n achievementDone += game.achievementsDoneProperty().get();\n }\n }\n\n int percentage = 100;\n if (achievementTotal > 0) {\n percentage = achievementDone * 100 / achievementTotal;\n }\n\n lblInfo.setText(\"Games loaded: \" + tableView.getItems().size() + \", Achievements: \" + achievementTotal + \", Unlocked: \" + achievementDone + \" (\" + percentage + \"%)\");\n\n }", "private void updateTurnInfo(){\n String info = players[blackPlayer] + \" plays Black\";\n turnInfo.setText(info);\n }", "public abstract void info(Player p);" ]
[ "0.7909215", "0.7468867", "0.7467505", "0.74241173", "0.7412339", "0.73851997", "0.7372903", "0.73521924", "0.7301853", "0.7285959", "0.72152823", "0.70316935", "0.7016295", "0.7011012", "0.697491", "0.69130516", "0.6873648", "0.6869748", "0.685704", "0.6840065", "0.68116295", "0.68099606", "0.68081707", "0.67910963", "0.67885965", "0.6770687", "0.67096984", "0.66996", "0.66763407", "0.6646807", "0.6625568", "0.65888315", "0.6587077", "0.6542563", "0.6537134", "0.65291697", "0.65282196", "0.65249264", "0.6501256", "0.64923555", "0.64870656", "0.64686453", "0.64429265", "0.63863814", "0.63863224", "0.63818216", "0.63816524", "0.6368398", "0.6361967", "0.6360151", "0.63573056", "0.6351345", "0.63495773", "0.63393116", "0.6333677", "0.63302124", "0.632075", "0.63159007", "0.6299003", "0.6295435", "0.62906307", "0.62896717", "0.62802285", "0.6270558", "0.6269", "0.6259838", "0.62508845", "0.62446594", "0.6229776", "0.6228517", "0.6228373", "0.62157655", "0.62007266", "0.6196492", "0.6195226", "0.6189062", "0.6186652", "0.61795944", "0.6172649", "0.61648065", "0.6163109", "0.6162405", "0.6155648", "0.61519176", "0.6149428", "0.614652", "0.6138371", "0.6134893", "0.61297107", "0.6123656", "0.6107139", "0.60935915", "0.60900426", "0.6089098", "0.6081213", "0.6079434", "0.607661", "0.6072786", "0.6067142", "0.60584104" ]
0.7650954
1
Function that increases max health using vitality
private static int maxHealth(int health){ int mHealth = 0; mHealth = health + 5; return mHealth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeMaxHealth(int i) {\n \t\tmaxHealthModifier += i;\n \t\tif (getMaxHealth() < 1 ){\n \t\t\thealth = 0;\n \t\t\talive = false;\n \t\t}\n \t\tif (getMaxHealth() < health) {\n \t\t\thealth = getMaxHealth();\n \t\t}\n \t}", "public int getMaxHealth();", "public void setMaxHealth() {\n\t\tthis.maxHealth *= level / 10;\n\t}", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public void setMaxHealth(int newMaxHealth)\r\n\t{\r\n\t\tMaxHealth = newMaxHealth;\r\n\t}", "@Override\n public int maxHealth() {\n return 25;\n }", "public void changeHealth(int i) {\n \t\tif (health + i < getMaxHealth()) {\n \t\t\thealth += i;\n \t\t} else if (health + i > getMaxHealth()) {\n \t\t\thealth = getMaxHealth();\n \t\t} else if (health + i < 1) {\n \t\t\thealth = 0;\n \t\t\talive = false;\n \t\t}\n \t}", "private static int gainVitality(int vitality){\r\n vitality++;\r\n System.out.println(\"You gain 1 vitality\");\r\n return vitality;\r\n }", "public abstract void incrementHealth(int hp);", "public int getMaxHealth()\r\n\t{\r\n\t\treturn MaxHealth;\r\n\t}", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "protected void setMaxHealthPerLevel(double maxHealthPerLevel) \r\n\t{\tthis.maxHealthPerLevel = maxHealthPerLevel;\t}", "public abstract void setHealth(int health);", "private void takeDamage(int damage){ health -= damage;}", "public int getMaxHealth() {\n \t\treturn (int)(maxHealthModifier + (stamina/2 + strength/4)*Math.PI);\n \t}", "void gainHealth(int points) {\n this.health += points;\n }", "public void setMaxHealth(final int maxHealth) {\n this.maxHealth = maxHealth;\n }", "public int getMaxHealth() {\r\n return maxHealth;\r\n }", "private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }", "protected void setBaseMaxHealth(int baseMaxHealth) \r\n\t{\tthis.baseMaxHealth = baseMaxHealth;\t}", "public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "public int getMaxHealth() {\n return maxHealth;\n }", "public float getMaxHealth()\n {\n return maxHealth;\n }", "public void reduceHealth(int damage){\n health -= damage;\n }", "public double getMaxHealth() {\n return maxHealth;\n }", "private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "public void updateHp(double amount);", "public void setHealth(double h){\n health = h;\n }", "void decreaseHealth(Float damage);", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "public void setHealth(float health)\n {\n if ( health > getMaxHealth() )\n {\n this.health = getMaxHealth();\n }\n else if (health < 0)\n {\n this.health = 0.0f;\n }\n else\n {\n this.health = health;\n }\n\n }", "public int getBaseMaxHealth()\r\n\t{\treturn this.baseMaxHealth;\t}", "int getHealth();", "public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }", "@Override\n public void hp(){\n HP=50*nivel;\n }", "public static void heal(LivingEntity ent) {\n\t\tAttributeInstance maxHealth = ent.getAttribute(Attribute.GENERIC_MAX_HEALTH);\n\t\tif(maxHealth != null) {\n\t\t\tent.setHealth(maxHealth.getValue());\n\t\t}\n\t\tif(ent instanceof Player) {\n\t\t\tPlayer p = (Player) ent;\n\t\t\tp.setFoodLevel(20);\n\t\t\tp.setSaturation(20);\n\t\t}\n\t}", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public void setMaxHealth(float maxHealth)\n {\n float percentage;\n\n if (getMaxHealth() > 0)\n {\n percentage = getHealth() / getMaxHealth();\n }\n else\n {\n percentage = 1.0f;\n }\n\n this.maxHealth = maxHealth;\n\n // Update the health to continue as the same percentage of the max.\n setHealth( getMaxHealth() * percentage );\n }", "public void setHealth(double Health){\r\n health = Health;\r\n }", "private static int devilHealthScale(int devilHealth, int playerLevel){\r\n if(playerLevel > 4){\r\n devilHealth = devilHealth + ((10 * (playerLevel - 4)));\r\n }\r\n return devilHealth;\r\n }", "private void setMaxHealth(EliteMobProperties eliteMobProperties) {\n double defaultMaxHealth = eliteMobProperties.getDefaultMaxHealth();\n this.maxHealth = (eliteMobLevel * CombatSystem.PER_LEVEL_POWER_INCREASE * defaultMaxHealth + defaultMaxHealth);\n eliteMob.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(maxHealth);\n }", "public void setActualHP(int hp) { this.actualHP = Math.max(0, hp); }", "public int getHealth();", "public short getSiegeWeaponDamage();", "public int getMaxHealth() {\n return this.maxHealth;\n }", "public void updateHealth(String target, Integer amount, boolean isAttack){\n\n if(target == \"player\"){\n if(isAttack){\n //To make defence/armour a bit weaker, round up on the damage.\n playerShipHealth+= (int) (amount - Math.ceil(amount*playerShipDefence));\n } else{\n playerShipHealth+=amount;\n\n }\n if (playerShipHealth > playerShipHealthMax){\n playerShipHealth = playerShipHealthMax;}\n else if (playerShipHealth <= 0){\n //PlayerDied\n\n playerShipDead = true;\n playerShip.setIsDead();\n }\n\n } else if (target == \"enemy\"){\n if(isAttack){\n enemyShipHealth+= (int) (amount - Math.ceil(amount*enemyShipDefence));\n } else{\n enemyShipHealth+=amount;\n }\n if (enemyShipHealth > enemyShipHealthMax){\n enemyShipHealth = enemyShipHealthMax;}\n else if (enemyShipHealth <= 0){\n //Enemy Died\n enemyShipDead = true;\n enemyShip.setIsDead();\n }\n }\n }", "public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }", "int getMaxMana();", "public int getHealthGain();", "public void setHealth(int health) {\n this.health = health;\n }", "@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }", "public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }", "public void meditate() {\n int currentSamuraiHealth = this.getHealth();\n this.setHealth(currentSamuraiHealth/2 + currentSamuraiHealth);\n System.out.println(\"Samurai's new health is : \" + this.getHealth());\n }", "public int getMaxHealth() {\n\t\treturn maxHealth;\n\t}", "public int getMaxHealth() {\n\t\treturn maxHealth;\n\t}", "public void decreaseHealth() {\n setHealth(getHealth()-1);\n }", "public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }", "public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }", "@Override\n\tpublic void setHealth(double health) {\n\n\t}", "@Override\r\n\tprotected void setHealth( double newHealth ) \r\n\t{\r\n\t\tthis._health = this._health - newHealth;\r\n\t}", "public int getHealth() { return this.health; }", "public void recieveDamage(){\n this.health--;\n }", "@Test\n\tpublic void testCalHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(55);\n\t\tassertFalse(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.calHealth();\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t}", "public Integer getHealth();", "public void heal(int healAmt) {\r\n\t\thealth += healAmt;\r\n\t\tif (health >= maxHealth)\r\n\t\t\thealth = maxHealth;\r\n\t\t_checkInvariant();\r\n\t}", "public void setHealth(float health) {\r\n \t\tthis.health = health;\r\n \t}", "public void consumeVigor(float amount) {\n\t\tstat -= amount;\n\t\tif(stat < 0f)\n\t\t\tstat = 0f;\n\t\t\n\t\t// Check for increasing level up counters\n\t\tif(amount > maxStat / threshold) {\n\t\t\t// Current average damage taken exceeding threshold of max HP\n\t\t\taverage = (average + (amount - (maxStat / threshold))) / 2f;\n\t\t\t// Current total damage taken exceeding threshold of max HP\n\t\t\ttallie += amount - (maxStat / threshold);\n\t\t\tSystem.out.println(\"Vigor \" + average + \" \" + tallie);\n\t\t}\n\n\t\t// Check for level up conditions\n\t\tif(tallie >= maxStat * Math.log(maxStat)) {\n\t\t\t// Apply new max HP and reset counters\n\t\t\tmaxStat = maxStat * average;\n\t\t\tthreshold = (float) Math.log(maxStat);\n\t\t\taverage = 0f;\n\t\t\ttallie = 0f;\n\t\t}\n\t}", "public int getHealthCost();", "public void reduceHealth() {\n\t}", "void displayHealth(int health){\n\t\r\n\t\thealth = health + this.health + super.health + a.health;\r\n\t\tSystem.out.println(health);\r\n\t}", "void hurt(int strength) {\n life -= strength;\n if (life < 0)\n life = 0;\n }", "Float getHealth();", "private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }", "public void setSiegeWeaponDamage(short siegeWeaponDamage);", "public void setPlayerMaxHealth(Player player) {\n int health=16+(player.getLevel()/2);\n if(health>40) health=40;\n // player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, player.getLevel(), true));\n player.setMaxHealth(health);\n }", "public void decreaseHealth(int hp) {\n this.decreaseLife();\n }", "public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }", "public double getMaxHealthPerLevel()\r\n\t{\treturn this.maxHealthPerLevel;\t}", "@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}", "public void setHealth(double health) {\r\n\t\tthis.health = health;\r\n\t}", "public double getHealth() { return health; }", "private void raiseFoodLevel(int x) {\n if (this.foodLevel + x <= 100) {\n this.foodLevel += x;\n } else {\n this.foodLevel = 100;\n }\n }", "@Override\n public void scaleStats() {\n this.damage = BASE_DMG + (this.getLevel() * 3);\n }", "public int giveDamage();", "private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }", "protected void setMaxHealth(EntityLivingBase target, int health)\n {\n if (target.getMaxHealth() != health)\n {\n target.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(health);\n }\n }", "public static void setHealth(int healtha)\r\n\t{\r\n\t\thealth = healtha;\r\n\t}", "float getPercentHealth();", "public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}", "public void incrementCurrentHealth(int healingValue) {\n\t\tcurrentHealth = Math.min(currentHealth + Preconditions.checkGreaterThanZero(healingValue), maxHealth);\n\t}" ]
[ "0.73422796", "0.72144467", "0.7025217", "0.6905525", "0.6824539", "0.6770928", "0.6738792", "0.67284244", "0.66661495", "0.6645168", "0.6619308", "0.6614566", "0.6581197", "0.6560061", "0.65552324", "0.65036005", "0.65013236", "0.64961433", "0.6495051", "0.6472821", "0.64652115", "0.64632905", "0.6454948", "0.6449229", "0.6448399", "0.64475775", "0.64427316", "0.64347243", "0.6424164", "0.6383403", "0.6383403", "0.6383403", "0.6383403", "0.6383403", "0.6383403", "0.6383403", "0.6373437", "0.63713247", "0.6351978", "0.6339159", "0.6329755", "0.6317463", "0.63102835", "0.6308244", "0.62767315", "0.6259663", "0.62572545", "0.62379116", "0.6228923", "0.622889", "0.62264913", "0.61949575", "0.6189217", "0.6169196", "0.61657184", "0.6161385", "0.6159838", "0.6159419", "0.6149609", "0.61415863", "0.61260605", "0.6119249", "0.6104841", "0.6097636", "0.6097636", "0.60914844", "0.60854286", "0.607725", "0.60734737", "0.6066162", "0.6061812", "0.605142", "0.6048811", "0.60455805", "0.60454154", "0.60440063", "0.6036707", "0.6026679", "0.60228664", "0.60227674", "0.6018414", "0.60132647", "0.59989613", "0.5993119", "0.5975958", "0.59720045", "0.5969632", "0.5949178", "0.5943012", "0.5937074", "0.5929402", "0.592911", "0.5922853", "0.5914179", "0.59136206", "0.5913598", "0.59113467", "0.5903534", "0.59003854", "0.58870494" ]
0.76884514
0
Function that adds stat points upon level up
private static int gainStatPoints(int statPoints){ statPoints++; System.out.println("You have " + statPoints + " stat points available."); return statPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addHealthLevel(int points)\n {\n healthLevel = healthLevel + points;\n showHealthLevel();\n if (healthLevel < 0) \n {\n Greenfoot.playSound(\"game-over.wav\");\n Greenfoot.stop();\n }\n }", "private void addPoint(){\n\n userList.addUserCorrect();\n userList.addUserAttempt();\n\n\n //This if levels up the user if they have reached the number of points needed\n if (userList.findCurrent().getNumPointsNeeded()\n <= userList.findCurrent().getNumQuestionsCorrect()) {\n\n userList.addUserPointsNeeded();//increment points needed to level up\n userList.levelUpUser();\n }\n }", "public String[] upStats(int stat) {\n String[] stats = {\"nothing\",\"0\"};\n switch(stat) {\n case 0:\n break;\n case 1:\n stats[0] = \"crit\";\n stats[1] = String.format(\"%.1f\", upCrit(levelCrit));\n addPoint(-1);\n this.pointsSpent++;\n return stats;\n case 2: \n stats[0] = \"health\";\n stats[1] = String.format(\"%.1f\", upHealth(levelHealth));\n addPoint(-1);\n this.pointsSpent++;\n return stats;\n case 3: \n stats[0] = \"damage\";\n stats[1] = String.format(\"%.1f\", upDamage(levelDamage));\n addPoint(-1);\n this.pointsSpent++;\n return stats;\n case 4:\n stats[0] = \"level\";\n stats[1] = \"1\";\n levelUp(1);\n addPoint(-1);\n this.pointsSpent++;\n return stats;\n }\n return stats;\n }", "private void applyLvlUpCost() {\n }", "@Override\n public void levelUp(){\n //System.out.println(\"Level: \" + getLevel());\n if (getLevel() > 5) return;\n\n /* System.out.println(\"\\n-------\");\n System.out.println(\"Level: \" + getLevel());\n System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n*/\n double percentage = growth(getLevel()) + growthRate;\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (getLevel() % 2 != 0) range++;\n setLevel(getLevel() + 1);\n\n /* System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n System.out.println(\"-------\\n\");*/\n }", "protected void levelUp(){\r\n\t\tthis.level = this.level+1;\r\n\t\tint prevMaxHp = this.getHitPoints();\r\n\t\tint prevAtk = this.getAttackRating();\r\n\t\tint prevDef = this.getDefenseRating();\r\n\r\n\t\tif(level>=2 && level<=9){\r\n\t\t\tthis.maxHitPoints += 7;\r\n\t\t\tthis.attackRating += 3;\r\n\t\t\tthis.defenseRating += 3;\r\n\t\t}\r\n\r\n\t\tif(level>=10){\r\n\t\t\tthis.maxHitPoints+=2;\r\n\t\t\tthis.attackRating+=1;\r\n\t\t\tthis.defenseRating+=1;\r\n\t\t}\r\n\r\n\t\tthis.experienceValue+=15;\r\n\t\tthis.hitPoints = maxHitPoints;\r\n\r\n\t\tSystem.out.format(\"\\n|----LEVEL-UP----|\");\r\n\t\tSystem.out.print(\"\\n\" + this.getName() + \" is now level \" + this.getLevel());\r\n\t\tSystem.out.format(\"%nMax Hit Points: %2d ---> %2d\", prevMaxHp, this.getMaxHitPoints());\r\n\t\tSystem.out.format(\"%nAttack rating: %2d ---> %2d\", prevAtk, this.getAttackRating());\r\n\t\tSystem.out.format(\"%nDefense Rating: %d ---> %2d\", prevDef, this.getDefenseRating());\r\n\t\tSystem.out.format(\"%nNext level: %3dXP%n%n\", (calcLevel(1,0) - this.getExperiencePoints()));\r\n\r\n\r\n\t}", "public void incLevel(int lvl){this.Level=this.XP/(100);}", "void gainHealth(int points) {\n this.health += points;\n }", "private void UpdateAdds() {\n Adds = (Level + CurrentHealth)/10;\n }", "protected int[] levelUp() {\n level = Math.min(level + 1, MAX_LEVEL);\n if (level == MAX_LEVEL) {\n Game.getPlayer().getMedalCase().increase(MedalTheme.LEVEL_100_POKEMON);\n }\n\n // Update stats and return gain\n return this.setStats();\n }", "public void addPoint(int points){\n\t\tthis.fidelityCard.point += points;\t\t\n\t}", "public void addPoint() {\n points += 1;\n }", "public void setupLevelAndPoints(){\r\n \t\tint[] levelAndPoints = new int[]{0, 0, 0};\r\n \t\tlevelAndPoints = DashboardActivity.getLevelAndPoints();\r\n \t\tLog.i(\"levelAndPoints content\", levelAndPoints.toString());\r\n\t\t\r\n \t\t//Setting up level\r\n \t\tlevelImage = (ImageView) findViewById(R.id.levelImageView);\r\n \t\tif(levelAndPoints[0] == 1){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_one));\r\n \t\t}else if(levelAndPoints[0] == 2){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_two));\r\n \t\t}else if(levelAndPoints[0] == 3){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_three));\r\n \t\t}else if(levelAndPoints[0] == 4){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_four));\r\n \t\t}else if(levelAndPoints[0] == 5){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_five));\r\n \t\t}else if(levelAndPoints[0] == 6){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_six));\r\n \t\t}\r\n \t\t\r\n \t\t//Setting up progressbar and points above bar\r\n \t\tlevelProgressBar = (ProgressBar) findViewById(R.id.levelProgressBar);\r\n \t\tlevelProgressBar.setVisibility(ProgressBar.VISIBLE);\r\n \t\tlevelProgressBar.setMax(levelAndPoints[2]);\r\n \t\tlevelProgressBar.setProgress(levelAndPoints[1]);\r\n \r\n \t\tshowPointsAboveProgressBar = (TextView) findViewById(R.id.pointsInProgressBar);\r\n \t\tshowPointsAboveProgressBar.setText(levelAndPoints[1] + \"/\" + levelAndPoints[2]);\r\n \t}", "public void incrementVictoryPoints() {\n\t\tthis.totalVictoryPoints++;\n\t}", "public void addPoints(int point){\n\t\tthis.points += point;\n\t}", "public void addPoints(int addP){\n this.points += addP;\n }", "public void levelUp(int newLvl) {\n\t\tsuper.levelUp(newLvl);\n\n\t\t// Add artifacts bonus stats\n\t\tif (armor != null) {\n\t\t\tdefense += armor.getDefense();\n\t\t}\n\t\tif (helm != null) {\n\t\t\tmaxHp += helm.getHp();\n\t\t\thp = maxHp;\n\t\t}\n\t\tif (weapon != null) {\n\t\t\tattack += weapon.getAttack();\n\t\t}\n\n\t\t// Update after levelUp\n\t\tneededXp = level * 1000 + (int)Math.pow(level - 1, 2) * 450;\n\t\txp = tmpXp;\n\t}", "protected synchronized void updatePoints(double points)\n\t{\n\t\tif(Config.VIT_MAX_PLAYER_LVL > _player.getLevel())\n\t\t{\n\t\t\tif(Config.VIT_CHECK_LUCKY_SKILL)\n\t\t\t{\n\t\t\t\tif(_player.getSkillLevel(LUCKY_SKILL) > 0)\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn;\n\t\t}\n\n\t\tint prevLvl = getLevel();\n\t\tint prevPoints = (int) _vitPoints;\n\n\t\tchangePoints(points);\n\t\tsendChangeMessage(prevPoints, prevLvl);\n\t}", "public int getPoints() {\r\n\t\treturn levelManager.getPoints();\r\n\t}", "public void givePlayerPoints(int pointsToAdd) {\n this.points = this.points + pointsToAdd;\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "@Override\n\tdouble updateLevel() {\n\t\treturn 0;\n\t}", "public void generalLevelUp() {\n\t\tif(currentGenLevelXP >= nextGenLevelXP)\n\t\t\tcurrentGenLevelXP = currentGenLevelXP - nextGenLevelXP;\n\t\telse\n\t\t\tcurrentGenLevelXP = 0;\n\t\t\n\t\tif(generalLevel < 40) { // Level cap is 40\n\t\t\tgeneralLevel++;\n\t\t\tLogger.print(getName() + \" levels up to \" + generalLevel + \".\");\n\t\t\tstatUp();\n\t\t}\n\t\tsetGenExpReq();\n\t}", "@Override\n public void upgrade(int level){\n System.out.println(\"Level adfasdfasdf: \" + level);\n System.out.println(getLevel());\n\n if(level > 5) level = 5;\n\n if(level > 1){\n for (int i = 1; i < level; i++) levelUp();\n }\n\n /*\n //System.out.println(\"\\n-------\");\n //System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n\n double percentage = growth(level);\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (level % 2 != 0) range++;\n\n //System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n //System.out.println(\"-------\\n\");*/\n }", "private static int removeStatPoints(int statPoints){\r\n statPoints--;\r\n return statPoints;\r\n }", "public void addLevel()\r\n {\r\n tables.addFirst( new HashMap<String,T>() );\r\n counts.addFirst( 0 );\r\n }", "public void gainExp(int exp){\r\n\t\tSystem.out.println(this.getName() + \"'s XP: \" + this.getExperiencePoints() + \" ---> \" + (this.getExperiencePoints()+exp));\r\n\t\tthis.experiencePoints += exp;\r\n\t\t\t//parameters 1 == count, 0 is being used as the xp start point to evaluate\r\n\t\t\t//the intervals in the helper method\r\n\t\tif(this.getExperiencePoints() >= calcLevel(1,0)){\r\n\r\n\t\t\tthis.levelUp();\r\n\t\t}\r\n\r\n\t}", "double getLevel();", "double getLevel();", "public void incrementLevel()\r\n {\r\n counts.addFirst( counts.removeFirst() + 1 );\r\n }", "public void giveLevels(int amount) {\n // Cannot give non-positive amount of levels\n if (amount < 1) {\n throw new IllegalArgumentException(\"Invalid level amount - cannot be less than 1\");\n }\n\n // Level up\n amount = Math.min(amount, classData.getMaxLevel() - level);\n if (amount <= 0) return;\n level += amount;\n points += classData.getGroupSettings().getPointsForLevels(level, level - amount);\n getPlayerData().giveAttribPoints(classData.getGroupSettings().getAttribsForLevels(level, level - amount));\n\n // Update health/mana\n final Player player = getPlayerData().getPlayer();\n if (player != null) {\n getPlayerData().updatePlayerStat(getPlayerData().getPlayer());\n getPlayerData().getEquips().update(getPlayerData().getPlayer());\n }\n getPlayerData().autoLevel();\n\n // Call the event\n PlayerLevelUpEvent event = new PlayerLevelUpEvent(this, amount);\n Bukkit.getPluginManager().callEvent(event);\n\n // Apply the effect\n if (SkillAPI.getSettings().hasLevelUpEffect()) {\n DynamicSkill skill = SkillAPI.getSettings().getLevelUpSkill();\n skill.cast(player, level);\n }\n }", "private void incrementLevels(int levels){\n this.level += levels;\n if (this.level > 10){\n this.level = 10;\n }\n }", "public void addPoint_action()\r\n/* */ {\r\n/* 94 */ this.points_action += 1;\r\n/* */ }", "public void growStats() {\r\n\t\tLIFE += increment;\r\n\t\tSTRENGTH += increment;\r\n\t}", "public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "@Override\n\tpublic void update() {\n\t\tage++;\n\t\tpoints = Globals.points;\n\t}", "public void setLevel(double amt) {\n\t\tlevel += amt;\n\t}", "public void\t\t\t\t\t\t\tincreaseLevel()\t\t\t\t\t\t\t\t{ this.currentLevel += 1; }", "public void addCoordinatingExp(int exp)\n\t{\n\t\tm_oldLevel = getCoordinatingLevel();\n\t\tm_skillCoordExp = m_skillCoordExp + exp;\n\t\tif(getCoordinatingLevel() > m_oldLevel)\n\t\t{\n\t\t\tServerMessage skillLevels = new ServerMessage(ClientPacket.SKILL_LVL_UP);\n\t\t\tskillLevels.addInt(getTrainingLevel());\n\t\t\tskillLevels.addInt(getBreedingLevel());\n\t\t\tskillLevels.addInt(getFishingLevel());\n\t\t\tskillLevels.addInt(getCoordinatingLevel());\n\t\t\tgetSession().Send(skillLevels);\n\t\t}\n\t}", "public void addTo(Point p){\n Point point = new Point(this.nbAttributes);\n float accu = 0;\n for (int i = 0; i < this.attributes.length; i++){\n accu = this.attributes[i] + p.attributes[i];\n this.attributes[i] = Math.round(accu) ;\n// System.out.print(accu + \" \");\n }\n }", "public void addPoints(String playerName, Integer pointsToAdd) {\r\n if (points.containsKey(playerName)) {\r\n points.put(playerName, points.get(playerName) + pointsToAdd);\r\n } else {\r\n points.put(playerName, pointsToAdd);\r\n }\r\n }", "private void setLevel(){\n\t\tif(getD(y) <= T)\n\t\t\tlevel = \"lower\";\n\t\telse\n\t\t\tlevel = \"higher\";\n\t}", "private static int levelUp(int playerLevel){\r\n int level = playerLevel + 1;\r\n System.out.println(\"You have leveled up!\"); \r\n //Tells the user what level they are\r\n System.out.println(\"You are now level \" + level + \"!\");\r\n return level;\r\n }", "public void incrementPrayerPoints(double amount) {\r\n prayerPoints += amount;\r\n if (prayerPoints < 0) {\r\n prayerPoints = 0;\r\n }\r\n if (prayerPoints > staticLevels[PRAYER]) {\r\n prayerPoints = staticLevels[PRAYER];\r\n }\r\n if (entity instanceof Player) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, PRAYER));\r\n }\r\n }", "@Override\n\tpublic void spendPoints(int points) {\n\n\t}", "@Override\n\tpublic void updateLevel() {\n\t\tthis.algorithm();\n\t\t\n\t}", "public void adjLocation(double l){this.PlayerLocation;}", "int getOnLevel();", "public void givePlayerLevelBonus() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\t\tp.addScore(5 * (currentLevel-1));\n\t\t\t}\n\t\t}\n\t\tserver.updateHighscoreList();\n\t\tserver.addTextToLoggingWindow(\"Server gives all players level bonus\");\n\t}", "void addPointsToScore(int points) {\n score += points;\n }", "public void addNegativePoints(int pts) {\r\n\t\t negativePoints=(negativePoints + pts);\r\n }", "public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }", "public void addRating(double points) {\n rating += points;\n }", "public void incrementStat(AbstractStat stat, long increment) {\n stats.add(stat, increment);\n }", "@FXML\r\n private void addPointsAG() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(agility.getText());\r\n int f2 = f1 + 1;\r\n agility.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "private void levelUp() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (a.getVisibility()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tresetInvaders();\n\t\taddRow();\n\t\t\n\t\tenemyShotList.add(new Shot(0, 0, SHOT_WIDTH, SHOT_HEIGHT, 15));\n\t\tlevel++;\n\t\t\n\t\tint powerupx = (int) (Math.random()*(WIDTH-PLAYER_WIDTH));\n\t\tdouble poweruprandom = Math.random();\n\t\t\n\t\tif (poweruprandom < 0.25) {\n\t\t\tarmorPiercing.reset(powerupx);\n\t\t}\n\t\t\n\t\tif (poweruprandom >= 0.25 && poweruprandom < 0.5) {\n\t\t\texplosive.reset(powerupx);\n\t\t}\n\t}", "@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(result, expResult);\n }", "public int addPoints(int points) {\n if (!isClosed()) {\n pointsHistory.add(points);\n }\n return points;\n }", "private void calculateStats(World world, Vec3i spawnLocation) {\n double distanceFromSpawn = getWorldSpawn(world).getManhattanDistance(spawnLocation);\n int levelBase = (int) (distanceFromSpawn / (double) OpenPixelmonConfig.distancePerLevel) + 1;\n int lvlVariation = PixelmonUtils.randBetween(-5, 5);\n set(LEVEL, MathHelper.clamp(levelBase + lvlVariation, 1, OpenPixelmonConfig.maxLevelByDistance));\n\n// setHealth((get(IV_STORAGE).hp + 2.0F * (float) getPokedexEntry().hp + (float) get(EV_STORAGE).hp / 4.0F + 100.0F) * (float) getLevel() / 100.0F + 10.0F); old pixelmon method. not entirely sure why it's differnet\n set(MAX_HP, getPokedexEntry().hp);\n set(HP, (float) (Math.floor(0.01 * (2 * getPokedexEntry().hp + get(IV_STORAGE).hp + Math.floor(0.25 * get(EV_STORAGE).hp)) * getLevel()) + getLevel() + 10));\n }", "private void showPoints() {\n if (currentPoints !=0) {\n tVcurrentPoints.setText(getString(R.string.youHaveReached) + currentPoints + getString(R.string.reachedPoints));\n }\n }", "private void getPoints()\n\t{\n\t\ttotalEntered = statsCollector.getTotalEnteredPoints();\n\t\taverageWait = statsCollector.getAverageWaitPoints();\n\t\tmaxWait = statsCollector.getMaxWaitPoints();\n\t\ttimeAlive = statsCollector.getTimeAlivePoints();\n\t}", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void addPoints(final int points) {\n\t\tPoints.addPoints(this.player, points);\n\t}", "public int getPoints() { return points; }", "public void awardStat(ResourceLocation debug1) {\n/* 1498 */ awardStat(Stats.CUSTOM.get(debug1));\n/* */ }", "@Override\n public int getPoints(){\n\n }", "public void levelUp1()\r\n {\r\n this.health = 900;\r\n Story.levelUp1Text();\r\n }", "@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}", "public void gainExpHonors(int exp){\r\n\t\tSystem.out.println(this.getName() + \"'s XP: \" + this.getExperiencePoints() + \" ---> \" + (this.getExperiencePoints()+exp));\r\n\r\n\t\t//this.experiencePoints += exp;\r\n\t\t\t//parameters 1 == count, 0 is being used as the xp start point to evaluate\r\n\t\t\t//the intervals in the helper method\r\n\t\twhile(exp >= calcLevel(1,0)){\r\n\t\t\t//System.out.println(calcLevel(1,0));\r\n\t\t\tthis.experiencePoints = calcLevel(1,0);\r\n\t\t\t//System.out.println(this.getExperiencePoints());\r\n\t\t\tthis.levelUp();\r\n\t\t}\r\n\t\t\r\n\t\tthis.experiencePoints += (exp-this.experiencePoints);\r\n\t}", "protected void restockItem(int x){\r\n this.level += x;\r\n }", "int getHungerPoints(ItemStack stack);", "@FXML\r\n private void addPoints() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(strength.getText());\r\n int f2 = f1 + 1;\r\n strength.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "void update(Level level) {\r\n calculateLeaderboardScores(level);\r\n bubbleSort();\r\n }", "public int getPoints();", "public void awardPoints(int points)\n {\n score += points ;\n }", "public int getPointsHealthy()\n {\n return pointsHealthy;\n }", "private void drawHealthPoints() {\n int i = 0;\n for (; i < Math.floor(gameWorld.getHero().getHealthPoints()); i++) {\n hudBatch.draw(heartFull, i * HEART_SIZE, VIRTUAL_HEIGHT - HEART_SIZE, HEART_SIZE, HEART_SIZE);\n }\n if (gameWorld.getHero().getHealthPoints() % 1 != 0) {\n hudBatch.draw(heartHalf, i++ * HEART_SIZE, VIRTUAL_HEIGHT - HEART_SIZE, HEART_SIZE, HEART_SIZE);\n }\n for (; i < gameWorld.getHero().getMaxHealthPoints(); i++) {\n hudBatch.draw(heartEmpty, i * HEART_SIZE, VIRTUAL_HEIGHT - HEART_SIZE, HEART_SIZE, HEART_SIZE);\n }\n }", "public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}", "int getPoints();", "public void setFighterPoints(int points) {\n if (pointsPullCheck(points)) {\n fighterPoints += points;\n }\n }", "public int getVictoryPoints() {\n \t\treturn getPublicVictoryPoints() + victory;\n \t}", "int getNeedPoints();", "public void levelUp2()\r\n {\r\n this.health = 1200;\r\n Story.levelUp2Text();\r\n }", "int getUsedPoints();", "int getUsedPoints();", "int getUsedPoints();", "public void printLevelLoc(String prepend, int x, int y) {\r\n\t\tString[] levelNames = {\"Sky\", \"Surface\", \"Iron\", \"Gold\", \"Lava\", \"Dungeon\"};\r\n\t\tString levelName = levelNames[-1*depth+1];\r\n\t\t\r\n\t\tSystem.out.println(prepend + \" on \" + levelName + \" level: x=\"+x + \" y=\"+y);\r\n\t}", "public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}", "public static void increaseHunger(int statIncreaseAmount) {\n double newHunger = Sim.getHunger() + statIncreaseAmount;\n\n if (newHunger > MAX_PER_STAT) {\n Sim.setHunger(MAX_PER_STAT);\n } else {\n Sim.setHunger(newHunger);\n }\n\n }", "public static void incrementPoints(String side){\n\t\tif(side.equals(\"white\")){\n\t\t\twhitePoints++;\n\t\t\tString tempString = \"White points: \";\n\t\t\tuserInterface.whitePoints.setText(tempString.concat(Integer.toString(whitePoints)));\n\t\t}\n\t\telse{\n\t\t\tblackPoints++;\n\t\t\tString tempString = \"Black points: \";\n\t\t\tuserInterface.blackPoints.setText(tempString.concat(Integer.toString(blackPoints)));\n\t\t}\n\t}", "public void setLvl(int lvl) {\r\n\t\tfor(int i = this.nivelArma; i < lvl; i++) {\r\n\t\t\tstatsLvlUp();\r\n\t\t\tnivelArma += 1;\r\n\t\t}\r\n\t}", "public void addXp(SkillType skill, double xp) {\n levelsXp.put(skill, levelsXp.get(skill) + 1);\n levels.put(skill, calculateLevel(xp));\n }", "private String getPoints(){\n\t\tString pu = \" punts.\";\n\t\tif(points == 1){\n\t\t\tpu = \" punt.\";\n\t\t}\n\t\treturn \"Puntuació de \" + points + pu;\n\t}", "public int getPointsGainedLastRound(){return pointsGainedLastRound;}", "public void addLocY (int adder)\n {\n locY += adder;\n }", "public void calculatePoints() {\n /*\n for (int i = 0; i < getRacers().size(); i++) {\n String username = getRacers().get(i).getUsername();\n int total = 0;\n for (int j = 0; j < getRounds().size(); j++) {\n Slot slot = getRounds().get(j).findRacerInRound(username);\n if (slot != null) {\n total = total + slot.getPoints();\n }\n }\n getRacers().get(i).setPoints(total);\n }*/\n }", "public void drawLevelNumber(int lvl){\n Graphics2D g2d = (Graphics2D) infoCanvas.getGraphics();\n g2d.setColor(Color.BLACK);\n g2d.fillRect(infoCanvas.getWidth() / 3 + 4, infoCanvas.getHeight() / 10 + 6, infoCanvas.getWidth() / 3 - 8, infoCanvas.getHeight() / 10 - 8);\n Font f = new Font(\"Font.PLAIN\", Font.BOLD, infoCanvas.getHeight() / 12);\n g2d.setFont(f);\n g2d.setColor(Color.GREEN);\n int startX = infoCanvas.getWidth() / 3 + 4;\n int startY = infoCanvas.getHeight() / 10 + 10;\n int stringX = startX + (infoCanvas.getWidth() / 3 - 8)/3 * 2;\n g2d.drawString(String.valueOf(lvl), stringX, startY + infoCanvas.getHeight() / 10 - 18);\n }", "private int getLevel() {\n return getStat(currentLevel);\n }", "public void sauvegarderPointPartie (){\n\t\t\n\t\tint menage = (Integer) pointPartieEnCours.get(THEMES.MENAGE);\n\t\tint maths = (Integer) pointPartieEnCours.get(THEMES.MATHS);\n\t\tint francais = (Integer) pointPartieEnCours.get(THEMES.FRANCAIS);\n\t\t\n\t\tmenage += (Integer) level.get(THEMES.MENAGE);\n\t\tmaths += (Integer) level.get(THEMES.MATHS);\n\t\tfrancais += (Integer) level.get(THEMES.FRANCAIS);\n\t\t\n\t\tlevel.remove(THEMES.MENAGE); \n\t\tlevel.remove(THEMES.MATHS); \n\t\tlevel.remove(THEMES.FRANCAIS); \n\t\t\n\t\t\n\t\tlevel.put(THEMES.MENAGE ,menage); \n\t\tlevel.put(THEMES.MATHS ,maths); \n\t\tlevel.put(THEMES.FRANCAIS ,francais); \n\t\t\n\t}" ]
[ "0.6856258", "0.6720957", "0.66850346", "0.6542143", "0.64650285", "0.6368769", "0.6318849", "0.6287606", "0.62656575", "0.62453866", "0.61945343", "0.61897445", "0.6159424", "0.5967858", "0.5961442", "0.5957745", "0.59382224", "0.5910268", "0.5892342", "0.58286554", "0.5798392", "0.578923", "0.5784977", "0.5784721", "0.5778704", "0.57448894", "0.57290155", "0.57262117", "0.57262117", "0.57214606", "0.5709991", "0.56821704", "0.56626934", "0.56519425", "0.5642124", "0.5638329", "0.56217295", "0.5617099", "0.5601781", "0.5595284", "0.55775964", "0.5562478", "0.55468094", "0.55464774", "0.55437666", "0.55303764", "0.5526983", "0.5507495", "0.55061466", "0.55016553", "0.54977024", "0.5489096", "0.5486271", "0.548529", "0.5478378", "0.54754704", "0.54689586", "0.5464709", "0.54454744", "0.5443471", "0.54401475", "0.54229695", "0.5395972", "0.53921205", "0.5388745", "0.53878975", "0.53873914", "0.53811604", "0.5380335", "0.537966", "0.53730685", "0.5369628", "0.53686583", "0.5367565", "0.53613853", "0.5359714", "0.5352362", "0.5345896", "0.5343579", "0.53316325", "0.5330944", "0.5320521", "0.53167176", "0.5296118", "0.52908057", "0.52908057", "0.52908057", "0.5289635", "0.5280972", "0.52773535", "0.52689785", "0.5262279", "0.5261873", "0.5259083", "0.5256701", "0.52525127", "0.5248943", "0.5224126", "0.52234936", "0.52210724" ]
0.69790107
0
Function that increases max mp using intelligence
private static int maxMp(int mp){ int mMP = 0; mMP = mp + 5; return mMP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public int getMaxMP() {\n return maxMP_;\n }", "public void setMaxAlturaCM(float max);", "int getMPValue();", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000100;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000080;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public static native int OpenMM_AmoebaMultipoleForce_getMutualInducedMaxIterations(PointerByReference target);", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00008000;\n maxMP_ = value;\n onChanged();\n return this;\n }", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000040;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public float maxSpeed();", "int askForTempMax();", "int getCurMP();", "int getCurMP();", "int getCurMP();", "int getCurMP();", "int getCurMP();", "int getCurMP();", "public void setMpMax(CoreComponentTypes.apis.ebay.BasicAmountType mpMax) {\r\n this.mpMax = mpMax;\r\n }", "public float getMaxAlturaCM();", "public void setMaxpower(int maxpower) {\n\t\t\r\n\t}", "float xMax();", "public void setVarimaxMaximumIterations(int max){\n this.nVarimaxMax = max;\n }", "public void setMinAlturaCM(float max);", "private void updateMax(int next) {\n while (val < next) {\n val = next;\n }\n }", "double getMax();", "double getMax();", "int getMaximum();", "public CoreComponentTypes.apis.ebay.BasicAmountType getMpMax() {\r\n return mpMax;\r\n }", "@Override\r\n\tprotected void onIncreaseMp(TYPE type, int value, int skillId, int logId)\r\n\t{\n\t}", "public int getMaxpower() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int getMaxIterations() {\n\t\treturn maxIterations;\n\t}", "void setMaximum(int max);", "public static native void OpenMM_AmoebaMultipoleForce_setMutualInducedMaxIterations(PointerByReference target, int inputMutualInducedMaxIterations);", "public void setMaxSpecialPower(int maxS) {\n maxSpecialPower= maxS;\n }", "public abstract int getMaximumValue();", "int getSmpRate();", "public int getMp() \n\t{\n\t\treturn mp;\n\t}", "public int getMaxSpecialPower() {\n return maxSpecialPower;\n }", "public int getMaxPower() {\r\n return maxPower;\r\n }", "public int GetMaxVal();", "static MwMaxNode addMwMax(HazardModel model, MwMaxNode node) {\n OptionalDouble mMax = StreamSupport.stream(model.spliterator(), false)\n .flatMap(sourceSet -> StreamSupport.stream(\n sourceSet.spliterator(),\n false))\n .filter(new SourceFilter(node.loc))\n .mapToDouble(source -> source.mfds().get(0).x(0))\n .min();\n// if (mMax.isPresent() && mMax.getAsDouble() < M_MAX) {\n// System.out.println(mMax.getAsDouble());\n// }\n node.mMax = mMax.isPresent()\n ? Double.min(mMax.getAsDouble(), M_MAX)\n : M_MAX;\n return node;\n }", "int getMaxMana();", "int getMaxEXP();", "int getMaxEXP();", "int max();", "public int getMps() {\n return (int) (80d * this.getCondition() / 100d);\n }", "void setMaxActiveAltitude(double maxActiveAltitude);", "public double getMiterLimit(\n )\n {return miterLimit;}", "public BigInteger getMaxUses() {\r\n return maxUses;\r\n }", "public void setMaxPower(int maxPower) {\r\n this.maxPower = maxPower;\r\n }", "@Override\n public int getJumpMP() {\n return getJumpMP(true);\n }", "public int getMaxAdvance() {\n return -1;\n }", "@Override\n\tpublic double calculate(int currentIteration, int maxIterations) {\n\t\treturn value;\n\t}", "VariableAmount getExtremeSpikeIncrease();", "float getXStepMax();", "void updateMaxTick();", "public static int maxProfit(int arr[]) {\n\t\t\n\t\tint mpif[]=new int[arr.length];\n\t\tint maxProfit=0;\n\t\tint minCurrent=Integer.MAX_VALUE;\n\t\t\n\t\t\n\t\tfor(int i=0;i<mpif.length;i++) {\n\t\t\t\n\t\t\tif(arr[i]<minCurrent) {\n\t\t\t\tminCurrent=arr[i];\n\t\t\t}\n\t\t\tif(arr[i]-minCurrent>maxProfit) {\n\t\t\t\tint tempProfit=arr[i]-minCurrent;\n\t\t\t\tmaxProfit=Math.max(maxProfit, tempProfit);\n\t\t\t\tmpif[i]=maxProfit;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmpif[i]=Math.max(maxProfit, arr[i]-minCurrent);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tint mpat=0;\n\t\tint currentMAx=arr[arr.length-1];\n\t\tint mpbf[]=new int[arr.length];\n\t\tfor(int i=arr.length-2;i>=0;i--) {\n\t\t\tif(arr[i]>currentMAx) {\n\t\t\t\tcurrentMAx=arr[i];\n\t\t\t}\n\t\t\tif(currentMAx-arr[i]>mpat) {\n\t\t\t\tint temp=currentMAx-arr[i];\n\t\t\t\tmpat=Math.max(mpat, temp);\n\t\t\t\tmpbf[i]=mpat;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmpbf[i]=Math.max(mpat, currentMAx-arr[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint ans[]=new int[arr.length];\n\t\tint max_=0;\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tint sum=mpbf[i]+mpif[i];\n\t\t\tans[i]=sum;\n\t\t\tif(sum>max_) {\n\t\t\t\tmax_=sum;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(mpif[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(mpbf[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(ans[i]+\" \");\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\treturn max_;\n\t\t\n\t\t\n\t\t\n\t}", "int range(){\n return fuelcap*mpg;\n }", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "double getExtremeSpikeProbability();", "@JSProperty(\"softMax\")\n void setSoftMax(double value);", "private double genMultiplier() {\n return (random.nextInt(81) + 60)/100.0;\n }", "public int getMaximumPoints();", "Double getMaximumValue();", "public double getMaximumScore() {\n return 0.9; // TODO: parameter\n }", "int getMax();", "public void setCost(int maxTemp) {\n\t\tthis.cost = 900 + (200 * (Math.pow( 0.7, ((double)maxTemp/5.0) )));\n\t}", "@Override\n public int getSpecialValue() {\n return maxBonus;\n }", "public String getIterationSurMax() { return (actuelIteration + 1) + \"/\" + totalIteration; }", "public void SetMaxVal(int max_val);", "public int getMaxActive();", "public void useNormalVarimax(){\n this. varimaxOption = true;\n }", "public double getMaximum() {\n return (max);\n }", "public void setMaximumPoints(int maximum);", "float getCostReduction();", "public float maxTorque();" ]
[ "0.76063997", "0.76063997", "0.76063997", "0.76063997", "0.76063997", "0.76063997", "0.6836161", "0.6836161", "0.6836161", "0.6836078", "0.6835222", "0.6835222", "0.6727591", "0.6727591", "0.6727591", "0.67275023", "0.67275023", "0.67275023", "0.66164416", "0.64352286", "0.6360327", "0.6360327", "0.6360068", "0.6347864", "0.6298295", "0.62922835", "0.62828594", "0.62828594", "0.62828594", "0.62828594", "0.62828594", "0.62828594", "0.62818915", "0.62806076", "0.6258363", "0.62318975", "0.62318975", "0.62318975", "0.62318975", "0.62318975", "0.62318975", "0.6204342", "0.6191161", "0.61595136", "0.6146821", "0.6139389", "0.6138789", "0.61172515", "0.60624075", "0.60624075", "0.6043298", "0.6027475", "0.60070527", "0.59876424", "0.59663355", "0.59505755", "0.59303224", "0.59292597", "0.5915118", "0.5884796", "0.5871841", "0.5867906", "0.58587426", "0.58272624", "0.58247024", "0.58234423", "0.58223635", "0.58223635", "0.5811569", "0.58033967", "0.5795388", "0.5768533", "0.57678324", "0.57601446", "0.57539934", "0.5750113", "0.57395566", "0.57249933", "0.5722327", "0.57097536", "0.57092106", "0.57053983", "0.5698172", "0.56844234", "0.5677485", "0.5677384", "0.5667235", "0.56509197", "0.5647105", "0.5642426", "0.56419355", "0.5637317", "0.56365603", "0.5626306", "0.5623555", "0.56150913", "0.5603602", "0.5599322", "0.5596478", "0.5595394" ]
0.7518062
6
Function that removes stat points upon allocation
private static int removeStatPoints(int statPoints){ statPoints--; return statPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetPoints() {\n points = 0;\n }", "void removeDrawDetail(Pool pool);", "public void clearAllPoints() {\n\t\tpoints.clear();\n\t\tnotifyListeners();\n\t}", "public void remove_transfered_points(int points) {\n\t\tthis.balance = this.balance - points;\n\t\tif(this.balance < 10000) this.status = \"Bronze\";\n\t\telse if(this.balance >= 10000) this.status = \"Silver\";\n\t\t\n\t}", "public void unsetProcStat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PROCSTAT$16, 0);\n }\n }", "private void removeOldestPoint() {\n PathPoint p = points.get(points.size() - length - 1);\n // if points has 5 points (0-4), length=3, then remove points(5-3-1)=points(1) leaving 2-4 which is correct\n float t = p.t - firstTimestamp;\n st -= t;\n sx -= p.x;\n sy -= p.y;\n stt -= t * t;\n sxt -= p.x * t;\n syt -= p.y * t;\n }", "public void clear() {\n\t\tpointList.clear();\n\t\tySum = 0;\n\t}", "public Builder clearUsedPoints() {\n \n usedPoints_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUsedPoints() {\n \n usedPoints_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUsedPoints() {\n \n usedPoints_ = 0;\n onChanged();\n return this;\n }", "void clearStatistics();", "public void removeData(double x, double y) {\n if (n > 0) {\n double dx = x - xbar;\n double dy = y - ybar;\n sumXX -= dx * dx * (double) n / (n - 1d);\n sumYY -= dy * dy * (double) n / (n - 1d);\n sumXY -= dx * dy * (double) n / (n - 1d);\n xbar -= dx / (n - 1.0);\n ybar -= dy / (n - 1.0);\n sumX -= x;\n sumY -= y;\n n--;\n\n if (n > 2) {\n distribution.setDegreesOfFreedom(n - 2);\n }\n }\n }", "public void removeInvalidPoints() {\n\t\tfor (Iterator<GPoint> it = points.iterator(); it.hasNext();) {\n\t\t\tif (!it.next().isValid()) {\n\t\t\t\tit.remove();\n\t\t\t}\n\t\t}\n\t}", "private void clearStats() {\n stats_ = emptyProtobufList();\n }", "@UnsupportedAppUsage\n public void clearStats() {\n mStats = null;\n }", "public void deleteLastPoint() {\n\t\tif(points.size() > 0) {\n\t\t\tpoints.remove(points.size() - 1);\n\t\t\tnotifyListeners();\n\t\t}\n\t}", "private void resetStats() {\n }", "public void removePlotData() {\n\t\tif (xySeries != null) {\n\t\t\tfor (int i = 0; i < xySeries.length; i++) {\n\t\t\t\tif (xySeries[i] != null) {\n\t\t\t\t\txySeries[i].clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tseriesCount = 0;\n\t\txySeries = new XYSeries[seriesCount + 1];\n\t}", "void statsReset();", "private void removeStats(int index) {\n ensureStatsIsMutable();\n stats_.remove(index);\n }", "public void destroyed() {\n\t\twidth = SIZE_INC * width;\n\t\t// make the end points at the new location\n\t\tthis.makeEndPoints(width, (0 - (xSpeed * width)),\n\t\t\t\t(0 - (ySpeed * width)));\n\n\t}", "void losePoints() {\n if (currentPoints >= POINTSGIVEN) {\n currentPoints -= POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "void removeAllSpawn();", "@Override\n public void unexecute()\n {\n if(layer.removeMeasurementPointByPosition(measurementPoint.getPosition()))\n {\n //remove local reference to the measurement point\n measurementPoint = null;\n //remove marker\n if(mapCanvas.removeMarkerFromMap(markerPositionOnMap))\n {\n markerPositionOnMap = null;\n }\n else\n {\n Log.d(DEBUGTAG, \"Error: While undoing 'add measurement point' could not remove the marker\");\n }\n\n }\n else\n {\n Log.d(DEBUGTAG, \"Error: MeasurementPoint not found in layer!\");\n }\n Log.d(DEBUGTAG, \"Command AddMeasurement Point Unexecuted\");\n }", "public void resetTBPoints () {\n p1TBPoints = 0;\n p2TBPoints = 0;\n }", "public void resetStatistics()\n {\n }", "public static void clearXY()\r\n{\r\n\tx = 0;\r\n\ty = 0; \r\n\t\r\n}", "void positionCleared();", "public void clear() {\n\t\tpoints.clear();\n\t\trepaint();\n\t}", "public void resetHitStatistics()\n {\n m_stats.resetHitStatistics();\n }", "public abstract void statsReset();", "public void cleanUp() {\n // a quick way to clean the vector\n segments = new Vector();\n // reset the total distance\n totalDistance = 0.0;\n distance = 0.0;\n }", "public Point2D removePoint(int i) {\n\t\tPoint2D p = pointList.remove(i);\n\t\tif (p != null) {\n\t\t\tySum -= p.getY();\n\t\t\tminY = Double.NaN;\n\t\t\tmaxY = Double.NaN;\n\t\t}\n\t\treturn p;\n\t}", "public void cleanUp(){\n\t\t//offset(-1*bounds.left, -1*bounds.top);\n\t}", "public Builder clearNeedPoints() {\n \n needPoints_ = 0;\n onChanged();\n return this;\n }", "synchronized protected void removePoint(final int index) {\n \t\t// check preconditions:\n \t\tif (index < 0) {\n \t\t\treturn;\n \t\t} else if (n_points - 1 == index) {\n \t\t\t//last point out\n \t\t\tn_points--;\n \t\t} else {\n \t\t\t//one point out (but not the last)\n \t\t\t--n_points;\n \n \t\t\t// shift all points after 'index' one position to the left:\n \t\t\tfor (int i=index; i<n_points; i++) {\n \t\t\t\tp[0][i] = p[0][i+1];\t\t//the +1 doesn't fail ever because the n_points has been adjusted above, but the arrays are still the same size. The case of deleting the last point is taken care above.\n \t\t\t\tp[1][i] = p[1][i+1];\n \t\t\t\tp_layer[i] = p_layer[i+1];\n \t\t\t}\n \t\t}\n \n \t\t// Reset or fix autotracing records\n \t\tif (index < last_autotrace_start && n_points > 0) {\n \t\t\tlast_autotrace_start--;\n \t\t} else last_autotrace_start = -1;\n \n \t\t//update in database\n \t\tupdateInDatabase(\"points\");\n \t}", "public void usedOxygen() {\n\t\tthis.oxygenPoints -=1;\n\t}", "@Override\n public void cleanup(final Program program) {\n int positionHandle = GLES20.glGetAttribLocation(program.handle, A_POSITION);\n GLES20.glDisableVertexAttribArray(positionHandle);\n }", "private void removePosition(Point p) {\n\t\tfor(Point point : occupiedPositions) {\n\t\t\tif(p.x == point.x && p.y == point.y) {\n\t\t\t\toccupiedPositions.remove(point);\n\t\t\t}\n\t\t}\n\t}", "public void clearXAvg() {\n\t\txStats.clear();\n\t}", "public void clear() { drawData.clear(); }", "public void eraseOnClick(View view){\n mMap.clear();//clears the map\r\n points = new ArrayList<LatLng>();//resets the markers holder\r\n }", "public void removeFreeSpace(int position) {\n\t\tfor(int i = 0;i<coordinate.size();i++) {\n\t\t\tif(coordinate.get(i) == position) {\n\t\t\t\tcoordinate.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void resetStats() {\n recentStats = new Stats();\n }", "void unsetLegs();", "int getUsedPoints();", "int getUsedPoints();", "int getUsedPoints();", "synchronized public void flush() {\n \t\tp = null;\n \t\tp_layer = null;\n \t\tn_points = -1; // flag that points exist but are not loaded\n \t}", "@Override\n\t// IMPORTANT , points not in panel.paintComponents, so won't removed by regular remove method\n\tpublic void remove(PaintPanel panel) {\n\t\tfor(DataFromPoint fromPoint: getFromPoints()) {\n\t\t\tif(fromPoint.getLineSegment() != null)\n\t\t\t\tfromPoint.getLineSegment().remove(panel);\n\t\t}\n\t\tfor(DataToPoint toPoint: getToPoints()) {\n\t\t\tif(toPoint.getLineSegment() != null)\n\t\t\t\ttoPoint.getLineSegment().remove(panel);\n\t\t}\n\t\tsuper.remove(panel);\n\t\t\n\t}", "void decUsage() {\n incUsage(-1);\n }", "public void removePoint(int line, int point) {\n\t\tif (this.aggregationMethod == AggregationMethod.ALL) {\n\t\t\tlines.get(line).removePointFromAll(point);\n\t\t} else {\n\t\t\tlines.get(line).removePoint(point);\n\t\t}\n\t}", "public static void clearData() {\n cutPoints.clear();\n data.delete(0, data.length());\n }", "public void unsetSmallCircle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SMALLCIRCLE$2, 0);\n }\n }", "void figureRemovedAt(Location loc);", "public void removeDuplicates()\n\t{\n\t\tComparator<Point> comp = new Comparator<Point>() \n\t\t{\n @Override\n public int compare(Point p, Point q) \n {\n \t return p.compareTo(q);\n }\n };\n\t\tquicksorter.quickSort(comp);\n\t\tquicksorter.getSortedPoints(points);\n\t\t\n\t\tArrayList<Point> pts = new ArrayList<Point>();\n\t\tfor(int a = 0; a < points.length; a++) //copy points into temp array\n\t\t{\n\t\t\tif(!pts.contains(points[a]))\n\t\t\t{\n\t\t\t\tpts.add(points[a]);\n\t\t\t}\n\t\t}\n\t\tpointsNoDuplicate = new Point[pts.size()]; //insert into pointsNoDuplicate\n\t\tfor(int i = 0; i < pts.size(); i++)\n\t\t{\n\t\t\tpointsNoDuplicate[i] = pts.get(i);\n\t\t}\n\t}", "public Point2D removePoint(int i);", "public void removePoint(Point2D p);", "void disableStatistics();", "public void remove(int index) {\n\t\tpoints.remove(index);\n\t}", "@Override\n boolean resetStatistics();", "public long clean(long now) {\n long cutoff = chunkEnd(now) - this.chunkcount * this.chunklen;\n int dropped = 0;\n long droppedDatapoints = 0L;\n synchronized(this.chunks) {\n for (int i = 0; i < this.chunks.length; i++) {\n if (null == this.chunks[i]) {\n continue;\n }\n if (this.chunkends[i] <= cutoff) {\n droppedDatapoints += this.chunks[i].getCount();\n this.chunks[i] = null;\n dropped++;\n }\n }\n }\n \n Sensision.update(SensisionConstants.SENSISION_CLASS_CONTINUUM_STANDALONE_INMEMORY_GC_CHUNKS, Sensision.EMPTY_LABELS, dropped);\n \n return droppedDatapoints;\n }", "private void clearAlphaInfo() {\n \n alphaInfo_ = 0;\n }", "protected void removeMapPointAdapters() {\r\n while (!pointAdapters.isEmpty()) {\r\n MapPointAdapter mpa = (MapPointAdapter) pointAdapters.remove(0);\r\n drawer.removeMapPointAdapter(mpa);\r\n }\r\n }", "public void decrementVictoryPoints() {\n\t\tthis.totalVictoryPoints++;\n\t}", "protected void deallocate() {\r\n\t\t// create a list of objects ordered by the time of last access\r\n\t\tList<ObjectStatus> timeOrderedObjects = getListOfObjectClassTimeSorted();\r\n\t\twhile (!sizeNormal() && timeOrderedObjects.size() > 0) {\r\n\t\t\t// take the least recently used object and remove it from the list\r\n\t\t\tString currentObjectID = timeOrderedObjects.remove(0).getID();\r\n\t\t\t// kill that object in the ever seen so\r\n\t\t\t// it would be treated as a dead object from now on\r\n\t\t\tkillObject(currentObjectID);\r\n\t\t\tdeallocate(currentObjectID);\r\n\r\n\t\t}\r\n\r\n\t}", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "protected void preUpdate() {\n freeX = true;\n freeY = true;\n }", "void release() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tpoint[i].sticked = false;\n\t\t\tpoint[i].beginPosition.set(point[i].position);\n\t\t}\n\n\t\tdragLock = false; //\n\t\tmouseLockedToLine = false;\n\t\tpolygonLockedToMouse = false;\n\t\t// pointLockedToMouse = false;\n\t\trotationLockedToMouse = false;\n\t\tselectedLine = -1;\n\n\t\t// isSelected =\n\t\t// pointMode = 0; // switch to deafult point mode\n\n\t\t// TODO: release all lines in this class\n\t}", "public boolean removePoint(Point p);", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "private void calculeStatRemove() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int loose = resourceB - resourceA;\n int diff = (resourceA - resourceB) + value;\n this.getContext().getStats().incNbRessourceLoosePlayers(idPlayer,type,loose);\n this.getContext().getStats().incNbRessourceNotLoosePlayers(idPlayer,type,diff);\n }", "public void clear_strokes() {\n this.contours = new ArrayList<ContourClass>(); // Argument (if any) specifies initial capacity (default 10)\n }", "public void removeMissiles(){\n nunMissiles--;\n }", "public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}", "void reset(int size) {\n\t\tpoint[0].position.set(center.x - size, center.y - size);\n\t\tpoint[1].position.set(center.x + size, center.y - size);\n\t\tpoint[2].position.set(center.x + size, center.y + size);\n\t\tpoint[3].position.set(center.x - size, center.y + size);\n\t\trelease();\n\t}", "public void clearDomainMarks(){\n for (int i = 0 ; i < getBoardSize(); i++)\n for (int j = 0 ; j < getBoardSize(); j++){\n getPoint(i, j).setHolder(GoPlayer.UNKNOWN);\n }\n }", "public void remove(DrawEvent currentEvent) {\n super.removeElement(currentEvent);\n bounds.x = Integer.MAX_VALUE;\n bounds.y = Integer.MAX_VALUE;\n for (int i = 0; i < this.size(); i++) {\n DrawEvent event = (DrawEvent) this.elementAt(i);\n DrawShape shape = event.getShape();\n if (shape.getX() < bounds.x) {\n bounds.x = shape.getX();\n }\n if (shape.getY() < bounds.y) {\n bounds.y = shape.getY();\n }\n }\n }", "void unsetOffset();", "public void removePoint(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(POINT$0, i);\n }\n }", "public void delete()\n {\n if (this.data != null)\n {\n this.data.free();\n this.data = null;\n }\n \n this.width = 0;\n this.height = 0;\n \n this.mipmaps = 1;\n }", "void removeBall(Coordinates at);", "void clearStatistics() throws IOException;", "public void removePowerUp(PowerUp p) {\n for (Location loc : p.getLocations()) {\n Location replacement = new Location(loc.getX(), loc.getY());\n gridCache.add(replacement);\n }\n\n powerUps.remove(p);\n render();\n}", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }", "private void clear() {\r\n\t\tpstate.clear();\r\n\t\tdisplay.setLegend(\"\");\r\n\t\tship = null;\r\n\t}", "void removeNearbyPixels(Stroke theStroke){\n\t\tint index;\n\t\tint CurvIndex;\n\t\tint SpeedIndex;\n\t\tVector ptList = theStroke.getM_ptList();\n\t\tfor(index=0; index < CommonSegmentPts.size(); index++){\n\t\t\tPoint CommonPt = (PixelInfo)ptList.get((Integer)CommonSegmentPts.get(index));\n\t\t\tfor(CurvIndex = 0; CurvIndex < CurvVector.size(); CurvIndex++){\n\t\t\t\tPoint CurvPt = (PixelInfo)ptList.get((Integer)CurvVector.get(CurvIndex));\n\t\t\t\tif(CommonPt.distance(CurvPt) <= TolerantDistance){\n\t\t\t\t\tCurvVector.remove(CurvIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(SpeedIndex = 0; SpeedIndex < SpeedVector.size(); SpeedIndex++){\n\t\t\t\tPoint SpeedPt = (PixelInfo)ptList.get((Integer)SpeedVector.get(SpeedIndex));\n\t\t\t\tif(CommonPt.distance(SpeedPt) <= TolerantDistance){\n\t\t\t\t\tSpeedVector.remove(SpeedIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void free();", "void unsetValueSampledData();", "private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }", "public void cleanStatistics() {\n\t\thasChildStopNominator = HashBasedTable.create();\n\t\thasChildStopDenominator = HashBasedTable.create();\n\t\tnoChildStopNominator = HashBasedTable.create();\n\t\tnoChildStopDenominator = HashBasedTable.create();\n\t\tleftAttachNominator = HashBasedTable.create();\n\t\tleftAttachDenominator = HashBasedTable.create();\n\t\trightAttachNominator = HashBasedTable.create();\n\t\trightAttachDenominator = HashBasedTable.create();\n\t}", "public void freeVisitable() {\n\t\tComparator<Visitable> dateComparator = (h1, h2)->h1.getOpeningHours().compareTo(h2.getOpeningHours());\n\t\tnodes.stream().filter(sc->sc instanceof Visitable).filter(sc->!(sc instanceof Payable)).sorted().forEach(System.out::println);\n\t}", "public void remove() {\r\n // rather than going through replace(), just reinitialize the StyledText,\r\n // letting the old data structures fall on the floor\r\n fCharBuffer = new CharBuffer();\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fParagraphBuffer = new ParagraphBuffer(fCharBuffer);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = fDamagedRange[1] = 0;\r\n }", "void unsetBeginPosition();", "public void decrementPossiblePoints() {\n if (groupScore == 1) {groupScore = 0; return;}\n if (groupScore - (groupScore / 2) >= 0) {\n groupScore -= (groupScore / 2);\n }\n }", "void unsetWagerMinimum();", "public void free();", "public void clearCentroids();", "public void undo(){\n if(!isFreeDraw) { //in waypoint mode delete the last point\n int size = mMapInterface.getPathFrame().size();\n if (size >= 1) {\n isPathReady=false;\n mMapInterface.getPathFrame().remove(size - 1);\n pointsCounter--;\n googleMap.clear();\n drawLine();\n }\n }\n else{ //in continu mode delete all path\n deletePath();\n drawFree();\n }\n }", "public void clearMeaning() {\n meaning_points.clear();\n }" ]
[ "0.62976223", "0.6227691", "0.61364275", "0.5961799", "0.5956207", "0.594796", "0.5941497", "0.5935331", "0.5935331", "0.5935331", "0.5857869", "0.5815182", "0.5800203", "0.5781261", "0.57502955", "0.570051", "0.56906486", "0.5651193", "0.56353295", "0.5613955", "0.55684805", "0.5547348", "0.55291325", "0.55262333", "0.550811", "0.5500263", "0.55000436", "0.5496468", "0.5467755", "0.54644316", "0.5463842", "0.54597944", "0.54580635", "0.54440886", "0.54410607", "0.54362714", "0.5436271", "0.5418704", "0.5407124", "0.5399522", "0.53924936", "0.5391645", "0.5384627", "0.5378891", "0.5378153", "0.53751135", "0.53751135", "0.53751135", "0.53706664", "0.5368056", "0.53661674", "0.5358867", "0.5346778", "0.5346335", "0.5330474", "0.5314958", "0.5310125", "0.530959", "0.5308036", "0.5306861", "0.53058386", "0.52913773", "0.5290675", "0.5284667", "0.52835625", "0.527335", "0.526794", "0.52596736", "0.5258517", "0.5252066", "0.5247866", "0.52407837", "0.5233607", "0.521926", "0.5218933", "0.52122307", "0.52090305", "0.519299", "0.5190301", "0.51899415", "0.51870936", "0.5183669", "0.5177737", "0.5158684", "0.5155666", "0.51495194", "0.5143866", "0.51431155", "0.5142051", "0.5138319", "0.51359916", "0.5129941", "0.51276904", "0.5127142", "0.51243275", "0.51201695", "0.5113277", "0.5110754", "0.51107323", "0.50956273" ]
0.7451827
0
Function that increases strength
private static int gainStrength(int strength){ strength++; System.out.println("You gain 1 strength"); return strength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increaseStrength(int f) {\r\n\t\tstrength += f;\r\n\t}", "@Override\n\tpublic int strength() {\n\t\treturn 1;\n\t}", "void increaseStrength() {\n if (this.strokeStrength + 0.25 <= 6) {\n this.strokeStrength += 0.25;\n }\n this.updateAcc();\n this.updateStick();\n }", "@Override\n public void increaseStrength(int power) {\n this.damageStrength += power;\n }", "public void changeStrength(int i) {\n \t\tif (strength + i < 1){\n \t\t\tstrength = 0;\n \t\t\talive = false;\n \t\t}\n \t\tstrength += i;\n \t}", "int getStrength();", "int getStrength();", "public void setStrength(float strength)\n {\n this.strength = strength;\n }", "@Override\n public int strengthBonus() {\n\treturn 4;\n }", "public int getStrength() { return strength; }", "public void setStrength(int strength) {\n this.calories = strength;\n }", "public void setStrength(final int s) {\n this.strength = s;\n }", "public void changeStrength(int newStrength) {\n\t\tthis.currentStrength = newStrength;\n\t}", "public int getStrength() {\n \t\treturn strength;\n \t}", "int getStrength(Unit unit);", "@Generated\n @Selector(\"strength\")\n @NFloat\n public native double strength();", "public int getStrength() {\r\n\t\treturn strength;\r\n\t}", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "public int getStrength() {\n return strength_;\n }", "public int getStrength() {\n return strength_;\n }", "void hurt(int strength) {\n life -= strength;\n if (life < 0)\n life = 0;\n }", "boolean hasStrength();", "public int getStrength() {\n\t\treturn strength;\n\t}", "public int getStrength() {\n return this.strength;\n }", "public int getStrength() {\n return strength_;\n }", "public int getStrength() {\n return strength_;\n }", "public Builder setStrength(int value) {\n \n strength_ = value;\n onChanged();\n return this;\n }", "private static int gainIntelligence(int intelligence){\r\n intelligence++;\r\n System.out.println(\"You gain 1 intelligence\");\r\n return intelligence;\r\n }", "public void decreaseStrength(int f) {\r\n\t\tstrength -= f;\r\n\t}", "public int generateStrength() {\n\t\tRandom rand = new Random();\n\t\tint strength = rand.nextInt(41) - 10;\n\t\treturn strength;\n\t}", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "void decreaseStrength() {\n if (this.strokeStrength - 0.25 >= 1) {\n this.strokeStrength -= 0.25;\n }\n this.updateAcc();\n this.updateStick();\n }", "protected void gainEXP(int gain) {\n this.totalEXP += gain;\n }", "void gainHealth(int points) {\n this.health += points;\n }", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "public int increaseDefense () {\n return 3;\n }", "int getStrength(IBlockAccess iBlockAccess, BlockPos blockPos);", "public Builder setStrength(int value) {\n bitField0_ |= 0x00000010;\n strength_ = value;\n onChanged();\n return this;\n }", "public int getAttackStrength(Entity var1)\n {\n return 2;\n }", "public void buyFuelGainMultiply() {\n this.fuelGainMultiply++;\n }", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "public void setStrengthBoost(int boost) {\n mStrengthBoost = boost;\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public float grabStrength() {\r\n\t\treturn LeapJNI.Hand_grabStrength(this.swigCPtr, this);\r\n\t}", "public int getStrength() {\n\t\treturn this.currentStrength;\n\t}", "public void penalize(int[] fighter, int grade) {\n//choose which skill to penalize\n Random rnd = new Random();\n int penalty = ATTACK;\n if (rnd.nextBoolean()) {\n penalty = DEFENSE;\n }\n//It is penalized. Low minimum up to 1\n fighter[penalty] -= grade;\n if (fighter[penalty] < 1) {\n fighter[penalty] = 1;\n }\n }", "private static int gainVitality(int vitality){\r\n vitality++;\r\n System.out.println(\"You gain 1 vitality\");\r\n return vitality;\r\n }", "@Basic @Immutable\n\tpublic int getStrength() {\n\t\treturn this.strength;\n\t}", "public void increase() {\n balance.multiply(1.001);\n }", "public static int rollStrength(){\n num1 = (int)(Math.random()*(20-0+1)+0);\n return num1;\n }", "@Generated\n @Selector(\"setStrength:\")\n public native void setStrength(@NFloat double value);", "private int lightAttack() {\n return attack(9, 0);\n }", "@Override\n\tpublic void skill1(Fightable f) {\n\t\tsuper.setDamage(super.getStrength()*3);\n\t\tsuper.setAtkRange((int)(super.getDamage()/5));\n\t\t\n\t\tthis.attack(f, 2);\n\t}", "float getFixedHotwordGain();", "@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }", "public Bias setStrength(String strength) {\n this.strength = Strength.valueOf(strength);\n return this;\n }", "public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }", "float getMainUtteranceDynamicGain();", "@Override\n public int strongPowerLevel(int side) {\n return 0;\n }", "public void addWeight(){\n\t\tweight++;\n\t}", "private void takeDamage(int damage){ health -= damage;}", "public NM getAdministeredStrength() { \r\n\t\tNM retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }", "float getHotwordPower();", "public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}", "public void SetLearnRate (double alpha) { this.alpha = alpha; }", "private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }", "public int getHealthGain();", "public int incrementPower(int count);", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}", "public void changeIntelligence(int i) {\n \t\tif (intelligence + i < 1){\n \t\t\tintelligence = 0;\n \t\t\talive = false;\n \t\t}\n \t\tintelligence += i;\n \t}", "@Override\n public void activatePowerUp() {\n myGame.getStatusDisplay().getMyProgress().updateScoreMultiplier(SCORE_MULTIPLIED_COUNTER);\n }", "public static void increaseFun(int statIncreaseAmount) {\n double newFun = Sim.getFun() + statIncreaseAmount;\n\n if (newFun > MAX_PER_STAT) {\n Sim.setFun(MAX_PER_STAT);\n } else {\n Sim.setFun(newFun);\n }\n\n }", "private void addPlayerSheild() {\n this.playerShield += 1;\n }", "@Override\n\tpublic double attack() {\n\t\treturn 12.5;\n\t}", "void increase();", "void increase();", "@Override\n\tpublic void use(GameCharacter character) {\n\t\tcharacter.setEnergy(character.getEnergy() - 50);\n\t\tswitch((int)(Math.random() * 3)) {\n\t\t\tcase 0 :\n\t\t\t\tcharacter.setEnergy(character.getEnergy() + ENERGY);\n\t\t\t\tbreak;\n\t\t\tcase 1 :\n\t\t\t\tcharacter.setEnergy(character.getEnergy() - ENERGY);\n\t\t\t\tbreak;\n\t\t\tcase 2 :\n\t\t\t\tcharacter.setStrength(character.getStrength() + STRENGTH);\n\t\t\t\tcharacter.setMaxStrength(character.getMaxStrength() + STRENGTH);\n\t\t}\n\t}", "public int giveDamage();", "@Override\n\tpublic int getStrenght(int currentStrenght) {\n\t\treturn currentStrenght+this.strenght;\n\t}", "private double individualEvaluation() {\n\t\t//System.out.println(\"indE\"+ myValues.get(myAction.getPurpose()).getStrength(null));\n\t\treturn myValues.get(myAction.getPurpose()).getStrength(null);\n\t}", "public int attack(boolean weakness){\r\n\t\tint damage = 0;\r\n\t\t\r\n\t\tif (energy <= 0) {\r\n\t\t\tSystem.out.println(\"no energy to attack\");\r\n\t\t\tenergy = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (weakness == true) {\r\n\t\t\t\tenergy -= 2;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tenergy -= 1;\r\n\t\t\t}\r\n\t\t\texp += 1;\r\n\t\t\tdamage = 1;\r\n\t\t}\r\n\t\treturn damage;\r\n\t}", "public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }", "public void accelerate(){\n speed += 5;\n }", "public int getAttackStrength(Entity par1Entity)\n {\n ItemStack var2 = this.getHeldItem();\n int var3 = 5;\n\n\n return var3;\n }", "@Override\n public void updateEnergy(int p, Racer player) {\n\n super.updateEnergy(p, player);\n player.setEnergy(player.getEnergy() * 2);\n }", "public void incLevel(int lvl){this.Level=this.XP/(100);}", "public void increaseEnergy(int energy){\r\n\t\tthis.energy = this.energy + energy;\r\n\t}", "public void ability(LevelManager lm){\n\n int prevDamage = lm.player.getDamage();\n int newDamage = prevDamage+12;\n lm.player.setDamage(newDamage);\n }", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "Float attack();", "@Override\n\tpublic void skill2(Fightable f) {\n\t\tsuper.setDamage(super.getStrength()*2);\n\t\tsuper.setAtkRange((int)(super.getDamage()/10));\n\t\t\n\t\tthis.attack(f, 3);\n\t}", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "public void increaseSpeed() {\n\t\t\n\t\tif(this.getSpeed() < this.getMaximumSpeed()) {\n\t\t\tthis.setSpeed(this.getSpeed() + 5);\n\t\t\tSystem.out.println(\"increase speed by 5 \\n\");\n\t\t}else {\n\t\t\tSystem.out.println(\"You already reach at the max speed \" + this.getMaximumSpeed() +\"\\n\");\n\t\t}\n\n\t}", "public void upgradeWardenGainLoseAmount(int amount) {\n this.baseWardenGainLoseAmount = this.wardenGainLoseAmount + amount;\n this.wardenGainLoseAmount = this.baseWardenGainLoseAmount;\n this.upgradedWardenGainLoseAmount = true;\n }", "private void applyLvlUpCost() {\n }", "@Override\n\t\t\tpublic void strengthAlgorithm(String s) {\n\t\t\t\tString lowercase = \"abcdefghijklmnopqrstuvwxyzåäö\";\n\t\t\t\tString uppercase = \"ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ\";\n\t\t\t\tString numbers = \"0123456789\";\n\t\t\t\tString symbols = \"!\\\"#¤%&/()=?@£$€{[]};,:._-'*\";\n\n\t\t\t\t// TODO: Add a filter that informs you that certain words\n\t\t\t\t// shouldn't be used. For example \"password\", number sequences\n\t\t\t\t// like \"1234\" etc.\n\n\t\t\t\tboolean hasUpper = false;\n\t\t\t\tboolean hasLower = false;\n\t\t\t\tboolean hasNumber = false;\n\t\t\t\tboolean hasSymbol = false;\n\n\t\t\t\tif (s.length() >= 8) {\n\t\t\t\t\tPasswordStrengthMeter.score++;\n\t\t\t\t\tif (s.length() >= 12)\n\t\t\t\t\t\tPasswordStrengthMeter.score++;\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < lowercase.length(); i++) {\n\t\t\t\t\tif (memberOf(lowercase.charAt(i), s))\n\t\t\t\t\t\thasLower = true;\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < uppercase.length(); i++) {\n\t\t\t\t\tif (memberOf(uppercase.charAt(i), s))\n\t\t\t\t\t\thasUpper = true;\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < numbers.length(); i++) {\n\t\t\t\t\tif (memberOf(numbers.charAt(i), s))\n\t\t\t\t\t\thasNumber = true;\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < symbols.length(); i++) {\n\t\t\t\t\tif (memberOf(symbols.charAt(i), s))\n\t\t\t\t\t\thasSymbol = true;\n\t\t\t\t}\n\t\t\t\tif (hasUpper && hasLower)\n\t\t\t\t\tPasswordStrengthMeter.score++;\n\t\t\t\tif (hasNumber)\n\t\t\t\t\tPasswordStrengthMeter.score++;\n\t\t\t\tif (hasSymbol)\n\t\t\t\t\tPasswordStrengthMeter.score++;\n\t\t\t}", "@Override\n\tpublic void increaseSpeed() {\n\t\tSystem.out.println(\"increaseSpeed\");\n\t\t\n\t}", "float getPower();", "boolean addEasyLoss();" ]
[ "0.7923475", "0.7801807", "0.7671741", "0.7669957", "0.75321835", "0.7515813", "0.7515813", "0.74835104", "0.73328567", "0.7262434", "0.7171296", "0.70593184", "0.6777663", "0.6730944", "0.6702353", "0.6701526", "0.6701069", "0.6644019", "0.6619944", "0.6619944", "0.6582349", "0.65638715", "0.65633273", "0.65606976", "0.6539828", "0.6539828", "0.6539596", "0.6471378", "0.6412333", "0.637886", "0.6371064", "0.63510346", "0.63367856", "0.6330774", "0.6326165", "0.6281815", "0.6258718", "0.6255886", "0.6224715", "0.61800545", "0.6158709", "0.6152444", "0.61507386", "0.61502546", "0.61221546", "0.6102372", "0.60962015", "0.60809493", "0.6067799", "0.6065389", "0.60558194", "0.6046537", "0.6026659", "0.602516", "0.6024823", "0.6024074", "0.6005938", "0.60002244", "0.59987915", "0.5976577", "0.5973468", "0.5955701", "0.5941629", "0.59238845", "0.5904823", "0.58890545", "0.587566", "0.587239", "0.5872049", "0.5870668", "0.58623725", "0.58565015", "0.5855698", "0.5852559", "0.5849726", "0.58229697", "0.58229697", "0.5817969", "0.5812528", "0.580643", "0.57948613", "0.57860696", "0.5784408", "0.57817864", "0.57814085", "0.57811725", "0.57749987", "0.57665104", "0.576519", "0.5764332", "0.5758601", "0.57584697", "0.5755858", "0.5751815", "0.5747609", "0.5739228", "0.5733367", "0.5730838", "0.5728892", "0.57184196" ]
0.8389786
0
Function that increases intelligence
private static int gainIntelligence(int intelligence){ intelligence++; System.out.println("You gain 1 intelligence"); return intelligence; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeIntelligence(int i) {\n \t\tif (intelligence + i < 1){\n \t\t\tintelligence = 0;\n \t\t\talive = false;\n \t\t}\n \t\tintelligence += i;\n \t}", "private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public int increaseDefense () {\n return 3;\n }", "public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}", "double agression();", "public void incrementFitness()\n {\n this.fitness++;\n }", "public int getIntelligence() {\n return Intelligence;\n }", "float getFixedHotwordGain();", "public int getIntelligence() {\n \t\treturn intelligence;\n \t}", "public abstract double experience();", "private int heavyAttack() {\n return attack(6, 2);\n }", "public void setIntelligence(float intelligence)\n {\n this.intelligence = intelligence;\n }", "int getIndividualAttack();", "public float getIntelligence()\n {\n return intelligence;\n }", "private int lightAttack() {\n return attack(9, 0);\n }", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "void increase();", "void increase();", "double CalculateFitness(double fun) \n\t {\n\t\t double result=0;\n\t\t if(fun>=0)\n\t\t {\n\t\t\t result=1/(fun+1);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t \n\t\t\t result=0;\n\t\t }\n\t\t return result;\n\t }", "public void calculateBonuses(){\n\n\n }", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "public int act1Cost()\r\n {\r\n return 1;\r\n }", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "float getHotwordPower();", "boolean addEasyLoss();", "void ponderhit();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}", "float getCostReduction();", "@Override\n public double tuition(){\n return 2500;\n }", "public abstract int selfExplodingKittenDrawn();", "public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }", "public void fitnessFunction()\n\t{\n\t\t\n\t}", "private double individualEvaluation() {\n\t\t//System.out.println(\"indE\"+ myValues.get(myAction.getPurpose()).getStrength(null));\n\t\treturn myValues.get(myAction.getPurpose()).getStrength(null);\n\t}", "public void calcObjective() {\n double obj;\n double objectives[];\n\n for (int i = 0; i < population.getPopulationSize(); i++) { //300\n objectives = population.getObjectiveValues(i);\n obj = evaluateAll(population.getSingleChromosome(i)); //evaluateAll(chromosome chromosome1)\n objectives[indexOfObjective] = obj;\n population.setObjectiveValue(i, objectives);\n }\n }", "private static int gainStrength(int strength){\r\n strength++;\r\n System.out.println(\"You gain 1 strength\");\r\n return strength;\r\n }", "@Override\n\tpublic void coreTraining() {\n\t\tSystem.out.println(\"加强进攻意识练习\");\n\t}", "void aprovarAnalise();", "public void calculateProbabilities(){\n\t}", "int getBonusExp();", "int getBonusExp();", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}", "int hit();", "public void cheat() {\r\n\t\t\t\tnourriture += population*10;\r\n\t\t\t\tarmee += population/2;\r\n\t\t\t\tpopulation += armee*tailleArmee;\r\n\t\t\t}", "double getHitRate();", "double getHitRate();", "private void applyLvlUpCost() {\n }", "@Override\n public abstract float offensiveUse(float characterOffensivePoints, float characterEnergyPoints);", "private void optimiseEVProfile()\n\t{\n\t}", "public int getInstabilityScore();", "boolean addHardLoss();", "public void increseHitCount() {\n\r\n\t}", "private int FindGold() {\n VuforiaLocalizer vuforia;\n\n /**\n * {@link #tfod} is the variable we will use to store our instance of the Tensor Flow Object\n * Detection engine.\n */\n TFObjectDetector tfod;\n \n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n \n\n /**\n * Initialize the Tensor Flow Object Detection engine.\n */\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\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 tfod.activate();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n return 3;\n }\n\n int Npos1=0;\n int Npos2=0;\n int Npos3=0;\n int NposSilver1=0;\n int NposSilver2=0;\n int NposSilver3=0;\n double t_start = getRuntime();\n\n\n while (opModeIsActive()) {\n \n if( (getRuntime() - t_start ) > 3.5) break;\n if (Npos1 >=5 || Npos2>=5 || Npos3>=5)break;\n if (NposSilver1>=5 && NposSilver2>=5)break;\n if (NposSilver2>=5 && NposSilver3>=5)break;\n if (NposSilver1>=5 && NposSilver3>=5)break;\n if (tfod != null) {\n // getUpdatedRecognitions() will return null if no new information is available since\n // the last time that call was made.\n List<Recognition> updatedRecognitions = tfod.getUpdatedRecognitions();\n if (updatedRecognitions != null) {\n //telemetry.addData(\"# Object Detected\", updatedRecognitions.size());\n //if (updatedRecognitions.size() == 3) {\n int goldMineralX = -1;\n int silverMineralX = -1;\n for (Recognition recognition : updatedRecognitions) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n telemetry.addData(\"gold position\", goldMineralX);\n if(goldMineralX<300) {\n Npos1++;\n telemetry.addData(\"loc\", 1);\n }else if(goldMineralX<800){\n Npos2++;\n telemetry.addData(\"loc\", 2);\n }else{\n Npos3++;\n telemetry.addData(\"loc\", 3);\n }\n } \n \n if (recognition.getLabel().equals(LABEL_SILVER_MINERAL)) {\n silverMineralX = (int) recognition.getLeft();\n telemetry.addData(\"silver position\", silverMineralX);\n if(silverMineralX<300) {\n NposSilver1++;\n telemetry.addData(\"loc\", 1);\n }else if(silverMineralX<300){\n NposSilver2++;\n telemetry.addData(\"loc\", 2);\n }else{\n NposSilver3++;\n telemetry.addData(\"loc\", 3);\n }\n } \n }\n telemetry.update();\n }\n }\n }\n\n\n if (tfod != null) {\n tfod.shutdown();\n }\n \n \n \n telemetry.addData(\"\", 2);\n \n if (Npos1>=5)return 1;\n if (Npos2>=5)return 2;\n if (Npos3>=5)return 3;\n if (NposSilver1>=5 && NposSilver2>=5)return 3;\n if (NposSilver2>=5 && NposSilver3>=5)return 1; \n if (NposSilver1>=5 && NposSilver3>=5)return 2;\n\n return 3;\n }", "public double calculateFitness(DNA dna);", "public abstract void increaseThis();", "public void increaseInterest() {\n\t\tthis.balance *= (1 + interestRate);\n\t}", "public Object eval(Individual ind)\r\n {\r\n BinaryIndividual bi = (BinaryIndividual)ind;\r\n int partialFitness = 0;\r\n int distance = 0;\r\n double fitness = 0.0;\r\n\r\n\t for (int i=0; i<100; i++){\r\n\r\n\t distance = 0;\r\n\r\n\t for (int j=0; j<100; j++){\r\n\t if (!((BinaryIndividual)target[i]).getBooleanAllele(j)^bi.getBooleanAllele(j)) { \r\n\t\t distance++;\r\n\t }\r\n \r\n\t if (distance > partialFitness) {\r\n\t partialFitness = distance;\r\n\t }\r\n\t }\r\n }\r\n\r\n fitness = (double)partialFitness/100.0;\r\n return new Double(fitness);\r\n \r\n\r\n }", "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\n\t\t\r\n\t}", "private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}", "public void theDude() {\n\t\ttotal_targets = 0;\n\t\ttotal = 0;\n\t\tint target_count = 0;\n\t\tresult.clear();\n\t\t\n\t\tfor(int k=0; k<input.getWords().size();k++) {\n\t\t\tWord currentWordStat = input.getWordStatistics().get(k);\n\t\t\ttarget_count = 0;\n\t\t\t\n\t\t\tfor(int i=0;i<input.getWords().get(k).length();i++) {\n\t\t\t\tif(target.contains(input.getWords().get(k).charAt(i))) {\n\t\t\t\t\ttarget_count++;\n\t\t\t\t\ttotal_targets++;\n\t\t\t\t}\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\t\n\t\t\tif(result.containsKey(currentWordStat)) {\n\t\t\t\tresult.put(currentWordStat, result.get(currentWordStat)+target_count);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.put(currentWordStat, target_count);\n\t\t\t}\n\t\t}\t\n\t}", "@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatDEX();\n\t\t\t}\n\t\t}", "@Override\n protected int getBonusPoints() {\n return leadership + experience;\n }", "public void calculateEffectiveness(){\n double[] typeEffective = new double[18];\n \n for(int i = 0; i < 18; i++){\n typeEffective[i] = tc.getEffectiveNumber(i, tc.convertType(type1));\n }\n \n if(type2 != null){\n for(int i = 0; i < 18; i++){\n typeEffective[i] *= tc.getEffectiveNumber(i, tc.convertType(type2));\n }\n }\n \n for(int i = 0; i < 18; i++){\n if(typeEffective[i] != 1){\n if(typeEffective[i] > 1){\n double[] newWeak = {i,typeEffective[i]};\n weak.add(newWeak);\n }else{\n double[] newStrong = {i,typeEffective[i]};\n strong.add(newStrong);\n }\n }\n }\n }", "float getMainUtteranceDynamicGain();", "public static void increaseCostCorrection() {\n COST_CORRECTION_CPU_CURRENT *= COST_CORRECTION_FACTOR_INCREASE;\n }", "int getTotalLeased();", "protected void gainEXP(int gain) {\n this.totalEXP += gain;\n }", "@Override\n\tpublic void assistTraining() {\n\t\tSystem.out.println(\"加强射门练习\");\n\t}", "public void buyhouse(int cost){\n\t\n}", "int getIndividualDefense();", "public void evolve() {\n\t\tfurniturePriority++;\r\n\t}", "void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }", "Float attack();", "public abstract GF2nElement increase();", "public void onderbreek(){\n \n }", "public abstract void improveValueFunction(Vector<BeliefState> vBeliefPoints, Vector<BeliefState> vNewBeliefPoints);", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "void gainHealth(int points) {\n this.health += points;\n }", "AttackResult smartAttack();", "Builder extremeSpikeIncrease(VariableAmount increase);", "private int activate(float sum) {\r\n if (sum > 0) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }", "@Override\n\tpublic double attack() {\n\t\treturn 12.5;\n\t}", "@Override\n public long cost() {\n return 100;\n }", "public int weight ();", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "double getMissChance();", "public void accelerate(){\n speed += 5;\n }", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "int score();", "int score();", "public void attack();" ]
[ "0.71703935", "0.6463602", "0.64558953", "0.6401493", "0.6272593", "0.6244366", "0.62207335", "0.6209427", "0.6204978", "0.61548156", "0.6105754", "0.6086862", "0.6074113", "0.6039964", "0.6018052", "0.6016263", "0.60046715", "0.60046715", "0.59858906", "0.59606946", "0.5944424", "0.5925941", "0.59134877", "0.5895521", "0.58906835", "0.58864844", "0.58634204", "0.5847364", "0.5845668", "0.5845668", "0.5845668", "0.5845668", "0.5845668", "0.5845668", "0.58449805", "0.5812534", "0.5802526", "0.5787217", "0.5780682", "0.5776582", "0.5774574", "0.5771951", "0.5769551", "0.57656896", "0.5765449", "0.57336664", "0.573132", "0.573132", "0.57136536", "0.5699018", "0.5693256", "0.5683805", "0.5683802", "0.5683802", "0.56754017", "0.56720537", "0.56646806", "0.5660329", "0.56593853", "0.56578857", "0.5655738", "0.5646551", "0.56397843", "0.5626764", "0.5624622", "0.5621639", "0.56196105", "0.5615358", "0.5614266", "0.5613084", "0.56091046", "0.56071705", "0.5606276", "0.56055343", "0.5593729", "0.5592238", "0.5589119", "0.5580167", "0.55662906", "0.5564477", "0.5563313", "0.55631506", "0.55630183", "0.5562327", "0.5554236", "0.55425143", "0.5541566", "0.55335206", "0.5532582", "0.5530533", "0.5530145", "0.55197513", "0.5511879", "0.550484", "0.5504714", "0.55013037", "0.5501114", "0.5500117", "0.5500117", "0.5496667" ]
0.7667333
0
Function that increases vitality
private static int gainVitality(int vitality){ vitality++; System.out.println("You gain 1 vitality"); return vitality; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "public int increaseDefense () {\n return 3;\n }", "public abstract void increaseThis();", "void incUsage() {\n incUsage(1);\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "abstract int pregnancy();", "void increase();", "void increase();", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}", "@Override\r\n\tint check_sweetness() {\n\t\treturn 10;\r\n\t}", "private void Nice(){\n }", "public void mo33138e() {\n this.f23891d++;\n }", "public void buyIncreaseSafeTime() {\n this.increaseSafeTime++;\n }", "@Override\n\tpublic void imprime() {\n\t\t\n\t}", "boolean incLowValue() { return true; }", "public void antiderivative () {\n antiderivative(0.0);\n }", "public void smell() {\n\t\t\n\t}", "double getMissChance();", "public void incrementAmount() { amount++; }", "public void Increase()\n {\n Increase(1);\n }", "public void func_96648_a() {\n/* 63 */ if (this.theScoreObjective.getCriteria().isReadOnly())\n/* */ {\n/* 65 */ throw new IllegalStateException(\"Cannot modify read-only score\");\n/* */ }\n/* */ \n/* */ \n/* 69 */ increseScore(1);\n/* */ }", "@Override\n public void computeSatisfaction() {\n\n }", "@Override\n\tpublic double bonus() {\n\t\treturn 0;\n\t}", "private static void increasePrimitive(int value) {\n value++;\n }", "private void incrPositiveCount(){\n m_PositiveCount++;\n }", "private boolean incrementAge(State s) {\r\n\t\tthis.age++;\r\n\t\tif (this.age >= this.ageToReproduce) {\r\n\t\t\tthis.age = 0;\r\n\t\t\treproduce(s);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public int getWorth() { return 1; }", "private static int gainStrength(int strength){\r\n strength++;\r\n System.out.println(\"You gain 1 strength\");\r\n return strength;\r\n }", "public void addLife() {lives++;}", "private void incUsage(int amount) {\n if (amount < 0 && !destroyed) {\n Assert.assertTrue(usageCount - amount >= 0,\n amount + \" cannot be subtracted from usageCount \" + usageCount);\n }\n usageCount += amount;\n }", "public abstract int preN();", "@Override\n\tpublic int strength() {\n\t\treturn 1;\n\t}", "public void increase_BUIBYDryingFactor(){\r\n\tBUO=BUO+DF;\r\n}", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "public void ferdig(){\n antallTelegrafister--;\n }", "@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\n public boolean isAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms() {\n return false;\n }", "@Override public short getComplexity() {\n return 0;\n }", "long invalidations();", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "public void fixTeacherRating()\n {\n // put your code here\n if(profQuality < 5)\n profQuality++;\n }", "@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}", "private int heavyAttack() {\n return attack(6, 2);\n }", "protected void incrementAge()\n {\n age++;\n if(age > max_age) {\n setDead();\n }\n }", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "private static int gainIntelligence(int intelligence){\r\n intelligence++;\r\n System.out.println(\"You gain 1 intelligence\");\r\n return intelligence;\r\n }", "public void increaseCount(){\n myCount++;\n }", "public void m18993OooO00o() {\n this.OooO00o++;\n }", "private void applyLvlUpCost() {\n }", "boolean incHighValue() { return true; }", "public abstract int mo9754s();", "public int getToughness();", "public Fun_yet_extremely_useless()\n {\n\n }", "@Override\n public double tuition(){\n return 2500;\n }", "VariableAmount getExtremeSpikeIncrease();", "void increase()\n {\n a++;\n b++ ;\n }", "private void increment() {\r\n salary = (int) (salary + salary * 0.2);\r\n }", "void setNumberOfCavalry(int cavalery);", "private void m50366E() {\n }", "public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\n}", "public int act1Cost()\r\n {\r\n return 1;\r\n }", "public boolean use(int value){durability -= value; if(durability == 0) return true; return false;}", "public abstract int selfExplodingKittenDrawn();", "public void incrementRefusals() {\n\t}", "public void repair(){\n if(health < 9) {\n this.health++;\n }\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic int vanish() {\n\t\treturn 1;\n\t}", "public void verliesLeven() {\r\n\t\t\r\n\t}", "public void specialize()\n {\n\tdef -= 200;\n\tdmg += 0.5;\n\tcounter += 1;\n }", "public int logic4()\r\n\t{\r\n\t\tint changesMade = 0;\r\n\t\treturn changesMade;\r\n\t}", "public abstract int mo12585RY(int i);", "double defendre();", "protected abstract float _getGrowthChance();", "public void aumentaInSitu(){\n if(quantidade_in_situ<quantidade_disponivel)\n quantidade_in_situ++;\n else\n return;\n }", "public void changeToxicity(int i) {\n \t\t if (toxicity + i < 1) {\n \t\t\ttoxicity = 0;\n \t\t}else if (toxicity + i < 100) {\n \t\t\ttoxicity += i;\n \t\t} else if (toxicity + i > 99) {\n \t\t\ttoxicity = 100;\n \t\t\talive = false;\n \t\t}\n \t}", "public double garanty(int id);", "public void calculateEffectiveness(){\n double[] typeEffective = new double[18];\n \n for(int i = 0; i < 18; i++){\n typeEffective[i] = tc.getEffectiveNumber(i, tc.convertType(type1));\n }\n \n if(type2 != null){\n for(int i = 0; i < 18; i++){\n typeEffective[i] *= tc.getEffectiveNumber(i, tc.convertType(type2));\n }\n }\n \n for(int i = 0; i < 18; i++){\n if(typeEffective[i] != 1){\n if(typeEffective[i] > 1){\n double[] newWeak = {i,typeEffective[i]};\n weak.add(newWeak);\n }else{\n double[] newStrong = {i,typeEffective[i]};\n strong.add(newStrong);\n }\n }\n }\n }", "public void incCounter(){\n counter++;\n }", "Aweme mo62993e();", "public abstract int mo12581RU(int i);", "public void makeSomeNoise(IntegerMath math) {\n\n }", "@Override\n public int strengthBonus() {\n\treturn 4;\n }", "private void incrementUsageCount() {\n usageCount++;\n }", "public int storrelse();", "@Test\n\tpublic void testTHealthIncrease1() {\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "void setExtremeSpikeIncrease(VariableAmount increase);", "public abstract int mo9749n();", "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\n\t\t\r\n\t}", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}", "public void updatePatience(){\n Patience = Patience - 1;\n }", "public abstract void mo42331g();", "public abstract BigInteger getUseed();", "protected void usePoison(double amount) {\n\t\tassert poison >= 0;\n\t\tthis.poison += amount;\n\t\tpoison = Math.min(1, Math.max(0, poison));\n\t}", "public void buyhouse(int cost){\n\t\n}", "private void promote() {\r\n //promote gives more money\r\n increment();\r\n }", "private void raiseIgnorable(double higher, double lower) {\n this.eatable *= lower;\n this.playable *= lower;\n this.ignorable *= higher;\n }", "int CONVOLVE() { return 22; }", "@Override\n public void bankrupt() {\n this.mortgaged = false;\n }" ]
[ "0.6451013", "0.64455664", "0.63149726", "0.62197655", "0.62046933", "0.6082239", "0.60372657", "0.60372657", "0.60323095", "0.6020194", "0.6004418", "0.5977341", "0.5942669", "0.59151596", "0.59137166", "0.5912226", "0.59083164", "0.5893903", "0.5879739", "0.5759566", "0.57522035", "0.5717519", "0.5715657", "0.5707933", "0.57033336", "0.5702433", "0.5697566", "0.5686542", "0.5682368", "0.56645894", "0.56535524", "0.56482345", "0.56446934", "0.56349826", "0.563003", "0.56204695", "0.5602292", "0.5601456", "0.55895", "0.5582568", "0.5579964", "0.557404", "0.556838", "0.55665606", "0.5563535", "0.552829", "0.5526017", "0.5519615", "0.55181026", "0.5515269", "0.5509527", "0.5509382", "0.5509136", "0.54937804", "0.5492122", "0.5490226", "0.5483308", "0.5475502", "0.5464353", "0.5452727", "0.5451958", "0.5449463", "0.54461986", "0.54452133", "0.5438179", "0.5437092", "0.5427558", "0.5424924", "0.5424752", "0.5423802", "0.54180866", "0.54170203", "0.5415329", "0.5409614", "0.5405814", "0.5404273", "0.5400193", "0.5398563", "0.5398352", "0.5391177", "0.5389611", "0.5388126", "0.53872234", "0.5386554", "0.53828615", "0.5379685", "0.5377886", "0.5376276", "0.53744125", "0.53743666", "0.5364505", "0.5364465", "0.536238", "0.536097", "0.5359042", "0.5358363", "0.53550494", "0.5353872", "0.535097", "0.53505623" ]
0.66474956
0
Function that manages the encounter list
private static String encounter(int playerLevel){ String encounterType; int number = 0; Random rand = new Random(); if(playerLevel > 6){ number = rand.nextInt(4); }else if(playerLevel > 4){ number = rand.nextInt(3); }else{ number = rand.nextInt(2); } switch(number){ case 1: System.out.println("You found a Skeleton!"); encounterType = "Skeleton"; break; case 2: System.out.println("You found a Devil!"); encounterType = "Devil"; break; case 3: System.out.println("You have found Blue Moon City."); encounterType = "Blue Moon City"; break; default: System.out.println("You didn't find anything."); encounterType = "nothing"; break; } return encounterType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n enemyName = e.getName();\n \n }\n enemyPresent = true;\n clearExits();\n }\n else{\n setExits(); \n }\n }", "private List<Obs> getEncountersOfPatient(Patient patient, List<Obs> patientObsList, Integer pid){\n\t\tpatientObsList = getFinalObsList(patient, patientObsList, pid);\t\t\n\t\tList<Encounter> randomizedEncounterList = randomizeEncounterDates(patientObsList);\n\t\tList<Date> randomizedEncounterDateList= new ArrayList<Date>();\n\t\tfor(Encounter e : randomizedEncounterList){\n\t\t\trandomizedEncounterDateList.add(e.getEncounterDatetime());\n\t\t}\n\t\tfor(int i=0; i<randomizedEncounterDateList.size();i++){\n\t\t\tEncounter e = patientObsList.get(i).getEncounter();\n\t\t\te.setEncounterDatetime(randomizedEncounterDateList.get(i));\n\t\t\tpatientObsList.get(i).setEncounter(e);\n\t\t}\n\t\tfor(int i=0; i<patientObsList.size();i++){\n\t\t\tLocation loc = new Location();\n\t\t\tloc.setAddress1(accessLocationPropFile());\n\t\t\tpatientObsList.get(i).setLocation(loc);\n\t\t}\n\t\treturn patientObsList;\n\t}", "protected void onResume() {\n\t\tsuper.onResume();\n\n\t\tIntent intent = getIntent();\n\t\tHCN = intent.getStringExtra(\"hcn\");\n\t\tintHCN = Integer.parseInt(HCN);\n\t\tpatientManager = (PatientManager) intent\n\t\t\t\t.getSerializableExtra(\"patientManager\");\n\t\tpatients = patientManager.getPatientList();\n\t\tList<Patient> patientsNotSeen = new ArrayList<Patient>();\n\t\t\n\t\tString[] orderedList = null;\n\t\tint number = 0;\n\t\tfor (int i = 0; i < patientManager.getSize(); i++){\n\t\t\tif (patients.get(i).isSeenByDoctor()==false){\n\t\t\t\tnumber += 1;\n\t\t\t\tpatientsNotSeen.add(patients.get(i));\n\t\t\t}\n\t\t}\n\t\torderedList = new String[number];\n\n\t\tfor (int i = 0; i < orderedList.length; i++){\n\t\t\torderedList[i] = patientsNotSeen.get(i).getFirstName() + \" \" + patientsNotSeen.get(i).getLastName();\n\t\t}\n\t\t\n//\n//\t\tLog.i(TAG, \"Current Patient is \" + currentPatient);\n//\t\tLog.i(TAG, \"Current Patient VisitRecord is \"\n//\t\t\t\t+ currentPatient.getVisitRecords().toString());\n\n\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(\n\t\t\t\tthis, android.R.layout.simple_list_item_1,\n\t\t\t\torderedList);\n\t\tsetListAdapter(adapter);\n\t\tLog.i(TAG, \"END OF ONRESUME\");\n\t}", "public void popEnemies() {\n\t\t\n\t\tEnemyList.add(orc);\n\t\tEnemyList.add(goblin);\n\t\tEnemyList.add(necromancer);\n\t\tEnemyList.add(troll);\n\t\tEnemyList.add(minotaur);\n\t\tEnemyList.add(hydra);\n\t\tEnemyList.add(zombie);\n\t\tEnemyList.add(thrall);\n\t\tEnemyList.add(demon);\n\t\tEnemyList.add(witch);\n\t\tEnemyList.add(boss);\n\t}", "public static void doEncounters() {\r\n \t\r\n \tIterator<String> populationIter = population.keySet().iterator();\r\n\t\twhile (populationIter.hasNext()) { \r\n\t String pos = populationIter.next();\r\n\t ArrayList<Critter> critterList = population.get(pos);\r\n\t if(critterList.size() > 1) {\r\n\t \tint[] coords = stringToPos(pos);\r\n\t \t//get the integer value of the coordinates from the String key\r\n\t \tint x_copy = coords[0];\r\n\t \tint y_copy = coords[1];\r\n\t \t\r\n\t \tfor(int i = 0; i < critterList.size(); i++) {\r\n\t \t\tfor (int j = i+1; j < critterList.size(); j++) {\r\n\t \t\t\tCritter A = critterList.get(i);\r\n\t \t\t\tCritter B = critterList.get(j);\r\n\t \t\t\tif(A.getEnergy() > 0 && B.getEnergy() > 0 && A.x_coord == x_copy && A.y_coord == y_copy && B.x_coord == x_copy && B.y_coord == y_copy) {\r\n\t \t\t\t\t\r\n\t \t\t\t\t//Critters A and B are fighting\r\n\t \t\t\t\tA.isFight = true;\r\n\t \t\t\t\tB.isFight = true;\r\n\t \t\t\t\t\r\n\t \t\t\t\t//boolean AWantsToFight = A.fight(B.toString());\r\n\t \t\t\t\t//boolean BWantsToFight = B.fight(A.toString());\r\n\t \t\t\t\tint skillA = 0;\r\n\t \t\t\t\tint skillB = 0;\r\n\t \t\t\t\t\r\n\t \t\t\t\t//determine how A wants to respond\r\n\t \t\t\t\tif(A.fight(B.toString()) == true) {\r\n\t \t\t\t\t\tskillA = getRandomInt(A.energy);\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\t//determine how B wants to respond\r\n\t \t\t\t\tif(B.fight(A.toString()) == true) {\r\n\t \t\t\t\t\tskillB = getRandomInt(B.energy);\r\n\t \t\t\t\t}\r\n\t \t\t\t\tif(A.x_coord == x_copy && B.x_coord == x_copy && A.y_coord == y_copy && B.y_coord == y_copy) {\r\n\t \t\t\t\t\tif(skillA > skillB) { // A wins\r\n\t \t\t\t\t\t\tA.energy += (int) Math.floor(B.energy*1.0*0.5);\r\n\t \t\t\t\t\t\tB.energy = 0;\r\n\t \t\t\t\t\t} else if (skillB > skillA) {\r\n\t \t\t\t\t\t\tB.energy += (int) Math.floor(A.energy*1.0*0.5); //B wins\r\n\t \t\t\t\t\t\tA.energy = 0;\r\n\t \t\t\t\t\t} else {\r\n\t \t\t\t\t\t\tif(getRandomInt(1) == 0) { // A wins\r\n\t\t \t\t\t\t\t\tA.energy += (int) Math.floor(B.energy*1.0*0.5);\r\n\t\t \t\t\t\t\t\tB.energy = 0;\r\n\t \t\t\t\t\t\t} else {\r\n\t\t \t\t\t\t\t\tB.energy += (int) Math.floor(A.energy*1.0*0.5); //B wins\r\n\t\t \t\t\t\t\t\tA.energy = 0;\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\t//Critters A and B have completed their fight\r\n\t \t\t\t\tA.isFight = false;\r\n\t \t\t\t\tB.isFight = false;\r\n\t \t\t\t\t\r\n\t \t\t\t\tcritterList.set(i, A);\r\n\t \t\t\t\tcritterList.set(j, B);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t}\r\n\t \t\r\n\t \t//Iterate through the critters in that position\r\n\t \tIterator<Critter> crittIter = critterList.iterator();\r\n\t \twhile(crittIter.hasNext()) {\r\n\t \t\tCritter c = crittIter.next();\r\n\t \t\t//remove critters who have moved out of that grid position or who have died\r\n\t \t\tif(c.x_coord != x_copy || c.y_coord != y_copy || (c.energy <= 0)) {\r\n\t \t\t\tcrittIter.remove();\r\n\t \t\t}\r\n\t \t}\r\n\t \tpopulation.replace(pos, critterList);\r\n\t }\r\n\t\t}\r\n }", "private List<Encounter> randomizeEncounterDates(List<Obs> patientObsList){\n\t\tInteger flag=0;\n\t\tList<Date> randomizedEncounterDateList = new ArrayList<Date>();\n\t\tList<Encounter> en = new ArrayList<Encounter>();\n\t\tfor(Obs o : patientObsList){\n\t\t\ten.add(o.getEncounter());\n\t\t}\n\t\tint year,month,date;\n\t\ttry{\n\t\t\tfor(int i=0; i<patientObsList.size();i++){\n\t\t\t\tDate d= new Date();\n\t\t\t\tif(flag==0){\n\t\t\t\t\td.setDate(en.get(0).getEncounterDatetime().getDate());\n\t\t\t\t\td.setMonth(en.get(0).getEncounterDatetime().getMonth());\n\t\t\t\t\td.setYear(en.get(0).getEncounterDatetime().getYear());\n\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\td.setDate(en.get(i-1).getEncounterDatetime().getDate());\n\t\t\t\t\td.setMonth(en.get(i-1).getEncounterDatetime().getMonth());\n\t\t\t\t\td.setYear(en.get(i-1).getEncounterDatetime().getYear());\n\t\t\t\t}\n\t\t\t\tyear=d.getYear()+1900;\n\t\t\t\tmonth=d.getMonth();\n\t\t\t\tdate=d.getDate();\n\n\t\t\t\t//Randomize\n\t\t\t\tyear= randBetween(year+1, year+2) ;\n\t\t\t\tmonth = randBetween(month, 12);\n\t\t\t\tdate= randBetween(date, 30);\n\n\t\t\t\t//Set date\n\t\t\t\td.setYear(year-1900);\n\t\t\t\td.setMonth(month);\n\t\t\t\td.setDate(date);\n\t\t\t\ten.get(i).setEncounterDatetime(d);\n\t\t\t\trandomizedEncounterDateList.add(d);\n\t\t\t}\n\t\t}\n\t\tcatch(APIException e){\n\t\t\tlog.error(\"Exception in randomizing encounter dates\", e);\n\t\t}\n\t\treturn en;\n\t}", "private void loadIncidents() throws SimulationException { \n \n try { \n for(Incident inc : theCoorInt.getIncidentList()) {\n \n Integer logNum = new Integer(inc.getLogNumber());\n \n theSimManagerView.addIncidentTab(logNum);\n theSimManagerView.addIncident(inc);\n \n if(inc.getSecondsToStart() < theCoorInt.getCurrentSimulationTime()) {\n incidentStarted(logNum);\n }\n }\n } catch (RemoteException re) {\n simManagerLogger.logp(Level.SEVERE, \"SimulationManagerModel\", \n \"loadIncidentListTable\", \"Unable to communicate with the \" +\n \"CAD Simulator.\", re);\n \n throw new SimulationException(SimulationException.CAD_SIM_COMM, re);\n }\n \n }", "private void getEntries() {\r\n\r\n\t\tif(displayEntries.size() > 0){\r\n\t\t\tfor (int i = 0; i<displayEntries.size(); i++){\r\n\t\t\t\tNameSurferEntry entries = displayEntries.get(i);\r\n\t\t\t\tdrawRankGraph(entries,i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "IbeisEncounter addEncounter(String name) throws IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException, EncounterNameAlreadyExistsException;", "public void advanceInconsistencyList() {\n\t\tinconsistenciesFound.remove(0);\r\n\t\tpossessiveTurn = false;\r\n\r\n\t\tcheckingEngine.replaceTextwithList();\r\n\t\ttypeHere.setText(checkingEngine.getText());\r\n\t\tgoThroughInconsistencies();\r\n\t}", "void deathHandler(Enemy e) {\n\n if (e != null) {\n Explosion rip = new Explosion();\n rip.kaboom.moveToPoint(e.eTank.getX(), e.eTank.getY());\n // println(\"made enemy\");\n rip.kaboom.frontAngle(90);\n rip.kaboom.turn(90);\n explosion.add(rip);\n }\n for (Explosion exp: explosion) {\n if (exp.kaboomCounter > 1) {\n exp.kaboom.display();\n }\n // if (exp.kaboomCounter < 1) {\n // explosion.remove(exp);\n // }\n // else {\n exp.kaboomCounter -= 3;\n // println(exp.kaboomCounter);\n // println(explosion.size());\n // }\n }\n\n}", "public void readContinents(){\n for ( k= 0;k<continentsNum;k++){\n lineElements = lines.get(edgesNum+verticesNum+5+k).split(\" \");\n int bonus = Integer.parseInt(lineElements[0]);\n nearCountries = new ArrayList<>();\n for(int i=1;i<lineElements.length;i++){\n Country nearCountry = vertices.get(Integer.parseInt(lineElements[i])-1);\n nearCountries.add(nearCountry);\n }\n Map.getIntance().addContinent(new Continent(bonus,nearCountries));\n }\n List<Continent> allContinents = Map.getIntance().getContinents();\n for ( k= 0;k<continentsNum;k++){\n List<Country> countriesInContinent = allContinents.get(k).getCountries();\n for(i=0;i<countriesInContinent.size();i++){\n if(countriesInContinent.get(i).getOwner()==Agent.player1)\n Agent.player1.addCountry(countriesInContinent.get(i));\n else\n Agent.player2.addCountry(countriesInContinent.get(i));\n }\n }\n\n // Read the continents for AI agents\n for ( k= 0;k<continentsNum;k++){\n lineElements = lines.get(edgesNum+verticesNum+5+k).split(\" \");\n int bonus = Integer.parseInt(lineElements[0]);\n nearSCountries = new ArrayList<>();\n for(int i=1;i<lineElements.length;i++){\n Integer nearSCountry = Integer.parseInt(lineElements[i]);\n nearSCountries.add(nearSCountry);\n }\n SContinent sContinent = new SContinent();\n sContinent.countries = nearSCountries;\n sContinent.bounse = bonus;\n NState.globalState.continents.add(sContinent);\n }\n\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "List<Edible> getEdibles();", "public InternmentList() {\n\t\tsuper(\"Internments\", List.IMPLICIT);\n\n\t\tstartData();\n\t\tstartComponents();\n\t}", "void initListRemainingId();", "public void addEducation(Education e) {\n ed.add(e);\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 }", "public EncounterFBO(QueueItem q) {\n\t\tthis.queueItem = q;\n\t\tthis.status = q.getStatus().toString();\n\t\tthis.patientResponses = \"\";\n\t\tthis.existingDiagnoses = \"\";\n\t\tthis.diagnoses = new ArrayList<Concept>();\n\t\tthis.doctorName = Context.getAuthenticatedUser().getGivenName() + \" \" +\n\t\t\t\t\t\t Context.getAuthenticatedUser().getFamilyName();\n\t\t\n\t\t//Initialize concept sources\n\t\tthis.conceptSources = new ArrayList<String>();\n\t\t\n //Add default concept source\n conceptSources.add(\"Default\");\n \n\t\tList<ConceptSource> sources = Context.getConceptService()\n\t\t.getAllConceptSources();\n Iterator<ConceptSource> iteratorSources = sources.iterator();\n\t\t\n while(iteratorSources.hasNext()){\n \tconceptSources.add(iteratorSources.next().getName());\n }\n \n \n\t\tMap<Concept, List<Obs>> om = new HashMap<Concept, List<Obs>>();\n\t\tfor(Obs o : q.getEncounter().getObs()) {\n\t\t\tList<Obs> ol = null;\n\t\t\tif(om.containsKey(o.getConcept())) {\n\t\t\t\tol = om.get(o.getConcept());\n\t\t\t} else {\n\t\t\t\tol = new ArrayList<Obs>();\n\t\t\t\tom.put(o.getConcept(), ol);\n\t\t\t}\n\t\t\tol.add(o);\n\t\t}\n\n //Initialize patient response with date of initial encounter\n patientResponses = \"<b>Date of Encounter:</b><br>\" \n \t\t+ q.getDateCreated().toString().substring(0,10) + \"<br><br>\"; \n\t\t\n\t\tString diagnoses = \"\";\n\t\tString urgency = \"\";\n\t\tString assessment = \"\";\n\t\tString recommendations = \"\";\n\t\tString treatment = \"\";\n\t\tString infoRequest = \"\";\n\t\tString conceptName = \"\";\n\t\tString doctorName = \"\";\n\t\tLocale l = Context.getLocale();\n\t\t\n\t\tfor(Obs o : q.getEncounter().getObs()) {\n\t\t\t//append to summary of all patient responses\n\t\t\tif(!o.isComplex())\n\t\t\t{\t\t\n\t\t\t\tconceptName = o.getConcept().getDisplayString();\n\t\t\t\tlog.debug(conceptName);\n\t\t\t\t\n\t\t\t\t//Case is Deferred\n\t\t\t\tif(q.getStatus().equals(QueueItemStatus.DEFERRED))\n\t\t\t\t{\n\t\t\t\t\tif(conceptName.equals(\"DOCTOR INFO REQUEST\")){\n\t\t\t\t\t\tinfoRequest += \"<br>\" + o.getValueAsString(l);\n\t\t\t\t\t\tdoctorName = o.getCreator().getGivenName() + \" \" \n\t\t\t\t\t\t+ o.getCreator().getFamilyName();\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Already has diagnosis\n\t\t\t\tif(q.getStatus().equals(QueueItemStatus.CLOSED))\n\t\t\t\t{\n\t\t\t\t\tif(conceptName.equals(\"DOCTOR DIAGNOSIS\")){\n\t\t\t\t\t\tString value = o.getValueAsString(l);\n\t\t\t\t\t\tif(value.contains(\"|\"))\n\t\t\t\t\t\t\tdiagnoses += \"<br>\" +value.substring(0,\n\t\t\t\t\t\t\t\t\tvalue.indexOf('|')-1).toLowerCase();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdiagnoses += \"<br>\" + o.getValueAsString(l);\n\t\t\t\t\t\tdoctorName = o.getCreator().getGivenName() + \" \" \n\t\t\t\t\t\t\t\t\t+ o.getCreator().getFamilyName();\n\t\t\t\t\t}\n\t\t\t\t\telse if(conceptName.equals(\"DOCTOR URGENCY LEVEL\")){\n\t\t\t\t\t\turgency += \"<br>\" + o.getValueAsString(l);\n\t\t\t\t\t\tdoctorName = o.getCreator().getGivenName() + \" \" \n\t\t\t\t\t\t\t\t\t+ o.getCreator().getFamilyName();\n\t\t\t\t\t}\n\t\t\t\t\telse if(conceptName.equals(\"DOCTOR TREATMENT RECOMMENDATION\")){\n\t\t\t\t\t\ttreatment += \"<br>\" + o.getValueAsString(l);\n\t\t\t\t\t\tdoctorName = o.getCreator().getGivenName() + \" \" \n\t\t\t\t\t\t\t\t\t+ o.getCreator().getFamilyName();\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(conceptName.equals(\"DOCTOR ASSESSMENT\")){\n\t\t\t\t\t\tassessment += \"<br>\" + o.getValueAsString(l);\n\t\t\t\t\t\tdoctorName = o.getCreator().getGivenName() + \" \" \n\t\t\t\t\t\t\t\t\t+ o.getCreator().getFamilyName();\n\t\t\t\t\t}\n\t\t\t\t\telse if(conceptName.equals(\"DOCTOR RECOMMENDATIONS\")){\n\t\t\t\t\t\trecommendations += \"<br>\" + o.getValueAsString(l);\n\t\t\t\t\t\tdoctorName = o.getCreator().getGivenName() + \" \" \n\t\t\t\t\t\t\t\t\t+ o.getCreator().getFamilyName();\n\t\t\t\t\t}\n\t\t\t\t\telse if(conceptName.equals(\"DOCTOR INFO REQUEST\")){\n\t\t\t\t\t\tinfoRequest += \"<br>\" + o.getValueAsString(l);\n\t\t\t\t\t\tdoctorName = o.getCreator().getGivenName() + \" \" \n\t\t\t\t\t\t\t\t\t+ o.getCreator().getFamilyName();\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Set patient responses\n\t\t\t\t//Don't list personal info obs (i.e. birthdate)\n\t\t\t\tif(!conceptName.equals(\"PATIENT ID\") &&\n\t\t\t\t\t!conceptName.equals(\"FIRST NAME\") &&\n\t\t\t\t\t!conceptName.equals(\"LAST NAME\") &&\n\t\t\t\t\t!conceptName.equals(\"BIRTHDATE MONTH\") &&\n\t\t\t\t\t!conceptName.equals(\"BIRTHDATE DAY\") &&\n\t\t\t\t\t!conceptName.equals(\"BIRTHDATE YEAR\") &&\n\t\t\t\t\t!conceptName.equals(\"GENDER\") &&\n\t\t\t\t\t!conceptName.equals(\"PATIENT ALREADY ENROLLED\") &&\n\t\t\t\t\t!conceptName.equals(\"DOCTOR DIAGNOSIS\") &&\n\t\t\t\t\t!conceptName.equals(\"DOCTOR TREATMENT RECOMMENDATION\") &&\n\t\t\t\t\t!conceptName.equals(\"DOCTOR URGENCY LEVEL\") &&\n\t\t\t\t\t!conceptName.equals(\"DOCTOR ASSESSMENT\") &&\n\t\t\t\t\t!conceptName.equals(\"DOCTOR RECOMMENDATIONS\") &&\n\t\t\t\t\t!conceptName.equals(\"DOCTOR INFO REQUEST\")){\n\t\t\t\t\tif (o.getValueAsString(l).equals(\"\")){\n\t\t\t\t\t\tpatientResponses += \"<b>\" + o.getConcept()\n\t\t\t\t\t\t\t.getDescription().getDescription() \n\t\t\t\t\t\t\t+ \"</b><br>No response given<br><br>\";\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tpatientResponses += \"<b>\" + o.getConcept()\n\t\t\t\t\t\t\t.getDescription().getDescription() \n\t\t\t\t\t\t\t+ \"</b><br>\" + o.getValueAsString(l) + \"<br><br>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\n\t\t//Set existing diagnoses\n\t\tif(!diagnoses.equals(\"\") || !treatment.equals(\"\") \n\t\t\t\t|| !assessment.equals(\"\") || !recommendations.equals(\"\") \n\t\t\t\t|| !urgency.equals(\"\") || !infoRequest.equals(\"\"))\n\t\t{\n\t\t\texistingDiagnoses = \"<b>Date of Specialist Consult: </b><br>\" \n\t\t\t\t+ q.getDateChanged().toString().substring(0,10) \n\t\t\t\t+ \"<br><br><b>Specialist:</b><br>\" + doctorName;\n\t\t\t\n\t\t\tif(!infoRequest.equals(\"\"))\n\t\t\t\texistingDiagnoses += \"<br><br><b>Request for More Info: </b>\" \n\t\t\t\t\t+ infoRequest;\n\t\t\t\n\t\t\tif(!urgency.equals(\"\"))\n\t\t\t\texistingDiagnoses += \"<br><br><b>Urgency Level: </b>\" \n\t\t\t\t\t+ urgency;\n\t\t\t\n\t\t\tif(!diagnoses.equals(\"\") || !treatment.equals(\"\") \n\t\t\t\t\t|| !assessment.equals(\"\") || !recommendations.equals(\"\"))\n\t\t\t\texistingDiagnoses += \"<br><br><b>Diagnosis: </b>\" + diagnoses + \n\t\t\t\t\t\t\t\t \t \"<br><br><b>Plan: </b>\" + treatment + assessment + recommendations;\n\n\t\t\tlog.debug(\"Existing Diagnoses: \" + existingDiagnoses);\n\t\t}\n\n\t\t//Set obs map\n\t\tthis.obsMap = om;\n\t\t\n\t}", "public String getEncounteridentifier() {\n\t\treturn encounteridentifier;\n\t}", "public static void main(String[] args) {\n List<Evento> listadoEventos = Evento.createShortList();\n List<Expositor> listadoExpositores = Expositor.createShortList();\n List<Asistente> Asistentes = Asistente.createShortList();\n //Asigno a los eventos sus expositores\n listadoEventos.get(0).setExpositor(listadoExpositores.get(0));\n listadoEventos.get(1).setExpositor(listadoExpositores.get(1));\n listadoEventos.get(2).setExpositor(listadoExpositores.get(2));\n listadoEventos.get(3).setExpositor(listadoExpositores.get(3));\n listadoEventos.get(4).setExpositor(listadoExpositores.get(4));\n listadoEventos.get(5).setExpositor(listadoExpositores.get(5));\n //Asigno los asistentes a los eventos\n listadoEventos.get(0).getListaAsistentes().add(Asistentes.get(0));\n listadoEventos.get(0).getListaAsistentes().add(Asistentes.get(1));\n\n listadoEventos.get(1).getListaAsistentes().add(Asistentes.get(2));\n\n listadoEventos.get(2).getListaAsistentes().add(Asistentes.get(3));\n\n listadoEventos.get(3).getListaAsistentes().add(Asistentes.get(4));\n listadoEventos.get(3).getListaAsistentes().add(Asistentes.get(5));\n\n listadoEventos.get(4).getListaAsistentes().add(Asistentes.get(6));\n\n listadoEventos.get(5).getListaAsistentes().add(Asistentes.get(7));\n listadoEventos.get(5).getListaAsistentes().add(Asistentes.get(8));\n listadoEventos.get(5).getListaAsistentes().add(Asistentes.get(9));\n\n //2A: Listado de manera ordenado por titulo descendiente, expositor y asistentes.\n\n Comparator<Integer> comparador = Collections.reverseOrder();\n\n //Ordenar de forma descendente por titulo\n Collections.sort(listadoEventos, (o1, o2) -> o2.getTitulo().compareTo(o1.getTitulo()));\n\n System.out.println(\"======Prueba 01 - Listado de eventos======\");\n for(Evento e:listadoEventos){\n System.out.println(\"****************************************\");\n System.out.println(\"Evento: \"+e.getTitulo());\n System.out.println(\"Expositor: \"+e.getExpositor().getNombre());\n System.out.println(\"Asistentes:\");\n for(Asistente a : e.getListaAsistentes()){\n System.out.println(a.getCodigo()+\"\\t\"+a.getNombre()+\"\\t\"+a.getApellidos());\n }\n }\n\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tSet <IRI> individuals = controller.getKnownIndividuals();\n\t\t\t\tfor (IRI item : individuals){\n\t\t\t\t\tcontroller.logappendInfo(item.toString());\n\t\t\t\t}\n\t\t\t}", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "private void processData()\n\t{\n\t\tfor(String people :guestList)\n\t\t{\n\t\t\t\n\t\t\tString[] guestInfo = people.split(\",\");\n\t\t\tif(guestInfo[inviterIndex].equals(\"Adam\"))\n\t\t\t{\n\t\t\t\t//Adam invited friends list\n\t\t\t\tGuest guest = new Guest(guestInfo[guestIndex],Integer.valueOf(guestInfo[candyBroughtIndex]),Integer.valueOf(guestInfo[candyConsumedIndex]));\n\t\t\t\tint result =Integer.valueOf(guestInfo[candyBroughtIndex]) - Integer.valueOf(guestInfo[candyConsumedIndex]);\n\t\t\t\tguest.setInviter(\"Adam\");\n\t\t\t\tguest.setLeftOver(result);\n\t\t\t\tboolean isInvited = (result >= 0)? true : false;\n\t\t\t\tguest.setInvited(isInvited);\n\t\t\t\tguestMapList.put(guestInfo[guestIndex], guest);\n\t\t\t}else if(!guestMapList.isEmpty())\n\t\t\t{\n\t\t\t\tif(guestMapList.containsKey(guestInfo[inviterIndex]))\n\t\t\t\t{\n\t\t\t\t\tGuest inviter = guestMapList.get(guestInfo[inviterIndex]);\n\t\t\t\t\tif(Integer.valueOf(guestInfo[candyBroughtIndex])+inviter.getLeftOver()>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tGuest guest = new Guest(guestInfo[guestIndex],Integer.valueOf(guestInfo[candyBroughtIndex]),Integer.valueOf(guestInfo[candyConsumedIndex]));\n\t\t\t\t\t\tint result =inviter.getLeftOver() + Integer.valueOf(guestInfo[candyBroughtIndex]) - Integer.valueOf(guestInfo[candyConsumedIndex]);\n\t\t\t\t\t\tguest.setLeftOver(result);\n\t\t\t\t\t\tguest.setInviter(inviter.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t\tboolean isInvited = (result >= 0)? true : false;\n\t\t\t\t\t\tguest.setInvited(isInvited);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(inviter.getInviter().equals(\"Adam\")){\n\t\t\t\t\t\t//update inviter information\n\t\t\t\t\t\t\tinviter.setLeftOver(result);\n\t\t\t\t\t\t\tinviter.setInvited(isInvited);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tinviter.setNextGuest(guest);\n\t\t\t\t\t\tguestMapList.put(inviter.getName(), inviter);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//add new guest to hashmap\n\t\t\t\t\t\tguestMapList.put(guestInfo[guestIndex], guest);\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\t\n\t\t}\n\t}", "private void addAI(){\n\n }", "private void refreshCitizenList() {\n if (targetCitizen == EntityRef.NULL) {\n return;\n }\n\n List<MarketItem> items = new ArrayList<>();\n for (int i = 0; i < inventoryManager.getNumSlots(targetCitizen); i++) {\n EntityRef entity = inventoryManager.getItemInSlot(targetCitizen, i);\n\n if (entity.getParentPrefab() != null) {\n MarketItem item;\n int quantity = inventoryManager.getStackSize(entity);\n\n if (entity.hasComponent(BlockItemComponent.class)) {\n String itemName = entity.getComponent(BlockItemComponent.class).blockFamily.getURI().toString();\n item = marketItemRegistry.get(itemName, quantity);\n } else {\n item = marketItemRegistry.get(entity.getParentPrefab().getName(), quantity);\n }\n\n items.add(item);\n }\n }\n\n tradingScreen.setCitizenItems(items);\n }", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "private void init() {\n\t\tString province[]=resources.getStringArray(R.array.university_province_item);\n\t\tfinal String university[][]={\n\t\t\t\tresources.getStringArray(R.array.beijin_university_province_item),\n\t\t\t\tresources.getStringArray(R.array.university_tianjin_province_item)\n\t\t};\n\t\tadapter=new IdeasExpandableListAdapter(this, province, university);\n\t\tmListView.setAdapter(adapter);\n\t\tmListView.setOnChildClickListener(new OnChildClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic boolean onChildClick(ExpandableListView arg0, View arg1,\n\t\t\t\t\tint groupPosition , int childPosition , long arg4) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSharedPreferences sharedPreferences=getSharedPreferences(Constants.SP_NAME, MODE_PRIVATE);\n\t\t\t\tEditor editor=sharedPreferences.edit();\n\t\t\t\teditor.putString(Constants.SP_UNIVERSITY, university[groupPosition][childPosition]);\n\t\t\t\teditor.commit();\n\t\t\t\tIntent intent=new Intent();\n\t\t\t\tintent.setClass(UniversityActivity.this, PersonInrformationActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t}", "private void listToString() {\n textList.clear();\n for (int x = 0; x < party.size(); x++) {\n Agent thisAgent = party.getMember(x);\n Statistics thisAgentStats = thisAgent.getStats();\n textList.add(thisAgent.getName());\n textList.add(\"HP:\" + thisAgentStats.getCurrentHP() + \"/\" + thisAgentStats.getMaxHP() + \" MP:\" + thisAgentStats.getCurrentMP() + \"/\" + thisAgentStats.getMaxMP());\n }\n }", "public void init() {\n\t\t// init lists\n\t\t_examinationWaiters = new LinkedList();\n\t\t_xrayWaiters = new LinkedList();\n\t\t_backFromXrayWaiters = new LinkedList();\n\t\t_gonePatients = new Vector();\n\n\t\t// init doctors\n\t\t_doctors = new Person[NUMBER_OF_DOCTORS];\n\t\tfor (int i = 0; i < _doctors.length; ++i) {\n\t\t\t_doctors[i] = new Person(\"d\" + (i + 1));\n\t\t}\n\t\t_xrayDoctor = new Person(\"x\");\n\n\t\t// init examination time computing helper arrays\n\t\t_examinationMins =\n\t\t\tnew int[] {\n\t\t\t\t0,\n\t\t\t\tFIRST_EXAMINATION_MIN,\n\t\t\t\tXRAY_EXAMINATION_MIN,\n\t\t\t\tSECOND_EXAMINATION_MIN };\n\t\t_examinationMaxs =\n\t\t\tnew int[] {\n\t\t\t\t0,\n\t\t\t\tFIRST_EXAMINATION_MAX,\n\t\t\t\tXRAY_EXAMINATION_MAX,\n\t\t\t\tSECOND_EXAMINATION_MAX };\n\n\t\t// create enterAmbulanceEvents\n\t\tVector v = new Vector();\n\t\tint i = 0;\n\t\tfor (int t = OPEN_TIME + getPoisson();\n\t\t\tt < CLOSE_TIME;\n\t\t\tt += getPoisson()) {\n\t\t\tv.add(\n\t\t\t\tnew Event(Event.NEW_PATIENT, t, new Person(\"p\" + (++i)), null));\n\t\t}\n\n\t\t// init eventQueue\n\t\t_eventQueue = new EventQueue(v);\n\n\t\t// init timer\n\t\ttime = OPEN_TIME;\n\t}", "protected List<String> getActives() {\n\t\treturn myActives;\n\t}", "public void asignarAnexo(){\r\n String indiceStr;\r\n int indice, i=0;\r\n System.out.println(\"-----------------------------------\");\r\n System.out.println(\" Lista de Empleados\");\r\n System.out.println(\"-----------------------------------\");\r\n //RECORRER ARRAYLIST\r\n for (i=0 ; i<empleados.size() ; i=i+1) {\r\n System.out.print( (i + 1) +\" \"+empleados.get(i).getPerNombre()+\" \"+\r\n empleados.get(i).getPerApellidoPaterno()+\" \"+\r\n empleados.get(i).getPerApellidoMaterno()+\" tiene el anexo : \");\r\n if(empleados.get(i).getEmpAnexo() != null){\r\n System.out.println(empleados.get(i).getEmpAnexo()); //QUE ANEXO TIENE\r\n }else{\r\n System.out.println(\" Sin asignar \");\r\n }\r\n }\r\n if(i>0){\r\n try {\r\n System.out.print(\"Seleccione el codigo del empleado : \\t\");\r\n indiceStr = entrada.readLine();\r\n indice = Integer.parseInt(indiceStr);\r\n indice = indice - 1;\r\n System.out.println(\"-----------------------------------\");\r\n System.out.println(\" Lista de Anexo\");\r\n System.out.println(\"-----------------------------------\");\r\n// RECORRE ENUMERADO ANEXOS\r\n for(Anexo a : Anexo.values()){ \r\n System.out.println(\"\\t\" + a.getAneCodigo()+ \" - \"+a.toString() + \" area: \"+ a.getAneUbicacion());\r\n }\r\n System.out.print(\"Seleccione Anexo: \");\r\n // ASIGNA ANEXO A EMPLEADO\r\n empleados.get(indice).setEmpAnexo(entrada.readLine());\r\n System.out.println(\"*****Empleado se asigno anexo \"+empleados.get(indice).getEmpAnexo().name()+\" *****\");\r\n } catch (IOException ex) {\r\n System.out.println(\"Ocurrio un error al ingresar datos= \"+ex.toString());\r\n } catch(NumberFormatException ex){\r\n System.out.println(\"Ocurrio un error al convertir numero= \"+ex.toString());\r\n }\r\n }else{\r\n System.out.println(\"-NO existen Empleado Registrados-\");\r\n }\r\n }", "public ArrayList<Enseignant> avalaibleEnseignants(Date date,int heure)\n\t{\n\t\t Outil outil=new Outil();\n\t\t DAO dao=new DAO();\n\t\t ArrayList<Enseignant> enseignants= new ArrayList<Enseignant>();\n\t\t ArrayList<Enseignant> enseignatoccupe= new ArrayList<Enseignant>();\n\t\t enseignants=dao.getallenEnseignants();\n\t\t enseignatoccupe=outil.searchEnseignantsbyDateHoure(date, heure);\n\t\t //System.out.println(enseignatoccupe.size() +\" fr \");\n\t\t int i,y;\n\t\t for(i=0;i<enseignatoccupe.size();i++)\n\t\t {\n\t\t\t for(y=0;y<enseignants.size();y++)\n\t\t\t {\n\t\t\t\t if(enseignatoccupe.get(i).getID()==enseignants.get(y).getID())\n\t\t\t\t {\n\t\t\t\t\t enseignants.remove(y);\n\t\t\t\t\t y--;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t return enseignants;\n\t}", "private void addIndicators() {\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(this.score);\r\n scoreIndicator.addToGame(this);\r\n LivesIndicator livesIndicator = new LivesIndicator(this.numberOfLives);\r\n livesIndicator.addToGame(this);\r\n NameLevelIndicator nameLevel = new NameLevelIndicator(info);\r\n nameLevel.addToGame(this);\r\n }", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public OccList()\n {\n int capacity = 8;\n data = new Occ[capacity];\n // initialize data with empty occ\n for (int i=0; i<capacity; i++) data[i] = new Occ(); \n }", "@Override\r\n\tpublic List<Famille> listCompetences() {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\t//on crée une requête\r\n \t\tQuery req=session.createQuery(\"select C from FamilleComp C\");\r\n \t\tList<Famille> famillecomp=req.list();\r\n session.getTransaction().commit();\r\n \t\treturn famillecomp;\r\n\t\t\r\n\t}", "@objid (\"f06e9701-bed5-478b-88af-6a964a67a2f4\")\n EList<Event> getEOccurence();", "public void open(){\n \t\tthis.open = true;\n \t\tSystem.out.println(\"You open the \" + openableName);\n \t\tif(container){\n \t\t\tSystem.out.print(\"Inside are the following: \");\n \t\t\tint itemCount = contains.size();\n \t\t\tString itemString = \"\";\n \t\t\tfor(int i=0,appended=0;i<contains.size();i++){\n \t\t\t\tString itemName = contains.get(i).getName(); \n \t\t\t\tif(contains.get(i) != null){\n \t\t\t\t\titemString += itemName;\n \t\t\t\t\tappended++;\n \t\t\t\t\tif(appended == itemCount){\n \t\t\t\t\t\titemString += \".\";\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}else if(itemCount != 2) //no commas if there are only 2 items\n \t\t\t\t\t\titemString += \", \";\n \t\t\t\t}\n \t\t\t\tif(appended == itemCount-1 && contains.get(i+1) != null && itemCount != 1){\n \t\t\t\t\tif(itemCount == 2) //Without commas there are no spaces, so put one\n \t\t\t\t\t\titemString += \" \";\n \t\t\t\t\titemString += \"and \";\n \t\t\t\t}\n \t\t\t}\n \t\t\tSystem.out.print(itemString);\n \t\t}\n \t}", "public void process() {\r\n String marbleClone = INTL_NODE.get1stOutMarble();\r\n TMNL_NODE.addInMarble(marbleClone);\r\n }", "public void addOccurence() {\n\t\tcount = count + 1;\n\t}", "public ArrayList<String> printNoInsurance(){\r\n NodeP current = front;\r\n ArrayList<String> noInsurance = new ArrayList<String>();\r\n \r\n if(counter ==0){\r\n System.out.println(\"No items are on the list\");\r\n }\r\n else {\r\n while (current != null){\r\n if (current.getPatient().getCoverage() == 0){\r\n noInsurance.add(current.toString());\r\n current = current.getNext();\r\n }\r\n else {\r\n current = current.getNext();\r\n }\r\n }\r\n }\r\n return noInsurance;\r\n }", "public List<Integer> findAuditIdList(Expence expence)\r\n/* 46: */ {\r\n/* 47: 43 */ return this.expenceDao.findAuditIdList(expence);\r\n/* 48: */ }", "public void readInOrganizations() {\n // read CSV file for Organizations\n allOrganizations = new ArrayList<Organization>();\n InputStream inputStream = getResources().openRawResource(R.raw.organizations);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] organizationInfo = (String[]) scoreList.get(i);\n\n // inputs to Organization constructor:\n // String name, int logoPhotoID, int photo1ID, int photo2ID, int photo3ID\n\n // group together description\n String description = getDescription(5, organizationInfo);\n\n // get all image IDs according to the names\n int logoPhotoID = context.getResources().getIdentifier(organizationInfo[1], \"drawable\", context.getPackageName());\n int photo1ID = context.getResources().getIdentifier(organizationInfo[2], \"drawable\", context.getPackageName());\n int photo2ID = context.getResources().getIdentifier(organizationInfo[3], \"drawable\", context.getPackageName());\n int photo3ID = context.getResources().getIdentifier(organizationInfo[4], \"drawable\", context.getPackageName());\n allOrganizations.add(new Organization(organizationInfo[0], logoPhotoID, photo1ID, photo2ID, photo3ID, description));\n\n //System.out.println(\"organizationInfo: \" + organizationInfo[0] + \" \" + organizationInfo[1] + \" \" + organizationInfo[2] + \" \" + organizationInfo[3] + \" \" + organizationInfo[4]);\n }\n }", "private void onEcologyConnected() {\n for (Room room : rooms.values()) {\n room.onEcologyConnected();\n }\n }", "private void getInventoryNumber(ArrayList list){}", "public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void addAccessories() {\n\t\tSystem.out.println(\"Fitting accessories Luxory car\");\r\n\t\t\r\n\t}", "java.lang.String getRaceList();", "private BirthCaseEnrichment enrichmentEntityListAsBirthCaseEnrichment(List<EnrichmentEntity> entities) {\n\n BirthCaseEnrichment bce=new BirthCaseEnrichment();\n\n // If there's something to do ....\n if(entities.size()>0) {\n bce.setCouncil(entities.get(0).getCouncil());\n for(EnrichmentEntity enrichment:entities){\n\n boolean b = !(enrichment.getResponse()==null\n || enrichment.getResponse().equals(\"\")\n || enrichment.getResponse().equals(\"FALSE\"));\n\n OrganisationsToInformResponse r=new OrganisationsToInformResponse();\n r.setOrganisation(enrichment.getOrganisation());\n r.setResponse(b);\n// bce.addOrganisationsToInformItem(r);\n bce.addOrganisationsToInformResponseItem(r);\n\n }\n }\n\n return bce;\n }", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "java.util.List<hr.domain.ResumeDBOuterClass.Experience> \n getExperiencesList();", "private void toBeAddedEntities()\n\t{\n\t\tif( entitiesToAdd.isEmpty() )\n\t\t{\n\t\t\treturn ;\n\t\t}\n\n\t\tfinal List<Event<?>> events = MalletList.<Event<?>>newList() ;\n\n\t\tfinal int size = entitiesToAdd.size() ;\n\t\tfor( int i = 0; i < size; ++i )\n\t\t{\n\t\t\tfinal Entity entity = entitiesToAdd.get( i ) ;\n\t\t\thookEntity( eventSystem, events, entity ) ;\n\t\t\tentities.add( entity ) ;\n\t\t}\n\t\tentitiesToAdd.clear() ;\n\t\t\n\t\tif( size > capacity )\n\t\t{\n\t\t\t// If the size of entitiesToAdd exceeds our capacity then \n\t\t\t// we want to resize the array - it's easy for an \n\t\t\t// array to expand, it's much harder to shrink it!\n\t\t\tentitiesToAdd = MalletList.<Entity>newList( capacity ) ;\n\t\t}\n\t}", "private void updateEnemies()\n\t \n\t {\n\t for(int i = 0; i < EnemyList.size(); i++)\n\t {\n\t \t//get and update enemy for the enemy list\n\t Enemy eh = EnemyList.get(i);\n\t eh.Update();\n\t \n\t //checks for enemy and player crashes \n\t Rectangle playerRectangel = new Rectangle(pl.xCoord, pl.yCoord, pl.PlayerImage.getWidth(), pl.PlayerImage.getHeight());\n\t Rectangle enemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\t if(playerRectangel.intersects(enemyRectangel)){\n\t \n\t \t//set player health to zero\n\t \tpl.Health = 0;\n\t \n\t // Remove helicopter from the list.\n\t EnemyList.remove(i);\n\t \n\t //creates new explosion coordinates \n\t enExplosionX = eh.xCoord; \n\t enExplosionY = eh.yCoord; \n\t plExplosionX = pl.xCoord+120;\n\t plExplosionY = pl.yCoord;\n\t GameOn = false;\n\t \n\t }\n\t \n\t // Check health.\n\t if(eh.Health <= 0){\n\t \n\t // Increase the number of destroyed enemies and removes a helicopter froma list.\n\t DestroyedEnemies++;\n\t \n\t \n\t if(DestroyedEnemies == 10)\n\t {\n\t \t//WinsState = true; \n\t \t\n\t }\n\t EnemyList.remove(i);\n\t \n\t }\n\t \n\t // If the current enemy has left the scree it is removed from the list and the number of runAwayEnemies is increased.\n\t if(eh.HasLeftScreen())\n\t {\n\t \tEnemyList.remove(i);\n\t RunAwayEnemies++;\n\t }\n\t \n\t if(RunAwayEnemies > 5)\n\t {\n\t \tGameOn = false; \n\t \t\n\t }\n\t }\n\t \n\t }", "@Override\n\tpublic List<StockinExamVO> getInbounds() throws RemoteException {\n\t\tList<StockinExamVO> l=new ArrayList<StockinExamVO>();\n\t\tl.add(new StockinExamVO(\"1\",1,new CommodityLocation(1,1,1,1),City.Beijing));\n\t\treturn l;\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String address = enterAddress.getText();\n String issue = enterAddress.getText();\n String model = enterModel.getText();\n //date method\n Date date = new Date();\n //creating a quick CentralAC list\n CentralAC acEntry = new CentralAC(address, issue, date, model);\n //adding items to the Arraylist\n HVACGUI.newCentralAC.add(acEntry);\n //adding items to the default list model\n HVACGUI.openService.addElement(acEntry);\n //disposing the form\n CentralAC_GUI.this.dispose();\n\n\n }", "java.util.List<pb4client.AchievementInfo> \n getAchieveInfoList();", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void saveList() throws Exception {\n JournalEntries.saveList(JournalList,ReconcileCur.ReconcileNum);\n }", "@SuppressLint(\"RestrictedApi\")\n public void getEmergencyAssistance(){\n final String uID = objAccount.getCurrentUser().getUid();\n ArrayList<String> allMemberID = new ArrayList<>();\n\n ArrayList<objFamily> allFamily = tb_Family.getInstance(context).getAllFamilyByUid(uID);\n for(objFamily family : allFamily){\n for(String memberID : family.getMembersList()){\n if(!memberID.matches(uID)\n && !allMemberID.contains(memberID))\n allMemberID.add(memberID);\n }\n }\n\n //Add listening events for each member\n for(String id : allMemberID){\n Query mRef = mDatabase.getReference()\n .child(keyUtils.emergencyAssistanceList)\n .child(id)\n .limitToLast(1);\n\n mRef.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n if(dataSnapshot.getValue() != null){\n\n boolean isNewEmergency = false;\n\n fb_emergencyAssistance fireBase_EmergencyAssistance = dataSnapshot.getValue(fb_emergencyAssistance.class);\n\n if(fireBase_EmergencyAssistance != null){\n\n if(!fireBase_EmergencyAssistance.getListSeen().contains(uID))\n isNewEmergency = true;\n\n final String pathEmergency = dataSnapshot.getRef().getPath().toString();\n objEmergencyAssistance emergencyAssistance = new objEmergencyAssistance(pathEmergency, fireBase_EmergencyAssistance);\n\n boolean flag = false;\n //If not received, notice and write in SQLite\n if(!emergencyAssistance.getListReceived().contains(uID)){\n //Set received\n List<String> listReceived = emergencyAssistance.getListReceived();\n listReceived.add(uID);\n setReceivedEmergencyAssistance(pathEmergency,listReceived);\n tb_EmergencyAssistance.getInstance(context).addEmergencyAssistance(emergencyAssistance);\n\n flag = true;\n }\n\n //Notifications have news\n if(flag)\n mView.emergencyAssistance(tb_Account.getInstance(context).getAccountByID(id), emergencyAssistance, isNewEmergency);\n else\n mView.emergencyAssistance(null, null, isNewEmergency);\n\n }\n }\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "private List<EnrichmentEntity> enrichmentEntities (BirthCaseEnrichment birthCaseEnrichment) {\n ArrayList<EnrichmentEntity> entities = new ArrayList<>();\n\n// for(OrganisationsToInformResponse otir : birthCaseEnrichment.getOrganisationsToInform()) {\n for(OrganisationsToInformResponse otir : birthCaseEnrichment.getOrganisationsToInformResponse()) {\n entities.add(\n createEnrichmentEntity(birthCaseEnrichment.getCouncil(), otir.getOrganisation(), otir.isResponse() ) );\n }\n\n return entities;\n }", "@FXML\n\tprivate void nextCoachingEventHandler(ActionEvent event) {\n\t\t//Log container\n\t\tList<String> log = new ArrayList<String>();\n\t\tif (coachingExercises.size() <= 0) {\n\t\t\t// At the end of coaching period\n\t\t\tdisplayAnswers();\n\t\t\treturn;\n\t\t}\n\t\t// New random index\n\t\tint nextIndex = (coachingExercises.size() % 3 - 1);\n\t\tnextIndex = (nextIndex < 0) ? 0 : nextIndex;\n\t\t\n\t\tExercise coachingExercise = coachingExercises.remove(nextIndex);\n\t\t\n\t\tenglishWordLabel.setText(coachingExercise.getEnglish());\n\t\thungarianWordLabel.setText(coachingExercise.getHungarian());\t\n\t\t\n\t\t// Write log to the GUI\n\t\tlogList(log);\n\t}", "long getEncounterId();", "private void checkForDeaths() {\n Iterator<Entity> entityIter = this.entities.iterator();\n\n //geht alle teilnehmer durch\n while ( entityIter.hasNext() ) {\n Entity entity = entityIter.next();\n\n //und entfernt sie wenn sie tot sind aus der liste und der engine\n if ( this.combatMapper.get(entity).curHealth <= 0 ) {\n entityIter.remove();\n\n //alle actions der entity entfernen, können ja nichts machen wenn sie tot sind\n Iterator<IAction> actionIter = this.actions.iterator();\n\n while ( actionIter.hasNext() ) {\n if ( actionIter.next().getOwner().equals(entity) ) {\n actionIter.remove();\n }\n }\n\n this.combatExp += this.combatMapper.get(entity).level * 5; //TODO\n\n EventSystem.getInstance().commitEvent(new Event(EventSystem.EventType.KILL_EVENT, entity));\n\n this.combatSystem.getEngine().removeEntity(entity);\n }\n }\n }", "private void getEcoleList(){\r\n\t\tEcoleRequestFactory rf = GWT.create(EcoleRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tEcoleRequestContext rc = rf.ecoleRequest();\r\n\t\trc.listAllActive().fire(new Receiver<List<EcoleProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<EcoleProxy> response){\r\n\t\t\t\tgetView().setEcoleAddList(response);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initEventList(){\r\n\t\t/*\r\n\t\t * we save a valid event list in internal storage so we can load them in\r\n\t\t * our main activity. So we make sure there is either a valid one alreay in storage\r\n\t\t * or we get a fresh one from our server and save it in storage.\r\n\t\t */\r\n\t\t\r\n\t\t// first try to get an existing eventlist from storage\r\n\t\tJSONObject eventList = FileUtils.readEventListFromStorage(this);\r\n\t\t\r\n\t\tif(eventList != null) {\r\n\t\t\tif(eventListIsValid(eventList)){\r\n\t\t\t\tstartMuseek();\r\n\t\t\t} else {\r\n\t\t\t\tServerConnector.getEventListFromServer(mServerListener, mLocation);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tServerConnector.getEventListFromServer(mServerListener, mLocation);\r\n\t\t}\r\n\t\t\r\n\t}", "public static void putCraftableItemInArrayList() {\n\n craftableItem.addItemToCraftableList(campfire);\n craftableItem.addItemToCraftableList(raft);\n craftableItem.addItemToCraftableList(axe);\n craftableItem.addItemToCraftableList(spear);\n }", "private void exportDataAsList() {\n\t\t// TODO (BH): This is nearly a copy of the\n\t\t// printCollectedOverviewReport() method and should be cleaned up\n\t\tFileWriter wr = null;\n\t\ttry {\n\t\t\tfinal RapidClubAdminClient app = (RapidClubAdminClient) ApplicationManager.getApplication();\n\t\t\tfinal RapidBeansLocale locale = app.getCurrentLocale();\n\n\t\t\t// determine report output file\n\t\t\tFile overviewFile = null;\n\t\t\tif (app.getSettingsRapidClubAdmin().getReportfolder() != null) {\n\t\t\t\toverviewFile = new File(app.getSettingsRapidClubAdmin().getReportfolder(),\n\t\t\t\t\t\t\"SammeldruckAbrechnungszeitraum_\" + getBillingPeriod().getIdString() + \".txt\");\n\t\t\t} else {\n\t\t\t\toverviewFile = File.createTempFile(\n\t\t\t\t\t\t\"SammeldruckAbrechnungszeitraum_\" + getBillingPeriod().getIdString() + \"_\", \".txt\");\n\t\t\t}\n\n\t\t\tfinal Department[] departments = this.getSelectedDepartmentsWithTrainingsLists();\n\t\t\tfinal List<Department> depList = new ArrayList<Department>();\n\t\t\tfinal Collection<Trainer> trainers = new TreeSet<Trainer>();\n\t\t\tfor (Department dep : departments) {\n\t\t\t\tdepList.add(dep);\n\t\t\t\tfor (Trainer tr : dep.getTrainers()) {\n\t\t\t\t\tif (!trainers.contains(tr)) {\n\t\t\t\t\t\ttrainers.add(tr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twr = new FileWriter(overviewFile);\n\n\t\t\tfor (Trainer tr : trainers) {\n\t\t\t\tfinal List<Trainer> trs = new ArrayList<Trainer>();\n\t\t\t\ttrs.add(tr);\n\t\t\t\twr.write(Overview2.asString(trs, depList, locale));\n\t\t\t\twr.write(PlatformHelper.getLineFeed());\n\t\t\t\twr.write(PlatformHelper.getLineFeed());\n\t\t\t}\n\n\t\t\t// pop up the evidence report\n\t\t\tif (PlatformHelper.getOsfamily() == OperatingSystemFamily.windows) {\n\t\t\t\tRuntime.getRuntime().exec(\"cmd.exe /C \" + overviewFile.getAbsolutePath());\n\t\t\t} else {\n\t\t\t\tApplicationManager.getApplication()\n\t\t\t\t\t\t.messageInfo(\"Automatic Pop-Up not yet implemented for operating system\\n\\\"\"\n\t\t\t\t\t\t\t\t+ PlatformHelper.getOsName() + \"\\\".\\n\" + \"Please open file\\n\\\"\"\n\t\t\t\t\t\t\t\t+ overviewFile.getAbsolutePath() + \"\\\"\\nyourself.\");\n\t\t\t}\n\n\t\t\tif (this.getBillingPeriod().getDateExportFirst() == null) {\n\t\t\t\tthis.getBillingPeriod().setDateExportFirst(Date.from(Instant.now()));\n\t\t\t\tthis.validateAndUpdateButtons(this.getPropEditor(\"dateExportFirst\"));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tthrow new RapidBeansRuntimeException(e);\n\t\t} finally {\n\t\t\tif (wr != null) {\n\t\t\t\ttry {\n\t\t\t\t\twr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RapidBeansRuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void preprocessObsList(List<Obs> obsList) {\n for(Obs obs : obsList) {\r\n if (dictionary.isMapped(obs) != null) {\r\n dictionary.mapToNMRS(obs);\r\n System.out.println(\"CMap was found\");\r\n obs.setAllowed(true);\r\n }else{\r\n obs.setAllowed(false);\r\n dictionary.log(obs);\r\n }\r\n if(isExisting(obs)){\r\n obs.setExist(true);\r\n }else{\r\n obs.setExist(false);\r\n }\r\n }\r\n System.out.println(\"Preprocess Obs...\");\r\n //return mappedObs;\r\n }", "private void fillStatusList() {\n StatusList = new ArrayList<>();\n StatusList.add(new StatusItem(\"Single\"));\n StatusList.add(new StatusItem(\"Married\"));\n }", "private void checkPlayerHealth(){\n if(currentPlayer.getHealth().equals(\"0\")){\n results = new ArrayList<String>();\n results.add(\"You are dead.\");\n ArrayList<Artefacts> inv = currentPlayer.getArifacsts();\n System.out.println(inv.size());\n for(int i = 0; i < inv.size(); i++){\n currentLocation.addArtefactToCurrentLocation(inv.get(i));\n }\n System.out.println(inv.size());\n for(int i = inv.size() - 1; i >= 0; i--){\n inv.remove(i);\n }\n currentPlayer.resetHealth();\n currentPlayer.setCurrentLocation(locations.get(0));\n }\n }", "private void loadLists() {\n }", "public List getInwDepartCompetences(InwDepartCompetence inwDepartCompetence);", "@Override\n\tpublic void visit(EquipmentDefense e) {\n\t\t\n\t}", "public void initCup() {\n \tremainingPieces.clear();\n originalPieces.clear();\n\n BufferedReader inFile = null;\n try {\n //File used to read in the different creatures.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupCreatures.txt\"));\n String line = null;\n while ((line = inFile.readLine()) != null) {\n Creature c = new Creature(line);\n remainingPieces.add(c);\n originalPieces.add(c);\n }\n inFile.close();\n //File used to read in the different special incomes.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupIncome.txt\"));\n while ((line = inFile.readLine()) != null) {\n SpecialIncome s = new SpecialIncome(line);\n remainingPieces.add(s);\n originalPieces.add(s);\n }\n inFile.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found \" + inFile);\n } catch (EOFException e) {\n System.out.println(\"EOF encountered\");\n } catch (IOException e) {\n System.out.println(\"can't read from file\");\n }\n //Adding the Random Events to the cup.\n BigJuju bj = new BigJuju();\n DarkPlague dp = new DarkPlague();\n Defection df = new Defection();\n GoodHarvest gh = new GoodHarvest();\n MotherLode ml = new MotherLode();\n Teeniepox tp = new Teeniepox();\n TerrainDisaster td = new TerrainDisaster();\n Vandals v = new Vandals();\n WeatherControl wc = new WeatherControl();\n WillingWorkers ww = new WillingWorkers();\n remainingPieces.add(bj);\n originalPieces.add(bj);\n remainingPieces.add(dp);\n originalPieces.add(dp);\n remainingPieces.add(df);\n originalPieces.add(df);\n remainingPieces.add(gh);\n originalPieces.add(gh);\n remainingPieces.add(ml);\n originalPieces.add(ml);\n remainingPieces.add(tp);\n originalPieces.add(tp);\n remainingPieces.add(td);\n originalPieces.add(td);\n remainingPieces.add(v);\n originalPieces.add(v);\n remainingPieces.add(wc);\n originalPieces.add(wc);\n remainingPieces.add(ww);\n originalPieces.add(ww);\n\n //Adding the Magic Events to the cup.\n Balloon b = new Balloon();\n Bow bo = new Bow();\n DispelMagicScroll dms = new DispelMagicScroll();\n DustOfDefense dod = new DustOfDefense();\n Elixir el = new Elixir();\n Fan f = new Fan();\n Firewall fw = new Firewall();\n Golem g = new Golem();\n LuckyCharm lc = new LuckyCharm();\n Sword s = new Sword();\n Talisman t = new Talisman();\n remainingPieces.add(b);\n originalPieces.add(b);\n remainingPieces.add(bo);\n originalPieces.add(bo);\n remainingPieces.add(dms);\n originalPieces.add(dms);\n remainingPieces.add(dod);\n originalPieces.add(dod);\n remainingPieces.add(el);\n originalPieces.add(el);\n remainingPieces.add(f);\n originalPieces.add(f);\n remainingPieces.add(fw);\n originalPieces.add(fw);\n remainingPieces.add(g);\n originalPieces.add(g);\n remainingPieces.add(lc);\n originalPieces.add(lc);\n remainingPieces.add(s);\n originalPieces.add(s);\n remainingPieces.add(t);\n originalPieces.add(t);\n }", "void addDemoActors(List<Actor> actorList)\n {\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTnImPW4s91ZjlXIsxV2nrHDRc6Ow-EuzDn1w&usqp=CAU\", \"Jitendra Kumar\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSb3Me0agAUxj_vqbJuKq7Uadd4tlDXOBLs_A&usqp=CAU\", \"Navin Kasturia\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ4lZGhdpg6KelA9EKsXhTJ25WTYxG4i70Vew&usqp=CAU\", \"Badri Chavan\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTNLnBFZ0JIGx7MNjtnjlOhvBgYXsvXi0iv9g&usqp=CAU\", \"Pankaj Tripathi\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ6tpXiB_461OEMpZgurzjOAhAU9gMXL9fqLQ&usqp=CAU\", \"Nawazuddin Siddiqui\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQeTKD3bdHxgiFYLV1L--zF8IFE65m9u2UHLg&usqp=CAU\", \"Mithila Palkar\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSHAaZKDQs3Yvcwf-6LONwIGyFWI6eviDbbHg&usqp=CAU\", \"Barkha singh\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSd0dg__IbxMiMurrmUiPba_EWgZn7IWVYepw&usqp=CAU\", \"Ahsas Channa\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS7F-vmS5aa6ZuQoqr77dN49K9VJl1E-BwNXg&usqp=CAU\", \"Manoj Bajpayee\")) ;\n actorList.add(new Actor(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSebkgK0lyKUaqDQ-RIqIB0qXJWJsffl5xaeg&usqp=CAU\", \"Pratik Gandhi\")) ;\n }", "private void initList() {\n\n }", "private void addCauses() {\n userCauses = new ArrayList<>();\n // set all the skills that the user inputs to new Skills\n final String cause = actvAddMoreCauses.getText().toString().trim();\n // store the database reference to \"Skill\" as a shortcut\n final DatabaseReference causeDbRef = FirebaseDatabase.getInstance().getReference(DBKeys.KEY_CAUSE);\n // if the user does not add the last skill they fill in to the recycler view, then we want to grab it\n // and store it as a new skill\n if (!cause.isEmpty()) {\n final Cause userLastInputCause = new Cause(cause);\n userCauses.add(userLastInputCause);\n\n }\n userCauses.addAll(causes);\n // index through the arraylist to add the skills to the database and link them with the current user\n for (int i = 0; i < userCauses.size(); i++) {\n // we need to bind our index to a final integer in order to link it to the database\n final int index = i;\n // we now go through all the skills already in the database to see if the skill that the user input is already there or not\n causeDbRef.orderByChild(DBKeys.KEY_CAUSE_NAME).equalTo(userCauses.get(index).getCause())\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n // if the skill is already in the database then we continue through the if statement\n if (dataSnapshot.exists()) {\n // skill already exists in database\n // create hashmap for UserID\n final HashMap<String, String> userIdDataMap = new HashMap<String, String>();\n pushToUsersPerCause(userIdDataMap, index);\n // get the skill object ID from the database\n // we now set another listener for the exact skill in the database to find its specific id\n pushToCausesPerUser(index);\n // if the skill that the user input is not already in the database then we run through the else case\n } else {\n firebaseData.child(DBKeys.KEY_CAUSE).push().setValue(userCauses.get(index));\n // create a hashmap for the UserID\n final HashMap<String, String> userIdDataMap = new HashMap<String, String>();\n pushToUsersPerCause(userIdDataMap, index);\n // get the skill object ID from the database\n // we now set another listener for the exact skill in the database to find its specific id\n\n pushToCausesPerUser(index);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n // log the error\n Log.e(\"Adding Causes\", databaseError.toString());\n }\n });\n }\n }", "public void givePlaceInList() {\r\n\t\tmyPlaceInList = allyTracker.getPlaceInList();\r\n\t}", "public void updateAnimalList(){\r\n // if (animals != null && animals.size() > 0)\r\n // {\r\n // \r\n // }\r\n // else\r\n // {\r\n animals.clear();\r\n \r\n for (fit5042.assign.repository.entity.Animal animal : animalManagedBean.getAllAnimals())//for each animal entry in the Entity Class Animal, get all animals\r\n {\r\n animals.add(animal); //add Animal data to the ArrayList<Animal> animals\r\n }\r\n \r\n setAnimal(animals); //set the global ArrayList attribute with the local ArrayList attribute\r\n // }\r\n }", "public List<LookUpDetailJson> getPayCycleList() {\r\n\t\tList<LookUpDetailJson> lookUpDetailJsonList = null;\r\n\t\ttry {\r\n\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t\tInteger currentMonth = cal.get(Calendar.MONTH);\r\n\t\t\tList<Integer> monthsRange = new ArrayList<Integer>();\r\n\t\t\tfor (int i = currentMonth, j = 0; j < 3; j++) {\r\n\t\t\t\tmonthsRange.add(i--);\r\n\t\t\t\tif (i < 0) {\r\n\t\t\t\t\ti = 11;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmonthsRange.add(currentMonth + 1);\r\n\r\n\t\t\tList<LookUpDetails> lookUpDetailList = lookUpRepository.getPayCycleList(monthsRange);\r\n\t\t\tif (lookUpDetailList != null && lookUpDetailList.size() > 0) {\r\n\t\t\t\tlookUpDetailJsonList = new ArrayList<LookUpDetailJson>();\r\n\t\t\t\tfor (LookUpDetails lookUpDetails : lookUpDetailList) {\r\n\t\t\t\t\tlookUpDetailJsonList.add(TransformDomainToJson.getLookUpDetailJson(lookUpDetails));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tLOG.error(\"Error at getPayCycleList() in LookUpService:\" + e.getMessage());\r\n\t\t}\r\n\t\treturn lookUpDetailJsonList;\r\n\t}", "ArrayList<HabitEvent> getHabitEvents(Habit forHabit);", "public List<Enemy> getEnemies();", "@Override\r\n\tpublic void OnRoomListNotify(List<stRoomInfo> roomlist) {\n\t\tString roomsID[] = new String[roomlist.size()];\r\n\t\tint roomsType[] = new int[roomlist.size()];\r\n\t\tint counts[] = new int[roomlist.size()];\r\n\t\tint j = 0;\r\n\t\tfor (Iterator<stRoomInfo> i = roomlist.iterator(); i.hasNext();)\r\n\t\t{ \r\n\t\t\tstRoomInfo userinfoRef = i.next(); \r\n\t\t\troomsID[j] = String.valueOf(userinfoRef.getRoomid());\r\n\t\t\troomsType[j] = userinfoRef.getRoomtype().ordinal();\r\n\t\t\tcounts[j] = userinfoRef.getNum();\r\n\t\t\tj++;\r\n\t\t} \r\n\t\t\r\n\t\tRoomListResult(roomsID,roomsType,counts);\r\n\t\t\t\r\n\t}", "public ArrayList<Literal> lookAround(String agName){\r\n\t\tperceptModel = MapEnv.model;\r\n\t\tArrayList<Literal> lookArr = new ArrayList<Literal>();\r\n\t\tint \t id \t \t = perceptModel.getAgentID(agName);\r\n\t\tLocation lplayer \t = perceptModel.getAgPos(id); \r\n\t\tif(agName != null){\r\n\t\t\t/** Searching direct neighbours to the Agent's location*/\r\n\t\t\tfor(int y = -1; y <= 1; y++){\r\n\t\t\t\tfor(int x = -1; x <= 1; x++){\r\n\t\t\t\t\tif(!(x == 0 && y == 0)){\r\n\t\t\t\t\t\tLocation l = new Location(lplayer.x + x, lplayer.y + y);\r\n//\t\t\t\t\t\tSystem.out.println(\"Player 1 Loc: (\" + lplayer.x + \",\" + lplayer.y + \"):: See Loc (\" + l.x + \",\" + l.y + \")\");\r\n\t\t\t\t\t\tif(perceptModel.getAgAtPos(l) != -1){\r\n\t\t\t\t\t\t\tint agt = perceptModel.getAgAtPos(l);\r\n\t\t\t\t\t\t\tString plyr = perceptModel.getAgName(agt);\r\n\t\t\t\t\t\t\t/** Detects and adds nearby agents flagholder status perception */\r\n\t\t\t\t\t\t\tif(perceptModel.flag.agentCarrying == perceptModel.getAgentID(plyr)){\r\n\t\t\t\t\t\t\t\tLiteral nfh = Literal.parseLiteral(\"flagholder(\" + plyr + \")\");\r\n\t\t\t\t\t\t\t\tlookArr.add(nfh);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tLiteral np = Literal.parseLiteral(\"close(\" + plyr + \")\"); \r\n\t\t\t\t\t\t\t\tlookArr.add(np);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/** Searching an single space further in the cardinal directions*/\r\n\t\t\tfor(int y = -2; y <= 2; y+=4){\r\n\t\t\t\tfor(int x = -2; x <= 2; x+=4){\r\n\t\t\t\t\tLocation l = new Location(lplayer.x + x, lplayer.y + y);\r\n\t//\t\t\t\tSystem.out.println(\"Player Loc: (\" + lplayer.x + \",\" + lplayer.y + \"):: See Loc (\" + l.x + \",\" + l.y + \")\");\r\n\t\t\t\t\tif(perceptModel.getAgAtPos(l) != -1 ){\r\n\t\t\t\t\t\tint \tagt = perceptModel.getAgAtPos(l);\r\n\t\t\t\t\t\tString plyr = perceptModel.getAgName(agt);\r\n\t\t\t\t\t\t/** Detects and adds nearby agents flagholder status perception */\r\n\t\t\t\t\t\tif(perceptModel.flag.agentCarrying == perceptModel.getAgentID(plyr)){\r\n\t\t\t\t\t\t\tLiteral nfh = Literal.parseLiteral(\"flagholder(\" + plyr + \")\");\r\n\t\t\t\t\t\t\tlookArr.add(nfh);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tLiteral np = Literal.parseLiteral(\"close\" + plyr + \")\"); \r\n\t\t\t\t\t\t\tlookArr.add(np);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/** Returns completed ArrayList */ \r\n\t\t\treturn lookArr;\r\n\t\t} else return null;\r\n\t}", "public void addToList() {\n addToCurrentListButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n //getting the variables from the user input\n String address = enterAddress.getText();\n String issue = enterAddress.getText();\n String model = enterModel.getText();\n //date method\n Date date = new Date();\n //creating a quick CentralAC list\n CentralAC acEntry = new CentralAC(address, issue, date, model);\n //adding items to the Arraylist\n HVACGUI.newCentralAC.add(acEntry);\n //adding items to the default list model\n HVACGUI.openService.addElement(acEntry);\n //disposing the form\n CentralAC_GUI.this.dispose();\n\n\n }\n });\n }", "public static void b()\n/* */ {\n/* 92 */ c = new ArrayList();\n/* 93 */ for (aur localaur : b) {\n/* 94 */ localaur.c = 0;\n/* 95 */ c.add(localaur);\n/* */ }\n/* 97 */ d = null;\n/* */ }", "public void enterScope(){\n\t\tscope.add(0, new ArrayList<SymbolEntry>());\n\t\t++scopeLevel;\n\t}", "@Override\r\n\tpublic void enter(GameContainer container, StateBasedGame game) throws SlickException {\r\n\t\tprepareRuleList();\r\n\t}", "ArrayList<HabitEvent> getHabitEvents();", "private static ArrayList<Quest> createQuests() {\n ArrayList<Quest> quests = new ArrayList();\n //Create Cooks assistant and imp catcher;\n\n //Imp Catcher\n ArrayList<String> itemReqs = new ArrayList();\n itemReqs.add(\"Yellow Bead\");\n itemReqs.add(\"Red Bead\");\n itemReqs.add(\"Black Bead\");\n itemReqs.add(\"While Bead\");\n QuestStep qs1 = new QuestStep(1, \"Hand in beads to wizard\", itemReqs,12337);\n ArrayList<QuestStep> questSteps = new ArrayList();\n questSteps.add(qs1);\n\n int[] skillReqs = new int[Constant.NUMBER_OF_Skills];\n for (int i = 0; i < Constant.NUMBER_OF_Skills; i++) {\n skillReqs[i] = 0;\n }\n ArrayList<String> questReqs = new ArrayList();\n Quest q1 = new Quest(\"Imp Catcher\", questSteps,12337, skillReqs, 0, questReqs);\n quests.add(q1);\n\n //Cooks assistant\n itemReqs = new ArrayList();\n itemReqs.add(\"Pot of Flour\");\n itemReqs.add(\"Egg\");\n itemReqs.add(\"Bucket of Milk\");\n qs1 = new QuestStep(1, \"Hand in ingredients to chef\", itemReqs,12850);\n questSteps = new ArrayList();\n questSteps.add(qs1);\n\n\n Quest q2 = new Quest(\"Cooks Assistant\", questSteps,12850, skillReqs, 0, questReqs);\n quests.add(q2);\n return quests;\n }", "private void poetries() {\n\n\t}", "private DListUI<IC_OperationsFromSelectedImpactForList> createConsequencesField() {\n\t\tfinal IC_OperationsFromSelectedImpactForList ic = new IC_OperationsFromSelectedImpactForList(_updateState, \r\n\t\t\t\tOperationAnalysisCategory.CONSEQUENCE);\r\n\t\t_selectImpactListeners.add(ic);\r\n\t\t\r\n\t\tAbstractModelController mc = new AbstractModelController() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Object getValue() {\r\n\t\t\t\treturn ic.getListOfValues();\r\n\t\t\t}\r\n\r\n\t\t\tpublic void notifieValueChanged(UIField field, Object value) {\r\n\t\t\t\t// do nothing\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\treturn\t_swtuiPlatforms.createDListUI(_page, \"#listOfConsequences\",\r\n\t\t\t\t\"Consequences\", EPosLabel.top, mc, ic, false, false, false, false);\r\n\t}", "public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean smt) {\n/* 122 */ int standID = getStandID(stack);\n/* 123 */ if (standID == 0) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 128 */ int standAct = getStandACT(stack);\n/* 129 */ int standExp = getStandEXP(stack);\n/* */ \n/* 131 */ String standName = getStandNAME(stack);\n/* 132 */ EntityOneStand standEnt = ItemStandArrow.getStand(standID, player.worldObj);\n/* 133 */ String standEntName = standEnt.getCommandSenderName();\n/* 134 */ if (standName.equals(\"\")) {\n/* */ \n/* 136 */ standName = getEntityStandName(standEnt);\n/* */ }\n/* */ else {\n/* */ \n/* 140 */ stack.setStackDisplayName(standEntName);\n/* */ } \n/* 142 */ String standActPre = StatCollector.translateToLocal(\"stands.jojobadv.Act.txt\");\n/* 143 */ String standExpPre = StatCollector.translateToLocal(\"stands.jojobadv.Exp.txt\");\n/* */ \n/* 145 */ list.add(standName);\n/* 146 */ list.add(standActPre + \" \" + standAct + \"!\");\n/* 147 */ list.add(standExpPre + \" \" + standExp);\n/* */ }", "@Override\r\n\tpublic List<Experience> listExperience() {\n\t\treturn null;\r\n\t}", "@Before\r\n\tpublic void setList() {\r\n\t\tthis.list = new DoubleList();\r\n\t\tfor (int i = 0; i < 15; i++) {\r\n\t\t\tlist.add(new Munitions(i, i + 1, \"iron\"));\r\n\t\t}\r\n\t}", "public List<DeclarationNaissance> getAllActe();", "public void buildEssentialPrimeImplicant(){ \n //int count = 0; \n // For loop ticks all the essential prime Implicants\n for(Entry<Integer, Boolean> mint: mintermList.entrySet()){\n //System.out.printf(\"\\n %d minterm inside buildEssential.\", mint.getKey());\n int count = 0; \n for(Implicant p:primeImp){\n if(p.contains(mint.getKey())){\n count++;\n }\n }\n \n if(count == 1){ // Prime Implicant occurs for only one minterm\n mint.setValue(true);\n for(Implicant x:primeImp){\n if(x.contains(mint.getKey())){\n if(!finalPrimeImp.contains(x))\n finalPrimeImp.add(x);\n \n //System.out.printf(\"\\n %s added to final Prime Implicant List.\",x.toString());\n }\n }\n \n }\n \n }\n \n /**\n * Remove Essential Prime Implicant from primeImpl\n */\n for (Implicant i:finalPrimeImp){\n primeImp.remove(i);\n for(Entry<Integer, Boolean> mint: mintermList.entrySet()){\n if(i.contains(mint.getKey()))\n mint.setValue(true); \n }\n primeImp.remove(i);\n } \n }", "void examine() {\n\t\t\tif (!isItEmpty()){\n\t\t\t\tprintItemDescriptions();\n\t\t\t\tSystem.out.println(\"\\nWhat's in \" + this.locationName + \": \");\n\t\t\t\texamineItems(); //calls the examine items method.\n\t\t\t\texamineContainers(); //calls the examine containers method.\n\t\t\t\tSystem.out.println(\"\");}\n\t\t}" ]
[ "0.6342934", "0.5895433", "0.5410037", "0.5398187", "0.5392557", "0.52659875", "0.5256961", "0.5236045", "0.5214831", "0.51769507", "0.5125427", "0.5069855", "0.50614095", "0.50593114", "0.5055731", "0.5036822", "0.50127536", "0.50014704", "0.49550942", "0.49434677", "0.4917298", "0.48982102", "0.48905468", "0.485562", "0.48532456", "0.4834394", "0.4831495", "0.48187", "0.48044413", "0.48019153", "0.4800851", "0.47943813", "0.47941107", "0.4792964", "0.47848943", "0.47770217", "0.47703683", "0.47679892", "0.47654456", "0.4761221", "0.47515088", "0.47465092", "0.47412327", "0.47324184", "0.47193223", "0.4713489", "0.47113115", "0.46993622", "0.46969134", "0.4696374", "0.46958607", "0.46910843", "0.46879247", "0.46750486", "0.46724418", "0.46688607", "0.4668047", "0.4667139", "0.46645805", "0.46632835", "0.46614924", "0.46531975", "0.46501288", "0.46416992", "0.46408188", "0.46375614", "0.46311715", "0.46308637", "0.46269053", "0.46264353", "0.46246308", "0.46238804", "0.46172252", "0.46150607", "0.46145752", "0.46140137", "0.46123913", "0.460661", "0.46036083", "0.4600238", "0.4594656", "0.45921993", "0.45889935", "0.45871305", "0.45868888", "0.45833635", "0.45826438", "0.45823097", "0.45808038", "0.4577685", "0.45772934", "0.45772383", "0.45763406", "0.4576218", "0.45741406", "0.45723265", "0.45695424", "0.45694262", "0.45659736", "0.45629233", "0.4561308" ]
0.0
-1
Function that determines which item is dropped when the enemy is killed and returns that item
private static String itemDrop(int number){ String itemDropped; switch(number){ case 1: itemDropped = "Short Sword"; break; case 2: itemDropped = "Leather Helmet"; break; case 3: itemDropped = "Leather Chest Plate"; break; case 4: itemDropped = "Scroll of Fireball"; break; default: itemDropped = ""; } return itemDropped; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t/**\r\n\t * Each enemy has a unique drop\r\n\t */\r\n\tpublic String enemyDrop() {\n\t\treturn null;\r\n\t}", "public org.bukkit.inventory.ItemStack getBossDrop(String killer) {\n\t\tint number = random.nextInt(100);\r\n\t\tfor(Entry<SpecialItem, Integer> item: drops.entrySet()) {\r\n\t\t\tLog.info(item.getKey().getChance(), item.getValue(),\"ITEM\",number);\r\n\t\t\tif(item.getValue() > number) {\r\n\t\t\t\treturn item.getKey().getItem(killer,name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn(new org.bukkit.inventory.ItemStack(Material.BONE));\r\n\t}", "public Item getItemDropped(int meta, Random p_149650_2_, int p_149650_3_)\n\t {\n\t \treturn MGHouseItems.item_boat_door;\n\t }", "private void dropItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryDel(itemFound);\n }\n }", "@Override\n public Item getItemDropped(IBlockState state, Random rand, int fortune) {\n return this == BlockHandler.rubyore ? ItemHandler.ruby : (this == BlockHandler.sapphireore ? ItemHandler.sapphire : (this == BlockHandler.topazore ? ItemHandler.topaz : (this == BlockHandler.peridotore ? ItemHandler.peridot : (this == BlockHandler.amethystore ? ItemHandler.amethyst : (this == BlockHandler.berylore ? ItemHandler.beryl : (this == BlockHandler.citrineore ? ItemHandler.citrine : Item.getItemFromBlock(this)))))));\n }", "void dropItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n// int indexItem = -1;\n String nameOfItem = \"\";\n String dropFromInventory = \"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 dropFromInventory = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\")) {\n itemLocation.addItem(currentRoom, new PickableItem(nameOfItem, inventory.getItemWeight(nameOfItem), inventory.getUseable(nameOfItem)));\n inventory.removeItemInventory(nameOfItem);\n System.out.println(\"You have dropped: \" + nameOfItem);\n\n } else {\n System.out.println(\"Can't drop item that isn't in inventory \" + command.getSecondWord());\n }\n }", "public Item getItemDropped(IBlockState state, Random rand, int fortune)\n {\n \treturn this == InitBlocksEA.arcanite_ore ? InitItemsEA.arcanite : (this == InitBlocksEA.draconium_ore ? InitItemsEA.draconium_dust : (this == InitBlocksEA.velious_ore ? InitItemsEA.velious : (this == InitBlocksEA.katcheen_ore ? InitItemsEA.katcheen : (this == InitBlocksEA.necrocite_ore ? InitItemsEA.necrocite : (this == InitBlocksEA.soularite_ore ? InitItemsEA.soularite : Item.getItemFromBlock(this))))));\n \t\n //return this == EbonArtsBlocks.arcanite_ore ? EbonArtsItems.arcanite_shard : (this == Blocks.diamond_ore ? Items.diamond : (this == Blocks.lapis_ore ? Items.dye : (this == Blocks.emerald_ore ? Items.emerald : (this == Blocks.quartz_ore ? Items.quartz : Item.getItemFromBlock(this)))));\n }", "protected Item getDropItem() {\r\n\t\treturn SorceryItems.goldfeather;\r\n\t}", "public void doItemDrop(final L2NpcTemplate npcTemplate, final L2Character lastAttacker)\n\t{\n\t\tL2PcInstance player = null;\n\t\t\n\t\tif (lastAttacker instanceof L2PcInstance)\n\t\t{\n\t\t\tplayer = (L2PcInstance) lastAttacker;\n\t\t}\n\t\telse if (lastAttacker instanceof L2Summon)\n\t\t{\n\t\t\tplayer = ((L2Summon) lastAttacker).getOwner();\n\t\t}\n\t\t\n\t\t// Don't drop anything if the last attacker or ownere isn't L2PcInstance\n\t\tif (player == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (EngineModsManager.onNpcDrop(this, lastAttacker))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfinal int levelModifier = calculateLevelModifierForDrop(player); // level modifier in %'s (will be subtracted from drop chance)\n\t\t\n\t\t// Check the drop of a cursed weapon\n\t\tif (levelModifier == 0 && player.getLevel() > 20)\n\t\t{\n\t\t\tCursedWeaponsManager.getInstance().checkDrop(this, player);\n\t\t}\n\t\t\n\t\t// now throw all categorized drops and handle spoil.\n\t\tfor (final L2DropCategory cat : npcTemplate.getDropData())\n\t\t{\n\t\t\tRewardItem item = null;\n\t\t\tif (cat.isSweep())\n\t\t\t{\n\t\t\t\t// according to sh1ny, seeded mobs CAN be spoiled and swept.\n\t\t\t\tif (isSpoil()/* && !isSeeded() */)\n\t\t\t\t{\n\t\t\t\t\tList<RewardItem> sweepList = new ArrayList<>();\n\t\t\t\t\t\n\t\t\t\t\tfor (final L2DropData drop : cat.getAllDrops())\n\t\t\t\t\t{\n\t\t\t\t\t\titem = calculateRewardItem(player, drop, levelModifier, true);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (item == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Config.DEBUG)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tLOGGER.debug(\"Item id to spoil: \" + item.getItemId() + \" amount: \" + item.getCount());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tsweepList.add(item);\n\t\t\t\t\t\t\n\t\t\t\t\t\titem = null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Set the table sweepItems of this L2Attackable\n\t\t\t\t\tif (!sweepList.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tsweepItems = sweepList.toArray(new RewardItem[sweepList.size()]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsweepList = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isSeeded())\n\t\t\t\t{\n\t\t\t\t\tL2DropData drop = cat.dropSeedAllowedDropsOnly();\n\t\t\t\t\t\n\t\t\t\t\tif (drop == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem = calculateRewardItem(player, drop, levelModifier, false);\n\t\t\t\t\tdrop = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\titem = calculateCategorizedRewardItem(player, cat, levelModifier);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (item != null)\n\t\t\t\t{\n\t\t\t\t\tif (Config.DEBUG)\n\t\t\t\t\t{\n\t\t\t\t\t\tLOGGER.debug(\"Item id to drop: \" + item.getItemId() + \" amount: \" + item.getCount());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check if the autoLoot mode is active\n\t\t\t\t\tif (Config.AUTO_LOOT)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (item_templ == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tLOGGER.info(\"ERROR: Item id to autoloot \" + item.getItemId() + \" has not template into items/armor/weapon tables.. It cannot be dropped..\");\n\t\t\t\t\t\t\t// DropItem(player, item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ) || !Config.AUTO_LOOT_BOSS && this instanceof L2RaidBossInstance || !Config.AUTO_LOOT_BOSS && this instanceof L2GrandBossInstance)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tplayer.doAutoLoot(this, item); // Give this or these Item(s) to the L2PcInstance that has killed the L2Attackable\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item); // drop the item on the ground\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Broadcast message if RaidBoss was defeated\n\t\t\t\t\tif (this instanceof L2RaidBossInstance || this instanceof L2GrandBossInstance)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystemMessage sm;\n\t\t\t\t\t\tsm = new SystemMessage(SystemMessageId.S1_DIED_DROPPED_S3_S2);\n\t\t\t\t\t\tsm.addString(getName());\n\t\t\t\t\t\tsm.addItemName(item.getItemId());\n\t\t\t\t\t\tsm.addNumber(item.getCount());\n\t\t\t\t\t\tbroadcastPacket(sm);\n\t\t\t\t\t\tsm = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\titem = null;\n\t\t}\n\t\t\n\t\t// Apply Special Item drop with rnd qty for champions\n\t\tif (Config.L2JMOD_CHAMPION_ENABLE && isChampion() && player.getLevel() <= getLevel() + 3 && Config.L2JMOD_CHAMPION_REWARD > 0 && Rnd.get(100) < Config.L2JMOD_CHAMPION_REWARD)\n\t\t{\n\t\t\tint champqty = Rnd.get(Config.L2JMOD_CHAMPION_REWARD_QTY);\n\t\t\tchampqty++; // quantity should actually vary between 1 and whatever admin specified as max, inclusive.\n\t\t\t\n\t\t\tRewardItem item = new RewardItem(Config.L2JMOD_CHAMPION_REWARD_ID, champqty);\n\t\t\t\n\t\t\t// Give this or these Item(s) to the L2PcInstance that has killed the L2Attackable\n\t\t\tif (Config.AUTO_LOOT)\n\t\t\t{\n\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\n\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t{\n\t\t\t\t\tDropItem(player, item);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tplayer.addItem(\"ChampionLoot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tDropItem(player, item);\n\t\t\t}\n\t\t\t\n\t\t\titem = null;\n\t\t}\n\t\t\n\t\t// Instant Item Drop :>\n\t\tfinal double rateHp = getStat().calcStat(Stats.MAX_HP, 1, this, null);\n\t\t\n\t\tif (rateHp < 2 && String.valueOf(npcTemplate.type).contentEquals(\"L2Monster\")) // only L2Monster with <= 1x HP can drop herbs\n\t\t{\n\t\t\tboolean hp = false;\n\t\t\tboolean mp = false;\n\t\t\tboolean spec = false;\n\t\t\t\n\t\t\t// ptk - patk type enhance\n\t\t\tint random = Rnd.get(1000); // note *10\n\t\t\t\n\t\t\tif (random < Config.RATE_DROP_SPECIAL_HERBS && !spec) // && !_spec useless yet\n\t\t\t{\n\t\t\t\tRewardItem item = new RewardItem(8612, 1); // Herb of Warrior\n\t\t\t\t\n\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t{\n\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\n\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDropItem(player, item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\titem = null;\n\t\t\t\tspec = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < 3; i++)\n\t\t\t\t{\n\t\t\t\t\trandom = Rnd.get(100);\n\t\t\t\t\t\n\t\t\t\t\tif (random < Config.RATE_DROP_COMMON_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tRewardItem item = null;\n\t\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titem = new RewardItem(8606, 1); // Herb of Power\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titem = new RewardItem(8608, 1); // Herb of Atk. Spd.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i == 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titem = new RewardItem(8610, 1); // Herb of Critical Attack\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (item == null)\n\t\t\t\t\t\t{\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\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// mtk - matk type enhance\n\t\t\trandom = Rnd.get(1000); // note *10\n\t\t\t\n\t\t\tif (random < Config.RATE_DROP_SPECIAL_HERBS && !spec)\n\t\t\t{\n\t\t\t\tRewardItem item = new RewardItem(8613, 1); // Herb of Mystic\n\t\t\t\t\n\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t{\n\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\n\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDropItem(player, item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\titem = null;\n\t\t\t\tspec = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < 2; i++)\n\t\t\t\t{\n\t\t\t\t\trandom = Rnd.get(100);\n\t\t\t\t\t\n\t\t\t\t\tif (random < Config.RATE_DROP_COMMON_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tRewardItem item = null;\n\t\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titem = new RewardItem(8607, 1); // Herb of Magic\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titem = new RewardItem(8609, 1); // Herb of Casting Speed\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (item == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// hp+mp type\n\t\t\trandom = Rnd.get(1000); // note *10\n\t\t\t\n\t\t\tif (random < Config.RATE_DROP_SPECIAL_HERBS && !spec)\n\t\t\t{\n\t\t\t\tRewardItem item = new RewardItem(8614, 1); // Herb of Recovery\n\t\t\t\t\n\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t{\n\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\n\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDropItem(player, item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\titem = null;\n\t\t\t\tmp = true;\n\t\t\t\thp = true;\n\t\t\t\tspec = true;\n\t\t\t}\n\t\t\t\n\t\t\t// hp - restore hp type\n\t\t\tif (!hp)\n\t\t\t{\n\t\t\t\trandom = Rnd.get(100);\n\t\t\t\tif (random < Config.RATE_DROP_MP_HP_HERBS)\n\t\t\t\t{\n\t\t\t\t\tRewardItem item = new RewardItem(8600, 1); // Herb of Life\n\t\t\t\t\t\n\t\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\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\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem = null;\n\t\t\t\t\thp = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!hp)\n\t\t\t{\n\t\t\t\trandom = Rnd.get(100);\n\t\t\t\t\n\t\t\t\tif (random < Config.RATE_DROP_GREATER_HERBS)\n\t\t\t\t{\n\t\t\t\t\tRewardItem item = new RewardItem(8601, 1); // Greater Herb of Life\n\t\t\t\t\t\n\t\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\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\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem = null;\n\t\t\t\t\thp = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!hp)\n\t\t\t{\n\t\t\t\trandom = Rnd.get(1000); // note *10\n\t\t\t\t\n\t\t\t\tif (random < Config.RATE_DROP_SUPERIOR_HERBS)\n\t\t\t\t{\n\t\t\t\t\tRewardItem item = new RewardItem(8602, 1); // Superior Herb of Life\n\t\t\t\t\t\n\t\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\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\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// mp - restore mp type\n\t\t\tif (!mp)\n\t\t\t{\n\t\t\t\trandom = Rnd.get(100);\n\t\t\t\t\n\t\t\t\tif (random < Config.RATE_DROP_MP_HP_HERBS)\n\t\t\t\t{\n\t\t\t\t\tRewardItem item = new RewardItem(8603, 1); // Herb of Mana\n\t\t\t\t\t\n\t\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\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\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem = null;\n\t\t\t\t\tmp = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!mp)\n\t\t\t{\n\t\t\t\trandom = Rnd.get(100);\n\t\t\t\t\n\t\t\t\tif (random < Config.RATE_DROP_GREATER_HERBS)\n\t\t\t\t{\n\t\t\t\t\tRewardItem item = new RewardItem(8604, 1); // Greater Herb of Mana\n\t\t\t\t\t\n\t\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\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\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem = null;\n\t\t\t\t\tmp = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!mp)\n\t\t\t{\n\t\t\t\trandom = Rnd.get(1000); // note *10\n\t\t\t\t\n\t\t\t\tif (random < Config.RATE_DROP_SUPERIOR_HERBS)\n\t\t\t\t{\n\t\t\t\t\tRewardItem item = new RewardItem(8605, 1); // Superior Herb of Mana\n\t\t\t\t\t\n\t\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tDropItem(player, item);\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\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// speed enhance type\n\t\t\trandom = Rnd.get(100);\n\t\t\t\n\t\t\tif (random < Config.RATE_DROP_COMMON_HERBS)\n\t\t\t{\n\t\t\t\tRewardItem item = new RewardItem(8611, 1); // Herb of Speed\n\t\t\t\t\n\t\t\t\tif (Config.AUTO_LOOT && Config.AUTO_LOOT_HERBS)\n\t\t\t\t{\n\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\n\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.addItem(\"Loot\", item.getItemId(), item.getCount(), this, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDropItem(player, item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\titem = null;\n\t\t\t}\n\t\t}\n\t}", "void onItemDropped(EntityId droppedItem);", "public String dropItem(String item){\n if(hasGrabbedItem(item)){\n grabbedItems.remove(item);\n return \"You have dropped: \" + item;\n }else{\n return \"You don't have one to drop.\";\n }\n }", "@Listener\n public void onDeath(DestructEntityEvent.Death event) {\n if (!(event.getTargetEntity() instanceof Player))\n return;\n\n Optional<EntityDamageSource> source = event.getCause().first(EntityDamageSource.class);\n if (!source.isPresent())\n return; // did not die from pvp\n\n Player killed = (Player) event.getTargetEntity();\n\n Player killer = null;\n ItemStack weapon = null;\n Entity damager = source.get().getSource();\n if (damager instanceof Player) {\n killer = (Player) damager;\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n\n if (damager instanceof Projectile) {\n Projectile proj = (Projectile) damager;\n if (proj.getShooter() instanceof Player) {\n killer = (Player) proj.getShooter();\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n }\n\n if (damager.get(TameableData.class).isPresent()) {\n Optional<UUID> opOwnerUUID = damager.get(TameableData.class).get().owner().get();\n if (opOwnerUUID.isPresent()) {\n UUID uuid = opOwnerUUID.get();\n if (plugin.getServer().getOfflinePlayer(uuid).map(OfflinePlayer::isOnline).orElse(false)) {\n killer = ((SpongePlayer) plugin.getServer().getPlayer(uuid).get()).getHandle();\n // Use a bone to show the case was a wolf\n weapon = ItemStack.builder().itemType(ItemTypes.BONE).quantity(1).build();\n }\n }\n }\n\n if (killer == null)\n return;\n\n // Check the killers world just incase for some reason the\n // killed player was teleported to another world\n if (plugin.getConfigManager().getPvPConfig().getNode(\"ignoredWorlds\").getCollectionValue(String.class).contains(killer.getWorld().getName()))\n return;\n\n TrackerUtil.updatePvPStats(plugin.getServer().getOfflinePlayer(killed.getUniqueId().toString()).get(),\n plugin.getServer().getOfflinePlayer(killer.getUniqueId().toString()).get());\n\n TrackerInterface pvpTracker = plugin.getTrackerManager().getPvPInterface();\n if (pvpTracker.getDeathMessageManager().isDefaultMessagesOverriden())\n event.setMessageCancelled(true);\n\n pvpTracker.getDeathMessageManager().sendItemMessage(killer.getName(), killed.getName(), weapon.getType().getName().toLowerCase());\n pvpTracker.getRecapManager().getDeathRecaps().get(killed.getName()).setVisible(true);\n }", "public int dropPotion() {\r\n\t\t// If the random number generated is larger than the \r\n\t\t// drop chance, at least one health potion is dropped\r\n\t\tif (rnd.nextInt(100) < HEALTH_POTION_DROP_CHANCE) {\r\n\t\t\treturn rnd.nextInt(MAX_NO_HEALTH_POTION_DROP) + 1;\r\n\t\t}\r\n\t\t// no health potions dropped\r\n\t\treturn 0;\r\n\t}", "public void dropItem(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Drop what?\");\n }\n else{\n if(!inventory.isEmpty()){\n boolean found = false;\n for(int i = 0; i < inventory.size() && !found; i++){\n Item itemToDrop = inventory.get(i);\n if(itemToDrop.getId().equals(secondWord)){\n if(itemToDrop.getId().equals(\"wheelchair\")){\n maxWeight = 5;\n for(Item patient : inventory){\n if(patient.getId().equals(\"patient\")){\n patient.changePickUpItem(false);\n }\n }\n }\n if(itemToDrop.getId().equals(\"patient\")){\n itemToDrop.changePickUpItem(false);\n } \n currentRoom.addItem(itemToDrop);\n inventoryWeight -= itemToDrop.getItemWeight();\n inventory.remove(itemToDrop);\n found = true;\n System.out.println(\"You have droped the item: \" + itemToDrop.getId() + \".\");\n }\n }\n }\n else{\n System.out.println(\"Your inventory is empty.\");\n }\n }\n }", "public ArrayList<Item> drop()\n {\n ArrayList<Item> drop = new ArrayList<>();\n for( Pair<Enums.ItemName, Integer> possibleDrop : dropTable)\n {\n if(ThreadLocalRandom.current().nextInt(100) < possibleDrop.getY())\n drop.add(new Item(possibleDrop.getX()));\n }\n return drop;\n }", "public void dropItem(Location loc){\n\t\t\n\t\tPlayer p = getThrower();\n\t\tItemStack droppedItem;\n\t\t\n\t\tdroppable.clear();\n\t\t\n\t\taddItem(Material.IRON_INGOT, 8, 8, 3); //Item, weight, maximum stack size, minimum stack size\n\t\taddItem(Material.GOLD_INGOT, 5, 5, 1);\n\t\taddItem(Material.DIAMOND, 3, 3, 1);\n\t\taddItem(Material.GOLDEN_APPLE, 1, 1, 1);\n\t\taddItem(Material.ROTTEN_FLESH, 10, 5, 1);\n\t\taddItem(Material.BREAD, 15, 32, 15);\n\t\taddItem(Material.BONE, 10, 5, 1);\n\t\taddItem(Material.SULPHUR, 10, 5, 1);\n\t\taddItem(Material.SADDLE, 1, 1, 1);\n\t\t\n\t\tint Size = droppable.size();\n\t\trandNum = ThreadLocalRandom.current().nextInt(Size);\n\t\t\n\t\tdroppedItem = droppable.get(randNum);\n\t\t\n\t\tp.getWorld().dropItem(loc, droppedItem);\n\t\tp.getWorld().dropItem(loc, new ItemStack(Material.GOLD_NUGGET, rand.nextInt(10) + 1));\n\t\t\n\t}", "public Item getDropType(int paramInt1, Random paramRandom, int paramInt2) {\n/* 27 */ return Items.MELON;\n/* */ }", "@EventHandler\n\tpublic void entityDeath(EntityDeathEvent e){\n\t\tRandom random = new Random();\n\n\t\tdouble chance = 0.4f;\n\t\tif(random.nextDouble() <= chance) {\n\t\t\te.getEntity().getWorld().dropItem(e.getEntity().getLocation(), new ItemStack(Material.LEATHER));\n\t\t}\n\t}", "public boolean dropItem(Items item)\n {\n boolean itemDropped = false;\n if(haveItem(item) && !currentRoom.haveItem(item)){ //if item in inventory not room\n \n Inventory.remove(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld --; //inventory tracker -1\n itemDropped = true;\n \n }\n return itemDropped;\n //if(haveItem(item))\n //Inventory.remove(item);\n //itemsHeld --; //inventory tracker -1\n \n }", "float getBonusItemDrop();", "public Item pickup(){\n\t\tfor(int i= 0; i< this.Items.length;i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tif(this.Items[i][p] != null && this.position[i][p] == 1){\n\t\t\t\t\tItem loot = Items[i][p];\n\t\t\t\t\tItems[i][p] = null;\n\t\t\t\t\treturn loot;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Item(ItemType.other, \"dust\", 0,0,0);\n\t}", "protected Item check_Drops(Character c) {\n for (Item item : c.getBag()) {\n if (item.isDropable()) {\n return item;\n }\n }\n return null;\n }", "@Override\n\tpublic Item getItemDropped(int par1, Random par2Random, int par3) {\n\t\treturn Item.getItemFromBlock(this);\n\t}", "public void drop(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\n\t\tList<Item> items = super.getItems();\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (items.contains(item)) {\n\t\t\troom.addItem(item);\n\t\t\tsuper.removeItem(item);\n\t\t\tSystem.out.println(\"Dropped \" + item + \" on the floor.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No \" + item + \" in inventory.\");\n\t\t}\n\t}", "public void rollCombatDrop() {\n\t\tRandom r=new Random();\n\t\t\n\t\tint x=r.nextInt(3);\n\t\tItem i=combatDrops.get(x);\n\t\taddItem(i.getName());\n\t\t\n\t\tevents.appendText(\"You find an \"+i.getName()+\" after defeating the \"+e.getName()+\"!\\n\"); // Infrom player\n\t}", "public static boolean[] drop(String enemy, int enemyHealth, int enemyDamage, int playerHealth, int playerDamage, int elixirCount, int elixirHealth, int wins, boolean[] items, int itemCount, int level) {\r\n //Level 2\r\n if (level == 2) {\r\n if (itemCount < 4) {\r\n items[wins-1] = true;\r\n }\r\n }\r\n //Level 3\r\n if (level == 3) {\r\n boolean chance = chance();\r\n if ((chance) && (itemCount < 4)) {\r\n items[wins-1] = true;\r\n }\r\n }\r\n return items;\r\n }", "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_) {}", "protected void dropDeathLoot(boolean flag, int i) {\n java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();\n\n if (!this.isSheared()) {\n loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.Material.WOOL, 1, (short) 0, (byte) this.getColor()));\n }\n\n org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, loot);\n // CraftBukkit end\n }", "public int damageDropped(int par1)\r\n/* 155: */ {\r\n/* 156:173 */ if (par1 < 6) {\r\n/* 157:174 */ return 0;\r\n/* 158: */ }\r\n/* 159:175 */ if (par1 < 12) {\r\n/* 160:176 */ return 6;\r\n/* 161: */ }\r\n/* 162:178 */ return par1;\r\n/* 163: */ }", "public String dropItem(String itemName) {\r\n\t\t\tif(this.getPlayer().getItem(itemName) == null) {\r\n\t\t\t\treturn \"You do not have this item in your inventory.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.handleDecQuestrelatedItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().addItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().removeItem(itemName);\r\n\t\t\t\treturn \"You drop \" + itemName + \". \\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t}", "public void playerDropItem(Player p, Item i) {\n\t\tTile tileInFront = p.getLocation().getTileInDirection(p.getPosition(), p.getFacing());\n\t\tif (tileInFront.getGameObject() == null) {\n\t\t\ttileInFront.setGameObject(i);\n\t\t\tp.getInventory().remove(i);\n\t\t}\n\n\t}", "public int quantityDropped(Random par1Random)\n {\n return dropItemQty;\n }", "public int quantityDropped(Random par1Random)\n {\n return 1;\n }", "private void dropped(HeroItem item, Unit unit) {\n if (ItemMaster.isBreakable(item)) {\n item.broken(); // remove from game?\n if (item instanceof QuickItem) {\n QuickItem quickItemObj = (QuickItem) item;\n if (quickItemObj.isConcoction()) {\n quickItemObj.activate(Ref.getSelfTargetingRefCopy(unit)); // setForceTarget(true)\n }\n }\n } else {\n unit.getGame().getDroppedItemManager().itemFalls(unit.getCoordinates(), item);\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/* */ }", "public Item getItemDropped(int var1, Random var2, int var3)\n {\n if (var2.nextInt(4) == 0)\n {\n return FAItemRegistry.fernSeed;\n }\n return null;\n }", "@EventHandler\r\n public void mobkillLst(EntityDeathEvent event) {\r\n if (event.getEntity().getKiller() instanceof Player && event.getEntity().getType() != EntityType.PLAYER) {//Ensure entity that is killed is not a player\r\n int xpmult = (int) (event.getDroppedExp() * main.XPMult);\r\n event.setDroppedExp(xpmult);\r\n }\r\n }", "public int quantityDropped(Random var1)\n {\n return 1;\n }", "public int damageDropped(int p_149692_1_)\n {\n return func_149887_c(p_149692_1_) ? 0 : p_149692_1_ & 7;\n }", "public int quantityDropped(Random random) {\n/* 37 */ return 0;\n/* */ }", "@Override\n public void dropBlockAsItemWithChance(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, float chance, int fortune)\n {\n }", "public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }", "public void onDeath(DamageSource cause)\n {\n super.onDeath(cause);\n if (cause.getTrueSource() instanceof EntityPlayer) {\n EntityPlayer p = (EntityPlayer)cause.getTrueSource();\n if (p.getHealth() != p.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).getAttributeValue()) {\n if (this.world.rand.nextDouble() < 0.75) this.entityDropItem(new ItemStack(ItemManager.HEART), 0.0f);\n }\n }\n }", "ItemStack getEggItem(IGeneticMob geneticMob);", "public abstract int doDamage(int time, GenericMovableUnit unit, Unit target);", "@Override\n public int quantityDropped(int meta, int fortune, Random random)\n {\n return super.quantityDropped(meta, fortune, random);\n }", "public void doEventDrop(final L2Character lastAttacker)\n\t{\n\t\tL2PcInstance player = null;\n\t\t\n\t\tif (lastAttacker instanceof L2PcInstance)\n\t\t{\n\t\t\tplayer = (L2PcInstance) lastAttacker;\n\t\t}\n\t\telse if (lastAttacker instanceof L2Summon)\n\t\t{\n\t\t\tplayer = ((L2Summon) lastAttacker).getOwner();\n\t\t}\n\t\t\n\t\tif (player == null)\n\t\t{\n\t\t\treturn; // Don't drop anything if the last attacker or ownere isn't L2PcInstance\n\t\t}\n\t\t\n\t\tif (player.getLevel() - getLevel() > 9)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Go through DateDrop of EventDroplist allNpcDateDrops within the date range\n\t\tfor (final DateDrop drop : EventDroplist.getInstance().getAllDrops())\n\t\t{\n\t\t\tif (Rnd.get(L2DropData.MAX_CHANCE) < drop.chance)\n\t\t\t{\n\t\t\t\tRewardItem item = new RewardItem(drop.items[Rnd.get(drop.items.length)], Rnd.get(drop.min, drop.max));\n\t\t\t\t\n\t\t\t\tif (Config.AUTO_LOOT)\n\t\t\t\t{\n\t\t\t\t\tfinal L2Item item_templ = ItemTable.getInstance().getTemplate(item.getItemId());\n\t\t\t\t\t\n\t\t\t\t\tif (!player.getInventory().validateCapacity(item_templ))\n\t\t\t\t\t{\n\t\t\t\t\t\tDropItem(player, item);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.doAutoLoot(this, item); // Give this or these Item(s) to the L2PcInstance that has killed the L2Attackable\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDropItem(player, item); // drop the item on the ground\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\titem = null;\n\t\t\t}\n\t\t}\n\t\t\n\t\tplayer = null;\n\t}", "public void drop() {\n\t\t// Has player waited cooldown before trying to fire again?\n\t\tif (System.currentTimeMillis() - this.lastFired > Config.WEAPON_COOLDOWN_TIME * 1000) {\n\t\t\t\n\t\t\t// Can this airship drop bombs?\n\t\t\tif (this.properties.DROPS_BOMB) {\n\t\t\t\tBlock[] cannons = getCannons();\n\t\t\t\tint numfiredcannons = 0;\n\t\t\t\tfor (int i = 0; i < cannons.length; i++) {\n\t\t\t\t\tif (cannons[i] != null && cannons[i].getRelative(0, -1, 0).getType().equals(Material.AIR) && cannonHasTnt(cannons[i], Config.NUM_TNT_TO_DROP_BOMB)) {\n\t\t\t\t\t\tif (numfiredcannons < this.properties.MAX_NUMBER_OF_CANNONS ) {\n\t\t\t\t\t\t\tnumfiredcannons++;\n\t\t\t\t\t\t\tlastFired = System.currentTimeMillis();\n\t\t\t\t\t\t\twithdrawTnt(cannons[i], Config.NUM_TNT_TO_DROP_BOMB);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Spawn primed tnt firing downwards TODO: maybe add sound effects for tnt firing? :P\n\t\t\t\t\t\t\tTNTPrimed tnt = cannons[i].getWorld().spawn(cannons[i].getLocation().clone().add(0, -1, 0), TNTPrimed.class);\n\t\t\t\t\t\t\ttnt.setVelocity(new Vector(0, -0.5, 0));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// More cannons on ship than allowed. Not all fired - can break out of loop now.\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"Some cannons did not fire. Max cannon limit is \" + ChatColor.GOLD + this.properties.MAX_NUMBER_OF_CANNONS);\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}\n\t\t\t} else\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + this.properties.SHIP_TYPE + \" CANNOT DROP BOMBS\");\n\t\t} else\n\t\t\tplayer.sendMessage(ChatColor.GOLD + \"COOLING DOWN FOR \" + ChatColor.AQUA + (int)(Math.round(6 - (System.currentTimeMillis() - this.lastFired) / 1000)) + ChatColor.GOLD + \" MORE SECONDS\");\n\t}", "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\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 int shoot()\n {\n if(availableAmmo > 0)\n {\n System.out.println(\"Pew Pew\");\n availableAmmo--; \n damageCaused = randomDamageGenerator.nextInt(450);\n return damageCaused;\n }\n else return -1;\n }", "public int idDropped(int var1, Random var2, int var3)\r\n {\r\n return this.blockID == mod_XaedCraft.oreCopper.blockID ? mod_XaedCraft.copperdust.itemID : (this.blockID == mod_XaedCraft.oreTin.blockID ? mod_XaedCraft.tindust.itemID : (this.blockID == mod_XaedCraft.oreRune.blockID ? mod_XaedCraft.runeBlank.itemID : (this.blockID == mod_XaedCraft.oreBrimstone.blockID ? Item.gunpowder.itemID : this.blockID)));\r\n }", "private int check_if_dead(int i) {\n\t\tint ret;\n\t\tif ((abs(dragoes[i].getX_coord() - heroi.getX_coord()) > 1) || (abs(dragoes[i].getY_coord() - heroi.getY_coord()) > 1) ||\n\t\t\t\t((dragoes[i].getY_coord() != heroi.getY_coord()) && (dragoes[i].getX_coord() != heroi.getX_coord())))\n\t\t\tret = -1;\n\t\telse if (heroi.isArmado()) {\n\t\t\tif (dragoes[i].isAlive()) {\n\t\t\t\tif (inter == 0)\n\t\t\t\t\tconsole_interface.dragonKilled();\n\t\t\t\telse if (inter == 3) \n\t\t\t\t\tMazeDisplay.messageDragonKilled();\n\t\t\t\telse {}\n\t\t\t}\n\t\t\tdragoes[i].setAlive(false);\n\t\t\tlabirinto.setLabCell(dragoes[i].getX_coord(), dragoes[i].getY_coord(), ' ');\n\t\t\tret = -1;\n\t\t}\n\t\telse if (dragoes[i].getStatus() == 1)\n\t\t\tret = -1;\n\t\telse\n\t\t\tret = 5;\n\t\tchange_dragon_pos(i);\n\t\treturn ret;\n\t}", "public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}", "public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {\n\t\treturn Item.melon.itemID;\n\t}", "@Override\n\tprotected Item getDropItem() {\n\t\treturn ZollernItems.enderShard;\n\t}", "protected void doItemDrop(Location loc, Player player, ItemStack itemStack) {\n // To avoid drops occasionally spawning in a block and warping up to the\n // surface, wait for the next tick and check whether the block is\n // actually unobstructed. We don't attempt to save the drop if e.g.\n // a mob is standing in lava, however.\n Bukkit.getScheduler().scheduleSyncDelayedTask(BeastMaster.PLUGIN, () -> {\n Block block = loc.getBlock();\n Location revisedLoc = (block != null &&\n !canAccomodateItemDrop(block) &&\n player != null) ? player.getLocation()\n : loc;\n org.bukkit.entity.Item item = revisedLoc.getWorld().dropItem(revisedLoc, itemStack);\n item.setInvulnerable(isInvulnerable());\n item.setGlowing(isGlowing());\n }, 1);\n }", "public Item dropItem(String itemName) {\n Item item = items.remove(itemName);\n if(item != null) {\n currentRoom.addItem(item);\n }\n return item;\n }", "public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {\n\t\treturn !this.canDropItself ? 0 : super.idDropped(par1, par2Random, par3);\n\t}", "boolean hasBonusItemDrop();", "public int quantityDropped(Random p_149745_1_)\n {\n return this.isFullBlock ? 2 : 1;\n }", "public void checkForDeath()\n {\n Bullet2 bullet2 = new Bullet2(getVelocity(), getRotation());\n myWorld2 world = (myWorld2)getWorld();\n Zombie2 zombie = new Zombie2();\n \n if (isTouching(Bullet2.class))\n {\n health -= bullet2.damage;\n \n if(health < 0)\n {\n world.score(2);\n world.removeObject(this);\n } \n }\n else if (getX() == 900) \n {\n world.score(-1);\n world.removeObject(this);\n } \n }", "public String unequipItem(String itemName) {\r\n\t\t\tif(itemName == \"unarmored\") {\r\n\t\t\t\treturn \"You do not have any armor to unequip.\"; // handles unarmored situation\r\n\t\t\t}\r\n\t\t\telse if(itemName.equals(this.getPlayer().getBodyArmor().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBodyArmor().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBodyArmor());\r\n\t\t\t\tthis.getPlayer().setBodyArmor(this.getDefaultBodyArmor());\t\t// set armor to default on unequip\r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getHeadgear().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getHeadgear().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getHeadgear());\r\n\t\t\t\tthis.getPlayer().setHeadgear(this.getDefaultHeadgear());\t\t// set headgear to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getGloves().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getGloves().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getGloves());\r\n\t\t\t\tthis.getPlayer().setGloves(this.getDefaultGloves());\t\t\t// set gloves to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getBoots().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBoots().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBoots());\r\n\t\t\t\tthis.getPlayer().setBoots(this.getDefaultBoots());\t\t\t\t// set boots to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getWeapon().getName())) {\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getWeapon());\r\n\t\t\t\tthis.getPlayer().setWeapon(this.getDefaultWeapon());\t\t\t// set weapon to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You cannot unequip an item you are not wearing.\";\r\n\t\t\t}\r\n\t\t}", "abstract public Unit getDefendingUnit(Unit attacker);", "protected int damageDropped(int par1)\n {\n return par1 & 3;\n }", "public int quantityDropped(Random random)\r\n {\r\n return 0;\r\n }", "public void manageDropping(Rectangle r){\n\t\t\tif (!dropping){ //does the random number part\n\t\t\t\tb.reset(x+ 35, y+50);\n\t\t\t\tint d = rand.nextInt(50);\n\t\t\t\t//System.out.println(randamount);\n\t\t\t\tif ((d == 1) && exists) {\n\t\t\t\t\tdropping =true; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse { //resets the bomb after it has been dropped\n\t\t\t\tif(b.y < 1000) b.dropBomb(dropamount);\n\t\t\t\tbombtimer = 0;\n\t\t\t\t//dropamount += .1;\n\t\t\t\t//dropamount = 5;\n\t\t\t\t\n\t\t\t\tif (b.y >= 700 || b.collided(r)) {\n\t\t\t\t\tif (b.collided(r)) tstartredtimer = true;\n\t\t\t\t\tif (exists) dropping = false;\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\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}", "@Override\n public void collideEffect(GameItem gameItem) {\n Score score = new Score(getGame());\n if(gameItem.getItemType() == \"voleur\"){\n this.getGame().remove(this);\n this.generateurButin.enlever();\n if(this.generateurButin.getNbArgent() <=0 ){\n this.getGame().die();\n }\n }\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 }", "protected ItemStack getDroppedItemStack(BlockState state, HitResult target, BlockGetter world,\n BlockPos blockPos, Player player, ItemStack originalItemStack) {\n return originalItemStack;\n }", "private StateNode finishDrop() {\n // Remove getHeld card from gameState\n gs.dropHeld();\n // tell the pyramid it's not getting that card back\n gs.getUserPyramid().confirmRemoval();\n\n // Add to statistics tracking\n GameManager.getStatisticsTracking().addToMinionsPlayed(1);\n\n // Create new animation state\n AnimatingNode state = new AnimatingNode(match, stateCallback);\n\n //Check if the pyramid needs a refill\n if (gs.getUserPyramid().isEmpty() && !gs.getUserMatchDeck().isEmpty()) {\n state.refillPyramid();\n } else if (!gs.getUserPyramid().getFlipCards().isEmpty()) {\n state.flipCard();\n } else {\n int count = 0;\n for (MatchCard card : gs.getUserPyramid()) {\n if (gs.getUserDuckDust().isPlayable(card.getCost())) {\n count++;\n }\n }\n if (count == 0 && gs.getUserDuckDust().getGround()) {\n stateCallback.turnOver();\n }\n return new Idle(match, stateCallback);\n }\n return state;\n }", "@Override\n\tprotected void on_object_drop(GfxObject bonus) {\n\n\t}", "public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {\n\t\treturn Item.sign.itemID;\n\t}", "@SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)\n\tpublic void spiderDrop(LivingDropsEvent event)\n\t{\n\t if (event.getEntity() instanceof EntitySpider)\n\t {\n\t int radomint=new Random().nextInt(3);\n\t if(radomint==0){\n\t ItemStack itemStackToDrop = new ItemStack(ItemLoader.spiderGland, 1);\n\t event.getDrops().add(new EntityItem(event.getEntity().worldObj, event.getEntity().posX, \n\t event.getEntity().posY, event.getEntity().posZ, itemStackToDrop));\n\t }\n\t }\n\t}", "public float getBonusItemDrop() {\n return bonusItemDrop_;\n }", "public float getBonusItemDrop() {\n return bonusItemDrop_;\n }", "public Entity getDamageDealer();", "public void die() {\n\t\tSpriteObject obj = PhysicsObject.getCollidableAt(player1.getX(),player1.getY() + player1.getImage().getHeight() + 3);\n\t\tSpriteObject obj2 = PhysicsObject.getCollidableAt(player1.getX() + player1.getImage().getWidth() ,player1.getY() + player1.getImage().getHeight() + 3);\n\t\tif ((obj instanceof Tile && ((Tile) obj).getType() == TileType.spike) || (obj2 instanceof Tile && ((Tile) obj2).getType() == TileType.spike)) \n\t\t{\n\t\t\tplayer1.death();\n\t\t}\n\n\t\tif (player1.getY() > 1500) {\n\t\t\tplayer1.death();\n\t\t}\n\t}", "public void die()\r\n { \r\n say(\"SHREEEEK! I, uh, suddenly feel very faint...\");\r\n\r\n if (type == HERO)\r\n {\r\n // say goodbye and die\r\n System.out.println(\"You died.\");\r\n \r\n }\r\n else if (name.toLowerCase().equals(\"grendel\"))\r\n {\r\n System.out.println(\"You defeated overlord Grendel!\");\r\n System.out.println(\"Thanks for playing!\");\r\n System.exit(0);\r\n }\r\n //not end of the game \r\n else\r\n {\r\n //this person will drop his weapon or armor each with 1/3 chance\r\n if (Game.random(3)==0)\r\n {\r\n if (weapon!=null) \r\n items.add(weapon);\r\n }\r\n if (Game.random(3)==0)\r\n {\r\n if (armor!=null) \r\n items.add(armor);\r\n }\r\n \r\n //create string of items this person had\r\n String thingsDropped = Game.makeQuantityList(items);\r\n if (items.size()==0)\r\n System.out.println(name + \" didn't drop anything\");\r\n else \r\n System.out.println(name + \" dropped: \" + thingsDropped);\r\n \r\n //put this person's things into the room\r\n for (int i=items.size()-1; i>=0; i--)\r\n items.get(i).changeOwner(room);\r\n \r\n room.remove(this);\r\n System.out.println();\r\n System.out.println(room.otherPeopleString() + \"\\n\" + room.thingString());\r\n room = null;\r\n }\r\n }", "private void unequip(Equip e)\r\n { \r\n if (e.getType()==Equip.WEAPON)\r\n {\r\n attack -= e.getRating();\r\n items.add(e);\r\n }\r\n else if (e.getType() == Equip.ARMOR)\r\n {\r\n items.add(e);\r\n defense -= e.getRating();\r\n }\r\n }", "public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}", "private RewardItem calculateRewardItem(final L2PcInstance lastAttacker, final L2DropData drop, final int levelModifier, final boolean isSweep)\n\t{\n\t\t// Get default drop chance\n\t\tif (Config.HIGH_RATE_SERVER_DROPS && !drop.isQuestDrop() && drop.getItemId() != 57)\n\t\t{ // it's not adena-->check if drop has an epic jewel\n\t\t\t\n\t\t\t// ant queen,orfen,core,frintezza,baium,antharas,valakas,zaken,stones\n\t\t\tif (drop.getItemId() == 6660 || drop.getItemId() == 6661 || drop.getItemId() == 6662 || drop.getItemId() == 8191 || drop.getItemId() == 6658 || drop.getItemId() == 6656 || drop.getItemId() == 6657 || drop.getItemId() == 6659 || drop.getItemId() >= 6360 && drop.getItemId() <= 6362 || drop.getItemId() >= 8723 && drop.getItemId() <= 8762)\n\t\t\t{\n\t\t\t\t// if epic jewel, seal stones or life stone, continue\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfloat dropChance = 0;\n\t\t\n\t\tswitch (drop.getItemId())\n\t\t{\n\t\t\tcase 6662:\n\t\t\t{ // core ring\n\t\t\t\tif (Config.CORE_RING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.CORE_RING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6661:\n\t\t\t{ // orfen earring\n\t\t\t\tif (Config.ORFEN_EARRING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.ORFEN_EARRING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6659:\n\t\t\t{ // zaken earring\n\t\t\t\tif (Config.ZAKEN_EARRING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.ZAKEN_EARRING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6660:\n\t\t\t{ // aq ring\n\t\t\t\tif (Config.QA_RING_CHANCE > 0)\n\t\t\t\t{\n\t\t\t\t\tdropChance = (float) 10000 * Config.QA_RING_CHANCE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdropChance = drop.getChance();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tdropChance = drop.getChance();\n\t\t\t}\n\t\t}\n\t\t\n\t\tint deepBlueDrop = 1;\n\t\t\n\t\tif (Config.DEEPBLUE_DROP_RULES)\n\t\t{\n\t\t\tif (levelModifier > 0)\n\t\t\t{\n\t\t\t\t// We should multiply by the server's drop rate, so we always get a low chance of drop for deep blue mobs.\n\t\t\t\t// NOTE: This is valid only for adena drops! Others drops will still obey server's rate\n\t\t\t\tdeepBlueDrop = 3;\n\t\t\t\t\n\t\t\t\tif (drop.getItemId() == 57)\n\t\t\t\t{\n\t\t\t\t\tdeepBlueDrop *= isRaid() ? 1 : Config.RATE_DROP_ITEMS;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (deepBlueDrop == 0)\n\t\t{\n\t\t\tdeepBlueDrop = 1;\n\t\t}\n\t\t\n\t\t// Check if we should apply our maths so deep blue mobs will not drop that easy\n\t\tif (Config.DEEPBLUE_DROP_RULES)\n\t\t{\n\t\t\tdropChance = (drop.getChance() - drop.getChance() * levelModifier / 100) / deepBlueDrop;\n\t\t}\n\t\t\n\t\t// Applies Drop rates\n\t\tif (drop.getItemId() == 57)\n\t\t{\n\t\t\tif (this instanceof L2RaidBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ADENA_RAID;\n\t\t\t}\n\t\t\telse if (this instanceof L2GrandBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ADENA_BOSS;\n\t\t\t}\n\t\t\telse if (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ADENA_MINON;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdropChance *= Config.RATE_DROP_ADENA;\n\t\t\t\t\n\t\t\t\tif (lastAttacker.isVIP())\n\t\t\t\t{\n\t\t\t\t\tdropChance *= Config.VIP_ADENA_RATE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (isSweep)\n\t\t{\n\t\t\tif (this instanceof L2RaidBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.SPOIL_RAID;\n\t\t\t}\n\t\t\telse if (this instanceof L2GrandBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.SPOIL_BOSS;\n\t\t\t}\n\t\t\telse if (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.SPOIL_MINON;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdropChance *= Config.RATE_DROP_SPOIL;\n\t\t\t\t\n\t\t\t\tif (lastAttacker.isVIP())\n\t\t\t\t{\n\t\t\t\t\tdropChance *= Config.VIP_SPOIL_RATE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this instanceof L2RaidBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ITEMS_RAID;\n\t\t\t}\n\t\t\telse if (this instanceof L2GrandBossInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ITEMS_BOSS;\n\t\t\t}\n\t\t\telse if (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tdropChance *= Config.ITEMS_MINON;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdropChance *= Config.RATE_DROP_ITEMS;\n\t\t\t\t\n\t\t\t\tif (lastAttacker.isVIP())\n\t\t\t\t{\n\t\t\t\t\tdropChance *= Config.VIP_DROP_RATE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Config.L2JMOD_CHAMPION_ENABLE && isChampion())\n\t\t{\n\t\t\tdropChance *= Config.L2JMOD_CHAMPION_REWARDS;\n\t\t}\n\t\t\n\t\t// Round drop chance\n\t\tdropChance = Math.round(dropChance);\n\t\t\n\t\t// Set our limits for chance of drop\n\t\tif (dropChance < 1)\n\t\t{\n\t\t\tdropChance = 1;\n\t\t}\n\t\t\n\t\t// If item is adena, dont drop multiple time\n\t\t// if (drop.getItemId() == 57 && dropChance > L2DropData.MAX_CHANCE)\n\t\t// dropChance = L2DropData.MAX_CHANCE;\n\t\t\n\t\t// Get min and max Item quantity that can be dropped in one time\n\t\tfinal int minCount = drop.getMinDrop();\n\t\tfinal int maxCount = drop.getMaxDrop();\n\t\tint itemCount = 0;\n\t\t\n\t\tif (!Config.MULTIPLY_QUANTITY_BY_CHANCE && dropChance > L2DropData.MAX_CHANCE && drop.getItemId() != 57)\n\t\t{\n\t\t\tdropChance = L2DropData.MAX_CHANCE;\n\t\t}\n\t\t\n\t\t// Count and chance adjustment for high rate servers\n\t\tif (dropChance > L2DropData.MAX_CHANCE && !Config.PRECISE_DROP_CALCULATION)\n\t\t{\n\t\t\tfinal int multiplier = (int) dropChance / L2DropData.MAX_CHANCE;\n\t\t\t\n\t\t\tif (minCount < maxCount)\n\t\t\t{\n\t\t\t\titemCount += Rnd.get(minCount * multiplier, maxCount * multiplier);\n\t\t\t}\n\t\t\telse if (minCount == maxCount)\n\t\t\t{\n\t\t\t\titemCount += minCount * multiplier;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\titemCount += multiplier;\n\t\t\t}\n\t\t\t\n\t\t\tdropChance = dropChance % L2DropData.MAX_CHANCE;\n\t\t}\n\t\t\n\t\t// Check if the Item must be dropped\n\t\tfinal int random = Rnd.get(L2DropData.MAX_CHANCE);\n\t\t\n\t\twhile (random < dropChance)\n\t\t{\n\t\t\t// Get the item quantity dropped\n\t\t\tif (minCount < maxCount)\n\t\t\t{\n\t\t\t\titemCount += Rnd.get(minCount, maxCount);\n\t\t\t}\n\t\t\telse if (minCount == maxCount)\n\t\t\t{\n\t\t\t\titemCount += minCount;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\titemCount++;\n\t\t\t}\n\t\t\t\n\t\t\t// Prepare for next iteration if dropChance > L2DropData.MAX_CHANCE\n\t\t\tdropChance -= L2DropData.MAX_CHANCE;\n\t\t}\n\t\tif (Config.L2JMOD_CHAMPION_ENABLE)\n\t\t{\n\t\t\tif ((drop.getItemId() == 57 || drop.getItemId() >= 6360 && drop.getItemId() <= 6362) && isChampion())\n\t\t\t{\n\t\t\t\titemCount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (drop.getItemId() >= 6360 && drop.getItemId() <= 6362)\n\t\t{\n\t\t\titemCount *= Config.RATE_DROP_SEAL_STONES;\n\t\t}\n\t\t\n\t\tif (itemCount > 0)\n\t\t{\n\t\t\treturn new RewardItem(drop.getItemId(), itemCount);\n\t\t}\n\t\telse if (itemCount == 0 && Config.DEBUG)\n\t\t{\n\t\t\tLOGGER.debug(\"Roll produced 0 items to drop...\");\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "@EventHandler\r\n\tpublic void OnKill(final EntityDeathEvent event) {\n\t\tif (!plugin.getDependencyManager().getDependency(dependency.STATS)\r\n\t\t\t\t.isAvailable())\r\n\t\t\treturn;\r\n\r\n\t\tEntity e = event.getEntity();\r\n\t\tif (e.getLastDamageCause() instanceof EntityDamageByEntityEvent) {\r\n\t\t\tEntityDamageByEntityEvent nEvent = (EntityDamageByEntityEvent) e\r\n\t\t\t\t\t.getLastDamageCause();\r\n\t\t\tif (nEvent.getDamager() instanceof Player) {\r\n\r\n\t\t\t\tString extraType = null;\r\n\r\n\t\t\t\tif (e instanceof Skeleton) {\r\n\t\t\t\t\tSkeleton ske = (Skeleton) e;\r\n\r\n\t\t\t\t\tif (ske.getSkeletonType() == SkeletonType.WITHER) {\r\n\t\t\t\t\t\textraType = \"WITHER\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (e instanceof Creeper) {\r\n\t\t\t\t\tCreeper cre = (Creeper) e;\r\n\r\n\t\t\t\t\tif (cre.isPowered()) {\r\n\t\t\t\t\t\textraType = \"POWERED\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (e instanceof Chicken) {\r\n\t\t\t\t\tChicken mob = (Chicken) e;\r\n\r\n\t\t\t\t\tif (mob.getPassenger() != null) {\r\n\t\t\t\t\t\textraType = \"JOCKEY\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (e instanceof Rabbit) {\r\n\t\t\t\t\tRabbit mob = (Rabbit) e;\r\n\r\n\t\t\t\t\tif (mob.getRabbitType() == Type.THE_KILLER_BUNNY) {\r\n\t\t\t\t\t\textraType = \"KILLER\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (e instanceof Spider) {\r\n\t\t\t\t\tSpider mob = (Spider) e;\r\n\r\n\t\t\t\t\tif (mob.getPassenger() != null) {\r\n\t\t\t\t\t\textraType = \"JOCKEY\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (e instanceof Guardian) {\r\n\t\t\t\t\tGuardian mob = (Guardian) e;\r\n\r\n\t\t\t\t\tif (mob.isElder()) {\r\n\t\t\t\t\t\textraType = \"ELDER\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (extraType == null) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tStatsAPIHandler handler = (StatsAPIHandler) plugin\r\n\t\t\t\t\t\t.getDependencyManager().getDependency(dependency.STATS);\r\n\r\n\t\t\t\tStat mobkilled = handler.getAPI().getStatManager()\r\n\t\t\t\t\t\t.getStat(MobKilledStat.statName);\r\n\r\n\t\t\t\tStatsHolder holder = handler.getAPI().getPlayer(\r\n\t\t\t\t\t\tnEvent.getDamager().getUniqueId());\r\n\r\n\t\t\t\tholder.addEntry(mobkilled, new DefaultStatEntry(1,\r\n\t\t\t\t\t\tnew MetadataPair(\"entityType\", e.getType().toString()),\r\n\t\t\t\t\t\tnew MetadataPair(\"extraType\", extraType),\r\n\t\t\t\t\t\tnew MetadataPair(\"world\", e.getLocation().getWorld()\r\n\t\t\t\t\t\t\t\t.getName().toString())));\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int damageDropped(int par1)\n {\n return par1 & 3;\n }", "@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 }", "public void onDeath(DamageSource damagesource)\n {\n super.onDeath(damagesource);\n if(!worldObj.isRemote)\n {\n dropItem(Items.COOKED_PORKCHOP, 1);\n }\n }", "@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }", "@Override\n\tpublic void handleDrop(Player player, Task task, Game game) {\n\t\t\n\t}", "public int quantityDropped(EaglercraftRandom par1Random) {\n\t\treturn 3 + par1Random.nextInt(5);\n\t}", "public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}", "public int quantityDropped(Random random) {\n return 0;\n }", "public int getDamage() {\n\t\treturn itemDamage;\n\t}", "@Override\n protected void dropFewItems(boolean hit, int looting) {\n super.dropFewItems(hit, looting);\n if (hit && (this.rand.nextInt(3) == 0 || this.rand.nextInt(1 + looting) > 0)) {\n Item drop = null;\n switch (this.rand.nextInt(5)) {\n case 0:\n drop = Items.gunpowder;\n break;\n case 1:\n drop = Items.sugar;\n break;\n case 2:\n drop = Items.spider_eye;\n break;\n case 3:\n drop = Items.fermented_spider_eye;\n break;\n case 4:\n drop = Items.speckled_melon;\n break;\n }\n if (drop != null) {\n this.dropItem(drop, 1);\n }\n }\n }", "static String drop(Player player, String what) {\n if (player.drop(what)) {\n return \"-Charlie Bot: You have dropped the \" + what;\n } else {\n return \"-Charlie Bot: You aren't carrying \" + what + \", 525.\\n\" +\n \"Has the cryostasis affected your sense of weight?\";\n }\n }", "@Override\r\n\tpublic void onUnequipped(ItemStack stack, EntityLivingBase living)\r\n\t{\n\t}", "public boolean drops() {\r\n\t\tboolean res = drops;\r\n\t\tif(drops) {\r\n\t\t\tRandom r = new Random();\r\n\t\t\tint rand = r.nextInt(2);\r\n\t\t\tres = rand == 0;\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public void dropExplosives() {\n // Updates the time elapsed for each of the explosives\n for (int i=0; i<this.explosives.size(); i++) {\n Explosive dormantExplosive = this.explosives.get(i);\n dormantExplosive.increaseTime();\n }\n // If the Airplane has reached the end, doesn't detect any enemies\n // Isn't deleted straight away as it needs to wait for explosives to detonate\n if (super.outOfBounds()) {return;}\n this.timeElapsedDrop += ShadowDefend.getTimescale()/FPS;\n //Adds a new explosive\n if (this.timeElapsedDrop >= this.dropTime) {\n this.timeElapsedDrop = 0;\n Explosive newExplosive = new Explosive(super.getCenter());\n // Centers the explosive at the airplane's current position\n newExplosive.centerRectAt(super.getCenter());\n this.explosives.add(newExplosive);\n // Generates a new drop time in range\n this.dropTime = generateDropTime();\n this.numDropped++;\n }\n\n }", "@ZenCodeType.Method\n @ZenCodeType.Getter(\"drops\")\n public static List<ItemStack> getDrops(ItemFishedEvent internal) {\n \n return internal.getDrops();\n }" ]
[ "0.7280982", "0.7056459", "0.69670784", "0.69194937", "0.6884856", "0.6821026", "0.67644596", "0.6748016", "0.6712519", "0.6699234", "0.6692962", "0.6687284", "0.66081756", "0.6604667", "0.66027814", "0.65990067", "0.65765715", "0.65658516", "0.65618765", "0.65599936", "0.655885", "0.65548897", "0.65342396", "0.6521361", "0.6504068", "0.64955556", "0.6493844", "0.64834785", "0.6481375", "0.64637256", "0.6420969", "0.6410784", "0.6393685", "0.63851094", "0.63603306", "0.6325095", "0.6291638", "0.6284511", "0.62705207", "0.6238212", "0.62375087", "0.62207484", "0.6208056", "0.6191501", "0.61857104", "0.6177016", "0.617589", "0.6162575", "0.6161089", "0.61601627", "0.61309296", "0.6122821", "0.60948956", "0.6093376", "0.60746443", "0.6066454", "0.60454047", "0.60428953", "0.6034181", "0.6031255", "0.6019848", "0.60087454", "0.5991021", "0.5982145", "0.5974625", "0.59745115", "0.59696954", "0.5966843", "0.5962556", "0.5962255", "0.59556645", "0.5954565", "0.595041", "0.5944098", "0.5934264", "0.59315217", "0.59295994", "0.59271", "0.59252137", "0.59222424", "0.5918372", "0.5915289", "0.59147274", "0.5911991", "0.59074605", "0.59071517", "0.590667", "0.59055525", "0.59020126", "0.5894908", "0.58945304", "0.58941114", "0.58828443", "0.5877835", "0.587073", "0.5862885", "0.5853112", "0.58498704", "0.5845139", "0.583504" ]
0.6120101
52
Function that calculates the players total defense
private static int playerTotalDefense(String [] helmetEquip, String [] chestPlateEquip, String [] bootsEquip, String [] glovesEquip, int playerDefense){ int totalDefense; int bootsDefense = 0; int chestDefense = 0; int glovesDefense = 0; int helmetDefense = 0; leatherHelmet LeatherHelmet = new leatherHelmet(); leatherBoots LeatherBoots = new leatherBoots(); leatherGloves LeatherGloves = new leatherGloves(); leatherChestPlate LeatherChestPlate = new leatherChestPlate(); ironHelmet IronHelmet = new ironHelmet(); ironChestPlate IronChestPlate = new ironChestPlate(); ironBoots IronBoots = new ironBoots(); ironGloves IronGloves = new ironGloves(); switch(helmetEquip[0]){ case "Leather Helmet": helmetDefense = LeatherHelmet.getDefense(); break; case "Iron Helmet": helmetDefense = IronHelmet.getDefense(); break; } switch(bootsEquip[0]){ case "Leather Boots": bootsDefense = LeatherBoots.getDefense(); break; case "Iron Boots": bootsDefense = IronBoots.getDefense(); break; } switch(chestPlateEquip[0]){ case "Leather Chest Plate": chestDefense = LeatherChestPlate.getDefense(); break; case "Iron Chest Plate": chestDefense = IronChestPlate.getDefense(); break; } switch(glovesEquip[0]){ case "Leather Gloves": glovesDefense = LeatherGloves.getDefense(); break; case "Iron Gloves": glovesDefense = IronGloves.getDefense(); break; } totalDefense = playerDefense + helmetDefense + chestDefense + glovesDefense + bootsDefense; return totalDefense; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "private static int monsterDamageDealt(int monsterAttack, int playerDefense){\r\n int monsterDamageDealt;\r\n monsterDamageDealt = (monsterAttack - playerDefense);\r\n if(monsterDamageDealt < 0){\r\n monsterDamageDealt = 0;\r\n return monsterDamageDealt;\r\n }else{\r\n return monsterDamageDealt;\r\n }\r\n }", "public float getDefense()\n {\n return defense;\n }", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "public int getTotalOfdefeats() {\n return statistics.get(TypeOfGames.SIMGAME).getNumberOfDefeats()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getNumberOfDefeats()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getNumberOfDefeats();\n }", "int getIndividualDefense();", "@Override\n\tpublic double getDefense() {\n\t\treturn 0;\n\t}", "public int computeDamageTo(Combatant opponent) { return 0; }", "@Override\n public double getDefenseAmount() {\n return this.getDefense().getAbilityValue();\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n\t\treturn defense;\n\t}", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefenses() {\n return defenses;\n }", "int getMinigameDefenseChancesLeft();", "public int increaseDefense () {\n return 3;\n }", "public int getCurrentPlayerFunds(){return currentPlayerTurn.getFunds();}", "public int totalEffetInventaire() {\n\t\tint limiteInventaire = 0;\n\t\tif (bonusForce >0) limiteInventaire+= bonusForce;\n\t\tif (bonusDefense >0) limiteInventaire+= bonusDefense;\n\t\tif (bonusVie >0) limiteInventaire+= bonusVie;\n\t\tif (bonusEsquive >0) limiteInventaire+= bonusEsquive;\n\t\tif (bonusInventaire >0) limiteInventaire+= bonusInventaire;\n\t\treturn limiteInventaire*3/4;\n\t}", "public int defend(boolean touchAttack)\n {\n int defense = 0;\n if (rollDefense) {\n int baseRoll = dice.roll(1, 20, 0);\n defense = baseRoll;\n }\n defense += armorClass.get(AC_Type.AC_Reg).getCurrent();\n return defense;\n }", "public double getPlayerFullHP();", "public Integer getDefenseWins()\n\t{\n\t\treturn defenseWins;\n\t}", "public void setDefense(float defense)\n {\n this.defense = defense;\n }", "public float getTotalEffect(Player player)\n {\n return leastAmount + BONUS_MULTIPLIER * player.getIntelligence();\n }", "public int getDef()\r\n {\r\n return defense;\r\n }", "public int computeRangedDamageTo(Combatant opponent) { return 0; }", "public double countExpenses() {\n\n double expenses = 0;\n\n for (int i = 0; i < budget.getExpense().size(); i++) {\n expenses += budget.getExpense().get(i).getAmount();\n }\n\n return expenses;\n }", "@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}", "public int getMaxDefense() {\n\t\treturn maxDefense;\n\t}", "public int getNumberOfDefeats() {\r\n\t\tint numDefeats = 0;\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tfor (int j = 1; j <= 3; j++) {\r\n\t\t\t\tif (militaryVPS[i][j] == -1)\r\n\t\t\t\t\tnumDefeats++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn numDefeats;\r\n\t}", "public int getDef(Unit attacker, Unit defender){\r\n if(SCOP || COP)return 110;\r\n return 100;\r\n }", "double getTotalProfit();", "public int getDefense() {\n\t\treturn this.defense;\n\t}", "public int calculScore(Deck deck)\n {\n return 0;\n }", "float getBonusPercentHP();", "public double calculateHpPercent();", "public float calculate_benefits() {\r\n\t\tfloat calculate = 0.0f;\r\n\t\tcalculate = this.getActivity() * this.getAntiquity() + 100;\r\n\t\treturn calculate;\r\n\t}", "int getChestsAmount();", "public int getDefensePower() {\n return defensePower;\n }", "private void calculateTotalStats() {\n int totHp = calculateHp(baseStats.hp, ivStats.hp, evStats.hp);\n int totAtk = calculateStat(baseStats.atk, ivStats.atk, evStats.atk, natureStats.atk);\n int totDef = calculateStat(baseStats.def, ivStats.def, evStats.def, natureStats.def);\n int totSpAtk = calculateStat(baseStats.spAtk, ivStats.spAtk, evStats.spAtk, natureStats.spAtk);\n int totSpDef = calculateStat(baseStats.spDef, ivStats.spDef, evStats.spDef, natureStats.spDef);\n int totSpd = calculateStat(baseStats.spd, ivStats.spd, evStats.spd, natureStats.spd);\n totalStats = new Stats(totHp, totAtk, totDef, totSpAtk, totSpDef, totSpd);\n combatStats = new Stats(totHp, 0, 0, 0, 0, 0);\n }", "public long calcRemaining(){\n return getGrandTotal() - getTotalPaid();\n }", "@Override\n\tpublic void setDefense(double defense) {\n\n\t}", "public int setDefense(int defense) {\n\t\tthis.defense = defense;\n\t\treturn 0;\n\t}", "public int findGift(Player aPlayer){\r\n \tint giftSum = 0;\r\n \tfor (Expense anExpense : expenses) {\r\n\t\tif (anExpense.isTransaction()){\r\n\t\t\tif (aPlayer.isPlayer(anExpense.getPlayerName())){\r\n\t\t\t\tgiftSum = anExpense.getSum();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n \treturn giftSum;\r\n }", "public int getCurDefense() {\n\t\treturn curDefense;\n\t}", "public float getFortune() {\r\n\t\tfloat fortune = 0;\r\n\t\tfor (int i = 0; i < clients.length; i++) {\r\n\t\t\tClient currClient = clients[i];\r\n\t\t\tif (currClient != null) {\r\n\t\t\t\tfortune += currClient.getFortune();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fortune;\r\n\t}", "private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }", "Double getTotalSpent();", "private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}", "public int getTotalProfit() {\n\t\tif (game.countProfit() >= 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn game.countProfit();\n\t\t}\n\t}", "public double damageCalculation(NPC mob, Player player) {\r\n double weapon = mob.getWeapon().getDamage();\r\n double attack = mob.getStats().getAttack();\r\n double defence = player.getStats().getDefence();\r\n\r\n return ((weapon + attack) * 2 - defence);\r\n }", "public int remainingFees()\r\n\t{\r\n\t\treturn feesTotal-feesPaid;\t\t\r\n\t}", "public int calculateDamage(Player enemyPlayer)\n\t{\n\t\tint damage = 0;\n\t\tPokemon enemyPokemon = enemyPlayer.getActivePokemon();\n\t\tif(enemyPokemon.getClass() == FirePokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage() * 2;\n\t\t}\n\t\tif(enemyPokemon.getClass() == GrassPokemon.class)\n\t\t{\n\t\t\tdamage = (int)Math.round((move.getBaseDamage() * .5));\n\t\t}\n\t\tif(enemyPokemon.getClass() == WaterPokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage();\n\t\t}\n\t\treturn damage;\n\t}", "@Override\n public final float getSpecialDefenseValue() {\n return _defenseValue;\n }", "public void calculations(){\n\n int temp_size1 = fight_list.get(0).t1.members.size();\n int[] t1_counter = new int[temp_size1 + 1]; //counter for deaths: 0, 1, 2..., party size.\n float t1_avg = 0; //Average number of deaths.\n\n //We don't need to calculate for t2 right now, because t2 is just monsters.\n //temp_size = fight_list.get(0).t2.members.size();\n //int[] t2_counter = new int[temp_size + 1];\n\n for(FightResult fig : this.fight_list){\n int i = 0;\n while(i != fig.t1_deaths){\n i++;\n }\n t1_counter[i]++;\n t1_avg += fig.t1_deaths;\n }//end for\n\n System.out.println(t1_avg);\n System.out.println(Float.toString(t1_avg/fight_list.size()) + \" / \" + Integer.toString(temp_size1));\n\n String axis = \"# of deaths: \\t\";\n int axis_int = 0;\n String t1_results = \"Happened: \\t\";\n for(int i : t1_counter){\n axis += Integer.toString(axis_int++) + \"\\t\";\n t1_results += Integer.toString(i) + \"\\t\";\n }//end for\n System.out.println(axis);\n System.out.println(t1_results);\n\n float tpk_amount = t1_counter[temp_size1]; //by taking the size, we take the item at the end of the array. In this case, the number where everyone dies.\n tpk_amount = (tpk_amount/fight_list.size())*100;\n System.out.println(\"Probability of TPK: \" + Float.toString(tpk_amount) + \" %.\");\n\n System.out.println(\"\\n--------\\n\");\n }", "private double calculateMoneyToSpend() {\n\t\tdouble moneyToSpend = getMoney();\n\t\tif(moneyToSpend < 300) {\n\t\t\tmoneyToSpend = 0;//We do not want the player to go below 200E\n\t\t}\n\t\telse if(moneyToSpend < 500) {\n\t\t\tmoneyToSpend *= 0.34;\n\t\t}\n\t\telse if(moneyToSpend < 1000) {\n\t\t\tmoneyToSpend*= 0.4;\n\t\t}\n\t\telse if(moneyToSpend < 1500) {\n\t\t\tmoneyToSpend*= 0.5;\n\t\t}\n\t\telse if(moneyToSpend < 2000) {\n\t\t\tmoneyToSpend*= 0.6;\n\t\t}\n\t\telse {\n\t\t\tmoneyToSpend*= 0.7;\n\t\t}\n\t\treturn moneyToSpend;\n\t}", "@Override\r\n\tpublic double foodConsumption() {\n\t\treturn 0;\r\n\t}", "@Override\n public int dues(Person person) {\n List<TransactionInformation> statement = person.statement();\n if (statement.size() == 0){\n return -1 * expensePerPerson();\n }\n TransactionInformation total = statement.get(statement.size() - 1);\n\n return total.balance - expensePerPerson();\n }", "public Integer costOfDepartment() {\n Integer total = 0;\n for (Manager manager :\n departmentHeads) {\n total += manager.costOfTeam();\n }\n return total;\n }", "double getTotalReward();", "public int calculateAttack() {\n int attack = 0;\n for (Weapon w : equippedWeapons) {\n attack += w.getType().getDamage();\n }\n return attack;\n }", "public int throwDefense(int[] fighter) {\n Coins coins = new Coins();\n return coins.coinTry(fighter[DEFENSE]);\n }", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "public int totalWorth() {\n\t\tint val = 0;\n\t\tfor (Card c : cards) {\n\t\t\tval += c.value();\n\t\t}\n\t\treturn val;\n\t}", "public float calcCardSetScore(GameState gm, CardSet cardSet) {\n\t\tfloat f = 0;\n\t\tfloat temp = 0;\n\t\tfloat totalMShipPoints = totalMShipPointsRem(gm);\n\t\tfloat totalPShipPoints = totalPShipPointsRem();\n\t\t\n\t\t// System.out.println(\"Unknown Cards: \" + getUnknownCards().getCount());\n\t\t// System.out.println(\"MShipPoints: \" + totalMShipPoints + \" | PShipPoints: \" + totalPShipPoints);\n\t\t\n\t\tfor (Card c: cardSet.getCards()) {\n\t\t\tif (c instanceof MerchantShip) {\n\t\t\t\t/*\n\t\t\t\t * negative points for having to use up a move\n\t\t\t\t * positive points for small chance of collecting without attack\n\t\t\t\t * evaluate as if an avgRemPShip will attack it by the time it comes to you\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tf += -1*totalMShipPoints/numRemainingPlays(gm.getPlayers()); \t\t\t\t\t\n\t\t\t\t// f += -1*pointsPerTurn; //from spreadsheet\n\t\t\t\t\n\t\t\t}\n\t\t\telse if (c instanceof PirateShip) {\n\t\t\t\tif (totalPShipPoints > 0) {\n\t\t\t\t\ttemp = (float)c.getValue()*totalMShipPoints/totalPShipPoints;\n\t\t\t\t\tf+= temp;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Should anything go there?\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (c instanceof Trump){\n\t\t\t\tif ((((Trump) c).getColor() == Color.Admiral)\n\t\t\t\t\t\t&& cardSet.hasMShip()){\n\t\t\t\t\t// TODO: find highest merchant ship that I have or is on the board that I'm not winning\n\t\t\t\t\tf += trumpValue*totalMShipPoints/totalPShipPoints;\n\t\t\t\t}\n\t\t\t\telse if (cardSet.hasPShip(((Trump) c).getColor())) {\n\t\t\t\t\tf += trumpValue*totalMShipPoints/totalPShipPoints;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn f;\n\t}", "public void defend(){\n\tdefense += (int)(Math.random() * defense * .45 + 5);\n\tstrength -= 3;\n\tif (defense > 70) {\n\t defense = 70;\n\t}\t \n\tcounterDef += 1;\n\tif (counterDef == 2){\n\t counterDef = 0;\n\t recover();\n\t}\n\tSystem.out.println(\"You brace yourself with your bow.\");\n }", "Float attack();", "public int fight() {\r\n\t\treturn -this.randomObject.nextInt(50);\r\n\t}", "public int getGoalTally(Player player){\r\n return player.getGoal();\r\n }", "public int getTotalValue() {\n return getTotalOfwins()+getTotalOfGames()+getTotalOfdefeats()+getTotalOftimePlayed();\n }", "Float getFedAnimalsPercentage();", "@java.lang.Override\n public int getIndividualDefense() {\n return individualDefense_;\n }", "int getTotalDepositCount();", "public Integer getExpense() {\n return expense;\n }", "public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\n\t}", "public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }", "@java.lang.Override\n public int getIndividualDefense() {\n return individualDefense_;\n }", "public float numRemainingPlays(List<Player> players) {\n\t\tfloat f = 0;\n\t\tfor (Player p: players) {\n\t\t\tf += (float)p.getHandCount();\n\t\t}\n\t\tf += (float)getDeckSize();\n\t\t\n\t\treturn f;\n\t}", "public int totalCost()\n {\n int cost = 0;\n for (DessertItem item : dessertList) {\n cost += item.getCost();\n }\n return cost;\n }", "int getDefenseStatStage();", "public float getExpense() throws IllegalArgumentException {\n\t\treturn expense;\n\t}", "public int remaining(String team) {\n\n return 0;\n }" ]
[ "0.73267794", "0.71914893", "0.7172896", "0.7127819", "0.7127819", "0.7127819", "0.7127819", "0.7127819", "0.7127819", "0.70302224", "0.69976", "0.69908506", "0.6950466", "0.68217796", "0.6776136", "0.6776136", "0.6776063", "0.6776063", "0.6776063", "0.6775979", "0.67608243", "0.6754685", "0.6754685", "0.6754685", "0.67542607", "0.67542607", "0.67542607", "0.6658817", "0.6657129", "0.6572284", "0.6546618", "0.65169555", "0.6505884", "0.6470411", "0.64348423", "0.64215034", "0.6412537", "0.6355039", "0.63522315", "0.63248754", "0.6319099", "0.631471", "0.6310594", "0.6302452", "0.63003606", "0.62857074", "0.62582177", "0.6250771", "0.6217652", "0.62172735", "0.6198909", "0.61923724", "0.61744344", "0.61502963", "0.6146443", "0.61455435", "0.61453855", "0.6128074", "0.6126091", "0.61210775", "0.6120107", "0.611873", "0.6114288", "0.60570574", "0.60337013", "0.6005936", "0.60029906", "0.5999855", "0.5988169", "0.5978997", "0.59780157", "0.5975504", "0.59632885", "0.5954079", "0.5938814", "0.5935608", "0.5935608", "0.5935608", "0.5935608", "0.5935608", "0.5935608", "0.59351027", "0.5916601", "0.5910323", "0.5905434", "0.59016585", "0.5901342", "0.58854914", "0.5877509", "0.58713216", "0.58670926", "0.5863528", "0.5860215", "0.5855083", "0.585444", "0.58433247", "0.58401966", "0.5833943", "0.58274984", "0.5817707" ]
0.6505169
33
Function that calculates the players total attack
private static int playerTotalAttack(String [] weaponEquip, int playerAttack, int strength){ int totalAttack = 0; int shortSwordAttack; int greatSwordAttack; int longSwordAttack; int hongerAttack; shortSword ShortSword = new shortSword(); longSword LongSword = new longSword(); greatSword GreatSword = new greatSword(); heavenSmitingDevilSlayerSword Honger = new heavenSmitingDevilSlayerSword(); switch(weaponEquip[0]){ case "Short Sword": shortSwordAttack = ShortSword.getAttack(); totalAttack = playerAttack + strength + shortSwordAttack; break; case "Long Sword": longSwordAttack = LongSword.getAttack(); totalAttack = playerAttack + strength + longSwordAttack; break; case "Great Sword": greatSwordAttack = GreatSword.getAttack(); totalAttack = playerAttack + strength + greatSwordAttack; break; case "Heaven Smiting Devil Slayer Sword": hongerAttack = Honger.getAttack(); totalAttack = playerAttack + strength + hongerAttack; break; default: totalAttack = playerAttack + strength; break; } return totalAttack; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int calculateAttack() {\n int attack = 0;\n for (Weapon w : equippedWeapons) {\n attack += w.getType().getDamage();\n }\n return attack;\n }", "public int getTotalWins() {\n int sum = 0;\n for (int i = 0; i < 13; i++) {\n sum += i * this.statistics.getDecksByWins().get(i);\n }\n return sum;\n }", "private void calculateTotalStats() {\n int totHp = calculateHp(baseStats.hp, ivStats.hp, evStats.hp);\n int totAtk = calculateStat(baseStats.atk, ivStats.atk, evStats.atk, natureStats.atk);\n int totDef = calculateStat(baseStats.def, ivStats.def, evStats.def, natureStats.def);\n int totSpAtk = calculateStat(baseStats.spAtk, ivStats.spAtk, evStats.spAtk, natureStats.spAtk);\n int totSpDef = calculateStat(baseStats.spDef, ivStats.spDef, evStats.spDef, natureStats.spDef);\n int totSpd = calculateStat(baseStats.spd, ivStats.spd, evStats.spd, natureStats.spd);\n totalStats = new Stats(totHp, totAtk, totDef, totSpAtk, totSpDef, totSpd);\n combatStats = new Stats(totHp, 0, 0, 0, 0, 0);\n }", "private static int experienceTally(int playerExperience, int monsterExperience){\r\n int totalExperience;\r\n totalExperience = playerExperience + monsterExperience;\r\n return totalExperience;\r\n }", "public int getGoalTally(Player player){\r\n return player.getGoal();\r\n }", "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "@Override\n public void attackedByShaman(double attack) {\n damageCounter += (2 * attack) / 3;\n this.attack = Math.max(this.attack - (2 * attack) / 3, 0);\n }", "Float attack();", "public int calculateDamage(Player enemyPlayer)\n\t{\n\t\tint damage = 0;\n\t\tPokemon enemyPokemon = enemyPlayer.getActivePokemon();\n\t\tif(enemyPokemon.getClass() == FirePokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage() * 2;\n\t\t}\n\t\tif(enemyPokemon.getClass() == GrassPokemon.class)\n\t\t{\n\t\t\tdamage = (int)Math.round((move.getBaseDamage() * .5));\n\t\t}\n\t\tif(enemyPokemon.getClass() == WaterPokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage();\n\t\t}\n\t\treturn damage;\n\t}", "public int computeDamageTo(Combatant opponent) { return 0; }", "@Override\n\tpublic double attack() {\n\t\treturn 12.5;\n\t}", "@Override\n public void attackedByPaladin(double attack) {\n this.attack += (2 * attack) / 3;\n damageCounter = Math.max(damageCounter - (2 * attack) / 3, 0);\n }", "public int calculatePlayerAge(int player_id) throws Exception;", "public int findGift(Player aPlayer){\r\n \tint giftSum = 0;\r\n \tfor (Expense anExpense : expenses) {\r\n\t\tif (anExpense.isTransaction()){\r\n\t\t\tif (aPlayer.isPlayer(anExpense.getPlayerName())){\r\n\t\t\t\tgiftSum = anExpense.getSum();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n \treturn giftSum;\r\n }", "public float getTotalEffect(Player player)\n {\n return leastAmount + BONUS_MULTIPLIER * player.getIntelligence();\n }", "private void scoreSumUp(ArrayList<Player> players){\n for (Player player: players) {\n System.out.println(\"The Player \" + player.getUsername() + \" has total points of \" + player.getScore());\n }\n }", "public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}", "int getAttackRoll();", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "public double getPlayerFullHP();", "public int getPoints ( Player player );", "@Override\n public int getTotalHumanPlayers() {\n return totalHumanPlayers;\n }", "public int getPlayerTotal() {\n\t\t\treturn playerTotal;\n\t\t}", "public int getTotalValue() {\n return getTotalOfwins()+getTotalOfGames()+getTotalOfdefeats()+getTotalOftimePlayed();\n }", "public int getTotalGoldenCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getGoldCardsByWins());\n }", "public double damageCalculation(NPC mob, Player player) {\r\n double weapon = mob.getWeapon().getDamage();\r\n double attack = mob.getStats().getAttack();\r\n double defence = player.getStats().getDefence();\r\n\r\n return ((weapon + attack) * 2 - defence);\r\n }", "public void calculations(){\n\n int temp_size1 = fight_list.get(0).t1.members.size();\n int[] t1_counter = new int[temp_size1 + 1]; //counter for deaths: 0, 1, 2..., party size.\n float t1_avg = 0; //Average number of deaths.\n\n //We don't need to calculate for t2 right now, because t2 is just monsters.\n //temp_size = fight_list.get(0).t2.members.size();\n //int[] t2_counter = new int[temp_size + 1];\n\n for(FightResult fig : this.fight_list){\n int i = 0;\n while(i != fig.t1_deaths){\n i++;\n }\n t1_counter[i]++;\n t1_avg += fig.t1_deaths;\n }//end for\n\n System.out.println(t1_avg);\n System.out.println(Float.toString(t1_avg/fight_list.size()) + \" / \" + Integer.toString(temp_size1));\n\n String axis = \"# of deaths: \\t\";\n int axis_int = 0;\n String t1_results = \"Happened: \\t\";\n for(int i : t1_counter){\n axis += Integer.toString(axis_int++) + \"\\t\";\n t1_results += Integer.toString(i) + \"\\t\";\n }//end for\n System.out.println(axis);\n System.out.println(t1_results);\n\n float tpk_amount = t1_counter[temp_size1]; //by taking the size, we take the item at the end of the array. In this case, the number where everyone dies.\n tpk_amount = (tpk_amount/fight_list.size())*100;\n System.out.println(\"Probability of TPK: \" + Float.toString(tpk_amount) + \" %.\");\n\n System.out.println(\"\\n--------\\n\");\n }", "public void incrementNumAttacked( ){\n this.numAttacked++;\n }", "public int totalWorth() {\n\t\tint val = 0;\n\t\tfor (Card c : cards) {\n\t\t\tval += c.value();\n\t\t}\n\t\treturn val;\n\t}", "public int getTotalGold() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getGoldByWins());\n }", "public int getNumAttacked() {\n return this.numAttacked;\n }", "public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);", "public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }", "private int calculateTotalDamage(double baseAttack, double moveDamage, int totalHealth, double statBonus) {\n\t\tint totalDamage = 0;\n\t\tRandom rand = new Random();\n\t\tfloat accuracy = rand.nextFloat();\n\t\t\n\t\ttotalDamage = (int) Math.round(((double) totalHealth) * ((baseAttack*statBonus) + moveDamage) * ((double) accuracy));\n\t\t\n\t\treturn totalDamage;\n\t}", "int getIndividualAttack();", "@Override\n\tpublic int getOnlinePlayerSum() {\n\t\treturn PlayerManager.getInstance().getOnlinePlayers().size();\n\t}", "private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }", "private int getTotalPlayerCount() {\n String baseUrl = \"https://www.runescape.com/player_count.js?varname=iPlayerCount\";\n String url = baseUrl + \"&callback=jQuery33102792551319766081_1618634108386&_=\" + System.currentTimeMillis();\n try {\n String response = new NetworkRequest(url, false).get().body;\n Matcher matcher = Pattern.compile(\"\\\\(\\\\d+\\\\)\").matcher(response);\n if(!matcher.find()) {\n throw new Exception();\n }\n return Integer.parseInt(response.substring(matcher.start() + 1, matcher.end() - 1));\n }\n catch(Exception e) {\n return 0;\n }\n }", "public Integer getAttackWins()\n\t{\n\t\treturn attackWins;\n\t}", "public double calculateHpPercent();", "@Override\n\tpublic double getAttack() {\n\t\treturn 0;\n\t}", "protected int getCivilPoints(Player player) {\n\t\tint sum = 0;\n\t\tfor (Card card : player.getBoard().getCivil())\n\t\t\tsum += card.getvPoints();\n\t\treturn sum;\n\t}", "Double getTotalSpent();", "public int getTotalDust() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getDustByWins());\n }", "public void calcTroops() {\r\n\t\t//Based on how many troops the player owns this will add to their spendage with a minimum of 2\r\n\t\ttroopSpendage = (players.get(turnCounter).getCountries().size()) / 3;\r\n\t\tif (troopSpendage < 3) {\r\n\t\t\ttroopSpendage = 3;\r\n\t\t}\r\n\t\t//If a player owns an entire continent, they will get a continent bonus to their spendage\r\n\t\t//these counters record how much of a continent the player owns\r\n\t\tint Kjersia = 0;\r\n\t\tint Estoveria = 0;\r\n\t\tint Moa = 0;\r\n\t\tint Shilov = 0;\r\n\t\tint Tormudd = 0;\r\n\t\tint Eschilles = 0;\r\n\t\t\r\n\t\t//increment the corresponding continent counter based on the continent value stored in the country objects the player owns\r\n\t\tfor (Country c:players.get(turnCounter).getCountries()) {\r\n\t\t\tswitch (c.getContinent()) {\r\n\t\t\tcase \"Kjersia\": Kjersia++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Estoveria\": Estoveria++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Moa\": Moa++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Shilov\": Shilov ++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Tormudd\": Tormudd++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Eschilles\": Eschilles++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If the player owns all countries in a continent (each continent has different numbers of countries), give them a corresponding troop bonus as decided by the rules of the game\r\n\t\tif (Kjersia == 4) {\r\n\t\t\ttroopSpendage += 2;\r\n\t\t}\r\n\t\tif (Estoveria == 8) {\r\n\t\t\ttroopSpendage += 5;\r\n\t\t}\r\n\t\tif (Moa == 9) {\r\n\t\t\ttroopSpendage += 6;\r\n\t\t}\r\n\t\tif (Shilov == 4) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Tormudd == 5) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Eschilles == 12) {\r\n\t\t\ttroopSpendage += 7;\r\n\t\t}\r\n\r\n\t\t//If a player owns the card and owns the coresponding country on that card they get one extra troop\r\n\t\tfor(Card C: players.get(turnCounter).getCards()) \r\n\t\t\tfor(Country co: players.get(turnCounter).getCountries())\r\n\t\t\t\tif (C.getCountry().equals(co.getName()))\r\n\t\t\t\t\ttroopSpendage++;\t\t\r\n\t\t\r\n\t\t//Updates the display of how many troops the player has to deploy\r\n\t\ttroopsToDeploy.setText(\"Troops to Deploy: \" + troopSpendage);\r\n\t}", "int attack(Unit unit, Unit enemy);", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}", "public int getAttack() { return this.attack; }", "public int getAvengersHp() {\n\t\tint avengersHp = Battleground.captainAmerica.getHp()\n\t\t\t\t\t\t+ Battleground.hawkeye.getHp()\n\t\t\t\t\t\t+ Battleground.blackWidow.getHp()\n\t\t\t\t\t\t+ Battleground.hulk.getHp()\n\t\t\t\t\t\t+ Battleground.thor.getHp();\n\t\treturn avengersHp;\n\t}", "private int getTotalShareValue(Player player){\n return player.getShares().get(0) * game.apple.getSharePrice() + player.getShares().get(1) * game.bp.getSharePrice() +\n player.getShares().get(2) * game.cisco.getSharePrice() + player.getShares().get(3) * game.dell.getSharePrice() +\n player.getShares().get(4) * game.ericsson.getSharePrice();\n }", "public static int getDeadPlayersAmount(List<Player> players) {\n long count = players.stream()\n .filter(player -> !player.isAlive())\n .count();\n\n int result = (int) count;\n\n return result;\n\n }", "public int totalGames() {\n return wins + losses + draws;\n }", "public int attackRoll(){\r\n\t\treturn (int) (Math.random() * 100);\r\n\t}", "@Override\r\n\tpublic int attack() {\r\n\t\treturn rnd.nextInt(MAX_MONSTER_ATTACK_DAMAGE);\r\n\t}", "public double getTotalWinAverage() {\n return (double) getTotalWins() / getTotalDeckAmount();\n }", "public float trumpsPerGame() {\n if (totalGames() == 0) return 0;\n float res = (float) trumps / (float) (totalGames());\n return Math.round(res * 10) / 10f;\n }", "private static int monsterDamageDealt(int monsterAttack, int playerDefense){\r\n int monsterDamageDealt;\r\n monsterDamageDealt = (monsterAttack - playerDefense);\r\n if(monsterDamageDealt < 0){\r\n monsterDamageDealt = 0;\r\n return monsterDamageDealt;\r\n }else{\r\n return monsterDamageDealt;\r\n }\r\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public int calculScore(Deck deck)\n {\n return 0;\n }", "int getAttackStatStage();", "public int getTotalOfwins() {\n return statistics.get(TypeOfGames.SIMGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getNumberOfWins();\n }", "public int rollAttack()\n {\n Random random2 = new Random();\n int atk = random2.nextInt(20) +1 + attackBonus;\n return atk;\n }", "double getTotalReward();", "int getSuperEffectiveChargeAttacksUsed();", "private int opponentMove() {\n if (diceRoll(10) <= 9) { //Here we call diceRoll again, and compare it to a number, since the opponent only has 1 type of attack\n int attackValue = (opponent.getAttack() + (opponent.getLevel() / 2)) * diceRoll(4); //We set attackValue equals to the opponents base attack + the opponents level / 2, \n // and then multiply it by the diceRoll. This way, the opponents damage scales with level as well.\n int damageDealt = 0;\n if (attackValue >= player.getArmorValue()) { //We check if the opponents attack is stronger than players armor\n damageDealt = (attackValue - player.getArmorValue()) + 1; //If the opponent attacks through the players armor, they deal the remaining damage + 1.\n player.changeHealth(damageDealt * -1); //Changes the players health accordingly\n }\n return damageDealt;\n }\n return -1;\n }", "public int getTotal()\r\n\t{\r\n\t\t// the running total of points in the hand\r\n\t\tint sum = 0;\r\n\r\n\t\t// count of the number of aces in the hand, to be processed later\r\n\t\tint aces = 0;\r\n\t\t\r\n\t\t// evaluates each card in the hand\r\n\t\tfor (int i = 0; i < handCount; i++)\r\n\t\t{\r\n\t\t\tint value = 0;\r\n\t\r\n\t\t\t/* while each card stores a value for both its suite and rank, this method is only\r\n\t\t\tconcerned with rank, and thus only examines the first character */\r\n\t\t\tchar thisCard = pCards[i].charAt(0);\r\n\t\t\t\r\n\t\t\tswitch(thisCard)\r\n\t\t\t{\r\n\t\t\t\tcase '2':\tvalue = 2;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '3':\tvalue = 3;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '4':\tvalue = 4;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '5':\tvalue = 5;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '6':\tvalue = 6;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '7':\tvalue = 7;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '8':\tvalue = 8;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '9':\tvalue = 9;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '1':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'J':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'Q':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'K':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'A':\taces++;\r\n\t\t\t\t\t\t\t\tvalue = 0;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t} // end switch\r\n\t\r\n\t\t\tsum += value;\r\n\t\t} // end for\r\n\t\t\r\n\t\t// checks if any aces exist\r\n\t\tif (aces > 0)\r\n\t\t{\r\n\t\t\t// The value of all aces in the hand, the first valued at 11 and all subsequent aces valued at 1\r\n\t\t\tint aceTotal = 11 + (aces - 1);\r\n\t\t\r\n\t\t\t/* if this total would cause the player to bust, the aces are all added at value 1.\r\n\t\t\tOtherwise, the first is added at value of 11, and the others at value of 1. */\r\n\t\t\tif ( sum <= (BlackJackGame.BUST_SCORE - aceTotal ) )\r\n\t\t\t{\r\n\t\t\t\tsum = sum + aceTotal;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsum = sum + aces;\r\n\t\t\t}\r\n\t\t} // end if\r\n\t\r\n\t\treturn sum;\r\n\t}", "public int getTotalPoints() {\n \tint total = 0;\n \tfor (int i = 0; i < assignments.size(); i++) {\n \t\ttotal += assignments.get(i).getWorth();\n \t}\n \treturn total;\n }", "public int[] calculateScore(Player[] players){\n players = board.getPlayers();\n int[] scores = new int[board.getPlayerCount()];\n for(int i = 0; i < players.length; i++){\n scores[i] = players[i].getMoney() + players[i].getCredits() + (players[i].getRank() * 5);\n }\n return scores;\n }", "public int calculateCombatLevel() {\r\n if (entity instanceof NPC) {\r\n return ((NPC) entity).getDefinition().getCombatLevel();\r\n }\r\n int combatLevel;\r\n int melee = staticLevels[ATTACK] + staticLevels[STRENGTH];\r\n int range = (int) (1.5 * staticLevels[RANGE]);\r\n int mage = (int) (1.5 * staticLevels[MAGIC]);\r\n if (melee > range && melee > mage) {\r\n combatLevel = melee;\r\n } else if (range > melee && range > mage) {\r\n combatLevel = range;\r\n } else {\r\n combatLevel = mage;\r\n }\r\n combatLevel = staticLevels[DEFENCE] + staticLevels[HITPOINTS] + (staticLevels[PRAYER] / 2) + (int) (1.3 * combatLevel);\r\n return combatLevel / 4;\r\n }", "public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}", "public int bonusScore(Player p){\n int score = p.getBombRange() + p.getNumberBombRemaining() + p.getNumberMoveRemaining();\n return score;\n }", "public int getPointsAgainst() {\n int pointsAgainst = 0;\n for (Game g : gameList) {\n pointsAgainst += g.getOtherTeamScore(this);\n }\n return pointsAgainst;\n }", "public double getAttack() {\n return attack;\n }", "@Override\r\n\tpublic float getRank() {\r\n\t\tfloat rank = 0;\r\n\t\tif( players != null && !players.isEmpty() ) {\r\n\t\t\tfloat totalAbility = 0;\r\n\t\t\tfor (Player player : players) {\r\n\t\t\t\ttotalAbility += player.getAbility();\r\n\t\t\t}\r\n\t\t\trank = totalAbility / players.size();\r\n\t\t}\r\n\t\t\r\n\t\treturn rank;\r\n\t}", "public int getTotalOfdefeats() {\n return statistics.get(TypeOfGames.SIMGAME).getNumberOfDefeats()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getNumberOfDefeats()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getNumberOfDefeats();\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 }", "private int timeToNextAttack() {\n return ATTACK_SPEED - mAttacker.getSpeed();\n }", "public Integer getOpponentAttacks()\n\t{\n\t\treturn opponentAttacks;\n\t}", "public int getPlunder(Unit attacker, Random random) {\n RandomRange range = getPlunderRange(attacker);\n return (range == null) ? 0\n : range.getAmount(\"Plunder \" + getName(), random, false);\n }", "float getBonusPercentHP();", "public double damageCalculation(Player player, NPC mob) {\r\n double weapon = player.getWeapon().getDamage();\r\n double attack = player.getStats().getAttack();\r\n double defence = mob.getStats().getDefence();\r\n double critMulti = 1;\r\n\r\n// Chance chance = new Chance(player.getLevel(), player.getStats().getDexterity(), player.getCharacterClass());\r\n Chance chance = new Chance(player.getStats().getCritChance());\r\n boolean crit = chance.getSuccess();\r\n\r\n if (crit) {\r\n critMulti = 2;\r\n System.out.println(\"CRIT!\");\r\n } else {\r\n// System.out.println(\"No crit\");\r\n }\r\n\r\n return ((weapon + attack) * 2 - defence) * critMulti;\r\n }", "public int getPlayerMoney(String playerName) throws Exception {\n return this.getJogadorByName(playerName).getDinheiro();\n }", "public int totalEffetInventaire() {\n\t\tint limiteInventaire = 0;\n\t\tif (bonusForce >0) limiteInventaire+= bonusForce;\n\t\tif (bonusDefense >0) limiteInventaire+= bonusDefense;\n\t\tif (bonusVie >0) limiteInventaire+= bonusVie;\n\t\tif (bonusEsquive >0) limiteInventaire+= bonusEsquive;\n\t\tif (bonusInventaire >0) limiteInventaire+= bonusInventaire;\n\t\treturn limiteInventaire*3/4;\n\t}", "public static double evaluateSurvivability(Board b, int team) {\n Optional<Leader> ol = b.getPlayer(team).getLeader();\n if (ol.isEmpty()) {\n return 0;\n }\n Leader l = ol.get();\n if (l.health <= 0) { // if dead\n return -99999 + l.health; // u dont want to be dead\n }\n int shield = l.finalStats.get(Stat.SHIELD);\n Supplier<Stream<Minion>> attackingMinions = () -> b.getMinions(team * -1, true, true);\n // TODO add if can attack check\n // TODO factor in damage limiting effects like durandal\n int potentialDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int potentialLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int threatenDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int threatenLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int attackers = attackingMinions.get()\n .map(m -> m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n List<Minion> defendingMinons = b.getMinions(team, false, true)\n .filter(m -> m.finalStats.get(Stat.WARD) > 0)\n .collect(Collectors.toList());\n int leaderhp = l.health + shield;\n int ehp = defendingMinons.stream()\n .map(m -> m.health)\n .reduce(leaderhp, Integer::sum);\n long defenders = defendingMinons.size();\n if (shield > 0) {\n defenders++;\n }\n if (b.getCurrentPlayerTurn() != team) {\n threatenDamage = potentialDamage;\n threatenLeaderDamage = potentialLeaderDamage;\n }\n // if there are more defenders than attacks, then minions shouldn't be\n // able to touch face\n if (defenders >= attackers) {\n ehp = Math.max(ehp - threatenDamage, leaderhp);\n } else {\n ehp = Math.max(ehp - threatenDamage, leaderhp - threatenLeaderDamage);\n if (ehp <= 0) {\n if (team == b.getCurrentPlayerTurn()) {\n // they're threatening lethal if i dont do anything\n return -30 + ehp;\n } else {\n // they have lethal, i am ded\n return -60 + ehp;\n }\n }\n }\n return 6 * Math.log(ehp);\n }", "public int attack(Character target){ //hw3E#0 //hw46#moreThinking\n lowerHP((int)(strength * attack / 10)); //hw3E#0 //hw46#moreThinking\n return super.attack(target); //hw3E#0 //hw44#3,4 //hw46#moreThinking\n }", "protected int getExperiencePoints(PlayerEntity player) {\n return super.getExperiencePoints(player);\n }", "private int get1(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getPenalties(); // sum of all penalty minutes\n curr = playerlist.next();\n }\n return t;\n }", "public int attack(Weapon byWeapon) {\n\t\treturn byWeapon.getDamage();\n\t}", "@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}", "private int get2(String name) {\n int t = 0;\n PlayerRecord curr = playerlist.first();\n while (curr != null) {\n if (curr.getTeamname().equals(name))\n t = t + curr.getWinninggoals(); // sum of all GWGs\n curr = playerlist.next();\n }\n return t;\n }", "public int getTotalEnemies() {\n\t\treturn totalEnemies;\n\t}", "public static Total total(Player player) {\r\n Deck hand = player.getHand();\r\n int min, max, value = 0, nbAces = 0;\r\n\r\n // ajout des cartes qui ne sont pas des as et comptage des as\r\n for (int i = 0; i < hand.getSize(); i++) {\r\n if(hand.get(i).isVisible()) {\r\n if(hand.get(i).getHeight() == 1) {\r\n nbAces++;\r\n value += 1;\r\n }\r\n else if(hand.get(i).getHeight() > 9) {\r\n value += 10;\r\n }\r\n else {\r\n value += hand.get(i).getHeight();\r\n }\r\n }\r\n }\r\n\r\n min = value;\r\n\r\n // ajout de dix points si on peut pour avoir le max\r\n if(value <= 11 && nbAces >= 1) {\r\n value += 10;\r\n max = value;\r\n } else {\r\n max = min;\r\n }\r\n\r\n // cas particulier : le joueur a un blackjack\r\n if(hand.getSize() == 2 && max == 21 && min == 11) {\r\n min = max = 32;\r\n }\r\n\r\n return new Total(min, max);\r\n }", "public int getFighterPoints() {\n\n return this.fighterPoints;\n }", "public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }", "public int seppuku(Monster monster) {\n double orginalAttackRating = getAttackRating();\n int damage = (int) Math.pow(getRotundness(), getKungFuSkill());\n setAttackRating(damage);\n setHp(1);\n int damageDone = attack(monster);\n setAttackRating(orginalAttackRating);\n return damageDone;\n }", "public int getAtk(Unit attacker, Unit defender){\r\n if(COP || SCOP)return 110;\r\n return 100;\r\n \r\n }", "public int getAttackStrength(Entity par1Entity)\n {\n ItemStack var2 = this.getHeldItem();\n int var3 = 5;\n\n\n return var3;\n }", "public int getAttack() {\r\n\t\treturn attack;\r\n\t}", "@Override\r\n public int getSpecialValue() {\n int num = this.getCombatLevel();\r\n num += this.levelChangeAgainstCultistPlayer;\r\n \r\n return num;\r\n }", "public void action(Player myPlayer)\n {\n if (getNbUtilisation() == 0) {\n System.out.println(\"Not possible\");\n } else {\n int nHealthy = getPointsHealthy();\n myPlayer.addLifePoints(nHealthy);\n\n }\n }" ]
[ "0.7492802", "0.6908303", "0.6830985", "0.68233633", "0.6814374", "0.67548716", "0.6729765", "0.6720718", "0.6712733", "0.6647967", "0.6584289", "0.6564181", "0.6550779", "0.6544359", "0.6537918", "0.6526043", "0.6523464", "0.6519914", "0.64917123", "0.6482068", "0.64733607", "0.6456607", "0.6454776", "0.6448451", "0.6427921", "0.6414618", "0.6341233", "0.6340582", "0.6331669", "0.63293284", "0.63277954", "0.63206875", "0.63161176", "0.63015556", "0.6286338", "0.6270134", "0.62692565", "0.6263591", "0.6257451", "0.6246136", "0.6232917", "0.6227091", "0.6222275", "0.6213117", "0.62090415", "0.61932653", "0.6188928", "0.61833763", "0.6179226", "0.6169574", "0.61655056", "0.61587435", "0.61581755", "0.6156246", "0.61557525", "0.6151888", "0.61450493", "0.61368763", "0.61266166", "0.61236525", "0.61189604", "0.61146706", "0.61146325", "0.61048734", "0.6090067", "0.6079012", "0.60755867", "0.60754097", "0.6070203", "0.6061859", "0.60565144", "0.6053866", "0.6052602", "0.60481805", "0.60461664", "0.6039313", "0.60315216", "0.6031042", "0.60246515", "0.60209835", "0.6017657", "0.6014065", "0.6003281", "0.6001401", "0.59922093", "0.59916556", "0.5979753", "0.59781194", "0.5977017", "0.59766823", "0.597576", "0.5975444", "0.596402", "0.59591293", "0.5957996", "0.5951824", "0.5950449", "0.5941743", "0.5941179", "0.5935163" ]
0.6612327
10
Function that calculates the damage dealt by the player to the monster
private static int playerDamageDealt(int playerAttack, int monsterDefense){ int playerDamageDealt; playerDamageDealt = (playerAttack - monsterDefense); return playerDamageDealt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int monsterDamageDealt(int monsterAttack, int playerDefense){\r\n int monsterDamageDealt;\r\n monsterDamageDealt = (monsterAttack - playerDefense);\r\n if(monsterDamageDealt < 0){\r\n monsterDamageDealt = 0;\r\n return monsterDamageDealt;\r\n }else{\r\n return monsterDamageDealt;\r\n }\r\n }", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void getDamaged(float dmg) {\n\t\tStagePanel.addValueLabel(parentGP,dmg,Commons.cAttack);\n\t\tif(shield - dmg >= 0) {\n\t\t\tshield-=dmg;\n\t\t\tdmg = 0;\n\t\t}else {\n\t\t\tdmg-=shield;\n\t\t\tshield = 0;\n\t\t}\n\t\tif(health-dmg > 0) {\n\t\t\thealth-=dmg;\n\t\t}else {\n\t\t\thealth = 0;\n\t\t}\n\t\tSoundEffect.play(\"Hurt.wav\");\n\t}", "public double damageCalculation(NPC mob, Player player) {\r\n double weapon = mob.getWeapon().getDamage();\r\n double attack = mob.getStats().getAttack();\r\n double defence = player.getStats().getDefence();\r\n\r\n return ((weapon + attack) * 2 - defence);\r\n }", "public float getHungerDamage();", "public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }", "public int computeDamageTo(Combatant opponent) { return 0; }", "private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }", "@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }", "@Override\n\tpublic int calculateDamage() \n\t{\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "private int calculateHeroDamageDone(Hero h, GenericMonster m){\n\t\t// Take into account armor, magic resist, thoughness, that kind of thing..\n\t\thDmg = h.getWeapon().calculateDamageDelt();\n\t\tcalcDef = new CalculateDefence(h.getWeapon(), m);\n\t\tint def = calcDef.getMonsterDefense();\n\t\t// Getting the defense value and type\n\t\tmResistance = calcDef.getMonsterDefType();\n\t\tmResistanceValue = calcDef.getMonsterDefValue();\n\t\treturn (hDmg - def);\n\t}", "private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }", "private void takeDamage(int damage){ health -= damage;}", "public int doDamage(Actor attacker, int damage){\n if( iframes==0 ){\n health -= damage;\n healthbar.setHealth(health);\n iframes = 20;\n MuteControl.playSound(attackSound);\n if (health>0) return damage;\n die();\n return damage;\n }else return 0;\n }", "public int giveDamage();", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "public int getDamageDealt () {\r\n\t\treturn this.damageDealt;\r\n\t}", "public void receiveDamage(double damage) {\r\n health = health - damage;\r\n }", "public int getDamage() {\n \t\treturn damage + ((int) 0.5*level);\n \t}", "public void takedmg(int dmg){\n curHp -= dmg;\n }", "@Override\n\tpublic void damage(float f) {\n\t\t\n\t}", "public short getSiegeWeaponDamage();", "public double damageCalculation(Player player, NPC mob) {\r\n double weapon = player.getWeapon().getDamage();\r\n double attack = player.getStats().getAttack();\r\n double defence = mob.getStats().getDefence();\r\n double critMulti = 1;\r\n\r\n// Chance chance = new Chance(player.getLevel(), player.getStats().getDexterity(), player.getCharacterClass());\r\n Chance chance = new Chance(player.getStats().getCritChance());\r\n boolean crit = chance.getSuccess();\r\n\r\n if (crit) {\r\n critMulti = 2;\r\n System.out.println(\"CRIT!\");\r\n } else {\r\n// System.out.println(\"No crit\");\r\n }\r\n\r\n return ((weapon + attack) * 2 - defence) * critMulti;\r\n }", "private void calculateDamage() {\n this.baseDamage = this.actualBaseDamage;\n this.applyPowers();\n this.baseDamage = Math.max(this.baseDamage - ((this.baseDamage * this.otherCardsPlayed) / this.magicNumber), 0);\n }", "public int getDamage () {\n\t\treturn (this.puissance + stuff.getDegat());\n\t}", "public int getDmg(){\r\n return enemyDmg;\r\n }", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "public void reduceHealth(int damage){\n health -= damage;\n }", "void decreaseHealth(Float damage);", "@Override\n\tpublic int fight(Enemy e1) {\n\t\tint damage = 0;\n\t\tRandom randomNum = new Random();\n\t\tdamage = 6 + randomNum.nextInt(4);\n\t\ttry {\n\t\t\te1.takeDamage(damage);\n\t\t} catch (InvalidDamageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn damage;\n\t}", "@Override\n\tpublic void onDamageDealt(Entity attacker, Entity defender, int damage, int attackType) {\n\n\t}", "public double getDamage() {\r\n\t\treturn damage;\r\n\t}", "public void getDamage(int damagePoint){\n hp-=damagePoint;\n if(hp==0){\n alive=false;\n }\n }", "@Override\n public int damageCalculator(final Heroes enemy, final Heroes hero) {\n float landModifier;\n int firstAbilityDamage;\n int secondAbilityDamage;\n if (enemy.getLocation().equals(\"V\")) {\n landModifier = factory.getLandModifiers(\"V\");\n } else {\n landModifier = LandModifiersFactory.getNoModifiers();\n }\n firstAbilityDamage = Math.round(landModifier * (factory.getAllDamages(\"fireblast\")\n + hero.getLevel() * factory.getAllLevelDamages(\"fireblast\")));\n secondAbilityDamage = Math.round(landModifier * (factory.getAllDamages(\"ignite\")\n + hero.getLevel() * factory.getAllLevelDamages(\"ignite\")));\n //retin damage-ul fara modificatori in caz ca adversarul este wizard\n enemy.setDamageReceived(firstAbilityDamage + secondAbilityDamage);\n firstAbilityDamage = Math.round(firstAbilityDamage\n * hero.getRaceModifiers1(enemy.getTypeOfHero()));\n secondAbilityDamage = Math.round(secondAbilityDamage\n * hero.getRaceModifiers2(enemy.getTypeOfHero()));\n //ii setez damage overtime\n enemy.setIgniteOvertimeDamage(2);\n return firstAbilityDamage + secondAbilityDamage;\n }", "public int calculateDamage(Player enemyPlayer)\n\t{\n\t\tint damage = 0;\n\t\tPokemon enemyPokemon = enemyPlayer.getActivePokemon();\n\t\tif(enemyPokemon.getClass() == FirePokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage() * 2;\n\t\t}\n\t\tif(enemyPokemon.getClass() == GrassPokemon.class)\n\t\t{\n\t\t\tdamage = (int)Math.round((move.getBaseDamage() * .5));\n\t\t}\n\t\tif(enemyPokemon.getClass() == WaterPokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage();\n\t\t}\n\t\treturn damage;\n\t}", "public double getDamage() {\n return damage;\n }", "public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }", "public float getDamage() {\n return damage;\n }", "public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}", "public void damage(int amount) {\n \tshield = shield - amount;\n }", "public static float calculateDamage(Weapon weapon, GameCharacter attacker, GameCharacter target) {\r\n\t\t\r\n\t\tfloat damage;\r\n\t\tboolean unarmed = weapon == null;\r\n\t\tif (unarmed) {\r\n\t\t\tint unarmedRank = attacker.stats().skills().getSkillRank(Skill.UNARMED); \r\n\t\t\tdamage = 1 + unarmedRank/ 2\r\n\t\t\t\t\t+ (unarmedRank > 0 ? GameState.getRandomGenerator().nextInt(unarmedRank) : 0);\r\n\t\t} else {\r\n\t\t\t// base damage\r\n\t\t\tint damMax = weapon.getWeaponDamageMax();\r\n\t\t\tint damMin = weapon.getWeaponDamageMin();\r\n\t\t\tdamage = (weapon.getWeaponBonus() + attacker.stats().skills().getSkillRank(weapon.getWeaponSkill())\r\n\t\t\t\t\t+ damMin + (damMax - damMin > 0 ? GameState.getRandomGenerator().nextInt(damMax - damMin) : 0));\r\n\t\t}\r\n\t\t// apply character modifiers\r\n\t\tdamage = attacker.stats().applyDamageModifiers(damage, unarmed);\r\n\r\n\t\t// reduce by targets armor rating\r\n\t\tdamage = ((float) damage / 100f) * (100 - (float) target.stats().getAR());\r\n\r\n\t\tif (damage < 1) {\r\n\t\t\tdamage = 1;\r\n\t\t}\r\n\r\n\t\treturn damage;\r\n\t}", "public int getDamage() {\n return damage;\n }", "public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}", "public void takeDamage(int damage);", "public static void makeDamageCalculation (SummonedMonster AttackingMonster, SummonedMonster GuardingMonster) {\r\n AttackingMonster.canStillAttackThisTurn = false; // Just in case this might be missed somewhere, erase its one attack per turn, because now there is no turning back.\r\n AttMonster.rememberPropertiesOfMonster(AttackingMonster);\r\n GuardMonster.rememberPropertiesOfMonster(GuardingMonster);\r\n // get the 2 relevant values for the attack calculation\r\n int relevantAttValue = AttackingMonster.att;\r\n int releventGuardingValue = GuardingMonster.relevantValue();\r\n // get some relevant properties of the involved monsters\r\n boolean attackingMonsterIndestructible = AttackingMonster.isIndestructibleByBattle();\r\n boolean attackingMonsterImmuneWhileWinning = AttackingMonster.isImmuneWhileWinning();\r\n boolean attackingMonsterImmune = AttackingMonster.isImmune();\r\n boolean attackingMonsterBanishes = AttackingMonster.isBanishingOpposingMonster(GuardingMonster);\r\n boolean attackingMonsterBanishesBoth = AttackingMonster.isBanishingBothMonsters(GuardingMonster);\r\n \r\n boolean guardingMonsterIndestructible = GuardingMonster.isIndestructibleByBattle();\r\n boolean guardingMonsterImmuneWhileWinning = GuardingMonster.isImmuneWhileWinning();\r\n boolean guardingMonsterImmune = GuardingMonster.isImmune();\r\n boolean guardingMonsterBanishes = GuardingMonster.isBanishingOpposingMonster(AttackingMonster);\r\n boolean guardingMonsterBanishesBoth = GuardingMonster.isBanishingBothMonsters(AttackingMonster);\r\n // let monsters clash here\r\n if (relevantAttValue == releventGuardingValue) {\r\n if (relevantAttValue==0) {\r\n YuGiOhJi.informationDialog(\"Nothing happens, because of zero attack.\", \"\");\r\n endAttack(false);\r\n }\r\n else {\r\n if (GuardingMonster.isInAttackMode) { // usually both monsters kill each other\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else if (guardingMonsterBanishesBoth) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else {\r\n if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n }\r\n if (!guardingMonsterIndestructible && attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, false);\r\n }\r\n else if (guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(true, false); // suicide effect of attacking monster\r\n }\r\n else if (!guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, true); // double kill here\r\n }\r\n else { // if both are indestructible, none of them has a suicide effect\r\n endDamageStep(false); // here both survive\r\n }\r\n } // else nothing happens\r\n }\r\n }\r\n else if (relevantAttValue > releventGuardingValue) { // here the attacking monster usually kills the guarding one\r\n // look if attacking monster is either piercing by itself or copies Lance or Holy Lance\r\n boolean isEffectivelyPiercing = (AttackingMonster.hasPiercingDamageAbility() && !guardingMonsterImmune);\r\n boolean isContinuingGame = true;\r\n if (GuardingMonster.isInAttackMode || isEffectivelyPiercing) {\r\n isContinuingGame = isDealingBattleDamageAndContinuingGame(false, relevantAttValue-releventGuardingValue, GuardingMonster.isPlayersMonster);\r\n } // else no damage\r\n if (isContinuingGame) {\r\n if (guardingMonsterBanishesBoth) { // definitely banishes itself\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) { // banishes opponent only, if it not immune against it\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n possibleSuicideEffect(false, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n else { // here: relevantAttValue < releventGuardingValue\r\n // rare case in which attacker gets the damage\r\n boolean isContinuingGame = isDealingBattleDamageAndContinuingGame(false, releventGuardingValue-relevantAttValue, AttackingMonster.isPlayersMonster);\r\n if (isContinuingGame) {\r\n if (GuardingMonster.isInAttackMode) {\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n possibleSuicideEffect(true, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n \r\n }", "public int getDamage() {\r\n\t\treturn damage;\r\n\t}", "AbilityDamage getAbilityDamage();", "public void dealDamage(int damage) {\r\n\t\thealth -= damage;\r\n\t\tif (health <= 0)\r\n\t\t\tdeath = true;\r\n\t\t_checkInvariant();\r\n\t}", "public int getDamage() {\n //TODO\n return 1;\n }", "@Override\n\tpublic void takeDamage(double damage) {\n\n\t}", "public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }", "public long damage(long damage, long mana)\r\n\t{\r\n\t\tif (isDragonOnMe)\r\n\t\t\treturn damageMySelf(2*damage, mana);\r\n\t\telse\r\n\t\t\treturn damageMySelf(damage, mana);\r\n\t}", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public Entity getDamageDealer();", "public void damage(int damage, int penetration) {\n int def = defense;\n if (shield != null ) def += shield.getDefense();\n def = defense - penetration;\n if (def < 0) def = 0;\n if (def >= damage) return;\n health -= (damage - def);\n if (health < 0) health = 0;\n decreaseMoral((damage-def)/30);\n if (leader)\n color = new Color(color.getRed(), color.getGreen() + (damage-def)/2, color.getBlue() + (damage-def)/2);\n else\n color = new Color(color.getRed(), color.getGreen() + (damage-def)*2 , color.getBlue() + (damage-def)*2);\n }", "public void handleAttack(int damage) {\n this.health -= damage;\n }", "public void damage(int damageTaken) {\n //TODO: Create specific damage methods instead of damage calls everywhere(see damagedByBullet())\n if (!invincible) {\n this.hp -= damageTaken;\n }\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public void reduceHealth(int damage, int player) {\n\t\tif (player == OPPONENT) {\n\t\t\tint currentHealth = Integer.parseInt(opponentHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\topponentHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = opponentHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(0,reduction);\n\t\t} else if (player == LOCAL) {\n\t\t\tint currentHealth = Integer.parseInt(localHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\tlocalHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = localHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(1,reduction);\n\t\t}\n\t}", "boolean takeDamage(int dmg);", "public double attack(Legendary other) {\n double effectiveness = getTypeEffectiveness(other);\n double dmg = computeDamage(effectiveness);\n String attackStatus = Mokedex.getAttackStatus(effectiveness);\n \n LockFactory.getLock(\"mok\").lock();\n other.hp -= dmg;\n System.out.println(name + \" dealt \" + dmg + \"HP to \" + other.name + \"!\\n\");\n System.out.println(attackStatus);\n other.display();\n System.out.println(other.name + \" has \" + Math.max(0, other.hp) + \" remaining health.\\n\");\n if (other.hasFainted()) {\n System.out.println(other.name + \" has fainted!\\n\");\n }\n LockFactory.getLock(\"mok\").unlock();\n other.takeRevenge(this);\n\n return dmg;\n }", "@Override\n public int getEffectiveDamage(Hero hero){\n return (hero.getDex() + hero.getBonusDex()) * 2 + this.damage;\n }", "public int takeDamage(Enemy enemy)\n {\n int damage = Items.determineDamage(\n enemy.getWeapon(),\n this.getArmor(),\n enemy.fight()\n );\n this.setHealth(this.getHealth() - damage);\n return damage;\n }", "public int getDamage() {\n\t\treturn (int) (Math.random() * damageVariance) + damage;\n\t}", "public void takeDamage(int dmg) {\n\t\thealth -= dmg;\n\t}", "@Override\n public double getDamageAmount() {\n return this.getStrength().getAbilityValue();\n }", "public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }", "public int getDamage() {\r\n\t\treturn myDamage;\r\n\t}", "@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker)\n\t{\n\t\treduceCurrentHp(damage, attacker, true);\n\t}", "public void func_180430_e(float distance, float damageMultiplier) {}", "@Override\n\tpublic int getDamageVsEntity(Entity e){\n\t\treturn 0;\n\t}", "public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }", "public int getDamage()\n\t{\n\t\treturn Damage;\n\t}", "public int computeRangedDamageTo(Combatant opponent) { return 0; }", "public int getDamage() {\n\t\t\treturn damage;\n\t\t}", "public void takeDamage(int damage) {\r\n this.health -= damage;\r\n if(this.health < 0)\r\n this.health = 0;\r\n }", "public abstract int doDamage(int time, GenericMovableUnit unit, Unit target);", "public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}", "public int getWeaponDamage()\n {\n \t\treturn mystuff.getWepDmg();\n }", "@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }" ]
[ "0.8033791", "0.75416774", "0.75278026", "0.7497036", "0.739567", "0.7356574", "0.7348996", "0.7348996", "0.7348996", "0.7348996", "0.7348996", "0.73362625", "0.7331226", "0.730835", "0.730568", "0.72791", "0.7271019", "0.7258118", "0.72460866", "0.7242688", "0.7239158", "0.72065276", "0.7194166", "0.7154228", "0.7149906", "0.71455044", "0.71198255", "0.7112193", "0.70813257", "0.70757574", "0.70460236", "0.7036407", "0.70206326", "0.70019954", "0.6974603", "0.6973292", "0.6970235", "0.6957605", "0.6955482", "0.69453436", "0.69351745", "0.68987125", "0.6898418", "0.68978", "0.68963784", "0.68905884", "0.68798107", "0.6872356", "0.68684775", "0.6849886", "0.6830605", "0.68211055", "0.68163127", "0.68047756", "0.6801003", "0.67974985", "0.6791168", "0.67665476", "0.6761375", "0.67455256", "0.67378426", "0.67370135", "0.67251706", "0.67132306", "0.67132306", "0.67132306", "0.67132306", "0.67132306", "0.6693292", "0.6691282", "0.66846895", "0.6682412", "0.66792476", "0.66792476", "0.66792476", "0.66792476", "0.66792476", "0.66741747", "0.6670612", "0.6659507", "0.6659354", "0.6652504", "0.6651722", "0.6632992", "0.66162616", "0.6616202", "0.6614475", "0.6614249", "0.6613726", "0.66055965", "0.66055673", "0.6596652", "0.65803045", "0.65762854", "0.65732396", "0.6568913", "0.6553501", "0.6551086", "0.65502894", "0.65418994" ]
0.84113944
0
Function that calculates the damage the monster dealt to the player
private static int monsterDamageDealt(int monsterAttack, int playerDefense){ int monsterDamageDealt; monsterDamageDealt = (monsterAttack - playerDefense); if(monsterDamageDealt < 0){ monsterDamageDealt = 0; return monsterDamageDealt; }else{ return monsterDamageDealt; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "public double damageCalculation(NPC mob, Player player) {\r\n double weapon = mob.getWeapon().getDamage();\r\n double attack = mob.getStats().getAttack();\r\n double defence = player.getStats().getDefence();\r\n\r\n return ((weapon + attack) * 2 - defence);\r\n }", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public float getHungerDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "public void getDamaged(float dmg) {\n\t\tStagePanel.addValueLabel(parentGP,dmg,Commons.cAttack);\n\t\tif(shield - dmg >= 0) {\n\t\t\tshield-=dmg;\n\t\t\tdmg = 0;\n\t\t}else {\n\t\t\tdmg-=shield;\n\t\t\tshield = 0;\n\t\t}\n\t\tif(health-dmg > 0) {\n\t\t\thealth-=dmg;\n\t\t}else {\n\t\t\thealth = 0;\n\t\t}\n\t\tSoundEffect.play(\"Hurt.wav\");\n\t}", "private int calculateHeroDamageDone(Hero h, GenericMonster m){\n\t\t// Take into account armor, magic resist, thoughness, that kind of thing..\n\t\thDmg = h.getWeapon().calculateDamageDelt();\n\t\tcalcDef = new CalculateDefence(h.getWeapon(), m);\n\t\tint def = calcDef.getMonsterDefense();\n\t\t// Getting the defense value and type\n\t\tmResistance = calcDef.getMonsterDefType();\n\t\tmResistanceValue = calcDef.getMonsterDefValue();\n\t\treturn (hDmg - def);\n\t}", "@Override\n\tpublic int calculateDamage() \n\t{\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }", "public short getSiegeWeaponDamage();", "public int computeDamageTo(Combatant opponent) { return 0; }", "private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }", "public int getDamage() {\n \t\treturn damage + ((int) 0.5*level);\n \t}", "public double damageCalculation(Player player, NPC mob) {\r\n double weapon = player.getWeapon().getDamage();\r\n double attack = player.getStats().getAttack();\r\n double defence = mob.getStats().getDefence();\r\n double critMulti = 1;\r\n\r\n// Chance chance = new Chance(player.getLevel(), player.getStats().getDexterity(), player.getCharacterClass());\r\n Chance chance = new Chance(player.getStats().getCritChance());\r\n boolean crit = chance.getSuccess();\r\n\r\n if (crit) {\r\n critMulti = 2;\r\n System.out.println(\"CRIT!\");\r\n } else {\r\n// System.out.println(\"No crit\");\r\n }\r\n\r\n return ((weapon + attack) * 2 - defence) * critMulti;\r\n }", "public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }", "private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }", "public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }", "public int giveDamage();", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "public int doDamage(Actor attacker, int damage){\n if( iframes==0 ){\n health -= damage;\n healthbar.setHealth(health);\n iframes = 20;\n MuteControl.playSound(attackSound);\n if (health>0) return damage;\n die();\n return damage;\n }else return 0;\n }", "public int getDamage () {\n\t\treturn (this.puissance + stuff.getDegat());\n\t}", "private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public int getDamageDealt () {\r\n\t\treturn this.damageDealt;\r\n\t}", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "private void calculateDamage() {\n this.baseDamage = this.actualBaseDamage;\n this.applyPowers();\n this.baseDamage = Math.max(this.baseDamage - ((this.baseDamage * this.otherCardsPlayed) / this.magicNumber), 0);\n }", "public int calculateDamage(Player enemyPlayer)\n\t{\n\t\tint damage = 0;\n\t\tPokemon enemyPokemon = enemyPlayer.getActivePokemon();\n\t\tif(enemyPokemon.getClass() == FirePokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage() * 2;\n\t\t}\n\t\tif(enemyPokemon.getClass() == GrassPokemon.class)\n\t\t{\n\t\t\tdamage = (int)Math.round((move.getBaseDamage() * .5));\n\t\t}\n\t\tif(enemyPokemon.getClass() == WaterPokemon.class)\n\t\t{\n\t\t\tdamage = move.getBaseDamage();\n\t\t}\n\t\treturn damage;\n\t}", "public double getDamage() {\r\n\t\treturn damage;\r\n\t}", "public int getDmg(){\r\n return enemyDmg;\r\n }", "@Override\n\tpublic int fight(Enemy e1) {\n\t\tint damage = 0;\n\t\tRandom randomNum = new Random();\n\t\tdamage = 6 + randomNum.nextInt(4);\n\t\ttry {\n\t\t\te1.takeDamage(damage);\n\t\t} catch (InvalidDamageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn damage;\n\t}", "private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "public static float calculateDamage(Weapon weapon, GameCharacter attacker, GameCharacter target) {\r\n\t\t\r\n\t\tfloat damage;\r\n\t\tboolean unarmed = weapon == null;\r\n\t\tif (unarmed) {\r\n\t\t\tint unarmedRank = attacker.stats().skills().getSkillRank(Skill.UNARMED); \r\n\t\t\tdamage = 1 + unarmedRank/ 2\r\n\t\t\t\t\t+ (unarmedRank > 0 ? GameState.getRandomGenerator().nextInt(unarmedRank) : 0);\r\n\t\t} else {\r\n\t\t\t// base damage\r\n\t\t\tint damMax = weapon.getWeaponDamageMax();\r\n\t\t\tint damMin = weapon.getWeaponDamageMin();\r\n\t\t\tdamage = (weapon.getWeaponBonus() + attacker.stats().skills().getSkillRank(weapon.getWeaponSkill())\r\n\t\t\t\t\t+ damMin + (damMax - damMin > 0 ? GameState.getRandomGenerator().nextInt(damMax - damMin) : 0));\r\n\t\t}\r\n\t\t// apply character modifiers\r\n\t\tdamage = attacker.stats().applyDamageModifiers(damage, unarmed);\r\n\r\n\t\t// reduce by targets armor rating\r\n\t\tdamage = ((float) damage / 100f) * (100 - (float) target.stats().getAR());\r\n\r\n\t\tif (damage < 1) {\r\n\t\t\tdamage = 1;\r\n\t\t}\r\n\r\n\t\treturn damage;\r\n\t}", "public double getDamage() {\n return damage;\n }", "private void takeDamage(int damage){ health -= damage;}", "public void receiveDamage(double damage) {\r\n health = health - damage;\r\n }", "@Override\n public int damageCalculator(final Heroes enemy, final Heroes hero) {\n float landModifier;\n int firstAbilityDamage;\n int secondAbilityDamage;\n if (enemy.getLocation().equals(\"V\")) {\n landModifier = factory.getLandModifiers(\"V\");\n } else {\n landModifier = LandModifiersFactory.getNoModifiers();\n }\n firstAbilityDamage = Math.round(landModifier * (factory.getAllDamages(\"fireblast\")\n + hero.getLevel() * factory.getAllLevelDamages(\"fireblast\")));\n secondAbilityDamage = Math.round(landModifier * (factory.getAllDamages(\"ignite\")\n + hero.getLevel() * factory.getAllLevelDamages(\"ignite\")));\n //retin damage-ul fara modificatori in caz ca adversarul este wizard\n enemy.setDamageReceived(firstAbilityDamage + secondAbilityDamage);\n firstAbilityDamage = Math.round(firstAbilityDamage\n * hero.getRaceModifiers1(enemy.getTypeOfHero()));\n secondAbilityDamage = Math.round(secondAbilityDamage\n * hero.getRaceModifiers2(enemy.getTypeOfHero()));\n //ii setez damage overtime\n enemy.setIgniteOvertimeDamage(2);\n return firstAbilityDamage + secondAbilityDamage;\n }", "public float getDamage() {\n return damage;\n }", "public int getDamage() {\n //TODO\n return 1;\n }", "public int getDamage() {\r\n\t\treturn damage;\r\n\t}", "@Override\n\tpublic void damage(float f) {\n\t\t\n\t}", "public int getDamage() {\n return damage;\n }", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "public static void makeDamageCalculation (SummonedMonster AttackingMonster, SummonedMonster GuardingMonster) {\r\n AttackingMonster.canStillAttackThisTurn = false; // Just in case this might be missed somewhere, erase its one attack per turn, because now there is no turning back.\r\n AttMonster.rememberPropertiesOfMonster(AttackingMonster);\r\n GuardMonster.rememberPropertiesOfMonster(GuardingMonster);\r\n // get the 2 relevant values for the attack calculation\r\n int relevantAttValue = AttackingMonster.att;\r\n int releventGuardingValue = GuardingMonster.relevantValue();\r\n // get some relevant properties of the involved monsters\r\n boolean attackingMonsterIndestructible = AttackingMonster.isIndestructibleByBattle();\r\n boolean attackingMonsterImmuneWhileWinning = AttackingMonster.isImmuneWhileWinning();\r\n boolean attackingMonsterImmune = AttackingMonster.isImmune();\r\n boolean attackingMonsterBanishes = AttackingMonster.isBanishingOpposingMonster(GuardingMonster);\r\n boolean attackingMonsterBanishesBoth = AttackingMonster.isBanishingBothMonsters(GuardingMonster);\r\n \r\n boolean guardingMonsterIndestructible = GuardingMonster.isIndestructibleByBattle();\r\n boolean guardingMonsterImmuneWhileWinning = GuardingMonster.isImmuneWhileWinning();\r\n boolean guardingMonsterImmune = GuardingMonster.isImmune();\r\n boolean guardingMonsterBanishes = GuardingMonster.isBanishingOpposingMonster(AttackingMonster);\r\n boolean guardingMonsterBanishesBoth = GuardingMonster.isBanishingBothMonsters(AttackingMonster);\r\n // let monsters clash here\r\n if (relevantAttValue == releventGuardingValue) {\r\n if (relevantAttValue==0) {\r\n YuGiOhJi.informationDialog(\"Nothing happens, because of zero attack.\", \"\");\r\n endAttack(false);\r\n }\r\n else {\r\n if (GuardingMonster.isInAttackMode) { // usually both monsters kill each other\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else if (guardingMonsterBanishesBoth) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else {\r\n if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n }\r\n if (!guardingMonsterIndestructible && attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, false);\r\n }\r\n else if (guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(true, false); // suicide effect of attacking monster\r\n }\r\n else if (!guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, true); // double kill here\r\n }\r\n else { // if both are indestructible, none of them has a suicide effect\r\n endDamageStep(false); // here both survive\r\n }\r\n } // else nothing happens\r\n }\r\n }\r\n else if (relevantAttValue > releventGuardingValue) { // here the attacking monster usually kills the guarding one\r\n // look if attacking monster is either piercing by itself or copies Lance or Holy Lance\r\n boolean isEffectivelyPiercing = (AttackingMonster.hasPiercingDamageAbility() && !guardingMonsterImmune);\r\n boolean isContinuingGame = true;\r\n if (GuardingMonster.isInAttackMode || isEffectivelyPiercing) {\r\n isContinuingGame = isDealingBattleDamageAndContinuingGame(false, relevantAttValue-releventGuardingValue, GuardingMonster.isPlayersMonster);\r\n } // else no damage\r\n if (isContinuingGame) {\r\n if (guardingMonsterBanishesBoth) { // definitely banishes itself\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) { // banishes opponent only, if it not immune against it\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n possibleSuicideEffect(false, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n else { // here: relevantAttValue < releventGuardingValue\r\n // rare case in which attacker gets the damage\r\n boolean isContinuingGame = isDealingBattleDamageAndContinuingGame(false, releventGuardingValue-relevantAttValue, AttackingMonster.isPlayersMonster);\r\n if (isContinuingGame) {\r\n if (GuardingMonster.isInAttackMode) {\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n possibleSuicideEffect(true, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n \r\n }", "public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }", "public void reduceHealth(int damage){\n health -= damage;\n }", "AbilityDamage getAbilityDamage();", "public void takedmg(int dmg){\n curHp -= dmg;\n }", "public int calcCharMagicDamage() \n\t{\n\t\treturn npcInt;\n\t}", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getWeaponDamage()\n {\n \t\treturn mystuff.getWepDmg();\n }", "@Override\n public int getEffectiveDamage(Hero hero){\n return (hero.getDex() + hero.getBonusDex()) * 2 + this.damage;\n }", "public long damage(long damage, long mana)\r\n\t{\r\n\t\tif (isDragonOnMe)\r\n\t\t\treturn damageMySelf(2*damage, mana);\r\n\t\telse\r\n\t\t\treturn damageMySelf(damage, mana);\r\n\t}", "public int getDamage() {\n\t\treturn (int) (Math.random() * damageVariance) + damage;\n\t}", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public int getDamage() {\n return damage_;\n }", "public void getDamage(int damagePoint){\n hp-=damagePoint;\n if(hp==0){\n alive=false;\n }\n }", "void decreaseHealth(Float damage);", "public short getBowDamage();", "public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "public int getDamage() {\r\n\t\treturn myDamage;\r\n\t}", "@Override\n public double getDamageAmount() {\n return this.getStrength().getAbilityValue();\n }", "public int getDamage() {\n\t\t\treturn damage;\n\t\t}", "public int getDamage()\n\t{\n\t\treturn Damage;\n\t}", "public void damage(int amount) {\n \tshield = shield - amount;\n }", "public int getEquippedWeaponDamage() {\n return 0;\n }", "public int takeDamage(Enemy enemy)\n {\n int damage = Items.determineDamage(\n enemy.getWeapon(),\n this.getArmor(),\n enemy.fight()\n );\n this.setHealth(this.getHealth() - damage);\n return damage;\n }", "public static double valueOfMinionDamage(int damage) {\n return Math.min(AI.VALUE_OF_DESTROY, 2.466 * Math.log(damage / 2. + 1));\n }", "public double getChange(Monsters monster) {\n return (player.getSkill() + player.getAttack() + player.getDefence()) / (monster.getSkill() + monster.getDefence() + monster.getAttack());\n }", "public int getDamage() {\n\t\treturn this.damage;\n\t}", "private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }", "public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }", "public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}", "public double attack(Legendary other) {\n double effectiveness = getTypeEffectiveness(other);\n double dmg = computeDamage(effectiveness);\n String attackStatus = Mokedex.getAttackStatus(effectiveness);\n \n LockFactory.getLock(\"mok\").lock();\n other.hp -= dmg;\n System.out.println(name + \" dealt \" + dmg + \"HP to \" + other.name + \"!\\n\");\n System.out.println(attackStatus);\n other.display();\n System.out.println(other.name + \" has \" + Math.max(0, other.hp) + \" remaining health.\\n\");\n if (other.hasFainted()) {\n System.out.println(other.name + \" has fainted!\\n\");\n }\n LockFactory.getLock(\"mok\").unlock();\n other.takeRevenge(this);\n\n return dmg;\n }", "public void dealDamage(int damage) {\r\n\t\thealth -= damage;\r\n\t\tif (health <= 0)\r\n\t\t\tdeath = true;\r\n\t\t_checkInvariant();\r\n\t}", "@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker)\n\t{\n\t\treduceCurrentHp(damage, attacker, true);\n\t}", "public void damage(float dhealth) {\n\t\tif (_isDamagable) _health -= dhealth;\n\t\telse System.err.println(\"Entity not damagable! (MovingEntity.damage)\");\n\t}", "public void handleAttack(int damage) {\n this.health -= damage;\n }", "public void takeDamage(int damage);", "@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }", "public void damage(int damage, int penetration) {\n int def = defense;\n if (shield != null ) def += shield.getDefense();\n def = defense - penetration;\n if (def < 0) def = 0;\n if (def >= damage) return;\n health -= (damage - def);\n if (health < 0) health = 0;\n decreaseMoral((damage-def)/30);\n if (leader)\n color = new Color(color.getRed(), color.getGreen() + (damage-def)/2, color.getBlue() + (damage-def)/2);\n else\n color = new Color(color.getRed(), color.getGreen() + (damage-def)*2 , color.getBlue() + (damage-def)*2);\n }", "public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public void func_180430_e(float distance, float damageMultiplier) {}", "int getMinigameDefenseChancesLeft();", "@Override\n\tpublic void onDamageDealt(Entity attacker, Entity defender, int damage, int attackType) {\n\n\t}", "public int getWeaponDamage() {\n return Math.round(type.getWeaponDamage()*type.getItemLevelMultipliers()\n\t\t\t\t[level - 1]);\n }", "public void reduceHealth(int damage, int player) {\n\t\tif (player == OPPONENT) {\n\t\t\tint currentHealth = Integer.parseInt(opponentHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\topponentHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = opponentHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(0,reduction);\n\t\t} else if (player == LOCAL) {\n\t\t\tint currentHealth = Integer.parseInt(localHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\tlocalHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = localHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(1,reduction);\n\t\t}\n\t}" ]
[ "0.83176595", "0.76631033", "0.7474629", "0.7437654", "0.7380156", "0.7380156", "0.7380156", "0.7380156", "0.7380156", "0.733466", "0.73265356", "0.73163676", "0.72715473", "0.7254559", "0.72182614", "0.72085905", "0.7208576", "0.7198559", "0.7185789", "0.71655697", "0.71533597", "0.7130796", "0.7129832", "0.71143794", "0.71039414", "0.70747775", "0.70649564", "0.7060786", "0.7060632", "0.7015402", "0.70144105", "0.7004677", "0.7001881", "0.69723415", "0.6961518", "0.6954632", "0.6949398", "0.6948103", "0.69426954", "0.69298387", "0.69216245", "0.6918749", "0.6909663", "0.6905121", "0.68932706", "0.6891683", "0.6886246", "0.6858412", "0.685409", "0.6846431", "0.6805493", "0.68027073", "0.68015987", "0.6798633", "0.6798633", "0.6798633", "0.6798633", "0.6798633", "0.6788433", "0.67803895", "0.6778618", "0.67708415", "0.6768673", "0.6768673", "0.6768673", "0.6768673", "0.6768673", "0.67683184", "0.6764511", "0.673344", "0.6725252", "0.67220175", "0.67158276", "0.67146444", "0.6706165", "0.6698575", "0.6689911", "0.6677112", "0.6664568", "0.6647909", "0.6638957", "0.6606042", "0.660546", "0.66012937", "0.65805954", "0.6576524", "0.65718806", "0.65694684", "0.65672594", "0.6566729", "0.6565446", "0.6559341", "0.65582836", "0.65573454", "0.6553276", "0.6544609", "0.6543604", "0.6538462", "0.65277463", "0.6525786" ]
0.7940183
1
Function that displays the bag
private static void displayBag(String[] bag){ for(int i=0; i<bag.length; i++){ //Checks to see if slots 4, 8, or 12 are empty if((i == 4 || i == 8 || i == 12) && bag[i].equals("")){ System.out.print("\n| "); System.out.print("-"); System.out.print(" |"); //Checks if there is an item in slots 4, 8, or 12 }else if (i == 4 || i == 8 | i == 12){ System.out.print("\n| "); System.out.print(bag[i]); System.out.print(" |"); //Checks if all other slots are empty }else if(bag[i].equals("")){ System.out.print("| "); System.out.print("-"); System.out.print(" |"); //All other slots have an item and is printed out }else{ System.out.print("| "); System.out.print(bag[i]); System.out.print(" |"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void display() {\n\t\tif (bag.getSize() == 0) {\n\t\t\tSystem.out.println(\"The bag is empty!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"**You have \" + bag.getSize() + \" items in the bag.\");\n\t\t\tbag.print();\n\t\t\tSystem.out.println(\"**End of list\");\n\t\t}\n\t}", "private static void displayBag(BagInterface<String> aBag)\n {\n System.out.println(\"The bag contains the following string(s):\");\n Object[] bagArray = aBag.toArray();\n for (int index = 0; index < bagArray.length; index++)\n {\n System.out.print(bagArray[index] + \" \");\n } // end for\n\n System.out.println();\n }", "void display()\r\n\t{\r\n\t\tSystem.out.println(\"bikeid=\"+bikeid+\" bike name==\"+bikename);\r\n\t}", "private void viewBackpack() {\n Item[] inventory = GameControl.getSortedInventoryList();\r\n \r\n System.out.println(\"\\n List of inventory Items\");\r\n System.out.println(\"Description\" + \"\\t\" + \r\n \"Required\" + \"\\t\" +\r\n \"In Stock\");\r\n \r\n // For each inventory item\r\n for (Item inventoryItem : inventory){\r\n // Display the description, the required amount and amount in stock\r\n System.out.println(InventoryItem.getType + \"\\t \" +\r\n InventoryItem.requiredAmount + \"\\t \" +\r\n InventoryItem.getQuantity);\r\n }\r\n \r\n }", "public void dumpBag() {\n while (tileBag.size() > 0) {\n System.out.print(tileBag.remove(0) + \" - \");\n }\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "void display() {\n System.out.println(\"============================================================================================\");\n System.out.println(\"Name of the book:: \" + Bname);\n System.out.println(\"Price of the book:: Rs \" + price);\n System.out.println(\"============================================================================================\");\n }", "public static void ViewNewBagType()\r\n{\r\n\r\n\r\n\tselectBagType(RandomString);\r\n\tSystem.out.println(\"BagTypeName Viewed Successfully\");\r\n\t\r\n}", "public void displayCartContents() {\r\n for (int i = 0; i < numItems; i++) { // Checks all objects in the cart\r\n if ((cart[i].getContents() != \"\")) { // If not item\r\n System.out.println(cart[i].getDescription()); // Display bag description\r\n System.out.println(cart[i].getContents()); // Display contents of bag\r\n } else { // Else it must be item\r\n System.out.println(cart[i].getDescription()); // Display item description\r\n }\r\n }\r\n }", "@Override\n public void visualize() {\n if (this.count() > 0){\n for (int i = 0; i < this.count(); i++){\n System.out.println(i + \".- \" + this.bench.get(i).getName() + \" (ID: \" + this.bench.get(i).getId() + \")\");\n }\n } else {\n System.out.println(\"La banca está vacía.\");\n }\n\n }", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "public Bag getBag()\n\t{\n\t\treturn m_bag;\n\t}", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public String chooseArticlesPackage(Bag bag) {\n\t\t StringBuilder result = new StringBuilder();\n\t\t double countWeightBag=0;\n\t\t if(bag.getArticles() != null) {\n\t\t\t bag.setArticles(orderArticles(bag.getArticles()));\t\t \n\t\t int position=0;\n\t\t int countArticles = 0;\n\t\t while(countWeightBag<bag.getCapacity() \n\t\t \t\t && countWeightBag < Constants.MAXIMUN_WEIGHT_BAG\n\t\t \t\t && position < bag.getArticles().size()) {\n\t\t Article thing = bag.getArticles().get(position);\n\t\t if(countWeightBag + thing.getWeight() <= bag.getCapacity() \n\t\t \t\t && countArticles <= Constants.AMOUNT_MAXIMUN_ARTICLES_PER_BAG) {\n\t\t result.append(thing.getIndex()).append(Constants.COMMA);\n\t\t countWeightBag+=thing.getWeight();\n\t\t countArticles++;\t\t \n\t\t }\n\t\t position++;\n\t\t }\t\t \n\t\t }\n\t\t if(countWeightBag == 0) {\n\t \t result.append(Constants.LINE);\n\t }\n\t return result.toString();\n\t }", "public static void bdisplay() {\n\n for (int i = 0; i < 5; i++) {\n card[i][0] = (int) B.get(i);\n }\n }", "public void display()\r\n\t{\r\n\t\tif(this.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Empty... nothing to display\");\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The Array: \");\t\r\n\t\tfor (int i =0; i<bookArray.length; i++)\r\n\t\t{\r\n\t\t\tif(bookArray[i]!=null)\r\n\t\t\t\tSystem.out.println(\"\\t\"+'\"'+bookArray[i]+'\"');\r\n\t\t}\r\n\t }\r\n\t}", "public static void main(String[] args) {\n\t\tSet<Bag> bags = new TreeSet<Bag>();\n\t\tBag bag1=new Bag(\"LV\",15000.0);\n\t\tBag bag2=new Bag(\"hermas\",100000.0);\n\t\tBag bag3=new Bag(\"chanel\",30000.0);\n\t\tBag bag4=new Bag(\"coach\",3000.0);\n\t\tBag bag5=new Bag(\"MK\",2000.0);\n\t\tbags.add(bag1);\n\t\tbags.add(bag2);\n\t\tbags.add(bag3);\n\t\tbags.add(bag4);\n\t\tbags.add(bag5);\n\t\tfor(Bag bag:bags){//foreach循环\n\t\t\tSystem.out.println(bag);\n\t\t}\n \t}", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "public void displayBook()\n\t{\n\t\tb.display();\n\t\tSystem.out.println(\"Available Books=\"+availableBooks+\"\\n\");\n\t}", "public int get_nrBags() {\r\n return this.nr_bags;\r\n }", "public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Discount Code: \" + discode);\r\n\t\tSystem.out.println(\"Group Size: \" + groupsize);\r\n\t\t\r\n\t}", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "private static String displayItemFromBag(String[] inventory, String option){\r\n String itemToDoAction;\r\n int counter = 1;\r\n if(option.equals(\"Equip\")){\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Short Sword\") || inventory[i].equals(\"Leather Helmet\") || inventory[i].equals(\"Leather Chest Plate\")\r\n || inventory[i].equals(\"Long Sword\") || inventory[i].equals(\"Great Sword\") || inventory[i].equals(\"Iron Helmet\") \r\n ||inventory[i].equals(\"Iron Chest Plate\") || inventory[i].equals(\"Iron Boots\") || inventory[i].equals(\"Iron Gloves\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to equip? \\n(Type the name of the item) \");\r\n }else if(option.equals(\"Sell\")){\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Short Sword\") || inventory[i].equals(\"Leather Helmet\") || inventory[i].equals(\"Leather Chest Plate\")\r\n || inventory[i].equals(\"Long Sword\") || inventory[i].equals(\"Great Sword\") || inventory[i].equals(\"Iron Helmet\") \r\n ||inventory[i].equals(\"Iron Chest Plate\") || inventory[i].equals(\"Iron Boots\") || inventory[i].equals(\"Iron Gloves\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to sell? \\n(Type the name of the item) \");\r\n }else if(option.equals(\"Use\")){\r\n System.out.println(\"we here\");\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Healing Potion\") || inventory[i].equals(\"Greater Healing Potion\") || inventory[i].equals(\"Scroll of Fireball\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to use? \\n(Type the name of the item) \");\r\n }else{\r\n itemToDoAction = \"\";\r\n }\r\n return itemToDoAction;\r\n }", "public void display() {\n\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t\n\t\tfor (byte r = (byte) (b.length - 1); r >= 0; r--) {\n\t\t\tSystem.out.print(r + 1);\n\t\t\t\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tSystem.out.print(\" | \" + b[r][c]);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\" |\");\n\t\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" a b c d e f g h\");\n\t}", "public void displayGame()\n { \n System.out.println(\"\\n-------------------------------------------\\n\");\n for(int i=3;i>=0;i--)\n {\n if(foundationPile[i].isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(foundationPile[i].peek());\n }\n System.out.println();\n for(int i=6;i>=0;i--)\n {\n for(int j=0;j<tableauHidden[i].size();j++)\n System.out.print(\"X\");\n System.out.println(tableauVisible[i]);\n }\n System.out.println();\n if(waste.isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(waste.peek());\n if(deck.isEmpty())\n System.out.println(\"[O]\");\n else System.out.println(\"[X]\");\n }", "public void displayBmi () {\n\t\t\tSystem.out.println (\"Underweight =< 18.5\\nNormal weight = 18.5-24.9\\nOverweight = 25 - 29.9\\nObese = 30 or higher\");\n\t\t}", "public void display(){\r\n for(Card c: cards){\r\n System.out.println(c);\r\n }\r\n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public void showCards() {\n\t\tfor(int i=0;i<cards.size();i++) {\n\t\t\tSystem.out.println(cards.get(i).toString());\n\t\t}\n\t}", "private void initialiseBags() {\r\n\t\t//Player one bag\r\n\t\taddToBag1(GridSquare.Type.a, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.b, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.c, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.d, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.e, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.f, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.g, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.h, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.i, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.j, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.k, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.l, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.m, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.n, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.o, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.p, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.r, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.s, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.t, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.u, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.v, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.w, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.x, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\t\r\n\t\t//Player two bag\r\n\t\taddToBag2(GridSquare.Type.A, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.B, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.C, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.D, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.E, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.F, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.G, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.H, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.I, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.J, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.K, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.L, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.M, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.N, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.O, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.P, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.Q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.R, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.S, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.T, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.U, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.V, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.W, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.X, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t}", "private void display(){\n out.println(\"\\n-STOCK EXCHANGE-\");\n out.println(\"Apple - Share Price: \" + game.apple.getSharePrice() + \" [\" + game.apple.top() + \"]\");\n out.println(\"BP - Share Price: \" + game.bp.getSharePrice() + \" [\" + game.bp.top() + \"]\");\n out.println(\"Cisco - Share Price: \" + game.cisco.getSharePrice() + \" [\" + game.cisco.top() + \"]\");\n out.println(\"Dell - Share Price: \" + game.dell.getSharePrice() + \" [\" + game.dell.top() + \"]\");\n out.println(\"Ericsson - Share Price: \" + game.ericsson.getSharePrice() + \" [\" + game.ericsson.top() + \"]\");\n\n out.println(\"\\n-PLAYERS-\");\n// System.out.println(playerList.toString());\n for (Player e : playerList) {\n if (e.equals(player)) {\n out.println(e.toString() + \" (you)\");\n } else {\n out.println(e.toString());\n }\n }\n }", "public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}", "@Override\n\tpublic void printDeck() {\n\t\tfor(int i = getCount() - 1; i >= 0; i--) {\n\t\t\tSystem.out.println(\"[\" + i + \"]\" + this.aktuellesDeck[i].toString());\n\t\t}\n\t}", "public void display() {\n\t\ttree.resize(30,50);\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree,25,i);\n\t\t}\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree, 575, i);\n\t\t}\n\t}", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "public void display() {\r\n System.out.println(\" Cart Information \" + System.lineSeparator() +\r\n \"=========================\" + System.lineSeparator() +\r\n \"Customer ID: \" + getCustID() + System.lineSeparator() + \r\n \"Cart Total: \" + getTotal()+ System.lineSeparator());\r\n items.display();\r\n }", "@Override\n\tpublic void display() {\n\t\tStringBuilder string = new StringBuilder();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hashArray[i] == null)\n\t\t\t\tstring.append(\"** \");\n\t\t\telse if (hashArray[i] == deleted)\n\t\t\t\tstring.append(hashArray[i].value + \" \");\n\t\t\telse\n\t\t\t\tstring.append(\"[\" + hashArray[i].value + \", \"\n\t\t\t\t\t\t+ hashArray[i].frequency + \"] \");\n\t\t}\n\t\tSystem.out.println(string.toString());\n\t}", "public void collection() {\n\t\tif(showCollection) {\n\t\t\tclear_console();\n\t\t\tfor(int i = 1;i<crystalQuantity.length;i++) {\n\t\t\t\tif(crystalQuantity[i]>0) {\n\t\t\t\t\tSystem.out.println(\"T\" + i + \": \" + crystalQuantity[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void outputBBO() {\n System.out.println(\"\\nBest Bid & Offer: \");\n \n if(bestBid==null){\n \tSystem.out.println(\"No best bids\");\n }else {\n \tSystem.out.println(\"Bid\" + bestBid.ord.toString());\n }\n if(bestOffer==null){\n \tSystem.out.println(\"No best offer\");\n\n }else {\n \tSystem.out.print(\"Off\" + bestOffer.ord.toString());\n }\n System.out.println();\n }", "public static void main(String[] args) {\n Scanner keyboard = new Scanner(System.in);\n//Create an object of the Bag class refer to this object as myBag\n Bag myBag = new Bag();\n//declare a variable called option of type int\n int option;\n//Open a do/while loop\n do {\n//Prompt the user to pick one of the following options:\n//Press 1 to change the name of the bag\n//Press 2 to add an item to the bag\n//Press 3 to change the maximum weight of the bag\n//Press 4 to view all information about the bag\n//Press 5 to end the program\n System.out.println(\"Pick an option. \" +\n \"\\nPress 1 to change the name of the bag. \" +\n \"\\nPress 2 to add an item to the bag. \" +\n \"\\nPress 3 to change the maximum weight of the bag. \" +\n \"\\nPress 4 to view all information about the bag. \" +\n \"\\nPress 5 to end the program.\");\n//Save the user’s input into the option variable\n option = keyboard.nextInt();\n keyboard.nextLine();\n//if the user picks option 1, prompt the user for the name of the bag\n//then save the name of the bag in a variable called newName\n//change the name of the bag to newName\n if (option == 1) {\n System.out.println(\"What should the name of the bag be?\");\n String newName = keyboard.nextLine();\n myBag.setName(newName);\n//else if the user picks option 2, prompt the user for the weight\n//of the item and then save the weight of the item in a variable\n//called newWeight\n//add the new item to the bag\n }else if (option == 2) {\n System.out.println(\"What is the weight of the item?\");\n double newWeight = keyboard.nextDouble();\n myBag.addItem(newWeight);\n//else if the user picks option 3, prompt the user for the new maximum\n//weight of the bag and save the new maximum weight in a variable\n//called newMaximumWeight\n//change the maximum weight of the bag to newMaximumWeight\n }else if (option == 3) {\n System.out.println(\"What should the new maximum weight of the bag be?\");\n double newMaximumWeight = keyboard.nextDouble();\n myBag.setMaximumWeight(newMaximumWeight);\n//else if the user picks option 4, display to the screen the name of\n//the bag, the current weight of the bag, and the maximum weight\n//of the bag\n }else if (option == 4) {\n System.out.println(\"The name of your bag is: \" + myBag.getName() + \"\\nThe current weight is: \" + myBag.getCurrentWeight() + \"\\nThe maximum weight is: \" + myBag.getMaximumWeight());\n//else if the user picks option 5, display Goodbye.\n }else if (option == 5) {\n//else if the user picks any other option, display Error!\n }else {\n System.out.println(\"Error!\");\n }\n//close the do/while loop and make it so that it continues to run as\n//long as the user does not pick option 5\n } while (option !=5 );\n }", "public void display(){\r\n \r\n System.out.println(\"\\n\\nHigh Population City\");\r\n highPop.display();\r\n System.out.println(\"Capital City\");\r\n capital.display();\r\n System.out.print(\"State Name: \" + stateName + \"\\nState Population: \" + statePop + \"\\n------------\");\r\n }", "void display() {\n for (int i = 0; i < this.questions.size(); i++)\n this.questions.get(i).display(i, gradeable());\n }", "public void display() {\n \n //Print the features representation\n System.out.println(\"\\nDENSE REPRESENTATION\\n\");\n \n //Print the header\n System.out.print(\"ID\\t\");\n for (short i = 0 ; i < dimension; i++) {\n System.out.format(\"%s\\t\\t\", i);\n }\n System.out.println();\n \n //Print all the instances\n for (Entry<String, Integer> entry : mapOfInstances.entrySet()) {\n System.out.format(\"%s\\t\", entry.getKey());\n for (int i = 0; i < vectorDimension(); i++) {\n //System.out.println(allFeatures.get(entry.getValue())[i]);\n System.out.format(\"%f\\t\", allValues.get(entry.getValue())[i]); \n }\n System.out.println();\n }\n }", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "@Override\n public String toString(){\n if (myBasket.size() == 0) {\n System.out.println(\"No products yet.\");\n return null;\n }\n int i = 0;\n String string = \"List of products in basket: \\n\";\n for (Product product: myBasket.keySet())\n {\n i++;\n string = string + i + \")\\n\" + product.toString() + \"in basket: \" + myBasket.get(product) + \"\\n\";\n }\n return string;\n }", "public void print_Deck() {\n for(int i = 0; i<52; i++) {\n System.out.println(deck.get(i));\n }\n }", "@Override\n public void showInfo() {\n System.out.println(\"Garage {\");\n System.out.println(\"\\tGarage is \" + (isBig ? \"big\" : \"small\"));\n int i = 0;\n for (T car : carsInGarage) {\n System.out.println(\"\\tCar №\" + i + \": \" + car.getShortInfo());\n i++;\n }\n System.out.println(\"}\");\n }", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public void showContentBought() {\n\n\t\tif (this.contentBought.size() == 0) {\n\t\t\tSystem.out.println(\"Nothing so far!\");\n\t\t\t\n\t\t} else {\n\t\t\tfor (int i = 0; i < this.contentBought.size(); i++) {\n\t\t\t\tSystem.out.println(this.contentBought.get(i).getName());\n\t\t\t}\n\t\t}\n\t}", "public static void printFruits() {\r\n\t\tSystem.out.println(\"\\nFruits Available in our store: \\n\");\r\n\t\tSystem.out.format(\"%5s\\t%10s\\t%10s\\t%10s\\t%10s\\n\", \"Id\", \"Name\", \"Quality\", \"Price\", \"Best Before Use\");\r\n\t\tfor (Fruit fruit : fruits.values()) {\r\n\t\t\tSystem.out.format(\"%5s\\t%10s\\t%10s\\t%10s\\t%10s\\n\", fruit.getId(), fruit.getName(), fruit.getQuality(),\r\n\t\t\t\t\tfruit.getPrice(), fruit.getBestBeforeUse());\r\n\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void display() {System.out.println(skaitlis);}", "public static void main(String[] args) {\n\t\t\n\t\tItem[] itemArray = new Item[5];\n\t\titemArray[0] = new Item(\"Duster\", 20.0);\n\t\titemArray[1] = new Item(\"Pencil\", 10.0);\n\t\titemArray[2] = new Item(\"Stapler\", 75.5);\n\t\titemArray[3] = new Item(\"Sharpener\", 15.5);\n\t\titemArray[4] = new Item(\"Stencil\", 25.5);\n\t\t\n\t\tBag b1 = new Bag(\"VIP\", 5);\n\t\t\n\t\tint i = 0;\n\t\t\n\t\twhile (i < itemArray.length) {\n\t\t\tSystem.out.println(\"Adding item of index :\" + i + \"into bag now...\");\n\t\t\tb1.addItem(itemArray[i++]);\n\t\t}\n\t\t\n\t\tb1.printItems();\n\t\tb1.getTotal();\n\t}", "public void Blueprint(){\r\n System.out.println(\"House features:\\nSquare Footage - \" + footage + \r\n \"\\nStories - \" + stories + \"\\nBedrooms - \" + bedrooms + \r\n \"\\nBathrooms - \" + bathrooms + \"\\n\");\r\n }", "public void basketWeave() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Basket Weave\");\n win.setLocation(10, 10);\n for(int y = -5; y < HEIGHT; y += 80) {\n for(int x = -5; x < WIDTH; x += 80) {\n basketDraw(x, y, g);\n }\n for(int x = -45; x < WIDTH; x += 80) {\n basketDraw(x, y+40, g);\n }\n }\n }", "public int get_Bag_id() {\r\n return this.bag_id;\r\n }", "public void mostrarCartasBazas(){\n int cont = 0;\n while(cont < cartasDeLaBaza.size()){\n System.out.println(cartasDeLaBaza.get(cont).toString());\n cont ++;\n }\n }", "public void displayCards() {\n\t\tSystem.out.println(\"\\n---------- Deck Worker ----------\");\n\t\tfor(Card worker : this.deckWorker) {\n\t\t\tSystem.out.print(worker.toString());\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---------- Deck Building and Machine ----------\");\n\t\tfor(IBuilding building : this.deckBuilding) {\n\t\t\tSystem.out.print(building.toString());\n\t\t}\n\t\tSystem.out.println();\n\t}", "public String printGrabbedItems() {\n return \"Items in your inventory: \" + grabbedItems;\n }", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public void mostrar() {\r\n\t\tfor (int i = 0; i < bolsa.length; i++) {\r\n\t\t\tSystem.out.printf(\"#%d: %d\\t\", i, bolsa[i]);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() + this.cardsInDeck[index].getColor() + \",\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Override public String toString(){\r\n StringBuilder output = new StringBuilder();\r\n for (Iterator<Bars> i = BarsList.iterator(); i.hasNext();){\r\n output.append(i.next().toString());\r\n }\r\n return output.toString();\r\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "public void displayByAlbums()\n {\n Collections.sort(catalog);\n \n System.out.printf(\"%-39s %-30s %s %n\",\"ALBUM\", \"ARTIST\", \"TRACKS\"); \n for(Album a : catalog)\n System.out.println(a.toString(true)); //since true, albums are first. \n \n for(int i=0; i<30; i++)\n System.out.print(\"*\"); //line of asterisks\n System.out.print(\"\\n\\n\");\n }", "private void displayBook() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n\n System.out.println(\"Book title: \" + getTitle());\n System.out.println(\"Book author: \" + getAuthor());\n System.out.println(\"Book description: \" + getDescription());\n System.out.println((\"The price is: \" + formatter.format(getPrice())));\n if (isInStock()) {\n System.out.println(\"Currently the book is in stock.\");\n }\n else {\n System.out.println(\"Currently the book is not in stock.\");\n }\n System.out.println();\n }", "public void display() {\r\n String kind;\r\n if (profit == true) {\r\n kind = \"profit\";\r\n }\r\n\r\n else kind = \"non-profit\";\r\n System.out.println(name + \" is a \" + kind + \" organization that has\" + \" \" + revenue + \" dollars in revenue\" );\r\n }", "public void display_inventory() {\n\t\t// displays all identified crystals\n\t\tfor(int i = 0;i<maxInvSize;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tcrystal_description(identifiedArray[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void showCar(){\n for (int i=0; i<car.size(); i++){\n System.out.println((i+1) + \". \" + car.get(i).formatForBuy());\n }\n }", "public void displayTags() {\n System.out.println (\"tags = \" + tags);\n }", "public void display(){\n for(int i = 0;i < n_items;++i){\n System.out.print(queue_array[(i + front) % max_size] + \" \");\n }\n System.out.println();\n }", "public void disp(){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"Feature Model \");\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"The mandatory feature:\");\r\n\t\t\tfor(int i = 0; i < this.mandatoryFeatures.size(); i++ ){\r\n\t\t\t\tthis.mandatoryFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tSystem.out.println(\"Optional features:\");\r\n\t\t\tfor(int i = 0; i < this.optionalFeatures.size(); i++ ){\r\n\t\t\t\tthis.optionalFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tfor(int i = 0; i < this.alternativeFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Alternative features:\");\r\n\t\t\t\tfor(int j = 0; j < alternativeFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\talternativeFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.orFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Or features:\");\r\n\t\t\t\tfor(int j = 0; j < orFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\torFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Constraints:\");\r\n\t\t\tfor(int i = 0; i < this.constraints.size(); i++ ){\r\n\t\t\t\tthis.constraints.get(i).disp();\r\n\t\t\t}//for\r\n\t\t}", "public java.lang.String getITBAG() {\n return ITBAG;\n }", "public void printDeck() {\n\t\t// Inform the user if the deck is empty.\n\t\tif (this.deck.isEmpty() == true) {\n\t\t\tSystem.out.println(\"Deck is empty.\");\n\t\t} else {\n\t\t\tStack<T> tmp = this.deck;\n\t\t\tfor (int i = 0; tmp.size() > i; i++) {\n\t\t\t\tSystem.out.println(tmp.elementAt(i).toString());\n\t\t\t}\n\t\t}\n\t}", "public void print()\n\t{\n\t\tminGenes = Integer.MAX_VALUE;\n\t\tmaxGenes = 0;\n\t\tcreatureGenesQty = 0;\n\t\tfor (Creature creature : creatures)\n\t\t{\n\t\t\tminGenes = (minGenes > creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : minGenes;\n\t\t\tmaxGenes = (maxGenes < creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : maxGenes;\n\t\t\tcreatureGenesQty += creature.getGenotype().size();\n\t\t\t//creature.print();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t}\n\t\tavgGenes = creatureGenesQty / ((float) size());\n\n\t\t// add some statistics\n\t\tSystem.out.println(\"Population size: \" + size());\n\t\tSystem.out.println(\"Minimum number of genes: \" + minGenes);\n\t\tSystem.out.println(\"Average number of genes: \" + avgGenes);\n\t\tSystem.out.println(\"Maximum number of genes: \" + maxGenes);\n\t\tCreatureLog.info(String.valueOf(size()) + \"\\t\" + avgGenes + \"\\t\" + minGenes + \"\\t\" +maxGenes);\n\n\t}", "public void display() {\n System.out.println(toString());\n }", "private void check_OutofBag(Character pl) {\n if (pl.getBag().size() > 5) {\n display_StoreMenu(pl);\n }\n }", "public Bag[] get_bags() {\r\n return this.bags;\r\n }", "public void showProducts() {\n\t\t\tfor(int i = 0; i < products.size(); i++) {\n\t\t\t\tif(products.get(i).quantity > 0) {\n\t\t\t\t\tSystem.out.println(alphabet.substring(i, i+1).toUpperCase() + \") \" + products.get(i).toString());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tproducts.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void display()\r\n\t{\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\ts2.push(s1.pop());\r\n\t\tfor(int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(s2.peek() + \" \");\r\n\t\t\ts1.push(s2.pop());\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t}", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void displayAll() {\n\t\t\n\t\tbankop.display();\n\t\n\t}", "private static void showDeckInfo() {\n }", "public void displayVragenlijst() {\n List<Vragenlijst> vragenlijst = winkel.getVragenlijst();\n\n System.out.println(\"Kies een vragenlijst: \");\n\n for (int i = 0; i < vragenlijst.size(); i++) {\n System.out.println((i + 1) + \". \" + vragenlijst.get(i));\n }\n }", "public void display() {\n\tString tm = \"{ \";\n\tIterator it = entrySet().iterator();\n\twhile(it.hasNext()) {\n\t\ttm += it.next() + \" ,\";\n\t}\n\ttm = tm.substring(0, tm.length() - 2) + \" }\";\n\tSystem.out.println(tm);\n }", "public void displayProducts() {\r\n\t\tSystem.out.println(\"All Products : \");\r\n\t\tfor(int i=0; i<currentBranchNumber; ++i) \r\n\t\t\tbranchs[i].displayProducts();\r\n\t}", "public void display()\r\n\t{\r\n\t\tSystem.out.println(\"Dollar: $\"+getAmount());\r\n\t\tSystem.out.println(\"Rupiah: Rp.\"+dollarTorp());\r\n\t}", "public void displayCart() {\n\t\tSystem.out.println(cart.toString());\n\t}", "public void setBag(Bag b)\n\t{\n\t\tm_bag = b;\n\t}", "public void display() {\n\n for (int i=top;i>=0;i--)\n {\n System.out.println(stack[i]);\n }\n }", "public static void SHOW(CS145LinkedList<BookData> inventory) {\n\n System.out.println();\n\n // Iterate through all the BookData Objects in the CSLinkedList<BookData>\n Iterator<BookData> itr = inventory.iterator();\n while( itr.hasNext() ) {\n BookData currentBKD = itr.next();\n\n // Print to Screen a statement containing all current\n // data of the book object inside the BookData Object\n currentBKD.BookInventoryStatement();\n\n // Iterate through all BackOrder objects saved inside\n // the ArrayDeque of the BookData Object if any\n for (BackOrder order : currentBKD.getBackOrders()) {\n System.out.println(\"Backorders:\");\n System.out.print(\" customer: \" + order.getCustomerNum());\n System.out.print(\", amount: \" + order.getNumOrders() + \"\\n\");\n }\n }\n System.out.println();\n }", "private void displayAll() {\n\t\tif(inventoryObject.totalNumCards() == 0) { // checks to see if there are 0 StockIndexCards\n\t\t\tSystem.out.println(\"The Inventory is empty\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\tSystem.out.println(inventoryObject.displayAll());\n\t\tgetUserInfo();\n\t\t}\n\t}", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "protected void displayPopulation() {\n \n /**/println(\"\\nDisplaying population:\", 0);\n for(int i = 0; i < population_size; i++) {\n println(\"i = \" + i, 1);\n if(population[i] == null) {\n //System.exit(0);\n }\n displayChromosome(population[i], 0);\n }\n }", "public ArrayList<card> displayPack()\n {\n dbObj=new dbFlashCards(uid);\n return dbObj.fetchAllCards(packId);\n \n \n \n }", "private static void viewCart() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" The items in your cart\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Name |Price |Count\");\r\n\t\tfor (Map.Entry<Product, Integer> productCountPair: cart.getCartProductsEntries()) {\r\n\t\t\tStringBuilder productName = generatePaddings(productCountPair.getKey().getName(), PRODUCT_NAME_LENGTH);\r\n\t\t\tStringBuilder price = generatePaddings(convertCentToDollar(productCountPair.getKey().getPriceInCent()), PRICE_LENGTH);\r\n\t\t\tSystem.out.println(\" \" + productName + \"|\" + price + \"|\" + productCountPair.getValue());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Total price: \" + convertCentToDollar(cart.totalPriceInCent()));\r\n\t\tSystem.out.println();\r\n\t\tdisplayCartMenu();\r\n\t}", "private void printDeck() {\n for (int i = 0; i < deck.length; i++) {\n System.out.println(deck[i]);\n }\n\n }" ]
[ "0.8040091", "0.7637124", "0.7192126", "0.68268794", "0.68129283", "0.65289915", "0.64324206", "0.6429002", "0.63659084", "0.634411", "0.6154141", "0.60817695", "0.60799384", "0.60558665", "0.6048198", "0.6026887", "0.5981751", "0.59793556", "0.5972744", "0.5963235", "0.59369403", "0.5929576", "0.59141624", "0.5914003", "0.59074277", "0.5898703", "0.5888609", "0.5852653", "0.5829986", "0.5822901", "0.5815289", "0.5807302", "0.57787097", "0.57767856", "0.57708246", "0.5767091", "0.5765055", "0.576034", "0.5753086", "0.57317215", "0.57260305", "0.5718563", "0.5718284", "0.5711166", "0.5702726", "0.5697606", "0.56840533", "0.56836873", "0.56759393", "0.56752485", "0.56567025", "0.5651977", "0.5646905", "0.56464833", "0.56431365", "0.56378424", "0.5635494", "0.56256413", "0.5624018", "0.56203264", "0.5603276", "0.5600361", "0.55964345", "0.55838203", "0.55799747", "0.5576821", "0.55714", "0.5571174", "0.55686074", "0.55678", "0.55642444", "0.5562094", "0.5555873", "0.5552993", "0.55450934", "0.55446863", "0.5543743", "0.5537737", "0.5534685", "0.5530168", "0.55249006", "0.5509631", "0.5506695", "0.55065393", "0.5506489", "0.550633", "0.55026203", "0.55017215", "0.55016136", "0.5494067", "0.5488893", "0.5486869", "0.54815245", "0.5481266", "0.5480188", "0.5478799", "0.54760826", "0.5475256", "0.54717827", "0.54716605" ]
0.7273459
2
Function to place an item in the user's inventory
private static String[] placeInBag(String item, String[] inventory){ for(int i=0; i<inventory.length; i++){ if(inventory[i].equals("")){ inventory[i] = item; break; } } return inventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }", "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 addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "void insertItem(Position position, IItem item);", "private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }", "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "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}", "public void useItem(Human user){\n user.addEnergy(10);\n user.removefromInv(this); \n }", "void addElementToInventory(String elementName);", "public void addItem(Item item, int x, int y) {\n\t\tInventory items = getItemsAt(x, y);\n\t\titems.add(item);\n\t}", "InventoryItem getInventoryItem();", "private void grabItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryAdd(itemFound, currentRoom);\n }\n }", "void openInventory(Player player, SimpleInventory inventory);", "public void placeItemInRoomAtCoords(WorldItem item, int row, int column) {\n Point targetPoint = getPointAtLocation(row, column);\n targetPoint.setContainedItem(item);\n if (item instanceof FlammableItem) {\n flammableItemCount++;\n }\n }", "public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "public void enterItem(DessertItem item)\n {\n dessertList.add(item);\n }", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void buy(Item item) {\n // remove money from wallet\n try { \n wallet.removeMoney(item.getPrice());\n // remove item from room\n currentRoom.removeItem(item);\n // add item to inventory\n addToInventory(item);\n } catch (IllegalArgumentException e) {\n System.err.println(\"You don't have enough money to purchase \" + item.getDescription());\n }\n\n\n }", "public String placeItemInChest(String itemName) {\r\n\t\t\tif(this.getPlayer().getItem(itemName) == null) {\r\n\t\t\t\treturn \"You do not have this item in your inventory.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getCurrentChest().getContent().get(itemName) == null) {\r\n\t\t\t\tthis.handleDecQuestrelatedItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getCurrentChest().addItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().removeItem(itemName);\r\n\t\t\t\treturn \"You put \" + itemName + \" in \" + this.getCurrentChest().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getCurrentChest().getContent().get(itemName).getNumber() >= this.getCurrentChest().getItemSlots()) {\r\n\t\t\t\treturn this.getCurrentChest().getName() + \" cannot contain any more items of this type. \\n\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.handleDecQuestrelatedItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getCurrentChest().addItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().removeItem(itemName);\r\n\t\t\t\treturn \"You put \" + itemName + \" in \" + this.getCurrentChest().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t\t}\r\n\t\t}", "public static void addItem(Item item)\n {\n inventory.add(item);\n if(!(item.getRoomNumber() == -1 || item.getEventNumber() == -1))\n {\n Map.getRoom(item.getRoomNumber()).getEvent(item.getEventNumber()).enable();\n }\n }", "public void fillInventory(TheGroceryStore g);", "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 }", "public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);\n\t\telse\n\t\t\tSystem.out.println(\"Inventory is full.\");\n\t}", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "private void onLoad(Item item) {\n ImageView view = new ImageView(item.getIcon());\n addDragEventHandlers(view, DRAGGABLE_TYPE.ITEM, unequippedInventory, equippedItems);\n addEntity(item, view);\n unequippedInventory.getChildren().add(view);\n System.out.println(\"Get new Item \" + item.getName() + \" in Inventory\");\n }", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\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 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}", "boolean addSteam(ItemStack me, int amount, EntityPlayer player);", "public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "@EventHandler (priority = EventPriority.HIGHEST)\n\tpublic void onClick(final InventoryClickEvent event) {\n\t\tif (!(event.getWhoClicked() instanceof Player)) {\n\t\t\treturn;\n\t\t}\n\t\tfinal Player player = (Player)event.getWhoClicked();\n\t\t\n\t\tShopObject shop = getShopPlayerIsViewing(player);\n\t\tif (shop == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (event.getAction() == InventoryAction.MOVE_TO_OTHER_INVENTORY) {\n\t\t\t//trying to put in shop part of inventory\n\t\t\tif (event.getRawSlot() != event.getSlot()) {\n\t\t\t\tif (!canPutItemInShop(shop, event.getCurrentItem(), player)) {\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//TODO once you cancel this one, the item on cursor becomes invisible. Try doing event.setCursor()\n\t\telse if (!event.getCursor().getType().equals(Material.AIR)) { //have an item \n\t\t\t//trying to put in shop part of inventory\n\t\t\tif (event.getRawSlot() == event.getSlot()) { \n\t\t\t\tItemStack cursor = new ItemStack(event.getCursor());\n\t\t\t\tif (!canPutItemInShop(shop, cursor, player)) {\n\t\t\t\t\tevent.setCancelled(true);\n\t\t\t\t\tevent.setCursor(new ItemStack(Material.AIR));\n\t\t\t\t\tplayer.getInventory().addItem(cursor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { \n\t\t\tpublic void run() { \n\t\t\t\tplayer.updateInventory();\n\t\t\t}\n\t\t}, 5L); \n\t}", "@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }", "public void save() {\r\n\t\tGame.getInstance().getInventory().add(id);\r\n\t}", "private void takeItem(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 take?\"); \n return; \n } \n \n String itemName = command.getSecondWord();\n String secondName = itemName + \"2\";\n \n Item thisItem = currentRoom.getItem(itemName);\n Item secondItem = currentRoom.getItem(secondName);\n \n if (thisItem == null) {\n Logger.Log(\"There isn't a \" + itemName + \"in here!\");\n }\n else if (player.inventory.containsKey(itemName)){\n Logger.Log(\"You take another \" + itemName + \" and put it in your backpack.\");\n player.addItem(secondName, secondItem); \n }\n else if (player.inventory.containsKey(itemName)&&(player.inventory.containsKey(secondName))){\n Logger.Log(\"You don't need any more \" + itemName + \"s!\");\n }\n else { \n Logger.Log(\"You take the \" + itemName + \" and put it in your backpack.\");\n player.addItem(itemName, thisItem);\n } \n \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}", "@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}", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t// + \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\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\t\t\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\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\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void lootObject(Items loot) {\n if (loot != null)\n this.inventory.add(loot);\n }", "public boolean use(Inventory i, Player p);", "public void createOrderItem() {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tRestaurantApp.globalMenuManager.printMenu(); //create a globalmenuManager so that other classes can access the menu\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Which item would you like to order?\");\r\n\t\t\tint menuIndex = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tif (menuIndex <= 0 || menuIndex > RestaurantApp.globalMenuManager.getSizeOfMenu()){\r\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Please input a valid index from 1 to \"+RestaurantApp.globalMenuManager.getSizeOfMenu());\r\n\t\t\t}\r\n\t\t\tthis.menuItem = RestaurantApp.globalMenuManager.getMenuItem(menuIndex-1);\r\n\t\t\tSystem.out.println(\"How many of this are you ordering?\");\r\n\t\t\tthis.quantity = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tSystem.out.println(\"Order item added. printing details...\");\r\n\t\t\tthis.printOrderItem();\r\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(e.getMessage()); \r\n\t\t\tSystem.out.println(\"program exiting ...\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void store(Item item) {\n this.items.add(item);\n }", "public boolean addPlayerItem(PlayerItem playerItem);", "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 }", "@Test\r\n\tpublic void testAddItem_not_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tassertEquals(test, vendMachine.getItem(\"A\"));\r\n\t}", "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}", "public int addItem(String name, int value) {\n\t\tfor (int i = 0; i < inventoryslot.length; i++) {\n\t\t\tif (inventoryslot[i].getItemname()==name) {\n\t\t\t\ttempstate=inventoryslot[i].changevalue(value);\n\t\t\t\tif(tempstate>0)return tempstate;/**Item over stacksize */\n\t\t\t\telse if(tempstate<0)return tempstate;/** Item empty*/\n\t\t\t\treturn tempstate;/** item added inventory */\n\t\t\t}\t\t\t\t\n\t\t}\n\t\treturn -1;/** item does not exists in inventory */\n\t}", "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }", "@Override\n public Item vendItem(Item item) {\n allItems.put(item.getItemId(), item);\n return item;\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}", "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\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 useItem(OutputStreamWriter out, InputStreamReader newIn) {\r\n InputStreamReader instream = newIn;\r\n BufferedReader in = new BufferedReader(instream);\r\n boolean equipped = false;\r\n if (this.player.getInventory().isEmpty()) {\r\n try {\r\n out.write(\"You have nothing in your inventory you can use..\" + System.lineSeparator());\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n } else {\r\n while (!equipped) {\r\n try {\r\n out.write(this.getPlayerInventory());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.write(\"Choose an item by pressing a number: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n try {\r\n int itemNumber = Integer.parseInt(in.readLine());\r\n if (itemNumber >= player.getInventory().size() || itemNumber < 0) {\r\n out.write(\"You do not have that item...\");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n if (player.getInventory().get(itemNumber).getItemType() == 3 || player.getInventory().get(itemNumber).getItemType() == 4) {\r\n out.write(player.useItem(itemNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n out.write(\"Choose between slot 1 and slot 2 by pressing 1 or 2: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n int slotNumber = Integer.parseInt(in.readLine());\r\n while (slotNumber != 1 && slotNumber != 2) {\r\n out.write(\"You have to choose between slot 1 and slot 2\" + System.lineSeparator());\r\n out.flush();\r\n slotNumber = Integer.parseInt(in.readLine());\r\n }\r\n out.write(player.equip(itemNumber, slotNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n }\r\n }\r\n } catch (NumberFormatException ex) {\r\n out.write(\"You have to enter a number. Please try again!\" + System.lineSeparator());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n equipped = true;\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n }", "public void updateInventory ( ) {\n\t\texecute ( handle -> handle.updateInventory ( ) );\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}", "public void writeInventoryToNBT(CompoundNBT tag) {\n IInventory inventory = this;\n ListNBT nbttaglist = new ListNBT();\n\n for (int i = 0; i < inventory.getSizeInventory(); i++) {\n if (!inventory.getStackInSlot(i).isEmpty()) {\n CompoundNBT itemTag = new CompoundNBT();\n itemTag.putByte(TAG_SLOT, (byte) i);\n inventory.getStackInSlot(i).write(itemTag);\n nbttaglist.add(itemTag);\n }\n }\n\n tag.put(TAG_ITEMS, nbttaglist);\n }", "public static void createItem(String inputCommand) {\r\n\t\tString[] value = inputCommand.split(\" \");\r\n\t\tif(value.length == 4 && \"create\".equalsIgnoreCase(value[0])) {\r\n\t\t\tInventory inventory = new Inventory();\r\n\t\t\tinventory.setItemName(value[1]);\r\n\t\t\tinventory.setItemCostPrice(Double.parseDouble(value[2]));\r\n\t\t\tinventory.setItemSellPrice(Double.parseDouble(value[3]));\r\n\t\t\tinventoryList.put(value[1], inventory);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Entered wrong input command\");\r\n\t\t}\r\n\t}", "void add(Item item);", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}", "void dropItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n// int indexItem = -1;\n String nameOfItem = \"\";\n String dropFromInventory = \"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 dropFromInventory = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\")) {\n itemLocation.addItem(currentRoom, new PickableItem(nameOfItem, inventory.getItemWeight(nameOfItem), inventory.getUseable(nameOfItem)));\n inventory.removeItemInventory(nameOfItem);\n System.out.println(\"You have dropped: \" + nameOfItem);\n\n } else {\n System.out.println(\"Can't drop item that isn't in inventory \" + command.getSecondWord());\n }\n }", "private void updateInventory(List<Item> items) {\r\n for(Item item : items) {\r\n inventory.put(item, STARTING_INVENTORY);\r\n inventorySold.put(item, 0);\r\n itemLocations.put(item.getSlot(), item);\r\n }\r\n }", "void createItem (String name, String description, double price);", "public void usarItem(Item item) {\n\t\t\n\t\tpokemons[0].usarItem(item);\n\t\t\n\t}", "public boolean takeItem(Items item)\n { \n boolean itemTaken = false;\n if(!haveItem(item) && currentRoom.haveItem(item)){ //if item in room not inventory\n if(!item.canBeHeld()){ // if item can't be held\n System.out.println (\"This item can not be picked up\");\n }else if(itemsHeld >= itemLimit) { //item can be held but not enough space\n System.out.println(\"Inventory is full. Drop something first\");\n }else{ //item can be held and there is space in inventory\n Inventory.put(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld ++; //inventory tracker +1\n itemTaken = true;\n }\n }\n return itemTaken;\n }", "@Test\n\tpublic void testPickUpItem() {\n\t\tSquare square = new Square();\n\t\tItem item = new LightGrenade();\n\t\t\n\t\tsquare.addItem(item);\n\t\t\n\t\tPlayer player = new Player(square, 0);\n\t\tassertEquals(0, player.getAllItems().size());\n\t\tassertFalse(player.hasItem(item));\n\t\t\n\t\tplayer.pickUp(item);\n\t\tassertTrue(player.hasItem(item));\n\t}", "public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }", "public void dropItem(Location loc){\n\t\t\n\t\tPlayer p = getThrower();\n\t\tItemStack droppedItem;\n\t\t\n\t\tdroppable.clear();\n\t\t\n\t\taddItem(Material.IRON_INGOT, 8, 8, 3); //Item, weight, maximum stack size, minimum stack size\n\t\taddItem(Material.GOLD_INGOT, 5, 5, 1);\n\t\taddItem(Material.DIAMOND, 3, 3, 1);\n\t\taddItem(Material.GOLDEN_APPLE, 1, 1, 1);\n\t\taddItem(Material.ROTTEN_FLESH, 10, 5, 1);\n\t\taddItem(Material.BREAD, 15, 32, 15);\n\t\taddItem(Material.BONE, 10, 5, 1);\n\t\taddItem(Material.SULPHUR, 10, 5, 1);\n\t\taddItem(Material.SADDLE, 1, 1, 1);\n\t\t\n\t\tint Size = droppable.size();\n\t\trandNum = ThreadLocalRandom.current().nextInt(Size);\n\t\t\n\t\tdroppedItem = droppable.get(randNum);\n\t\t\n\t\tp.getWorld().dropItem(loc, droppedItem);\n\t\tp.getWorld().dropItem(loc, new ItemStack(Material.GOLD_NUGGET, rand.nextInt(10) + 1));\n\t\t\n\t}", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n String message = \"\";\n List<Gnome> bought = shopFacade.buyGnomes(cart);\n if (!bought.isEmpty()) {\n message = bought.size() + \" items bought\";\n } else {\n message = \"Could not buy any items\";\n }\n userFacade.assignBought(user, bought);\n user.getCart().removeAll(bought);\n cart.removeAll(bought);\n userFacade.setCartToUser(user.getUsername(), cart);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Gnomes\", message);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n }", "public void giveItem(Item item) {\n\t\tif (hasItem()) return;\n\t\tthis.item = item;\n\t}", "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 }", "@Override\n\tpublic void openInventory() {\n\t\t\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 }", "public void in(food entry)\n\t{\n\t\titems.add(entry);\n\t}", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "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}", "Item addItem(IDAOSession session, String title, String description,\n\t\t\tint userId);", "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 fireOnItemAddedToInventoryCommands();", "public String takeItem(String itemName) {\r\n\t\t\tif(this.getPlayer().getCurrentLocation().getItem(itemName) == null) {\r\n\t\t\t\treturn \"There is no \" + itemName + \" in this location.\";\r\n\t\t\t} else if (this.getPlayer().getCurrentLocation().getItem(itemName).isRemovable() == false) {\r\n\t\t\t\treturn \"You cannot take this item.\";\r\n\t\t\t} else if (this.getPlayer().getCarryCapacity() < this.getPlayer().getCurrentLocation().getItem(itemName).getWeight()) {\r\n\t\t\t\treturn \"You cannot carry anymore items.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getPlayer().getCurrentLocation().getItem(itemName).getClassName().equals(\"game.Purse\")) {\r\n\t\t\t\tint gold = new Integer(((Purse)this.getPlayer().getCurrentLocation().getItem(itemName)).getGold());\r\n\t\t\t\tthis.getPlayer().changeGold(((Purse)this.getPlayer().getCurrentLocation().getItem(itemName)).getGold());\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeItem(itemName);\r\n\t\t\t\treturn \"You gain \" + gold + \" gold.\";\r\n\t\t\t}\r\n\t\t\telse if (this.getPlayer().getInventory().getContent().get(itemName) == null) { // if player inventory Itemstack is empty, no problem\r\n\t\t\t\tthis.handleIncQuestrelatedItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().addItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeItem(itemName);\r\n\t\t\t\treturn \"You take \" + itemName + \". \\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getPlayer().getInventory().getContent().get(itemName).getNumber() >= this.getPlayer().getInventory().getItemSlots()) { // more than 50 items in stack?\r\n\t\t\t\treturn \"You cannot carry any more items of this type.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.handleIncQuestrelatedItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().addItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeItem(itemName);\r\n\t\t\t\treturn \"You take \" + itemName + \". \\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t}", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "public void equip(Equipment e){\n equipment.add(e);\n }", "public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }", "protected void addInventoryItemType() {\n\t\tProperties props = new Properties();\n\n\t\t/* DEBUG\n\t\t\n\t\tSystem.out.println(typeNameTF.getText());\n\t\tSystem.out.println(unitsTF.getText());\n\t\tSystem.out.println(unitMeasureTF.getText());\n\t\tSystem.out.println(validityDaysTF.getText());\n\t\tSystem.out.println(reorderPointTF.getText());\n\t\tSystem.out.println(notesTF.getText());\n\t\tSystem.out.println(statusCB.getValue());\n\t\n\t\t*/ \n\n\t\t// Set the values.\n\t\tprops.setProperty(\"ItemTypeName\", typeNameTF.getText());\n\t\tprops.setProperty(\"Units\", unitsTF.getText());\n\t\tprops.setProperty(\"UnitMeasure\", unitMeasureTF.getText());\n\t\tprops.setProperty(\"ValidityDays\", validityDaysTF.getText());\n\t\tprops.setProperty(\"ReorderPoint\", reorderPointTF.getText());\n\t\tprops.setProperty(\"Notes\", notesTF.getText());\n\t\tprops.setProperty(\"Status\", (String) statusCB.getValue());\n\n\t\t// Create the inventory item type.\n\t\tInventoryItemType iit = new InventoryItemType(props);\n\n\t\t// Save it into the database.\n\t\tiit.update();\n\n\t\tpopulateFields();\n\t\t\n\t\t// Display message on GUI.\n\t\t//submitBTN.setVisible(false);\n\t\tcancelBTN.setText(\"Back\");\n\t\tmessageLBL.setText(\"Inventory Item Type added.\");\n\t}", "@EventHandler\n public void onInventoryClick(InventoryClickEvent e) {\n // Check if it is one of our inventories\n if (!(e.getInventory().getHolder() instanceof InventoryEvent)) return;\n\n // Cancel the event so the player can't take the item\n e.setCancelled(true);\n\n // Check if it was air or null\n if (e.getCurrentItem() == null || e.getCurrentItem().getType() == Material.AIR) return;\n\n // Get the sign in progress\n ShopSign cur = null;\n for( ShopSign sign : signs) {\n if(sign.owner.equalsIgnoreCase(e.getWhoClicked().getUniqueId().toString())) {\n cur = sign;\n break;\n }\n }\n\n // Check if cur is null\n if(cur == null) {\n return;\n }\n\n // Check if the sign is done\n if(cur.done) {\n return;\n }\n\n // Set the can remove flag to true\n can_remove = true;\n\n // Get the player\n HumanEntity player = e.getWhoClicked();\n\n // Get the inventory that was clicked\n Inventory inv = clone_inv(e.getClickedInventory(), e.getView().getTitle());\n\n // Get the clicked item\n ItemStack clicked = e.getCurrentItem();\n ItemMeta clicked_meta = clicked.getItemMeta();\n\n // Check if it was exit\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"exit\") && e.getRawSlot() == 0) {\n // Remove the in progress sign\n signs.remove(cur);\n\n e.getWhoClicked().closeInventory();\n return;\n }\n\n // Make sure it's not removed when switching the UI\n can_remove = false;\n\n // Check if it was to proceed\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"next\") && e.getRawSlot() == 8) {\n if(e.getView().getTitle().equalsIgnoreCase(\"Item Amount\")) {\n player.openInventory(itemPrice);\n } else {\n player.sendMessage(\"Now right click on a chest to select it!\");\n player.closeInventory();\n }\n return;\n }\n\n // Check if it is buying or selling\n else if(e.getView().getTitle().equalsIgnoreCase(\"Selling or Buying\")) {\n // If it was selling\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Buy\") && e.getRawSlot() == 5) {\n cur.selling = false;\n }\n // If it was buying\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Sell\") && e.getRawSlot() == 3) {\n cur.selling = true;\n }\n\n inv = clone_inv(itemAmount, \"Item Amount\");\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n }\n\n // Check if it was an increase or decrease in amount\n else if(e.getView().getTitle().equalsIgnoreCase(\"Item Amount\")) {\n // If it was green wool\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"More\") && e.getRawSlot() == 5) {\n // Make sure were not at the max stack size\n if(cur.item.getAmount() == cur.item.getMaxStackSize()) {\n return;\n }\n\n // Add one to the amount of the in progress sign\n cur.item.setAmount(cur.item.getAmount()+1);\n\n // Update the ui\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n return;\n }\n\n // If it was red wool\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Less\") && e.getRawSlot() == 3) {\n // Make sure were not at the stack minimum\n if(cur.item.getAmount() == 1) {\n return;\n }\n\n // Subtract one from the amount of the in progress sign\n cur.item.setAmount(cur.item.getAmount()-1);\n\n // Update the ui\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n return;\n }\n }\n\n // Check if we are changing the price\n else if(e.getView().getTitle().equalsIgnoreCase(\"Item Price\")) {\n // If it was green wool\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"More\") && e.getRawSlot() == 5) {\n // Make sure were not at the max stack size\n if(cur.price == 64) {\n return;\n }\n\n // Add one to the amount of the in progress sign\n cur.price++;\n\n // Update the ui\n inv.setItem(4, new ItemStack(Material.GOLD_INGOT, cur.price));\n player.openInventory(inv);\n return;\n }\n\n // If it was red wool\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Less\") && e.getRawSlot() == 3) {\n // Make sure were not at the stack minimum\n if(cur.price == 1) {\n return;\n }\n\n // Subtract one from the amount of the in progress sign\n cur.price--;\n\n // Update the ui\n inv.setItem(4, new ItemStack(Material.GOLD_INGOT, cur.price));\n player.openInventory(inv);\n return;\n }\n }\n\n // Allow removal again\n can_remove = true;\n }", "public void sell() throws UnavailableObjectException {\r\n\t\tGame game = Game.getInstance();\r\n\t\tgame.increaseBudget(getSellValue());\r\n\t\tgame.getInventory().take(id);\r\n\t}", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "public Item pickUpItem(String itemName) {\n Item item = currentRoom.removeItem(itemName);\n if(item != null) {\n items.put(item.getName(), item);\n }\n return item;\n }", "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 void spawnItemStack(ItemStack stack, Point3d point){\r\n\t\tworld.spawnEntity(new EntityItem(world, point.x, point.y, point.z, stack));\r\n\t}" ]
[ "0.7320933", "0.71620244", "0.7157282", "0.7062102", "0.7037915", "0.7015474", "0.6780208", "0.6764384", "0.6747448", "0.6723954", "0.6708554", "0.6708288", "0.6620306", "0.661642", "0.660742", "0.66013885", "0.6555061", "0.6550532", "0.6493438", "0.6479966", "0.6474427", "0.64726776", "0.6472547", "0.639636", "0.6370818", "0.6370461", "0.6362267", "0.6361377", "0.63474286", "0.6343964", "0.63417447", "0.6332384", "0.6315645", "0.6303513", "0.6294926", "0.6285324", "0.62844837", "0.62782764", "0.6275129", "0.627314", "0.6267358", "0.6256804", "0.624486", "0.62351763", "0.62261444", "0.6223674", "0.6213447", "0.62068963", "0.6195693", "0.61750114", "0.61732024", "0.6156193", "0.61516863", "0.6144481", "0.61352384", "0.61345327", "0.6128349", "0.6111103", "0.6103209", "0.60949594", "0.60863644", "0.6085859", "0.60830456", "0.60688597", "0.60656655", "0.60509336", "0.6049327", "0.6048513", "0.604822", "0.6047488", "0.604177", "0.60394675", "0.60370094", "0.60331887", "0.60245645", "0.6019607", "0.6014116", "0.6013004", "0.6003458", "0.5996951", "0.5996747", "0.5994482", "0.5988053", "0.5983775", "0.5959484", "0.5958571", "0.5958208", "0.59573364", "0.595407", "0.59492487", "0.5948662", "0.59437716", "0.5930512", "0.59270126", "0.59251505", "0.59169626", "0.59168863", "0.59111613", "0.5910308", "0.59087247" ]
0.6631779
12
Function to display items to be equipped from the inventory and select which item is to be equipped
private static String displayItemFromBag(String[] inventory, String option){ String itemToDoAction; int counter = 1; if(option.equals("Equip")){ for(int i = 0; i < inventory.length; i++){ if(inventory[i].equals("Short Sword") || inventory[i].equals("Leather Helmet") || inventory[i].equals("Leather Chest Plate") || inventory[i].equals("Long Sword") || inventory[i].equals("Great Sword") || inventory[i].equals("Iron Helmet") ||inventory[i].equals("Iron Chest Plate") || inventory[i].equals("Iron Boots") || inventory[i].equals("Iron Gloves")){ System.out.println("\t" + counter + ") " + inventory[i]); counter++; } } System.out.println("\t" + counter + ") Exit"); itemToDoAction = getUserInput("Which item would you like to equip? \n(Type the name of the item) "); }else if(option.equals("Sell")){ for(int i = 0; i < inventory.length; i++){ if(inventory[i].equals("Short Sword") || inventory[i].equals("Leather Helmet") || inventory[i].equals("Leather Chest Plate") || inventory[i].equals("Long Sword") || inventory[i].equals("Great Sword") || inventory[i].equals("Iron Helmet") ||inventory[i].equals("Iron Chest Plate") || inventory[i].equals("Iron Boots") || inventory[i].equals("Iron Gloves")){ System.out.println("\t" + counter + ") " + inventory[i]); counter++; } } System.out.println("\t" + counter + ") Exit"); itemToDoAction = getUserInput("Which item would you like to sell? \n(Type the name of the item) "); }else if(option.equals("Use")){ System.out.println("we here"); for(int i = 0; i < inventory.length; i++){ if(inventory[i].equals("Healing Potion") || inventory[i].equals("Greater Healing Potion") || inventory[i].equals("Scroll of Fireball")){ System.out.println("\t" + counter + ") " + inventory[i]); counter++; } } System.out.println("\t" + counter + ") Exit"); itemToDoAction = getUserInput("Which item would you like to use? \n(Type the name of the item) "); }else{ itemToDoAction = ""; } return itemToDoAction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showInventory()\n\t{\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t\\tInventory\");\n\t\t\n\t\tfor (String s: inventory)\n\t\t{\n\t\t\tSystem.out.print(\"\\n\" + s);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\n\\n[R] Return\\n\");\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"Action: \");\n\t\t\n\t}", "InventoryItem getInventoryItem();", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "public String getDescription() {return \"Use an item in your inventory\"; }", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }", "public String printPlayerEquipment() {\r\n\t\t\treturn this.getPlayer().presentEquippedItems();\r\n\t\t}", "private void pickItem() \n {\n if(currentRoom.getShortDescription() == \"in the campus pub\" && i.picked3 == false)\n {\n i.item3 = true;\n i.picked3 = true;\n System.out.println(\"You picked a redbull drink\");\n }\n else if(currentRoom.getShortDescription() == \"in th hallway\" && i.picked2 == false)\n {\n i.item2 = true;\n i.picked2 = true;\n System.out.println(\"You picked a torch\");\n }\n else if(currentRoom.getShortDescription() == \"in the office\" && i.picked1 == false)\n {\n i.item1 = true;\n i.picked1 = true;\n System.out.println(\"You picked a pair of scissors\");\n }\n else\n System.out.println(\"There is no items in the room!\");\n }", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t// + \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\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\t\t\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\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\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void equip();", "public void inventory() {\n\t\tList<Item> items = super.getItems();\n\n\t\tString retStr = \"Items: \";\n\t\tItem item;\n\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\titem = items.get(i);\n\t\t\tretStr += item.toString();\n\t\t\tif (i != items.size()-1)\n \t{\n\t\t\t\tretStr += \", \";\n \t}\n\t\t}\n\t\tretStr += \"\\nCapacity: \" + this.currentCapacity() + \"/\" + this.maxCapacity;\n\t\tSystem.out.println(retStr);\n\t}", "public String unequipItem(String itemName) {\r\n\t\t\tif(itemName == \"unarmored\") {\r\n\t\t\t\treturn \"You do not have any armor to unequip.\"; // handles unarmored situation\r\n\t\t\t}\r\n\t\t\telse if(itemName.equals(this.getPlayer().getBodyArmor().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBodyArmor().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBodyArmor());\r\n\t\t\t\tthis.getPlayer().setBodyArmor(this.getDefaultBodyArmor());\t\t// set armor to default on unequip\r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getHeadgear().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getHeadgear().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getHeadgear());\r\n\t\t\t\tthis.getPlayer().setHeadgear(this.getDefaultHeadgear());\t\t// set headgear to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getGloves().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getGloves().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getGloves());\r\n\t\t\t\tthis.getPlayer().setGloves(this.getDefaultGloves());\t\t\t// set gloves to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getBoots().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBoots().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBoots());\r\n\t\t\t\tthis.getPlayer().setBoots(this.getDefaultBoots());\t\t\t\t// set boots to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getWeapon().getName())) {\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getWeapon());\r\n\t\t\t\tthis.getPlayer().setWeapon(this.getDefaultWeapon());\t\t\t// set weapon to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You cannot unequip an item you are not wearing.\";\r\n\t\t\t}\r\n\t\t}", "private void drawInventory() {\n Texture highlight = createInventoryHighlight();\n InventoryComponent inventory = gameWorld.getHero().getInventory();\n\n float originX = ((VIRTUAL_HEIGHT * Gdx.graphics.getWidth() / Gdx.graphics.getHeight()) / 2) - (inventory.getSize() * ITEM_BACKGROUND_SIZE) / 2;\n\n Item[] items = inventory.getItems();\n for (int i = 0; i < inventory.getSize(); i++) {\n hudBatch.draw(background, originX + i * ITEM_BACKGROUND_SIZE, 0, ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE);\n if (items[i] != null) {\n if (inventory.getSelectedItem() != null && items[i] == inventory.getSelectedItem()) {\n hudBatch.draw(highlight, originX + i * ITEM_BACKGROUND_SIZE, 0, ITEM_BACKGROUND_SIZE, ITEM_BACKGROUND_SIZE / 12);\n }\n float itemOffset = ITEM_BACKGROUND_SIZE / 2 - calculateItemWidth(items[i]) / 2;\n hudBatch.draw(items[i].getTexture(), (originX + i * INVENTORY_ITEM_SIZE) + itemOffset, 0, calculateItemWidth(items[i]), INVENTORY_ITEM_SIZE);\n }\n }\n }", "public String printAllInventory(){\r\n\r\n String returnString = \"Items:\";\r\n for(Item item : playerItem){\r\n returnString += \" \" + item.getName(); \r\n }\r\n return returnString;\r\n }", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public synchronized String printInventory(){\n String inventStr = \"\";\n\n for (int i = 0; i < titleList.size(); i++){\n inventStr += titleList.get(i) + \" \" + quantityList.get(i);\n if(i < titleList.size() - 1) {\n inventStr +=\"___\";\n }\n }\n return inventStr;\n }", "public String equipItem(String itemName) {\r\n\t\t\tif(this.getPlayer().getItem(itemName) == null) {\r\n\t\t\t\treturn \"You do not have this item in your inventory.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tswitch (this.getPlayer().getItem(itemName).getClassName()) {\r\n\t\t\t\t\tcase \"game.BodyArmor\":\r\n\t\t\t\t\t\tthis.getPlayer().switchBodyArmor(itemName);\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Headgear\":\r\n\t\t\t\t\t\tthis.getPlayer().switchHeadgear(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Gloves\":\r\n\t\t\t\t\t\tthis.getPlayer().switchGloves(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Boots\":\r\n\t\t\t\t\t\tthis.getPlayer().switchBoots(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Weapon\":\r\n\t\t\t\t\t\tthis.getPlayer().switchWeapon(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault: return \"You cannot equip this item.\";\r\n\t\t\t\t}\r\n\t\t\t\treturn \"You equip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t}", "public void equipSelectedWeapon() {\n }", "@FXML\n\tpublic void useItem(ActionEvent event){\n\t\t\tString itemName=\"\";\n\t\t\titemName = itemselect.getText();\n\t\t\n\t\t\tif(itemName.equals(\"\")) {\t// Checks if selected item is blank\n\t\t\t\n\t\t\t\tevents.appendText(\"Select an item from the Inventory box before clicking this button!\\n\");\t\n\t\t\t\treturn;\n\t\t\t\n\t\t\t} else {\t// Begins getting item information\n\t\t\t\tItem i;\n\t\t\t\tint x;\n\t\t\t\ti=Item.getItem(ItemList, itemName);\t// Get item from the item list\n\t\t\t\t\n\t\t\t\tif(i == null) {\t// Check if the item isnt found in the item list\n\t\t\t\t\t\n\t\t\t\t\tevents.appendText(\"Item not Found!\\n\");\n\t\t\t\t\titemselect.setText(\"\");\n\t\t\t\t\titemStats.setText(\"\");\n\t\t\t\t} else {\t// Check what type of item was used\n\t\t\t\t\tif(i.getStat().equals(\"HP\")) {\n\t\t\t\t\t\tint y=p.getHP()+i.getChange();\n\t\t\t\t\t\tif(y>p.getMaxHP()) {\n\t\t\t\t\t\t\tp.setHP(p.getMaxHP());\n\t\t\t\t\t\t\tevents.appendText(\"Health Restored to Full!\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp.setHP(y);\n\t\t\t\t\t\tevents.appendText(\"Health Restored by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t\t}else if(i.getStat().equals(\"DMG\")) {\n\t\t\t\t\tp.setDMG(p.getDMG()+i.getChange());\n\t\t\t\t\tgdmg.setText(\"\"+p.getDMG());\n\t\t\t\t\tevents.appendText(\"Damage Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t}else {\n\t\t\t\t\tif(p.getEV()+i.getChange()>100) {\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + (100-p.getEV())+\", Max Evasion is 100\\n\");\n\t\t\t\t\t\tp.setEV(100);\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t}else {\n\t\t\t\t\t\tp.setEV(p.getEV()+i.getChange());\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Remove the item from the inventory\n\t\t\t\tx=Inventory.indexOf(i);\n\t\t\t\tInventory.remove(x);\n\t\t\t\tinventoryList.getItems().remove(x);\n\t\t\t\titemselect.setText(\"\");\n\t\t\t\titemStats.setText(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}", "Collection<Item> getInventory();", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }", "@Override\n\tpublic void execute() {\n\t\t_inventory = _game.getInventory();\n\t\tif (_examineInventory)\n\t\t\t_game.print(_inventory.showInventory());\n\t\telse\n\t\t\t_game.print(_inventory.examineItem(_itemName));\n\t}", "public String getItemsString()\n {\n String returnString =\"\";\n if(Inventory.isEmpty()){\n returnString = \"You are not holding any items\";\n } else {\n returnString = \"Items you are holding:\";\n String temp = \"\";\n for(Items item : Inventory.values()) {\n temp += \", \" + item.getName() ; \n }\n returnString += temp.substring(1);\n }\n return returnString;\n }", "public String showItemInfo()\n {\n return \"The room has 1 \" + currentItem.getDescription() \n + \" weighted \" + currentItem.getWeight() + \" pounds\"; \n }", "public String printPlayerInventory() {\r\n\t\t\tif(this.getPlayer().getInventory().getContent().isEmpty()) {\r\n\t\t\t\treturn \"You have no items in your inventory.\" + \"\\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight. \\n\"\r\n\t\t\t\t\t\t+ \"You have \" + this.getPlayer().getGold() + \" gold.\";\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\treturn \"Your \" + this.getPlayer().getInventory().printContent()\r\n\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight. \\n\"\r\n\t\t\t\t\t\t+ \"You have \" + this.getPlayer().getGold() + \" gold.\";\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}", "public void printItems()\n {\n if (getItems().size()==0){\n System.out.println(\"There are no items in this room.\");\n }\n else{\n System.out.print(\"The item(s) in this room are: \");\n int i=0;\n while(i<getItems().size()){\n if(i<getItems().size()-1){\n System.out.print(getItems().get(i).getName()+\", \");\n }\n else{\n System.out.println(getItems().get(i).getName()+\".\");\n }\n i++;\n }\n }\n }", "SimpleInventory getOpenedInventory(Player player);", "@Override\n\tpublic void seeSoldItem() {\n\t\tShip selectedShip = game.getSelectedShip();\n\t\tHashMap<Goods, ArrayList<String>> soldItems = selectedShip.getSoldItems();\n\t\tint index = 1;\n\t\tSystem.out.println(\"Items that has been sold: \");\n\t\tfor (HashMap.Entry<Goods, ArrayList<String>> set: soldItems.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantitySold();\n\t\t\tSystem.out.println(\"(\" + index + \") Name: \" + name + \" Quantity: \" + quantity + \" Loaction it was sold: \" + set.getValue());\n\t\t\tindex++;\n\t\t\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\ttry {\n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\n\t\t\t\t\tstate = true;\n\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t}", "public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "public String printGrabbedItems() {\n return \"Items in your inventory: \" + grabbedItems;\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 }", "void openInventory(Player player, SimpleInventory inventory);", "public Items getItem(String name)\n {\n return Inventory.get(name);\n }", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}", "List<InventoryItem> getInventory();", "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 Item checkForItem(String name) {\r\n Item output = null;\r\n for (Item item : inventory) {\r\n String check = item.getName().replaceAll(\" \", \"\");\r\n if (name.equals(check.toLowerCase())) {\r\n output = item;\r\n }\r\n }\r\n for (Item item : potionInventory) {\r\n String check = item.getName().replaceAll(\" \", \"\");\r\n if (name.equals(check.toLowerCase())) {\r\n output = item;\r\n }\r\n }\r\n return output;\r\n }", "private void viewBackpack() {\n Item[] inventory = GameControl.getSortedInventoryList();\r\n \r\n System.out.println(\"\\n List of inventory Items\");\r\n System.out.println(\"Description\" + \"\\t\" + \r\n \"Required\" + \"\\t\" +\r\n \"In Stock\");\r\n \r\n // For each inventory item\r\n for (Item inventoryItem : inventory){\r\n // Display the description, the required amount and amount in stock\r\n System.out.println(InventoryItem.getType + \"\\t \" +\r\n InventoryItem.requiredAmount + \"\\t \" +\r\n InventoryItem.getQuantity);\r\n }\r\n \r\n }", "public static void item(){\n int opcionItem; //variables locales a utilizar\n Scanner scannerDos=new Scanner(System.in);\n //imprimiendo posibles Items y su cantidad\n System.out.println(\"\\nArticulos Disponibles:\");\n\tSystem.out.println(\"\\n1.Potion, Cura 25HP:\\t\"+articulo1);\n\tSystem.out.println(\"2.Hi-Potion,Cura 75HP:\\t\"+articulo2);\n\tSystem.out.println(\"3.M-Potion, Recupera 10MP:\\t\"+articulo3);\n\t\n do{//validacion de la opcion\n System.out.println(\"\\nNumero de opcion:\");\n opcionItem= scannerDos.nextInt();\n \n }while(opcionItem<1||opcionItem>4);\n //comparador para ver si es posibles utilizar un Item\n switch(opcionItem){\n case 1:{\n if(articulo1>0){//condicion de Item 1 y sus acciones\n puntosDeVida=puntosDeVida+25;\n articulo1=articulo1-1;\n }\n else{\n System.out.println(\"no hay Disponible\");\n }\n break;\n }\n case 2:{\n if(articulo2>0){//condicion de Item 2 y sus acciones\n puntosDeVida=puntosDeVida+75;\n articulo2=articulo2-1;\n }\n else{\n System.out.println(\"no hay Disponible\");\n }\n break;\n }\n default:{\n if(articulo3>0){ //condicion de Item 3 y sus acciones\n puntosDeVida=puntosDeVida+75;\n articulo3=articulo3-1;\n }\n else{\n System.out.println(\"no hay Disponible\");\n }\n break;\n } \n } \n }", "ItemStack getItem();", "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 display_inventory() {\n\t\t// displays all identified crystals\n\t\tfor(int i = 0;i<maxInvSize;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tcrystal_description(identifiedArray[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void displaySelectedItemPopin(final Entity item) {\n\t\tif (selectedItemPopin == null) {\n\t\t\tselectedItemPopin = new Table();\n//\t\t\tselectedItemPopin.setDebug(true);\n\n\t\t\t// Add an empty click listener to capture the click so that the InputSingleton doesn't handle it\n\t\t\tselectedItemPopin.setTouchable(Touchable.enabled);\n\t\t\tselectedItemPopin.addListener(new ClickListener() {});\n\t\t\t\n\t\t\t// Place the popin and add the background texture\n\t\t\tselectedItemPopin.setPosition(GameScreen.SCREEN_W/2, GameScreen.SCREEN_H/2);\n\t\t\tNinePatchDrawable ninePatchDrawable = new NinePatchDrawable(SceneAssets.popinNinePatch);\n\t\t\tselectedItemPopin.setBackground(ninePatchDrawable);\n\t\t\t\n\t\t\tselectedItemPopin.align(Align.top);\n\t\t\t\n\t\t\t// 1 - Title\n\t\t\titemTitle = new Label(\"Title\", PopinService.hudStyle());\n\t\t\tselectedItemPopin.add(itemTitle).top().align(Align.top).pad(20, 0, 20, 0);\n\t\t\tselectedItemPopin.row().align(Align.center);\n\t\t\t\n\t\t\t// 2 - Description\n\t\t\titemDesc = new Label(\"Description\", PopinService.hudStyle());\n\t\t\titemDesc.setWrap(true);\n\t\t\tselectedItemPopin.add(itemDesc).growY().width(900).left().pad(0, 20, 0, 20);\n\t\t\tselectedItemPopin.row();\n\t\t\t\n\t\t\t// 3 - Action buttons\n\t\t\tTable buttonTable = new Table();\n\t\t\t\n\t\t\t// 3.1 - Close button\n\t\t\tfinal TextButton closeBtn = new TextButton(\"Close\",PopinService.buttonStyle());\t\t\t\n\t\t\t// continueButton listener\n\t\t\tcloseBtn.addListener(new ChangeListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t\t\thideSelectedItemPopin();\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuttonTable.add(closeBtn).pad(0, 20,0,20);\n\t\t\t\n\t\t\tselectedItemPopin.add(buttonTable).pad(20, 0, 20, 0);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfinal ItemComponent itemComponent = Mappers.itemComponent.get(item);\n\t\t\n\t\t// Update the content\n\t\titemTitle.setText(itemComponent.getItemLabel());\n\t\titemDesc.setText(itemComponent.getItemDescription());\n\t\t\n\t\t// Place the popin properly\n\t\tselectedItemPopin.pack();\n\t\tselectedItemPopin.setPosition(GameScreen.SCREEN_W/2 - selectedItemPopin.getWidth()/2, GameScreen.SCREEN_H/2 - selectedItemPopin.getHeight()/2);\n\t\n\t\tthis.stage.addActor(selectedItemPopin);\n\t}", "public Product getProduct(int i){\n return inventory.get(i);\n }", "@Override\n\tpublic void openInventory() {\n\t\t\n\t}", "private void loadInv() {\n\t\titem = Main.inventory.business.getAllBaked();\n\t\tString test = \"ID, Name, Amount, Price\\n\";\n\t\t//formatting for string to load into the screen\n\t\tfor(int i=0 ; i< item.size() ; i++) {\n\t\t\ttest += (i+1) + \" \" + item.get(i).getName() +\", \" \n\t\t\t\t\t+ item.get(i).getQuantity() + \n\t\t\t\t\t\", $\"+ Main.inventory.business.getItemCost(item.get(i).getName()) +\"\\n\";\n\t\t}\n\t\tthis.inv.setText(test);\n\t}", "public void onInventoryChanged();", "private void takeItem(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 take?\"); \n return; \n } \n \n String itemName = command.getSecondWord();\n String secondName = itemName + \"2\";\n \n Item thisItem = currentRoom.getItem(itemName);\n Item secondItem = currentRoom.getItem(secondName);\n \n if (thisItem == null) {\n Logger.Log(\"There isn't a \" + itemName + \"in here!\");\n }\n else if (player.inventory.containsKey(itemName)){\n Logger.Log(\"You take another \" + itemName + \" and put it in your backpack.\");\n player.addItem(secondName, secondItem); \n }\n else if (player.inventory.containsKey(itemName)&&(player.inventory.containsKey(secondName))){\n Logger.Log(\"You don't need any more \" + itemName + \"s!\");\n }\n else { \n Logger.Log(\"You take the \" + itemName + \" and put it in your backpack.\");\n player.addItem(itemName, thisItem);\n } \n \n }", "public String PrintInventoryList()\r\n {\r\n String inventoryInformation = \"\";\r\n\r\n System.out.println(\"Inventory: \");\r\n //You may print the inventory details here\r\n for (Product product: productArrayList) // foreach loop to iterate through the ArrayList\r\n {\r\n // TODO: check if this code is right\r\n inventoryInformation += product.getId() + \" \" + product.getName() + \" \" +\r\n product.getCost() + \" \" + product.getQuantity() + \" \" + product.getMargin() + \"\\n\";\r\n }\r\n System.out.println(inventoryInformation);\r\n return inventoryInformation;\r\n }", "public void printInventory(){\n\t\tint i;\n\t\tint listSize = inventory.size();\n\t\tRoll temp;\n\t\tString outputText;\n\t\toutputText = \"Inventory Stocks Per Roll: \";\n\t\t//outputText = inventory.get(0).getRoll().getType() + \" Roll Current stock: \" + inventory.get(0).getStock();\n\t\tfor(i = 0; i < listSize; i++){\n\t\t\tif(i % 3 == 0){\n\t\t\t\toutputText = outputText + \"\\n\";\n\t\t\t}\n\t\t\toutputText = outputText + inventory.get(i).getRoll().getType() + \" : \" + inventory.get(i).getStock() + \" \";\n\t\t}\n\t\tSystem.out.println(outputText);\n\t\tthis.status = outputText;\n\t\tsetChanged();\n notifyObservers();\n\t}", "public void useItem(OutputStreamWriter out, InputStreamReader newIn) {\r\n InputStreamReader instream = newIn;\r\n BufferedReader in = new BufferedReader(instream);\r\n boolean equipped = false;\r\n if (this.player.getInventory().isEmpty()) {\r\n try {\r\n out.write(\"You have nothing in your inventory you can use..\" + System.lineSeparator());\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n } else {\r\n while (!equipped) {\r\n try {\r\n out.write(this.getPlayerInventory());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.write(\"Choose an item by pressing a number: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n try {\r\n int itemNumber = Integer.parseInt(in.readLine());\r\n if (itemNumber >= player.getInventory().size() || itemNumber < 0) {\r\n out.write(\"You do not have that item...\");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n if (player.getInventory().get(itemNumber).getItemType() == 3 || player.getInventory().get(itemNumber).getItemType() == 4) {\r\n out.write(player.useItem(itemNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n out.write(\"Choose between slot 1 and slot 2 by pressing 1 or 2: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n int slotNumber = Integer.parseInt(in.readLine());\r\n while (slotNumber != 1 && slotNumber != 2) {\r\n out.write(\"You have to choose between slot 1 and slot 2\" + System.lineSeparator());\r\n out.flush();\r\n slotNumber = Integer.parseInt(in.readLine());\r\n }\r\n out.write(player.equip(itemNumber, slotNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n }\r\n }\r\n } catch (NumberFormatException ex) {\r\n out.write(\"You have to enter a number. Please try again!\" + System.lineSeparator());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n equipped = true;\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n }", "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "public Item getItem(int itemIndex){\n\t\treturn inventoryItems[itemIndex];\n\t}", "public String toString() {\n System.out.println(\"Inventory: \");\n String str = \"\";\n for(int i = 0; i < numItems; i++) {\n if(inventory[i]!= null) {\n str += inventory[i].toString() + \"\\n\";\n }\n }\n return str;\n }", "public Inventory getEnchantInventory(Player p){\n Inventory inv = Bukkit.createInventory(null, 27, \"Enchant Pickaxe\");\n for(CustomEnchantment ce : enchants.keySet()){\n ItemStack item = new ItemStack(ce.getIcon());\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(ce.getColor() + ce.getDisplayName());\n List<String> lore = new ArrayList<>();\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Current Level: \" + Changeables.CHAT_INFO + getEnchantLevel(ce, p));\n lore.add(Changeables.CHAT + \"Max Level: \" + Changeables.CHAT_INFO + ce.getMaxLevel());\n lore.add(Changeables.CHAT + \"Current Price: \" + Changeables.CHAT_INFO + ce.getPrice(getEnchantLevel(ce, p)));\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Left Click to \" + Changeables.CHAT_INFO + \" Buy 1\");\n lore.add(Changeables.CHAT + \"Right Click to \" + Changeables.CHAT_INFO + \" Buy Max\");\n meta.setLore(lore);\n item.setItemMeta(meta);\n inv.setItem(enchants.get(ce), item);\n }\n\n\n\n\n\n return inv;\n }", "private void equipButtonClicked(final ShopItem shopItem) {\n shopItem.setState(ItemStatusID.EQUIPPED);\n if (shopItem instanceof Shovel) {\n for (Shovel shovel : SHOVELS) {\n if (shovel.equals(shopItem)) {\n continue;\n } else if (shovel.getState() == ItemStatusID.EQUIPPED) {\n shovel.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n } else if (shopItem instanceof Background) {\n for (Background background : BACKGROUNDS) {\n if (background.equals(shopItem)) {\n continue;\n } else if (background.getState() == ItemStatusID.EQUIPPED) {\n background.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n }\n updateUI();\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "public String getInventoryString() {\n String msg = new String(\"Inventory: \\n\");\n for (Map.Entry<String, Item> me : inventory.entrySet()) {\n msg += \" item: \" + me.getKey() + \" description: \" + me.getValue().getDescription() + \"\\n\";\n }\n return msg;\n }", "public static ArmorSlot getItemSlotEquiping(ItemStack item){\n\t\tif(item == null){\n\t\t\treturn ArmorSlot.NONE;\n\t\t}\n\t\t\n\t\tswitch(item.getType()){\n\t\t\t//Helmets:\t\n\t\t\tcase LEATHER_HELMET:\n\t\t\tcase GOLD_HELMET:\n\t\t\tcase CHAINMAIL_HELMET:\n\t\t\tcase IRON_HELMET:\n\t\t\tcase DIAMOND_HELMET: return ArmorSlot.HELMET;\n\t\t\t\n\t\t\t//Chest:\t\n\t\t\tcase LEATHER_CHESTPLATE:\n\t\t\tcase GOLD_CHESTPLATE:\n\t\t\tcase CHAINMAIL_CHESTPLATE:\n\t\t\tcase IRON_CHESTPLATE:\n\t\t\tcase DIAMOND_CHESTPLATE: return ArmorSlot.CHESTPLATE;\n\t\t\t\n\t\t\t//Legs:\t\n\t\t\tcase LEATHER_LEGGINGS:\n\t\t\tcase GOLD_LEGGINGS:\n\t\t\tcase CHAINMAIL_LEGGINGS:\n\t\t\tcase IRON_LEGGINGS:\n\t\t\tcase DIAMOND_LEGGINGS: return ArmorSlot.LEGGINGS;\n\t\t\t\n\t\t\t//feet:\t\n\t\t\tcase LEATHER_BOOTS:\n\t\t\tcase GOLD_BOOTS:\n\t\t\tcase CHAINMAIL_BOOTS:\n\t\t\tcase IRON_BOOTS:\n\t\t\tcase DIAMOND_BOOTS: return ArmorSlot.BOOTS;\n\t\t\n\t\t\n\t\t\tdefault: return ArmorSlot.NONE;\n\t\t}\n\t}", "public void fillInventory(TheGroceryStore g);", "ItemStack getEggItem(IGeneticMob geneticMob);", "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 }", "void dropItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n// int indexItem = -1;\n String nameOfItem = \"\";\n String dropFromInventory = \"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 dropFromInventory = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\")) {\n itemLocation.addItem(currentRoom, new PickableItem(nameOfItem, inventory.getItemWeight(nameOfItem), inventory.getUseable(nameOfItem)));\n inventory.removeItemInventory(nameOfItem);\n System.out.println(\"You have dropped: \" + nameOfItem);\n\n } else {\n System.out.println(\"Can't drop item that isn't in inventory \" + command.getSecondWord());\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (data == null || resultCode != RESULT_OK)\n\t\t\treturn;\n\t\tString type = \"Weapon\";\n\t\tString id = \"\";\n\t\tBundle bundle = data.getExtras();\n\t\tif (bundle != null) {\n\t\t\ttype = bundle.getString(\"type\");\n\t\t\tid = bundle.getString(\"id\");\n\t\t}\n\t\tif (id.isEmpty())\n\t\t\treturn;\n\t\tItem newitem = null;\n\t\tswitch (requestCode) {\n\t\tcase ACT_RESULT_CHOOSE_EQUIPMENT:\n\t\t\tif (mEditingView == null)\n\t\t\t\treturn;\n\t\t\tString oldid = mEditingView.getEquipmentId();\n\n\t\t\t// Find first item with same id and replace it.\n\t\t\tList<Item> list = mDweller.mEquipment.getList();\n\t\t\tif (list != null) {\n\t\t\t\tfor (Item i : list) {\n\t\t\t\t\tif (!i.mId.equals(oldid))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\ti.mId = id;\n\t\t\t\t\ti.mType = type;\n\t\t\t\t\tnewitem = i;\n\t\t\t\t\tconfigView(mEditingView, i, -1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmEditingView = null;\n\t\t\tbreak;\n\t\tcase ACT_RESULT_CHOOSE_WEAPON:\n\t\t\tEquipmentButtonView weaponView = (EquipmentButtonView) findViewById(R.id.equiped_weapon);\n\t\t\tif (type.equals(\"Weapon\")) {\n\t\t\t\tmDweller.mEquipedWeapon.mId = id;\n\t\t\t\tconfigView(weaponView, mDweller.mEquipedWeapon, 1);\n\t\t\t\tnewitem = mDweller.mEquipedWeapon;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ACT_RESULT_CHOOSE_OUTFIT:\n\t\t\tEquipmentButtonView outfitView = (EquipmentButtonView) findViewById(R.id.equiped_outfit);\n\t\t\tif (type.equals(\"Outfit\")) {\n\t\t\t\tmDweller.mEquipedOutfit.mId = id;\n\t\t\t\tconfigView(outfitView, mDweller.mEquipedOutfit, 0);\n\t\t\t\tnewitem = mDweller.mEquipedOutfit;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tif (newitem == null)\n\t\t\treturn;\n\t\ttry {\n\t\t\tnewitem.update();\n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void grabItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryAdd(itemFound, currentRoom);\n }\n }", "public abstract List<String> getInventory();", "public String getPlayerInventory() {\r\n String res = \"You have the following items in your inventory:\" + System.getProperty(\"line.separator\");\r\n for (int i = 0; i < player.getInventory().size(); i++) {\r\n res += i + \": \" + player.getInventory().get(i).toString() + System.getProperty(\"line.separator\");\r\n }\r\n return res;\r\n }", "@EventHandler\n public void onInventoryClick(InventoryClickEvent event){\n // Get who clicked\n Player player = (Player) event.getWhoClicked();\n // Item clicked on\n ItemStack clickedItem = event.getCurrentItem();\n // Inventory clicked in\n Inventory clickedInventory = event.getInventory();\n // Check if clicked in selector inventory\n if (clickedInventory.getName().equals(Selector.invSelector.getName())) {\n // Cancel event\n event.setCancelled(true);\n // Check if not null\n if (clickedItem != null) {\n // Check what clicked\n if (clickedItem.getType() == Material.DIAMOND_PICKAXE) {\n // Close inventory\n player.closeInventory();\n // Open servers\n Survival.openMenu(player);\n } else if (clickedItem.getType() == Material.SNOW_BALL) {\n // Close inventory\n player.closeInventory();\n // Open servers\n Paintball.openMenu(player);\n } else if (clickedItem.getType() == Material.SKULL_ITEM) {\n // Close selector\n player.closeInventory();\n // Send message to player disabled\n Mobarena.openMenu(player);\n } else if (clickedItem.getType() == Material.WOOL) {\n // Close selector\n player.closeInventory();\n // Open servers\n Ctf.openMenu(player);\n } else if(clickedItem.getType() == Material.GRASS){\n // Close selector\n player.closeInventory();\n // Open servers\n Skyblock.openMenu(player);\n } else if(clickedItem.getType() == Material.COMPASS){\n // Close inventory\n player.closeInventory();\n // Back to hub\n Channels.teleportToServer(player, \"We are sending you to the hub.\", Functions.getRandomLobby());\n } else if (clickedItem.getType() == Material.IRON_DOOR) {\n // Close selector\n player.closeInventory();\n // Check if back\n if(Settings.exServers.contains(Settings.pluginServerName)) {\n player.openInventory(networkMenu.networkInv);\n }\n }\n }\n }\n }", "public String chooseItem() {\n console.promptForString(\"\");\n console.promptForPrintPrompt(\"PLEASE ENTER THE NAME OF THE ITEM TO PURCHASE\");\n console.promptForPrintPrompt(\"-----------------------\");\n String toBuy = console.promptForString(\"BUY: \");\n\n return toBuy;\n }", "public String toString() {\n\tString result = \"\";\n for (int x = 0; x < list.size(); x++) {\n result += list.get(x).toString();\n }\n\treturn \"Inventory: \\n\" + result + \"\\n\";\n}", "public void dropItem(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Drop what?\");\n }\n else{\n if(!inventory.isEmpty()){\n boolean found = false;\n for(int i = 0; i < inventory.size() && !found; i++){\n Item itemToDrop = inventory.get(i);\n if(itemToDrop.getId().equals(secondWord)){\n if(itemToDrop.getId().equals(\"wheelchair\")){\n maxWeight = 5;\n for(Item patient : inventory){\n if(patient.getId().equals(\"patient\")){\n patient.changePickUpItem(false);\n }\n }\n }\n if(itemToDrop.getId().equals(\"patient\")){\n itemToDrop.changePickUpItem(false);\n } \n currentRoom.addItem(itemToDrop);\n inventoryWeight -= itemToDrop.getItemWeight();\n inventory.remove(itemToDrop);\n found = true;\n System.out.println(\"You have droped the item: \" + itemToDrop.getId() + \".\");\n }\n }\n }\n else{\n System.out.println(\"Your inventory is empty.\");\n }\n }\n }", "@FXML\n\tpublic void setSelectedItem(MouseEvent event) {\n\t\ttry {\n\t\t\tString s=inventoryList.getSelectionModel().getSelectedItem();\t// Get selected item\n\t\t\tItem i=Item.getItem(ItemList, s);\n\t\t\titemselect.setText(s);\t// Set selected item information\n\t\t\tif(i.getStat().equals(\"HP\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Health\");\n\t\t\telse if(i.getStat().equals(\"DMG\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Damage\");\n\t\t\telse\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Evasion\");\n\t\t} catch(Exception e) {\n\t\t\treturn;\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 String takeItem(String itemName) {\r\n\t\t\tif(this.getPlayer().getCurrentLocation().getItem(itemName) == null) {\r\n\t\t\t\treturn \"There is no \" + itemName + \" in this location.\";\r\n\t\t\t} else if (this.getPlayer().getCurrentLocation().getItem(itemName).isRemovable() == false) {\r\n\t\t\t\treturn \"You cannot take this item.\";\r\n\t\t\t} else if (this.getPlayer().getCarryCapacity() < this.getPlayer().getCurrentLocation().getItem(itemName).getWeight()) {\r\n\t\t\t\treturn \"You cannot carry anymore items.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getPlayer().getCurrentLocation().getItem(itemName).getClassName().equals(\"game.Purse\")) {\r\n\t\t\t\tint gold = new Integer(((Purse)this.getPlayer().getCurrentLocation().getItem(itemName)).getGold());\r\n\t\t\t\tthis.getPlayer().changeGold(((Purse)this.getPlayer().getCurrentLocation().getItem(itemName)).getGold());\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeItem(itemName);\r\n\t\t\t\treturn \"You gain \" + gold + \" gold.\";\r\n\t\t\t}\r\n\t\t\telse if (this.getPlayer().getInventory().getContent().get(itemName) == null) { // if player inventory Itemstack is empty, no problem\r\n\t\t\t\tthis.handleIncQuestrelatedItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().addItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeItem(itemName);\r\n\t\t\t\treturn \"You take \" + itemName + \". \\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t\telse if(this.getPlayer().getInventory().getContent().get(itemName).getNumber() >= this.getPlayer().getInventory().getItemSlots()) { // more than 50 items in stack?\r\n\t\t\t\treturn \"You cannot carry any more items of this type.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.handleIncQuestrelatedItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().addItem(this.getPlayer().getCurrentLocation().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeItem(itemName);\r\n\t\t\t\treturn \"You take \" + itemName + \". \\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t}", "@Override\n @Test\n public void equipTest() {\n Axe axes;\n Sword sword;\n Staff staff;\n Spear spear;\n Luz luz;\n Oscuridad oscuridad;\n Anima anima;\n Bow bow;\n axes = new Axe(\"Axe\", 20, 1, 2);\n sword = new Sword(\"Sword\", 20, 1, 2);\n spear = new Spear(\"Spear\", 20, 1, 2);\n staff = new Staff(\"Staff\", 20, 1, 2);\n bow = new Bow(\"Bow\", 20, 2, 3);\n anima = new Anima(\"Anima\", 20, 1, 2);\n luz = new Luz(\"Luz\", 20, 1, 2);\n oscuridad = new Oscuridad(\"Oscuridad\", 20, 1, 2);\n sorcererAnima.addItem(axes);\n sorcererAnima.equipItem(axes);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(axes);\n sorcererAnima.addItem(sword);\n sorcererAnima.equipItem(sword);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(sword);\n sorcererAnima.addItem(spear);\n sorcererAnima.equipItem(spear);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(spear);\n sorcererAnima.addItem(staff);\n sorcererAnima.equipItem(staff);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(staff);\n sorcererAnima.addItem(bow);\n sorcererAnima.equipItem(bow);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(bow);}", "@Override\n\tpublic void seeShip() {\n\t\tShip selectedShip = game.getSelectedShip();\n\t\tString name = selectedShip.getShipName();\n\t\tint crew = selectedShip.getCrew();\n\t\tdouble cargo = selectedShip.getCapacity();\n\t\tdouble shipsHealth = selectedShip.getShipsStatus();\n\t\tint speed = selectedShip.getShipsSpeed();\n\t\tArrayList<Equipment> equipments = selectedShip.getEquipment();\n\t\tHashMap<Goods, Integer> myGoods = selectedShip.getMyGoods();\n\t\tSystem.out.println(\"Ship's name: \" + name);\n\t\tSystem.out.println(\"Number of crews: \" + crew);\n\t\tSystem.out.println(\"Ship's health: \" + shipsHealth);\n\t\tSystem.out.println(\"Speed: \" + speed);\n\t\tSystem.out.println(\"Maximum cargo capacity: \" + String.format(\"%.2f\",cargo) + \"\\n\");\n\t\tprintEquipments(equipments);\n\t\tprintMyGoods(myGoods);\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\tSystem.out.println(\"(2) See your sold items.\");\n\t\t\ttry {\n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\tgame.backToMain();;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.seeSoldItems();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t}", "public void showSelectedItemScreen(Item item){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/SelectedItemScreen.fxml\"));\n AnchorPane janela = (AnchorPane) loader.load();\n \n Stage equippedItemsStage = new Stage();\n equippedItemsStage.setTitle(\"Item info\");\n equippedItemsStage.initModality(Modality.WINDOW_MODAL);\n equippedItemsStage.initOwner(primaryStage);\n Scene scene = new Scene(janela);\n equippedItemsStage.setScene(scene);\n \n SelectedItemScreenController controller = loader.getController();\n controller.setGame(this, item);\n \n equippedItemsStage.showAndWait();\n }catch(IOException e){\n }\n }", "private void use() {\n switch (choices.get(selection)) {\n case INFO : { \n AbstractInMenu newMenu = new ItemInfo(sourceMenu, item);\n this.sourceMenu.setMenu(newMenu);\n newMenu.setVisible(true);\n } break;\n case USE : {\n entity.use(item); \n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case EQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case ACTIVE : {\n entity.setActiveItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNEQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNACTIVE : {\n entity.setActiveItem(null);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case DROP : {\n entity.drop(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break; \n case PLACE : {\n entity.placeItem(item);\n entity.removeItem(item); \n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n case CLOSE : { \n sourceMenu.activate();\n } break;\n case DESTROY : {\n entity.removeItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n }\n }", "protected ItemBO getSelectedInventoryForAnItem(final ItemBO anItem) {\n\t\tif (!isPartFoundInMultipleLocations(anItem)) {\n\t\t\tanItem.setInventory(shortListRelevantInventory(anItem));\n\t\t\tanItem.setAdditionalInventory(new ArrayList<InventoryBO>());\n\t\t}\n\t\t\n\t\treturn anItem;\n\t}", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}", "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\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 static void displayShopInventory(String[] shopInventory){\r\n for(int i=0; i<shopInventory.length; i++){\r\n switch(shopInventory[i]){\r\n case \"Healing Potion\":\r\n healingPotion HealingPotion = new healingPotion();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + HealingPotion.getHealingPotionBuyPrice());\r\n break;\r\n case \"Greater Healing Potion\":\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + GreaterHealingPotion.getGreaterHealingPotionBuyPrice());\r\n break;\r\n case \"Long Sword\":\r\n longSword LongSword = new longSword();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + LongSword.getBuyPrice());\r\n break;\r\n case \"Great Sword\":\r\n greatSword GreatSword = new greatSword();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + GreatSword.getBuyPrice());\r\n break;\r\n case \"Iron Helmet\":\r\n ironHelmet IronHelmet = new ironHelmet();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + IronHelmet.getBuyPrice());\r\n break;\r\n case \"Iron Chest Plate\":\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + IronChestPlate.getBuyPrice());\r\n break;\r\n case \"Iron Boots\":\r\n ironBoots IronBoots = new ironBoots();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + IronBoots.getBuyPrice());\r\n break;\r\n case \"Iron Gloves\":\r\n ironGloves IronGloves = new ironGloves();\r\n System.out.println((i + 1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + IronGloves.getBuyPrice());\r\n break;\r\n case \"Scroll of Fireball\":\r\n fireball Fireball = new fireball();\r\n System.out.println((i+1) + \") \" + shopInventory[i]);\r\n System.out.println(\"Price: \" + Fireball.getBuyPrice());\r\n }\r\n }\r\n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\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 }", "@EventHandler\r\n\tpublic void onInvClick(InventoryClickEvent event) {\r\n\t\tif (event.getSlot() == 0 && event.getClickedInventory() != null\r\n\t\t\t\t&& event.getClickedInventory().equals(event.getWhoClicked().getInventory())) {\r\n\t\t\tevent.setCancelled(true);\r\n\t\t\treturn;\r\n\t\t} else if (event.getCurrentItem() != null && (event.getCurrentItem().equals(InventoryHandler.getItem(\"blackGlass\"))\r\n\t\t\t\t|| event.getCurrentItem().equals(InventoryHandler.getItem(\"redGlass\")))) {\r\n\t\t\tevent.setCancelled(true);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Class selector inv\r\n\t\tif(event.getClickedInventory() != null && event.getClickedInventory().equals(InventoryHandler.getClassInv())) {\r\n\t\t\tevent.setCancelled(true);\r\n\t\t\tPlayer player = (Player) event.getWhoClicked();\r\n\t\t\tString className = \"\";\r\n\t\t\tif(event.getSlot() == 10) {\r\n\t\t\t\tclassName = \"Assassin\";\r\n\t\t\t} else if(event.getSlot() == 11) {\r\n\t\t\t\tclassName = \"Berserker\";\r\n\t\t\t} else if(event.getSlot() == 12) {\r\n\t\t\t\tclassName = \"FireMage\";\r\n\t\t\t} else if(event.getSlot() == 14) {\r\n\t\t\t\tclassName = \"Necromancer\";\r\n\t\t\t} else if(event.getSlot() == 15) {\r\n\t\t\t\tclassName = \"Priest\";\r\n\t\t\t} else if(event.getSlot() == 16) {\r\n\t\t\t\tclassName = \"Ranger\";\r\n\t\t\t}\r\n\t\t\tif(!className.equals(\"\")) {\r\n\t\t\t\tmain.getPlayers().get(player.getUniqueId()).changeClass(className);\r\n\t\t\t\tplayer.sendMessage(ChatColor.GREEN + \"Class Selected.\");\r\n\t\t\t\tplayer.closeInventory();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@EventHandler(ignoreCancelled = true)\n public void onInventoryClick(@NotNull InventoryClickEvent event) {\n if (!(event.getInventory().getHolder() instanceof Gui)) {\n return;\n }\n\n Gui gui = (Gui) event.getInventory().getHolder();\n Consumer<InventoryClickEvent> onOutsideClick = gui.getOnOutsideClick();\n\n if (onOutsideClick != null && event.getClickedInventory() == null) {\n onOutsideClick.accept(event);\n return;\n }\n\n Consumer<InventoryClickEvent> onGlobalClick = gui.getOnGlobalClick();\n\n if (onGlobalClick != null) {\n onGlobalClick.accept(event);\n }\n\n InventoryView view = event.getView();\n Inventory inventory = Gui.getInventory(view, event.getRawSlot());\n\n if (inventory == null) {\n return;\n }\n\n Consumer<InventoryClickEvent> onTopClick = gui.getOnTopClick();\n\n if (onTopClick != null && inventory.equals(view.getTopInventory())) {\n onTopClick.accept(event);\n }\n\n Consumer<InventoryClickEvent> onBottomClick = gui.getOnBottomClick();\n\n if (onBottomClick != null && inventory.equals(view.getBottomInventory())) {\n onBottomClick.accept(event);\n }\n\n if ((inventory.equals(view.getBottomInventory()) && gui.getState() == Gui.State.TOP) ||\n event.getCurrentItem() == null) {\n return;\n }\n\n List<Pane> panes = gui.getPanes();\n\n //loop through the panes reverse, because the pane with the highest priority (last in list) is most likely to have the correct item\n for (int i = panes.size() - 1; i >= 0; i--) {\n if (panes.get(i).click(gui, event, 0, 0, 9, gui.getRows() + 4))\n break;\n }\n }", "@SideOnly(Side.CLIENT)\r\n public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)\r\n {\r\n return Item.getItemFromBlock(MainRegistry.blockCampfireUnlit);\r\n }", "@Override\r\n\tpublic final ItemStack getItemAt(final int slot) {\r\n\t\treturn slot < this.tools.size() ? this.tools.get(slot).get(this.getViewer()) : null;\r\n\t}", "public String getItemString() \r\n \t{\r\n \t\tString itemString = \"Regarde s'il y a des objets ici: \";\r\n \t\t\r\n \t\tif (!items.getHashMap().isEmpty())\r\n \t\t{\r\n \t\t\tSet<String> cles = items.getKeys();\r\n \t\t\tfor (String nom : cles) \r\n \t\t\t{\r\n \t\t\t\tif(nom != \"beamer\")\r\n \t\t\t\t{\r\n \t\t\t\t\tItem valeurs = items.getValue(nom);\r\n \t\t\t\t\titemString += \"\\n\" + valeurs.getDescriptionItem() + \" qui pèse \" + valeurs.toString() + \" kg\";\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\titemString = \"Il n'y a pas d'objet ici\";\r\n \t\t}\r\n \t\t\r\n \r\n \t\r\n \t\t/********** L'ArrayList des potions **********/\r\n \t\titemString += \"\\n\";\r\n \t\tfor (int i = 0; i < potion.size(); i++) {\r\n \t\t\titemString += \"\\n\" + potion.get(i).getNomPotion();\r\n \t\t}\r\n \t\t/****************************************************************/\r\n \r\n \t\treturn itemString;\r\n \r\n \t}", "public String execute(){\n\t\tGameState g = GameState.instance();\n Dungeon d = g.getDungeon();\n NPC npc = d.getNPC(npcName);\n\t\tString advValue = \"\";\n\t\tString npcValue = \"\";\n\t\tif(npc.getType().equals(\"Friendly\")){\n if(g.getInventory().isEmpty() || npc.getInventory().isEmpty()){\n\t\t\t\treturn \"You cannot trade with \" + npc.getProperName() + \"!\";\n\t\t\t}\n\t\t\tif(!g.getInventory().isEmpty()){\n\t\t\t\tfor(Item i : g.getInventory()){\n\t\t\t\t\tadvValue += \"name: \" + i.getPrimaryName() + \" weight: \" + i.getWeight() + \" value: \" + i.getValue() + \"\\n\";\n\t\t\t\t}\n\t\t\tSystem.out.println(\"\\033[4mAdventurer's Inventory:\\033[0m\\n\" + advValue);\n\t\t\t\n\t\t\t}\n\t\t\tif(!npc.getInventory().isEmpty()){\n for(Item i : npc.getInventory()){\n npcValue += \"name: \" + i.getPrimaryName() + \" weight: \" + i.getWeight() + \" value: \" + i.getValue() + \"\\n\";\n }\n System.out.println(\"\\033[4mNPC's Inventory:\\033[0m\\n\" + npcValue);\n\n\t\t\t}\n\t\t\tSystem.out.println(\"If you would like to swap items, then type 'swap 'your item' 'npc item''\");\n\t\t\tSystem.out.println(\"If you don't want to swap items, then type 'stop'\");\n\t\t\tSystem.out.print(\"> \");\n\t\t\tString answer;\n\t\t\tString advItem = \"\";\n\t\t\tString npcItem = \"\";\n\t\t\tString[] answerSplit;\n\t\t\tanswer = s.nextLine();\n\t\t\twhile(!answer.equals(\"stop\")){\n\t\t\t\tif(!answer.startsWith(\"swap\")){\n\t\t\t\t\tSystem.out.println(\"incorrect format\");\n\t\t\t\t}\n\t\t\t\telse if(answer.split(\" \").length != 3){\n\t\t\t\t\tSystem.out.println(\"incorrect format\");\n\t\t\t\t}\n\t\t\t\telse if(answer.split(\" \").length == 3){\n\t\t\t\t\tanswerSplit = answer.split(\" \");\n\t\t\t\t\tif(d.getItem(answerSplit[1]) == null || !g.getInventory().contains(d.getItem(answerSplit[1]))){\n\t\t\t\t\t\tSystem.out.println(\"trade what?\");\n\t\t\t\t\t}\n\t\t\t\t\telse if(d.getItem(answerSplit[2]) == null || !npc.getInventory().contains(d.getItem(answerSplit[2]))){\n System.out.println(\"trade for what?\");\n }\n\t\t\t\t\telse{\n\t\t\t\t\t\tif(((g.getWeight() - d.getItem(answerSplit[1]).getWeight())+ d.getItem(answerSplit[2]).getWeight()) > 40){\n\t\t\t\t\t\t\tSystem.out.println(\"this will put you over the weight limit\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif((d.getItem(answerSplit[2]).getValue() - d.getItem(answerSplit[1]).getValue()) > 10){\n\t\t\t\t\t\t\t\tSystem.out.println(npc.getProperName() + \" doesn't want to trade this.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tg.getInventory().remove(d.getItem(answerSplit[1]));\n\t\t\t\t\t\t\t\tnpc.getInventory().add(d.getItem(answerSplit[1]));\n\t\t\t\t\t\t\t\tnpc.getInventory().remove(d.getItem(answerSplit[2]));\n\t\t\t\t\t\t\t\tg.getInventory().add(d.getItem(answerSplit[2]));\n\t\t\t\t\t\t\t\treturn \"you have swapped \" + answerSplit[1] + \" for \" + answerSplit[2];\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\tSystem.out.print(\"> \");\n\t\t\t\tanswer = s.nextLine();\n\t\t\t}\n\t\t}\n\t\treturn \"you have stopped trading\";\n\t\t\t\n\t}", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \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}", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }" ]
[ "0.7255849", "0.71219486", "0.7113664", "0.6985533", "0.68550587", "0.6833291", "0.6820143", "0.6819692", "0.6804967", "0.6703203", "0.6673018", "0.6672361", "0.66684693", "0.6655479", "0.6617641", "0.6596505", "0.6592343", "0.6577353", "0.6546487", "0.65435416", "0.6536856", "0.6531118", "0.6507393", "0.6490925", "0.6482125", "0.6479864", "0.64781994", "0.64692944", "0.646672", "0.6458772", "0.6447117", "0.6441495", "0.64143324", "0.6405988", "0.6401824", "0.63965017", "0.63950056", "0.6372854", "0.63369656", "0.6305416", "0.6295571", "0.6288589", "0.6288183", "0.6283267", "0.6282222", "0.62755436", "0.6274269", "0.62694675", "0.62499374", "0.6242299", "0.62160474", "0.6199379", "0.6191012", "0.61901706", "0.61882937", "0.61882657", "0.61827147", "0.61698955", "0.6154065", "0.61472857", "0.6144441", "0.61428493", "0.61422545", "0.6139933", "0.61393535", "0.6129661", "0.61087126", "0.61042726", "0.61021733", "0.60988826", "0.60974", "0.6073352", "0.607229", "0.6066684", "0.6050055", "0.60267395", "0.60157347", "0.6008456", "0.6007507", "0.5996424", "0.5992702", "0.59900236", "0.59886664", "0.5985044", "0.59827733", "0.59826636", "0.59749883", "0.59718835", "0.5971387", "0.59604496", "0.5958978", "0.5942473", "0.5940488", "0.593803", "0.59321105", "0.5926933", "0.5926056", "0.59204394", "0.5916011", "0.5914051" ]
0.7655545
0
Function to remove said item from inventory
private static String[] removeFromBag(String[] inventory, String item){ for(int i=0; i<inventory.length; i++){ if(inventory[i].equals(item)){ inventory[i] = ""; break; } } return inventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeItemInventory(Item item){\r\n playerItem.remove(item);\r\n System.out.println(item.getName() + \" was removed from your inventory\");\r\n }", "public void removeItemInventory(Item item){\n playerItem.remove(item);\n System.out.println(item.getName() + \" was removed from your inventory\");\n }", "public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}", "public void removeItem(Item item)\n\t{\n\t\tinventory.remove(item);\n\t}", "public void removeItem(int itemToRemove){\n\t\tinventoryItems[itemToRemove] = null;\n\t}", "public static void removeItem(String itemName)\n {\n inventory.remove(getItem(itemName));\n }", "private void dropItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryDel(itemFound);\n }\n }", "public void removeProduct(Product item) {\n inventory.remove(item);\n }", "protected abstract void removeItem();", "public void removeItemAt(int theIndex) {\n\t\tList<Item> keys = new ArrayList<Item>(inventory.keySet());\t\n\t\tItem item = keys.get(theIndex);\n\t\tinventory.remove(item);\t\t\n\t}", "public void removeItem(int id);", "public void deleteItemFromInventory(Item item) {\n\t\tinventory.deleteItem(item);\n\t}", "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }", "public ItemStack remove(int debug1) {\n/* 104 */ return this.container.removeItem(this.slot, debug1);\n/* */ }", "@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }", "public void removeItem(Item item) {\r\n for (Iterator<Item> it = inventoryItems.iterator(); it.hasNext(); ) {\r\n Item i = it.next();\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() - 1);\r\n }\r\n if (i.getCount() <= 0) {\r\n it.remove();\r\n }\r\n }\r\n }", "void dropItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n// int indexItem = -1;\n String nameOfItem = \"\";\n String dropFromInventory = \"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 dropFromInventory = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\")) {\n itemLocation.addItem(currentRoom, new PickableItem(nameOfItem, inventory.getItemWeight(nameOfItem), inventory.getUseable(nameOfItem)));\n inventory.removeItemInventory(nameOfItem);\n System.out.println(\"You have dropped: \" + nameOfItem);\n\n } else {\n System.out.println(\"Can't drop item that isn't in inventory \" + command.getSecondWord());\n }\n }", "public void removeItem(String itemName, int Qty) {\n if (checkExist(itemName, Qty) == true) {\n int i;\n //System.out.println(checkExist(itemName));\n for (i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) removedItem.get(\"Amount\"));\n removedItem.put(\"Amount\", a - Qty);\n\n if (a - Qty < 1) {\n removedItem.put(\"Existence\", \"N\");\n }\n }\n }\n } else {\n System.out.println(\"Item \" + itemName + \" is not available.\");\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n System.out.println(\"Since item \" + itemName + \"'s amout is not enough, try less amount.\");\n }\n }\n }\n outPutFile();\n }", "public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }", "private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}", "private void deleteItem() {\n // Only perform the delete if this is an existing inventory item\n if (mCurrentInventoryUri != null) {\n // Call the ContentResolver to delete the inventory item at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentInventoryUri\n // content URI already identifies the inventory item that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentInventoryUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public void deleteItem(LibraryItem item){\r\n\t\tif(this.inverntory.empty())\r\n\t\t\tthrow new RuntimeException(\"Inventory is empty.\");\r\n\t\t// as long as the list is not empty\r\n\t\twhile(!this.inverntory.endpos()){\r\n\t\t\t// check if current head of list is item you want deleted\r\n\t\t\tif(this.inverntory.elem() == item){\r\n\t\t\t\t// if it is, then delete item and report deletion\r\n\t\t\t\tthis.inverntory.delete();\r\n\t\t\t\tSystem.out.println(item+\" removed from inventory.\");\r\n\t\t\t}\r\n\t\t\t// if it is not head of list, advance in list\r\n\t\t\telse{\r\n\t\t\t\tthis.inverntory.advance();\r\n\t\t\t}\r\n\t\t// do so until you reach end of list/inventory\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testRemoveItem() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"B\");\r\n\t\tassertEquals(test, vendMachine.removeItem(\"B\"));\r\n\t}", "public void removeByequip_id(long equip_id);", "public void removeRoomItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = currentRoom.getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }", "public void removePlayerItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = getPerson(PLAYER).getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }", "@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}", "public String removeItem() {\n userFacade.printUsersCart(user);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n //user.getCart().remove(selectedItem);\n userFacade.removeFromCart(user, selectedItem);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n userFacade.printUsersCart(user);\n return \"\";\n }", "public Inventory inventoryDelete (TheGroceryStore g, LinkedList<Inventory> deleter) throws ItemNotFoundException;", "void removeCartItem(int cartItemId);", "public void removeItem(CargoItem item) {\n\t\t\n\t\tif (cargoList.contains(item))\n\t\t{\n\t\t\tcurrentWeight = currentWeight-item.getWeight();\n\t\t\tcurrentVolume = currentVolume-item.getVolume();\n\t\t\tcargoList.remove(item);\n\t\t\tSystem.out.println(\"Item removed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Item not found\");\n\t\t}\n\t\t\n\t}", "public void removeItem(Item iToRemove, int amount) {\n for (Item i : inventory) {\n if (iToRemove.getClass().equals(i.getClass())) {\n int tempQuantity = i.getQuantity() - amount;\n if (tempQuantity > 0) {\n i.setQuantity(tempQuantity);\n } else {\n inventory.remove(i);\n }\n }\n }\n }", "public boolean dropItem(Items item)\n {\n boolean itemDropped = false;\n if(haveItem(item) && !currentRoom.haveItem(item)){ //if item in inventory not room\n \n Inventory.remove(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld --; //inventory tracker -1\n itemDropped = true;\n \n }\n return itemDropped;\n //if(haveItem(item))\n //Inventory.remove(item);\n //itemsHeld --; //inventory tracker -1\n \n }", "public void removeInventoryList(Item item) {\n\t\tinventoryList.remove(item);\n\t}", "private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}", "public static void removeItemFromInventory(final Inventory inventory, final ItemStack item) throws InvalidParameterException, FailedTransactionException {\n if (!isValidInventory(inventory)) {\n throw new InvalidParameterException(\"Cannot remove item from an invalid inventory.\");\n }\n if (!ItemAPI.isValidItem(item)) {\n throw new InvalidParameterException(\"Cannot remove an invalid item from an inventory.\");\n }\n if (!hasRequiredItem(inventory, item, item.getAmount())) {\n throw new FailedTransactionException(\"That inventory does not have the amount of times to remove.\");\n }\n ItemStack[] savedInventory = duplicateInventory(inventory.getContents());\n try {\n int remaining = item.getAmount();\n for (int i = 0; i < inventory.getSize(); i++) {\n ItemStack currentItem = inventory.getItem(i);\n if (ItemAPI.isSimilarItem(currentItem, item)) {\n int currentItemAmount = currentItem.getAmount();\n // If this item can satisfy the remaining amount with some left over\n // then lower the amount of that item and break out of the loop\n if (currentItemAmount > remaining) {\n currentItem.setAmount(currentItemAmount - remaining);\n remaining = 0;\n break;\n }\n // If this item can satisfy the remaining amount exactly\n // then remove the item from the inventory and break out of the loop\n else if (currentItemAmount == remaining) {\n inventory.setItem(i, null);\n remaining = 0;\n break;\n }\n // Otherwise this item still leaves some remaining, so\n // remove the item from the inventory and reduce the remaining\n else {\n inventory.setItem(i, null);\n remaining -= currentItemAmount;\n }\n }\n }\n if (remaining != 0) {\n throw new FailedTransactionException(\"Was not able to remove the exact amount of that item!\");\n }\n }\n catch (FailedTransactionException exception) {\n // Restore the inventory to its previous state\n inventory.setContents(savedInventory);\n throw exception;\n }\n }", "public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }", "public boolean deletePlayerItem(PlayerItem playerItem);", "void removeMenuItem(int itemId, String itemName);", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "@Override\n\tpublic void removeItem(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Items here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id\n\t\t\tSystem.out.print(\"Enter Item Id to delete the item: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeItem(session,itemId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "@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}", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "boolean removAble(InputItem item);", "public void remove(TradeItem newItem) {\n items.remove(newItem);\n }", "private void remove(GroceryItem itemObj, String itemName, double itemPrice) {\n\t\tif (!bag.remove(itemObj)) {\n\t\t\tSystem.out.println(\"Unable to remove, this item is not in the bag.\");\n\t\t} else {\n\t\t\tSystem.out.println(itemName + \" \" + itemPrice + \" removed.\");\n\t\t}\n\t}", "public void useKey() {\n Key key = this.getInventory().getFirstKey();\n if (key != null){\n this.getInventory().removeItems(key);\n }\n }", "@Override\n public Item removeItem(int itemNum) throws VendingMachinePersistenceException {\n loadItemFile();\n Item itemToRemove = itemMap.remove(itemNum);\n writeItemFile();\n\n return itemToRemove;\n }", "public void drop(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\n\t\tList<Item> items = super.getItems();\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (items.contains(item)) {\n\t\t\troom.addItem(item);\n\t\t\tsuper.removeItem(item);\n\t\t\tSystem.out.println(\"Dropped \" + item + \" on the floor.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No \" + item + \" in inventory.\");\n\t\t}\n\t}", "public void hapusItem(Item objItem) {\n arrItem.remove(objItem); //buang item\n }", "public void removeGroceryItem(String item){\n int position = findItem(item);\n if(position > 0)\n myGrocery.remove(position);\n }", "void removeOrderItem(OrderItem target);", "public Item dropItem(String itemName) {\n Item item = items.remove(itemName);\n if(item != null) {\n currentRoom.addItem(item);\n }\n return item;\n }", "public abstract boolean canRemoveItem(Player player, Item item, int slot);", "public void removeFromInventory(String ID) {\n\t\ttry {\n\t\t\t// query to delete an item from its respective table\n\t\t\tString query = \"DELETE FROM \" + LocateRequest.getFurniture() + \" WHERE ID = ?\";\n\t\t\tPreparedStatement myStmtDeleteItem = Connect.getDbConnect().prepareStatement(query); // create statement\n\n\t\t\tmyStmtDeleteItem.setString(1, ID); // sets String, ID, to the question mark\n\t\t\tmyStmtDeleteItem.executeUpdate(); // execute statement\n\t\t\tmyStmtDeleteItem.close(); // close statement\n\t\t} catch (SQLException e) { // SQL exception catch case\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int removeItem(Item item, int n)\r\n {\r\n if(n < VALID_VALUE)\r\n {\r\n System.out.println(\"Error: Your request cannot be completed at this time. Problem: cannot \" +\r\n \"remove a negative number of items of type \" + item.getType());\r\n return INVALID_VALUE;\r\n }\r\n if(this.getItemCount(item.getType()) < n)\r\n {\r\n System.out.println(\"Error: Your request cannot be completed at this time. Problem: the locker \" +\r\n \"does not contain \" + n + \" items of type \" + item.getType());\r\n return INVALID_VALUE;\r\n }\r\n this.getInventory().replace(item.getType(), this.getItemCount(item.getType()) - n);\r\n this.setCurOccupiedCapacity(this.getCurOccupiedCapacity() - n * item.getVolume());\r\n return VALID_VALUE;\r\n }", "private void removeEquippedItemByCoordinates(int nodeX, int nodeY) {\n world.removeEquippedInventoryItemByCoordinates(nodeX, nodeY);\n }", "protected void removeItem(Item item, boolean moving) {\n/* 2393 */ if (this.vitems != null)\n/* */ {\n/* 2395 */ if (!this.vitems.isEmpty()) {\n/* */ \n/* 2397 */ if (item.getTemplateId() == 726)\n/* 2398 */ Zones.removeDuelRing(item); \n/* 2399 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* 2400 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2402 */ this.vitems.removePileItem(item.getFloorLevel());\n/* 2403 */ if (this.vitems.isEmpty())\n/* */ {\n/* */ \n/* 2406 */ this.vitems.destroy(this);\n/* 2407 */ this.vitems = null;\n/* */ }\n/* */ \n/* 2410 */ } else if (this.vitems.removeItem(item)) {\n/* */ \n/* */ \n/* 2413 */ this.vitems.destroy(this);\n/* */ \n/* 2415 */ this.vitems = null;\n/* 2416 */ if (pileItem != null)\n/* */ {\n/* 2418 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* */ }\n/* 2421 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(pileItem.getFloorLevel())) {\n/* */ \n/* 2423 */ if (!moving) {\n/* 2424 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* 2426 */ } else if (!item.isDecoration() && pileItem != null) {\n/* */ \n/* 2428 */ checkIfRenamePileItem(pileItem);\n/* */ } \n/* 2430 */ if (item.isDomainItem())\n/* 2431 */ Zones.removeAltar(item, moving); \n/* 2432 */ if (item.getTemplateId() == 1175 || item.getTemplateId() == 1239)\n/* 2433 */ Zones.removeHive(item, moving); \n/* 2434 */ if (item.getTemplateId() == 939 || item.isEnchantedTurret())\n/* 2435 */ Zones.removeTurret(item, moving); \n/* 2436 */ if (item.isEpicTargetItem())\n/* 2437 */ EpicTargetItems.removeRitualTargetItem(item); \n/* 2438 */ if (item.isKingdomMarker())\n/* */ {\n/* 2440 */ if (item.getTemplateId() != 328)\n/* 2441 */ Kingdoms.destroyTower(item); \n/* */ }\n/* 2443 */ if (item.getTemplateId() == 521) {\n/* */ \n/* 2445 */ this.zone.creatureSpawn = null;\n/* 2446 */ Zone.spawnPoints--;\n/* */ } \n/* 2448 */ if (this.village != null && item.getTemplateId() == 757)\n/* */ {\n/* 2450 */ this.village.removeBarrel(item);\n/* */ }\n/* */ }\n/* */ else {\n/* */ \n/* 2455 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* */ \n/* 2457 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2459 */ this.vitems.removePileItem(item.getFloorLevel());\n/* */ }\n/* 2461 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(item.getFloorLevel())) {\n/* */ \n/* 2463 */ destroyPileItem(item.getFloorLevel());\n/* */ } \n/* */ } \n/* */ }\n/* 2467 */ if (item.isFence()) {\n/* */ \n/* 2469 */ int offz = 0;\n/* */ \n/* */ try {\n/* 2472 */ offz = (int)((item.getPosZ() - Zones.calculateHeight(item.getPosX(), item.getPosY(), item\n/* 2473 */ .isOnSurface())) / 10.0F);\n/* */ }\n/* 2475 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 2477 */ logger.log(Level.WARNING, \"Dropping fence item outside zones.\");\n/* */ } \n/* 2479 */ float rot = Creature.normalizeAngle(item.getRotation());\n/* 2480 */ if (rot >= 45.0F && rot < 135.0F) {\n/* */ \n/* 2482 */ VolaTile next = Zones.getOrCreateTile(this.tilex + 1, this.tiley, (item\n/* 2483 */ .isOnSurface() || this.isTransition));\n/* 2484 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex + 1, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, next\n/* 2485 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2487 */ else if (rot >= 135.0F && rot < 225.0F) {\n/* */ \n/* 2489 */ VolaTile next = Zones.getOrCreateTile(this.tilex, this.tiley + 1, (item\n/* 2490 */ .isOnSurface() || this.isTransition));\n/* 2491 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley + 1, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, next\n/* 2492 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2494 */ else if (rot >= 225.0F && rot < 315.0F) {\n/* */ \n/* 2496 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, \n/* 2497 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ }\n/* */ else {\n/* */ \n/* 2501 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, \n/* 2502 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ } \n/* */ } \n/* */ \n/* 2506 */ sendRemoveItem(item, moving);\n/* 2507 */ if (!moving) {\n/* 2508 */ item.setZoneId(-10, this.surfaced);\n/* */ }\n/* */ }", "public void removeExistingItem(Item item) {\n inventory.remove(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void remove(Inventory toRemove) throws InventoryNotFoundException {\n requireNonNull(toRemove);\n if (!list.remove(toRemove)) {\n throw new InventoryNotFoundException();\n }\n }", "public void removeItem() {\n if (this.size() == 0) {\n System.out.println(\"Empty List.\");\n return;\n }\n this.print();\n String code;\n System.out.println(\"Enter the code of removed item: \");\n code = sc.nextLine().toUpperCase();\n int pos = find(code);\n if (pos < 0) {\n System.out.println(\"This code does not exist.\");\n } else {\n this.remove(pos);\n System.out.println(\"The item \" + code + \" has been removed.\");\n\n }\n }", "public Object removeItem (String key);", "public void rmItem(Item item) {\n\t\titems.remove(item);\n\t}", "public void removeItem(Item e) {\n\t\tif (items.contains(e))\n\t\t\titems.remove(e);\n\t}", "public void remove() {\n/* 1379 */ super.remove();\n/* 1380 */ this.inventoryMenu.removed(this);\n/* 1381 */ if (this.containerMenu != null) {\n/* 1382 */ this.containerMenu.removed(this);\n/* */ }\n/* */ }", "ItemStack removePage(EntityPlayer player, ItemStack itemstack, int index);", "void removeStock(int i);", "private void removeItemByCoordinates(int nodeX, int nodeY) {\n world.removeUnequippedInventoryItemByCoordinates(nodeX, nodeY);\n }", "public int removeItem(Item item, int n){\r\n if(unitMap.containsKey(item.getType())) {\r\n //if n negative number:\r\n if (n < 0) {\r\n System.out.println(NO_ITEMS_REMOVED_NEGATIVE + item.getType());\r\n return NO_ITEMS_ADDED;\r\n }\r\n //if not negative:\r\n else {\r\n if (unitMap.get(item.getType()) > n || unitMap.get(item.getType()) == n) {\r\n if(unitMap.get(item.getType()) == n) unitMap.remove(item.getType());\r\n else unitMap.put(item.getType(), unitMap.get(item.getType()) - n);\r\n availableCapacity += n*item.getVolume();\r\n return ZERO;\r\n }\r\n // if less then n items in the locker\r\n else {\r\n System.out.println(NO_ITEMS_REMOVED + n + NO_ITEMS_ADDED_NEW_N2 + item.getType());\r\n return NO_ITEMS_ADDED;\r\n }\r\n }\r\n }\r\n else {\r\n System.out.println(GENERAL_ERROR_MSG);\r\n return NO_ITEMS_ADDED;\r\n }\r\n }", "public void dropItem(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Drop what?\");\n }\n else{\n if(!inventory.isEmpty()){\n boolean found = false;\n for(int i = 0; i < inventory.size() && !found; i++){\n Item itemToDrop = inventory.get(i);\n if(itemToDrop.getId().equals(secondWord)){\n if(itemToDrop.getId().equals(\"wheelchair\")){\n maxWeight = 5;\n for(Item patient : inventory){\n if(patient.getId().equals(\"patient\")){\n patient.changePickUpItem(false);\n }\n }\n }\n if(itemToDrop.getId().equals(\"patient\")){\n itemToDrop.changePickUpItem(false);\n } \n currentRoom.addItem(itemToDrop);\n inventoryWeight -= itemToDrop.getItemWeight();\n inventory.remove(itemToDrop);\n found = true;\n System.out.println(\"You have droped the item: \" + itemToDrop.getId() + \".\");\n }\n }\n }\n else{\n System.out.println(\"Your inventory is empty.\");\n }\n }\n }", "@Override\n\tpublic Weapon sell(int itemNumber) {\n\t\t\n\t\t\n\t\treturn inventory.removeItem(itemNumber);\n\t}", "public void removeFromCart(final Item item) {\n for (Item f : cart) {\n if (f.getName().equals(item.getName())) {\n if (\n f.getQuantity() == item.getQuantity()) {\n cart.remove(f);\n return;\n }\n f.setQuantity(f.getQuantity() - item.getQuantity());\n return;\n }\n }\n }", "public void removeItem(Product p) throws IOException {\n for(Product l: this.cartContents)\n System.out.println(l.getProductName());\n this.cartContents.remove(p);\n this.saveCart();\n }", "public ItemStack removeItems(int paramInt1, int paramInt2)\r\n/* 31: */ {\r\n/* 32: 47 */ if (this.a[paramInt1] != null)\r\n/* 33: */ {\r\n/* 34: 48 */ if (this.a[paramInt1].stackSize <= paramInt2)\r\n/* 35: */ {\r\n/* 36: 49 */ ItemStack localamj = this.a[paramInt1];\r\n/* 37: 50 */ this.a[paramInt1] = null;\r\n/* 38: 51 */ return localamj;\r\n/* 39: */ }\r\n/* 40: 53 */ ItemStack localamj = this.a[paramInt1].split(paramInt2);\r\n/* 41: 54 */ if (this.a[paramInt1].stackSize == 0) {\r\n/* 42: 55 */ this.a[paramInt1] = null;\r\n/* 43: */ }\r\n/* 44: 57 */ return localamj;\r\n/* 45: */ }\r\n/* 46: 60 */ return null;\r\n/* 47: */ }", "public Item removeItem(int itemIndex) {\n\t\tItem itemRemoved = purchaseList.removeItem(itemIndex);\n\t\tif (itemRemoved instanceof PLUCodedItem || itemRemoved instanceof BarcodedItem) {\n\t\t\tProduct realProduct = this.getProductFromItem(itemRemoved);\n\t\t\tint inventory = this.productDatabase.getInventoryByProduct(realProduct);\n\t\t\tthis.productDatabase.setInventoryByProduct(realProduct, inventory + 1);\n\t\t}\n\t\treturn itemRemoved;\n\t}", "void removeUses(Equipment oldUses);", "public void removeItem(Item item) {\n _items.remove(item);\n }", "public void removeFromInventoryPage(Index index) throws InventoryNotFoundException, InventoryNotRemovableException {\n\n try {\n Inventory item = list.get(index.getZeroBased());\n\n if (item.getEventInstances() == 0) {\n list.remove(index.getZeroBased());\n } else {\n throw new InventoryNotRemovableException();\n }\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }", "public void removeItem(int n)\n {\n items.remove(n);\n }", "default ItemStack removeOneItem() {\n return removeOneItem(StandardStackFilters.ALL);\n }", "public boolean removeItem(Item item, int x, int y) {\n\t\tInventory items = getItemsAt(x, y);\n\t\tif (!items.any()) {\n\t\t\tLog.warning(\"Failed! no items at \" + x + \",\" + y);\n\t\t\treturn false;\n\t\t}\n\t\tboolean removed = items.remove(item);\n\t\treturn removed;\n\t}", "public abstract boolean depleteItem();", "public void itemRemoved(E item);", "public void takeItem(String name, Player player)\n {\n int i=items.size()-1;\n while(i>=0){\n if(items.get(i).getName().equals(name))\n {\n player.addItem(items.get(i));\n System.out.println(\"You take the \"+items.get(i).getName()+\"!\");\n items.remove(i);\n return;\n }\n i--;\n }\n System.out.println(\"Action failed. Review your input and try again!\");\n }", "public void remove(Equipment equipment) {\n equipments.remove(equipment);\n }", "public static void removeItem(final Player p, final Material material, final int amount) {\n for (int i = 1; i <= amount; ++i) {\n final ItemStack ite = p.getInventory().getItem(p.getInventory().first(material));\n final ItemStack it = new ItemStack(ite.getType(), 1, ite.getDurability());\n it.setItemMeta(ite.getItemMeta());\n p.getInventory().removeItem(new ItemStack[]{it});\n }\n }", "public void removePlayerItem(Player player, ItemStack item, int amountToRemove){\n\t\tint amountLeft = amountToRemove;\n\t\tdebugOut(\"Searching for \"+amountLeft+\" items\");\n\t\tItemStack[] inventory = player.getInventory().getContents();\n\t\tint invSlot = 1;\n\t\tfor(ItemStack currentItem:inventory){\n\t\t\tif(amountLeft > 0){\n\t\t\t\tdebugOut(\"Inventory slot: \"+invSlot);\n\t\t\t\tdebugOut(\"Amount remaining:\"+amountLeft);\n\t\t\t\tinvSlot++;\n\t\t\t\tif(areEqualItems(currentItem, item)){\n\t\t\t\t\tdebugOut(\"Items match -- getting stack size\");\n\t\t\t\t\tdebugOut(\"Stack size:\"+currentItem.getAmount());\n\t\t\t\t\tint stackSize = currentItem.getAmount();\n\t\t\t\t\tif(stackSize > amountLeft){\n\t\t\t\t\t\tdebugOut(\"There are more items in this stack than needed\");\n\t\t\t\t\t\tcurrentItem.setAmount(stackSize-amountLeft);\n\t\t\t\t\t\tamountLeft = 0;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdebugOut(\"This stack does not have enough to deposit the item -- deducting amount\");\n\t\t\t\t\t\tplayer.getInventory().removeItem(currentItem);\n\t\t\t\t\t\tdebugOut(\"removingItemAmount: \"+currentItem.getAmount() );\n\t\t\t\t\t\tamountLeft -= currentItem.getAmount();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tdebugOut(\"Not the same item\");\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tdebugOut(\"Amount left is 0; breaking loop\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void unScheduleItem(IItem item, BankFusionEnvironment env) {\n removeItem(item);\n }", "public void deleteItem(String nomItem) {\r\n \t\titems.removeItem(nomItem);\r\n \t}", "public static int removeItem(Basket basket, String item, int quantity) {\n StockItem stockItem = stockList.getStockItem(item);\n if (stockItem == null) {\n System.out.println(\"We don't sell \" + item);\n return 0;\n }\n if (basket.removeFromBasket(stockItem, quantity) == quantity) {\n return stockList.unreservedStock(item, quantity);\n }\n return 0;\n }", "@Override\n public void removeMenu(Items item) {\n int index = getCartIndex(item);\n if (index >= 0) {\n Items cartItem = mCartAdapter.getmCartItemsList().get(index);\n cartItem.setItemQuantity(cartItem.getItemQuantity() - 1);\n if (cartItem.getItemQuantity() == 0) {\n mCartAdapter.getmCartItemsList().remove(index);\n }\n// else {\n// mCartAdapter.getmCartItemsList().set(index, cartItem);\n// }\n item.setItemQuantity(item.getItemQuantity() - 1);\n updateCartMenu();\n } else { // Duplicate item available in cart\n Toast.makeText(OrderOnlineActivity.this, getResources().getString(R.string.multiple_customisation_error), Toast.LENGTH_LONG).show();\n }\n }", "public Objects removeObject(String itemName)\n {\n return items.remove(itemName);\n }", "public final void consume(Player player, Collection<ItemStack> items)\n\t{\n\t\tInventoryHelper.remove(player, items);\n\t}", "void removeProduct(int position) throws ProductNotFoundException;", "public String dropItem(String item){\n if(hasGrabbedItem(item)){\n grabbedItems.remove(item);\n return \"You have dropped: \" + item;\n }else{\n return \"You don't have one to drop.\";\n }\n }", "public void remove(Index index) throws InventoryNotFoundException {\n\n try {\n list.remove(index.getZeroBased());\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }", "@Override\r\n\tpublic GlobalResult deleteEquip(String mspno) {\n\t\treturn null;\r\n\t}", "public void buy(Item item) {\n // remove money from wallet\n try { \n wallet.removeMoney(item.getPrice());\n // remove item from room\n currentRoom.removeItem(item);\n // add item to inventory\n addToInventory(item);\n } catch (IllegalArgumentException e) {\n System.err.println(\"You don't have enough money to purchase \" + item.getDescription());\n }\n\n\n }", "public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}", "public void playerDropItem(Player p, Item i) {\n\t\tTile tileInFront = p.getLocation().getTileInDirection(p.getPosition(), p.getFacing());\n\t\tif (tileInFront.getGameObject() == null) {\n\t\t\ttileInFront.setGameObject(i);\n\t\t\tp.getInventory().remove(i);\n\t\t}\n\n\t}" ]
[ "0.80365086", "0.8015905", "0.7943136", "0.7620472", "0.7597028", "0.744281", "0.743913", "0.7423332", "0.7357906", "0.7321511", "0.7315207", "0.7275073", "0.72735274", "0.7236741", "0.7189508", "0.71748877", "0.71660113", "0.71461934", "0.7143037", "0.7105226", "0.7085855", "0.7074071", "0.7065388", "0.7015446", "0.7002126", "0.6988494", "0.6976767", "0.69609386", "0.6956303", "0.6938701", "0.69359833", "0.69329596", "0.6929417", "0.6929027", "0.6921318", "0.6911025", "0.6902549", "0.68947953", "0.687067", "0.68255305", "0.68235487", "0.6820896", "0.6812025", "0.6803721", "0.67914", "0.6774302", "0.6769876", "0.676889", "0.67485833", "0.6743505", "0.673008", "0.67277133", "0.67247695", "0.6721864", "0.6708325", "0.6704913", "0.669787", "0.6697835", "0.6683339", "0.66656786", "0.6637528", "0.6623231", "0.66127783", "0.6602711", "0.6578721", "0.65753937", "0.65659124", "0.65592223", "0.65470064", "0.6527769", "0.6527069", "0.6525641", "0.6520455", "0.649119", "0.6483946", "0.6477273", "0.6473013", "0.6465441", "0.6453843", "0.6452657", "0.6452638", "0.6443455", "0.64408135", "0.6435664", "0.6435134", "0.6432647", "0.6422243", "0.6415036", "0.6410501", "0.6409492", "0.63917893", "0.639086", "0.638899", "0.6375927", "0.6364811", "0.63638556", "0.6363807", "0.63471043", "0.63395375", "0.6336014" ]
0.6649395
60
Function that tallies the experience of the player
private static int experienceTally(int playerExperience, int monsterExperience){ int totalExperience; totalExperience = playerExperience + monsterExperience; return totalExperience; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void experience(){\n PlayerStats.currentEXP += (12*AC + 8*totalHP);\n System.out.println(\"You gained \" +(12*AC + 8*totalHP)+ \" experience!\");\n }", "public abstract double experience();", "public void gainExperience(Combatant opponent) { }", "void givePlayerExp(BPlayer bPlayer, int exp);", "public boolean gainExperience(int i) {\n boolean lvlUp = false;\n switch (i) {\n case 1:\n // if a level 1 enemy is defeated\n Experience += 1;\n // if hero levels up\n if ((LVL == 1 && Experience == 1) || (LVL == 2 && Experience == 2) || (LVL == 3 && Experience == 3)) {\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n }\n break;\n case 2:\n // if a level 2 enemy is defeated\n Experience += 2;\n // if hero levels up\n if ((LVL == 2 && Experience == 2) || (LVL == 3 && Experience == 3)) {\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n }\n break;\n case 3:\n // if a level 3 enemy is defeated\n Experience += 3;\n if (Experience == 3) { // if hero levels up\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n }\n break;\n case 4:\n // if a level 4 enemy is defeated\n Experience += 1000;\n if (Experience >=4) { // if hero levels up\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n } \n break;\n default:\n break;\n }\n HP.setHealth(HP.getCapacity()); // healing hero to full\n return lvlUp;\n }", "public int getExperience();", "public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}", "public void gainExpHonors(int exp){\r\n\t\tSystem.out.println(this.getName() + \"'s XP: \" + this.getExperiencePoints() + \" ---> \" + (this.getExperiencePoints()+exp));\r\n\r\n\t\t//this.experiencePoints += exp;\r\n\t\t\t//parameters 1 == count, 0 is being used as the xp start point to evaluate\r\n\t\t\t//the intervals in the helper method\r\n\t\twhile(exp >= calcLevel(1,0)){\r\n\t\t\t//System.out.println(calcLevel(1,0));\r\n\t\t\tthis.experiencePoints = calcLevel(1,0);\r\n\t\t\t//System.out.println(this.getExperiencePoints());\r\n\t\t\tthis.levelUp();\r\n\t\t}\r\n\t\t\r\n\t\tthis.experiencePoints += (exp-this.experiencePoints);\r\n\t}", "public int getExperienceGained() {\r\n return experienceGained;\r\n }", "protected int getExperiencePoints(EntityPlayer player)\n {\n return super.getExperiencePoints(player);\n }", "public void gainExp(int exp){\r\n\t\tSystem.out.println(this.getName() + \"'s XP: \" + this.getExperiencePoints() + \" ---> \" + (this.getExperiencePoints()+exp));\r\n\t\tthis.experiencePoints += exp;\r\n\t\t\t//parameters 1 == count, 0 is being used as the xp start point to evaluate\r\n\t\t\t//the intervals in the helper method\r\n\t\tif(this.getExperiencePoints() >= calcLevel(1,0)){\r\n\r\n\t\t\tthis.levelUp();\r\n\t\t}\r\n\r\n\t}", "protected int getExperiencePoints(PlayerEntity player) {\n return super.getExperiencePoints(player);\n }", "public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }", "private void addExperience(Player player, String profession, int exp)\n\t{\n\t\tUUID uuid = player.getUniqueId();\n\t\tProfessionStats prof = new ProfessionStats(perms, data, config, uuid);\n\t\tint result = prof.addExperience(profession, exp);\n\t\t\n\t\tif (notified.contains(uuid))\n\t\t\treturn;\n\t\t\n\t\tif (result == 5)\n\t\t{\n\t\t\tnotified.add(uuid);\n\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot gain any experience because you are on cooldown.\");\n\t\t}\n\t\t\n\t\tif (result == 4)\n\t\t{\n\t\t\tnotified.add(uuid);\n\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot gain any experience because you have reached the \" +\n\t\t\t\t\t\"maximum number of tiers permitted.\");\n\t\t}\n\t\tif (result == 3)\n\t\t{\n\t\t\tnotified.add(uuid);\n\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot gain any experience because you have reached the \" +\n\t\t\t\t\t\"maximum tier in \" + profession);\n\t\t}\n\t\tif (result == 2)\n\t\t{\n\t\t\tnotified.add(uuid);\n\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot gain any experience because you have not yet claimed \" +\n\t\t\t\t\t\"all your tiers.\");\n\t\t}\n\t}", "@Override\n protected int getBonusPoints() {\n return leadership + experience;\n }", "public void addExperience(int slot, double experience) {\r\n double mod = ((slot == 0 || slot == 1 || slot == 2 || slot == 3 || slot == 4 || slot == 6 || slot == 18) ?\r\n Constants.COMBAT_EXP_MODIFIER : Constants.NON_COMBAT_EXP_MODIFIER);\r\n if (entity instanceof Player) {\r\n Player player = (Player) entity;\r\n if (player.getSavedData().getGlobalData().getExperienceModifierTime() > 0 && player.getSavedData().getGlobalData().getExperienceModifier() > 1) {\r\n mod = (mod * player.getSavedData().getGlobalData().getExperienceModifier());\r\n }\r\n }\r\n if (entity instanceof Player) {\r\n Player p = (Player) entity;\r\n p.getAntiMacroHandler().registerExperience(slot, experience);\r\n }\r\n this.experience[slot] += (experience * mod);\r\n if (this.experience[slot] > 200_000_000) {\r\n this.experience[slot] = 200_000_000;\r\n }\r\n experienceGained = experienceGained + (int) (experience * mod);\r\n int newLevel = getStaticLevelByExperience(slot);\r\n if (newLevel > staticLevels[slot]) {\r\n if (dynamicLevels[slot] < newLevel) {\r\n dynamicLevels[slot] += newLevel - staticLevels[slot];\r\n }\r\n staticLevels[slot] = newLevel;\r\n if (entity instanceof Player) {\r\n Player p = (Player) entity;\r\n if (updateCombatLevel()) {\r\n if (!p.getSavedData().getGlobalData().hasAnnouncedCombat() && p.getProperties().getCurrentCombatLevel() == Constants.MAX_COMBAT_LEVEL) {\r\n p.getSavedData().getGlobalData().setCombatAnnounced(true);\r\n p.sendGlobalNewsMessage(\"ff8c38\", \" has reached the max combat level of \" + Constants.MAX_COMBAT_LEVEL + \"!\", 5);\r\n }\r\n p.getUpdateMasks().register(new AppearanceFlag(p));\r\n }\r\n handleMilestones(p);\r\n if (getExperience(slot) == 200_000_000) {\r\n if (!p.getSavedData().getGlobalData().getExperienceMilestone(slot)) {\r\n p.getSavedData().getGlobalData().setExperienceMilestone(slot);\r\n p.sendGlobalNewsMessage(\"ff0000\", \" has just reached 200,000,000 experience in \" + TextUtils.formatDisplayName(SKILL_NAME[slot]), 6);\r\n }\r\n }\r\n LevelUp.levelUp(p, slot);\r\n }\r\n }\r\n if (entity instanceof Player) {\r\n if (entity.asPlayer().getInterfaceState().get(InterfaceConfiguration.XP_DROP_LOCK) == 0) {\r\n entity.asPlayer().getSavedData().getGlobalData().increaseXpDrops((long) (experience * mod));\r\n }\r\n PacketRepository.send(XPDrop.class, new XPDropContext((Player) entity, slot, (int) (experience * mod)));\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, slot));\r\n }\r\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public void action(Player myPlayer)\n {\n if (getNbUtilisation() == 0) {\n System.out.println(\"Not possible\");\n } else {\n int nHealthy = getPointsHealthy();\n myPlayer.addLifePoints(nHealthy);\n\n }\n }", "public void promote() {\r\n\t\tif (exp >= 20) {\r\n\t\t\tstage +=1;\r\n\t\t\texp = 0;\r\n\t\t\thp *= 2;\r\n\t\t\tenergy *= 2;\r\n\t\t\tattackPoint *= 2;\r\n\t\t\tresistancePoint *= 2;\r\n\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.printf(\"Pokemon has evolved!\\n\");\r\n\t}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "private void haveFun() {\n\t\tint action = inputPrompt.funActivities(money);\r\n\t\tthis.money -= action;\r\n\t\t//has better effect depending on how much money you have spent\r\n\t\tthis.mentalHealth += FUNHEALTH + action;\r\n\t\tdailyTime--;\r\n\t\tinputPrompt.mainInfo(energy, physHealth, mentalHealth, money);\r\n\t\t\r\n\t}", "public int getExperiencePoints() {\n return experiencePoints;\n }", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "private void playAI (int actualAI) {\n }", "public int getExperience() {\r\n\t\treturn experience;\r\n\t}", "public void setExperienceGained(int experienceGained) {\r\n this.experienceGained = experienceGained;\r\n }", "@Override\n\tprotected void addExperience(double time) {\n\t}", "int getAttackRoll();", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "private void parseExperienceModifiers(Player player, GlobalData playerData){\r\n\r\n for(int skillID = 0; skillID < playerData.getExperienceModifierTime(); skillID++){\r\n int timeLeft = playerData.getExperienceModifiersTime()[skillID];\r\n if(timeLeft > 0){\r\n if(timeLeft == 1){\r\n playerData.getExperienceModifiersTime()[skillID] = -1;\r\n playerData.getExperienceModifiers()[skillID] =-1;\r\n player.getActionSender().sendMessage(\"<col=254F00>Your experience bonus for \"+ Skills.SKILL_NAME[skillID]+\" has run out.\");\r\n } else if (timeLeft == 5)\r\n player.getActionSender().sendMessage(\"<col=254F00>Your experience bonus for \"+Skills.SKILL_NAME[skillID]+\" will end in less than 5 minutes.\");\r\n playerData.getExperienceModifiersTime()[skillID]--;\r\n }\r\n }\r\n\r\n /*\r\n * universal modifier\r\n */\r\n\r\n if (playerData.getExperienceModifierTime() < 1)\r\n return;\r\n\r\n if (playerData.getExperienceModifierTime() == 1) {\r\n playerData.setExperienceModifier(-1);\r\n playerData.setExperienceModifierTime(-1);\r\n player.getActionSender().sendMessage(\"<col=254F00>Your universal experience bonus has run out.\");\r\n return;\r\n }\r\n\r\n if (playerData.getExperienceModifierTime() == 5)\r\n player.getActionSender().sendMessage(\"<col=254F00>Your universal experience bonus will end in less than 5 minutes.\");\r\n\r\n playerData.decreasesExperienceModifierTime();\r\n }", "public abstract void interact (Player p, int interactAmount);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\teHp -= player.Attack();\n\t\t\t\t\tpHp -= player.Attack();\n\t\t\t\t\tif (pHp <= 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// losing message\n\t\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\tToast toast = Toast.makeText(context, \"Aww...You Lost\", Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tIntent resultIntent = new Intent();\n\t\t\t\t\t\tresultIntent.putExtra(\"data1\", player);\n\t\t\t\t\t\tsetResult(RESULT_OK, resultIntent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if (pHp > 0 && eHp < 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// winning message\n\t\t\t\t\t\tplayer.setCandies(player.getCandies() + 500000000);\n\t\t\t\t\t\tToast toast = Toast.makeText(context, \"You have now surpassed yourself, young grasshopper take 500000000 candies!\", Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tIntent resultIntent = new Intent();\n\t\t\t\t\t\tresultIntent.putExtra(\"data1\", player);\n\t\t\t\t\t\tsetResult(RESULT_OK, resultIntent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// update Hp\n\t\t\t\t\tplayHp.setText(\"Player Hp: \" + String.valueOf(pHp));\n\t\t\t\t\tenemyHp.setText(\"Enemy Hp: \" + String.valueOf(eHp));\n\t\t\t}", "public void basicEnemyAI(){\n if(enemyMana == enemyManaMax){\n applyCard(enemyPlayCard(), \"enemy\");\n }\n }", "public void setExperience(int e) {\n\t\texperience += e;\n\t\twhile(experience >= getExperienceToNextLevel()) {\n\t\t\texperience -= getExperienceToNextLevel();\n\t\t\tlevel++;\n\t\t}\n\t\tMAX_LIFE+= level*100;\n\t\tlife = MAX_LIFE;\n\t}", "public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }", "public void actionCombat(Party p1) {\n System.out.println(\"______________________________________________________________________________\\n\");\n System.out.println(this.Name + \" is attacking ...\");\n int choice = (int)(Math.random() * p1.getTeam().size());\n Character target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n\n if (this.SPEED - target.getSPEED() < 5) {\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n }\n else {\n int n = 0;\n while ((target.actualHP != 0) && (n < 2)) {\n if (n == 1) {\n choice = (int)(Math.random() * p1.getTeam().size() + 1);\n target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n }\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n if (n == 0) System.out.println(this.Name + \" attacks again ...\");\n n++;\n }\n }\n }", "public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getPlayerScore();", "public int getExperience() {\n\t\treturn experience;\n\t}", "public int getExperience() {\n return _experience;\n }", "public String effect(Player player) {\n\tif (player.character.getAlignment() == Alignment.EVIL) {\n\t player.character.setCurrentLife(player.character.getLife() + 1);\n\t return \"You gain a life </html>\";\n\t} else if (player.character.getAlignment() == Alignment.GOOD) {\n\t player.character.setCurrentLife(player.character.getLife() - 1);\n\t return \"You loose a life </html>\";\n\t} else {\n\t return \"No effect </html\";\n\t}\n }", "public void setExperience(int experience) {\n _experience = experience;\n }", "public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }", "@Override\n\tprotected void addExperience(double time) {\n\t\tdouble newPoints = time / 100D;\n\t\tint experienceAptitude = 0;\n\t\tif (person != null)\n\t\t\texperienceAptitude = person.getNaturalAttributeManager()\n\t\t\t\t\t.getAttribute(NaturalAttributeType.EXPERIENCE_APTITUDE);\n\t\telse if (robot != null)\n\t\t\texperienceAptitude = robot.getRoboticAttributeManager()\n\t\t\t\t\t.getAttribute(RoboticAttributeType.EXPERIENCE_APTITUDE);\n\n\t\tnewPoints += newPoints * ((double) experienceAptitude - 50D) / 100D;\n\t\tnewPoints *= getTeachingExperienceModifier();\n\t\tif (person != null)\n\t\t\tperson.getSkillManager().addExperience(SkillType.MATERIALS_SCIENCE, newPoints, time);\n\t\telse if (robot != null)\n\t\t\trobot.getSkillManager().addExperience(SkillType.MATERIALS_SCIENCE, newPoints, time);\n\t}", "public String advanceGame(){\n return (isAdvantage()) ? \"Advantage \" + getPlayerName() : \"Win for \" + getPlayerName();\n }", "public void addExperienceNoMod(int slot, double experience) {\r\n this.experience[slot] += (experience);\r\n if (this.experience[slot] > 200_000_000) {\r\n this.experience[slot] = 200_000_000;\r\n }\r\n experienceGained = experienceGained + (int) (experience);\r\n int newLevel = getStaticLevelByExperience(slot);\r\n if (newLevel > staticLevels[slot]) {\r\n if (dynamicLevels[slot] < newLevel) {\r\n dynamicLevels[slot] += newLevel - staticLevels[slot];\r\n }\r\n if (slot == HITPOINTS) {\r\n lifepoints += newLevel - staticLevels[slot];\r\n }\r\n staticLevels[slot] = newLevel;\r\n if (entity instanceof Player) {\r\n Player p = (Player) entity;\r\n if (updateCombatLevel()) {\r\n if (!p.getSavedData().getGlobalData().hasAnnouncedCombat() && p.getProperties().getCurrentCombatLevel() == Constants.MAX_COMBAT_LEVEL) {\r\n p.getSavedData().getGlobalData().setCombatAnnounced(true);\r\n p.sendGlobalNewsMessage(\"ff8c38\", \" has reached the max combat level of \" + Constants.MAX_COMBAT_LEVEL + \"!\", 5);\r\n }\r\n p.getUpdateMasks().register(new AppearanceFlag(p));\r\n }\r\n handleMilestones(p);\r\n if (getExperience(slot) == 200_000_000) {\r\n if (!p.getSavedData().getGlobalData().getExperienceMilestone(slot)) {\r\n p.getSavedData().getGlobalData().setExperienceMilestone(slot);\r\n p.sendGlobalNewsMessage(\"ff0000\", \" has just reached 200,000,000 experience in \" + TextUtils.formatDisplayName(SKILL_NAME[slot]), 6);\r\n }\r\n }\r\n LevelUp.levelUp(p, slot);\r\n }\r\n }\r\n if (entity instanceof Player) {\r\n if (entity.asPlayer().getInterfaceState().get(InterfaceConfiguration.XP_DROP_LOCK) == 0) {\r\n entity.asPlayer().getSavedData().getGlobalData().increaseXpDrops((long) experience);\r\n }\r\n PacketRepository.send(XPDrop.class, new XPDropContext((Player) entity, slot, (int) experience));\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, slot));\r\n }\r\n }", "public int getAwayScore();", "public abstract void attack(Player p);", "Float attack();", "int getAttackStatStage();", "public void updatePatience(){\n Patience = Patience - 1;\n }", "void giveReward(BPlayer bPlayer, int tier, int status);", "@Override\n\tpublic void handleSpecificActivity() {\n\t\tdouble expIncrease = (double) params.getParamValue(\"traineeDefaultExpIncrease\");\n\t\tint grade = this.getGrade();\n\t\t\n\t\tdouble modifier = getGradeModifier(70, grade);\n\t\texpIncrease *= modifier;\n\t\t\n\t\tthis.experience += expIncrease;\t\t\n\t}", "public abstract void attackPlayer(Player p);", "public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}", "public int getLivesRemaining();", "private void chance(Player currentPlayer) {\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n\n if(randomNum == 1){\n convertTextToSpeech(\"Advance to Bond Street\");\n currentPlayer.setCurrentPosition(34);\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Unpaid charges. Go to jail\");\n setJail(currentPlayer);\n }\n if(randomNum == 3){\n convertTextToSpeech(\"Build a rooftop swimming pool on your apartment, pay 300\");\n if(m_manageFunds) {\n currentPlayer.subtractMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n m_freeParking += 300;\n Log.d(\"chance subtract 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance free parking\", String.valueOf(m_freeParking));\n }\n }\n }", "int getMinigameDefenseChancesLeft();", "public int giveDamage();", "private void goAdventure() {\n\n\t\tint experience = playern.getExp();\n\t\tint random = randomHelper.randomten();\n\n\t\t/**\n\t\t * Random part that starts with 10% occurance when user chooses goAdventuring()\n\t\t */\n\t\tif (random == 0) {\n\t\t\tSystem.out.println(\"You see nothing but unicorns running in the swaying grass..\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\n\t\t/**\n\t\t * Chooses storyboard and battle depending on experience level\n\t\t */\n\t\tif (experience >= 40) {\n\t\t\tStoryboardTwo.leveltwo();\n\t\t\tbattleSpider();\n\t\t}else {\n\t\t\tStoryboard.intro();\n\t\t\tbattleVampire();\n\t\t}\n\t\t}", "public void setExperience(int experience) {\r\n\t\tthis.experience = experience;\r\n\t}", "int getBonusExp();", "int getBonusExp();", "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }", "public double getPlayerFullHP();", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "protected void apply() {\r\n\t\tplayer.setAutoRoll(autoroll);\r\n\t\tplayer.setMission(mission);\r\n\t\tplayer.setState(state);\r\n\t\tplayer.getCards().setArtillery(cards.getArtillery());\r\n\t\tplayer.getCards().setCavalry(cards.getCavalry());\r\n\t\tplayer.getCards().setInfantry(cards.getInfantry());\r\n\t\tplayer.getCards().setJokers(cards.getJokers());\r\n\t\tMember member = player.getMember();\r\n\t\tif(score == Score.WIN) {\r\n\t\t\tmember.setScore(member.getScore() + player.getGame().getPlayers().size() - 1);\r\n\t\t\tmember.setWins(member.getWins() + 1);\r\n\t\t} else if(score == Score.LOSS) {\r\n\t\t\tmember.setScore(member.getScore() - 1);\r\n\t\t\tmember.setLosses(member.getLosses() + 1);\r\n\t\t}\r\n\t}", "public void setTotalExperience ( int exp ) {\n\t\texecute ( handle -> handle.setTotalExperience ( exp ) );\n\t}", "double getTotalReward();", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public void attack(String spell, character opponent){\n Random rand = new Random();\n int prob;\n String attack;\n \n prob = rand.nextInt(2); //we need two random numbers to allow us to use the two attacks:\n if(prob==0){\n attack = \"punch\";\n opponent.setHealth(opponent.getHealth() - 10);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n else if(prob==1){\n attack = \"kick\";\n opponent.setHealth(opponent.getHealth() - 15);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n \n }", "public void givePlayerLevelBonus() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\t\tp.addScore(5 * (currentLevel-1));\n\t\t\t}\n\t\t}\n\t\tserver.updateHighscoreList();\n\t\tserver.addTextToLoggingWindow(\"Server gives all players level bonus\");\n\t}", "@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }", "int aggroHitTimer(IGeneticMob geneticMob, EntityLiving attacker);", "public int calculatePlayerAge(int player_id) throws Exception;", "public void createExpReward() {\n try {\n int exp = RandomBenefitModel.getExpReward(encounter, characterVM.getDistance());\n if (exp > 0) characterVM.addExp(exp);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "void gainHealth(int points) {\n this.health += points;\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "@Override\n public void activatePowerUp() {\n myGame.getStatusDisplay().getMyProgress().updateScoreMultiplier(SCORE_MULTIPLIED_COUNTER);\n }", "public int getGoalTally(Player player){\r\n return player.getGoal();\r\n }", "public void attack(Player p){\n p.takeDamage(damage);\n }", "int getBonusHP();", "public int getPoints ( Player player );", "public abstract double baseExperience();", "public int performPokeAction() {\n\t\tAction action = pokemon.chooseAction();\n\t\tif (action == Action.ATTACK) {\n\t\t\ttrainer.takeDamage(pokemon.performAttack());\n\t\t}\n\t\treturn action.getValue();\n\t\t//return Action.ATTACK.getValue();\n\t}", "private static int gainIntelligence(int intelligence){\r\n intelligence++;\r\n System.out.println(\"You gain 1 intelligence\");\r\n return intelligence;\r\n }", "public static void WorkAtCompany(Player gamer){\r\n gamer.zen = gamer.zen-30;\r\n gamer.money = gamer.money+10;\r\n gamer.turn = gamer.turn+1; \r\n }", "private void strengthenPlayer(int player, double value) {\n\t\tif (player == LOCAL) {\n\t\t\tif (locStatBonus + value < 2) {\n\t\t\t\tlocStatBonus += value;\n\t\t\t}\n\t\t} else if (player == OPPONENT) {\n\t\t\tif (oppStatBonus + value < 2) {\n\t\t\t\toppStatBonus += value;\n\t\t\t}\n\t\t}\n\t\tstrengthenPlayerAnimation(player);\n\t}", "int getIndividualAttack();", "public void act() \n {\n if (scoreCounter > 0){\n scoreCounter--;\n }\n \n if (scoreCounter == 0){\n addScore(1);\n scoreCounter = scoreCooldown;\n }\n }", "public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);", "public abstract void onContribution(int amount, Player player);", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "public void setExperiencePoints(int experiencePoints) {\n if(experiencePoints >= 0){\n this.experiencePoints = experiencePoints;\n }\n else{\n this.experiencePoints = 0;\n }\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "public int getExperienceToNextLevel() {\n\t\treturn (int)(Math.sqrt(level)*2*(level*level));\n\t}", "public void topScore() {\n\t\tif (playern.getExp() >= 100) {\n\t\t\tSystem.out.println(\"You become a Warrior and win the game\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}" ]
[ "0.8009939", "0.74111843", "0.7237203", "0.7160193", "0.6878726", "0.67711294", "0.67286366", "0.6710273", "0.669834", "0.66965055", "0.6682695", "0.6649829", "0.6609966", "0.66034585", "0.658175", "0.656068", "0.65412587", "0.65305555", "0.65077126", "0.6492598", "0.6481023", "0.645636", "0.6422259", "0.64200217", "0.6404365", "0.63922554", "0.63861793", "0.6356724", "0.63308835", "0.6326702", "0.631989", "0.63158786", "0.6314155", "0.6313905", "0.63040483", "0.6300164", "0.62951195", "0.6293733", "0.6288643", "0.6280379", "0.6273751", "0.6270215", "0.6224134", "0.62231463", "0.6198507", "0.6190592", "0.61849284", "0.6183501", "0.6182949", "0.6177942", "0.61771935", "0.61602753", "0.61497164", "0.6139734", "0.6137932", "0.6135285", "0.6133137", "0.6121046", "0.61196995", "0.6117325", "0.61128724", "0.6111879", "0.6094109", "0.60936534", "0.6077727", "0.6077727", "0.60706586", "0.6038825", "0.6036236", "0.603556", "0.60252297", "0.6019206", "0.60171145", "0.60156024", "0.60035574", "0.6002018", "0.5993134", "0.59907144", "0.59763944", "0.5974567", "0.5968023", "0.5965607", "0.59620076", "0.5958198", "0.5955356", "0.595054", "0.594981", "0.5944155", "0.5943832", "0.5941303", "0.59336823", "0.5930429", "0.5930039", "0.5920064", "0.5912958", "0.59117836", "0.5907885", "0.59057766", "0.5905415", "0.5905332" ]
0.7507049
1
Function that Levels the player up
private static int levelUp(int playerLevel){ int level = playerLevel + 1; System.out.println("You have leveled up!"); //Tells the user what level they are System.out.println("You are now level " + level + "!"); return level; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void levelUp(){\r\n\t\tthis.level = this.level+1;\r\n\t\tint prevMaxHp = this.getHitPoints();\r\n\t\tint prevAtk = this.getAttackRating();\r\n\t\tint prevDef = this.getDefenseRating();\r\n\r\n\t\tif(level>=2 && level<=9){\r\n\t\t\tthis.maxHitPoints += 7;\r\n\t\t\tthis.attackRating += 3;\r\n\t\t\tthis.defenseRating += 3;\r\n\t\t}\r\n\r\n\t\tif(level>=10){\r\n\t\t\tthis.maxHitPoints+=2;\r\n\t\t\tthis.attackRating+=1;\r\n\t\t\tthis.defenseRating+=1;\r\n\t\t}\r\n\r\n\t\tthis.experienceValue+=15;\r\n\t\tthis.hitPoints = maxHitPoints;\r\n\r\n\t\tSystem.out.format(\"\\n|----LEVEL-UP----|\");\r\n\t\tSystem.out.print(\"\\n\" + this.getName() + \" is now level \" + this.getLevel());\r\n\t\tSystem.out.format(\"%nMax Hit Points: %2d ---> %2d\", prevMaxHp, this.getMaxHitPoints());\r\n\t\tSystem.out.format(\"%nAttack rating: %2d ---> %2d\", prevAtk, this.getAttackRating());\r\n\t\tSystem.out.format(\"%nDefense Rating: %d ---> %2d\", prevDef, this.getDefenseRating());\r\n\t\tSystem.out.format(\"%nNext level: %3dXP%n%n\", (calcLevel(1,0) - this.getExperiencePoints()));\r\n\r\n\r\n\t}", "public void levelUp() {\n\t\t\tpauseGame(500);//pause the game, play a nice song, and make more bricks!\n\t\t\tmakeBricks(12,8);\n\t\t\tlevelUp.play();\n\t\t}", "private void playerMoveUp()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() - 1);\n if (this.getCurrentY() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else// hit edge redo setlocation\n {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } \n }", "@Override\n public void onUp() {\n\n if(player.getDirection().y == 1){\n player.setDirection(new Vector2(0, 1.5f));\n }\n else{\n player.setDirection(new Vector2(0, 1));\n\n }\n }", "@Override\n\tpublic void movePlayerUp() {\n\t\tpacman.changeNextDirection(Direction.up);\n //movePacman();\n\t}", "public final void levelUP() {\n setBackstabDmg(getBackstabDmg() + Constants.BACKSTAB_UP);\n }", "@Override\n public void levelUp(){\n //System.out.println(\"Level: \" + getLevel());\n if (getLevel() > 5) return;\n\n /* System.out.println(\"\\n-------\");\n System.out.println(\"Level: \" + getLevel());\n System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n*/\n double percentage = growth(getLevel()) + growthRate;\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (getLevel() % 2 != 0) range++;\n setLevel(getLevel() + 1);\n\n /* System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n System.out.println(\"-------\\n\");*/\n }", "public void up() {\n \t\t\ttmpkeylisteners.clear();\n \t\t\ttmpkeylisteners.addAll(keylisteners);\n \t\t\tfor (KeyListener l : tmpkeylisteners) {\n \t\t\t\tif (l instanceof Level && ((Level)l) != Shadow.level) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tif (l instanceof GameObject && ((GameObject)l).layer.level != Shadow.level) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tl.keyUp(this);\n \t\t\t}\n \t\t}", "private void levelUp() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (a.getVisibility()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tresetInvaders();\n\t\taddRow();\n\t\t\n\t\tenemyShotList.add(new Shot(0, 0, SHOT_WIDTH, SHOT_HEIGHT, 15));\n\t\tlevel++;\n\t\t\n\t\tint powerupx = (int) (Math.random()*(WIDTH-PLAYER_WIDTH));\n\t\tdouble poweruprandom = Math.random();\n\t\t\n\t\tif (poweruprandom < 0.25) {\n\t\t\tarmorPiercing.reset(powerupx);\n\t\t}\n\t\t\n\t\tif (poweruprandom >= 0.25 && poweruprandom < 0.5) {\n\t\t\texplosive.reset(powerupx);\n\t\t}\n\t}", "public void goUp();", "private void playerMoveDown()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() + 1);\n if (this.getCurrentY() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentY(this.getCurrentY() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "void giveUp();", "public void levelUp2()\r\n {\r\n this.health = 1200;\r\n Story.levelUp2Text();\r\n }", "public void levelUp1()\r\n {\r\n this.health = 900;\r\n Story.levelUp1Text();\r\n }", "public void laserMoveUp()\r\n\t{\r\n\r\n\t\tif (y > 0)\r\n\t\t\ty -= 20;\r\n\r\n\t\telse\r\n\t\t\tdestroyed = true;\r\n\r\n\t}", "public void giveUp() {\n if (!finished)\n player.kill();\n }", "public void up() {\n\t\tswitch (facing){\n\t\tcase \"RIGHT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = 1.5;\n\t\t\tbreak;\n\t\tcase \"LEFT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = -1.5;\n\t\t\tbreak;\n\t\tcase \"UP\" :\n\t\t\tvely = -1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\tcase \"DOWN\" :\n\t\t\tvely = 1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\t}\n\t}", "private void goUpWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.turnLeft();\n\t\tthis.move(2);\n\t\tthis.turnRight();\n\t}", "protected void up() {\n move(positionX, positionY - 1);\n orientation = BattleGrid.RIGHT_ANGLE * 3;\n }", "public void goUp() {\n\t\tacceleration = -1;\n\t}", "protected int[] levelUp() {\n level = Math.min(level + 1, MAX_LEVEL);\n if (level == MAX_LEVEL) {\n Game.getPlayer().getMedalCase().increase(MedalTheme.LEVEL_100_POKEMON);\n }\n\n // Update stats and return gain\n return this.setStats();\n }", "public void snakeUp(){\r\n\t\tspeedUp();\r\n\t\tpoints += 100;\r\n\t}", "public void levelUp3()\r\n {\r\n this.health = 1600;\r\n Story.levelUp3Text();\r\n }", "public void uturn() {\n\t\tthis.turnLeft(2);\n\t}", "void moveUp();", "void moveUp();", "public void giveLevels(int amount) {\n // Cannot give non-positive amount of levels\n if (amount < 1) {\n throw new IllegalArgumentException(\"Invalid level amount - cannot be less than 1\");\n }\n\n // Level up\n amount = Math.min(amount, classData.getMaxLevel() - level);\n if (amount <= 0) return;\n level += amount;\n points += classData.getGroupSettings().getPointsForLevels(level, level - amount);\n getPlayerData().giveAttribPoints(classData.getGroupSettings().getAttribsForLevels(level, level - amount));\n\n // Update health/mana\n final Player player = getPlayerData().getPlayer();\n if (player != null) {\n getPlayerData().updatePlayerStat(getPlayerData().getPlayer());\n getPlayerData().getEquips().update(getPlayerData().getPlayer());\n }\n getPlayerData().autoLevel();\n\n // Call the event\n PlayerLevelUpEvent event = new PlayerLevelUpEvent(this, amount);\n Bukkit.getPluginManager().callEvent(event);\n\n // Apply the effect\n if (SkillAPI.getSettings().hasLevelUpEffect()) {\n DynamicSkill skill = SkillAPI.getSettings().getLevelUpSkill();\n skill.cast(player, level);\n }\n }", "void flipUp( ) {\n\t\t\t\t\t\tUpCommand . execute ( ) ;\n\n\n\t\t}", "public void onUpPressed(){\n shipSoundPlayer.setVolume(App.getVolume()/2);\n if(timeAfterStateChanged > 3){\n timeAfterStateChanged = 0;\n if(fireState_1){\n player.setSprite(spaceship_flying_2);\n }else{\n player.setSprite(spaceship_flying_1);\n }\n fireState_1 = !fireState_1;\n }\n timeAfterStateChanged++;\n\n if(shipSoundPlayer.getCurrentTime().toMillis()>3400){\n shipSoundPlayer = new MediaPlayer(new Media(new File(\"Sounds\\\\SpaceShip_move.mp3\").toURI().toString()));\n }\n shipSoundPlayer.play();\n if(Math.pow(Math.pow(player.getSpeed().getX(),2)+Math.pow(player.getSpeed().getY(),2),0.5)<player.getSpeedLimit()) {\n player.setSpeed(new Point2D(player.getSpeed().getX() - Math.cos(Math.toRadians(player.getRotation() + 90)) * player.getAcceleration(), player.getSpeed().getY() - Math.sin(Math.toRadians(player.getRotation() + 90)) * player.getAcceleration()));\n }\n }", "public boolean levelUp ()\n\t{\n\t\t//For the first five levelUps, the game uses the first levelUp method\n\t\t//from the wall class, which decreases the distance between the walls.\n\t\tif (level < 5)\n\t\t{\n\t\t\tfor (int i = 0; i < w.length; i++)\n\t\t\t\tw[i].levelUp1 ();\n\t\t}\n\t\t//For the four levelUps after the first five, the game uses the second\n\t\t//levelUp method from the wall class, which increases the horizontal\n\t\t//length of the walls.\n\t\telse if (level >= 5 && level < 9)\n\t\t{\n\t\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].levelUp2 ();\n\t\t}\n\t\treturn true;\t//Is mainly here to make the method work.\n\t}", "public boolean gainLevel() {\r\n if (this.player.getXp() > 100) {\r\n this.player.setXp(0);\r\n this.player.setMaxHp(this.player.getMaxHp() * 3 / 2);\r\n this.player.setHitPoints(this.player.getMaxHp());\r\n this.player.setLevel(this.player.getLevel() + 1);\r\n return true;\r\n }\r\n return false;\r\n }", "public void moveUp() {\n\t\tposY += speed;\n\t}", "public void moveUp() {\n\t\tstate.updateFloor(state.getFloor()+1);\n\t}", "public void faceUp(){\r\n changePlace(hand);\r\n //do a magical work\r\n changePlace(graveYard);\r\n }", "protected void levelUp() {\n\t\tlevel++;\n\t\t// set up floors for next level\n\t\tint[] nextFloors = floors[level];\n\t\tint[] nextFurnishing = furnishings[level];\n\t\tfor(int i = 0; i < nextFloors.length; i++) {\n\t\t\tFloor newFloor = game.getFloorByKey(nextFloors[i]);\n\t\t\ttiles[i].setFloor(newFloor);\n\t\t\tif(nextFurnishing[i] != 0) {\n\t\t\t\tFurnishingDirectory newFurn = game.getFurnishingByKey(nextFurnishing[i]);\n\t\t\t\tnew Furnishing(newFurn, tiles[i]);\n\t\t\t}\n\t\t}\n\t}", "public void volumeUp() {\n\t\tvolume = volume + 10;\n\t\tplaybin.setVolumePercent(volume);\n\t}", "public void goUp()\r\n\t{\r\n\t\tthis.Y--;\r\n\t}", "public void\t\t\t\t\t\t\tincreaseLevel()\t\t\t\t\t\t\t\t{ this.currentLevel += 1; }", "@Override\n public void keyUp(KeyEvent e){\n super.keyUp(e);\n// if(e.getKeyCode() == KeyEvent.VK_S)\n// spawnControl.spawnNow();\n// if(e.getKeyCode() == KeyEvent.VK_D)\n// player.sleep();\n// if(e.getKeyCode() == KeyEvent.VK_E)\n// player.invincibility();\n// if(e.getKeyCode() == KeyEvent.VK_F)\n// player.fast();\n }", "public void levelUp(int newLvl) {\n\t\tsuper.levelUp(newLvl);\n\n\t\t// Add artifacts bonus stats\n\t\tif (armor != null) {\n\t\t\tdefense += armor.getDefense();\n\t\t}\n\t\tif (helm != null) {\n\t\t\tmaxHp += helm.getHp();\n\t\t\thp = maxHp;\n\t\t}\n\t\tif (weapon != null) {\n\t\t\tattack += weapon.getAttack();\n\t\t}\n\n\t\t// Update after levelUp\n\t\tneededXp = level * 1000 + (int)Math.pow(level - 1, 2) * 450;\n\t\txp = tmpXp;\n\t}", "public void up(){\n\t\tmoveX=0;\n\t\tmoveY=-1;\n\t}", "public void upPressed()\r\n {\r\n worldPanel.newMapPos(0,-zoom);\r\n miniMap.newMapPos(0,-1);\r\n }", "public void moveUp(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.UP;\n\t\tif(animation!=ANIMATION.MOVEUP) {\n\t\t\tanimation=ANIMATION.MOVEUP;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tdirection=\"up\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelY=-1*spd/2;\n\t\tvelX=0;\n\t}", "public void moveUp() {\n\t\tsetPosY(getPosY() - steps);\n\t}", "public Room goUp() {\n return goDir(Side.UP);\n }", "public void goDown();", "@Override\n\tpublic void onStandDown(PlatformPlayer player) {\n\t\t\n\t}", "public void upPressed() {\n System.out.println(\"upPressed()\");\n current.rotate();\n display.showBlocks();\n }", "public void goNextLevel() {\r\n world.stop();\r\n levelMusic.close();\r\n if(level == 1) {\r\n level++;\r\n world = new Level2();\r\n world.populate(this);\r\n keyHandler.setBody(world.getPlayer());\r\n view.setWorld(world);\r\n controlPanel.setWorld(world);\r\n audioManager = new AudioManager();\r\n levelMusic = audioManager.getLevel2Sound();\r\n levelMusic.loop();\r\n world.start();\r\n }\r\n else if(level == 2) {\r\n level++;\r\n world = new Level3();\r\n world.populate(this);\r\n keyHandler.setBody(world.getPlayer());\r\n view.setWorld(world);\r\n controlPanel.setWorld(world);\r\n audioManager = new AudioManager();\r\n levelMusic = audioManager.getLevel3Sound();\r\n levelMusic.loop();\r\n world.start();\r\n }\r\n else {\r\n System.out.println(\"PLAYER SURVIVED\");\r\n System.exit(0);\r\n }\r\n }", "@Override\n public void action(Level level) {\n if (Keyboard.isKeyDown(KeyEvent.VK_UP)) {\n direction = UP;\n moveTank(level);\n } else if (Keyboard.isKeyDown(KeyEvent.VK_DOWN)) {\n direction = Direction.DOWN;\n moveTank(level);\n } else if (Keyboard.isKeyDown(KeyEvent.VK_LEFT)) {\n direction = Direction.LEFT;\n moveTank(level);\n } else if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT)) {\n direction = Direction.RIGHT;\n moveTank(level);\n }\n\n updateShootTimer();\n if (Keyboard.isKeyDown(KeyEvent.VK_SPACE))\n shoot(level); // try to shoot\n }", "@Override\r\n public void touchUp(InputEvent event, float x, float y, int pointer, int button) {\r\n if(screen.player2.totalSkates>0 && !screen.player2.hasSkates) {\r\n screen.player2.totalSkates--;\r\n screen.player2.hasSkates = true;\r\n }\r\n }", "public void LevelUp(int[] fighter) {\n fighter[LEVEL]++;\n Random rnd = new Random();\n if (rnd.nextBoolean()) {\n//Increase attack\n fighter[MAX_ATTACK]++;\n } else {\n//Increase defense\n fighter[MAX_DEFENSE]++;\n }\n fighter[MAX_LIFE] += 2;\n//Renew fighter\n renew(fighter);\n }", "public void levelOver(){\n\t\t// this is called by the model when the user wins the game!\n\t\tif (gameModel.levelOver){\n\t\t\tsynchronized(gameModel){\n\n\t\t\tgameModel.resetGame();\n\t\t\tgameModel.createLevel(2,width,height);\n\t\t\tfor(Square s:gameModel.targets){\n\t\t\t\tLog.d(TAG,\"target = \"+s);\n\t\t\t}\n\t\t\tgameModel.levelOver=false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void move() {\n\t\t\tRandom rand = new Random();//random number generator\n\t\t\tint value = rand.nextInt(500000);//there is a 1 in 500000 chance there will be a new powerup every frame.\n\t\t\tif (value==0) {//if the value is 0\n\t\t\t\tRandom ran = new Random();//make a random number generator and a power up vairable\n\t\t\t\tPowerUp currentPowerUp = null;\n\t\t\t\tint type = ran.nextInt(3);//switch the 1 for the amount of types made.\n\t\t\t\tif (type==0) {//add the powerup depending on the random number. There are 3 types\n\t\t\t\t\tcurrentPowerUp = new PowerUp(healthPowerUp, 0);//this adds a life\n\t\t\t\t}\n\t\t\t\telse if (type==1) {\n\t\t\t\t\tcurrentPowerUp = new PowerUp(longPowerUp, 1);//this makes the slider wider\n\t\t\t\t} else if (type==2) {\n\t\t\t\t\tcurrentPowerUp = new PowerUp(bonusPointsPowerUp, 2);//this just adds points\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//set x and y\n\t\t\t\t//make a random x\n\t\t\t\tint newX = ran.nextInt(401) - 201 + GamePlay.getScreenWidth()/2; //-200 to 200 variance from center\n\t\t\t\tint newY = ran.nextInt(201) - 101 + GamePlay.getScreenHeight()/4;//-100 to 100 variance from the 25% of top distance line.\n\t\t\t\tif (currentPowerUp!=null) {\n\t\t\t\t\tcurrentPowerUp.setX(newX);\n\t\t\t\t\tcurrentPowerUp.setY(newY);\n\t\t\t\t\tpowerUps.add(currentPowerUp);//add the powerups to an array list\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"PowerUp error.\");//if the variable is null, something went wrong.\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//move all powerUps down by ball speed\n\t\t\tfor (PowerUp power: powerUps) {\n\t\t\t\tpower.setY(power.getY() + ballSpeed);\n\t\t\t}\n\t\t\t\n\t\t\t//check if the powerups are off the screen. remove if they are. \n\t\t\tfor (int r = powerUps.size()-1; r>=0; r--) {\n\t\t\t\tif (powerUps.get(r).getY() > GamePlay.getScreenHeight()-h) {\n\t\t\t\t\tpowerUps.remove(r);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//death of a ball\n\t\t\tif (ball.getY()>GamePlay.getScreenHeight() && pause==false) {\n\t\t\t\tdeath();\n\t\t\t}\n\t\t\t\n\t\t\t//no bricks left\n\t\t\tif (blocks.size()==0) {\n\t\t\t\t//you leveled up!\n\t\t\t\tlevelUp();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//wall collision check for ball\n\t\t\t//right wall\n\t\t\tif (ball.rightCollide(GamePlay.getScreenWidth())) {//seperated for later use if wanted.\n\t\t\t\tballVX*=-1;\n\t\t\t} else if (ball.leftCollide(0)) {//left wall\n\t\t\t\tballVX*=-1;\n\t\t\t}\n\t\t\t\n\t\t\tif (ball.topCollide(0)) {//top wall\n\t\t\t\tballVY*=-1;\n\t\t\t} //dont check bottom wall because that is the death of a ball.\n\t\t\t\n\t\t\t//collision with the slider.\n\t\t\tif (ball.getRect().intersects(slider.getRect()) && ball.getY()+ball.getHeight() <= slider.getY()+ballSpeed) {//intersected bool needed\n\t\t\t\tballVY*=-1;\n\t\t\t\tballVX+=sliderVX;//add the slider velocity to the ball velocity, giving user some control over angle. \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//collision with the powerups\n\t\t\t\n\t\t\tfor (int a = powerUps.size()-1; a>=0; a--) {//iterate thrpough the powerups\n\t\t\t\tPowerUp power = powerUps.get(a);\n\t\t\t\tif (power.getRect().intersects(slider.getRect())) {//if the powerups rect intersects, the slider caught it. Remove from screen\n\t\t\t\t\t//THIS MEANS THEY CAUGHT THE POWERUP\n\t\t\t\t\tif (power.getType()==\"HEALTH\" && power.getIntersected()==false) {\n\t\t\t\t\t\tpower.setIntersected(true);\n\t\t\t\t\t\tif (lives<5)\n\t\t\t\t\t\t\tlives+=1;//add a life up to 5\n\t\t\t\t\t\tpowerUps.remove(a);\n\t\t\t\t\t} else if (power.getType()==\"LONG\" && power.getIntersected()==false) {\n\t\t\t\t\t\tpower.setIntersected(true);\n\t\t\t\t\t\textended = true;//extended flag to say the slider is extended. extend the slider's width by the adjust amount preset globally\n\t\t\t\t\t\tslider.resize(slider.getWidth()+adjust, slider.getHeight());\n\t\t\t\t\t\tslider.setX(slider.getX()-adjust/2);\n\t\t\t\t\t\textendTimer.restart();//restart the entend timer\n\t\t\t\t\t\tpowerUps.remove(a);\n\t\t\t\t\t} else if (power.getType()==\"BONUS\" && power.getIntersected()==false) {\n\t\t\t\t\t\tpower.setIntersected(true);\n\t\t\t\t\t\tscore+=100;//add a 100 points.\n\t\t\t\t\t\tpowerUps.remove(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//collision with blocks\n\t\t\t\n\t\t\tboolean changed = false;//this is a flag to see if any collisions occured this frame\n\t\t\tfor (Block block:blocks) {\n\t\t\t\tRectangle r = block.getRect();\t\t\n\t\t\t\tif (r.intersects(ball.getRect())) {//if the rects intersected, something hit something. However, we don't know from what direction\n\t\t\t\t\t//since the vy is always going to be by 1, we can check if it is equal. There is no multiples to deal with. \n\t\t\t\t\t\n\t\t\t\t\t//this checks if it was colliding from the bottom. Check the bottom edge of block and top of the ball\n\t\t\t\t\tif (ball.getY() + 2 >= block.getBottom() && ball.getY() -2 <= block.getBottom() && ball.getIntersected()==false) {\n\t\t\t\t\t\t//bottom collision\n\t\t\t\t\t\tballVY*=-1;//reflect back\n\t\t\t\t\t\tscore += block.downColor();//change the color, adjust score\n\t\t\t\t\t\tball.setIntersected(true);//set the intersected flag so it will not trigger again for the same stimuli\n\t\t\t\t\t\tball.setY(ball.getY() + ballVY);//set the y to remove the ball from collision\n\t\t\t\t\t\tchanged=true;//set the changed flag to true\n\t\t\t\t\t\thitSound.play();//play a sound\n\t\t\t\t\t\t\n\t\t\t\t\t} else if (ball.getY() + ball.getHeight() + 2 >=block.getTop() && ball.getY() + ball.getHeight() -2 <=block.getTop() && ball.getIntersected()==false) {\n\t\t\t\t\t\t//this checks if it was colliding on the top. Check bottom edge of ball and top of block.\n\t\t\t\t\t\tballVY*=-1;//reflect back\n\t\t\t\t\t\tscore += block.downColor();//change the color, adjust score\n\t\t\t\t\t\tball.setIntersected(true);//set the intersected flag so it will not trigger again for the same stimuli\n\t\t\t\t\t\tball.setY(ball.getY() + ballVY);//set the y to remove the ball from collision\n\t\t\t\t\t\tchanged=true;//set the changed flag to true\n\t\t\t\t\t\thitSound.play();//play a sound\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (changed==false && ball.getIntersected()==false) {\n\t\t\t\t\t\t//this must mean it is on the left or right\n\t\t\t\t\t\t//it doesn't matter which one, the change is the exact same!\n\t\t\t\t\t\tballVX*=-1;//flip the x direction\n\t\t\t\t\t\tscore+=block.downColor();//change color, adjust score\n\t\t\t\t\t\tball.setIntersected(true);//set the intersected flag\n\t\t\t\t\t\tball.setX(ball.getX() + ballVX);\n\t\t\t\t\t\tchanged=true;//set the changed flag\n\t\t\t\t\t\thitSound.play();//play the sound\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}//end the for.\n\t\t\tif (changed==false) {//if no changes, reset the flag.\n\t\t\t\tball.setIntersected(false);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//move everything as per velocity\n\t\t\tif (slider.getX() > 10 && sliderVX<0) {\n\t\t\t\tslider.setX(slider.getX() + sliderVX*ballSpeed*2);//the slider can move twice as fast as the ball.\n\t\t\t} else if ((slider.getX()+slider.getWidth()) < GamePlay.getScreenWidth()-10 && sliderVX>0) {\n\t\t\t\tslider.setX(slider.getX() + sliderVX*ballSpeed*2);\n\t\t\t}\n\t\t\tif (ready) {\n\t\t\t\tball.setX(ball.getX() + ballVX);\n\t\t\t\tball.setY(ball.getY() + ballVY);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n\t}", "public void up() {\n double speed = RobotContainer.m_BlackBox.getPotValueScaled(Constants.OIConstants.kControlBoxPotY, 0.0, 1.0);\n m_hook.set(speed);\n SmartDashboard.putNumber(\"forward speed\", speed);\n }", "public void volumeUp() {\n\t\tint v = Volume + 1;\n\t\tif (On) {\n\t\t\tif (v < 0 || v > 5) {\n\t\t\t\tSystem.out.println(\"New volume not within range!\");\n\t\t\t} else {\n\t\t\t\tVolume = v;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Radio off ==> No adjustment possible\");\n\n\t\t}\n\n\t}", "public void upPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.up();\n\t\t} else {\n\t\t\tactiveNode.nextChild();\n\t\t}\n\t}", "protected void notifyLevelUp(Player player, SavedHorse savedHorse, AbstractHorse horse, Ability ability) {\n player.sendMessage(ChatColor.GOLD + savedHorse.getMessageName() +\n \" is now Level \" + ability.getLevel(savedHorse) +\n \" in \" + ability.getDisplayName() + \".\");\n Location loc = horse.getLocation().add(0, 1, 0);\n loc.getWorld().spawnParticle(Particle.VILLAGER_HAPPY, loc, 100, 2.0f, 1.0f, 2.0f);\n loc.getWorld().playSound(loc, Sound.ENTITY_PLAYER_LEVELUP, SoundCategory.NEUTRAL, 2.0f, 1.0f);\n }", "@Override\n public void upgrade(int level){\n System.out.println(\"Level adfasdfasdf: \" + level);\n System.out.println(getLevel());\n\n if(level > 5) level = 5;\n\n if(level > 1){\n for (int i = 1; i < level; i++) levelUp();\n }\n\n /*\n //System.out.println(\"\\n-------\");\n //System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n\n double percentage = growth(level);\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (level % 2 != 0) range++;\n\n //System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n //System.out.println(\"-------\\n\");*/\n }", "@Override\n\tpublic void levelUp() {\n\n\t}", "public void moveUp() {\n btMoveUp().push();\n }", "public void moveUp() {\n btMoveUp().push();\n }", "private void moveShipUp()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit up\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit up\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "private void moveUnitUp()\r\n {\r\n boolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit up\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp == 0 || mapTemp == 14)//if they try to move on water\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp == 0 || mapTemp == 14)//if they try to move on water\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit up\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp == 0 || mapTemp == 14)//if they try to move on water\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp == 0 || mapTemp == 14)//if they try to move on water\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n }", "void moveUp() {\n\t\tsetY(y-1);\r\n\t\tdx=0;\r\n\t\tdy=-1;\r\n\t}", "public void moveUp() {\n\n if (this.row - 1 < 16) {\n return;\n }\n this.row -= 1;\n\n playerImage.translate(0, -Cell.CELLSIZE);\n playerImage.draw();\n }", "@Test\n\tpublic final void nextPositionUpTest() {\n\t\tplayer.setUp(true);\n\t\tplayer.getNextYPosition();\n\t\tassertTrue(player.isJumping());\n\t}", "public void setLevel(Level level) { this.currentLevel = level; }", "void moveUp(double speed, double destination)\n {\n this.destination = shaftHeight-(destination*floorHeight);\n if(speed == 1.75) speed = 1.25; //1.2175;\n else if(speed == 0.875) speed = 0.6; //0.5875;\n\n elevatorOffset = -1*speed;\n motorTimeline.play();\n }", "boolean isGameSpedUp();", "public void generalLevelUp() {\n\t\tif(currentGenLevelXP >= nextGenLevelXP)\n\t\t\tcurrentGenLevelXP = currentGenLevelXP - nextGenLevelXP;\n\t\telse\n\t\t\tcurrentGenLevelXP = 0;\n\t\t\n\t\tif(generalLevel < 40) { // Level cap is 40\n\t\t\tgeneralLevel++;\n\t\t\tLogger.print(getName() + \" levels up to \" + generalLevel + \".\");\n\t\t\tstatUp();\n\t\t}\n\t\tsetGenExpReq();\n\t}", "public void moveUp() {\n if (getY() - 25 - getSpeed() >= 0 && !touchMaterial()) setY(getY() - getSpeed());\n }", "public void moveUp()\n {\n if (yPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative Y because we are moving UP!\n movementY = -0.5;\n movementX = 0;\n }", "public void moveUp() {\n locY = locY + 1;\n }", "private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}", "public void levelOneScreen() {\n timer.stop();\n gameModel.setState(\"Level 1\");\n currentScene = levelSetup.getLevelOne().getScene(levelOneInitialEntrance);\n currentBoard = levelSetup.getLevelOne().getBoard();\n currentLevelScreen = levelSetup.getLevelOne();\n levelOneInitialEntrance = (levelOneInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n\n }", "public void moveUp() {\n Coordinate upCoord = new Coordinate(getX(), getY() - 1);\n handleMove(upCoord, InteractionHandler.UP);\n }", "public void liftUp(){\n set(m_defaultLiftSpeedUp);\n }", "public void playerLost()\r\n {\r\n \r\n }", "public void spellLevelUp() {\n \n }", "public void checkFirePlayer() {\n if (up > 0) {\r\n if (up == 1) {\r\n\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (up == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 100, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (down > 0) {\r\n if (down == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (down == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 100, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (left > 0) {\r\n if (left == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (left == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 100, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (right > 0) {\r\n if (right == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (right == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 100, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //Controllo per il blocco di fuoco centrale\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n\r\n }\r\n\r\n }", "@Override\r\n\tpublic int ToggleUp() {\n\t\treturn 0;\r\n\t}", "public void moveUp() {\n if(!move.moveUp()) {\n \t if(physinteractor(getX(),getY()-1)) {\n \t\t move.moveUp();\n \t\t nonphysinteractor(getX(),getY());\n \t\t updatemove();\n \t }\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }", "public static void setUp(char up) {\n\t\t\tGamePreferences.up = up;\n\t\t}", "private void Lose(Player player){\n player.setBalance(player.getBalance() - player.getWager());\n System.out.println();\n System.out.println(player.getName() + \" lost :/\");\n System.out.println(player.getName() + \"'s\" + \" balance is now \" + player.getBalance());\n }", "public void moveUp() {\n speedY += (speedY < 0) ? acceleration * 2 : acceleration;\n if (speedY > maxSpeed) {\n speedY = maxSpeed;\n }\n direction = Direction.UP;\n }", "public Player(Level currentLevel) {\n\t\tthis.setCurrentLevel(currentLevel);\n\t\tsuper.getCurrentLevel().getInLevelLocation()[0][0].setHasPlayer(true);\n\t\tthis.setCurrentX(0);\n\t\tthis.setCurrentY(0);\n\t\tthis.attack = 10;\n\t\tthis.setHeath(1000);\n\t}", "private void movement()\n {\n if(gameOverBool==false)\n {\n if(Greenfoot.isKeyDown(\"up\"))\n {\n setLocation(getX(), getY()-6);\n setRotation(2);\n } else if (Greenfoot.isKeyDown(\"down\")){\n setLocation(getX(), getY()+6); \n setRotation(8);\n } else{\n setRotation(5);\n } \n }\n }", "void startGame() {\n if (getHealth() <= 0) {\n startAgain();\n }\n int level = getLevel();\n if (level == 1) {\n Intent intent = new Intent(this, Level1Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 2) {\n Intent intent = new Intent(this, Level2Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 3) {\n Intent intent = new Intent(this, Level3Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n }\n }", "public void downGrade(){\n\t\tlevel -= level;\n\t\tConstants.FARMS -= 1;\n\t\tConstants.FOOD -= 20;\n\t}", "private void returnPlayerHome(Player player_to_be_eaten)\n {\n player_to_be_eaten.setX_cordinate(player_to_be_eaten.getInitial_x());\n player_to_be_eaten.setY_cordinate(player_to_be_eaten.getInitial_y());\n player_to_be_eaten.setSteps_moved(0);\n }", "public void startNextLevel() {\n if (getLevel() < 3) {\n setLevel(getLevel() + 1);\n startGame();\n }\n }", "public void drawPlayerDown(Graphics g, Player p) {\r\n g.setColor(Color.black);\r\n // head\r\n g.drawOval(p.positionX, p.positionY, 25, 25);\r\n // left arm \r\n g.drawLine(p.positionX + 5, p.positionY + 1, p.positionX - 16, p.positionY + 12);\r\n g.drawLine(p.positionX + 5, p.positionY + 23, p.positionX - 16, p.positionY + 12);\r\n // right arm\r\n g.drawLine(p.positionX + 19, p.positionY + 1, p.positionX + 41, p.positionY + 12);\r\n g.drawLine(p.positionX + 19, p.positionY + 23, p.positionX + 41, p.positionY + 12);\r\n // backpack\r\n g.drawRect(p.positionX + 2, p.positionY + 25 - 33, 22, 8);\r\n // gun\r\n g.drawLine(p.positionX - 7, p.positionY + 6 + 12, p.positionX + 22, p.positionY - 17 + 55);\r\n g.drawLine(p.positionX + 30, p.positionY + 6 + 12, p.positionX + 14, p.positionY - 37 + 90);\r\n }", "public void goDown()\r\n\t{\r\n\t\tthis.Y++;\r\n\t}", "public void levelUp() {\n this._learnState += 1;\n this.save();\n }", "public void goNextLevel(){\r\n setCurrentLevel(currentLevel.getNextLevel());\r\n }", "void moveDown();" ]
[ "0.7656274", "0.7569953", "0.73913324", "0.7334215", "0.7247383", "0.7051739", "0.7025645", "0.6993564", "0.69557387", "0.69543594", "0.6800638", "0.67977864", "0.6779938", "0.6715834", "0.6715628", "0.66835356", "0.66427064", "0.6641239", "0.6592065", "0.6590293", "0.65640473", "0.65635496", "0.65559494", "0.65225273", "0.6481194", "0.6460549", "0.6460549", "0.6451095", "0.6432855", "0.6429811", "0.64187324", "0.64094824", "0.6396481", "0.63951516", "0.63865477", "0.63769937", "0.6357903", "0.63519126", "0.6345901", "0.63366735", "0.6305737", "0.6295869", "0.6293738", "0.6242477", "0.6220932", "0.6211572", "0.618728", "0.6181743", "0.61632556", "0.61568826", "0.6134733", "0.6132376", "0.61281353", "0.61215097", "0.6116823", "0.61081606", "0.609633", "0.6085186", "0.6067505", "0.6061376", "0.6055244", "0.6047177", "0.60467243", "0.60467243", "0.6004562", "0.5993868", "0.59894896", "0.59790146", "0.5977781", "0.59599626", "0.5958082", "0.59570074", "0.595421", "0.59441763", "0.59396267", "0.5928333", "0.5903017", "0.59026974", "0.58955145", "0.5895443", "0.5891249", "0.58762264", "0.5873439", "0.5870543", "0.58700526", "0.58652353", "0.5863615", "0.5858596", "0.58481276", "0.58435774", "0.5841863", "0.58410275", "0.58301646", "0.5817488", "0.5816375", "0.58133584", "0.5808935", "0.58057743", "0.5796761", "0.5786563" ]
0.7641462
1
Function to populate the shop keepers inventory with items
private static String[] populateShopKeeperInventory(String[] shopKeeperInventory){ shopKeeperInventory[0] = "Healing Potion"; shopKeeperInventory[1] = "Greater Healing Potion"; shopKeeperInventory[2] = "Long Sword"; shopKeeperInventory[3] = "Great Sword"; return shopKeeperInventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillInventory(TheGroceryStore g);", "private void loadStartingInventory(){\n this.shelfList = floor.getShelf();\n Iterator<String> i = items.iterator();\n for (Shelf s : shelfList){\n while (s.hasFreeSpace()){\n s.addItem(i.next(), 1);\n }\n }\n }", "Collection<Item> getInventory();", "public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantmentConfig.getEmptySlots();\n for (int i = 0; i < getSize(); i++) {\n if(!(emptySlots.contains(i))) {\n getInventory().setItem(i, getFiller());\n }\n }\n }", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "private void updateInventory(List<Item> items) {\r\n for(Item item : items) {\r\n inventory.put(item, STARTING_INVENTORY);\r\n inventorySold.put(item, 0);\r\n itemLocations.put(item.getSlot(), item);\r\n }\r\n }", "List<InventoryItem> getInventory();", "public static Items initialVendingMachine() {\n Items items = new Items();\n Item cola = new Item(R.drawable.cola, \"Cola\", 30, 100, 3000, 0);\n Item chips = new Item(R.drawable.chips, \"Chips\", 30, 50, 3000, 0);\n Item candy = new Item(R.drawable.candy, \"Candy\", 30, 65, 3000, 0);\n items.addItem(cola);\n items.addItem(chips);\n items.addItem(candy);\n items.addMachineCredit(5000);\n return items;\n }", "public static ArrayList<InventoryItem> getInventoryItems() {\n\n String itemUrl = REST_BASE_URL + ITEMS;\n String inventoryUrl = REST_BASE_URL + INVENTORIES;\n String availableUrl = REST_BASE_URL + INVENTORIES + AVAILABLE + CATEGORIZED;\n\n // List of items\n ArrayList<InventoryItem> items = new ArrayList<>();\n ArrayList<String> itemNames = new ArrayList<>();\n\n URL url = null;\n\n /* Fetch items from \"items\" table. */\n try {\n url = new URL(itemUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray itemJsonArray = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting items\");\n itemJsonArray = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Store each item into <items>. Store each item name into <itemNames>.\n for (int i = 0; i < itemJsonArray.length(); i++) {\n JSONObject jo = (JSONObject) itemJsonArray.get(i);\n InventoryItem newItem = new InventoryItem(\n jo.getString(ITEM_IMAGE_URL),\n jo.getString(ITEM_NAME),\n jo.getString(ITEM_DESCRIPTION),\n 0,\n 0);\n items.add(newItem);\n itemNames.add(jo.getString(ITEM_NAME));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* Fetch inventory items from \"inventories\" */\n try {\n url = new URL(inventoryUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting ivnentories\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemQuantity(currItem.getItemQuantity()+1);\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the inventory but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* get inventory stocks from \"/available/categorized\" */\n try {\n url = new URL(availableUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n\n try {\n Log.d(TAG, \"getInventoryItems: getting inventory stocks\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemStock(jo.getInt(ITEM_COUNT));\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the stock but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "private void updateItems()\n\t{\t\n\t\tupdatePizzaTypes(items);\n\t\tupdateSidesTypes(items);\n\t\tupdateDrinksTypes(items);\n\t}", "public static Inventory createStorageInventory(UserShop shop) {\n\t\tInventory inv = Bukkit.createInventory(null, 27, shop.getTitle() + \" §7- §6Lager\");\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tinv.setItem(i, spacer);\n\t\t}\n\t\tinv.setItem(8, back);\n\t\tfor (ShopItemEntry offer : shop.getStoredItems()) {\n\t\t\tinv.addItem(offer.getItem());\n\t\t}\n\t\treturn inv;\n\t}", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "static private void loadGame() {\n ArrayList loadData = data.loadGame();\n\n //inventory\n inventory = new Inventory();\n LinkedTreeMap saveMap = (LinkedTreeMap) loadData.get(0);\n if (!saveMap.isEmpty()) {\n LinkedTreeMap inventoryItemWeight = (LinkedTreeMap) saveMap.get(\"itemWeight\");\n LinkedTreeMap inventoryItemQuantity = (LinkedTreeMap) saveMap.get(\"inventory\");\n String inventoryItemQuantityString = inventoryItemQuantity.toString();\n inventoryItemQuantityString = removeCrapCharsFromString(inventoryItemQuantityString);\n String itemListString = inventoryItemWeight.toString();\n itemListString = removeCrapCharsFromString(itemListString);\n\n for (int i = 0; i < inventoryItemWeight.size(); i++) {\n String itemSet;\n double itemQuantity;\n if (itemListString.contains(\",\")) {\n itemQuantity = Double.parseDouble(inventoryItemQuantityString.substring(inventoryItemQuantityString.indexOf(\"=\") + 1, inventoryItemQuantityString.indexOf(\",\")));\n inventoryItemQuantityString = inventoryItemQuantityString.substring(inventoryItemQuantityString.indexOf(\",\") + 1, inventoryItemQuantityString.length());\n itemSet = itemListString.substring(0, itemListString.indexOf(\",\"));\n itemListString = itemListString.substring(itemListString.indexOf(\",\") + 1, itemListString.length());\n } else {\n itemSet = itemListString;\n itemQuantity = Double.parseDouble(inventoryItemQuantityString.substring(inventoryItemQuantityString.indexOf(\"=\") + 1, inventoryItemQuantityString.length()));\n }\n String itemName = itemSet.substring(0, itemSet.indexOf(\"=\"));\n int itemWeight = Double.valueOf(itemSet.substring(itemSet.indexOf(\"=\") + 1, itemSet.length())).intValue();\n while (itemQuantity > 0) {\n Item item = new Item(itemName, \"\", itemWeight, true);\n inventory.addItemInInventory(item);\n itemQuantity--;\n }\n }\n }\n\n //itemList\n itemLocation = new ItemLocation();\n saveMap = (LinkedTreeMap) loadData.get(1);\n if (!saveMap.isEmpty()) {\n System.out.println(saveMap.keySet());\n LinkedTreeMap itemLocationOnMap = (LinkedTreeMap) saveMap;\n String rooms = saveMap.keySet().toString();\n rooms = removeCrapCharsFromString(rooms);\n for (int j = 0; j <= itemLocationOnMap.size() - 1; j++) {\n String itemToAdd;\n\n if (rooms.contains(\",\")) {\n itemToAdd = rooms.substring(0, rooms.indexOf(\",\"));\n } else {\n itemToAdd = rooms;\n }\n\n rooms = rooms.substring(rooms.indexOf(\",\") + 1, rooms.length());\n ArrayList itemInRoom = (ArrayList) itemLocationOnMap.get(itemToAdd);\n for (int i = 0; i < itemInRoom.size(); i++) {\n Item itemLocationToAdd;\n LinkedTreeMap itemT = (LinkedTreeMap) itemInRoom.get(i);\n String itemName = itemT.get(\"name\").toString();\n String itemDesc = \"\";\n int itemWeight = (int) Double.parseDouble(itemT.get(\"weight\").toString());\n boolean itemUseable = Boolean.getBoolean(itemT.get(\"useable\").toString());\n\n itemLocationToAdd = new PickableItem(itemName, itemDesc, itemWeight, itemUseable);\n itemLocation.addItem(itemToAdd, itemLocationToAdd);\n\n }\n }\n //set room\n String spawnRoom = loadData.get(3).toString();\n currentRoom = getRoomFromName(spawnRoom);\n }\n }", "public Item[] getInventoryItems(){\n\t\treturn inventoryItems;\n\t}", "public void inventory() {\n\t\tList<Item> items = super.getItems();\n\n\t\tString retStr = \"Items: \";\n\t\tItem item;\n\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\titem = items.get(i);\n\t\t\tretStr += item.toString();\n\t\t\tif (i != items.size()-1)\n \t{\n\t\t\t\tretStr += \", \";\n \t}\n\t\t}\n\t\tretStr += \"\\nCapacity: \" + this.currentCapacity() + \"/\" + this.maxCapacity;\n\t\tSystem.out.println(retStr);\n\t}", "public Inventory () {\n weaponsInventory = new ArrayList<>();\n pointInventory = 0;\n lenInventory = 0;\n }", "public void loadItems() {\n\t\tArrayList<String> lines = readData();\n\t\tfor (int i = 1; i < lines.size(); i++) {\n\t\t\tString line = lines.get(i);\n\t\t\t\n\t\t\tString[] parts = line.split(\",\");\n\t\t\t\n//\t\t\tSystem.out.println(\"Name: \" + parts[0]);\n//\t\t\tSystem.out.println(\"Amount: \" + parts[1]);\n//\t\t\tSystem.out.println(\"Price: \" + parts[2]);\n//\t\t\tSystem.out.println(\"-------\");\n\t\t\t\n\t\t\tString name = parts[0].trim();\n\t\t\tint amount = Integer.parseInt(parts[1].trim());\n\t\t\tdouble price = Double.parseDouble(parts[2].trim());\n\t\t\t\n\t\t\tItem item = new Item(name, amount, price);\n\t\t\titemsInStock.add(item);\n\t\t}\n\t}", "public static HashMap<Integer, Item> storeItems(){\n\t\tItem prod1 = new Item(\"Candy\",40);\n\t\tItem prod2 = new Item(\"Bread\",30);\n\t\tItem prod3 = new Item(\"Butter\",50);\n\t\tItem prod4 = new Item(\"Milk\",43);\n\t\tItem prod5 = new Item(\"Toast\",60);\n\t\tItem prod6 = new Item(\"Curd\",20);\n\t\tItem prod7 = new Item(\"Cream\",80);\n\t\tItem prod8 = new Item(\"Pastry\",45);\n\t\tItem prod9 = new Item(\"Cake\",300);\n\t\tItem prod10 = new Item(\"Panner\",200);\n\t\tItem prod11 = new Item(\"Egg\",8);\n\t\tproducts.put(1,prod1);\n\t\tproducts.put(2,prod2);\n\t\tproducts.put(3,prod3);\n\t\tproducts.put(4,prod4);\n\t\tproducts.put(5,prod5);\n\t\tproducts.put(6,prod6);\n\t\tproducts.put(7,prod7);\n\t\tproducts.put(8,prod8);\n\t\tproducts.put(9,prod9);\n\t\tproducts.put(10,prod10);\n\t\tproducts.put(11,prod11);\n\t\treturn products;\n\t}", "private static Inventory[] createInventoryList() {\n Inventory[] inventory = new Inventory[3];\r\n \r\n Inventory potion = new Inventory();\r\n potion.setDescription(\"potion\");\r\n potion.setQuantityInStock(0);\r\n inventory[Item.potion.ordinal()] = potion;\r\n \r\n Inventory powerup = new Inventory();\r\n powerup.setDescription(\"powerup\");\r\n powerup.setQuantityInStock(0);\r\n inventory[Item.powerup.ordinal()] = powerup;\r\n \r\n Inventory journalclue = new Inventory();\r\n journalclue.setDescription(\"journalclue\");\r\n journalclue.setQuantityInStock(0);\r\n inventory[Item.journalclue.ordinal()] = journalclue;\r\n \r\n return inventory;\r\n }", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public ArrayList<Item> getItemList(){\n\t\treturn inventoryList;\n\t}", "public Map<String, Integer> itemShelf() {\n int i;\n for (i = 0; i < inventory.size(); i++) {\n Map<String, Object> Item = new HashMap<>();\n Item = inventory.get(i);\n String itemname = Item.get(\"Name\").toString();\n String x = Item.get(\"Shelf#\").toString();\n int y = Integer.parseInt(x);\n ItemShelf.put(itemname, y);\n }\n //System.out.println(ItemShelf);\n return ItemShelf;\n }", "public void withdrawAll() {\r\n for (int i = 0; i < container.capacity(); i++) {\r\n Item item = container.get(i);\r\n if (item == null) {\r\n continue;\r\n }\r\n int amount = owner.getInventory().getMaximumAdd(item);\r\n if (item.getCount() > amount) {\r\n item = new Item(item.getId(), amount);\r\n container.remove(item, false);\r\n owner.getInventory().add(item, false);\r\n } else {\r\n container.replace(null, i, false);\r\n owner.getInventory().add(item, false);\r\n }\r\n }\r\n container.update();\r\n owner.getInventory().update();\r\n }", "List<SimpleInventory> getInventories();", "public void fillChest(Inventory inv);", "private void loadStore(Inventory inventory){\n\t\t \n\t\t TextView tvPremiumUpgradeTitle = (TextView)this.findViewById(R.id.tvPremiumUpgradeTitle);\n\t\t TextView tvPremiumUpgradeDescription = (TextView)this.findViewById(R.id.tvPremiumUpgradeDescription);\n\t\t Button bPremiumUpgradePrice = (Button)this.findViewById(R.id.bPremiumUpgradePrice);\n\t\t ImageView ivPremiumUpgradePurchased = (ImageView)this.findViewById(R.id.ivPremiumUpgradePurchased);\n\t\t \n\t\t \n\t\t SkuDetails skuPremiumUpgrade = inventory.getSkuDetails(this.getString(R.string.SKU_GOOGLE_PLAY_PREMIUM_UPGRADE));\n\t\t tvPremiumUpgradeTitle.setText(this.getString(R.string.store_item_premium_upgrade_title));\n\t\t tvPremiumUpgradeDescription.setText(this.getString(R.string.store_item_premium_upgrade_description));\n\t\t if (inventory.hasPurchase(this.getString(R.string.SKU_GOOGLE_PLAY_PREMIUM_UPGRADE))){\n\t\t\t bPremiumUpgradePrice.setVisibility(View.GONE); \n\t\t\t }\n\t\t else{\n\t\t\t bPremiumUpgradePrice.setText(skuPremiumUpgrade.getPrice());\n\t\t\t bPremiumUpgradePrice.setTag(this.getString(R.string.SKU_GOOGLE_PLAY_PREMIUM_UPGRADE));\n\t\t\t bPremiumUpgradePrice.setOnClickListener(this);\n\t\t\t ivPremiumUpgradePurchased.setVisibility(View.GONE);\n\t\t }\n\n\t\t\t }", "Items(){\r\n\t\tname=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//Parts to the vaccine[1-3]\r\n\t\t\t\t\"Mysterious Vial\", \"Piece of alien meteorite\",\"Alien X\",\r\n\t\t\t\t//Keys[4-6]\r\n\t\t\t\t\"Mysterious Key\",\"Office Key\",\"Captian's Key\",\r\n\t\t\t\t//suit[7,8]\r\n\t\t\t\t\"Hazmat Suit\",\"Gas Mask\",\r\n\t\t\t\t//vials[9-11]\r\n\t\t\t\t\"Blue Vial\",\"Pink Vial\", \"Gold Vial\",\r\n\t\t\t\t//other[12,13]\r\n\t\t\t\t\"X Files\", \"Demon's Bane Flower\",\"Reinforced Armor\"\r\n\t\t};\r\n\t\tdescription=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//vaccine parts[2-4]\r\n\t\t\t\t\"A special vial coated with a mysterious substance\",\r\n\t\t\t\t\"Part of an alien meteorite that the crew excavated\",\r\n\t\t\t\t\"A powerful allergen that instantly kills one’s immune system and their whole well-being, mutating them into something inhuman\",\r\n\t\t\t\t//keys\r\n\t\t\t\t\"A metal key that must open a door\",\r\n\t\t\t\t\"Looks like a normal key\",\r\n\t\t\t\t\"A metal key used to unlock something\",\r\n\t\t\t\t//Suit\r\n\t\t\t\t\"A full-body suit designed to keep harmful toxins away from the wearer. The face mask is missing, however\",\r\n\t\t\t\t\"A mask that goes over the wearer’s head and filters out all harmful substances in the air\",\r\n\t\t\t\t//Vials\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows light blue\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows bright pink\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows golden yellow\",\r\n\t\t\t\t//other\r\n\t\t\t\t\"Recorded documentation of all experiments and research done while in space. Most importantly it contains reports on events leading up to the virus spreading throughout the ship\",\r\n\t\t\t\t\"A beautiful flower that seems to survive unattached to the ground, the veins running through its petals give a faint glow as a heavenly scent fills the room\",\r\n\t\t\t\t\"A set of fine leather armor with metal plates reinforcing vulnerable areas\"\r\n\t\t};\r\n\t}", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public Inventory() {\n this.SIZE = DEFAULT_SIZE;\n this.ITEMS = new ArrayList<>();\n }", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t// + \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\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\t\t\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\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\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "public void Restock() {\n for (Ingredient ingredient : stock.keySet()) {\n stock.put(ingredient, inventoryMax);\n }\n }", "InventoryItem getInventoryItem();", "public ItemStack getShopItem(Integer shopID, Boolean fullStack, String seller){\n\t\tMaterial itemMaterial = null;\n\t\tString material = null;\n\t\tString enchantments = null;\n\t\tString name = \"\";\n\t\tString data = \"\";\n\t\tString query = \"SELECT * FROM `shops` WHERE `shop_id`=\"+shopID+\";\";\n\t\tdebugOut(\"Executing query: \"+ query);\n\t\ttry {\n\t\t\tPreparedStatement sql = connection.prepareStatement(query);\n\t\t\tResultSet result = sql.executeQuery();\n\t\t\tdebugOut(\"Query Completed\");\n\t\t\tresult.next();\n\t\t\tmaterial= result.getString(\"itemmaterial\");\n\t\t\tenchantments= result.getString(\"itemenchantments\");\n\t\t\tname = result.getString(\"itemname\");\n\t\t\tdata = result.getString(\"data\");\n\t\t}catch (SQLException e) {\n\t\t\tdebugOut(\"SQL Problem\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdebugOut(\"Beginning to assign variables\");\n\t\tdebugOut(\"Data\");\n\t\tString dataAsInt = getData(data);\n\t\tdebugOut(\"Material\");\n\t\titemMaterial= Material.getMaterial(material);\n\t\t//get the amount after checking full stack\n\t\tint quantity = 0;\n\t\tif(fullStack){\n\t\t\tquantity= itemMaterial.getMaxStackSize();\n\t\t}else {\n\t\t\tquantity = 1;\n\t\t}\n\t\tdebugOut(\"Creating New item stack\");\n\t\tItemStack shopItem = new ItemStack(itemMaterial, quantity, (short) Short.parseShort(dataAsInt) ) ;\n\t\tdebugOut(\"Creating item meta\");\n\t\tItemMeta meta = null;\n\t\tEnchantmentStorageMeta bookMeta = null;\n\t\tBoolean isBook = null;\n\t\t//Check if is a book\n\t\tif(material.contains(\"ENCHANTED_BOOK\")){\n\t\t\t//Do for book items\n\t\t\tdebugOut(\"Item is an enchanted book -- making note of it\");\n\t\t\tbookMeta = (EnchantmentStorageMeta) shopItem.getItemMeta();\n\t\t\tisBook = true;\n\t\t}else {\n\t\t\t//Do for non-book items\n\t\t\tdebugOut(\"Item is not an enchanted book\");\n\t\t\tmeta = shopItem.getItemMeta();\n\t\t\tisBook = false;\n\t\t}\n\t\tdebugOut(\"Item meta: Display Name\");\n\t\tif(name.equalsIgnoreCase(null) || name.equalsIgnoreCase(\"\") || name.equalsIgnoreCase(\"null\") ){\n\t\t\t//Do Nothing'\n\t\t\tdebugOut(\"No set item name -- Skipping\");\n\t\t}else{\n\t\t\tdebugOut(\"Setting item meta name to: \"+name);\n\t\t\tif(isBook){\n\t\t\t\tbookMeta.setDisplayName(name);\n\t\t\t}else{\n\t\t\t\tmeta.setDisplayName(name);\n\t\t\t}\n\t\t}\n\t\tif(material.contains(\"SWORD\") || material.contains(\"SPADE\") || material.contains(\"PICKAXE\") || material.contains(\"AXE\") ||\n\t\t\t\tmaterial.contains(\"HELMET\") || material.contains(\"CHESTPLATE\") || material.contains(\"LEGGINGS\") || material.contains(\"BOOTS\") ||\n\t\t\t\tisBook){ \n\t\t\t//Test the material of the item, to prevent generic blocks from having lore\n\t\t\tif(getConfig().getString(\"item-receipt\")==\"true\"){\n\t\t\t\tdebugOut(\"Setting receipt\");\n\t\t\t\tif(isBook){\n\t\t\t\t\tdebugOut(\"Assigning book lore\");\n\t\t\t\t\tbookMeta.setLore(Arrays.asList(getConfig().getString(\"item-receipt-text\"), seller));\n\t\t\t\t}else{\n\t\t\t\t\tdebugOut(\"Assigning non-book lore\");\n\t\t\t\t\tmeta.setLore(Arrays.asList(getConfig().getString(\"item-receipt-text\"), seller));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!isBook){\n\t\t\tdebugOut(\"Assigning non-book meta to the itemstack\");\n\t\t\tshopItem.setItemMeta(meta);\n\t\t}\n\t\tdebugOut(\"Enchanting...\");\n\t\tString[] brokenEnchantments = enchantments.split(\";\");\n\t\tif(!enchantments.equalsIgnoreCase(\"\")){\n\t\t\tfor(int i=0; i<brokenEnchantments.length; i++){\n\t\t\t\tdebugOut(\"Splitting: \"+brokenEnchantments[i]);\n\t\t\t\tString[] brokenValues = brokenEnchantments[i].split(\",\");\n\t\t\t\tdebugOut(\"Split Version: \"+brokenValues[0]+\" and \"+brokenValues[1]);\n\t\t\t\tString enchName = brokenValues[0];\n\t\t\t\tdebugOut(\"Final enchantment name string: \"+enchName);\n\t\t\t\tdebugOut(\"Assigning enchantment variable\");\n\t\t\t\tdebugOut(enchName);\n\t\t\t\tEnchantment currentEnchantment = Enchantment.getByName(enchName);\n\t\t\t\tdebugOut(\"Assigning enchantment level integer\");\n\t\t\t\tint currentLevel = Integer.parseInt(brokenValues[1]);\n\t\t\t\tif(!isBook){\n\t\t\t\t\tdebugOut(\"Adding (un)safe enchantment to non-book: \"+currentEnchantment.getName()+\" at level \"+currentLevel);\n\t\t\t\t\tshopItem.addUnsafeEnchantment(currentEnchantment, currentLevel);\n\t\t\t\t}else{\n\t\t\t\t\tdebugOut(\"Adding stored enchantment: \"+currentEnchantment.getName()+\" at level \"+ currentLevel);\n\t\t\t\t\tif(bookMeta.addStoredEnchant(currentEnchantment, currentLevel, true)){\n\t\t\t\t\t\tdebugOut(\"Item meta was changed as a result of addStoredEnchant\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdebugOut(\"Item meta not changed! -- this should not happen\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdebugOut(\"Enchantment added!\");\t\t\t\t\n\t\t\t}\n\t\t\tif(isBook){\n\t\t\t\tdebugOut(\"Assigning book meta to the itemstack\");\n\t\t\t\tshopItem.setItemMeta(bookMeta);\n\t\t\t}\n\t\t}else{\n\t\t\tdebugOut(\"No enchantments -- Skipping\");\n\t\t}\n\t\tdebugOut(\"Returning the itemstack\");\n\t\treturn shopItem;\n\t}", "private void refreshPlayerList() {\n List<MarketItem> items = new ArrayList<>();\n EntityRef player = localPlayer.getCharacterEntity();\n for (int i = 0; i < inventoryManager.getNumSlots(player); i++) {\n EntityRef entity = inventoryManager.getItemInSlot(player, i);\n\n if (entity.getParentPrefab() != null) {\n MarketItem item;\n\n if (entity.hasComponent(BlockItemComponent.class)) {\n String itemName = entity.getComponent(BlockItemComponent.class).blockFamily.getURI().toString();\n item = marketItemRegistry.get(itemName, 1);\n } else {\n item = marketItemRegistry.get(entity.getParentPrefab().getName(), 1);\n }\n\n items.add(item);\n }\n }\n\n tradingScreen.setPlayerItems(items);\n }", "public VendingMachine(List<Item> items) {\r\n updateInventory(items);\r\n moneyLog = new Money();\r\n }", "private void viewBackpack() {\n Item[] inventory = GameControl.getSortedInventoryList();\r\n \r\n System.out.println(\"\\n List of inventory Items\");\r\n System.out.println(\"Description\" + \"\\t\" + \r\n \"Required\" + \"\\t\" +\r\n \"In Stock\");\r\n \r\n // For each inventory item\r\n for (Item inventoryItem : inventory){\r\n // Display the description, the required amount and amount in stock\r\n System.out.println(InventoryItem.getType + \"\\t \" +\r\n InventoryItem.requiredAmount + \"\\t \" +\r\n InventoryItem.getQuantity);\r\n }\r\n \r\n }", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "private void loadInv() {\n\t\titem = Main.inventory.business.getAllBaked();\n\t\tString test = \"ID, Name, Amount, Price\\n\";\n\t\t//formatting for string to load into the screen\n\t\tfor(int i=0 ; i< item.size() ; i++) {\n\t\t\ttest += (i+1) + \" \" + item.get(i).getName() +\", \" \n\t\t\t\t\t+ item.get(i).getQuantity() + \n\t\t\t\t\t\", $\"+ Main.inventory.business.getItemCost(item.get(i).getName()) +\"\\n\";\n\t\t}\n\t\tthis.inv.setText(test);\n\t}", "public abstract List<String> getInventory();", "public String printGrabbedItems() {\n return \"Items in your inventory: \" + grabbedItems;\n }", "public void onInventoryChanged();", "public Inventory inventoryUpdate (TheGroceryStore g, LinkedList<Inventory> updater) throws ItemNotFoundException;", "@Override\n\tpublic void seeSoldItem() {\n\t\tShip selectedShip = game.getSelectedShip();\n\t\tHashMap<Goods, ArrayList<String>> soldItems = selectedShip.getSoldItems();\n\t\tint index = 1;\n\t\tSystem.out.println(\"Items that has been sold: \");\n\t\tfor (HashMap.Entry<Goods, ArrayList<String>> set: soldItems.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantitySold();\n\t\t\tSystem.out.println(\"(\" + index + \") Name: \" + name + \" Quantity: \" + quantity + \" Loaction it was sold: \" + set.getValue());\n\t\t\tindex++;\n\t\t\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\ttry {\n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\n\t\t\t\t\tstate = true;\n\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t}", "private void populateItems() {\n \t try {\n \t File myObj = new File(\"items.txt\");\n \t Scanner myReader = new Scanner(myObj);\n \t while (myReader.hasNextLine()) {\n\t \t String data = myReader.nextLine();\n\t \t String[] variables = data.split(\",\");\n\t \t int price = (int) Math.floor(Math.random() * 100); \n\t \t \n\t \t itemList += variables[0] + \",\"+ variables[1] +\",\" + \"0\" + \", \"+ \",\"+price + \",\";\n\t \t Item x = new Item(variables[0], 0, \"\", price, variables[1]);\n\t \t items.add(x);\n \t }\n \t myReader.close();\n \t } catch (FileNotFoundException e) {\n \t System.out.println(\"An error occurred.\");\n \t e.printStackTrace();\n \t }\n\t\t\n\t}", "@Override\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\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}", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "protected void putItems() {\n\t\tlevelSetup[0][5].putItem(new Dynamite());\n\t\tlevelSetup[6][6].putItem(new Flint());\n\t\tlevelSetup[6][3].putItem(new ManaPotion());\n\t\tlevelSetup[5][0].putItem(new ManaPotion());\n\t\tlevelSetup[2][1].putItem(new HealthPotion());\n\t\tlevelSetup[3][6].putItem(new HealthPotion());\n\t\tlevelSetup[4][2].putItem(new Spinach());\n\t}", "public static void initializeIronItems(Player player) {\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 146, 93,\n\t\t\t\tIRON_ITEMS[0]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 147, 93,\n\t\t\t\tIRON_ITEMS[1]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 148, 93,\n\t\t\t\tIRON_ITEMS[2]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 149, 93,\n\t\t\t\tIRON_ITEMS[3]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 150, 93,\n\t\t\t\tIRON_ITEMS[4]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 151, 93,\n\t\t\t\tIRON_ITEMS[5]);\n\t}", "private void getItems() {\n getComputers();\n getPrinters();\n }", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "public Inventory() {\n \titems = new ArrayList<Collectable>();\n \tnumTokens = 0;\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\r\n public void updatedSaleInventory(ItemAndQuantity lastItem) {\r\n }", "@Override\n public void onRestoreInstanceState(Bundle savedInstance) {\n for (int i = 0; i < numInList; i++) {\n int val = savedInstance.getInt(\"quantity\"+i, 0);\n e.putInt(\"ItemQuantity\"+i, val);\n }\n }", "public void goFiniteShopping(ArrayList<Item> items){\n for (Item item : items){\n purchasePersonalItem(item);\n }\n }", "List<InventoryItem> getInventory(String username);", "private void updateShop(List<ItemType> items, int level) {\n\t\tfor (ItemType item : items) {\n\t\t\tString text = item.getTextureString();\n\t\t\ttext = item instanceof SpecialType ? text\n\t\t\t\t\t: text.substring(0, text.length() - 1)\n\t\t\t\t\t\t\t+ Integer.toString(level);\n\t\t\tTexture texture = textureManager.getTexture(text);\n\t\t\tImageButton button = generateItemButton(texture);\n\n\t\t\tbutton.addListener(new ClickListener() {\n\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\tstatus.setText(item.getName());\n\t\t\t\t\tif (selectedHero == null) {\n\t\t\t\t\t\tstatus.setText(\"Unsuccessful shopping, No hero exist.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (selectedHero.getHealth() <= 0) {\n\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\"Your Commander is dead. Can't buy anything.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tboolean enoughResources = checkCost(selectedHero.getOwner(),\n\t\t\t\t\t\t\titem);\n\t\t\t\t\tif (enoughResources) {\n\t\t\t\t\t\tif (item instanceof WeaponType) {\n\t\t\t\t\t\t\tWeapon weapon = new Weapon((WeaponType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(weapon);\n\t\t\t\t\t\t\tstatus.setText(boughtString + weapon.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Weapon) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else if (item instanceof ArmourType) {\n\t\t\t\t\t\t\tArmour armour = new Armour((ArmourType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(armour);\n\t\t\t\t\t\t\tstatus.setText(boughtString + armour.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Armour) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tboolean transactSuccess;\n\t\t\t\t\t\t\tSpecial special = new Special((SpecialType) item);\n\t\t\t\t\t\t\ttransactSuccess = selectedHero\n\t\t\t\t\t\t\t\t\t.addItemToInventory(special);\n\t\t\t\t\t\t\tif (transactSuccess) {\n\t\t\t\t\t\t\t\tstatus.setText(boughtString + special.getName()\n\t\t\t\t\t\t\t\t\t\t+ \"(Special) for \"\n\t\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\t\t\"Unsuccessful Shopping, can only hold 4 specials\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedHero.setStatsChange(true);\n\t\t\t\t\t\ttransact(selectedHero.getOwner(), item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString mes = \"Not enough resources.\";\n\t\t\t\t\t\tstatus.setText(mes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprivate boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tscrollTable.add(button).width(iconSize).height(iconSize).top();\n\t\t\tString stats = getItemStats(item, level);\n\t\t\tString cost = getItemCost(item, level);\n\t\t\tscrollTable.add(new Label(stats, skin)).width(iconSize).top()\n\t\t\t\t\t.left();\n\t\t\tscrollTable.add(new Label(cost, skin)).width(iconSize).top().left();\n\t\t\tscrollTable.row();\n\t\t}\n\t}", "public void setList(ArrayList<Item> inventory) {\r\n\t\tthis.inventory = inventory;\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\tint numOfItems = loader.getNumOfItems();\r\n\t\tsetStoreSize(numOfItems);\r\n\r\n\t\tfor (int i = 0; i < numOfItems; i++) {\r\n DrinksStoreItem item = (DrinksStoreItem) loader.getItem(i);\r\n\t\t\tStoreObject brand = item.getContent();\r\n\t\t\tStoreObject existingBrand = findObject(brand.getName());\r\n\t\t\tif (existingBrand != null) {\r\n\t\t\t item.setContent(existingBrand);\r\n\t\t\t}\r\n\t\t\taddItem(i, item);\t\r\n\t\t}\r\n\t}", "public Collection<Item> shopItems() {\n\t\treturn this.itemRepository.shopItems();\n\t}", "public void loadDB(){\n ////////////// Code that builds stores with their items lists and builds carts /////////////////////////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n sampleData = new HashMap<>(); //Make 1 hashmap per store (each has that store's items)\n //storeB_Data = new HashMap<>(); //Hashmap that has items of store B\n\n //Add new item to HashMap of items\n sampleData.put(\"026229211706\", new InventoryItem(1.99, \"Notebook\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"026229211706\"));\n sampleData.put(\"096619756803\", new InventoryItem(2.99, \"Water Bottle\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"096619756803\"));\n sampleData.put(\"9781491962299\", new InventoryItem(4.99, \"Machine Learning\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"9781491962299\"));\n sampleData.put(\"1297432524354\", new InventoryItem(4.99, \"Item\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"1297432524354\"));\n sampleData.put(\"857263004111\", new InventoryItem(79.99, \"Trendy Jacket\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"857263004111\"));\n\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(49.99,\"Hands On Machine Learning\",\"https://m.media-amazon.com/images/S/aplus-media/vc/11714e04-b1a6-439d-9482-87e757822f94.jpg\",\"Others\",\"1\",1));\n\n //This data will be populated into instance objects on each scan and \"add to cart\" /////////////////////////////\n //LAST INPUT (in this case, 1) IS THE QUANTITY. SHOULD BE SET TO WHATEVER IS ASSIGNED FROM THE DIALOGUE BOX\n //CartItem notebook = new CartItem(sampleData.get(\"026229212703\").getPrice(), sampleData.get(\"026229212703\").getName(), sampleData.get(\"026229212703\").getImage(), sampleData.get(\"026229212703\").getSalesTaxGroup(), sampleData.get(\"026229212703\").getItemKey(), 1);\n //CartItem water = new CartItem(sampleData.get(\"096619756803\").getPrice(), sampleData.get(\"096619756803\").getName(), sampleData.get(\"096619756803\").getImage(), sampleData.get(\"096619756803\").getSalesTaxGroup(), sampleData.get(\"096619756803\").getItemKey(), 1);\n //CartItem mints = new CartItem(sampleData.get(\"030242940017\").getPrice(), sampleData.get(\"030242940017\").getName(), sampleData.get(\"030242940017\").getImage(), sampleData.get(\"030242940017\").getSalesTaxGroup(), sampleData.get(\"030242940017\").getItemKey(), 1);\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n //CartListOfItems cart = new CartListOfItems();\n //cart.addToCart(notebook);\n //cart.addToCart(toyCar);\n }", "private void testShippingGoods(){\n\t\tItem []itemArray1 = warehouse.getProductsByID(\"\");\n\n\n\t\tItem[] itemArray = warehouse.shippingGoods(itemArray1);\n\t\tSystem.out.println(\"There are \" + itemArray.length + \" items\");\n\t\tfor(Item item: itemArray){\n\t\t\tItemImpl tmpItemImpl = new ItemImpl(item);\n\t\t\tSystem.out.println(tmpItemImpl.toString());\n\t\t}\n\t}", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "@Override\n\tpublic int getSizeInventory() {\n\t\treturn 0;\n\t}", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }", "@Override\n\tpublic void onInventoryChanged() {\n\t}", "public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }", "public static void initializeSteelItems(Player player) {\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 146, 93,\n\t\t\t\tSTEEL_ITEMS[0]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 147, 93,\n\t\t\t\tSTEEL_ITEMS[1]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 148, 93,\n\t\t\t\tSTEEL_ITEMS[2]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 149, 93,\n\t\t\t\tSTEEL_ITEMS[3]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 150, 93,\n\t\t\t\tSTEEL_ITEMS[4]);\n\t\tplayer.getActionSender().sendUpdateItems(SMITHING_INTERFACE, 151, 93,\n\t\t\t\tSTEEL_ITEMS[5]);\n\t}", "public String getItemsString()\n {\n String returnString =\"\";\n if(Inventory.isEmpty()){\n returnString = \"You are not holding any items\";\n } else {\n returnString = \"Items you are holding:\";\n String temp = \"\";\n for(Items item : Inventory.values()) {\n temp += \", \" + item.getName() ; \n }\n returnString += temp.substring(1);\n }\n return returnString;\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "public Items getItem(String name)\n {\n return Inventory.get(name);\n }", "public void packBags() {\r\n GroceryBag[] packedBags = new GroceryBag[numItems];\r\n int bagCount = 0;\r\n\r\n GroceryBag currentBag = new GroceryBag();\r\n for (int i=0; i<numItems; i++) {\r\n GroceryItem item = (GroceryItem) cart[i];\r\n if (item.getWeight() <= GroceryBag.MAX_WEIGHT) {\r\n if (!currentBag.canHold(item)) {\r\n packedBags[bagCount++] = currentBag;\r\n currentBag = new GroceryBag();\r\n }\r\n currentBag.addItem(item);\r\n removeItem(item);\r\n i--;\r\n }\r\n }\r\n // Check this in case there were no bagged items\r\n if (currentBag.getWeight() > 0)\r\n packedBags[bagCount++] = currentBag;\r\n\r\n // Now create a new bag array which is just the right size\r\n pBags = new GroceryBag[bagCount];\r\n for (int i=0; i<bagCount; i++) {\r\n pBags[i] = packedBags[i];\r\n }\r\n\r\n // Add all grocery bags bag into cart\r\n for (int i = 0; i < bagCount; i++) {\r\n addItem(pBags[i]);\r\n }\r\n }", "public ArrayList<Tool> cart(Customer c, ArrayList<Tool> Inventory){\n\t\t\n\t\tArrayList<Tool> cart = new ArrayList<Tool>(); //empty cart\n\n\t Random rand = new Random();\n\n\t //randomly pick item from inventory 0 ->24\n\t int n = rand.nextInt(Inventory.size());\n \t\n\t \n\t //add item to cart\n\t cart.add(Inventory.get(n));\n\t\t//remove item from inventory\n\t Inventory.remove(n);\n\t \n\t \n\n\t\treturn cart;\n\t\t\n\t}", "public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}", "void populateItemQuantity() {\n for (int i = 0; i < 10; i++) {\n String number = String.valueOf(i + 1);\n comboQuantity.getItems().add(i, number);\n }\n comboQuantity.setEditable(true);\n comboQuantity.getSelectionModel().selectFirst();\n }", "private void equipButtonClicked(final ShopItem shopItem) {\n shopItem.setState(ItemStatusID.EQUIPPED);\n if (shopItem instanceof Shovel) {\n for (Shovel shovel : SHOVELS) {\n if (shovel.equals(shopItem)) {\n continue;\n } else if (shovel.getState() == ItemStatusID.EQUIPPED) {\n shovel.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n } else if (shopItem instanceof Background) {\n for (Background background : BACKGROUNDS) {\n if (background.equals(shopItem)) {\n continue;\n } else if (background.getState() == ItemStatusID.EQUIPPED) {\n background.setState(ItemStatusID.BOUGHT);\n break;\n }\n }\n }\n updateUI();\n }", "public void onInventoryChanged()\n\t{\n\t\tfor (int i = 0; i < this.items.length; i++)\n\t\t{\n\t\t\tItemStack stack = this.items[i];\n\t\t\tif (stack != null && stack.stackSize <= 0)\n\t\t\t{\n\t\t\t\tthis.items[i] = null;\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "public List<Inventory> getInventory();", "public Inventory(int INVENTORY_SLOTS) {\n\t\tsuper();\n\t\tthis.inventoryItems = new Item[INVENTORY_SLOTS];\n\t\tthis.INVENTORY_SLOTS = INVENTORY_SLOTS;\n\t}", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }" ]
[ "0.744282", "0.7011291", "0.67073375", "0.66449505", "0.6639128", "0.663618", "0.66004694", "0.65814245", "0.6471732", "0.64591986", "0.6430404", "0.6347005", "0.6324385", "0.63202554", "0.6319593", "0.6300687", "0.62879497", "0.62808853", "0.62717557", "0.622275", "0.61738455", "0.61622757", "0.61541444", "0.61517394", "0.61462224", "0.6130523", "0.6126018", "0.6117958", "0.6114237", "0.6108464", "0.61002576", "0.60862887", "0.6070353", "0.60692805", "0.6061514", "0.6060663", "0.60566443", "0.60497487", "0.6011373", "0.59904414", "0.59748644", "0.5973232", "0.59658927", "0.59554845", "0.5954927", "0.59481025", "0.59457225", "0.59337246", "0.5909685", "0.5908339", "0.58916956", "0.58884853", "0.58867", "0.5874713", "0.5869623", "0.58635235", "0.58524626", "0.58493483", "0.58320177", "0.5824883", "0.5822352", "0.5818697", "0.5816521", "0.58132076", "0.5808541", "0.58055437", "0.5787699", "0.578061", "0.5767", "0.5763729", "0.5763088", "0.5762869", "0.57609963", "0.5755528", "0.57479006", "0.57448125", "0.5743129", "0.5740572", "0.5737114", "0.5721943", "0.57196677", "0.57170326", "0.57072455", "0.5698838", "0.5691666", "0.5690406", "0.5688526", "0.5685094", "0.5682917", "0.5675444", "0.56707627", "0.5661737", "0.5657909", "0.5656094", "0.5651502", "0.56414783", "0.5641242", "0.5638665", "0.56350905", "0.56307375" ]
0.62570757
19