query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
sets the merchant points of the player | public void setMerchantPoints(int points) {
if (pointsPullCheck(points)) {
merchantPoints += points;
}
} | [
"public void setCurrPoints(int points){\n playerPoints = playerPoints + points;\n }",
"public void setEngineerPoints(int points){\n\t player.setEngineer(points);\n }",
"public void setTraderPoints(int points){\n\t player.setTrader(points);\n }",
"public void initializePlayerPointValues() {\n this.playerTurn = 1;\n //player one\n this.p1GoldCoins = 0;\n this.p1GoldPts = 0;\n this.p1EmeraldCoins = 0;\n this.p1EmeraldPts = 4;\n this.p1SapphireCoins = 0;\n this.p1SapphirePts = 4;\n this.p1RubyCoins = 0;\n this.p1RubyPts = 4;\n this.p1OnyxCoins = 0;\n this.p1OnyxPts = 4;\n this.p1DiamondCoins = 0;\n this.p1DiamondPts = 4;\n this.p1PrestigePts = 0;\n this.p1NumCardsReserved = 0;\n\n this.p2GoldCoins = 0;\n this.p2GoldPts = 0;\n this.p2EmeraldCoins = 0;\n this.p2EmeraldPts = 4;\n this.p2SapphireCoins = 0;\n this.p2SapphirePts = 4;\n this.p2RubyCoins = 4;\n this.p2RubyPts = 4;\n this.p2OnyxCoins = 0;\n this.p2OnyxPts = 4;\n this.p2DiamondCoins = 0;\n this.p2DiamondPts = 4;\n this.p2PrestigePts = 0;\n this.p2NumCardsReserved = 0;\n\n this.p3GoldCoins = 0;\n this.p3GoldPts = 0;\n this.p3EmeraldCoins = 0;\n this.p3EmeraldPts = 4;\n this.p3SapphireCoins = 0;\n this.p3SapphirePts = 4;\n this.p3RubyCoins = 0;\n this.p3RubyPts = 4;\n this.p3OnyxCoins = 0;\n this.p3OnyxPts = 4;\n this.p3DiamondCoins = 0;\n this.p3DiamondPts = 4;\n this.p3PrestigePts = 0;\n this.p3NumCardsReserved = 0;\n\n this.p4GoldCoins = 0;\n this.p4GoldPts = 0;\n this.p4EmeraldCoins = 0;\n this.p4EmeraldPts = 4;\n this.p4SapphireCoins = 0;\n this.p4SapphirePts = 4;\n this.p4RubyCoins = 0;\n this.p4RubyPts = 4;\n this.p4OnyxCoins = 0;\n this.p4OnyxPts = 4;\n this.p4DiamondCoins = 0;\n this.p4DiamondPts = 4;\n this.p4PrestigePts = 0;\n this.p4NumCardsReserved = 0;\n }",
"public int getMerchantPoints() {\n\n return this.merchantPoints;\n }",
"public void setEngineerPoints(int points) {\n if (pointsPullCheck(points)) {\n engineerPoints += points;\n }\n }",
"public void setFighterPoints(int points){\n\t player.setFighter(points);\n }",
"public void setFighterPoints(int points) {\n if (pointsPullCheck(points)) {\n fighterPoints += points;\n }\n }",
"public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }",
"public void setPilotPoints(int points) {\n if (pointsPullCheck(points)) {\n pilotPoints += points;\n }\n }",
"private void setWallet(){\n walletSender = FirebaseDatabase.getInstance().getReference(\"users\").child(user.getUid()).child(\"balance\");;\n walletSender.setValue(userBalance - totalTransfer);\n\n //Set balance on merchant's wallet\n walletReceiver = FirebaseDatabase.getInstance().getReference(\"users\").child(receiver).child(\"balance\");\n walletReceiver.setValue(receiverBalance + totalTransfer);\n }",
"public void setPoints(int points) {\n this.points = points;\n }",
"public void setUsePoint(Money usePoint) {\n\t\tif (usePoint == null) {\n\t\t\tthis.usePoint = new Money(0, 0);\n\t\t} else {\n\t\t\tthis.usePoint = usePoint;\n\t\t}\n\t}",
"public void setTradePoint(int tradePoint) {\n this.tradePoint = tradePoint;\n }",
"public void givePoints(int points, String team) {\n\n\t}",
"public void setPayPoints(Integer payPoints) {\n this.payPoints = payPoints;\n }",
"public PlayerPoints(Player owner) {\n this.owner = owner;\n }",
"@Test\n public void testSetPoints() {\n System.out.println(\"setPoints\");\n Board.getInstance().resetPoints();\n p.setPoints(100);\n assertEquals(100, p.getPoints(),0);\n }",
"public void setPoints(BigDecimal points) {\n this.points = points;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'producer_time' field. | public cz.muni.fi.sdipr.kafka.latency.avro.Payload.Builder setProducerTime(long value) {
validate(fields()[1], value);
this.producer_time = value;
fieldSetFlags()[1] = true;
return this;
} | [
"public void setProducerTime(java.lang.Long value) {\n this.producer_time = value;\n }",
"public java.lang.Long getProducerTime() {\n return producer_time;\n }",
"public java.lang.Long getProducerTime() {\n return producer_time;\n }",
"public cz.muni.fi.sdipr.kafka.latency.avro.Payload.Builder setConsumerTime(long value) {\n validate(fields()[2], value);\n this.consumer_time = value;\n fieldSetFlags()[2] = true;\n return this;\n }",
"public void setProTime(Date proTime) {\r\n\t\tthis.proTime = proTime;\r\n\t}",
"public cz.muni.fi.sdipr.kafka.latency.avro.Payload.Builder clearProducerTime() {\n fieldSetFlags()[1] = false;\n return this;\n }",
"public void setConsumerTime(java.lang.Long value) {\n this.consumer_time = value;\n }",
"public void setProTime(String proTime) {\r\n this.proTime = proTime;\r\n }",
"public void setPubTime(Date value) {\n setAttributeInternal(PUBTIME, value);\n }",
"public void setTime(Timestamp p_time)\n {\n m_timeToStartExport = p_time;\n }",
"public boolean hasProducerTime() {\n return fieldSetFlags()[1];\n }",
"public com.xplordat.kbe.avro.RawVertex.Builder setProductionTime(long value) {\n validate(fields()[1], value);\n this.production_time = value;\n fieldSetFlags()[1] = true;\n return this;\n }",
"public void setAlarmProtime(Date alarmProtime) {\n this.alarmProtime = alarmProtime;\n }",
"public void setScreatetime(Date screatetime) {\n this.screatetime = screatetime;\n }",
"public void setDeliveryStartTime(final SessionContext ctx, final Date value)\n\t{\n\t\tsetProperty(ctx, DELIVERYSTARTTIME,value);\n\t}",
"public void setTime(Time time) {\n this.time = time; // assigns the time argument value to the time attribute\n }",
"public void setPolicyRetrievalSetTime(java.util.Date value);",
"public void setProducer(String producer) {\r\n this.producer = producer == null ? null : producer.trim();\r\n }",
"public void setProducer(String producer) {\n this.producer = producer;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the media size. | public MediaSizeName getMediaSize() {
return mediaSize;
} | [
"public VideoSize getSize() {\n\t\treturn size;\n\t}",
"public ImageSize getSize() {\n return size;\n }",
"@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }",
"VideoSize getSize() {\n return size;\n }",
"public String getSize() {\n return fullPhoto.getSize();\n }",
"public MediaSize getMediaSizeDefault() {\n\t\tMediaSize retValue = Language.getLoginLanguage().getMediaSize();\n\t\tif (retValue == null)\n\t\t\tretValue = MediaSize.ISO.A4;\n\t\tlog.fine(retValue.toString());\n\t\treturn retValue;\n\t}",
"public Integer getSize() {\r\n if (obj != null) {\r\n return obj.getPayload().length;\r\n }\r\n else { \r\n return getInteger(\"size\"); \r\n }\r\n }",
"@Schema(description = \"The size of the attachment.\")\r\n\r\n\t@Valid\r\n\r\n\tpublic Quantity getSize() {\r\n\t\treturn size;\r\n\t}",
"Metadata.Image.Size getSize();",
"public long getArtworkSize();",
"public int getSizeMb() {\n return sizeMb_;\n }",
"public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }",
"public int getMediaCount() {\n return instance.getMediaCount();\n }",
"public int getSizeMb() {\n return sizeMb_;\n }",
"int getSizeMb();",
"public int getMediaCount() {\n return mediaCount_;\n }",
"public double getSize() \n {\n return size;\n }",
"@NonNull\n public VideoSize getVideoSize() {\n throw new UnsupportedOperationException(\"getVideoSize is not implemented\");\n }",
"int getSizeInMB();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies that we can send and peek a message. | @Test
void peekMessage() {
// Arrange
final String messageId = UUID.randomUUID().toString();
final ServiceBusMessage message = TestUtils.getServiceBusMessage(CONTENTS, messageId, 0);
// Assert & Act
StepVerifier.create(sender.send(message).then(receiver.peek()))
.assertNext(receivedMessage -> assertTrue(receivedMessage.getProperties().containsKey(MESSAGE_TRACKING_ID)))
.verifyComplete();
} | [
"boolean hasIsPerMsg();",
"boolean hasReadyMsg();",
"boolean hasMsgbyte();",
"boolean hasEstablishConsume();",
"private boolean canSend() {\n\n if (StringUtils.isEmpty(constructedCommand())) return false;\n\n int beginIndex = constructedCommand()\n .indexOf(serialProperties.getCmdBeginMarker());\n int endIndex = constructedCommand()\n .indexOf(serialProperties.getCmdEndMarker());\n\n return beginIndex != -1 && endIndex != -1 && beginIndex < endIndex;\n }",
"boolean isMessage();",
"boolean hasTestConnectionMessageRequest();",
"public boolean hasIsPerMsg() {\n return ((bitField1_ & 0x00000800) == 0x00000800);\n }",
"boolean hasSpeakMsg();",
"public boolean hasIsPerMsg() {\n return ((bitField1_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasMessage(){\r\n return this.receivedMessages.size()>0;\r\n }",
"private boolean isMessageReady(Cursor msgCursor, byte msgBox) {\n String dateSent = getString(msgCursor, Mms.DATE_SENT);\n String mId = getString(msgCursor, Mms.MESSAGE_ID);\n if (msgBox == TextMessage.BOX_INBOX)\n return !\"0\".equals(dateSent);\n else if (msgBox == TextMessage.BOX_SENT)\n return mId != null;\n return true;\n }",
"Boolean isMessageRead(String msgId);",
"boolean getIsPerMsg();",
"public boolean hasPendingMessages();",
"@Test\n public void peekTest() {\n assertThat(\"work1\", is(this.queue.peek()));\n }",
"@Test (expected = RuntimeException.class)\n public void peekError() {\n ringBuffer.peek();\n }",
"public boolean sendMessage(Message stream);",
"@Override\n public boolean hasMessageAvailable() {\n return !priorityQueue.isEmpty() && priorityQueue.peekN1() <= clock.millis();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct client for accessing prediction service server using the existing channel. | public RpcClient(ManagedChannelBuilder<?> channelBuilder) {
channel = channelBuilder.build();
blockingStub = PredictionServiceGrpc.newBlockingStub(channel);
asyncStub = PredictionServiceGrpc.newStub(channel);
modelServiceBlockingStub = ModelServiceGrpc.newBlockingStub(channel);
modelServiceStub = ModelServiceGrpc.newStub(channel);
channelzBlockingStub = ChannelzGrpc.newBlockingStub(channel);
} | [
"public void create_channel() {\n EventLoopGroup group = new NioEventLoopGroup();\n try {\n Bootstrap b = new Bootstrap();\n b.group(group)\n .channel(NioSocketChannel.class)\n .handler(new HttpSnoopClientInitializer(null));\n\n // Make the connection attempt.\n channel = b.connect(ip, 8080).sync().channel();\n System.err.println(\"Channel established...\");\n\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"Channel createChannel();",
"private void createClient(String host) {\n Log.i(this.getClass().getName(), \"Creating gRPC Client , at address: \" + host);\n channel = ManagedChannelBuilder.forAddress(host, PORT)\n .usePlaintext(true)\n .build();\n\n asyncStub = SimonSaysGrpc.newStub(channel);\n }",
"SocketChannel createChannel();",
"protected abstract ChannelInitializer<Channel> createChannelInitializer ();",
"public Client createClient() {\n return new Client(\n new URLConnectionClientHandler(getHttpURLConnectionFactory()));\n }",
"private DefaultServiceMixClient createClient() throws JBIException {\n return new DefaultServiceMixClient(this.jbi);\n }",
"Client client();",
"public Connection(Channel channel) {\r\n this.channel = channel;\r\n }",
"public TritonClient(TritonClientConfiguration config) {\n\n\t\tcontext = new TritonClientContext(config);\n\t\tgroup = new NioEventLoopGroup(config.getWorker(), new NamedThreadFactory(\"triton-client-\"));\n\n\t\ttry {\n\t\t\tbootstrap = new Bootstrap()\n\t\t\t.group(group)\n\t\t\t.channel(NioSocketChannel.class)\n\t\t\t.handler(new TritonClientChannelInitializer(context))\n\t\t\t.option(ChannelOption.SO_KEEPALIVE, true)\n\t\t\t.option(ChannelOption.TCP_NODELAY, true)\n\t\t\t.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, context.getConfig().getConnectTimeout())\n\t\t\t;\n\t\t} catch (Exception e) {\n\t\t\tthrow new TritonRuntimeException(TritonErrors.client_error, e.getMessage(), e);\n\t\t}\n\t}",
"private void setupClient()\n {\n EventManager eventManager = new EventManager();\n PacketManager packetManager = new PacketManager();\n\n //Register the Client Listener\n eventManager.registerListener(new de.dragonlabs.scaleadapter.example.client.handler.MessageListener());\n try {\n //Register the Message Packet\n packetManager.registerPacket(MessagePacket.class);\n } catch (PacketIdAlreadyExistsException | NoMetaExistsException e) {\n e.printStackTrace();\n }\n\n //Create the Config with Packet and EventManager and the Client information\n ScaleConfig config = new ScaleConfig(\"localhost\", 8888, packetManager, eventManager);\n //Create an client with the data from the config\n client = ScaleNetworkFactory.createScaleClient(config);\n }",
"public ServiceClient() {\n\t\tsuper();\n\t}",
"private DefaultXrpClient getClient(\n Result<GetAccountInfoResponse, Throwable> getAccountInfoResponseResult,\n Result<GetTransactionResponse, Throwable> getTransactionResponseResult,\n Result<GetFeeResponse, Throwable> getFeeResult,\n Result<SubmitTransactionResponse, Throwable> submitTransactionResult,\n Result<GetAccountTransactionHistoryResponse, Throwable> getAccountTransactionHistoryResult\n ) throws IOException {\n XRPLedgerAPIServiceGrpc.XRPLedgerAPIServiceImplBase serviceImpl = getService(\n getAccountInfoResponseResult,\n getTransactionResponseResult,\n getFeeResult,\n submitTransactionResult,\n getAccountTransactionHistoryResult\n );\n\n // Generate a unique in-process server name.\n String serverName = InProcessServerBuilder.generateName();\n\n // Create a server, add service, start, and register for automatic graceful shutdown.\n grpcCleanup.register(InProcessServerBuilder\n .forName(serverName).directExecutor().addService(serviceImpl).build().start());\n\n // Create a client channel and register for automatic graceful shutdown.\n ManagedChannel channel = grpcCleanup.register(\n InProcessChannelBuilder.forName(serverName).directExecutor().build());\n\n // Create a new XRPClient using the in-process channel;\n return new DefaultXrpClient(channel, XrplNetwork.TEST);\n }",
"Client createNewClient(Client client);",
"public void startClient() {\n \n try {\n loop = EventLoop.defaultEventLoop();\n cli = new Client(this.ip, this.port, loop);\n cli.setRequestTimeout(90);\n iface = cli.proxy(RPCBrowserInterface.class);\n this.clientCon = true;\n } catch (UnknownHostException e) {\n // TODO Auto-generated catch block\n System.err.println(\"host not found, check /src/client.properties\");\n } \n }",
"protected Connection createConnection(SocketChannel channel, SelectionKey key) throws IOException {\n\t\treturn new HttpConnection(this, channel, key, this.hostnames);\n\t}",
"private Channel createChannel(){\n try {\n return connection.createChannel();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"private void openChannel() {\n\t\tString url = \"/getToken\";\n\t\tRequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url));\n\n\t\ttry {\n\t\t\tbuilder.sendRequest(null, new RequestCallback() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(Request request, Throwable exception) {\n\t\t\t\t\t// Couldn't connect to server (could be timeout, SOP violation, etc.)\n\t\t\t\t\tWindow.alert(\"Error getting token...\");\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\tif (200 == response.getStatusCode()) {\n\t\t\t\t\t\tcreateChannel(response.getText());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Handle the error. Can get the status text from response.getStatusText()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (RequestException e) {\n\t\t\t// Couldn't connect to server\n\t\t\tWindow.alert(\"Error authorizing\");\n\t\t}\n\t}",
"public EchoClient(Channel channel) {\n // 'channel' here is a Channel, not a ManagedChannel, so it is not this code's responsibility to\n // shut it down.\n\n // Passing Channels to code makes code easier to test and makes it easier to reuse Channels.\n blockingStub = EchoGrpc.newBlockingStub(channel);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get content of doc in the collection, and send back to the client | public void getCache(int docid){
try {
FileReader fr;
String file_name = ServerThread.collection_path+docid+".html";
fr = new FileReader(file_name);
BufferedReader file_input = new BufferedReader(fr);
String line;
String file_content="";
while ((line = file_input.readLine()) != null) {
file_content += line;
}
fr.close();
send(file_content);
//System.out.println(file_content);
}
catch (IOException ex) {
Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex);
System.out.println("Could not access file: "+docid);
}
} | [
"Collection<Document> getDocuments();",
"private void handleDocuments(HttpResponse response) {\n String content = readContent(response);\n Type collectionType = new TypeToken<List<DocsEntry>>() {}.getType();\n List<DocsEntry> entries = getGson().fromJson(content, collectionType);\n success(entries);\n }",
"public static void getDocument(Client client, String index, String type, String id) {\n\r\n GetResponse getResponse = client.prepareGet(index, type, id).get();\r\n Map<String, Object> source = getResponse.getSource();\r\n\r\n System.out.println(\"------------------------------\");\r\n System.out.println(\"Index: \" + getResponse.getIndex());\r\n System.out.println(\"Type: \" + getResponse.getType());\r\n System.out.println(\"Id: \" + getResponse.getId());\r\n System.out.println(\"Version: \" + getResponse.getVersion());\r\n System.out.println(source);\r\n System.out.println(\"------------------------------\");\r\n\r\n }",
"protected LocalDocument fetch() throws ParseException, IOException,\n\t\t\tJsonException {\n\t\treturn remotePipeline.getDocument(query);\n\t}",
"@Override\r\n public Document publishDocument(Document doc) {\n return doc;\r\n }",
"com.google.protobuf.ByteString getDocument();",
"FileContentSnapshot getContent();",
"java.lang.String getDocument();",
"public Document readDocument();",
"public Collection getBaseDocument() throws DispatcherException {\n \n \t\ttry {\n \t\t\t// checks if the base document hasn't been requested before\n \t\t\tif (baseDoc == null) {\n \t\t\t\t// creates a new get request to get the base document\n \t\t\t\tHttpGet get = new HttpGet(serverUrl + BASE_DOCUMENT_URL);\n \n \t\t\t\t// executes the request and gets the response\n \t\t\t\tHttpResponse response = httpClient.execute(get, localContext);\n \n \t\t\t\t// checks the response is valid\n \t\t\t\tcheckResponse(response);\n \n \t\t\t\t// gets the entity from the response\n \t\t\t\tbaseDoc = EntityUtils.toString(response.getEntity(),\n \t\t\t\t\t\tDEFAULT_ENCODING);\n \n \t\t\t\t// converts the basedoc into a collection\n \t\t\t\treturn DispatcherUtils.unmarshal(baseDoc);\n \t\t\t} else {\n \t\t\t\t// converts the current basedoc into a collection\n \t\t\t\treturn DispatcherUtils.unmarshal(baseDoc);\n \t\t\t}\n \t\t} catch (ClientProtocolException e) {\n \t\t\tthrow new DispatcherException(e.getMessage(), e);\n \t\t} catch (ParseException e) {\n \t\t\tthrow new DispatcherException(e.getMessage(), e);\n \t\t} catch (IOException e) {\n \t\t\tthrow new DispatcherException(e.getMessage(), e);\n \t\t} catch (JAXBException e) {\n \t\t\tthrow new DispatcherException(e.getMessage(), e);\n \t\t}\n \n \t}",
"public String getDoc();",
"public Document fetchDocument(String address) throws IOException, FetcherException;",
"public JSONObject getDocument(String index, String type, String id){\t\t\n\t\t//Build URL\n\t\tString url = server + \"/\" + index + \"/\" + type + \"/\" + id;\n\t\t\n\t\tlong tic = System.currentTimeMillis();\n\t\tJSONObject result = Connectors.httpGET(url);\n\t\t//System.out.println(result.toJSONString()); \t\t//debug\n\t\t\n\t\t//success?\n\t\tif (Connectors.httpSuccess(result)){\n\t\t\tStatistics.addInternalApiHit(API_NAME + \":\" + \"getDocument\", tic);\n\t\t\treturn result;\n\t\t}\n\t\t//error\n\t\telse{\n\t\t\tDebugger.println(\"getDocument - ElasticSearch - error in '\" + index + \"/\" + type + \"': \" + result.toJSONString(), 1);\n\t\t\tStatistics.addInternalApiHit(API_NAME + \":\" + \"getDocument\" + \"-error\", tic);\n\t\t\treturn result;\n\t\t}\n\t}",
"private Document fetchDocument(String uri) {\n CloseableHttpClient httpclient = HttpClients.createDefault();\n HttpGet httpget = new HttpGet(uri);\n CloseableHttpResponse response = null;\n\n try {\n response = httpclient.execute(httpget);\n if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document doc = builder.parse(response.getEntity().getContent());\n return doc;\n } else {\n System.err.println(\"Error: Not OK trying to fetch \" + uri + \": \" + response.getStatusLine());\n }\n } catch (Exception e) {\n System.err.println(\"Error: Got Exception trying to fetch \" + uri + \": \" + e.getMessage());\n } finally {\n // Close it if it needs to be\n try {\n response.close();\n } catch (Exception e) {}\n }\n\n return null;\n }",
"public Gedcomx getDocument() {\n return doc;\n }",
"@GET\n @Path(\"content/{uuid}/{artifactType}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String getDocumentContent(@PathParam(\"uuid\") String uuid, @PathParam(\"artifactType\") String artifactType)\n throws ArtificerUiException;",
"public T getDocument() {\n return document;\n }",
"public String getContent() throws BadLocationException {\n\t\treturn fDocument.get(offset, length);\n\t}",
"com.google.cloud.documentai.v1.GcsDocument getDocuments(int index);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a map join to this stream using the specified join type and ON condition. | default <K, V> FromStream<V, MapJoin<X, K, V>> join(MapAttribute<? super X, K, V> attribute, JoinType joinType,
Function<? super MapJoin<X, K, V>, ? extends Expression<Boolean>> on) {
if (attribute == null)
throw new IllegalArgumentException("null attribute");
if (joinType == null)
throw new IllegalArgumentException("null joinType");
if (on == null)
throw new IllegalArgumentException("null on");
QueryStreamImpl.checkOffsetLimit(this, "join()");
return new FromStreamImpl<>(this.getEntityManager(), new SearchType<>(attribute.getElementType().getJavaType()),
(builder, query) -> {
final From<?, X> from = (From<?, X>)this.configure(builder, query); // cast must be valid...
final MapJoin<X, K, V> join = from.join(attribute, joinType);
final Expression<Boolean> onPredicate = on.apply(join);
if (onPredicate != null)
join.on(onPredicate);
return join;
},
new QueryInfo());
} | [
"public void addJoin(int type, Expression on_expression) {\n join_set.add(new JoinPart(type, on_expression));\n }",
"default <E> FromStream<E, SetJoin<X, E>> join(SetAttribute<? super X, E> attribute, JoinType joinType,\n Function<? super SetJoin<X, E>, ? extends Expression<Boolean>> on) {\n if (attribute == null)\n throw new IllegalArgumentException(\"null attribute\");\n if (joinType == null)\n throw new IllegalArgumentException(\"null joinType\");\n if (on == null)\n throw new IllegalArgumentException(\"null on\");\n QueryStreamImpl.checkOffsetLimit(this, \"join()\");\n return new FromStreamImpl<>(this.getEntityManager(), new SearchType<>(attribute.getElementType().getJavaType()),\n (builder, query) -> {\n final From<?, X> from = (From<?, X>)this.configure(builder, query); // cast must be valid...\n final SetJoin<X, E> join = from.join(attribute, joinType);\n final Expression<Boolean> onPredicate = on.apply(join);\n if (onPredicate != null)\n join.on(onPredicate);\n return join;\n },\n new QueryInfo());\n }",
"public void addJoin(int type) {\n join_set.add(new JoinPart(type));\n }",
"default <Y> FromStream<Y, From<X, Y>> join(SingularAttribute<? super X, Y> attribute, JoinType joinType,\n Function<? super Join<X, Y>, ? extends Expression<Boolean>> on) {\n if (attribute == null)\n throw new IllegalArgumentException(\"null attribute\");\n if (joinType == null)\n throw new IllegalArgumentException(\"null joinType\");\n if (on == null)\n throw new IllegalArgumentException(\"null on\");\n QueryStreamImpl.checkOffsetLimit(this, \"join()\");\n return new FromStreamImpl<>(this.getEntityManager(), new SearchType<>(attribute.getJavaType()),\n (builder, query) -> {\n final From<?, X> from = (From<?, X>)this.configure(builder, query); // cast must be valid...\n final Join<X, Y> join = from.join(attribute, joinType);\n final Expression<Boolean> onPredicate = on.apply(join);\n if (onPredicate != null)\n join.on(onPredicate);\n return join;\n },\n new QueryInfo());\n }",
"default <E> FromStream<E, ListJoin<X, E>> join(ListAttribute<? super X, E> attribute, JoinType joinType,\n Function<? super ListJoin<X, E>, ? extends Expression<Boolean>> on) {\n if (attribute == null)\n throw new IllegalArgumentException(\"null attribute\");\n if (joinType == null)\n throw new IllegalArgumentException(\"null joinType\");\n if (on == null)\n throw new IllegalArgumentException(\"null on\");\n QueryStreamImpl.checkOffsetLimit(this, \"join()\");\n return new FromStreamImpl<>(this.getEntityManager(), new SearchType<>(attribute.getElementType().getJavaType()),\n (builder, query) -> {\n final From<?, X> from = (From<?, X>)this.configure(builder, query); // cast must be valid...\n final ListJoin<X, E> join = from.join(attribute, joinType);\n final Expression<Boolean> onPredicate = on.apply(join);\n if (onPredicate != null)\n join.on(onPredicate);\n return join;\n },\n new QueryInfo());\n }",
"public void setJoinType(String joinType)\r\n {\r\n \tthis.joinType = joinType;\r\n }",
"default <E> FromStream<E, CollectionJoin<X, E>> join(CollectionAttribute<? super X, E> attribute, JoinType joinType,\n Function<? super CollectionJoin<X, E>, ? extends Expression<Boolean>> on) {\n if (attribute == null)\n throw new IllegalArgumentException(\"null attribute\");\n if (joinType == null)\n throw new IllegalArgumentException(\"null joinType\");\n if (on == null)\n throw new IllegalArgumentException(\"null on\");\n QueryStreamImpl.checkOffsetLimit(this, \"join()\");\n return new FromStreamImpl<>(this.getEntityManager(), new SearchType<>(attribute.getElementType().getJavaType()),\n (builder, query) -> {\n final From<?, X> from = (From<?, X>)this.configure(builder, query); // cast must be valid...\n final CollectionJoin<X, E> join = from.join(attribute, joinType);\n final Expression<Boolean> onPredicate = on.apply(join);\n if (onPredicate != null)\n join.on(onPredicate);\n return join;\n },\n new QueryInfo());\n }",
"@VisibleForTesting\n protected void appendJoinOnKeyOperation(JoinStage left,\n JoinStage right,\n Map<String, JoinKey> stageNameToJoinKeyMap,\n boolean joinOnNullKeys) {\n // Append Join Statement for these 2 stages\n appendJoinStatement(left, right);\n\n String leftAlias = getTableAlias(left.getStageName());\n String rightAlias = getTableAlias(right.getStageName());\n\n JoinKey leftKey = stageNameToJoinKeyMap.get(left.getStageName());\n JoinKey rightKey = stageNameToJoinKeyMap.get(right.getStageName());\n\n // Append Join on key conditions\n appendJoinOnKeyClause(leftAlias, leftKey, rightAlias, rightKey, joinOnNullKeys);\n }",
"private void appendJoinStatement(JoinStage left,\n JoinStage right) {\n String joinType;\n\n if (left.isRequired() && right.isRequired()) {\n joinType = \"INNER\";\n } else if (left.isRequired() && !right.isRequired()) {\n joinType = \"LEFT OUTER\";\n } else if (!left.isRequired() && right.isRequired()) {\n joinType = \"RIGHT OUTER\";\n } else {\n joinType = \"FULL OUTER\";\n }\n\n // ... <join_type> JOIN <right_table> ON ...\n builder.append(joinType);\n builder.append(JOIN);\n appendFullTableNameAndAlias(right.getStageName());\n builder.append(ON);\n }",
"Join createJoin();",
"public boolean isJoin()\r\n { return type == JOIN; }",
"public void setDrawingJoin(JOIN join);",
"JoinCondition createJoinCondition();",
"public void addPreviousJoin(int type, Expression on_expression) {\n join_set.add(join_set.size() - 1, new JoinPart(type, on_expression));\n }",
"public void setJoinCondition(org.cagrid.data.dcql.JoinCondition joinCondition) {\r\n this.joinCondition = joinCondition;\r\n }",
"JoinConditionLink createJoinConditionLink();",
"public com.vitessedata.llql.llql_proto.LLQLQuery.JoinType getJoinType() {\n return joinType_;\n }",
"public com.vitessedata.llql.llql_proto.LLQLQuery.JoinType getJoinType() {\n return joinType_;\n }",
"com.vitessedata.llql.llql_proto.LLQLQuery.JoinType getJoinType();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form menuFornecedorNovoView | public menuFornecedorView() {
initComponents();
botoes(true,true,false,true,false,false);
campos(false,true,false,false,false,false);
} | [
"@Listen(\"onClick=#btnNuevo\")\n\tpublic void nuevo(){\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"Persona\", null);\n\t\tparams.put(\"VentanaPadre\", this);\n\t\tWindow ventanaCargar = (Window) Executions.createComponents(\"/mvc/personaEditar.zul\", winListaPersonas, params);\n\t\tventanaCargar.doModal();\n\t}",
"private MenuItemPrincipal crearMenuItem(ObjetoBase objeto) {\r\n String label = \"\";\r\n MenuItemPrincipal lNuevoItem = new MenuItemPrincipal();\r\n\r\n if (objeto instanceof SegElemento) {\r\n label = ((SegElemento) objeto).getDscNombre();\r\n lNuevoItem.setId_menu(((SegElemento) objeto).getIdElemento());\r\n lNuevoItem.setRegla_navegacion(((SegElemento) objeto).getRegla_navegacion());\r\n }\r\n\r\n lNuevoItem.setValue(label); //Coloco la etiqueta o valor mostrado por el item\r\n lNuevoItem.setId(\"_\" + lNuevoItem.getId_menu()); //setea el id con un _ antes del identificador por reglas de faces\r\n /*--------------------------------------------------------------------*/\r\n// lNuevoItem.setActionListener(FacesContext.getCurrentInstance().getApplication().createMethodBinding(\"#{vistaNavegacion.navegar}\", new Class[]{ActionEvent.class}));\r\n /*--------------------------------------------------------------------*/\r\n ActionListener[] listeners = lNuevoItem.getActionListeners();\r\n for (ActionListener listener : listeners) {\r\n lNuevoItem.removeActionListener(listener);\r\n }\r\n lNuevoItem.addActionListener(new MethodExpressionActionListener(FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createMethodExpression(FacesContext.getCurrentInstance().getELContext(), \"#{vistaNavegacion.navegar}\", null, new Class[]{ActionEvent.class})));\r\n /*--------------------------------------------------------------------*/\r\n return lNuevoItem;\r\n }",
"public Menu createViewMenu();",
"public void muestraVistaMenuOpciones() {\n FXMLLoader loader = new FXMLLoader();\r\n URL location = GestorVictorCarlosIvan.class.getResource(\"../view/VistaMenuOpciones.fxml\");\r\n loader.setLocation(location);\r\n try {\r\n layoutPrincipal = loader.load();\r\n } catch (IOException ex) {\r\n Logger.getLogger(GestorVictorCarlosIvan.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n //Cargo y muestro la escena que contiene ese layout principal\r\n Scene escena = new Scene(layoutPrincipal);\r\n escenarioPrincipal.setScene(escena);\r\n escenarioPrincipal.show();\r\n\r\n }",
"private void ejecutarMenuCrear(){\r\n// JMenuItem iterador = ventana_principal.getCrear();\r\n JButtonRadius iterador = view.getBtnCreate();\r\n iterador.addMouseListener(new MouseListener() {\r\n @Override\r\n public void mouseClicked(MouseEvent e) {} \r\n @Override\r\n public void mousePressed(MouseEvent e) {\r\n if(estaActivaCrearClientes){\r\n JFIngresoDeClientes.seleccion = 0; \r\n vistaIngresarCliente();\r\n guardarCliente(ingreso);\r\n cerrarVentanaIngreso(ingreso);\r\n estaActivaCrearClientes = false;\r\n }\r\n else{\r\n JOptionPane.showMessageDialog(null, \"La ventana se encuentra\"\r\n + \" activa\", \"Mensaje informativo\", JOptionPane.INFORMATION_MESSAGE);\r\n ingreso.setAlwaysOnTop(true);\r\n }\r\n }\r\n @Override\r\n public void mouseReleased(MouseEvent e) { }\r\n @Override\r\n public void mouseEntered(MouseEvent e) {}\r\n @Override\r\n public void mouseExited(MouseEvent e) {}\r\n } );\r\n }",
"public menuUsuario() {\n initComponents();\n }",
"private JMenuItem getJMenuItemCrearProforma() {\r\n\t\tif (jMenuItemCrearProforma == null) {\r\n\t\t\tjMenuItemCrearProforma = new JMenuItem();\r\n\t\t\tjMenuItemCrearProforma.setText(\"Crear Proforma\");\r\n\t\t\tjMenuItemCrearProforma\r\n\t\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\t\tproformaVentana proformaVentanaW = new proformaVentana();\r\n\t\t\t\t\t\t\tproformaVentanaW.getPreferredSize();\r\n\t\t\t\t\t\t\tjDesktopPane.add(proformaVentanaW);\r\n\t\t\t\t\t\t\tproformaVentanaW.setVisible(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t}\r\n\t\treturn jMenuItemCrearProforma;\r\n\t}",
"private JMenuItem getJMenuItmCrearRecboVentana() {\r\n\t\tif (jMenuItmCrearRecboVentana == null) {\r\n\t\t\tjMenuItmCrearRecboVentana = new JMenuItem();\r\n\t\t\tjMenuItmCrearRecboVentana.setText(\"Crear Recibo de Venta\");\r\n\t\t\tjMenuItmCrearRecboVentana.setAccelerator(javax.swing.KeyStroke\r\n\t\t\t\t\t.getKeyStroke(java.awt.event.KeyEvent.VK_R,\r\n\t\t\t\t\t\t\tjava.awt.event.InputEvent.ALT_MASK\r\n\t\t\t\t\t\t\t\t\t| java.awt.event.InputEvent.CTRL_MASK));\r\n\t\t\tjMenuItmCrearRecboVentana\r\n\t\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\t\treciboVentana reciboVentanaW = new reciboVentana(\r\n\t\t\t\t\t\t\t\t\t\"\", false, \"\", false, userName,\r\n\t\t\t\t\t\t\t\t\tjDesktopPane, new Float(0));\r\n\t\t\t\t\t\t\treciboVentanaW.getPreferredSize();\r\n\t\t\t\t\t\t\tjDesktopPane.add(reciboVentanaW);\r\n\t\t\t\t\t\t\treciboVentanaW.setVisible(true);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t}\r\n\t\treturn jMenuItmCrearRecboVentana;\r\n\t}",
"public NovoPedidoForm() {\n initComponents();\n lbErro.setVisible(false);\n }",
"public CrearPedidos() {\n initComponents();\n }",
"public menuPrincipalView() {\n initComponents();\n }",
"public FrmNuevoProducto() {\n initComponents();\n llenaCategorias();\n }",
"public NewContactView_(List<Contacto> contactos ) {\n this.contactos = contactos;\n initComponents();\n }",
"public void createItem(View v){\n Intent intent = new Intent(this, PantryItemForm.class);\n startActivityForResult(intent, FORM_CREATE_CODE);\n }",
"public void ajouterNouveauMenu(int idLigneprecedente, Menu nouveauMenu);",
"public MenuCadastro() {\n initComponents();\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Empregados m1= new Menu_Empregados();\r\n \r\n }",
"public VistaMenu() {\n initComponents();\n almacen = new AlmacenaFiltro();\n almacen.setMenu(this);\n crearFiltro = new VistaCrearFiltro();\n crearFiltro.setMenu(this);\n editarFiltro = new VistaEditarFiltro();\n editarFiltro.setMenu(this);\n }",
"public MenuTambahKuotaGld() {\n initComponents();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the JSON file as compressed GZip file | public static void writeToJsonGzFile(Object jsonObj, Path filePath) throws JsonGenerationException, JsonMappingException, IOException {
GZIPOutputStream gzipOS = new GZIPOutputStream(Files.newOutputStream(filePath));
WritableByteChannel out = Channels.newChannel(gzipOS);
ObjectMapper mapper = new ObjectMapper();
byte[] jsonOut = mapper.writeValueAsBytes(jsonObj);
out.write(ByteBuffer.wrap(jsonOut));
out.close();
} | [
"private ByteOutputArray generateGzipJSON(UserInfo ui, StudyInfo si, DataSource ds, Iterator iter, boolean segmentData) {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n boolean additionalData = false;\n try {\n GZIPOutputStream gzip = new GZIPOutputStream(bos);\n OutputStreamWriter osw = new OutputStreamWriter(gzip, StandardCharsets.UTF_8);\n JsonWriter writer = new JsonWriter(osw);\n writer.setIndent(\" \");\n createJSONHeader(writer, ds, ui, si);\n additionalData = createJSONDataRepresentation(writer, iter, segmentData);\n createJSONFooter(writer);\n writer.close();\n osw.close();\n gzip.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return new ByteOutputArray(bos.toByteArray(), additionalData);\n }",
"private void writeFile() {\n FileOutputStream outputStream = null;\n try {\n outputStream = openFileOutput(filename, Context.MODE_PRIVATE);\n\n String json = gson.toJson(cats);\n byte[] bytes = json.getBytes();\n outputStream.write(bytes);\n\n outputStream.flush();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n outputStream.close();\n } catch (Exception ignored) {\n }\n }\n }",
"public static void createJsonFile(JsonObject json) throws IOException {\n\r\n FileWriter file = new FileWriter(\"outputfile\", false);\r\n try {\r\n file.write(Jsoner.prettyPrint(json.toJson(),2));\r\n file.flush();\r\n } catch (IOException e) {\r\n out.println(\"Error \" + e);\r\n }\r\n }",
"private void gzipFile(File file) throws IOException\n {\n InputStream input = null;\n GZIPOutputStream gzipOutput = null;\n try\n {\n input = new BufferedInputStream(new FileInputStream(file));\n\n String zippedPath = file.getAbsolutePath() + \".gz\";\n gzipOutput = new GZIPOutputStream(new BufferedOutputStream(new FileOutputStream(zippedPath)));\n\n int value = input.read();\n while (value >= 0)\n {\n gzipOutput.write(value);\n value = input.read();\n }\n gzipOutput.flush();\n gzipOutput.close();\n if (replaceOriginals)\n {\n file.delete();\n }\n }\n finally\n {\n if (input != null)\n {\n input.close();\n }\n if (gzipOutput != null)\n {\n gzipOutput.close();\n }\n }\n }",
"private void zip() throws IOException {\r\n\t\tif (bufferIndex == 0)\r\n\t\t\treturn;\r\n\r\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n\t\tDataOutputStream gzip = new DataOutputStream(new GZIPOutputStream(baos));\r\n\t\tgzip.writeInt(bufferIndex);\r\n\t\tgzip.write(buffer, 0, bufferIndex);\r\n\t\tgzip.flush();\r\n\t\tgzip.close();\r\n\r\n\t\tbyte[] compressedData = baos.toByteArray();\r\n\t\toutput.writeInt(compressedData.length);\r\n\t\toutput.write(compressedData);\r\n\t\tbufferIndex = 0;\r\n\t}",
"public void compressWrite() throws Exception{\n byte[] data = ZLibUtils.compress(value.getBytes());\n FileOutputStream fos = new FileOutputStream(path + File.separator + key);\n fos.write(data);\n fos.close();\n }",
"public void backupJSON(String path) throws IOException;",
"public void writeToFile(JSONObject json) throws IOException\n\t{\t\t\t\n\t\tSystem.out.println(json);\n\t\t//Local filepath for the output file\n\t\tFileWriter fw = new FileWriter(\"E:\\\\json3.json\", true);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\t\t\n\t\tbw.write(json.toJSONString());\n\t\tbw.write(\"\\n\");\n\t\tbw.close();\n\t}",
"public void jsonToFile(){\n try{\n FileWriter fw = new FileWriter(filename, true) ; \n BufferedWriter bw = new BufferedWriter(fw);\n try (PrintWriter pw = new PrintWriter(bw)) {\n for(Abstract b : array){\n pw.println(b.toString());\n }\n pw.close();\n }\n \n }catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void serviceGZipCompressed(Connection conn) \n throws IOException {\n conn.getResponse().setContentType(getContnentType().getMimeType());\n conn.getResponse().setHeader(\"Content-Encoding\", \"gzip\");\n conn.getOutputStream().write(gzipContent);\n }",
"public void flushToGZip() throws IOException {\r\n\r\n if (bufferCount > 0) {\r\n writeToGZip(buffer, 0, bufferCount);\r\n bufferCount = 0;\r\n }\r\n }",
"void compression(Serializable data) throws ApplicationException;",
"public void writeJSONDataFile(Integer id) {\n try {\n String filename = getOutputFilename(id);\n JsonWriter writer = new JsonWriter(new OutputStreamWriter(new FileOutputStream(filename + \".json\", false), \"utf-8\"));\n writer.setIndent(\" \");\n createJSONDataFileRepresentation(id, writer);\n writer.close();\n\n } catch (Exception e) {\n System.err.println(\"DataStream ID: \" + id);\n e.printStackTrace();\n }\n }",
"public abstract void writeToJSON(JsonWriter jsonWriter) throws IOException;",
"private void writeCompressedText(File file, byte[] compressedContent) throws IOException\r\n {\r\n ByteArrayInputStream bais = new ByteArrayInputStream(compressedContent);\r\n GZIPInputStream gis = new GZIPInputStream(bais);\r\n BufferedReader input = new BufferedReader(new InputStreamReader(gis));\r\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\r\n String line;\r\n\r\n while ((line = input.readLine()) != null)\r\n {\r\n output.write(line);\r\n output.write('\\n');\r\n }\r\n input.close();\r\n gis.close();\r\n bais.close();\r\n output.close();\r\n }",
"protected void writeJSONToFile(JSONObject json) {\n\n try {\n\n OutputStreamWriter osw = new OutputStreamWriter(m_activity.openFileOutput(\"data.json\", Context.MODE_PRIVATE));\n osw.write(json.toString());\n osw.flush();\n osw.close();\n\n } catch (IOException e) {\n\n Log.e(k_tag, \"Could not write data in JSON form: \" + e.toString());\n }\n }",
"private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}",
"protected void compressGzipFile(File inputFile, File compressedFile) {\n\n FileInputStream fis = null;\n FileOutputStream fos = null;\n GZIPOutputStream gzipOS = null;\n\n\n try {\n fis = new FileInputStream(inputFile);\n\n if (!compressedFile.exists()) {\n compressedFile.createNewFile();\n }\n\n fos = new FileOutputStream(compressedFile);\n gzipOS = new GZIPOutputStream(fos);\n byte[] buffer = new byte[1024];\n int len;\n while ((len = fis.read(buffer)) != -1) {\n gzipOS.write(buffer, 0, len);\n }\n\n } catch (Exception e) {\n LOG.error(String.format(\"Compress file %s into %s failed,\",\n inputFile.getAbsolutePath(), compressedFile.getAbsolutePath()), e);\n } finally {\n try {\n if (gzipOS != null) {\n gzipOS.close();\n }\n if (fos != null) {\n fos.close();\n }\n if (fis != null) {\n fis.close();\n }\n } catch (Exception ce) {\n\n }\n }\n }",
"private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Will guess randomly until it hits something, then continues to guess neighbours while it keeps hitting things. | public int[] randomGuessUntilHit() {
//Figure out whether or not the last guess was a hit
boolean hitLast = this.numHits > this.lastNumHits;
//If this is the first guess or we missed and have no other squares to guess,
//make a new list of neighbours
if (! hitLast && this.neighbours.isEmpty()) {
this.lastGuess = alwaysRandomGuess();
//Otherwise, we need to guess from the list of neighbours
} else {
//Check if the last guess was a hit
if (hitLast) {
//Loop through all of the neighbours to the square we hit and
//add them to the ArrayList
for (int i=-1; i<=1; i++) {
for (int j=-1; j<=1; j++) {
//We only want to check lattice neighbours, not diagonals.
if (Math.abs(i-j) % 2 == 0) {
continue;
}
//Error checking (can't be out of array's bounds)
if (this.lastGuess[0]+i < 0 || this.lastGuess[0]+i >= this.board.getBoardSize()) {
continue;
}
if (this.lastGuess[1]+j < 0 || this.lastGuess[1]+j >= this.board.getBoardSize()) {
continue;
}
//If the arraylist doesn't already have these coordinates
//and it isn't already guessed, add it to the neighbours
if (! this.containsPair(this.neighbours, this.lastGuess[0]+i, this.lastGuess[1]+j) && !this.board.isGuessed(this.lastGuess[0]+i, this.lastGuess[1]+j)) {
this.neighbours.add(new int[] {this.lastGuess[0]+i, this.lastGuess[1]+j});
}
}
}
}
//Randomly pick from the list of neighbours
int guessIndex = this.random.nextInt(this.neighbours.size());
this.lastGuess = this.neighbours.get(guessIndex);
//Remove the pair from the ArrayList because now it will have been
//guessed
this.neighbours.remove(lastGuess);
}
//Update the previous number of hits to be equal to the current amount
this.lastNumHits = this.numHits;
//Return the pair that is generated
return this.lastGuess;
} | [
"public void guess() {\n int[] coords;\n //If the AI is on medium, use the random guesses until something is hit approach\n if (this.difficulty.equalsIgnoreCase(\"medium\")) {\n coords = this.randomGuessUntilHit();\n \n //If the AI is on hard, use the probability distribution strategy\n } else if (this.difficulty.equalsIgnoreCase(\"hard\")) {\n coords = this.probabilityDistributionGuess();\n \n //Otherwise, if the AI is on easy, just guess randomly\n } else {\n coords = this.alwaysRandomGuess();\n }\n \n //Guess the generated coordinates on the board and increase the number\n //hit if the guess is a hit\n if (this.board.guess(coords[0], coords[1])) {\n this.numHits++;\n }\n }",
"private void simulateGameOver() {\n\t\tfor (int i = 0; i < NBR_OF_PAIRS; i++) {\n\t\t\tcontroller.correctGuess();\n\t\t}\n\t}",
"@Override\r\n\tpublic void generateMaze(Maze maze) {\r\n\n\t\tList<Cell> unvisitedCells = new ArrayList<Cell>();\n\t\t//contains the integer values for NORTH, EAST, SOUTH and WEST\n\t\tList<Integer> cellDirections = new ArrayList<Integer>();\n\t\tRandom random = new Random(System.currentTimeMillis());\n\t\tCell targetCell; //the cell that is currently hunting\n\t\t\n\t\t//add all cells to unvisited ArrayList\n\t\tfor (int i = 0; i != maze.sizeR; i++) {\n\t\t\tfor (int j = 0; j != maze.sizeC; j++) {\n\t\t\t\tunvisitedCells.add(maze.map[i][j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//initializes targetCell to random cell in unvisitedCells ArrayList\n\t\ttargetCell = unvisitedCells.get(random.nextInt(unvisitedCells.size()));\n\t\t\n\t\twhile (!unvisitedCells.isEmpty()) {\n\t\t\t\n\t\t\tunvisitedCells.remove(targetCell);\n\t\t\t\n\t\t\t//resets and adds directions to cellDirections\n\t\t\tcellDirections.clear();\n\t\t\tfor (int i = 0; i != 6; i++) {\n\t\t\t\tif (i != 1 && i != 4) {\n\t\t\t\t\tcellDirections.add(new Integer(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//randomise cellDirections so hunt is performed in a random order\n\t\t\tCollections.shuffle(cellDirections);\n\t\t\t\n\t\t\t//check if cell is an unvisited tunnel first\n\t\t\tif (unvisitedCells.contains(targetCell.tunnelTo)) {\n\t\t\t\ttargetCell = targetCell.tunnelTo;\n\t\t\t}\n\t\t\t//otherwise, proceed to hunt\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tboolean deadEnd = true;\n\t\t\t\tint direction;\n\t\t\t\tfor (int i = 0; i != 4; i++) {\n\t\t\t\t\tdirection = cellDirections.get(i).intValue();\n\t\t\t\t\t//check each cell direction one by one that has already previously been randomised\n\t\t\t\t\tif (unvisitedCells.contains(targetCell.neigh[direction])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tdeadEnd = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (direction > 2) {\n\t\t\t\t\t\t\ttargetCell.neigh[direction].wall[direction - 3].present = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttargetCell.neigh[direction].wall[direction + 3].present = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttargetCell.wall[direction].present = false;\n\t\t\t\t\t\ttargetCell = targetCell.neigh[direction];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\t//if deadend, rescan maze for cell next to visited one and break the wall\n\t\t\t\tboolean newCellFound = false;\n\t\t\t\tif (deadEnd) {\n\t\t\t\t\tfor (int i = 0; i != maze.sizeR; i++) {\n\t\t\t\t\t\tfor (int j = 0; j != maze.sizeC; j++) {\n\t\t\t\t\t\t\t//if cell is unvisited and cell above is visited then break wall\n\t\t\t\t\t\t\tif (i != maze.sizeR - 1 && !newCellFound) {\n\t\t\t\t\t\t\t\tif (unvisitedCells.contains(maze.map[i][j]) && !unvisitedCells.contains(maze.map[i + 1][j])) {\n\t\t\t\t\t\t\t\t\ttargetCell = maze.map[i][j];\n\t\t\t\t\t\t\t\t\ttargetCell.wall[2].present = false;\n\t\t\t\t\t\t\t\t\ttargetCell.neigh[2].wall[5].present = false;\n\t\t\t\t\t\t\t\t\tnewCellFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//if cell is unvisited and cell on the right is visited then break wall\n\t\t\t\t\t\t\tif (j != maze.sizeC - 1 && !newCellFound) {\n\t\t\t\t\t\t\t\tif (unvisitedCells.contains(maze.map[i][j]) && !unvisitedCells.contains(maze.map[i][j + 1])) {\n\t\t\t\t\t\t\t\t\ttargetCell = maze.map[i][j];\n\t\t\t\t\t\t\t\t\ttargetCell.wall[0].present = false;\n\t\t\t\t\t\t\t\t\ttargetCell.neigh[0].wall[3].present = false;\n\t\t\t\t\t\t\t\t\tnewCellFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//if cell is unvisited and cell below is visited then break wall\n\t\t\t\t\t\t\tif (i != 0 && !newCellFound) {\n\t\t\t\t\t\t\t\tif (unvisitedCells.contains(maze.map[i][j]) && !unvisitedCells.contains(maze.map[i - 1][j])) {\n\t\t\t\t\t\t\t\t\ttargetCell = maze.map[i][j];\n\t\t\t\t\t\t\t\t\ttargetCell.wall[5].present = false;\n\t\t\t\t\t\t\t\t\ttargetCell.neigh[5].wall[2].present = false;\n\t\t\t\t\t\t\t\t\tnewCellFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//if cell is unvisited and cell on the left is visited then break wall\n\t\t\t\t\t\t\tif (j != 0 && !newCellFound) {\n\t\t\t\t\t\t\t\tif (unvisitedCells.contains(maze.map[i][j]) && !unvisitedCells.contains(maze.map[i][j - 1])) {\n\t\t\t\t\t\t\t\t\ttargetCell = maze.map[i][j];\n\t\t\t\t\t\t\t\t\ttargetCell.wall[3].present = false;\n\t\t\t\t\t\t\t\t\ttargetCell.neigh[3].wall[0].present = false;\n\t\t\t\t\t\t\t\t\tnewCellFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\r\n\t}",
"private int guess( ){\r\n\treturn 0;\r\n }",
"public abstract void nextGuessResult(ResultPegs resultPegs);",
"public List<Node> generateNeighbours(){\n\t\tRandom random = new Random();\n\t\t//x and y are used to give a random position to start looking in the board\n\t\tint x;\n\t\tint y;\n\t\t//Booleans to check if we actually where able to remove or add an egg.\n\t\tboolean remove;\n\t\tboolean add;\n\t\t//The board we modify to create a neighbour\n\t\tint [][] neighbourBoard;\n\t\t//Create neighbours where we add eggs\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tadd=false;\n\t\t\t//Create an identical clone to our board\n\t\t\tneighbourBoard = cloneBoard(this.board);\n\t\t\tx = random.nextInt(width);\n\t\t\ty = random.nextInt(height);\n\t\t\t//If the cell is empty and it doesen't collide with too many other eggs\n\t\t\t//we are allowed to add an egg here\n\t\t\tif(neighbourBoard[y][x]==0 && cellIsAvailable(x, y)){\n\t\t\t\tneighbourBoard[y][x]=1;\n\t\t\t\tadd=true;\n\t\t\t}\n\t\t\t//else we check for the first place we can add an egg\n\t\t\telse{\n\t\t\t\tadd = placeNextPossibleCell(x,y, neighbourBoard);\n\t\t\t}\n\t\t\t//If we managed to add an egg we want to create the neighbor\n\t\t\tif(add){\n\t\t\t\taddNeighbour(new Node(height, width, k, neighbourBoard));\n\t\t\t}\n\t\t}\n\t\t//Create neighbours where we remove eggs\n\t\t//This works in the same way ass add egg\n\t\tfor(int i = 0;i<10 && i<eggs;i++){\n\t\t\tremove = false;\n\t\t\tneighbourBoard = cloneBoard(this.board);\n\t\t\tx = random.nextInt(width);\n\t\t\ty = random.nextInt(height);\n\t\t\tif(neighbourBoard[y][x]==1){\n\t\t\t\tneighbourBoard[y][x]=0;\n\t\t\t\tremove = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tremove = removeNextPossibleCell(x,y, neighbourBoard);\n\t\t\t}\n\t\t\tif(remove){\n\t\t\t\taddNeighbour(new Node(height, width, k, neighbourBoard));\n\t\t\t}\n\t\t}\n\t\t//Create neighbours where we move eggs\n\t\t//This is just a combination of add egg and remove egg\n\t\tfor(int i = 0;i<10 && i<eggs;i++){\n\t\t\tremove = false;\n\t\t\tadd = false;\n\t\t\tneighbourBoard = cloneBoard(this.board);\n\t\t\tx = random.nextInt(width);\n\t\t\ty = random.nextInt(height);\n\t\t\tif(neighbourBoard[y][x]==1){\n\t\t\t\tneighbourBoard[y][x]=0;\n\t\t\t\tremove = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tremove = removeNextPossibleCell(x,y, neighbourBoard);\n\t\t\t}\n\t\t\tx = random.nextInt(width);\n\t\t\ty = random.nextInt(height);\n\t\t\tif(neighbourBoard[y][x]==0 && cellIsAvailable(x, y)){\n\t\t\t\tneighbourBoard[y][x]=1;\n\t\t\t\tadd = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tadd = placeNextPossibleCell(x,y, neighbourBoard);\n\t\t\t}\n\t\t\tif(add && remove){\n\t\t\t\taddNeighbour(new Node(height, width, k, neighbourBoard));\n\t\t\t}\n\t\t}\n\t\treturn this.neighbours;\n\t}",
"public void guess ( ) throws IllegalStateException, ProofGuessException {\n\t\tEnumeration < ProofNode > enumeration = this.proofModel.getRoot ( ).postorderEnumeration ( );\n\t\twhile ( enumeration.hasMoreElements ( ) ) {\n\t\t\tProofNode node = enumeration.nextElement ( );\n\t\t\tif ( !node.isProven ( ) ) {\n\t\t\t\tthis.proofModel.guess ( node );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalStateException ( \"Unable to find next node\" ); //$NON-NLS-1$\n\t}",
"private void guess()\n {\n String guess = Greenfoot.ask(\"What do you guess?\");\n guesses.addGuess();\n if (Integer.parseInt(guess) > random)\n {\n text.setText(\"Lower.\");\n }\n else if (Integer.parseInt(guess) < random)\n {\n text.setText(\"Higher.\");\n }\n else if (Integer.parseInt(guess) == random)\n {\n text.setText(\"You got it!\");\n Greenfoot.stop();\n }\n }",
"@Override\n public String getGuess() throws TimeoutException {\n\n int count = 1;\n\n while (this.answers.size() - count >0){\n if(this.answers.get(answers.size()-count).equals(\"yes\")) {\n\n return excuteQuery(this.getQuery(\"Guess\", \"Question=\" + \"'\" + this.questions.get(questions.size() -count) + \"'\"))\n .replaceAll(\"</br>\", \"\\n\");\n }\n count++;\n }\n\n return \"no result found\\n\";\n\n\n }",
"private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }",
"public void guessing(){\n do{\n for(String key: map.keySet()){\n if(map.get(key).length() == 1) gimme(key);\n }\n findSingleValues();\n }while(singles);\n }",
"@Override\n public KPMPSolution randomNextNeighbour() {\n random = new Random(Double.doubleToLongBits(Math.random()));\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n int randomIndex = random.nextInt(edgePartition.size());\n edge = edgePartition.get(randomIndex);\n originalPageIndex = edge.page;\n do {\n newPageIndex = random.nextInt(neighbourSolution.getNumberOfPages());\n } while (newPageIndex == originalPageIndex);\n edgePartition.get(randomIndex).page = newPageIndex;\n return neighbourSolution;\n }",
"private void makeGuess(){\r\n\tint g = guess();\r\n\tSystem.out.println(\"guess # \" + _numGuesses + \" : \" + g);\r\n }",
"public static boolean forwardCheckingRandomHeuristic( Node curr ){\r\n numNodes++;\r\n // In this case, we have completed the cycle, and we now need to look for any '_' by ourselves\r\n char [][] originalBoard = copyBoard(board);\r\n boolean toReturn = false;\r\n if( curr == blockArr[blockArr.length-1] && !isGoalBoard() ){\r\n //fillInBlanks();\r\n board = MyBackTrack.randomBackTracking( board, new Node(1, 1, null, null), blockArr);\r\n }\r\n \r\n if( isGoalBoard() ){\r\n solution = copyBoard(board);\r\n return true;\r\n }\r\n else if( curr != null && solution == null ){\r\n makeAllPossibleChildrenNodes( curr ); // make all combinations of the curr block's bulbs\r\n Node next = randomlyMakeNextMove( curr );\r\n if( curr.getCombination().size() == 0 && validateBlocks() )\r\n forwardCheckingRandomHeuristic( next );\r\n else if(curr!= null) {\r\n for( int i = 0; i < curr.getCombination().size(); i++ ) {\r\n board = copyBoard(originalBoard);\r\n boolean boardStatus1 = placeBulb( curr.getCombination().get(i) ); // place bulbs for the ith combination around the current block.\r\n boolean boardStatus2 = validateBlocks();\r\n if( boardStatus1 && boardStatus2 ){\r\n toReturn = forwardCheckingRandomHeuristic( next );\r\n }\r\n else if( i == curr.getCombination().size()-1 && boardStatus2 )\r\n toReturn = forwardCheckingRandomHeuristic( next );\r\n else {\r\n placeBlank( curr.getCombination().get(i) );\r\n }\r\n board = copyBoard(originalBoard);\r\n }\r\n }\r\n }\r\n board = copyBoard(originalBoard);;\r\n return toReturn;\r\n }",
"public void MakeMaze() {\n\n\t\t// ints for random x , y and direction\n\t\tint rx = 0;\n\t\tint ry = 0;\n\t\tint rd = 0;\n\t\tgenMaze = true;\n\n\t\t// c used to count tries, if there are too many the main loop jumps to\n\t\t// the end of the function\n\t\tint c = 0;\n\n\t\t// fill the map with walls\n\t\tfor (int ix = 0; ix < max_x; ix++) {\n\t\t\tfor (int iy = 0; iy < max_y; iy++) {\n\t\t\t\tmap[ix][iy] = 1;\n\t\t\t}\n\t\t}\n\n\t\t// fill the cell array with unvisited cells\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\tcell[ix][iy] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// choose a \"random\" x,y pair. centre of screen used here instead\n\t\trx = maxCells_x / 2;\n\t\try = maxCells_y / 2;\n\n\t\t// mark cell visited\n\t\tcell[rx][ry] = 1;\n\n\t\t// count cells\n\t\tcountCells();\n\n\t\t// start main generator loop\n\t\twhile (visitedCells < totalCells) {\n\n\t\t\tc++;\n\n\t\t\tif (c > magicNumber) {\n\t\t\t\tgenMaze = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\trd = rand.nextInt(4);\n\n\t\t\t// dig tunnels\n\n\t\t\t// up\n\n\t\t\tif (genMaze) {\n\t\t\t\tif (rd == 0) { // up\n\t\t\t\t\tif (inRange(rx * CELL_RAD, ry * CELL_RAD - 1) == 1\n\t\t\t\t\t\t\t&& (cell[rx][ry - 1]) == 0 || rand.nextInt(7) == 7) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, ry * CELL_RAD, rx * CELL_RAD,\n\t\t\t\t\t\t\t\t(ry - 1) * CELL_RAD);\n\t\t\t\t\t\try--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (rd == 1) { // down\n\t\t\t\t\tif (inRange(rx + CELL_RAD, ry * CELL_RAD + 1) == 1\n\t\t\t\t\t\t\t&& (cell[rx][ry + 1] == 0 || rand.nextInt(7) == 7)) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, (ry) * CELL_RAD, rx * CELL_RAD,\n\t\t\t\t\t\t\t\t(ry + 1) * CELL_RAD);\n\t\t\t\t\t\try++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (rd == 2) { // left\n\t\t\t\t\tif (inRange((rx * CELL_RAD) - 1, ry * CELL_RAD) == 1\n\t\t\t\t\t\t\t&& (cell[rx - 1][ry] == 0 || rand.nextInt(7) == 7)) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, ry * CELL_RAD,\n\t\t\t\t\t\t\t\t(rx - 1) * CELL_RAD, ry * CELL_RAD);\n\t\t\t\t\t\trx--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else if (rd == 3) { // right\n\t\t\t\t\tif (inRange(rx * CELL_RAD + 1, ry * CELL_RAD) == 1\n\t\t\t\t\t\t\t&& (cell[rx + 1][ry]) == 0 || rand.nextInt(7) == 7) {\n\t\t\t\t\t\tclink((rx) * CELL_RAD, ry * CELL_RAD, (rx + 1)\n\t\t\t\t\t\t\t\t* CELL_RAD, ry * CELL_RAD);\n\t\t\t\t\t\trx++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// mark the cell as visited\n\n\t\t\t\tcell[rx][ry] = 1;\n\n\t\t\t\t// place a \"floor\" tile on the map where the maze cell should be\n\t\t\t\tmap[rx * CELL_RAD][ry * CELL_RAD] = 0;\n\n\t\t\t\t// count the cells to establish how many have been visited\n\t\t\t\tcountCells();\n\t\t\t}\n\t\t}\n\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tmap[ix * CELL_RAD][iy * CELL_RAD] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void randomize() {\n // randomize the position/number of alive and dead cells by looping through each cell\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n // get a random number(between 0 and 1)\n double randomNum = Math.random();\n // cell is live if the random number is greater than 0.7\n // (0.7 gives a greater chance of a dead cell so that the grid isn't too full)\n if (randomNum > 0.7) {\n game.grid[i][j] = true;\n } else {\n game.grid[i][j] = false;\n }\n }\n }\n // repaint so that the cells show up regardless of if the program has started or not\n repaint();\n }",
"public Cell hunt() {\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n if (cells[i][j].isVisited() == false && getNeighbors(cells[i][j], true).length >= 1) {\n //mark the found cell as visited\n cells[i][j].visit();\n //find all visited neighbors\n Cell[] visitedNeighbors = getNeighbors(cells[i][j], true);\n //connect this cell and one of the visited neighbors (choose randomly)\n cells[i][j].carveThrough(visitedNeighbors[numberGenerator.nextInt(visitedNeighbors.length)]);\n return cells[i][j];\n }\n }\n }\n return null;\n }",
"public Node goClimbingRandomly() {\n\t\tNode workingNode = hillClimber.getInitialState();\n\t\tthis.initialState = workingNode;\n\t\tint heuristic = workingNode.getHeuristic();\n\t\t\t\t\n\t\twhile(heuristic!=0){\n\t\t\tNode baseClimber = hillClimber.goClimbing();\n\t\t\theuristic = baseClimber.getHeuristic();\n\t\t\tif(heuristic!=0){ \n\t\t\t\thillClimber = new HillClimbing();\n\t\t\t}else{\n\t\t\t\tworkingNode = baseClimber;\n\t\t\t}\n\t\t}\n\t\treturn workingNode;\n\t}",
"private MazeCell getRandomNeighbor(Maze maze, MazeCell curCell) {\n Iterator<MazeCell> it = maze.getNeighbors(curCell);\n int pickNum = randSeq.nextInt(curCell.getMaxNumWalls()\n - curCell.getNumWalls());\n MazeCell nextCell = null;\n\n // Find the randomly picked neighbor in the neighbors list. pickNum is never\n // more than the number of neighbors, so we do not need to check\n // it.hasNext().\n for (int i = 0; i <= pickNum; i++) {\n nextCell = (MazeCell) it.next();\n }\n\n return nextCell;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the historical timeseries db id. | public void setHistoricalTimeSeriesId(Long historicalTimeSeriesId) {
this._historicalTimeSeriesId = historicalTimeSeriesId;
} | [
"public Long getHistoricalTimeSeriesId() {\n return _historicalTimeSeriesId;\n }",
"@Override\n\tpublic void setId(int id) {\n\t\t_dmHistoryMaritime.setId(id);\n\t}",
"public void setIdGenerator(HistoryServiceIdGenerator idGenerator);",
"public void setDBID(int dbid)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DBID$38, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DBID$38);\n }\n target.setIntValue(dbid);\n }\n }",
"public void xsetDBID(org.apache.xmlbeans.XmlInt dbid)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(DBID$38, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(DBID$38);\n }\n target.set(dbid);\n }\n }",
"public void setHistoryId(long historyId)\r\n\t{\r\n\t\tthis.historyId = historyId;\r\n\t}",
"protected void setCurrentDatasetId(Integer datasetId){\n System.out.println(\"Current dataset is:\"+datasetId);\n this.currentDatasetId = datasetId;\n }",
"public long getHistoryId()\r\n\t{\r\n\t\treturn historyId;\r\n\t}",
"public void setId(int id) {\n\t\t_dmHistoryMaritime.setId(id);\n\t}",
"public void setId(int driverDBId);",
"public void setDbid(Long dbid) {\n this.dbid = dbid;\n }",
"public void setProcessHistoryID(java.lang.Long value) {\n __getInternalInterface().setFieldValue(PROCESSHISTORYID_PROP.get(), value);\n }",
"@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_upstreamChannelHistory.setPrimaryKey(primaryKey);\n\t}",
"public void setProcessHistoryID(java.lang.Long value) {\n __getInternalInterface().setFieldValue(PROCESSHISTORYID_PROP.get(), value);\n }",
"@Override\n\tpublic void setPrimaryKey(int primaryKey) {\n\t\t_dmHistoryMaritime.setPrimaryKey(primaryKey);\n\t}",
"void setLocalId(long id);",
"public void setHistoryForObject(AppDbObject obj) {\n setHistoryList(obj.getHistory().selectByObjectId(obj.getId()));\n }",
"public String getHistoryId() {\r\n return historyId;\r\n }",
"public void setDataId(Long dataId) {\r\n this.dataId = dataId;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ID of the disk type to return information about. To get the disk type ID use a [DiskTypeService.List] request. string disk_type_id = 1 [(.yandex.cloud.required) = true]; | public com.google.protobuf.ByteString
getDiskTypeIdBytes() {
java.lang.Object ref = diskTypeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
diskTypeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
} | [
"public java.lang.String getDiskTypeId() {\n java.lang.Object ref = diskTypeId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n diskTypeId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getDiskTypeId();",
"@java.lang.Override\n public java.lang.String getDiskTypeId() {\n java.lang.Object ref = diskTypeId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n diskTypeId_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getDiskTypeIdBytes() {\n java.lang.Object ref = diskTypeId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n diskTypeId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getDiskType() {\n return this.DiskType;\n }",
"java.lang.String getDiskType();",
"public void setDiskType(String DiskType) {\n this.DiskType = DiskType;\n }",
"public Builder setDiskType(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n diskType_ = value;\n onChanged();\n return this;\n }",
"public String diskId() {\n return this.diskId;\n }",
"java.lang.String getBootDiskType();",
"com.google.protobuf.ByteString getBootDiskTypeBytes();",
"public void setDiskControllerType(java.lang.String diskControllerType) {\r\n this.diskControllerType = diskControllerType;\r\n }",
"public java.lang.String getDiskControllerType() {\r\n return diskControllerType;\r\n }",
"public Integer getDiskId() {\n\t\treturn connection.getDiskId();\n\t}",
"public String diskEncryptionSetId() {\n return this.diskEncryptionSetId;\n }",
"public String diskName() {\n return this.diskName;\n }",
"@Override\n public String getDeviceTypeId() {\n \n return this.strTypId;\n }",
"@java.lang.Override\n public java.util.List<yandex.cloud.api.compute.v1.DiskTypeOuterClass.DiskType> getDiskTypesList() {\n return diskTypes_;\n }",
"public String getVolumeDiskId() {\n return this.volumeDiskId;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether the current entity is a cache entity (CACHE entities are generally constructed through create()) | public boolean isCacheEntity() {
return request == null;
} | [
"boolean getCacheable();",
"public boolean isCached() { return cached; }",
"Boolean getIsEntity();",
"private boolean isAEntity(Class type) {\n boolean result = false;\n if (type.isAnnotationPresent(Entity.class)) {\n return true;\n }\n log.debug(\"[isAEntity] class \" + type + \" result \" + result);\n return result;\n }",
"private static boolean assetIsInPersistentCache(Asset asset) {\n \t\treturn assetIsInPersistentCache(asset.getId());\n \t}",
"boolean inCache();",
"public boolean isCacheable() {\n return false;\n }",
"public boolean isStoredInCache() {\r\n return lockValueStored == IN_CACHE;\r\n }",
"boolean isCacheInitialized();",
"boolean canBeCached() {\n return (!noCache);\n }",
"public boolean isUseCache() {\n return mUseCache;\n }",
"public boolean getCacheable() {\r\n return cacheable;\r\n }",
"@Override\n \tpublic boolean isEntryFor(Object entity) {\n \t\treturn entityEntries.containsKey(entity);\n \t}",
"boolean isCachingEnabled();",
"public boolean isCacheImageMetadata() {\n\t\treturn cacheImageMetadata;\n\t}",
"public boolean isCatalogEntity() {\n return getCatalogId() != null;\n }",
"boolean isEntity(Object o);",
"public boolean isCacheInvalidationRequired() {\n\t\treturn hasFormulaProperties() ||\n\t\t\t\t( !isVersioned() && ( entityMetamodel.isDynamicUpdate() || getTableSpan() > 1 ) );\n\t}",
"private boolean isCachePutEnabled(EntityPersister persister, SessionImplementor session) {\n\t\treturn false;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the rendering mode. | public void setRenderingMode(PSRenderingMode renderingMode) {
this.renderingMode = renderingMode;
} | [
"public void setPaintMode()\r\n\t{\r\n\t\t// System.out.println(\"setPaintMode\");\r\n\t}",
"void setDisplayMode(DisplayMode mode);",
"public native void setPaintMode();",
"public void setPaintMode()\n {\n if (waitForReady())\n return;\n _wnd.getOffG2D().setPaintMode();\n }",
"public abstract void setDisplayMode(NSUInteger displayMode);",
"void setMode(Mode mode);",
"public TextRenderModeEnum getRenderMode(\n )\n {return renderMode;}",
"public void setMode(int mode);",
"public void toggleRenderMode() {\r\n\t\tisWireframe = !isWireframe;\r\n\t}",
"void setMode(int mode);",
"ScreenRender renderMode(String outputType);",
"public void setDisplayMode(String displayMode) {\n\t\tthis.displayMode = displayMode;\n\t}",
"public PSRenderingMode getRenderingMode() {\n return this.renderingMode;\n }",
"public void setDisplayMode(final int mode) {\n if (mode != this.displayMode) {\n this.displayMode = mode;\n this.gridPanel.setLayout(new GridLayout(0,\n this.displayMode == CONT_FACING ? 2 : 1));\n reload();\n }\n }",
"public void mode() {\n if (mazeview.getMode() == MazeView.SELECT_MODE) {\n mazeview.setMode(MazeView.PENCIL_MODE);\n modeButton.setGraphic(cursorImage);\n modeButton.setTooltip(cursorTooltip);\n } else {\n mazeview.setMode(MazeView.SELECT_MODE);\n modeButton.setGraphic(pencilImage);\n modeButton.setTooltip(pencilTooltip);\n }\n }",
"public void setCurrentMode(Component.M mode) {\n this.currentMode = mode;\n }",
"public void setRenderingMode(final JsfRenderingMode jsfRenderingMode) {\n this.jsfRenderingMode = jsfRenderingMode;\n }",
"public void setRenderingStyle(int style) {\n\t\tif (style != WIREFRAME_RENDERING && style != PATCH_RENDERING)\n\t\t\treturn;\n\t\tselectRenderingCommands.setSelectedIndex(style);\n\t\tif (dragAsSurfaceToggle != null)\n\t\t\tdragAsSurfaceToggle.setEnabled(style == PATCH_RENDERING);\n\t\tif (style == renderingStyle)\n\t\t\treturn;\n\t\trenderingStyle = style;\n\t\tforceRedraw();\n\t}",
"@Override\n public void setMode(RunMode mode) {\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a JSON streamer that will write to the given output, optionally with beautification of the generated JSON. | public JsonOutput(OutputStream out, boolean beautify)
{
this(new OutputStreamWriter(out, StandardCharsets.UTF_8), beautify);
} | [
"public abstract JsonWriter newWriter(OutputStream out);",
"public JsonOutput(OutputStream out)\n\t{\n\t\tthis(out, false);\n\t}",
"public interface JsonOutput {\n\n // basic json tools.\n void flush() throws IOException;\n void writeStartArray() throws IOException;\n void writeEndArray() throws IOException;\n void writeStartObject() throws IOException;\n void writeEndObject() throws IOException;\n void writeUntypedNull() throws IOException;\n void writeFieldName(String name) throws IOException;\n\n\n // literals\n void writeDecimal(BigDecimal value) throws IOException;\n void writeTinyInt(byte value) throws IOException;\n void writeSmallInt(short value) throws IOException;\n void writeInt(int value) throws IOException;\n void writeBigInt(long value) throws IOException;\n void writeFloat(float value) throws IOException;\n void writeDouble(double value) throws IOException;\n void writeVarChar(String value) throws IOException;\n void writeVar16Char(String value) throws IOException;\n void writeBinary(byte[] value) throws IOException;\n void writeBoolean(boolean value) throws IOException;\n void writeDate(LocalDateTime value) throws IOException;\n void writeTime(LocalDateTime value) throws IOException;\n void writeTimestamp(LocalDateTime value) throws IOException;\n void writeInterval(Period value) throws IOException;\n void writeDecimalNull() throws IOException;\n void writeTinyIntNull() throws IOException;\n void writeSmallIntNull() throws IOException;\n void writeIntNull() throws IOException;\n void writeBigIntNull() throws IOException;\n void writeFloatNull() throws IOException;\n void writeDoubleNull() throws IOException;\n void writeVarcharNull() throws IOException;\n void writeVar16charNull() throws IOException;\n void writeBinaryNull() throws IOException;\n void writeBooleanNull() throws IOException;\n void writeDateNull() throws IOException;\n void writeTimeNull() throws IOException;\n void writeTimestampNull() throws IOException;\n void writeIntervalNull() throws IOException;\n\n\n // scalars reader\n void writeDecimal(FieldReader reader) throws IOException;\n void writeTinyInt(FieldReader reader) throws IOException;\n void writeSmallInt(FieldReader reader) throws IOException;\n void writeInt(FieldReader reader) throws IOException;\n void writeBigInt(FieldReader reader) throws IOException;\n void writeFloat(FieldReader reader) throws IOException;\n void writeDouble(FieldReader reader) throws IOException;\n void writeVarChar(FieldReader reader) throws IOException;\n void writeVar16Char(FieldReader reader) throws IOException;\n void writeBinary(FieldReader reader) throws IOException;\n void writeBoolean(FieldReader reader) throws IOException;\n void writeDate(FieldReader reader) throws IOException;\n void writeTime(FieldReader reader) throws IOException;\n void writeTimestamp(FieldReader reader) throws IOException;\n void writeInterval(FieldReader reader) throws IOException;\n void writeLargeVarChar(FieldReader reader) throws IOException;\n void writeLargeVarBinary(FieldReader reader) throws IOException;\n}",
"public FlakeyTestcaseJsonSerializer(final Appendable output) {\n this(output, false);\n }",
"public static JsonGenerator createJsonGenerator(OutputStream outputStream) throws IOException {\n JsonFactory jsonFactory = getFactory();\n JsonGenerator jsonGenerator = jsonFactory.createJsonGenerator(outputStream, JsonEncoding.UTF8);\n updateGenerator(jsonFactory, jsonGenerator);\n return jsonGenerator;\n }",
"JsonEscapingFilterWriter(Writer out) {\n this.out = out;\n }",
"public Output createOutput();",
"public JsonWriter(String destination) {\n this.destination = destination;\n }",
"Output createOutput();",
"private static JSONObject createCleanOutput()\r\n {\r\n /************************* outputChannel array **********************************/\r\n //JSONArray outputChannel = new JSONArray();\r\n\r\n String[] raw_channel_label = new String[]{\"1\", \"2\", \"3\", \"4\"};\r\n JSONArray outChannels = new JSONArray();\r\n Map<String, Object> channels = new HashMap<String, Object>();\r\n for (String channel : raw_channel_label) {\r\n channels.put(\"label\", channel);\r\n JSONObject tempJson = new JSONObject(channels);\r\n outChannels.add(tempJson);\r\n }\r\n /************************* outputStream array ************************************/\r\n // output stream\r\n JSONArray outputStreams = new JSONArray();\r\n Map<String, Object> out_streams = new HashMap<String, Object>();\r\n // Concentration output stream\r\n out_streams.put(\"channels\", outChannels);\r\n out_streams.put(\"type\", \"EEG\");\r\n out_streams.put(\"name\", \"myeeg\");\r\n out_streams.put(\"sampling_rate\", sampling_rate);\r\n\r\n JSONObject tempJson = new JSONObject(out_streams);\r\n outputStreams.add(tempJson);\r\n /************************* outputNode array ************************************/\r\n Map<String, Object> out_node_decl = new HashMap<String, Object>();\r\n out_node_decl.put(\"name\", \"cleandata\");\r\n out_node_decl.put(\"streams\", outputStreams);\r\n\r\n return new JSONObject(out_node_decl);\r\n }",
"private void writeAsJson(PCollection<byte[]> fakeMessages) {\n fakeMessages\n .apply(\"Convert to JSON\", ParDo.of(new Utf8BytesToJsonFn()))\n .apply(\n \"Write output\",\n TextIO.write()\n .to(getFileNamePolicy())\n .withTempDirectory(\n FileBasedSink.convertToFileResourceIfPossible(\n getPipelineOptions().getTempLocation())\n .getCurrentDirectory())\n .withWindowedWrites()\n .withNumShards(getPipelineOptions().getNumShards()));\n }",
"abstract protected JSONObject loadOutputTarget(String output, String outputType);",
"public interface Writeable {\n\n // EFFECTS: returns this as JSON object\n JSONObject toJson();\n}",
"protected abstract OutputWriter<O> createOutputWriter(Context context);",
"private static JSONObject createRawOutput()\r\n {\r\n /************************* outputChannel array **********************************/\r\n String[] raw_channel_label = new String[]{\"1\", \"2\", \"3\", \"4\"};\r\n JSONArray outChannels = new JSONArray();\r\n Map<String, Object> channels = new HashMap<String, Object>();\r\n for (String channel : raw_channel_label) {\r\n channels.put(\"label\", channel);\r\n JSONObject tempJson = new JSONObject(channels);\r\n outChannels.add(tempJson);\r\n }\r\n /************************* outputStream array ************************************/\r\n // output stream\r\n JSONArray outputStreams = new JSONArray();\r\n Map<String, Object> out_streams = new HashMap<String, Object>();\r\n // Concentration output stream\r\n out_streams.put(\"channels\", outChannels);\r\n out_streams.put(\"type\", \"EEG\");\r\n out_streams.put(\"name\", \"myeeg\");\r\n out_streams.put(\"sampling_rate\", sampling_rate);\r\n\r\n JSONObject tempJson = new JSONObject(out_streams);\r\n outputStreams.add(tempJson);\r\n /************************* outputNode array ************************************/\r\n Map<String, Object> out_node_decl = new HashMap<String, Object>();\r\n out_node_decl.put(\"name\", \"rawdata\");\r\n out_node_decl.put(\"streams\", outputStreams);\r\n JSONObject inOut = new JSONObject(out_node_decl);\r\n\r\n return inOut;\r\n }",
"static void outputJson(JsonReader reader, JsonWriter writer) throws IOException {\n\t\tGson gson = new GsonBuilder().setPrettyPrinting().create();\n\t\tJsonToken token = reader.peek();\n\t\tswitch (token) {\n\t\tcase BEGIN_ARRAY:\n\t\t\tJsonArray array = gson.fromJson(reader, JsonArray.class);\n\t\t\tgson.toJson(array, writer);\n\t\t\tbreak;\n\t\tcase BEGIN_OBJECT:\n\t\t\tJsonObject obj = gson.fromJson(reader, JsonObject.class);\n\t\t\tgson.toJson(obj, writer);\n\t\t\tbreak;\n\t\tcase STRING:\n\t\t\tString s = reader.nextString();\n\t\t\twriter.value(s);\n\t\t\tbreak;\n\t\tcase NUMBER:\n\t\t\tString n = reader.nextString();\n\t\t\twriter.value(new BigDecimal(n));\n\t\t\tbreak;\n\t\tcase BOOLEAN:\n\t\t\tboolean b = reader.nextBoolean();\n\t\t\twriter.value(b);\n\t\t\tbreak;\n\t\tcase NULL:\n\t\t\treader.nextNull();\n\t\t\twriter.nullValue();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treader.skipValue();\n\t\t\tbreak;\n\t\t}\n\t\twriter.flush();\n\t}",
"void convertToJson(Object object_, Writer writer, Class<?> view, String callback) throws IOException;",
"public abstract void writeToJSON(JsonWriter jsonWriter) throws IOException;",
"public void emit(PrintWriter output);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the taxID value for this Account. | public void setTaxID(java.lang.Object taxID) {
this.taxID = taxID;
} | [
"public void setTaxId(java.lang.String taxId)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TAXID$40);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TAXID$40);\r\n }\r\n target.setStringValue(taxId);\r\n }\r\n }",
"public void xsetTaxId(org.apache.xmlbeans.XmlString taxId)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TAXID$40);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(TAXID$40);\r\n }\r\n target.set(taxId);\r\n }\r\n }",
"public void setTaxId(Integer taxId) {\n\t\tthis.taxId = taxId;\n\t}",
"public void setTaxId(java.lang.String taxId) {\n this.taxId = taxId;\n }",
"public void setTaxIDNumber(java.lang.String taxIDNumber) {\n this.taxIDNumber = taxIDNumber;\n }",
"@Override\n\tpublic void setTax(int tax) {\n\t\t_bookOrder.setTax(tax);\n\t}",
"public void setTaxGroupId(BigDecimal taxGroupId) {\n getTaxGroupIdProperty().setValue(taxGroupId);\n }",
"public void setTaxTypeId(com.avalara.avatax.services.account.TaxTypeId taxTypeId) {\n this.taxTypeId = taxTypeId;\n }",
"public void setTaxGroupId(Integer taxGroupId) {\n this.taxGroupId = taxGroupId;\n }",
"public DisplayOrder setTax(java.lang.String tax) {\n return genClient.setOther(tax, CacheKey.tax);\n }",
"public void setTaxIdLabel(String taxIdLabel)\n\t{\n\t\tthis.taxIdLabel = taxIdLabel;\n\t}",
"public void setTaxRegistrationId(String taxRegistrationId) {\n this.taxRegistrationId = taxRegistrationId;\n }",
"public String getTaxID() {\n\t\treturn this.taxID;\n\t}",
"public void setTaxAuthorityId(Integer value) {\r\n this.taxAuthorityId = value;\r\n }",
"public void setTaxRegionID(java.lang.Object taxRegionID) {\n this.taxRegionID = taxRegionID;\n }",
"public void setTaxRegionId(java.lang.Integer taxRegionId) {\n this.taxRegionId = taxRegionId;\n }",
"public void setTaxGroupID(long value) {\r\n this.taxGroupID = value;\r\n }",
"void setTax(x0101.oecdStandardAuditFileTaxPT1.TaxDocument.Tax tax);",
"public void setTaxAmount(MMDecimal taxAmount) {\r\n this.taxAmount = taxAmount;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the existing item with the given ItemId can be read. | boolean canRead(ItemState itemState) throws ItemNotFoundException, RepositoryException; | [
"public boolean CheckItemId(int Id){\r\n\t\tPreparedStatement st;\r\n\t\t\ttry {\r\n\t\t\t\tst = connection.prepareStatement(\"SELECT * from item WHERE id = ?\");\r\n\t\t\t\t\t st.setInt(1, Id);\r\n\t\t\t\t ResultSet rs = st.executeQuery(); \r\n\t\t\t\t // if this id exist returns true else returns false \r\n\t\t\t\t if ( rs.next() ) { \t\r\n\t\t\t\t \t return false;\r\n\t\t\t\t \t}\r\n\t\t\t\t else \r\n\t\t\t\t \t return true;\r\n\t\t\t\t}\r\n\t\t\t\tcatch (SQLException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t}",
"public boolean isSetItemId() {\n return this.itemId != null;\n }",
"public boolean itemIsAllowed(int itemId) {\n\t\tswitch (itemId) {\n\t\tcase 15272: // Rocktail\n\t\tcase 7060: // Tuna potato\n\t\tcase 6685:\n\t\tcase 6687:\n\t\tcase 6689:\n\t\tcase 6691: // Saradomin brew\n\t\tcase 3024:\n\t\tcase 3026:\n\t\tcase 3028:\n\t\tcase 3030: // Super restore\n\t\tcase 391: // Manta Ray\n\t\tcase 385: // Shark\n\t\tcase 229: // Vial\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean isValidItem(int itemId) {\r\n if (itemId < OItem.c.length)\r\n return OItem.c[itemId] != null;\r\n return false;\r\n }",
"public static boolean contains(int itemID) {\n\t\t\tItem[] items = Inventory.getItems();\n\t\t\tfor(Item i : items) {\n\t\t\t\tif(i.getId() == itemID) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public static boolean checkFullItem(int id) throws IOException\n\t{\n\t\tif(id == 0)\n\t\t\treturn false;\n\t\t//special cases ex. boots\n\t\tif(id == 3047 || id == 3006 || id == 3009 || id == 3020 || id == 3111 || id == 3117 || id == 3158)\n\t\t\treturn true;\n\t\t\n\t\t//old boot enchantments\n\t\tif(id >= 1300 && id <= 1334)\n\t\t\treturn true;\n\t\t\n\t\t//sated devourer\n\t\tif(id == 3931 || id == 1415 || id == 1411)\n\t\t\treturn true;\n\t\t\n\t\t//sightstone\n\t\tif(id == 2049)\n\t\t\treturn true;\n\t\t\n\t\tif(id == 3930)\n\t\t\treturn true;\n\t\t\n\t\t//DNE anymore item?\n\t\tif(id == 2043 || id == 3932)\n\t\t\treturn false;\n\t\t\n\t\t//System.out.println(\"ID: \" + id);\n\t\tURL url = new URL(\"https://global.api.pvp.net/api/lol/static-data/na/v1.2/item/\" + id + \"?itemData=into&api_key=\" + API);\n\t\tInputStream is = url.openStream();\n\t\tJsonReader rdr = Json.createReader(is);\n\t\tJsonObject obj = rdr.readObject();\n\t\treturn !obj.containsKey(\"into\");\n\t}",
"public boolean isSetItemId() {\n return EncodingUtils.testBit(__isset_bitfield, __ITEMID_ISSET_ID);\n }",
"public boolean isSetItemId() {\n\t\treturn EncodingUtils.testBit(__isset_bitfield, __ITEMID_ISSET_ID);\n\t}",
"public boolean itemInStock(String itemID) throws InvalidDataException {\n for (Stock stock : inventory) {\n if (stock.getID().equals(itemID) && (stock.getQuantity() > 0)) {\n return true;\n }\n }\n return false;\n }",
"@Override\n public boolean isAcItem(ItemImpl item) throws RepositoryException {\n return false;\n }",
"boolean checkAvailability(Item item);",
"public static boolean isCorrectItemByID(Item item, int id) {\n\t\treturn item.getItemID() == id;\n\t}",
"public boolean canSeeItem(Item item) {\n\t\treturn this.hasItem(item) || item.getLocation() == this.getLocation();\n\t}",
"public boolean isItemVisible(@NotNull String itemKey) {\n Item item = itemsByKey.get(itemKey);\n if (item != null) {\n return item.isVisible();\n } else {\n log.error(\"Testing unknown item key \" + itemKey + \" for toolbar configuration \" + key);\n return false;\n }\n }",
"public boolean isValidItem() {\n return validItem;\n }",
"public boolean hasItem() {\n return null != item;\n }",
"public CompositeAction canRead(String databaseId);",
"private boolean isEntityIdAlreadyRead(Pair<String, Integer> pExportEntityId) {\r\n\t\tfor (Pair<String, Integer> pAllEntityId : lstAllReadEntityIds ) {\r\n\t\t\tif (pAllEntityId.getX().equals(pExportEntityId.getX()) &&\r\n\t\t\t\t\tpAllEntityId.getY().compareTo(pExportEntityId.getY()) == 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean checkIfProductExists(String itemID) {\n Cursor cursor = null;\n boolean result = true;\n\n try {\n Log.e(getClass().getSimpleName(), \"checkIfProductExists\");\n String query = \"SELECT * FROM \" + DatabaseHelper.TABLE_WISH_LIST + \" WHERE \" + DatabaseHelper.COL_ITEM_ID + \" = '\" + itemID + \"'\";\n\n cursor = database.rawQuery(query, null);\n if (cursor.getCount() <= 0) {\n cursor.close();\n\n result= false;\n }\n\n }catch (Exception e){\n e.printStackTrace();\n }finally{\n if(cursor != null) {\n cursor.close();\n }\n }\n return result;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate staff list from webController data | public void makeStaffList(){
for(int i = 0; i< webContentController.getStaffNames().size(); i++){
addPersonToStaff(webContentController.getStaffNames().get(i), webContentController.getStaffPhotoLink().get(i));
}
} | [
"@GetMapping\n\tpublic List<UniversityStaffMember> viewAllStaffs() {\n\t\tList<UniversityStaffMember> list = universityService.viewAllStaffs();\n\t\tif (list.size() == 0)\n\t\t\tthrow new EmptyDataException(\"No University Staff in Database.\");\n\t\treturn list;\n\t}",
"public static ArrayList<Staff> viewStaff(){\n\t\ttry {\n\t\t\tConnection conn = DatabaseConnection.getConnection();\n\t\t Statement st = conn.createStatement();\n\n\t\t ResultSet rs = st.executeQuery(\"SELECT * FROM Staff\");\n\t\t ArrayList<Staff> sList = new ArrayList<Staff>();\n\t\t \n\t\t while(rs.next()) {\n\t\t \tStaff s = new Staff();\n\t\t \ts.setAddress(rs.getString(\"address\"));\n\t\t \ts.setDept(rs.getString(\"dept\"));\n\t\t\t\ts.setDob(rs.getString(\"date_of_birth\"));\n\t\t\t\ts.setGender(rs.getString(\"gender\"));\n\t\t\t\ts.setId(rs.getInt(\"staff_id\"));\n\t\t\t\ts.setName(rs.getString(\"name\"));\n\t\t\t\ts.setPno(rs.getString(\"phone_no\"));\n\t\t\t\ts.setProfTitle(rs.getString(\"prof_title\"));\n\t\t\t\ts.setSal(rs.getDouble(\"salary\"));\n\t\t\t\ts.setJobTitle(rs.getString(\"job_title\"));\n\t\t\t\tsList.add(s);\n\t\t }\n\t\t return sList;\n\t }\n\t catch (SQLException ex) {\n\t \tSystem.err.println(ex.getMessage());\n\t \treturn null;\n\t }\n\t}",
"@RequestMapping(value = \"/staff/\", method = RequestMethod.GET) //Mapping url localhost:8080/api/staff/ dengan method GET\n public ResponseEntity<List<Staff>> listAllStaffs() {\n List<Staff> staffs = staffService.findAllStaffs(); //Invoke method findAllStaffs\n if (staffs.isEmpty()) { //Check kondisi\n return new ResponseEntity<>(staffs, HttpStatus.NOT_FOUND);\n }\n return new ResponseEntity<>(staffs, HttpStatus.OK);\n }",
"@GET\r\n\t@Produces(\"application/JSON\")\r\n\tpublic List<ZooStaff> getAllStaffs(){\r\n\t\treturn service.getAllStaffs();\r\n\t}",
"private void downloadStaffs() {\n XMLParser parser = new XMLParser();\n companyDb = new CompanyDbHelper(getContext());\n String url = String.format(\"%1$s%2$s%3$s?id=%4$s\",\n Utils.SERVER_URL, Utils.SERVER_FOLDER, ASPX_GET_ALL_STAFFS, companyDb.getCompanyId());\n String xml = parser.getXmlFromUrl(url, true, null, null);\n staffs = new ArrayList<>();\n\n try {\n Document doc = parser.getDomElement(xml);\n NodeList nl = doc.getElementsByTagName(Utils.XML_NODE_DOWNLOAD);\n Element e = (Element) nl.item(0);\n Boolean status = Boolean.valueOf(parser.getValue(e, Utils.XML_NODE_STATUS));\n\n if (status == Boolean.TRUE) {\n NodeList nl1 = doc.getElementsByTagName(Utils.XML_NODE_ROW);\n Element e1;\n Staff staff;\n\n // Looping through all item nodes <Row>\n for (int i = 0; i < nl1.getLength(); i++) {\n e1 = (Element) nl1.item(i);\n\n staff = new Staff();\n\n // Adding each child node to staff object\n staff.setStaffId(Integer.parseInt(parser.getValue(e1, XML_NODE_STAFF_ID)));\n staff.setStaffName(parser.getValue(e1, XML_NODE_STAFF_NAME));\n\n staffs.add(staff);\n }\n\n staffDb = new StaffDbHelper(getContext());\n staffDb.deleteAllStaffs();\n staffDb.addAllStaffs(staffs);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@ResponseBody\n @RequestMapping(value=\"/trainer/data\")\n public LinkedList<Trainer> showTrainer(){\n dbManager.initializeDatabase();\n LinkedList<Trainer> trainerList=dbManager.getTrainerList();\n dbManager.closeDatabase();\n return trainerList;\n }",
"public String getUStaff();",
"@RequestMapping(\"/programmers-list\")\n public List<Programmer> getProgrammerListMembers() {\n return programmerService.getProgrammersListMembers();\n\n }",
"public StaffInfo getStaff ()\r\n {\r\n return staff;\r\n }",
"public void setDepart_staff(List<StaffDto> depart_staff) {\n this.depart_staff = depart_staff;\n }",
"Collection<User> getStaffs() throws DataAccessException;",
"public void staffsInfo() {\r\n\t\t setNumberOfStaff(0);\r\n\t\t ArrayList<Staff> staff = vc.getStaffs();\r\n\t\t Iterator<Staff> it = staff.iterator();\r\n\t\t \r\n\t\t breakingLine();\r\n\t\t System.out.println(\"* ID ** Name ******** Voted **** Password *** Voted Time **\");\r\n\t\t breakingLine();\r\n\t\t \r\n\t\t while(it.hasNext()) {\r\n\t\t\t theStaff = (Staff)it.next();\r\n\t\t\t System.out.println(theStaff.getId() + \"\\t\" \r\n\t\t\t\t\t \t\t\t+ theStaff.getName() + \"\\t\" \r\n\t\t\t\t\t \t\t\t+ theStaff.hasVoted() + \"\\t\" \r\n\t\t\t\t\t \t\t\t+ theStaff.getPassword() + \"\\t\" \r\n\t\t\t\t\t \t\t\t+ theStaff.getTimeStamp() );\r\n\t\t\t \r\n\t\t\t setNumberOfStaff(getNumberOfStaff() + 1);\r\n\t\t }\r\n\t\t System.out.println();\r\n\t\t breakingLineFour();\r\n\t\t System.out.println(\"The total numbers of staffs are: \" + numberOfStaffs);\r\n\t\t breakingLine();\r\n\t}",
"@Test\n public void testStaffFactoryCreate() {\n StaffController staffController = staffFactory.getStaffController();\n staffController.addStaff(STAFF_NAME, STAFF_GENDER, STAFf_ROLE);\n assertEquals(1, staffController.getStaffList().size());\n }",
"List<StaffList> selectByExample(StaffListExample example);",
"public void setStaff(java.lang.String staff) {\n this.staff = staff;\n }",
"public static List<String> getContentFromStaff(CsvAdaptedStaff staff) {\n List<String> content = new ArrayList<>();\n content.add(staff.username);\n content.add(staff.password);\n content.add(staff.staffName);\n content.add(staff.role);\n return content;\n }",
"public List<StaffDto> getDepart_staff() {\n return depart_staff;\n }",
"public List<SlotDto> staff_load(StaffDto staff_member){\n \n List<SlotDto> slots = null;\n try\n {\n slots = dao.staff_load(staff_member);\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return slots;\n\n }",
"private static void listStaffByCategory(){\n\t\t\n\t\tshowMessage(\"Choose one category to list:\\n\");\n\t\tshowMessage(\"1 - Surgeon\");\n showMessage(\"2 - Nurse\");\n showMessage(\"3 - Vet\");\n showMessage(\"4 - Accountant\");\n showMessage(\"5 - ItSupport\");\n showMessage(\"6 - Secretary\");\n showMessage(\"7 - Back to previous menu.\");\n \n int option = getUserStaffByCategory();\n /** switch case option start below */\n switch (option){\n \tcase 1 : ToScreen.listEmployee(employee.getSurgeonList(), true); listStaffByCategory();\n break;\n case 2 : ToScreen.listEmployee(employee.getNurseList(), true); listStaffByCategory();\n break;\n case 3 : ToScreen.listEmployee(employee.getVetList(), true); listStaffByCategory();\n \tbreak;\n case 4 : ToScreen.listEmployee(employee.getAccountantList(), true); listStaffByCategory();\n \tbreak;\n case 5 : ToScreen.listEmployee(employee.getItSupportList(), true); listStaffByCategory();\n \tbreak;\n case 6 : ToScreen.listEmployee(employee.getSecretaryList(), true); listStaffByCategory();\n \tbreak;\n case 7 : main();\n break;\n \n default: listStaffByCategory();\n \n }\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deleting collars by shop id. | @DeleteMapping("/shops/{id}/collars")
public ResponseEntity <String> deleteShopsCollars(@PathVariable("id") long id) {
try {
shopsDao.findById(id).get();
} catch (RuntimeException e){
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "No shop with id " + id + ".");
}
int shopCollars = 0;
List <Long> collarsId = new ArrayList<Long>();
for (Collars collar: collarsDao.findAll()) {
if (collar.getShopId() == id) {
collarsId.add(collar.getId());
shopCollars++;
}
}
if (shopCollars > 0) {
for (long ids: collarsId) {
collarsDao.deleteById(ids);
}
return ResponseEntity.ok("Collars erased.");
} else {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Impossible to run command."
+ "No collars in this shop.");
}
} | [
"public void deleteShop(Shop shop)throws Exception{\n\n // find shop with specific id\n Shop shops = shopRepository.findOne(shop.getId());\n\n // check if shop was found\n if(shops == null){\n throw new Exception(\"Shop not found!\");\n }\n\n // find store of shop\n Store stores = storeRepository.findOne(shops.getStore().getId());\n\n // delete shop from store to remove the relation\n stores.getShops().remove(shops);\n\n // delete shop from database\n shopRepository.delete(shops);\n }",
"@DeleteMapping (\"shops/{id}/pictures\")\n\t\tpublic void deletePaintsShop(@PathVariable(name=\"id\")Long id) {\n\t\t\tSystem.out.println(\"Se borran todos los paints de la shop con id: \" +id);\n\n\t\t\tpaintServiceImpl.deletePaintsShop(id);\n\t\t\t\n\t\t\tSystem.out.println(\"PAINTS BORRADOS\");\n\t\t}",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Collection : {}\", id);\n collectionRepository.delete(id);\n collectionSearchRepository.delete(id);\n }",
"public void deleteWorkshop(Workshop workshop) {\n\t\tlong eventId = workshop.getEventId();\n\t\tlong id = workshop.getId();\n\t\t\n\t\tdatabase.delete(DbHelper.TABLE_EVENTS, DbHelper.COLUMN_ID + \" = \"\n\t\t\t\t+ eventId, null);\n\t\tdatabase.delete(DbHelper.TABLE_WORKSHOPS, DbHelper.COLUMN_ID + \" = \"\n\t\t\t\t+ id, null);\n\t}",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ShopInfo : {}\", id);\n shopInfoRepository.delete(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete SysShoppingProduct : {}\", id);\n sysShoppingProductRepository.deleteById(id);\n }",
"void deleteShoppingCard(Long id);",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void deleteShelterById(@PathVariable(\"id\") int id) {\n this.shelterService.removeShelterById(id);\n // this.shelterRepo.delete(id);\n }",
"public void delete(int shopId, ShipmentType shipmentType) throws DaoException;",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ShoppingList : {}\", id);\n shoppingListRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ShopImage : {}\", id);\n shopImageRepository.deleteById(id);\n }",
"@DeleteMapping(\"/wechat-shop-cards/{id}\")\n @Timed\n public ResponseEntity<Void> deleteWechatShopCard(@PathVariable Long id) {\n log.debug(\"REST request to delete WechatShopCard : {}\", id);\n wechatShopCardService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"int delRouteStoreByIdStore(Long id_store);",
"void deleteCategoryProducts(long id);",
"void deletingCatalogItemById(final Long id);",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Collect : {}\", id);\n collectRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete SysShoppingCar : {}\", id);\n sysShoppingCarRepository.deleteById(id);\n }",
"@Override\n public void delete(String id) {\n log.debug(\"Request to delete Catalog : {}\", id); catalogRepository.deleteById(id);\n catalogSearchRepository.deleteById(id);\n }",
"private static void delShirt() {\r\n Handler.removeShirt(delOrder());\r\n System.out.println(\"El pedido a sido eliminado\");\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the expand clause for the request | @Nonnull
public IdentityRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | [
"public void setExpand(String expand) {\n this.expand = expand;\n }",
"public void setExpand(boolean expand) { this.expand = expand; }",
"ICallRequest expand(final String value);",
"IResourceOperationRequest expand(final String value);",
"public void setExpandNode(ch.ivyteam.ivy.scripting.objects.Tree _expandNode)\n {\n expandNode = _expandNode;\n }",
"@Nonnull\n public AzureDataLakeConnectorRequest expand(@Nonnull final String value) {\n addExpandOption(value);\n return this;\n }",
"ITelecomExpenseManagementPartnerRequest expand(final String value);",
"public <TValue> ByProjectKeyByResourceTypeGet addExpand(final TValue expand) {\n return copy().addQueryParam(\"expand\", expand);\n }",
"@ApiModelProperty(value = \"Expand options that include additional issue details in the response.\")\n public String getExpand() {\n return expand;\n }",
"public void setExpandDuration(int expandDuration) {\n this.expandDuration = expandDuration;\n resetItems();\n }",
"public void setExpandEntityReferences(final boolean expand) {\n checkSetterPreconditions();\n\n expandEntityReferences = expand;\n }",
"public IndicesGetAlias expandWildcards(EnumExpandWildcards expandWildcards){\n\t\taddParams(\"expandWildcards\", expandWildcards);\n\t\treturn this;\n\t}",
"public <TValue> ByProjectKeyByResourceTypeGet addExpand(final Collection<TValue> expand) {\n return copy().addQueryParams(\n expand.stream().map(s -> new ParamEntry<>(\"expand\", s.toString())).collect(Collectors.toList()));\n }",
"@JDIAction(\"Expand '{name}'\")\n public void expand() {\n if (isCollapsed()) {\n expandButton.click();\n }\n }",
"public void expand(String region)\n\t{\n\t\tJSONArray params = new JSONArray() ;\n\t\tparams.put(region) ;\n\t\t\n\t\tres.add(ResponseItem.createResponseItem(name,LAYOUT,EXPAND,params)) ;\t\n\t}",
"public CondenseTableAction<T> setExpandToolTip(String expandToolTip) {\n this.expandToolTip = expandToolTip;\n return this;\n }",
"public com.vitessedata.llql.llql_proto.LLQLExpr.Expr.Builder addExpandArrayBuilder() {\n return getExpandArrayFieldBuilder().addBuilder(\n com.vitessedata.llql.llql_proto.LLQLExpr.Expr.getDefaultInstance());\n }",
"private void expand() {\n\t\tTreePath path = tree.getLeadSelectionPath();\n\t\ttree.expandNode((ProgramNode) tree.getLastSelectedPathComponent());\n\t\texpandAction.setEnabled(!allPathsExpanded(path));\n\t\tcollapseAction.setEnabled(!allPathsCollapsed(path));\n\t}",
"private ODataQuery appendExpandStrings(ODataQuery query, String... toExpand) throws UnsupportedEncodingException \n\t{\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tfor (String navigationToExpand : toExpand) \n\t\t{\n\t\t\tif (navigationToExpand.trim().length() > 0)\n\t\t\t{\n\t\t\t\tsb.append(navigationToExpand);\n\t\t\t\tsb.append(',');\n\t\t\t}\n\t\t}\n\t\t\n\t\tString toExpandString = sb.toString();\n\t\tint lastIndexOf = toExpandString.lastIndexOf(',');\n\t\tif(lastIndexOf > 0)\n\t\t{\n\t\t\ttoExpandString = toExpandString.subSequence(0, lastIndexOf).toString();\n\t\t}\n\t\t\n\t\tif (toExpandString.trim().length() > 0)\n\t\t{\n\t\t\tquery.expand(toExpandString);\n\t\t}\n\t\t\n\t\treturn query;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a specific worklog entry | public void deleteWorkLog(int logId) {
this.workLogs.removeIf((WorkLog element) -> element.getLogId() == logId);
} | [
"private void deleteLogEntry() {\n getActivity().getContentResolver().delete(\n WalksContract.LogEntry.CONTENT_URI,\n \"_id = ?\",\n new String[] {new Long(logEntryId).toString()});\n\n }",
"public static void delete_log_entry (LogEntry entry) {\n\n\t\t// Check conditions\n\n\t\tif (!( entry != null && entry.get_id() != null )) {\n\t\t\tthrow new IllegalArgumentException(\"LogEntry.delete_log_entry: Invalid parameters\");\n\t\t}\n\n\t\t// Get the MongoDB data store\n\n\t\tDatastore datastore = MongoDBUtil.getDatastore();\n\n\t\t// Run the delete\n\n\t\tdatastore.delete(entry);\n\t\t\n\t\treturn;\n\t}",
"void deleteTaskLog(IPSGuid id);",
"public void delete(final Log entity);",
"public void deleteQuest(Quest quest){\n \tthis.questlog = this.questlog.delete(quest);\n }",
"@Override\n public void deleteFailedWorklog(Integer worklogId) {\n\n try (Connection connection = database.connect();\n PreparedStatement stmt = connection.prepareStatement(DELETE_FAILED_WORKLOG_SQL)) {\n stmt.setInt(1, worklogId);\n stmt.executeUpdate();\n } catch (SQLException e) {\n logger.logToDatabase(getClass().getName(), \"deleteFailedWorklog\", e);\n throw new InternalServerErrorException(e.getMessage());\n }\n }",
"public void delete(Log log) {\n\t\ttry {\n\t\t\tString sql = \"DELETE FROM log WHERE numeroTransaction=?\";\n\t\t\tPreparedStatement ps = con.prepareStatement(sql);\n\t\t\tps.setString(1, log.getNumeroTransaction());\n\t\t\tps.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void deleteGlossaryEntry(Field entryToDelete);",
"public void deleteWorkOrder(int selectedWorkOrderID) {\n String query = \"DELETE FROM workOrders WHERE rowid = ?\";\n\n try (\n PreparedStatement statement = connection.prepareStatement(query)) {\n statement.setInt(1, selectedWorkOrderID);\n\n statement.executeUpdate();\n statement.close();\n\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }",
"void deleteLog(int start,int end);",
"public void delete() {\n Utils.inWriteLock(leaderIsrUpdateLock, () -> {\n assignedReplicaMap.clear();\n Set<Replica> inSyncReplicas = Sets.newHashSet();\n leaderReplicaIdOpt = Optional.empty();\n logManager.deleteLog(new TopicAndPartition(topic, partitionId));\n// error(String.format(\"Error deleting the log for partition <%s,%d>\", topic, partitionId), e);\n// Runtime.getRuntime().halt(1);\n return null;\n });\n }",
"@Test\n public void deleteWorkActivityTest() throws ApiException {\n Integer workActivityId = null;\n api.deleteWorkActivity(workActivityId);\n\n // TODO: test validations\n }",
"DeleteLog selectByPrimaryKey(Long id);",
"public BlogEntry deleteBlogEntry(Long id);",
"private void deleteEntry(Entry entry) {\n if ((entry == null) || (entry.getId() < 1))\n throw new IllegalArgumentException();\n \n String sql = \"DELETE FROM Entry WHERE EntryId=\" + \n entry.getId() + \";\";\n \n dbConnection.executeUpdate(sql);\n DataBus.logger.info(\"Entry deleted.\");\n }",
"public void delete(int index) throws SchwIoException {\n PastWorkoutSessionRecord deletedRecord;\n deletedRecord = pastFiles.get(index - 1);\n pastFiles.remove(index - 1);\n File myFile = new File(deletedRecord.getFilePath());\n myFile.delete();\n storage.writePastRecords(pastFiles);\n logger.log(Level.INFO, \"Record is deleted.\");\n }",
"@DeleteMapping(\"/works/{id}\")\n @Timed\n public ResponseEntity<Void> deleteWork(@PathVariable Long id) {\n log.debug(\"REST request to delete Work : {}\", id);\n workRepository.delete(id);\n workSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"void delete(JobRunSchedule jobRunSchedule);",
"public void deleteRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.delete(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the given long index is between the range from min and max. | public static boolean isBetween(final long min, final long max, final long index)
{
return isBetween(min, max, index, false, false);
} | [
"public static boolean isBetween(final long min, final long max, final long index,\n\t\tfinal boolean includeMin, final boolean includeMax)\n\t{\n\t\tif (includeMin && !includeMax)\n\t\t{\n\n\t\t\treturn (index >= min && index < max);\n\t\t}\n\t\tif (!includeMin && includeMax)\n\t\t{\n\n\t\t\treturn (index > min && index <= max);\n\t\t}\n\t\tif (includeMin && includeMax)\n\t\t{\n\n\t\t\treturn (index >= min && index <= max);\n\t\t}\n\t\treturn (min < index && index < max);\n\t}",
"private static boolean RangeCheck(int literal) {\r\n final int lowl = 0;\r\n final int highl = 127;\r\n if (literal >= lowl && literal <= highl) {\r\n return true;\r\n\r\n } else {\r\n return false;\r\n }\r\n }",
"public boolean inRange(Number n) {\n return n.compareTo(min) >= 0 && n.compareTo(max) <= 0;\n }",
"public static boolean isBetween(final int min, final int max, final int index)\n\t{\n\t\treturn isBetween(min, max, index, false, false);\n\t}",
"private void boundsCheck(long f) throws InvalidDatatypeFacetException {\n boolean inUpperBound = false;\n boolean inLowerBound = false;\n\n if ( isMaxInclusiveDefined ) {\n inUpperBound = ( f <= fMaxInclusive );\n } else if ( isMaxExclusiveDefined ) {\n inUpperBound = ( f < fMaxExclusive );\n }\n\n if ( isMinInclusiveDefined ) {\n inLowerBound = ( f >= fMinInclusive );\n } else if ( isMinExclusiveDefined ) {\n inLowerBound = ( f > fMinExclusive );\n }\n\n if ( inUpperBound == false || inLowerBound == false ) { // within bounds ?\n throw new InvalidDatatypeFacetException(\n getErrorString(DatatypeMessageProvider.OutOfBounds,\n DatatypeMessageProvider.MSG_NONE,\n new Object [] { new Long(f),\"\",\"\",\"\",\"\"}));//REVISIT\n }\n }",
"private static boolean inRange (float min, float num, float max) {\n return (min <= num && num <= max);\n }",
"private boolean outOfBounds(int x, int min, int max){\n if(x < min || x >= max)\n return true;\n return false;\n }",
"public static boolean isBetween(final int min, final int max, final int index,\n\t\tfinal boolean includeMin, final boolean includeMax)\n\t{\n\t\tif (includeMin && !includeMax)\n\t\t{\n\n\t\t\treturn (index >= min && index < max);\n\t\t}\n\t\tif (!includeMin && includeMax)\n\t\t{\n\n\t\t\treturn (index > min && index <= max);\n\t\t}\n\t\tif (includeMin && includeMax)\n\t\t{\n\n\t\t\treturn (index >= min && index <= max);\n\t\t}\n\t\treturn (min < index && index < max);\n\t}",
"public static boolean between( int value, int min, int max ) {\n return value >= min && value <= max;\n }",
"public static boolean isBetween(final double min, final double max, final double index)\n\t{\n\t\treturn isBetween(min, max, index, false, false);\n\t}",
"public static void checkBound(int index, int lowerBound, int upperBound) {\n ValidationUtils.isTrue(index >= lowerBound && index <= upperBound, String.format(\"Should be in range [{%s},{%s}]\", lowerBound, upperBound));\n }",
"private static boolean checkInRange(double start, double stop, double target) {\n return target >= start && target <= stop;\n }",
"private void checkIndex(int index, int min, int max) {\n if (index < min || index > max) {\n throw new ArrayIndexOutOfBoundsException(index);\n }\n }",
"public abstract void selectIndexRange(int min, int max);",
"public boolean checkValidRange(String input, int start_index, int end_index) {\n\n try {\n String inputNumber = input.substring(1);\n int i = Integer.parseInt(inputNumber);\n if (i >= start_index && i <= end_index) {\n return true;\n }\n return false;\n\n } catch (NumberFormatException e) {\n return false;\n }\n }",
"private boolean isIntegerInRage(int x, int min, int max)\n {\n return x>=min && x<=max;\n }",
"@Test\n public void testInRange_int() {\n System.out.println(\"inRange_int\");\n assertEquals(0, NumUtil.inRange(100, 0, 0));\n assertEquals(0, NumUtil.inRange(-100, 0, 100));\n assertEquals(0, NumUtil.inRange(0, 0, 100));\n assertEquals(10, NumUtil.inRange(10, 0, 100));\n assertEquals(100, NumUtil.inRange(100, 0, 100));\n assertEquals(100, NumUtil.inRange(1000, 0, 100));\n }",
"public static boolean isBetween(final float min, final float max, final float index)\n\t{\n\t\treturn isBetween(min, max, index, false, false);\n\t}",
"public boolean rangeCheck(int index) {\n\t\tif (index >= 0 && index <= 7) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
execMethodAsync_. Execute a Method of this Object asynchronously | public void execMethodAsync_ (
Object objWbemSink,
String strMethodName,
Object objWbemInParameters,
int iFlags,
Object objWbemNamedValueSet,
Object objWbemAsyncContext) throws java.io.IOException, com.linar.jintegra.AutomationException{
Object zz_retVal[] = { null };
Object zz_parameters[] = { objWbemSink, strMethodName, objWbemInParameters, new Integer(iFlags), objWbemNamedValueSet, objWbemAsyncContext, zz_retVal };
vtblInvoke("execMethodAsync_", 20, zz_parameters);
return;
} | [
"public void asynchExecution(String remoteMethod, String[] param) {\n return;\n }",
"@Test @Disabled(\"Can't get this to return\")\n public void testExecuteScriptAsync() {\n LOG.entering(CLASS, \"testExecuteScriptAsync\");\n try{\n setUrl(URL);\n JsonObject result = MarionetteUtil.parseJsonObject(POST(\n getUri(\"executeScriptAsync\", sessionId)\n , Json.createObjectBuilder().add(\"script\", \"setTimeout(function(){return 1;}, 500);\").add(\"args\", \"[]\").build().toString()\n ).body());\n Assertions.assertTrue(null != result.get(\"return\"));\n LOG.exiting(CLASS, \"testExecuteScriptAsync\", result);\n } catch(Exception e){\n LOG.throwing(CLASS, \"testExecuteScriptAsync\", e);\n throw e;\n }\n }",
"public abstract void runAsync(Runnable runnable);",
"public native void doAsync(AsyncTaskCallback callback);",
"<R> Promise<R> executeAsync(String activityName, Class<R> returnType, Object... args);",
"@JmeThread\n public @NotNull SpawnMethod getMethod() {\n return method;\n }",
"Future<HttpResponse> executeAsync(HttpRequest request) throws RequestExecutionException;",
"public void onRemoteExecutionComplete(Method method, Object invoker, Object[] args, Object returnValue,\n boolean isSuccess, Throwable exception);",
"public void execute() {\n\t\t/* Create a new thread and kick it off */\n\t\tThread tempThread = new Thread(exec, \"ROSpec Executer\");\n\t\ttempThread.start();\n\t}",
"public void await() {\n }",
"@Override\n public AsyncTask executeOnExecutor(Executor executor, Object[] params) {\n return this.execute(params);\n }",
"@Override\n\tpublic void execute() {\n\t\t\n\t\toutputArg1 = rc.method1(inputArg1);\n\t\t\n\t}",
"public final void invoke() {\n synchronized (lock) {\n actionPerformed(null);\n\n try {\n taskFutureResult.get();\n } catch (InterruptedException ex) {\n } catch (ExecutionException ex) {\n }\n }\n\n }",
"private static Object executeAsyncJavascript(WebDriver driver, String script) {\n System.out.println(\"Executing Async javascript: \" + script);\n return ((JavascriptExecutor) driver).executeAsyncScript(script);\n }",
"void doAsync(Runnable r);",
"public Response execute() throws VkApiException {\n Map<String, String> stringParams = getVkApiParamsConverter().toStringParams(getParams());\n log.debug(\"Sending: method={}, url={}, params={}\", getMethod(), getUrl(), stringParams);\n\n HttpClient vkApiHttpClient = getVkApiHttpClient();\n vkApiHttpClient.setMethod(getMethod());\n vkApiHttpClient.setUrl(getUrl());\n vkApiHttpClient.setParams(stringParams);\n\n try {\n String body = vkApiHttpClient.execute();\n log.debug(\"Received: {}\", body);\n\n if (getVkApiResponseValidator().isValid(body)) {\n return getJsonConverter().convert(body, getResponseType());\n }\n\n throw new VkApiResponseException(body);\n } catch (IOException e) {\n throw new VkApiException(e);\n }\n }",
"@Override\n public void execute() {\n getReceiver().execute(this);\n }",
"@Override\n public void execute() {\n Task<Void> task = new Task<Void>() {\n @Override\n protected Void call() throws Exception {\n exportData();\n return null;\n }\n\n @Override\n protected void succeeded(){\n callback.onSuccess();\n super.succeeded();\n }\n\n @Override\n protected void failed(){\n callback.onFail(this.getException());\n super.failed();\n }\n };\n new Thread(task).start();\n }",
"public interface IBugReportRpcAsync {\r\n\r\n /**\r\n * Submit a bug report.\r\n * @param bugReport Bug report to submit\r\n * @param callback Callback to be invoked after method call completes\r\n */\r\n void submitBugReport(BugReport bugReport, AsyncCallback<Void> callback);\r\n\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only for use if utilising the alternate refill type: checking if you can partially serve each task on the route to the depot. | private void altRefill(DecisionProcess dp, int currNode, int nextNode, double remainingCapacity){
DecisionProcessState state = dp.getState();
Instance instance = state.getInstance();
Graph graph = instance.getGraph();
Arc task = graph.getArc(currNode, nextNode);
if(task.isTask() && state.getTaskRemainingDemandFrac(task) > 0){
double remainingDemandFraction = state.getTaskRemainingDemandFrac(task);
double remainingDemand = instance.getActDemand(task) * remainingDemandFraction;
if(remainingCapacity >= remainingDemand) {
// ie: we can serve the whole thing.
CollaborativeServingEvent cseTemp;
CollaborativeServingEvent cse = null;
if(!state.getUnassignedTasks().contains(task)) {
// identify which route is currently assigned to this task (if any)
for(DecisionProcessEvent event: dp.getEventQueue()) {
if (event.getClass().equals(CollaborativeServingEvent.class)) {
cseTemp = (CollaborativeServingEvent) event;
if (cseTemp.route.getNextTask() == task || cseTemp.route.getNextTask() == task.getInverse()) {
cse = cseTemp;
break;
}
}
}
}
// finish whatever is left
double servedFraction = state.getTaskRemainingDemandFrac(task);
// if(servedFraction != 1.0) System.out.println("ServedFraction: " + servedFraction);
route.add(nextNode, servedFraction, instance);
// remove the task from the remaining tasks
state.removeRemainingTasks(task);
state.removeUnassignedTasks(task);
// update the task-to-task and route-to-task maps
state.completeTask(task);
// calculate the route-to-task map
state.calcRouteToTaskMap(route);
if(cse != null)
// i.e. steal the task from another vehicle
cse.assignNewTask(dp);
} else {
// we can't serve the whole thing (route failure equivalent)
double servedFraction = remainingCapacity / instance.getActDemand(task);
route.add(nextNode, servedFraction, instance);
state.calcRouteToTaskMap(route);
}
} else {
route.add(nextNode, 0, instance);
}
} | [
"private boolean areTaskForcesPresent() {\n return baseGrid\n .getPort()\n .map(Port::areTaskForcesPresent)\n .orElse(false);\n }",
"private static boolean checkFlexibility(Task task) {\n\t\treturn task.getJobs().stream().anyMatch(job -> job.getRoutes().stream().anyMatch(route -> route.getStages().stream().anyMatch(stage -> stage.getMachines().size() > 1)));\n\t}",
"boolean isForwardingPossible() {\n return (preq instanceof ResourceRequest);\n }",
"@SuppressWarnings(\"RedundantIfStatement\")\n\tprivate static boolean checkIsJobShop(Task currentTask) {\n\t\tif(currentTask.getJobs().stream().anyMatch(job -> job.getRoutes().size() != 1))\n\t\t\treturn false;\n\t\t\n\t\tif(currentTask.getJobs().stream().anyMatch(job -> job.getScheduledRoute().getStages().stream().anyMatch(stage -> stage.getScheduledMachine().getDuration() == 0)))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"boolean hasGenerateTroubleshootingUri();",
"private boolean isOnlyTask(State state) {\r\n\t\treturn state.getTasks(taskString).size() == 1;\r\n\t}",
"public static boolean checkResources(){\n for(Instruction i : waitingList){\n if(resourceArr[i.resourceType - 1] >= i.resourceAmount){\n return true;\n }\n }\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n if(instructionType != Type.request){\n return true;\n }else{\n if(resourceArr[currInstruction.resourceType - 1] >= currInstruction.resourceAmount){\n return true;\n }\n }\n }\n\n }\n return false;\n }",
"public synchronized boolean doUnexpiredRoutesExist() {\n\t\treturn rtList.doUnexpiredRoutesExist();\n\t}",
"boolean hasMultiClusterRoutingUseAny();",
"@Transactional(propagation = SUPPORTS)\n private boolean isSuitableRoute(List<Cargo> orderCargoes, List<String> routePoints) {\n List<Cargo> cargoes = new ArrayList<>(orderCargoes);\n for (int i = 0; i < routePoints.size() - 1; i++) {\n Iterator<Cargo> cargoIterator = cargoes.iterator();\n while (cargoIterator.hasNext()) {\n if (isSuitableRoutePart(routePoints.get(i), routePoints.get(i + 1), cargoIterator.next())) {\n cargoIterator.remove();\n }\n }\n }\n return cargoes.isEmpty();\n }",
"protected abstract boolean isResoluble();",
"boolean isResolvable(Class<?> type);",
"protected boolean requiresTravelerApprovalRouting() {\n //If there's travel advances, route to traveler if necessary\n return requiresTravelAdvanceReviewRouting() && !getTravelAdvance().getTravelAdvancePolicy();\n }",
"public void checkTask(String task){\r\n\tif (task == \"washDishes\") {\r\n\twashDishes();\r\n\t}\r\n\t\t\r\n}",
"protected boolean shouldStartRoutes() {\n return isStarted() && !isStarting();\n }",
"public static boolean addressNonWaitingBanker(){\n boolean addressedSomething = false;\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n\n if(instructionType == Type.initiate){\n if(currInstruction.claim > maxResourceArr[currInstruction.resourceType]){\n System.out.println(\"Banker aborts task \" + currTask.taskNumber+ \" before run begins: claim for resource \" + (resourceType + 1)+ \" (\" + currInstruction.claim + \") \" + \" exceeds number of units present \" + \" (\" + maxResourceArr[currInstruction.resourceType] + \") \");\n currTask.isAborted = true;\n terminatedCount += 1;\n }else{\n currTask.startTime = time;\n addressedSomething = true;\n }\n\n }else if(instructionType == Type.request){\n if(bankerRequest(currInstruction)){\n addressedSomething = true;\n }else{\n // System.out.println(\"Task \" + currTask.taskNumber + \" could not be completed\");\n }\n }// when it is time to add the waitingInstructions what you should do is something along the lines of\n else if(instructionType == Type.compute){\n int numberCycles = currInstruction.numberCycles;\n if(currTask.computeTime == 0){\n currTask.computeTime = currInstruction.numberCycles;\n }\n currTask.computeTime -= 1;\n\n //System.out.println(\"Task \" + currTask.taskNumber + \" computes \" + (currInstruction.numberCycles - currTask.computeTime));\n\n addressedSomething = true;\n }else if(instructionType == Type.release){\n int amountReleased = currInstruction.resourceAmount;\n release(resourceType, amountReleased, currTask);\n //System.out.println(\"Task \" + currTask.taskNumber + \" released its resources\");\n addressedSomething = true;\n }else{ // if its terminate\n currTask.terminateTime = time;\n //System.out.println(\"Task \" + currTask.taskNumber + \" terminates at time t = \" + time);\n terminatedCount ++;\n releaseAll(currTask);\n addressedSomething = true;\n }\n if(currTask.computeTime == 0){\n taskPointers[i] ++;\n }\n }\n\n }\n return addressedSomething;\n }",
"public boolean canTravel(int [] necessaryResources) {\r\n\t\tboolean allowTravel = true;\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tif (resources[i] < necessaryResources[i]) allowTravel = false;\r\n\t\t}\r\n\t\treturn allowTravel;\r\n\t}",
"boolean hasNumberOfTasksOnCriticalPath();",
"public boolean interestingTask (Task t) { \n if (!super.interestingTask (t))\n return false;\n boolean hasTransport = t.getVerb().equals (Constants.Verb.TRANSPORT);\n\n if (logger.isDebugEnabled())\n logger.debug (\"found \" + t.getUID() + (hasTransport ? \" interesting\" : \" uninteresting\"));\n\n return hasTransport;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Native function for initializing the renderer. | public native void initRendering(); | [
"public LWJGLRenderer()\r\n {\r\n this.renderedObjectHandler = new LWJGLRenderedObjectHandler();\r\n }",
"public native void loadRenderer(final String renderer);",
"public Mobile(Renderer renderer) { init(new Renderer[]{ renderer }); }",
"public void init() {\r\n shader = createShader();\r\n framebuffer = createFramebuffer();\r\n }",
"public Renderer() {\r\n renderables = new ArrayList<>();\r\n renderables.add(null); //The first background\r\n renderables.add(TextBox.blankText); //The first text box\r\n rendered = new BufferedImage(Main.WIDTH,Main.HEIGHT,BufferedImage.TYPE_INT_ARGB);\r\n focused = -1;\r\n }",
"private final void initializeRenderer(final String filePath) throws IOException {\n // Set the renderer to null in case an error occurs while initializing the renderer\n renderer = null;\n\n initializeFileDescriptor(filePath);\n\n renderer = new PdfRenderer(fileDescriptor);\n }",
"public RendererControl(DisplayImpl dpy)\n {\n super(dpy);\n }",
"public NativeRenderer(View view) {\n this(view, false, false);\n }",
"protected void buildRenderer() {\n if (rendererClass == null) {\n return;\n }\n\n List<Class<? extends Renderer>> interfaces = AuraUtil.findInterfaces(rendererClass, Renderer.class);\n if (!interfaces.isEmpty()) {\n try {\n rendererInstance = (Renderer) rendererClass.newInstance();\n } catch (InstantiationException ie) {\n setParseError(new InvalidDefinitionException(\"Cannot instantiate \" + getLocation(), getLocation(), ie));\n } catch (IllegalAccessException iae) {\n setParseError(new InvalidDefinitionException(\"Constructor is inaccessible for \" + getLocation(),\n getLocation(), iae));\n } catch (RuntimeException e) {\n setParseError(new InvalidDefinitionException(\"Cannot instantiate \" + getLocation(), getLocation(),\n e));\n }\n } else {\n rendererInstance = null;\n }\n }",
"public void init() {\n display = new Display(DEFAULT_NAME, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n Assets.init();\n }",
"private static void init()\r\n {\r\n logger.info( \"initialisation de render des taglibs en fonction de la charte graphique\" );\r\n renders = new HashMap();\r\n if ( WelcomConfigurator.getCharte() == Charte.V2_001 )\r\n {\r\n renders.put( CANVAS_HEADER, new CanvasHeaderRendererV2001() );\r\n renders.put( CANVAS_LEFT, new CanvasLeftMenuTagRendererV2001() );\r\n renders.put( CANVAS, new CanvasRendererV2001() );\r\n renders.put( CANVAS_CENTER, new CanvasCenterRendererV2001() );\r\n renders.put( CANVAS_POPUP, new CanvasPopupRendererV2001() );\r\n if ( isMenuLight() )\r\n {\r\n renders.put( MENU, new MenuSkinLight() );\r\n }\r\n else\r\n {\r\n renders.put( MENU, new MenuSkinV2() );\r\n }\r\n renders.put( BUTTON, new ButtonSkinv1() );\r\n renders.put( FORM_BOTTOM_BAR, new FormulaireBottomRendererV200X() );\r\n renders.put( TABLE, new TableRendererV2001() );\r\n renders.put( TABLE_NAVIGATOR, new TableNavigatorRendererV200X() );\r\n renders.put( ONGLET, new JSOngletRendererV2001() );\r\n renders.put( PROGRESSBAR, new ProgressbarRendererV2001() );\r\n }\r\n else if ( WelcomConfigurator.getCharte() == Charte.V2_002 )\r\n {\r\n renders.put( CANVAS_HEADER, new CanvasHeaderRendererV2002() );\r\n renders.put( CANVAS_LEFT, new CanvasLeftMenuTagRendererV2002() );\r\n renders.put( CANVAS, new CanvasRendererV2002() );\r\n renders.put( CANVAS_CENTER, new CanvasCenterRendererV2002() );\r\n renders.put( CANVAS_POPUP, new CanvasPopupRendererV2002() );\r\n if ( isMenuLight() )\r\n {\r\n renders.put( MENU, new MenuSkinLight() );\r\n }\r\n else\r\n {\r\n renders.put( MENU, new MenuSkinV2() );\r\n }\r\n if ( isButtonSkinv2() )\r\n {\r\n renders.put( BUTTON, new ButtonSkinv2() );\r\n }\r\n else\r\n {\r\n renders.put( BUTTON, new ButtonSkinv3() );\r\n }\r\n renders.put( FORM_BOTTOM_BAR, new FormulaireBottomRendererV200X() );\r\n renders.put( TABLE, new TableRendererV2002() );\r\n renders.put( TABLE_NAVIGATOR, new TableNavigatorRendererV200X() );\r\n renders.put( ONGLET, new JSOngletRendererV2002() );\r\n renders.put( PROGRESSBAR, new ProgressbarRendererV2002() );\r\n\r\n }\r\n else\r\n {\r\n renders.put( CANVAS_HEADER, new CanvasHeaderRendererV3001() );\r\n renders.put( CANVAS_LEFT, new CanvasLeftMenuTagRendererV3001() );\r\n renders.put( CANVAS, new CanvasRendererV3001() );\r\n renders.put( CANVAS_CENTER, new CanvasCenterRendererV3001() );\r\n renders.put( CANVAS_POPUP, new CanvasPopupRendererV3001() );\r\n renders.put( MENU, new MenuSkinV3001() );\r\n renders.put( BUTTON, new ButtonRendererv3001() );\r\n renders.put( FORM_BOTTOM_BAR, new FormulaireBottomRendererV3001() );\r\n renders.put( TABLE, new TableRendererV3001() );\r\n renders.put( ONGLET, new JSOngletRendererV3001() );\r\n renders.put( TABLE_NAVIGATOR, new TableNavigatorRendererV3001() );\r\n renders.put( PROGRESSBAR, new ProgressbarRendererV3001() );\r\n }\r\n\r\n }",
"public LiteRenderer() {\n LOGGER.fine(\"creating new lite renderer\");\n }",
"Renderer getRenderer();",
"@Test\n public void testSetRenderer() {\n System.out.println(\"setRenderer\");\n RenderingsManager m = new RenderingsManager();\n Graph.setRenderer(m);\n }",
"private void initializeRendering(){\n // Initialize camera object\n OrthographicCamera camera = new OrthographicCamera();\n\n // for card deck\n float cardDeckSize = 1.5f;\n\n // for side menu scaling\n float sideMenuSize = 2f;\n\n // Set camera to orthographic, size board dimensions\n camera.setToOrtho(false, BOARD_X + (sideMenuSize*2), BOARD_Y +(cardDeckSize)*2);\n // Set camera X-position\n camera.position.x = (BOARD_X/2)+(sideMenuSize);\n camera.position.y = (BOARD_Y/2)-(cardDeckSize);\n camera.update();\n\n // Initialize renderer v--- 300F is tile size\n renderer = new OrthogonalTiledMapRenderer(tiledMap, 1F/300F);\n // Set renderer to view camera\n renderer.setView(camera);\n }",
"public void Initialize()\n\t{\n\t\tsetObject(new GraphicsLayer());\n\t}",
"public ReflectionRenderer() {\n\t\tthis(0.35f, 0.4f, false);\n\t}",
"public RenderSystem() {\n super(SystemType.RENDER);\n bufferBuffer =\n new MasterBuffer(\n voide.resources.Resources\n .get()\n .getResource(\"voide.packed_texture\", Texture.class)\n .getTextureId()\n );\n master =\n new MasterRenderer(Constants.GAME_WIDTH, Constants.GAME_HEIGHT);\n }",
"@Override\n public void init() throws Exception {\n // On Mac OS X Chromium engine must be initialized in non-UI thread.\n if (Environment.isMac()) {\n BrowserCore.initialize();\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs all business rules needed prior to routing. This includes both common rules for all maintenance documents, plus classspecific business rules. Will return false if any business rule fails, or if the document is in an invalid state, and not routable (see isDocumentValidForRouting()). | public abstract boolean processRouteDocument(Document document); | [
"protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document) {\r\n return true;\r\n }",
"@Override\n protected boolean doCustomPreRules(MaintenanceDocument document) {\n ReceivingAddress raOld = (ReceivingAddress) document.getOldMaintainableObject().getBusinessObject();\n ReceivingAddress raNew = (ReceivingAddress) document.getNewMaintainableObject().getBusinessObject();\n\n /* The fields that affect the rule are the default and active indicators. \n * According to the create/copy/edit action, and various combinations of updates to these two fields, \n * including unchanged (No->NO or Yes->Yes), set (No->Yes), unset (Yes->No), the rule checking will \n * proceed respectively. The following boolean variables indicates the various updates and combinations.\n */\n boolean isNew = document.isNew();\n boolean isEdit = document.isEdit();\n boolean wasActive = isEdit && raOld.isActive();\n boolean wasDefault = isEdit && raOld.isDefaultIndicator();\n boolean isActive = raNew.isActive();\n boolean isDefault = raNew.isDefaultIndicator();\n boolean stayActive = wasActive && isActive;\n boolean stayDefault = wasDefault && isDefault;\n boolean setActive = (isNew || !wasActive) && isActive;\n boolean unsetActive = wasActive && !isActive;\n boolean setDefault = (isNew || !wasDefault) && isDefault;\n boolean unsetDefault = wasDefault && !isDefault; \n \n /* Check whether there're other active RA exist.\n * We only need to search within the same chart/org group, since we don't allow editting on chart/org.\n * However, we need to exclude the current address being edited if it is not a new one and was active.\n */ \n /*\n Map criteria = new HashMap();\n criteria.put(OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE, raNew.getChartOfAccountsCode());\n criteria.put(OLEPropertyConstants.ORGANIZATION_CODE, raNew.getOrganizationCode());\n //criteria.put(PurapPropertyConstants.RCVNG_ADDR_DFLT_IND, true); \n criteria.put(PurapPropertyConstants.RCVNG_ADDR_ACTIVE, true); \n int count = SpringContext.getBean(BusinessObjectService.class).countMatching(ReceivingAddress.class, criteria);\n */\n int count = SpringContext.getBean(ReceivingAddressService.class).countActiveByChartOrg(raNew.getChartOfAccountsCode(), raNew.getOrganizationCode());\n boolean existOther = wasActive ? (count > 1) : (count > 0);\n \n /* Case 1 - adding the first active address: \n * Force it to be the default one.\n */\n if (setActive && !isDefault && !existOther) {\n raNew.setDefaultIndicator(true);\n }\n /* Case 2 - switching the default address from another one to this one: \n * Give warning; if proceed, will unset the other default address in post-processing.\n */\n else if ((stayActive && setDefault) || (setActive && isDefault && existOther)) {\n if (!super.askOrAnalyzeYesNoQuestion(PurapConstants.CONFIRM_CHANGE_DFLT_RVNG_ADDR, PurapConstants.CONFIRM_CHANGE_DFLT_RVNG_ADDR_TXT)) {\n abortRulesCheck();\n }\n }\n /* Case 3 - unsetting the default address that's still active:\n * Give error: Can't unset the default address; you must set another default address to replace this one. \n */\n else if (stayActive && unsetDefault) {\n putFieldError(PurapPropertyConstants.RECEIVING_ADDRESS_DEFAULT_INDICATOR, PurapKeyConstants.ERROR_RCVNG_ADDR_UNSET_DFLT);\n abortRulesCheck();\n return false;\n }\n /* Case 4 - deactivating the default address while there're still other active ones:\n * Give error: Can't deactivate the default address when there're still other active ones;\n * you must set another default address first.\n */\n else if (unsetActive && wasDefault && existOther) {\n putFieldError(PurapPropertyConstants.BO_ACTIVE, PurapKeyConstants.ERROR_RCVNG_ADDR_DEACTIVATE_DFLT);\n abortRulesCheck();\n return false;\n } \n /* Other cases are harmless, i.e. won't break the constraint, so we can proceed without doing anything extra.\n */\n\n return true;\n }",
"public interface MaintenanceDocumentRule {\n\n /**\n * Runs all business rules needed prior to saving. This includes both common rules for all maintenance documents,\n * plus class-specific business rules.\n *\n * Will only return false if it fails the isValidForSave() test. Otherwise, it will always return positive\n * regardless of the outcome of the business rules. However, any error messages resulting from the business rules\n * will still be populated, for display to the consumer of this service.\n *\n * @see org.kuali.rice.krad.rules.rule.SaveDocumentRule#processSaveDocument(org.kuali.rice.krad.document.Document)\n */\n public abstract boolean processSaveDocument(Document document);\n\n /**\n * Runs all business rules needed prior to routing. This includes both common rules for all maintenance documents,\n * plus class-specific business rules.\n *\n * Will return false if any business rule fails, or if the document is in an invalid state, and not routable (see\n * isDocumentValidForRouting()).\n *\n * @see org.kuali.rice.krad.rules.rule.RouteDocumentRule#processRouteDocument(org.kuali.rice.krad.document.Document)\n */\n public abstract boolean processRouteDocument(Document document);\n\n /**\n * Runs all business rules needed prior to approving. This includes both common rules for all maintenance documents,\n * plus class-specific business rules.\n *\n * Will return false if any business rule fails, or if the document is in an invalid state, and not approvable (see\n * isDocumentValidForApproving()).\n *\n * @see org.kuali.rice.krad.rules.rule.ApproveDocumentRule#processApproveDocument(org.kuali.rice.krad.rules.rule.event.ApproveDocumentEvent)\n */\n public abstract boolean processApproveDocument(ApproveDocumentEvent approveEvent);\n\n /**\n * Runs all business rules needed prior to adding a collection to a line. This includes both common rules for all\n * maintenance documents, plus class-specific business rules.\n *\n * Will return false if any business rule fails.\n *\n * @see org.kuali.rice.krad.rules.rule.AddCollectionLineRule#processAddCollectionLine(org.kuali.rice.krad.rules.rule.event.AddCollectionLineEvent)\n */\n public abstract boolean processAddCollectionLine(AddCollectionLineEvent addEvent);\n\n /**\n * Sets the convenience objects like newAccount and oldAccount, so you have short and easy handles to the new and\n * old objects contained in the maintenance document.\n *\n * It also calls the BusinessObjectBase.refresh(), which will attempt to load all sub-objects from the DB by their\n * primary keys, if available.\n *\n * @param document - the maintenanceDocument being evaluated\n */\n public void setupBaseConvenienceObjects(MaintenanceDocument document);\n\n /**\n * Should always be overriden if a subclass is created.\n *\n * The goal for this is to cast the oldBo and newBo into the correct types of the subclass.\n */\n public void setupConvenienceObjects();\n}",
"protected boolean isDocumentValidForRouting(MaintenanceDocument maintenanceDocument) {\r\n boolean success = true;\r\n\r\n success &= validateDocument((Document) maintenanceDocument);\r\n success &= validateMaintenanceDocument(maintenanceDocument);\r\n\r\n return success;\r\n }",
"protected boolean processCustomSaveDocumentBusinessRules(MaintenanceDocument document) {\r\n return true;\r\n }",
"@Override\n public void defineRules() {\n addRule(RuleBuilder.create().withFactType(EventValidationBean.class).withResultType(ValidationRulesResult.class)\n .when(facts ->\n facts.getOne().isThePanelsTheSameforCurrentAndPreviousEvents()\n )\n .using(\"isThePanelsTheSameforCurrentAndPreviousEvents()\")\n .then((facts, result) -> result.setValue( ValidationRulesResult.builder().reason(POSSIBLE_TIME_DISTANCE_EVENT).validEvent(true).build() ))\n .stop()\n .build());\n\n\n // add a rule which evaluates if its possible to walk between events\n addRule(RuleBuilder.create().withFactType(EventValidationBean.class).withResultType(ValidationRulesResult.class)\n .when(facts ->\n facts.getOne().isItPossibleToWalkBetweenCurrentAndPreviousEvent()\n )\n .using(\"isItPossibleToWalkBetweenCurrentAndPreviousEvent()\")\n .then((facts, result) -> result.setValue( ValidationRulesResult.builder().reason(POSSIBLE_TIME_DISTANCE_EVENT).validEvent(true).build() ))\n .stop()\n .build());\n\n // add a rule which evaluates if its possible to walk and take elevators between events\n addRule(RuleBuilder.create().withFactType(EventValidationBean.class).withResultType(ValidationRulesResult.class)\n .when(facts ->\n facts.getOne().isItPossibleToWalkAndTakeElevatorBetweenCurrentAndPreviousEvent()\n )\n .using(\"isItPossibleToWalkAndTakeElevatorBetweenCurrentAndPreviousEvent()\")\n .then((facts, result) -> result.setValue( ValidationRulesResult.builder().reason(POSSIBLE_TIME_DISTANCE_EVENT).validEvent(true).build() ))\n .stop()\n .build());\n\n\n // evaluate only if preceding rules fails\n // add a rule which evaluates if not possible to drive between events\n addRule(RuleBuilder.create().withFactType(EventValidationBean.class).withResultType(ValidationRulesResult.class)\n .when(facts ->\n facts.getOne().isItPossibleToDriveBetweenCurrentAndPreviousEvent()\n )\n .using(\".isItPossibleToDriveBetweenCurrentAndPreviousEvent()\")\n .then((facts, result) -> result.setValue( ValidationRulesResult.builder().reason(POSSIBLE_TIME_DISTANCE_EVENT).validEvent(true).build() ))\n .stop()\n .build());\n\n // evaluate only if preceding rules fails\n // add a rule which evaluates if its not possible to fly + drive between events\n addRule(RuleBuilder.create().withFactType(EventValidationBean.class).withResultType(ValidationRulesResult.class)\n .when(facts ->\n facts.getOne().isItPossibleToFlyAndDriveBetweenCurrentAndPreviousEvent()\n )\n .using(\".isItPossibleToFlyAndDriveBetweenCurrentAndPreviousEvent()\")\n .then((facts, result) -> result.setValue( ValidationRulesResult.builder().reason(POSSIBLE_TIME_DISTANCE_EVENT).validEvent(true).build() ))\n .stop()\n .build());\n\n // evaluate only if preceding rules fails\n // add this rule so that if all other rules fail it must be an immpossible event\n addRule(RuleBuilder.create().withFactType(EventValidationBean.class).withResultType(ValidationRulesResult.class)\n .using(\"add this rule so that if all other rules fail it must be an immpossible event\")\n .then((facts, result) -> result.setValue( ValidationRulesResult.builder().reason(IMPOSSIBLE_TIME_DISTANCE_EVENT).validEvent(false).build() ))\n .stop()\n .build());\n\n\n }",
"@Test\r\n public void testCheckOnlyOnePrimaryRoute_allPrimaryDoesNotExist() {\r\n DelegateRule rule = new DelegateRule();\r\n newDelegate = delegateWithAllDocTypeOpen();\r\n maintDoc = newMaintDoc(newDelegate);\r\n\r\n rule = (DelegateRule) setupMaintDocRule(newDelegate, rule.getClass());\r\n // now we need to setup the convenience objects so that the rule has the right\r\n // delegate values\r\n rule.setupConvenienceObjects(maintDoc);\r\n\r\n // confirm that there are no errors to begin with\r\n assertGlobalMessageMapEmpty();\r\n rule.checkOnlyOnePrimaryRoute(maintDoc);\r\n assertGlobalMessageMapEmpty();\r\n }",
"protected boolean checkForWorkflowRoutingRequests(AccountingDocument document, Person person) {\n KualiWorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();\n\n if (workflowDocument.isApprovalRequested() || workflowDocument.isAcknowledgeRequested() || workflowDocument.isFYIRequested()) {\n return true;\n }\n\n return false;\n }",
"private void initRoutingRules() {\n // add a routing\n JsonObject rules = new JsonObject();\n rules = TestUtils.addRoutingRuleMainStorage(rules);\n rules = TestUtils.addRoutingRuleHooks(rules);\n\n String requestUrlBase = AbstractTest.SERVER_ROOT + \"/data/\";\n targetUrlBase = \"/masterdata/parent/\";\n String targetUrl = AbstractTest.SERVER_ROOT + targetUrlBase;\n\n JsonObject headers = new JsonObject();\n headers.put(\"x-merge-collections\", targetUrl);\n\n JsonObject mergeRule = TestUtils.createRoutingRule(ImmutableMap.of(\n \"path\", \"/data/$1\",\n \"staticHeaders\", headers\n ));\n\n rules = TestUtils.addRoutingRule(rules, requestUrlBase + \"(.*)\", mergeRule);\n\n // rules for dynamic routing\n // -----\n targetUrl = AbstractTest.SERVER_ROOT + \"/tests/gateleen/routesource/\";\n headers = new JsonObject();\n headers.put(\"x-merge-collections\", targetUrl);\n\n mergeRule = TestUtils.createRoutingRule(ImmutableMap.of(\n \"path\", \"/dynamicdata/$1\",\n \"staticHeaders\", headers\n ));\n\n rules = TestUtils.addRoutingRule(rules, AbstractTest.SERVER_ROOT + \"/dynamicdata/\" + \"(.*)\", mergeRule);\n // -----\n\n\n\n TestUtils.putRoutingRules(rules);\n }",
"private boolean processProposalRequiredFieldsBusinessRule(ProposalDevelopmentDocument proposalDevelopmentDocument) {\n boolean valid = true;\n\n MessageMap errorMap = GlobalVariables.getMessageMap();\n DataDictionaryService dataDictionaryService = KraServiceLocator.getService(DataDictionaryService.class);\n\n /*\n proposalDevelopmentDocument.getDevelopmentProposal().refreshReferenceObject(\"sponsor\");\n if (proposalDevelopmentDocument.getDevelopmentProposal().getSponsorCode() != null\n && proposalDevelopmentDocument.getDevelopmentProposal().getSponsor() == null) {\n valid = false;\n errorMap.putError(\"sponsorCode\", KeyConstants.ERROR_MISSING, dataDictionaryService.getAttributeErrorLabel(\n DevelopmentProposal.class, \"sponsorCode\"));\n }\n */\n //\n // we MUST check the TYPE of KualiForm since it is acually possible for the form object to be of type ProtocolForm (IRB) and IacucProtocolForm \n // since when a DevProposal is created as a Funding Source of a Protocol it creates a DevProp and saves it, which triggers\n // this rules class\n KualiForm form = KNSGlobalVariables.getKualiForm();\n\n if (form instanceof ProposalDevelopmentForm) {\n ProposalDevelopmentForm proposalForm = (ProposalDevelopmentForm) form;\n\n //if either is missing, it should be caught on the DD validation.\n if (proposalForm.isProjectDatesRequired() && proposalDevelopmentDocument.getDevelopmentProposal().getRequestedStartDateInitial() != null\n && proposalDevelopmentDocument.getDevelopmentProposal().getRequestedEndDateInitial() != null) {\n\n if (proposalDevelopmentDocument.getDevelopmentProposal().getRequestedStartDateInitial().after(\n proposalDevelopmentDocument.getDevelopmentProposal().getRequestedEndDateInitial())) {\n\n valid = false;\n errorMap.putError(\"requestedStartDateInitial\", KeyConstants.ERROR_START_DATE_AFTER_END_DATE,\n new String[]{dataDictionaryService.getAttributeErrorLabel(DevelopmentProposal.class, \"requestedStartDateInitial\"),\n dataDictionaryService.getAttributeErrorLabel(DevelopmentProposal.class, \"requestedEndDateInitial\")});\n }\n }\n\n ProposalDevelopmentService proposalDevelopmentService = KraServiceLocator.getService(ProposalDevelopmentService.class);\n\n if (StringUtils.isNotBlank(proposalDevelopmentDocument.getDevelopmentProposal().getCurrentAwardNumber())) {\n if (proposalDevelopmentService.getProposalCurrentAwardVersion(proposalDevelopmentDocument) == null) {\n valid = false;\n errorMap.putError(\"currentAwardNumber\", KeyConstants.ERROR_MISSING,\n dataDictionaryService.getAttributeErrorLabel(DevelopmentProposal.class, \"currentAwardNumber\"));\n }\n }\n\n // check first to ensure ProposalNumber is NOT null, as it can be during a Proposal Copy Operation for some odd reason due to DeepCopy issue\n if (proposalDevelopmentDocument.getDevelopmentProposal().getProposalNumber()!=null &&\n proposalForm.isDisplayProposalCoordinator() && proposalForm.isProposalCoordinatorRequired()) {\n if (proposalDevelopmentDocument.getDevelopmentProposal().getProposalCoordinatorPrincipalName() == null) {\n valid = false;\n errorMap.putError(\"proposalCoordinatorPrincipalName\", KeyConstants.ERROR_MISSING,\n dataDictionaryService.getAttributeErrorLabel(DevelopmentProposal.class, \"proposalCoordinatorPrincipalName\"));\n }\n }\n\n if (StringUtils.isNotBlank(proposalDevelopmentDocument.getDevelopmentProposal().getContinuedFrom())) {\n if (proposalDevelopmentService.getProposalContinuedFromVersion(proposalDevelopmentDocument) == null) {\n valid = false;\n errorMap.putError(\"continuedFrom\", KeyConstants.ERROR_MISSING,\n dataDictionaryService.getAttributeErrorLabel(DevelopmentProposal.class, \"continuedFrom\"));\n }\n }\n\n if (proposalForm.isDisplayExecutiveSummary()) {\n final String entryName = DevelopmentProposal.class.getCanonicalName();\n DataObjectEntry entry = dataDictionaryService.getDataDictionary().getDataObjectEntry(entryName);\n AttributeDefinition defn = (AttributeDefinition) entry.getAttributeDefinition(\"executiveSummary\");\n\n if (defn.getWordCountConstraint() != null) {\n\n try {\n String execSum = proposalDevelopmentDocument.getDevelopmentProposal().getExecutiveSummary();\n \n // null-check here is very important. If the first arg to getDictionaryValidationService().validate\n // is NULL, it causes NullPointer to be thrown several levels down the stack.\n if(execSum == null) {\n execSum = \"\";\n }\n\n DictionaryValidationResult result = getDictionaryValidationService().validate(execSum, entry.getName(), entry, false);\n DataDictionaryEntry dictEntry = getDataDictionaryService().getDataDictionary().getDictionaryObjectEntry(entryName);\n AttributeValueReader attrReaderExisting = new DictionaryObjectAttributeValueReader(proposalDevelopmentDocument.getDevelopmentProposal(),\n entryName, dictEntry);\n attrReaderExisting.setAttributeName(defn.getName());\n\n WordCountConstraintProcessor wcp = new WordCountConstraintProcessor();\n ProcessorResult procRes = wcp.process(result, execSum, defn.getWordCountConstraint(), attrReaderExisting);\n\n if (procRes != null && procRes.getConstraintValidationResults() != null) {\n\n ConstraintValidationResult cvres = procRes.getConstraintValidationResults().get(0);\n\n if (cvres != null && cvres.getStatus() == ErrorLevel.ERROR) {\n valid = false;\n errorMap.putError(\"executiveSummary\", Constants.MESSAGE_WORD_COUNT_EXCEEDED,\n new String[]{dataDictionaryService.getAttributeErrorLabel(DevelopmentProposal.class, \"executiveSummary\"),\n String.valueOf(cvres.getErrorParameters()[1])});\n }\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n return valid;\n }",
"@Test\r\n public void testCheckOnlyOnePrimaryRoute_allPrimaryAlreadyExists() {\r\n DelegateRule rule = new DelegateRule();\r\n newDelegate = delegateWithDocTypeAll();\r\n maintDoc = newMaintDoc(newDelegate);\r\n\r\n rule = (DelegateRule) setupMaintDocRule(newDelegate, rule.getClass());\r\n // now we need to setup the convenience objects so that the rule has the right\r\n // delegate values\r\n rule.setupConvenienceObjects(maintDoc);\r\n\r\n // confirm that there are no errors to begin with\r\n assertGlobalMessageMapEmpty();\r\n rule.checkOnlyOnePrimaryRoute(maintDoc);\r\n assertGlobalMessageMapEmpty();\r\n }",
"protected boolean requiresTravelerApprovalRouting() {\n //If there's travel advances, route to traveler if necessary\n return requiresTravelAdvanceReviewRouting() && !getTravelAdvance().getTravelAdvancePolicy();\n }",
"@Test\r\n public void testCheckOnlyOnePrimaryRoute_specificPrimaryAlreadyExistsAllFails() {\r\n DelegateRule rule = new DelegateRule();\r\n newDelegate = delegateWithSpecificTypeClosedAllSpecified();\r\n maintDoc = newMaintDoc(newDelegate);\r\n\r\n rule = (DelegateRule) setupMaintDocRule(newDelegate, rule.getClass());\r\n // now we need to setup the convenience objects so that the rule has the right\r\n // delegate values\r\n rule.setupConvenienceObjects(maintDoc);\r\n\r\n // confirm that there are no errors to begin with\r\n assertGlobalMessageMapEmpty();\r\n rule.checkOnlyOnePrimaryRoute(maintDoc);\r\n assertGlobalMessageMapEmpty();\r\n }",
"protected abstract boolean ruleCheck();",
"private boolean scanPreconditions()\n\t\t{\n\t\t\tboolean statusChanged = false;\n\t\t\t\n\t\t\t//Conditional activity\n\t\t\tif(TravelToCustomer.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTravelToCustomer act = new TravelToCustomer(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Travel to Customer. \");\n\t\t\t}\n\t\t\t\n\t\t\tif(TakingLunch.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTakingLunch act = new TakingLunch(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Take Lunch. \");\n\t\t\t}\n\t\t\t\n\t\t\t// Do not change the status if already true\n\t\t\tif(statusChanged) scanInterruptPreconditions();\n\t\t\telse statusChanged = scanInterruptPreconditions();\n\t\t\treturn(statusChanged);\n\t\t}",
"@Test\n public void testProcessProtocolResearchAreaBusinessRules() throws Exception {\n ProtocolDocument document = getNewProtocolDocument();\n setProtocolRequiredFields(document);\n // check case 1\n assertTrue(rule.processProtocolResearchAreaBusinessRules(document));\n \n // check case 2\n ProtocolResearchArea dummyPRA0 = new ProtocolResearchArea();\n ResearchArea dummyRA0 = new ResearchArea();\n dummyRA0.setActive(true);\n dummyPRA0.setResearchAreas(dummyRA0);\n \n ProtocolResearchArea dummyPRA1 = new ProtocolResearchArea();\n ResearchArea dummyRA1 = new ResearchArea();\n dummyRA1.setActive(true);\n dummyPRA1.setResearchAreas(dummyRA1);\n \n ProtocolResearchArea dummyPRA2 = new ProtocolResearchArea();\n ResearchArea dummyRA2 = new ResearchArea();\n dummyRA2.setActive(true);\n dummyPRA2.setResearchAreas(dummyRA2);\n \n ProtocolResearchArea dummyPRA3 = new ProtocolResearchArea();\n ResearchArea dummyRA3 = new ResearchArea();\n dummyRA3.setActive(true);\n dummyPRA3.setResearchAreas(dummyRA3);\n \n List<ProtocolResearchAreaBase> pras = new ArrayList<ProtocolResearchAreaBase>();\n pras.add(dummyPRA0);\n pras.add(dummyPRA1);\n pras.add(dummyPRA2);\n pras.add(dummyPRA3);\n \n document.getProtocol().setProtocolResearchAreas(pras);\n \n assertTrue(document.getProtocol().getProtocolResearchAreas(0).getResearchAreas().isActive());\n assertTrue(document.getProtocol().getProtocolResearchAreas(1).getResearchAreas().isActive());\n assertTrue(document.getProtocol().getProtocolResearchAreas(2).getResearchAreas().isActive());\n assertTrue(document.getProtocol().getProtocolResearchAreas(3).getResearchAreas().isActive());\n \n assertTrue(rule.processProtocolResearchAreaBusinessRules(document));\n \n // check case 3\n assertTrue(document.getProtocol().getProtocolResearchAreas(0).getResearchAreas().isActive());\n \n dummyRA1.setActive(false);\n assertFalse(document.getProtocol().getProtocolResearchAreas(1).getResearchAreas().isActive());\n \n assertTrue(document.getProtocol().getProtocolResearchAreas(2).getResearchAreas().isActive());\n \n dummyRA3.setActive(false);\n assertFalse(document.getProtocol().getProtocolResearchAreas(3).getResearchAreas().isActive());\n \n assertFalse(rule.processProtocolResearchAreaBusinessRules(document));\n String errorPropertyKey = INACTIVE_RESEARCH_AREAS_PREFIX + SEPERATOR + \"1.3.\";\n assertError(errorPropertyKey, KeyConstants.ERROR_PROTOCOL_RESEARCH_AREA_INACTIVE);\n }",
"@Test\r\n public void testCheckOnlyOnePrimaryRoute_specificPrimaryDoesNotExist() {\r\n DelegateRule rule = new DelegateRule();\r\n newDelegate = delegateWithSpecificDocTypeOpen();\r\n maintDoc = newMaintDoc(newDelegate);\r\n\r\n rule = (DelegateRule) setupMaintDocRule(newDelegate, rule.getClass());\r\n // now we need to setup the convenience objects so that the rule has the right\r\n // delegate values\r\n rule.setupConvenienceObjects(maintDoc);\r\n\r\n // confirm that there are no errors to begin with\r\n assertGlobalMessageMapEmpty();\r\n rule.checkOnlyOnePrimaryRoute(maintDoc);\r\n assertGlobalMessageMapEmpty();\r\n }",
"private boolean requiresRiskManagementReviewRouting() {\n // Right now this works just like International Travel Reviewer, but may change for next version\n if (ObjectUtils.isNotNull(this.getTripTypeCode()) && getParameterService().getParameterValuesAsString(TemParameterConstants.TEM_DOCUMENT.class, TravelParameters.INTERNATIONAL_TRIP_TYPES).contains(this.getTripTypeCode())) {\n return true;\n }\n if (!ObjectUtils.isNull(getTraveler()) && getTraveler().isLiabilityInsurance()) {\n return true;\n }\n return false;\n }",
"protected boolean shouldStartRoutes() {\n return isStarted() && !isStarting();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Profit Price Std Entered | public void setBSCA_ProfitPriceStdEntered (BigDecimal BSCA_ProfitPriceStdEntered); | [
"public void setProfit(double profit)\n {\n this.profit = profit;\n }",
"public void setPriceStdEntered (BigDecimal PriceStdEntered);",
"public void setPriceStd (BigDecimal PriceStd);",
"public void setProfit(double profit) {\n\t\tthis.profit = profit;\n\t}",
"public void setPriceStdOld (BigDecimal PriceStdOld);",
"public void setBSCA_ProfitPriceStd (BigDecimal BSCA_ProfitPriceStd);",
"public void setProfit(float profit) {\n\t\tthis.profit = profit;\n\t}",
"public void setPercentageProfitPStd (BigDecimal PercentageProfitPStd);",
"public double getProfitValue() {\n return profitValue;\n }",
"public void setBSCA_ProfitPriceLimitEntered (BigDecimal BSCA_ProfitPriceLimitEntered);",
"public BigDecimal getBSCA_ProfitPriceStdEntered();",
"public void setTaxAmtPriceStd (BigDecimal TaxAmtPriceStd);",
"public void setRateProfit(BigDecimal rateProfit) {\n this.rateProfit = rateProfit;\n }",
"public double getProfit() {\r\n return profit;\r\n }",
"public void setBSCA_ProfitPriceListEntered (BigDecimal BSCA_ProfitPriceListEntered);",
"public void setProfit(java.lang.String profit) {\n this.profit = profit;\n }",
"public void calculatePrice() {\n\t\tthis.price = this.basePrice.multiply(BigDecimal.valueOf(1).add(profitMargin));\n\t}",
"public void setPriceStdWTax (BigDecimal PriceStdWTax);",
"public void setPercentageProfitPLimit (BigDecimal PercentageProfitPLimit);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default Empty Constructor for class ShBuilderAccept | public ShBuilderAccept () {
super();
} | [
"Accept createAccept();",
"public ShBuilderApply () {\n\t\tsuper();\n\t}",
"private AcceptReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public ConsumerCommand() { }",
"private Challenge(Builder builder) {\n super(builder);\n }",
"public DefaultNashRequestImpl() {\n\t\t\n\t}",
"private Construct(Builder builder) {\n super(builder);\n }",
"private AcceptRes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Builder() {}",
"private ServerCommands(Builder builder) {\n super(builder);\n }",
"public Hamster() {\n\t}",
"private RequestControlStream(Builder builder) {\n super(builder);\n }",
"public Agent() {\n this(null, false);\n }",
"public EasyBot(){\n super();\n }",
"private CarSharingStation(Builder builder) {\r\n super(builder);\r\n }",
"private Argument(Builder builder) {\n super(builder);\n }",
"private PBZJHPoker(Builder builder) {\n super(builder);\n }",
"private AgentAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public CmdStream() {\n\t\tsuper();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
========================================================================= Parse nonterminal parsers.rats.xml.xml.SingleQuotedPart. | private Result pSingleQuotedPart(final int yyStart) throws IOException {
int yyC;
int yyIndex;
Result yyResult;
Result yyPredResult;
boolean yyPredMatched;
int yyRepetition1;
boolean yyRepeated1;
Void yyValue;
ParseError yyError = ParseError.DUMMY;
// Alternative 1.
yyRepetition1 = yyStart;
yyRepeated1 = false;
while (true) {
yyPredMatched = false;
yyPredResult = pSingleQuotedPart$$Choice1(yyRepetition1);
if (yyPredResult.hasValue()) {
yyPredMatched = true;
}
if (! yyPredMatched) {
yyC = character(yyRepetition1);
if (-1 != yyC) {
yyIndex = yyRepetition1 + 1;
yyRepetition1 = yyIndex;
yyRepeated1 = true;
continue;
}
} else {
yyError = yyError.select("single quoted part expected", yyStart);
}
break;
}
if (yyRepeated1) {
yyValue = null;
return new SemanticValue(yyValue, yyRepetition1, yyError);
}
// Alternative 2.
yyResult = pRef(yyStart);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
yyValue = null;
return yyResult.createValue(yyValue, yyError);
}
// Done.
yyError = yyError.select("single quoted part expected", yyStart);
return yyError;
} | [
"private Result pSingleQuotedPart$$Choice1(final int yyStart) \n throws IOException {\n\n int yyC;\n int yyIndex;\n Void yyValue;\n ParseError yyError = ParseError.DUMMY;\n\n // Alternative 1.\n\n yyC = character(yyStart);\n if (-1 != yyC) {\n yyIndex = yyStart + 1;\n\n switch (yyC) {\n case '&':\n {\n yyValue = null;\n\n return new SemanticValue(yyValue, yyIndex, yyError);\n }\n\n case '\\'':\n {\n yyValue = null;\n\n return new SemanticValue(yyValue, yyIndex, yyError);\n }\n\n case '<':\n {\n yyValue = null;\n\n return new SemanticValue(yyValue, yyIndex, yyError);\n }\n\n default:\n /* No match. */\n }\n }\n\n // Done.\n yyError = yyError.select(\"single quoted part expected\", yyStart);\n return yyError;\n }",
"private Result pDoubleQuotedPart$$Choice1(final int yyStart) \n throws IOException {\n\n int yyC;\n int yyIndex;\n Void yyValue;\n ParseError yyError = ParseError.DUMMY;\n\n // Alternative 1.\n\n yyC = character(yyStart);\n if (-1 != yyC) {\n yyIndex = yyStart + 1;\n\n switch (yyC) {\n case '&':\n {\n yyValue = null;\n\n return new SemanticValue(yyValue, yyIndex, yyError);\n }\n\n case '\\\"':\n {\n yyValue = null;\n\n return new SemanticValue(yyValue, yyIndex, yyError);\n }\n\n case '<':\n {\n yyValue = null;\n\n return new SemanticValue(yyValue, yyIndex, yyError);\n }\n\n default:\n /* No match. */\n }\n }\n\n // Done.\n yyError = yyError.select(\"double quoted part expected\", yyStart);\n return yyError;\n }",
"private Result pDoubleQuotedPart(final int yyStart) throws IOException {\n int yyC;\n int yyIndex;\n Result yyResult;\n Result yyPredResult;\n boolean yyPredMatched;\n int yyRepetition1;\n boolean yyRepeated1;\n Void yyValue;\n ParseError yyError = ParseError.DUMMY;\n\n // Alternative 1.\n\n yyRepetition1 = yyStart;\n yyRepeated1 = false;\n while (true) {\n\n yyPredMatched = false;\n\n yyPredResult = pDoubleQuotedPart$$Choice1(yyRepetition1);\n if (yyPredResult.hasValue()) {\n\n yyPredMatched = true;\n }\n\n if (! yyPredMatched) {\n\n yyC = character(yyRepetition1);\n if (-1 != yyC) {\n yyIndex = yyRepetition1 + 1;\n\n yyRepetition1 = yyIndex;\n yyRepeated1 = true;\n continue;\n }\n } else {\n yyError = yyError.select(\"double quoted part expected\", yyStart);\n }\n break;\n }\n\n if (yyRepeated1) {\n\n yyValue = null;\n\n return new SemanticValue(yyValue, yyRepetition1, yyError);\n }\n\n // Alternative 2.\n\n yyResult = pRef(yyStart);\n yyError = yyResult.select(yyError);\n if (yyResult.hasValue()) {\n\n yyValue = null;\n\n return yyResult.createValue(yyValue, yyError);\n }\n\n // Done.\n yyError = yyError.select(\"double quoted part expected\", yyStart);\n return yyError;\n }",
"private Quoted parseQuoted() {\n skipWs();\n int offset = 0;\n boolean escaped = false;\n\n // Check if this is the start of an escaped string.\n char ch = peek();\n if (ch == TILDE) {\n escaped = true;\n offset++;\n }\n\n // Check if this is the start of a quoted string.\n char delim = peek(offset);\n if (delim != APOSTROPHE && delim != QUOTATION_MARK) {\n return null;\n }\n\n Buffer buf = context.acquireBuffer();\n seek(offset + 1);\n while (index < length) {\n ch = peek();\n seek1();\n\n // Stop if we've just found the terminating delimiter or EOF\n if (ch == delim || ch == EOF) {\n break;\n }\n\n if (ch == LINE_FEED) {\n // Should be a serious error, but not sure this can even happen at this point.\n // Just avoid appending it for now.\n continue;\n }\n\n buf.append(ch);\n // Append all characters except backslash escape\n if (ch != '\\\\') {\n continue;\n }\n\n // Append the next character if not EOF, e.g. it may be an escaped delimiter.\n ch = peek();\n if (ch != EOF) {\n buf.append(ch);\n seek1();\n }\n }\n List<Node> parts = Arrays.<Node>asList(new Anonymous(buf.toString()));\n context.returnBuffer();\n return new Quoted(delim, escaped, parts);\n }",
"private void doctypePublicIdentifierSingleQuotedState()\n throws SAXException, IOException {\n for (;;) {\n /*\n * Consume the next input character:\n */\n char c = read();\n switch (c) {\n case '\\'':\n /*\n * U+0027 APOSTROPHE (') Switch to the after DOCTYPE public\n * identifier state.\n */\n publicIdentifier = longStrBufToString();\n afterDoctypePublicIdentifierState();\n return;\n case '\\u0000':\n /* EOF Parse error. */\n err(\"End of file inside public identifier.\");\n /*\n * Set the DOCTYPE token's correctness flag to incorrect.\n * Emit that DOCTYPE token.\n */\n tokenHandler.doctype(doctypeName, longStrBufToString(),\n null, false);\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the current input character to the\n * current DOCTYPE token's public identifier.\n */\n appendLongStrBuf(c);\n /*\n * Stay in the DOCTYPE public identifier (single-quoted)\n * state.\n */\n continue;\n }\n }\n }",
"private Object parseSingle() {\n Object ret = null;\n \n // c == -1 --> done\n if (c == -1){\n \n }\n else if (c == '('){\n ret = parseList();\n }\n else if (c == '\"' || c == '\\''){\n ret = parseString();\n }\n else {\n ret = parseAtom();\n }\n return ret;\n }",
"private void doctypeSystemIdentifierSingleQuotedState()\n throws SAXException, IOException {\n for (;;) {\n /*\n * Consume the next input character:\n */\n char c = read();\n switch (c) {\n case '\\'':\n /*\n * U+0027 APOSTROPHE (') Switch to the after DOCTYPE system\n * identifier state.\n */\n systemIdentifier = longStrBufToString();\n afterDoctypeSystemIdentifierState();\n return;\n case '\\u0000':\n /* EOF Parse error. */\n err(\"End of file inside system identifier.\");\n /*\n * Set the DOCTYPE token's correctness flag to incorrect.\n * Emit that DOCTYPE token.\n */\n tokenHandler.doctype(doctypeName, publicIdentifier,\n longStrBufToString(), false);\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the current input character to the\n * current DOCTYPE token's system identifier.\n */\n appendLongStrBuf(c);\n /*\n * Stay in the DOCTYPE system identifier (double-quoted)\n * state.\n */\n continue;\n }\n }\n }",
"private void doctypePublicIdentifierDoubleQuotedState()\n throws SAXException, IOException {\n for (;;) {\n /*\n * Consume the next input character:\n */\n char c = read();\n switch (c) {\n case '\"':\n /*\n * U+0022 QUOTATION MARK (\") Switch to the after DOCTYPE\n * public identifier state.\n */\n publicIdentifier = longStrBufToString();\n afterDoctypePublicIdentifierState();\n return;\n case '\\u0000':\n /* EOF Parse error. */\n err(\"End of file inside public identifier.\");\n /*\n * Set the DOCTYPE token's correctness flag to incorrect.\n * Emit that DOCTYPE token.\n */\n tokenHandler.doctype(doctypeName, longStrBufToString(),\n null, false);\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the current input character to the\n * current DOCTYPE token's public identifier.\n */\n appendLongStrBuf(c);\n /*\n * Stay in the DOCTYPE public identifier (double-quoted)\n * state.\n */\n continue;\n }\n }\n }",
"private static void processSingleToken() throws Exception {\n\t\tboolean quotedEh = false;\n\t\tchar token = sb.charAt(0);\n\t\t\n\t\tif (quotedEh) {\n\t\t\tswitch (token) {\n\t\t\tcase '\\'':\n\t\t\t\tquotedEh = !quotedEh;\n\t\t\tcase '(':\n\t\t\tcase ')':\n\t\t\tcase ';':\n\t\t\tcase ' ':\n\t\t\tcase '\\t':\n\t\t\tdefault:\n\t\t\t\ttemp.append(token);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// !quotedEh\n\t\tswitch (token) {\n\t\tcase ';':\n\t\t\tif (phase == CatalogParsingPhases.view) {\n\t\t\t\tif (temp.length() > 0) viewArgs.add(temp.toString());\n\t\t\t\textraction.add(String.join(\", \", viewArgs));\n\t\t\t\tviewArgs = new ArrayList<>();\n\t\t\t} else if (phase == CatalogParsingPhases.SQL) {\n\t\t\t\textraction.add(temp.toString()); // temp should always be > 0\n\t\t\t} else if (phase == CatalogParsingPhases.command) {\n\t\t\t\tif (temp.length() > 0) extraction.add(temp.toString());\n\t\t\t\textraction.add(\"\");\n\t\t\t\ttemp = new StringBuilder();\n\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tthrow new Exception(\"Incorrect phase: \"+phase.name()+\"\\n\");\n\t\t\t\n\t\t\ttemp = new StringBuilder();\n\t\t\tphase = CatalogParsingPhases.command;\n\t\t\tbreak;\n\t\tcase ' ':\n\t\tcase '\\t':\n\t\t\tif (temp.length() == 0 && phase != CatalogParsingPhases.SQL)\n\t\t\t\tbreak;\n\t\t\tif (phase == CatalogParsingPhases.command) {\n\t\t\t\textraction.add(temp.toString());\n\t\t\t\ttemp = new StringBuilder();\n\t\t\t\tphase = CatalogParsingPhases.changePhase;\n\t\t\t} else if (phase == CatalogParsingPhases.SQL) {\n\t\t\t\ttemp.append(token);\n\t\t\t} else if (phase == CatalogParsingPhases.view) {\n\t\t\t\tviewArgs.add(temp.toString());\n\t\t\t\ttemp = new StringBuilder();\n\t\t\t} \n\t\t\t// else it's just unstarted or changePhase\n\t\t\tbreak;\n\t\tcase '(':\n\t\t\tparenlevel++;\n\t\t\tif (phase == CatalogParsingPhases.unstarted) \n\t\t\t\tphase = CatalogParsingPhases.command;\n\t\t\telse\n\t\t\t\ttemp.append(token); // seem to need something like this to support INSERT ... VALUES (...)\n\t\t\tbreak;\n\t\tcase ')':\n\t\t\tparenlevel--;\n\t\t\tif (parenlevel > 0) {\n\t\t\t\ttemp.append(token); // seem to need something like this to support INSERT ... VALUES (...)\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\t\tquotedEh = !quotedEh;\t\t\t\n\t\tdefault:\n\t\t\tif (phase != CatalogParsingPhases.unstarted)\n\t\t\t\ttemp.append(token);\n\t\t\tbreak;\n\t\t}\n\t}",
"public void testIsQuoted() {\n assertTrue(\"#0.0\", !lparen.isQuoted());\n lparen.setState(INSIDE_DOUBLE_QUOTE);\n assertTrue(\"#0.1\", lparen.isQuoted());\n lparen.setState(INSIDE_BLOCK_COMMENT);\n assertTrue(\"#0.2\", !lparen.isQuoted());\n }",
"public final void mQUOTED_34_34() throws RecognitionException {\r\n try {\r\n int _type = QUOTED_34_34;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // Xwpf.g:4680:13: ( ( ( '\\\"' ) (~ ( '\\\"' ) )* ( '\\\"' ) ) )\r\n // Xwpf.g:4681:2: ( ( '\\\"' ) (~ ( '\\\"' ) )* ( '\\\"' ) )\r\n {\r\n // Xwpf.g:4681:2: ( ( '\\\"' ) (~ ( '\\\"' ) )* ( '\\\"' ) )\r\n // Xwpf.g:4681:3: ( '\\\"' ) (~ ( '\\\"' ) )* ( '\\\"' )\r\n {\r\n // Xwpf.g:4681:3: ( '\\\"' )\r\n // Xwpf.g:4681:4: '\\\"'\r\n {\r\n match('\\\"'); \r\n\r\n }\r\n\r\n\r\n // Xwpf.g:4681:8: (~ ( '\\\"' ) )*\r\n loop11:\r\n do {\r\n int alt11=2;\r\n int LA11_0 = input.LA(1);\r\n\r\n if ( ((LA11_0 >= '\\u0000' && LA11_0 <= '!')||(LA11_0 >= '#' && LA11_0 <= '\\uFFFF')) ) {\r\n alt11=1;\r\n }\r\n\r\n\r\n switch (alt11) {\r\n \tcase 1 :\r\n \t // Xwpf.g:\r\n \t {\r\n \t if ( (input.LA(1) >= '\\u0000' && input.LA(1) <= '!')||(input.LA(1) >= '#' && input.LA(1) <= '\\uFFFF') ) {\r\n \t input.consume();\r\n \t }\r\n \t else {\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t recover(mse);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop11;\r\n }\r\n } while (true);\r\n\r\n\r\n // Xwpf.g:4681:17: ( '\\\"' )\r\n // Xwpf.g:4681:18: '\\\"'\r\n {\r\n match('\\\"'); \r\n\r\n }\r\n\r\n\r\n }\r\n\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 }",
"static String readQuotedString(final SubstringReader reader) throws DecodeException {\n int length = 0;\n\n // Skip over any spaces at the beginning of the value.\n reader.skipWhitespaces();\n\n try {\n // The next character must be a single quote.\n final char c = reader.read();\n if (c != '\\'') {\n throw DecodeException.error(\n ERR_ATTR_SYNTAX_EXPECTED_QUOTE_AT_POS1.get(reader.pos() - 1, c));\n }\n\n // Read until we find the closing quote.\n reader.mark();\n while (reader.read() != '\\'') {\n length++;\n }\n\n reader.reset();\n\n final String str = reader.read(length);\n reader.read();\n return str;\n } catch (final StringIndexOutOfBoundsException e) {\n throw DecodeException.error(ERR_ATTR_SYNTAX_TRUNCATED_VALUE1.get());\n }\n }",
"private static String readQuotedToken(StringReader input)\n throws IOException {\n\n StringBuilder result = new StringBuilder();\n boolean quoted = false;\n\n int c = skipLws(input, false);\n\n if (c == '\"') {\n quoted = true;\n } else if (c == -1 || !isToken(c)) {\n return null;\n } else {\n result.append((char) c);\n }\n c = input.read();\n\n while (c != -1 && isToken(c)) {\n result.append((char) c);\n c = input.read();\n }\n\n if (quoted) {\n if (c != '\"') {\n return null;\n }\n } else {\n // Skip back so non-token character is available for next read\n input.skip(-1);\n }\n\n if (c != -1 && result.length() == 0) {\n return null;\n } else {\n return result.toString();\n }\n }",
"protected void parseQParts(ArrayList<Question> q) {\n\t\t// Split the question parts\n\t\tfor(Question qP : q)\n\t\t\tif(qP.getType().equals(QType.SPEC))\n\t\t\t\ttxt += qP.getText() + \"\\n\";\n\t\t\telse if(qP.getType().equals(QType.QUEST))\n\t\t\t\tquestions.add(qP);\n\t\t\telse\n\t\t\t\tanswers.add(qP);\n\t\t\t\t\n\t}",
"private void doctypeSystemIdentifierDoubleQuotedState()\n throws SAXException, IOException {\n for (;;) {\n /*\n * Consume the next input character:\n */\n char c = read();\n switch (c) {\n case '\"':\n /*\n * U+0022 QUOTATION MARK (\") Switch to the after DOCTYPE\n * system identifier state.\n */\n systemIdentifier = longStrBufToString();\n afterDoctypeSystemIdentifierState();\n return;\n case '\\u0000':\n /* EOF Parse error. */\n err(\"End of file inside system identifier.\");\n /*\n * Set the DOCTYPE token's correctness flag to incorrect.\n * Emit that DOCTYPE token.\n */\n tokenHandler.doctype(doctypeName, publicIdentifier,\n longStrBufToString(), false);\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the current input character to the\n * current DOCTYPE token's system identifier.\n */\n appendLongStrBuf(c);\n /*\n * Stay in the DOCTYPE system identifier (double-quoted)\n * state.\n */\n continue;\n }\n }\n }",
"private NodeTerm parseTerm() throws SyntaxException {\n\tNodeFact fact=parseFact();\n\tNodeMulop mulop=parseMulop();\n\tif (mulop==null)\n\t return new NodeTerm(fact,null,null);\n\tNodeTerm term=parseTerm();\n\tterm.append(new NodeTerm(fact,mulop,null));\n\treturn term;\n }",
"void nextQuotedField(StringBuilder sb) {\n while (hasNextChar()) {\r\n if (nextChar() == '\"') {\r\n ++mPos;\r\n if (hasNextChar() && nextChar() == '\"') {\r\n sb.append('\"');\r\n ++mPos;\r\n continue;\r\n }\r\n if (hasNextChar() && (nextChar() == mFieldSep))\r\n ++mPos;\r\n return;\r\n } else {\r\n sb.append(nextChar());\r\n ++mPos;\r\n }\r\n }\r\n }",
"org.apache.xmlbeans.XmlString xgetPart();",
"private boolean attributeValueSingleQuotedState() throws SAXException,\n IOException {\n inContent = true;\n for (;;) {\n /*\n * Consume the next input character:\n */\n char c = read();\n switch (c) {\n case '\\'':\n /*\n * U+0027 APOSTROPHE (') Switch to the before attribute name\n * state.\n */\n addAttributeWithValue();\n inContent = false;\n return true;\n case '&':\n /*\n * U+0026 AMPERSAND (&) Switch to the entity in attribute\n * value state.\n */\n entityInAttributeValueState();\n continue;\n case '\\u0000':\n /* EOF Parse error. */\n err(\"End of file reached when inside a quoted attribute value.\");\n /* Emit the current tag token. */\n addAttributeWithValue();\n emitCurrentTagToken();\n /*\n * Reconsume the character in the data state.\n */\n unread(c);\n inContent = false;\n return false;\n default:\n /*\n * Anything else Append the current input character to the\n * current attribute's value.\n */\n appendLongStrBuf(c);\n /*\n * Stay in the attribute value (double-quoted) state.\n */\n continue;\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string payload = 2; | java.lang.String getPayload(); | [
"public void setPayload(String payload);",
"public void setPayload(Payload payload) {\n this.payload = payload;\n }",
"public static void SetPayload(String passedPayload){\n payload = passedPayload;\n }",
"void payload(String json);",
"public String getPayload() {\n return payload;\n }",
"public int getPayload() {\n return payload;\n }",
"public void setPayload(BytesRef payload) {\n this.payload = payload;\n }",
"public void setPayload(int data) {\n payload = data;\n }",
"com.google.protobuf.Any getPayload();",
"public String getPayloadType();",
"Long payloadLength();",
"public void setPayload(final byte[] payload)\n {\n this.payload = payload;\n }",
"com.google.protobuf.ByteString getPayload();",
"public void setInboundPayload(Payload.Inbound newInboundPayload);",
"String getSourcePayload();",
"public byte[] getPayload();",
"Optional<T> getPayload();",
"void setPayload(final Serializable payload);",
"public Payload.Inbound getInboundPayload();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function returns true if (p1,P2,P3,P4) form a square, otherwise false | static boolean isSquare(Point p1, Point p2, Point p3, Point p4){
int d2 = distSquare(p1,p2);
int d3 = distSquare(p1,p3);
int d4 = distSquare(p1,p4);
// If lengths if (p1, p2) and (p1, p3) are same, then
// following conditions must met to form a square.
// 1) Square of length of (p1, p4) is same as twice
// the square of (p1, p2)
// 2) p4 is at same distance from p2 and p3
if (d2 == d3 && 2*d2 == d4)
{
int d = distSquare(p2, p4);
return (d == distSquare(p3, p4) && d == d2);
}
// The below two cases are similar to above case
if (d3 == d4 && 2*d3 == d2)
{
int d = distSquare(p2, p3);
return (d == distSquare(p2, p4) && d == d3);
}
if (d2 == d4 && 2*d2 == d3)
{
int d = distSquare(p2, p3);
return (d == distSquare(p3, p4) && d == d2);
}
return false;
} | [
"public boolean validSquare(int[] p1, int[] p2, int[] p3, int[] p4) {\n Set<Integer> dists=new HashSet<>();\n List<int[]> points=Arrays.asList(p1, p2, p3, p4);\n for(int i=0; i<4; i++){\n for(int j=i+1; j<4; j++){\n int x1=points.get(i)[0], x2=points.get(j)[0];\n int y1=points.get(i)[1], y2=points.get(j)[1];\n int dist=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);\n if(dist==0){\n return false;\n } else{\n dists.add(dist);\n }\n }\n }\n return dists.size()==2;\n }",
"private boolean hasSquareForm(Point[] points) {\n return points[0].getY() == points[1].getY() && points[2].getY() == points[3].getY()\n && points[0].getX() == points[2].getX() && points[1].getX() == points[3].getX();\n }",
"public boolean checkSquares(){\n //checks all squares in the puzzle\n if(!checkSquare(0) || !checkSquare(3) || !checkSquare(6) || //checks if method returns false(contains duplicates or empty spaces) for any of the 9 squares\n !checkSquare(27) || !checkSquare(30) || !checkSquare(33) ||\n !checkSquare(54) || !checkSquare(57) || !checkSquare(60)){\n return false;\n }\n\n return true;\n }",
"public boolean isSquare() {\r\n\t\treturn rows == columns;\r\n\t}",
"public boolean isSquare()\n {\n return width == height;\n }",
"public boolean isSquare()\r\n {\r\n boolean ret = true;\r\n if(rowSize != colSize)\r\n ret = false;\r\n return ret;\r\n }",
"public static boolean checkSquare(int[] grid){\n for(int i = 0; i < 9; i++){\n if( (i % 3 == 0 && grid[i] + grid[i + 1] + grid[i + 2] != 15)\n || (i < 3 && grid[i] + grid[i + 3] + grid[i + 6] != 15)\n || grid[0] + grid[4] + grid[8] != 15\n || grid[2] + grid[4] + grid[6] != 15) return false;\n }\n return true;\n}",
"public boolean isSquare() {\n\t\tif (isSingular())\n\t\t\treturn false;\n\t\treturn getRows() == getColumns();\n\t}",
"@Test\r\n public void testIsValidSquare()\r\n {\r\n for(int y = 0; y < 8; y++)\r\n for(int x = 0; x < 8; x++)\r\n assertTrue(board.isValidSqr(x, y));\r\n }",
"public boolean isSquare() {\n return this.rowCount == this.columnCount;\n }",
"public boolean valid_State () {\n \tboolean result=true;\n \tfor (int i=0;i<=8;i++){\n int[] row ={1,2,3,4,5,6,7,8,9}; //set elem to 0 when number found \n int[] col={1,2,3,4,5,6,7,8,9};\n for (int j=0;j<=8;j++){\n \tif (p[i][j]!=0){ //check row i,j\n \t\tif (row[p[i][j]-1]==0){ //crossed this out already\n \t\t //scr.println(\"fr \"+i+\" \"+j);\t\n \t\t result=false;}\n \t\t else {\n \t\t row[p[i][j]-1]=0;}\n \t\t}//if p\n\n if (p[j][i]!=0){ //check col j,i\n \t\tif (col[p[j][i]-1]==0){\n \t\t //scr.println(\"fc \"+i+\" \"+j);\t\n \t\t result=false;}\n \t\t else {\n \t\t col[p[j][i]-1]=0;}\n \t\t}//if p\n \t};//for j\n };//for i\n //scr.println(result);\n //check squares\n for (int i=0;i<=6;i=i+3){\n \tfor (int j=0;j<=6;j=j+3){\n \t\tint[] sq = {1,2,3,4,5,6,7,8,9};\n \t\tfor (int k=i;k<=i+2;k++){\n \t\t\tfor (int l=j;l<=j+2;l++){\n \t\t\t\t//scr.println(\"i=\"+i+\" j=\"+j+\" k=\"+k+\" l=\"+l);\n \t\t\t\tif (p[k][l]!=0){\n \t\t\t\t if (sq[p[k][l]-1]==0){\n \t\t\t\t \tresult=false;}\n \t\t\t\t \telse {\n \t\t\t\t \t\t sq[p[k][l]-1]=0;}\n \t\t\t\t }//if p\n \t\t\t\t }//for l\n \t\t\t}//for k\n \t\t}//for j\n \t}//for i\n \t\n \treturn result;\n }",
"@Test\r\n public void testIsValidSquare()\r\n {\r\n for(int y = 0; y < yLen; y++)\r\n for(int x = 0; x < xLen; x++)\r\n assertTrue(board.isValid(x, y));\r\n }",
"public boolean isSquare() {\r\n \tif (getLength() == getWidth()) {\r\n \t\treturn(true);\r\n \t} else {\r\n \t\treturn(false);\r\n \t}\r\n }",
"private boolean isSquareQuantityValid() {\n int blueSquares = 0;\n int yellowSquares = 0;\n int greenSquares = 0;\n int whiteSquares = 0;\n int orangeSquares = 0;\n int redSquares = 0;\n\n for (RubiksFace face : rubiksFaceList) {\n for (RubiksColor color : face.getRubiksColors()) {\n switch(color) {\n case RED:\n redSquares++;\n break;\n case GREEN:\n greenSquares++;\n break;\n case BLUE:\n blueSquares++;\n break;\n case YELLOW:\n yellowSquares++;\n break;\n case ORANGE:\n orangeSquares++;\n break;\n case WHITE:\n whiteSquares++;\n break;\n }\n }\n }\n\n System.out.println(\"BLUE: \" + blueSquares);\n System.out.println(\"YELLOW: \" + yellowSquares);\n System.out.println(\"GREEN: \" + greenSquares);\n System.out.println(\"WHITE: \" + whiteSquares);\n System.out.println(\"ORANGE: \" + orangeSquares);\n System.out.println(\"RED: \" + redSquares);\n\n return (blueSquares == 9 && yellowSquares == 9 && greenSquares == 9 && whiteSquares == 9 && orangeSquares == 9 && redSquares == 9);\n }",
"public boolean isGameSquare(int x, int y) {\n return (x >= 0 && y >= 0 && x < 8 && y < 8 && (x + y) % 2 > 0);\n }",
"private boolean isChoseFine(){\n if(freeSpaces.size()!=2 & freeSpaces.size()!=3){ //if the number of chosen spaces is not 3 or 2, that means it can't be good.\n return false;\n }\n else if(freeSpaces.size()==2){ //if there are 2.\n if(freeSpaces.elementAt(0).place.distance(freeSpaces.elementAt(1).place)==1)\n return true;\n else //if the distance between the spaces isn't 1, that means it can't be two suite spaces.\n return false;\n }\n else{ //if there are 3.\n //get the all 3 elements.\n int aX = freeSpaces.elementAt(0).place.x;\n int aY = freeSpaces.elementAt(0).place.y;\n int bX = freeSpaces.elementAt(1).place.x;\n int bY = freeSpaces.elementAt(1).place.y;\n int cX = freeSpaces.elementAt(2).place.x;\n int cY = freeSpaces.elementAt(2).place.y;\n if(aX==bX && bX==cX){ //if they are in the same column.\n int min = Math.min(aY, Math.min(bY, cY));\n int max = Math.max(aY, Math.max(bY, cY));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else if(aY==bY && bY==cY){ //if they are in the same row.\n int min = Math.min(aX, Math.min(bX, cX));\n int max = Math.max(aX, Math.max(bX, cX));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else //if they are in different rows and columns, so it isn't good.\n return false;\n }\n }",
"private boolean checkPolysPointShare(Polygon arg1, Polygon arg2) {\r\n for(int i=0; i<arg1.npoints; i++) {\r\n for(int j=0; j<arg2.npoints; j++) {\r\n if((arg1.xpoints[i]==arg2.xpoints[j]) & (arg1.ypoints[i]==arg2.ypoints[j]))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean isValid(){\n\t\treturn points.size() >= 2;\n\t}",
"public boolean isSquare() {\n return (getRowDimension() == getColumnDimension());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the invariant epcAosDrctDbtTxInf. | @Test
public void testEpcAosDrctDbtTxInf01() throws Throwable {
List<IInterpretationResult> results;
results = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY
+ "/epcAosDrctDbtTxInf", MODELINSTANCE_NAME_01, Arrays
.asList(new String[] { "DirectDebitTransactionInformation1" }));
assertNotNull(results);
assertEquals(2, results.size());
this.assertIsTrue(results.get(0));
this.assertIsTrue(results.get(1));
} | [
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfDbtr01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfDbtr\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsFalse(results.get(0));\r\n\t\tthis.assertIsFalse(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfDbtr03() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfDbtr\", MODELINSTANCE_NAME_03, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsFalse(results.get(0));\r\n\t\tthis.assertIsFalse(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInf03() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInf\", MODELINSTANCE_NAME_03, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInf02() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInf\", MODELINSTANCE_NAME_02, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(3, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t\tthis.assertIsTrue(results.get(2));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfDbtr02() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfDbtr\", MODELINSTANCE_NAME_02, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(3, results.size());\r\n\r\n\t\tthis.assertIsFalse(results.get(0));\r\n\t\tthis.assertIsFalse(results.get(1));\r\n\t\tthis.assertIsFalse(results.get(2));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfUltmtDbtr01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfUltmtDbtr\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfPmtTpInf01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfPmtTpInf\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsFalse(results.get(0));\r\n\t\tthis.assertIsFalse(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcDrctDbtTxInfdbtrIdOrgId01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcDrctDbtTxInfdbtrIdOrgId\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfUltmtCdtr01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfUltmtCdtr\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfPmtTpInf03() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfPmtTpInf\", MODELINSTANCE_NAME_03, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsFalse(results.get(0));\r\n\t\tthis.assertIsFalse(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfUltmtDbtr03() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfUltmtDbtr\", MODELINSTANCE_NAME_03, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDbtrAgtAcct01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDbtrAgtAcct\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcDrctDbtTxInfdbtrIdprvtId01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcDrctDbtTxInfdbtrIdprvtId\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfUltmtDbtr02() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfUltmtDbtr\", MODELINSTANCE_NAME_02, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(3, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t\tthis.assertIsTrue(results.get(2));\r\n\t}",
"@Test\r\n\tpublic void testEpcDrctDbtTxInfultmtcdtrIdOrdId01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super\r\n\t\t\t\t.interpretConstraintsForInstance(\r\n\t\t\t\t\t\tCONSTRAINT_DIRECTORY\r\n\t\t\t\t\t\t\t\t+ \"/epcDrctDbtTxInfultmtcdtrIdOrdId\",\r\n\t\t\t\t\t\tMODELINSTANCE_NAME_01,\r\n\t\t\t\t\t\tArrays\r\n\t\t\t\t\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfPmtTpInf02() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfPmtTpInf\", MODELINSTANCE_NAME_02, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(3, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t\tthis.assertIsTrue(results.get(2));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfPurpPrtry01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfPurpPrtry\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfUltmtCdtr03() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfUltmtCdtr\", MODELINSTANCE_NAME_03, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsTrue(results.get(0));\r\n\t\tthis.assertIsTrue(results.get(1));\r\n\t}",
"@Test\r\n\tpublic void testEpcDrctDbTxInfchrgBr01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcDrctDbTxInfchrgBr\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebitTransactionInformation1\" }));\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(2, results.size());\r\n\r\n\t\tthis.assertIsFalse(results.get(0));\r\n\t\tthis.assertIsFalse(results.get(1));\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an empty result list. | public ResultList() {
super();
} | [
"EmptyList createEmptyList();",
"private List<Map<String, Object>> buildEmptyGetResultMap() {\n List<Map<String, Object>> results = new ArrayList<>();\n Map<String, Object> result = new HashMap<>();\n result.put(\"Status\", \"open\");\n result.put(\"Description\", TEST_DESC);\n result.put(\"Job\", \"new\");\n result.put(\"User\", TEST_USER);\n results.add(result);\n return results;\n }",
"List<T> getResults();",
"static List createEmptyList() {\n return new LinkedList<>();\n }",
"public DefaultResults() {\n this.results = new ArrayList<R>();\n this.totalCc = new ArrayList<Long>();\n this.maximalCc = new ArrayList<Long>();\n this.totalBytes = new ArrayList<Long>();\n this.maximalBytes = new ArrayList<Long>();\n this.maximalMemory = new ArrayList<Long>();\n }",
"@Test\r\n public void testConstructorResultList() {\r\n Assertions.assertNotNull(category.result(resultList));\r\n }",
"public static <ResultType> HGQuery<ResultType> NOP() {return new HGQuery<ResultType>()\r\n\t{\r\n\t\tpublic HGSearchResult<ResultType> execute() { return (HGSearchResult<ResultType>)HGSearchResult.EMPTY; }\r\n\t};}",
"public List getResultList() {\n \treturn resultList;\n }",
"public static List<String> createEmptyList() {\n\t\treturn new LinkedList<String>();\n\t}",
"private PSResultSet createEmptyResultSet( HashMap columnNames,\n PSResultSetMetaData rsMeta )\n {\n int cols = columnNames.size();\n ArrayList [] colSet = new ArrayList[cols];\n for ( int i = 0; i < cols; ++i )\n colSet[i] = new ArrayList();\n return new PSResultSet( colSet, columnNames, rsMeta );\n }",
"List createList();",
"NonEmptyList createNonEmptyList();",
"java.util.List<org.seasailing.protobuf.ResultDTO> \n getResultsList();",
"EmptyList() {\r\n // an empty constructor\r\n }",
"public void clear() {\n results.clear();\n }",
"public List<RowMetaAndData> createResultDataRows() {\n List<RowMetaAndData> list = new ArrayList<RowMetaAndData>();\n\n RowMetaInterface rm = createResultRowMetaInterface();\n\n Object[] r1 = new Object[] { new Long( 5L ), \"5\", new Long( 101L ), \"5\" };\n Object[] r2 = new Object[] { new Long( 9L ), \"9\", new Long( 102L ), \"9\" };\n Object[] r3 = new Object[] { new Long( 20L ), \"20\", new Long( -1L ), \"UNDEF\" };\n\n list.add( new RowMetaAndData( rm, r1 ) );\n list.add( new RowMetaAndData( rm, r2 ) );\n list.add( new RowMetaAndData( rm, r3 ) );\n\n return list;\n }",
"void clearListOfReturnValues();",
"public void clear() {\n\t\tresults.clear();\n\t}",
"public PrintableClassificationResult() {\n\t\tthis(RESULT_LIST);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start call service to push new missed call. | public void startCallService() {
Log.i(TAG, "startCallService()");
// Ensure main service is started
if (!mIsMainServiceActive) {
startMainService();
}
// Start SMS service
if (mCallService == null) {
mCallService = new CallService(sContext);
TelephonyManager telephony = (TelephonyManager) sContext.getSystemService(Context.TELEPHONY_SERVICE);
telephony.listen(mCallService, PhoneStateListener.LISTEN_CALL_STATE);
}
/* if (mCallService == null) {
mCallService = new CallService(sContext);
}
TelephonyManager telephony = (TelephonyManager) sContext
.getSystemService(Context.TELEPHONY_SERVICE);
telephony.listen(mCallService, PhoneStateListener.LISTEN_CALL_STATE);*/
mIsCallServiceActive = true;
} | [
"public void launchIncomingCall() {\n }",
"private void startCallOrService() {\n\t\tWeemoEngine weemo = Weemo.instance();\n\t\tassert weemo != null;\n\n\t\t// If there is a call currently going on,\n\t\t// it's probably because the user has clicked in the notification after going on its device home.\n\t\t// In which case we redirect him to the CallActivity\n\t\tWeemoCall call = weemo.getCurrentCall();\n\n\t\tif (call == null) {\n\t\t\tif (getIntent().getBooleanExtra(EXTRA_PICKUP, false)) {\n\t\t\t\tfinal int callId = getIntent().getIntExtra(EXTRA_CALLID, -1);\n\t\t\t\tcall = weemo.getCall(callId);\n\t\t\t\tif (call != null) {\n\t\t\t\t\tstartCallWindow(call);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// This activity can only be launched if the user is connected\n\t\t\t\t// Therefore, we launch the ConnectedService\n\t\t\t\tstartService(new Intent(this, ConnectedService.class));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstartCallWindow(call);\n\t\t}\n\t}",
"private void _setUpIncomingCall() {\n IntentFilter filter = new IntentFilter();\n filter.addAction(\"android.SipDemo.INCOMING_CALL\");\n callReceiver = new IncomingCallReceiver();\n registerReceiver(callReceiver, filter);\n }",
"private void addCall(Call toAdd) {\n boolean isFirstCall = mCalls.isEmpty();\n\n mCalls.add(toAdd);\n if (isFirstCall) {\n // First call, so register the recording callback. Also check for recordings which\n // started before we registered the callback (we don't receive a callback for those).\n handleRecordingConfigurationChange(mAudioManager.getActiveRecordingConfigurations());\n mAudioManager.registerAudioRecordingCallback(mAudioRecordingCallback,\n mMainThreadHandler);\n }\n\n maybeStartCallAudioTone();\n }",
"@Test\n\tpublic void incomingCallShouldStartService() throws Exception {\n\t\tmockupConnectivityManager(true);\n\t\tmockPhoneLookupContentResolver(false, UNKNOWN_CALLER);\n\t\t\n\t\treceiver.onReceive(context, createIncomingCallIntent(UNKNOWN_CALLER));\n\t\tassertNull(receiver.getResultData());\n\t\t\n\t\tArgumentCaptor<Intent> argument = ArgumentCaptor.forClass(Intent.class);\n\t\tverify(context, times(1)).startService(argument.capture());\n\t\tverify(context, never()).stopService(argument.capture());\n\t\tassertEquals(argument.getValue().getComponent().getClassName(), DisplayCallerService.class.getName());\n\t}",
"private void callStarted() {\n redialButton.setVisible(false);\n hangUpButton.setVisible(true);\n hangUpButton.setEnabled(true);\n muteButton.setEnabled(true);\n holdButton.setEnabled(true);\n transferButton.setEnabled(true);\n setStatus(CONNECTED, false);\n\n // Show History\n historyPanel.removeAll();\n historyPanel.addPreviousConversations(phoneNumber);\n\n // Add notification to ChatRoom if one exists.\n final ChatRoom chatRoom = callManager.getAssociatedChatRoom(this);\n if (chatRoom != null) {\n final SimpleDateFormat formatter = new SimpleDateFormat(\"h:mm a\");\n String time = formatter.format(new Date());\n\n chatRoom.getTranscriptWindow().insertNotificationMessage(PhoneRes.getIString(\"phone.callstartedat\")+ \" \" + time, ChatManager.NOTIFICATION_COLOR);\n }\n }",
"private void startClientAndMakeCall() {\n if (!getSinchServiceInterface().isStarted()) {\n getSinchServiceInterface().startClient();\n }\n }",
"private void missedCall() {\n\n NotificationCompat.Builder nBuilder = new NotificationCompat.Builder(this);\n\n nBuilder.setSmallIcon(android.R.drawable.stat_notify_missed_call);\n\n nBuilder.setContentTitle(name);\n\n nBuilder.setContentText(resources.getString(R.string.missed_call));\n\n nBuilder.setColor(Color.rgb(4, 137, 209));\n\n nBuilder.setAutoCancel(true);\n\n Intent showCallLog = new Intent(Intent.ACTION_VIEW);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, showCallLog, PendingIntent.FLAG_CANCEL_CURRENT);\n\n nBuilder.setContentIntent(pendingIntent);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n notificationManager.notify(MISSED_CALL_NOTIFICATION, nBuilder.build());\n\n CallLogUtilities.addCallToLog(contentResolver, number, 0, CallLog.Calls.MISSED_TYPE, System.currentTimeMillis());\n\n }",
"public void Start_ServiceCallNew(String ClientId){\n\t\t //boolean chkst=isMyServiceRunning();\n\t\t //if(!chkst)\n\t\t //{\n\t\t //Intent intent = new Intent(getBaseContext(),Service_call.class);\n\t\t\t Intent intent = new Intent(context,Service_Call_New.class);\n\t\t\t intent.putExtra(\"ClientID\",ClientId);\n\t\t\t intent.putExtra(\"NotiID\",\"0\");\n\t\t\t startService(intent);\n\t\t //} \n\t }",
"private void missedCall() {\n\n NotificationCompat.Builder nBuilder = new NotificationCompat.Builder(mContext);\n\n nBuilder.setSmallIcon(android.R.drawable.stat_notify_missed_call);\n\n nBuilder.setContentTitle(name);\n\n nBuilder.setContentText(resources.getString(R.string.missed_call));\n\n nBuilder.setColor(Color.rgb(4, 137, 209));\n\n nBuilder.setAutoCancel(true);\n\n Intent showCallLog = new Intent(Intent.ACTION_VIEW);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, showCallLog, PendingIntent.FLAG_CANCEL_CURRENT);\n\n nBuilder.setContentIntent(pendingIntent);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n notificationManager.notify(MISSED_CALL_NOTIFICATION, nBuilder.build());\n\n CallLogUtilities.addCallToLog(contentResolver, number, 0, CallLog.Calls.MISSED_TYPE, System.currentTimeMillis());\n\n }",
"private void fetchNewCalls() {\n fetchCalls(QUERY_NEW_CALLS_TOKEN, true);\n }",
"private void entryAction_main_region_IncomingCall() {\n\t\ttimer.setTimer(this, 0, 2 * 1000, true);\n\t\t\n\t\tsCIPhone.setCount(0);\n\t}",
"private void startCallRecordingTone() {\n if (mLoopingTonePlayer != null) {\n Log.w(this, \"Tone is already playing\");\n return;\n }\n mLoopingTonePlayer = new LoopingTonePlayer();\n if (!mLoopingTonePlayer.start()) {\n mLoopingTonePlayer = null;\n }\n }",
"LinphoneCall startReferedCall(LinphoneCall call, LinphoneCallParams params);",
"public void startCalls() {\n\t\tif (dirty) {\n\t\t\tdirty = false;\n\t\t\t// Iterate through, telling them to start\n\t\t\tfor (INewsModule newsModule : newsModules) {\n\t\t\t\tnewsModule.giveData(this, place);\n\t\t\t\tnewsModule.startCall();\n\t\t\t}\n\t\t}\n\t}",
"private void startChirp() {\n ChirpManager manager = ChirpManager.getInstance(getContext());\n mChirpStartMillis = System.currentTimeMillis();\n ChirpError error = manager.startReceiver();\n if (error.getCode() > 0) {\n Log.e(ChirpManager.TAG, \"ChirpError: \" + error.getMessage());\n }\n }",
"private void maybeStartCallAudioTone() {\n if (mIsRecording && hasActiveCall()) {\n startCallRecordingTone();\n }\n }",
"private void addIncomingCall(Call call)\n\t{\n\t\tthis.incoming.add(0, call);\n\t}",
"public void addCall () {\n logger.info(\"Calling setPhoneBill\");\n\n PhoneCall newCall = textBoxesToPhoneCall();\n if(newCall == null) {\n return;\n }\n String customer = customerNameInput.getValue().trim();\n\n if(newCall.getEndTime().before(newCall.getStartTime())) {\n alerter.alert(\"The end time falls before the start time. Call will not be added.\");\n return;\n }\n\n phoneBillService.setPhoneBill(customer, newCall, new AsyncCallback<Boolean>() {\n @Override\n public void onFailure(Throwable ex) {\n alertOnException(ex);\n }\n\n @Override\n public void onSuccess(Boolean callAddSuccess) {\n if(callAddSuccess == true) {\n alerter.alert(\"Added the call to \" + customer + \"'s bill.\");\n }\n else {\n alerter.alert(\"This call already exists in the bill, and has not been added.\");\n }\n }\n }\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Solution: Initialize variables low=0, high=length1 as long as the low doesn't crosses right calculate mid if the number at mid matches target return mid else if the number at mid >= target and <=low then set high as mid1; else low= mid+1 return 1 Time complexity O(logn) space complexity O(1) | private int findTargetElementIndex(int[] nums, int target) {
int low=0, high=nums.length-1;
while (low<=high){
int mid=(low+high)/2;
if(nums[mid]==target)return mid;
else if(nums[low]<=nums[mid]){
if(target>=nums[low]&& target<nums[mid]){
high=mid-1;
}else{
low=mid+1;
}
}
else if(nums[high]>nums[mid]){
if(target>nums[mid] && target<=nums[high]){
low=mid+1;
}else{
high=mid-1;
}
}
}
return -1;
} | [
"int doSearch(int[] A, int start, int end, int target) {\r\n if (start > end)\r\n return -1;\r\n int mid = (start + end) / 2;\r\n if (A[mid] == target)\r\n return mid;\r\n if (target > A[mid]) {\r\n // left half must be smaller than target, need to go right\r\n if (A[mid] >= A[start]) {\r\n return doSearch(A, mid + 1, end, target);\r\n }\r\n // break point is at left half, need to consider two scenarios\r\n else {\r\n // A[mid] < A[start] <= target, go left\r\n if (target >= A[start]) {\r\n return doSearch(A, start, mid - 1, target);\r\n }\r\n // A[mid] < target < A[start], go right\r\n else {\r\n return doSearch(A, mid + 1, end, target);\r\n }\r\n }\r\n } else {\r\n // right half must be bigger than target, go left\r\n if (A[mid] <= A[end]) {\r\n return doSearch(A, start, mid - 1, target);\r\n } else {\r\n // target <= A[end] < A[mid], go right\r\n if (target <= A[end]) {\r\n return doSearch(A, mid + 1, end, target);\r\n }\r\n // A[end] < target < A[mid], go left\r\n else {\r\n return doSearch(A, start, mid - 1, target);\r\n }\r\n }\r\n }\r\n }",
"public int search(int[] nums, int target) {\n int start = 0;\n int end = nums.length;\n while (start < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n return mid;\n } else if (nums[start] < nums[mid]) {\n if (target >= nums[start] && target < nums[mid]) {\n end = mid;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > nums[mid] && target <= nums[end - 1]) {\n start = mid + 1;\n } else {\n end = mid;\n }\n }\n }\n return -1;\n }",
"private static boolean binarySearch(int[] data, int target, int low, int high) {\n if (low > high) {\n return false;\n } else {\n int mid = (low + high) / 2;\n if (target == data[mid]) {\n return true;\n } else if (target < data[mid]) {\n return binarySearch(data, target, low, mid - 1);\n } else {\n return binarySearch(data, target, mid + 1, high);\n }\n }\n }",
"private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }",
"public int search(int[] nums, int target) {\n if (nums == null || nums.length == 0) {\n return -1;\n }\n int left = 0;\n int right = nums.length - 1;\n int tail = nums[right];\n while (left <= right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] == target) {\n return mid;\n } else if (target > tail && nums[mid] > tail && nums[mid] > target\n || target > tail && nums[mid] <= tail\n || target <= tail && nums[mid] <= tail && nums[mid] > target) {\n right = mid - 1; \n } else {\n left = mid + 1;\n }\n \n }\n return -1;\n }",
"public int search(int[] nums, int target) {\n if (nums == null || nums.length == 0) {\n return -1;\n }\n int low = 0, high = nums.length - 1;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (nums[mid] == target) {\n return mid;\n }\n if (nums[low] <= nums[mid]) {// left part is sorted\n if (target >= nums[low] && target < nums[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n } else {// right part is sorted\n if (target > nums[mid] && target <= nums[high]) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n }\n return -1;\n }",
"static int binarySearch(int[] arr, int target)\n {\n int left = 0;\n int right = arr.length - 1;\n int mid;\n\n while (left <= right)\n {\n mid = (left + right) / 2;\n if (target < arr[mid])\n {\n right = mid -1;\n }\n else if (target > arr[mid])\n {\n left = mid + 1;\n }\n else\n {\n return mid;\n }\n }\n return -1;\n }",
"private static int binSearch(List<Integer> array, int target, int first, int last) {\n int size = last - first;\n if (size < 1) {\n return -1;\n }\n\n int mid = (int)Math.floor(size/2) + first;\n if (target == array.get(mid)) {\n return mid;\n }\n else if (target > array.get(mid)) {\n return binSearch(array, target, mid + 1, last);\n }\n else {\n return binSearch(array, target, first, mid - 1);\n }\n }",
"public static int binarySearch(int low, int high, long[] array, long target, SearchOption option) {\n\t\tint mid;\n\t\tint answer = (option == SearchOption.MINIMUM) ? low : high;\n\t\tint cmp;\n \n\t\twhile (low <=high) {\n\t\t\tmid = (low + high) / 2;\n\t\t\tcmp = Long.valueOf(array[mid]).compareTo(target);\n \n\t\t\tif (cmp == 0) // mid point equal to desired element\n\t\t\t\treturn mid;\n\t\t\telse if (cmp < 0) { // mid point smaller than desired element value\n\t\t\t\tif (option == SearchOption.MINIMUM) {\n\t\t\t\t\tanswer = mid;\n\t\t\t\t}\n\t\t\t\tlow = mid + 1;\n\t\t\t} else { // mid point larger than desired element value\n\t\t\t\tif (option == SearchOption.MAXIMUM) {\n\t\t\t\t\tanswer = mid;\n\t\t\t\t}\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n \n\t\treturn answer;\n\t}",
"static int checkPair(int[]nums,int end,int target){\n int low=0,count=0;\n while (low<end){\n if(nums[low]+nums[end]< target) {\n count += end - low;\n low++;\n }\n else end--;\n }\n\n return count;\n }",
"private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }",
"public int findSmallestElementGreaterThan(int [] array, int target) {\n int low = 0, high = array.length - 1;\n while(low <= high) {\n int mid = low + (high - low)/2;\n if(array[mid] > target) {\n if(mid == 0 || array[mid - 1] <= target) {\n return mid;\n } else {\n high = mid - 1;\n }\n } else {\n low = mid + 1;\n }\n }\n return array.length;\n }",
"public static int shiftedBinarySearch(int[] A, int target) {\n int lo = 0;\n int hi = A.length - 1;\n\n while (lo <= hi) {\n int mid = (lo + hi) / 2;\n int midElement = A[mid];\n\n if (target == midElement) return mid;\n\n int leftNum = A[lo];\n int rightNum = A[hi];\n\n if (leftNum <= midElement) {\n if (target < midElement && target >= leftNum) {\n hi = mid - 1;\n } else {\n lo = mid + 1;\n }\n } else {\n if (target > midElement && target <= rightNum) {\n lo = mid + 1;\n } else {\n hi = mid - 1;\n }\n }\n\n }\n\n return -1;\n\n }",
"public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}",
"public int search(int[] nums, int target) {\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = (left + right) / 2;\n if (nums[mid] > nums[right]) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n int pivot = left;\n left = 0;\n right = nums.length - 1;\n while (left <= right) {\n int mid = (left + right) / 2;\n int realmid = (mid + pivot) % nums.length;\n if (nums[realmid] == target) {\n return realmid;\n } else if (nums[realmid] < target) {\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n }\n return -1;\n }",
"private int findUpperBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] > target) right = mid;\n else left = mid + 1;\n }\n return (left > 0 && nums[left - 1] == target) ? left - 1 : -1;\n }",
"public int searchLastLessValue(int[] arr, int target) {\n if(arr == null) return -1;\n \n int lo = 0;\n int hi = arr.length - 1;\n while(lo < hi) {\n int mid = lo + (hi - lo + 1)/2;\n if(f(arr[mid], target)) {\n hi = mid - 1;\n } else {\n lo = mid;\n }\n }\n \n //Here, must be lo == hi\n if(f(arr[lo], target)) {\n return -1;\n } else {\n return lo;\n }\n }",
"public static int binarySearchWithTheClosestNum(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// when we reach here, means target is not in the array, so we need to find the closet element from num[left] or num[right]\n\t\t// notice that, right is smailler than left now, according to the while condition, if it breaks, left > right\n\t\treturn Math.abs(target - num[left]) > Math.abs(target - num[right]) ? right : left;\n\t}",
"public int crossingSum(int[] nums, int start, int end, int mid){\n int sum=0;\n int lSum=Integer.MIN_VALUE;\n int rSum=Integer.MIN_VALUE;\n \n //Maximum sum starting from mid point and ending at some point on left of mid\n for(int i=mid; i>=start;i--){\n sum+=nums[i];\n if(sum>lSum)\n lSum=sum;\n }\n sum=0;\n \n //Maximum sum starting from mid + 1 and ending with sum point on right of mid + 1\n for(int i=mid+1; i<=end;i++){\n sum+=nums[i];\n if(sum>rSum)\n rSum=sum;\n }\n \n return lSum+rSum;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the requested Asset is retrieved. | void onAssetRetrieved(@Nullable Asset asset); | [
"T get(String name) throws AssetNotFoundException;",
"Asset getAsset(String assetKey) throws Exception;",
"IAsset getAsset(UUID assetId) throws SiteWhereException;",
"io.bloombox.schema.ledger.Assets.AssetKey getAsset();",
"com.google.ads.googleads.v1.resources.Asset getAsset();",
"com.google.ads.googleads.v6.resources.Asset getAsset();",
"java.lang.String getAsset();",
"public AssetManager getAssetManager()\n { \n return this.assetManager; \n }",
"public Assets getAsset(String name);",
"public AssetClass getAssetClass() {\n return assetClass;\n }",
"public Savable loadAsset() {\n return file.loadAsset();\n }",
"public interface AssetReference\n{\n\tpublic String getOsidLoadKey();\n\n\tpublic String getAssetIdString();\n}",
"Asset getAsset(String name);",
"protected abstract void LoadAssets();",
"public String getAssetID() {\r\n\r\n return assetID;\r\n }",
"public String getAssetName() {\n return this.assetName;\n }",
"public String getAssetNumber () { return assetNumber; }",
"Asset findAsset(Asset asset);",
"public String getAssetId() {\n return this.assetId;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a generator producing uniform random values between the given least value (inclusive) and bound (exclusive). | public static IntGenerator intRandom(int least, int bound) {
if (least >= bound)
throw new IllegalArgumentException();
return new IntIntervalRandomGenerator(least, bound);
} | [
"private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}",
"int getRandom(int low, int high);",
"public int getRandomInt (int minInclusive, int maxInclusive);",
"public int getRandom(int bound) {\n return ThreadLocalRandom.current().nextInt(bound);\n }",
"public static double uniform(double lo, double hi)\n {\n return lo + Math.random()*(hi-lo);\n }",
"public RandomUniform(double minval, double maxval, long seed) {\n super();\n this.minval = minval;\n this.maxval = maxval;\n this.seed = seed;\n }",
"private int getRandomWithExclusion(int bound, List<Integer> exclude) {\n int random = Constants.RAND.nextInt(bound - exclude.size());\n for (int ex : exclude) {\n if (random < ex) break;\n random++;\n }\n return random;\n \n }",
"public static double uniform(double lo, double hi)\n {\n\n return (hi - lo) * Math.random() + lo;\n }",
"private static double getRandomNumber() {\n\t\tRandom r = new Random();\n\t\tInteger rangeMin = 1;\n\t\tInteger rangeMax = 10;\n\t\treturn (rangeMin + (rangeMax - rangeMin) * r.nextDouble());\n\t}",
"public static int rndInt(int upBound, int lowBound){\n\t\tint diff = upBound - lowBound;\n\t\tif(diff > 0) return lowBound + rnd.nextInt(diff);\n\t\telse return lowBound - rnd.nextInt(-diff);\n\t}",
"private static int randomGen(int range) {\n\t\treturn (int) ((range + 1) * Math.random());\n\t}",
"public static double uniform() {\r\n return random.nextDouble();\r\n }",
"private static double randomGenerator(double min, double max) {\n return (double)java.lang.Math.random() * (max - min +1) + min;\n }",
"public static double rangedRandom(double a){\n\t\treturn -a + Calc.random(a * 2);\n\t}",
"static int randomValue(int minValue, int maxValue)\r\n\t\t{\r\n\t\t int range = (maxValue - minValue) + 1; // gives the total range of values that we need minus the minimum value\r\n\t\t \r\n\t\t return (int)(Math.random() * range) + minValue;\r\n\t\t}",
"private int rand(int lower, int higher) {\n\t\treturn lower + (int) ((higher - lower + 1) * Math.random());\n\t\t\n\t}",
"public static double uniform()\n {\n long hi = r_seed/q;\n long lo = r_seed - q * hi;\n long t = a * lo - r * hi;\n if(t > 0)\n r_seed = t;\n else\n r_seed = t+m;\n return( (double) r_seed/(double) m);\n }",
"private int rand(int lower, int upper) {\n return lower + (int)(Math.random() * ((upper - lower) + 1));\n }",
"public static Supplier<Integer> random(int lowerBoundIncl, int upperBoundIncl) {\n Validator.validateBounds(lowerBoundIncl, upperBoundIncl);\n Random random = new Random();\n\n return () -> random.nextInt(upperBoundIncl - lowerBoundIncl + 1) + lowerBoundIncl;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Parameter__Group_4__1" $ANTLR start "rule__Parameter__Group_4__1__Impl" InternalXModel.g:2624:1: rule__Parameter__Group_4__1__Impl : ( ( rule__Parameter__XtypeAssignment_4_1 ) ) ; | public final void rule__Parameter__Group_4__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXModel.g:2628:1: ( ( ( rule__Parameter__XtypeAssignment_4_1 ) ) )
// InternalXModel.g:2629:1: ( ( rule__Parameter__XtypeAssignment_4_1 ) )
{
// InternalXModel.g:2629:1: ( ( rule__Parameter__XtypeAssignment_4_1 ) )
// InternalXModel.g:2630:2: ( rule__Parameter__XtypeAssignment_4_1 )
{
before(grammarAccess.getParameterAccess().getXtypeAssignment_4_1());
// InternalXModel.g:2631:2: ( rule__Parameter__XtypeAssignment_4_1 )
// InternalXModel.g:2631:3: rule__Parameter__XtypeAssignment_4_1
{
pushFollow(FOLLOW_2);
rule__Parameter__XtypeAssignment_4_1();
state._fsp--;
}
after(grammarAccess.getParameterAccess().getXtypeAssignment_4_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Parameter__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1918:1: ( rule__Parameter__Group_4__1__Impl )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1919:2: rule__Parameter__Group_4__1__Impl\n {\n pushFollow(FOLLOW_rule__Parameter__Group_4__1__Impl_in_rule__Parameter__Group_4__13957);\n rule__Parameter__Group_4__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalXModel.g:2617:1: ( rule__Parameter__Group_4__1__Impl )\n // InternalXModel.g:2618:2: rule__Parameter__Group_4__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Parameter__Group_4__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_4__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1929:1: ( ( ( rule__Parameter__TypeAssignment_4_1 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1930:1: ( ( rule__Parameter__TypeAssignment_4_1 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1930:1: ( ( rule__Parameter__TypeAssignment_4_1 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1931:1: ( rule__Parameter__TypeAssignment_4_1 )\n {\n before(grammarAccess.getParameterAccess().getTypeAssignment_4_1()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1932:1: ( rule__Parameter__TypeAssignment_4_1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1932:2: rule__Parameter__TypeAssignment_4_1\n {\n pushFollow(FOLLOW_rule__Parameter__TypeAssignment_4_1_in_rule__Parameter__Group_4__1__Impl3984);\n rule__Parameter__TypeAssignment_4_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getParameterAccess().getTypeAssignment_4_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Param__Group__4__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7711:1: ( ( ( rule__Param__TypeAssignment_4 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7712:1: ( ( rule__Param__TypeAssignment_4 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7712:1: ( ( rule__Param__TypeAssignment_4 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7713:1: ( rule__Param__TypeAssignment_4 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getParamAccess().getTypeAssignment_4()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7714:1: ( rule__Param__TypeAssignment_4 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7714:2: rule__Param__TypeAssignment_4\r\n {\r\n pushFollow(FOLLOW_rule__Param__TypeAssignment_4_in_rule__Param__Group__4__Impl16231);\r\n rule__Param__TypeAssignment_4();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getParamAccess().getTypeAssignment_4()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Parameter__Group_4__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalXModel.g:2602:1: ( ( 'xtype' ) )\n // InternalXModel.g:2603:1: ( 'xtype' )\n {\n // InternalXModel.g:2603:1: ( 'xtype' )\n // InternalXModel.g:2604:2: 'xtype'\n {\n before(grammarAccess.getParameterAccess().getXtypeKeyword_4_0()); \n match(input,35,FOLLOW_2); \n after(grammarAccess.getParameterAccess().getXtypeKeyword_4_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Param__Group__4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7700:1: ( rule__Param__Group__4__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7701:2: rule__Param__Group__4__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Param__Group__4__Impl_in_rule__Param__Group__416204);\r\n rule__Param__Group__4__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__ParameterExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:2671:1: ( rule__ParameterExpression__Group__1__Impl )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:2672:2: rule__ParameterExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__ParameterExpression__Group__1__Impl_in_rule__ParameterExpression__Group__15509);\n rule__ParameterExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ParameterExpression__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:2732:1: ( rule__ParameterExpression__Group_0__1__Impl )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:2733:2: rule__ParameterExpression__Group_0__1__Impl\n {\n pushFollow(FOLLOW_rule__ParameterExpression__Group_0__1__Impl_in_rule__ParameterExpression__Group_0__15630);\n rule__ParameterExpression__Group_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_4_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2012:1: ( rule__Parameter__Group_4_0__2__Impl )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2013:2: rule__Parameter__Group_4_0__2__Impl\n {\n pushFollow(FOLLOW_rule__Parameter__Group_4_0__2__Impl_in_rule__Parameter__Group_4_0__24142);\n rule__Parameter__Group_4_0__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_4_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1981:1: ( rule__Parameter__Group_4_0__1__Impl rule__Parameter__Group_4_0__2 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1982:2: rule__Parameter__Group_4_0__1__Impl rule__Parameter__Group_4_0__2\n {\n pushFollow(FOLLOW_rule__Parameter__Group_4_0__1__Impl_in_rule__Parameter__Group_4_0__14080);\n rule__Parameter__Group_4_0__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Parameter__Group_4_0__2_in_rule__Parameter__Group_4_0__14083);\n rule__Parameter__Group_4_0__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalXModel.g:2590:1: ( rule__Parameter__Group_4__0__Impl rule__Parameter__Group_4__1 )\n // InternalXModel.g:2591:2: rule__Parameter__Group_4__0__Impl rule__Parameter__Group_4__1\n {\n pushFollow(FOLLOW_15);\n rule__Parameter__Group_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Parameter__Group_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_4__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1901:1: ( ( ( rule__Parameter__Group_4_0__0 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1902:1: ( ( rule__Parameter__Group_4_0__0 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1902:1: ( ( rule__Parameter__Group_4_0__0 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1903:1: ( rule__Parameter__Group_4_0__0 )\n {\n before(grammarAccess.getParameterAccess().getGroup_4_0()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1904:1: ( rule__Parameter__Group_4_0__0 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1904:2: rule__Parameter__Group_4_0__0\n {\n pushFollow(FOLLOW_rule__Parameter__Group_4_0__0_in_rule__Parameter__Group_4__0__Impl3927);\n rule__Parameter__Group_4_0__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getParameterAccess().getGroup_4_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_1_1__1() throws RecognitionException {\n int rule__Parameter__Group_1_1__1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 880) ) { return ; }\n // InternalGaml.g:14837:1: ( rule__Parameter__Group_1_1__1__Impl )\n // InternalGaml.g:14838:2: rule__Parameter__Group_1_1__1__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__Parameter__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 880, rule__Parameter__Group_1_1__1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalXModel.g:2548:1: ( ( ( rule__Parameter__Group_4__0 )? ) )\n // InternalXModel.g:2549:1: ( ( rule__Parameter__Group_4__0 )? )\n {\n // InternalXModel.g:2549:1: ( ( rule__Parameter__Group_4__0 )? )\n // InternalXModel.g:2550:2: ( rule__Parameter__Group_4__0 )?\n {\n before(grammarAccess.getParameterAccess().getGroup_4()); \n // InternalXModel.g:2551:2: ( rule__Parameter__Group_4__0 )?\n int alt21=2;\n int LA21_0 = input.LA(1);\n\n if ( (LA21_0==35) ) {\n alt21=1;\n }\n switch (alt21) {\n case 1 :\n // InternalXModel.g:2551:3: rule__Parameter__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__Parameter__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getParameterAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1889:1: ( rule__Parameter__Group_4__0__Impl rule__Parameter__Group_4__1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1890:2: rule__Parameter__Group_4__0__Impl rule__Parameter__Group_4__1\n {\n pushFollow(FOLLOW_rule__Parameter__Group_4__0__Impl_in_rule__Parameter__Group_4__03897);\n rule__Parameter__Group_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Parameter__Group_4__1_in_rule__Parameter__Group_4__03900);\n rule__Parameter__Group_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17388:1: ( rule__XAssignment__Group_1_1__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17389:2: rule__XAssignment__Group_1_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1__1__Impl_in_rule__XAssignment__Group_1_1__135290);\r\n rule__XAssignment__Group_1_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XAssignment__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3715:1: ( rule__XAssignment__Group_1_1__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3716:2: rule__XAssignment__Group_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1__1__Impl_in_rule__XAssignment__Group_1_1__17997);\n rule__XAssignment__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5321:1: ( rule__XAssignment__Group_1_1__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5322:2: rule__XAssignment__Group_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1__1__Impl_in_rule__XAssignment__Group_1_1__111251);\n rule__XAssignment__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Parameter__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1458:1: ( ( ( rule__Parameter__TypeAssignment_1_1 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1459:1: ( ( rule__Parameter__TypeAssignment_1_1 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1459:1: ( ( rule__Parameter__TypeAssignment_1_1 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1460:1: ( rule__Parameter__TypeAssignment_1_1 )\n {\n before(grammarAccess.getParameterAccess().getTypeAssignment_1_1()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1461:1: ( rule__Parameter__TypeAssignment_1_1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1461:2: rule__Parameter__TypeAssignment_1_1\n {\n pushFollow(FOLLOW_rule__Parameter__TypeAssignment_1_1_in_rule__Parameter__Group_1__1__Impl3060);\n rule__Parameter__TypeAssignment_1_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getParameterAccess().getTypeAssignment_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an Element representing the user's layout and UserPreferences (but not portlet preferences) formatted for export. This element must have an element name of <layout>. Exported documents must not reference database identifiers and should exclude unnecessary items like channel publishing parameters, etc. Layout store implementations are may return null for users that don't have layout or preferences customizations. | public org.dom4j.Element exportLayout(IPerson person, IUserProfile profile); | [
"public interface IUserLayout {\n /**\n * The name to use for the root node of the layout. This should be used with\n * regard to rendering position within the layout tree.\n */\n public static final String ROOT_NODE_NAME = \"root\";\n\n\n /**\n * Writes user layout content (with appropriate markings) into\n * a <code>Document</code> object\n *\n * @param document a <code>Document</code> value\n * @exception PortalException if an error occurs\n */\n public void writeTo(Document document) throws PortalException;\n\n /**\n * Writes subtree of a user layout (with appropriate markings) defined by a particular node into\n * a <code>Document</code>\n *\n * @param nodeId a <code>String</code> a node determining a user layout subtree.\n * @param document a <code>Document</code> object\n * @exception PortalException if an error occurs\n */\n public void writeTo(String nodeId, Document document) throws PortalException;\n\n /**\n * Obtain a description of a node (channel or a folder) in a given user layout.\n *\n * @param nodeId a <code>String</code> channel subscribe id or folder id.\n * @return an <code>UserLayoutNodeDescription</code> value\n * @exception PortalException if an error occurs\n */\n public IUserLayoutNodeDescription getNodeDescription(String nodeId) throws PortalException;\n\n /**\n * Returns an Id of a parent user layout node.\n * The user layout root node always has ID=\"root\"\n *\n * @param nodeId a <code>String</code> value\n * @return a <code>String</code> value\n * @exception PortalException if an error occurs\n */\n public String getParentId(String nodeId) throws PortalException;\n\n /**\n * Returns a list of child node Ids for a given node.\n *\n * @param nodeId a <code>String</code> value\n * @return a <code>Enumeration</code> of <code>String</code> child node Ids.\n * @exception PortalException if an error occurs\n */\n public Enumeration getChildIds(String nodeId) throws PortalException;\n\n /**\n * Determine an Id of a next sibling node.\n *\n * @param nodeId a <code>String</code> value\n * @return a <code>String</code> Id value of a next sibling node, or <code>null</code> if this is the last sibling.\n * @exception PortalException if an error occurs\n */\n public String getNextSiblingId(String nodeId) throws PortalException;\n\n\n /**\n * Determine an Id of a previous sibling node.\n *\n * @param nodeId a <code>String</code> value\n * @return a <code>String</code> Id value of a previous sibling node, or <code>null</code> if this is the first sibling.\n * @exception PortalException if an error occurs\n */\n public String getPreviousSiblingId(String nodeId) throws PortalException;\n\n /**\n * Return a cache key, uniqly corresponding to the composition and the structure of the user layout.\n *\n * @return a <code>String</code> value\n * @exception PortalException if an error occurs\n */\n public String getCacheKey() throws PortalException;\n\n /**\n * Returns a layout Id associated with this manager/\n *\n * @return an <code>String</code> layout Id value;\n */\n public String getId();\n\n /**\n * Returns a node id associated with the supplied functional name.\n *\n * @param fname the functional name to lookup\n * @return a <code>String</code> subscription id\n * @exception PortalException if an error occurs\n */\n public String getNodeId(String fname) throws PortalException;\n \n /**\n * Returns a node id as resolved by the supplied {@link XPathExpression}\n * \n * @param xpathExpression The expression to execute against the layout DOM\n * @return The ID of the resolved node, null if there is no match\n */\n public String findNodeId(XPathExpression xpathExpression);\n \n /**\n * This method is for the same use as {@link #findNodeId(XPathExpression)}, but since DOM traversal is much faster\n * than XPath evaluation, sometimes it is worth to implement manual document traversing.\n * \n * @param finder {@link INodeIdResolver} to use against the layout DOM.\n * @return The ID of the resolved node, null if there is no match.\n */\n public String findNodeId(INodeIdResolver finder);\n\n /**\n * Returns a list of node Ids in the layout.\n *\n * @return a <code>Enumeration</code> of node Ids\n * @exception PortalException if an error occurs\n */\n public Enumeration getNodeIds() throws PortalException;\n\n /**\n * Returns an id of the root node.\n *\n * @return a <code>String</code> value\n */\n public String getRootId();\n\n /**\n * @return The names of all of the fragments incorporated into the layout\n */\n public Set<String> getFragmentNames();\n\n /**\n * @return The composite {@link IStylesheetUserPreferences} based on the preferences from the incorporated fragments\n */\n public IStylesheetUserPreferences getDistributedStructureStylesheetUserPreferences();\n\n /**\n * @return The composite {@link IStylesheetUserPreferences} based on the preferences from the incorporated fragments\n */\n public IStylesheetUserPreferences getDistributedThemeStylesheetUserPreferences();\n}",
"public interface IUserLayout {\n\n /**\n * The name to use for the root node of the layout. This should be used with regard to rendering\n * position within the layout tree.\n */\n String ROOT_NODE_NAME = \"root\";\n\n /**\n * Obtain a description of a node (channel or a folder) in a given user layout.\n *\n * @param nodeId a <code>String</code> channel subscribe id or folder id.\n * @return an <code>UserLayoutNodeDescription</code> value\n * @exception PortalException if an error occurs\n */\n IUserLayoutNodeDescription getNodeDescription(String nodeId) throws PortalException;\n\n /**\n * Returns an Id of a parent user layout node. The user layout root node always has ID=\"root\"\n *\n * @param nodeId a <code>String</code> value\n * @return a <code>String</code> value\n * @exception PortalException if an error occurs\n */\n String getParentId(String nodeId) throws PortalException;\n\n /**\n * Returns a list of child node Ids for a given node.\n *\n * @param nodeId a <code>String</code> value\n * @return a <code>Enumeration</code> of <code>String</code> child node Ids.\n * @exception PortalException if an error occurs\n */\n Enumeration getChildIds(String nodeId) throws PortalException;\n\n /**\n * Returns a layout Id associated with this manager/\n *\n * @return an <code>String</code> layout Id value;\n */\n String getId();\n\n /**\n * Returns a node id as resolved by the supplied {@link XPathExpression}\n *\n * @param xpathExpression The expression to execute against the layout DOM\n * @return The ID of the resolved node, null if there is no match\n */\n String findNodeId(XPathExpression xpathExpression);\n\n /**\n * This method is for the same use as {@link #findNodeId(XPathExpression)}, but since DOM\n * traversal is much faster than XPath evaluation, sometimes it is worth to implement manual\n * document traversing.\n *\n * @param finder {@link INodeIdResolver} to use against the layout DOM.\n * @return The ID of the resolved node, null if there is no match.\n */\n String findNodeId(INodeIdResolver finder);\n\n /**\n * Returns an id of the root node.\n *\n * @return a <code>String</code> value\n */\n String getRootId();\n\n /**\n * @return The composite {@link IStylesheetUserPreferences} based on the preferences from the\n * incorporated fragments\n */\n IStylesheetUserPreferences getDistributedStructureStylesheetUserPreferences();\n\n /**\n * @return The composite {@link IStylesheetUserPreferences} based on the preferences from the\n * incorporated fragments\n */\n IStylesheetUserPreferences getDistributedThemeStylesheetUserPreferences();\n}",
"public static String getLayout() {\n layout = getProperty(\"layout\");\n if (layout == null) layout = \"dot\";\n return layout;\n }",
"public static ReportLayout GetReportLayout()\n {\n // bind the report format to this data\n return FieldLayout.getReportLayout();\n }",
"public String getPageLayout() {\n\t\treturn layout.getText();\n\t}",
"private void\n saveLayoutHelper() \n {\n try {\n Path lpath = new Path(PackageInfo.getSettingsPath(), \"layouts\"); \n Path path = new Path(lpath, pLayoutPath);\n \n File dir = path.getParentPath().toFile();\n if(!dir.isDirectory()) \n\tif(!dir.mkdirs()) \n\t throw new PipelineException\n\t (\"Unable to create parent directory (\" + dir + \") to contain saved layout!\");\n \n LinkedList<PanelLayout> layouts = new LinkedList<PanelLayout>();\n {\n\tJManagerPanel mpanel = (JManagerPanel) pRootPanel.getComponent(0);\n\tPanelLayout layout = new PanelLayout(mpanel, null, pFrame.getBounds());\n\tlayouts.add(layout);\n }\n \n for(JPanelFrame frame : pPanelFrames) {\n\tJManagerPanel mpanel = frame.getManagerPanel();\n\tPanelLayout layout = \n\t new PanelLayout(mpanel, frame.getWindowName(), frame.getBounds());\n\tlayouts.add(layout);\n }\n\n LockedGlueFile.save(path.toFile(), \"PanelLayout\", layouts);\n }\n catch(Exception ex) {\n showErrorDialog(ex);\n }\n }",
"private void saveDefaultLayout() {\n \t\n \tif (this.hasUserDefinedLayout) return;\n \t \t\n \tPath defaultLayoutFile = getDefaultLayoutFile();\n \tif (defaultLayoutFile == null) \n \t\treturn;\n \t\n \tsaveLayout(defaultLayoutFile);\n \t\n \thasUserDefinedLayout = false;\n }",
"public Document getPresentationPreviewLayoutAsXml(Presentation presentation, String pageId);",
"public void importLayout(org.dom4j.Element layout);",
"public ReportLayout getReportLayout()\n {\n // bind the report format to this data\n return GetReportLayout();\n }",
"public CustomSpringLayout.Settings getLayoutSettings() {\n\t\treturn layout.getSettings();\n\t}",
"public String getLayout();",
"public DistributedUserLayout getUserLayout (IPerson Person, IUserProfile profile);",
"@Nested\n public DashboardLayout getLayout()\n {\n return fLayout;\n }",
"ELayoutData getLayoutData();",
"private static Layout<ILoggingEvent> getRootLayout() {\n Logger rootLogger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);\n\n final Iterator<Appender<ILoggingEvent>> appenderIterator = rootLogger.iteratorForAppenders();\n\n // Assume the root logger has exactly one appender, from which we grab its\n // layout.\n final Appender<ILoggingEvent> appender = appenderIterator.next();\n\n OutputStreamAppender<ILoggingEvent> rootAppender = null;\n if (appender instanceof OutputStreamAppender) {\n // And, assume it's an OutputStreamAppender. We need this to get at its\n // encoder...\n rootAppender = (OutputStreamAppender<ILoggingEvent>) appender;\n } else {\n throw new IllegalStateException(\"no root OutputStreamAppender\");\n }\n\n // Verify the one encoder assumption.\n if (appenderIterator.hasNext()) {\n throw new IllegalStateException(\"multiple encoders -- can't determine layout\");\n }\n\n // Finally, grab the layout.\n\n // Look for LayoutWrappingEncoder since it's the class that introduces\n // Layout. See http://logback.qos.ch/manual/encoders.html.\n if (!(rootAppender.getEncoder() instanceof LayoutWrappingEncoder)) {\n throw new IllegalStateException(\"no LayoutWrappingEncoder -- can't determine layout\");\n }\n\n final LayoutWrappingEncoder<ILoggingEvent> rootEncoder =\n (LayoutWrappingEncoder<ILoggingEvent>) rootAppender.getEncoder();\n\n return rootEncoder.getLayout();\n }",
"@Override\n\tpublic java.lang.String getLayout() {\n\t\treturn _scienceApp.getLayout();\n\t}",
"public GraphLayout getLayout() {\r\n\t\treturn _layout;\r\n\t}",
"public void setUserLayout (IPerson Person, IUserProfile profile,Document layoutXML, boolean channelsAdded);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the param mandatory. | public final void setParamMandatory(final boolean paramMandatory) {
this.paramMandatory = paramMandatory;
} | [
"public void setRequiredParam(boolean requiredParam) {\n this.isRequiredParam = requiredParam;\n }",
"public void setMandatory(Boolean mandatory) {\n this.mandatory = mandatory;\n }",
"void setMandatory(\n boolean mandatory);",
"public void setMandatory(boolean value) {\n this.mandatory = value;\n }",
"public final Boolean getParamMandatory() {\n return this.paramMandatory;\n }",
"public void setMandatory(boolean mandatory) {\n ModelEvent<?> event = new ModelEventBuilder( ModelEventType.MANDATORY_FLAG_MODIFIED, this )\n .setOldValue( this.mandatory ).setNewValue( mandatory ).buildEvent();\n\n this.mandatory = mandatory;\n publishEvent( event );\n }",
"public void setMandatory(java.lang.Boolean value);",
"public boolean isRequiredParam() {\n return this.isRequiredParam;\n }",
"@Override\n\tpublic void setMandatory(boolean mandatory) {\n\t\t_formItem.setMandatory(mandatory);\n\t}",
"public void setRequired(boolean tmp) {\n this.required = tmp;\n }",
"public boolean isSetParam() {\n return this.param != null;\n }",
"public void setMandatory(String isMandatory) {\n\t\tif (isMandatory != null) {\n\t\t\tif (\"N\".equals(isMandatory) || \"n\".equals(isMandatory)) {\n\t\t\t\tthis.mandatory = false;\n\t\t\t} else if (\"Y\".equals(isMandatory) || \"y\".equals(isMandatory)) {\n\t\t\t\tthis.mandatory = true;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(dataItemName + \" mandatory flag is \" + this.mandatory);\n\t}",
"public boolean isSetParam() {\n return this.param != null;\n }",
"public void setRequired(boolean value) {\r\n this.required = value;\r\n }",
"public void setRequired(boolean value) {\n this.required = value;\n }",
"public void setRequired(boolean required) {\r\n\t\tthis.required = required;\r\n\t}",
"public void ensureRequiredParametersArePresent() throws ParameterValueException {\n for (ApplicationParameter param : _parameters.values()) {\n if (param.isRequired() && !param.isPresent())\n throw new ParameterValueException(param, null, \"Required parameter \" + param.getName() + \" not set.\");\n }\n }",
"@Override\n protected boolean mayContainParam() {\n return true;\n }",
"public void setRequired(String title)\n\t{\n\t\tOptionalArgument arg = new OptionalArgument(title);\n\t\targumentList.get(argumentList.indexOf(arg)).setRequired();\n\t\trequiredOptionals.add(arg);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if the other Item can merge with this | public boolean canMerge(Item other); | [
"boolean canMerge();",
"boolean canMerge(T x);",
"public boolean isMerge();",
"boolean isMergeable(ICommand newCommand);",
"private boolean combineItems(EntityItem other)\n {\n if (other == this)\n {\n return false;\n }\n else if (other.isAlive() && this.isAlive())\n {\n ItemStack itemstack = this.getItem();\n ItemStack itemstack1 = other.getItem();\n\n if (this.pickupDelay != 32767 && other.pickupDelay != 32767)\n {\n if (this.age != -32768 && other.age != -32768)\n {\n if (itemstack1.getItem() != itemstack.getItem())\n {\n return false;\n }\n else if (itemstack1.hasTag() ^ itemstack.hasTag())\n {\n return false;\n }\n else if (itemstack1.hasTag() && !itemstack1.getTag().equals(itemstack.getTag()))\n {\n return false;\n }\n else if (itemstack1.getItem() == null)\n {\n return false;\n }\n else if (itemstack1.getItem().func_77614_k() && itemstack1.func_77960_j() != itemstack.func_77960_j())\n {\n return false;\n }\n else if (itemstack1.getCount() < itemstack.getCount())\n {\n return other.combineItems(this);\n }\n else if (itemstack1.getCount() + itemstack.getCount() > itemstack1.getMaxStackSize())\n {\n return false;\n }\n else if (!itemstack.areCapsCompatible(itemstack1))\n {\n return false;\n }\n else\n {\n itemstack1.grow(itemstack.getCount());\n other.pickupDelay = Math.max(other.pickupDelay, this.pickupDelay);\n other.age = Math.min(other.age, this.age);\n other.setItem(itemstack1);\n this.remove();\n return true;\n }\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }",
"boolean isMerged();",
"boolean canMergeWith(Tile t) {\n return !isMerged && !t.isMerged && val == t.getValue();\n }",
"protected abstract boolean canUseMergeJoin(LinkedList<Variable> possibleOrdering);",
"public boolean isMergeable() {\n return mergeable;\n }",
"public static boolean isMergeable(Node r1, Node r2) {\n if(r1 == null || r2 == null) return true;\n else return findMax(r1).key < findMax(r2).key;\n }",
"public boolean isMerging() { return merging != 0.0; }",
"public boolean canCombine(ILootProperty loot);",
"protected boolean requiresComparison(ActionItemContract actionItem1, ActionItemContract actionItem2) {\n\t\treturn actionItem1.getDocumentId().equals(actionItem2.getDocumentId()) &&\n\t\t\tactionItem1.getPrincipalId().equals(actionItem2.getPrincipalId());\n\t}",
"public boolean isMerged() {\n return merged;\n }",
"boolean shouldMerge() {\n return mergeState.segmentInfo.getDocCount() > 0;\n }",
"@Override\r\n\tpublic boolean canMergeSlot(ItemStack stack, Slot p_94530_2_)\r\n {\r\n return p_94530_2_.inventory != this.craftResult && super.canMergeSlot(stack, p_94530_2_);\r\n }",
"private boolean isMergeRule(Node nodeItem) {\n if (null != nodeItem.getAttributes()) {\n Node namedItem = nodeItem.getAttributes().getNamedItem(\"mode\");\n if (null == namedItem) {\n return false;\n }\n return namedItem.getNodeValue().equalsIgnoreCase(\"merge\");\n } else {\n return false;\n }\n }",
"public boolean canMergeSlot(ItemStack stack, Slot slotIn) {\r\n return false;\r\n }",
"private static boolean checkObjectMatch(\n SMGJoinTargetObjects pJto,\n SMGObject pObj1,\n SMGObject pObj2) {\n // check if it is feasible to merge pObj1 and pObj2\n SMGJoinMatchObjects mo =\n new SMGJoinMatchObjects(pJto.status, pJto.inputSMG1, pJto.inputSMG2, pJto.mapping1,\n pJto.mapping2, pObj1, pObj2);\n if (!mo.isDefined()) {\n pJto.defined = false;\n pJto.recoverable = true;\n return true;\n }\n\n pJto.status = mo.getStatus();\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the right child operator | public LogicalOperator getRightChild(){
return right;
} | [
"public OptimizerPlanOperator getChild()\n\t{\n\t\treturn this.childOperator;\n\t}",
"EObject getOperator();",
"public abstract AirthmaticOperation getAirthmaticOperation(Character operator);",
"public abstract OperatorImpl getParent();",
"CriteriaExpression<?> getRightHandOperand();",
"public BinaryOperator getOperator() {\n return op;\n }",
"public abstract OperatorKind getOperatorKind();",
"public Operator operator() {\n return _operator != null ? _operator : Operator.OR;\n }",
"INaviOperandTree getOperand();",
"public LogicalOperator getOperator() {\n return operator;\n }",
"public LogicalOperator getLeftChild(){\n\t\treturn left;\n\t}",
"@Override\n public NodeType ExecuteOperation()\n {\n //if the first child is an operator\n if(this.childNodes[0].isOperator==true)\n {\n BasicOperator basicOperator=(BasicOperator)this.childNodes[0]; \n if(basicOperator.operands==1)\n {\n UnaryOperator unaryOperator=(UnaryOperator)childNodes[0];\n return unaryOperator.PerformOperation(childNodes[1]);\n }\n else if(basicOperator.operands==2)\n {\n BinaryOperator binaryOperator=(BinaryOperator)childNodes[0];\n return binaryOperator.PerformOperation(childNodes[1], childNodes[2]);\n }\n else if(basicOperator.operands==3)\n {\n TernaryOperator ternaryOperator=(TernaryOperator)childNodes[0];\n return ternaryOperator.PerformOperation(childNodes[1], childNodes[2], childNodes[3]);\n }\n }\n //if not an operator\n else\n {\n return this.childNodes[0].ExecuteOperation();\n }\n return null;\n }",
"QuestionnaireItemOperator getOperator();",
"public List<OperatorImpl> getChildOperators() {\n\t\treturn Collections.emptyList();\n\t}",
"public final SymbolNode getOperator() { return this.operator; }",
"public int getOperator()\n {\n return m_primaryOperator;\n }",
"String getOp();",
"public String getOperator() {\n return operator;\n }",
"public void setChildOp(Operator childOp) {\n\t\tthis.childOp = childOp;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the parameters in the rawline. | private void findParameters() {
String parameters = rawline.substring(index);
parseParameters(parameters);
} | [
"private void readParameters() throws IOException\n\t\t{\n\t\tboolean found=false;\n\t\tFile fParamsDir=new File(basedir,\"parameters\");\n\t\tfor(File f:fParamsDir.listFiles())\n\t\t\t{\n\t\t\tif(f.getName().endsWith(\"-parameters\"))\n\t\t\t\t{\n\t\t\t\tfound=true;\n\t\t\t\tString content=EvFileUtil.readFile(f);\n\t\t\t\tStringTokenizer stok=new StringTokenizer(content, \"\\n\");\n\t\t\t\twhile(stok.hasMoreTokens())\n\t\t\t\t\t{\n\t\t\t\t\tString line=stok.nextToken();\n\t\t\t\t\tif(!line.startsWith(\"#\") && !line.equals(\"\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\tStringTokenizer linetok=new StringTokenizer(line, \" \");\n\t\t\t\t\t\tString key=linetok.nextToken();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(key.equals(\"xy_res\"))\n\t\t\t\t\t\t\txy_res=Double.parseDouble(linetok.nextToken());\n\t\t\t\t\t\telse if(key.equals(\"z_res\"))\n\t\t\t\t\t\t\tz_res=Double.parseDouble(linetok.nextToken());\n\t\t\t\t\t\telse if(key.equals(\"time_interval\"))\n\t\t\t\t\t\t\ttime_interval=new EvDecimal(linetok.nextToken()).multiply(60);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.println(\"Unhandled: \"+key);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tif(!found)\n\t\t\tthrow new IOException(\"No parameters file found\");\n\t\t\t\n\t\t}",
"public int identifySpecialParameter(AbilityImport ai, int line) {\n int index,count;\n String possibleSpecialParameter;\n \n possibleSpecialParameter = ai.getImportLine(line);\n if ( possibleSpecialParameter != null && possibleSpecialParameter.indexOf( getName() + \":\" ) != -1 ) {\n return 10;\n }\n\n return 0;\n }",
"String getParam(String raw);",
"private static String findParameter( Buffer buf, String name, Map params, Map macros, LevelTracker level_tracker ) throws FndException\n {\n level_tracker.search_level++;\n String value = (String)params.get(name);\n if( value!=null )\n {\n level_tracker.search_level--;\n if(DEBUG) Util.debug(\"ConfigFileParser: \"+sep(level_tracker)+\"Parameter [\"+name+\"] found in cache: '\"+value+\"'.\");\n return value;\n }\n\n Item item = buf.findItem(name);\n value = item==null ? \"\" : replaceMacroReferences( buf, item.getString(), params, macros, level_tracker );\n\n if( Str.isEmpty(value) )\n throw new FndException(\"FNDCFFPARNFOUND: Parameter '&1' not found in the confiugauration file.\",name);\n else if (DEBUG)\n Util.debug(\"ConfigFileParser: \"+sep(level_tracker)+\"Parameter [\"+name+\"] found: '\"+value+\"'.\");\n level_tracker.search_level--;\n return value;\n }",
"public abstract <P extends Parameter> P parse(java.lang.String line) throws java.lang.Exception;",
"public void loadParameters(List<String> lines){\n\t\tString tmp[];\n\t\tfor (int i = 0; i < lines.size(); i++) {\n\t\t\ttmp = lines.get(i).split(\"=\");\n\t\t\ttmp[0] = tmp[0].trim();\n\t\t\ttmp[1] = tmp[1].trim();\n\t\t\tif (tmp[0].compareToIgnoreCase(\"KSOCKET\") == 0) {\n\t\t\t\tKSOCKET = Integer.parseInt(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"KHYPO\") == 0) {\n\t\t\t\tKHYPO = Integer.parseInt(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"TAU\") == 0) {\n\t\t\t\tTAU = Double.parseDouble(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"RADIUS\") == 0) {\n\t\t\t\tRADIUS = Double.parseDouble(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"MAXROUND\") == 0) {\n\t\t\t\tMAXROUND = Integer.parseInt(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"SENTENCE_LIMIT_CHAR\") == 0) {\n\t\t\t\tSENTENCE_LIMIT_CHAR = Boolean.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"BASEFEAT\") == 0) {\n\t\t\t\tBASEFEAT = Boolean.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"EXTENDFEAT\") == 0) {\n\t\t\t\tEXTENDFEAT = Boolean.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"ADDITIONALFEAT\") == 0) {\n\t\t\t\tADDITIONALFEAT = Boolean.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"GAZETTEERS\") == 0) {\n\t\t\t\tGAZETTEERS = Boolean.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"DOCUMENTFEAT\") == 0) {\n\t\t\t\tDOCUMENTFEAT = Boolean.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"DOCUMENTCOLUMN\") == 0) {\n\t\t\t\tDOCUMENTCOLUMNS.add(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"BARRIERFEAT\") == 0) {\n\t\t\t\tBARRIERFEAT = Boolean.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0].compareToIgnoreCase(\"PRINT_WEIGHTS_EACH_ROUND\") == 0) {\n\t\t\t\tPRINT_WEIGHTS_EACH_ROUND = Boolean\n\t\t\t\t.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0]\n\t\t\t .compareToIgnoreCase(\"GAZETTEERS_CASESENSITIVE_MAINWORD\") == 0) {\n\t\t\t\tGAZETTEERS_CASESENSITIVE_MAINWORD = Boolean\n\t\t\t\t.parseBoolean(tmp[1]);\n\t\t\t} else if (tmp[0]\n\t\t\t .compareToIgnoreCase(\"GAZETTEERS_CASESENSITIVE_CONTEXTWORDS\") == 0) {\n\t\t\t\tGAZETTEERS_CASESENSITIVE_CONTEXTWORDS = Boolean\n\t\t\t\t.parseBoolean(tmp[1]);\n\n\t\t\t} else if (tmp[0]\n\t\t\t .compareToIgnoreCase(\"LEXICON\") == 0) {\n\t\t\t\tLEXICON = tmp[1];\n\t\t\t}\n\n\n\t\t}\n\t\ttestCosistency();\n\t\tSystem.out.print(printParmeters());\n\t}",
"private void readParameters() {\n File file = new File(\"C:\\\\Users\\\\Sergio\\\\IdeaProjects\\\\engine-circlesimage\\\\parameters.txt\");\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line = br.readLine();\n while ( line != null ) {\n String[] splittedLine = line.split(\" \");\n setScreenParameters(splittedLine);\n setPopulationParameters(splittedLine);\n setVariationCircleImages(splittedLine);\n setBackgroundsImagesPaths(splittedLine);\n setScreenShootPath(splittedLine);\n setProgramCosmetics(splittedLine);\n line = br.readLine();\n }\n br.close();\n } catch ( IOException e ) {\n System.out.println(\"The file can't be read!\");\n e.printStackTrace();\n }\n }",
"public int indexOfParameter(Parameter p) { return parameters.indexOf(p); }",
"public int getParameterOffset();",
"private void findCommand() {\r\n\r\n\t\t//\t<command> ::= <letter> { <letter> } | <number> <number> <number>\r\n\t\t\r\n\t\tint nextspace = rawline.substring(index).indexOf(' ');\r\n\t\tcommand = rawline.substring(index).substring(0, nextspace).trim();\r\n\t\tindex += command.length();\r\n\t}",
"protected void processLine(String line){\r\n //use a second Scanner to parse the content of each line \r\n try(Scanner scanner = new Scanner(line)){\r\n scanner.useDelimiter(\"=\");\r\n if (scanner.hasNext()){\r\n //assumes the line has a certain structure\r\n String name = scanner.next();\r\n String value = scanner.next();\r\n log(\"Name is : \" + quote(name.trim()) + \", and Value is : \" + quote(value.trim()));\r\n }\r\n else {\r\n log(\"Empty or invalid line. Unable to process.\");\r\n }\r\n }\r\n }",
"private static Map<String, String> readParam(String paramPath) throws IOException {\r\n\r\n Map<String, String> params = new HashMap<String, String>();\r\n Scanner scan = new Scanner(new File(paramPath));\r\n String line = null;\r\n do {\r\n line = scan.nextLine();\r\n String[] pair = line.split(\"=\");\r\n params.put(pair[0].trim(), pair[1].trim());\r\n } while (scan.hasNext());\r\n scan.close();\r\n\r\n // parameters required for this example to run\r\n if (!(params.containsKey(\"indexPath\") && params.containsKey(\"queryFilePath\")\r\n && params.containsKey(\"trecEvalOutputPath\") && params.containsKey(\"retrievalAlgorithm\"))) {\r\n fatalError(\"Error: Parameters were missing.\");\r\n }\r\n\r\n return params;\r\n }",
"public abstract String getParameters();",
"protected String[] getMarkerValues(String scriptLine) {\n // Extract parameters separated by semicolon from the line,\n markerValues = scriptLine.substring(PARAM_PREFIX.length()).split(PARAM_SEPARATOR, 0);\n // Spaces on both sides of parameters are trimmed\n for (int i = 0; i < markerValues.length; i++) {\n // Marker parameter values are trimmed due to numbers\n markerValues[i] = markerValues[i].trim();\n }\n return markerValues;\n }",
"java.lang.String getParams();",
"private void loadParameters() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new BufferedInputStream(Files.newInputStream(path))));\n\n\t\tdo {\n\t\t\tString line = reader.readLine();\n\t\t\tif (line == null || line.equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (line.startsWith(\"--\") || line.startsWith(\" \")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString[] tokens = line.trim().split(\"\\\\s+\");\n\t\t\tparameters.put(Parameter.valueOf(tokens[0]), tokens[1]);\n\t\t} while (true);\n\n\t}",
"private void readLineInfo(String lineInfoFile) throws IOException, JIPEvaluationException\n {\n CSVReader reader = new CSVReader(lineInfoFile);\n String[] fields;\n JIPTermParser parser = engine.getTermParser();\n while((fields = reader.readLine()) != null)\n {\n for(int i = 0; i < fields.length; i++)\n {\n if (fields[i].isEmpty()) fields[i] = \"empty\";\n }\n try {\n JIPQuery query = engine.openSynchronousQuery(parser.parseTerm(\"addLine(\" +\n fields[0] + ',' + //id\n fields[1] + ',' + //highway\n fields[3] + ',' + //oneway\n fields[4] + ',' + //lit\n fields[6] + ',' + //maxspeed\n fields[9] + ',' + //access\n fields[17] + //toll\n \").\"));\n if (query.nextSolution() == null) throw new JIPEvaluationException(\"LineInfo: failed to assert fact\");\n } catch (ArrayIndexOutOfBoundsException e) {\n e.printStackTrace();\n } catch (JIPSyntaxErrorException e)\n {}\n\n }\n reader.closeFile();\n }",
"private void params()\r\n {\r\n curToken = getToken();\r\n\r\n // Implement the \"int ID param-1 param-list-1\" production.\r\n if(curToken.getToken().equals(\"int\"))\r\n {\r\n removeToken();\r\n curToken = getToken();\r\n\r\n if(curToken.getTokenType().equals(\"ID\"))\r\n {\r\n \talpha = curToken.getToken();\r\n removeToken();\r\n param1();\r\n\r\n if(isValid)\r\n {\r\n paramList1();\r\n return;\r\n }\r\n }\r\n // Invalid program detected.\r\n else\r\n {\r\n isValid = false;\r\n }\r\n }\r\n // Implement the \"float ID param-1 param-list-1\" production.\r\n else if(curToken.getToken().equals(\"float\"))\r\n {\r\n removeToken();\r\n curToken = getToken();\r\n\r\n if(curToken.getTokenType().equals(\"ID\"))\r\n {\r\n removeToken();\r\n param1();\r\n\r\n if(isValid)\r\n {\r\n paramList1();\r\n return;\r\n }\r\n }\r\n // Invalid program detected.\r\n else\r\n {\r\n isValid = false;\r\n }\r\n }\r\n // Implement the \"void params-1\" production.\r\n else if(curToken.getToken().equals(\"void\"))\r\n {\r\n removeToken();\r\n curToken = getToken();\r\n params1();\r\n }\r\n }",
"protected void initLineParameters(Vector lineVector, Vector urlVector)\r\n {\r\n // get unparsed line parameters\r\n dbg(\"get line parameters...\");\r\n for (int i=0; i<MAX_LINES; i++) {\r\n\t String lineParName = \"line\" + i;\r\n\t String linePar = getParameter(lineParName);\r\n\t String urlParName = \"url\" + i;\r\n\t String urlPar = getParameter(urlParName);\r\n\t if (linePar != null) {\r\n\t dbg(\" \" + lineParName + \":\" + linePar);\r\n\t lineVector.addElement(linePar);\r\n\t dbg(\" \" + urlParName + \":\" + urlPar);\r\n\t urlVector.addElement(urlPar);\r\n\t }\r\n }\r\n\r\n if (lineVector.size() <= 0)\r\n\t // assume no line parameter provided; use default\r\n\t initDefaultLineParameters(lineVector);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ selectSampleObject Select the samples | public void selectSampleObject(int[] si) {
Sample[] ns = new Sample[si.length]; // Create a new sample array
// LOOP THROUGH THE SAMPLE ARRAY
for (int i = 0; i < si.length; i++) {
ns[i] = sample[si[i]]; // Set the ith sample
}
sample = ns; // Set to the new sample array
x = x.selectCol(si); // Set to the new columns
} | [
"public void selectSample(int[] si) {\n sampleName = sampleName.select(si); // Select the sample names\n selectSampleObject(si); // Select the sample objects\n numSample = sampleName.size; // Update the number of samples\n }",
"public void selectSample(Texts z) {\n int[] si = sampleName.select(z); // Get the sample indices\n selectSample(si); // Select the samples\n }",
"public void select(Object obj, boolean selectionFlag);",
"public void selectSample(Text[] z) {\n int[] si = sampleName.select(z); // Get the sample indices\n selectSample(si); // Select the samples\n }",
"List<SysObjectCopy> selectByExample(SysObjectCopyExample example);",
"public void selectSample(String[] z) {\n int[] si = sampleName.select(z); // Get the sample indices\n selectSample(si); // Select the samples\n }",
"List<InterestProduct> selectByExample(InterestProductExample example);",
"public void select(List<Object> objs, boolean selectionFlag) throws Exception;",
"private String[] getSelSamplesDataFromChooserGUI(int index)\n { /* getSelSamplesDataFromChooserGUI */\n int len= pccgSample.selObjListSize;\n String tmpStr[]= new String[len];\n for(int x=0;x < len; x++)\n cd[index].selSamples[x]= pccgSample.selObjList[x];\n cd[index].nSelSamples= len;\n return(tmpStr);\n }",
"List<DictDoseUnit> selectByExample(DictDoseUnitExample example);",
"public void select(Indexable object){\n if(object instanceof Village){\n selectionType = Type.VILLAGE;\n selectedIndices.clear();\n }\n else if(object instanceof Post){\n selectionType = Type.POST;\n selectedIndices.clear();\n }\n else if(object instanceof Unit){\n if(selectionType != Type.UNITS){\n selectedIndices.clear();\n }\n selectionType = Type.UNITS;\n }\n\n selectedIndices.add(object.getIndex());\n }",
"List<RepStuLearning> selectByExample(RepStuLearningExample example);",
"public void select(String Object, String valueTobeSelected , String Selectby , String variableName){\n\t \n\t Select select = null ;\n\t String ObjectId = getObjectid(Object);\n\t \n\t if(Object.contains(\"NAME=\")){\n\t\t \n\t\t try {\n\t\t\tselect = new Select( driver.findElement(By.name(ObjectId)));\n\t\t\t \n\t\t\t if (Selectby.equalsIgnoreCase(\"byvisibletext\")){\n\t\t\t\t select.selectByVisibleText(valueTobeSelected);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t \n\t\t\t } else if(Selectby.equalsIgnoreCase(\"byvalue\")){\n\t\t\t\t select.selectByValue(valueTobeSelected);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t } else if(Selectby.equalsIgnoreCase(\"byindex\")){\n\t\t\t\t \n\t\t\t\t int Index = Integer.parseInt(valueTobeSelected);\n\t\t\t\t select.selectByIndex(Index);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t }\n\t\t} catch (NumberFormatException e) {\n\t\t\t \n\t\t\t System.out.println(\"[ Method = select ] \" + \" [ Selected = false ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \"); \n\t\t\t //TestLog.log(LogStatus.FAIL, \"[ Method = select ] \" + \" [ Selected = false ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\n\t\t\t e.printStackTrace();\n\t\t}\n\t\t \n\t }else if(Object.contains(\"ID=\")){\n\t\t \n\t\t try {\n\t\t\tselect = new Select(driver.findElement(By.id(ObjectId)));\n\t\t\t\t \n\t\t\t if (Selectby.equalsIgnoreCase(\"byvisibletext\")){\n\t\t\t\t select.selectByVisibleText(valueTobeSelected);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t } else if(Selectby.equalsIgnoreCase(\"byvalue\")){\n\t\t\t\t select.selectByValue(valueTobeSelected);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t } else if(Selectby.equalsIgnoreCase(\"byindex\")){\n\t\t\t\t \n\t\t\t\t int Index = Integer.parseInt(valueTobeSelected);\n\t\t\t\t select.selectByIndex(Index);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t }\n\t\t} catch (NumberFormatException e) {\n\t\t\t \n\t\t\tSystem.out.println(\"[ Method = select ] \" + \" [ Selected = false ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \"); \n\t\t\t //TestLog.log(LogStatus.FAIL, \"[ Method = select ] \" + \" [ Selected = false ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t e.printStackTrace();\n\t\t}\n\t\t \n\t\t \n\t }else if(Object.contains(\"\")){\n\t\t \n\t\t try {\n\t\t\tselect = new Select(driver.findElement(By.xpath(ObjectId)));\n\t\t\t\t \n\t\t\t if (Selectby.equalsIgnoreCase(\"byvisibletext\")){\n\t\t\t\t \n\t\t\t\t select.selectByVisibleText(valueTobeSelected);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t } else if(Selectby.equalsIgnoreCase(\"byvalue\")){\n\t\t\t\t select.selectByValue(valueTobeSelected);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t } else if(Selectby.equalsIgnoreCase(\"byindex\")){\n\t\t\t\t \n\t\t\t\t int Index = Integer.parseInt(valueTobeSelected);\n\t\t\t\t select.selectByIndex(Index);\n\t\t\t\t System.out.println(\" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t\t //TestLog.log(LogStatus.PASS, \" [ Method = select ] \" + \" [ Selected = true ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\t }\n\t\t} catch (NumberFormatException e) {\n\t\t\t \n\t\t\t System.out.println(\"[ Method = select ] \" + \" [ Selected = false ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \"); \n\t\t\t //TestLog.log(LogStatus.FAIL, \"[ Method = select ] \" + \" [ Selected = false ] \" + \" [ \" + variableName + \" = \" + valueTobeSelected + \" ] \" + \" [ Selected By Category = \" + Selectby + \" ] \" + \" [ Object = \" + Object + \" ] \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \n\t\t \n\t }\n }",
"public void select(Object xSpec, Object ySpec);",
"@GET\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic List<SampleObject> getSampleObjects(\n\t\t\t@QueryParam(\"numberOfSampleObjects\") @DefaultValue(\"25\") int numberOfSampleObjects,\n\t\t\t@QueryParam(\"startIndex\") @DefaultValue(\"0\") Long startIndex)\n\t\t\tthrows IOException, AppException {\n\t\tList<SampleObject> sampleObjects = sampleObjectService\n\t\t\t\t.getSampleObjects(numberOfSampleObjects, startIndex);\n\t\treturn sampleObjects;\n\t}",
"@FXML\n\tprivate void handleSelectSample() {\n\t\tSample x = xData.getSelectionModel().getSelectedItem();\n\t\tSample y = yData.getSelectionModel().getSelectedItem();\n\n\t\tif (xLabel.getText().equals(\"\"))\n\t\t\tx.setName(\"X-Axis\");\n\t\telse\n\t\t\tx.setName(xLabel.getText());\n\t\t\n\t\tif (yLabel.getText().equals(\"\"))\n\t\t\ty.setName(\"Y-Axis\");\n\t\telse\n\t\t\ty.setName(yLabel.getText());\n\t\t\n\t\tshowScatterPlot(x, y);\n\t}",
"public Sample getSample( int index );",
"public void sortSample() {\n int[] si = sampleName.sort(); // Sort the sample names\n selectSampleObject(si); // Select the samples\n }",
"public void setSelection(Object obj) {\n setSelection(new StructuredSelection(obj));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make request to tagging microservice | private JSONObject makeRequest() throws JSONException {
Client client = ClientBuilder.newClient();
WebTarget res = null;
JSONObject result = null;
try {
String taggingServiceURL = "http://" + fileServiceDomain + "/" +
apiVersion + "/tags/?filter=domain%3DSKILLS";
res = client.target(taggingServiceURL);
String resp = res.request().get(String.class);
JSONObject response = new JSONObject(new JSONTokener(resp));
result = response.getJSONObject("result");
}catch(Exception e) {
logger.error("Exception in contacting tagging service "+e.getMessage());
}
return result;
} | [
"TagResourceResult tagResource(TagResourceRequest tagResourceRequest);",
"TagOperationsClient getTagOperations();",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"@GetMapping(\"/tag-requests/{id}\")\n @Timed\n public ResponseEntity<TagRequestDTO> getTagRequest(@PathVariable Long id) {\n log.debug(\"REST request to get TagRequest : {}\", id);\n TagRequestDTO tagRequestDTO = tagRequestService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(tagRequestDTO));\n }",
"@Override\n public TagResourceResult tagResource(TagResourceRequest request) {\n request = beforeClientExecution(request);\n return executeTagResource(request);\n }",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/{user_id}/tags\")\n Call<Void> addUserTag(\n @retrofit2.http.Path(\"user_id\") Integer userId, @retrofit2.http.Body StringWrapper tag\n );",
"InternalResultsResponse<Tag> fetchTagByName(TagRequest tagRequest);",
"public void tagObjectQuery() {\n final TagObjectQueryRequest request = new TagObjectQueryRequest();\n\n final TagObjectQueryResponse.Result response = client.tagObjectQuery(request);\n assertNotNull(\"Should not be null\", response);\n logger.info(\"Response: {}\", response);\n }",
"@GetMapping(\"/_search/tags\")\n @Timed\n public List<TagsDTO> searchTags(@RequestParam String query) {\n log.debug(\"REST request to search Tags for query {}\", query);\n return tagsService.search(query);\n }",
"TagCertificateAuthorityResult tagCertificateAuthority(TagCertificateAuthorityRequest tagCertificateAuthorityRequest);",
"List<Tag> getMyTagCloud(User user);",
"@GetMapping(\"/tags/{id}\")\n @Timed\n public ResponseEntity<TagsDTO> getTags(@PathVariable Long id) {\n log.debug(\"REST request to get Tags : {}\", id);\n TagsDTO tagsDTO = tagsService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(tagsDTO));\n }",
"private static Response getTagsResponse(Request request, DataUpdater dataUpdater)\n\t{\n\t\tint verified = 0;\n\t\tJSONObject data = request.getData();\n\t\tif (data.has(\"email\") && data.has(\"password\"))\n\t\t{\n\t\t\tverified = dataUpdater.isAccountVerified(\n\t\t\t\t\tdata.getString(\"email\"), data.getString(\"password\"));\n\t\t}\n\t\tif (verified == 1)\n\t\t{\n\t\t\t/* Soundgasm + Patreon tags */\n\t\t\treturn new Response(ResponseType.TAGS,\n\t\t\t\t\tgetDataObject(dataUpdater.getTagsWithPatreonJSON()));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Soundgasm tags only */\n\t\t\treturn new Response(ResponseType.TAGS,\n\t\t\t\t\tgetDataObject(dataUpdater.getTagsJSON()));\n\t\t}\n\t}",
"@GetMapping(\"/mark-tags/{id}\")\n @Timed\n public ResponseEntity<Tag> getMarkTag(@PathVariable Long id) {\n log.debug(\"REST request to get Tag : {}\", id);\n Tag markTag = markTagRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(markTag));\n }",
"@POST\n @Path(\"/{id}/tags\")\n public Response addTagsToDataset(@PathParam(\"id\") String id, @FormParam(\"tags\") String tags, @javax.ws.rs.core.Context HttpServletRequest request) {\n return addTagsToItem(id, tags, Cet.DATASET, request);\n }",
"@ApiOperation(value = \"Endpoint Summary Description goes here\",\n notes = \"Endpoint Complete Description goes here\",\n response = Response.class)\n @RequestMapping(value = \"/dosomething\", method = RequestMethod.GET, produces = \"application/json\")\n public ResponseEntity<Response> doSomething() throws Exception {\n MediaTagResponse response = imageTaggingService.tagImage(\"http://www.spain.info/export/sites/spaininfo/comun/carrusel-recursos/madrid/dp_madrid_dg_im_03.jpg_369272544.jpg\");\n //\n //\n\n // return response\n return ResponseEntity.ok(new Response(true, response.getLabel().stream().map(TagDTO::getName).collect(Collectors.joining(\",\"))));\n }",
"public int tagUsingFeedcodes(String tagger, String taggee, String gamecode){\n JSONObject tagRequest = new JSONObject();\n\n try{\n tagRequest.put(\"tagger\", tagger);\n tagRequest.put(\"tagged\", taggee);\n } catch(JSONException e){\n e.printStackTrace();\n }\n\n Log.d(\"Tag\", tagRequest.toString());\n\n PostTask task = new PostTask(serviceURL + \"/\" + gamecode + \"/tag\",client,tagRequest);\n\n JSONObject tagResponse = null;\n\n try{\n tagResponse = task.execute().get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n if(tagResponse == null){\n Log.e (\"Tag failed\", \"Server response error\");\n return -1;\n }\n\n try {\n if (tagResponse.getBoolean(\"success\")) {\n return 0;\n }\n else {\n return 1;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return -1;\n }",
"@RequestMapping(value=\"/tag\", method=RequestMethod.POST, headers={\"Content-Type=application/json\"})\n @ResponseBody\n public Map<String,Object> tag(@RequestBody Map<String, String[]> body) {\n \tMap<String,Object> response = new HashMap<String,Object>();\n \tfor (Map.Entry<String,String[]> entry: body.entrySet()) {\n \t\tString jid = entry.getKey();\n \t\tString[] tags = entry.getValue();\n \t\ttry {\n\t \t\tJob job = qlessClient.getJob(jid);\n\t \t\tjob.tag(tags);\n\t \t\tresponse.put(jid, tags);\n \t\t} catch (IOException e) {\n \t\t\tresponse.put(jid, \"failed\");\n \t\t}\n \t}\n \treturn response;\n }",
"java.util.concurrent.Future<TagResourcesResult> tagResourcesAsync(TagResourcesRequest tagResourcesRequest);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of description method, of class Appointment. | @Test
public void testDescription() {
System.out.println("description");
Appointment instance = new Appointment("des", "3/3/2017","12:00","12:30", new Patient("pa","paddr","mob", "id"), new Doctor("d1","d1id","Medicine"));
String expResult = "des";
String result = instance.description();
assertEquals(expResult, result);
} | [
"@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n Meal m = new Meal(\"rizek\", \"toto je super kureci rizek z kurete z volneho chovu\", \"1,3,2,4\", \"1\", 100, 1);\n assertEquals(\"toto je super kureci rizek z kurete z volneho chovu\", m.getDescription());\n }",
"@Test\n public void testGetDescription() {\n assertThat(doc.getDescription()).isEqualTo(description);\n }",
"@Test\n public void getDescriptionTest() {\n Task t = new Task(\"buy book\");\n assertEquals(\"buy book\", t.getDescription());\n }",
"@Test\n\tvoid descriptionTest() {\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tString expected = \"Name: \" + item.toString() + \"\\nHeal Amount: \" + item.getHealAmount() +\n\t\t\t\t\t\"\\nCures Plague: \" + item.getCure() +\"\\nOutpost Cost: $\" + item.getPrice();\n\t\t\tassertEquals(item.itemDescription(), expected);\n\t\t}\n\t}",
"public String getDescription() {\n return description; // returns the appointment's description\n }",
"public void testGetDescription() {\n System.out.println(\"getDescription\");\n MailNotifier instance = new MailNotifier();\n String expResult = \"Testingggg\";\n instance.setDescription(expResult);\n String result = instance.getDescription();\n assertEquals(expResult, result);\n \n }",
"@Test\r\n public void testGetDescription() {\r\n System.out.println(\"getDescription\");\r\n String result = instance.getDescription();\r\n assertNotNull(result);\r\n }",
"@Test\n public void getDescription() {\n Assert.assertEquals(whitebear.getDescription(), \"pet whitebear\");\n }",
"@Test\n\t public void test01() throws Throwable {\n\t\tint startHour=21;\n\t\tint startMinute=30;\n\t\tint startDay=1;\n\t\tint startMonth=2;\n\t\tint startYear=2018;\n\t\tString title=\"Test 2a\";\n\t\tString description=\"This is test 1a.\";\n\t\t //Construct a new Appointment object with the initial data\t \n\t\tAppt appt1 = new Appt(startHour,\n\t\t startMinute ,\n\t\t startDay ,\n\t\t startMonth ,\n\t\t startYear ,\n\t\t title,\n\t\t description);\n\t\t\t\t \n\t\tstartHour=8;\n\t\tstartMinute=15;\n\t\tstartDay=1;\n\t\tstartMonth=2;\n\t\tstartYear=2018;\n\t\ttitle=\"Test 2b\";\n\t\tdescription=\"This is test 1b.\";\n\t\t //Construct a new Appointment object with the initial data\t \n\t\tAppt appt2 = new Appt(startHour,\n\t\t startMinute ,\n\t\t startDay ,\n\t\t startMonth ,\n\t\t startYear ,\n\t\t title,\n\t\t description);\n\t\t\t\t \n\t// assertions\n\t\tassertTrue(appt1.getValid());\n\t\tassertTrue(appt2.getValid());\n\t\t \n\t\tLinkedList<Appt> appts = new LinkedList<Appt>();\n\t\tappts.add(appt1);\n\t\tappts.add(appt2);\n\t\t \n\t\tCalendar rightnow = Calendar.getInstance();\n \tint thisMonth = rightnow.get(Calendar.MONTH)+1;\n\t\tint thisYear = rightnow.get(Calendar.YEAR);\n\t\tint thisDay = rightnow.get(Calendar.DAY_OF_MONTH);\n\t\tGregorianCalendar today = new GregorianCalendar(thisYear,thisMonth,thisDay);\n\t\tGregorianCalendar tomorrow = (GregorianCalendar)today.clone();\n\t\ttomorrow.add(Calendar.DAY_OF_MONTH,1);\n\t\t//Construct new CalDay object\n\t\tCalDay day = new CalDay(today);\n\t\tday.addAppt(appt1);\n\t\tday.addAppt(appt2);\n\t\tTimeTable timeTable = new TimeTable();\n\t//assertions\n\t\tassertTrue(day.isValid());\n\t\tassertEquals(2, day.getSizeAppts()); //check for two appts added\n\t\tassertEquals(1, timeTable.getApptRange(appts, today, tomorrow).size()); //should return the CalDay between the two dates\n\t }",
"public XmlAdaptedAppointment(String description, String appointmentStart, String appointmentEnd) {\n this.description = description;\n this.appointmentStart = appointmentStart;\n this.appointmentEnd = appointmentEnd;\n }",
"@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n \n String expResult = \"Description\";\n instance.setDescription(expResult);\n String result = instance.getDescription();\n assertEquals(\"Description not as expected\", expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }",
"public void printAppointment()\r\n\t{\r\n\t\tSystem.out.printf(\"%s\\n\", desc);\r\n\t\tDateFormat df =\r\n\t\t\tDateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);\r\n\t\tString startTimeString = df.format(startTime.getTime());\r\n\t\tString endTimeString = df.format(endTime.getTime());\r\n\t\tSystem.out.printf(\"%s - %s\\n\", startTimeString, endTimeString);\r\n\t}",
"@Test\n public void testGetDescription() {\n Area instance = area;\n String expResult = \"Area baby\";\n String result = instance.getDescription();\n assertEquals(expResult, result);\n\n }",
"@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n DataItem instance = new DataItemImpl();\n String expResult = \"\";\n String result = instance.getDescription();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n public void generateDescription_running_caloriesGoal() {\n Goal goal = new Goal(2, 99, GoalType.Run, \"2018-09-28\", \"2017-01-12\",\n 400);\n // Create the real and expected descriptions\n description = goal.getDescription();\n expectedDescription = \"Burn 400 calories while running\";\n\n // Check that the real and expected descriptions match\n assertEquals(expectedDescription, description);\n }",
"@Test\n public final void testGetDescription() {\n System.out.println(\"getDescription\");\n AVRAlgorithm instance = new AVRAlgorithm();\n String expResult = \"Provides an implementation of the online \"\n \t\t+ \"Average Rate Algorithm as described by F. Yao, \"\n \t\t+ \"A. Demers and S. Shenker in \\\"A scheduling model \"\n \t\t+ \"for reduced CPU energy\\\" (1995).\";\n String result = instance.getDescription();\n assertEquals(expResult, result);\n }",
"@Test\n public void typeDescriptionField() {\n String desc = \"testTask_description\";\n EspressoHelper.insertTextIntoInput(R.id.taskDescription, desc);\n onView(withId(R.id.taskDescription))\n .check(matches(withText(desc)));\n }",
"@Test\n public void generateDescription_walking_caloriesGoal() {\n Goal goal = new Goal(2, 99, GoalType.Walk, \"2018-09-28\", \"2017-01-12\",\n 400);\n // Create the real and expected descriptions\n description = goal.getDescription();\n expectedDescription = \"Burn 400 calories while walking\";\n\n // Check that the real and expected descriptions match\n assertEquals(expectedDescription, description);\n }",
"@Test\r\n public void testGetItemDescription() {\r\n System.out.println(\"getItemDescription\");\r\n OBJSalesInvoiceQO instance = null;\r\n String expResult = \"\";\r\n String result = instance.getItemDescription();\r\n assertEquals(result, expResult);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For use with RangedDoubleTextField.java Limits input to document by keystroke. Allows only numeric values and limited localized formatting symbols. | public DoubleTextFieldDocument(){
super();
DecimalFormatSymbols dfs = Intl.getInstanceDecimalFormatSymbols();
locDecimal = dfs.getDecimalSeparator();
locMinus = dfs.getMinusSign();
locExponentSeparator = dfs.getExponentSeparator();
String s = Character.toString(locDecimal)+Character.toString(locMinus)+locExponentSeparator;
match = s.toCharArray();
} | [
"private void annoFatturajTextFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_annoFatturajTextFieldKeyTyped\n char c = evt.getKeyChar();\n if (!(c >= 48 && c <= 57)) {\n evt.setKeyChar('\\u0008');\n }\n}",
"private void numeroFatturajTextFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_numeroFatturajTextFieldKeyTyped\n char c = evt.getKeyChar();\n if (!(c >= 48 && c <= 57)) {\n evt.setKeyChar('\\u0008');\n }\n}",
"protected void makeNumericsOnly(final JTextField txt) {\r\n txt.addKeyListener(new KeyAdapter() { // make the field\r\n public void keyTyped(final KeyEvent evt) { // not accept letters\r\n\r\n final char ch = evt.getKeyChar();\r\n\r\n if ( ( (ch < '0') || (ch > '9'))\r\n && ( (ch != KeyEvent.VK_DELETE) && (ch != KeyEvent.VK_BACK_SPACE)\r\n && (ch != KeyEvent.VK_DECIMAL) && (ch != KeyEvent.VK_PERIOD))) {\r\n\r\n // if is the case that ch is outside the bounds of a number\r\n // AND it is the case that ch is neither a BS or a DE, then\r\n // key is not a digit or a deletion char or a decimal point\r\n evt.consume();\r\n }\r\n }\r\n });\r\n }",
"protected void makeNumericsOnly(JTextField txt) {\r\n txt.addKeyListener(new KeyAdapter() { // make the field\r\n public void keyTyped(KeyEvent evt) { // not accept letters\r\n\r\n char ch = evt.getKeyChar();\r\n\r\n if (((ch < '0') || (ch > '9')) && ((ch != KeyEvent.VK_DELETE) && (ch != KeyEvent.VK_BACK_SPACE))) {\r\n\r\n // if is the case that ch is outside the bounds of a number\r\n // AND it is the case that ch is neither a BS or a DE, then...\r\n // key is not a digit or a deletion char\r\n evt.consume();\r\n }\r\n }\r\n });\r\n }",
"private void makeFormattedTextField(){\n textField = new JTextField(\"\"+ShapeFactory.getRoundness(), 3);\n //add listener that happens after each type and make the field accept only numbers between 0 to 100\n textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n super.keyTyped(e);\n typeEvent(e);\n }\n });\n }",
"protected void makeNumericsOnly(JTextField txt) {\r\n txt.addKeyListener(new KeyAdapter() { // make the field\r\n public void keyTyped(KeyEvent evt) { // not accept letters\r\n\r\n JTextField t = (JTextField) evt.getComponent();\r\n char ch = evt.getKeyChar();\r\n\r\n if (((ch < '0') || (ch > '9')) && ((ch != KeyEvent.VK_DELETE) && (ch != KeyEvent.VK_BACK_SPACE))) {\r\n\r\n // if is the case that ch is outside the bounds of a number\r\n // AND it is the case that ch is neither a BS or a DE, then...\r\n // key is not a digit or a deletion char\r\n evt.consume();\r\n }\r\n }\r\n });\r\n }",
"public static TextFormatter<Double> formatDoubleField() {\n// Pattern validEditingState = Pattern.compile(\"^[0-9]+(|\\\\.)[0-9]+$\");\n Pattern validEditingState = Pattern.compile(\"-?(([1-9][0-9]*)|0)?(\\\\.[0-9]*)?\");\n UnaryOperator<TextFormatter.Change> filter = c -> {\n String text = c.getControlNewText();\n if (validEditingState.matcher(text).matches()) {\n return c ;\n } else {\n return null ;\n }\n };\n StringConverter<Double> converter = new StringConverter<Double>() {\n @Override\n public Double fromString(String s) {\n if (s.isEmpty() || \"-\".equals(s) || \".\".equals(s) || \"-.\".equals(s)) {\n return 0.0 ;\n } else {\n return Double.valueOf(s);\n }\n }\n @Override\n public String toString(Double d) {\n return d.toString();\n }\n };\n\n return new TextFormatter<>(converter, 0.0, filter);\n }",
"private DoubleField(String str, double low, double high) {\n\t\tparser = NumberFormat.getNumberInstance(Locale.US);\n\t\tsetBackground(Color.WHITE);\n\t\tsetHorizontalAlignment(RIGHT);\n\t\tminValue = low;\n\t\tmaxValue = high;\n\t\tsetText(str);\n\t\texceptionOnError = false;\n\t}",
"private void jTextFieldPrecioKeyTyped(java.awt.event.KeyEvent evt) {\n char car = evt.getKeyChar();\n if (jTextFieldPrecio.getText().length() >= 9) {\n evt.consume();\n }\n if ((car < '0' || car > '9')) {\n evt.consume();\n }\n }",
"public EventHandler<KeyEvent> numeric_Validation(final Integer max_Lengh) {\r\n\t\treturn new EventHandler<KeyEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(KeyEvent e) {\r\n\t\t\t\tTextField txt_TextField = (TextField) e.getSource();\r\n\t\t\t\tif (txt_TextField.getText().length() >= max_Lengh) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (e.getCharacter().matches(\"[0-9.]\")){\r\n\t\t\t\t\tif (txt_TextField.getText().contains(\".\") && e.getCharacter().matches(\"[.]\")){\r\n\t\t\t\t\t\te.consume();\r\n\t\t\t\t\t} else if (txt_TextField.getText().length() == 0 && e.getCharacter().matches(\"[.]\")){\r\n\t\t\t\t\t\te.consume();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"private void allowOnlyNumbers(JTextField txtField) {\r\n txtField.addKeyListener(new KeyAdapter() {\r\n public void keyPressed(KeyEvent ke) {\r\n if (ke.getKeyChar() >= '0' && ke.getKeyChar() <= '9'\r\n || ke.getKeyCode() == KeyEvent.VK_BACK_SPACE\r\n ) {\r\n txtField.setEditable(true);\r\n } else {\r\n txtField.setEditable(false);\r\n msgDialog.showWarningMsg(null, \"Bitte geben Sie nur Zahlen an.\");\r\n txtField.setEditable(true);\r\n }\r\n }\r\n });\r\n }",
"double getNotEditableDouble_01();",
"public JNumberField() {\r\n \r\n super();\r\n this.addFocusListener(this);\r\n numberFormat=NumberFormat.getInstance();\r\n numberFormat.setMaximumFractionDigits(2);\r\n numberFormat.setMinimumFractionDigits(2);\r\n numberFormat.setGroupingUsed(true);\r\n this.setText(numberFormat.format(0));\r\n \r\n nd.addValueChangedListener( this );\r\n \r\n this.addKeyListener(this);\r\n \r\n this.setDocument( nd );\r\n \r\n }",
"public MyJFormattedTextField(){\n \n// this.jFormattedTextField.addKeyListener(new KeyAdapter(){\n// public void keyReleased(final KeyEvent e){\n//\n// final int iCharCode = e.getKeyCode();\n//\n// if(iCharCode!=INT_RIGHT_ARROW_KEY && iCharCode!=INT_LEFT_ARROW_KEY &&\n// strCharsToAvoid != null && strCharsToAvoid.length > 0){\n// try {\n// final int iCaretPos = jFormattedTextField.getCaretPosition();\n//\n// final String strNextChar = jFormattedTextField.getText(iCaretPos, 1);\n//\n// if (isNextCharAnAvoidableOne(strNextChar, strCharsToAvoid)) {\n// jFormattedTextField.setCaretPosition(iCaretPos + 1);\n// }\n//\n// } catch (BadLocationException ble) {\n// if (LOGGER.isLoggable(Level.SEVERE)) {\n// LOGGER.log(\n// Level.SEVERE,\n// \"Cannot obtain the textfield next char.\",\n// ble);\n// }\n//\n// } catch (IllegalArgumentException ex) {\n// if (LOGGER.isLoggable(Level.SEVERE)) {\n// LOGGER.log(\n// Level.SEVERE,\n// \"Cannot determine if the next textfield char is an avoidable one or not.\",\n// ex);\n// }\n// }\n// }\n//\n// }\n// });\n//\n// formatterEquip = new RegexFormatter(strRegExp);\n// formatterEquip.setAllowsInvalid(false);\n// formatterEquip.setOverwriteMode(true);\n// formatterEquip.setCommitsOnValidEdit(true);\n//\n// this.jFormattedTextField.setFocusLostBehavior(JFormattedTextField.COMMIT_OR_REVERT);\n// this.jFormattedTextField.setFormatterFactory(new DefaultFormatterFactory(formatterEquip));\n//\n// this.jFormattedTextField.setPreferredSize(new Dimension(60,22));\n//\n// this.jFormattedTextField.setValue(strInitValue);\n//\n// try {\n// this.jFormattedTextField.commitEdit();\n//\n// } catch (ParseException ex) {\n// final String _strRegExp = formatterEquip.getPattern().pattern();\n// if (LOGGER.isLoggable(Level.SEVERE)) {\n// LOGGER.log(\n// Level.SEVERE,\n// new StringBuffer(\n// \"Cannot set the ini value cause it not valid. RE=\").append(\n// _strRegExp).append(\", InitValue=\").append(\n// strInitValue).toString(),\n// ex);\n// }\n//\n// throw ex;\n// }\n\n }",
"void listenerForOnlyDigitsInput(TextField textField) \r\n\t{\r\n\t\ttextField.textProperty().addListener((ChangeListener<? super String>) new ChangeListener<String>() \r\n\t\t{\r\n\t\t\tpublic void changed(ObservableValue<? extends String> observable, String oldValue, String newValue)\r\n\t\t\t{\r\n\t\t\t\tif (!newValue.matches(\"\\\\d*\")) \r\n\t\t\t\t{\r\n\t\t\t\t\ttextField.setText(newValue.replaceAll(\"[^\\\\d]\", \"\"));\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter only digits from 0 to 9.\", \"Notification\",\r\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t}",
"public void textBoxRestrictions(){\r\n\r\n /***************** channel textbox input checker(allows integers only) *****************/\r\n channel.setTextFormatter(new TextFormatter<>((change) -> {\r\n String text = change.getControlNewText();\r\n if (text.matches(\"\\\\d*\")) {\r\n return change;\r\n } else {\r\n return null;\r\n }\r\n }));\r\n\r\n /***************** tpo textbox input checker(allows decimal numbers and integers) *****************/\r\n tpo.setTextFormatter(new TextFormatter<>((change) -> {\r\n String text = change.getControlNewText();\r\n if (text.matches(\"\\\\d*\\\\.?\\\\d*\")) {\r\n return change;\r\n } else {\r\n return null;\r\n }\r\n }));\r\n\r\n }",
"private void changeDoubleModifier(String newValue, double max, Box<Double> valueToChange, Slider slider, TextField textField) {\n String filtered = filterDecimalString(newValue);\n double parsed = filtered.isEmpty() ? 0 : Double.parseDouble(filtered.replaceFirst(\"\\\\.$\",\"\"));\n double value = Math.min(Math.max(parsed, 0), max);\n valueToChange.val = value;\n slider.setValue(value);\n textField.setText(filtered.length() > 4 ? filtered.substring(0, 5) : filtered);\n if (parsed > max) textField.setStyle(\"-fx-text-fill: red;\");\n else textField.setStyle(\"-fx-text-fill: black;\");\n }",
"public NumberTextField() {\n // Checkpattern fuer Doublewerte, andere Eingaben werden ignoriert\n Pattern doublePattern = Pattern.compile(\n \"((([0-9])\\\\d*\\\\.([0-9])\\\\d*)|(([0-9])\\\\d*\\\\.)|(([0-9])\\\\d*))\");\n \n // Formatiert den Text im Feld basierend auf dem Pattern und konvertiert einen String in Doublewerte\n TextFormatter<Double> textFormatter = new TextFormatter<Double>(\n new DoubleStringConverter(), 0.0,\n change -> {\n String newText = change.getControlNewText();\n if (doublePattern.matcher(newText).matches()) {\n value = Double.parseDouble(newText);\n return change;\n } else\n return null;\n });\n \n this.setTextFormatter(textFormatter);\n }",
"private double getTextToDouble(JTextField text) {\n try {\n Double.parseDouble(text.getText());\n\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(null, \"Input format for : \" + text.getText() + \" is illegal! Input number!\"\n , \"Error message\", JOptionPane.ERROR_MESSAGE);\n }\n return Double.parseDouble(text.getText());\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete by folder id and user id with correct folder id and user id then true returned. | @Test
public void deleteByFolderIdAndUserIdWithCorrectFolderIdAndUserIdThenTrueReturned() {
Boolean actualDeletingResult = folderDao.deleteByFolderIdAndUserId(CORRECT_PARENT_ID, CORRECT_USER_ID);
assertTrue(actualDeletingResult);
} | [
"@Test\n public void deleteByFolderIdAndUserIdWithCorrectFolderIdAndIncorrectUserIdThenFalseReturned() {\n Boolean actualDeletingResult = folderDao.deleteByFolderIdAndUserId(CORRECT_PARENT_ID, INCORRECT_USER_ID);\n assertFalse(actualDeletingResult);\n }",
"@Test\n public void deleteByFolderIdAndUserIdWithIncorrectFolderIdAndCorrectUserIdThenFalseReturned() {\n Boolean actualDeletingResult = folderDao.deleteByFolderIdAndUserId(INCORRECT_PARENT_ID, CORRECT_USER_ID);\n assertFalse(actualDeletingResult);\n }",
"@Test\n public void deleteByFolderIdAndUserIdWithNullFolderIdAndUserIdThenFalseReturned() {\n Boolean actualDeletingResult = folderDao.deleteByFolderIdAndUserId(null, null);\n assertFalse(actualDeletingResult);\n }",
"public boolean delete(User user);",
"void deleteFolder(Integer id);",
"@Test\n public void existsParentIdByUserIdWithCorrectParentIdAndUserIdThenTrueReturned() {\n Long folderId = folderDao.addFolder(STILL_NOT_CREATED_FOLDER_STRUCTURE_DTO, CORRECT_USER_ID);\n assertNotNull(folderId);\n Boolean actualFolderExistingResult = folderDao.existsParentIdByUserId(folderId, CORRECT_USER_ID);\n assertTrue(actualFolderExistingResult);\n }",
"@Override\r\n\tpublic ServerResponse2 deleteById(Integer id) {\n\t\tint flag = folderMapper.deleteById(id,0);\r\n\t\tif(flag>0) {\r\n\t\t\treturn ServerResponse2.createBySuccess();\r\n\t\t}else {\r\n\t\t\treturn ServerResponse2.createByError();\r\n\t\t}\r\n\t}",
"@AfterClass(groups ={\"All\"})\n\tpublic void deleteFolder() {\n\t\ttry {\n\t\t\tUserAccount account = dciFunctions.getUserAccount(suiteData);\n\t\t\tUniversalApi universalApi = dciFunctions.getUniversalApi(suiteData, account);\n\t\t\tif(suiteData.getSaasApp().equalsIgnoreCase(\"Salesforce\")){\n\t\t\t\tfor(String id:uploadId){\n\t\t\t\t\tMap<String,String> fileInfo = new HashMap<String,String> ();\n\t\t\t\t\tfileInfo.put(\"fileId\", id);\n\t\t\t\t\tdciFunctions.deleteFile(universalApi, suiteData, fileInfo);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdciFunctions.deleteFolder(universalApi, suiteData, folderInfo);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogger.info(\"Issue with Delete Folder Operation \" + ex.getLocalizedMessage());\n\t\t}\n\t}",
"@Override\n public boolean delete(int userId) throws DataNotFoundException {\n\n\n\n\n\n\n libraryUserRepository.delete(modelMapper.map(libraryUserRepository.findById(userId)\n .orElseThrow(() -> new DataNotFoundException(\"Id \")), LibraryUser.class));\n return true;\n\n\n /*if (userId < 1) throw new IllegalArgumentException(\"Id should not be zero\");\n Optional<LibraryUser> optionalLibraryUser = libraryUserRepository.findById(userId);\n if (optionalLibraryUser.isPresent()) {\n LibraryUser libraryUserEntity = modelMapper.map(optionalLibraryUser, LibraryUser.class);\n libraryUserRepository.delete(libraryUserEntity);\n return true;\n }\n return false;*/\n\n\n }",
"@Override\r\n public void deleteFolder(long id) {\n this.folderRepository.deleteById(id);; \r\n }",
"@Test\n public void existsParentIdByUserIdWithCorrectParentIdAndIncorrectUserIdThenFalseReturned() {\n Boolean actualFolderExistingResult = folderDao.existsParentIdByUserId(CORRECT_PARENT_ID, INCORRECT_USER_ID);\n assertFalse(actualFolderExistingResult);\n }",
"@Override\n public boolean delete(int id, int userId) {\n\n return openSession().createNamedQuery(Product.DELETE)\n .setParameter(\"id\",id)\n .setParameter(\"userId\",userId)\n .executeUpdate() != 0;\n }",
"public boolean deleteUser(User f);",
"public boolean deleteUserBy(String emailID);",
"public boolean deleteAllOfUser(Integer idu);",
"Long deleteTodoByIdAndUserId(final String id,final String userId);",
"boolean removeUser(Integer id);",
"public void deleteFolder(Folder folder);",
"@Override\n\tpublic boolean deleteMac(int userId) {\n\t\tuserRepository.deleteById(userId);;\n\t\treturn true;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Failure test for method importJarsToDiagram(URL[], String). Passing unexisting element of jarURLs[] | public void testImportJarsToDiagramURLFailure6() {
try {
String[] classpath = new String[1];
classpath[0] = testEntitiesClasspath;
JarImporter importer = new DefaultJarImporter(manager, classpath);
URL[] jarURLs = new URL[1];
try {
jarURLs[0] = new File(unexistingJarPath).toURI().toURL();
} catch (MalformedURLException e) {
fail("Shouldn't throw MalformedURLException");
}
importer.importJarsToDiagram(jarURLs, "diagramName");
fail("Didn't throw an exception");
} catch (IllegalArgumentException exception) { /* expected */
} catch (JarImporterException exception) {
fail("Shouldn't throw JarImporterException");
}
} | [
"public void testImportJarsToDiagramURLFailure4() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n URL[] jarURLs = new URL[0];\n\n importer.importJarsToDiagram(jarURLs, \"diagramName\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramURLFailure1() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n URL[] jarURLs = null;\n importer.importJarsToDiagram(jarURLs, \"diagramName\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramURLFailure5() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n URL[] jarURLs = new URL[1];\n jarURLs[0] = null;\n\n importer.importJarsToDiagram(jarURLs, \"diagramName\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramURLFailure7() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n URL[] jarURLs = new URL[1];\n try {\n jarURLs[0] = new File(unexistingJarPath).toURI().toURL();\n } catch (MalformedURLException e) {\n fail(\"Shouldn't throw MalformedURLException\");\n }\n\n Diagram diagram = new Diagram();\n diagram.setName(\"Main Class Diagram\");\n manager.addDiagram(diagram);\n\n importer.importJarsToDiagram(jarURLs, \"Use Case Diagram\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramURLAccuracy() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n URL[] jarURLs = new URL[1];\n try {\n jarURLs[0] = new File(testEntitiesJarPath1).toURI().toURL();\n } catch (MalformedURLException e) {\n fail(\"Shouldn't throw MalformedURLException\");\n }\n Diagram diagram = new Diagram();\n diagram.setName(\"Main Class Diagram\");\n\n manager.addDiagram(diagram);\n\n importer.importJarsToDiagram(jarURLs, \"Main Class Diagram\");\n } catch (IllegalArgumentException exception) {\n fail(\"Shouldn't throw IllegalArgumentException\");\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramStringFailure6() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String[] jarPaths = new String[1];\n jarPaths[0] = null;\n\n importer.importJarsToDiagram(jarPaths, \"Main Class Diagram\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramStringFailure1() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String[] jarPaths = null;\n\n importer.importJarsToDiagram(jarPaths, \"Main Class Diagram\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramStringAccurracy() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String[] jarPaths = {testEntitiesJarPath1 };\n\n importer.importJarsToDiagram(jarPaths, \"Main Class Diagram\");\n } catch (IllegalArgumentException exception) {\n fail(\"Shouldn't throw IllegalArgumentException\");\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramStringFailure2() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String[] jarPaths = {testEntitiesJarPath1, testEntitiesJarPath2};\n\n importer.importJarsToDiagram(jarPaths, null);\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramStringFailure7() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String[] jarPaths = new String[1];\n jarPaths[0] = \"\";\n\n importer.importJarsToDiagram(jarPaths, \"Main Class Diagram\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsToDiagramStringFailure8() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String[] jarPaths = {unexistingJarPath};\n\n importer.importJarsToDiagram(jarPaths, \"Main Class Diagram\");\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarToDiagramURLAccurracy() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n Diagram diagram = new Diagram();\n diagram.setName(\"Main Class Diagram\");\n manager.addDiagram(diagram);\n\n try {\n importer.importJarToDiagram(new File(testEntitiesJarPath1)\n .toURI().toURL(), \"Main Class Diagram\");\n } catch (MalformedURLException exception) {\n fail(\"Shouldn't throw MalformedURLException\");\n }\n } catch (IllegalArgumentException exception) {\n fail(\"Shouldn't throw IllegalArgumentException\");\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsURLFailure1() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n URL jarPaths[] = new URL[0];\n importer.importJars(jarPaths);\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarToDiagramStringAccurracy() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n Diagram diagram = new Diagram();\n diagram.setName(\"Main Class Diagram\");\n manager.addDiagram(diagram);\n\n importer.importJarToDiagram(testEntitiesJarPath1,\n \"Main Class Diagram\");\n } catch (IllegalArgumentException exception) {\n fail(\"Shouldn't throw IllegalArgumentException\");\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsStringFailure4() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String jarPaths[] = new String[1];\n jarPaths[0] = unexistingJarPath;\n importer.importJars(jarPaths);\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsStringFailure3() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String jarPaths[] = new String[1];\n jarPaths[0] = null;\n importer.importJars(jarPaths);\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsURLAccuracy() {\n JarImporter importer = new DefaultJarImporter(manager,\n new String[] {testEntitiesClasspath});\n\n try {\n importer.importJars(new URL[] {new File(testEntitiesJarPath1)\n .toURI().toURL()});\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n } catch (MalformedURLException exception) {\n fail(\"Shouldn't throw MalformedURLException\");\n }\n }",
"public void testImportJarsStringFailure1() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String jarPaths[] = null;\n importer.importJars(jarPaths);\n\n fail(\"Didn't throw an exception\");\n } catch (IllegalArgumentException exception) { /* expected */\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }",
"public void testImportJarsStringAccuracy() {\n try {\n String[] classpath = new String[1];\n\n classpath[0] = testEntitiesClasspath;\n JarImporter importer = new DefaultJarImporter(manager, classpath);\n\n String jarPaths[] = new String[2];\n jarPaths[0] = testEntitiesJarPath1;\n jarPaths[1] = testEntitiesJarPath2;\n importer.importJars(jarPaths);\n } catch (IllegalArgumentException exception) {\n fail(\"Shouldn't throw IllegalArgumentException\");\n } catch (JarImporterException exception) {\n fail(\"Shouldn't throw JarImporterException\");\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the class distribution is pure | public boolean classDistributionIsPure() {
int count = 0;
for (Map.Entry<String, WeightMass> el : weightedClassDist.entrySet()) {
if (el.getValue().weight > 0) {
count++;
if (count > 1) {
break;
}
}
}
return (count < 2);
} | [
"public abstract boolean deterministic () ;",
"private boolean isPure(Collection<Instance> instances) {\n\t\tif (instances.size() <= 1) {\n\t\t\treturn true;\n\t\t}\n\t\tIterator<Instance> iter = instances.iterator();\n\t\tint match = iter.next().getCategory();\n\t\twhile (iter.hasNext()) {\n\t\t\tif (match != iter.next().getCategory()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"boolean isDiscrete();",
"boolean isClassProperty();",
"boolean hasDensityPercent();",
"public boolean doesSupportProbability()\r\n { \r\n \treturn true;\r\n }",
"public boolean isUniform() {\n return size()<=1||rift().isEmpty();\n }",
"public abstract boolean isRandom();",
"boolean hasRclass();",
"boolean hasHas_certainty();",
"public boolean isMinimalClassSizeFulfilled() {\n return minimalClassSize != Integer.MAX_VALUE && minimalClassSizeFulfilled;\n }",
"boolean hasVoicedProportion();",
"public abstract Boolean isImportant();",
"boolean isIsNormative();",
"public boolean isSetReal()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(REAL$4) != 0;\r\n }\r\n }",
"boolean hasExplicit();",
"public abstract boolean isRegularPit();",
"public boolean isDeterministic() {\n return deterministic;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the surgery entry in the table and data base. | public static void updateSurgeryEntry(String srg, String ptg, String avg, String std) {
new SurgeriesList().updateSurgery(srg, ptg, avg, std);
updateSurgeriesTable();
} | [
"private void doUpdate(){\n TreatmentDAO dao = DAOFactory.getDAOFactory().createTreatmentDAO();\n try {\n dao.update(treatment);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"Merchandise update(Merchandise merchandise);",
"public void update(Facture facture) throws DataAccessLayerException {\n super.saveOrUpdate(facture);\n }",
"@Transactional\r\n\tpublic void updateDressType(DressType dressType){ \r\n\t\tht.update(dressType); \r\n\t}",
"public Allergy saveAllergy(Allergy allergy);",
"public Hoppy update(Hoppy hoppy) throws DataAccessException;",
"@Override\n public void update() throws SQLException {\n // query for update a row of student based id\n String query = \"UPDATE teacher\\n\" +\n \"SET first_name=?, last_name=?\\n\" +\n \"WHERE teacher_id=?;\\n\";\n // create connection\n Connection connection = DbConnection.createConnection();\n // create preparedStatement\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n // set preparedStatement Parameters\n preparedStatement.setString(1, this.getFirstName());\n preparedStatement.setString(2, this.getLastName());\n preparedStatement.setInt(3, this.getId());\n // check id existing\n int result = preparedStatement.executeUpdate();\n if (result == 0)\n System.out.println(\"The ID Is Wrong...\");\n else\n System.out.println(\"Successful Updated...\");\n preparedStatement.close();\n\n }",
"public void updateData (String query) \r\n\t{ \r\n\t\ttry { \r\n\t\t\tst.executeUpdate(query); \r\n\t\t} \r\n\t\tcatch (Exception ex) { \r\n\t\t\tSystem.out.println(ex); \r\n\t\t}\r\n\t}",
"public void updateAsignacion (Asignacion asignacion) throws DaoException ;",
"public void saveToDb() {\r\n\ttry {\r\n\t Connection con = DatabaseConnection.getConnection(); // Get a connection to the database\r\n\t PreparedStatement ps = con.prepareStatement(\"UPDATE pets SET \" + \"name = ?, level = ?, \" + \"closeness = ?, fullness = ? \" + \"WHERE petid = ?\"); // Prepare statement...\r\n\t ps.setString(1, getName()); // Set name\r\n\t ps.setInt(2, getLevel()); // Set Level\r\n\t ps.setInt(3, getCloseness()); // Set Closeness\r\n\t ps.setInt(4, getFullness()); // Set Fullness\r\n\t ps.setInt(5, getUniqueId()); // Set ID\r\n\t ps.executeUpdate(); // Execute statement\r\n\t ps.close();\r\n\t} catch (SQLException ex) {\r\n\t Logger.getLogger(MaplePet.class.getName()).log(Level.SEVERE, null, ex);\r\n\t}\r\n }",
"@Override\n\tpublic void update(Grn grn) {\n\t\t\n\t\tgrnDAO.update(grn);\n\n\t}",
"private void updateHouse() {\n Statement statement = null;\n try {\n statement = this.connection.createStatement();\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM house\");\n Utils.printResultSet(resultSet);\n System.out.print(\"Select a house to update. Enter its house_id: \");\n Scanner scanner = new Scanner(System.in);\n String id = scanner.next();\n System.out.print(\"What do you want to update? Resident, Number of Residents, \" +\n \"or Head of House? \");\n String field = scanner.next();\n if (field.equalsIgnoreCase(\"Resident\")) {\n System.out.println(\"Enter the first name of the new resident of the house you wish to update: \");\n String firstName = scanner.next();\n int personID = Utils.selectPersonFromFirstName(firstName, connection);\n statement.executeUpdate(\"UPDATE house SET person_id = \" + personID +\n \" WHERE house_id = \" + id);\n }\n else if (field.equalsIgnoreCase(\"Number\")) {\n System.out.println(\"Enter the new number of residents of the house you wish to update\");\n int newNumResidents = scanner.nextInt();\n statement.executeUpdate(\"UPDATE house SET num_residents = \" +\n newNumResidents + \" WHERE house_id = \" + id);\n }\n else if (field.equalsIgnoreCase(\"Head\")) {\n System.out.println(\"Enter the first name of the new head of house of the house you wish to update: \");\n String firstName = scanner.next();\n int personID = Utils.selectPersonFromFirstName(firstName, connection);\n statement.executeUpdate(\"UPDATE house SET head_of_house = \" +\n personID + \" WHERE house_id = \" + id);\n }\n else {\n System.out.println(\"Field not identified. Enter again. \");\n this.updateHouse();\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"private void updateDBTables() throws SQLException {\n \n Connection con = null;\n PreparedStatement stmt = null;\n try {\n con = getConnection();\n stmt = con.prepareStatement(getQuery(\"UPDATE_FORM_ENTRY_STATE\"));\n stmt.executeUpdate();\n closeAll(null, stmt, null);\n stmt = con.prepareStatement(getQuery(\"UPDATE_FORM_ENTRY_RESID\"));\n stmt.executeUpdate();\n stmt = con.prepareStatement(getQuery(\"UPDATE_FORM_ENTRY_ID\"));\n stmt.executeUpdate();\n } finally {\n closeAll(con, stmt, null);\n }\n }",
"public boolean updateDiagnosis(Diagnosis diagnosis) throws ApplicationException;",
"void updateMembershipTable() throws RemoteException;",
"public void saveInsurance(Insurance insurance) throws DAOException;",
"public void updateTg000003(Tg000003 entity) throws Exception;",
"public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}",
"Table8 update(Table8 table8) throws EntityNotFoundException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getLogs retrieves log instances related to userID from database adds instances to list | private void getLogs(String uID) {
// Read from the database
myRef.child(uID).orderByChild("jumpNr").addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
jumpList.clear();
for (DataSnapshot child : dataSnapshot.getChildren()) {
LogbookPage logbookPage = child.getValue(LogbookPage.class);
jumpList.add(logbookPage);
refreshListAdapter();
}
}
@Override
public void onCancelled(DatabaseError error) {
// rip
}
});
} | [
"public List<UserLogs> getAllUserLogs(int uid);",
"@RequestMapping(value = \"/users/{userId}/logs\", method = RequestMethod.GET)\n public List<ApiLogData> getUserLogs(@PathVariable Long userId) {\n return loggingService.getLogsForUser(userId);\n }",
"public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public List<Log> retrieveLogData(){\n List<Log> listOfLogs = new ArrayList<>();\n Connection connection = DataModelI.getInstance().getNewConnection();\n\n try {\n Statement stmt = connection.createStatement();\n String str = \"SELECT * FROM Log\";\n ResultSet rset = stmt.executeQuery(str);\n\n String logID = \"\";\n String description = \"\";\n Timestamp logTime = null;\n String userID = \"\";\n String associatedID = \"\";\n String associatedType = \"\";\n\n while (rset.next()) {\n logID = rset.getString(\"logID\");\n description = rset.getString(\"description\");\n logTime = rset.getTimestamp(\"logTime\");\n userID = rset.getString(\"userID\");\n associatedID = rset.getString(\"associatedID\");\n associatedType = rset.getString(\"associatedType\");\n\n Log newLog = new Log(logID, description, logTime.toLocalDateTime(), userID, associatedID, associatedType);\n listOfLogs.add(newLog);\n\n System.out.println(\"Log added to the list: \" + logID);\n }\n rset.close();\n stmt.close();\n System.out.println(\"Done adding logs\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n DataModelI.getInstance().closeConnection();\n }\n\n return listOfLogs;\n }",
"public List<Log> getAllLogs();",
"public List<SignLog> getAll(String userId) {\n List<SignLog> signLogs = new ArrayList<SignLog>();\n\n Cursor cursor = database.query(DatabaseSQLiteHelper.TABLE_SIGN_LOGS, null,\n DatabaseSQLiteHelper.LOGS_USER_ID + \" = \" + userId, null, null, null, null);\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n SignLog log = cursorToItem(cursor);\n signLogs.add(log);\n\n cursor.moveToNext();\n }\n cursor.close();\n return signLogs;\n }",
"List<LogEntry> getLogEntries(Long issueId);",
"public static List<Log> getLogs() {\n return SqlObjectProvider.getInstance().getLogs();\n }",
"List<SessionLogEntry> getAllSessionLogRecords(UUID userSessionId);",
"List<Log> getLogsByLogTime(LocalDateTime startTime, LocalDateTime endTime){\n // Connection\n Connection connection = DataModelI.getInstance().getNewConnection();\n\n // Variables\n List<Log> listOfLog = new ArrayList<>();\n Log newLog = null;\n String logID = \"\";\n String description = \"\";\n Timestamp logTime = null;\n String userID = \"\";\n String associatedID = \"\";\n String associatedType = \"\";\n\n try {\n Statement stmt = connection.createStatement();\n String str = \"SELECT * FROM LOG WHERE logTime >= \" + Timestamp.valueOf(startTime) + \" AND logTime <= \" + Timestamp.valueOf(endTime);\n ResultSet rset = stmt.executeQuery(str);\n\n while (rset.next()) {\n logID = rset.getString(\"logID\");\n description = rset.getString(\"description\");\n logTime = rset.getTimestamp(\"logTime\");\n userID = rset.getString(\"userID\");\n associatedID = rset.getString(\"associatedID\");\n associatedType = rset.getString(\"associatedType\");\n\n newLog = new Log(logID, description, logTime.toLocalDateTime(), userID, associatedID, associatedType);\n listOfLog.add(newLog);\n System.out.println(\"Log Found: \" + logID);\n }\n rset.close();\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n DataModelI.getInstance().closeConnection();\n }\n return listOfLog;\n }",
"public ArrayList<Log> getLogs() {\n return logs;\n }",
"org.roylance.yaorm.TestingModel.Log getLogs(int index);",
"public List<IUserLog> getUserLog() {\n return userLog;\n }",
"List<TimeLog> findTimelog(String username);",
"public void setCaseLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n caseLog.add(new CaseLog(rs.getInt(\"userid\"),\n rs.getInt(\"caseid\"),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }",
"public LiveData<List<WaterLog>> getLogs(){\n return mDatabase.logDao().getAllLogs();\n }",
"@Override\n @Transactional\n public List<AuditLog> logs() {\n\tCompany company = this.authHelper.getAuth().getCompany();\n\tLong companyID = company == null ? null : company.getId();\n\tList<AuditLog> logs = this.companyDAO.logs(companyID);\n\tfor (AuditLog log : logs) {\n\t log.setAuditAction(AuditAction.of(log.getAction()));\n\t}\n\treturn logs;\n }",
"List<Log> getLogsByAssociatedType(String associatedType){\n // Connection\n Connection connection = DataModelI.getInstance().getNewConnection();\n\n // Variables\n Log newLog = null;\n List<Log> listOfLog = new ArrayList<>();\n String logID = \"\";\n String description = \"\";\n Timestamp logTime = null;\n String userID = \"\";\n String associatedID = \"\";\n\n try {\n Statement stmt = connection.createStatement();\n String str = \"SELECT * FROM LOG WHERE associatedType = '\" + associatedType + \"'\";\n ResultSet rset = stmt.executeQuery(str);\n\n while (rset.next()) {\n logID = rset.getString(\"logID\");\n description = rset.getString(\"description\");\n logTime = rset.getTimestamp(\"logTime\");\n userID = rset.getString(\"userID\");\n associatedID = rset.getString(\"associatedID\");\n\n newLog = new Log(logID, description, logTime.toLocalDateTime(), userID, associatedID, associatedType);\n listOfLog.add(newLog);\n System.out.println(\"Log Found: \" + logID);\n }\n rset.close();\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n DataModelI.getInstance().closeConnection();\n }\n return listOfLog;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a bit to the history. | public void add(BitData bitData) {
mHistory.add(bitData);
while (mHistory.size() > mMaxSize) {
mHistory.removeFirst();
}
} | [
"public void addToHistory() {\n\t\tmyHistory.add(0, this.z);\r\n\t\tmyHistory.add(0, this.y);\r\n\t\tmyHistory.add(0, this.x);\r\n\t\tmyHistory.remove(1000);\r\n\t\tmyHistory.remove(1000);\r\n\t\tmyHistory.remove(1000);\r\n\r\n\t}",
"protected void addToHistory (String cmd)\n {\n // remove any previous instance of this command\n _history.remove(cmd);\n \n // append it to the end\n _history.add(cmd);\n \n // prune the history once it extends beyond max size\n if (_history.size() > MAX_COMMAND_HISTORY) {\n _history.remove(0);\n }\n }",
"public void addHistoryEntry(String key, String entry);",
"public void addCommandToHistory(String command) {\r\n commandHistory.add(command);\r\n }",
"public void addToHistory(String cmd) {\n\t\t// add a new JissHistoryEntry to the list of entries\n\t\t// remove entries from beginning of list to ensure max size is maintained\n\t\tfinal JissHistoryEntry entry = new JissHistoryEntry();\n\t\tentry.setSource(cmd);\n\t\tentry.setTimestamp(System.currentTimeMillis());\n\t\t\n\t\tgetEntries().add(entry);\n\t\t\n\t\twhile(getEntries().size() > HISTORY_MAX_SIZE) {\n\t\t\tgetEntries().remove(0);\n\t\t}\n\t}",
"public void addHistory(String historyEvent);",
"public void addBit(long m) {\n\t\tthis.bitmask |= m;\n\t}",
"public void addCommand(String command) {\n history.add(command);\n }",
"private void addStateHistoryEntry(\n final double time,\n final double allocatedMips,\n final double requestedMips,\n final boolean isActive)\n {\n final HostStateHistoryEntry newState = new HostStateHistoryEntry(time, allocatedMips, requestedMips, isActive);\n if (!stateHistory.isEmpty()) {\n final HostStateHistoryEntry previousState = stateHistory.get(stateHistory.size() - 1);\n if (previousState.getTime() == time) {\n stateHistory.set(stateHistory.size() - 1, newState);\n return;\n }\n }\n\n stateHistory.add(newState);\n }",
"public void add (int value) {\n\t\t total = value + total;\n\t\t history = history + \" + \" + value;\t//Store in history\n\t }",
"private void addToOperationHistory(UndoableTextChange edit) {\n \t\tif (!fFoldingIntoCompoundChange\n \t\t\t\t|| edit instanceof UndoableCompoundTextChange) {\n \t\t\tfHistory.add(edit);\n \t\t\tfLastAddedTextEdit= edit;\n \t\t}\n \t}",
"private void addToHistory(String msg){\n\t\ttry{\n\t\t\tlockHistory.writeLock().lock();\n\t\t\thistory.add(msg);\n\t\t\tlogOut.write(msg);\n\t\t\tlogOut.newLine();\n\t\t\tlogOut.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tlockHistory.writeLock().unlock();\n\t\t}\n\t}",
"public void addScreenBit(ScreenBit newScreenBit) throws SQLException {\n ScreenModel.getInstance().addScreenBit(newScreenBit);\n }",
"private void addToHistory() {\n this.history.add(this.model.makeCopy());\n this.future = new Stack<>();\n }",
"public void add( boolean bit ) {\n\t\tif ( ( ( this.head + 1 ) & ( ( this.buffer.length << 3 ) - 1 ) ) == this.tail ) {\n\t\t\t// Queue is full --> Reallocate:\n\t\t\tthis.reallocate( this.buffer.length << 4 );\n\t\t}\n\n\t\tint by = this.head >> 3;\n\t\tbyte bi = (byte) ( 1 << ( this.head & 7 ) );\n\t\tthis.buffer[by] ^= (byte) ( ( ( bit ? 0xFF : 0x00 ) ^ this.buffer[by] ) & bi );\n\t\tthis.head = ( this.head + 1 ) & ( ( this.buffer.length << 3 ) - 1 );\n\t}",
"public void add(int key) {\n\t\t\n\t\tfor (long [] h : hashFunctions) {\n\t\t\tint i = hash(h, (long) key);\n\t\t\tbitSet.set(i);\n\t\t}\n\t\t\n//\t\tSystem.err.println(\"AFTER: \" + this.bitSet);\n\t}",
"private void addHistory(String s) {\r\n\t\tcurrentPlayer.getHistory().add(s);\r\n\t\tif (currentPlayer.getHistory().size() > 6) currentPlayer.getHistory().remove(0);\r\n\t\t//updatePlayArea(currentPlayer, false);\r\n\t}",
"private void addToHistory(CANValueItem<ValueType> currentItem) {\n if (currentItem.isAvailable()) {\n ValueItem<ValueType> historyItem = new ValueItem<ValueType>();\n historyItem.available = true;\n historyItem.timeStamp = currentItem.getTimeStamp();\n historyItem.value = currentItem.getValue();\n getHistory().add(historyItem);\n previousHistoryTimeStamp = currentItem.getTimeStamp();\n }\n }",
"public void addToHistory(List<AbstractRequest> request) {\n history.add(request);\n setChanged();\n notifyObservers(ModelAction.UPDATE_HISTORY);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the last login time. | public long getLastLoginTime() {
return lastLoginTime;
} | [
"public long getLastLoginTime()\n\t{\n\t\treturn m_lastLogin;\n\t}",
"String getTimeLastLogin();",
"public Date getLastLoginTime() {\r\n return lastLoginTime;\r\n }",
"public Date getLastLoginTime() {\n return lastLoginTime;\n }",
"java.lang.String getLoginTime();",
"Date getUserLastLogin();",
"public Timestamp getLastLoggedIn() {\n return this.lastLoggedIn;\n }",
"Date getLastLogin();",
"public String getLastLogonTm() {\n return lastLogonTm;\n }",
"Date getLastLoginDate();",
"public String getLoginTime() {\n return loginTime;\n }",
"public long getLastUserTime() {\n\n return pLastUserTime;\n }",
"public java.lang.String getLoginTime() {\n return loginTime;\n }",
"public Date getLoginTime() {\n return loginTime;\n }",
"public Date getLastlogintime() {\n return lastlogintime;\n }",
"public Date getUserLasttime() {\r\n return userLasttime;\r\n }",
"@Nullable\n public String getLastLoginDate() {\n return _lastLoginDate;\n }",
"public Long getLoggedInTime() {\n return loggedInTime;\n }",
"public Number getLastUpdateLogin()\n {\n return (Number)getAttributeInternal(LASTUPDATELOGIN);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool max_byte_length_null = 1006; | public boolean getMaxByteLengthNull() {
return maxByteLengthNull_;
} | [
"boolean getMaxByteLengthNull();",
"public boolean getMaxByteLengthNull() {\n return maxByteLengthNull_;\n }",
"boolean getCheckByteLengthForStringsNull();",
"public boolean isFixedLength() { return fixedLength; }",
"io.dstore.values.IntegerValue getMaxByteLength();",
"public boolean getCheckByteLengthForStringsNull() {\n return checkByteLengthForStringsNull_;\n }",
"io.dstore.values.BooleanValue getCheckByteLengthForStrings();",
"public boolean getCheckByteLengthForStringsNull() {\n return checkByteLengthForStringsNull_;\n }",
"boolean isNilMaxLength();",
"boolean isSetMaxLength();",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"boolean hasRequestDataLength();",
"public int getMaxLengthOfByteArrayForPlaintext(){\n\t\treturn dlogGroup.getMaxLengthOfByteArrayForEncoding();\n\t}",
"io.dstore.values.BooleanValueOrBuilder getCheckByteLengthForStringsOrBuilder();",
"public native int getMaxMessageLength() throws DecoderException;",
"@java.lang.Override\n public boolean hasDefaultSequenceLength() {\n return ((bitField0_ & 0x00000040) != 0);\n }",
"boolean checkLen(int epcbytes)\n {\n return true;\n }",
"public boolean isSetMaxLength()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(MAXLENGTH$26) != 0;\n }\n }",
"int getMaxBinaryMessageSize();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Populate the immediate predecessor under this rowKey | public void populatePdfPredecessorList(String currentObjectId, int rowKey)
{
HelperClass.porticoOutput(0, "ViewDiagnostics-populatePdfPredecessorList()-Started for currentObjectId="+currentObjectId);
try
{
if(m_ObjectPredecessorMapping.containsKey(currentObjectId))
{
ArrayList alist = (ArrayList)m_ObjectPredecessorMapping.get(currentObjectId);
if(alist != null && alist.size() > 0)
{
ArrayList addList = null;
if(m_allPdfList.containsKey(rowKey))
{
addList = (ArrayList)m_allPdfList.get(rowKey);
}
else
{
addList = new ArrayList();
}
addList.addAll(alist);
m_allPdfList.put(rowKey, addList);
for(int indx=0; indx < alist.size(); indx++)
{
String tObjectId = (String)alist.get(indx);
// Populate next level
populatePdfPredecessorList(tObjectId, rowKey+1);
}
}
}
}
catch(Exception e)
{
HelperClass.porticoOutput(1, "Exception in ViewDiagnostics-populatePdfPredecessorList()-"+e.getMessage());
e.printStackTrace();
}
finally
{
}
HelperClass.porticoOutput(0, "ViewDiagnostics-populatePdfPredecessorList()-Ended");
} | [
"public void populatePredecessorList(String currentObjectId, int rowKey)\n\t{\n\t\tHelperClass.porticoOutput(0, \"ViewDiagnostics-populatePredecessorList()-Started for currentObjectId=\"+currentObjectId);\n\t\ttry\n\t\t{\n\t\t if(m_ObjectPredecessorMapping.containsKey(currentObjectId))\n\t\t {\n\t\t \tArrayList alist = (ArrayList)m_ObjectPredecessorMapping.get(currentObjectId);\n\t\t \tif(alist != null && alist.size() > 0)\n\t\t \t{\n\t\t \t\tArrayList addList = null;\n\t\t \t\tif(m_allMDList.containsKey(rowKey))\n\t\t \t\t{\n\t\t \t\t\taddList = (ArrayList)m_allMDList.get(rowKey);\n\t\t \t\t}\n\t\t \t\telse\n\t\t \t\t{\n\t\t \t\t\taddList = new ArrayList();\n\t\t \t\t}\n\t\t \t\taddList.addAll(alist);\n\t\t \t\tm_allMDList.put(rowKey, addList);\n\n for(int indx=0; indx < alist.size(); indx++)\n {\n \t \t \tString tObjectId = (String)alist.get(indx);\n \t \t \t// Populate next level\n \t \t \tpopulatePredecessorList(tObjectId, rowKey+1);\n \t \t }\n\t\t \t}\n\t\t }\n\t }\n\t catch(Exception e)\n\t {\n\t\t\tHelperClass.porticoOutput(1, \"Exception in ViewDiagnostics-populatePredecessorList()-\"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\n\t\tHelperClass.porticoOutput(0, \"ViewDiagnostics-populatePredecessorList()-Ended\");\n\t}",
"public DataItem predecessor (Key k) {\n \tif(root.isLeaf()) {\n \t\treturn null;\n \t}\n \telse {\n \t\treturn predecessorNode(root, k).getDataItem();\n \t}\n }",
"protected abstract void setPredecessor(int v, int u);",
"public T predecessor(T key) {\n\t\t\tBSTNode<T> n = predec(root, key, null);\n\t\t\tif (n != null) {\n\t\t\t\treturn n.key;\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"Vertex getPredecessor();",
"public StochProc getPredecessor() {\n return predecessor;\n }",
"public Node getPredecessor() {\n\t\treturn predecessor;\n\t}",
"@Override\r\n\tpublic E getSingleSourcePredecessor(E key) {\r\n\t\tif(containsVertex(key) && vertices.get(key).getPredecessor() != null) {\r\n\t\t\treturn vertices.get(key).getPredecessor().getElement();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public int getPredecessorID() {\n\t\treturn predecessor;\n\t}",
"@Override\n\tpublic Node predecessor(Node node) {\n\t\tNode predecessor = predecessorNode(node);\n\t\twhile (predecessor != nil && predecessor.value == node.value) {\n\t\t\tpredecessor = predecessorNode(predecessor);\n\t\t}\n\t\treturn predecessor;\n\t}",
"public E getPredecessor(E vertex);",
"public final void setPredecessor(final Rule r) {\n //ELM: in again!\n m_pred = r;\n }",
"public abstract int getPredecessor(int v);",
"ChordNode getPredecessor() {\n\t\t// System.out.println(\"--- Running 'getPredecessor'\");\n\t\tif (predecessor != null)\n\t\t\treturn predecessor;\n\t\telse\n\t\t\treturn successorNode;\n\t}",
"void addPredecessor(Object handle, Object predecessor);",
"public AVLNode predecessor(AVLNode x) {\r\n\t\tif (x.left != null) {\r\n\t\t\tAVLNode y = x.left;\r\n\t\t\twhile (y.right != null) {\r\n\t\t\t\ty = y.right;\r\n\t\t\t}\r\n\t\t\treturn y;\r\n\t\t}\r\n\t\tAVLNode y = x.parent;\r\n\t\twhile (y != null && x == y.left) {\r\n\t\t\tx = y;\r\n\t\t\ty = y.parent;\r\n\t\t}\r\n\t\treturn y;\r\n\r\n\t}",
"final ThreadTest.Node predecessor() throws NullPointerException {\n ThreadTest.Node p = prev;\n if (p == null)\n throw new NullPointerException();\n else\n return p;\n }",
"final Node predecessor() throws NullPointerException {\n Node p = prev;\n if (p == null) {\n throw new NullPointerException();\n } else {\n return p;\n }\n }",
"@Override\n\tpublic Node getPredecessor ()\n\t{\n\t\treturn this.predecessor;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ParticleSystem constructor. Creates the new system with a random number of particles within a range. | public ParticleSystem(double x, double y, VDMColor c, int thickness, Vector2 coordOr) {
super(x, y, c, thickness);
// Set the Coordinates origin
setCoordOrigin(coordOr);
// Initialize all important variables
_rnd = new Random();
_particles = new ArrayList<Particle>();
// Establish the number of particles within a range
int low = 5;
int high = 10;
int particles = _rnd.nextInt(high - low) + low;
// Create all particles
for(int i = 0; i < particles; i++){
CreateNewParticle();
} // for
} | [
"public native static ParticleSystem createWithTotalParticles(int numberOfParticles);",
"public ParticleSystem(int maxParticles) {\n totalNumParticles = maxParticles;\n \n // Load in the texture that will be used by all particles\n particleTexture = new GLTexture(TextureTarget.Texture2D, true);\n particleTexture.internalFormat = PixelInternalFormat.Rgba;\n try {\n particleTexture.setImage2D(\"data/textures/Blur.png\", false);\n } catch (Exception e) {\n System.out.println(\"Could not load particle texture.\\r\\n\" + e.getMessage());\n }\n \n // Create a single quad which will be shared by all particles in this system.\n FloatBuffer vertices = NativeMem.createFloatBuffer(12);\n vertices.put(new float[]{-1.0f, -1.0f, 0.0f,\n 1.0f, -1.0f, 0.0f,\n 1.0f, 1.0f, 0.0f,\n -1.0f, 1.0f, 0.0f});\n \n FloatBuffer texcoords = NativeMem.createFloatBuffer(8);\n texcoords.put(new float[]{0.0f, 0.0f, \n 1.0f, 0.0f, \n 1.0f, 1.0f, \n 0.0f, 1.0f});\n \n IntBuffer quads = NativeMem.createIntBuffer(6);\n quads.put(new int[]{0, 1, 2, 0, 2, 3});\n \n // Create a random cloud of particles.\n for (int i = 0; i < maxParticles; ++i) {\n MeshData data = new MeshData();\n data.indexCount = 6;\n data.vertexCount = 4;\n data.positions = vertices;\n data.indices = quads;\n data.uvs = texcoords;\n \n Particle particle = new Particle(data);\n \n // TODO:PPA3 Feel free to play with the color!\n particle.setColor(Math.random(), \n 0.5 + 0.5 * Math.random(),\n 0.5 + 0.5 * Math.random());\n\n \n particle.setScale(0.1f);\n mUnspawnedParticles.add(particle);\n }\n }",
"private void CreateNewParticle() {\n float max = 0.6f;\n float min = 0.1f;\n\n // Velocities\n float lVel = min + _rnd.nextFloat() * (max - min);\n float aVel = min + _rnd.nextFloat() * (max - min);\n\n // Direction\n double dirX = (-1) +_rnd.nextDouble() * (1 - (-1));\n double dirY = (-1) +_rnd.nextDouble() * (1 - (-1));\n\n // Initial angle rotation\n int rot = _rnd.nextInt(180);\n\n // Normalize direction\n Vector2 v = new Vector2(dirX, dirY);\n v.normalize();\n\n // Create particle\n Particle p = new Particle(_pos._x, _pos._y, _c, _lineThickness,\n 20, lVel, aVel, v._unit, rot);\n p.setCoordOrigin(_coordOrigin);\n\n // Add it to the list\n _particles.add(p);\n }",
"Particles particles();",
"public Particle() {\n rx = Math.random();\n ry = Math.random();\n vx = 0.01 * (Math.random() - 0.5); \n vy = 0.01 * (Math.random() - 0.5);\n radius = 0.01;\n mass = 0.5;\n color = Color.BLACK;\n }",
"public Universe(int n, int dim, boolean system)\n\t{\n\t\tthis.dimension = dim;\n\t\tthis.particles = new ArrayList<Particle>();\n\t\tthis.timebase = DEF_TIMEBASE;\n\t\t\t\n\t\tif(system == true){\n\t\t\t\n\t\t\tdouble velocity = Math.sqrt(100*GRAV_CONST);\n\t\t\tdouble[] x = {0,0,0};\n\t\t\tdouble[] pos1 = {0.25,0.5,0.5};\n\t\t\tdouble[] pos2 = {0.75, 0.5, 0.5};\n\t\t\tdouble[] veloc1 = {0, velocity, 0};\n\t\t\tdouble[] veloc2 = {0, -velocity, 0};\n\t\t\t\n\t\t\tParticle A = new Particle(new Vector(3, pos1), new Vector(3, veloc1), new Vector(3, x), 100);\n\t\t\tParticle B = new Particle(new Vector(3, pos2), new Vector(3, veloc2), new Vector(3, x), 100);\n\t\t\t\n\t\t\tparticles.add(A);\n\t\t\tparticles.add(B);\n\t\t}\n\t\telse{\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\tthis.particles.add(new Particle( new Vector(dim).randomiseSphere(), Math.random()*5 ));\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public ParticleSystem (GlContext ctx, Scope parentScope, ParticleSystemConfig config)\n {\n super(ctx, parentScope);\n setConfig(ctx, config);\n }",
"public void setParticles(int particles) {\r\n\t\tthis.particles = particles;\r\n\t}",
"public void generateParticles() {\n particles.clear();\n\n for(int i = 0; i < particleCount; i++) {\n particles.add(new Particle(textWidth, x, y));\n }\n\n if(isExpanding) particleCount++;\n else particleCount--;\n\n if(particleCount > MAX_PARTICLE) isExpanding = false;\n }",
"public void createParticles()\n {\n if ( previousCreation + creationInterval < System.currentTimeMillis() )\n {\n List<Particle> newParticles = sourceDomain.createParticles( rate );\n\n for ( SourceAction sa : sourceActions )\n {\n sa.applyAction( newParticles );\n }\n\n for ( Particle p : newParticles )\n {\n if ( particles.size() < getMaxParticles() )\n {\n particles.add( p );\n }\n\n else\n {\n break;\n }\n }\n\n previousCreation = System.currentTimeMillis();\n } \n }",
"public Particle(Vector position) {\n\t\tsuper(position);\n\t\tthis.position = position;\n\t}",
"Particles_1_8 getParticles_1_8() throws ParticleException;",
"Particles_1_13 getParticles_1_13() throws ParticleException;",
"public static Particle randomParticle(int idin){\n return new Particle(xsize*Math.random(),ysize*Math.random(), 1600*Math.random()-800, 1600*Math.random()-800, idin); // Ska vara random koord. dock.\r\n }",
"private void createParticleOutsideOfBB(){\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint r = randInt.getRandInt(1, 4);\n\t\tif(movementType == 0){\n\t\t\tx = randInt.getRandInt(0,xMin);\n\t\t\ty = randInt.getRandInt(0,799);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tswitch (r) {\n\t\t\tcase 1: \n\t\t\t\tx = randInt.getRandInt(0,599);\n\t\t\t\ty = randInt.getRandInt(0,yMin);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tx = randInt.getRandInt(0,599);\n\t\t\t\ty = randInt.getRandInt(yMax,799);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tx = randInt.getRandInt(0,xMin);\n\t\t\t\ty = randInt.getRandInt(0,799);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tx = randInt.getRandInt(xMax,599);\n\t\t\t\ty = randInt.getRandInt(0,799);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tparticleCollection.add(new Particle(x,y,1,1,width,height,randInt.getRandInt(0,1),randInt.getRandInt(0,1),worldMatrix));\n\t}",
"public IParticle[] InitializeParticles(int NumParticles, int MaxX, int MaxY, int MaxZ, IParticleSize ParticleSize, int[] extraValues);",
"public Particle(int x, int y, int life) {\n this.x = x;\n this.y = y;\n this.xDouble = x;\n this.yDouble = y;\n this.zDouble = 0.0;\n this.life = life + (random.nextInt(life) - life / 2);\n this.sprite = particle_normal;\n\n // Sets the distance delta for the particle to travel to a\n // random (bell-curved) value in the range -1 to 1\n this.xDelta = random.nextGaussian() / 2;\n this.yDelta = random.nextGaussian() / 2;\n this.zDelta = random.nextFloat() + 1.5;\n }",
"ParticleConstant createParticleConstant();",
"public void addRemoveParticles() {\n for (int i=particles.size()-1; i>=0; i--) {\n Particle p = particles.get(i);\n if (p.life <= 0) {\n particles.remove(i);\n }\n }\n // add particles until the maximum\n while (particles.size () < maxParticles) {\n float theta = random(TWO_PI);\n float r = PApplet.parseInt(random(2,7))*50;\n Particle particle = new Particle(cos(theta)*r, sin(theta)*r);\n particles.add(particle);\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides information on additional privacy protections Amazon Lex should use with the bot's data. | public DataPrivacy getDataPrivacy() {
return this.dataPrivacy;
} | [
"public String getPrivacy();",
"String privacyPolicy();",
"public java.lang.String getPrivacyCode() {\n return privacyCode;\n }",
"public void getPrivacy(Context ctx) throws SQLException, PersonNotFoundException {\n var person = currentPerson(ctx);\n ctx.json(person.getPrivacy());\n ctx.status(200);\n }",
"public DirectProjectMetadata getPrivacy() {\n return privacy;\n }",
"public String getPrivacytype() {\r\n\t\treturn privacytype;\r\n\t}",
"public Integer getPrivacyvalue() {\r\n\t\treturn privacyvalue;\r\n\t}",
"public void setPrivacy(boolean privacy) {\n mPrivacy = privacy;\n }",
"public void setPrivacy(String privacy) throws ParseException;",
"@Nullable String getSuppPrivInfo();",
"@Override\n public boolean getAgreedToPrivacy() {\n return _contactInfo.getAgreedToPrivacy();\n }",
"PrivacyPolicy getActivePrivacyPolicy(Platform platform);",
"public Boolean getPrivacyAct() {\r\n\t\t\treturn _privacyAct;\r\n\t\t}",
"public PrivacyState getPrivacyState() {\n \t\treturn privacyState;\n \t}",
"String privacyPolicyLink();",
"public interface PrivacyManager \n{\n\tpublic static final String SYSTEM_RECORD_TYPE = \"system_record\";\n\t\n\tpublic static final String USER_RECORD_TYPE = \"user_record\";\n\t\n\tpublic static final String VISIBLE = \"privacy_visible\";\n\tpublic static final String HIDDEN = \"privacy_hidden\";\n\tpublic static final String PRIVACY_PREFS = \"sakai:pref:privacy\";\n\tpublic static final String DEFAULT_PRIVACY_KEY = \"default\";\n\t\n\t// Tool methods ------------------------------------------------------\n\t\n\t/**\n\t * Determine user privacy within the specified context.\n\t * @param contextId\n\t * @param userId (UUID)\n\t * @return true if privacy is enabled for the user, false otherwise\n\t */\n\tpublic boolean isViewable(String contextId, String userId);\n \n\t/**\n\t * Determine if a user has specifically made a choice.\n\t * @param contextId\n\t * @param userId (UUID)\n\t * @return true if user made a privacy decision\n\t */\n\tpublic boolean userMadeSelection(String contextId, String userId);\n\n\t\n\t/**\n\t * Get a set of users who have privacy disabled within a context. (Visible)\n\t * @param contextId\n\t * @param userIds\n\t * @return Set of <code>org.sakakproject.service.legacy.User.id</code> objects (UUID)\n\t */\n\tSet findViewable(String contextId, Set userIds);\n\t\n\t/**\n\t * Get a set of users who have privacy enabled within a context. (Hidden)\n\t * @param contextId\n\t * @param userIds\n\t * @return Set of <code>org.sakakproject.service.legacy.User.id</code> objects (UUID)\n\t */\n\tSet<String> findHidden(String contextId, Set<String> userIds);\n\n\t// Batch / Privacy Management methods --------------------------------\n\t\n\t/**\n\t * Get the state of the users within the specified context filtered by a Boolean value.\n\t * Implementation should delegate to AuthzGroupService to get users from Realm. \n\t * @param contextId\n\t * @param value filter (True, False, NULL)\n\t * @param recordType is a UUID i.e. (getSystemRecordType(), getUserRecordType())\n\t * @return Set of users who satisfy the criteria\n\t */\n\tSet getViewableState(String contextId, Boolean value, String recordType);\n \n\t/**\n\t * Get the state of the users within the specified context.\n\t * @param contextId\n\t * @param recordType is a UUID i.e. (getSystemRecordType(), getUserRecordType())\n\t * @return Map {key=userId, value=Boolean}\n\t */\n\tMap getViewableState(String contextId, String recordType);\n\t\n\t/**\n\t * Set user's privacy setting within the specified context given a record type.\n\t * @param contextId\n\t * @param userId (UUID)\n\t * @param value using three-valued logic (True, False, NULL)\n\t * @param recordType is a UUID i.e. (getSystemRecordType(), getUserRecordType())\n\t */\n\tvoid setViewableState(String contextId, String userId, Boolean value, String recordType);\n \n\t/**\n\t * Set the state for each entry in the userMap.\n\t * @param contextId\n\t * @param userMap is a Map {key=userId, value=Boolean}\n\t * @param recordType is a UUID i.e. (getSystemRecordType(), getUserRecordType())\n\t */\n\tvoid setViewableState(String contextId, Map userViewableState, String recordType);\n\n\tString getDefaultPrivacyState(String userId);\n\n\tvoid setDefaultPrivacyState(String userId, String visibility);\n\t\n}",
"@Basic @Raw @Immutable\n public int getProtection(){\n \treturn this.protection;\n }",
"@Override\n public boolean isAgreedToPrivacy() {\n return _contactInfo.isAgreedToPrivacy();\n }",
"public boolean isPrivate();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes string arguments as actual parameters that being two things: 1. the filename, 2. Double quoted encoded message (The first line in the filename.file) and sends it to unMixture | public static void main(String[] args) {
UnMix v = new UnMix();
//Linked list initialization
String userMessage = args[1];
for(int i = 0; i < userMessage.length(); i++) {
v.message.add(userMessage.charAt(i));
}
System.out.println(v.message.toString());
//Passing to unMixture
v.unMixture(args[0], args[1]);
} | [
"private void unMixture(String filename, String userMessage) {\r\n String original = UnMixUsingFile (filename, userMessage);\r\n System.out.println (\"The Original message was: \" + original);\r\n }",
"private void unMixture(String filename, String userMessage) {\n\t\t//passed to UnMixUsingFile\n\t\tString original = UnMixUsingFile (filename, userMessage);\n\n\t\tSystem.out.println (\"The Original message was: \" + original);\n\t}",
"@Test\r\n\tpublic void testUnMixUsingFile(){\r\n\t\t\r\n\t\tMix m = new Mix();\r\n\t\tm.setInitialMessage(\"Pizza\");\r\n\t\tm.insert(\"M\", 0);\r\n\t\tassertEquals(m.messageToString(), \"M P i z z a \");\r\n\t\tassertEquals(m.getCommands(), \"r 0\\n\");\r\n\t\tm.save(\"test\");\r\n\t\t\r\n\t\tUnMix u = new UnMix();\r\n\t\tassertEquals(u.UnMixUsingFile(\"test.txt\", \"MPizza\"),\r\n\t\t\t\t\t\t\t\"The original message was:\\nP i z z a \");\r\n\t\t\r\n\t\tMix m2 = new Mix();\r\n\t\tm2.setInitialMessage(\"Hello\");\r\n\t\tm2.save(\"test2.txt\");\r\n\t\t\r\n\t\tUnMix u2 = new UnMix();\r\n\t\tassertEquals(u2.UnMixUsingFile(\"test2.txt\", \"Hello\"),\r\n\t\t\t\t\t\t\t\"The original message was:\\nH e l l o \");\r\n\t\t\r\n\t\tMix m3 = new Mix();\r\n\t\tm3.setInitialMessage(\"Hello World\");\r\n\t\tm3.remove(0);\r\n\t\tassertEquals(m3.messageToString(), \"e l l o W o r l d \");\r\n\t\tassertEquals(m3.getCommands(), \"b H 0\\n\");\r\n\t\tm3.insert(\"J\", 0);\r\n\t\tassertEquals(m3.messageToString(), \"J e l l o W o r l d \");\r\n\t\tassertEquals(m3.getCommands(), \"r 0\\nb H 0\\n\");\r\n\t\tm3.save(\"test3.txt\");\r\n\t\t\r\n\t\tUnMix u3 = new UnMix();\r\n\t\tassertEquals(u3.UnMixUsingFile(\"test3.txt\", \"Jello World\"),\r\n\t\t\t\t\"The original message was:\\nH e l l o W o r l d \");\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n UnMix v = new UnMix();\r\n v.unMixture(args[0], args[1]);\r\n }",
"@Test\r\n\tpublic void testUnMixUsingFile2(){\r\n\t\t\r\n\t\tUnMix u = new UnMix();\r\n\t\tassertEquals(u.UnMixUsingFile(\"testit.txt\", \"NO\"), \r\n\t\t\t\t\"WARNING! File not found!\");\r\n\t\tassertEquals(u.UnMixUsingFile(\"testit\", \"NO\"), \r\n\t\t\t\t\"WARNING! Only able to open .txt files!\");\r\n\t\t\r\n\t}",
"public static void main (String[] args) {\n File file = new File(\"/Users/jdeck/IdeaProjects/biocode-fims/tripleOutput/test.n3\");\n //File file = new File(\"/Users/jdeck/IdeaProjects/biocode-fims/tripleOutput/DEMOH_output.31.n3\");\n //http://data.biscicol.org/ds/data?graph=urn%3Auuid%3A37797bda-7602-42af-82a5-c8a3827d1c61\n //String uuid = \"urn%3Auuid%3A2eddf62e-a58a-11e3-aae7-d4c45d837ce1\";\n //uploader u = new uploader(\"http://data.biscicol.org/ds/data\",file);\n uploader u = new uploader(\"http://data.biscicol.org/ds/data\",file);\n System.out.println( u.execute());\n }",
"public static void main(String[] args) throws ChunkNotFoundException {\r\n\t\tif (args.length > 0) {\r\n\t\t\tSystem.err.println(\"No files names provided\");\r\n\t\t} else {\r\n\t\t\t//for (int i = 0; i < args.length; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tMailParser processor = new MailParser(\"C:\\\\Users\\\\ritwik.pandey\\\\Desktop\\\\First.msg\");\r\n\t\t\t\t\tprocessor.processMessage();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.err.println(\"Could not process : \" + e);\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t}\r\n\t}",
"public static void main(String args[]){\n\n\t\tByteMergeAndSplit obj = new ByteMergeAndSplit();\n\t\tArrayList<String> nameList = new ArrayList<String>();\n\t\ttry{\n\t\t\tif(args[0].equals(\"split\"))\n\t\t\t{\n\t\t\t\tnameList = obj.readAndFragment(args[1],args[2],Integer.parseInt(args[3]));\n\n\t\t\t}else{\n\n\t\t\t\t// System.out.println(\"Arguments received : \" + args.length ) ;\n\n\t\t\t\tArrayList<String> nameList2 = new ArrayList<String>();\n\t\t\t\tfor(int i = 3 ; i < args.length ; i++)\n\t\t\t\t\tnameList2.add(args[i]);\n\t\t\t\tobj.mergeParts(nameList2,args[1],args[2]);\n\t\t\t}\n\t\t}catch(IOException ioe){\n\t\t\tSystem.out.println(\"Exception while reading the file \" + ioe);\n\t\t}\n\n\t}",
"public static void main(String[] args) throws Exception{\n \n if(args.length != 1){\n System.out.println(\"Usage: java TextDecoder filename\");\n System.exit(0);\n }\n \n File messageFile = new File(args[0]); \n TextDecoder decoder = new TextDecoder();\n decoder.readMessagesFromFile(messageFile);\n decoder.printMessages();\n }",
"public static void parseFileName() {\n //parses the command and the filename by space\n cmd = msg.trim().split(\" \");\n}",
"public void sendFile(String sendFilePath) {\n\n }",
"Message<String> generateFilename(Message<CelebrosExportData> incMessage);",
"public static void main(String[] args) {\n\t\t \n\t\t System.out.println ( mixString(\"12345\",\"abcde\")); //should be 1a2b3c4d5e\n\t\t\tSystem.out.println (mixString(\"howdy\",\"hello\")); //should be hhoewldlyo\n\t\t\n\t}",
"public Simulateur(String [] args) throws ArgumentsException {\n \n \t// analyser et r?cup?rer les arguments \t\n analyseArguments(args);\n \n // Création de la chaine de transmission\n if(!messageAleatoire){\n \tsource = new SourceFixe(messageString);\n \n \tSondeLogique sondeLogique1 = new SondeLogique(\"sondeDataEmis\",50);\n \tSondeLogique sondeLogique2 = new SondeLogique(\"sondeDataRecus\",50);\n \t\t\n \ttransmetteurLogique = new TransmetteurParfait() ;\n \tdestination = new DestinationFinale() ;\n \t\n \t\n \tsource.connecter(transmetteurLogique); //Connexion de la source et du transmetteur\n \tif(affichage) source.connecter(sondeLogique1); // affichage des sondes si souhaité par l'utilisateur\n \t\n \ttransmetteurLogique.connecter(destination); //Connexion du transmetteur et de la destination finale\n \tif(affichage) source.connecter(sondeLogique2); // affichage des sondes si souhaité par l'utilisateur\n \n \t\n \t\n }else {\n \t\n \tif(aleatoireAvecGerme) {\n \t\tsource = new SourceAleatoire(seed,nbBitsMess);\n \t}else{\n \t\tsource = new SourceAleatoire(nbBitsMess);\n \t}\n \tSondeLogique sondeLogique1 = new SondeLogique(\"sondeDataEmis\",50);\n \tSondeLogique sondeLogique2 = new SondeLogique(\"sondeDataRecus\",50);\n \t\t\n \ttransmetteurLogique = new TransmetteurParfait() ;\n \tdestination = new DestinationFinale() ;\n \t\n \t\n \tsource.connecter(transmetteurLogique); //Connexion de la source et du transmetteur\n \tif(affichage) source.connecter(sondeLogique1); // affichage des sondes si souhaité par l'utilisateur\n \t\n \ttransmetteurLogique.connecter(destination); //Connexion du transmetteur et de la destination finale\n \tif(affichage) source.connecter(sondeLogique2); // affichage des sondes si souhaité par l'utilisateur\n \n } \t\n \t\t\n }",
"private static void decode(String[] args) {\n\t\tString encodedInputFile = \"\", pass = null;\n\t\tBoolean encrypt = null;\n\n\t\tfor (int i = 1; i < args.length; i += 2) {\n\t\t\tif (\"--mif\".equals(args[i]) && Files.exists(Paths.get(args[i + 1]))) {\n\t\t\t\tString[] fNameSplit = args[i + 1].split(\"\\\\.\");\n\t\t\t\tString fileExt = fNameSplit[fNameSplit.length - 1];\n\t\t\t\tfileType = FileType.getFileType(fileExt);\n\n\t\t\t\tif (fileType == FileType.UNKNOWN\n\t\t\t\t\t|| (fileType == FileType.IMAGE && !Encoder.outImgFormats.contains(fileExt))\n\t\t\t\t\t|| (fileType == FileType.AUDIO && !Encoder.outAudFormats.contains(fileExt))) {\n\t\t\t\t\tSystem.err.println(\"Input media file is invalid, please see supported file types. Exiting.\");\n\t\t\t\t\tSystem.exit(9);\n\t\t\t\t}\n\t\t\t\tencodedInputFile = args[i + 1];\n\t\t\t} else if (\"--enc\".equals(args[i]))\n\t\t\t\tencrypt = Boolean.valueOf(args[i + 1]);\n\t\t\telse if (\"--pass\".equals(args[i]) && encrypt != null && encrypt)\n\t\t\t\tpass = args[i + 1];\n\t\t\telse {\n\t\t\t\tSystem.err.println(\"Unknown option \\\"\" + args[i] + \"\\\". Exiting.\");\n\t\t\t\tSystem.exit(10);\n\t\t\t}\n\t\t}\n\n\t\tif (encodedInputFile.length() > 0) {\n\t\t\tSystem.out.println();\n\t\t\tDecoder.decode(encodedInputFile, encrypt, pass);\n\t\t} else {\n\t\t\tSystem.err.println(\"Arguments missing. For help, please use the --help flag. Exiting.\");\n\t\t\tSystem.exit(11);\n\t\t}\n\t}",
"public abstract void send(String destination, File file);",
"public InvalidFileFormatException(String message){\n super(message);\n }",
"public static void main(String[] args) {\n\t\tKeyExchange aliceEve = new KeyExchange();\n\t\tKeyExchange eveBob = new KeyExchange();\n\t\t\n\t\t// Initialises various BigInteger lists \n\t\tList<BigInteger> aliceMsg1 = new ArrayList<BigInteger>();\n\t\tList<BigInteger> aliceMsg2 = new ArrayList<BigInteger>();\n\t\tList<BigInteger> bobMsg1 = new ArrayList<BigInteger>();\n\t\tList<BigInteger> bobMsg2 = new ArrayList<BigInteger>();\n\t\t\n\t\t// Eve intercepting Alice\n\t\taliceMsg1 = aliceEve.ComputeMessageAtoB();\n\t\taliceMsg2 = aliceEve.ComputeMessageBtoA(aliceMsg1);\n\t\t\n\t\taliceEve.ComputeKeyA(aliceMsg2);\n\t\taliceEve.ComputeKeyB(aliceMsg1);\n\t\t\n\t\t// Eve intercepting Bob\n\t\tbobMsg1 = eveBob.ComputeMessageAtoB();\n\t\tbobMsg2 = eveBob.ComputeMessageBtoA(bobMsg1);\n\t\t\n\t\teveBob.ComputeKeyA(bobMsg2);\n\t\teveBob.ComputeKeyB(bobMsg1);\n\t\t\n\t\t// Transcribes both key Exchanges to txt files\n\t\ttry {\n\t\t\taliceEve.printTranscript(\"aliceEve.txt\");\n\t\t\teveBob.printTranscript(\"eveBob.txt\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Input/Output Exception thrown\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public String asDukeMessage(String[] beforeText, String[] afterText, String... args) {\r\n StringBuilder ret = new StringBuilder();\r\n for (String s : beforeText) {\r\n ret.append(s).append(\"\\n\");\r\n }\r\n for (String s : args) {\r\n ret.append(s).append(\"\\n\");\r\n }\r\n for (String s : afterText) {\r\n ret.append(s).append(\"\\n\");\r\n }\r\n return ret.toString();\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allows calling &x60;create_prompt&x60; multiple times idempotently, such that a prompt is sent atmost once. This key should contain sufficient randomness. Idempotent requests are stored for 24 hours. After that time, the same key will create a new request. | @ApiModelProperty(value = "Allows calling `create_prompt` multiple times idempotently, such that a prompt is sent at-most once. This key should contain sufficient randomness. Idempotent requests are stored for 24 hours. After that time, the same key will create a new request.")
public String getIdempotencyKey() {
return idempotencyKey;
} | [
"public void generatePrompt(View view) {\n String prompt;\n\n int i = generator.nextInt(prompts.size());\n prompt = prompts.get(i);\n\n displayPrompt(prompt);\n }",
"void askForRepeat();",
"public int promptKey() {\n int key;\n Scanner scanner = new Scanner(System.in);\n key = scanner.nextInt();\n return key;\n }",
"public void respondToPrompt(String devKey, String job, int promptID, String response) throws InvalidJobException, InvalidPromptException, RemoteException;",
"public void answerUserPrompt(String key, @Nullable String value) {\n if (value == null) {\n userAnswers.remove(key);\n } else {\n userAnswers.put(key, value);\n }\n }",
"private static String askForKey()\n {\n boolean flag = true;\n String key = \"\";\n Scanner fn = new Scanner(System.in);\n while (flag)\n {\n System.out.println(\n \"Please insert a key(do not give repeated characters and use only capital letters): \");\n key = fn.nextLine();\n if (isStringOnlyCapitalLetter(key) == true// checks if there are only\n // capital letters\n && isCharacterRepeated(key) == true)// checks if there is a\n // repeated character\n {\n flag = false;\n }\n // fn.close();Can't be closed, since if the last character is != C || P\n // the scanner needs to be there\n }\n return key;\n }",
"public String generateNewKey();",
"private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}",
"protected abstract void fillPromptText();",
"public void sendTestSymRequestMessage(){\n\t\tPerProfile.startMeasure();\n\t\tDebug.println(\"Send a test sym request message to server\\n\");\n\t\tString opName = this.getAgent().getConfTable().getRandomConflictOpNameByType(Protocol.PROTOCOL_SYM);\n\t\tProxyTxnId txnId = new ProxyTxnId(this.getMyId(), 0, counterPerClient++);\n\t\tLockRequest lr = new LockRequest(opName);\n\t\t//Random random = new Random();\n\t\tint numOfKeys = 5;//random.nextInt(5);\n\t\tDebug.printf(\"Generate %d keys\\n\", numOfKeys);\n\t\tfor(int i = 0; i < numOfKeys; i++){\n\t\t\tString keyStr = \"a_\" + i;//RandomStringUtils.randomAlphabetic(5).toLowerCase();\n\t\t\tif(keyStr.equalsIgnoreCase(\"\")){\n\t\t\t\tthrow new RuntimeException(\"You generated an empty string\\n\");\n\t\t\t}\n\t\t\tlr.addKey(keyStr);\n\t\t}\n\t this.agent.getProtocol(Protocol.PROTOCOL_SYM).getPermission(txnId, lr);\n\t\tPerProfile.endMeasure();\n\t}",
"@Test\r\n void testPrompt() throws Exception {\r\n DomWindow window = createMainWindow();\r\n _proxy.setAnswer(null);\r\n assertEquals(\"0\", window.prompt(\"How many choices?\", \"0\"), \"User default choice\");\r\n TestWindowProxy.assertLastProxyMethod(\"prompt( How many choices? )\");\r\n _proxy.setAnswer(\"blue\");\r\n assertEquals(\"blue\", window.prompt(\"What is your favorite color?\", \"yellow\"), \"Explicit user choice\");\r\n TestWindowProxy.assertLastProxyMethod(\"prompt( What is your favorite color? )\");\r\n }",
"public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }",
"public String getPromptId() {\n return promptId;\n }",
"public void setPromptID(int value) {\n this.promptID = value;\n }",
"public String getPrompt(){ return _prompt ; }",
"public static SoterCoreResult generateAppGlobalSecureKey() {\n SLogger.i(TAG, \"soter: start generate ask\");\n if (isNativeSupportSoter()) {\n try {\n KeyStore keyStore = KeyStore.getInstance(\"AndroidKeyStore\");\n keyStore.load(null);\n KeyPairGenerator generator = KeyPairGenerator.getInstance(KeyPropertiesCompact.KEY_ALGORITHM_RSA, SOTER_PROVIDER_NAME);\n AlgorithmParameterSpec spec = KeyGenParameterSpecCompatBuilder.\n newInstance(SoterCoreData.getInstance().getAskName() +\n \".addcounter.auto_signed_when_get_pubkey_attk\", KeyPropertiesCompact.PURPOSE_SIGN).setDigests(KeyPropertiesCompact.DIGEST_SHA256)\n .setSignaturePaddings(KeyPropertiesCompact.SIGNATURE_PADDING_RSA_PSS).build();\n generator.initialize(spec);\n long currentTicks = SoterCoreUtil.getCurrentTicks();\n generator.generateKeyPair();\n long cost = SoterCoreUtil.ticksToNowInMs(currentTicks);\n SLogger.i(TAG, \"soter: generate successfully. cost: %d ms\", cost);\n return new SoterCoreResult(ERR_OK);\n } catch (Exception e) {\n SLogger.e(TAG, \"soter: generateAppGlobalSecureKey \" + e.toString());\n SLogger.printErrStackTrace(TAG, e, \"soter: generateAppGlobalSecureKey error\");\n return new SoterCoreResult(ERR_ASK_GEN_FAILED, e.toString());\n } catch (OutOfMemoryError oomError) {\n SLogger.printErrStackTrace(TAG, oomError, \"soter: out of memory when generate ASK!! maybe no attk inside\");\n SoterDelegate.onTriggerOOM();\n }\n } else {\n SLogger.e(TAG, \"soter: not support soter\");\n }\n return new SoterCoreResult(ERR_SOTER_NOT_SUPPORTED);\n }",
"public void promptEnterKey() {\n System.out.print(\"Press \\\"ENTER\\\" to continue...\");\n Scanner scanner = new Scanner(System.in);\n scanner.nextLine();\n }",
"private void promptForKey()\n {\n Scanner sc = new Scanner(System.in);\n sc.nextLine(); \n }",
"T getRandomKey();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Match that the start element with the expected tag | public static boolean matches(StartElement startElement, String tag) {
String elementTag = StaxParserUtil.getElementName(startElement);
return tag.equals(elementTag);
} | [
"public boolean match( ElementExp p ) { return false; }",
"public void startElement(ElementStart element);",
"private boolean checkIfTagStart() {\n\t\tif(data[currentIndex] == '{') {\n\t\t\tif(currentIndex+1 < data.length && data[currentIndex+1] == '$') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public abstract boolean isValidElementTag();",
"public static void validate(StartElement startElement, QName tag) {\n if (! Objects.equals(startElement.getName(), tag)) {\n String foundElementTag = StaxParserUtil.getElementName(startElement);\n throw logger.parserExpectedTag(tag.getLocalPart(), foundElementTag);\n }\n }",
"public void processNodeContent(Integer start) {\n\t\tBoolean isNext = true;\n\t\tmapTags.clear();\n\t\tif (searchSet == null) return;\n\n\t\tfor(String tag: searchSet){\n\t\t\tInteger first = start;\n\t\t\tisNext = true;\n\t\t\twhile (isNext) {\n\t\t\t\tInteger i0 = getTag(\"<\"+tag+\">\",first);\n\t\t\t\tInteger i1 = getTag(\"</\"+tag+\">\",first+1);\n\t\t\t\tif (i0 > -1 && i1 > -1){// found inner component; empty inner components like <fields/> omitted (2nd if branch )\n\t\t\t\t\tif (!mapTags.containsKey(tag)){\n\t\t\t\t\t\tmapTags.put(tag, new ArrayList<String>());\n\t\t\t\t\t}\n\t\t\t\t\tfirst = i1+tag.length()+3;// set pointer to next block right after closing tag\n\t\t\t\t\tmapTags.get(tag).add(xml.substring(i0,first)); // add to map the whole inner component, including open-close tags\n\t\t\t\t}else{\n\t\t\t\t\tInteger i2 = getTag(\"<\"+tag+\"/>\",first);\n\t\t\t\t\tif (i2 != -1){//empty tag present; omit and continue\n\t\t\t\t\t\tfirst = i2+tag.length()+3;\n\t\t\t\t\t}else{// executed when no inner nether empty tags found - nothing to search \n\t\t\t\t\t\tisNext = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tLOG.info(\"added inner components {}:{}\",tag,mapTags.get(tag) == null ? 0: mapTags.get(tag).size());\n\t\t}\n\t}",
"public abstract void nodeStart(String element, Attributes attri);",
"private boolean isTagStartOnLine(IDocument doc, DocumentCommand command) {\n\t\tint position = command.offset - 1;\n\t\tString docData = doc.get();\n\t\t//\n\t\t// First, search backwards. We should hit a '<' before we hit a '>'.\n\t\tint i = position;\n\t\ttry {\n\t\t\tfor (; i > 0; i--) {\n\t\t\t\tchar c = docData.charAt(i);\n\t\t\t\tif (c == '\\r' || c == '\\n')\n\t\t\t\t\treturn false; // Got to the start of the line.\n\t\t\t\tif (docData.charAt(i) == '<') {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"TagIndentStrategy::isEnterInTag() - Caught exception \\'\"\n\t\t\t\t\t\t\t+ e.getMessage() + \"\\'. Dumping.\");\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\n\t\treturn false;\n\t}",
"private boolean advanceToTag(final String tag) {\r\n\t\twhile (this.in.readToTag()) {\r\n\t\t\tfinal Type type = this.in.getTag().getType();\r\n\t\t\tif (type == Type.BEGIN) {\r\n\r\n\t\t\t\tif (this.in.getTag().getName().equals(tag)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tskipObject();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isStartTag() {\n if (this.tagType == 1 || this.tagType == 4) {\n return true;\n }\n\n return false;\n }",
"public Pair<Integer, String> isSatisfy(String text, int start){\n if(!useRegExpr){\n if(start + tagText.length() <= text.length()){ \n String part = text.substring(start, start + tagText.length()); \n if(part.equals(tagText)){\n return new Pair(start + tagText.length(), tagText) ;\n }\n }\n } else{\n Matcher m = regex.matcher(text);\n \n if(m.find(start ) && m.start() == start){\n int endI = m.end();\n return new Pair(endI, m.group()) ;\n }\n \n }\n \n return null;\n }",
"private void TokenStartTag(Token token, TreeConstructor treeConstructor) {\n\t\tif (token.getValue().equals(\"html\"))\r\n\t\t\tTokenAnythingElse(token, treeConstructor, false);\r\n\t\telse\r\n\t\t\tTokenAnythingElse(token, treeConstructor, true);\r\n\t}",
"public boolean checkHTML(){\n\t\t\t//checks if every start tag has an end tag\n\t\t\tHTMLTag htmlToCheck = this.getTag();\n\t\t\tif(htmlToCheck.getEndTag()!=null){\n\t\t\t\tfor(DocumentElement de : htmlToCheck.getChildren()){\n\t\t\t\t\tif(de.getEndTag() != null){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse { \n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else { \n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}",
"private void readStartTag()\n {\n String name = readTagName();\n Map attributes = readAttributes();\n\n if (current() == '>')\n {\n consume();\n emitText();\n handler.startTag(name, attributes);\n }\n }",
"public abstract boolean matches(ContextElement ce);",
"public void testNestedTag() throws Exception {\n String text =\n\t\"<root>\" +\n\t\"<FirstTag>FirstValue</FirstTag>\" +\n\t\"<SecondTag>SecondValue\" +\n\t\"<ThirdTag>ThirdValue</ThirdTag>\" +\n\t\"MoreValueSecond</SecondTag>\" +\n\t\"</root>\";\n assertRawEquals(ListUtil.list(\"firsttag\", \"FirstValue\",\n\t\t\t\t \"secondtag\", \"SecondValue<ThirdTag>ThirdValue</ThirdTag>MoreValueSecond\",\n\t\t\t\t \"thirdtag\", \"ThirdValue\"),\n\t\t\t\t \n\t\t extractFrom(text));\n }",
"protected void handleStart(HtmlDocument.Tag tag) {\n if (!tag.isSelfTerminating()) {\n // Add to the stack of tags needing closing tag\n mSeenTags.push(new TagWrapper(tag, mBuilder.length()));\n }\n }",
"@Test\n void testUnitFollowedByBegin() {\n String[] inputSequence = new String[] {\"AnyType\", \"TypeA\", \"something\"};\n String[] outcomesSequence = new String[] {UNIT_A};\n Assertions.assertTrue(validator.validSequence(1, inputSequence, outcomesSequence, START_A));\n }",
"public void testTagType() {\n assertEquals(TagType.START, new Tag(-1, \"<x0>\").getType());\n assertEquals(TagType.START, new Tag(-1, \"<x10>\").getType());\n assertEquals(TagType.END, new Tag(-1, \"</x0>\").getType());\n assertEquals(TagType.SINGLE, new Tag(-1, \"<x0/>\").getType());\n // Generic XML-like tags are always TagType.SINGLE.\n assertEquals(TagType.SINGLE, new Tag(-1, \"<x>\").getType());\n assertEquals(TagType.SINGLE, new Tag(-1, \"<x/>\").getType());\n assertEquals(TagType.SINGLE, new Tag(-1, \"</x>\").getType());\n assertEquals(TagType.SINGLE, new Tag(-1, \"</x0/>\").getType());\n assertEquals(TagType.SINGLE, new Tag(-1, \"foo\").getType());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Permite obtener una fecha de solicitud de garantia. | public Date generarFechaSolicitudGarantia() {
return new Date();
} | [
"Date getExpiredDate();",
"public Date getUserrevokeTime() {\n return userrevokeTime;\n }",
"Label getRevokeDate();",
"long getExpirationDate();",
"public Date getExpiredDate();",
"java.lang.String getManualAccessTokenExpirationTime();",
"String getAccountExpirationTime();",
"java.lang.String getExpirationDate();",
"org.apache.xmlbeans.XmlString xgetManualAccessTokenExpirationTime();",
"private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }",
"public Date calculateTokenExpiration() {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(new Date());\n\t\tcal.add(Calendar.HOUR_OF_DAY, 1);\n\t\treturn cal.getTime();\n\t}",
"public Date getDATE_CLEAR_AUTH() {\r\n return DATE_CLEAR_AUTH;\r\n }",
"com.google.type.Date getExpireDate();",
"public Date getDATE_AUTHORIZED() {\r\n return DATE_AUTHORIZED;\r\n }",
"public Date getActualGrantAt() {\n return actualGrantAt;\n }",
"com.google.protobuf.Timestamp getRequestedExpiration();",
"private Date generateExpirationDate() {\n return new Date(System.currentTimeMillis() + 36000 * 1000);\n }",
"public Date getGrantAt() {\n return grantAt;\n }",
"public String getRevokeDate() {\r\n return revokeDate;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Literal__FlAssignment_2" $ANTLR start "rule__FunctionLit__SignatureAssignment_1" InternalGo.g:18481:1: rule__FunctionLit__SignatureAssignment_1 : ( ruleSignature ) ; | public final void rule__FunctionLit__SignatureAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalGo.g:18485:1: ( ( ruleSignature ) )
// InternalGo.g:18486:2: ( ruleSignature )
{
// InternalGo.g:18486:2: ( ruleSignature )
// InternalGo.g:18487:3: ruleSignature
{
if ( state.backtracking==0 ) {
before(grammarAccess.getFunctionLitAccess().getSignatureSignatureParserRuleCall_1_0());
}
pushFollow(FOLLOW_2);
ruleSignature();
state._fsp--;
if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getFunctionLitAccess().getSignatureSignatureParserRuleCall_1_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__FunctionLit__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:14651:1: ( ( ( rule__FunctionLit__SignatureAssignment_1 ) ) )\r\n // InternalGo.g:14652:1: ( ( rule__FunctionLit__SignatureAssignment_1 ) )\r\n {\r\n // InternalGo.g:14652:1: ( ( rule__FunctionLit__SignatureAssignment_1 ) )\r\n // InternalGo.g:14653:2: ( rule__FunctionLit__SignatureAssignment_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionLitAccess().getSignatureAssignment_1()); \r\n }\r\n // InternalGo.g:14654:2: ( rule__FunctionLit__SignatureAssignment_1 )\r\n // InternalGo.g:14654:3: rule__FunctionLit__SignatureAssignment_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__FunctionLit__SignatureAssignment_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionLitAccess().getSignatureAssignment_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__FunctionDecl__SignatureAssignment_3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:15845:1: ( ( ruleSignature ) )\r\n // InternalGo.g:15846:2: ( ruleSignature )\r\n {\r\n // InternalGo.g:15846:2: ( ruleSignature )\r\n // InternalGo.g:15847:3: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionDeclAccess().getSignatureSignatureParserRuleCall_3_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionDeclAccess().getSignatureSignatureParserRuleCall_3_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__MethodDecl__SignatureAssignment_4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:15800:1: ( ( ruleSignature ) )\r\n // InternalGo.g:15801:2: ( ruleSignature )\r\n {\r\n // InternalGo.g:15801:2: ( ruleSignature )\r\n // InternalGo.g:15802:3: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getMethodDeclAccess().getSignatureSignatureParserRuleCall_4_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getMethodDeclAccess().getSignatureSignatureParserRuleCall_4_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Literal__FlAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18470:1: ( ( ruleFunctionLit ) )\r\n // InternalGo.g:18471:2: ( ruleFunctionLit )\r\n {\r\n // InternalGo.g:18471:2: ( ruleFunctionLit )\r\n // InternalGo.g:18472:3: ruleFunctionLit\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLiteralAccess().getFlFunctionLitParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleFunctionLit();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLiteralAccess().getFlFunctionLitParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__SignatureDeclaration__SigNameAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:932:1: ( ( RULE_ID ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:933:1: ( RULE_ID )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:933:1: ( RULE_ID )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:934:1: RULE_ID\n {\n before(grammarAccess.getSignatureDeclarationAccess().getSigNameIDTerminalRuleCall_1_0()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__SignatureDeclaration__SigNameAssignment_11811); \n after(grammarAccess.getSignatureDeclarationAccess().getSigNameIDTerminalRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__MethodSpec__SignatureAssignment_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16280:1: ( ( ruleSignature ) )\r\n // InternalGo.g:16281:2: ( ruleSignature )\r\n {\r\n // InternalGo.g:16281:2: ( ruleSignature )\r\n // InternalGo.g:16282:3: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getMethodSpecAccess().getSignatureSignatureParserRuleCall_0_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getMethodSpecAccess().getSignatureSignatureParserRuleCall_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__FunctionType__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:6118:1: ( ( ruleSignature ) )\r\n // InternalGo.g:6119:1: ( ruleSignature )\r\n {\r\n // InternalGo.g:6119:1: ( ruleSignature )\r\n // InternalGo.g:6120:2: ruleSignature\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionTypeAccess().getSignatureParserRuleCall_1()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionTypeAccess().getSignatureParserRuleCall_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__SignatureReference__RefAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27955:1: ( ( ( RULE_ID ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27956:1: ( ( RULE_ID ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27956:1: ( ( RULE_ID ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27957:1: ( RULE_ID )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefCrossReference_1_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27958:1: ( RULE_ID )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27959:1: RULE_ID\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefIDTerminalRuleCall_1_0_1()); \r\n }\r\n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__SignatureReference__RefAssignment_156117); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefIDTerminalRuleCall_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureReferenceAccess().getRefSignatureDefCrossReference_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__SignatureDeclaration__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:459:1: ( ( ( rule__SignatureDeclaration__SigNameAssignment_1 ) ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:460:1: ( ( rule__SignatureDeclaration__SigNameAssignment_1 ) )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:460:1: ( ( rule__SignatureDeclaration__SigNameAssignment_1 ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:461:1: ( rule__SignatureDeclaration__SigNameAssignment_1 )\n {\n before(grammarAccess.getSignatureDeclarationAccess().getSigNameAssignment_1()); \n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:462:1: ( rule__SignatureDeclaration__SigNameAssignment_1 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:462:2: rule__SignatureDeclaration__SigNameAssignment_1\n {\n pushFollow(FOLLOW_rule__SignatureDeclaration__SigNameAssignment_1_in_rule__SignatureDeclaration__Group__1__Impl876);\n rule__SignatureDeclaration__SigNameAssignment_1();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getSignatureDeclarationAccess().getSigNameAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__FunctionLit__FunctionbodyAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18500:1: ( ( ruleFunctionBody ) )\r\n // InternalGo.g:18501:2: ( ruleFunctionBody )\r\n {\r\n // InternalGo.g:18501:2: ( ruleFunctionBody )\r\n // InternalGo.g:18502:3: ruleFunctionBody\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionLitAccess().getFunctionbodyFunctionBodyParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleFunctionBody();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionLitAccess().getFunctionbodyFunctionBodyParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__FunctionDecl__Group__3__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:4823:1: ( ( ( rule__FunctionDecl__SignatureAssignment_3 ) ) )\r\n // InternalGo.g:4824:1: ( ( rule__FunctionDecl__SignatureAssignment_3 ) )\r\n {\r\n // InternalGo.g:4824:1: ( ( rule__FunctionDecl__SignatureAssignment_3 ) )\r\n // InternalGo.g:4825:2: ( rule__FunctionDecl__SignatureAssignment_3 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionDeclAccess().getSignatureAssignment_3()); \r\n }\r\n // InternalGo.g:4826:2: ( rule__FunctionDecl__SignatureAssignment_3 )\r\n // InternalGo.g:4826:3: rule__FunctionDecl__SignatureAssignment_3\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__FunctionDecl__SignatureAssignment_3();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionDeclAccess().getSignatureAssignment_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void entryRuleSignature() throws RecognitionException {\r\n try {\r\n // InternalGo.g:780:1: ( ruleSignature EOF )\r\n // InternalGo.g:781:1: ruleSignature EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleSignature();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"public final void rule__SignatureDef__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7434:1: ( ( ( rule__SignatureDef__SignatureTypeAssignment_0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7435:1: ( ( rule__SignatureDef__SignatureTypeAssignment_0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7435:1: ( ( rule__SignatureDef__SignatureTypeAssignment_0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7436:1: ( rule__SignatureDef__SignatureTypeAssignment_0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureDefAccess().getSignatureTypeAssignment_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7437:1: ( rule__SignatureDef__SignatureTypeAssignment_0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7437:2: rule__SignatureDef__SignatureTypeAssignment_0\r\n {\r\n pushFollow(FOLLOW_rule__SignatureDef__SignatureTypeAssignment_0_in_rule__SignatureDef__Group__0__Impl15678);\r\n rule__SignatureDef__SignatureTypeAssignment_0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureDefAccess().getSignatureTypeAssignment_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public Signature(String signature) {\n\t\tmSignature = signature;\n\t}",
"public final void rule__SignatureDef__NameAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27990:1: ( ( ruleQualifiedName ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27991:1: ( ruleQualifiedName )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27991:1: ( ruleQualifiedName )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27992:1: ruleQualifiedName\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureDefAccess().getNameQualifiedNameParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleQualifiedName_in_rule__SignatureDef__NameAssignment_156185);\r\n ruleQualifiedName();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureDefAccess().getNameQualifiedNameParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Signature__ResultAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16100:1: ( ( ruleResult ) )\r\n // InternalGo.g:16101:2: ( ruleResult )\r\n {\r\n // InternalGo.g:16101:2: ( ruleResult )\r\n // InternalGo.g:16102:3: ruleResult\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureAccess().getResultResultParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleResult();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSignatureAccess().getResultResultParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__CV_spec__SignatureDefsAssignment_4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29981:1: ( ( ruleSignatureDef ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29982:1: ( ruleSignatureDef )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29982:1: ( ruleSignatureDef )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29983:1: ruleSignatureDef\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getCV_specAccess().getSignatureDefsSignatureDefParserRuleCall_4_0()); \r\n }\r\n pushFollow(FOLLOW_ruleSignatureDef_in_rule__CV_spec__SignatureDefsAssignment_460268);\r\n ruleSignatureDef();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getCV_specAccess().getSignatureDefsSignatureDefParserRuleCall_4_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__FunctionLit__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:14677:1: ( ( ( rule__FunctionLit__FunctionbodyAssignment_2 ) ) )\r\n // InternalGo.g:14678:1: ( ( rule__FunctionLit__FunctionbodyAssignment_2 ) )\r\n {\r\n // InternalGo.g:14678:1: ( ( rule__FunctionLit__FunctionbodyAssignment_2 ) )\r\n // InternalGo.g:14679:2: ( rule__FunctionLit__FunctionbodyAssignment_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFunctionLitAccess().getFunctionbodyAssignment_2()); \r\n }\r\n // InternalGo.g:14680:2: ( rule__FunctionLit__FunctionbodyAssignment_2 )\r\n // InternalGo.g:14680:3: rule__FunctionLit__FunctionbodyAssignment_2\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__FunctionLit__FunctionbodyAssignment_2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFunctionLitAccess().getFunctionbodyAssignment_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public FunctionSignature getSignature();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The thread waits until an event matures on the timer queue, then posts it to the event processor queue. | public void run()
{
while (true)
{
// If the queue is not empty, post any matured events
if (!queue.isEmpty())
{
// The time to wait until the next event
long nextEventDelay = 0;
do {
// See if an event has matured
nextEventDelay = queue.peek().getTime() - getTime();
if (nextEventDelay <= 0)
{
// Remove the event from the timer queue and post it to the processor queue
Event event = queue.get();
world.postEvent(event);
}
}
while (nextEventDelay <= 0);
}
// Go to sleep for a short time
try {
thread.sleep(SLEEP_TIME);
}
catch (InterruptedException e)
{
}
}
} | [
"protected void processEvents() {\n Object event;\n while (true) {\n synchronized (eventQueue) {\n if (eventQueue.isEmpty() || !isAlive) {\n eventProcessor = null;\n return;\n }\n event = eventQueue.removeFirst();\n }\n try {\n processEvent(event);\n } catch (Throwable e) {\n e.printStackTrace();\n }\n }\n }",
"public void queueEvent(Runnable r) {\n mNativeThread.queueEvent(r);\n }",
"public void queueEvent(Runnable r)\n {\n glThread.queueEvent(r);\n }",
"public void run() {\n\n // NOTE: sleepTime and asyncTime must be set before\n // startTimerEvents() is called\n long startTime = 0;\n long curTime = 0;\n\n if (debug) {\n startTime = new Date().getTime(); // get start time in mSec\n curTime = startTime; // current time in mSec\n }\n if (sleepTime < asyncTime) {\n asyncTime = sleepTime;\n }\n int numEventChecks = sleepTime / asyncTime;\n\n if (debug) {\n System.out.println(\"sleepTime= \" + sleepTime + \" asyncTime= \" + asyncTime + \"numEventChecks= \" + numEventChecks);\n }\n while (quit == false) {\n try {\n for (int i = 0; i < numEventChecks; i++) {\n Thread.sleep(asyncTime);\n if (debug) {\n curTime = new Date().getTime(); // current time in mSec\n System.out.println(\"async events timer at \" + (curTime - startTime));\n }\n if (quit) {\n break; // exit loop\n }\n agent.processAsynchronousEvents();\n }\n if (timerEnabled && (quit == false)) {\n if (debug) {\n curTime = new Date().getTime(); // current time in mSec\n System.out.println(\"timer event at \" + (curTime - startTime));\n }\n agent.processTimerPop(); // call the timer processing method\n }\n } catch (InterruptedException e) {}\n }\n }",
"protected void dispatchSetupEvents() {\r\n TimedEvent e = null;\r\n while ((e = scenarioQueue.peek()) != null && e.time < 0) {\r\n scenarioQueue.poll();\r\n disp.dispatchEvent(e);\r\n }\r\n }",
"public void queueRunnableAtTime(long eventQueuePtr, int eventId, long timeUs) {\n\n LooperEventRunnable eventRunnable = new LooperEventRunnable(this, eventQueuePtr, eventId, timeUs);\n mRunnableMap.put(eventId, eventRunnable);\n // convert us second to ms second\n// mEventHandler.postAtTime(eventRunnable, timeUs / 1000);\n mEventHandler.postDelayed(eventRunnable, timeUs / 1000);\n }",
"public void run(){\r\n\t\tif(JRexL.on)JRexL.log(className,\"**** run()-->I AM HERE ****\");\r\n\r\n\t\tJRexEvent event;\r\n\t\twhile(true){\r\n\t\t\ttry{\r\n\t\t\t\tevent = eventQueue.dequeue();\r\n }catch(InterruptedException ex){\r\n\t\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> Thread Interrupted in dequeue ***\");\r\n\t\t\t\tdispatchThread=null;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> Processing event<\"+event+\"> ***\");\r\n\r\n\t\t\tint type=event.getType();\r\n\t\t\tJRexEventLock notifier=(JRexEventLock)event.getNotifier();\r\n\r\n\t\t\tif(type==JRexEventType.SHUTDOWN_EVENT){\r\n\t\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> SHUTDOWN_EVENT recieved exiting ***\");\r\n\t\t\t\tdispatchThread=null;\r\n\t\t\t\tif(notifier!=null){\r\n\t\t\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> SHUTDOWN_EVENT Notifying notifier<\"+notifier+\"> ***\");\r\n\t\t\t\t\tnotifier.notified=true;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tJRexEventHandler handler=getHandler(type);\r\n\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> Using Eventhandler<\"+handler+\"> ***\");\r\n\t\t\ttry{\r\n\t\t\t\tObject rv=handler.handleEvent(event);\r\n\t\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> handleEvent rv<\"+rv+\"> ***\");\r\n\t\t\t\tif(rv!=null)retValTable.put(event,rv);\r\n\t\t\t}catch(Throwable ex){\r\n\t\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> handleEvent failed ***\");\r\n\t\t\t\tJRexL.printStackTrace(ex);\r\n\t\t\t}finally{\r\n\t\t\t\tif(notifier!=null){\r\n\t\t\t\t\tif(JRexL.on)JRexL.log(className,\"**** run()--> Notifying notifier<\"+notifier+\"> ***\");\r\n\t\t\t\t\tnotifier.notified=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void doProcessEvent(final LogEvent event) {\r\n synchronized (m_list) {\r\n final int size = m_list.size();\r\n while (m_queueSize <= size) {\r\n try {\r\n m_list.wait();\r\n }\r\n catch (final InterruptedException ie) {\r\n //This really should not occur ...\r\n //Maybe we should log it though for\r\n //now lets ignore it\r\n }\r\n }\r\n\r\n m_list.addFirst(event);\r\n\r\n if (size == 0) {\r\n //tell the \"server\" thread to wake up\r\n //if it is waiting for a queue to contain some items\r\n m_list.notify();\r\n }\r\n }\r\n }",
"private void processAddEventQueue() {\n while (true) {\n try {\n Task task = addEventConcurrentQueue.take();\n Date startDate = Date.from(task.getStartDateTime().get().atZone(ZoneId.systemDefault()).toInstant());\n Date endDate = Date.from(task.getEndDateTime().get().atZone(ZoneId.systemDefault()).toInstant());\n String id = Integer.toString(abs(task.syncCode()));\n\n EventDateTime startEventDateTime = new EventDateTime().setDateTime(new DateTime(startDate));\n EventDateTime endEventDateTime = new EventDateTime().setDateTime(new DateTime(endDate));\n\n Event newEvent = new Event();\n newEvent.setSummary(String.valueOf(task.getName()));\n newEvent.setStart(startEventDateTime);\n newEvent.setEnd(endEventDateTime);\n newEvent.setId(id);\n\n Event result = client.events().insert(agendumCalendar.getId(), newEvent).execute();\n logger.info(result.toPrettyString());\n\n logger.info(\"Task processed from GCal add queue\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\r\n protected void onTimeoutEvent() {\r\n if (mActiveProcessor != null) {\r\n mActiveProcessor.onTimeoutEvent();\r\n } else {\r\n startSyncIfRequired();\r\n setTimeoutIfRequired();\r\n }\r\n }",
"public void tickQueue() {\n if (packetQueue.isEmpty()) {\n return;\n }\n\n Packet packet = packetQueue.poll();\n handle(packet);\n }",
"@Override\n public boolean processNextEvent() {\n if (queue.isEmpty() || status.get() == Status.RUNNING) {\n return false;\n }\n if (status.compareAndSet(Status.READY, Status.RUNNING)) {\n if (queue.isEmpty()) {\n status.set(Status.READY);\n return false;\n }\n final Tuple<MistEvent, Direction> event = queue.poll();\n process(event);\n status.set(Status.READY);\n return true;\n } else {\n return false;\n }\n }",
"public void run() {\r\n while(true) { // outer loop\r\n if(first) // we already have the queue CAS acquired\r\n first=false;\r\n else {\r\n if(!queue.acquire())\r\n return;\r\n }\r\n\r\n try {\r\n Message msg_to_deliver;\r\n while((msg_to_deliver=queue.remove()) != null) { // inner loop\r\n try {\r\n up_prot.up(new Event(Event.MSG, msg_to_deliver));\r\n }\r\n catch(Throwable t) {\r\n log.error(\"couldn't deliver message \" + msg_to_deliver, t);\r\n }\r\n }\r\n }\r\n finally {\r\n queue.release();\r\n }\r\n\r\n // although ConcurrentLinkedQueue.size() iterates through the list, this is not costly,\r\n // as at this point, the queue is almost always empty, or has only a few elements\r\n if(queue.size() == 0) // prevents a concurrent add() (which returned) to leave a dangling message in the queue\r\n break;\r\n }\r\n }",
"public void queueEvent(Runnable r) {\n renderqueue.add(r);\n }",
"public void run() {\r\n\t\twhile (!Thread.interrupted()) {\r\n\t\t// If the moveQueue is empty, we are in IDLE state.\r\n\t\t\tif (moveQueue.isEmpty()) {\r\n\t\t\t\t// Ask the manager if there is a floor where passengers are requesting an elevator.\r\n\t\t\t\tint requestingFloor = manager.requestFloorAccess(elevatorID);\r\n\t\t\t\t// If there is a floor requesting an elevator, create a new elevator event for pick up.\r\n\t\t\t\tif (requestingFloor != -1) {\r\n\t\t\t\t\tElevatorEvent newEvent = new ElevatorEvent();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Create a move event that travels to the floor\r\n\t\t\t\t\t// w/o picking up passengers\r\n\t\t\t\t\tnewEvent.setDestination(requestingFloor);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Calculate expected arrival time.\r\n\t\t\t\t\tint expectedArrival;\r\n\t\t\t\t\texpectedArrival = SimClock.getTime() + Math.abs(newEvent.getDestination() - currentFloor) * traversalTime;\r\n\t\t\t\t\texpectedArrival += loadUnloadTime;\r\n\t\t\t\t\t\r\n\t\t\t\t\tnewEvent.setExpectedArrival(expectedArrival);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Add event to queue\r\n\t\t\t\t\tmoveQueue.add(newEvent);\r\n\t\t\t\t\t\r\n\t\t\t\t\tSimClock.printWithTime(\"Elevator \" + elevatorID + \" is heading to Floor \" + requestingFloor + \" to pick up passengers.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else, we are in PICKUP or DROPOFF state.\r\n\t\t\telse {\r\n\t\t\t\t// If we aren't carrying passengers, we are in PICKUP state.\r\n\t\t\t\tif (numPassengers == 0) {\r\n\t\t\t\t\tElevatorEvent event = moveQueue.get(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// If it is time to PICKUP\r\n\t\t\t\t\tif (event.getExpectedArrival() == SimClock.getTime()) {\r\n\t\t\t\t\t\t// Get the floor the elevator needs to head to for pickup.\r\n\t\t\t\t\t\tcurrentFloor = event.getDestination();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmoveQueue.remove(0); // Clear the queue for the DROPOFF events.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Get the amount of passengers at the floor.\r\n\t\t\t\t\t\tint[] passengerRequests = manager.getPassengerRequestsAtFloor(currentFloor);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSimClock.printWithTime(\"Elevator \" + elevatorID + \" has arrived at Floor \" + currentFloor + \" and has loaded passengers.\");\r\n\t\t\t\t\t\t// First, we figure out if there are any passengers that want to go UP.\r\n\t\t\t\t\t\t// If there are, create elevator events for them ONLY.\r\n\t\t\t\t\t\tfor (int i = currentFloor + 1; i < BuildingManager.FLOOR_COUNT; i++) {\r\n\t\t\t\t\t\t\tif (passengerRequests[i] > 0) {\r\n\t\t\t\t\t\t\t\tcreateElevatorEventForDropoff(passengerRequests, i);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// If the moveQueue is empty, there were no passengers that want to go UP.\r\n\t\t\t\t\t\t// Take care of the passengers that want to go down.\r\n\t\t\t\t\t\tif (moveQueue.isEmpty()) { \t// go downwards instead\r\n\t\t\t\t\t\t\tfor (int i = currentFloor - 1; i > -1; i--) {\r\n\t\t\t\t\t\t\t\tif (passengerRequests[i] > 0) {\r\n\t\t\t\t\t\t\t\t\tcreateElevatorEventForDropoff(passengerRequests, i);\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\t\r\n\t\t\t\t\t\t// Allow other elevators to come pick up at this floor.\r\n\t\t\t\t\t\tmanager.clearApproachingElevator(currentFloor);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// if we do have passengers, then we are in DROPOFF state.\r\n\t\t\t\telse {\r\n\t\t\t\t\t// If the simulation time is equal to expectedArrival time of elevator event.\r\n\t\t\t\t\tif (SimClock.getTime() == moveQueue.get(0).getExpectedArrival()) {\r\n\t\t\t\t\t\t// Get the floor that the elevator should be at.\r\n\t\t\t\t\t\tcurrentFloor = moveQueue.get(0).getDestination();\r\n\t\t\t\t\t\t// Update the total unloaded passengers at that floor.\r\n\t\t\t\t\t\ttotalUnloadedPassengers += passengerDestinations[currentFloor];\r\n\t\t\t\t\t\t// Remove the passengers from the elevator.\r\n\t\t\t\t\t\tnumPassengers -= passengerDestinations[currentFloor];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Update the specific building floor's total arrived passengers for this elevator.\r\n\t\t\t\t\t\tmanager.updateArrivedPassengers(currentFloor, elevatorID, passengerDestinations[currentFloor]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSimClock.printWithTime(\"Elevator \" + elevatorID + \" has arrived at Floor \" + currentFloor +\r\n\t\t\t\t\t\t\t\t\t\t\t \" and has unloaded \" + passengerDestinations[currentFloor] + \" passengers.\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Clear the passengers that requested to go to currentFloor in the elevator's passengerDestination array.\r\n\t\t\t\t\t\tpassengerDestinations[currentFloor] = 0;\r\n\t\t\t\t\t\t// Remove this elevatorEvent from the queue.\r\n\t\t\t\t\t\tmoveQueue.remove(0);\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 run() {\n _running = true;\n\n enqueue(new Start(0));\n\n while(_queue.hasNext() && _running) {\n Event e = _queue.next();\n _simState.setEvent(e);\n e.execute(this);\n }\n }",
"public void waitForEventDone() {\n\t try {\n\t\tsync(0, false);\n\t } catch (InterruptedException ex) { \n\t\tthrow new SyncInterruptedException();\n\t }\n\t}",
"public void timerInterrupt() \n {\n\t\n Machine.interrupt().disable(); //disable\n\n //if waitingQueue is empty, and current time is greater than or equal to the first ThreadWaits, wakeUp time,\n while(!waitingQueue.isEmpty() && (waitingQueue.peek().wakeUp < Machine.timer().getTime()\n || waitingQueue.peek().wakeUp == Machine.timer().getTime())) {\n waitingQueue.poll().thread.ready(); //pop head\n }\n\n KThread.currentThread().yield();\n\n Machine.interrupt().enable(); //enable\n\n }",
"public void timerInterrupt() {\n \t//Disable interrupts everywhere?\n \t//check if it's time for next in queue to wake up \n \tMachine.interrupt().disable();\n //Check if queue is empty and if it is time for next in queue to wake\n \twhile(!waitQueue.isEmpty() && waitQueue.peek().time <= Machine.timer().getTime()) {\n \t\t//Remove thread from queue and ready it\n \t\tWaitThread wThread = waitQueue.remove();\n \t\twThread.thread.ready();\n \t}\n \tMachine.interrupt().enable();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "PlotOrder" | @DISPID(228)
@PropGet
int getPlotOrder(); | [
"@DISPID(228)\n @PropPut\n void setPlotOrder(\n int rhs);",
"public int getModelOutputChartOrder();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getCalculationOrder() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(CALCULATIONORDER_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getCalculationOrder() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(CALCULATIONORDER_PROP.get());\n }",
"public int getPolynomialOrder() {\n\t\treturn _order;\n\t}",
"public java.math.BigInteger getDrawingorder()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DRAWINGORDER$36);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getBigIntegerValue();\r\n }\r\n }",
"public final int getDrawOrder() {\n return drawOrder;\n }",
"public String getPlot() {\n return plot;\n }",
"public org.apache.xmlbeans.XmlInteger xgetDrawingorder()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_attribute_user(DRAWINGORDER$36);\r\n return target;\r\n }\r\n }",
"public String getPlot() {\n return plot;\n }",
"public String getOrder() {\r\n return order;\r\n }",
"public Number getDisplayOrder()\n {\n return (Number)getAttributeInternal(DISPLAYORDER);\n }",
"public int getAxisPos() {\r\n return position;\r\n }",
"public Integer getPositionOrder() {\n return positionOrder;\n }",
"public Integer getOrderNum() {\n return orderNum;\n }",
"public void setModelOutputChartOrder(int modelOutputChartOrder);",
"public long getModelOutputChartOrderPK();",
"public Plot getPlot(){\r\n\t\treturn plot;\r\n\t}",
"public Plot getPlot() {\n return this.plot;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the wrapped MessageListener | public MessageListener getMessageListener() {
return listener;
} | [
"public JmsRequestorListener getListener() {\n return listener;\n }",
"public static MessageProxy getMessageProxy() {\n return MessageProxyHolder.INSTANCE;\n }",
"NIOSocketListener getListener();",
"private NotificationListener getListenerWrapper(NotificationListener l,\n ObjectName name,\n Object mbean,\n boolean create) {\n NotificationListener wrapper = new ListenerWrapper(l, name, mbean);\n synchronized (listenerWrappers) {\n WeakReference ref = (WeakReference) listenerWrappers.get(wrapper);\n if (ref != null) {\n NotificationListener existing =\n (NotificationListener) ref.get();\n if (existing != null)\n return existing;\n }\n if (create) {\n listenerWrappers.put(wrapper, new WeakReference(wrapper));\n return wrapper;\n } else\n return null;\n }\n }",
"public ConnectionListener getListener(String listenerID);",
"private synchronized SipProviderListener getListener(SipMessage msg) {\n\t\tSipId key;\n\t\t// try to look for a transaction (requests go to transaction servers and response go to transaction clients)\n\t\tkey=(msg.isRequest())? (SipId)new TransactionServerId(msg) : (SipId)new TransactionClientId(msg);\n\t\tlog(LogLevel.DEBUG,\"transaction-id: \"+key);\n\t\tif (sip_listeners.containsKey(key)) {\n\t\t\tlog(LogLevel.DEBUG,\"message passed to transaction: \"+key);\n\t\t\treturn (SipProviderListener)sip_listeners.get(key);\n\t\t}\n\t\t// try to look for a dialog\n\t\tkey=new DialogId(msg);\n\t\tlog(LogLevel.DEBUG,\"dialog-id: \"+key);\n\t\tif (sip_listeners.containsKey(key)) {\n\t\t\tlog(LogLevel.DEBUG,\"message passed to dialog: \"+key);\n\t\t\treturn (SipProviderListener)sip_listeners.get(key);\n\t\t}\n\t\t// try to look for a UAS\n\t\tkey=new MethodId(msg);\n\t\tif (sip_listeners.containsKey(key)) {\n\t\t\tlog(LogLevel.DEBUG,\"message passed to uas: \"+key);\n\t\t\treturn (SipProviderListener)sip_listeners.get(key);\n\t\t} \n\t\t// try to look for a default UA\n\t\tif (sip_listeners.containsKey(MethodId.ANY)) {\n\t\t\tlog(LogLevel.DEBUG,\"message passed to uas: \"+MethodId.ANY);\n\t\t\treturn (SipProviderListener)sip_listeners.get(MethodId.ANY);\n\t\t}\n\t\t// else\n\t\treturn null;\n\t}",
"IRemoteMessageService getRemoteMessageService();",
"public interface LowLevelListener {\n\t\tvoid messageReceived(String channelName, RPubMessage message, int rawMessageSize);\n\t}",
"static synchronized AbstractMMXListener getGlobalListener() {\n return sInstance.mGlobalListener;\n }",
"public void addMessageListener(MessageListener listener);",
"public Py4JListener getListener() {\n return listener;\n }",
"public RemotingServiceListener getRemotingServiceListener() {\n return remotingServiceListener;\n }",
"public IMessageHandler getMessageHandler() {\n \t\treturn messageHandler;\n \t}",
"ListenerMethod getListenerMethod();",
"void addMessageListener(MessageListener listener);",
"public static synchronized MessageClickListener getInstance()\n {\n if (instance == null) {\n instance = new MessageClickListener();\n }\n\n return instance;\n }",
"public Message getWrappedMessage() {\n return wrappedMessage;\n }",
"public TransportResponseListener getResponseListener() {\n return myResponseListener;\n }",
"public static MessageManager getMessageManager() {\n return messageManager;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new rset controller. | public RsetController(RsetView rsetView){
this.rView = rsetView;
this.rSet = rsetView.getRset();
} | [
"public RutaController() {\r\n }",
"public Controller() {\n\t\tthis.cenarios = new ArrayList<>();\n\t}",
"public TutorController() {\r\n }",
"public RepRequirementController() {\r\n \r\n }",
"public MainController() {\n\t\tcontroller = new Controller(this);\n\t}",
"public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}",
"public ControllerRol() {\n }",
"public SearchedRecipeController() {\n }",
"public Controller()\n\t{\n\t\tthis.actuators = new ArrayList<>();\n\t\tthis.sensors = new ArrayList<>();\n\t\tthis.facades = new HashMap<>();\n\t}",
"public MatiereController() {\r\n this.fieldsController = new FieldsController();\r\n }",
"public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}",
"public MascaraController() {\n }",
"public SalesProductController()\n {\n salesProductContainer = SalesProductContainer.getInstance();\n }",
"public PlantillaController() {\n }",
"public RequestController() {\n\n\t}",
"public TermTutorSceneController() {\n termTutorSceneController = this;\n }",
"public MedidaController() {\n\t\tmodel = new MedidaModel();\n\t}",
"public BankRemittanceListController() {\n\t\t// Default empty constructor.\n\t}",
"public Controller()\n {\n // Create initial queues and stations\n q0 = new Queue(); //registration q\n \n // p[arameters are id of station, 4 queues, completed q)\n s0 = new Station(0, q0, q1, q2, q3, qx);\n \n //Student soiurce ss is an actor\n \n actors = new ArrayList<>(); \n actors.add(s0); // add all Actor implementors\n //actors.add(myStudentSorce);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method to get length of folder in an otg | public long folderSize(Context context) {
long size = 0l;
size = FileUtil.folderSize(new File(filePath), null);
return size;
} | [
"@Override\n\tpublic int totalPathLength() {\n\t\treturn totalPathLength(root, sum);// returns total path lenght number\n\t}",
"@ApiModelProperty(required = true, value = \"The length of the file/folder.\")\n public Long getLength() {\n return length;\n }",
"public int getPathLength()\r\n\t{\r\n\t\treturn path.size();\r\n\t}",
"public int getDirectoryCount() {\n return myDirectoryCount;\n }",
"public Integer getPathLength() {\n return pathLength;\n }",
"int getTotalLength();",
"public int getPathLength() {\n\t\treturn pathLength;\n\t}",
"public long getGroupLength(final String groupId, final Properties properties) throws FileItemException;",
"int getPathsCount();",
"int getFileLen();",
"long getAmountOfFiles();",
"String getLength();",
"public double getPathLength() {\n pathLength = pathLengthPrefAdapter.getDouble();\n return pathLength;\n }",
"public long getGroupLength(final String groupId) throws FileItemException;",
"@Override\n public double getSize() {\n double size = 0.0;\n for (AbstractFileOrFolder abstractFileOrFolderItem : abstractFileOrFolder) {\n System.out.println(abstractFileOrFolderItem.getName());\n size += abstractFileOrFolderItem.getSize();\n }\n return size;\n }",
"public float lengthOfPath() {\n\t\treturn pathLength.lengthOfPath();\n\t}",
"public int getnumFolders() {\r\n\t\t//initialize the variable numFolders \r\n\t\tthis.numFolders=0;\r\n\r\n\t\t//an enhanced for loop is used to iterate through the array DirectoryList\r\n\t\tfor(DirectoryComponent item: DirectoryList){\r\n\r\n\t\t\t/*this IF condition is used to check if the object in the current index \r\n\t\t\tof the array is of type Directory\r\n\t\t\t */\r\n\t\t\tif(item instanceof Directory){\r\n\r\n\t\t\t\t/*if the object is a directory the numfolder is incremented by 1, \r\n\t\t\t\t\tand the method is called again to check for folders in that folder.\r\n\t\t\t\t */\r\n\t\t\t\tthis.numFolders ++;\r\n\t\t\t\tthis.numFolders += item.getnumFolders();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the method then returns the total number of folders\r\n\t\treturn numFolders;\r\n\t}",
"public Long getCntFolders() {\n return mCntFolders;\n }",
"long getStorageLength();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of XML elements for all vehicles in a model. | private static List<Element> getXMLVehicles(Model model) {
Set<Vehicle> vehicles = new TreeSet<>(Comparators.objectsById());
vehicles.addAll(model.getVehicles(null));
List<Element> result = new ArrayList<>(vehicles.size());
for (Vehicle curVehicle : vehicles) {
Element vehicleElement = new Element("vehicle");
vehicleElement.setAttribute("id", String.valueOf(curVehicle.getId()));
vehicleElement.setAttribute("name", curVehicle.getName());
vehicleElement.setAttribute("length",
String.valueOf(curVehicle.getLength()));
vehicleElement.setAttribute("energyLevelCritical",
String.valueOf(curVehicle.getEnergyLevelCritical()));
vehicleElement.setAttribute("energyLevelGood",
String.valueOf(curVehicle.getEnergyLevelGood()));
for (Map.Entry<String, String> curEntry
: curVehicle.getProperties().entrySet()) {
Element propertyElement = new Element("property");
propertyElement.setAttribute("name", curEntry.getKey());
propertyElement.setAttribute("value", curEntry.getValue());
vehicleElement.addContent(propertyElement);
}
result.add(vehicleElement);
}
return result;
} | [
"Set<EObject> getAllModelElements();",
"Collection<EObject> getModelElements();",
"private static List<Element> getXMLPaths(Model model) {\n Set<Path> paths = new TreeSet<>(Comparators.objectsById());\n paths.addAll(model.getPaths(null));\n List<Element> result = new ArrayList<>(paths.size());\n for (Path curPath : paths) {\n Element pathElement = new Element(\"path\");\n pathElement.setAttribute(\"id\", String.valueOf(curPath.getId()));\n pathElement.setAttribute(\"name\", curPath.getName());\n pathElement.setAttribute(\"sourcePoint\",\n curPath.getSourcePoint().getName());\n pathElement.setAttribute(\"destinationPoint\",\n curPath.getDestinationPoint().getName());\n pathElement.setAttribute(\"length\", String.valueOf(curPath.getLength()));\n pathElement.setAttribute(\"routingCost\",\n String.valueOf(curPath.getRoutingCost()));\n // velocities\n pathElement.setAttribute(\"maxVelocity\",\n String.valueOf(curPath.getMaxVelocity()));\n // reverse velocities\n pathElement.setAttribute(\"maxReverseVelocity\",\n String.valueOf(curPath.getMaxReverseVelocity()));\n // locks\n pathElement.setAttribute(\"locked\", String.valueOf(curPath.isLocked()));\n // actions\n for (Map.Entry<String, String> curEntry\n : curPath.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n pathElement.addContent(propertyElement);\n }\n // XXX Add the path's other attributes as well.\n result.add(pathElement);\n }\n return result;\n }",
"public Collection<Vehicle> getAllVehicles();",
"protected List<EModelElement> getEModelElementsList() {\n\t\tList<EObject> eObjects = getEObjectList();\n\t\tif (eObjects.size() <= 0) {\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t\tList<EModelElement> eModelElements = new ArrayList<EModelElement>();\n\t\tfor (EObject eObject : eObjects) {\n\t\t\tEModelElement eModelElement = (EModelElement) Platform\n\t\t\t\t\t.getAdapterManager().getAdapter(eObject,\n\t\t\t\t\t\t\tEModelElement.class);\n\t\t\tif (eModelElement != null) {\n\t\t\t\teModelElements.add(eModelElement);\n\t\t\t}\n\t\t}\n\t\treturn eModelElements;\n\t}",
"private static List<Element> getXMLBlocks(Model model) {\n Set<Block> blocks = new TreeSet<>(Comparators.objectsById());\n blocks.addAll(model.getBlocks(null));\n List<Element> result = new ArrayList<>(blocks.size());\n for (Block curBlock : blocks) {\n Element blockElement = new Element(\"block\");\n blockElement.setAttribute(\"id\", String.valueOf(curBlock.getId()));\n blockElement.setAttribute(\"name\", curBlock.getName());\n for (TCSResourceReference<?> curRef : curBlock.getMembers()) {\n Element resourceElement = new Element(\"member\");\n resourceElement.setAttribute(\"name\", curRef.getName());\n blockElement.addContent(resourceElement);\n }\n for (Map.Entry<String, String> curEntry\n : curBlock.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n blockElement.addContent(propertyElement);\n }\n result.add(blockElement);\n }\n return result;\n }",
"public Vector<String> getAllModels() {\n Vector<String> allModels = new Vector<String>();\n Iterator<String> it = allXMLProtocols.keySet().iterator();\n while (it.hasNext()) {\n String fullName = (String) it.next();\n ProtocolXML protXML = (ProtocolXML) allXMLProtocols.get(fullName);\n\n if (!allModels.contains(protXML.model))\n allModels.add(protXML.model);\n }\n\n return allModels;\n }",
"private static List<Element> getXMLLocations(Model model) {\n Set<Location> locations = new TreeSet<>(Comparators.objectsById());\n locations.addAll(model.getLocations(null));\n List<Element> result = new ArrayList<>();\n for (Location curLoc : locations) {\n Element locElement = new Element(\"location\");\n locElement.setAttribute(\"id\", String.valueOf(curLoc.getId()));\n locElement.setAttribute(\"name\", curLoc.getName());\n locElement.setAttribute(\"xPosition\",\n String.valueOf(curLoc.getPosition().getX()));\n locElement.setAttribute(\"yPosition\",\n String.valueOf(curLoc.getPosition().getY()));\n locElement.setAttribute(\"zPosition\",\n String.valueOf(curLoc.getPosition().getZ()));\n locElement.setAttribute(\"type\", curLoc.getType().getName());\n for (Location.Link curLink : curLoc.getAttachedLinks()) {\n Element linkElement = new Element(\"link\");\n linkElement.setAttribute(\"point\", curLink.getPoint().getName());\n for (String operation : curLink.getAllowedOperations()) {\n Element allowedOpElement = new Element(\"allowedOperation\");\n allowedOpElement.setAttribute(\"name\", operation);\n linkElement.addContent(allowedOpElement);\n }\n locElement.addContent(linkElement);\n }\n for (Map.Entry<String, String> curEntry\n : curLoc.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n locElement.addContent(propertyElement);\n }\n result.add(locElement);\n }\n return result;\n }",
"private static List<Element> getXMLPoints(Model model) {\n Set<Point> points = new TreeSet<>(Comparators.objectsById());\n points.addAll(model.getPoints(null));\n List<Element> result = new ArrayList<>(points.size());\n for (Point curPoint : points) {\n Element pointElement = new Element(\"point\");\n pointElement.setAttribute(\"id\", String.valueOf(curPoint.getId()));\n pointElement.setAttribute(\"name\", curPoint.getName());\n pointElement.setAttribute(\"xPosition\",\n String.valueOf(curPoint.getPosition().getX()));\n pointElement.setAttribute(\"yPosition\",\n String.valueOf(curPoint.getPosition().getY()));\n pointElement.setAttribute(\"zPosition\",\n String.valueOf(curPoint.getPosition().getZ()));\n pointElement.setAttribute(\"vehicleOrientationAngle\",\n String.valueOf(curPoint.getVehicleOrientationAngle()));\n pointElement.setAttribute(\"type\", curPoint.getType().toString());\n for (TCSObjectReference<Path> curRef : curPoint.getOutgoingPaths()) {\n Element outgoingElement = new Element(\"outgoingPath\");\n outgoingElement.setAttribute(\"name\", curRef.getName());\n pointElement.addContent(outgoingElement);\n }\n for (Map.Entry<String, String> curEntry\n : curPoint.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n pointElement.addContent(propertyElement);\n }\n result.add(pointElement);\n }\n return result;\n }",
"List<Vehicle> getVehicles();",
"public List<String> getAllEnginesByModel(Model model) {\n return store.getAllEnginesByModel(model);\n }",
"public List<XDataFilterElementModel> getXDataFilterElementModelList();",
"private static List<Element> getXMLLocationTypes(Model model) {\n Set<LocationType> locTypes = new TreeSet<>(Comparators.objectsById());\n locTypes.addAll(model.getLocationTypes(null));\n List<Element> result = new ArrayList<>(locTypes.size());\n for (LocationType curType : locTypes) {\n Element typeElement = new Element(\"locationType\");\n typeElement.setAttribute(\"id\", String.valueOf(curType.getId()));\n typeElement.setAttribute(\"name\", curType.getName());\n for (String curOperation : curType.getAllowedOperations()) {\n Element opElement = new Element(\"allowedOperation\");\n opElement.setAttribute(\"name\", curOperation);\n typeElement.addContent(opElement);\n }\n result.add(typeElement);\n for (Map.Entry<String, String> curEntry\n : curType.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n typeElement.addContent(propertyElement);\n }\n }\n return result;\n }",
"private static List<Element> getXMLStaticRoutes(Model model) {\n Set<StaticRoute> routes = new TreeSet<>(Comparators.objectsById());\n routes.addAll(model.getStaticRoutes(null));\n List<Element> result = new ArrayList<>(routes.size());\n for (StaticRoute curRoute : routes) {\n Element routeElement = new Element(\"staticRoute\");\n routeElement.setAttribute(\"id\", String.valueOf(curRoute.getId()));\n routeElement.setAttribute(\"name\", curRoute.getName());\n for (TCSObjectReference<Point> curRef : curRoute.getHops()) {\n Element hopElement = new Element(\"hop\");\n hopElement.setAttribute(\"name\", curRef.getName());\n routeElement.addContent(hopElement);\n }\n for (Map.Entry<String, String> curEntry\n : curRoute.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n routeElement.addContent(propertyElement);\n }\n result.add(routeElement);\n }\n return result;\n }",
"private static List<Element> getXMLGroups(Model model) {\n Set<Group> groups = new TreeSet<>(Comparators.objectsById());\n groups.addAll(model.getGroups(null));\n List<Element> result = new ArrayList<>(groups.size());\n for (Group curGroup : groups) {\n Element groupElement = new Element(\"group\");\n groupElement.setAttribute(\"id\", String.valueOf(curGroup.getId()));\n groupElement.setAttribute(\"name\", curGroup.getName());\n for (TCSObjectReference<?> curRef : curGroup.getMembers()) {\n Element memberElement = new Element(\"member\");\n memberElement.setAttribute(\"name\", curRef.getName());\n groupElement.addContent(memberElement);\n }\n for (Map.Entry<String, String> curEntry\n : curGroup.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n groupElement.addContent(propertyElement);\n }\n result.add(groupElement);\n }\n return result;\n }",
"java.util.List<com.google.cloud.optimization.v1.Vehicle> getVehiclesList();",
"public List<Vehicle> getVehicles() {\n return vehicles;\n }",
"private void readVehicles(List<Element> vehicleElements, Model model)\n throws ObjectExistsException {\n // Add the vehicles.\n for (int i = 0; i < vehicleElements.size(); i++) {\n Element curVehicleElement = vehicleElements.get(i);\n String attrVal;\n Integer vehicleID;\n try {\n vehicleID = Integer.valueOf(curVehicleElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n vehicleID = null;\n }\n Vehicle curVehicle = model.createVehicle(vehicleID);\n TCSObjectReference<Vehicle> vehicleRef = curVehicle.getReference();\n String vehicleName = curVehicleElement.getAttributeValue(\"name\");\n if (vehicleName == null || vehicleName.isEmpty()) {\n vehicleName = \"VehicleName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(vehicleRef, vehicleName);\n attrVal = curVehicleElement.getAttributeValue(\"length\",\n \"1000\");\n model.setVehicleLength(vehicleRef,\n Integer.parseInt(attrVal));\n attrVal = curVehicleElement.getAttributeValue(\"energyLevelCritical\",\n \"30\");\n model.setVehicleEnergyLevelCritical(vehicleRef,\n Integer.parseInt(attrVal));\n attrVal = curVehicleElement.getAttributeValue(\"energyLevelGood\",\n \"90\");\n model.setVehicleEnergyLevelGood(vehicleRef,\n Integer.parseInt(attrVal));\n List<Element> properties = curVehicleElement.getChildren(\"property\");\n for (int j = 0; j < properties.size(); j++) {\n Element curPropElement = properties.get(j);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + j + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + j + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(vehicleRef, curKey, curValue);\n }\n }\n }",
"public List<Vehicle> list();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a partner by URL | AdPartner getAdPartnerByURL(String url); | [
"PartnerLink getPartnerLink();",
"public String getPartnerLink();",
"AdPartner getAdPartnerByName(String partnerName);",
"public AePartnerLink findPartnerLink()\r\n {\r\n AePartnerLinkDef def = getPartnerLinkDef();\r\n if (def == null)\r\n return null;\r\n \r\n return findPartnerLink(getPartnerLinkDef().getName());\r\n }",
"java.lang.String getSecondaryUrl();",
"public String getPartner() {\n return partner;\n }",
"public Player getPartner(Game g, Player p) {\n int playerNumber = p.getPlayerNumber();\n int partnerNumber = ((g.getPlayers() / 2) + playerNumber) % g.getPlayers();\n Map<String, Object> constraint = new HashMap<>();\n constraint.put(\"game_id\", g.getGameId());\n constraint.put(\"player_number\", partnerNumber);\n Player partner = pDao.getByCompositeKey(constraint);\n return partner;\n }",
"public A getPartner(){\n return partner;\n }",
"public Person getPartner(){\n\t\tPerson partner= this.partner;\n\t\treturn partner;\n\t}",
"URL getRepositoryWebUrl(ProgrammingExerciseParticipation participation);",
"private OembedProvider findProvider(final String url) {\n\t\tOembedProvider rv = null;\n\t\tproviderLoop:\n\t\t\tfor(OembedProvider provider : this.provider.values()) {\n\t\t\t\tfor(String urlScheme : provider.getUrlSchemes()) {\n\t\t\t\t\tif(url.matches(urlScheme)) {\n\t\t\t\t\t\trv = provider;\n\t\t\t\t\t\tbreak providerLoop;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\t\t\n\t\treturn rv;\n\t}",
"String getVendorURL();",
"java.lang.String getTurnURL();",
"String getArticleUrl();",
"String getWebsite();",
"String getProductURL();",
"public void setPartner(String partner) {\n this.partner = partner;\n }",
"public Edge getPartner(){\n\t\treturn partner;\n\t}",
"public Tripulante buscarPorUrl(Tripulante tripulante);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "PACKAGE" $ANTLR start "PRIVATE" | public final void mPRIVATE() throws RecognitionException {
try {
int _type = PRIVATE;
int _channel = DEFAULT_TOKEN_CHANNEL;
// /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:105:9: ( 'private' )
// /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:105:11: 'private'
{
match("private");
}
state.type = _type;
state.channel = _channel;
}
finally {
}
} | [
"public final void mPRIVATE() throws RecognitionException {\n try {\n int _type = PRIVATE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:121:9: ( 'private' )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:121:11: 'private'\n {\n match(\"private\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void mPRIVATE() throws RecognitionException {\r\n try {\r\n int _type = PRIVATE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // D:\\\\Work and Projects\\\\Speciale\\\\ThesisDeobfuscator\\\\Deobfuscation\\\\src\\\\bytecodeDeobfuscation\\\\JVM.g:809:15: ( 'private' )\r\n // D:\\\\Work and Projects\\\\Speciale\\\\ThesisDeobfuscator\\\\Deobfuscation\\\\src\\\\bytecodeDeobfuscation\\\\JVM.g:809:17: 'private'\r\n {\r\n match(\"private\"); \r\n\r\n\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 packagedef() throws RecognitionException {\n Token CODE2=null;\n\n try {\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:61:11: ( ( RET )* TARGETNAMESPACE CODE GT )\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:61:13: ( RET )* TARGETNAMESPACE CODE GT\n {\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:61:13: ( RET )*\n loop7:\n do {\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0==RET) ) {\n alt7=1;\n }\n\n\n switch (alt7) {\n \tcase 1 :\n \t // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:61:13: RET\n \t {\n \t match(input,RET,FOLLOW_RET_in_packagedef224); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop7;\n }\n } while (true);\n\n match(input,TARGETNAMESPACE,FOLLOW_TARGETNAMESPACE_in_packagedef227); \n CODE2=(Token)match(input,CODE,FOLLOW_CODE_in_packagedef229); \n handler.setPackage(CODE2); \n match(input,GT,FOLLOW_GT_in_packagedef233); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"PackageDeclaration(AST ast) {\n super(ast); }",
"public final void mAccessModifier() throws RecognitionException {\n try {\n int _type = AccessModifier;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/sidharth/Documents/code/phpparser/grammar/Php.g:506:5: ( 'public' | 'private' | 'protected' )\n int alt13=3;\n int LA13_0 = input.LA(1);\n\n if ( (LA13_0=='p') ) {\n int LA13_1 = input.LA(2);\n\n if ( (LA13_1=='u') ) {\n alt13=1;\n }\n else if ( (LA13_1=='r') ) {\n int LA13_3 = input.LA(3);\n\n if ( (LA13_3=='i') ) {\n alt13=2;\n }\n else if ( (LA13_3=='o') ) {\n alt13=3;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 3, input);\n\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 1, input);\n\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 0, input);\n\n throw nvae;\n }\n switch (alt13) {\n case 1 :\n // /Users/sidharth/Documents/code/phpparser/grammar/Php.g:506:7: 'public'\n {\n match(\"public\"); if (state.failed) return ;\n\n\n }\n break;\n case 2 :\n // /Users/sidharth/Documents/code/phpparser/grammar/Php.g:506:18: 'private'\n {\n match(\"private\"); if (state.failed) return ;\n\n\n }\n break;\n case 3 :\n // /Users/sidharth/Documents/code/phpparser/grammar/Php.g:506:30: 'protected'\n {\n match(\"protected\"); if (state.failed) return ;\n\n\n }\n break;\n\n }\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void rulePackageDeclaration() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:270:2: ( ( ( rule__PackageDeclaration__Group__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:271:1: ( ( rule__PackageDeclaration__Group__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:271:1: ( ( rule__PackageDeclaration__Group__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:272:1: ( rule__PackageDeclaration__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getPackageDeclarationAccess().getGroup()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:273:1: ( rule__PackageDeclaration__Group__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:273:2: rule__PackageDeclaration__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__PackageDeclaration__Group__0_in_rulePackageDeclaration521);\r\n rule__PackageDeclaration__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getPackageDeclarationAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void modifier() throws RecognitionException {\r\n try {\r\n // org\\\\antlr\\\\grammar\\\\v3\\\\TreeToNFAConverter.g:266:2: ( 'protected' | 'public' | 'private' | 'fragment' )\r\n // org\\\\antlr\\\\grammar\\\\v3\\\\TreeToNFAConverter.g:\r\n {\r\n if ( (input.LA(1)>=PRIVATE && input.LA(1)<=PUBLIC)||input.LA(1)==FRAGMENT ) {\r\n input.consume();\r\n state.errorRecovery=false;state.failed=false;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"public final void mPACKAGE() throws RecognitionException {\n try {\n int _type = PACKAGE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:120:9: ( 'package' )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:120:11: 'package'\n {\n match(\"package\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void rule__PackageDeclaration__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5596:1: ( ( 'package' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5597:1: ( 'package' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5597:1: ( 'package' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5598:1: 'package'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getPackageDeclarationAccess().getPackageKeyword_0()); \r\n }\r\n match(input,71,FOLLOW_71_in_rule__PackageDeclaration__Group__0__Impl12040); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getPackageDeclarationAccess().getPackageKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public void visitPackage(Package packageNode);",
"public void visitPackageDeclaration(GNode node) {\n for (int i = 0; i < node.size(); i++) {\n packageName += \"namespace \" + node.getNode(1).getString(i) + \" { \\n\";\n }\n //packageName = node.getNode(1).getString(0);\n visit(node);\n }",
"ASTAccessModifier getAccessModifier();",
"PackageClause getPackageClause();",
"public final DefineGrammarItemsWalker.modifier_return modifier() throws RecognitionException {\r\n DefineGrammarItemsWalker.modifier_return retval = new DefineGrammarItemsWalker.modifier_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n\r\n \tretval.mod = ((GrammarAST)retval.start).getToken().getText();\r\n\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:272:2: ( 'protected' | 'public' | 'private' | 'fragment' )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/DefineGrammarItemsWalker.g:\r\n {\r\n if ( input.LA(1)==FRAGMENT||(input.LA(1) >= PRIVATE && input.LA(1) <= PUBLIC) ) {\r\n input.consume();\r\n state.errorRecovery=false;\r\n state.failed=false;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }",
"public final void rule__ObjectPermission__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:13135:1: ( ( ':' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:13136:1: ( ':' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:13136:1: ( ':' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:13137:1: ':'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getObjectPermissionAccess().getColonKeyword_2()); \r\n }\r\n match(input,74,FOLLOW_74_in_rule__ObjectPermission__Group__2__Impl26925); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getObjectPermissionAccess().getColonKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XVariableDeclaration__Group_2_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23505:1: ( ( ( rule__XVariableDeclaration__Group_2_0_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23506:1: ( ( rule__XVariableDeclaration__Group_2_0_0__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23506:1: ( ( rule__XVariableDeclaration__Group_2_0_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23507:1: ( rule__XVariableDeclaration__Group_2_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXVariableDeclarationAccess().getGroup_2_0_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23508:1: ( rule__XVariableDeclaration__Group_2_0_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23508:2: rule__XVariableDeclaration__Group_2_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XVariableDeclaration__Group_2_0_0__0_in_rule__XVariableDeclaration__Group_2_0__0__Impl47316);\r\n rule__XVariableDeclaration__Group_2_0_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXVariableDeclarationAccess().getGroup_2_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__PackageClause__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:4877:1: ( ( 'package' ) )\r\n // InternalGo.g:4878:1: ( 'package' )\r\n {\r\n // InternalGo.g:4878:1: ( 'package' )\r\n // InternalGo.g:4879:2: 'package'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getPackageClauseAccess().getPackageKeyword_0()); \r\n }\r\n match(input,49,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getPackageClauseAccess().getPackageKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__PackageDeclaration__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5644:1: ( rule__PackageDeclaration__Group__2__Impl rule__PackageDeclaration__Group__3 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:5645:2: rule__PackageDeclaration__Group__2__Impl rule__PackageDeclaration__Group__3\r\n {\r\n pushFollow(FOLLOW_rule__PackageDeclaration__Group__2__Impl_in_rule__PackageDeclaration__Group__212131);\r\n rule__PackageDeclaration__Group__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__PackageDeclaration__Group__3_in_rule__PackageDeclaration__Group__212134);\r\n rule__PackageDeclaration__Group__3();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public interface JavaSourceParser {\n\tpublic List<JavaSource> execute() throws IOException, RecognitionException;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the workflowTimeTriggers value for this WorkflowRule. | public void setWorkflowTimeTriggers(com.sforce.soap._2006._04.metadata.WorkflowTimeTrigger[] workflowTimeTriggers) {
this.workflowTimeTriggers = workflowTimeTriggers;
} | [
"public com.sforce.soap._2006._04.metadata.WorkflowTimeTrigger[] getWorkflowTimeTriggers() {\r\n return workflowTimeTriggers;\r\n }",
"void setTriggers(Expression e, Iterable<? extends Expression> triggers);",
"public void setTriggerTime(String triggerTime) {\n this.triggerTime = triggerTime;\n }",
"public void setTriggerFiredTime(long triggerFiredTime) {\n\t\t\tthis.triggerFiredTime = triggerFiredTime;\n\t\t}",
"private void setUpdateTriggerTime(int value) {\n bitField0_ |= 0x00000002;\n updateTriggerTime_ = value;\n }",
"public abstract void setTriggers(Map<String, Trigger> triggers);",
"public void setTriggerType(com.sforce.soap._2006._04.metadata.WorkflowTriggerTypes triggerType) {\r\n this.triggerType = triggerType;\r\n }",
"public void setTrigger(ArrayList trigger) {\n\t\talTrigger = trigger;\n\t}",
"void setTriggers(List<Trigger> triggers){\n if (control == null)\n getMissionControl();\n if (control == null)\n return;\n\n control.setTriggers(triggers);\n }",
"@ApiModelProperty(required = true, value = \"An array of triggers you wish to have the webhook listen to. See [**WebhookTriggersEnum**](Enums.md#WebhookTriggersEnum) for available values.\")\n public List<String> getTriggers() {\n return triggers;\n }",
"public void setTriggerTime(long triggerTime) {\n\tthis.triggerTime = (float) triggerTime * .001f;\n\tcomputeStopTime();\n\tVirtualUniverse.mc.sendRunMessage(J3dThread.RENDER_THREAD);\n }",
"protected void setTriggers(Flag startTimer, Flag stopTimer)\r\n\t{\r\n\t\tthis.startTimer = startTimer;\r\n\t\tthis.stopTimer = stopTimer;\r\n\r\n\t\t//=================================================================================\r\n\t\t//Set a null startTimer to a flipped flag\r\n\t\t//=================================================================================\r\n\t\tif (this.startTimer == null)\r\n\t\t{\r\n\t\t\tthis.startTimer = new Flag(false, \"\", \"\");\r\n\t\t\tthis.startTimer.flipToggle();\r\n\t\t}\r\n\r\n\t\t//=================================================================================\r\n\t\t//Set a null stopTimer to an unflipped flag\r\n\t\t//=================================================================================\r\n\t\tif (this.stopTimer == null)\r\n\t\t\tthis.stopTimer = new Flag(false, \"\", \"\");\r\n\t}",
"public void setTriggers() {\n\t\tthis.driveTrigger.whileActive(new DirectDriveCommand());\n\t\tthis.goFastTrigger.whileActive(new GottaGoFastCommand());\n\n\t\tthis.directionRightTrigger.whenActive(new ToggleFrontRelayCommand());\n\t\t//this.directionDownTrigger.whenActive(new ResetGyroCommand());\n\t\tthis.directionLeftTrigger.whenActive(new ToggleBackRelayCommand());\n\n\t\tthis.armTrigger.whileActive(new DirectArmCommand());\n\t\tthis.grabberTrigger.whileActive(new DirectGrabberCommand());\n\t\tthis.hatchPopperTrigger.whileActive(new PopHatchCommand());\n\n\t\tthis.changeSourceTrigger.whenActive(new ChangeSourceCommand());\n\t\tthis.reverseDriveTrigger.whenActive(new ReverseDriveCommand());\n\n\t\tthis.alignTrigger.whileActive(new TurnToCenterTargetsCommand());\n\t}",
"public void setTimesTriggered(Long timesTriggered) {\n this.timesTriggered = timesTriggered;\n }",
"public void setTrigger(java.lang.String trigger);",
"Triggers getTriggers();",
"public void testSetProperties() throws Exception {\n final JettySolrRunner runner = cluster.getJettySolrRunner(0);\n final SolrResourceLoader resourceLoader = runner.getCoreContainer().getResourceLoader();\n final SolrCloudManager solrCloudManager = runner.getCoreContainer().getZkController().getSolrCloudManager();\n \n try (ScheduledTriggers scheduledTriggers = new ScheduledTriggers(resourceLoader, solrCloudManager)) {\n AutoScalingConfig config = new AutoScalingConfig(Collections.emptyMap());\n scheduledTriggers.setAutoScalingConfig(config);\n\n // Setup a trigger that records the timestamp of each time it was run\n // we only need 2 timestamps for the test, so limit the queue and make the trigger a No-Op if full\n final BlockingQueue<Long> timestamps = new ArrayBlockingQueue<Long>(2);\n final AutoScaling.Trigger t1 = new MockTrigger(TriggerEventType.NODELOST, \"mock-timestamper\") {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n timestamps.offer(solrCloudManager.getTimeSource().getTimeNs());\n }\n };\n\n log.info(\"Configuring simple scheduler and adding trigger: {}\", t1.getName());\n t1.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n scheduledTriggers.add(t1);\n\n waitForAndDiffTimestamps(\"conf(default delay)\",\n ScheduledTriggers.DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS, TimeUnit.SECONDS,\n timestamps);\n \n log.info(\"Reconfiguing scheduler to use 4s delay and clearing queue for trigger: {}\", t1.getName());\n config = config.withProperties(Collections.singletonMap\n (AutoScalingParams.TRIGGER_SCHEDULE_DELAY_SECONDS, 4));\n scheduledTriggers.setAutoScalingConfig(config);\n timestamps.clear();\n\n waitForAndDiffTimestamps(\"conf(four sec delay)\", \n 4, TimeUnit.SECONDS, \n timestamps);\n \n log.info(\"Removing trigger: {}\", t1.getName());\n scheduledTriggers.remove(t1.getName());\n \n log.info(\"Reconfiguing scheduler to use default props\");\n config = config.withProperties(ScheduledTriggers.DEFAULT_PROPERTIES);\n scheduledTriggers.setAutoScalingConfig(config);\n\n \n assertTrue(\"Test sanity check, need default thread pool to be at least 3 so we can\" +\n \"test lowering it by 2\", ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE >= 3);\n final int numTriggers = ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE;\n final int reducedThreadPoolSize = numTriggers - 2;\n \n // Setup X instances of a trigger that:\n // - records it's name as being run\n // - skipping all remaining execution if it's name has already been recorded\n // - records the name of the thread that ran it\n // - blocks on a cyclic barrier untill at Y instances have run (to hog a thread)\n // ...to test that the scheduler will add new threads as needed, up to the configured limit\n //\n // NOTE: the reason we need X unique instances is because the scheduler won't \"re-run\" a single\n // trigger while a previouss \"run\" is still in process\n final List<AutoScaling.Trigger> triggerList = new ArrayList<>(numTriggers);\n \n // Use a cyclic barrier gated by an atomic ref so we can swap it out later\n final AtomicReference<CyclicBarrier> latch = new AtomicReference<>(new CyclicBarrier(numTriggers));\n \n // variables for tracking state as we go\n // NOTE: all read/write must be gated by synchronizing on the barrier (ref),\n // so we we can ensure we are reading a consistent view\n final Set<String> threadNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final Set<String> triggerNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final AtomicLong fails = new AtomicLong(0);\n\n // Use a semaphore to track when each trigger *finishes* so our test thread\n // can know when to check & clear the tracking state\n final Semaphore completionSemaphore = new Semaphore(numTriggers);\n \n for (int i = 0; i < numTriggers; i++) {\n AutoScaling.Trigger trigger = new MockTrigger(TriggerEventType.NODELOST,\n \"mock-blocking-trigger-\" + i) {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n CyclicBarrier barrier = null;\n synchronized (latch) {\n if (triggerNames.add(this.getName())) {\n log.info(\"{}: No-Op since we've already recorded a run\", this.getName());\n return;\n }\n threadNames.add(Thread.currentThread().getName());\n barrier = latch.get();\n }\n \n try {\n log.info(\"{}: waiting on barrier to hog a thread\", this.getName());\n barrier.await(30, TimeUnit.SECONDS);\n completionSemaphore.release();\n } catch (Exception e) {\n fails.incrementAndGet();\n log.error(this.getName() + \": failure waiting on cyclic barrier: \" + e.toString(), e);\n }\n }\n };\n\n trigger.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n triggerList.add(trigger);\n completionSemaphore.acquire();\n log.info(\"Adding trigger {} to scheduler\", trigger.getName());\n scheduledTriggers.add(trigger);\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread ames found: \" + threadNames.toString(),\n numTriggers, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n\n // before releasing the latch, clear the state and update our config to use a lower number of threads\n log.info(\"Updating scheduler config to use {} threads\", reducedThreadPoolSize);\n config = config.withProperties(Collections.singletonMap(AutoScalingParams.TRIGGER_CORE_POOL_SIZE,\n reducedThreadPoolSize));\n scheduledTriggers.setAutoScalingConfig(config);\n\n log.info(\"Updating cyclic barrier and clearing test state so triggers will 'run' again\");\n latch.set(new CyclicBarrier(reducedThreadPoolSize));\n threadNames.clear();\n triggerNames.clear();\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread names found: \" + threadNames.toString(),\n reducedThreadPoolSize, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n }\n }\n }",
"public void setWorkflowTask(WorkflowTaskInstance p_wfTaskInstance);",
"ETriggers getTriggers();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Github app installation id | @javax.annotation.Nullable
@ApiModelProperty(value = "Github app installation id")
public Long getInstallationId() {
return installationId;
} | [
"public String getInstallationObjectId();",
"private String getInstallId()\n {\n String installId = PropertiesComponent.getInstance().getValue(INSTALL_ID_KEY);\n\n if (installId == null) {\n installId = UUID.randomUUID().toString();\n LOG.info(String.format(\"Creating install id '%s'\", installId));\n PropertiesComponent.getInstance().setValue(INSTALL_ID_KEY, installId);\n }\n\n return installId;\n }",
"String applicationId();",
"String getArtifactId();",
"java.lang.String getDeploymentId();",
"java.lang.String getArtifactId();",
"long getAppid();",
"@java.lang.Override\n public long getAppInstallationId() {\n return appInstallationId_;\n }",
"int getAppid();",
"private String getInstallationId(String user) throws IOException {\n\n LOGGER.debug( String.format(\"Getting InstallationId for user=[%s] \",user));\n\n // Create the HttpClient\n HttpClient httpclient = HttpClients.createDefault();\n // Set the specific path\n String path = INSTALLATION_REQUEST.replace(\"USERNAME\",user);\n // Create the appropriate HTTP method for the request\n HttpGet httpGet = getGitHubGetAuth(path);\n // Perform the request\n String response = executeRequest(httpclient,httpGet);\n // Obtain the installationId from the response\n String installationId = getInstallationIdFromResponse(response,user);\n\n LOGGER.debug( String.format(\"InstallationId obtained for user=[%s] \",user));\n\n return installationId;\n }",
"@java.lang.Override\n public long getAppInstallationId() {\n return appInstallationId_;\n }",
"String artifactSourceId();",
"pb.lyft.datacatalog.Datacatalog.ArtifactId getArtifactId();",
"public String getArtifactId() {\n checkStatus();\n return info.getOrDefault(\"Implementation-Artifact\", null);\n }",
"public static String uniqueApp(){\n return \"app\" + newUUIDString();\n }",
"@Override\n public long getApplicationId() {\n return _appVersion.getApplicationId();\n }",
"public String pullBuildNumber()\n {\n String build = \"Build: \" + applicationBuildNumber;\n return build;\n }",
"String id(final String version) {\n return name + '-' + version;\n }",
"java.lang.String getModelDeploymentId();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the boolean array of checkbox results. | public boolean[] getCheckbox() {
return checkboxes;
} | [
"public boolean[] getBooleanList();",
"public boolean[] getBooleans(){\n\t\tboolean[] b = new boolean[10];\n\t\tb[0] = isBoolean(answer0);\n\t\tb[1] = isBoolean(answer1);\n\t\tb[2] = isBoolean(answer2);\n\t\tb[3] = isBoolean(answer3);\n\t\tb[4] = isBoolean(answer4);\n\t\tb[5] = isBoolean(answer5);\n\t\tb[6] = isBoolean(answer6);\n\t\tb[7] = isBoolean(answer7);\n\t\tb[8] = isBoolean(answer8);\n\t\tb[9] = isBoolean(answer9);\n\t\treturn b;\n\t}",
"java.util.List<java.lang.Boolean> getActualBoolValueList();",
"boolean arrCompleted(Boolean[] boolarray) {\n for (int i=0; i < boolarray.length; i++) {\n if (boolarray[i] == false) {\n return false;\n }\n }\n return true;\n }",
"public boolean[] getBooleanArray1() throws MathLinkException;",
"public Boolean isCheckBoxesVisible(){\n return checkBoxState;\n }",
"public boolean[] getAttrBoolArray(String name)\n{\n\treturn (boolean[])getAttr(name);\n}",
"@Override\n public Boolean[] getBooleanObjects(String name)\n {\n Boolean[] result = null;\n String value[] = getParam(name);\n if (value != null)\n {\n result = new Boolean[value.length];\n for (int i = 0; i < value.length; i++)\n {\n result[i] = parseBoolean(value[i]);\n }\n }\n return result;\n }",
"private ArrayList<String> getCheckboxes() {\n ArrayList<CheckBox> checkBoxes = new ArrayList<>();\n String[] names = {\"PNEU\",\"OIL\",\"BATTERY\",\"AC\",\"WIPER\",\"COMPLETE\",\"GEOMETRY\"}; //LINK NA DB ?\n checkBoxes.addAll(Arrays.asList(pneuCB, oilCB, batCB, acCB, wipCB, comCB, geoCB));\n ArrayList<String> result = new ArrayList<>();\n for (int i = 0; i < checkBoxes.size(); i++) {\n if(checkBoxes.get(i).isSelected()){\n result.add(names[i]);\n }\n }\n return result;\n }",
"public boolean isAllSelected() ;",
"boolean isCheckboxChecked();",
"org.apache.xmlbeans.XmlBoolean xgetMultiple();",
"@Override\n public boolean[] getBooleans(String name)\n {\n boolean[] result = null;\n String value[] = getParam(name);\n if (value != null)\n {\n result = new boolean[value.length];\n for (int i = 0; i < value.length; i++)\n {\n \t// default to false\n \tresult[i] = false;\n \t\n \t// update with parsed value if exists\n \tBoolean bool = parseBoolean(value[i]);\n if ( bool != null )\n {\n \tresult[i] = bool.booleanValue();\n } \t\n }\n }\n return result;\n }",
"java.util.List<java.lang.Boolean> getValuesList();",
"public boolean[] getBooleanArray(final String key) {\n return (boolean[]) getArray(Boolean.TYPE, key);\n }",
"public boolean hasChecked() {\n for (BaUnitSearchResultBean prop : getBaUnitSearchResults()) {\n if (prop.isChecked()) {\n return true;\n }\n }\n return false;\n }",
"public boolean[] getBooleanArray(String name) {\n\t\tDNNode node = getNode(name);\n\t\tif (node == null) throw new NoSuchNodeException(NoSuchNodeException.NODE_NOT_FOUND);\n\t\tif (node.length >= 0) {\n\t\t\tif (node.typ == DNHelper.BOOLEAN) {\n\t\t\t\treturn (boolean[]) node.value;\n\t\t\t} else {\n\t\t\t\tthrow new NoSuchNodeException(NoSuchNodeException.WRONG_NODE_TYPE);\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"java.util.List<Googleplay.FormCheckbox> \n getCheckboxList();",
"public boolean[] getBooleanArray(String key) {\r\n return getBooleanArray(key, DEFAULT_DELIMITER);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the variant map metadata pseudoheader, and remove it from the response object. | private static Map<String, String> getVariantMapPseudoHeadersAndRemove(final HttpResponse response) throws ResourceIOException {
final Header[] headers = response.getHeaders();
final Map<String, String> variantMap = new HashMap<>(0);
String lastKey = null;
for (final Header header : headers) {
if (header.getName().equals(SC_HEADER_NAME_VARIANT_MAP_KEY)) {
lastKey = header.getValue();
response.removeHeader(header);
} else if (header.getName().equals(SC_HEADER_NAME_VARIANT_MAP_VALUE)) {
if (lastKey == null) {
throw new ResourceIOException("Found mismatched variant map key/value headers");
}
variantMap.put(lastKey, header.getValue());
lastKey = null;
response.removeHeader(header);
}
}
if (lastKey != null) {
throw new ResourceIOException("Found mismatched variant map key/value headers");
}
return variantMap;
} | [
"private static String getOptionalCachePseudoHeaderAndRemove(final HttpResponse response, final String name) {\n final Header header = response.getFirstHeader(name);\n if (header == null) {\n return null;\n }\n response.removeHeader(header);\n return header.getValue();\n }",
"private static String getCachePseudoHeaderAndRemove(final HttpResponse response, final String name) throws ResourceIOException {\n final String headerValue = getOptionalCachePseudoHeaderAndRemove(response, name);\n if (headerValue == null) {\n throw new ResourceIOException(\"Expected cache header '\" + name + \"' not found\");\n }\n return headerValue;\n }",
"public String removeHeader (String name);",
"@SuppressWarnings(\"rawtypes\")\r\n\tprotected void moveMeta() {\r\n\t\tif (isMap()) {\r\n\t\t\tmeta = ((Map) value).remove(Config.META);\r\n\t\t}\r\n\t}",
"public void removeHeaders ();",
"public void removeHeader();",
"private void unescapeHeaders(final HttpResponse httpResponse) {\n final Header[] headers = httpResponse.getHeaders();\n for (final Header header : headers) {\n if (header.getName().startsWith(SC_CACHE_ENTRY_PRESERVE_PREFIX)) {\n httpResponse.removeHeader(header);\n httpResponse.addHeader(header.getName().substring(SC_CACHE_ENTRY_PRESERVE_PREFIX.length()), header.getValue());\n }\n }\n }",
"protected CosServiceResponse<T> parseResponseMetadata(CosHttpResponse response) {\n CosServiceResponse<T> cosResponse = new CosServiceResponse<T>();\n String cosRequestId = response.getHeaders().get(Headers.REQUEST_ID);\n String cosTraceId = response.getHeaders().get(Headers.TRACE_ID);\n String ciRequestId = response.getHeaders().get(Headers.CI_REQUEST_ID);\n\n Map<String, String> metadataMap = new HashMap<String, String>();\n metadataMap.put(Headers.REQUEST_ID, cosRequestId);\n metadataMap.put(Headers.TRACE_ID, cosTraceId);\n metadataMap.put(Headers.CI_REQUEST_ID, ciRequestId);\n cosResponse.setResponseMetadata(new ResponseMetadata(metadataMap));\n\n return cosResponse;\n }",
"private void addMetadataPseudoHeaders(final HttpResponse httpResponse, final HttpCacheStorageEntry httpCacheEntry) {\n httpResponse.addHeader(SC_HEADER_NAME_STORAGE_KEY, httpCacheEntry.getKey());\n httpResponse.addHeader(SC_HEADER_NAME_RESPONSE_DATE, Long.toString(httpCacheEntry.getContent().getResponseInstant().toEpochMilli()));\n httpResponse.addHeader(SC_HEADER_NAME_REQUEST_DATE, Long.toString(httpCacheEntry.getContent().getRequestInstant().toEpochMilli()));\n\n // Encode these so map entries are stored in a pair of headers, one for key and one for value.\n // Header keys look like: {Accept-Encoding=gzip}\n // And header values like: {Accept-Encoding=gzip}https://example.com:1234/foo\n for (final Map.Entry<String, String> entry : httpCacheEntry.getContent().getVariantMap().entrySet()) {\n // Headers are ordered\n httpResponse.addHeader(SC_HEADER_NAME_VARIANT_MAP_KEY, entry.getKey());\n httpResponse.addHeader(SC_HEADER_NAME_VARIANT_MAP_VALUE, entry.getValue());\n }\n }",
"public void removeExtraHeader(final String name) {\n extraHeaders.remove(name);\n }",
"protected void populateObjectMetadata(CosHttpResponse response, ObjectMetadata metadata) {\n for (Entry<String, String> header : response.getHeaders().entrySet()) {\n String key = header.getKey();\n if (StringUtils.beginsWithIgnoreCase(key, Headers.COS_USER_METADATA_PREFIX)) {\n key = key.substring(Headers.COS_USER_METADATA_PREFIX.length());\n metadata.addUserMetadata(key, header.getValue());\n } else if (ignoredHeaders.contains(key)) {\n // ignore...\n } else if (key.equalsIgnoreCase(Headers.LAST_MODIFIED)) {\n try {\n metadata.setHeader(key, DateUtils.parseRFC822Date(header.getValue()));\n } catch (Exception pe) {\n log.warn(\"Unable to parse last modified date: \" + header.getValue(), pe);\n }\n } else if (key.equalsIgnoreCase(Headers.CONTENT_LENGTH)) {\n try {\n metadata.setHeader(key, Long.parseLong(header.getValue()));\n } catch (NumberFormatException nfe) {\n log.warn(\"Unable to parse content length: \" + header.getValue(), nfe);\n }\n } else if (key.equalsIgnoreCase(Headers.DELETE_MARKER)) {\n metadata.setDeleteMarker(Boolean.parseBoolean(header.getValue()));\n } else if (key.equalsIgnoreCase(Headers.ETAG)) {\n metadata.setETag(StringUtils.removeQuotes(header.getValue()));\n } else if (key.equalsIgnoreCase(Headers.EXPIRES)) {\n try {\n metadata.setHttpExpiresDate(DateUtils.parseRFC822Date(header.getValue()));\n } catch (Exception pe) {\n log.warn(\"Unable to parse http expiration date: \" + header.getValue(), pe);\n }\n } else if (key.equalsIgnoreCase(Headers.EXPIRATION)) {\n new ObjectExpirationHeaderHandler<ObjectMetadata>().handle(metadata, response);\n } else if (key.equalsIgnoreCase(Headers.RESTORE)) {\n new ObjectRestoreHeaderHandler<ObjectRestoreResult>().handle(metadata, response);\n } else if (key.equalsIgnoreCase(Headers.FILE_MODE_DIR)) { // used for merge bucket\n metadata.setFileModeDir(true);\n } else {\n metadata.setHeader(key, header.getValue());\n }\n }\n }",
"public ResponseHeaderMetadata getResponseHeaderMetadata() { \n return responseHeaderMetadata;\n }",
"void unsetHeader();",
"protected ResponseHeader getHeader() {\n return this.header;\n }",
"public void setResponseHeaderMetadata(ResponseHeaderMetadata responseHeaderMetadata) { \n this.responseHeaderMetadata = responseHeaderMetadata;\n }",
"public Map<String, Object> getModifiableMetadata() {\n Map<String, Object> objectMetadata = new HashMap<String, Object>(getMetadataMap());\n objectMetadata.remove(METADATA_HEADER_CONTENT_LENGTH);\n objectMetadata.remove(METADATA_HEADER_DATE);\n objectMetadata.remove(METADATA_HEADER_ETAG);\n objectMetadata.remove(METADATA_HEADER_LAST_MODIFIED_DATE);\n objectMetadata.remove(Constants.KEY_FOR_COMPLETE_METADATA);\n objectMetadata.remove(Constants.KEY_FOR_SERVICE_METADATA);\n objectMetadata.remove(Constants.KEY_FOR_USER_METADATA);\n objectMetadata.remove(Constants.KEY_FOR_HTTP_METADATA);\n objectMetadata.remove(\"id-2\"); // HTTP request-specific information\n objectMetadata.remove(\"request-id\"); // HTTP request-specific information\n return objectMetadata;\n }",
"com.didiyun.base.v1.Header getHeader();",
"cn.nextop.gadget.etcd.grpc.ResponseHeader getHeader();",
"@Override\n public final VCFHeader getHeaderForVariants() {\n return drivingVariants.getHeader();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .speech_formatting.TokenSegment.BreakLevel break_level = 2; | public Builder setBreakLevel(speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
breakLevel_ = value.getNumber();
onChanged();
return this;
} | [
"speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel getBreakLevel();",
"speech_formatting.SegmentedTextOuterClass.TokenSegment getTokenSegment(int index);",
"speech_formatting.SegmentedTextOuterClass.SentenceSegment getSentenceSegment(int index);",
"@java.lang.Override\n public speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel getBreakLevel() {\n @SuppressWarnings(\"deprecation\")\n speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel result = speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel.valueOf(breakLevel_);\n return result == null ? speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel.EMPTY : result;\n }",
"java.util.List<speech_formatting.SegmentedTextOuterClass.TokenSegment> \n getTokenSegmentList();",
"java.lang.String getCustomBreak();",
"public PhraseSeparator() {\n //In order to use the sentence detector, it needs to get the proper Open NLP model, from \n //where it happens to be right now.\n try {\n FileInputStream sdReference = new FileInputStream(\"C:\\\\Users\\\\soopa\\\\Desktop\\\\CMPU203\\\\turing\\\\src\\\\main\\\\resources\\\\en-sent.bin\");\n SentenceModel model = new SentenceModel(sdReference);\n sentenceDetector = new SentenceDetectorME(model);\n tokenizer = WhitespaceTokenizer.INSTANCE;\n //And some exception handling, in case we couldn't find the model.\n } catch (FileNotFoundException e) {\n System.out.println(e.getMessage());\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n }",
"private void wordMultiBreakEkle(XWPFRun r, int adet)\n {\n for (int i = 0; i < adet; i++)\n r.addBreak();\n }",
"speech_formatting.SegmentedTextOuterClass.SentenceSegmentOrBuilder getSentenceSegmentOrBuilder(\n int index);",
"public void endOfSentence() {}",
"public int getSentenceFormatter () {\n return SentenceTypes.FORMATTER_RAYNAV750;\n }",
"public void nextToken( Token tok ) {\r\n\t\ttry {\r\n\t\t\tswitch( tok ) {\r\n\t\t\tcase K_0:\tappendBuffer( \"0\" ); break;\r\n\t\t\tcase K_1:\tappendBuffer( \"1\" ); break;\r\n\t\t\tcase K_2:\tappendBuffer( \"2\" ); break;\r\n\t\t\tcase K_3:\tappendBuffer( \"3\" ); break;\r\n\t\t\tcase K_4:\tappendBuffer( \"4\" ); break;\r\n\t\t\tcase K_5:\tappendBuffer( \"5\" ); break;\r\n\t\t\tcase K_6:\tappendBuffer( \"6\" ); break;\r\n\t\t\tcase K_7:\tappendBuffer( \"7\" ); break;\r\n\t\t\tcase K_8:\tappendBuffer( \"8\" ); break;\r\n\t\t\tcase K_9:\tappendBuffer( \"9\" );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase K_1000:appendBuffer( \"000\" );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase K_DIV:\r\n\t\t\t\tthrow new ArithmeticException( \"ERR: div by zero\" );\r\n\t\t\tcase K_MUL:\tappendBuffer( \"*\" ); break;\r\n\t\t\tcase K_PLUS:appendBuffer( \"+\" ); break;\r\n\t\t\tcase K_MIN:\tappendBuffer( \"-\" ); break;\r\n\t\t\tcase K_EQ:\t verarbeiten();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase K_VAT:\r\n\t\t\t\tview.writeSideArea(\r\n\t\t\t\t\t\twert = dsb.toString());\r\n\t\t\t\tdouble netto = Double.valueOf(wert) / 1.19;\r\n\t\t\t\tString nettoBetrag = String.format(\"%.2f\", netto);\r\n\t\t\t\tview.writeSideArea(\r\n\t\t\t\t\t\t\"Brutto: \" + dsb + \"\\n\"\r\n\t\t\t\t\t\t\t\t+ VAT_RATE + \"% MwSt: \" + String.format(\"%.2f\", (Double.valueOf(wert) - netto)) + \" \\n\"\r\n\t\t\t\t\t\t\t\t+ \"Netto: \" + nettoBetrag\r\n\t\t\t\t);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase K_DOT:\tappendBuffer( \".\" );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase K_BACK:\r\n\t\t\t\tdsb.setLength( Math.max( 0, dsb.length() - 1 ) );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase K_C:\r\n\t\t\t\tview.writeSideArea( \"\" );\r\n\t\t\tcase K_CE:\r\n\t\t\t\tdsb.delete( 0, dsb.length() );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\tString display = dsb.length()==0? \"0\" : dsb.toString();\r\n\t\t\tview.writeTextArea( display );\r\n\r\n\t\t} catch( ArithmeticException e ) {\r\n\t\t\tview.writeTextArea( e.getMessage() );\r\n\t\t}\r\n\t}",
"public speech_formatting.SegmentedTextOuterClass.TokenSegment.Builder addTokenSegmentBuilder() {\n return getTokenSegmentFieldBuilder().addBuilder(\n speech_formatting.SegmentedTextOuterClass.TokenSegment.getDefaultInstance());\n }",
"public com.anychart.core.StateSettings wordBreak(com.anychart.enums.WordBreak mode) {\n APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + \".wordBreak(%s);\", (mode != null) ? mode.getJsBase() : null));\n\n return this;\n }",
"private SegmentedText(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public int getSentenceFormatter () {\n return SentenceTypes.FORMATTER_HDT;\n }",
"private SentenceSegment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private void addSegmentIntroduction(Document doc) throws DocumentException {\n float percentageSegment = (float) Model.getSentenceSegment();\n percentageSegment /= 26.0;\n float[] sentenceRange = modFrame;\n float currentSegment = (sentenceRange[1] - sentenceRange[0]) * percentageSegment;\n currentSegment += sentenceRange[0];\n DecimalFormat twoDP = new DecimalFormat(\"#0.0\");\n doc.add(new Paragraph(\"From the following questions the perpetrators actions placed them at \" + (int) (percentageSegment * 100) +\n \"% of the sentence frame. This is a measure of the severity of the violation or endangerment of the legal interest concerned.\\n\"\n + \"This leads to an unweighted sentence of \" + twoDP.format(currentSegment) + \" years within the frame \" + twoDP.format(sentenceRange[0]) + \" to \"\n + twoDP.format(sentenceRange[1]) + \" years.\\n\\nThis calculation is based off constant jurisprudence.\\n\\n\", noteFont));\n }",
"public com.anychart.core.StateSettings wordBreak(String mode) {\n APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + \".wordBreak(%s);\", wrapQuotes(mode)));\n\n return this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the search for files to recurse through sub directories | public GlobFileSet recurse()
{
m_recurse = true;
return (this);
} | [
"private void search(File searchFile)\n\t{\n\t\tif (searchFile.isFile())\n\t\t{\n\t\t\tString fileName = searchFile.getName();\n\t\t\tString fileExtension = fileName.substring(fileName.lastIndexOf(\".\"), fileName.length());\n\t\t\tif(fileExtension.equals(extension)){\n\t\t\t\tfoundFiles.add(searchFile.getPath());\n\t\t\t}\n\t\t\t// This File is a regular file (not a directory).\n\t\t\t// If this pathname ends with the specified extension,\n\t\t\t// add its pathname to the foundFiles arraylist.\n\t\t\t// Hint: Use searchFile.getPath() to get the pathname\n\t\t\t// for searchFile object as a string.\n\t\t\t\n\t\t\t// Finish recursion.\n\t\t\treturn;\n\t\t}\n\t\tif (ENABLE_DEBUGGING)\n\t\t{\n\t\t\tSystem.out.println(\"Searching directory \" + searchFile.getPath());\n\t\t}\n\t\t// Get an array of File objects for all the files in this directory.\n\t\tFile[] files = searchFile.listFiles();\n\n\t\t// Recursively check each file in the files array.\n\t\tfor (File file : files)\n\t\t{\n\t\t\t// Recursively call search() on this file object.\n\t\t\tsearch(file);\n\t\t}\n\t\tif (ENABLE_DEBUGGING)\n\t\t{\n\t\t\tSystem.out.println(\"Finished searching directory \" + searchFile.getPath());\n\t\t}\n\t}",
"private void findAllFiles() {\n foundFiles = searcher.search(params.getDirectoryKey(), params.getFileNameKey());\n }",
"public void directorySearch(File dir, String target)\n\t{\n\t\tif(!(dir.isDirectory()))\n\t\t{\n\t\t\t//If file is not a directory, throw the exception.\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif(count == maxFiles)\n\t\t{\n\t\t\t//If count is equal to maxFiles, throw the exception.\n\t\t\t//If it doesn't then this will act as a base case to\n\t\t\t//the recursion. \n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//Put all the sub directories in an array. \n\t\t\tFile[] file = dir.listFiles();\n\t\t\t\n\t\t\t//Print out the path and the file directory list \n\t\t\tSystem.out.println(dir.getPath() + \": \" + dir.listFiles());\n\t\t\t\n\t\t\t//Go through each of the file length\n\t\t\tfor(int i = 0; i < file.length; i++)\n\t\t\t{\n\t\t\t\t//Get the file name \n\t\t\t\tSystem.out.println(\" -- \" + file[i].getName());\n\t\t\t\t\n\t\t\t\t//If the file name is the target, then add it to the \n\t\t\t\t//stack and return\n\t\t\t\tif(file[i].getName().equals(target))\n\t\t\t\t{\n\t\t\t\t\t//If the item inside the file is the target.\n\t\t\t\t\tcount++;\n\t\t\t\t\tfileList.add(file[i].getPath());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//If its a directory, then recurse.\n\t\t\t\tif(file[i].isDirectory())\n\t\t\t\t{\n\t\t\t\t\tdirectorySearch(file[i], target);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (NullPointerException e)\n\t\t{\n\t\t\t//If the File[] is null then catch this exception.\n\t\t\treturn;\n\t\t}\n\t}",
"private File[] traverseFileDirectory() {\n return new File(SearchDocumentConstants.FILE_PATH).listFiles();\n }",
"public static void findStructureFiles() {\n\t\tstructureFiles = new LinkedList<File>();\n\t\tLinkedList<File> unexploredDirectories = new LinkedList<File>();\n\t\tFile baseDir = new File(\"structures\");\n\t\t\n\t\tif (baseDir.exists() && baseDir.isDirectory()) {\n\t\t\t// load base directory's files\n\t\t\trecursiveFindStructureFiles(baseDir, unexploredDirectories);\n\t\t\t\n\t\t\t// load sub-directories' files, breadth-first\n\t\t\twhile (!unexploredDirectories.isEmpty()) {\n\t\t\t\trecursiveFindStructureFiles(unexploredDirectories.pop(), unexploredDirectories);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Unable to locate structures folder.\");\n\t\t}\n\t}",
"public void iterateThruFolder(String path) {\n\n File root = new File(path);\n File[] list = root.listFiles();\n\n if (list==null) {\n \treturn;\n }\n\n for (File f : list) {\n \t\n if (f.isDirectory()) {\n iterateThruFolder(f.getAbsolutePath());\n \n if (!subdirectoriesList.contains(f.getPath())) {\n \tsubdirectoriesList.add(f.getPath());\n }\n \n }\n \n }\n \n }",
"private static List<File> process(File rootPath, String criteria, boolean recurse, boolean includeDirsInResult, boolean dirsOnly) throws FileNotFoundException {\r\n List<File> result = new ArrayList<File>();\r\n File[] filesAndDirs = rootPath.listFiles();\r\n List<File> filesDirs = Arrays.asList(filesAndDirs);\r\n log.debug(\"looking at path \" + rootPath + \" has \" + filesDirs.size() + \" files\");\r\n for (File file : filesDirs) {\r\n\r\n StringBuffer out = new StringBuffer();\r\n out.append(file.getName());\r\n\r\n Pattern pattern = Pattern.compile(criteria);\r\n\r\n Matcher matcher = pattern.matcher(file.getName());\r\n if (matcher.find()) {\r\n out.append(\" matches\");\r\n if ((!dirsOnly && file.isFile()) || (dirsOnly && file.isDirectory()) || (!file.isFile() && includeDirsInResult)) {\r\n out.append(\" will be added\");\r\n result.add(file);\r\n } else {\r\n out.append(\" will not be added\");\r\n }\r\n } else {\r\n out.append(\" does not match\");\r\n }\r\n\r\n if (!file.isFile() && recurse) {\r\n log.debug(\"decending into \" + file.getName());\r\n List<File> deeperList = process(file, criteria, recurse, includeDirsInResult, dirsOnly);\r\n result.addAll(deeperList);\r\n }\r\n\r\n log.debug(out.toString());\r\n }\r\n return result;\r\n }",
"@Override\r\n\tpublic String globFilesDirectories(String[] args) {\r\n\t\treturn globHelper(args);\r\n\t}",
"public void searchDirectory(String fileDir)\n {\n searchCriterial.setFileDirectory(fileDir);\n File[] list = searchCriterial.getFileDirectory().listFiles();\n\n if(list!=null)\n for (File dir : list) {\n\n if (dir.isDirectory()) {\n if (dir.getName().toLowerCase().toLowerCase().contains((searchCriterial.getFileName()).toLowerCase())) {\n Path filePath = dir.toPath();\n if (dir.isHidden() == searchCriterial.isHidden()) {\n if (dir.canWrite() != searchCriterial.isReadOnly()) {\n try {\n\n if (Files.getOwner(Paths.get(dir.getAbsolutePath())).getName().toLowerCase()\n .contains(searchCriterial.getOwnerName().toLowerCase())) {\n\n if (searchCriterial.getSizeOption() == \"\") {\n if (isWithinModifiedRange(dir) && isWithinCreatedRange(dir) && isWithinAccessedRange(dir))\n setFoundDirectoryObject(dir);\n } else {\n if (searchCriterial.getSizeOption() == \">\" && (Files.size(Paths.get(dir.getAbsolutePath()))) > searchCriterial.getSize()) {\n if (isWithinModifiedRange(dir) && isWithinCreatedRange(dir) && isWithinAccessedRange(dir))\n setFoundDirectoryObject(dir);\n } else {\n if (searchCriterial.getSizeOption() == \"<\" && (Files.size(Paths.get(dir.getAbsolutePath()))) < searchCriterial.getSize()) {\n if (isWithinModifiedRange(dir) && isWithinCreatedRange(dir) && isWithinAccessedRange(dir))\n setFoundDirectoryObject(dir);\n } else {\n\n if (searchCriterial.getSizeOption() == \"=\" && (Files.size(Paths.get(dir.getAbsolutePath()))) == searchCriterial.getSize()) {\n if (isWithinModifiedRange(dir) && isWithinCreatedRange(dir) && isWithinAccessedRange(dir))\n setFoundDirectoryObject(dir);\n\n }\n\n }\n }\n }\n\n }\n } catch (IOException e) {\n logger.log.severe( functions.getStackTrace(e));\n e.printStackTrace();\n }\n }\n }\n }\n }\n }\n\n }",
"protected void findFiles(Path path) throws IOException {\n File directory = new File(path.toString());\n File[] fList = directory.listFiles();\n for (File file : fList) {\n if (file.isDirectory()) {\n remapModelJson(Paths.get(file.getPath()));\n findFiles(Paths.get(file.getPath()));\n\n }\n }\n }",
"void setRecurse(String recurse) \r\n { \r\n \tmRecurse = igpp.util.Text.isTrue(recurse);\r\n }",
"protected void doRetrieveMatchingFiles(String fullPattern, File dir, Set<File> result) throws IOException {\n log.debug(\"Searching directory [{}] for files matching pattern [{}]\", dir.getAbsolutePath(), fullPattern);\n File[] dirContents = dir.listFiles();\n if (dirContents == null) {\n log.warn(\"Could not retrieve contents of directory [{}]\", dir.getAbsolutePath());\n return;\n }\n Arrays.sort(dirContents);\n for (File content : dirContents) {\n String currPath = StringUtils.replace(content.getAbsolutePath(), File.separator, \"/\");\n if (content.isDirectory() && getPathMatcher().matchStart(fullPattern, currPath + \"/\")) {\n if (!content.canRead()) {\n log.debug(\"Skipping subdirectory [{}] because \" +\n \"the application is not allowed to read the directory\", dir.getAbsolutePath());\n } else {\n doRetrieveMatchingFiles(fullPattern, content, result);\n }\n }\n if (getPathMatcher().match(fullPattern, currPath)) {\n result.add(content);\n }\n }\n }",
"private void ListDirRecursively(String path, int curr_depth, int maxdepth){\n if (curr_depth > maxdepth && maxdepth != -1)\n return;\n File folder = new File(path);\n File[] dir_files = folder.listFiles();\n int pom_found = -1;\n for (File file : dir_files){\n if (file.isDirectory())\n ListDirRecursively(file.getPath(), curr_depth + 1, maxdepth);\n else\n if (file.getName().matches(\"pom([-]\\\\w+)?.xml\")) {\n if (file.getName().equalsIgnoreCase(\"pom.xml\")){\n if (pom_found == 1) {\n pom_found = 0;\n continue;\n } else\n pom_found = 0;\n }\n else if (file.getName().equalsIgnoreCase(\"pom-main.xml\")){\n if (pom_found == 0){\n pom_paths.remove(pom_paths.size() - 1);\n }\n pom_found = 1;\n }\n else{\n continue;\n }\n pom_paths.add(file.getAbsolutePath());\n }\n }\n }",
"protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException {\n File rootDir;\n try {\n rootDir = rootDirResource.getFile().getAbsoluteFile();\n } catch (IOException ex) {\n log.warn(\"Cannot search for matching files underneath {} \" +\n \"because it does not correspond to a directory in the file system\", rootDirResource, ex);\n return Collections.emptySet();\n }\n return doFindMatchingFileSystemResources(rootDir, subPattern);\n }",
"private void recurseOverFolder(final File folder) {\n File[] files = folder.listFiles();\n if (files == null) {\n return;\n }\n\n // Check each path and recurse if it's a folder, handle if it's a file\n for (final File fileEntry : files) {\n if (fileEntry.isDirectory()) {\n recurseOverFolder(fileEntry);\n } else {\n handleFile(fileEntry);\n }\n }\n }",
"private void gatherDirectoryFiles(String dirFullPath, DependencyOrigin origin) {\n File dir = new File(dirFullPath);\n \n /*\n if (!dir.exists()) {\n try {\n String failsafe = Class.forName(fileClasses.get(0).className).getProtectionDomain().getCodeSource().getLocation().toString();\n dir = new File(failsafe);\n } catch (ClassNotFoundException x) { }\n }\n */\n if (dir.isDirectory()) {\n for (String fileName : dir.list()) {\n try {\n if (fileName.endsWith(\".java\")) {\n //addPath(dirPath + '/' + fileName, origin);\n addPath((new File(dir, fileName)).getCanonicalPath(), origin);\n } /* else if (origin != DependencyOrigin.CURRENTDIRECTORY && // AK 12/18/10 8:00 don't recurse directories\n !fileName.contains(\".\")) { // support for recursively calling subdirectories\n try {\n fileName = fileName.replaceAll(\"\\\\s\", \"\\\\ \"); // escape all spaces so we don't make a bunch of new directories\n File subDir = new File(dir, fileName);\n if (subDir.isDirectory()) {\n gatherDirectoryFiles(subDir.getCanonicalPath(), origin);\n }\n } catch (NullPointerException e) {\n }\n } */\n } catch (IOException i) { }\n }\n }\n }",
"public void addDirectories( File base ) {\n if( base.isDirectory() ) {\n repository.add( base );\n File[] files = base.listFiles();\n\n for( int i = 0; i < files.length; i++ ) {\n addDirectories( files[i] );\n }\n }\n }",
"void setComplete(String dirname, boolean recursive);",
"public void recursiveTravel(Consumer<IFile> function) { for(IFile i : dir) i.recursiveTravel(function); }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stime.getInstance(); ftime.getInstance(); long milsecs1= stime.getTimeInMillis(); long milsecs2 = ftime.getTimeInMillis(); long duration = (milsecs2milsecs1)/(60 1000); | public long calculateDuration(Calendar stime, Calendar ftime) {
this.starttime.set(Calendar.SECOND, 0);
this.starttime.set(Calendar.MILLISECOND, 0);
this.finishingtime.set(Calendar.SECOND, 0);
this.finishingtime.set(Calendar.MILLISECOND, 0);
//IKKE SLETT SYSOUT-ENE NEDENFOR
// System.out.print("stime = " + stime.get(Calendar.HOUR_OF_DAY) + ":" + stime.get(Calendar.MINUTE) + " " + stime.get(Calendar.DATE)
// + "/" + stime.get(Calendar.MONTH) + "-" + stime.get(Calendar.YEAR));
// System.out.print(" .. ftime = " + ftime.get(Calendar.HOUR_OF_DAY) + ":" + ftime.get(Calendar.MINUTE) + " " + ftime.get(Calendar.DATE)
// + "/" + ftime.get(Calendar.MONTH) + "-" + ftime.get(Calendar.YEAR));
long dur = (ftime.getTimeInMillis()-stime.getTimeInMillis())/60000;
// System.out.println(" .. Duration: " + dur);
return dur; //i minutt
} | [
"private void calculate(){\n this.endTime = System.nanoTime();\n this.milliseconds = (endTime - startTime) / 1000000;\n }",
"private long getTimeDifference(Time timeValue1, Time timeValue2){\n return (timeValue2.getTime()-timeValue1.getTime())/1000;\n }",
"long getDurationUs();",
"private long getDuration() { return System.nanoTime() - start; }",
"public long getDurationInSec(){\n\t\tlong end = System.currentTimeMillis();\n\t\treturn (end-start)/1000;\n\t}",
"long getDurationUsec();",
"long getTimeInMilliSeconds();",
"public float getTimeSeconds() { return getTime()/1000f; }",
"public long getDurationInMS(){\n\t\tlong end = System.currentTimeMillis();\n\t\treturn (end-start);\n\t}",
"long getElapsedMillis();",
"int getMilliSeconds();",
"protected int calcTime() {\n\t\tint resultTime;\n\t\tint pace = this.getPace();\n\t\tint distance = this.getDistance();\n\t\tresultTime = (int) (pace * distance / 1000);\n\t\treturn resultTime;\n\t}",
"public abstract long toSeconds(long duration);",
"int getTtiSeconds();",
"private long getDistanceFromSecondMark(){\n long numSecsElapsed = (long)Math.floor(timeElapsed / WorkoutStatic.ONE_SECOND);\n return timeElapsed - numSecsElapsed * WorkoutStatic.ONE_SECOND;\n }",
"int getTotalDuration();",
"public long getMillisPerUnit();",
"private static double timeInSec(long endTime, long startTime) {\n\t\tlong duration = (endTime - startTime);\n\t\tif (duration > 0) {\n\t\t\tdouble dm = (duration/1000000.0); //Milliseconds\n\t\t\tdouble d = dm/1000.0; //seconds\n\t\t\treturn d ;\n\t\t}\n\t\treturn 0.0 ;\n\t}",
"Timer getEventProcessedDuration();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pseudo code / given your currentSpeed , SpeedLimit check whether the current speed is more than 70 and less than 80 > point taken more than 60 and less than 70 > warning if not speeding keep driving | public static void main(String[] args) {
int currentLimit = 45 ; // try 45 , 65 ,90
if (currentLimit >70 ) {
System.out.println(" you are speeding more than 70 --POINT TAKEN !! ");
} else if (currentLimit > 60 ) {
//System.out.println("your speed is less thank 70 but more than 60 ");
System.out.println("your are speeding more than 60 and less than 70 -- WARNING TAKEN");
} else {
System.out.println("KEEP DRIVING");
}
} | [
"private boolean isSpeedNearWarning(double speed) {\n Log.d(\"Spped\", \"Current speed is \" + String.valueOf(vehicleSpeed));\n if(speed>=speedLimit-5){\n return true;\n }\n return false;\n }",
"public boolean isOverSpeed(){ return vehicleAvarageSpeed > roadMaxSpeed; }",
"private double limitSliderMovement(double speed) {\n //TODO: this is disabled due to faulty hardware on robot\n // double output = speed;\n\n // // Check left limit\n // if (output > 0 && isLeft) {\n // output = 0.0;\n // }\n\n // // Check right limit\n // if (output < 0 && isRight) {\n // output = 0.0;\n // }\n\n // return output;\n return speed;\n }",
"public static boolean isSpeedBelowLimit() {\n\t\treturn ( instance.speedLimit != 0 && instance.speedLimit >= instance.currentSpeed );\n\t}",
"double getSpeedLimit();",
"public void setSpeedLimit(double speedLimit) {\n\t\tif(speedLimit < 0) {\n\t\t\tthis.speedLimit = 0;\n\t\t}\n\t\telse if(speedLimit > speedOfLight) {\n\t\t\tthis.speedLimit = speedOfLight;\n\t\t}\n\t\telse if((speedLimit >= 0) && (speedLimit <= speedOfLight)) {\n\t\t\tthis.speedLimit = speedLimit;\n\t\t}\n\t\t\t\t\t\n\t}",
"private double restrict_speed(double speed, double max_speed){\r\n\t\tif(speed > max_speed){\r\n\t\t\tspeed = max_speed;\r\n\t\t}\r\n\t\tif(speed < Configuration.min_speed){\r\n\t\t\tspeed = Configuration.min_speed;\r\n\t\t}\r\n\t\treturn speed;\r\n\t}",
"public boolean atSpeed() {\n return getShooterSpeed() > speed;//3300;\n }",
"public void setCurrentSpeed(double currentSpeed2){\n if((currentSpeed2<maxSpeed2)&&(currentSpeed2>0)){\n this.currentSpeed2=currentSpeed2;\n }\n if(currentSpeed2<0){\n this.currentSpeed2=0;\n }\n if(currentSpeed2>maxSpeed2){\n this.currentSpeed2=maxSpeed2;\n }\n }",
"@Test\n\tpublic void getSpeedLimit() {\n\t\tassertEquals(300000, movingShip1.getSpeedLimit(), Util.EPSILON);\n\t}",
"public boolean isValidSpeed(long speed) {\n return speed >= 0;\n }",
"public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }",
"public boolean isTargetSpeed(){\n return Math.abs(speed - targetRpm) < 90;\n }",
"@Test\n\tpublic void setSpeedLimitLegalCase() {\n\t\tmovingShip1.setSpeedLimit(100000);\n\t\tassertEquals(100000, movingShip1.getSpeedLimit(), Util.EPSILON);\n\t}",
"@Test \n\tpublic void setTooHighSpeedLimit() {\n\t\tmovingShip1.setSpeedLimit(2000000);\n\t\tassertEquals(300000, movingShip1.getSpeedLimit(), Util.EPSILON);\n\t}",
"public int caughtSpeeding(int speed, boolean isBirthday) {\r\n\r\n int noTicket = 0;\r\n int smallTicket = 1;\r\n int bigTicket = 2;\r\n \r\n int lowSpeed;\r\n int midSpeed;\r\n int higherSpeed;\r\n int highSpeed;\r\n \r\n if(!isBirthday)\r\n {\r\n lowSpeed = 60;\r\n midSpeed = 61;\r\n higherSpeed = 80;\r\n highSpeed = 81;\r\n }\r\n else \r\n {\r\n lowSpeed = 65;\r\n midSpeed = 66;\r\n higherSpeed = 85;\r\n highSpeed = 86;\r\n }\r\n \r\n if((speed >= midSpeed && speed <= higherSpeed))\r\n return smallTicket;\r\n \r\n else if( speed >= highSpeed)\r\n return bigTicket;\r\n \r\n else return noTicket;\r\n \r\n}",
"private void checkLimits() {\r\n /*\r\n * since the shooter spins forward with negative speeds, 0 is the largest\r\n * possible speed without spinning backwards. this check makes sure the\r\n * wheel can only be stopped or rotating forwards\r\n */\r\n setValue = Math.min(setValue, minValue);\r\n \r\n /*\r\n * since -1 is the highest forward speed for the wheel, any more negative\r\n * values cannot be used. this check makes sure -1 is the largest possible setting\r\n */\r\n setValue = Math.max(setValue, maxValue);\r\n }",
"public int getSpeedLimit()\r\n\t{\r\n\t\treturn speedLimit;\r\n\t}",
"public void setSpeedLimit(int speedLim) {\n \tthis.currentSpeedLimit = trkMdl.getBlock(this.lineColor,this.currentBlock).getSpeedLimit();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the current filter values for the given data set column. | protected void filterUpdate(String columnId, int row) {
filterUpdate(columnId, row, null);
} | [
"private void updateFilteredData() {\n\t\t\t\tfilteredData.clear();\n\t\t\t\t\n\t\t\t\tfor (Data p: data) {\n\t\t\t\t\tif (matchesFilter(p)) {\n\t\t\t\t\t\tfilteredData.add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treapplyTableSortOrder();\n\t\t\t}",
"public void updateFilter() { }",
"private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n if (matchesFilter(p)) {\n \tmainApp.getFilteredData().add(p);\n }\n }\n }",
"public abstract void updateFilter();",
"public void refreshDataFilter();",
"private void updateFilteredData() {\n filteredData.clear();\n\n for (MediaType m : masterData) {\n if (matchesFilter(m)) {\n filteredData.add(m);\n }\n }\n //Must re-sort table after items changed\n reapplyTableSortOrder();\n }",
"public void update(String path, Expression filterExpression,\n Map<String, String> updatedColumnToValueMapping)\n throws IOException, InterruptedException, InvalidLoadOptionException {\n List<String> indexFiles = getCarbonIndexFile(path);\n Schema schema = CarbonSchemaReader.readSchema(indexFiles.get(0)).asOriginOrder();\n Field[] fields = schema.getFields();\n String[] projectionColumns = new String[fields.length + 1];\n for (int i = 0; i < fields.length; i++) {\n projectionColumns[i] = (fields[i].getFieldName());\n }\n projectionColumns[projectionColumns.length - 1] =\n CarbonCommonConstants.CARBON_IMPLICIT_COLUMN_TUPLEID;\n CarbonWriter writer =\n CarbonWriter.builder().outputPath(path)\n .withHadoopConf(configuration)\n .withCsvInput(schema)\n .writtenBy(\"CarbonIUD\")\n .build();\n CarbonReader reader =\n CarbonReader.builder(path).projection(projectionColumns)\n .withHadoopConf(configuration)\n .filter(filterExpression).build();\n RecordWriter<NullWritable, ObjectArrayWritable> deleteDeltaWriter =\n CarbonTableOutputFormat.getDeleteDeltaRecordWriter(path);\n ObjectArrayWritable writable = new ObjectArrayWritable();\n while (reader.hasNext()) {\n Object[] row = (Object[]) reader.readNextRow();\n writable.set(Arrays.copyOfRange(row, row.length - 1, row.length));\n for (Map.Entry<String, String> column : updatedColumnToValueMapping.entrySet()) {\n row[getColumnIndex(fields, column.getKey())] = column.getValue();\n }\n writer.write(Arrays.copyOfRange(row, 0, row.length - 1));\n deleteDeltaWriter.write(NullWritable.get(), writable);\n }\n deleteDeltaWriter.close(null);\n writer.close();\n reader.close();\n }",
"public void updateColumn() {\n int j = 0;\n for (Cell c : this.uiController.getActiveSpreadsheet().\n getColumn(this.index)) {\n if (!c.getValue().toString().equalsIgnoreCase(\"\")) {\n c.clear();\n try {\n c.setContent(valueList.get(j).toString());\n } catch (FormulaCompilationException ex) {\n Logger.getLogger(SortController.class.getName()).\n log(Level.SEVERE, null, ex);\n }\n j++;\n }\n }\n valueList.clear();\n }",
"public void setColumn(String column, int i)\n {\n String canonicalized = canonicalizeAndCheck(column);\n Integer value = Integer.valueOf(i);\n if (!value.equals(data.get(canonicalized)))\n {\n data.put(canonicalized, value);\n changed.put(canonicalized, Boolean.TRUE);\n }\n }",
"void onFilterChangedEvent(@Observes FilterChangedEvent filterChangedEvent) {\n checkNotNull(\"filterChangedEvent\", filterChangedEvent);\n if (filterChangedEvent.getContext().equals(dataSetFilterEditor)) {\n final DataSetFilter old = filterChangedEvent.getOldFilter();\n final DataSetFilter f = filterChangedEvent.getFilter();\n updateColumnsRestrictedByFilter(old, f);\n }\n }",
"public void setValue(FilterProperty property, Object value, Callback callback);",
"public <T> int update(Predicate<ColumnContext> predicate, DataSourceColumn<T> column, T value) {\n try {\n return internalHandler.update(predicate, column, value);\n } catch (SQLException e) {\n logSqlException(e);\n return 0;\n }\n }",
"public void setColumn(String column, boolean b)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n data.put(canonicalize(column), b ? Boolean.TRUE : Boolean.FALSE);\n }",
"public void setDataFilter(long value) {\n this.dataFilter = value;\n }",
"public void addStats(String column, boolean queryHit, boolean filterHit) {\n if (this.columnStats.containsKey(column)) {\n this.columnStats.get(column).queryHit |= queryHit;\n this.columnStats.get(column).filterHit |= filterHit;\n } else {\n this.columnStats.put(column, new ColumnStatsDelta(queryHit, filterHit));\n }\n }",
"public void setColumn(String column, double d)\n {\n String canonicalized = canonicalizeAndCheck(column);\n Double value = new Double(d);\n if (!value.equals(data.get(canonicalized)))\n {\n data.put(canonicalized, value);\n changed.put(canonicalized, Boolean.TRUE);\n }\n }",
"public void setValue(String column, String value)\n\t\t\tthrows ReadWriteException\n\t{\n\t\tsetValue(column, value, \"=\", \"\", \"\", \"AND\") ;\n\t}",
"public void updateFilteredData() {\n filtered_list.clear();\n \n for (Item item : items_list) {\n if (FilterManager.getInstance().matchesFilter(item, filter_text)) {\n \tfiltered_list.add(item);\n }\n }\n }",
"public void updateFilter() \n { \n /* [GNPP] you may comment out if not debugging. */\n //gnpp.updateFilter();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate the given value in its internal representation w.r.t. a concrete argument type implementation and in the context of the given model processing configuration | public abstract void validateValueInInternalRepresentation(final ProcessingConfiguration processingConfiguration, final String value); | [
"public abstract Value validateValue(Value value);",
"public abstract void validate(String value) throws DatatypeException;",
"@Test\n public void testValidateValue()\n {\n FacesContext context = mock(FacesContext.class);\n UIComponent component = mock(UIComponent.class);\n \n when(m_AttributeModel.getType()).thenReturn(AttributeDefinition.INTEGER);\n m_SUT = new ConfigPropModelImpl(m_AttributeModel);\n \n try\n {\n m_SUT.validateValue(context, component, \"not int\");\n fail(\"Validation exception should be thrown.\");\n }\n catch (ValidatorException exception)\n {\n //ExpectedException\n assertThat(exception.getFacesMessage().getSummary(), is(\"Value Invalid Type!\"));\n }\n \n try\n {\n m_SUT.validateValue(context, component, \"34\");\n }\n catch (ValidatorException exception)\n {\n fail(\"Validation should have passed and therefore no exception should be thrown.\");\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public Object validate() {\n if (dataType.getValueType() != null) {\n value = DataEntity.validateDatatype(dataType.getValueType(), value, null, customDef, null);\n Schema schemaCls = new Schema(propertyName, dataType.getDefs());\n for (Constraint constraint : schemaCls.getConstraints()) {\n constraint.validate(value);\n }\n }\n // If the datatype has 'properties' definition\n else {\n if (!(value instanceof LinkedHashMap)) {\n //ERROR under investigation\n String checkedVal = value != null ? value.toString() : null;\n\n ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue(\"JE001\", String.format(\n \"TypeMismatchError: \\\"%s\\\" is not a map. The type is \\\"%s\\\"\",\n checkedVal, dataType.getType())));\n\n if (value instanceof List && ((List) value).size() > 0) {\n value = ((List) value).get(0);\n }\n\n if (!(value instanceof LinkedHashMap)) {\n return value;\n }\n }\n\n\n LinkedHashMap<String, Object> valueDict = (LinkedHashMap<String, Object>) value;\n ArrayList<String> allowedProps = new ArrayList<>();\n ArrayList<String> requiredProps = new ArrayList<>();\n LinkedHashMap<String, Object> defaultProps = new LinkedHashMap<>();\n if (schema != null) {\n allowedProps.addAll(schema.keySet());\n for (String name : schema.keySet()) {\n PropertyDef propDef = schema.get(name);\n if (propDef.isRequired()) {\n requiredProps.add(name);\n }\n if (propDef.getDefault() != null) {\n defaultProps.put(name, propDef.getDefault());\n }\n }\n }\n\n // check allowed field\n for (String valueKey : valueDict.keySet()) {\n //1710 devlop JSON validation\n if (!(\"json\").equals(dataType.getType()) && !allowedProps.contains(valueKey)) {\n ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue(\"JE100\", String.format(\n \"UnknownFieldError: Data value of type \\\"%s\\\" contains unknown field \\\"%s\\\"\",\n dataType.getType(), valueKey)));\n }\n }\n\n // check default field\n for (String defKey : defaultProps.keySet()) {\n Object defValue = defaultProps.get(defKey);\n if (valueDict.get(defKey) == null) {\n valueDict.put(defKey, defValue);\n }\n\n }\n\n // check missing field\n ArrayList<String> missingProp = new ArrayList<>();\n for (String reqKey : requiredProps) {\n if (!valueDict.keySet().contains(reqKey)) {\n missingProp.add(reqKey);\n }\n }\n if (missingProp.size() > 0) {\n ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue(\"JE003\", String.format(\n \"MissingRequiredFieldError: Data value of type \\\"%s\\\" is missing required field(s) \\\"%s\\\"\",\n dataType.getType(), missingProp.toString())));\n }\n\n // check every field\n for (String vname : valueDict.keySet()) {\n Object vvalue = valueDict.get(vname);\n LinkedHashMap<String, Object> schemaName = _findSchema(vname);\n if (schemaName == null) {\n continue;\n }\n Schema propSchema = new Schema(vname, schemaName);\n // check if field value meets type defined\n DataEntity.validateDatatype(propSchema.getType(),\n vvalue,\n propSchema.getEntrySchema(),\n customDef,\n null);\n\n // check if field value meets constraints defined\n if (propSchema.getConstraints() != null) {\n for (Constraint constraint : propSchema.getConstraints()) {\n if (vvalue instanceof ArrayList) {\n for (Object val : (ArrayList<Object>) vvalue) {\n constraint.validate(val);\n }\n } else {\n constraint.validate(vvalue);\n }\n }\n }\n }\n }\n return value;\n }",
"TypeDescription validated();",
"void validate(Object fieldValue, CustomField fieldDefinition);",
"public void validateValueInUserRepresentation(final ProcessingConfiguration processingConfiguration, final String value) {\n this.validateValueInInternalRepresentation(processingConfiguration, value);\n }",
"public boolean isValidValue(Object value) {\n\t\treturn typeParameter.isValidValue(this, value);\n\t}",
"public interface ValueProcessor {\n public void process(Object original, String type, String value);\n }",
"protected boolean validateValueForReading(ObjectProvider op, Object value)\n {\n validateValueType(op.getExecutionContext().getClassLoaderResolver(), value);\n\n if (!valuesAreEmbedded && !valuesAreSerialised)\n {\n ExecutionContext ec = op.getExecutionContext();\n if (value != null && (!ec.getApiAdapter().isPersistent(value) ||\n ec != ec.getApiAdapter().getExecutionContext(value)) && !ec.getApiAdapter().isDetached(value))\n {\n return false;\n }\n }\n\n return true;\n }",
"protected void validateValueForWriting(ObjectProvider ownerOP, Object value)\n {\n // TODO Pass in cascade flag and if value not present then throw exception\n ExecutionContext ec = ownerOP.getExecutionContext();\n validateValueType(ec.getClassLoaderResolver(), value);\n if (!valuesAreEmbedded && !valuesAreSerialised)\n {\n SCOUtils.validateObjectForWriting(ec, value, null);\n }\n }",
"static Object checkValue(OptionType optType, Object value) throws ImperioException {\n if (value != null) {\n switch (optType) {\n case ARG:\n if (!(value instanceof String)) {\n wrongValueType(value.getClass(), String.class);\n }\n break;\n case FILE:\n if (!(value instanceof File)) {\n wrongValueType(value.getClass(), File.class);\n }\n break;\n case FLAG:\n if (!(value instanceof Boolean)) {\n wrongValueType(value.getClass(), Boolean.class);\n }\n break;\n case DECREMENTER:\n case INCREMENTER:\n if (!(value instanceof Integer) && !(value instanceof Long)) {\n wrongValueType(value.getClass(), Integer.class);\n }\n break;\n case CUSTOM_ARG:\n case CUSTOM_FLAG:\n default:\n break;\n }\n }\n return value;\n }",
"protected void validateValue(AdditionalCodeDescType[] param){\n \n if ((param != null) && (param.length < 1)){\n throw new java.lang.RuntimeException();\n }\n \n }",
"public interface BuiltinTypeValidator {\n // -------------------------------------------------------------------------\n // CONSTANTS\n // -------------------------------------------------------------------------\n\n /** validation error string for Bit String failures */\n String BIT_STRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the BIT STRING format. The first byte must be within the range 0x00 - 0x07. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for GeneralizedTime failures */\n String GENERALIZEDTIME_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the GeneralizedTime format. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for Bit String failures */\n String EMPTY_BYTE_ARRAY_VALIDATION_ERROR =\n \"ASN.1 %s type must contain at least one byte. Supplied array contains 0 bytes\";\n\n /** validation error string for IA5String failures */\n String IA5STRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the IA5String format. All bytes must be within the range 0x00 - 0x7f. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for Null failures */\n String NULL_VALIDATION_ERROR = \"Null type must be zero length.\";\n\n /** validation error string for NumericString failures */\n String NUMERICSTRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the NumericString format. All bytes must be within the range '0' - '9' (0x30 - 0x39). Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for Oid failures */\n String OID_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the OID format. The first byte must be with the range 0x00 - 0x7F. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for incomplete Oid */\n String OID_VALIDATION_ERROR_INCOMPLETE =\n \"Supplied bytes do not conform to the OID format. The OID encoding is incomplete: \";\n\n /** validation error string for PrintableString failures */\n String PRINTABLESTRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the PrintableString format. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for UTCTime failures */\n String UTCTIME_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the UTCTime format. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for VisibleString failures */\n String VISIBLESTRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the VisibleString format. All bytes must be within the range 0x20 - 0x7e. Supplied bytes contain invalid values: \";\n\n // -------------------------------------------------------------------------\n // CLASS VARIABLES\n // -------------------------------------------------------------------------\n\n /** null instance */\n BuiltinTypeValidator.Null NULL = new BuiltinTypeValidator.Null();\n\n // -------------------------------------------------------------------------\n // PUBLIC METHODS\n // -------------------------------------------------------------------------\n\n /**\n * Validates the supplied tag in the data based on the the kind of ASN.1 Built-in Type\n * represented by this validator\n *\n * @param tag tag to validate\n * @param asnData data to retrieve tag from\n * @return any failures encountered while validating the tag\n */\n ImmutableSet<DecodedTagValidationFailure> validate(String tag, AsantiAsnData asnData);\n\n /**\n * Validates the supplied bytes based on the the kind of ASN.1 Built-in Type represented by this\n * validator\n *\n * @param bytes bytes to validate\n * @return any failures encountered while validating the bytes\n */\n ImmutableSet<ByteValidationFailure> validate(byte[] bytes);\n\n // -------------------------------------------------------------------------\n // INTERNAL CLASS: Null\n // -------------------------------------------------------------------------\n\n /**\n * Null instance of {@link BuiltinTypeDecoder}.\n *\n * <p>The {@code validate} methods will return an empty set.\n *\n * @author brightSPARK Labs\n */\n class Null implements BuiltinTypeValidator {\n // ---------------------------------------------------------------------\n // CONSTRUCTION\n // ---------------------------------------------------------------------\n\n /**\n * Default constructor. This is private, use {@link BuiltinTypeValidator#NULL} to obtain an\n * instance\n */\n private Null() {}\n\n // ---------------------------------------------------------------------\n // IMPLEMENTATION: BuiltinTypeValidator\n // ---------------------------------------------------------------------\n\n @Override\n public ImmutableSet<DecodedTagValidationFailure> validate(\n final String tag, final AsantiAsnData asnData) {\n return ImmutableSet.of();\n }\n\n @Override\n public ImmutableSet<ByteValidationFailure> validate(final byte[] bytes) {\n return ImmutableSet.of();\n }\n }\n}",
"public void validate( Object object, Object value )\n //throws MetaException\n {\n String mask = (String) getAttribute( ATTR_MASK );\n String msg = getMessage( \"Invalid value format\" );\n\n String val = (value==null)?null:value.toString();\n\n if ( !GenericValidator.isBlankOrNull( val )\n && !GenericValidator.matchRegexp( val, mask )) {\n throw new InvalidValueException( msg );\n }\n }",
"@Test\n\tpublic void testIsValue() {\n\t\tassertTrue(Preconditions.isValue(\"value\"));\n\t\tassertFalse(Preconditions.isValue(null));\n\t\tassertFalse(Preconditions.isValue(\"\"));\n\t}",
"protected void validateValue(T value) throws StrolchException {\n\t\tif (value == null) {\n\t\t\tString msg = \"Can not set null value on Parameter {0}\";\n\t\t\tmsg = MessageFormat.format(msg, getLocator());\n\t\t\tthrow new StrolchException(msg);\n\t\t}\n\t}",
"protected void validateConverterConfiguration(ConverterConfiguration[] param){\n \n }",
"protected interface Validation {\n\t\t\t/**\n\t\t\t * Validate configurable field values\n\t\t\t *\n\t\t\t * @throws Exception\n\t\t\t */\n\t\t\tvoid validateFields() throws Exception;\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A helper method which attempts to ban one champion for red team, but errors if they are already banned TODO: Overlay the champion's icon in grey | private int banBlueChampion(String cN) {
if (bannedChamps.contains(cN)) {
return -1;
}
if (!cN.equals("noban")) {
URL url = getClass().getResource(".coredata/championicons/32px/" + cN + "Square.png");
ImageIcon champIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));
JLabel champLabel = new JLabel();
JLabel champName = new JLabel(cN);
champName.setBackground(Color.BLACK);
champName.setForeground(Color.WHITE);
champLabel.setIcon(champIcon);
bottomPanel.add(champLabel, new Integer(3));
int i = blueBans.size();
champLabel.setBounds(29, 32 + 36*i, 32, 32);
bottomPanel.add(champName, new Integer(3));
champName.setBounds(64, 24 + 36*i, 150, 50);
blueBans.add(cN);
bannedChamps.add(cN);
}
numBlueBans += 1;
return 0;
} | [
"private int banPurpleChampion(String cN) {\n\t\tif (bannedChamps.contains(cN)) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (!cN.equals(\"noban\")) {\n\t\t\tURL url = getClass().getResource(\".coredata/championicons/32px/\" + cN + \"Square.png\");\n\t\t\tImageIcon champIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\t\tJLabel champLabel = new JLabel();\n\t\t\tchampLabel.setIcon(champIcon);\n\t\t\tbottomPanel.add(champLabel, new Integer(3));\n\t\t\tint i = purpleBans.size();\n\t\t\tchampLabel.setBounds(1200, 32 + 36*i, 32, 32);\n\t\t\tJLabel champName = new JLabel(cN, SwingConstants.RIGHT);\n\t\t\tchampName.setBackground(Color.BLACK);\n\t\t\tchampName.setForeground(Color.WHITE);\n\t\t\tbottomPanel.add(champName, new Integer(3));\n\t\t\tchampName.setBounds(1045, 24 + 36*i, 150, 50);\n\t\t\tpurpleBans.add(cN);\n\t\t\tbannedChamps.add(cN);\n\t\t}\n\t\tnumPurpleBans += 1;\n\t\treturn 0;\n\t}",
"private int pickBlueChampion(String cN) {\n\t\tif (bannedChamps.contains(cN) || bluePicks.contains(cN) || purplePicks.contains(cN)) {\n\t\t\treturn -1;\n\t\t}\n\t\tURL url = getClass().getResource(\".coredata/championicons/\" + cN + \"Square.png\");\n\t\tImageIcon champIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\tJLabel champLabel = new JLabel();\n\t\tchampLabel.setIcon(champIcon);\n\t\tleftPanel.add(champLabel, new Integer(2));\n\t\tint i = numBluePicks;\n\t\tchampLabel.setBounds(91, 22 + 99*i, 64, 64);\n\t\tbluePicks.add(cN);\n\t\tnumBluePicks += 1;\n\t\treturn 0;\n\t}",
"public boolean isBanned(Player player);",
"private void PlayerBan(Player player, String args[])\n {\n // Target player and message\n String targetName = \"\";\n String banReason = \"\";\n \n // Add the default message\n if(args.length == 1)\n {\n targetName = args[0];\n banReason = \"No defined ban reason\";\n }\n else if(args.length > 1)\n {\n targetName = args[0];\n for(int i = 1; i < args.length; i++)\n {\n banReason += args[i];\n if(i != args.length - 1)\n banReason += \" \";\n }\n }\n \n // Find the player\n Player banPlayer = plugin.getServer().getPlayer(targetName);\n \n // Check permissions (Only works if both players are online)\n if(player != null && banPlayer != null)\n {\n int sourceGID = plugin.users.GetGroupID(player.getName());\n int targetGID = plugin.users.GetGroupID(banPlayer.getName());\n if(targetGID >= sourceGID)\n {\n // Cannot ban GIDs higher or equal\n player.sendMessage(ChatColor.GRAY + \"Cannot ban users with an equal or higher group ID (theirs: \" + targetGID + \", yours: \" + sourceGID + \")\");\n return;\n }\n }\n \n // If found...\n if(banPlayer != null)\n {\n targetName = banPlayer.getName();\n plugin.BroadcastMessage(ChatColor.RED + \"User \\\"\" + targetName + \"\\\" banned and kicked by \\\"\" + (player == null ? \"Server Console\" : player.getName()) + \"\\\"\");\n banPlayer.kickPlayer(banReason);\n }\n // Else, player not found...\n else\n plugin.BroadcastMessage(ChatColor.RED + \"User \\\"\" + targetName + \"\\\" banned but not kicked (user not online) by \\\"\" + (player == null ? \"Server Console\" : player.getName()) + \"\\\"\");\n \n // Declare the reason\n plugin.BroadcastMessage(ChatColor.RED + \"Reason: \" + banReason);\n \n // Save the ban...\n plugin.users.SetBan(targetName, banReason);\n }",
"public abstract void banUser(String nickname, String reason);",
"private void bannedAlert() {\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Account blocked\");\n alert.setHeaderText(\"Account blocked\");\n alert.setContentText(\"Your account has been blocked due\"\n + \" to too many incorrect login attempts. To \"\n + \"unblock your account, please contact an \"\n + \"administrator.\");\n\n alert.showAndWait();\n return;\n }",
"private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }",
"public String getBanReason(Player player);",
"public void ban(Player player, String channelName) {\n \t\tif (isAdmin(player, channelName)) {\n \t\t\tList<Player> admins = new ArrayList<Player>();\n \t\t\t\n \t\t\tfor (Player admin : channelAdmins.get(channelName)) {\n \t\t\t\tadmins.add(admin);\n \t\t\t}\n \t\t\t\n \t\t\tadmins.remove(player);\n \t\t\t\n \t\t\tif (admins.isEmpty()) {\n \t\t\t\tchannelAdmins.remove(channelName);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tchannelAdmins.put(channelName, admins);\n \t\t\t}\n \t\t\t\n \t\t} else if (isMember(player, channelName)) {\n \t\t\tList<Player> members = new ArrayList<Player>();\n \t\t\t\n \t\t\tfor (Player member : channelMembers.get(channelName)) {\n \t\t\t\tmembers.add(member);\n \t\t\t}\n \t\t\t\n \t\t\tmembers.remove(player);\n \t\t\t\n \t\t\tif (members.isEmpty()) {\n \t\t\t\tchannelMembers.remove(channelName);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tchannelMembers.put(channelName, members);\n \t\t\t}\n \t\t}\n \t\t\n \t\tif (channelBans.isEmpty() || channelBans.get(channelName) == null) {\n \t\t\tList<Player> banned = new ArrayList<Player>();\n \t\t\tbanned.add(player);\n \t\t\tchannelBans.put(channelName, banned);\n \t\t\t\n \t\t} else {\n \t\t\tList<Player> banned = channelBans.get(channelName);\n \t\t\tbanned.add(player);\n \t\t\tchannelBans.put(channelName, banned);\n \t\t}\n \t\t\n \t\tchannelSwitch(player, getChannel(player), getDefaultChannel());\n \t\tsendWarning(player, \"You have been banned from \" + channelName);\n \t}",
"private boolean try2GetYellowPlayerFromHome(Player player)\n {\n try\n {\n YellowPlayer yellowPlayer = (YellowPlayer) player;\n if (YellowPlayer.getNumber_of_buttons_allowed() > 0)\n {\n ludo.getPlayerFromHome(player);\n //YellowPlayer.setNumber_of_buttons_allowed(YellowPlayer.decrementNumberOfAllowedPlayers());\n return true;\n }\n return false;\n }\n catch (Exception e)\n {\n return false;\n }\n }",
"private void handlePlayerBlackjack() {\n if (HandValuer.isPossibleBlackjack(dealer.get(0))) {\n deal(dealer);\n setGameOutcome();\n } else {\n setStatus(Status.PLAYER_WON);\n }\n }",
"private void BlueEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n BluePlayer player_to_eat = (BluePlayer) player;\n player_to_be_eaten = checkIfEatsRedPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsGreenPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsYellowPlayer(player_to_eat);\n }\n }\n //player_to_be_eaten.println(\"blue_player_to_be_eaten\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }",
"void ban(String user);",
"public void attemptPlayerBan(Player player) {\n if(!this.getActivePunishments(PunishmentType.BAN).isEmpty()) {\n player.kickPlayer(MessageConstants.PUNISHMENT_BAN_KICKED);\n }\n }",
"@Test\n public void isChessActionLegalForBlackPawn()\n {\n // Setup.\n final ChessEnvironment board = fenFormatter.parse(GameType.RAUMSCHACH.getStartPosition());\n final ChessAdjudicator adjudicator = new DefaultChessAdjudicator();\n final RaumschachPosition fromPosition = RaumschachPosition.a4D;\n assertThat((ChessToken)board.getTokenAt(fromPosition), is(DefaultChessToken.BLACK_PAWN));\n\n // Run / Verify.\n assertTrue(adjudicator.isActionLegalFor(board, ChessTeam.BLACK, fromPosition, RaumschachPosition.a3D));\n assertTrue(adjudicator.isActionLegalFor(board, ChessTeam.BLACK, fromPosition, RaumschachPosition.a4C));\n assertFalse(adjudicator.isActionLegalFor(board, ChessTeam.BLACK, fromPosition, RaumschachPosition.a2D));\n assertFalse(adjudicator.isActionLegalFor(board, ChessTeam.BLACK, fromPosition, RaumschachPosition.a4B));\n }",
"public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }",
"public void displayBanSuccess(boolean banned, String username){\n System.out.println(username + \" has been successfully \" + (banned?\"banned\":\"unbanned\"));\n }",
"public void checkForVictory() {\n\t\tif (!isWon) {\n\t\t\tfor (Ship s : ships) {\n\t\t\t\tif (s.hasWon(score_needed)) {\n\t\t\t\t\twinner = s;\n\t\t\t\t\tColor winnerColour = s.getColour();\n\t\t\t\t\tBufferGraphics.setColor(winnerColour);\n\t\t\t\t\tBufferGraphics.drawString(\"Winner\", 100, 180);\n\t\t\t\t\tisWon = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tColor winnerColour = winner.getColour();\n\t\t\tBufferGraphics.setColor(winnerColour);\n\t\t\tBufferGraphics.drawString(\"Winner\", 100, 180);\n\t\t\t// for(Ship s : ships){\n\t\t\t// if (s != winner){\n\t\t\t// s.setTarget(winner);\n\t\t\t// s.setWeapon(SceneObject.WeaponType.BULLET);\n\t\t\t// }\n\t\t\t// }\n\t\t}\n\t}",
"private Player checkIfEatsBluePlayer(Player player)\n {\n int x_cord = getMidPoint(player.x_cordinate);\n int y_cord = getMidPoint(player.y_cordinate);\n int blux1 = getMidPoint(ludo.getBluePlayer1().x_cordinate);\n int blux2 = getMidPoint(ludo.getBluePlayer2().x_cordinate);\n int blux3 = getMidPoint(ludo.getBluePlayer3().x_cordinate);\n int blux4 = getMidPoint(ludo.getBluePlayer4().x_cordinate);\n int bluy1 = getMidPoint(ludo.getBluePlayer1().y_cordinate);\n int bluy2 = getMidPoint(ludo.getBluePlayer2().y_cordinate);\n int bluy3 = getMidPoint(ludo.getBluePlayer3().y_cordinate);\n int bluy4 = getMidPoint(ludo.getBluePlayer4().y_cordinate);\n if (collisionDetection(x_cord, y_cord, blux1, bluy1) == 1)\n {\n return blue_player1;\n }\n else if (collisionDetection(x_cord, y_cord, blux2, bluy2) == 1)\n {\n return blue_player2;\n }\n else if (collisionDetection(x_cord, y_cord, blux3, bluy3) == 1)\n {\n return blue_player3;\n }\n else if (collisionDetection(x_cord, y_cord, blux4, bluy4) == 1)\n {\n return blue_player4;\n }\n else\n {\n return null;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will analyze the relevant classes of the refactoring using the current and parent commit It will check if the refactoring is a test refactoring and if there is only 1 class involved (for now only working with one) Than it will determine if we will analyze the class files or if we just note down the metadata based on the fact whether it is a Extract Method or nor | public void handleRefactoring(Refactoring refactoring, RevCommit commit){
Set<ImmutablePair<String, String>> classesAfter = refactoring.getInvolvedClassesAfterRefactoring();
Set<ImmutablePair<String, String>> classesBefore = refactoring.getInvolvedClassesBeforeRefactoring();
// Checking if whether we go through or skip the refactoring
if(checkIfTestRefactoring(classesAfter) && checkIfTestRefactoring(classesBefore)){
//fetch the parent commit for the before classes
RevCommit commitParent = commit.getParent(0);
//For now we are only working with refactorings involving one class at the time
ImmutablePair<String, String> classInfoAfter;
ImmutablePair<String, String> classInfoBefore;
// write classes to disk if we are dealing with an Extract Method
if(refactoring.getRefactoringType().getDisplayName() == "Extract Method"){
classInfoAfter = writeFilesToDisk(classesAfter, commit, "/after/");
classInfoBefore = writeFilesToDisk(classesBefore, commitParent, "/before/");
} else {
classInfoAfter = classesAfter.iterator().next();
classInfoBefore = classesBefore.iterator().next();
}
// Analyze the refactoring
metricAnalyzer.handleTestRefactoring(refactoring, commit, classInfoAfter);
metricAnalyzer.handleTestRefactoring(refactoring, commitParent, classInfoBefore);
// If refactoring type was in test and of type extract method
if(metricAnalyzer.currentExtractMethod != null)
Utils.makeDatabaseTransaction(sessionFactory, metricAnalyzer.currentExtractMethod);
// if refactoring was in test
else if(metricAnalyzer.currentRefactoringData != null)
Utils.makeDatabaseTransaction(sessionFactory, metricAnalyzer.currentRefactoringData);
}
} | [
"public void handleTestRefactoring(Refactoring refactoring, RevCommit currentCommit,\n ImmutablePair<String, String> classInfo){\n // Reset global vars\n currentExtractMethod = null;\n currentRefactoringData = null;\n currentClassCommitData = null;\n\n currentRefactoringData = new RefactoringData(classInfo.getLeft(), classInfo.getRight(),\n currentCommit.getName(), refactoring.toString(),\n refactoring.getRefactoringType().getDisplayName(), currentCommit.getFullMessage(),\n currentCommit.getAuthorIdent().getWhen(), project);\n\n // If the refactoring is an extract method we get the relevant data\n // Else we just save it as a 'default' refactoring\n if (Utils.checkRefactoringType(refactoring, \"Extract Method\")) {\n analyzerLogger.debug(String.format(\"Extract Method found on commit: %s\", currentCommit.getName()));\n currentExtractMethod = new ExtractMethod(currentRefactoringData);\n // cast refactoring as ExtractOperationRefactoring\n ExtractOperationRefactoring extractRefactoring = (ExtractOperationRefactoring) refactoring;\n\n // Analyze the extracted piece of code\n analyzeExtraction(extractRefactoring);\n\n // Analyze the metrics of the related class and the extracted piece of code\n analyzeMetrics(extractRefactoring.getSourceOperationAfterExtraction().getName(),\n extractRefactoring.getExtractedCodeFragmentsToExtractedOperation());\n\n // Analyze the lifetime of the related class\n analyzeLifetimeClass();\n }\n }",
"public void testClassInfoBuilderVisitor1091() throws Exception {\n\t\tJavaClassRepository var3610 = instantiateJavaClassRepository631();\n\t\tClassInfoBuilderVisitor var3603 = new ClassInfoBuilderVisitor(null);\n\t\tvar3610.getClass(DeeplyNestedIfStatements.class.getCanonicalName());\n\t\tvar3610.getClass(DeeplyNestedIfStatements.class.getCanonicalName());\n\t\tvar3603.guessSourceFileName(\"com.google.Foo$1\");\n\t\tvar3603.guessSourceFileName(\"com.google.Foo$1\");\n\t}",
"public ClassAnalyzerSummary analyzeClassesAndMapThemToTheInternalClassStructure() {\n // read all classes from directories or jars\n resolvedClasses\n .addAll(new ClassResolver(plantUMLConfig.getDestinationClassloader(),\n plantUMLConfig.getScanPackages(),\n plantUMLConfig.getBlacklistRegexp(),\n plantUMLConfig.getWhitelistRegexp())\n .getAllDiagramClasses());\n // sort all classes for a reliable sorted result\n resolvedClasses.sort(Comparator.comparing(Class::getName));\n // map java classes to UMLClass, UMLField, UMLMethod and UMLRelationship objects\n for (final Class<?> clazz : resolvedClasses) {\n mapToDomainClasses(clazz);\n }\n return new ClassAnalyzerSummary(classes, classesAndRelationships);\n }",
"private void processClasses()\n {\n foundClasses = new ArrayList<String>();\n\n //Create scanner through this file.\n Scanner s = createScanner(file);\n if (s == null)\n {\n return;\n }\n Pattern aClassLine = Pattern.compile(\"knowtator_mention_class\");\n\n while (s.hasNext())\n {\n setLineNum(getLineNum() + 1);\n String searchLine = s.nextLine();\n //Matchers for this line.\n\n Matcher findClassLine = aClassLine.matcher(searchLine);\n\n //If a human annotation is found eat up the information and attempt to create an Annotator object\n if (findClassLine.find())\n {\n String[] temp = searchLine.split(\" \");\n String possibleNewClass = temp[1].substring(0, temp[1].indexOf(\")\"));\n\n //Check for these two classes that are left over from an old version of knowtator\n if (possibleNewClass.equalsIgnoreCase(\"tests\"))\n {\n possibleNewClass = \"Test\";\n }\n else if (possibleNewClass.equalsIgnoreCase(\"treatments\"))\n {\n possibleNewClass = \"Treatment\";\n }\n boolean unique = true;\n //If it is unique then add it to the list.\n for (String aFoundClass : foundClasses)\n {\n if (aFoundClass.equals(possibleNewClass))\n {\n unique = false;\n }\n }\n if (unique)\n {\n getFoundClasses().add(possibleNewClass);\n }\n /*\n if (!foundClasses.contains(possibleNewClass));\n {\n getFoundClasses().add(possibleNewClass);\n }\n *\n */\n }\n }\n Collections.sort(getFoundClasses());\n //Reset line number, so it will be correct when we do another pass.\n setLineNum(0);\n\n }",
"public void preAnalyze(Context context) {\n // copied from JClassDeclaration \n // and commented it out\n\n // // Construct a class context\n // this.context = new ClassContext(this, context);\n\n // // Resolve superclass\n // superType = superType.resolve(this.context);\n\n // // Creating a partial class in memory can result in a\n // // java.lang.VerifyError if the semantics below are\n // // violated, so we can't defer these checks to analyze()\n // thisType.checkAccess(line, superType);\n // if (superType.isFinal()) {\n // JAST.compilationUnit.reportSemanticError(line,\n // \"Cannot extend a final type: %s\", superType.toString());\n // }\n\n // // Create the (partial) class\n // CLEmitter partial = new CLEmitter(false);\n\n // // Add the class header to the partial class\n // String qualifiedName = JAST.compilationUnit.packageName() == \"\" ? name\n // : JAST.compilationUnit.packageName() + \"/\" + name;\n // partial.addClass(mods, qualifiedName, superType.jvmName(), null, false);\n\n // // Pre-analyze the members and add them to the partial\n // // class\n // for (JMember member : classBlock) {\n // member.preAnalyze(this.context, partial);\n // if (member instanceof JConstructorDeclaration\n // && ((JConstructorDeclaration) member).params.size() == 0) {\n // hasExplicitConstructor = true;\n // }\n // }\n\n // // Add the implicit empty constructor?\n // if (!hasExplicitConstructor) {\n // codegenPartialImplicitConstructor(partial);\n // }\n\n // // Get the Class rep for the (partial) class and make it\n // // the\n // // representation for this type\n // Type id = this.context.lookupType(name);\n // if (id != null && !JAST.compilationUnit.errorHasOccurred()) {\n // id.setClassRep(partial.toClass());\n // }\n }",
"private Set<Class> detectRelevantClasses(Class root) throws ClassNotFoundException {\n \n LinkedList<Class> q = new LinkedList<Class>();\n Set<Class> done = new HashSet<Class>();\n \n Class act;\n Class add;\n Field[] fl;\n Set<Class<?>> extendeds;\n int i;\n \n //Hack for avoiding the processing of String and Object classes, which makes no sense.\n done.add(String.class);\n done.add(Object.class);\n \n if (!root.getName().contains(\"$\"))\n \tq.addLast(root);\n \n while (!q.isEmpty()) {\n act = q.removeLast();\n done.add(act);\n \n // Adds precedences as relevant classes.\n if (act.isAnnotationPresent(Priority.class)) {\n Priority an;\n an = (Priority) act.getAnnotation(Priority.class);\n for (int j = 0;j < an.precedes().length;j++) {\n if (IModel.class.isAssignableFrom(an.precedes()[j]))\n addClass(an.precedes()[j], q, done);\n }\n }\n \n // Adds enclosing class as relevant class.\n if (act.getEnclosingClass() != null)\n if (IModel.class.isAssignableFrom(act.getEnclosingClass()))\n addClass(act.getEnclosingClass(),q,done);\n \n //Field processing (Containers, vectors and bare fields).\n if (!hasPattern(act)) {\n fl = act.getDeclaredFields();\n for (i = 0;i < fl.length;i++) {\n CollectionType collection = null;\n boolean avoid = false;\n if (List.class.isAssignableFrom(fl[i].getType())) {\n if (ArrayList.class.equals(fl[i].getType()) || (List.class.equals(fl[i].getType())))\n collection = CollectionType.LIST;\n else\n log(Level.SEVERE, \"In field \\\"{0}\\\" of class \\\"{1}\\\": The class of a composite list may only be List or ArrayList.\", new Object[]{fl[i].getName(), act.getCanonicalName()});\n }\n else if (Set.class.isAssignableFrom(fl[i].getType())) {\n if (HashSet.class.equals(fl[i].getType()) || (Set.class.equals(fl[i].getType())))\n collection = CollectionType.SET;\n else\n log(Level.SEVERE, \"In field \\\"{0}\\\" of class \\\"{1}\\\": The class of a composite set may only be Set or HashSet.\", new Object[]{fl[i].getName(), act.getCanonicalName()});\n }\n else if (Map.class.isAssignableFrom(fl[i].getType())) {\n avoid = true;\n }\n else if (fl[i].getType().isArray()) {\n collection = CollectionType.LANGARRAY;\n }\n \n if (!avoid) {\n add = getComponentType(collection,fl[i]);\n if (add != null) {\n if (IModel.class.isAssignableFrom(act))\n addClass(add, q, done);\n }\n }\n }\n \n }\n \n // Adds subclasses as relevant classes.\n if (!act.isPrimitive()) {\n String packageName = \"\";\n if (act.getPackage() != null)\n packageName = act.getPackage().getName();\n Set<String> packages = new HashSet<String>();\n packages.add(\"org.modelcc.types\");\n packages.add(packageName);\n extendeds = RunTimeSubclassFinder.runTimeFindSubclasses(packageName,act);\n for (Iterator<Class<?>> ite = extendeds.iterator();ite.hasNext();) {\n add = ite.next();\n addClass(add, q, done);\n }\n }\n \n // Adds superclass as relevant classes.\n if (!act.isPrimitive()) {\n add = act.getSuperclass();\n addClass(add, q, done);\n }\n \n }\n \n //Revert hack for avoiding the processing of String and Object classes, which makes no sense.\n done.remove(Object.class);\n done.remove(String.class);\n \n return done;\n }",
"@Test\n\tpublic void reportCommit(){\n\t\tCommitMetaData commitMetaData = new CommitMetaData();\n\t\tProcessMetricTracker pm = new ProcessMetricTracker(\"a.Java\", commitMetaData);\n\n\t\tfor(int i = 0; i < 21; i++) {\n\t\t\tpm.reportCommit(\"commit #\" + i,\"Mauricio\", 1, 1);\n\t\t}\n\t\tpm.reportCommit(\"Bug fix in commit #\" + 22, \"Jan\", 10, 5);\n\n\t\t//no refactoring was done on a.Java, thus the base commit process metrics should be empty\n\t\tProcessMetrics baseProcessMetrics = new ProcessMetrics(0, 0, 0, 0, 0);\n\t\tAssert.assertEquals(baseProcessMetrics.toString(), pm.getBaseProcessMetrics().toString());\n\n\t\t//22 commits affected a.Java, thus the current process metrics should look like this:\n\t\tProcessMetrics currentProcessMetrics = new ProcessMetrics(22, 31, 26, 1, 0);\n\t\tfor(int i = 0; i < 21; i++) {\n\t\t\tcurrentProcessMetrics.updateAuthorCommits(\"Mauricio\");\n\t\t}\n\t\tcurrentProcessMetrics.updateAuthorCommits(\"Jan\");\n\t\tAssert.assertEquals(currentProcessMetrics.toString(), pm.getCurrentProcessMetrics().toString());\n\n\t\t//Assert if the tracker is counting the commits since the last refactoring correct\n\t\tAssert.assertEquals(22, pm.getCommitCounter());\n\t}",
"public void testClassInfoBuilderVisitor1093() throws Exception {\n\t\tJavaClassRepository var3613 = instantiateJavaClassRepository633();\n\t\tClassInfoBuilderVisitor var3603 = new ClassInfoBuilderVisitor(null);\n\t\tvar3613.getClass(EmptyClass.class.getCanonicalName());\n\t\tvar3613.getClass(EmptyClass.class.getCanonicalName());\n\t\tvar3613.getClass(LoDMultipleDifferentInvocations.class\n\t\t\t\t.getCanonicalName());\n\t\tvar3603.guessSourceFileName(\"com.google.Foo$1\");\n\t\tvar3603.guessSourceFileName(\"com.google.Foo$1\");\n\t}",
"public void analyse() {\n checkoutMaster();\n List<RevCommit> mergeCommits = getMergeCommits();\n this.mergeScenarios = analyseMergeScenarios(mergeCommits);\n checkoutMaster();\n }",
"private void describeClassTree(Class<?> inputClass, Set<Class<?>> setOfClasses) {\r\n // can't map null class\r\n if (inputClass == null) {\r\n return;\r\n }\r\n\r\n // don't further analyze a class that has been analyzed already\r\n if (Object.class.equals(inputClass) || setOfClasses.contains(inputClass)) {\r\n return;\r\n }\r\n\r\n // add to analysis set\r\n setOfClasses.add(inputClass);\r\n\r\n // perform super class analysis\r\n describeClassTree(inputClass.getSuperclass(), setOfClasses);\r\n\r\n // perform analysis on interfaces\r\n for (Class<?> hasInterface : inputClass.getInterfaces()) {\r\n describeClassTree(hasInterface, setOfClasses);\r\n }\r\n }",
"public boolean isRefactoringInProgress();",
"public void testClassInfoBuilderVisitor1090() throws Exception {\n\t\tJavaClassRepository var3602 = instantiateJavaClassRepository630();\n\t\tClassInfoBuilderVisitor var3603 = new ClassInfoBuilderVisitor(null);\n\t\tvar3602.getClass(\"invalidByteCode\");\n\t\tString var3605 = \"com.google.test.metric.JavaClassRepositoryTest.MyClass.MyInnerClass\";\n\t\tvar3602.getClass(var3605);\n\t\tvar3603.guessSourceFileName(\"com.google.Foo$1\");\n\t\tvar3603.guessSourceFileName(\"com.google.Foo$1\");\n\t}",
"protected void checkFinalMethods(ClassFile file) throws Exception {\n MethodInfoController cont = file.getMethodInfoController();\n MethodInfo info = null;\n ClassFile superClass = null;\n ClassFile.currentClassToWorkOn = file;\n for (int loop = 0; loop < cont.getCurrentSize(); loop++) {\n info = (MethodInfo) cont.get(loop);\n Oracle oracle = Oracle.getInstanceOf();\n //String name = oracle.getMethodOrFieldString(info);\n superClass = Oracle.getInstanceOf().getClass(file.getSuperClass(), file.getConstantPool());\n\n //go to super for finding the method\n if (superClass != null && checkSuperMethodFinal(info, superClass)) {\n throw new VerifyErrorExt(Messages.SUPER_FINAL_METHOD);\n }\n }\n\n }",
"private final void checkForChanges() {\n \n WeavingContext.getWeaver().scanForAddedClasses();\n \n //TODO move this code also into the weaver so that\n //we have it centralized\n for (Map.Entry<String, ReloadingMetadata> it : this.classMap.entrySet()) {\n //if (!it.getValue().isTainted()) {\n \n File proxyFile = new File(it.getValue().getSourcePath() + File.separator + it.getValue().getFileName());\n if (/*!it.getValue().isTainted() &&*/ isModified(it, proxyFile)) {\n \n systemRecompileMap.put(it.getValue().getScriptingEngine(), Boolean.TRUE);\n ReloadingMetadata meta = it.getValue();\n meta.setTainted(true);\n meta.setTaintedOnce(true);\n printInfo(it, proxyFile);\n meta.setTimestamp(proxyFile.lastModified());\n dependencyTainted(meta.getAClass().getName());\n \n //we add our log entry for further reference\n WeavingContext.getRefreshContext().addTaintLogEntry(meta);\n }\n //}\n }\n //we clean up the taint log\n WeavingContext.getRefreshContext().gcTaintLog();\n }",
"protected boolean shouldAnalyze() {\n if (analyzer instanceof FileTypeAnalyzer) {\n final FileTypeAnalyzer fileTypeAnalyzer = (FileTypeAnalyzer) analyzer;\n return fileTypeAnalyzer.accept(dependency.getActualFile());\n }\n return true;\n }",
"private void visitPackage(String pkgName, Map<String, IFile> baseClazz,\n Map<String, IFile> curClazz, VersionChangeReason majorChange, VersionChangeReason minorChange) {\n StringBuilder major_reason = new StringBuilder();\n StringBuilder minor_reason = new StringBuilder();\n boolean is_major_change = false;\n boolean is_minor_change = false;\n String fatal_class = null;\n boolean foundNewAbstract = false;\n for (Map.Entry<String, IFile> file : baseClazz.entrySet()) {\n // scan the latest version of the class\n IFile curFile = curClazz.get(file.getKey());\n String changeClass = file.getValue().getName();\n //Scan the base version\n SemanticVersioningClassVisitor oldcv = getVisitor(file.getValue(), oldJarsLoader);\n // skip the property files as they are compiled as class file as well\n ClassDeclaration cd = oldcv.getClassDeclaration();\n if ((cd != null) && (!SemanticVersioningUtils.isPropertyFile(cd))) {\n\n if (curFile == null) {\n // the class we are scanning has been deleted from the current version of the bundle\n // This should be a major increase\n major_reason.append(twoLineBreaks + \"The class/interface \" + getClassName(changeClass) + \" has been deleted from the package.\");\n //majorChange.update(reason, changeClass);\n is_major_change = true;\n // only replace the fatal class if not set as the class won't be found in cmvc due to the fact it has been deleted.\n if (fatal_class == null) {\n fatal_class = changeClass;\n }\n } else {\n // check for binary compatibility\n // load the class from the current version of the bundle\n // remove it from the curClazz collection as we would like to know whether there are more classes added\n curClazz.remove(file.getKey());\n SemanticVersioningClassVisitor newcv = getVisitor(curFile, newJarsLoader);\n // check for binary compatibility\n ClassDeclaration newcd = newcv.getClassDeclaration();\n BinaryCompatibilityStatus bcs = newcd.getBinaryCompatibleStatus(oldcv.getClassDeclaration());\n\n if (!bcs.isCompatible()) {\n major_reason.append(twoLineBreaks + \"In the \" + getClassName(changeClass) + \" class or its supers, the following changes have been made since the last release.\");\n // break binary compatibility\n for (String reason : bcs) {\n major_reason.append(oneLineBreak).append(reason);\n }\n is_major_change = true;\n fatal_class = changeClass;\n } else {\n //check to see whether more methods are added\n ClassDeclaration oldcd = oldcv.getClassDeclaration();\n Collection<MethodDeclaration> extraMethods = newcd.getExtraMethods(oldcd);\n\n boolean containsConcrete = false;\n boolean containsAbstract = false;\n\n boolean abstractClass = newcd.isAbstract();\n\n StringBuilder subRemarks = new StringBuilder();\n String concreteSubRemarks = null;\n for (MethodDeclaration extraMethod : extraMethods) {\n //only interested in the visible methods not the system generated ones\n if (!extraMethod.getName().contains(\"$\")) {\n if (abstractClass) {\n if (extraMethod.isAbstract()) {\n foundNewAbstract = true;\n containsAbstract = true;\n subRemarks.append(oneLineBreak + SemanticVersioningUtils.getReadableMethodSignature(extraMethod.getName(), extraMethod.getDesc()));\n } else {\n //only list one abstract method, no need to list all\n containsConcrete = true;\n concreteSubRemarks = oneLineBreak + SemanticVersioningUtils.getReadableMethodSignature(extraMethod.getName(), extraMethod.getDesc());\n }\n } else {\n containsConcrete = true;\n concreteSubRemarks = oneLineBreak + SemanticVersioningUtils.getReadableMethodSignature(extraMethod.getName(), extraMethod.getDesc());\n break;\n }\n }\n }\n\n if (containsConcrete || containsAbstract) {\n is_minor_change = true;\n if (!is_major_change) {\n fatal_class = changeClass;\n }\n if (containsAbstract) {\n\n minor_reason.append(twoLineBreaks + \"In the \" + getClassName(changeClass) + \" class or its supers, the following abstract methods have been added since the last release of this bundle.\");\n minor_reason.append(subRemarks);\n } else {\n minor_reason.append(twoLineBreaks + \"In the \" + getClassName(changeClass) + \" class or its supers, the following method has been added since the last release of this bundle.\");\n minor_reason.append(concreteSubRemarks);\n }\n }\n //check to see whether there are extra public/protected fields if there is no additional methods\n\n if (!is_minor_change) {\n for (FieldDeclaration field : newcd.getExtraFields(oldcd)) {\n if (field.isPublic() || field.isProtected()) {\n is_minor_change = true;\n String extraFieldRemarks = oneLineBreak + \" \" + SemanticVersioningUtils.transform(field.getDesc()) + \" \" + field.getName();\n if (!is_major_change) {\n fatal_class = changeClass;\n }\n minor_reason.append(twoLineBreaks + \"In the \" + getClassName(changeClass) + \" class or its supers, the following fields have been added since the last release of this bundle.\");\n minor_reason.append(extraFieldRemarks);\n break;\n }\n }\n\n }\n\n }\n }\n }\n }\n if (is_major_change) {\n majorChange.update(major_reason.toString(), fatal_class, false);\n }\n if (is_minor_change) {\n minorChange.update(minor_reason.toString(), fatal_class, (foundNewAbstract ? true : false));\n }\n }",
"@Override\n public void process(SCMRepository repo, Commit commit, PersistenceMechanism writer) {\n try {\n repo.getScm().checkout(commit.getHash());\n for (Modification m : commit.getModifications()) {\n if (m.fileNameEndsWith(\".java\") && m.getNewPath().contains(\"src/\")) {\n MethodASTVisitor methodVisitor = new MethodASTVisitor(commit, this.visitedMethods, m.getFileName());\n ASTParser parser = ASTHelper.createAndSetupParser(m.getFileName(), m.getSourceCode(),\n repo.getPath() + \"/src\");\n CompilationUnit result = (CompilationUnit) parser.createAST(null);\n result.accept(methodVisitor);\n\n this.visitedMethods = methodVisitor.getResults();\n }\n }\n } catch (Exception e) {\n repo.getScm().reset();\n }\n }",
"public void testJavaClassRepository871() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(Foreach.class.getCanonicalName());\n\t\tvar2730.getClass(CyclomaticMethods.class.getCanonicalName());\n\t\tvar2730.getClass(LineNumbersForConditionals.class.getCanonicalName());\n\t}",
"@SuppressWarnings(\"unused\") \n\tprivate void extractChanges(Node commit_node, RevCommit m) throws Exception\n\t{\n\n\t\tList<String> commitIds = new ArrayList<String>(); \n\n\t\tcommitIds.add(m.toObjectId().getName());\n\t\t\n\t\tCommitInfoExtractor cie = new CommitInfoExtractor();\n\t\tcie.extractFeatureChanges(commitIds);\n\t\tList<EvolutionStep>steps = cie.getSteps();\n\t\t\n\t\ttry(Transaction tx = DBConnection.getService().beginTx())\n\t\t{\n\t\t\tfor(EvolutionStep step : steps)\n\t\t\t{\n\t\t\t\tFileChangeExtractor file_changes = new FileChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> file_nodes = file_changes.addFileChangesToCommit(step.files, commit_node);\n\t\t\t\t\n\t\t\t\tVMChangeExtractor vm_changes = new VMChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> vm_nodes = vm_changes.addVMChangesToCommit(step.fm_changes, commit_node);\n\t\t\t\t\n\t\t\t\tBuildChangeExtractor build_changes = new BuildChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> build_nodes = build_changes.addBuildChangesToCommit(step.build_changes, commit_node);\n\t\t\t\t\n\t\t\t\tCodeChangeExtractor code_changes = new CodeChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> code_nodes = code_changes.addCodeChangesToCommit(step.impl_changes, commit_node);\n\n//\t\t\t\tList<EvolutionStep> local = new ArrayList<EvolutionStep>(); local.add(step);\n//\t\t\t\tFeatureOrientedChangeExtractor dataextractor = new FeatureOrientedChangeExtractor(local);\n//\t\t\t\tdataextractor.buildFeatureChanges();\n//\t\t\t\t\n//\t\t\t\tList<FeatureOrientedChange> changes = dataextractor.getFeatureChanges();\n//\t\n//\t\t\t\tList<Node> focs = new ArrayList<Node>();\n//\t\t\t\tfor(FeatureOrientedChange c : changes)\n//\t\t\t\t{\n//\t\t\t\t\tNode foc_node = createFeatureOrientedChangeForCommit(c);\n//\t\t\t\t\tfocs.add(foc_node);\n//\t\t\t\t\tlink_file_and_vm_changes(c,foc_node,file_nodes, vm_nodes,build_nodes,code_nodes); \n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tMap<String,Node> known_focs = buildFOCMap(focs);\n//\t\t\t\tlink_mapping_artefacts(known_focs,build_nodes);\n//\t\t\t\tlink_code_artefacts(known_focs,code_nodes);\n\t\t\t}\n\t\t\ttx.success();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new Exception(\"Failed to create Neo4j nodes - \", e);\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the sprite heights. | public int[] getSpriteHeights() {
return spriteHeights;
} | [
"public int getSpriteHeight() {\n return this.spriteHeight;\n }",
"public final int getSpriteHeight() {\r\n return this.spriteHeight;\r\n }",
"public int getSpriteHeight() {\r\n\t\treturn spriteHeight;\r\n\t}",
"public float getOriginalSpriteHeight()\n {\n return sprite.getHeight();\n }",
"public int getHeight() {\n return idleTextures[0].getRegionHeight();\n }",
"public int getHeight() {\n return (Integer)map.getProperties().get(\"height\") * (Integer)map.getProperties().get(\"tileheight\");\n }",
"private int getPixelHeight() {\n\t\treturn SpriteManager.getInstance().IMAGE_PLATFORM_LEFT.getHeight(null);\n\t}",
"public int getHeight() {\n\t\treturn this.img.height;\n\t}",
"public float getHeight()\n {\n return getUpperRightY() - getLowerLeftY();\n }",
"public int getHeight(){\r\n\t\treturn HEIGHT;\r\n\t}",
"public int getHeight(){\n \tif (pcount==0){\n \t\treturn 0;\n \t}\n \treturn boxImages.get(pcount-1).getHeight(null);\n }",
"public Integer getImgheight() {\n return imgheight;\n }",
"public int getHeight() {\r\n return drawing.getHeight();\r\n }",
"long getHeight();",
"public int[] getSpriteWidths() {\r\n\t\treturn spriteWidths;\r\n\t}",
"public int getHeightUnits() {\n\t\treturn height;\n\t}",
"public int getTileHeight();",
"public int getBoundingHeight() {\n if (renderCircle) {\n return this.r * 2;\n } else {\n return y2 - y1;\n }\n }",
"public int getImageHeight()\n {\n \n int retVal = getImageHeight_0(nativeObj);\n \n return retVal;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the Table name that belong to given class. | public String getTableName(Class<?> aClass) {
String result = aClass.getSimpleName();
if (this.hasAnnotation(aClass, Table.class)) {
Table anno = (Table) this.getAnnotation(aClass, Table.class);
if (anno.name() != null && !anno.name().isEmpty())
result = anno.name();
}
return result;
} | [
"private String getTableName(final String param_class_Name) {// This method\n\t\t// is used to\n\t\t// know the\n\t\t// table name\n\t\t// that is\n\t\t// mapped with the class name\n\t\tString table_Name = null;\n\t\tSolutionsAdapter sAdapter = saReader.getSA();\n\t\tDataObjectType dataObject = sAdapter.getDataObject();\n\t\tList listGroup = dataObject.getGroup();\n\t\tgroup_Loop: for (Iterator groupIter = listGroup.iterator(); groupIter\n\t\t\t\t.hasNext();) {\n\t\t\tGroupList groupList = (GroupList) groupIter.next();\n\t\t\tList classList = groupList.getClasses();\n\t\t\tclass_Loop: for (int j = 0; j < classList.size(); j++) {\n\t\t\t\tClassList classesList = (ClassList) classList.get(j);\n\t\t\t\tfinal String className = classesList.getClassName();// Provides\n\t\t\t\t// the class\n\t\t\t\t// name\n\t\t\t\tif (className.equals(param_class_Name)) {\n\t\t\t\t\tList fieldList = classesList.getFields();// Provides the\n\t\t\t\t\t// list of\n\t\t\t\t\t// fields\n\t\t\t\t\t// present in a\n\t\t\t\t\t// class\n\t\t\t\t\tfield_Loop: for (int k = 0; k < fieldList.size(); k++) {\n\t\t\t\t\t\tFieldNameList listField = (FieldNameList) fieldList\n\t\t\t\t\t\t\t\t.get(k);\n\t\t\t\t\t\tList dodsMapList = listField.getDODSMap();\n\t\t\t\t\t\tdoDsMap_Loop: for (int l = 0; l < dodsMapList.size(); l++) {\n\t\t\t\t\t\t\tDSMapList dsType = (DSMapList) dodsMapList.get(l);\n\t\t\t\t\t\t\ttable_Name = dsType.getTableName();\n\t\t\t\t\t\t\tbreak group_Loop;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn table_Name;\n\t}",
"public String getTableNameForSQL() {\r\n String tableName = getTableName();\r\n if (tableName == null) {\r\n int dot;\r\n tableName = getClass().getName();\r\n if ((dot = tableName.lastIndexOf('.')) >= 0) {\r\n tableName = tableName.substring(dot + 1);\r\n }\r\n }\r\n return tableName;\r\n }",
"public String getTableClassName() {\n\t\tString[] slices = tableName.toLowerCase().split(\"[^A-Za-z]\");\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor (String slice : slices) {\n\t\t\tif (!\"\".equals(slice)) {\n\t\t\t\tsb.append(StringUtils.capitalize(slice));\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String getTableName() {\n\t\treturn this.getTableName(this.currentClass());\n\t}",
"String getTableName();",
"public static String resolveTableName(Class<?> entityClass) {\n if (RESOLVED_TABLE_NAMES.containsKey(entityClass)) {\n return RESOLVED_TABLE_NAMES.get(entityClass);\n }\n String tableName = \"\";\n\n if (entityClass.isAnnotationPresent(DatabaseEntity.class)) {\n DatabaseEntity databaseEntity = entityClass.getAnnotation(DatabaseEntity.class);\n\n tableName = databaseEntity.value();\n }\n\n tableName = tableName.isEmpty() ? NormalizeUtils.normalize(entityClass.getSimpleName()) : tableName;\n RESOLVED_TABLE_NAMES.put(entityClass, tableName);\n\n return tableName;\n }",
"public String getTableName(){\n\t\treturn table.getName();\n\t}",
"public Class<?> getTableClass() {\n return tableClass;\n }",
"public String getTableName () {\r\n return table.getName ();\r\n }",
"public String getTableName(){\n\t\tGPAEntity annoTable = (GPAEntity) this.getClass().getAnnotation(GPAEntity.class);\n\t\tString tableName = annoTable.name();\n\t\treturn tableName;\n\t}",
"public String getDBTableName()\n\t{\n\t\treturn this.getClass().getSimpleName();\n\t}",
"public TableName name();",
"public static String className(TableModel table) {\n return instance.getClassName(table);\n }",
"@Override\n public TableName getTableName(Class<?> beanClass) {\n while (true) {\n\n TableName tableName = getTableNameFromAnnotation(beanClass);\n if (tableName == null) {\n Class<?> supCls = beanClass.getSuperclass();\n if (hasInheritance(supCls)) {\n // get the table as per inherited class in case there\n // is not a table annotation in the inheritance hierarchy\n beanClass = supCls;\n continue;\n }\n\n tableName = getTableNameByConvention(beanClass);\n }\n\n // Use naming convention for catalog or schema,\n // if not set in the annotation.\n String catalog = tableName.getCatalog();\n if (isEmpty(catalog)) {\n catalog = getCatalog();\n }\n String schema = tableName.getSchema();\n if (isEmpty(schema)) {\n schema = getSchema();\n }\n return new TableName(catalog, schema, tableName.getName());\n }\n }",
"public String getTableName() {\n if (tableName == null) {\n tableName = Strings.tableize(ActiveRecords.findActiveRecordBaseName(getClass()));\n }\n return tableName;\n }",
"public String getTableName () {\n return getLegacyDbObjectClassVariables().tableName;\n }",
"public String tableName() {\n if ( tableName != null ) {\n return tableName;\n }\n\n TableName annotation = this.entityType().getAnnotation( TableName.class );\n if ( annotation != null ) {\n tableName = annotation.value();\n } else {\n tableName = entityType().getSimpleName().toLowerCase() + 's';\n }\n return tableName;\n }",
"public String getFullTableName();",
"protected TableName getTableNameFromAnnotation(Class<?> beanClass) {\n final Table table = AnnotationUtil.typeGet(beanClass, Table.class);\n if (table != null && !isEmpty(table.name())) {\n // Note: empty catalog and schema are converted to null\n // Only need to convert quoted identifiers from annotations\n return new TableName(quoteIdentifiers(table.catalog()), quoteIdentifiers(table.schema()), quoteIdentifiers(table.name()));\n }\n // No annotation\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__S_Reflex__Group__1" $ANTLR start "rule__S_Reflex__Group__1__Impl" InternalGaml.g:7293:1: rule__S_Reflex__Group__1__Impl : ( ( rule__S_Reflex__FirstFacetAssignment_1 )? ) ; | public final void rule__S_Reflex__Group__1__Impl() throws RecognitionException {
int rule__S_Reflex__Group__1__Impl_StartIndex = input.index();
int stackSize = keepStackSize();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 397) ) { return ; }
// InternalGaml.g:7297:1: ( ( ( rule__S_Reflex__FirstFacetAssignment_1 )? ) )
// InternalGaml.g:7298:1: ( ( rule__S_Reflex__FirstFacetAssignment_1 )? )
{
// InternalGaml.g:7298:1: ( ( rule__S_Reflex__FirstFacetAssignment_1 )? )
// InternalGaml.g:7299:1: ( rule__S_Reflex__FirstFacetAssignment_1 )?
{
if ( state.backtracking==0 ) {
before(grammarAccess.getS_ReflexAccess().getFirstFacetAssignment_1());
}
// InternalGaml.g:7300:1: ( rule__S_Reflex__FirstFacetAssignment_1 )?
int alt92=2;
int LA92_0 = input.LA(1);
if ( (LA92_0==76) ) {
alt92=1;
}
switch (alt92) {
case 1 :
// InternalGaml.g:7300:2: rule__S_Reflex__FirstFacetAssignment_1
{
pushFollow(FollowSets000.FOLLOW_2);
rule__S_Reflex__FirstFacetAssignment_1();
state._fsp--;
if (state.failed) return ;
}
break;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getS_ReflexAccess().getFirstFacetAssignment_1());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
if ( state.backtracking>0 ) { memoize(input, 397, rule__S_Reflex__Group__1__Impl_StartIndex); }
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__S_Definition__Group__1__Impl() throws RecognitionException {\n int rule__S_Definition__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 413) ) { return ; }\n // InternalGaml.g:7547:1: ( ( ( rule__S_Definition__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:7548:1: ( ( rule__S_Definition__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:7548:1: ( ( rule__S_Definition__FirstFacetAssignment_1 )? )\n // InternalGaml.g:7549:1: ( rule__S_Definition__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_DefinitionAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:7550:1: ( rule__S_Definition__FirstFacetAssignment_1 )?\n int alt95=2;\n int LA95_0 = input.LA(1);\n\n if ( (LA95_0==76) ) {\n alt95=1;\n }\n switch (alt95) {\n case 1 :\n // InternalGaml.g:7550:2: rule__S_Definition__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Definition__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_DefinitionAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 413, rule__S_Definition__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DefinitionFacet__Group__1() throws RecognitionException {\n int rule__DefinitionFacet__Group__1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 586) ) { return ; }\n // InternalGaml.g:10256:1: ( rule__DefinitionFacet__Group__1__Impl )\n // InternalGaml.g:10257:2: rule__DefinitionFacet__Group__1__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__DefinitionFacet__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 586, rule__DefinitionFacet__Group__1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_If__Group__1__Impl() throws RecognitionException {\n int rule__S_If__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 369) ) { return ; }\n // InternalGaml.g:6863:1: ( ( ( rule__S_If__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:6864:1: ( ( rule__S_If__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:6864:1: ( ( rule__S_If__FirstFacetAssignment_1 )? )\n // InternalGaml.g:6865:1: ( rule__S_If__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_IfAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:6866:1: ( rule__S_If__FirstFacetAssignment_1 )?\n int alt87=2;\n int LA87_0 = input.LA(1);\n\n if ( (LA87_0==140) ) {\n alt87=1;\n }\n switch (alt87) {\n case 1 :\n // InternalGaml.g:6866:2: rule__S_If__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_If__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_IfAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 369, rule__S_If__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Facet__Group__1__Impl() throws RecognitionException {\n\n\t\t\t\tint stackSize = keepStackSize();\n\t\t\t\n\t\ttry {\n\t\t\t// InternalMyDsl.g:337:2: ( ( ( rule__Facet__NormalAssignment_1 ) ) )\n\t\t\t// InternalMyDsl.g:338:2: ( ( rule__Facet__NormalAssignment_1 ) )\n\t\t\t{\n\t\t\t// InternalMyDsl.g:338:2: ( ( rule__Facet__NormalAssignment_1 ) )\n\t\t\t// InternalMyDsl.g:339:2: ( rule__Facet__NormalAssignment_1 )\n\t\t\t{\n\t\t\t before(grammarAccess.getFacetAccess().getNormalAssignment_1()); \n\t\t\t// InternalMyDsl.g:340:2: ( rule__Facet__NormalAssignment_1 )\n\t\t\t// InternalMyDsl.g:340:3: rule__Facet__NormalAssignment_1\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_2);\n\t\t\trule__Facet__NormalAssignment_1();\n\t\t\tstate._fsp--;\n\n\t\t\t}\n\n\t\t\t after(grammarAccess.getFacetAccess().getNormalAssignment_1()); \n\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\n\t\t\t\trestoreStackSize(stackSize);\n\n\t\t}\n\t}",
"public final void rule__S_Experiment__Group__1__Impl() throws RecognitionException {\n int rule__S_Experiment__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 331) ) { return ; }\n // InternalGaml.g:6278:1: ( ( ( rule__S_Experiment__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:6279:1: ( ( rule__S_Experiment__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:6279:1: ( ( rule__S_Experiment__FirstFacetAssignment_1 )? )\n // InternalGaml.g:6280:1: ( rule__S_Experiment__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_ExperimentAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:6281:1: ( rule__S_Experiment__FirstFacetAssignment_1 )?\n int alt79=2;\n int LA79_0 = input.LA(1);\n\n if ( (LA79_0==76) ) {\n alt79=1;\n }\n switch (alt79) {\n case 1 :\n // InternalGaml.g:6281:2: rule__S_Experiment__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Experiment__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_ExperimentAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 331, rule__S_Experiment__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Solve__Group__1__Impl() throws RecognitionException {\n int rule__S_Solve__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 509) ) { return ; }\n // InternalGaml.g:9047:1: ( ( ( rule__S_Solve__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:9048:1: ( ( rule__S_Solve__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:9048:1: ( ( rule__S_Solve__FirstFacetAssignment_1 )? )\n // InternalGaml.g:9049:1: ( rule__S_Solve__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_SolveAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:9050:1: ( rule__S_Solve__FirstFacetAssignment_1 )?\n int alt106=2;\n int LA106_0 = input.LA(1);\n\n if ( (LA106_0==144) ) {\n alt106=1;\n }\n switch (alt106) {\n case 1 :\n // InternalGaml.g:9050:2: rule__S_Solve__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Solve__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_SolveAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 509, rule__S_Solve__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Do__Group__1__Impl() throws RecognitionException {\n int rule__S_Do__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 351) ) { return ; }\n // InternalGaml.g:6586:1: ( ( ( rule__S_Do__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:6587:1: ( ( rule__S_Do__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:6587:1: ( ( rule__S_Do__FirstFacetAssignment_1 )? )\n // InternalGaml.g:6588:1: ( rule__S_Do__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_DoAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:6589:1: ( rule__S_Do__FirstFacetAssignment_1 )?\n int alt83=2;\n int LA83_0 = input.LA(1);\n\n if ( (LA83_0==97) ) {\n alt83=1;\n }\n switch (alt83) {\n case 1 :\n // InternalGaml.g:6589:2: rule__S_Do__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Do__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_DoAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 351, rule__S_Do__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DefinitionFacet__Group__1__Impl() throws RecognitionException {\n int rule__DefinitionFacet__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 587) ) { return ; }\n // InternalGaml.g:10267:1: ( ( ( rule__DefinitionFacet__NameAssignment_1 ) ) )\n // InternalGaml.g:10268:1: ( ( rule__DefinitionFacet__NameAssignment_1 ) )\n {\n // InternalGaml.g:10268:1: ( ( rule__DefinitionFacet__NameAssignment_1 ) )\n // InternalGaml.g:10269:1: ( rule__DefinitionFacet__NameAssignment_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getDefinitionFacetAccess().getNameAssignment_1()); \n }\n // InternalGaml.g:10270:1: ( rule__DefinitionFacet__NameAssignment_1 )\n // InternalGaml.g:10270:2: rule__DefinitionFacet__NameAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__DefinitionFacet__NameAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getDefinitionFacetAccess().getNameAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 587, rule__DefinitionFacet__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Return__Group__1__Impl() throws RecognitionException {\n int rule__S_Return__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 389) ) { return ; }\n // InternalGaml.g:7172:1: ( ( ( rule__S_Return__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:7173:1: ( ( rule__S_Return__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:7173:1: ( ( rule__S_Return__FirstFacetAssignment_1 )? )\n // InternalGaml.g:7174:1: ( rule__S_Return__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_ReturnAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:7175:1: ( rule__S_Return__FirstFacetAssignment_1 )?\n int alt90=2;\n int LA90_0 = input.LA(1);\n\n if ( (LA90_0==21) ) {\n int LA90_1 = input.LA(2);\n\n if ( ((LA90_1>=RULE_STRING && LA90_1<=RULE_KEYWORD)||LA90_1==15||(LA90_1>=17 && LA90_1<=21)||(LA90_1>=23 && LA90_1<=70)||(LA90_1>=76 && LA90_1<=98)||LA90_1==106||(LA90_1>=109 && LA90_1<=114)||LA90_1==121||LA90_1==123||LA90_1==125||LA90_1==130) ) {\n alt90=1;\n }\n }\n switch (alt90) {\n case 1 :\n // InternalGaml.g:7175:2: rule__S_Return__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Return__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_ReturnAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 389, rule__S_Return__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__TypeFacet__Group__1() throws RecognitionException {\n int rule__TypeFacet__Group__1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 598) ) { return ; }\n // InternalGaml.g:10444:1: ( rule__TypeFacet__Group__1__Impl )\n // InternalGaml.g:10445:2: rule__TypeFacet__Group__1__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__TypeFacet__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 598, rule__TypeFacet__Group__1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_1Expr_Facets_BlockOrEnd__Group__1__Impl() throws RecognitionException {\n int rule__S_1Expr_Facets_BlockOrEnd__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 341) ) { return ; }\n // InternalGaml.g:6432:1: ( ( ( rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:6433:1: ( ( rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:6433:1: ( ( rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1 )? )\n // InternalGaml.g:6434:1: ( rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_1Expr_Facets_BlockOrEndAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:6435:1: ( rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1 )?\n int alt81=2;\n alt81 = dfa81.predict(input);\n switch (alt81) {\n case 1 :\n // InternalGaml.g:6435:2: rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_1Expr_Facets_BlockOrEndAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 341, rule__S_1Expr_Facets_BlockOrEnd__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Species__Group__1__Impl() throws RecognitionException {\n int rule__S_Species__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 321) ) { return ; }\n // InternalGaml.g:6124:1: ( ( ( rule__S_Species__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:6125:1: ( ( rule__S_Species__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:6125:1: ( ( rule__S_Species__FirstFacetAssignment_1 )? )\n // InternalGaml.g:6126:1: ( rule__S_Species__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_SpeciesAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:6127:1: ( rule__S_Species__FirstFacetAssignment_1 )?\n int alt77=2;\n int LA77_0 = input.LA(1);\n\n if ( (LA77_0==76) ) {\n alt77=1;\n }\n switch (alt77) {\n case 1 :\n // InternalGaml.g:6127:2: rule__S_Species__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_SpeciesAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 321, rule__S_Species__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Var__Group__2__Impl() throws RecognitionException {\n int rule__S_Var__Group__2__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 453) ) { return ; }\n // InternalGaml.g:8173:1: ( ( ( rule__S_Var__FirstFacetAssignment_2 )? ) )\n // InternalGaml.g:8174:1: ( ( rule__S_Var__FirstFacetAssignment_2 )? )\n {\n // InternalGaml.g:8174:1: ( ( rule__S_Var__FirstFacetAssignment_2 )? )\n // InternalGaml.g:8175:1: ( rule__S_Var__FirstFacetAssignment_2 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_VarAccess().getFirstFacetAssignment_2()); \n }\n // InternalGaml.g:8176:1: ( rule__S_Var__FirstFacetAssignment_2 )?\n int alt101=2;\n int LA101_0 = input.LA(1);\n\n if ( (LA101_0==76) ) {\n alt101=1;\n }\n switch (alt101) {\n case 1 :\n // InternalGaml.g:8176:2: rule__S_Var__FirstFacetAssignment_2\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Var__FirstFacetAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_VarAccess().getFirstFacetAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 453, rule__S_Var__Group__2__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DefinitionFacet__Group__0__Impl() throws RecognitionException {\n int rule__DefinitionFacet__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 585) ) { return ; }\n // InternalGaml.g:10239:1: ( ( ( rule__DefinitionFacet__KeyAssignment_0 ) ) )\n // InternalGaml.g:10240:1: ( ( rule__DefinitionFacet__KeyAssignment_0 ) )\n {\n // InternalGaml.g:10240:1: ( ( rule__DefinitionFacet__KeyAssignment_0 ) )\n // InternalGaml.g:10241:1: ( rule__DefinitionFacet__KeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getDefinitionFacetAccess().getKeyAssignment_0()); \n }\n // InternalGaml.g:10242:1: ( rule__DefinitionFacet__KeyAssignment_0 )\n // InternalGaml.g:10242:2: rule__DefinitionFacet__KeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__DefinitionFacet__KeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getDefinitionFacetAccess().getKeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 585, rule__DefinitionFacet__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Facet__Group__1() throws RecognitionException {\n\n\t\t\t\tint stackSize = keepStackSize();\n\t\t\t\n\t\ttry {\n\t\t\t// InternalMyDsl.g:325:2: ( rule__Facet__Group__1__Impl rule__Facet__Group__2 )\n\t\t\t// InternalMyDsl.g:326:2: rule__Facet__Group__1__Impl rule__Facet__Group__2\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_8);\n\t\t\trule__Facet__Group__1__Impl();\n\t\t\tstate._fsp--;\n\n\t\t\tpushFollow(FOLLOW_2);\n\t\t\trule__Facet__Group__2();\n\t\t\tstate._fsp--;\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\n\t\t\t\trestoreStackSize(stackSize);\n\n\t\t}\n\t}",
"public final void rule__DefinitionFacet__Group__0() throws RecognitionException {\n int rule__DefinitionFacet__Group__0_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 584) ) { return ; }\n // InternalGaml.g:10227:1: ( rule__DefinitionFacet__Group__0__Impl rule__DefinitionFacet__Group__1 )\n // InternalGaml.g:10228:2: rule__DefinitionFacet__Group__0__Impl rule__DefinitionFacet__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_48);\n rule__DefinitionFacet__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__DefinitionFacet__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 584, rule__DefinitionFacet__Group__0_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4363:1: ( rule__XAssignment__Group_1__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4364:2: rule__XAssignment__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1__1__Impl_in_rule__XAssignment__Group_1__19316);\n rule__XAssignment__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4424:1: ( rule__XAssignment__Group_1_1__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4425:2: rule__XAssignment__Group_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1__1__Impl_in_rule__XAssignment__Group_1_1__19438);\n rule__XAssignment__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5321:1: ( rule__XAssignment__Group_1_1__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5322:2: rule__XAssignment__Group_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1__1__Impl_in_rule__XAssignment__Group_1_1__111251);\n rule__XAssignment__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overridden to include the type and generic type in the stringification of subclasses. | @Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.appendToString(super.toString())
.append("type", getType()).append("genericType", getGenericType()) //$NON-NLS-1$ //$NON-NLS-2$
.toString();
} | [
"public static String typeToString () {\n RxToolkit.trace(\"GenericRecipe::typeToString()\");\n return \"Generic Recipe\";\n }",
"@Override\n public String toString() {\n return this.typeString;\n }",
"abstract protected String basicRepresentativeString(TypeSystem typeSystem);",
"@Override\n public String getType() {\n return super.getType().toLowerCase();\n }",
"public abstract String javaType();",
"protected abstract String getContainerTypeAsString();",
"abstract public String getType();",
"java.lang.String getSubType();",
"String getClassTypeVariables() {\n final StringBuilder sb = new StringBuilder();\n if (classTypes.size() > 0) {\n sb.append(\"<\");\n for (int i = 0; i < classTypes.size(); i++) {\n final Class<?> c = classTypes.get(i);\n if (c != null) {\n sb.append(getShortClassName(c));\n if (i < classTypes.size() - 1) {\n sb.append(\", \");\n }\n }\n }\n sb.append(\">\");\n }\n return sb.toString();\n }",
"String getTypeName();",
"public final String getTypeAsString()\n\t{\n\t\tString str = null;\n\t\t\n\t\tswitch( isType())\n\t\t{\n\t\tcase TargetFile:\n\t\t\tstr = \"File\";\n\t\t\tbreak;\n\t\tcase TargetFolder:\n\t\t\tstr = \"Folder\";\n\t\t\tbreak;\n\t\tcase TargetCopiedFile:\n\t\t\tstr = \"File Copy\";\n\t\t\tbreak;\n\t\tcase TargetCopiedFolder:\n\t\t\tstr = \"Folder Copy\";\n\t\t\tbreak;\n\t\tcase TargetNodeRef:\n\t\t\tstr = \"NodeRef\";\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn str;\n\t}",
"public String getTypeName();",
"public String toString() {\n\t\tString str = \"\";\n\t\tfor (int i = 0; i< Math.min(intOfTypes.size(), nameOfTypes.size()); i++) {\n\t\t\tstr = str + \"<\" + intOfTypes.get(i) + \", \" + nameOfTypes.get(i) + \">; \";\n\t\t}\n\t\treturn str;\n\t}",
"String getTypeDescription();",
"public String type() {\n return getClass().getSimpleName();\n }",
"@Override\n public String toString() {\n StringBuilder builder = new StringBuilder(128);\n builder.append('[');\n for (Substitution subst = this; subst != EMPTY_SUBSTITUTION; subst = subst.parent) {\n if (subst != this)\n builder.insert(1, \", \");\n builder.insert(1, subst.type + \"/\" + subst.name);\n }\n builder.append(']');\n return builder.toString();\n }",
"public String typesToString()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tif(contents instanceof Variable<?>[])\n\t\t{\n\t\t\tfor(E c : contents)\n\t\t\t{\n\t\t\t\tsb.append(((Variable<?>) c).getType().toString() + \", \");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(E c : contents)\n\t\t\t{\n\t\t\t\tsb.append(c.getClass().toString() + \", \");\n\t\t\t}\n\t\t}\n\n\t\treturn \"StackTypes [\" + sb.toString() + \"]\";\n\t}",
"private String type2string(Class<?> type) {\n String name = type.getCanonicalName();\n //TODO rewrite it in the following manner: if type is connected anyhow with the old package\n if (needsConversion(type))\n name = CodeGeneratorSettings.EDITOR_BEANS_PACKAGE + '.' +\n makeNewClassName(type);\n return changeBinPackage(name);\n }",
"protected abstract void registerSuperTypes();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ get the location of this Schedule by index | public String getLocationOfIndex(int index)
{
return location.getLocations().get(index);
} | [
"public Location getLocation(int index){\n return locations.get(index);\n }",
"public Location getLocation(int index) {\n\t\treturn locations.get(index);\n\t}",
"public long getIndex()\n {\n return this.gpsIndex;\n }",
"public LocalDateTime getArrivalTimeOfIndex(int index)\r\n\t{\r\n\t\treturn timeslot.getArrival().get(index);\r\n\t}",
"int getLoc(int index) {\n boundsCheck(index);\n index *= SIZEOF_NODE;\n return little2Big(tree.getInt(index));\n }",
"public int at(int index) {\n//\t\tif (index < 2*rangeMin || index >= (rangeMax*2)) {\n//\t\t\tthrow new IllegalArgumentException(\"Cannot access index \" + index + \", there are only \" + rangeMax + \" total ranges\");\n//\t\t}\n\t\treturn sites[index];\n\t}",
"public Route getRoute(int index)\r\n {\r\n return routes[index];\r\n }",
"phaseI.Hdfs.DataNodeLocation getLocations(int index);",
"public List getSchedules(int index){\n\t\tif (index < schedules.size()){\n\t\t\treturn (List)schedules.get(index);\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}",
"public int getCurrentMinSchedule ( ) {\n\t\treturn routeDetailPos.get(0);\n\t}",
"long getIndex();",
"int getSeatIndex(int index);",
"public Task getTask(int index) throws IndexOutOfBoundsException;",
"public int getIndex(int position);",
"public Schedule getBuddy(int index) {\n\n return buddies.get(index);\n }",
"long getSeatworkId(int index);",
"public Waypoint get(int index) {\n\t\treturn waypoints.get(index);\n\t}",
"public long getSeatworkId(int index) {\n return seatworkId_.get(index);\n }",
"public TeleportDestination get(int index) {\n\t\treturn destinations.get(index);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GETTERS AND SETTERS Set god mode on. | public void setGodModeOn()
{
godModeOn = true;
} | [
"public void setGodModeOff()\n {\n godModeOn = false;\n }",
"public void toggleGodMode() {\n\t\tthis.isGodModeEnabled = !this.isGodModeEnabled;\n\t\tif (this.isGodModeEnabled) {\n\t\t\tSystem.out.println(\"GodMode Enabled.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"GodMode Disabled.\");\n\t\t}\n\t}",
"void setGodPower(boolean b);",
"void useGodPower(boolean use);",
"public void defender(){setModopelea(1);}",
"public void setModoDios(boolean b){\r\n\t\tthis.modoDios = b;\r\n\t}",
"public void setChosenGod(ReducedGod god){\n this.chosenGod = god;\n notifyUiInteraction();\n }",
"void setMode(int mode);",
"public void turnOn(){\n\t\tcoffeeMachineOn = true;\n\t\twarmerState = WarmerState.OFF;\n\t\tboilerState = BoilerState.OFF;\n\t\tindicatorState = IndicatorState.OFF;\n\t\treliefValveState = ReliefValveState.CLOSED;\n\t\t\n\t}",
"void setMortgaged(boolean mortgaged);",
"public void setWon(){\n won = true;\n }",
"public void setSoft(boolean soft);",
"public void setReadOnly(boolean value) {\n DhtSettings ds = new DhtSettings();\n ds.readOnly(value);\n\n sessionManager.swig().set_dht_settings(ds.swig());\n }",
"public void setMode(int mode);",
"void setMode(Mode mode);",
"public void switchDriveMode(){\n\n bullyMode = !bullyMode;\n gearBoxSolenoid.set(bullyMode);\n }",
"public void godmodeIntent(View v){\n if(!myTurn){\n showToast(\"Wait for your turn imbecile\");\n return;\n }\n if(powerup_godmode){\n showTimedAlertDialog(\"GODMODE activated!\", \"Move freely without being hurt by mines\", 5);\n powerup_godmode = false;\n ImageView img = findImageButton(\"godmode_container\");\n img.setImageDrawable(getResources().getDrawable(R.drawable.godmode_disabled));\n invulnerable = true;\n }\n }",
"boolean getGodPower();",
"public void COPower(){\r\n COP = true;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Conversion from instant to GPS time. | public static GpsCcsdsTime toGpsTime(final long instant) {
GpsCcsdsTime gpsTime = new GpsCcsdsTime();
long shiftedMillis = instant - GPS_EPOCH_YAMCS_EPOCH_DELTA;
gpsTime.coarseTime = (int) (shiftedMillis / 1000);
gpsTime.fineTime = (byte) (((shiftedMillis % 1000) * 256 / 1000));
return gpsTime;
} | [
"public static long toGpsTimeMillisec(final long instant) {\n return instant - GPS_EPOCH_YAMCS_EPOCH_DELTA;\n }",
"public static long getJavaGpsFromInstant(long instant) {\n return instant - 19000;\n }",
"long getGpsTime();",
"private String timeConversion() {\n Calendar local = Calendar.getInstance();\n Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\n //Time from the PINPoint\n int hours, minutes, seconds, day, month, year;\n hours = (record[10] & 0xF8) >> 3;\n minutes = ((record[10] & 0x07) << 3) + ((record[11] & 0xE0) >> 5);\n seconds = ((record[11] & 0x1F) << 1) + ((record[12] & 0x80) >> 7);\n seconds += (record[12] & 0x7F) / 100;\n day = (record[13] & 0xF8) >> 3;\n month = ((record[13] & 0x07) << 1) + ((record[14] & 0x80) >> 7);\n year = (record[14] & 0x7F) + 2000;\n \n month--; //Months in java are 0-11, PINPoint = 1-12;\n\n //Set GMTs time to be the time from the PINPoint\n GMT.set(Calendar.DAY_OF_MONTH, day);\n GMT.set(Calendar.MONTH, month);\n GMT.set(Calendar.YEAR, year);\n GMT.set(Calendar.HOUR_OF_DAY, hours);\n GMT.set(Calendar.MINUTE, minutes);\n GMT.set(Calendar.SECOND, seconds);\n\n //Local is set to GMTs time but with the correct timezone\n local.setTimeInMillis(GMT.getTimeInMillis());\n\n //Set Local time to be the time converted from GMT\n int lHours, lMinutes, lSeconds, lDay, lMonth, lYear;\n lHours = local.get(Calendar.HOUR_OF_DAY);\n lMinutes = local.get(Calendar.MINUTE);\n lSeconds = local.get(Calendar.SECOND);\n lDay = local.get(Calendar.DAY_OF_MONTH);\n lMonth = local.get(Calendar.MONTH);\n\n lMonth++; //Months in java are 0-11, humans read 1-12\n\n lYear = local.get(Calendar.YEAR);\n\n return hR(lMonth) + \"/\" + hR(lDay) + \"/\" + lYear + \" \" + hR(lHours) + \":\" + hR(lMinutes) + \":\" + hR(lSeconds);\n }",
"public static GpsCcsdsTime getCurrentGpsTime() {\n return toGpsTime(TimeEncoding.currentInstant());\n }",
"public void setTimestamp(long time)\n {\n this.gpsTimestamp = time;\n }",
"public Instant asInstant()\n {\n return timestamp;\n }",
"@Override\n public Instant getInstant()\n {\n return this.epoch.getGlobalTime().plusNanos(this.nanoTime);\n }",
"public long granuleToTime (long gp);",
"public int getTimeToLocation() {\n\t\treturn timeToLocation;\n\t}",
"public Timestamp getToTime()\n {\n return toTime;\n }",
"public void convertToTime()\n { \n assert(seq!=null);\n for(TimeMarker tm : marks)\n tm.convertToTime(seq);\n }",
"public static long toUnixTime(long instant) {\n return taiUtcConverter.instantToUnix(instant);\n }",
"public double getTime(int timePt);",
"public abstract long localToUtc(long localMillis, Strategy strat);",
"public static String toWinCompatibleDateTime(long instant) {\n TaiUtcConverter.DateTimeComponents dtc = taiUtcConverter.instantToUtc(instant);\n StringBuilder sb = new StringBuilder();\n formatOn4Digits(dtc.year, sb); sb.append(\"-\");\n formatOn3Digits(dtc.doy, sb); sb.append(\"T\");\n formatOn2Digits(dtc.hour, sb); sb.append(\"h\");\n formatOn2Digits(dtc.minute, sb); sb.append(\"m\"); \n formatOn2Digits(dtc.second, sb); sb.append(\"s\"); \n formatOn3Digits(dtc.millisec, sb);\n return sb.toString();\n }",
"public Instant getTimestamp();",
"private static Timestamp toTimestamp(Instant instant) {\n return createTimestamp(instant.getEpochSecond(), instant.getNano());\n }",
"public void scheduleGPS() {\n scheduleGPS(false);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that search functionality works right after initial sync. | @Test
@UiThreadTest
@Ignore
// TODO(sdspikes): re-enable once there is a working waitForProgressFragment
public void testSearchAfterSync() throws Throwable {
screenshot("Before Sync Completed");
waitForProgressFragment();
screenshot("After Sync Completed");
click(viewWithId(R.id.action_search));
screenshot("After Search Clicked");
// Check that at least one patient is returned (since clicking search
// should show all patients).
inPatientListClickFirstPatient(); // open patient chart
screenshot("Final State");
} | [
"public void testSearch() {\n doTestSearch();\n }",
"@Test\n public void executeSavedSearch(){\n fillSearchFields();\n int accountID = new AccountDAO().findAccount(\"jkalo@gmail.com\").getId();\n presenter.doSearch();\n presenter.saveSearch();\n\n int counterBeforeSavedSearch = AccountDAO.getSearchID();\n int savedSearchID = new AccountDAO().findAccount(accountID).getStoredSearches().get(0).getSearchId();\n presenter.searchSaved(savedSearchID); //since we do searchID++ on search creation\n Assert.assertEquals(counterBeforeSavedSearch, AccountDAO.getSearchID()); //searchID shouldn't be incremented\n Assert.assertTrue(presenter.hasNextResult());\n }",
"@Test\n public void testSearch2() throws Exception\n {\n unauthenticate();\n Assert.isTrue(actorService.search(\"\").equals(actorService.findAll()));\n }",
"private void doSearch() {\n doSearch(searchString);\n }",
"@Test\n public void saveSearchTwice(){\n fillSearchFields();\n int accountID = new AccountDAO().findAccount(\"jkalo@gmail.com\").getId();\n int savedSearchesSize = new AccountDAO().findAccount(accountID).getStoredSearches().size();\n presenter.doSearch();\n presenter.saveSearch();\n savedSearchesSize++; //number of saved searches after first \"save\"\n presenter.saveSearch();\n Assert.assertEquals(savedSearchesSize, new AccountDAO().findAccount(accountID).getStoredSearches().size());\n }",
"@Test\n public void saveSearch_noExecutedSearch() {\n fillSearchFields();\n int accountID = new AccountDAO().findAccount(\"jkalo@gmail.com\").getId();\n\n int savedSearchesSize = new AccountDAO().findAccount(accountID).getStoredSearches().size();\n //Trying to save a search without actually executing one should do nothing\n presenter.saveSearch();\n Assert.assertEquals(savedSearchesSize, new AccountDAO().findAccount(accountID).getStoredSearches().size());\n }",
"@Test (priority = 0)\n\tpublic void searchTest(){\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.search_query.sendKeys(searchQuery+Keys.ENTER);\n\t\tResultsPage resultsPage =new ResultsPage(driver);\n\t\tassertTrue(resultsPage.result(searchQuery).isDisplayed());\n\t\t\n\t}",
"public void testSearch() throws Exception {\r\n\r\n insertDefaultUsers();\r\n\r\n // find something that isn't there -> should be empty set.\r\n Collection names = store.search(\"XYZ\");\r\n Collection expected = new HashSet();\r\n assertEquals(\"search on something not there returns the wrong records\",\r\n expected, new HashSet(names));\r\n\r\n // find everything\r\n names = store.search(\"%\");\r\n expected.add(\"username\");\r\n expected.add(\"username1\");\r\n expected.add(\"username2\");\r\n expected.add(\"username3\");\r\n assertEquals(\"search on everything finds the wrong records\", expected, new HashSet(names));\r\n\r\n // find everything again\r\n names = store.search(\"username%\");\r\n assertEquals(\"search using wildcards finds the wrong records\", expected, new HashSet(names));\r\n\r\n // show that wildcard works at the end too\r\n names = store.search(\"%1\");\r\n expected.clear();\r\n expected.add(\"username1\");\r\n assertEquals(\"search using wildcards finds the wrong records\", expected, new HashSet(names));\r\n\r\n // find just one (exact match; similar to 'contains')\r\n names = store.search(\"username1\");\r\n expected.clear();\r\n expected.add(\"username1\");\r\n assertEquals(\"search using exact match is wrong\", expected, new HashSet(names));\r\n }",
"@Test\n\tpublic void testSearch() {\n\t\tAssert.assertTrue(\"Check Search Results Page is opened.\", homePage.clickOnAdvancedSearchLink()\n\t\t\t\t.fillSearchForm(\"watch\", \"Price + Shipping: lowest first\").submitForm().isResultPageOpened());\n\t}",
"@Test (priority = 0)\r\n\tpublic void searchTest(){\r\n\t\tHomePage homePage = new HomePage(driver);\r\n\t\thomePage.search_query.sendKeys(searchQuery+Keys.ENTER);\r\n\t\tResultsPage resultsPage =new ResultsPage(driver);\r\n\t\tassertTrue(resultsPage.result(searchQuery).isDisplayed());\r\n\t\t\r\n\t}",
"@Test(timeout = 10000L)\n @Graded(points = 20)\n public void testSearch() throws InterruptedException {\n // Check that the right number of courses are displayed initially\n onView(withId(R.id.recycler_view)).check(countRecyclerView(62));\n\n // CS has no super boring courses!\n // Some manual delay is required for these tests to run reliably\n onView(withId(R.id.search)).perform(searchFor(\"Super Boring Course\", false));\n shadowOf(getMainLooper()).runToEndOfTasks();\n Thread.sleep(100);\n onView(withId(R.id.recycler_view)).check(countRecyclerView(0));\n\n // CS 125 should return one result\n onView(withId(R.id.search)).perform(searchFor(\"CS 125\", false));\n shadowOf(getMainLooper()).runToEndOfTasks();\n Thread.sleep(100);\n onView(withId(R.id.recycler_view)).check(countRecyclerView(1));\n\n // intro matches several courses\n onView(withId(R.id.search)).perform(searchFor(\"intro\", true));\n shadowOf(getMainLooper()).runToEndOfTasks();\n Thread.sleep(100);\n onView(withId(R.id.recycler_view)).check(countRecyclerView(8));\n }",
"public void testSearchMultiThreaded() throws Exception {\n doTestMultiThreads(false);\n }",
"@Test\n public void basicSearchTest() throws InterruptedException {\n String searchTerm = \"HR\";\n Assert.assertTrue(loginPage.isPageLoaded(), \"Login page is not loaded\");\n HomePage homePage = loginPage.login(\"uu08474@gmail.com\", \"hello228606\");\n Assert.assertTrue(homePage.isPageLoaded(),\n \"profile NavItem is not displayed on Login Page\");\n\n SearchPage searchPage = homePage.search(searchTerm);\n Assert.assertTrue(searchPage.isPageLoaded(), \"Login page is not loaded\");\n Assert.assertEquals(searchPage.getSearchResultsCount(), 10, \"Search results count is wrong\");\n List<String> searchResultList = searchPage.getSearchResults();\n\n for (String searchResult : searchResultList){\n Assert.assertTrue(searchResult.toLowerCase().contains(searchTerm.toLowerCase()),\n \"Search Term\" + searchTerm + \" not found\"+ searchResult);\n }\n }",
"public void verifySearchResults(){\n\t}",
"@Test\n\tpublic void searchStringFluentAPI() {\n\t\tfinal TextSearch originalQuery = new TextSearch();\n\t\tfinal TextSearch updatedQuery = originalQuery.searchString(SEARCH_STRING);\n\n\t\tassertSame(originalQuery, updatedQuery);\n\t\tassertEquals(SEARCH_STRING, Deencapsulation.getField(originalQuery, \"searchString\"));\n\t}",
"@Test\n\tpublic void t4searchClientDomainTest(){\n\t\tDriver.waitMilli(500);\n\t\tClientDomainAdminPage.search(\"TestSystemModify\");\n\t\tAssert.assertEquals(true,ClientDomainAdminPage.exists(\"TestSystemModify\"));\n\t}",
"@Ignore\n @Test\n public void testSearch_addMinimalAndFull_searchByName_first() {\n AddressBook book = new AddressBook();\n\n book.AddContact(TestHelper.minimalContact);\n book.AddContact(TestHelper.fullContact);\n\n List<Contact> searchResults =\n book.search(TestHelper.fullContact.getName().getFirstName());\n assertTrue(searchResults.size() == 1);\n assertTrue(TestHelper.compareContacts(searchResults.get(0),\n TestHelper.fullContact));\n }",
"private void doSearchTest() {\n Log.d(TAG, \"doSearchTest: called; waiting for user input\");\n\n final String callbackUrl = \"urn:ietf:wg:oauth:2.0:oob\";\n final String applicationId = \"c2b235f2620e362157a40aec609e737fe5a2547784933e00201ff90358e092c5\";\n final String secret = \"bee75fbb20ce6b45b64113b44208d12aeca02121fee8ea40f1bd9f44b491ba1c\";\n final String authorizationCode = \"ad2311b2860d224f89c32b7dfd4cb99550ba358aef412fae9ad11b52957a8930\";\n// final String callbackUrl = \"urn:ietf:wg:oauth:2.0:oob\";\n// final String applicationId = \"ed87cdb095b49b1fab3231f69ea86311365528aa3e8b3a499666a1030ef58c56\";\n// final String secret = \"89ddacc015dab3471b73bbe45ebdb2a57ae44a9cb7ec3f0e08fb4dca0aaa37fa\";\n// final String authorizationCode = \"5dd588086e5decedad948d1def60f8853b494ba14642a2942cc5761bd44ad97c\";\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Audiosearch client = new Audiosearch().setApplicationId(applicationId).setSecret(secret).build();\n// Audiosearch client = new Audiosearch(applicationId, secret).setSignature(authorizationCode).build();\n// .setApplicationId(applicationId)\n// .setSecret(secret)\n// .build();\n\n Call<EpisodeQueryResult> call = client.searchEpisodes(\"Obama\");\n Log.d(TAG, \"run: Call<EpisodeQueryResult> \" + call);\n Response response = call.execute();\n EpisodeQueryResult eqr = (EpisodeQueryResult) response.body();\n Log.d(TAG, \"run: \" + eqr.getQuery());\n Log.d(TAG, \"run: \" + call.isExecuted());\n Log.d(TAG, \"run: \" + response.message());\n Log.d(TAG, \"run: \" + response.isSuccessful());\n List<EpisodeResult> list = eqr.getResults();\n for (EpisodeResult episodeResult : list) {\n for (AudioFile audiofile : episodeResult.getAudioFiles()) {\n// relatedEpisodes += episode.getTitle() + \" \" + audiofile.getMp3() + \" \";\n SearchAudio sa = new SearchAudio(episodeResult, audiofile);\n Log.d(\"searched\", sa.getShow_title());\n // sa.getMp3() gets the mp3 in String format\n Log.d(\"searched\", sa.getMp3());\n }\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.d(\"search test\",\"IOException\");\n } catch (CredentialsNotFoundException e) {\n e.printStackTrace();\n Log.d(\"search test\",\"CredentialsNotFoundException\");\n } catch (Exception e) {\n e.printStackTrace();\n Log.d(\"search test\", \"Exception\");\n }\n }\n });\n thread.start();\n Log.d(\"doSearchTest\", \"initialized thread...\");\n }",
"public void doFind() {\n updateSearchLists();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
! Loads the module. Loads the module data from the database. | public void load() throws CouldntLoadDataException {
if (isLoaded()) {
return;
}
try {
m_module.load();
} catch (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntLoadDataException | LoadCancelledException e) {
throw new CouldntLoadDataException(e);
}
} | [
"private void loadFromDataBase() \n\t{\n\t\tDBManager db = new DBManager();\n\t\tsetCourseList(db.readCoursesFromDB());\n\t}",
"private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}",
"private void loadData() {\n\n\t\tloadData resp = new loadData();\n\t\tresp.execute();\n\t}",
"private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }",
"private Module loadModule(String moduleId, String ownerId, String copyId) throws NoStorageForModuleException, NoStoredModuleEntityException, StorageFailureException{\n\t\tIModuleStorage storage = storages.get(moduleId);\n\t\tif (storage==null){\n\t\t\tthrow new NoStorageForModuleException(moduleId);\n\t\t}\n\t\treturn storage.loadModule(ownerId, copyId);\n\t}",
"public void load() {\r\n try {\r\n project = ProjectAccessor.findFromTitle(title, conn);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"protected void load() {\n\t\tloadConfigs();\n\t\tloadDatums();\n\t}",
"public static void initModule(Class<? extends DatabaseHolder> generatedClassName) {\n loadDatabaseHolder(generatedClassName);\n }",
"GlobalData loadGlobalData();",
"void loadData();",
"private void loadFromRepository() {\r\n // Iterate in tables loaded\r\n //For each table\r\n Table table;\r\n String tableName;\r\n loadExtendedTable(table, tableName);\r\n }",
"private HTree loadDatabase(String dbName) throws IOException {\n\t\tlong recid = recman.getNamedObject(dbName);\n\t\tif (recid != 0) {\n\t\t\tSystem.out.println(dbName + \" loaded\");\n\t\t\treturn HTree.load(recman, recid);\n\t\t} else {\n\t\t\tHTree htree = HTree.createInstance(recman);\n\t\t\trecman.setNamedObject(dbName, htree.getRecid());\n\t\t\treturn htree;\n\t\t}\n\t}",
"public Module loadModule(String uuid);",
"public void databaseLoad(String type) {\n lists = new MyLinkedList<>();\n\n try {\n List<ShoppingLinkedList> tempList = Databaser.getLists(type);\n for (int i = 0; i < tempList.size(); i++) {\n lists.add(tempList.get(i));\n List<Item> tempItems = Databaser.getItems(type);\n Databaser.showDatabase(type);\n for (int j = 0; j < tempItems.size(); j++) {\n if (tempItems.get(j).getListId() == lists.get(i).getId()) {\n lists.get(i).add(tempItems.get(j));\n }\n }\n }\n } catch (org.hibernate.service.spi.ServiceException e) {\n // Alert if the username or password is wrong\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.getDialogPane().getStylesheets().add(\"main/styles\");\n alert.setTitle(\"Incorrect credentials!\");\n alert.setHeaderText(\"Warning!\");\n alert.setContentText(\"Wrong username or password.\");\n alert.showAndWait();\n }\n VBox loadedBox = addVBox();\n root.setCenter(loadedBox);\n }",
"public void load() {\n QueryHelper.getAccounts(context, databaseLayer, accountRootList);\r\n }",
"@Override\n\tprotected void loadData() {\n\t\tupgradeTypes = upgradeTypeBo.findAll();\n\t}",
"Load createLoad();",
"public void load()\n\t{\n\t\tSystem.out.println(\"Beginning data load...\");\n\t\tloadTrainerID();\n\t\tloadGameData();\n\t\tloadObjectives();\n\t\tloadHouseInt();\n\t\tloadPokemon();\n\t\tInventory.load();\n\t\tPokedex.makeArrays();\n\t\tPokedex.loadFile();\n\t\tpauseMenu[3]=name;\n\t\tSystem.out.println(\"All data loaded\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Creating area...\");\n\t\tcreateCurrentArea();\n\t\tif (!mute)\n\t\t//bgm.loop();\n\t\t\tloopAudioAsset(bgm);\n\t}",
"@Async\n public void loadDataFromDatabase();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .hearts.PlaySingleCardResponse play_single_card_response = 23; | boolean hasPlaySingleCardResponse(); | [
"pb4server.DealHeartAskReq getDealHeartAskReq();",
"@GET(GET_CARD)\n Call<Card> getSingleCard(\n @Path(\"card\") String card\n );",
"public void playCard() {\n\t}",
"public PlayingCard() { //default ctor - same name as class, no parameters, no return type\n cardValue = 1;\n cardSuit = \"Spades\";\n cardColor = \"Black\";\n cardShape = \"Rectangle\";\n cardSymbol = \"A\";\n isFaceUp = true;\n }",
"boolean hasPlayCardRequest();",
"com.czht.face.recognition.Czhtdev.Response getResponse();",
"void playMonumentCard();",
"public Card getCard() {\n return card;\n }",
"FlashCard getCurrentTestFlashCard();",
"public Card getCard(){\n\t\treturn card;\n\t}",
"com.timberliu.chat.server.message.protobuf.ProtobufMessage.HeartBeatResponseOrBuilder getHeartBeatResponseOrBuilder();",
"public void playCard(Card card, int playerId);",
"com.timberliu.chat.server.message.protobuf.ProtobufMessage.HeartBeatResponse getHeartBeatResponse();",
"public abstract void playCard(Card card);",
"com.czht.face.recognition.Czhtdev.ResponseOrBuilder getResponseOrBuilder();",
"public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[i];\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\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }",
"public void selectResponse(String response , Player player);",
"protobuf.clazz.Protocol.PlayerResultResponse getPlayerResult();",
"com.protobuftest.protobuf.GameProbuf.Game.Answer getAnswer();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the tnmp of this pathology data. | @Override
public java.lang.String getTnmp() {
return _pathologyData.getTnmp();
} | [
"@Override\n\tpublic java.lang.String getTnmn() {\n\t\treturn _pathologyData.getTnmn();\n\t}",
"@Override\n\tpublic java.lang.String getTnmpn() {\n\t\treturn _pathologyData.getTnmpn();\n\t}",
"public final double getTn() {\n\t\treturn tn;\n\t}",
"@Override\n\tpublic java.lang.String getTnmm() {\n\t\treturn _pathologyData.getTnmm();\n\t}",
"@Override\n\tpublic java.lang.String getTnml() {\n\t\treturn _pathologyData.getTnml();\n\t}",
"@Override\n\tpublic java.lang.String getTnmv() {\n\t\treturn _pathologyData.getTnmv();\n\t}",
"public int getTNT() {\n return 0;\n }",
"public java.lang.String getProcTM() {\n return procTM;\n }",
"public double getTonnage() {\n return tonnage;\n }",
"public String getTpci() {\n\t\treturn tpci;\n\t}",
"public String getTiresNumber() {\n return tiresNumber;\n }",
"public Long getTnId() {\n return tnId;\n }",
"public Integer getTonnage() {\n return tonnage;\n }",
"public String getTnpncd1() {\r\n return tnpncd1;\r\n }",
"public String getTotype() {\r\n\t\treturn totype;\r\n\t}",
"public java.lang.String getTNW() {\n return TNW;\n }",
"@Override\n\tpublic java.lang.String getTnmr() {\n\t\treturn _pathologyData.getTnmr();\n\t}",
"public long getTiempo() {\n\t\treturn tiempo;\n\t}",
"public String getTgSn() {\n return tgSn;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new software to the system. | boolean add( Software s ); | [
"public void addSoftware(Software software){\n products.add (software);\n }",
"public void addSoftware(Software software) {\r\n if (software == null) {\r\n throw new IllegalArgumentException(\"Software should not be null\");\r\n }\r\n\r\n this.softwareMap.put(software.getId(), software);\r\n }",
"public org.hl7.fhir.String addNewSoftware()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().add_element_user(SOFTWARE$2);\n return target;\n }\n }",
"public edu.umich.icpsr.ddi.SoftwareType addNewSoftware()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.SoftwareType target = null;\n target = (edu.umich.icpsr.ddi.SoftwareType)get_store().add_element_user(SOFTWARE$20);\n return target;\n }\n }",
"public Software addProjectSoftware(String projectId, Software newSoftwareRequest) throws ManagementException;",
"public void addHardwareDeviceToSell()\n {\n try\n {\n String Description=sellDescriptiontxt.getText();\n String Manufacturer=sellManufacturertxt.getText();\n \n int price=Integer.parseInt(pricetxt.getText());\n int tax=Integer.parseInt(taxtxt.getText());\n HardwareDeviceToSell HardwareToSell=new HardwareDeviceToSell(Description, Manufacturer, price,tax);\n equipment.add(HardwareToSell);\n \n JOptionPane.showMessageDialog(frame, \"Sucessfully added GeneratorToSell\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void addSoftwareParam(Integer id, Param param) {\r\n if (id <= 0) {\r\n throw new IllegalArgumentException(\"Software id should be great than 0!\");\r\n }\r\n if (param == null) {\r\n return;\r\n }\r\n\r\n Software software = softwareMap.get(id);\r\n if (software == null) {\r\n software = new Software(id);\r\n software.setParam(param);\r\n softwareMap.put(id, software);\r\n } else {\r\n software.setParam(param);\r\n }\r\n }",
"public void updateSoftware(Software oldSoftware,Software newSoftware){\n products.remove (oldSoftware);\n products.add (newSoftware);\n }",
"private void addToSell()\r\n {\r\n\r\n try\r\n {\r\n String sellDescription = fieldSell_Description.getText().trim();\r\n String manu = fieldSell_Manufacturer.getText().trim();\r\n double price = Double.parseDouble(fieldSell_Price.getText().trim());\r\n double tax = Double.parseDouble(fieldSell_taxRate.getText().trim());\r\n\r\n HardwareDeviceToSell device = new HardwareDeviceToSell(sellDescription, manu, price, tax);\r\n hardwares.add(device);\r\n\r\n JOptionPane.showMessageDialog(frame, \"Your hardware has been added to the selling list.\", \"Information message\", (JOptionPane.INFORMATION_MESSAGE));\r\n }\r\n\r\n catch(NumberFormatException exc)\r\n {\r\n JOptionPane.showMessageDialog(frame, \"Invalid Rate\", \"Error message\", (JOptionPane.ERROR_MESSAGE));\r\n }\r\n }",
"public final void addPeripheralSoftwareDriver(PeripheralSoftwareDriverInterface peripheralSoftwareDriver){\n peripheralSoftware = peripheralSoftwareDriver;\n }",
"String add(VMware vmware);",
"public void setSoftware(boolean software) {\r\n this.software = software;\r\n }",
"public void addHardwareDeviceToRent()\n {\n try\n {\n String Description=rentDescriptiontxt.getText();\n String Manufacturer=rentManufacturertxt.getText();\n \n int downPayment=Integer.parseInt(downPaymenttxt.getText());\n int dailyRate=Integer.parseInt(dailyRatetxt.getText());\n \n HardwareDeviceToRent HardwareToRent=new HardwareDeviceToRent( Description, Manufacturer, downPayment, dailyRate);\n equipment.add(HardwareToRent);\n \n JOptionPane.showMessageDialog(frame, \"Successfully added GeneratorToRent\",\"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void addSoftwareSetting(Integer id, String setting) {\r\n if (id <= 0) {\r\n throw new IllegalArgumentException(\"Software id should be great than 0!\");\r\n }\r\n if (isEmpty(setting)) {\r\n return;\r\n }\r\n\r\n Software software = softwareMap.get(id);\r\n if (software == null) {\r\n software = new Software(id);\r\n software.addSetting(setting);\r\n softwareMap.put(id, software);\r\n } else {\r\n software.addSetting(setting);\r\n }\r\n }",
"public edu.umich.icpsr.ddi.SoftwareType insertNewSoftware(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.SoftwareType target = null;\n target = (edu.umich.icpsr.ddi.SoftwareType)get_store().insert_element_user(SOFTWARE$20, i);\n return target;\n }\n }",
"public void addSystem(ISystem system)\n {\n if (system.start(this))\n {\n systems.add(system);\n }\n }",
"public void addProgram(String name, String description)\n {\n program = name;\n programDescription = description;\n }",
"public void addProduct() {\n\t}",
"public void addProduct() {\n Product result;\n String prodName = getToken(\"Enter product name: \");\n double price = getDouble(\"Enter price per unit: $\");\n result = warehouse.addProduct(prodName, price);\n if (result != null) {\n System.out.println(result);\n }\n else {\n System.out.println(\"Product could not be added.\");\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end getNextLine method Check current line to see if it contains a field label. | private boolean checkNextField () {
lineHasLabel = false;
if (! endOfText()) {
labelEnd = blockIn.indexOf (LABEL_SUFFIX, lineStart);
if (labelEnd >= 0) {
label = blockIn.substring (lineStart, labelEnd).trim();
labelStart = labels.indexOf (label);
if (labelStart >= 0) {
lineHasLabel = true;
}
}
}
return lineHasLabel;
} | [
"public boolean findNextField () {\n if (lineHasLabel) {\n nextLabel = label;\n fieldStart = labelEnd + LABEL_SUFFIX.length();\n nextField = new StringBuilder();\n do {\n if (nextField.length() > 0) {\n nextField.append (GlobalConstants.LINE_FEED);\n }\n if (lineEnd >= fieldStart) {\n fieldEnd = lineEnd;\n nextField.append (blockIn.substring (fieldStart, fieldEnd));\n }\n getNextLine();\n fieldStart = lineStart;\n } while ((! lineHasLabel) && (! endOfBlock()));\n return true;\n } // end if we have a label for the field\n return false;\n }",
"public int getNextFieldIndex () {\n return labelStart;\n }",
"private static String check_for_label(String line, int lc) {\r\n line = line.trim();\r\n int i = line.indexOf(':');\r\n if (i == -1)\r\n return null;\r\n else {\r\n String p = line.substring(0, i).trim();\r\n if (p.equals(\"\")) {\r\n // Store the error in the error table that the ':' is used but still no label\r\n // name is provided\r\n League4.add4(League4.team_statistics4, \"':' symbol is used but still no label name is provided\",\r\n \"LabelNotSuppliedError\", Integer.toString(lc).trim());\r\n return null;\r\n } else {\r\n return p;\r\n }\r\n }\r\n\r\n }",
"abstract boolean isMultilineLabel();",
"boolean hasLabel();",
"@Override\n protected void processLine(String line) {\n if (!line.isEmpty()) {\n String[] rawLabelContent = line.split(\": \");\n fLines.add(new LabeledFileLine(rawLabelContent[0], rawLabelContent[1]));\n }\n }",
"private boolean validateLabels() {\n\t\tboolean toReturn = true;\n\t\t\n\t\tVector v = new Vector();\n\t\t\n\t\tfor( int i = 0; i < this.vField.size(); i ++ ) {\n\t\t\tJTextField field = ( JTextField ) this.vField.elementAt( i );\n\t\t\t\n\t\t\t//make sure there are no blank fields\n\t\t\tif( field.getText() == null || field.getText().equals( \"\" ) ) {\n\t\t\t\tthis.error( \"Please make sure every class has a valid Label\" );\n\t\t\t\ttoReturn = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//make sure this label doesn't already exist\n\t\t\tfor( int j = 0; j < v.size(); j ++ ) {\n\t\t\t\tString s = ( String ) v.elementAt( j );\n\t\t\t\tif( s.equalsIgnoreCase( field.getText() ) ) {\n\t\t\t\t\tthis.error( \"There is more than 1 class with the label - \" + s );\n\t\t\t\t\ttoReturn = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//add a new and novel class label\n\t\t\tv.add( field.getText() );\n\t\t}//end i\n\t\t\n\t\treturn toReturn;\n\t}",
"public boolean hasLines() {\n return fieldSetFlags()[1];\n }",
"private boolean isValidLabel(String label) {\n\t\tfor (int i = 0; i < m_paleoConfig.getShapesTurnedOn().size(); i++) {\n\t\t\tString prim = m_paleoConfig.getShapesTurnedOn().get(i);\n\n\t\t\t// startsWith is a check for Polyline (x)\n\t\t\tif (prim.compareTo(label) == 0 || label.startsWith(prim + \" \"))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean newLineIsNeeded() {\n return ( sourceLine.equals(\"\") || sourcePos >= sourceLine.length() );\n }",
"protected void printLabel()\n {\n String label = getField().getLabel();\n if (label != null)\n {\n println(label);\n }\n }",
"public boolean\nhasNucLabel()\n{\n\tVector labelList = this.getLabelList();\n\tif (labelList == null)\n\t\treturn (false);\n\tif ((labelList.size() <= 0) || (labelList.size() > 2))\n\t\treturn (false);\n\tDrawObject drwObj0 = null;\n\tDrawObject drwObj1 = null;\n\tdrwObj0 = (DrawObject)labelList.elementAt(0);\n\tif (labelList.size() == 2)\n\t\tdrwObj1 = (DrawObject)labelList.elementAt(1);\n\tif ((drwObj1 == null) && (drwObj0 instanceof DrawLineObject))\n\t\treturn (true);\n\tif (drwObj1 == null)\n\t\treturn (false);\n\tif ((drwObj0 instanceof DrawLineObject) && (drwObj1 instanceof DrawStringObject))\n\t{\n\t\ttry\n\t\t{\n\t\t\tint val = Integer.parseInt(((DrawStringObject)drwObj1).getDrawString());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\treturn (false);\n\t\t}\n\t\treturn (true);\n\t}\n\tif ((drwObj1 instanceof DrawLineObject) && (drwObj0 instanceof DrawStringObject))\n\t{\n\t\ttry\n\t\t{\n\t\t\tint val = Integer.parseInt(((DrawStringObject)drwObj0).getDrawString());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\treturn (false);\n\t\t}\n\t\treturn (true);\n\t}\n\treturn (false);\n}",
"public String getNextLabel () {\n return nextLabel;\n }",
"void getNextField () \n\t\t\tthrows IOException, FileNotFoundException {\n \n\t\tcontext.field.setLength(0);\n\t\twhile ((! htmlChar.endsField) && (! atEnd)) {\n\t\t\tgetNextWord();\n\t\t\tif (context.word.length() > 0) {\n\t\t\t\tcontext.field.append (context.word.toString());\n\t\t\t}\n\t\t} \n \n // remove multiple trailing spaces from field\n // if (! context.preformatted) {\n while (context.field.length() > 1\n && context.field.charAt (context.field.length() - 1) == ' '\n && context.field.charAt (context.field.length() - 2) == ' ') {\n context.field.deleteCharAt (context.field.length() - 1);\n }\n // }\n\t}",
"private boolean isListElement(Line line, Line nextLine) {\n\n int pos = 0;\n while (Character.isWhitespace(line.charAt(pos))) {\n pos++;\n }\n\n // is the first non-space character a suitable list marker?\n if (\".-*\".indexOf(line.charAt(pos)) != -1) {\n char listMarker = line.charAt(pos);\n int level = 1;\n pos++;\n // count the list marker's size\n while (line.charAt(pos) == listMarker) {\n pos++;\n level++;\n }\n // we need a whitespace\n if (Character.isWhitespace(line.charAt(pos))) {\n // remember the list level\n line.setListLevel(level);\n line.setListStart(true);\n // remove the list markup\n line.erase(0, pos);\n // remove whitespace\n while (Character.isWhitespace(line.charAt(pos))) {\n line.erase(pos, 1);\n pos++;\n }\n return true;\n }\n }\n\n // test for labelled lists\n if ((line.charAt(line.length() - 1) == ':') &&\n (line.charAt(line.length() - 2) == ':')) {\n int level = 1;\n pos = line.length() - 3;\n while ((pos > 0) && line.charAt(pos) == ':') {\n pos--;\n level++;\n }\n nextLine.setListLevel(level);\n nextLine.setListStart(true);\n line.erase();\n return true;\n }\n\n // test for single line labeled list\n // NOTE: single line labeled list must be level 1\n int position = 0;\n if ((position = line.getText().indexOf(\":: \")) != -1) {\n line.setListLevel(1);\n line.setListStart(true);\n line.erase(0, position+3);\n return true;\n }\n return false;\n }",
"public boolean hasField821() {\n return fieldSetFlags()[821];\n }",
"private static String parseLabel(final String line, final MachineState state) {\n final Matcher matcher = PATTERN_LABEL.matcher(line);\n if (matcher.matches()) {\n // Got a label, store it and the address it represents.\n final String label = matcher.group(\"label\");\n state.labels.put(label, state.instructions.size());\n // Return the remainder of the line.\n return matcher.group(\"rest\");\n } else {\n // No label, return line as-is.\n return line;\n }\n }",
"void onScroll () {\n\n// if main Label is not visible, but the Line is, persistentLabel is set to visible\n if (!visibleNodes.contains(this) && visibleNodes.contains(line))\n persistentLabel.setVisible(true);\n\n// in all other cases, persistentLabel is set to hidden\n else\n persistentLabel.setVisible(false);\n }",
"public String getNextField () {\n return nextField.toString();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a value of property OriginalTextWriter given as an instance of Contact | public static void removeOriginalTextWriter(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {
Base.remove(model, instanceResource, ORIGINALTEXTWRITER, value);
} | [
"public void removeOriginalTextWriter(Contact value) {\r\n\t\tBase.remove(this.model, this.getResource(), ORIGINALTEXTWRITER, value);\r\n\t}",
"public void removeTextWriter(Contact value) {\r\n\t\tBase.remove(this.model, this.getResource(), TEXTWRITER, value);\r\n\t}",
"public void setOriginalTextWriter(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALTEXTWRITER, value);\r\n\t}",
"public static void removeTextWriter(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.remove(model, instanceResource, TEXTWRITER, value);\r\n\t}",
"public void addOriginalTextWriter(Contact value) {\r\n\t\tBase.add(this.model, this.getResource(), ORIGINALTEXTWRITER, value);\r\n\t}",
"public void removeAllOriginalTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALTEXTWRITER);\r\n\t}",
"public void removeOriginalTextWriter( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), ORIGINALTEXTWRITER, value);\r\n\t}",
"public static void removeOriginalTextWriter( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, ORIGINALTEXTWRITER, value);\r\n\t}",
"public static void setOriginalTextWriter(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALTEXTWRITER, value);\r\n\t}",
"public static void addOriginalTextWriter(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.add(model, instanceResource, ORIGINALTEXTWRITER, value);\r\n\t}",
"public static ReactorResult<Contact> getAllOriginalTextWriter_as(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_as(model, instanceResource, ORIGINALTEXTWRITER, Contact.class);\r\n\t}",
"public void removeAllTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), TEXTWRITER);\r\n\t}",
"public void removeTextWriter( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), TEXTWRITER, value);\r\n\t}",
"public static void removeTextWriter( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, TEXTWRITER, value);\r\n\t}",
"public ReactorResult<Contact> getAllOriginalTextWriter_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ORIGINALTEXTWRITER, Contact.class);\r\n\t}",
"public void addTextWriter(Contact value) {\r\n\t\tBase.add(this.model, this.getResource(), TEXTWRITER, value);\r\n\t}",
"public void removeIn_fileNameReport()\r\n {\r\n getSemanticObject().removeProperty(rep_in_fileNameReport);\r\n }",
"public void unsetContactInfo()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CONTACTINFO$2, 0);\n }\n }",
"public void setTextWriter(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), TEXTWRITER, value);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialise a missile fired by the players craft | private void initMissile() {
loadImage("src/resources/missile.png");
getImageDimensions();
} | [
"public Missile(int x, int y) {\r\n\t\tsuper(x, y);\r\n\t\tinitMissile();\r\n\t}",
"protected void fireMissile()\n {\n for ( int i = invaders.length - 1; i >= 0; i-- )\n for ( int j = 0; j < invaders[i].length; j++ )\n if ( invaders[i][j] != null && !isBlocked( i, j ) && new Random().nextInt( invaderMissleChanceOneOutOf ) == 1 )\n for ( int k = 0; k < invaderMissile.length; k++ )\n if ( invaderMissile[k] == null )\n {\n invaderMissile[k] = new SImissile( invaders[i][j].getXPosition() + invaders[i][j].getWidth() / 2,\n invaders[i][j].getYPosition() );\n break;\n }\n\n }",
"public void initialize() {\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\t\tif (AttackRateSeconds > 30)\n\t\t\tAttackRateSeconds = 30.0;\n\n\t\tif (sentryHealth < 0)\n\t\t\tsentryHealth = 0;\n\n\t\tif (sentryRange < 1)\n\t\t\tsentryRange = 1;\n\t\tif (sentryRange > 100)\n\t\t\tsentryRange = 100;\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\n\t\tif (RespawnDelaySeconds < -1)\n\t\t\tRespawnDelaySeconds = -1;\n\n\t\tif (Spawn == null)\n\t\t\tSpawn = myNPC.getBukkitEntity().getLocation();\n\n\n\t\t// defaultSpeed = myNPC.getNavigator().getSpeed();\n\n\t\t((CraftLivingEntity) myNPC.getBukkitEntity()).getHandle().setHealth(sentryHealth);\n\n\t\t_myDamamgers.clear();\n\n\t\tthis.sentryStatus = Status.isLOOKING;\n\t\tfaceForward();\n\n\t\tshootanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),1);\n\t\thealanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),6);\n\n\t\t//\tPacket derp = new net.minecraft.server.Packet15Place();\n\n\n\t\tmyNPC.getBukkitEntity().teleport(Spawn); //it should be there... but maybe not if the position was saved elsewhere.\n\n\t\t// plugin.getServer().broadcastMessage(\"NPC GUARDING!\");\n\n\t\tif (taskID == null) {\n\t\t\ttaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new SentryLogicRunnable(), 40, _logicTick);\n\t\t}\n\n\n\t}",
"public Missile(String name, CMWorld world)\n {\n super(name, world);\n this.setPlatformType(PlatformType.AIR);\n }",
"public void init() {\n mines.putMines();\n\n for (int i = 0; i < tiles.length; i++) {\n tiles[i] = Tile.NEW;\n }\n\n blownUp = false;\n }",
"public Missile(float x, float y, float r) {\r\n\t\tsuper(x, y, r, DAMAGE, SPEED, SIZE, \"projectiles/missile.png\", ProjectileType.PLAYER);\r\n\t\tmissileSound.setVolume(missileSound.play(), MISSILE_SOUND_VOLUME);\r\n\t}",
"@Override\r\n\tpublic void onFire(Entity e) {\r\n\t\t// to position missile you have to find the spaceship sits\r\n\r\n\t\tMissile missile = new Missile(this, new Dimension(SCREEN_WIDTH / 60, SCREEN_HEIGHT / 45));\r\n\t\taddEntity(missile);\r\n\t\tSoundFX.SHOOT.play();\r\n\t\tmissile.setPosition(e.rx + 10, e.ry - 30);\r\n\t\tif ((System.currentTimeMillis() - alienFireTime) > 1000 && level==4)\r\n\t\t\talienDive();\r\n\r\n\t}",
"private Missile getNewMissile()\n {\n final float singleDimensionVelocity = this.singleDimensionVelocity + 500;\n\n return new Missile(atlas, mapDetails, getFrontOfAirplane(), new Vector2(), Math.abs(singleDimensionVelocity),\n Math.abs(pitch), pitch, singleDimensionVelocity, 2000, true);\n }",
"protected void fireMissile()\n {\n if(missileTimer <= 0 && missilesLeft > 0)\n {\n missileTimer = missileDelay;\n newMissiles.add(getNewMissile());\n missilesLeft--;\n }\n }",
"public ChainGun()\r\n\t{\r\n\r\n\t\tthis.baseDamage = 15;\r\n\t\tthis.maxRange = 30;\r\n\t\tthis.rateOfFire = 4;\r\n\t\tthis.maxAmmo = 40;\r\n\t\tthis.currentAmmo = this.maxAmmo;\r\n\t\tthis.shotCounter = this.rateOfFire;\r\n\r\n\t}",
"public Tiles() {\n basketWeave();\n med1();\n med2();\n }",
"@Override\n public void launch()\n {\n if(canLaunch())\n {\n setEnergy(getEnergy()-getLaunchCost());\n launcherBase.launchMissile(targetPos.clone(), launchHeight);\n }\n }",
"public Nim() {\n\n /*\n Instance Variable newPile Initialized to new Pile\n */\n newPile = new Pile() ;\n\n }",
"public Pile()\n\t{\n\t\tthis.sommet = null;\n\n\t\tthis.taille = 0;\n\t}",
"private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }",
"private void fire() {\r\n\t\ttestShot shot = new testShot();\r\n\t\tshot.x = spaceship.getX() + 5;\r\n\t\tshot.x2 = spaceship.getX() + 50;\r\n\t\tshot.y = spaceship.getY();\r\n\t\tshotList.add(shot);\r\n\t}",
"void shoot_ship_missiles(long now) {\n if (pressed_key_codes.contains(KeyCode.SPACE)) {\n // Rate of fire cannot exceed 2 missiles per second\n if (now - missile_timer > 500000000) {\n missile_audio.play();\n Missile missile = ship.shootMissile();\n ImageView ship_missile_image_view = new ImageView(ship_missile_image);\n ship_missile_image_view.setX(missile.x_position);\n ship_missile_image_view.setY(missile.y_position);\n ship_missile_image_view.setFitWidth(Dimensions.SHIP_MISSILE_WIDTH);\n ship_missile_image_view.setFitHeight(Dimensions.SHIP_MISSILE_HEIGHT);\n ship_missile_image_views.add(ship_missile_image_view);\n game_pane.getChildren().add(ship_missile_image_view);\n missile_timer = now;\n }\n }\n }",
"public Shooter() {\n fire1 = new Solenoid(1);\n fire2 = new Solenoid(4);\n returnValve = new Solenoid(3);\n latchSolenoid = new Solenoid(2);\n FFM = true;\n m_enabled = true;\n shooting = false;\n reloading = false;\n initShooter();\n }",
"public Pile() {\n\t\tgenerateTiles();\n\t\tshuffle();\n\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the bulkTransport property. | public boolean isBulkTransport() {
return bulkTransport;
} | [
"public void setBulkTransport(boolean value) {\r\n this.bulkTransport = value;\r\n }",
"public String getTransport() {\n return (String) getAttributeInternal(TRANSPORT);\n }",
"public Boolean getTransport() {\n return transport;\n }",
"public String getTransportType() {\n return transportType;\n }",
"public String getTransport() {\n\t\treturn messageProcessor.getTransport();\n\t}",
"public String getTransportType() {\n\t\treturn transportType;\n\t}",
"public IngressTransportMethod transport() {\n return this.transport;\n }",
"@ApiModelProperty(required = true, value = \"Supported transports for the API (http and/or https).\\n\")\n @JsonProperty(\"transport\")\n public List<String> getTransport() {\n return transport;\n }",
"public Integer getIdTransport() {\r\n return idTransport;\r\n }",
"public JobServiceBusTransportType getTransportType() {\n return this.transportType;\n }",
"public Transport<TransportOutputBuffer> getTransport() {\n return myTransport;\n }",
"public java.lang.String getBulkPayFlag() {\n return bulkPayFlag;\n }",
"Transport getTransport();",
"public final HttpTransport getTransport() {\n return transport;\n }",
"public List<PublicTransport> getTransports(){\r\n return transports;\r\n }",
"public TransportationPersonnel[] getTransportPersonnel() {\r\n return transportPersonnel;\r\n }",
"public TCSObjectReference<TransportOrder> getTransportOrder() {\n return transportOrder;\n }",
"public final boolean isBulkTransfer() {\n return ((getByte(3) & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK);\n }",
"public String getAuditRepositoryTransport() { return this.getOrCreateGlobalProperty(PROP_NAME_AR_TRANSPORT, \"audit-udp\"); }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo costruttore di SaccaWrapper | public SaccaWrapper(List<Sacca> sacche) {
this.sacche = sacche;
} | [
"SCAImplementation createSCAImplementation();",
"private ContaCapitalFrontofficeServiceLocator() {\n\t\tsuper(\"cca_frontoffice\");\n\t}",
"public interface SshCa extends CA {\n\n String CA_TYPE = \"SSHCA\";\n\n Integer getSerialNumberOctetSize();\n void setCaSerialNumberOctetSize(int serialNumberOctetSize);\n\n boolean getUsePrintableStringSubjectDN();\n void setUsePrintableStringSubjectDN(boolean usePrintableStringSubjectDN);\n\n boolean getUseLdapDNOrder();\n void setUseLdapDNOrder(boolean useLdapDNOrder);\n\n}",
"public SiacDContotesoreria() {\n\t}",
"private SCUpgradeCaFactory() {}",
"SimpleClass2SimpleClass getCONTEXT__CORR__SC2SC();",
"public static void createSacs() {\n BigWarpDemo.demo2d();\n BigWarpDemo.demo3d();\n AffineTransformSourceDemo.demo(2);\n ResamplingDemo.demo();\n }",
"public CtrAcceso() {\n acceso = new Acceso();\n mdlAcceso = new MdlAcceso();\n }",
"public SiacTRecapitoSoggetto() {\n\t}",
"protected void initializeFromCos() {\n // do nothing by default\n }",
"public ModelVca() {\n\t\tsuper();\n\t\tvcajSyn = new JSynVCA();\n\t}",
"private CSAskUserData() {}",
"private static CAS getCAS() {\n CASMgr casMgr0 = CASFactory.createCAS();\n CASMgr casMgr = null;\n try {\n // this call does nothing: because 2nd arg is null\n CasCreationUtils.setupTypeSystem(casMgr0, null);\n // Create a writable type system.\n TypeSystemMgr tsa = casMgr0.getTypeSystemMgr();\n\n // Commit the type system.\n ((CASImpl) casMgr0).commitTypeSystem();\n\n casMgr = CASFactory.createCAS(tsa);\n\n // Create the Base indexes.\n casMgr.initCASIndexes();\n // Commit the index repository.\n FSIndexRepositoryMgr irm = casMgr.getIndexRepositoryMgr();\n\n irm.commit();\n } catch (ResourceInitializationException e) {\n e.printStackTrace();\n } catch (CASException e) {\n e.printStackTrace();\n }\n\n // Create the default text Sofa and return CAS view\n return casMgr.getCAS().getCurrentView();\n }",
"public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Catalogo_causalLocal getCatalogo_causal();",
"public accionDocumentos() {\n \n }",
"public SiacTPersonaFisicaMod() {\n\t}",
"private SCAskUserData() {}",
"protected AstroCatTable() {\n }",
"public Atracoes() {\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.