query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
JDBC 2.0 Retrieves the result set concurrency. | @Override
public int getResultSetConcurrency() throws SQLException {
throw new SQLException("tinySQL does not support ResultSet concurrency.");
} | [
"int getResultSetConcurrency() throws SQLException;",
"public int getResultSetConcurrency() throws java.sql.SQLException {\r\n return wrappedStatement.getResultSetConcurrency();\r\n }",
"JDBCSource<C> setResultSetConcurrency(String resultSetConcurrency);",
"public int getResultSetConcurrency() throws SQLException {\n return currentPreparedStatement.getResultSetConcurrency();\n }",
"public int getConcurrency() throws SQLException\n {\n return m_rs.getConcurrency();\n }",
"int xlateRSConcurrency(int concurrency) throws SQLException {\n\n SQLWarning w;\n String msg;\n\n switch (concurrency) {\n\n case JDBCResultSet.CONCUR_READ_ONLY : {\n return concurrency;\n }\n case JDBCResultSet.CONCUR_UPDATABLE : {\n msg = \"CONCUR_UPDATABLE => CONCUR_READ_ONLY\";\n w = new SQLWarning(msg, \"SOO10\",\n ErrorCode.JDBC_INVALID_ARGUMENT);\n\n addWarning(w);\n\n return JDBCResultSet.CONCUR_READ_ONLY;\n }\n default : {\n msg = \"ResultSet concurrency: \" + concurrency;\n\n throw Util.invalidArgument(msg);\n }\n }\n }",
"public boolean supportsResultSetConcurrency( int type,\n int concurrency)\n throws SQLException\n {\n return false;\n }",
"public int getConcurrency() throws SQLException {\n\n try {\n debugCodeCall(\"getConcurrency\");\n checkClosed();\n UpdatableRow row = new UpdatableRow(conn, result);\n return row.isUpdatable() ? ResultSet.CONCUR_UPDATABLE : ResultSet.CONCUR_READ_ONLY;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public boolean supportsResultSetConcurrency(int type, int concurrency)\n throws SQLException {\n // jTDS supports both read-only and updatable ResultSets (more or less)\n return true;\n }",
"public TransactionConcurrency concurrency();",
"void setResultSetConcurrency(int concurrencyFlag) {\n\t\t_resultSetConcurrency = concurrencyFlag;\n\t}",
"ResultSet getResultSet();",
"public void testCursorResultSetConcurrency0003() throws Exception\n {\n Statement stmt0 = con.createStatement();\n stmt0.execute(\"create table #SAfe0003(id int primary key, val varchar(20) null) \"+\n \"insert into #SAfe0003 values (1, 'Line 1') \"+\n \"insert into #SAfe0003 values (2, 'Line 2')\");\n while( stmt0.getMoreResults() || stmt0.getUpdateCount()!=-1 );\n\n final Object o1=new Object(), o2=new Object();\n final Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\n int threadCount = 25;\n Thread threads[] = new Thread[threadCount];\n\n started = done = 0;\n\n for( int i=0; i<threadCount; i++ )\n {\n threads[i] = new Thread()\n {\n public void run()\n {\n ResultSet rs = null;\n\n try\n {\n rs = stmt.executeQuery(\"SELECT * FROM #SAfe0003\");\n\n // Synchronize all threads\n synchronized( o2 )\n {\n synchronized( o1 )\n {\n started++;\n o1.notify();\n }\n try{ o2.wait(); } catch( InterruptedException e ) {}\n }\n\n assertNotNull(\"executeQuery should not return null\", rs);\n assertTrue(rs.next());\n assertTrue(rs.next());\n assertTrue(!rs.next());\n assertTrue(rs.previous());\n assertTrue(rs.previous());\n assertTrue(!rs.previous());\n }\n catch( SQLException e )\n {\n e.printStackTrace();\n fail(\"An SQL Exception occured: \"+e);\n }\n finally\n {\n if( rs != null )\n try{ rs.close(); } catch( SQLException e ) {}\n }\n\n // Notify that we're done\n synchronized( o1 )\n {\n done++;\n o1.notify();\n }\n }\n };\n threads[i].start();\n }\n\n while( true )\n {\n synchronized( o1 )\n {\n if( started == threadCount )\n break;\n o1.wait();\n }\n }\n\n synchronized( o2 )\n {\n o2.notifyAll();\n }\n\n boolean passed = true;\n\n for( int i=0; i<threadCount; i++ )\n {\n stmt0 = con.createStatement();\n ResultSet rs = stmt0.executeQuery(\"SELECT 1234\");\n passed &= rs.next();\n passed &= !rs.next();\n stmt0.close();\n }\n\n while( true )\n {\n synchronized( o1 )\n {\n if( done == threadCount )\n break;\n o1.wait();\n }\n }\n\n for( int i=0; i<threadCount; i++ )\n threads[i].join();\n\n stmt0.close();\n stmt.close();\n\n assertTrue(passed);\n }",
"int getFetchSize() throws SQLException;",
"Integer getConcurrency();",
"int getCacheConcurrency();",
"public ResultSet getRecords() throws SQLException{\n Statement stmt = getConnection().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n String sqlGet = \"SELECT * FROM myStudents\";\n stmt.executeQuery(sqlGet);\n ResultSet rs = stmt.getResultSet();\n return rs;\n }",
"@Override\n public int getResultSetHoldability() throws SQLException {\n return 0;\n }",
"protected ResultSetImpl getResultSet(StatementImpl callingStatement, long columnCount, int maxRows, int resultSetType, int resultSetConcurrency,\n boolean streamResults, String catalog, boolean isBinaryEncoded, Field[] metadataFromCache) throws SQLException {\n Buffer packet; // The packet from the server\n Field[] fields = null;\n\n // Read in the column information\n\n if (metadataFromCache == null /* we want the metadata from the server */) {\n fields = new Field[(int) columnCount];\n\n for (int i = 0; i < columnCount; i++) {\n Buffer fieldPacket = null;\n\n fieldPacket = readPacket();\n fields[i] = unpackField(fieldPacket, false);\n }\n } else {\n for (int i = 0; i < columnCount; i++) {\n skipPacket();\n }\n }\n\n // There is no EOF packet after fields when CLIENT_DEPRECATE_EOF is set\n if (!isEOFDeprecated() ||\n // if we asked to use cursor then there should be an OK packet here\n (this.connection.versionMeetsMinimum(5, 0, 2) && callingStatement != null && isBinaryEncoded && callingStatement.isCursorRequired())) {\n\n packet = reuseAndReadPacket(this.reusablePacket);\n readServerStatusForResultSets(packet);\n }\n\n //\n // Handle cursor-based fetch first\n //\n\n if (this.connection.versionMeetsMinimum(5, 0, 2) && this.connection.getUseCursorFetch() && isBinaryEncoded && callingStatement != null\n && callingStatement.getFetchSize() != 0 && callingStatement.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY) {\n ServerPreparedStatement prepStmt = (com.mysql.jdbc.ServerPreparedStatement) callingStatement;\n\n boolean usingCursor = true;\n\n //\n // Server versions 5.0.5 or newer will only open a cursor and set this flag if they can, otherwise they punt and go back to mysql_store_results()\n // behavior\n //\n\n if (this.connection.versionMeetsMinimum(5, 0, 5)) {\n usingCursor = (this.serverStatus & SERVER_STATUS_CURSOR_EXISTS) != 0;\n }\n\n if (usingCursor) {\n RowData rows = new RowDataCursor(this, prepStmt, fields);\n\n ResultSetImpl rs = buildResultSetWithRows(callingStatement, catalog, fields, rows, resultSetType, resultSetConcurrency, isBinaryEncoded);\n\n if (usingCursor) {\n rs.setFetchSize(callingStatement.getFetchSize());\n }\n\n return rs;\n }\n }\n\n RowData rowData = null;\n\n if (!streamResults) {\n rowData = readSingleRowSet(columnCount, maxRows, resultSetConcurrency, isBinaryEncoded, (metadataFromCache == null) ? fields : metadataFromCache);\n } else {\n rowData = new RowDataDynamic(this, (int) columnCount, (metadataFromCache == null) ? fields : metadataFromCache, isBinaryEncoded);\n this.streamingData = rowData;\n }\n\n ResultSetImpl rs = buildResultSetWithRows(callingStatement, catalog, (metadataFromCache == null) ? fields : metadataFromCache, rowData, resultSetType,\n resultSetConcurrency, isBinaryEncoded);\n\n return rs;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field jobApplicationId is set (has been assigned a value) and false otherwise | public boolean isSetJobApplicationId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JOBAPPLICATIONID_ISSET_ID);
} | [
"public boolean isSetApplicationId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPLICATIONID_ISSET_ID);\n }",
"public boolean isSetJobid() {\n return __isset_bit_vector.get(__JOBID_ISSET_ID);\n }",
"public boolean isSetJobID() {\r\n return __isset_bit_vector.get(__JOBID_ISSET_ID);\r\n }",
"public boolean isSetApp_id() {\n return this.app_id != null;\n }",
"public boolean isSetJobnumber() {\n return this.jobnumber != null;\n }",
"public boolean isNotNullApplicationID() {\n return genClient.cacheValueIsNotNull(CacheKey.applicationID);\n }",
"public boolean hasApplicationID() {\n return genClient.cacheHasKey(CacheKey.applicationID);\n }",
"public boolean isSetJobId() {\n return this.jobId != null;\n }",
"public boolean isSetApplication()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(APPLICATION$40) != null;\r\n }\r\n }",
"public boolean isSetAppid() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPID_ISSET_ID);\n }",
"public boolean isSetAppId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPID_ISSET_ID);\n }",
"public boolean isSetApplication() {\n return this.application != null;\n }",
"public boolean isSetApplicationInterfaceId() {\n return this.applicationInterfaceId != null;\n }",
"public boolean isSetApplicationIdList() {\n return this.applicationIdList != null;\n }",
"public boolean isSetEmpId() {\n return this.empId != null;\n }",
"public boolean isSetAppStoreCode() {\n return this.appStoreCode != null;\n }",
"public boolean isSetAppStoreCode() {\n return this.appStoreCode != null;\n }",
"public boolean isSetApplicationTime() {\n return this.applicationTime != null;\n }",
"public boolean isSetProgramIds() {\n return this.programIds != null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the Optional Frequency. | public Optional<Frequency> getFrequency() {
return Optional.ofNullable(freq);
} | [
"java.lang.String getFrequency();",
"double getFrequency();",
"int getFrequency();",
"public java.lang.Integer getFrequency() {\n return frequency;\n }",
"public int getFreq() {\r\n return frequency;\r\n }",
"public double getFreq() \r\n {\r\n return this.freq;\r\n }",
"public int getFreqValue() {\n return freqValue;\n }",
"public int getFrequencyFactor() {\n return frequencyFactor;\n }",
"public double getFrequency() {\n double pow = octave.getValue();\n return pitch.getFrq() * Math.pow(2.0, pow);\n }",
"Optional<Integer> getAudioSamplingRateHz();",
"public boolean hasFrequency() {\n return fieldSetFlags()[1];\n }",
"public TimeUnit getFrequency() {\n\t\treturn tFrequency;\n\t}",
"int getFrequency(float value);",
"public int getMaxfrequency() {\n return maxfrequency;\n }",
"public double getFundamentalFrequency() {\r\n\t\treturn this.note.getFrequency(this.octave);\r\n\t}",
"ubii.processing.ProcessingModuleOuterClass.ProcessingMode.FrequencyOrBuilder getFrequencyOrBuilder();",
"@ApiModelProperty(example = \"null\", value = \"['IMMEDIATE' or 'ONCE' or 'WEEKLY' or 'BIWEEKLY' or 'TWICEMONTHLY' or 'FOURWEEKS' or 'MONTHLY' or 'BIMONTHLY' or 'QUARTERLY' or 'SEMIANNUALLY' or 'ANNUALLY']: Frequency of the transfer. If frequency is other than 'Immediate' and 'Once', one of open ended flag, transfer count or end date must be provided\")\n public Object getFrequency() {\n return frequency;\n }",
"ubii.processing.ProcessingModuleOuterClass.ProcessingMode.Frequency getFrequency();",
"public String getStopFreq() {\n\t\treturn \"FREQ:SWEEP:STOP?$\";\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes the quantity value (also known as line units) for the line at the given index in both the data model the current sale | public void changeLineQuantity(int lineIndex, int quantity) {
String newQty;
if(quantity == 0 && activeSale) {
voidLineItem(lineIndex);
}
else {
if(activeSale) {
if(quantity < 0) {
int response = JOptionPane.showConfirmDialog(null, "Add returned product(s) to inventory?", "Adjust stock counts?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if(response == JOptionPane.YES_OPTION) {
Line lineItem = currentSale.getLineItems().get(lineIndex);
lineItem.setQuantity(quantity);
lineItem.setDoNotAdjustFlag(false);
newQty = String.valueOf(lineItem.getLineUnits());
dataModel.setValueAt(newQty, lineIndex, 0);
dataModel.setValueAt(lineItem.getLineAmount(), lineIndex, 4);
calculateTotal();
}
else {
Line lineItem = currentSale.getLineItems().get(lineIndex);
lineItem.setQuantity(quantity);
lineItem.setDoNotAdjustFlag(true);
newQty = String.valueOf(lineItem.getLineUnits());
dataModel.setValueAt(newQty, lineIndex, 0);
dataModel.setValueAt(lineItem.getLineAmount(), lineIndex, 4);
calculateTotal();
}
}
else {
Line lineItem = currentSale.getLineItems().get(lineIndex);
lineItem.setQuantity(quantity);
lineItem.setDoNotAdjustFlag(false);
newQty = String.valueOf(lineItem.getLineUnits());
dataModel.setValueAt(newQty, lineIndex, 0);
dataModel.setValueAt(lineItem.getLineAmount(), lineIndex, 4);
calculateTotal();
}// End else
}// End if
}// End else
} | [
"public void voidLineItem(int lineIndex) {\r\n\t\tif(activeSale) {\r\n\t\t\tLine lineItem = currentSale.getLineItems().get(lineIndex);\r\n\t\t\tcurrentSale.removeLineItem(lineItem);\r\n\t\t\tdataModel.removeRow(lineIndex);\r\n\t\t\tcalculateTotal();\r\n\t\t}\r\n\t}",
"public void setQuantity(final int index, final int quantity)\n {\n final ComplexFactory factory = this.factories.get(index);\n if (factory.getQuantity() != quantity)\n {\n factory.setQuantity(quantity);\n calculateBaseComplex();\n updateShoppingList();\n }\n }",
"@Override\n public void updateProductQuantity(String product, int quantity) {\n\n }",
"public void replaceOrderline(int lineIndex, Interface_IngredientReadOnly nutrient, int amount, double price) {\n orderLines.set(lineIndex, new PurchaseOrderLine(nutrient, amount, price));\n pendingUpdate = true;\n }",
"public void setOrderLine (MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)\n\t{\n\t\tMOrgPOS orgpos = MOrgPOS.getOrgPos(getCtx(), oLine.getParent().getAD_Org_ID(), get_Trx());\n\t\tif(M_Locator_ID > 0 && (oLine.getParent().getC_DocTypeTarget_ID() == orgpos.getDocType_Ticket_ID()))\n\t\t\tM_Locator_ID = oLine.get_ValueAsInt(\"M_Locator_ID\")>0?oLine.get_ValueAsInt(\"M_Locator_ID\"):orgpos.getM_LocatorStock_ID();\n\t\tsetC_OrderLine_ID(oLine.getC_OrderLine_ID());\n\t\tsetLine(oLine.getLine());\n\t\tsetC_UOM_ID(oLine.getC_UOM_ID());\n\t\tMProduct product = oLine.getProduct();\n\t\tif (product == null)\n\t\t{\n\t\t\tsetM_Product_ID(0);\n\t\t\tsetM_AttributeSetInstance_ID(0);\n\t\t\tsuper.setM_Locator_ID(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetM_Product_ID(oLine.getM_Product_ID());\n\t\t\tsetM_AttributeSetInstance_ID(oLine.getM_AttributeSetInstance_ID());\n\t\t\t//\n\t\t\tif (product.isItem())\n\t\t\t{\n\t\t\t\tif (M_Locator_ID == 0)\n\t\t\t\t\tsetM_Locator_ID(Qty);\t//\trequires warehouse, product, asi\n\t\t\t\telse\n\t\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t\t}\n\t\t\telse\n\t\t\t\tsuper.setM_Locator_ID(0);\n\t\t}\n\t\tsetC_Charge_ID(oLine.getC_Charge_ID());\n\t\tsetDescription(oLine.getDescription());\n\t\tsetIsDescription(oLine.isDescription());\n\t\t//\n\t\tsetAD_Org_ID(oLine.getAD_Org_ID());\n\t\tsetC_Project_ID(oLine.getC_Project_ID());\n\t\tsetC_ProjectPhase_ID(oLine.getC_ProjectPhase_ID());\n\t\tsetC_ProjectTask_ID(oLine.getC_ProjectTask_ID());\n\t\tsetC_Activity_ID(oLine.getC_Activity_ID());\n\t\tsetC_Campaign_ID(oLine.getC_Campaign_ID());\n\t\tsetAD_OrgTrx_ID(oLine.getAD_OrgTrx_ID());\n\t\tsetUser1_ID(oLine.getUser1_ID());\n\t\tsetUser2_ID(oLine.getUser2_ID());\n\t}",
"public void updateQuantityInStock(int index, int quantity) throws NotEnoughStockException\n\t{\n\t\tthis.productManager.updateQuantityInStock(index, quantity);\n\t}",
"public void changeProductQty() {\n String productID = getToken(\"Enter the products id that you want to modify: \");\n String qty = getToken(\"Enter the amount that you would like to change the quantity to: \");\n int newQty = Integer.parseInt(qty);\n Product result = warehouse.changeQty(productID, newQty);\n if (result.getQuantity() != newQty)\n System.out.println(\"Products quantity could not be changed.\");\n else\n System.out.println(result);\n }",
"public void setQty(int value) {\n this.qty = value;\n }",
"public void setLineItem(int value) {\n this.lineItem = value;\n }",
"void setQuantity(int quantity);",
"public Product changeAmount(String product, int quantity);",
"void updateStock(String productId, long noOfUnits);",
"public void setLineItemNumber(int value)\n {\n lineItemNumber = value;\n }",
"public abstract void setInDataStorage(int index, String line);",
"public void setQuantity(int quantity);",
"public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }",
"void setOrderedQuantity(int orderedQuantity);",
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public void setQuantity(int quantity) {\r\n // needs validation\r\n this.minQty = quantity;\r\n setDiscountDesc();\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo NONNULL_PTR this_ptr); | public static native byte[] ChannelInfo_get_node_two(long this_ptr); | [
"public static native long ChannelInfo_get_two_to_one(long this_ptr);",
"public static native long ChannelInfo_get_one_to_two(long this_ptr);",
"public static native byte[] ChannelInfo_get_node_one(long this_ptr);",
"public static native void ChannelInfo_set_node_two(long this_ptr, byte[] val);",
"public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_2(long this_ptr);",
"public static native byte[] ChannelAnnouncement_get_node_signature_2(long this_ptr);",
"public static native byte[] UnsignedChannelAnnouncement_get_node_id_2(long this_ptr);",
"public Node getNode2(){\n\t\treturn node2;\n\t}",
"public static native byte[] ChannelAnnouncement_get_node_signature_1(long this_ptr);",
"public Node getNode2() {\n\t\tif (this.n2 == null)\n\t\t\tSystem.out.println(\"NODE 2 IS NULLL!!!!!!\");\n\t\treturn this.n2;\n\t}",
"public NodePair getNodePair(){\n\t\treturn new NodePair(node1, node2);\n\t}",
"public static native long UserConfig_get_own_channel_config(long this_ptr);",
"public ChannelID getChannelID2() {\n return channelID2;\n }",
"public Node getNode2() {\n return node2;\n }",
"public AbstractNode getNode2() {\n\t\treturn this.node2;\n\t}",
"public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_1(long this_ptr);",
"public static native byte[] ChannelCounterparty_get_node_id(long this_ptr);",
"public static native long ChannelDetails_get_counterparty(long this_ptr);",
"public static native Network ChainParameters_get_network(long this_ptr);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the contents of the high level code pane. | public String getHighLevelCode() {
return mHighLevelTextPane.getText();
} | [
"public CodePane getHighLevelTextPane() {\n return mHighLevelTextPane;\n }",
"public CodeArea getCurCodeArea( ) {\n if (this.getTabs().size()>0) {\n Tab selectedTab = getCurTab();\n VirtualizedScrollPane vsp = (VirtualizedScrollPane) selectedTab.getContent();\n return (CodeArea) vsp.getContent();\n }\n else return null;\n }",
"public String screenContents() {\r\n return frame.contents() ;\r\n }",
"public CodePane getEARTextPane() {\n return mEARTextPane;\n }",
"public String getPageContents(){ \n String content =super.getPageContents();\n int startPos;\n int EndPos;\n startPos = content.indexOf(\"</script>\");\n EndPos = content.lastIndexOf(\"</section>\");\n content = content.substring(startPos, EndPos);\n content = content.replaceAll(\"\\\\<.*?\\\\>\", \"\");\n content = content.replaceAll(\"[\\\\t ]\", \"\");\n return content;\n }",
"public Contents getGContentPane(){\r\n return GContentPane;\r\n }",
"public Container getContentPane() {\n\t\treturn contentPane;\n\t}",
"public String getSourceCode() {\n return EditorUtilities.getSourceCode(this);\n }",
"public JPanel getContentPane()\r\n\t{\r\n\t\treturn contentPanel;\r\n\t}",
"public CodePane getEFTextPane() {\n return mEFTextPane;\n }",
"public Component getContentPane()\n\t{\n\t\treturn getComponent(0);\n\t}",
"public String getCodeBlock() {\n return codeBlock;\n }",
"private void setupCodeView() {\n String lines = getCodeStringFromLines();\n codeView.setOptions(Options.Default.get(this).withTheme(ColorTheme.MONOKAI));\n codeView.setCode(lines);\n }",
"public CodeAttributeDetailPane getCodeAttributeDetailPane() {\n\t\treturn (CodeAttributeDetailPane) attributeTypeToDetailPane.get(\n\t\t\tSCREEN_CODE);\n\t}",
"public JPanel getBody() {\n\t\treturn contentPane;\n\t}",
"public String sourceCode() {\n\t\treturn m_sourceCode;\n\t}",
"public Component getEditor() {\r\n\t\treturn panel;\r\n\t}",
"private JPanel getMainPane() {\n\t\treturn this.main;\n\t}",
"public HBox getPane() {\n\t\treturn _statusBar;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the technician who owns the ticket. | public Technician getOwner()
{
return owner;
} | [
"public java.lang.String getTicket()\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(TICKET$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getTicketCreatedBy() {\n\t\treturn TicketCreatedBy;\n\t}",
"public Clinic getuClinic() {\n\t\treturn uClinic;\n\t}",
"public java.lang.String getElectronicTicket() {\r\n return electronicTicket;\r\n }",
"public String getCrtUser() {\n return crtUser;\n }",
"public UserTicket getUserTicket() {\n return FxJsfUtils.getRequest().getUserTicket();\n }",
"public XCN getResponsiblePhysicianID() { \r\n\t\tXCN retVal = this.getTypedField(30, 0);\r\n\t\treturn retVal;\r\n }",
"public org.apache.xmlbeans.XmlString xgetTicket()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TICKET$0, 0);\n return target;\n }\n }",
"java.lang.String getTicketId();",
"public Integer getTechOperateUserId() {\n return techOperateUserId;\n }",
"public String getTicket() {\n return ticket;\n }",
"public String getTicketYn() {\r\n return ticketYn;\r\n }",
"public CorporateUser getCandidateOwner() {\n\t\tif (candidateOwner == null) {\n\t\t\tsetCandidateOwner(findCorporateUser(getCandidate().getOwner().getId()));\n\t\t}\n\t\treturn candidateOwner;\n\t}",
"private static String getUserOwnerSelection(Team chosenTeam) {\n List<String> teamOwners = chosenTeam.getTeamOwnersString();\n int i=0;\n\n String username = UIController.receiveString(\"Choose a Team Owner Number:\",teamOwners);\n return username;\n }",
"public java.lang.String getTicketName () {\n\t\treturn ticketName;\n\t}",
"String getAssignee();",
"public int getClinicianID() {\n\t\treturn clinicianID;\n\t}",
"public String getExternalTicketId()\n {\n return this.m_strExternalTicketId;\n }",
"public User getInvestor() {\n return investor;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'var179' field. | public void setVar179(java.lang.CharSequence value) {
this.var179 = value;
} | [
"public com.dj.model.avro.LargeObjectAvro.Builder setVar179(java.lang.CharSequence value) {\n validate(fields()[180], value);\n this.var179 = value;\n fieldSetFlags()[180] = true;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar180(java.lang.CharSequence value) {\n validate(fields()[181], value);\n this.var180 = value;\n fieldSetFlags()[181] = true;\n return this;\n }",
"public void setVar159(java.lang.Integer value) {\n this.var159 = value;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar173(java.lang.Boolean value) {\n validate(fields()[174], value);\n this.var173 = value;\n fieldSetFlags()[174] = true;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar178(java.lang.Integer value) {\n validate(fields()[179], value);\n this.var178 = value;\n fieldSetFlags()[179] = true;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar159(java.lang.Integer value) {\n validate(fields()[160], value);\n this.var159 = value;\n fieldSetFlags()[160] = true;\n return this;\n }",
"public void setVar180(java.lang.CharSequence value) {\n this.var180 = value;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar181(java.lang.Integer value) {\n validate(fields()[182], value);\n this.var181 = value;\n fieldSetFlags()[182] = true;\n return this;\n }",
"public void setVar181(java.lang.Integer value) {\n this.var181 = value;\n }",
"public void setVar189(java.lang.CharSequence value) {\n this.var189 = value;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar189(java.lang.CharSequence value) {\n validate(fields()[190], value);\n this.var189 = value;\n fieldSetFlags()[190] = true;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar171(java.lang.CharSequence value) {\n validate(fields()[172], value);\n this.var171 = value;\n fieldSetFlags()[172] = true;\n return this;\n }",
"public void setVar190(java.lang.Integer value) {\n this.var190 = value;\n }",
"public void setVar178(java.lang.Integer value) {\n this.var178 = value;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar158(java.lang.Float value) {\n validate(fields()[159], value);\n this.var158 = value;\n fieldSetFlags()[159] = true;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar190(java.lang.Integer value) {\n validate(fields()[191], value);\n this.var190 = value;\n fieldSetFlags()[191] = true;\n return this;\n }",
"public void setVar91(java.lang.Integer value) {\n this.var91 = value;\n }",
"public void setVar79(java.lang.Integer value) {\n this.var79 = value;\n }",
"public void setVar171(java.lang.CharSequence value) {\n this.var171 = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a connection state listener. | public void addConnectionStateListener(ConnectionStateListener listener); | [
"public void registerConnectionStateListener(final ConnectionStateListener listener);",
"public void addConnectionEventListener(ConnectionListener listener);",
"public void addConnectionListener(ConnectionListener listener);",
"public void addStateListener(IStateListener listener);",
"public void addClientStateListener( ClientStateListener listener );",
"public synchronized void addClientConnectionStatusListener(ClientConnectionStatusListener listener)\n\t{\n\t\tlisteners.add(listener);\n\t}",
"public void registerConnectionStateListener(ConnectionStateListener connectionStateListener, Executor executor) {\n curatorClient.registerConnectionStateListener(connectionStateListener, executor);\n }",
"@Override\n public void addOnStateListener(OnStateListener listener) {\n onStateListeners_.add(listener);\n }",
"public void addConnectionListener(ConnectionListener listener) {\n this.connectionListeners.add(listener);\n }",
"public interface ConnectionStateSupplier {\n\t/**\n\t * Registers the passed connected state listener\n\t * @param listener The connected state listener to register\n\t */\n\tpublic void registerConnectionStateListener(final ConnectionStateListener listener);\n\n\t/**\n\t * Unregisters the passed connected state listener\n\t * @param listener The connected state listener to unregister\n\t */\n\tpublic void removeConnectionStateListener(final ConnectionStateListener listener);\n}",
"public void setConnectionListener(ConnectionListener listener);",
"void connectionStateChanged(ConnectionState state);",
"void addStateListener(MessengerStateListener listener);",
"public void addConnectionEventListener(ConnectionEventListener listener) {\n eventListener.addConnectorListener(listener);\n }",
"void notifyConnectionStateChanged(State state);",
"public void addConnectedCallback(OctaveReference listener) {\n\t\tlistenerConnected.add(listener);\n\t}",
"public void setOnConnectionStateChangedListener(ConnectionStateChangedListener listener) {\n\t\tthis.mConnectionListener = listener;\n\t}",
"void notifyConnectionListener(ConnectionListener listener);",
"public void addStateListener(IStateListener<E> listener){\n \tif(listener!=null){\n \t\tstateListenerList.add(listener);\n \t}\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ start thread used to repaint image at fixed intervals whenever scn_repaint has been set true | public synchronized void start_scn_updates() {
if (scn_update_thread == null){
scn_update_thread = new Thread(this);
scn_update_thread.start();
}
scn_ready = true;
repaint();
scn_repaint = true;
} | [
"@Override\n public void run(){\n\n while(true){\n\n repaint();\n try {\n Thread.sleep(1000 / frameRate);\n } catch (InterruptedException e) {}\n \n \n }\n }",
"public void run() {\r\n\t\t\r\n\t\tlong lastTime = new Date().getTime();\r\n\t\t\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tlong ct = new Date().getTime();\r\n\t\t\tif (ct-lastTime < 50)\r\n\t\t\t\ttry {\r\n\t\t\t\t\t//thread.slee(10-ct+lastTime);\r\n\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tlastTime = new Date().getTime();\r\n\t\t\t\r\n\t\t\t//System.out.println(lastTime);\r\n\t\t\t\r\n\t\t\tif (working /*|| drawArea == null || drawArea.getGraphicsConfiguration() == null*/)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\tworker = new MySwingWorker(tempImage,this);\r\n\t\t \tworker.execute();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void run() {\n\n\t\t\twhile (y < 150) {\n\n\t\t\t\tdraw(drawImg);\n\t\t\t\trepaint();\n\t\t\t\ty2 += 20;\n\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay(drawImg);\n\t\t\trepaint();\n\t\t}",
"public void run() {\n\t\tboolean isJS = /** @j2sNative true || */ false;\n\t\tGraphics g = getGraphics();\n\t\tif (g == null) {\n\t\t\tmovieThread = null;\n\t\t\treturn;\n\t\t}\n\t\twhile ((movieThread != null) && (sources.size() > 0) && (frames.size() > 1) && owner.getRunningID() == owner) {\n\t\t\t\ttry {\n\t\t\t\t\tif (current >= frames.size())\n\t\t\t\t\t\tcurrent = 0;\n\t\t\t\t\tif (frames.size() > 0)\n\t\t\t\t\t\timg = (Image) frames.elementAt(current);\n\t\t\t\t\tif (movieThread != null) {\n\t\t\t\t\t\tpaint(g);\n\t\t\t\t\t\tif (mousePressed)\n\t\t\t\t\t\t\tpaintCoordinates(g, mouseX, mouseY);\n\t\t\t\t\t}\n\t\t\t\t\tcurrent++;\n\t\t\t\t\tif(isJS) {\n\t\t\t\t\t\ttimer = new Timer(sleepTime, new ActionListener() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\trun();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\t\t\t\t\t\ttimer.setRepeats(false);\n\t\t\t\t\t\ttimer.start();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if (movieThread != null) {\n\t\t\t\t\t\tThread.currentThread();\n\t\t\t\t\t\t\tThread.sleep(sleepTime);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) { }\n\t\t}\n\t\tg.dispose();\n\t\timageLoaded = true;\n\t\trepaint();\n\t}",
"public void start(){\n isRunning = true;\n\n // This is where the magic happens\n Thread loop = new Thread(){\n\t\t\tpublic void run(){\n\t\t final double targetHertz = 30; // target updates per second\n\t\t final double updateTime = 1e9 / targetHertz; // target time between updates\n\t\t final int maxUpdates = 5; // max updates before a render is forced\n\t\t \n\t\t final double targetFps = 60; // target frames per second (fps)\n\t\t final double renderTime = 1e9 / targetFps; // target time between renders\n\t\t \n\t\t double lastUpdate = System.nanoTime();\n\t\t double lastRender = System.nanoTime();\n\n\t\t while (isRunning){\n\t\t \tdouble now = System.nanoTime();\n\t\t \t\n\t\t \tint updates = 0;\n\t\t \twhile (now - lastUpdate > updateTime && updates < maxUpdates){ // Update the game as much as possible before drawing\n\t\t \t\tgamePanel.update();\n\t\t \t\tlastUpdate += updateTime;\n\t\t \t\tupdates++;\n\t\t \t}\n\t\t \t\n\t\t \tif (now - lastUpdate > updateTime){ // Compensate for really long updates\n\t\t \t\tlastUpdate = now - updateTime;\n\t\t \t}\n\t\t \t\n\t\t \t// Draw the game\n\t\t \tgamePanel.repaint();\n\t\t \tlastRender = now;\n\t\t \t\n\t\t \t// kill some time until next draw\n\t\t \t\n\t\t \twhile (now - lastRender < renderTime && now - lastUpdate < updateTime){\n\t\t \t\tThread.yield();\n\t\t \t\t\n\t\t \t\ttry { Thread.sleep(1);} catch (Exception e) { }\n\t\t \t\t\n\t\t \t\tnow = System.nanoTime();\n\t\t \t}\n\t\t }\n\t\t\t}\n\t\t};\n\t\tloop.start();\n }",
"public void runOnGround()\n {\n\t\twhile (runner.isOnGround()) \n\t\t{\n\t\t if(runnerTrue)\n\t\t {\n\t\t\t\trunnerTrue = false;\n\t\t\t\tthis.repaint();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t Thread.sleep(250);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){}\n\t\t\t}\n\t \n\t\t if (!runnerTrue)\n\t\t {\n\t\t\t\trunnerTrue = true;\n\t\t\t\tthis.repaint();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t Thread.sleep(250);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){}\n\t\t\t}\n\t\t}//while loop\n }",
"public void startTimerThread(){\r\n new Thread(){\r\n @Override\r\n public void run(){\r\n while(GameView.isBallMoving)\r\n doSomeHardWork();\r\n doSomeSoftWork();\r\n }\r\n }.start();\r\n }",
"public void run() {\n\n\t\twhile (running) {\n\t\t\trepaint();\n\t\t\tx = rand.nextInt(200);\n\t\t\ty = rand.nextInt(200);\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t} catch (Exception ee) {\n\t\t\t\tee.printStackTrace();\n\t\t\t}\n\n\t\t}\n\n\t}",
"public void run() {\n\t\tboolean done = false;\n\t\tneedsRedraw = true;\n\t\twhile (!done) {\n\t\t\twhile (needsRedraw) {\n\t\t\t\tneedsRedraw = false;\n\t\t\t\tfinal Fractal fractal = new Fractal(input_a.getInt(), input_b.getInt(), \n\t\t\t\t\t\t\t\t\t\t\t\t input_c.getInt(), color1, color2);\n\t\t\t\tfinal Image nextImage = createImage(canvas.getSize().width, canvas.getSize().height);\n\t\t\t\tfinal Graphics gbuffer = nextImage.getGraphics();\n\t\t\t\t\n\t\t\t\tbuffer = nextImage;\n\n\t\t\t\tfinal int nDots = input_dots.getInt();\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < nDots; ++i) {\n\t\t\t\t\tfractal.recordBounds(1000);\n\t\t\t\t\tThread.yield();\n\t\t\t\t}\n\n\t\t\t\tfractal.reset();\n\n\t\t\t\tfor (int i = 0; i < nDots; ++i) {\n\t\t\t\t\tfractal.drawFractal(gbuffer, canvas.getSize(), 1000);\n\t\t\t\t\tcanvas.repaint();\n\t\t\t\t\tThread.yield();\n\t\t\t\t}\n\n\t\t\t\tsynchronized (canvas) {\n\t\t\t\t\tcanvas.repaint();\n\t\t\t\t\tif (!needsRedraw) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcanvas.wait();\n\t\t\t\t\t\t} catch (final InterruptedException e1) {\n\t\t\t\t\t\t\t// exit quietly\n\t\t\t\t\t\t\tneedsRedraw = false;\n\t\t\t\t\t\t\tdone = true;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void run(){ \n \n//infinite loop\nwhile(true){\n \nchangeColor();\nresizeBall(); \n\n }\n}",
"private void frameRateThread(){\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n sleep(); // seperate thread to sleep every 17 ms for 60 fps\n\n }\n };\n Thread frameThr = new Thread(runnable);\n frameThr.start();\n }",
"public void run() {\n // Create the thread\n Thread.currentThread().setPriority(Thread.MIN_PRIORITY);\n\n // Load the images\n jbiImages = new JugglingImages(getDocumentBase(), dir, this);\n \n // Do the animation\n int ndx = 0;\n while (size().width > 0 && size().height > 0 && kicker != null) {\n for (ndx = 0; ndx < nBalls; ndx++) {\n (pjbBalls[ndx]).Move();\n }\n \n phLeft.Move();\n phRight.Move();\n \n repaint();\n try {Thread.sleep(nSpeed);} catch (InterruptedException e){}\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tGraphics2D g2 = ((BufferedImage) image).createGraphics();\n\t\t\tg2.setColor(Color.LIGHT_GRAY);\n\t\t\tg2.fillRect(0, 0, image.getWidth(null), image.getHeight(null));\n\t\t\tfor (model.AbstractInsect a : spField.getList()) {\n\t\t\t\tg2.drawImage(a.getImage(), a.getPosx()-a.getImage().getWidth(null)/2, a.getPosy()-a.getImage().getHeight(null)/2, null);\n\t\t\t}\n\t\t\tg2.dispose();\t\t\t\n\t\t\trepaint();\n\t\t\t\n\t\t}",
"public void run() {\n\t\tthis.canvas.repaint();\n\t}",
"static void start() {\n if( flag == 1 ) return;\n for( Tile x : tiles ) {\n if( x.getBackground() == cyan ) x.setBackground(white);\n }\n Thread fill = new Thread(new FloodFill());\n fill.start();\n flag = 1;\n }",
"@Override\n\tpublic void run() {\n\t\tInpainter.init((BufferedImage) entry.getImage(), (BufferedImage) entry.getImage(), fastInpaint);\n\t}",
"public void run(){\n init();\n\n while(isRunning){\n\n //new loop, clock the start\n startFrame = System.currentTimeMillis();\n\n //calculate delta time\n dt = (float)(startFrame - lastFrame)/1000;\n\n //update lastFrame for next dt\n lastFrame = startFrame;\n\n //call update and draw methods\n update();\n draw();\n\n //dynamic thread sleep, only sleep the time we need to cap the framerate\n //rest = (max fps sleep time) - (time it took to execute this frame)\n rest = (1000/MAX_FPS) - (System.currentTimeMillis() - startFrame);\n if(rest > 0){ //if we stayed within frame \"budget\", sleep away the rest of it\n try{ Thread.sleep(rest); }\n catch (InterruptedException e){ e.printStackTrace(); }\n }\n }\n }",
"public void run(){\n\t\tlong fpsWait = (long) (1.0/30 * 1000);\n\t\tmain: while (isRunning){\n\t\t\tlong renderStart = System.nanoTime();\n\t\t\tupdateGame();\n\t\t\t\n\t\t\tdo {\n\t\t\t\tGraphics bg = getBuffer();\n\t\t\t\tif (!isRunning){\n\t\t\t\t\tbreak main;\n\t\t\t\t}\n\t\t\t\trenderGame(bg);\n\t\t\t\tbg.dispose();\n\t\t\t} while (!updateScreen());\n\t\t\t\n\t\t\tlong renderTime = (System.nanoTime() - renderStart) / 1000000;\n\t\t\ttry {\n\t\t\t\tThread.sleep(Math.max(0,fpsWait - renderTime));\n\t\t\t} catch (InterruptedException e){\n\t\t\t\tThread.interrupted();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\trenderTime = (System.nanoTime() - renderStart) / 1000000;\n\t\t}\n\t\tframe.dispose();\n\t}",
"public void PerformTimerTask() {\n \tif(refreshRate !=0){\n x+=px;\n y+=py;\n if (x+width >= panelW) {\n x = panelW - width;\n px = -px;\n }\n if (y+height >= panelH) {\n y = panelH - height;\n py = -py;\n }\n if (x < 0) {\n x = 0;\n px = -px;\n }\n if (y < 0) {\n y = 0;\n py = -py;\n }\n repaint();\n \t}\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fills the outside of the maze with '' and the inside randomly with '.' or ''. | private void fillMaze() {
for (int i = 0; i < height; i++) {
maze[0][i] = '#';
maze[width - 1][i] = '#';
}
for (int i = 0; i < width; i++) {
maze[i][0] = '#';
maze[i][height - 1] = '#';
}
for (int i = 1; i < width - 1; i++) {
for (int j = 1; j < height - 1; j++)
maze[i][j] = random.nextInt(2) == 0 ? '#' : '.';
}
} | [
"private static char[][] fillMaze(char[][] maze) {\r\n\t\tint maxLinha = maze.length - 1;\r\n\t\tint maxColuna = maze[0].length - 1;\r\n\r\n\t\t// preenche as bordas do labirinto com #\r\n\t\tfor (int i = 0; i <= maxColuna; i++) {\r\n\t\t\tmaze[0][i] = '#';\r\n\t\t\tmaze[maxLinha][i] = '#';\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i <= maxLinha; i++) {\r\n\t\t\tmaze[i][0] = '#';\r\n\t\t\tmaze[i][maxColuna] = '#';\r\n\t\t}\r\n\r\n\t\t// preenche a parte interna do labirinto de modo aleatório\r\n\t\tfor (int i = 1; i < maxLinha; i++) {\r\n\t\t\tfor (int j = 1; j < maze[i].length - 1; j++)\r\n\t\t\t\tmaze[i][j] = random.nextInt(2) == 0 ? '#' : '.';\r\n\t\t}\r\n\r\n\t\treturn maze;\r\n\t}",
"public void fill() {\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tmaze[x][y] = Block.WALL;\n\t\t\t}\n\t\t}\n\t}",
"private static char[][] makeMazeStatic()\r\n {\r\n //the following maze was generated with the recursive division method and then modified by hand.\r\n \r\n char level[][] = \r\n {{'#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'}, \r\n {'#', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', '#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', '#', ' ', '#', '#', '#', ' ', '#', ' ', '#', '#', ' ', '#', '#', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', '#', '#', '#', '#', '#', ' ', '#', ' ', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', '#', ' ', '#', '#', '#', '#', '#', ' ', '#', '#', ' ', '#', ' ', ' ', '#', ' ', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', ' ', ' ', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', '#', '#', '#', '#', ' ', '#', '#', '#', ' ', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', '#', '#', ' ', '#', '#', '#', ' ', '#', ' ', '#', '#', ' ', '#', '#', '#', ' ', '#', ' ', '#', ' ', '#', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', '#', ' ', ' ', '#'}, \r\n {'#', ' ', '#', ' ', '#', '#', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', ' ', '#', '#', '#', '#', ' ', '#', '#', '#', ' ', '#', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', '#', '#', '#', '#', '#', '#', ' ', '#', ' ', '#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'}, \r\n {'#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', '#', ' ', '#', '#', ' ', '#', '#', ' ', '#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', '#', '#', ' ', '#', ' ', '#', '#', '#', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#'}, \r\n {'#', ' ', '#', ' ', '#', '#', ' ', '#', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', '#', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'}, \r\n {'#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '#'}, \r\n {'#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#'}};\r\n \r\n return level;\r\n }",
"public static void setGrid(){\r\n for(int x=0; x<board.length;x++){\r\n for(int y=0; y<board[0].length;y++){ \r\n board[x][y] =\".\";\r\n }\r\n \r\n } \r\n \r\n }",
"@Override\n public void generateMaze() {\n //Opens up the entrance to the maze\n MazeCell current=maze[0][0];\n current.openWall(Directions.North.getBValue());\n\n //A list of sets. The sets contain the cells which can be accessed from one another.\n List<List<MazeCell>> sets=new LinkedList<>();\n //All the walls in the maze\n List<InnerWall> wallList=new LinkedList<>();\n //Initially create a set for each cell\n //Also add the walls to the list\n for(int row=0;row< maze.length;row++){\n for(int column=0;column<maze[0].length;column++){\n sets.add(Arrays.asList(maze[row][column]));\n List<MazeCell> valid=returnValidNeighbours(maze[row][column].getX(), maze[row][column].getY());\n for(int i=0;i<valid.size();i++){\n wallList.add(new InnerWall(maze[row][column], valid.get(i)));\n }\n }\n }\n //Now we have as many wall sets as maze cells, each containing four walls.\n\n Random rnd=new Random();\n int idx;\n //Loops until only one set remains, meaning all cells can be reached from any cell\n while(sets.size()!=1){\n //Select a random wall\n idx=wallList.size()>1 ? rnd.nextInt(wallList.size()) : 0;\n InnerWall w= wallList.get(idx);\n //The two neighbouring cells\n MazeCell c1=w.parent;\n MazeCell c2=w.connected;\n\n //Their relative directions\n Directions d=Directions.getOffsetDirection(c1.getX(),c1.getY(),c2.getX(),c2.getY());\n\n //Check if the two cells are already connected\n if((c1.getOpenWalls() % d.getBValue())==d.getBValue())\n continue;\n\n //Two new sets\n List<MazeCell> set1=null;\n List<MazeCell> set2=null;\n //We get the sets\n boolean b1,b2;\n b1=b2=false;\n //We loop through the set of sets looking for the two which contains the two cells\n for(List<MazeCell> list : sets) {\n if(list.contains(c1)){\n set1=list;\n b1=true;\n }\n if(list.contains(c2)) {\n set2=list;\n b2=true;\n }\n if(b1 && b2)\n break;\n }\n //If the two sets are disjoint then we join them together\n if(set1!=null && set2!=null && !set1.equals(set2)){\n\n //We connect the two cells\n c1.openWall(d.getBValue());\n c2.openOppositeWall(d.getBValue());\n\n if(sleepDrawTime>0) {\n try {\n Thread.sleep(sleepDrawTime);\n mf.repaint();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n //Join the two sets\n List<MazeCell> temp= Stream.concat(set1.stream(), set2.stream())\n .collect(Collectors.toList());\n sets.remove(set2);\n sets.remove(set1);\n sets.add(temp);\n }\n //We remove the wall from the list\n wallList.remove(w);\n //As the walls are double-sided, two cells share a wall, we have to find the opposite cell's wall in the list\n InnerWall oppositeWall=wallList.stream().filter((x)->x.parent==w.connected).findFirst().orElse(null);\n wallList.remove(oppositeWall);\n\n\n }\n //We open an exit in the last row.\n maze[maze.length-1][rnd.nextInt(maze[0].length)].openWall(Directions.South.getBValue());\n\n }",
"public void makeMaze(){\n setInitialMaze();\n\n Cell startPoint = makeCellObject(1, 1);\n exploredSpaces.push(startPoint);\n maze[startPoint.getRow()][startPoint.getColumn()] = EMPTY_SPACE;\n\n while (!exploredSpaces.empty()){\n findNeighbours(startPoint);\n if (neighbours.isEmpty()){\n if (!exploredSpaces.empty()){\n startPoint = exploredSpaces.pop();\n }\n } else {\n startPoint = chooseRandomNeighbour();\n maze[startPoint.getRow()][startPoint.getColumn()] = EMPTY_SPACE;\n exploredSpaces.push(startPoint);\n }\n }\n\n // Creates islands in maze\n makeIslands();\n\n }",
"private void constructMaze() {\n Random r = new Random();\r\n // generate random numbers between 0 and dimension (non-inclusive)\r\n int randomStartI = r.nextInt(columnCount); // row/i coordinate\r\n int randomStartJ = r.nextInt(rowCount); // column/j coordinate\r\n constructMaze(randomStartI, randomStartJ);\r\n }",
"public void generateRandomMaze() {\r\n\t\t\tclearMaze();\r\n\t\t\tint randomNumber = (int)(Math.random()*3) + 1;\r\n\t\t\tint [][] map;\r\n\t\t\tif (randomNumber == 1) {\r\n\t\t\t\tmap = RandomMazes.randomMazeOne();\r\n\t\t\t}\r\n\t\t\telse if(randomNumber == 2) {\r\n\t\t\t\tmap = RandomMazes.randomMazeTwo();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tmap = RandomMazes.randomMazeThree();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < ROWS; i ++) {\r\n\t\t\t\tfor(int j = 0; j < COLS ; j++) {\r\n\t\t\t\t\tif (map[i][j] == 0) {\r\n\t\t\t\t\t\tpixelArray[i][j].setBackground(Color.yellow.brighter());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(map[i][j] == 2) {\r\n\t\t\t\t\t\tpixelArray[i][j].setBackground(Color.BLACK);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(map[i][j] == 3) {\r\n\t\t\t\t\t\tpixelArray[i][j].setBackground(Color.GREEN);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpixelArray[i][j].setBackground(Color.WHITE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t}",
"public void placeWords() {\r\n\r\n for (int i = 0; i < words.length; i++) {\r\n char[][] temp;\r\n int startRow = 0; // starting point\r\n int startCol = 0; // starting point\r\n\r\n boolean invalid = false;\r\n\r\n do {\r\n String word = words[i];\r\n temp = grid;\r\n invalid = false;\r\n Random rand = new Random();\r\n int orient = rand.nextInt(4); // Change this back to 8 after testing\r\n\r\n /*\r\n * Where orient signifies:\r\n * 0 -- right\r\n * 1 -- left\r\n * 2 -- down\r\n * 3 -- up\r\n * 4 -- down right\r\n * 5 -- up left\r\n * 6 -- up right\r\n * 7 -- down left\r\n */\r\n\r\n if (orient % 2 == 1)\r\n word = reverse(word);\r\n\r\n /* Horizontal */\r\n\r\n if (orient < 2) {\r\n startRow = rand.nextInt(row); // random row\r\n startCol = rand.nextInt(column - word.length() + 1);\r\n for (int j = 0; j < word.length() && !invalid; j++) {\r\n if (temp[startRow][startCol + j] != '*' && temp[startRow][startCol + j] != word.charAt(j)) {\r\n invalid = true;\r\n }\r\n temp[startRow][startCol + j] = word.charAt(j);\r\n }\r\n }\r\n\r\n /* Vertical */\r\n\r\n else if (orient < 4) {\r\n startRow= rand.nextInt(row - word.length() + 1); // random row\r\n startCol = rand.nextInt(column);\r\n for (int j = 0; j < word.length(); j++) {\r\n if (temp[startRow + j][startCol] != '*' && temp[startRow + j][startCol] != word.charAt(j)) {\r\n invalid = true;\r\n }\r\n temp[startRow + j][startCol] = word.charAt(j);\r\n }\r\n }\r\n//\r\n// switch (orient)\r\n// {\r\n// case 0: // right\r\n//\r\n// break;\r\n// case 1: // left\r\n// startRow= rand.nextInt(row); // random row\r\n// col = rand.nextInt(column - word.length() + 1);\r\n// for (int j = 0; j < word.length(); j++) {\r\n// temp[startRow][col + j] = word.charAt(j);\r\n// }\r\n// break;\r\n// case 2: // down\r\n//\r\n// break;\r\n// case 3: // up\r\n// startRow= rand.nextInt(row - word.length() + 1); // random row\r\n// col = rand.nextInt(column);\r\n// for (int j = 0; j < word.length(); j++)\r\n// {\r\n// temp[startRow + j][col] = word.charAt(j);\r\n// }\r\n// break;\r\n// case 4: // down right\r\n// startRow= rand.nextInt(row - word.length() + 1);\r\n// col = rand.nextInt(column - word.length() + 1);\r\n// for (int j = 0; j < word.length(); j++)\r\n// {\r\n// temp[startRow + j][col + j] = word.charAt(j);\r\n// }\r\n// break;\r\n// case 5: // up left\r\n// startRow= rand.nextInt(row - word.length() + 1);\r\n// col = rand.nextInt(column - word.length() + 1);\r\n// for (int j = 0; j < word.length(); j++)\r\n// {\r\n// temp[startRow + j][col + j] = word.charAt(j);\r\n// }\r\n// break;\r\n// case 6: // up right\r\n// startRow= rand.nextInt(row - word.length() + 1) + word.length() - 1;\r\n// col = rand.nextInt(column - word.length() + 1);\r\n// for (int j = 0; j < word.length(); j++)\r\n// {\r\n// temp[startRow - j][col + j] = word.charAt(j);\r\n// }\r\n// break;\r\n// case 7: // down left\r\n// startRow= rand.nextInt(row - word.length() + 1) + word.length() - 1;\r\n// col = rand.nextInt(column - word.length() + 1);\r\n// for (int j = 0; j < word.length(); j++)\r\n// {\r\n// temp[startRow - j][col + j] = word.charAt(j);\r\n// }\r\n// break;\r\n// }\r\n System.out.println();\r\n System.out.println(word);\r\n printPuzzle();\r\n System.out.println();\r\n } while(invalid);\r\n\r\n grid = temp;\r\n }\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 Reset ( ) \r\n\t{\r\n\t\tcurrentCol = size / 2;\r\n\t\tcurrentRow = size / 2;\r\n\t\t\r\n\t\tint totalDistance;\r\n\t\tdo {\r\n\t\tint dist = size*size+1;\r\n\t\tmaze = new Room [size] [size];\r\n\t\tfor ( int row = 0; row < size; row++ )\r\n\t\t\tfor ( int col = 0; col < size; col++ )\r\n\t\t\t\tmaze [row] [col] = new Room ( dist);\r\n\t\ttotalDistance = CalcDistance();\r\n\t\t} while ( totalDistance >= size*size );\r\n\t\t\r\n\t\tmaze [currentRow] [currentCol].InsertWalker ( );\r\n\t}",
"public static void startHallway() {\n for (int i = 1; i < hallway.length; i++) {\n for (int j = 1; j <= 3; j++) {\n hallway[i][j] = \".\";\n }\n }\n for (int k = 0; k <= 4; k += 4) {\n for (int z = 1; z < hallway.length - 1; z += 2) {\n hallway[z][k] = \"R\";\n //hallway[z][k] = alpha[alphaCount];\n //alphaCount++;\n }\n }\n for (int i = 0; i < hallway.length; i++) {\n\n for (int j = 0; j < hallway[0].length; j++) {\n if (hallway[i][j] == null) {\n hallway[i][j] = \" \";\n }\n }\n }\n }",
"private void generateMaze(int r0, int c0) {\n for (int x = 0; x < numCols + 1; x++) {\n for (int y = 0; y < numRows; y++) {\n vWalls[y][x] = 1;\n }\n }\n for (int x = 0; x < numCols; x++) {\n for (int y = 0; y < numRows + 1; y++) {\n hWalls[y][x] = 1;\n }\n }\n\n boolean[][] visited = new boolean[numRows][numCols];\n Stack<Cell> stack = new Stack<>();\n stack.push(new Cell(r0, c0));\n Cell[] cellsN = new Cell[4]; //for unvisited neighbours\n\n while (!stack.empty()) {\n Cell cell = stack.pop();\n int kN = 0;\n if (cell.r > 0 && !visited[cell.r - 1][cell.c]) {\n cellsN[kN++] = new Cell(cell.r - 1, cell.c);\n }\n if (cell.c > 0 && !visited[cell.r][cell.c - 1]) {\n cellsN[kN++] = new Cell(cell.r, cell.c - 1);\n }\n if (cell.r < numRows - 1 && !visited[cell.r + 1][cell.c]) {\n cellsN[kN++] = new Cell(cell.r + 1, cell.c);\n }\n if (cell.c < numCols - 1 && !visited[cell.r][cell.c + 1]) {\n cellsN[kN++] = new Cell(cell.r, cell.c + 1);\n }\n\n if (kN > 0) {\n int n = random.nextInt(kN);\n Cell neighbour = cellsN[n];\n //remove wall(current, neighbour);\n if (neighbour.r == cell.r) {\n if (neighbour.c < cell.c) vWalls[cell.r][cell.c] = 0; //left\n else vWalls[cell.r][cell.c + 1] = 0; //right\n }\n if (neighbour.c == cell.c) { //left\n if (neighbour.r < cell.r) hWalls[cell.r][cell.c] = 0; //up\n else hWalls[cell.r + 1][cell.c] = 0; //down\n }\n visited[neighbour.r][neighbour.c] = true;\n stack.push(cell);\n stack.push(neighbour);\n }\n }\n }",
"@Override\n\tpublic void generate() {\n\t\t// pick position (x,y) with x being random, y being 0\n\t\t// pick position (x,y) with x being random, y being 0\n\t\tint x = randNo(0, width-1) ;\n\t\tint y = randNo(0, height - 1);\n\t\tArrayList<Wall> walls = new ArrayList<Wall>();\n\t\tif (cells.canGo(x, y, 0, 1))\n\t\t{\n\t\t\twalls.add(new Wall(x, y, 0, 1));\n\t\t}\n\t\tif (cells.canGo(x, y, 0, -1))\n\t\t{\n\t\t\twalls.add(new Wall(x, y, 0, -1));\n\t\t}\n\t\tif (cells.canGo(x, y, 1, 0))\n\t\t{\n\t\t\twalls.add(new Wall(x, y, 1, 0));\n\t\t}\n\t\tif (cells.canGo(x, y, -1, 0))\n\t\t{\n\t\t\twalls.add(new Wall(x, y, -1, 0));\n\t\t}\n\t\tWall curWall;\n\t\twhile(!walls.isEmpty()){\n\t\t\t\n\t\t\tint r = randNo(0, walls.size()-1);\n\t\t\tcurWall = walls.get(r);\n\t\t\tif (cells.canGo(curWall.x, curWall.y, curWall.dx, curWall.dy))\n\t\t\t{\n\t\t\t\tcells.deleteWall(curWall.x, curWall.y, curWall.dx, curWall.dy);\n\t\t\t\tx = curWall.x + curWall.dx;\n\t\t\t\ty = curWall.y + curWall.dy;\n\t\t\t\tcells.deleteWall(x, y, -curWall.dx, -curWall.dy);\n\t\t\t\tcells.setVirginToZero(x, y);\n\t\t\t\t/*checks to see if it has the walls, if it does it adds them to the list*/\n\t\t\t\tif (cells.hasWallOnBottom(x, y));\n\t\t\t\t{\n\t\t\t\t\twalls.add(new Wall(x, y, 0, 1));\n\t\t\t\t}\n\t\t\t\tif (cells.hasWallOnTop(x, y));\n\t\t\t\t{\n\t\t\t\t\twalls.add(new Wall(x, y, 0, -1));\n\t\t\t\t}\n\t\t\t\tif (cells.hasWallOnLeft(x, y));\n\t\t\t\t{\n\t\t\t\t\twalls.add(new Wall(x, y, -1, 0));\n\t\t\t\t}\n\t\t\t\tif (cells.hasWallOnRight(x, y));\n\t\t\t\t{\n\t\t\t\t\twalls.add(new Wall(x, y, 1, 0));\n\t\t\t\t}\n\t\t\t\twalls.remove(r);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twalls.remove(r);\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t\t// compute temporary distances for an (exit) point (x,y) = (width/2,height/2) \n\t\t// which is located in the center of the maze\n\t\tcomputeDists(width/2, height/2);\n\n\t\tint[] remote = findRemotePoint();\n\t\t// recompute distances for an exit point (x,y) = (remotex,remotey)\n\t\tcomputeDists(remote[0], remote[1]);\n\n\t\t// identify cell with the greatest distance\n\t\tsetStartPositionToCellWithMaxDistance();\n\n\t\t// make exit position at true exit \n\t\tsetExitPosition(remote[0], remote[1]);\n\t}",
"public static void fillBoard(){\r\n for (int i = 0; i<Node.puzzle_size; i++){\r\n for (int j = 0; j<Node.puzzle_size; j++){\r\n board[i][j] = '-';\r\n }\r\n }\r\n board[x_start[0]][x_start[1]] = 'x';\r\n board[o_start[0]][o_start[1]] = 'o';\r\n }",
"protected void fillWalls() {\r\n for(int i=0;i<maze.getRow();i++){\r\n for (int j=0;j<maze.getCol();j++){\r\n maze.createWall(new Position(i,j));\r\n }\r\n }\r\n }",
"private void constructMaze() {\r\n\t\t\r\n\t\t// manual code to construct a sample maze going cell by cell\r\n\t\tgridSheet[0][0].breakSouthWall();\r\n\t\tgridSheet[1][0].breakEastWall();\r\n\t\tgridSheet[1][1].breakSouthWall();\r\n\t\tgridSheet[2][1].breakWestWall();\r\n\t\tgridSheet[2][0].breakSouthWall();\r\n\t\tgridSheet[2][1].breakEastWall();\r\n\t\tgridSheet[2][2].breakSouthWall();\r\n\t\tgridSheet[3][2].breakSouthWall();\r\n\t\tgridSheet[4][2].breakWestWall();\r\n\t\tgridSheet[4][1].breakNorthWall();\r\n\t\tgridSheet[4][1].breakWestWall();\r\n\t\tgridSheet[2][2].breakEastWall();\r\n\t\tgridSheet[2][3].breakNorthWall();\r\n\t\tgridSheet[1][3].breakWestWall();\r\n\t\tgridSheet[1][3].breakNorthWall();\r\n\t\tgridSheet[0][3].breakWestWall();\r\n\t\tgridSheet[0][2].breakWestWall();\r\n\t\tgridSheet[0][3].breakEastWall();\r\n\t\tgridSheet[0][4].breakSouthWall();\r\n\t\tgridSheet[1][4].breakSouthWall();\r\n\t\tgridSheet[2][4].breakSouthWall();\r\n\t\tgridSheet[3][4].breakWestWall();\r\n\t\tgridSheet[3][4].breakSouthWall();\r\n\t\tgridSheet[4][4].breakWestWall();\r\n\t\t\r\n\t}",
"public void Random() {\r\n\t\t\t\r\n\t\tif(doesPathExist(startingRow, startingCol)) {\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < ROWS; i++) {\r\n\t\t\t\tfor (int j = 0; j < COLS; j++) {\r\n\t\t\t\t\tsolution[i][j] = false;\r\n\t\t\t\t\tvisited[i][j] = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint currentRow = startingRow;\r\n\t\t\tint currentCol = startingCol;\r\n\t\t\tint roll;\r\n\t\t\tint counter=0;\r\n\t\t\t\r\n\t\t\twhile(currentRow != endingRow || currentCol != endingCol) {\r\n\r\n\t\t\t\troll = (int)(Math.random() * 4) + 1;\r\n\t\t\t\t\tif(roll == 1) {\r\n\t\t\t\t\t\tif((currentRow != ROWS-1) && (mazeMap[currentRow+1][currentCol]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentRow ++;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(roll == 2) {\r\n\t\t\t\t\t\tif((currentRow != 0) && (mazeMap[currentRow-1][currentCol]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentRow --;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\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}\r\n\t\t\t\t\telse if(roll == 3) {\r\n\t\t\t\t\t\tif((currentCol != COLS-1) && (mazeMap[currentRow][currentCol+1]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentCol ++;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(roll == 4) {\r\n\t\t\t\t\t\tif((currentCol != 0) && (mazeMap[currentRow][currentCol-1]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentCol --;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\tcounter++;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tnumOfSteps.setText(\"Steps to Goal: \" + counter);\r\n\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnumOfSteps.setText(\"NO PATH TO GOAL\");\r\n\t\t}\r\n\t\t\t\r\n\t}",
"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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PackageMojo can't work with nonWAR projects. | @Test(expected = IllegalStateException.class)
public void testNonWarPackaging() throws Exception {
final PackageMojo mojo = new PackageMojo();
final MavenProject project = new MavenProjectMocker()
.withPackaging("jar")
.mock();
mojo.setProject(project);
mojo.execute();
} | [
"@Test\n public void packsArtifactsNormally() throws Exception {\n final Environment env = new EnvironmentMocker().mock();\n final PackageMojo mojo = new PackageMojo();\n mojo.setWebappDirectory(env.webdir().getAbsolutePath());\n final MavenProject project = new MavenProjectMocker().mock();\n final Log log = Mockito.mock(Log.class);\n mojo.setLog(log);\n mojo.setProject(project);\n mojo.execute();\n }",
"private void excludeFromWarPackaging() {\n getLog().info(\"excludeFromWarPackaging\");\n String pluginGroupId = \"org.apache.maven.plugins\";\n String pluginArtifactId = \"maven-war-plugin\";\n if (project.getBuildPlugins() != null) {\n for (Object o : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) o;\n\n if (pluginGroupId.equals(plugin.getGroupId()) && pluginArtifactId.equals(plugin.getArtifactId())) {\n Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();\n if (dom == null) {\n dom = new Xpp3Dom(\"configuration\");\n plugin.setConfiguration(dom);\n }\n Xpp3Dom excludes = dom.getChild(\"packagingExcludes\");\n if (excludes == null) {\n excludes = new Xpp3Dom(\"packagingExcludes\");\n dom.addChild(excludes);\n excludes.setValue(\"\");\n } else if (excludes.getValue().trim().length() > 0) {\n excludes.setValue(excludes.getValue() + \",\");\n }\n\n Set<Artifact> dependencies = getArtifacts();\n getLog().debug(\"Size of getArtifacts: \" + dependencies.size());\n String additionalExcludes = \"\";\n for (Artifact dependency : dependencies) {\n getLog().debug(\"Dependency: \" + dependency.getGroupId() + \":\" + dependency.getArtifactId() + \"type: \" + dependency.getType());\n if (!dependency.isOptional() && Types.JANGAROO_TYPE.equals(dependency.getType())) {\n getLog().debug(\"Excluding jangaroo dependency form war plugin [\" + dependency.toString() + \"]\");\n // Add two excludes. The first one is effective when no name clash occurs\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n // the second when a name clash occurs (artifact will hav groupId prepended before copying it into the lib dir)\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getGroupId() + \"-\" + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n }\n }\n excludes.setValue(excludes.getValue() + additionalExcludes);\n }\n }\n }\n }",
"void warDeploy(File warFile, String appName);",
"public void partArtifact() {\n//<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n//<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n//\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n//\n//\t<modelVersion>4.0.0</modelVersion>\n//\t<groupId>com.opendatapolicing</groupId>\n//\t<artifactId>opendatapolicing</artifactId>\n//\t<version>1.0.1-SNAPSHOT</version>\n//\t<name>opendatapolicing</name>\n//\t<description></description>\n\t}",
"@Deployment(testable = false)\n public static WebArchive createDeployment() {\n return ShrinkWrap.create(MavenImporter.class)\n .loadPomFromFile(\"../jaxws-endpoint/pom.xml\")\n .importBuildOutput()\n .as(WebArchive.class);\n }",
"IPackager getPackager(ITMWProject project);",
"IPackager getPackager(ITMWProject project, IMobileWebRuntime runtime);",
"void warDeploy(File warFile);",
"public void testColdDeployWar()\n {\n this.fileHandler.createFile(\"ram:///test.war\");\n WAR war = (WAR) factory.createDeployable(\"jonas4x\", \"ram:///test.war\", DeployableType.WAR);\n war.setContext(\"testContext\");\n\n setupAdminColdDeployment();\n deployer.deploy(war);\n assertFalse(fileHandler.exists(deployer.getDeployableDir(war) + \"/autoload/test.war\"));\n assertTrue(fileHandler.exists(deployer.getDeployableDir(war)\n + \"/autoload/testContext.war\"));\n }",
"@Override\n public void execute()\n throws MojoExecutionException\n {\n try {\n init(false);\n getOutputDirectory().mkdir();\n final String folders = jmsPackage.replace(\".\", File.separator);\n final File srcFolder = new File(getOutputDirectory(), folders);\n srcFolder.mkdirs();\n\n final Application appl = Application.getApplicationFromSource(\n getVersionFile(),\n getClasspathElements(),\n getEFapsDir(),\n getOutputDirectory(),\n getIncludes(),\n getExcludes(),\n getTypeMapping());\n\n for (final Dependency dependency : appl.getDependencies()) {\n dependency.resolve();\n final Application dependApp = Application.getApplicationFromJarFile(\n dependency.getJarFile(), getClasspathElements());\n final List<InstallFile> files = dependApp.getInstall().getFiles();\n for (final InstallFile file : files) {\n if (file.getType() != null && file.getType().equals(FileType.XML)) {\n readFile(srcFolder, file);\n }\n }\n }\n\n final List<InstallFile> files = appl.getInstall().getFiles();\n for (final InstallFile file : files) {\n if (file.getType() != null && file.getType().equals(FileType.XML)) {\n readFile(srcFolder, file);\n }\n }\n project.addCompileSourceRoot(getOutputDirectory().getAbsolutePath());\n } catch (final Exception e) {\n throw new MojoExecutionException(\"Could not execute SourceInstall script\", e);\n }\n }",
"boolean requireArtifactFiles();",
"public void testHotDeployWar()\n {\n this.fileHandler.createFile(\"ram:///test.war\");\n WAR war = (WAR) factory.createDeployable(\"jonas4x\", \"ram:///test.war\", DeployableType.WAR);\n war.setContext(\"testContext\");\n\n setupAdminHotDeployment();\n deployer.deploy(war);\n assertFalse(fileHandler.exists(deployer.getDeployableDir(war) + \"/test.war\"));\n assertTrue(fileHandler.exists(deployer.getDeployableDir(war) + \"/testContext.war\"));\n }",
"@Override\n public void execute() throws MojoExecutionException, MojoFailureException {\n getLog().info(\"Executing Falconer plugin\");\n getLog().info(\"\\tconfig file=\" + configFile);\n getLog().info(\"\\tartifactDir=\" + artifactDir);\n getLog().info(\"\\tbaseDir=\" + project.getBuild().getDirectory());\n File outDirFile = new File(outDir);\n if (!outDirFile.isAbsolute()) {\n outDirFile = new File(project.getBuild().getDirectory(), outDirFile.toString());\n }\n getLog().info(\"outDir=\" + outDirFile.getAbsolutePath());\n\n if (!outDirFile.exists()) {\n outDirFile.mkdirs();\n }\n\n File entitiesDir = new File(outDirFile, \"entities\");\n File appsDir = new File(outDirFile, \"apps\");\n\n getLog().info(\"Copying apps\");\n for (App app : apps) {\n File appSrc = new File(project.getBasedir(), app.getSrc());\n getLog().info(\"app src=\" + appSrc.getAbsolutePath());\n try {\n FileUtils.copyDirectory(appSrc, appsDir);\n } catch (IOException e) {\n throw new MojoFailureException(\"Failed to copy applications from \" + appSrc, e);\n }\n }\n\n getLog().info(\"Generating deploy tool\");\n\n getLog().info(\"deploy script exists?=\" + this.getClass().getClassLoader().getResource(\"deploy.sh\").getFile());\n getLog().info(\"deploy script=\" + new File(this.getClass().getClassLoader().getResource(\"deploy.sh\").getFile()));\n\n Properties props = new Properties();\n props.setProperty(\"falcon-url\", falconUrl);\n TokenReplacer r = new TokenReplacer();\n String result = \"\";\n try {\n result = r.apply(props, this.getClass().getClassLoader().getResourceAsStream(\"deploy.sh\"));\n } catch (IOException e) {\n getLog().error(\"Falconer exception caught\", e);\n throw new MojoFailureException(\"Falconer exception caught\", e);\n }\n\n try {\n FileUtils.write(new File(outDirFile, \"deploy.sh\"), result);\n } catch (IOException e) {\n throw new MojoFailureException(\"Failed to write deploy script \", e);\n }\n\n getLog().info(\"running Falconer tool\");\n try {\n Falconer.main(new String[] {\n configFile.getAbsolutePath(),\n artifactDir.getAbsolutePath(),\n entitiesDir.getAbsolutePath() });\n } catch (JAXBException e) {\n getLog().error(\"Falconer exception caught\", e);\n throw new MojoFailureException(\"Falconer exception caught\", e);\n }\n\n }",
"public void testHotDeployFailureWar()\n {\n this.fileHandler.createFile(\"ram:///test.war\");\n WAR war = (WAR) factory.createDeployable(\"jonas4x\", \"ram:///test.war\", DeployableType.WAR);\n war.setContext(\"testContext\");\n\n setupAdminHotDeploymentFailure();\n try\n {\n deployer.deploy(war);\n fail(\"No CargoException raised\");\n }\n catch (CargoException expected)\n {\n assertFalse(fileHandler.exists(deployer.getDeployableDir(war) + \"/test.war\"));\n assertTrue(fileHandler.exists(deployer.getDeployableDir(war) + \"/testContext.war\"));\n }\n }",
"@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }",
"public void execute() throws MojoExecutionException {\n deploy(service, dockerImage,Optional.ofNullable(kalixProject),Optional.ofNullable(kalixContext));\n }",
"private void writeModuleTypeComponent( XMLWriter writer, String packaging, File buildOutputDirectory,\n EclipseSourceDir[] sourceDirs, ArtifactRepository localRepository )\n throws MojoExecutionException\n {\n writer.startElement( ELT_PROJECT_MODULES );\n writer.addAttribute( ATTR_MODULE_ID, \"moduleCoreId\" ); //$NON-NLS-1$\n if ( getProjectVersion() != null )\n {\n writer.addAttribute( ATTR_PROJECT_VERSION, getProjectVersion() );\n }\n writer.startElement( ELT_WB_MODULE );\n\n // we should use the eclipse project name as the deploy name.\n writer.addAttribute( ATTR_DEPLOY_NAME, this.config.getEclipseProjectName() );\n\n // deploy-path is \"/\" for utility and ejb projects, \"/WEB-INF/classes\" for webapps\n String target = \"/\"; //$NON-NLS-1$\n\n if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$\n {\n target = \"/WEB-INF/classes\"; //$NON-NLS-1$\n\n File warSourceDirectory =\n new File( IdeUtils.getPluginSetting( config.getProject(), JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,\n \"warSourceDirectory\", //$NON-NLS-1$\n config.getProject().getBasedir() + \"/src/main/webapp\" ) );\n\n writeContextRoot( writer );\n\n writer.startElement( ELT_WB_RESOURCE );\n writer.addAttribute( ATTR_DEPLOY_PATH, \"/\" ); //$NON-NLS-1$\n writer.addAttribute( ATTR_SOURCE_PATH,\n IdeUtils.toRelativeAndFixSeparator( config.getEclipseProjectDirectory(),\n warSourceDirectory, false ) );\n writer.endElement();\n\n // add web resources over the top of the war source directory\n Xpp3Dom[] webResources =\n IdeUtils.getPluginConfigurationDom( config.getProject(), JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,\n new String[] { \"webResources\", \"resource\" } );\n for ( Xpp3Dom webResource : webResources )\n {\n File webResourceDirectory = new File( webResource.getChild( \"directory\" ).getValue() );\n writer.startElement( ELT_WB_RESOURCE );\n writer.addAttribute( ATTR_DEPLOY_PATH, \"/\" ); //$NON-NLS-1$\n writer.addAttribute( ATTR_SOURCE_PATH,\n IdeUtils.toRelativeAndFixSeparator( config.getEclipseProjectDirectory(),\n webResourceDirectory, false ) );\n writer.endElement();\n }\n\n // @todo is this really needed?\n writer.startElement( ELT_PROPERTY );\n writer.addAttribute( ATTR_NAME, \"java-output-path\" ); //$NON-NLS-1$\n writer.addAttribute( ATTR_VALUE, \"/\" //$NON-NLS-1$\n + IdeUtils.toRelativeAndFixSeparator( config.getProject().getBasedir(), buildOutputDirectory, false ) );\n writer.endElement(); // property\n\n }\n else if ( Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$\n {\n\n String defaultApplicationXML =\n config.getWtpapplicationxml() ? \"/target/eclipseEar\" : \"/src/main/application\";\n\n String earSourceDirectory =\n IdeUtils.getPluginSetting( config.getProject(), JeeUtils.ARTIFACT_MAVEN_EAR_PLUGIN,\n \"earSourceDirectory\", //$NON-NLS-1$\n config.getProject().getBasedir() + defaultApplicationXML );\n writer.startElement( ELT_WB_RESOURCE );\n writer.addAttribute( ATTR_DEPLOY_PATH, \"/\" ); //$NON-NLS-1$\n writer.addAttribute( ATTR_SOURCE_PATH,\n IdeUtils.toRelativeAndFixSeparator( config.getEclipseProjectDirectory(),\n new File( earSourceDirectory ), false ) );\n writer.endElement();\n }\n\n if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging )\n || Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) )\n {\n // write out the dependencies.\n writeWarOrEarResources( writer, config.getProject(), localRepository );\n\n }\n\n for ( EclipseSourceDir dir : sourceDirs )\n {\n // test src/resources are not added to wtpmodules\n if ( !dir.isTest() )\n {\n // <wb-resource deploy-path=\"/\" source-path=\"/src/java\" />\n writer.startElement( ELT_WB_RESOURCE );\n writer.addAttribute( ATTR_DEPLOY_PATH, target );\n writer.addAttribute( ATTR_SOURCE_PATH, dir.getPath() );\n writer.endElement();\n }\n }\n\n writer.endElement(); // wb-module\n writer.endElement(); // project-modules\n }",
"protected abstract JPackage getPackage( JPackage pkg, Aspect a );",
"Package createPackage();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Looks up and returns the ParameterService. | protected ParameterService getParameterService() {
if (this.parameterService == null) {
this.parameterService = KraServiceLocator.getService(ParameterService.class);
}
return this.parameterService;
} | [
"public ParameterService getParameterService() {\n return parameterService;\n }",
"protected ParameterService getParameterService() {\r\n return parameterService;\r\n }",
"public ParameterService getParameterService() {\r\n\t\treturn parameterService;\r\n\t}",
"public interface ParameterService\r\n{\r\n\r\n\t/**\r\n\t * Get a parameter by parameter name, including parameter values.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param parameterName\r\n\t * @param callerID\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic ParameterModel getParameter(String serviceProviderCode, String parameterName, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get all parameters of an agency.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param callerID\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getParametersBySPC(String serviceProviderCode, String callerID) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Get all parameters of an agency, returned one page by one page.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param queryFormat\r\n\t * @param callerID\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic AADataPage getParametersBySPC(String serviceProviderCode, QueryFormat queryFormat, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get reference parameters by agency, paramName,tableName and fieldName.\r\n\t * \r\n\t * @param model\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getRefParameters(ParameterModel model) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get all available reference parameters of the theme name.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param themeName\r\n\t * @param callerID\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getAvailableRefParameters(String serviceProviderCode, String themeName, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get all available reference parameters of the theme name, by\r\n\t * paramName,tableName and fieldName.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param themeName\r\n\t * @param model\r\n\t * @param callerID\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getAvailableRefParameters(String serviceProviderCode, String themeName, ParameterModel model,\r\n\t\t\tString callerID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Create a parameter.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param parameter\r\n\t * @param callerID\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic ParameterModel createParameter(String serviceProviderCode, ParameterModel parameter, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Update a parameter with underlying parameter value list.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param parameter\r\n\t * @param callerID\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic void updateParameter(String serviceProviderCode, ParameterModel parameter, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Create a parameter value.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param parameterName\r\n\t * @param parameterValue\r\n\t * @param callerID\r\n\t * @return @throws\r\n\t * AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic ParameterValueModel createParameterValue(String serviceProviderCode, String parameterName,\r\n\t\t\tString parameterValue, String callerID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Remove a parameter value by PK.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param parameterName\r\n\t * @param parameterValue\r\n\t * @param callerID\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic void removeParameterValue(String serviceProviderCode, String parameterName, String parameterValue,\r\n\t\t\tString callerID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get all tables in the database schema, listed alphabetically.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param callerID\r\n\t * @return Collection of String (table name)\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getTables(String serviceProviderCode, String callerID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get all tables in the database schema, listed alphabetically, returned\r\n\t * one page by one page.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param queryFormat\r\n\t * @param callerID\r\n\t * @return Collection of String (table name)\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic AADataPage getTables(String serviceProviderCode, QueryFormat queryFormat, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get all fields associated to the table, listed alphabetically.\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param tableName\r\n\t * @param callerID\r\n\t * @return Collection of String (field name)\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getFieldsByTable(String serviceProviderCode, String tableName, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n}",
"Parameter createParameter();",
"public interface ParameterService {\r\n\r\n /**\r\n * \r\n * @param municipality\r\n * @param requestTypeId\r\n * @param parameterId\r\n * (xpath expression relative to the claimType node)\r\n * @return\r\n */\r\n String getParameter(long municipalityId, long requestTypeId, String parameterId);\r\n\r\n RequestParameters getParameters(long municipalityId, long requestTypeId);\r\n\r\n RequestParameters getParameters(long municipalityId, String requestType);\r\n\r\n void create(Map<String, String> parameters, long municipalityId, long requestTypeId);\r\n\r\n void update(Map<String, String> parameters, long municipalityId, long requestTypeId);\r\n\r\n}",
"public Object getParameter() {\n return getFromContainer(parameter);\n }",
"public ParameterAPI getIndependentParameter(String name)\n throws ParameterException;",
"ParameterConfiguration getParameterConfiguration(String name);",
"Parameter getParameter();",
"public void setParameterService(ParameterService parameterService) {\r\n this.parameterService = parameterService;\r\n }",
"public void setParameterService(ParameterService parameterService) {\n this.parameterService = parameterService;\n }",
"public interface DbConfigurationParamService {\n\n // note: insert and delete operations is not allowed, all parameters should be inserted by database script\n\n /**\n * Updates existing parameter.\n *\n * @param parameter The configuration parameter\n */\n void update(DbConfigurationParam parameter);\n\n /**\n * Gets the parameter.\n *\n * @param code The parameter code\n * @return the parameter\n * @throws ConfigurationException when there is no parameter with specified code\n */\n DbConfigurationParam getParameter(String code);\n\n /**\n * Finds parameter.\n *\n * @param code The parameter code\n * @return the parameter or {@code null} if there is no parameter with specified code\n */\n Optional<DbConfigurationParam> findParameter(String code);\n\n /**\n * Finds all parameters.\n *\n * @return list of parameters sorted by {@code categoryCode} and {@code code}\n */\n List<DbConfigurationParam> findAllParameters();\n\n}",
"public void setParameterService(ParameterService parameterService) {\r\n\t\tthis.parameterService = parameterService;\r\n\t}",
"ParameterIdentification createParameterIdentification();",
"public ParameterVOImpl getParameterVO() {\n return (ParameterVOImpl) findViewObject(\"ParameterVO\");\n }",
"OperationParameter createOperationParameter();",
"Object getParameterValue(Parameter param);",
"<S> S getService(ServiceUse<S> use);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if start date and time form field is valid, calls validateDateAndTime() to do so Sets the boolean value indicating validity once done | public void validateStartDateAndTime(String date){
setStartDateAndTimeValid(validateDateAndTime(date));
} | [
"public boolean validateTime(){\n if(startSpinner.getValue().isAfter(endSpinner.getValue())){\n showError(true, \"The start time can not be greater than the end time.\");\n return false;\n }\n if(startSpinner.getValue().equals(endSpinner.getValue())){\n showError(true, \"The start time can not be the same as the end time.\");\n return false;\n }\n startLDT = convertToTimeObject(startSpinner.getValue());\n endLDT = convertToTimeObject(endSpinner.getValue());\n startZDT = convertToSystemZonedDateTime(startLDT);\n endZDT = convertToSystemZonedDateTime(endLDT);\n\n if (!validateZonedDateTimeBusiness(startZDT)){\n return false;\n }\n if (!validateZonedDateTimeBusiness(endZDT)){\n return false;\n };\n return true;\n }",
"private boolean validateTimeToPickUpField() {\n\t\tif (_timeToPickUpEditText.length() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean validateEventStartDate(){\n //get event start date\n String eventStartDateInput = eventStartDateTV.getText().toString().trim();\n\n //if event start date == null\n if(eventStartDateInput.isEmpty())\n {\n eventStartDateTV.setError(\"Please set the start date for the event\");\n return false;\n }\n else{\n eventStartDateTV.setError(null);\n return true;\n }\n }",
"public boolean isSetStart_time() {\n return this.start_time != null;\n }",
"public void validateTimesForm() {//GEN-END:|127-if|0|127-preIf\n // enter pre-if user code here\n boolean validationResult = true;\n validationResult = validationResult && checkTimeFormat(actualSettingBean.getStartupTime());\n validationResult = validationResult && checkTimeFormat(actualSettingBean.getWorkoutTime());\n validationResult = validationResult && checkTimeFormat(actualSettingBean.getRestTime());\n if (validationResult) {//GEN-LINE:|127-if|1|128-preAction\n // write pre-action user code here\n saveSetting();\n switchDisplayable(null, getOptions());//GEN-LINE:|127-if|2|128-postAction\n // write post-action user code here\n } else {//GEN-LINE:|127-if|3|129-preAction\n // write pre-action user code here\n switchDisplayable(getValidationError(), getTimesForm());//GEN-LINE:|127-if|4|129-postAction\n // write post-action user code here\n }//GEN-LINE:|127-if|5|127-postIf\n // enter post-if user code here\n }",
"public boolean timeFieldIsValid() {\n if (timeField == null) {\n return true;\n }\n\n if (TimeField.fieldIsValid(timeField)) {\n return true;\n }\n\n if (program.getTrackedEntityAttributes().stream()\n .anyMatch(at -> at.getValueType().isDate() && timeField.equals(at.getUid()))) {\n return true;\n }\n\n if (program.getDataElements().stream()\n .anyMatch(de -> de.getValueType().isDate() && timeField.equals(de.getUid()))) {\n return true;\n }\n\n return false;\n }",
"@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }",
"boolean isSetValidityFromDate();",
"public void setValidtime(Date validtime) {\n this.validtime = validtime;\n }",
"private boolean validTimes(boolean forRes) {\n\n // reset label\n inputErrorLbl.setText(\"\");\n\n makeMinutesValid();\n // Get the selected times\n int start = startTimePicker.getValue().getHour();\n int mins = startTimePicker.getValue().getMinute() / (timeStepMinutes);\n int index = (start - openTime) * timeStep + mins;\n int end = endTimePicker.getValue().getHour();\n int endMins = endTimePicker.getValue().getMinute() / (timeStepMinutes);\n int endIndex = (end - openTime) * timeStep + endMins;\n\n // If the chosen date is in the past, show an error\n if (forRes && datePicker.getValue().atStartOfDay().isBefore(LocalDate.now().atStartOfDay())) {\n inputErrorLbl.setVisible(true);\n inputErrorLbl.setText(pastDateErrorText);\n return false;\n }\n\n // If the times are outside the location's open times\n // or end is greater than start, the times are invalid\n if (endIndex <= index || start < openTime || closeTime < end) {\n inputErrorLbl.setVisible(true);\n inputErrorLbl.setText(timeErrorText);\n return false;\n }\n\n if (forRes) {\n // For each time in the reservation, check whether it is already booked\n ArrayList<Integer> thisDay;\n if (datePicker.getValue().getDayOfWeek().getValue() == 7) {\n thisDay= weeklySchedule.get(0);\n }\n else {\n thisDay = weeklySchedule.get(datePicker.getValue().getDayOfWeek().getValue());\n }\n for (int i = index; i < endIndex; i++) {\n if (thisDay.get(i) == 1) { // If so, show an error\n inputErrorLbl.setVisible(true);\n inputErrorLbl.setText(conflictErrorText);\n return false;\n }\n }\n }\n return true;\n }",
"public void setValidFrom(Date validFrom);",
"boolean hasValidUntilTime();",
"boolean isSetStartDate();",
"private boolean validateEndTime() {\n\t\tboolean valid = true;\n\t\t// If whole day then ignore what is in drop down lists\n\t\tif (timePeriodRBtn.isSelected()) {\n\t\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tDate startTime = null;\n\t\t\ttry {\n\t\t\t\tstartTime = timeFormat.parse(startTimeCbox.getSelectedItem().toString());\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcal.setTime(startTime);\n\t\t\tCalendar cal2 = Calendar.getInstance();\n\t\t\tDate endTime = null;\n\t\t\ttry {\n\t\t\t\tendTime = timeFormat.parse(endTimeCbox.getSelectedItem().toString());\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcal2.setTime(endTime);\n\t\t\t// Check if start time selected is before end time selected\n\t\t\tvalid = cal.getTime().before(cal2.getTime());\n\t\t\tSystem.out.println(\"Valid End Time: \" + valid);\n\t\t}\n\t\treturn valid;\n\t}",
"public boolean isSetStartTime() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"public boolean isSetStartTime() {\n return this.startTime != null;\n }",
"public boolean timeValidated(Event e) {\n\t\tLocalDate date = e.sDate;\n\t\tLocalTime stime = e.sTime;\n\t\tLocalTime etime = e.eTime;\n\t\tArrayList<Event> list = new ArrayList<Event>();\n\t\tif(map.containsKey(date)) {\n\t\t\tlist = map.get(date);\n\n\t\t\tfor(int i = 0; i<list.size(); i++) {\n\t\t\t\tEvent evnt = list.get(i);\n\n\t\t\t\tif(e.sTime.equals(evnt.sTime) || e.eTime.equals(evnt.eTime)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//check for start times\n\t\t\t\tif(e.sTime.isBefore(evnt.sTime)) {\n\t\t\t\t\tif(!e.eTime.isBefore(evnt.sTime)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//check for end time\n\t\t\t\tif(e.sTime.isAfter(evnt.sTime)) {\n\t\t\t\t\tif(!e.sTime.isAfter(evnt.eTime)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}",
"private void validateTimeSlot(final EditText ed, final boolean isStart){\n\n final String name = isStart ? getString(R.string.wmc_ts_1) : getString(R.string.wmc_ts_2);\n\n //empty ?\n if (TextUtils.isEmpty(ed.getText().toString())) {\n statusTV.setText(isStart ? getString(R.string.state_time_slot_start_null, name) : getString(R.string.state_time_slot_end_null, name));\n return;\n }\n try{\n //valid ? due to filtering @TimeSlotInputFilter this should not be necessary, but better double check\n final int newValue = Integer.parseInt(ed.getText().toString());\n if(newValue > TIME_SLOT_MAX || newValue < TIME_SLOT_MIN){\n statusTV.setText(isStart ? getString(R.string.state_time_slot_start_oob, name) : getString(R.string.state_time_slot_end_oob, name));\n return;\n }\n\n //valid\n if(ed.hashCode() == timeSlot1StartEt.hashCode()) {\n currentConfiguration.timerSlot1Start = newValue;\n }else if(ed.hashCode() == timeSlot1EndEt.hashCode()){\n currentConfiguration.timerSlot1Stop = newValue;\n }else if(ed.hashCode() == timeSlot2StartEt.hashCode()){\n currentConfiguration.timerSlot2Start = newValue;\n }else if(ed.hashCode() == timeSlot2EndEt.hashCode()){\n currentConfiguration.timerSlot2Stop = newValue;\n }\n statusTV.setText(isStart ? getString(R.string.state_time_slot_start_edited, name, newValue) : getString(R.string.state_time_slot_end_edited, name, newValue));\n\n }catch (NumberFormatException e){\n statusTV.setText(getString(R.string.state_incorrect_input));\n }\n}",
"public boolean isSetStartTime() {\r\n return this.startTime != null;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search all files in directory wich in their name has timestamp from begin date to end date | static public Vector<File> searchDateFiles(File dir, Date beginDate, Date endDate, String prefix) {
Vector<File> toReturn=new Vector<File>();
// if directory ha files
if(dir.isDirectory() && dir.list()!=null && dir.list().length!=0){
// serach only files starting with prefix
// get sorted array
File[] files=getSortedArray(dir, prefix);
if (files == null){
throw new SpagoBIServiceException(SERVICE_NAME, "Missing files in specified interval");
}
// cycle on all files
boolean exceeded = false;
for (int i = 0; i < files.length && !exceeded; i++) {
File childFile = files[i];
// extract date from file Name
Date fileDate=null;
try {
fileDate = extractDate(childFile.getName(), prefix);
} catch (ParseException e) {
// TODO Auto-generated catch block
logger.error("error in parsing log file date, file will be ignored!",e);
continue;
}
// compare beginDate and timeDate, if previous switch file, if later see end date
// compare then end date, if previous then endDate add file, else exit
// if fileDate later than begin Date
if(fileDate !=null && fileDate.after(beginDate)){
// if end date later than file date
if(endDate.after(fileDate)){
// it is in the interval, add to list!
toReturn.add(childFile);
}
else { // if file date is later then end date, we are exceeding interval
exceeded = true;
}
}
}
}
return toReturn;
} | [
"private Iterable<File> findUpdateFilesAfter(long minimumLastModified) {\r\n\t\t String dataFileName = dataFile.getName();\r\n\t\t int period = dataFileName.indexOf('.');\r\n\t\t String startName = period < 0 ? dataFileName : dataFileName.substring(0, period);\r\n\t\t File parentDir = dataFile.getParentFile();\r\n\t\t Map<Long, File> modTimeToUpdateFile = new TreeMap<Long,File>();\r\n\t\t for (File updateFile : parentDir.listFiles()) {\r\n\t\t String updateFileName = updateFile.getName();\r\n\t\t if (updateFileName.startsWith(startName)\r\n\t\t && !updateFileName.equals(dataFileName)\r\n\t\t && updateFile.lastModified() >= minimumLastModified) {\r\n\t\t modTimeToUpdateFile.put(updateFile.lastModified(), updateFile);\r\n\t\t }\r\n\t\t }\r\n\t\t return modTimeToUpdateFile.values();\r\n\t\t }",
"List<File> search(String directory, String fileName);",
"private List<FileStatus> findTimestampedDirectories() throws IOException {\n List<FileStatus> fsList = JobHistoryUtils.localGlobber(doneDirFc,\n doneDirPrefixPath, DONE_BEFORE_SERIAL_TAIL);\n return fsList;\n }",
"public void searchByDate() throws ParseException, FileNotFoundException {\n//\t\tSystem.out.println(\"Got into the method im testing\");\n\t\tString start=startDate.getText();\n\t\tString end=endDate.getText();\n\t\tstartDate.setText(\"\");\n\t\tendDate.setText(\"\");\n\t\tString[] checkstart=start.split(\"/\");\n\t\tString[] checkend=end.split(\"/\");\n\t\t// check if the numbers are ok later\n\t\tif((!areDates(checkstart))||(!areDates(checkend))) {\n\t\t\tshowAlert(\"These are not valid dates\");\n\t\t\treturn;\n\t\t}\n\t\tArrayList<Photo> photosBySearch=user.getPhotosByDate(start, end);\n\t\tnewAlbum=photosBySearch;\n\t\tsetGridpane(photosBySearch);\n\t}",
"private void findAllFiles() {\n foundFiles = searcher.search(params.getDirectoryKey(), params.getFileNameKey());\n }",
"public ArrayList<String> searchByDate(LocalDateTime start, LocalDateTime end, boolean single) {\n\t\tpreviews.getChildren().clear();\n\t\tArrayList<String> paths = new ArrayList<String>();\n\t\tfor (Map.Entry<String, Picture> e : currUser.pictures.entrySet()) {\n\t\t\tif (single && !currUser.albums.get(currAlbum).contains(e.getKey())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (e.getValue().date.compareTo(start) >= 0 && e.getValue().date.compareTo(end) <= 0) {\n\t\t\t\tpaths.add(e.getKey());\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}",
"@Override\n\tpublic ResultTO getFileInfoFromInterval(LocalDateTime startDateTime, LocalDateTime endDateTime) {\n\t\tResultTO result = this.getAllFiles();\n\t\tif (result.isError()) {\n\t\t\treturn result;\n\t\t}\n\t\tList<InfoFileTO> infoFileList = result.getFiles();\n\t\tList<InfoFileTO> filterFileList = new ArrayList<>();\n\t\t// If it is void (when some error occurred) it is not executed\n\t\tfor (InfoFileTO infoFileTO : infoFileList) {\n\t\t\tLocalDateTime lastModify = infoFileTO.getLastModify();\n\t\t\tif (lastModify.isAfter(startDateTime) && lastModify.isBefore(endDateTime)) {\n\t\t\t\tfilterFileList.add(infoFileTO);\n\t\t\t}\n\t\t}\n\t\tresult.setFiles(filterFileList);\n\t\treturn result;\n\t}",
"private String[] _filesBetween(Date begin, Date end, String[] files) {\n\n ArrayList list = new ArrayList(files.length);\n\n for (int i = 0; i < files.length; ++i) {\n File f = new File(files[i]);\n Date date = new Date(f.lastModified());\n if (date.before(end) && date.after(begin)) {\n list.add(files[i]);\n }\n }\n list.trimToSize();\n\n if (list.size() == 0)\n return null;\n\n String[] newlist = new String[0];\n newlist = (String[]) list.toArray(newlist); \n\n return newlist;\n }",
"@Override\n public List<String> getListOfDates() throws FlooringMasteryPersistenceException {\n \n List<String> listOfDates = new ArrayList<>();\n String dateToLoad = \"\"; \n String fileDirectory = System.getProperty(\"user.dir\"); // get the directory of where java was ran (this project's folder)\n \n File folder = new File(fileDirectory); // turn the directory string into a file\n File[] listOfFiles = folder.listFiles(); // get the list of files in the directory\n \n \n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n \n String nameOfFile = listOfFiles[i].getName(); // get the name of the file\n String numbersOnly = nameOfFile.replaceAll(\"[\\\\D]\", \"\"); // replace all non-number characters with whitespace\n\n if(numbersOnly.equals(\"\")){ // if there were no numbers in the file name (ex. pom.xml), do nothing\n \n }else{\n int dateOfFile = Integer.parseInt(numbersOnly); // get the numbers part of the file name\n int lengthOfdate = String.valueOf(dateOfFile).length(); // get the length of the int by converting it to a String and using .length\n if(lengthOfdate < numbersOnly.length()){ // if the leading 0 got chopped off when parsing\n dateToLoad = \"0\"+ dateOfFile; // add it back\n }else{\n dateToLoad = Integer.toString(dateOfFile); // otherwise if there were no leading 0s, set to the String version of dateOfFile, NOT dateToLoad, as that will have the previous date\n }\n listOfDates.add(dateToLoad);\n }\n \n }\n \n }\n \n return listOfDates;\n\n }",
"private boolean isWithinCreatedRange(File file)\n {\n String istoday=searchCriterial.getTimeOption();\n boolean isInRange=false;\n BasicFileAttributes fileAttributes;\n DateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd\");\n switch(istoday) {\n case \"Today\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.creationTime().toMillis()));\n\n String startDate = dateFormat.format(searchCriterial.getTodayDate());\n String formatDate = (dateFormat.format(fileAttributes.creationTime().toMillis()));\n\n isInRange = ((formatDate.equals(startDate)));\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"Yesterday\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.creationTime().toMillis()));\n\n String startDate = dateFormat.format(searchCriterial.getYesterdayDate());\n String formatDate = (dateFormat.format(fileAttributes.creationTime().toMillis()));\n\n isInRange = ((formatDate.equals(startDate)));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"All Time\":\n\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.creationTime().toMillis()));\n isInRange = !(testDate.before(searchCriterial.getCreatedStartDate()) || testDate.after(searchCriterial.getCreatedEndDate()));\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"Time Range\":\n\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.creationTime().toMillis()));\n isInRange = !(testDate.before(searchCriterial.getCreatedStartDate()) || testDate.after(searchCriterial.getCreatedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"\":\n\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.creationTime().toMillis()));\n isInRange = !(testDate.before(searchCriterial.getCreatedStartDate()) || testDate.after(searchCriterial.getCreatedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n }\n return isInRange;\n }",
"private List<IndexLocation> flattenDirectoriesByTimestamp(final boolean includeOldIndices) {\n final List<IndexLocation> startTimeWithFile = new ArrayList<>();\n for (final Map.Entry<Long, List<IndexLocation>> entry : indexLocationByTimestamp.entrySet()) {\n if (includeOldIndices) {\n startTimeWithFile.addAll(entry.getValue());\n } else {\n for (final IndexLocation location : entry.getValue()) {\n if (location.getIndexDirectory().getName().startsWith(\"lucene-\")) {\n startTimeWithFile.add(location);\n }\n }\n }\n }\n\n return startTimeWithFile;\n }",
"private void findRecordings(){\n File[] files = new File(\"Concatenated/\").listFiles();\n _records.clear();\n _versionNum = 1;\n for (File file : files){\n if (file.isFile()){\n String nameOnFile = file.getName().substring(file.getName().lastIndexOf('_')+1,file.getName().lastIndexOf('.')).toUpperCase();\n if (nameOnFile.equals(_name.toUpperCase())){\n _records.add(file.getName());\n _versionNum++;\n }\n }\n }\n }",
"public void filesAudit(String from, String to) {\n int incidences = 0;\n\n //determine 'FROM' in milliseconds\n GregorianCalendar startingTimeGC = new GregorianCalendar(TimeZone.getTimeZone(\"GMT\"));\n String[] ymd_hms = from.split(\" \");\n String[] ymd = ymd_hms[0].split(\"\\\\.\");\n String[] hms = ymd_hms[1].split(\":\");\n startingTimeGC.set(Integer.valueOf(ymd[0]), Integer.valueOf(ymd[1]) - 1, Integer.valueOf(ymd[2]),\n Integer.valueOf(hms[0]), Integer.valueOf(hms[1]), Integer.valueOf(hms[2]));\n startingTimeGC.set(Calendar.MILLISECOND, 0);\n long from_ml = startingTimeGC.getTimeInMillis();\n\n //determine 'TO' in milliseconds\n GregorianCalendar endingTimeGC = new GregorianCalendar(TimeZone.getTimeZone(\"GMT\"));\n ymd_hms = to.split(\" \");\n ymd = ymd_hms[0].split(\"\\\\.\");\n hms = ymd_hms[1].split(\":\");\n endingTimeGC.set(Integer.valueOf(ymd[0]), Integer.valueOf(ymd[1]) - 1, Integer.valueOf(ymd[2]),\n Integer.valueOf(hms[0]), Integer.valueOf(hms[1]), Integer.valueOf(hms[2]));\n endingTimeGC.set(Calendar.MILLISECOND, 0);\n long to_ml = endingTimeGC.getTimeInMillis();\n\n System.out.println(\"checking BASE CSV integrity...\");\n while (from_ml < to_ml) {\n for (String pair : ALX_Common.getTradeablePairs()) {\n GregorianCalendar gc = new GregorianCalendar(TimeZone.getTimeZone(\"GMT\"));\n gc.setTimeInMillis(from_ml);\n String year = String.valueOf(gc.get(Calendar.YEAR));\n String month = ATick.labeledInt(gc.get(Calendar.MONTH) + 1);\n String day = ATick.labeledInt(gc.get(Calendar.DAY_OF_MONTH));\n String filename = pair + \"_\" + year + \"_\" + month + \"_\" + day + \".csv\";\n String path = TICK_PATH + pair + \"/\" + year + \"/\" + filename;\n\n File file = new File(path);\n if (!file.exists()) { //file doesn't exist\n if (gc.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY) { //is not weekend day\n System.out.println(\"...missing tick file for: \" + path);\n incidences++;\n }\n } else {\n checkHours(path);\n }\n }\n\n from_ml += 24 * 60 * 60 * 1000; //next day\n }\n\n System.out.println(\"files checking done! incidences: \" + incidences);\n }",
"@Test(groups = {\"unit\"})\n public void testRetentionSameDayFiles() throws Exception {\n File base = createTmpNameSpace();\n\n long now = System.currentTimeMillis();\n\n /* create recent files & directories */\n File dirA = new File(base, dateFormat.format(new Date(now)));\n List<File> fileUnderDirA = touchFiles(now, dirA);\n touchFile(now, dirA, true);\n\n /* create files one hour ago */\n long oneHourAgo = nTimeUnitsAgo(now, 1, TimeUnit.HOURS);\n File dirB = new File(base, dateFormat.format(new Date(oneHourAgo)));\n List<File> fileUnderDirB = touchFiles(oneHourAgo, dirB);\n touchFile(oneHourAgo, dirB, true);\n\n applyRetention(1, base.getCanonicalPath());\n\n /* assert remaining contents are as expected (all files under dir A) */\n List<File> actual = Lists.newArrayList();\n findTestUtil.allFiles(base, actual);\n List<File> expected = Lists.newArrayList(fileUnderDirA);\n expected.addAll(fileUnderDirB);\n expected.add(dirA);\n expected.add(dirB);\n Assert.assertEqualsNoOrder(actual.toArray(), expected.toArray());\n }",
"public synchronized List<File> getDirectoriesBefore(final long timestamp) {\n final List<File> selected = new ArrayList<>();\n\n // An index cannot be expired if it is the latest index in the storage directory. As a result, we need to\n // separate the indexes by Storage Directory so that we can easily determine if this is the case.\n final Map<String, List<IndexLocation>> startTimeWithFileByStorageDirectory = flattenDirectoriesByTimestamp(true).stream()\n .collect(Collectors.groupingBy(IndexLocation::getPartitionName));\n\n // Scan through the index directories and the associated index event start time.\n // If looking at index N, we can determine the index end time by assuming that it is the same as the\n // start time of index N+1. So we determine the time range of each index and select an index only if\n // its start time is before the given timestamp and its end time is <= the given timestamp.\n for (final List<IndexLocation> locationList : startTimeWithFileByStorageDirectory.values()) {\n for (int i = 0; i < locationList.size(); i++) {\n final IndexLocation indexLoc = locationList.get(i);\n\n final String partition = indexLoc.getPartitionName();\n final IndexLocation activeLocation = activeIndices.get(partition);\n if (indexLoc.equals(activeLocation)) {\n continue;\n }\n\n final long indexStartTime = indexLoc.getIndexStartTimestamp();\n if (indexStartTime > timestamp) {\n // If the first timestamp in the index is later than the desired timestamp,\n // then we are done. We can do this because the list is ordered by monotonically\n // increasing timestamp as the Tuple key.\n break;\n }\n\n final long indexEndTime = indexLoc.getIndexEndTimestamp();\n if (indexEndTime <= timestamp) {\n logger.debug(\"Considering Index Location {} older than {} ({}) because its events have an EventTime \"\n + \"ranging from {} ({}) to {} ({}) based on the following IndexLocations: {}\", indexLoc, timestamp, new Date(timestamp),\n indexStartTime, new Date(indexStartTime), indexEndTime, new Date(indexEndTime), locationList);\n\n selected.add(indexLoc.getIndexDirectory());\n }\n }\n }\n\n logger.debug(\"Returning the following list of index locations because they were finished being written to before {}: {}\", timestamp, selected);\n return selected;\n }",
"public List<String> getFileDatesForName(String name) {\n List<String> toReturn = new ArrayList<>();\n if (nameList.get(name) != null) {\n toReturn = nameList.get(name).returnDates();\n Collections.sort(toReturn);\n }\n return toReturn;\n }",
"public Set<File> getImageFilesOfDateTaken(int year, int month, int day) {\n Set<File> files = new HashSet<>();\n Connection con = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n try {\n con = getConnection();\n String sql = \"SELECT files.filename FROM exif LEFT JOIN files\"\n + \" ON exif.id_file = files.id\"\n + \" WHERE exif.exif_date_time_original LIKE ?\"\n + \" UNION SELECT files.filename\"\n + \" FROM xmp LEFT JOIN files\"\n + \" ON xmp.id_file = files.id\"\n + \" WHERE xmp.iptc4xmpcore_datecreated LIKE ?\"\n + \" ORDER BY files.filename ASC\";\n stmt = con.prepareStatement(sql);\n String exifDateString = getExifSqlDateString(year, month, day);\n String xmpDateString = getXmpSqlDateString(year, month, day);\n stmt.setString(1, exifDateString);\n stmt.setString(2, xmpDateString);\n LOGGER.log(Level.FINEST, stmt.toString());\n rs = stmt.executeQuery();\n while (rs.next()) {\n files.add(new File(rs.getString(1)));\n }\n } catch (Throwable t) {\n LOGGER.log(Level.SEVERE, null, t);\n } finally {\n close(rs, stmt);\n free(con);\n }\n\n return files;\n }",
"private boolean isWithinAccessedRange(File file)\n {\n\n String istoday=searchCriterial.getTimeOption();\n boolean isInRangeAccess=false;\n BasicFileAttributes fileAttributes;\n DateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd\");\n switch(istoday) {\n case \"Today\":\n\n\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n\n String startDate = dateFormat.format(searchCriterial.getTodayDate());\n String formatDate = (dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n\n isInRangeAccess = ((formatDate.equals(startDate)));\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"Yesterday\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n\n String startDate = dateFormat.format(searchCriterial.getYesterdayDate());\n String formatDate = (dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess = ((formatDate.equals(startDate)));\n\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"All Time\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess= !(testDate.before(searchCriterial.getAccessedStartDate()) || testDate.after(searchCriterial.getAccessedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n\n break;\n case \"Time Range\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess= !(testDate.before(searchCriterial.getAccessedStartDate()) || testDate.after(searchCriterial.getAccessedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n\n break;\n case \"\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess= !(testDate.before(searchCriterial.getAccessedStartDate()) || testDate.after(searchCriterial.getAccessedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n\n break;\n }\n return isInRangeAccess;\n\n }",
"List<File> list(String directory) throws FindException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert an input stream to a buffered reader. | private static BufferedReader streamToReader(InputStream in) {
BufferedReader br;
try {
br = new BufferedReader(new InputStreamReader(new BufferedInputStream(in), "UTF-8"), 8);
} catch (UnsupportedEncodingException e) {
br = null;
}
return br;
} | [
"public static BufferedInputStream get(InputStream in) {\n if(in == null || in instanceof BufferedInputStream) {\n return (BufferedInputStream)in;\n }\n return new BufferedInputStream(in);\n }",
"static public BufferedReader asBufferedUTF8(InputStream in) {\n // Always buffered - for readLine.\n return new BufferedReader(asUTF8(in), BUFSIZE_IN / 2);\n }",
"public CRBufferedInputStream( InputStream in ) {\n super( in, DEFAULT_BUFFER );\n }",
"public void readInputFrom(InputStream stream);",
"public static SequenceReader getReader (InputStream ins) throws IOException{\n\t\t//Make sure the stream supports mark\n\t\tif (!ins.markSupported()) {\n\t\t\tins = new BufferedInputStream(ins);\n\t\t}\n\t\t\n\t\t//check if a zip\n\t\tins.mark(10);\n\t\tbyte [] myBuf = new byte[10];\n\t\tins.read(myBuf);\n\t\tins.reset();\t\t\n\t\tint magic = myBuf[0] & 0xff | ((myBuf[1] << 8) & 0xff00);\n\t\t\n\t\tif (magic == GZIPInputStream.GZIP_MAGIC){\n\t\t\tins = new BufferedInputStream(new GZIPInputStream(ins));\n\t\t\tins.mark(10);\n\t\t\tins.read(myBuf);\n\t\t\tins.reset();\n\t\t}\n\t\t\n\t\tString format = new String(myBuf);\t\t\n\t\t\n\t\tif (format.startsWith(\">\"))\n\t\t\treturn new FastaReader(ins);\n\t\telse if (format.startsWith(\"@\"))\n\t\t\treturn new FastqReader(ins);\n\t\telse if (format.startsWith(JapsaFileFormat.HEADER))\n\t\t\treturn new JapsaFileFormat(ins);\n\t\t\t\n\t\treturn null;\n\t}",
"private Buffer readBuffer(InputStream is) throws IOException {\n Buffer b = new Buffer();\n int want = BUFFSIZE;\n while (b.have < want) {\n int got = is.read(b.buff, b.have, want - b.have);\n if (got < 0) {\n b.done = true;\n break;\n }\n b.have += got;\n }\n if (showRead) System.out.println(\"Read buffer at \" + bytesRead + \" len=\" + b.have);\n bytesRead += b.have;\n return b;\n }",
"public static BufferedInputStream getBufferedInput(File source)\n throws IOException {\n boolean isGzipped = source.getName().toLowerCase().\n endsWith(GZIP_SUFFIX);\n FileInputStream fis = new FileInputStream(source);\n return isGzipped ? new BufferedInputStream(new GZIPInputStream(fis))\n : new BufferedInputStream(fis);\n }",
"public static BufferedReader get(Reader in) {\n if(in == null || in instanceof BufferedReader) {\n return (BufferedReader)in;\n }\n return new BufferedReader(in);\n }",
"public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}",
"public static NetFlowReader prepareReader(\n DataInputStream inputStream,\n int buffer) throws IOException {\n return prepareReader(inputStream, buffer, false);\n }",
"public GenericReader(InputStream in) {\n\t this(in, DEFAULT_BUFFER_SIZE);\n\t }",
"public XMLStreamReader2 createStax2Reader(InputStream in)\n throws XMLStreamException\n {\n return wrapIfNecessary(_staxFactory.createXMLStreamReader(in));\n }",
"ByteReader getReader();",
"public SAXBufferedInputStream(InputStream is) {\n super(is);\n }",
"public BufferedReader(Reader in) {\n super(in);\n this.in = in;\n buf = new char[8192];\n }",
"public static NetFlowReader prepareReader(\n DataInputStream inputStream,\n int buffer,\n boolean ignoreCorruptFile) throws IOException {\n return new NetFlowReader(inputStream, buffer, ignoreCorruptFile);\n }",
"private DataInputStream readBuffer( DataInputStream in, int count ) throws IOException{\n byte[] buffer = new byte[ count ];\n int read = 0;\n while( read < count ){\n int input = in.read( buffer, read, count-read );\n if( input < 0 )\n throw new EOFException();\n read += input;\n }\n \n ByteArrayInputStream bin = new ByteArrayInputStream( buffer );\n DataInputStream din = new DataInputStream( bin );\n return din;\n }",
"public FastqReader(BufferedReader in)\n\t{\n\t\ttheBufferedReader = in;\n\t}",
"public static BinaryDataReader bigEndian(InputStream in) {\n return new BinaryDataReader(new DataInputStream(in));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the cookie registry with the cookie occurrence. | private static void updateRegistry(String cookie) {
if (cookieCounterRegistry.containsKey(cookie)) {
cookieCounterRegistry.put(cookie, cookieCounterRegistry.get(cookie) + 1);
} else {
cookieCounterRegistry.put(cookie, 1);
}
} | [
"void updateCookieJar(ICookie cookie);",
"void updateCookie(String cookie);",
"void updateCookies(Map<String, String> cookies);",
"private int addCookie(String cookie) {\n\t\tif (cookies.contains(cookie)) return 0; //we have this exact cookie\n\n\t\tString newCookieName = cookie.split(\"=\")[0];\n\t\tif (cookies.contains(newCookieName)) replaceCookies(newCookieName); //we have a cookie with the same name as the new cookie, swap them\n\n\t\tprocessor.printSys(\"New Cookie: \" + cookie);\n\t\tcookies += (cookie + \"; \"); //add the new cookie followed by a semicolon\n\n\t\treturn 1;\n\t}",
"abstract public void setCookie(String name, String value);",
"public final void finalizeCookies(HttpServletResponse res) {\n\t\tfor (Cookie c : updatedCookies) {\n\t\t\tres.addCookie(c);\n\t\t}\n\t}",
"public void addCookie (HttpCookie cookie);",
"void addCookie(HttpServletResponse response, Cookie cookie);",
"public void setCookie(String cookie);",
"private void updateCookieList(){\n\t\tdropDown.removeAllItems();\n\t\tfor(String s: db.getCookieNames()){\n\t\t\tdropDown.addItem(s);\n\t\t}\n\t}",
"Response addCookie(String name, String value);",
"protected void addSaveCookie() {\n if (getLookup().lookup(SaveCookie.class) == null) {\n getCookieSet().add(this.saveCookie);\n }\n }",
"void addCookie(String domain, String name, String value);",
"Set<Cookie> setCookie();",
"public void addCookie(Cookie cookie) {\n HttpSetCookieList clist = reply.getSetCookie();\n if (clist == null) {\n HttpSetCookie cookies[] = new HttpSetCookie[1];\n cookies[0] = convertCookie(cookie);\n clist = new HttpSetCookieList(cookies);\n } else {\n clist.addSetCookie(convertCookie(cookie));\n }\n reply.setSetCookie(clist);\n }",
"@Override\r\n\tpublic void setCookie(Date expirationDate, String nameAndValue, String path, String domain, boolean isSecure) {\n\t}",
"private void updateCookie(HttpServletRequest request, HttpServletResponse response, String startMessage) throws UnknownHostException, SocketException, UnsupportedEncodingException {\n \t\tDate date = new Date();\n \t\tSimpleDateFormat ft = new SimpleDateFormat(\"MMMMM dd, yyyy hh:mm:ss a \", Locale.US);\n \t\tString time = ft.format(date);\n \t\tCookie clientCookie = getCookie(request.getCookies(), COOKIE_NAME);\t\n \t\tString SID;\n \t\tString value;\n \t\tString IPP_primary;\n \t\tString IPP_backup;\n \t\t\n \t\tif (clientCookie == null) { \n \t\t\t//Create a new cookie for a new session if one does not exist \n \t\t\tSystem.out.println(\"Session start no cookie\");\n \t\t\tIPP_primary = InetAddress.getLocalHost().getHostAddress() + \"_\" +serverPort;\n \t\t\tint versionNo = 1;\n \t\t\tint session = sessionID.incrementAndGet(); \n \t\t\tSID = \"\"+session+\"_\"+IPP_primary;\n \t\t\tvalue = \"\"+versionNo +\"_\" + startMessage + \"_\" +time;\n \t\t\t//TODO:IPP Backup\n \t\t\tIPP_backup = RPCSessionTableUpdate(SID, value);\n \t\t\tif (IPP_backup == null) {\n \t\t\t\tIPP_backup = IPP_null;\n \t\t\t}\n \t\t\tSystem.out.println(\"noo cookie\"+SID+\"///Value////\"+value);\n \t\t\tsessionTable.put(SID, value);\n \t\t\tString cookieValue = SID + \"_\" + versionNo +\"_\"+ IPP_primary +\"_\"+ IPP_backup;\n \t\t\t//System.out.println(\"update cookie: \"+cookieValue + \"----------------------------\");\n \t\t\tclientCookie = new Cookie(COOKIE_NAME, cookieValue);\n \t\t} else { // Update the existing cookie with new values\n \t\t\tSID = getSessionID(request);\n \t\t\t\n \t\t\tString values[] = clientCookie.getValue().split(\"_\");\n \t\t\tint versionNo = Integer.valueOf(values[3])+1;\n \t\t\tvalue = versionNo +\"_\" + startMessage + \"_\" +time;\n \t\t\t\n \t\t\t//Location metadata will be appropriately added when needed\n \t\t\tIPP_primary = values[4];\n \t\t\tIPP_backup = values[5];\n \t\t\t/*\n \t\t\tif(!IPP_primary.equals(IPP) && memberSet.contains(IPP_primary) == false)\n \t\t\t\tmemberSet.add(IPP_primary);\n \t\t\tif(!IPP_primary.equals(IPP) && memberSet.contains(IPP_backup) == false)\n \t\t\t\tmemberSet.add(IPP_backup);\n \t\t\t*/\n \t\t\tIPP_backup = RPCSessionTableUpdate(SID, value);\n \t\t\tif (IPP_backup == null) {\n \t\t\t\tIPP_backup = IPP_null;\n \t\t\t}\n \t\t\tString cookieValue = SID + \"_\" + versionNo +\"_\"+ IPP_primary +\"_\"+ IPP_backup;\n \t\t\t//System.out.println(\"update cookie: \"+cookieValue);\n \t\t\tclientCookie.setValue(cookieValue);\n \t\t\tsessionTable.replace(SID, value);\n \t\t}\n \t\tclientCookie.setMaxAge((int) (EXPIRATION_PERIOD/1000)); //in seconds\n \t\tresponse.addCookie(clientCookie);\n \t}",
"public void addCookie(Cookie cookie) {\r\n _frameworkModel.addCookie(cookie);\r\n }",
"Response addCookie(Cookie cookie);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column gaibanhan.col7 | public String getCol7() {
return col7;
} | [
"public String getCol7value() {\n return col7value;\n }",
"public void setCol7(String col7) {\r\n this.col7 = col7;\r\n }",
"public String getCol6() {\r\n return col6;\r\n }",
"public String getCol6value() {\n return col6value;\n }",
"public String getCol8() {\r\n return col8;\r\n }",
"String getCodeColumn();",
"public String getCol9() {\r\n return col9;\r\n }",
"public int obtenerColumna() {\n return this.columna;\n }",
"public Object getCol9check() {\n return col9check;\n }",
"public void setCol6(String col6) {\r\n this.col6 = col6;\r\n }",
"public String getCol8value() {\n return col8value;\n }",
"Column getCol();",
"public String getCol5() {\r\n return col5;\r\n }",
"public Integer getHourmbin7() {\r\n return hourmbin7;\r\n }",
"public int getFromCol(){return fromCol;}",
"public java.lang.CharSequence getField7() {\n return field7;\n }",
"public java.lang.CharSequence getField7() {\n return field7;\n }",
"public SQLColumn getColumn() {\r\n return this.column;\r\n }",
"public String getIntAttribute7() {\n return (String) getAttributeInternal(INTATTRIBUTE7);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether the current PowerState allows deep sleep or not. Calling this for power state other than STATE_SHUTDOWN_PREPARE will trigger exception. | public boolean canEnterDeepSleep() {
if (mState != STATE_SHUTDOWN_PREPARE) {
throw new IllegalStateException("wrong state");
}
return (mParam & VehicleApPowerStateShutdownParam.CAN_SLEEP) != 0;
} | [
"public boolean isSleepingAllowed () {\n\t\treturn jniIsSleepingAllowed(addr);\n\t}",
"public boolean canPostponeShutdown() {\n if (mState != STATE_SHUTDOWN_PREPARE) {\n throw new IllegalStateException(\"wrong state\");\n }\n return (mParam & VehicleApPowerStateShutdownParam.SHUTDOWN_IMMEDIATELY) == 0;\n }",
"public boolean isInSleep() {\n\t\treturn isInSleep;\n\t}",
"public boolean isSleeping() {\n\t\tif(sleeping == 4)\n\t\t\tisSleeping = false; \n\t\telse isSleeping = true;\n\t\treturn isSleeping;\n\t}",
"public boolean isSleepingAllowed () {\n\t\treturn body.isSleepingAllowed();\n\t}",
"public static boolean isPowerOn() {\n try {\n return BlueCoveImpl.instance().getBluetoothStack().isLocalDevicePowerOn();\n } catch (BluetoothStateException e) {\n return false;\n }\n }",
"@GSLWhitelistMember\n public boolean isPlayerSleeping() {\n return internal.isPlayerSleeping();\n }",
"protected boolean hasPower()\n {\n return true;\n }",
"private boolean enoughSleeping() {\n return sleepingPlayers >= needToSleep();\n }",
"public boolean isHasPowerUp() {\n\t\treturn hasPowerUp;\n\t}",
"public boolean getSleepEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_PWR_MGMT_1, MPU6050_Registers.MPU6050_PWR1_SLEEP_BIT);\n return buffer[0] == 1;\n }",
"public boolean canRequestPower();",
"public boolean getPowerState() {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE,\n\t\t\t\tContext.MODE_PRIVATE);\n\t\treturn settings.getBoolean(TOGGLE_KEY, true);\n\t}",
"public boolean isAsleep() {\n \t\treturn sleepCounter > 0;\n \t}",
"boolean getSleepMode()\n {\n return this.sleepMode; // Returns the value associated with the variable\n }",
"boolean goToSleepIfPossible(boolean shuttingDown) {\n final int[] sleepInProgress = {0};\n forAllLeafTasksAndLeafTaskFragments(taskFragment -> {\n if (!taskFragment.sleepIfPossible(shuttingDown)) {\n sleepInProgress[0]++;\n }\n }, true /* traverseTopToBottom */);\n return sleepInProgress[0] == 0;\n }",
"public boolean isBleepEnabled() {\n return mBleepEnabled;\n }",
"protected void setSleeping() {\n isSleeping = true;\n }",
"public boolean canProvidePower()\n {\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the jwt token. | public void setJwtToken(String jwtToken) {
this.jwtToken = jwtToken;
} | [
"public JWTToken(final String token) {\n\n this.token = token;\n }",
"void setSecurityToken(String token);",
"public void setAuthToken(String token) {\n\t\t\n\t\tConfigurationManager.instance.authToken = token;\n\t}",
"public void setToken(){\n final AuthenticationRequest request = getAuthenticationRequest(AuthenticationResponse.Type.TOKEN);\n AuthenticationClient.openLoginActivity(this, AUTH_TOKEN_REQUEST_CODE, request);\n }",
"public String getJwtToken() {\n\t\treturn jwtToken;\n\t}",
"public void setToken(java.lang.String token) {\n this.token = token;\n }",
"@JsonProperty\n public void setJwtKey(final String jwtKey) {\n this.jwtKey = jwtKey;\n }",
"public void storeToken(AuthorizationToken token);",
"public void setJwtTokenExpiryDate(Date jwtTokenExpiryDate) {\n\t\tthis.jwtTokenExpiryDate = jwtTokenExpiryDate;\n\t}",
"public void setJwtString(final String jwtString) {\n\t\tthis.jwtString = jwtString;\n\t}",
"public void setToken(int value){token = value;}",
"void setTokenSecret(java.lang.String tokenSecret);",
"public JwtAuthenticationToken(String token) {\n\t\tsuper(new Principal(){\n\t\t\t@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn token;\n\t\t\t}}, token);\n\t\tthis.token = token;\n\t}",
"void setSecretToken(String secretToken);",
"public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}",
"void setTokenType(String tokenType);",
"public JWTConfigurer(TokenProvider tokenProvider) {\n this.tokenProvider = tokenProvider;\n }",
"private static void setScope(TokenRequest tokenRequest, Jwt jwt) {\n if(jwt.getKey() != null && jwt.getKey().getScopes() != null && !jwt.getKey().getScopes().isEmpty()) {\n tokenRequest.setScope(new ArrayList<>() {{ addAll(jwt.getKey().getScopes()); }});\n }\n }",
"public void setTokenType(TokenType tokenType) {\r\n\t\tmyToken.tokenType = tokenType;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method changes the position of the horizontal bar according to the direction of the move. | public void changeHorizontalBarPosition() {
BarPosition barPosition = horizontals[numberOfBar].getPosition();
if (directionOfMove.equals("i")) {
if (barPosition == BarPosition.OUTER)
horizontals[numberOfBar].setPosition(BarPosition.CENTRAL);
else //if (barPosition == BarPosition.CENTRAL)
horizontals[numberOfBar].setPosition(BarPosition.INNER);
}
else /*if (directionOfMove.equals("o"))*/ {
if (barPosition == BarPosition.INNER)
horizontals[numberOfBar].setPosition(BarPosition.CENTRAL);
else //if (barPosition == BarPosition.CENTRAL)
horizontals[numberOfBar].setPosition(BarPosition.OUTER);
}
} | [
"public void moveBar() {\n if (typeOfBar.equals(\"v\"))\n changeVerticalBarPosition();\n else /*if (typeOfBar.equals(\"h\"))*/\n changeHorizontalBarPosition();\n\n if (typeOfBar.equals(\"v\"))\n updateColumnInGrid();\n else /*if (typeOfBar.equals(\"h\"))*/\n updateRowInGrid();\n }",
"public void changeVerticalBarPosition() {\n BarPosition barPosition = verticals[numberOfBar].getPosition();\n if (directionOfMove.equals(\"i\")) {\n if (barPosition == BarPosition.OUTER)\n verticals[numberOfBar].setPosition(BarPosition.CENTRAL);\n else //if (barPosition == BarPosition.CENTRAL)\n verticals[numberOfBar].setPosition(BarPosition.INNER);\n }\n else /*if (directionOfMove.equals(\"o\"))*/ {\n if (barPosition == BarPosition.INNER)\n verticals[numberOfBar].setPosition(BarPosition.CENTRAL);\n else //if (barPosition == BarPosition.CENTRAL)\n verticals[numberOfBar].setPosition(BarPosition.OUTER);\n }\n }",
"private void moveHorizontal() {\n if (input.isMoveLeft()) {\n moveLeft();\n } else if (input.isMoveRight()) {\n moveRight();\n } else {\n spriteBase.setDxCoordinate(0d);\n }\n }",
"public void moveHorizontal(int distance)\r\n {\r\n\t\txPosition += distance;\r\n }",
"public void setHorizontalBarsToRandomPosition() {\n // assign a random position to the horizontal bars\n for (int i = 0; i < Utility.NUMBER_OF_BARS; i++) {\n int randomPosition = (int) (Math.random() * 3);\n if (randomPosition == 0)\n horizontals[i].setPosition(BarPosition.INNER);\n else if (randomPosition == 1)\n horizontals[i].setPosition(BarPosition.CENTRAL);\n else /*if (randomPosition == 2)*/\n horizontals[i].setPosition(BarPosition.OUTER);\n }\n }",
"public void moverHorizontal(int distancia)\n {\n borrar();\n xPosicion += distancia;\n dibujar();\n }",
"void moveLeft() {\n movingStatus = LEFT;\n }",
"public void MoveX() {\r\n ///Aduna la pozitia curenta numarul de pixeli cu care trebuie sa se deplaseze pe axa X.\r\n x += xMove;\r\n }",
"public void setHorizontalDirection(final int aDirection) {\n myHorizontalmove = Math.abs(myHorizontalmove) * aDirection;\n }",
"public void hMoveW() {\n\t\thunter.moveW();\n\t\t}",
"public void moveX() {\n\t\tsetX( getX() + getVx() );\n\t}",
"public void setHorizontal(int horizontal)\n {\n this.horizontal = horizontal;\n }",
"private void switchIsHorizontal() {\n\t\tthis.setHorizontal(!this.isHorizontal());\n\t}",
"@Override\n public void move() {\n setCoordY(getCoordY() - displacementY);\n }",
"public void setHorizontal(){\n horizontal = true;\n }",
"public void move(int xDelta, int yDelta)\n {\n \n this.setUpperLeft(new Point(getUpperLeft().getX()+\n xDelta,getUpperLeft().getY()+yDelta));\n\n }",
"public void Move() {\r\n ///Modifica pozitia caracterului pe axa X.\r\n ///Modifica pozitia caracterului pe axa Y.\r\n MoveX();\r\n MoveY();\r\n }",
"public void scrollHorizontal(int selection) {\n\t\tint destX = -selection - offset.x;\n\t\tthis.canvas.scroll(destX, \n\t\t\t\t\t\t 0, \n\t\t\t\t\t\t 0, \n\t\t\t\t\t\t 0, \n\t\t\t\t\t\t this.domainlabel_image.getBounds().width, \n\t\t\t\t\t\t this.domainlabel_image.getBounds().height, \n\t\t\t\t\t\t false);\n\t\tthis.offset.x = -selection;\n\t\tthis.hBar.setSelection(selection);\n\t}",
"public void move() {\r\n\t\tdirection.apply(position);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the string to see if it begins with the correct suffix for the given number, e.g. 1st, 102nd, 13th | public static boolean parseSuffix(StringBuilder sb, int num)
{
if(sb.length() < 2)
return false;
boolean ret;
if(num % 10 == 1 && num / 10 != 1)
ret = sb.charAt(0) == 's' && sb.charAt(1) == 't';
else if(num % 10 == 2 && num / 10 != 1)
ret = sb.charAt(0) == 'n' && sb.charAt(1) == 'd';
else if(num % 10 == 2 && num / 10 != 1)
ret = sb.charAt(0) == 'r' && sb.charAt(1) == 'd';
else
ret = sb.charAt(0) == 't' && sb.charAt(1) == 'h';
if(ret)
sb.delete(0, 2);
return ret;
} | [
"private static String getSuffix(int num) {\n\n\t\tswitch(num){\n\t\tcase 1: return(\"st\");\n\t\tcase 2: return(\"nd\");\n\t\tcase 3: return(\"rd\");\n\t\t}\n\t\t\n\t\tString number = String.valueOf(num);\n\t\tSystem.out.println();\n\t\t\n\t\tif(number.charAt(number.length()-1) == '1'){\n\t\t\treturn(\"th\");\n\t\t}\n\t\t\n\t\tif(number.charAt(number.length()-1) == '1')return (\"st\");\n\t\tif(number.charAt(number.length()-1) == '2')return (\"nd\");\n\t\tif(number.charAt(number.length()-1) == '3')return (\"rd\");\n\t\telse{\n\t\t\treturn(\"th\");\n\t\t}\n\t}",
"private boolean startsWithDigit(String s) {\n return Pattern.compile(\"^[0-9]\").matcher(s).find();\n\t}",
"private static boolean startsWithNumber(final String t, final int len,\n\t\t\tfinal String... str) {\n\t\tint j = 0;\n\t\twhile (j < len && isDigit(t.charAt(j))) {\n\t\t\tj++;\n\t\t}\n\t\tif (j != 0) {\n\t\t\tfor (String s : str) {\n\t\t\t\tif (t.startsWith(s, j)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean prefixMatched(long number, int d) {\r\n return String.valueOf(number).startsWith(String.valueOf(d));\r\n }",
"public static boolean isSuffix(String word, String suffix){\n if (suffix.charAt(0) == '-') suffix = suffix.substring(1);\n return suffix.equals(word.substring(word.length() - suffix.length()));\n }",
"public String getNumberSuffix(int num) {\n\t\t\t\tString s = String.valueOf(num);\n\t\t\t\tif (s.endsWith(\"0\")) { return \"st\"; }\n\t\t\t\telse if (s.endsWith(\"1\")) { return \"st\"; }\n\t\t\t\telse if (s.endsWith(\"2\")) { return \"nd\"; }\n\t\t\t\telse if (s.endsWith(\"3\")) { return \"rd\"; }\n\t\t\t\telse if (s.endsWith(\"10\")) { return \"th\"; }\n\t\t\t\telse if (s.endsWith(\"11\")) { return \"th\"; }\n\t\t\t\telse if (s.endsWith(\"12\")) { return \"th\"; }\n\t\t\t\telse if (s.endsWith(\"13\")) { return \"th\"; }\n\t\t\t\telse { return \"th\"; }\n }",
"static boolean hasPrefix( String string, String prefix ) {\n if (HttpUnitOptions.getMatchesIgnoreCase()) {\n return string.toUpperCase().startsWith( prefix.toUpperCase() );\n } else {\n return string.startsWith( prefix );\n }\n }",
"private boolean correctFirstNum(String date) {\n String year = new SimpleDateFormat(\"yyyy\").format(new Date());\n return date.substring(0, 2).equals(year.substring(0, 4)) || date.equals(year);\n }",
"public static boolean isPrefix(String word, String prefix){\n if (prefix.charAt(prefix.length() - 1) == '-') prefix = prefix.substring(0, prefix.length() - 1);\n return prefix.equals(word.substring(0, prefix.length()));\n }",
"public boolean prefixAgain(String str, int n) {\n return str.substring(n).contains(str.substring(0,n));\n }",
"public static boolean matchPrefix(long number, int d) { \n\t\t\t\treturn returnPrefix(number, numberOfDigits(d)) == d; \n\t\t\t}",
"private String cleanUpNegativePrefix(String number) {\n return number.substring(1).trim();\n }",
"private static boolean stringStartsWith(String string, String prefix){\n for(int i=0; i < prefix.length(); i++){\n if(string.charAt(i) != prefix.charAt(i)){\n return false;\n }\n }\n return true;\n }",
"public static boolean prefixMatched(long number, int d) {\n\t\tlong prefix = getPrefix(number, Integer.toString(d).length());\n\n\t\tif (prefix == d) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static void checkSuffix(Token t) {\r\n\t\tIterator<String> it = WordLists.lastNameSuffixes().iterator();\r\n\t\t\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tString suffix = it.next();\r\n\t\t\t\r\n\t\t\tif(t.getName().equalsIgnoreCase(suffix)) {\r\n\t\t\t\tt.getFeatures().setSuffix(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"public boolean inputNameCheck(String string){\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tif ((Character.isDigit(string.charAt(i)))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"@Test\r\n\tpublic void testIsValidStateSuffix2() {\r\n\t\ttry {\r\n\t\t\tcn.isValid(\"CSC216A1\");\r\n\t\t} catch (InvalidTransitionException e) {\r\n\t\t\tassertEquals(e.getMessage(), \"Course name cannot contain digits after the suffix.\");\r\n\t\t}\r\n\t}",
"boolean hasSuffix(String suffixToSearch) {\n checkNotNull(suffixToSearch, \"Can't query 'null' value\");\n checkAllCharsWithinAlphabet(suffixToSearch);\n\n if (suffixToSearch.length() == 0) {\n return false;\n }\n\n return search(suffixToSearch, EndMarker.SUFFIX);\n }",
"boolean isPrefix(String potentialPrefix);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a primitive long to the SQL statement for the given fieldName. | public void addLong(String fieldName, long value) {
fields.add(fieldName);
values.add(new Long(value));
} | [
"protected static long verifyLong(Text field, String fieldName)\r\n\t\t\tthrows MusicTunesException {\r\n\t\tlong number = 0;\r\n\t\ttry {\r\n\t\t\tnumber = Long.parseLong(field.getText());\r\n\t\t} catch (NumberFormatException e2) {\r\n\t\t\tfield.setFocus();\r\n\t\t\tfield.selectAll();\r\n\t\t\tthrow new MusicTunesException(\"Invalid \" + fieldName\r\n\t\t\t\t\t+ \": \" + field.getText());\r\n\t\t}\r\n\t\treturn number;\r\n\t}",
"void appendLong(long value);",
"public void setLong(String name, long value);",
"public Buffer putLong(long value);",
"public void setLong(de.tif.jacob.core.definition.impl.jad.castor.LongField _long)\n {\n this._long = _long;\n }",
"void setLongProperty(String name, long value);",
"long getNumericField();",
"void setLong(int parameterIndex, long x) throws SQLException;",
"@Override\n public long getLong(String col)\n throws IllegalArgumentException, ArrayIndexOutOfBoundsException, ClassCastException {\n return getLong(findColumnStrict(col));\n }",
"BigByteBuffer putLong(long value);",
"public void writeVarLong(long l) throws IOException;",
"public long getParamAsLong(String paramName);",
"public void updateLong(String columnName, long x) throws SQLException\n {\n m_rs.updateLong(columnName, x);\n }",
"long getLongValue();",
"public final void mLONG() throws RecognitionException {\n try {\n int _type = LONG;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:116:6: ( 'long' )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:116:8: 'long'\n {\n match(\"long\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public void testUpdateLongStringlong() throws Exception {\n createUpdateTable();\n\n // Test assertion that ResultSet has a current row\n try {\n _rset.updateLong(\"id\", 0L);\n fail(\"Expected SQLException\");\n } catch (SQLException ignore) {\n // expected.\n }\n\n // Now test normal usage.\n _rset.next();\n\n final long newVal = 150000L;\n _rset.updateLong(\"id\", newVal);\n _rset.updateRow();\n assertEquals(newVal, _rset.getLong(\"id\"));\n }",
"public de.tif.jacob.core.definition.impl.jad.castor.LongField getLong()\n {\n return this._long;\n }",
"public void setColumnLong(java.lang.Long value) {\n this.columnLong = value;\n setDirty(2);\n }",
"public Long getLongAttribute();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether a char is a URI character (reserved or unreserved, not including '%' for escaped octets). | private static boolean isURICharacter (char p_char) {
return (p_char <= '~' && (fgLookupTable[p_char] & MASK_URI_CHARACTER) != 0);
} | [
"private static boolean isURIString(String p_uric) {\n if (p_uric == null) {\n return false;\n }\n int end = p_uric.length();\n char testChar = '\\0';\n for (int i = 0; i < end; i++) {\n testChar = p_uric.charAt(i);\n if (testChar == '%') {\n if (i+2 >= end ||\n !isHex(p_uric.charAt(i+1)) ||\n !isHex(p_uric.charAt(i+2))) {\n return false;\n }\n else {\n i += 2;\n continue;\n }\n }\n if (isURICharacter(testChar)) {\n continue;\n }\n else {\n return false;\n }\n }\n return true;\n }",
"private static boolean containsReserved(char c) {\n return !((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||\n (c >= '0' && c <= '9') || (\"/:-_.!~*'()\".indexOf(c) != -1));\n }",
"protected boolean isURI(String input) {\r\n\t\tif (input.startsWith(\"<\") && input.endsWith(\">\")) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t// Prefix must be known\r\n\t\telse if (startsWithPrefix(input))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public static boolean isSpecialChar(char c)\n{\n // Handle special chars: '.', '-'\n if(c=='.' || c=='-')\n return true;\n\n // Handle escape chars: \\, \\t, \\n, \\r, \\f (form-feed), \\a (alert/bell), \\e (escape)\n else if(c=='\\\\')\n return true;\n \n // Handle '[',']' (letter group), '^' (not letter, begin line anchor), '-' (dash), '&' ampersand\n else if(c=='[' || c==']'|| c=='^' || c=='-' || c=='&')\n return true;\n \n // Handle anchors: '^' (begin line), '$' (end line), \n else if(c=='^' || c=='$')\n return true;\n \n // Handle Greedy quantifiers: '?' (optional), '*' (zero or more), '+' (one or more), '{', '}' (n times)\n else if(c=='?' || c=='*' || c=='+' || c=='{' || c=='}')\n return true;\n \n // Handle logical operators: '|' (or), '(', ')' (capturing group), \n else if(c=='|' || c=='(' || c==')' )\n return true;\n\n // Return this\n return false;\n}",
"private boolean isAliasSafeCharPart( char c )\n {\n return ( c == 'a' || c == 'b' || c == 'c' || c == 'd' || c == 'e' || c == 'f' || c == 'g' || c == 'h'\n || c == 'i' || c == 'j' || c == 'k' || c == 'l' || c == 'm' || c == 'n' || c == 'o' || c == 'p' || c == 'q'\n || c == 'r' || c == 's' || c == 't' || c == 'u' || c == 'v' || c == 'w' || c == 'x' || c == 'y' || c == 'z'\n || c == 'A' || c == 'B' || c == 'C' || c == 'D' || c == 'E' || c == 'F' || c == 'G' || c == 'H' || c == 'I'\n || c == 'J' || c == 'K' || c == 'L' || c == 'M' || c == 'N' || c == 'O' || c == 'P' || c == 'Q' || c == 'R'\n || c == 'S' || c == 'T' || c == 'U' || c == 'V' || c == 'W' || c == 'X' || c == 'Y' || c == 'Z' || c == '0'\n || c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' || c == '7' || c == '8' || c == '9' || c == '-' );\n }",
"private static boolean isUnreservedCharacter(char p_char) {\n return (p_char <= '~' && (fgLookupTable[p_char] & MASK_UNRESERVED_MASK) != 0);\n }",
"public static boolean isSpecialCharacter(final String param) {\n\n final String regxPattern = \"-/@#$%^&_+=()><?*\";\n return param.matches(\"[\" + regxPattern + \"]+\");\n\n }",
"private static boolean isPathCharacter (char p_char) {\n return (p_char <= '~' && (fgLookupTable[p_char] & MASK_PATH_CHARACTER) != 0);\n }",
"public boolean isSpecialCharacter(String enteredCmd) {\n Pattern regex = Pattern.compile(\"[%@#€]+\");\n Matcher m = regex.matcher(enteredCmd);\n return m.matches();\n }",
"private static boolean atomChar(char c) {\r\n return ((int)c <= 127 && (int)c > 32 && !specials(c));\r\n }",
"private static boolean isSchemeCharacter (char p_char) {\n return (p_char <= 'z' && (fgLookupTable[p_char] & MASK_SCHEME_CHARACTER) != 0);\n }",
"private boolean isValidRegistryBasedAuthority(String authority) {\n int index = 0;\n int end = authority.length();\n char testChar;\n \n while (index < end) {\n testChar = authority.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(authority.charAt(index+1)) ||\n !isHex(authority.charAt(index+2))) {\n return false;\n }\n index += 2;\n }\n // can check against path characters because the set\n // is the same except for '/' which we've already excluded.\n else if (!isPathCharacter(testChar)) {\n return false;\n }\n ++index;\n }\n return true;\n }",
"public static boolean uriLegal(Uri uri) {\n // either \"file:///path\" or just \"/path\"\n return uri != null\n && (uri.getScheme() == null || FILE_SCHEME.equals(uri.getScheme()))\n && pathLegal(uri.getPath());\n }",
"private boolean isE (char myChar) {\n\t\tif(myChar=='&'||myChar=='#') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isSpecialCharAllowed(SpecialChar specialChar){\n return specialChars.contains(specialChar);\n }",
"private boolean isIdentifierChar(char ch) {\n return (((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'))\n || ((ch >= '0') && (ch <= '9')) || (\".-_:\".indexOf(ch) >= 0));\n }",
"private static boolean isValidNameChar(char c) {\n\t\tint value = (int)c;\n\t\tif ((90 >= value && value >= 65) || (122 >= value && value >= 97) || (57 >= value && value >= 48) || (value == 95)) {\n\t\t\treturn true;\n\t\t}else\n\t\t\treturn\tfalse;\n\t}",
"public boolean isGenericURI() {\n // presence of the host (whether valid or empty) means\n // double-slashes which means generic uri\n return (m_host != null);\n }",
"public boolean isUri(String obj) {\r\n//\t\treturn obj.matches(\"(([a-zA-Z][0-9a-zA-Z+\\\\\\\\-\\\\\\\\.]*:)?/{0,2}[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\\\\\\\\.\\\\\\\\-_!~*'()%]+)?\");\r\n\t\treturn false;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function return the leading term of the Lanczo's Formula | private double leadingTerm(double x){
double temp=x+5.5;
return Math.log(temp)*(x+0.5)-temp;
} | [
"private static BigInteger getLucasLehmerNumber(BigInteger termNo) {\n // x(n+1) = (x(n)) ^ 2 - 2\n if (termNo.equals(ZERO)) return FOUR;\n BigInteger lastTerm = getLucasLehmerNumber(termNo.subtract(ONE));\n BigInteger lastTermSquared = lastTerm.pow(2);\n return lastTermSquared.subtract(TWO);\n }",
"double getLmz();",
"private static int cprNLFunction(double lat) {\n\t\tif (lat < 0)\n\t\t\tlat = -lat; // Table is symmetric about the equator\n\t\tif (lat < 10.47047130)\n\t\t\treturn 59;\n\t\tif (lat < 14.82817437)\n\t\t\treturn 58;\n\t\tif (lat < 18.18626357)\n\t\t\treturn 57;\n\t\tif (lat < 21.02939493)\n\t\t\treturn 56;\n\t\tif (lat < 23.54504487)\n\t\t\treturn 55;\n\t\tif (lat < 25.82924707)\n\t\t\treturn 54;\n\t\tif (lat < 27.93898710)\n\t\t\treturn 53;\n\t\tif (lat < 29.91135686)\n\t\t\treturn 52;\n\t\tif (lat < 31.77209708)\n\t\t\treturn 51;\n\t\tif (lat < 33.53993436)\n\t\t\treturn 50;\n\t\tif (lat < 35.22899598)\n\t\t\treturn 49;\n\t\tif (lat < 36.85025108)\n\t\t\treturn 48;\n\t\tif (lat < 38.41241892)\n\t\t\treturn 47;\n\t\tif (lat < 39.92256684)\n\t\t\treturn 46;\n\t\tif (lat < 41.38651832)\n\t\t\treturn 45;\n\t\tif (lat < 42.80914012)\n\t\t\treturn 44;\n\t\tif (lat < 44.19454951)\n\t\t\treturn 43;\n\t\tif (lat < 45.54626723)\n\t\t\treturn 42;\n\t\tif (lat < 46.86733252)\n\t\t\treturn 41;\n\t\tif (lat < 48.16039128)\n\t\t\treturn 40;\n\t\tif (lat < 49.42776439)\n\t\t\treturn 39;\n\t\tif (lat < 50.67150166)\n\t\t\treturn 38;\n\t\tif (lat < 51.89342469)\n\t\t\treturn 37;\n\t\tif (lat < 53.09516153)\n\t\t\treturn 36;\n\t\tif (lat < 54.27817472)\n\t\t\treturn 35;\n\t\tif (lat < 55.44378444)\n\t\t\treturn 34;\n\t\tif (lat < 56.59318756)\n\t\t\treturn 33;\n\t\tif (lat < 57.72747354)\n\t\t\treturn 32;\n\t\tif (lat < 58.84763776)\n\t\t\treturn 31;\n\t\tif (lat < 59.95459277)\n\t\t\treturn 30;\n\t\tif (lat < 61.04917774)\n\t\t\treturn 29;\n\t\tif (lat < 62.13216659)\n\t\t\treturn 28;\n\t\tif (lat < 63.20427479)\n\t\t\treturn 27;\n\t\tif (lat < 64.26616523)\n\t\t\treturn 26;\n\t\tif (lat < 65.31845310)\n\t\t\treturn 25;\n\t\tif (lat < 66.36171008)\n\t\t\treturn 24;\n\t\tif (lat < 67.39646774)\n\t\t\treturn 23;\n\t\tif (lat < 68.42322022)\n\t\t\treturn 22;\n\t\tif (lat < 69.44242631)\n\t\t\treturn 21;\n\t\tif (lat < 70.45451075)\n\t\t\treturn 20;\n\t\tif (lat < 71.45986473)\n\t\t\treturn 19;\n\t\tif (lat < 72.45884545)\n\t\t\treturn 18;\n\t\tif (lat < 73.45177442)\n\t\t\treturn 17;\n\t\tif (lat < 74.43893416)\n\t\t\treturn 16;\n\t\tif (lat < 75.42056257)\n\t\t\treturn 15;\n\t\tif (lat < 76.39684391)\n\t\t\treturn 14;\n\t\tif (lat < 77.36789461)\n\t\t\treturn 13;\n\t\tif (lat < 78.33374083)\n\t\t\treturn 12;\n\t\tif (lat < 79.29428225)\n\t\t\treturn 11;\n\t\tif (lat < 80.24923213)\n\t\t\treturn 10;\n\t\tif (lat < 81.19801349)\n\t\t\treturn 9;\n\t\tif (lat < 82.13956981)\n\t\t\treturn 8;\n\t\tif (lat < 83.07199445)\n\t\t\treturn 7;\n\t\tif (lat < 83.99173563)\n\t\t\treturn 6;\n\t\tif (lat < 84.89166191)\n\t\t\treturn 5;\n\t\tif (lat < 85.75541621)\n\t\t\treturn 4;\n\t\tif (lat < 86.53536998)\n\t\t\treturn 3;\n\t\tif (lat < 87.00000000)\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 1;\n\t}",
"double getCoeff(){\n double d=0;//input value--coud be a matrix\n coeff = l * getC(d) / data[0][0];//data is placeholder for now\n\n return coeff;\n }",
"public double L1() {\n double result = 0.0;\n\n for (int i = 0; i < nbLigne(); i++) {\n result += getCoef(i);\n }\n\n return result;\n }",
"AlgebraicTerm getAlgebraicTermL();",
"private double FLmi() {\n return Lx*Mi;\n }",
"Double getLightningCoefficient();",
"double getLFadj();",
"public static double nextReverseLandau() {\n \n\t\tdouble a = 0.1; //Landau parameters: 0.1 gives a good realistic shape\n\t\tdouble b = 0.1;\n\t\tdouble mu = 0; //Most probable value\n\t\tdouble ymax = b/a*Math.exp(-0.5); // value of function at mu\n\t\tdouble x1,x2,y;\n\n\t\tdo {\n\t\t\tx1 = 4 * _random.nextDouble() - 2; // between -2.0 and 2.0 \n\t\t\ty = b/a*Math.exp(-0.5*((mu-x1)/a + Math.exp(-(mu-x1)/a)));\n\t\t\tx2 = ymax * _random.nextDouble();\n\t\t} while (x2 > y);\n \n\t\treturn x1;\n\t}",
"int minverse(int z)\n {\n int to,t1;\n int q,y;\n if(z<=1)\n return z;\n t1=0x10001/z;\n y=0x10001%z;\n if(y==1)\n return (0xffff&(1-t1));\n to=1;\n do\n {\n q=z/y;\n z=z%y;\n to+=q*t1;\n if(z==1)\n return to;\n q=y/z;\n y=y%z;\n t1+=q*to;\n }while(y!=1);\n return (0xffff&(1-t1));\n }",
"int getLac();",
"private static BigInteger findLucasNumber(BigInteger termNumIn) {\n /*\n Bring in number as term number in Lucas Sequence; find the value at that term.\n */\n if( termNumIn.intValue() == 0 ) return TWO;\n if( termNumIn.intValue() == 1 ) return ONE;\n return findLucasNumber(termNumIn.subtract(ONE)).add(findLucasNumber(termNumIn.subtract(TWO)));\n //todo: convert this from recursion to a general formula function\n }",
"public static Picture laplacian(Picture picture) {\n double[][] kernel = { { -1, -1, -1 }, { -1, 8, -1 }, { -1, -1, -1 } };\n return applyKernel(picture, kernel);\n\n }",
"long getLaxity ();",
"double getLbs();",
"public ComplexNumber logDeterminant();",
"public double minLat () {\r\n return borders[2];\r\n }",
"public double lipschitz();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the freeware property. | public void setFreeware(boolean value) {
this.freeware = value;
} | [
"public boolean isFreeware() {\n return freeware;\n }",
"public void setIntellectualProperty(Boolean intellectualProperty) {\r\n\t\t\t_intellectualProperty = intellectualProperty;\r\n\t\t}",
"public void setExternallyOwned(java.lang.Boolean value);",
"public void setFrecuencia(String frecuencia) {\r\n this.frecuencia = frecuencia;\r\n }",
"public void setFreight (java.lang.Double freight) {\r\n\t\tthis.freight = freight;\r\n\t}",
"public void setExternallyManaged(java.lang.Boolean value);",
"public void setAsFree()\r\n {\r\n this.isFree_ = true;\r\n }",
"public void setFrecuencia(java.lang.String frecuencia) {\n this.frecuencia = frecuencia;\n }",
"public void setFremark(Object fremark) {\n this.fremark = fremark;\n }",
"public void setAvailable(boolean x){\n availabile = x;\n }",
"public void setPrivate()\n {\n ensureLoaded();\n m_flags.setPrivate();\n setModified(true);\n }",
"void setRestricted(boolean value);",
"private void setFree(final boolean free) {\n\t\tthis.free = free;\n\t}",
"public void setOfficialUseOnly(OfficialUseOnly value) {\r\n // JPA find() fails if this is NULL\r\n if (value == null)\r\n value = new OfficialUseOnly();\r\n this.officialUseOnly = value;\r\n }",
"public void setPENSIONCERTIFICATENEEDRECOVERY(boolean value) {\r\n this.pensioncertificateneedrecovery = value;\r\n }",
"void setGodPower(boolean b);",
"void setExpenses(double amount);",
"public void setFree(Boolean free)\n\t{\n\t\tthis.free = free;\n\t}",
"void setThexSupported(boolean value);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XReturnExpression__ExpressionAssignment_2" $ANTLR start "rule__XTryCatchFinallyExpression__ExpressionAssignment_2" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17617:1: rule__XTryCatchFinallyExpression__ExpressionAssignment_2 : ( ruleXExpression ) ; | public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17621:1: ( ( ruleXExpression ) )
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17622:1: ( ruleXExpression )
{
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17622:1: ( ruleXExpression )
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17623:1: ruleXExpression
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0());
}
pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__ExpressionAssignment_235516);
ruleXExpression();
state._fsp--;
if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_2() 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:18654:1: ( ( ruleXExpression ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18655:1: ( ruleXExpression )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18655:1: ( ruleXExpression )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18656:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__ExpressionAssignment_237606);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_2() 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:16769:1: ( ( ruleXExpression ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:16770:1: ( ruleXExpression )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:16770:1: ( ruleXExpression )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:16771:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__ExpressionAssignment_233783);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_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:31874:1: ( ( ruleXExpression ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:31875:1: ( ruleXExpression )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:31875:1: ( ruleXExpression )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:31876:1: ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__ExpressionAssignment_264147);\r\n ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_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__XTryCatchFinallyExpression__ExpressionAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:13368:1: ( ( ruleXExpression ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:13369:1: ( ruleXExpression )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:13369:1: ( ruleXExpression )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:13370:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__ExpressionAssignment_226861);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:19105:1: ( ( ruleXExpression ) )\r\n // InternalDroneScript.g:19106:2: ( ruleXExpression )\r\n {\r\n // InternalDroneScript.g:19106:2: ( ruleXExpression )\r\n // InternalDroneScript.g:19107:3: ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_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__XTryCatchFinallyExpression__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12984:1: ( ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12985:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12985:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12986:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12987:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12987:2: rule__XTryCatchFinallyExpression__ExpressionAssignment_2\n {\n pushFollow(FOLLOW_rule__XTryCatchFinallyExpression__ExpressionAssignment_2_in_rule__XTryCatchFinallyExpression__Group__2__Impl26210);\n rule__XTryCatchFinallyExpression__ExpressionAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13693:1: ( ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13694:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13694:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13695:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13696:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13696:2: rule__XTryCatchFinallyExpression__ExpressionAssignment_2\n {\n pushFollow(FOLLOW_rule__XTryCatchFinallyExpression__ExpressionAssignment_2_in_rule__XTryCatchFinallyExpression__Group__2__Impl27651);\n rule__XTryCatchFinallyExpression__ExpressionAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__ExpressionAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:19978:1: ( ( ruleXExpression ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:19979:1: ( ruleXExpression )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:19979:1: ( ruleXExpression )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:19980:1: ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__ExpressionAssignment_240224);\r\n ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_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__XTryCatchFinallyExpression__ExpressionAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:18907:1: ( ( ruleXExpression ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:18908:1: ( ruleXExpression )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:18908:1: ( ruleXExpression )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:18909:1: ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__ExpressionAssignment_238210);\r\n ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionXExpressionParserRuleCall_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__XTryCatchFinallyExpression__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:25709:1: ( ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25710:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25710:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25711:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25712:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25712:2: rule__XTryCatchFinallyExpression__ExpressionAssignment_2\r\n {\r\n pushFollow(FOLLOW_rule__XTryCatchFinallyExpression__ExpressionAssignment_2_in_rule__XTryCatchFinallyExpression__Group__2__Impl51650);\r\n rule__XTryCatchFinallyExpression__ExpressionAssignment_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.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_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__XTryCatchFinallyExpression__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14590:1: ( ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14591:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14591:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14592:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14593:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14593:2: rule__XTryCatchFinallyExpression__ExpressionAssignment_2\n {\n pushFollow(FOLLOW_rule__XTryCatchFinallyExpression__ExpressionAssignment_2_in_rule__XTryCatchFinallyExpression__Group__2__Impl29464);\n rule__XTryCatchFinallyExpression__ExpressionAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10586:1: ( ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10587:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10587:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10588:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10589:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10589:2: rule__XTryCatchFinallyExpression__ExpressionAssignment_2\n {\n pushFollow(FOLLOW_rule__XTryCatchFinallyExpression__ExpressionAssignment_2_in_rule__XTryCatchFinallyExpression__Group__2__Impl21271);\n rule__XTryCatchFinallyExpression__ExpressionAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:14448:1: ( ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) ) )\r\n // InternalDroneScript.g:14449:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\r\n {\r\n // InternalDroneScript.g:14449:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\r\n // InternalDroneScript.g:14450:2: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \r\n }\r\n // InternalDroneScript.g:14451:2: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\r\n // InternalDroneScript.g:14451:3: rule__XTryCatchFinallyExpression__ExpressionAssignment_2\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XTryCatchFinallyExpression__ExpressionAssignment_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.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_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__XTryCatchFinallyExpression__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15062:1: ( ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15063:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15063:1: ( ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15064:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_2()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15065:1: ( rule__XTryCatchFinallyExpression__ExpressionAssignment_2 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:15065:2: rule__XTryCatchFinallyExpression__ExpressionAssignment_2\r\n {\r\n pushFollow(FOLLOW_rule__XTryCatchFinallyExpression__ExpressionAssignment_2_in_rule__XTryCatchFinallyExpression__Group__2__Impl30476);\r\n rule__XTryCatchFinallyExpression__ExpressionAssignment_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.getXTryCatchFinallyExpressionAccess().getExpressionAssignment_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__XReturnExpression__ExpressionAssignment_2() 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:17606:1: ( ( ruleXExpression ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17607:1: ( ruleXExpression )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17607:1: ( ruleXExpression )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17608:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXReturnExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XReturnExpression__ExpressionAssignment_235485);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXReturnExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__FinallyExpressionAssignment_3_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:17666:1: ( ( ruleXExpression ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17667:1: ( ruleXExpression )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17667:1: ( ruleXExpression )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17668:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__FinallyExpressionAssignment_3_1_135609);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__FinallyExpressionAssignment_3_0_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:17651:1: ( ( ruleXExpression ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17652:1: ( ruleXExpression )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17652:1: ( ruleXExpression )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:17653:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_0_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__FinallyExpressionAssignment_3_0_1_135578);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_0_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XReturnExpression__ExpressionAssignment_2() 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:18639:1: ( ( ruleXExpression ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18640:1: ( ruleXExpression )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18640:1: ( ruleXExpression )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18641:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXReturnExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XReturnExpression__ExpressionAssignment_237575);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXReturnExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XTryCatchFinallyExpression__FinallyExpressionAssignment_3_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:18699:1: ( ( ruleXExpression ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18700:1: ( ruleXExpression )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18700:1: ( ruleXExpression )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:18701:1: ruleXExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXExpression_in_rule__XTryCatchFinallyExpression__FinallyExpressionAssignment_3_1_137699);\n ruleXExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXTryCatchFinallyExpressionAccess().getFinallyExpressionXExpressionParserRuleCall_3_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A private utility routine to calculate the minimum size of the rectangle to hold the name and extension points (if displayed). | private Dimension getTextSize() {
Dimension minSize = getNameFig().getMinimumSize();
// Now allow for the extension points, if they are displayed
if (epVec.isVisible()) {
// Allow for a separator (spacer each side + 1 pixel width line)
minSize.height += 2 * SPACER + 1;
// Loop through all the extension points, to find the widest
List<CompartmentFigText> figs = getEPFigs();
for (CompartmentFigText f : figs) {
int elemWidth = f.getMinimumSize().width;
minSize.width = Math.max(minSize.width, elemWidth);
}
// Height allows one row for each extension point
int rowHeight = Math.max(ROWHEIGHT, minSize.height);
minSize.height += rowHeight * Math.max(1, figs.size());
}
return minSize;
} | [
"float getMinBoundingBoxSize();",
"@Override\n public Dimension getMinimumSize() {\n\n Dimension textSize = getTextSize();\n\n Dimension size = calcEllipse(textSize, MIN_VERT_PADDING);\n\n return new Dimension(Math.max(size.width, 100),\n\t\t\t Math.max(size.height, 60));\n }",
"public Point getMinimumSize() {\r\n return new Point(100, 50);\r\n }",
"public String getMinWidth();",
"public int getMinimumWidth() {\r\n return MIN_BOX_WIDTH;\r\n }",
"@Override\n protected void setBoundsImpl(int x, int y, int w, int h) {\n\n // Remember where we are at present, so we can tell GEF later. Then\n // check we are as big as the minimum size\n Rectangle oldBounds = getBounds();\n Dimension minSize = getMinimumSize();\n\n int newW = (minSize.width > w) ? minSize.width : w;\n int newH = (minSize.height > h) ? minSize.height : h;\n\n // Work out the size of the name and extension point rectangle, and\n // hence the vertical padding\n Dimension textSize = getTextSize();\n int vPadding = (newH - textSize.height) / 2;\n\n // Adjust the alignment of the name.\n Dimension nameSize = getNameFig().getMinimumSize();\n\n getNameFig().setBounds(x + ((newW - nameSize.width) / 2),\n\t\t\t y + vPadding,\n\t\t\t nameSize.width,\n\t\t\t nameSize.height);\n\n // Place extension points if they are showing\n if (epVec.isVisible()) {\n\n // currY tracks the current vertical position of each element. The\n // separator is _SPACER pixels below the name. Its length is\n // calculated from the formula for an ellipse.\n int currY = y + vPadding + nameSize.height + SPACER;\n int sepLen =\n\t\t2 * (int) (calcX(newW / 2.0,\n\t\t\t\t newH / 2.0,\n\t\t\t\t newH / 2.0 - (currY - y)));\n\n epSep.setShape(x + (newW - sepLen) / 2,\n\t\t\t currY,\n\t\t\t x + (newW + sepLen) / 2,\n\t\t\t currY);\n\n // Extension points are 1 pixel for the line and _SPACER gap below\n // the separator\n currY += 1 + SPACER;\n\n // Move the extension point figures. For\n // now we assume that extension points are the width of the overall\n // text rectangle (true unless the name is wider than any EP).\n updateFigGroupSize(\n \t x + ((newW - textSize.width) / 2),\n \t currY,\n \t textSize.width,\n \t (textSize.height - nameSize.height - SPACER * 2 - 1));\n }\n\n // Set the bounds of the bigPort and cover\n bigPort.setBounds(x, y, newW, newH);\n cover.setBounds(x, y, newW, newH);\n\n // Record the changes in the instance variables of our parent, tell GEF\n // and trigger the edges to reconsider themselves.\n _x = x;\n _y = y;\n _w = newW;\n _h = newH;\n \n positionStereotypes();\n\n firePropChange(\"bounds\", oldBounds, getBounds());\n updateEdges();\n }",
"@Override\n\t\tpublic Vec2f getMinSize() {\n\t\t\treturn super.getMinSize();\n\t\t}",
"public Dimension getMinimumSize () {\n\treturn new Dimension (50, 50);\n }",
"private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}",
"public int getMinWidth();",
"public Dimension getSize() {\n width = fontMetrics.stringWidth(item.getLabelText()) + (2 * X_PADDING);\n if (width < MIN_WIDTH) {\n width = MIN_WIDTH;\n }\n height = fontMetrics.getHeight() + (2 * Y_PADDING);\n if (height < MIN_HEIGHT) {\n height = MIN_HEIGHT;\n }\n \n// System.out.println(item.getTier().getName() + \".'\" + item.getLabel() + \"': (\" + width + \", \" + height + \")\");\n return new Dimension(width, height);\n }",
"private Dimension getMinSize(Container parent, FGridBagLayoutInfo info) {\n Dimension d = new Dimension();\n int i;\n int t;\n Insets insets = parent.getInsets();\n\n t = 0;\n\n for (i = 0; i < info.width; i++) {\n t += info.minWidth[i];\n }\n\n d.width = t + insets.left + insets.right;\n\n t = 0;\n\n for (i = 0; i < info.height; i++) {\n t += info.minHeight[i];\n }\n\n d.height = t + insets.top + insets.bottom;\n\n return d;\n }",
"private void getSmallestPreviewSize(Parameters params) {\n List<Size> supportedPreviewSizes = params.getSupportedPreviewSizes();\n Size minSize = null;\n for (Size s : supportedPreviewSizes) {\n if (minSize == null || s.width < minSize.width) {\n minSize = s;\n }\n }\n height_ = minSize.height;\n width_ = minSize.width;\n }",
"public Dimension getMinimumSize(JComponent c) {\n Document doc = editor.getDocument();\n Insets i = c.getInsets();\n Dimension d = new Dimension();\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readLock();\n }\n try {\n d.width = (int) rootView.getMinimumSpan(View.X_AXIS) + i.left + i.right + caretMargin;\n d.height = (int) rootView.getMinimumSpan(View.Y_AXIS) + i.top + i.bottom;\n } finally {\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readUnlock();\n }\n }\n return d;\n }",
"public int getMinSizeX()\r\n\t{\r\n\t\treturn minSizeX;\r\n\t}",
"public Dimension getMinimumSize() {\n\t\t\treturn (getPreferredSize());\n\t\t}",
"public Dimension getMinimumSize() {\n\t\treturn new Dimension(buttonSizeInPixels*5, buttonSizeInPixels*5);\n\t}",
"public Size getMinDimensions() {\n return minDimensions;\n }",
"public int getMinimumHeight() {\r\n\t\treturn style.FONT_ITEM.getHeight() * lines;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the specified BookedFlights from the table. | @Override
public boolean removeBookedFlight(BookedFlight bf) {
return bookedFlightsDB.remove(bf);
} | [
"public void clearBookings() {\n realm.beginTransaction();\n realm.delete(BookingRealm.class);\n realm.commitTransaction();\n }",
"public void deleteFlights(List<Flight> newFlights) {\n\t\tSession session = connector.getSession();\n\t\tTransaction transaction = session.beginTransaction();\n\n\t\tfor (Flight flight : newFlights) {\n\t\t\tFlight targetFlight = session.get(Flight.class, flight.getFlightNum());\n\t\t\tif (targetFlight != null)\n\t\t\t\tsession.delete(targetFlight);\n\t\t}\n\t\ttransaction.commit();\n\t}",
"@Override\n\tpublic void removeAll() {\n\t\tfor (Flight flight : findAll()) {\n\t\t\tremove(flight);\n\t\t}\n\t}",
"public void removeAuraBook (AuraBook s){\n for (int i = 0; i < s.length ; i++){\n removeAura(s.auraBook[i].ID);\n }\n }",
"public void deleteAll(int bookingId) {\n String sql = \"DELETE FROM tickets WHERE booking_id = ?;\";\n jdbc.update(sql, bookingId);\n }",
"void removeFlight(Flight flight);",
"@Override\n\tpublic void cancelBookedTicket(int flightID, int ticketID) {\n\t\t\t\t// edit flight database first\n\t\tint seats = 0;\n\t\tquery = \"SELECT * FROM schulichairline.flights WHERE flightNum = \" //Jonathan\n\t\t\t\t+ \"'\"+flightID+\"'\";\n\t\t//query = \"SELECT * FROM finalproject.flights WHERE flightNum = \" //Jacob\n\t\t//\t\t+ \"'\"+flightID+\"'\";\n\t\tSystem.out.println(\" The server is updating \"+ flightID +\" \"+ticketID);\n\t\t\ttry {\n\t\t\t\t//myStmt = this.myConn.prepareStatement(query);\n\t\t\t\tmyRs = myStmt.executeQuery(query);\n\t\t\t\twhile(myRs.next()){\n\t\t\t\tseats = myRs.getInt(\"remainingSeats\");\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error getting seats\");\n\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t// increase seats available\n\t\t\tseats++;\n\t\t\tquery =\"UPDATE schulichairline.flights SET remainingSeats = ? WHERE flightNum = ?\";//Jonathan\n\t\t\t//query =\"UPDATE finalproject.flights SET remainingSeats = ? WHERE flightNum = ?\";//Jacob\n\t\t\ttry {\n\t\t\t\tpreparedStmt = this.myConn.prepareStatement(query);\n\t\t\t\tpreparedStmt.setInt(1, seats);\n\t\t\t\tpreparedStmt.setInt(2, flightID);\n\t\t\t\tpreparedStmt.executeUpdate();\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error Updating flights set\");\n\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t//Delete ticket in tickets database\n\t\t\tquery =\"DELETE FROM schulichairline.bookedtickets WHERE id = ? \";//Jonathan\n\t\t\t//query =\"DELETE FROM finalproject.bookedtickets WHERE id = ? \";//Jacob\n\t\t\t//\n\t\t\ttry {\n\t\t\t\tpreparedStmt = this.myConn.prepareStatement(query);\n\t\t\t\tpreparedStmt.setInt(1, ticketID);\n\t preparedStmt.execute();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error deleting from database.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t \n\t\t\n\t}",
"public void clearBookings(){\r\n\t\tSet<Integer> keys = listRooms();\r\n\t\tfor (Integer i: keys){\r\n\t\t\tRoom r = rooms.get(i);\r\n\t\t\tr.dontCompleteBooking();\r\n\t\t}\r\n\t}",
"Booking deleteBooking(int id);",
"boolean deleteRoomFromBooking(long bookingId) throws ServiceException;",
"public static void removeAllAirports() {\n\t\tConnection conn = DataBaseInfo.getConnection();\n\t\tPreparedStatement ps;\n\t\tResultSet rs;\n\t\tString getAddressID = \"SELECT `address_ID` FROM `Airports`\";\n\t\tString RemoveAddresses = \"DELETE FROM `Addresses` WHERE `address_ID` = ?\";\n\t\tString removeAirportsQuery = \"DELETE FROM `Airports`\";\n\t\ttry\n\t\t{\n\t\t\tps = conn.prepareStatement(getAddressID);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tint address_ID = rs.getInt(\"address_ID\");\n\t\t\t\tps = conn.prepareStatement(RemoveAddresses);\n\t\t\t\tps.setInt(1, address_ID);\n\t\t\t\tps.executeUpdate();\n\t\t\t}\n\t\t\tps = conn.prepareStatement(removeAirportsQuery);\n\t\t\tps.executeUpdate();\n\t\t\tps.close();\n\t\t\tconn.close();\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tSystem.out.println(\"SQLException: \");\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public void deleteBooking() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Please enter booking ID: \");\n int bookingID = Integer.parseInt(scanner.nextLine());\n System.out.println(\"Please enter facility name: \");\n String facilityName =scanner.nextLine();\n\n Request req = new DeleteBookingRequest(\n bookingID,\n facilityName\n );\n request(router, req);\n }",
"public void removeFromTrip(Booking booked_item) {\n\t\tTrip.remove(booked_item);\n\t}",
"public void deleteAllVehicles();",
"public void delete() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.delete(event, timelineUpdater);\n\n\t\tFacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking \" + getRoom() + \" has been deleted\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}",
"public void purgeAppointmentFundings(List<PendingBudgetConstructionAppointmentFunding> purgedAppointmentFundings);",
"private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic void removeByDA_AA_DD(\n\t\tString departureAirport, String arrivalAirport, String departureDate) {\n\n\t\tfor (Flight flight :\n\t\t\t\tfindByDA_AA_DD(\n\t\t\t\t\tdepartureAirport, arrivalAirport, departureDate,\n\t\t\t\t\tQueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\n\t\t\tremove(flight);\n\t\t}\n\t}",
"void deleteVehicles();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the options in the table when values are changed. | @SuppressWarnings("unused")
public void setOptions() {
CIVLTable tbl_optionTable = (CIVLTable) getComponentByName("tbl_optionTable");
DefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable
.getModel();
Object[] opts = currConfig.getGmcConfig().getOptions().toArray();
GMCSection section = currConfig.getGmcConfig().getAnonymousSection();
Collection<Option> options = currConfig.getGmcConfig().getOptions();
Iterator<Option> iter_opt = options.iterator();
List<Object> vals = new ArrayList<Object>();
for (int j = 0; j < optionModel.getRowCount(); j++) {
vals.add(optionModel.getValueAt(j, 1));
}
for (int i = 0; i < vals.size(); i++) {
Option currOpt = (Option) opts[i];
Object val = vals.get(i);
if (!currOpt.type().equals(OptionType.MAP)) {
if (val instanceof String
&& currOpt.type().equals(OptionType.INTEGER)) {
Integer value = Integer.valueOf((String) val);
section.setScalarValue(currOpt, value);
}
/*
* else if(val == null) { section.setScalarValue(currOpt, ""); }
*/
else if (true) {
System.out.println("val: " + val);
}
section.setScalarValue(currOpt, val);
}
}
} | [
"@Override\n public Status changeOptions(Options options) {\n if (options.getComparator() != this.options.getComparator()) {\n return Status.InvalidArgument(\"changing comparator while building table\");\n }\n\n // Note that any live BlockBuilders point to rep_->options and therefore\n // will automatically pick up the updated options.\n this.options = new Options(options);\n this.indexBlockOptions = new Options(options);\n this.indexBlockOptions.setBlockRestartInterval(1);\n return Status.OK();\n }",
"private void updateOptions()\r\n {\r\n try\r\n {\r\n // Set the parameters for the update PreparedStatement to the values\r\n // retrieved from the Game Options screen:\r\n optionsUpdateStatement.setString(1, String.valueOf(crosshairComboBox.getSelectedItem()));\r\n optionsUpdateStatement.setInt(2, strengthSlider.getValue());\r\n optionsUpdateStatement.setBoolean(3, animateWaterCheckBox.isSelected());\r\n\r\n // Update the database:\r\n optionsUpdateStatement.executeUpdate();\r\n }\r\n catch (Exception ex)\r\n {\r\n ex.printStackTrace(System.err);\r\n }\r\n }",
"@Override\n public void tableChanged(TableModelEvent tableModelEvent) {\n String value = \"\";\n if (table.isEditing()) {\n value = (String) table.getValueAt(table.getSelectedRow(), table.getSelectedColumn());\n }\n System.out.println(\"Old Value: \" + finalOld_value);\n System.out.println(\"Value: \" + value);\n if (comboBox.getSelectedItem().equals(\"CLIENT\")) {\n dbOperations.updateValue(\"ID\", \"CLIENT\", table.getColumnName(table.getSelectedColumn()), finalOld_value, value);\n } else if (comboBox.getSelectedItem().equals(\"PRODUCT\")) {\n dbOperations.updateValue(\"PID\", \"PRODUCT\", table.getColumnName(table.getSelectedColumn()), finalOld_value, value);\n } else if (comboBox.getSelectedItem().equals(\"COMMISSION\")) {\n switch (table.getColumnName(table.getSelectedColumn())) {\n case \"NAME\":\n System.out.println(\"Name\");\n dbOperations.updateValue(\"ID\", \"CLIENT\", \"Name\", finalOld_value, value);\n break;\n case \"Commissioned Product\":\n dbOperations.updateValue(\"PID\", \"PRODUCT\", \"Description\", finalOld_value, value);\n break;\n case \"Price\":\n dbOperations.updateValue(\"PID\", \"PRODUCT\", \"Price\", finalOld_value, value);\n break;\n default:\n dbOperations.updateValue(\"ID\", \"COMMISSION\", table.getColumnName(table.getSelectedColumn()), finalOld_value, value);\n }\n }\n }",
"private void setTableProperties() {\n\t\tsetAutoResizeMode(AUTO_RESIZE_OFF); //AUTO_RESIZE_LAST_COLUMN\n\t\tsetRowHeight(25);\n\t\tsetAutoCreateColumnsFromModel(false);\n\t\tsetColumnSelectionAllowed(false);\n\t\tsetCellSelectionEnabled(false);\n\t\tsetRowSelectionAllowed(true);\n\t\tsetFocusable(true);\n\t\tsetSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n\n\t\tgetTableHeader().setReorderingAllowed(true);\n\t\tgetTableHeader().setResizingAllowed(true);\n\t\tgetTableHeader().addMouseListener(new ColumnHeaderListener(getModel()));\n\n\t\tKeyListener keyListener = (new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\t\t\t// clear selection\n\t\t\t\t\ttable.clearSelection();\n\t\t\t\t\t//JFritz.getJframe().setStatus();\n\t\t\t\t\tparentPanel.updateStatusBar(false);\n//\t\t\t\t\tparentPanel.getStatusBarController().fireStatusChanged(callerList.getTotalDuration());\n\t\t\t\t} else if (e.getKeyCode() == KeyEvent.VK_DELETE) {\n\t\t\t\t\t// Delete selected entries\n\t\t\t\t\t((CallerList) getModel()).removeEntries(getSelectedRows());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\taddKeyListener(keyListener);\t\t\n\t}",
"public void atualizar() {\n modeloTabela.fireTableDataChanged();\n }",
"protected void updateDueToValueChanging(){\n\t}",
"public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}",
"void onOptionSwitched(String option, Object value);",
"@Override\n public void setValueAt(Object v, int row, int col)\n {\n // do nothing in this since the main table is not editable;\n }",
"private void updateFieldValues(){\r\n \tgenChainLengthField.setText(String.valueOf(settings.genChainLength));\r\n \tgenChainLengthFluxField.setText(String.valueOf(settings.genChainLengthFlux));\r\n \tstepGenDistanceField.setText(String.valueOf(settings.stepGenDistance));\r\n \trowsField.setText(String.valueOf(settings.rows));\r\n \tcolsField.setText(String.valueOf(settings.cols));\r\n \tcellWidthField.setText(String.valueOf(settings.cellWidth));\r\n \tstartRowField.setText(String.valueOf(settings.startRow));\r\n \tstartColField.setText(String.valueOf(settings.startCol));\r\n \tendRowField.setText(String.valueOf(settings.endRow));\r\n \tendColField.setText(String.valueOf(settings.endCol));\r\n \tprogRevealRadiusField.setText(String.valueOf(settings.progRevealRadius));\r\n \tprogDrawCB.setSelected(settings.progDraw);\r\n \tprogDrawSpeedField.setText(String.valueOf(settings.progDrawSpeed));\r\n }",
"private void update() {\n // Switch on the combo box\n switch (dataComboBox.getValue().toString()) {\n // If AND\n case \"AND\":\n // Load the AND dataset\n loadedData = new AND();\n // Update the table\n updateTable(loadedData);\n break;\n // If OR\n case \"OR\":\n // Load the OR dataset\n loadedData = new OR();\n // Update the table\n updateTable(loadedData);\n break;\n // If XOR\n case \"XOR\":\n // Load the XOR dataset\n loadedData = new XOR();\n // Update the table\n updateTable(loadedData);\n break;\n // If From File\n case \"From File\":\n // Clear the columns\n dataTable.getColumns().clear();\n default:\n break;\n }\n }",
"@Override\n public void setChanged() {\n set(getItem());\n }",
"private void updateControlsFromTable() {\r\n monthControl.setText(getDateFormatSymbols()\r\n .getMonths()[calendarTable.getCalendarModel().getMonth()]);\r\n yearControl.setText(String.valueOf(calendarTable.getCalendarModel().getYear()));\r\n }",
"public void setDataValuesFromUI()\n\t{\t\t\n\t\tthis.myData.setTopEvent( myManager.getEventByName( this.topEventCombo.getText() ));\n\t\tthis.myData.setTopOccurrenceRestriction( this.topEventOccurrenceCombo.getText() );\n\t\tthis.myData.setTopEventMarker( this.topEventMarkerCombo.getText() );\n\t\t\n\t\tthis.myData.setOperator( this.eventRelationshipCombo.getText() );\n\t\t\n\t\tthis.myData.setBotEvent( myManager.getEventByName( this.botEventCombo.getText() ));\n\t\tthis.myData.setBotOccurrenceRestriction( this.botEventOccurrenceCombo.getText() );\n\t\tthis.myData.setBotEventMarker( this.botEventMarkerCombo.getText() );\n\t\t\n\t\tif ( byButton.getSelection() ) // byButton is checked\n\t\t{\n\t\t\tthis.myData.setDuration1( topOperatorCombo.getText(), topSpinner.getSelection(), topTimeUnitCombo.getText() );\n\t\t\tif ( andButton.getSelection() ) // andButton is checked\n\t\t\t\tthis.myData.setDuration2( botOperatorCombo.getText(), botSpinner.getSelection(), botTimeUnitCombo.getText() );\n\t\t\telse\n\t\t\t\tthis.myData.resetDuration2();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.myData.resetDuration1();\n\t\t\tthis.myData.resetDuration2();\n\t\t}\n\t\tautoUpdateColorLabels();\t\t\n\t}",
"public void updateOption(DataModel model);",
"private void setTableColumnProperties(){\r\n getFormulatedTable().setOpaque(false);\r\n getFormulatedTable().setShowVerticalLines(false);\r\n getFormulatedTable().setShowHorizontalLines(false);\r\n getFormulatedTable().setRowHeight(ROW_HEIGHT);\r\n getFormulatedTable().setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\r\n getFormulatedTable().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n TableColumn column = getFormulatedTable().getColumnModel().getColumn(HAND_ICON_COLUMN_INDEX);\r\n column.setMinWidth(HAND_ICON_COLUMN_WIDTH);\r\n column.setMaxWidth(HAND_ICON_COLUMN_WIDTH);\r\n column.setPreferredWidth(HAND_ICON_COLUMN_WIDTH);\r\n column.setHeaderRenderer(new EmptyHeaderRenderer());\r\n column.setCellRenderer(new IconRenderer());\r\n column.setResizable(false);\r\n \r\n FormulatedCostLineItemDetailRenderer formulatedCostLineItemDetailRenderer = new FormulatedCostLineItemDetailRenderer();\r\n column = getFormulatedTable().getColumnModel().getColumn(FORMULATED_TYPE_COLUMN_INDEX);\r\n column.setMinWidth(FORMULATED_TYPE_COLUMN_WIDTH);\r\n column.setMaxWidth(FORMULATED_TYPE_COLUMN_WIDTH);\r\n column.setPreferredWidth(FORMULATED_TYPE_COLUMN_WIDTH);\r\n if(TypeConstants.DISPLAY_MODE != getFunctionType()){\r\n column.setCellEditor(new FormulatedTypeEditor());\r\n }\r\n column.setCellRenderer(formulatedCostLineItemDetailRenderer);\r\n column.setResizable(true);\r\n \r\n column = getFormulatedTable().getColumnModel().getColumn(UNIT_COST_COLUMN_INDEX);\r\n column.setMinWidth(UNIT_COST_COLUMN_WIDTH);\r\n column.setMaxWidth(UNIT_COST_COLUMN_WIDTH);\r\n column.setPreferredWidth(UNIT_COST_COLUMN_WIDTH);\r\n if(TypeConstants.DISPLAY_MODE != getFunctionType()){\r\n column.setCellEditor(new UnitCostEditor());\r\n }\r\n column.setCellRenderer(formulatedCostLineItemDetailRenderer);\r\n column.setResizable(true);\r\n \r\n column = getFormulatedTable().getColumnModel().getColumn(COUNT_COLUMN_INDEX);\r\n column.setMinWidth(COUNT_COLUMN_WIDTH);\r\n column.setMaxWidth(COUNT_COLUMN_WIDTH);\r\n column.setPreferredWidth(COUNT_COLUMN_WIDTH);\r\n if(TypeConstants.DISPLAY_MODE != getFunctionType()){\r\n column.setCellEditor(new DefaultCellEditor(\r\n new CoeusTextField(new JTextFieldFilter(JTextFieldFilter.NUMERIC,COUNT_FIELD_CHAR_LENGTH),\"\",COUNT_COLUMN_INDEX)));\r\n }\r\n column.setCellRenderer(formulatedCostLineItemDetailRenderer);\r\n column.setResizable(true);\r\n \r\n column = getFormulatedTable().getColumnModel().getColumn(FREQUENCY_COLUMN_INDEX);\r\n column.setMinWidth(FREQUENCY_COLUMN_WIDTH);\r\n column.setMaxWidth(FREQUENCY_COLUMN_WIDTH);\r\n column.setPreferredWidth(FREQUENCY_COLUMN_WIDTH);\r\n if(TypeConstants.DISPLAY_MODE != getFunctionType()){\r\n column.setCellEditor(new DefaultCellEditor(\r\n new CoeusTextField(new JTextFieldFilter(JTextFieldFilter.NUMERIC,FREQUENCY_FIELD_CHAR_LENGTH),\"\",FREQUENCY_COLUMN_INDEX)));\r\n }\r\n column.setCellRenderer(formulatedCostLineItemDetailRenderer);\r\n column.setResizable(true);\r\n \r\n column = getFormulatedTable().getColumnModel().getColumn(CALCULATED_EXPENSES_COLUMN_INDEX);\r\n column.setMinWidth(CALCULATED_EXPENSES_COLUMN_WIDTH);\r\n column.setMaxWidth(CALCULATED_EXPENSES_COLUMN_WIDTH);\r\n column.setPreferredWidth(CALCULATED_EXPENSES_COLUMN_WIDTH);\r\n column.setCellRenderer(formulatedCostLineItemDetailRenderer);\r\n column.setResizable(true);\r\n\r\n getFormulatedTable().getTableHeader().setReorderingAllowed( false );\r\n getFormulatedTable().getTableHeader().setResizingAllowed(true);\r\n getFormulatedTable().setFont(CoeusFontFactory.getNormalFont());\r\n getFormulatedTable().getTableHeader().setFont(CoeusFontFactory.getLabelFont());\r\n }",
"private void updateTable() \n\t{\n\t\tList<TopLevel> topLevelObjs = new ArrayList<TopLevel>();\n\t\t\n\t\ttopLevelObjs.addAll(getFilteredModDef());\n\t\ttopLevelObjs.addAll(getFilteredCompDef());\n\t\t\n\t\t((TopLevelTableModel) table.getModel()).setElements(topLevelObjs);\n\t\ttableLabel.setText(\"Select Design(s) (\" + topLevelObjs.size() + \")\");\n\t}",
"public abstract void updateValuesDisplay();",
"protected void setTableValue(Object val)\n\t\t{\n\t\t\tValue = val ;\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Medium of conversations used in training data. This field is being deprecated. To specify the medium to be used in training a new issue model, set the `medium` field on `filter`. .google.cloud.contactcenterinsights.v1.Conversation.Medium medium = 1 [deprecated = true]; | @java.lang.Deprecated
com.google.cloud.contactcenterinsights.v1.Conversation.Medium getMedium(); | [
"@java.lang.Deprecated\n public Builder setMedium(\n com.google.cloud.contactcenterinsights.v1.Conversation.Medium value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n medium_ = value.getNumber();\n onChanged();\n return this;\n }",
"@java.lang.Override\n @java.lang.Deprecated\n public com.google.cloud.contactcenterinsights.v1.Conversation.Medium getMedium() {\n com.google.cloud.contactcenterinsights.v1.Conversation.Medium result =\n com.google.cloud.contactcenterinsights.v1.Conversation.Medium.forNumber(medium_);\n return result == null\n ? com.google.cloud.contactcenterinsights.v1.Conversation.Medium.UNRECOGNIZED\n : result;\n }",
"@java.lang.Override\n @java.lang.Deprecated\n public com.google.cloud.contactcenterinsights.v1.Conversation.Medium getMedium() {\n com.google.cloud.contactcenterinsights.v1.Conversation.Medium result =\n com.google.cloud.contactcenterinsights.v1.Conversation.Medium.forNumber(medium_);\n return result == null\n ? com.google.cloud.contactcenterinsights.v1.Conversation.Medium.UNRECOGNIZED\n : result;\n }",
"public final void setMedium(java.lang.String medium)\n\t{\n\t\tsetMedium(getContext(), medium);\n\t}",
"public Technology technologyLevelMedium() {\n\t\tsetTechnologyLevel(\"Medium\");\n\t\tsetTechnologyLevelNo(2);\n\t\treturn getTechnology();\n\t}",
"@java.lang.Deprecated\n public Builder clearMedium() {\n bitField0_ = (bitField0_ & ~0x00000001);\n medium_ = 0;\n onChanged();\n return this;\n }",
"@Override\n\tpublic String getTargetMedium() {\n\t\treturn targetMedium;\n\t}",
"public final void setMedium(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String medium)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Medium.toString(), medium);\n\t}",
"public Long getMediumId() {\n return mediumId;\n }",
"public Long getMediumId() {\n\t\treturn mediumId;\n\t}",
"public void medium() {\n\t\tprevLevel = level;\n\t\tlevel = MEDIUM;\n\t\tSystem.out.println(location + \" ceiling fan is on medium\");\n\t}",
"public void setMediumType(String typ)\n\t{\n\t\tmediumType = typ;\n\t\tif (mediumId != null)\n\t\t\tsetMediumId(mediumId);\n\t}",
"public String getMediumName() {\n\t\treturn mediumName;\n\t}",
"public void setMediumId(Long mediumId) {\n this.mediumId = mediumId;\n }",
"public void setMediumName(String mediumName) {\n\t\tthis.mediumName = mediumName;\n\t}",
"@Override\n\tpublic void setTargetMedium(String medium) throws CSSMediaException {\n\t\tif (\"all\".equals(medium)) {\n\t\t\ttargetMedium = null;\n\t\t} else {\n\t\t\tif (medium != null) {\n\t\t\t\tmedium = medium.intern();\n\t\t\t}\n\t\t\ttargetMedium = medium;\n\t\t}\n\t\tonStyleModify();\n\t}",
"public String getObjectType() {\n\t\treturn \"TransportMedium\";\n\t}",
"public void setMediumId(Long mediumId) {\n\t\tthis.mediumId = mediumId;\n\t}",
"public String toMediumString() {\r\n\t\treturn DateFormat.getDateInstance(java.text.DateFormat.MEDIUM).format(getTime());\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ComparisonOpExp__Group__0__Impl" $ANTLR start "rule__ComparisonOpExp__Group__1" InternalOCLlite.g:4580:1: rule__ComparisonOpExp__Group__1 : rule__ComparisonOpExp__Group__1__Impl ; | public final void rule__ComparisonOpExp__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalOCLlite.g:4584:1: ( rule__ComparisonOpExp__Group__1__Impl )
// InternalOCLlite.g:4585:2: rule__ComparisonOpExp__Group__1__Impl
{
pushFollow(FOLLOW_2);
rule__ComparisonOpExp__Group__1__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__ComparisonOpExp__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:4595:1: ( ( ( rule__ComparisonOpExp__Group_1__0 )* ) )\n // InternalOCLlite.g:4596:1: ( ( rule__ComparisonOpExp__Group_1__0 )* )\n {\n // InternalOCLlite.g:4596:1: ( ( rule__ComparisonOpExp__Group_1__0 )* )\n // InternalOCLlite.g:4597:2: ( rule__ComparisonOpExp__Group_1__0 )*\n {\n before(grammarAccess.getComparisonOpExpAccess().getGroup_1()); \n // InternalOCLlite.g:4598:2: ( rule__ComparisonOpExp__Group_1__0 )*\n loop30:\n do {\n int alt30=2;\n int LA30_0 = input.LA(1);\n\n if ( ((LA30_0>=55 && LA30_0<=58)) ) {\n alt30=1;\n }\n\n\n switch (alt30) {\n \tcase 1 :\n \t // InternalOCLlite.g:4598:3: rule__ComparisonOpExp__Group_1__0\n \t {\n \t pushFollow(FOLLOW_37);\n \t rule__ComparisonOpExp__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop30;\n }\n } while (true);\n\n after(grammarAccess.getComparisonOpExpAccess().getGroup_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__ComparisonOpExp__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:4611:1: ( rule__ComparisonOpExp__Group_1__0__Impl rule__ComparisonOpExp__Group_1__1 )\n // InternalOCLlite.g:4612:2: rule__ComparisonOpExp__Group_1__0__Impl rule__ComparisonOpExp__Group_1__1\n {\n pushFollow(FOLLOW_36);\n rule__ComparisonOpExp__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ComparisonOpExp__Group_1__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__ComparisonOpExp__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:4557:1: ( rule__ComparisonOpExp__Group__0__Impl rule__ComparisonOpExp__Group__1 )\n // InternalOCLlite.g:4558:2: rule__ComparisonOpExp__Group__0__Impl rule__ComparisonOpExp__Group__1\n {\n pushFollow(FOLLOW_36);\n rule__ComparisonOpExp__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__ComparisonOpExp__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ComparisonOpExp__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:4665:1: ( rule__ComparisonOpExp__Group_1__2__Impl )\n // InternalOCLlite.g:4666:2: rule__ComparisonOpExp__Group_1__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__ComparisonOpExp__Group_1__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__Comparison__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7343:1: ( rule__Comparison__Group__0__Impl rule__Comparison__Group__1 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7344:2: rule__Comparison__Group__0__Impl rule__Comparison__Group__1\n {\n pushFollow(FOLLOW_rule__Comparison__Group__0__Impl_in_rule__Comparison__Group__014422);\n rule__Comparison__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Comparison__Group__1_in_rule__Comparison__Group__014425);\n rule__Comparison__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7404:1: ( rule__Comparison__Group_1__0__Impl rule__Comparison__Group_1__1 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7405:2: rule__Comparison__Group_1__0__Impl rule__Comparison__Group_1__1\n {\n pushFollow(FOLLOW_rule__Comparison__Group_1__0__Impl_in_rule__Comparison__Group_1__014543);\n rule__Comparison__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Comparison__Group_1__1_in_rule__Comparison__Group_1__014546);\n rule__Comparison__Group_1__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__Comparison__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7372:1: ( rule__Comparison__Group__1__Impl )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7373:2: rule__Comparison__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__Comparison__Group__1__Impl_in_rule__Comparison__Group__114481);\n rule__Comparison__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTym.g:2531:1: ( rule__Comparison__Group__1__Impl )\n // InternalTym.g:2532:2: rule__Comparison__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Comparison__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__Comparison__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1878:1: ( rule__Comparison__Group__0__Impl rule__Comparison__Group__1 )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1879:2: rule__Comparison__Group__0__Impl rule__Comparison__Group__1\n {\n pushFollow(FOLLOW_rule__Comparison__Group__0__Impl_in_rule__Comparison__Group__03752);\n rule__Comparison__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Comparison__Group__1_in_rule__Comparison__Group__03755);\n rule__Comparison__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1907:1: ( rule__Comparison__Group__1__Impl rule__Comparison__Group__2 )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1908:2: rule__Comparison__Group__1__Impl rule__Comparison__Group__2\n {\n pushFollow(FOLLOW_rule__Comparison__Group__1__Impl_in_rule__Comparison__Group__13812);\n rule__Comparison__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Comparison__Group__2_in_rule__Comparison__Group__13815);\n rule__Comparison__Group__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__Comparison__Group_1__0__Impl() throws RecognitionException {\n int rule__Comparison__Group_1__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 711) ) { return ; }\n // InternalGaml.g:12195:1: ( ( ( rule__Comparison__Group_1_0__0 ) ) )\n // InternalGaml.g:12196:1: ( ( rule__Comparison__Group_1_0__0 ) )\n {\n // InternalGaml.g:12196:1: ( ( rule__Comparison__Group_1_0__0 ) )\n // InternalGaml.g:12197:1: ( rule__Comparison__Group_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComparisonAccess().getGroup_1_0()); \n }\n // InternalGaml.g:12198:1: ( rule__Comparison__Group_1_0__0 )\n // InternalGaml.g:12198:2: rule__Comparison__Group_1_0__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__Comparison__Group_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComparisonAccess().getGroup_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 711, rule__Comparison__Group_1__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTym.g:2542:1: ( ( ( rule__Comparison__Group_1__0 )* ) )\n // InternalTym.g:2543:1: ( ( rule__Comparison__Group_1__0 )* )\n {\n // InternalTym.g:2543:1: ( ( rule__Comparison__Group_1__0 )* )\n // InternalTym.g:2544:2: ( rule__Comparison__Group_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComparisonAccess().getGroup_1()); \n }\n // InternalTym.g:2545:2: ( rule__Comparison__Group_1__0 )*\n loop29:\n do {\n int alt29=2;\n int LA29_0 = input.LA(1);\n\n if ( ((LA29_0>=16 && LA29_0<=19)) ) {\n alt29=1;\n }\n\n\n switch (alt29) {\n \tcase 1 :\n \t // InternalTym.g:2545:3: rule__Comparison__Group_1__0\n \t {\n \t pushFollow(FOLLOW_25);\n \t rule__Comparison__Group_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop29;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComparisonAccess().getGroup_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:30408:1: ( rule__Comparison__Group__0__Impl rule__Comparison__Group__1 )\n // InternalDsl.g:30409:2: rule__Comparison__Group__0__Impl rule__Comparison__Group__1\n {\n pushFollow(FOLLOW_183);\n rule__Comparison__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Comparison__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:30435:1: ( rule__Comparison__Group__1__Impl )\n // InternalDsl.g:30436:2: rule__Comparison__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Comparison__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__Comparison__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7435:1: ( rule__Comparison__Group_1__1__Impl rule__Comparison__Group_1__2 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7436:2: rule__Comparison__Group_1__1__Impl rule__Comparison__Group_1__2\n {\n pushFollow(FOLLOW_rule__Comparison__Group_1__1__Impl_in_rule__Comparison__Group_1__114604);\n rule__Comparison__Group_1__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Comparison__Group_1__2_in_rule__Comparison__Group_1__114607);\n rule__Comparison__Group_1__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__Comparison__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTym.g:2504:1: ( rule__Comparison__Group__0__Impl rule__Comparison__Group__1 )\n // InternalTym.g:2505:2: rule__Comparison__Group__0__Impl rule__Comparison__Group__1\n {\n pushFollow(FOLLOW_24);\n rule__Comparison__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Comparison__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7464:1: ( rule__Comparison__Group_1__2__Impl )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7465:2: rule__Comparison__Group_1__2__Impl\n {\n pushFollow(FOLLOW_rule__Comparison__Group_1__2__Impl_in_rule__Comparison__Group_1__214664);\n rule__Comparison__Group_1__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__Comparison__Group__0__Impl() throws RecognitionException {\n int rule__Comparison__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 707) ) { return ; }\n // InternalGaml.g:12134:1: ( ( ruleAddition ) )\n // InternalGaml.g:12135:1: ( ruleAddition )\n {\n // InternalGaml.g:12135:1: ( ruleAddition )\n // InternalGaml.g:12136:1: ruleAddition\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComparisonAccess().getAdditionParserRuleCall_0()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleAddition();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComparisonAccess().getAdditionParserRuleCall_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, 707, rule__Comparison__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__PredicateComparison__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3904:1: ( rule__PredicateComparison__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3905:2: rule__PredicateComparison__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__PredicateComparison__Group__1__Impl_in_rule__PredicateComparison__Group__17676);\n rule__PredicateComparison__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find books by their removal status | @Override
public List<Inventory> findByRemovalStatus(boolean status) throws SQLException {
String query = "SELECT * FROM inventory WHERE removal_status = ?";
books = new ArrayList<>();
try (Connection connection = inventorySource.getConnection();
PreparedStatement ps = connection.prepareStatement(query);) {
ps.setBoolean(1, status);
ResultSet rs = ps.executeQuery();
while (rs.next()) {
Inventory book = createBook(rs);
books.add(book);
}
}
return books;
} | [
"@Override\n public List<Book> removeBooks(Book removingBook) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n List<Book> removedBooks = new ArrayList<>();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, removingBook);\n ResultSet resultSet = statementSelect.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n Book book = bookCreator.create(resultSet);\n removedBooks.add(book);\n resultSet.deleteRow();\n }\n if (removedBooks.isEmpty()) {\n throw new DaoException(\"There is no such book in warehouse!\");\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n }\n return removedBooks;\n }",
"List<Book> findBooksWithoutRating();",
"boolean removeBook(int bookId);",
"public void removeBook(String isbn);",
"public void remove(Entry rem){\n for(int i = 0; i < Book.size(); i++){\n if(Book.get(i) == rem){\n Book.remove(i);\n }\n }\n }",
"public void removeAuraBook (AuraBook s){\n for (int i = 0; i < s.length ; i++){\n removeAura(s.auraBook[i].ID);\n }\n }",
"private void removeBook() {\n InventoryBook bookToDelete = tableViewInventory.getSelectionModel().getSelectedItem();\n if (bookToDelete != null) {\n handler.deleteBook(bookToDelete);\n updateBookList();\n }\n }",
"public Book remove(String title) {\n int BookCnt = _noOfBooks;\n for (int i = 0; i < BookCnt && !isNull(title); i++) {\n if (!isNull(_lib[i].getTitle()) && _lib[i].getTitle().equals(title)) {\n Book bookToRemove = new Book(_lib[i]);\n _lib[i] = null;\n _noOfBooks--;\n arrangeArray();\n return bookToRemove;\n }\n }\n return null; // if didn't reached null and didn't find.\n }",
"public Book Checkout(String bookName){\n Book checkedoutBook = null;\n BookList bookList = new BookList();// booklist object\n ArrayList<Book> allBooks = bookList.getBooks();//allbooks is getting all books via getBooks method\n if(FindBookInBookList(allBooks,bookName) && !FindBookInBookList(issuedBooks,bookName)) {\n for (Book book : bookList.getBooks()) {\n if(book.getName().equals(bookName)){\n checkedoutBook = book;\n issuedBooks.add(checkedoutBook);\n break;\n }\n }\n }\n return checkedoutBook;\n }",
"public List<Book> findByBookStatus(BookStatus bookStatus)\r\n {\r\n Criteria criteria = getSession().createCriteria(getObjectClass());\r\n criteria.add(Restrictions.eq(\"bookStatus\", bookStatus));\r\n return criteria.list();\r\n }",
"public java.util.List<MOIDeleteDocuments> findByStatus(String status);",
"public java.util.List<BookmarksEntry> findByG_NotS(long groupId, int status);",
"@Override\n\tpublic void removeByStatus(int status) {\n\t\tfor (Arret arret :\n\t\t\t\tfindByStatus(\n\t\t\t\t\tstatus, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\n\t\t\tremove(arret);\n\t\t}\n\t}",
"public void remove()\r\n {\r\n if(bookCount>0)\r\n {\r\n bookCount-=1;\r\n }\r\n }",
"@Override\r\n\tpublic List<Book> removeBook(Book book, User user) {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tTypedQuery<Book> query = sessionFactory.getCurrentSession()\r\n\t\t\t\t.createQuery(\"delete from WISH_USER_BOOK \" + \"where USER_ID = :user_id and BOOK_id =: book_id\"); //TODO make native\r\n\t\tquery.setParameter(\"user_id\", user.getId());\r\n\t\tquery.setParameter(\"book_id\", book.getId());\r\n\t\tquery.executeUpdate();\r\n\r\n\t\treturn getWishList(user);\r\n\t}",
"public void removeByStatus(String status);",
"public java.util.List<Todo> filterFindByG_S(long groupId, int status);",
"void removeInBookNo(Object oldInBookNo);",
"public void removeBook(Book b){\n\t\tbookMap.get(b.getTitle()).remove(b);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the project owner ID of this eprocurement request. | @Override
public void setProjectOwnerId(long projectOwnerId) {
_eprocurementRequest.setProjectOwnerId(projectOwnerId);
} | [
"@Override\n\tpublic long getProjectOwnerId() {\n\t\treturn _eprocurementRequest.getProjectOwnerId();\n\t}",
"void updateOwner(final Long projectID, final Long ownerID);",
"void setOwnerId(final Integer ownerId);",
"public void setOwnerId(long ownerId) {\n this.ownerId = ownerId;\n }",
"public void setOwnerId(Integer ownerId) {\n this.ownerId = ownerId;\n }",
"public void setOwner(int value) {\n this.owner = value;\n }",
"public void setOwner_id(Integer owner_id) {\n this.owner_id = owner_id;\n }",
"public void setOwnerId(int tmp) {\n this.ownerId = tmp;\n }",
"public void setIdOwner(Long idOwner) {\r\n this.idOwner = idOwner;\r\n }",
"void SetOwner(int passedOwner) {\n if(passedOwner == 0 || passedOwner == 1) {\n owner = passedOwner;\n }\n else {\n Log.d(\"MyError\", \"Error in setting the owner of a build in the build class.\");\n }\n }",
"public void setOwner(Owner owner) {\n this.owner = owner;\n }",
"public void setOwner(com.sforce.soap.enterprise.sobject.SObject owner) {\r\n this.owner = owner;\r\n }",
"void setOwnerId(String newId) {\n this.ownerid = newId;\n }",
"public String getProjectOwnerId() {\n\t\treturn projectOwnerId;\n\t}",
"public void setContentOwnerId(Number value) {\n setAttributeInternal(CONTENTOWNERID, value);\n }",
"PermissionModel setOwnerId(String ownerId);",
"public void setOwner(String newOwner){\n owner = newOwner;\n }",
"void setNewOwner(User owner);",
"public void setOwner(Company owner)\n {\n this.owner = owner;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getRawXData This method returns the raw data of the specified type for the yaxis. | @Override
public SensorData<Double> getRawYData(DataType dataType)
{
final String funcName = "getRawYData";
double value = 0.0;
long currTagId = FtcOpMode.getLoopCounter();
if (dataType == DataType.ACCELERATION)
{
if (currTagId != accelTagId)
{
accelData = imu.getAcceleration();
accelTagId = currTagId;
}
value = accelData.yAccel;
}
else if (dataType == DataType.VELOCITY)
{
if (currTagId != velTagId)
{
velData = imu.getVelocity();
velTagId = currTagId;
}
value = velData.yVeloc;
}
else if (dataType == DataType.DISTANCE)
{
if (currTagId != posTagId)
{
posData = imu.getPosition();
posTagId = currTagId;
}
value = posData.y;
}
SensorData<Double> data = new SensorData<>(TrcUtil.getCurrentTime(), value);
if (debugEnabled)
{
dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);
dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API,
"=(timestamp:%.3f,value:%f", data.timestamp, data.value);
}
return data;
} | [
"@Override\n public SensorData<Double> getRawYData(DataType dataType)\n {\n final String funcName = \"getRawYData\";\n double value = 0.0;\n long currTagId = FtcOpMode.getLoopCounter();\n\n if (dataType == DataType.ROTATION_RATE)\n {\n if (currTagId != turnRateTagId)\n {\n turnRateData = imu.getAngularVelocity();\n turnRateTagId = currTagId;\n }\n value = turnRateData.yRotationRate;\n }\n else if (dataType == DataType.HEADING)\n {\n if (currTagId != headingTagId)\n {\n if (USE_QUATERNION)\n {\n getEulerAngles(eulerAngles);\n }\n else\n {\n headingData = imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n }\n headingTagId = currTagId;\n }\n\n if (USE_QUATERNION)\n {\n value = eulerAngles[1];\n }\n else\n {\n value = headingData.secondAngle;\n }\n }\n SensorData<Double> data = new SensorData<>(TrcUtil.getCurrentTime(), value);\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API,\n \"=(timestamp:%.3f,value:%f\", data.timestamp, data.value);\n }\n\n return data;\n }",
"public String getYAxisInfo();",
"@Override\n public SensorData<Double> getRawXData(DataType dataType)\n {\n final String funcName = \"getRawXData\";\n double value = 0.0;\n long currTagId = FtcOpMode.getLoopCounter();\n\n if (dataType == DataType.ACCELERATION)\n {\n if (currTagId != accelTagId)\n {\n accelData = imu.getAcceleration();\n accelTagId = currTagId;\n }\n value = accelData.xAccel;\n }\n else if (dataType == DataType.VELOCITY)\n {\n if (currTagId != velTagId)\n {\n velData = imu.getVelocity();\n velTagId = currTagId;\n }\n value = velData.xVeloc;\n }\n else if (dataType == DataType.DISTANCE)\n {\n if (currTagId != posTagId)\n {\n posData = imu.getPosition();\n posTagId = currTagId;\n }\n value = posData.x;\n }\n SensorData<Double> data = new SensorData<>(TrcUtil.getCurrentTime(), value);\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API,\n \"=(timestamp:%.3f,value:%f\", data.timestamp, data.value);\n }\n\n return data;\n }",
"public ChartYAxis getYAxis() { return _yaxis; }",
"int getAxisTypeValue();",
"public double[] getYPoints() {\n return yData;\n }",
"List<Axis> getyAxisValues() {\n\t\tfinal List<Axis> values = new ArrayList<Axis>();\n\t\ttry {\n\t\t\tfor (String result : analysisModel.getResultNames()) {\n\t\t\t\tvalues.add(AxisType.RESULT.newAxis(AxisName.Y1, result));\n\t\t\t}\n\t\t\tfor (Pair<String, DerivedData> pair : analysisModel\n\t\t\t\t\t.getDerivedDataModel().getDerivedData()) {\n\t\t\t\tfinal String name = pair.getFirst();\n\t\t\t\tfinal DerivedData derivedData = pair.getSecond();\n\t\t\t\tvalues.add(Axis.newDerivedAxis(AxisName.Y1, name, derivedData));\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLOG.error(\"Failed to get result name list\", ex);\n\t\t}\n\t\treturn values;\n\t}",
"public DoubleData getY() {\n\t\treturn y;\n\t}",
"public String getYaxis() {\n return yaxis;\n }",
"public double getRightYAxis() {\n\t\treturn getRawAxis(Axis_RightY);\n\t}",
"public Object[] getYValues() {\n return yValues;\n }",
"public native double getYAsDouble() /*-{\n return this.@org.moxieapps.gwt.highcharts.client.ToolTipData::data.y;\n }-*/;",
"public AxisViewY getAxisViewY()\n {\n AxisType axisType = getAxisTypeY();\n return (AxisViewY) _chartHelper.getAxisView(axisType);\n }",
"String getYScaleType();",
"public double getLeftYAxis() {\n\t\treturn getRawAxis(Axis_LeftY);\n\t}",
"public AxisType getViewAxisForDataAxis(AxisType anAxisType)\n {\n // Handle weird Bar3D and Line3D: Data axis is same as View axis\n if (isForwardXY())\n return anAxisType;\n\n // Handle standard 3D where Z values go up/down and Y values are forward/back (Y & Z are swapped)\n if (anAxisType == AxisType.Z)\n return AxisType.Y;\n if (anAxisType == AxisType.Y)\n return AxisType.Z;\n return anAxisType;\n }",
"@Override\n public SensorData<Double> getRawZData(DataType dataType)\n {\n final String funcName = \"getRawZData\";\n double value = 0.0;\n long currTagId = FtcOpMode.getLoopCounter();\n\n if (dataType == DataType.ROTATION_RATE)\n {\n if (currTagId != turnRateTagId)\n {\n turnRateData = imu.getAngularVelocity();\n turnRateTagId = currTagId;\n }\n value = turnRateData.zRotationRate;\n }\n else if (dataType == DataType.HEADING)\n {\n if (currTagId != headingTagId)\n {\n if (USE_QUATERNION)\n {\n getEulerAngles(eulerAngles);\n }\n else\n {\n headingData = imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n }\n headingTagId = currTagId;\n }\n\n if (USE_QUATERNION)\n {\n value = -eulerAngles[2];\n }\n else\n {\n //\n // The Z-axis returns positive heading in the anticlockwise direction, so we must negate it for\n // our convention.\n //\n value = -headingData.thirdAngle;\n }\n }\n SensorData<Double> data = new SensorData<>(TrcUtil.getCurrentTime(), value);\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API,\n \"=(timestamp:%.3f,value:%f\", data.timestamp, data.value);\n }\n\n return data;\n }",
"public double getRightXAxis() {\n\t\treturn getRawAxis(Axis_RightX);\n\t}",
"public native String getYAsString() /*-{\n return this.@org.moxieapps.gwt.highcharts.client.ToolTipData::data.y;\n }-*/;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
transitions from WELCOME Frame to next Frame based on the Button Clicked SHOPPING or PREVIOUS RECORDS | void nextFrame(Welcome welcomeF, int pageChoice){
welcomeF.setVisible(false);
if(pageChoice == Globals.SHOPPING_PAGE){
shoppingF.setVisible(true);
//to fill the shopping tables in the SHOPPING Frame before displaying the frame.
shoppingF.setTables();
}
else if(pageChoice == Globals.PREV_RECORDS_PAGE){
prevRecordsF.reset();
prevRecordsF.setVisible(true);
}
else if(pageChoice == Globals.CUST_REG_PAGE){
custRegF.setVisible(true);
}
} | [
"void nextFrame(PreviousRecords prevRecordsF){\n\t\tprevRecordsF.setVisible(false);\n\t\twelcomeF.setVisible(true);\n\t\t\n\t}",
"private void continueButton() {\n Side side = view.getRadioButtonAllies().isSelected() ? Side.ALLIES : Side.AXIS;\n\n game.setNew();\n game.setScenario(scenarioViewModel.getScenario().getValue());\n game.setHumanSide(side);\n game.setSavedGameName(Resource.DEFAULT_SAVED_GAME);\n\n startGame();\n\n navigate.goNext(this.getClass(), stage);\n }",
"private void nextScreen() \n\t{\n\t\tIntent intent=null;\n\t\trelativeLayoutBASign.setVisibility(View.INVISIBLE);\n\t\tif(isAudit)\n\t\t{\n\t\t\tintent=new Intent(BASearch.this,BAAuditForm.class); \n\t\t}\n\t\telse\n\t\t{\n\t\t\tintent=new Intent(BASearch.this,BASearchData.class); \n\t\t}\n\t\tstartActivity(intent);\n\t\tBASearch.this.finish();\n\t\tintent=null;\n\t}",
"@Nullable\n WizardPage flipToNext();",
"@OnClick(R.id.btnNext)\n void btnNext() {\n if (nextTeamPlaying) {\n if (state == 0) {\n ekipa2TxtHighlighted();\n state = 1;\n } else {\n ekipa1TxtHighlighted();\n state = 0;\n }\n nextTeamPlaying = false;\n getRandomWordsFromArray();\n continuePlaying();\n return;\n }\n ekipa1ScoreCounter();\n setTextScore();\n // Checks if someone has enough points to win if no moves to other team\n if (winnerDeclare()) {\n return;\n }\n nextTeamPlaying();\n\n }",
"public void prevFrame();",
"public void onActionFromBackLink() {\n //if we slide back...no errors can be possible\n errorNextLink = false;\n //default:no error msg\n nextLinkErrorMsg = \"\";\n resetErrorMsgs();\n \n if (currentPagePointer > 1) {\n currentPagePointer--;\n }\n }",
"private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.HOMEPAGE);\n }",
"private void configurePreviousMsg(){\n int i = 1;\n Integer btnNo;\n Integer btnContactName;\n Button theButton;\n TextView TV2;\n while(i<10){\n btnNo = getResources().getIdentifier(\"Contact_\"+i+\"_Prevmgs\",\"id\",getPackageName());\n btnContactName = getResources().getIdentifier(\"Contact_\"+i+\"_name\",\"id\",getPackageName());\n theButton = (Button) findViewById(btnNo);\n TV2 = (TextView) findViewById(btnContactName);\n //theButton.setText(\"Message Currently un-coded!\"); //FIND A WAY TO GRAB THE PREVIOUS MESSAGE OF CONVERSATION I HERE\n //@CONNECTION TEAM\n //TV2.setText(\"Name un-coded!\"); //Same deal, grab the name of the contact\n //@Connection team\n theButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view){\n startActivity(new Intent(MainActivity.this, Message_Conversation.class));\n //CURRENTLY ALL BUTTONS TAKE YOU TO THE SAME PLACE\n //AGAIN THIS SHOULD BE FIXED BY CONNECTION TEAM\n }\n });\n i = i+1;\n }\n }",
"public void clickContinueButton(){\n getContinueButton().click();\n }",
"private void switchToContinuePreviousGameActivity(){\n Intent tmp = new Intent(this, ContinuePreviousActivity.class);\n tmp.putExtra(\"currentUser\",userManager.getCurrentUser().getUserName());\n tmp.putExtra(\"continueGameType\", \"Sliding\");\n startActivity(tmp);\n }",
"private void changeToSecondPage(){\r\n\t\tsetupImage(getSecondHelpImage());\r\n\t\tbackButton.setVisible(true);\r\n\t\tbackButton.setDisable(false);\r\n\t\tnextButton.setVisible(false);\r\n\t\tnextButton.setDisable(true);\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n JButton b = (JButton)e.getSource();\n String command = b.getActionCommand();\n\n // this closes the current JFrame\n frames.get(showFrame).dispatchEvent(new WindowEvent(frames.get(showFrame), WindowEvent.WINDOW_CLOSING));\n\n // Gets the next JFrame\n if(command.equals(\"Next\")){\n showFrame++;\n }\n else {\n showFrame--;\n }\n\n // Opens the next JFrame\n frames.get(showFrame).setVisible(true);\n }",
"public void repalayAgain(ActionEvent event){\n txtWinner.setText(\"\");\n btnPlayAgain.setVisible(false);\n //makeGridEmpty();\n MainController.isrecord = false;\n AskDialog isrecoredGame = new AskDialog();\n Boolean check=isrecoredGame.alert(\"Do you want to record game ?\");\n if(check)\n {\n AccessFile.createFile(\"local-mode\");\n AccessFile.writeFile(prefs.get(\"username\",\"\")+\".\");\n AccessFile.writeFile(\"username2\"+\".\");\n\n MainController.isrecord=true;\n }\n ButtonBack btnback = new ButtonBack(\"/view/HardLevel.fxml\");\n btnback.handleButtonBack(event);\n \n }",
"public void goToNextPage() {\n nextPageButton.click();\n }",
"private void changeToFirstPage(){\r\n\t\tsetupImage(getFirstHelpImage());\r\n\t\tnextButton.setVisible(true);\r\n\t\tnextButton.setDisable(false);\r\n\t\tbackButton.setVisible(false);\r\n\t\tbackButton.setDisable(true);\r\n\t}",
"private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }",
"@Override\n public void onContinueDialogYesButtonClick() {\n startNewGame();\n }",
"public void backToCourseButtonPressed(){\n courseHomeAnchorPane.setVisible(true);\n addNewCourseAnchorPane.setVisible(false);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This is a utility to get a user from a collection were it is necessary that the collection has a single instance, thus an exception if not single. | private User getSingleUser(Collection collection)
throws EmptyUserCollectionException, NotSingleUserException {
if (collection.size() == 1) {
return (User) collection.iterator().next();
} else if (collection.size() < 1) {
throw new EmptyUserCollectionException();
} else if (collection.size() > 1) {
throw new NotSingleUserException();
}
return null;
} | [
"public User getUser(String uid) {\n Enumeration<Object> enumeration = elements();\n while(enumeration.hasMoreElements()){\n User user = (User)enumeration.nextElement();\n if(uid.equals(user.getUid().toString())) {\n return user;\n }\n }\n throw new NoSuchElementException();\n }",
"User selectById(String uid);",
"private User getUser(int id) {\n\n for (User user : this.users\n ) {\n if (user.getUserNumber() == id) return user;\n }\n return null;\n }",
"public DiggUser readSingleUser(ReadableResponse response) throws JSONException{\n List<DiggUser> list = readUsers(response);\n if(list.size()==1) return list.get(0);\n else return null;\n }",
"public MsUser getUser(final String name) {\n for (final MsUser user : users) {\n if (user.getName().equals(name)) {\n return user;\n }\n }\n\n return null;\n }",
"public User getUser(int index) {\n if (index < this.users.size() && index >= 0) {\n return this.users.get(index);\n } else {\n throw new RuntimeException();\n }\n }",
"private User getSelectedUser() {\n for(User user : LoginActivity.users) {\n if(user.getName().equals(viewRewardFor.getSelectedItem().toString())) {\n return user;\n }\n }\n System.err.println(\"Error : user not found\");\n return null;\n }",
"People getObjUser();",
"User getPassedUser();",
"public DBCollection getUserCollection() {\n DBCollection dbCollection = null;\n try {\n return MongoDBService.getCollection(\"users\");\n } catch (Exception e) {\n NXGReports.addStep(\"Can't get Users Colection: auvenir-users\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n e.printStackTrace();\n }\n return dbCollection;\n }",
"User get(String username) throws UserNotFoundException, SQLException;",
"public User getByName(String name);",
"AmigoUser getById(Long id);",
"public User get(String id);",
"People getUser();",
"public User getUser(String entity)\n\t{\n\t\tif (entity == null)\n\t\t\treturn null;\n\t\tfor (User u : usersList) {\n\t\t\tif (entity.equals(u.getEntity()))\n\t\t\t\treturn u;\n\t\t}\n\t\treturn null;\n\t}",
"public User getUser(int index) {\n return this.userList.get(index);\n }",
"public User getUser(int index)\n {\n return users.get(index);\n }",
"public User getUser() {\n\n String query = String.format(\"select * from User where ticket_id =\"+ this.id);\n ResultSet result = con.executeQuery(query);\n\n try {\n while (result.next()) {\n\n User p = (User) User.getUserClass(result);\n return p;\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / Get the document builder to insert a REF field, reference a bookmark with it, and add text before and after it. / | private FieldRef insertFieldRef(final DocumentBuilder builder, final String bookmarkName,
final String textBefore, final String textAfter) throws Exception {
builder.write(textBefore);
FieldRef field = (FieldRef) builder.insertField(FieldType.FIELD_REF, true);
field.setBookmarkName(bookmarkName);
builder.write(textAfter);
return field;
} | [
"@Test//ExSkip\n public void fieldRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.startBookmark(\"MyBookmark\");\n builder.insertFootnote(FootnoteType.FOOTNOTE, \"MyBookmark footnote #1\");\n builder.write(\"Text that will appear in REF field\");\n builder.insertFootnote(FootnoteType.FOOTNOTE, \"MyBookmark footnote #2\");\n builder.endBookmark(\"MyBookmark\");\n builder.moveToDocumentStart();\n\n // We will apply a custom list format, where the amount of angle brackets indicates the list level we are currently at.\n builder.getListFormat().applyNumberDefault();\n builder.getListFormat().getListLevel().setNumberFormat(\"> \\u0000\");\n\n // Insert a REF field that will contain the text within our bookmark, act as a hyperlink, and clone the bookmark's footnotes.\n FieldRef field = insertFieldRef(builder, \"MyBookmark\", \"\", \"\\n\");\n field.setIncludeNoteOrComment(true);\n field.setInsertHyperlink(true);\n\n Assert.assertEquals(field.getFieldCode(), \" REF MyBookmark \\\\f \\\\h\");\n\n // Insert a REF field, and display whether the referenced bookmark is above or below it.\n field = insertFieldRef(builder, \"MyBookmark\", \"The referenced paragraph is \", \" this field.\\n\");\n field.setInsertRelativePosition(true);\n\n Assert.assertEquals(field.getFieldCode(), \" REF MyBookmark \\\\p\");\n\n // Display the list number of the bookmark as it appears in the document.\n field = insertFieldRef(builder, \"MyBookmark\", \"The bookmark's paragraph number is \", \"\\n\");\n field.setInsertParagraphNumber(true);\n\n Assert.assertEquals(\" REF MyBookmark \\\\n\", field.getFieldCode());\n\n // Display the bookmark's list number, but with non-delimiter characters, such as the angle brackets, omitted.\n field = insertFieldRef(builder, \"MyBookmark\", \"The bookmark's paragraph number, non-delimiters suppressed, is \", \"\\n\");\n field.setInsertParagraphNumber(true);\n field.setSuppressNonDelimiters(true);\n\n Assert.assertEquals(field.getFieldCode(), \" REF MyBookmark \\\\n \\\\t\");\n\n // Move down one list level.\n builder.getListFormat().setListLevelNumber(builder.getListFormat().getListLevelNumber() + 1)/*Property++*/;\n builder.getListFormat().getListLevel().setNumberFormat(\">> \\u0001\");\n\n // Display the list number of the bookmark and the numbers of all the list levels above it.\n field = insertFieldRef(builder, \"MyBookmark\", \"The bookmark's full context paragraph number is \", \"\\n\");\n field.setInsertParagraphNumberInFullContext(true);\n\n Assert.assertEquals(field.getFieldCode(), \" REF MyBookmark \\\\w\");\n\n builder.insertBreak(BreakType.PAGE_BREAK);\n\n // Display the list level numbers between this REF field, and the bookmark that it is referencing.\n field = insertFieldRef(builder, \"MyBookmark\", \"The bookmark's relative paragraph number is \", \"\\n\");\n field.setInsertParagraphNumberInRelativeContext(true);\n\n Assert.assertEquals(field.getFieldCode(), \" REF MyBookmark \\\\r\");\n\n // At the end of the document, the bookmark will show up as a list item here.\n builder.writeln(\"List level above bookmark\");\n builder.getListFormat().setListLevelNumber(builder.getListFormat().getListLevelNumber() + 1)/*Property++*/;\n builder.getListFormat().getListLevel().setNumberFormat(\">>> \\u0002\");\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.REF.docx\");\n testFieldRef(new Document(getArtifactsDir() + \"Field.REF.docx\")); //ExSkip\n }",
"private static FieldNoteRef insertFieldNoteRef(DocumentBuilder builder, String bookmarkName, boolean insertHyperlink, boolean insertRelativePosition, boolean insertReferenceMark, String textBefore) throws Exception {\n builder.write(textBefore);\n\n FieldNoteRef field = (FieldNoteRef) builder.insertField(FieldType.FIELD_NOTE_REF, true);\n field.setBookmarkName(bookmarkName);\n field.setInsertHyperlink(insertHyperlink);\n field.setInsertRelativePosition(insertRelativePosition);\n field.setInsertReferenceMark(insertReferenceMark);\n builder.writeln();\n\n return field;\n }",
"@Test\n public void noteRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.write(\"CrossReference: \");\n\n FieldNoteRef field = (FieldNoteRef)builder.insertField(FieldType.FIELD_NOTE_REF, false); // <--- don't update field\n field.setBookmarkName(\"CrossRefBookmark\");\n field.setInsertHyperlink(true);\n field.setInsertReferenceMark(true);\n field.setInsertRelativePosition(false);\n builder.writeln();\n\n builder.startBookmark(\"CrossRefBookmark\");\n builder.write(\"Hello world!\");\n builder.insertFootnote(FootnoteType.FOOTNOTE, \"Cross referenced footnote.\");\n builder.endBookmark(\"CrossRefBookmark\");\n builder.writeln();\n\n doc.updateFields();\n\n // This field works only in older versions of Microsoft Word.\n doc.save(getArtifactsDir() + \"Field.NOTEREF.doc\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.NOTEREF.doc\");\n field = (FieldNoteRef)doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_NOTE_REF, \" NOTEREF CrossRefBookmark \\\\h \\\\f\", \"1\", field);\n TestUtil.verifyFootnote(FootnoteType.FOOTNOTE, true, null, \"Cross referenced footnote.\",\n (Footnote)doc.getChild(NodeType.FOOTNOTE, 0, true));\n }",
"private FieldPageRef insertFieldPageRef(final DocumentBuilder builder, final String bookmarkName, final boolean insertHyperlink,\n final boolean insertRelativePosition, final String textBefore) throws Exception {\n builder.write(textBefore);\n\n FieldPageRef field = (FieldPageRef) builder.insertField(FieldType.FIELD_PAGE_REF, true);\n field.setBookmarkName(bookmarkName);\n field.setInsertHyperlink(insertHyperlink);\n field.setInsertRelativePosition(insertRelativePosition);\n builder.writeln();\n\n return field;\n }",
"@Test//ExSkip\n public void fieldNoteRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create a bookmark with a footnote that the NOTEREF field will reference.\n insertBookmarkWithFootnote(builder, \"MyBookmark1\", \"Contents of MyBookmark1\", \"Footnote from MyBookmark1\");\n\n // This NOTEREF field will display the number of the footnote inside the referenced bookmark.\n // Setting the InsertHyperlink property lets us jump to the bookmark by Ctrl + clicking the field in Microsoft Word.\n Assert.assertEquals(\" NOTEREF MyBookmark2 \\\\h\",\n insertFieldNoteRef(builder, \"MyBookmark2\", true, false, false, \"Hyperlink to Bookmark2, with footnote number \").getFieldCode());\n\n // When using the \\p flag, after the footnote number, the field also displays the bookmark's position relative to the field.\n // Bookmark1 is above this field and contains footnote number 1, so the result will be \"1 above\" on update.\n Assert.assertEquals(\" NOTEREF MyBookmark1 \\\\h \\\\p\",\n insertFieldNoteRef(builder, \"MyBookmark1\", true, true, false, \"Bookmark1, with footnote number \").getFieldCode());\n\n // Bookmark2 is below this field and contains footnote number 2, so the field will display \"2 below\".\n // The \\f flag makes the number 2 appear in the same format as the footnote number label in the actual text.\n Assert.assertEquals(\" NOTEREF MyBookmark2 \\\\h \\\\p \\\\f\",\n insertFieldNoteRef(builder, \"MyBookmark2\", true, true, true, \"Bookmark2, with footnote number \").getFieldCode());\n\n builder.insertBreak(BreakType.PAGE_BREAK);\n insertBookmarkWithFootnote(builder, \"MyBookmark2\", \"Contents of MyBookmark2\", \"Footnote from MyBookmark2\");\n\n doc.updatePageLayout();\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.NOTEREF.docx\");\n testNoteRef(new Document(getArtifactsDir() + \"Field.NOTEREF.docx\")); //ExSkip\n }",
"@Test\n public void insertTextAndBookmark() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // A valid bookmark needs to have document body text enclosed by\n // BookmarkStart and BookmarkEnd nodes created with a matching bookmark name.\n builder.startBookmark(\"MyBookmark\");\n builder.writeln(\"Hello world!\");\n builder.endBookmark(\"MyBookmark\");\n\n Assert.assertEquals(1, doc.getRange().getBookmarks().getCount());\n Assert.assertEquals(\"MyBookmark\", doc.getRange().getBookmarks().get(0).getName());\n Assert.assertEquals(\"Hello world!\", doc.getRange().getBookmarks().get(0).getText().trim());\n //ExEnd\n }",
"@Test//ExSkip\n public void fieldPageRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n insertAndNameBookmark(builder, \"MyBookmark1\");\n\n // Insert a PAGEREF field that displays what page a bookmark is on.\n // Set the InsertHyperlink flag to make the field also function as a clickable link to the bookmark.\n Assert.assertEquals(\" PAGEREF MyBookmark3 \\\\h\",\n insertFieldPageRef(builder, \"MyBookmark3\", true, false, \"Hyperlink to Bookmark3, on page: \").getFieldCode());\n\n // We can use the \\p flag to get the PAGEREF field to display\n // the bookmark's position relative to the position of the field.\n // Bookmark1 is on the same page and above this field, so this field's displayed result will be \"above\".\n Assert.assertEquals(\" PAGEREF MyBookmark1 \\\\h \\\\p\",\n insertFieldPageRef(builder, \"MyBookmark1\", true, true, \"Bookmark1 is \").getFieldCode());\n\n // Bookmark2 will be on the same page and below this field, so this field's displayed result will be \"below\".\n Assert.assertEquals(\" PAGEREF MyBookmark2 \\\\h \\\\p\",\n insertFieldPageRef(builder, \"MyBookmark2\", true, true, \"Bookmark2 is \").getFieldCode());\n\n // Bookmark3 will be on a different page, so the field will display \"on page 2\".\n Assert.assertEquals(\" PAGEREF MyBookmark3 \\\\h \\\\p\",\n insertFieldPageRef(builder, \"MyBookmark3\", true, true, \"Bookmark3 is \").getFieldCode());\n\n insertAndNameBookmark(builder, \"MyBookmark2\");\n builder.insertBreak(BreakType.PAGE_BREAK);\n insertAndNameBookmark(builder, \"MyBookmark3\");\n\n doc.updatePageLayout();\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.PAGEREF.docx\");\n testPageRef(new Document(getArtifactsDir() + \"Field.PAGEREF.docx\")); //ExSkip\n }",
"@Test\n public void insertHyperlinkToLocalBookmark() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.startBookmark(\"Bookmark1\");\n builder.write(\"Bookmarked text. \");\n builder.endBookmark(\"Bookmark1\");\n builder.writeln(\"Text outside of the bookmark.\");\n\n // Insert a HYPERLINK field that links to the bookmark. We can pass field switches\n // to the \"InsertHyperlink\" method as part of the argument containing the referenced bookmark's name.\n builder.getFont().setColor(Color.BLUE);\n builder.getFont().setUnderline(Underline.SINGLE);\n builder.insertHyperlink(\"Link to Bookmark1\", \"Bookmark1\\\" \\\\o \\\"Hyperlink Tip\", true);\n\n doc.save(getArtifactsDir() + \"DocumentBuilder.InsertHyperlinkToLocalBookmark.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"DocumentBuilder.InsertHyperlinkToLocalBookmark.docx\");\n FieldHyperlink hyperlink = (FieldHyperlink) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_HYPERLINK, \" HYPERLINK \\\\l \\\"Bookmark1\\\" \\\\o \\\"Hyperlink Tip\\\" \", \"Link to Bookmark1\", hyperlink);\n Assert.assertEquals(\"Bookmark1\", hyperlink.getSubAddress());\n Assert.assertEquals(\"Hyperlink Tip\", hyperlink.getScreenTip());\n Assert.assertTrue(IterableUtils.matchesAny(doc.getRange().getBookmarks(), b -> b.getName().contains(\"Bookmark1\")));\n }",
"org.hl7.fhir.DocumentReference addNewDocumentReference();",
"@Test\n public void fieldSetRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Name bookmarked text with a SET field. \n // This field refers to the \"bookmark\" not a bookmark structure that appears within the text, but a named variable.\n FieldSet fieldSet = (FieldSet) builder.insertField(FieldType.FIELD_SET, false);\n fieldSet.setBookmarkName(\"MyBookmark\");\n fieldSet.setBookmarkText(\"Hello world!\");\n fieldSet.update();\n\n Assert.assertEquals(\" SET MyBookmark \\\"Hello world!\\\"\", fieldSet.getFieldCode());\n\n // Refer to the bookmark by name in a REF field and display its contents.\n FieldRef fieldRef = (FieldRef) builder.insertField(FieldType.FIELD_REF, true);\n fieldRef.setBookmarkName(\"MyBookmark\");\n fieldRef.update();\n\n Assert.assertEquals(\" REF MyBookmark\", fieldRef.getFieldCode());\n Assert.assertEquals(\"Hello world!\", fieldRef.getResult());\n\n doc.save(getArtifactsDir() + \"Field.SET.REF.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.SET.REF.docx\");\n\n Assert.assertEquals(\"Hello world!\", doc.getRange().getBookmarks().get(0).getText());\n\n fieldSet = (FieldSet) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_SET, \" SET MyBookmark \\\"Hello world!\\\"\", \"Hello world!\", fieldSet);\n Assert.assertEquals(\"MyBookmark\", fieldSet.getBookmarkName());\n Assert.assertEquals(\"Hello world!\", fieldSet.getBookmarkText());\n\n TestUtil.verifyField(FieldType.FIELD_REF, \" REF MyBookmark\", \"Hello world!\", fieldRef);\n Assert.assertEquals(\"Hello world!\", fieldRef.getResult());\n }",
"private void insertAndNameBookmark(final DocumentBuilder builder, final String bookmarkName) {\n builder.startBookmark(bookmarkName);\n builder.writeln(MessageFormat.format(\"Contents of bookmark \\\"{0}\\\".\", bookmarkName));\n builder.endBookmark(bookmarkName);\n }",
"private void insertBookmarkWithFootnote(final DocumentBuilder builder, final String bookmarkName,\n final String bookmarkText, final String footnoteText) {\n builder.startBookmark(bookmarkName);\n builder.write(bookmarkText);\n builder.insertFootnote(FootnoteType.FOOTNOTE, footnoteText);\n builder.endBookmark(bookmarkName);\n builder.writeln();\n }",
"org.hl7.fhir.String addNewReference();",
"@Test\n public void moveToBookmark() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // A valid bookmark consists of a BookmarkStart node, a BookmarkEnd node with a\n // matching bookmark name somewhere afterward, and contents enclosed by those nodes.\n builder.startBookmark(\"MyBookmark\");\n builder.write(\"Hello world! \");\n builder.endBookmark(\"MyBookmark\");\n\n // There are 4 ways of moving a document builder's cursor to a bookmark.\n // If we are between the BookmarkStart and BookmarkEnd nodes, the cursor will be inside the bookmark.\n // This means that any text added by the builder will become a part of the bookmark.\n // 1 - Outside of the bookmark, in front of the BookmarkStart node:\n Assert.assertTrue(builder.moveToBookmark(\"MyBookmark\", true, false));\n builder.write(\"1. \");\n\n Assert.assertEquals(\"Hello world! \", doc.getRange().getBookmarks().get(\"MyBookmark\").getText());\n Assert.assertEquals(\"1. Hello world!\", doc.getText().trim());\n\n // 2 - Inside the bookmark, right after the BookmarkStart node:\n Assert.assertTrue(builder.moveToBookmark(\"MyBookmark\", true, true));\n builder.write(\"2. \");\n\n Assert.assertEquals(\"2. Hello world! \", doc.getRange().getBookmarks().get(\"MyBookmark\").getText());\n Assert.assertEquals(\"1. 2. Hello world!\", doc.getText().trim());\n\n // 2 - Inside the bookmark, right in front of the BookmarkEnd node:\n Assert.assertTrue(builder.moveToBookmark(\"MyBookmark\", false, false));\n builder.write(\"3. \");\n\n Assert.assertEquals(\"2. Hello world! 3. \", doc.getRange().getBookmarks().get(\"MyBookmark\").getText());\n Assert.assertEquals(\"1. 2. Hello world! 3.\", doc.getText().trim());\n\n // 4 - Outside of the bookmark, after the BookmarkEnd node:\n Assert.assertTrue(builder.moveToBookmark(\"MyBookmark\", false, true));\n builder.write(\"4.\");\n\n Assert.assertEquals(\"2. Hello world! 3. \", doc.getRange().getBookmarks().get(\"MyBookmark\").getText());\n Assert.assertEquals(\"1. 2. Hello world! 3. 4.\", doc.getText().trim());\n //ExEnd\n }",
"x0101.oecdStandardAuditFileTaxPT1.ReferencesDocument.References addNewReferences();",
"@Test\n public void insertHyperlink() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.write(\"For more information, please visit the \");\n\n // Insert a hyperlink and emphasize it with custom formatting.\n // The hyperlink will be a clickable piece of text which will take us to the location specified in the URL.\n builder.getFont().setColor(Color.BLUE);\n builder.getFont().setUnderline(Underline.SINGLE);\n builder.insertHyperlink(\"Google website\", \"https://www.google.com\", false);\n builder.getFont().clearFormatting();\n builder.writeln(\".\");\n\n // Ctrl + left clicking the link in the text in Microsoft Word will take us to the URL via a new web browser window.\n doc.save(getArtifactsDir() + \"DocumentBuilder.InsertHyperlink.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"DocumentBuilder.InsertHyperlink.docx\");\n\n FieldHyperlink hyperlink = (FieldHyperlink)doc.getRange().getFields().get(0);\n TestUtil.verifyWebResponseStatusCode(200, new URL(hyperlink.getAddress()));\n\n Run fieldContents = (Run) hyperlink.getStart().getNextSibling();\n\n Assert.assertEquals(Color.BLUE.getRGB(), fieldContents.getFont().getColor().getRGB());\n Assert.assertEquals(Underline.SINGLE, fieldContents.getFont().getUnderline());\n Assert.assertEquals(\"HYPERLINK \\\"https://www.google.com\\\"\", fieldContents.getText().trim());\n }",
"ReferenceEmbed createReferenceEmbed();",
"@Test\n public void fieldIndexPageRangeBookmark() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create an INDEX field which will display an entry for each XE field found in the document.\n // Each entry will display the XE field's Text property value on the left side,\n // and the number of the page that contains the XE field on the right.\n // The INDEX entry will collect all XE fields with matching values in the \"Text\" property\n // into one entry as opposed to making an entry for each XE field.\n FieldIndex index = (FieldIndex) builder.insertField(FieldType.FIELD_INDEX, true);\n\n // For INDEX entries that display page ranges, we can specify a separator string\n // which will appear between the number of the first page, and the number of the last.\n index.setPageNumberSeparator(\", on page(s) \");\n index.setPageRangeSeparator(\" to \");\n\n Assert.assertEquals(\" INDEX \\\\e \\\", on page(s) \\\" \\\\g \\\" to \\\"\", index.getFieldCode());\n\n builder.insertBreak(BreakType.PAGE_BREAK);\n FieldXE indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"My entry\");\n\n // If an XE field names a bookmark using the PageRangeBookmarkName property,\n // its INDEX entry will show the range of pages that the bookmark spans\n // instead of the number of the page that contains the XE field.\n indexEntry.setPageRangeBookmarkName(\"MyBookmark\");\n\n Assert.assertEquals(\" XE \\\"My entry\\\" \\\\r MyBookmark\", indexEntry.getFieldCode());\n Assert.assertEquals(indexEntry.getPageRangeBookmarkName(), \"MyBookmark\");\n\n // Insert a bookmark that starts on page 3 and ends on page 5.\n // The INDEX entry for the XE field that references this bookmark will display this page range.\n // In our table, the INDEX entry will display \"My entry, on page(s) 3 to 5\".\n builder.insertBreak(BreakType.PAGE_BREAK);\n builder.startBookmark(\"MyBookmark\");\n builder.write(\"Start of MyBookmark\");\n builder.insertBreak(BreakType.PAGE_BREAK);\n builder.insertBreak(BreakType.PAGE_BREAK);\n builder.write(\"End of MyBookmark\");\n builder.endBookmark(\"MyBookmark\");\n\n doc.updatePageLayout();\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.INDEX.XE.PageRangeBookmark.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.INDEX.XE.PageRangeBookmark.docx\");\n index = (FieldIndex) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX, \" INDEX \\\\e \\\", on page(s) \\\" \\\\g \\\" to \\\"\", \"My entry, on page(s) 3 to 5\\r\", index);\n Assert.assertEquals(\", on page(s) \", index.getPageNumberSeparator());\n Assert.assertEquals(\" to \", index.getPageRangeSeparator());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE \\\"My entry\\\" \\\\r MyBookmark\", \"\", indexEntry);\n Assert.assertEquals(\"My entry\", indexEntry.getText());\n Assert.assertEquals(\"MyBookmark\", indexEntry.getPageRangeBookmarkName());\n }",
"private void insertFieldLink(final DocumentBuilder builder, final int insertLinkedObjectAs,\n final String progId, final String sourceFullName, final String sourceItem,\n final boolean shouldAutoUpdate) throws Exception {\n FieldLink field = (FieldLink) builder.insertField(FieldType.FIELD_LINK, true);\n\n switch (insertLinkedObjectAs) {\n case InsertLinkedObjectAs.TEXT:\n field.setInsertAsText(true);\n break;\n case InsertLinkedObjectAs.UNICODE:\n field.setInsertAsUnicode(true);\n break;\n case InsertLinkedObjectAs.HTML:\n field.setInsertAsHtml(true);\n break;\n case InsertLinkedObjectAs.RTF:\n field.setInsertAsRtf(true);\n break;\n case InsertLinkedObjectAs.PICTURE:\n field.setInsertAsPicture(true);\n break;\n case InsertLinkedObjectAs.BITMAP:\n field.setInsertAsBitmap(true);\n break;\n }\n\n field.setAutoUpdate(shouldAutoUpdate);\n field.setProgId(progId);\n field.setSourceFullName(sourceFullName);\n field.setSourceItem(sourceItem);\n\n builder.writeln(\"\\n\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Merges current input buffers, outputing them into a single sorted run on disk. Returns a File object representing this sorted run stored on disk | private File merge() {
File nextSortedRun = new File(this.getUniqueFileName());
TupleWriter outBuffer = new TupleWriter(nextSortedRun.getName(), this.batchSize);
if (!outBuffer.open()) {
System.err.println("Sort: Error in opening file for writing");
System.exit(1);
}
while (this.inBuffers.size() > 0) {
int indexMin = 0;
Tuple minTuple = null;
int indexCurr = 0;
// iterate through buffers and find the smallest value in order given by getOrder()
while (indexCurr < this.inBuffers.size()) {
Tuple tup = this.inBuffers.get(indexCurr).peek();
if (tup == null) {
this.inBuffers.remove(indexCurr).close();
// do not increment indexCurr
continue;
} else if (minTuple == null || getOrder().compare(tup, minTuple) < 0) {
minTuple = tup;
indexMin = indexCurr;
}
indexCurr++;
}
// inBuffers may have become empty within the loop
if (this.inBuffers.isEmpty()) {
break;
}
outBuffer.next(this.inBuffers.get(indexMin).next());
}
outBuffer.close();
this.inBuffers.clear();
return nextSortedRun;
} | [
"private void sortAndWrite(ArrayList<Batch> buffers) {\n File sortedRun = new File(this.getUniqueFileName());\n sortedRuns.add(sortedRun);\n TupleWriter out = new TupleWriter(sortedRun.getName(), this.batchSize);\n if (!out.open()) {\n System.err.println(\"Sort: Error in writing file\");\n System.exit(1);\n }\n buffers.stream()\n .flatMap(buff -> buff.stream())\n .sorted(getOrder())\n .forEachOrdered(tup -> out.next(tup)); // stream output into file single batch at a time\n out.close();\n }",
"private void generateSortedRuns() {\n Batch inbatch;\n ArrayList<Batch> buffers = new ArrayList<>(this.numBuff);\n while ((inbatch = this.base.next()) != null) {\n buffers.add(inbatch);\n if (buffers.size() == this.numBuff) {\n sortAndWrite(buffers);\n buffers.clear();\n }\n }\n // sort and write out any remaining buffers \n if (buffers.size() > 0) {\n sortAndWrite(buffers);\n }\n this.base.close();\n }",
"private void mergeSortedRuns() {\n int numOfUsableBuffers = numBuff - 1;\n int readInCurrentRun = 0;\n int writeOutRunCounter = 0;\n\n while (runNum != 1) { // last run not completed yet\n\n /** Merge all runs in current pass */\n while (readInCurrentRun != runNum) {\n for (int i = 0; i < numOfUsableBuffers; i++) {\n if (!readSortedRun(readInCurrentRun)) {\n break;\n }\n readInCurrentRun++;\n }\n sortMainMem();\n writeSortedRuns(writeOutRunCounter);\n writeOutRunCounter++;\n }\n readInCurrentRun = 0;\n writeOutRunCounter = 0;\n\n /** Number of sorted runs left */\n runNum = (int) Math.ceil((double) runNum / numOfUsableBuffers);\n close();\n }\n }",
"private void writeSortedRuns(int currentRun) {\n if (!phaseTwoFlag)\n fileStack.push(currentRun);\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName + currentRun));\n\n /** There are still tuples in main memory */\n while (!mainMemTuples.isEmpty()) {\n Batch b = new Batch(batchSize);\n\n /** Buffer is not full, add tuples to the batch */\n while (!b.isFull()) {\n if (mainMemTuples.isEmpty()) { // All tuples have been put into a batch\n break;\n }\n\n// // phase 1 write attributes that we are interested into file\n// if (isDistinct && !phaseTwoFlag) {\n// Tuple outTuple;\n// Vector present = new Vector();\n//\n// // Add join Index at first element\n// present.add(mainMemTuples.get(0).dataAt(joinIndex));\n//\n// // Projection index\n// for (int i = 0; i < table.getSchema().getAttList().size(); i++) {\n// for (int j = 0; j < projectList.size(); j++) {\n// if (table.getSchema().getAttribute(i).equals((Attribute) projectList.get(j))) {\n// if (joinIndex != i) {// add those indexes that are projected except join index\n// present.add(mainMemTuples.get(0).dataAt(i));\n// attributeList.add(mainMemTuples.get(0).dataAt(i));\n// }\n// }\n// }\n// }\n//\n// outTuple = new Tuple(present);\n// b.add(outTuple);\n// mainMemTuples.remove(0);\n// } else {\n b.add(mainMemTuples.get(0));\n mainMemTuples.remove(0);\n// }\n }\n out.writeObject(b);\n }\n out.close();\n } catch (IOException io) {\n System.err.println(\"ExternalSort: error in writing file\");\n System.exit(1);\n }\n }",
"public File sort(String path){\n try {\r\n File file = new File(path);\r\n BufferedReader readStream = new BufferedReader(new FileReader(file));\r\n String currentLine;\r\n int index = 0;\r\n int fileNumber = 1;\r\n while((currentLine = readStream.readLine()) != null){\r\n tempArray[index++] = currentLine;//read next line into the temporary array\r\n if(index >= limit){//check whether the number of lines stored in the temp has reached the maximum allowed\r\n Arrays.sort(tempArray);//sort tempArray\r\n Writer writeStream = null;//create a writer\r\n String currentFileName = \"temp\" + fileNumber + \".txt\";//this name is passed to the buffered writer\r\n writeStream = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(currentFileName)));//create a new temporary file to be written to\r\n fileArrayList.add(new File(currentFileName));//add file to list\r\n for(String line : tempArray){// write the lines currently stored in the array into the newly created file\r\n writeStream.write(line);\r\n writeStream.write(\"\\n\");\r\n }\r\n writeStream.close();//close the output stream\r\n index = 0;//reset\r\n ++fileNumber;//increment the file number so that the next block of lines is written to a different file name\r\n }\r\n\r\n\r\n }\r\n readStream.close();\r\n }catch(Exception e){\r\n System.out.println(e.getMessage() + \" occurred during split\");\r\n }\r\n\r\n //merge temporary files and write to output file\r\n try {\r\n System.out.println(Arrays.toString(fileArrayList.toArray()));\r\n fileArrayList.trimToSize();\r\n int sortedFileID = 0;//used to differentiate between temporary files while merging\r\n int head = 0;//used to access file names stored in array list from the start\r\n int tail = fileArrayList.size() - 1;//used to access file names stored in array list from the end\r\n while(fileArrayList.size() > 1) {\r\n sortedFileID++;//increment to create a unique file name\r\n String mergedFileName = \"sorted\"+sortedFileID+\".txt\";\r\n File firstFile = fileArrayList.get(head);\r\n File secondFile = fileArrayList.get(tail);\r\n System.out.println(head + \" + \" + tail);\r\n //merge first and second\r\n File combinedFile = mergeFiles(firstFile, secondFile, mergedFileName);\r\n //delete both temporary files once they are merged\r\n\r\n if(!secondFile.delete()){\r\n System.out.println(\"warning file could not be deleted\");\r\n }\r\n if(!firstFile.delete()){\r\n System.out.println(\"warning file could not be deleted\");\r\n }\r\n fileArrayList.set(head, combinedFile);//replace the first of the two merged files with the new combined file\r\n fileArrayList.remove(tail);//remove the second of the two merged files\r\n head++;//increment both indexes one position closer towards the center of the array list\r\n tail--;\r\n if(head >= tail){//check if there are no remaining files between the head and the tail\r\n head = 0;//reset to the beginning of the array list\r\n fileArrayList.trimToSize();\r\n tail = fileArrayList.size() - 1;//reset to the end of the array list\r\n }\r\n }\r\n }catch(Exception e){\r\n System.out.println(e.getMessage() + \" occurred during merge\");\r\n }\r\n //after iteratively merging head and tail, and storing the result at the head index\r\n //the final resulting file that combines all temporary files will be stored at index (0)\r\n return fileArrayList.get(0);//return the final combined file\r\n }",
"private static Path mergeSortWord() throws IOException {\n // Create two files to save temp merge results turn by turn.\n // If in this turn, results are saved in file one,\n // then in next turn, words are read from file one to be merged, and the merge results are saved in file two.\n List<Path> tempSortResultPath = new ArrayList<>(2);\n boolean[] usedFirstPath = new boolean[1]; // Record which file was used to save results in last turn\n\n // Buffers to keep the two current comparing words and the last merged word\n TextArray currentText1 = new TextArray(WORD_LENGTH_THRESHOLD);\n TextArray currentText2 = new TextArray(WORD_LENGTH_THRESHOLD);\n TextArray previousText = new TextArray(WORD_LENGTH_THRESHOLD);\n\n // Go through files of the sorted words\n Files.walk(Paths.get(TEMP_SORTED_WORD_FOLDER)).filter(Files::isRegularFile).forEach(path -> {\n try {\n if (tempSortResultPath.isEmpty()) { // Take the words from the first encountered file as the initial merge results\n Path filePath1 = createTempFile(TEMP_FOLDER);\n Path filePath2 = createTempFile(TEMP_FOLDER);\n\n tempSortResultPath.add(filePath1);\n tempSortResultPath.add(filePath2);\n\n copyFile(path, filePath2);\n\n usedFirstPath[0] = false;\n } else {\n // Decide which file has the results from last turn and which file to save the results for current turn\n Path lastResultPath = tempSortResultPath.get(usedFirstPath[0] ? 0 : 1);\n Path outputPath = tempSortResultPath.get(usedFirstPath[0] ? 1 : 0);\n usedFirstPath[0] = !usedFirstPath[0];\n\n // Read the words from current encountered file\n // Read the previously merge sorted words\n try (FileWriter outputStream = new FileWriter(outputPath.toFile().getAbsolutePath(), false);\n FileReader fileStream1 = new FileReader(path.toFile().getAbsolutePath());\n FileReader fileStream2 = new FileReader(lastResultPath.toFile().getAbsolutePath())) {\n\n readText(fileStream1, currentText1);\n readText(fileStream2, currentText2);\n\n // Loop until words from both files are visited\n while (!currentText1.isNoChar() || !currentText2.isNoChar()) {\n if (currentText1.isNoChar()) { // If no more words from the first file, save all the rest words from the second file\n writeText(outputStream, currentText2, previousText);\n readText(fileStream2, currentText2);\n } else if (currentText2.isNoChar()) { // If no more words from the second file, save all the rest words from the first file\n writeText(outputStream, currentText1, previousText);\n readText(fileStream1, currentText1);\n } else {\n // Compare the words and save the smaller one\n int comp = currentText1.compareTo(currentText2);\n if (comp <= 0) {\n writeText(outputStream, currentText1, previousText);\n readText(fileStream1, currentText1);\n } else {\n writeText(outputStream, currentText2, previousText);\n readText(fileStream2, currentText2);\n }\n }\n\n }\n }\n }\n\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n });\n\n return tempSortResultPath.get(usedFirstPath[0] ? 0 : 1);\n }",
"public static void mergesort (File A) throws IOException {\r\n\t\tFile copy = File.createTempFile(\"Mergesort\", \".bin\");\r\n\t\tcopyFile (A, copy);\r\n\r\n\t\tRandomAccessFile src = new RandomAccessFile(A, \"rw\");\r\n\t\tRandomAccessFile dest = new RandomAccessFile(copy, \"rw\");\r\n\t\tFileChannel srcC = src.getChannel();\r\n\t\tFileChannel destC = dest.getChannel();\r\n\t\tMappedByteBuffer srcMap = srcC.map (FileChannel.MapMode.READ_WRITE, 0, src.length());\r\n\t\tMappedByteBuffer destMap = destC.map (FileChannel.MapMode.READ_WRITE, 0, dest.length());\r\n\r\n\t\tmergesort (destMap, srcMap, 0, (int) A.length());\r\n\t\t\r\n\t\tsrc.close();\r\n\t\tdest.close();\r\n\t\tcopy.deleteOnExit();\r\n\t}",
"public int generateSortedRuns() {\n Batch in = base.next();\n\n int numOfRuns = 0;\n while (in != null) {\n // All the tuples to be sorted for this run\n ArrayList<Tuple> tuples = new ArrayList<>();\n\n for (int i = 0; i < numBuff && in != null; i++) {\n tuples.addAll(in.getAllTuples());\n if (i != numBuff - 1) {\n in = base.next();\n }\n }\n\n tuples.sort(this::isEqual);\n\n // phase 1 is the 0th pass\n String fileName = fileName(0, numOfRuns);\n try {\n ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream(fileName));\n for (Tuple tuple: tuples) {\n stream.writeObject(tuple);\n }\n stream.close();\n } catch (IOException e) {\n System.err.println(\"external sort: cannot write sorted runs\");\n System.exit(1);\n }\n\n in = base.next();\n numOfRuns += 1;\n }\n return numOfRuns;\n }",
"private void externalSort() throws IOException{\n\t\t/*\n\t\t * Pass 0: internal sort\n\t\t */\n\t\t// Read in from child;Write out runs of B pages;\n\t\t\n\t\tint numPerRun = B * 4096 / (schema.size() * 4); // # of tuples per run given in Pass0\n\t\tboolean buildMore;\n\t\tint numRuns = 0;\n\t\tif(sortAttrsIndex == null) {\n\t\t\tthis.buildAttrsIndex();\n\t\t}\n\t\texComparator myComp = new exComparator();\n\t\tinternal = new PriorityQueue<Tuple>(myComp);\n\t\tdo {\n\t\t\tbuildMore = this.buildHeap(numPerRun);\n\t\t\tnumRuns++;\n\t\t\t\n\t\t\t// write out the (numRuns)th run\n\t\t\tTupleWriter TW;\n\t\t\tif(!buildMore && numRuns == 1) {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"sortResult\"));\n\t\t\t} else {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"0_\" + numRuns));\n\t\t\t}\n\t\t\twhile(!internal.isEmpty()) {\n//\t\t\t\tSystem.out.println(internal.peek().data);\n\t\t\t\tTW.setNextTuple(internal.poll()); \n\t\t\t}\n\t\t\t// leftover, fill with zero and write out\n\t\t\tif(!TW.bufferEmpty()) { // TW would never know the end of writing\n\t\t\t\tTW.fillFlush(); \n\t\t\t}\n\t\t\tTW.close();\n\t\t\t// internal must be empty until this point\n\t\t}while (buildMore);\n\t\t\n\t\t/*\n\t\t * Pass 1 and any following\n\t\t */\n\t\tif(numRuns > 1) { // if numRuns generated in Pass 0 is 1 already, file sorted already, no need to merge\n\t\t\tthis.merge(numRuns, myComp);\n\t\t}\n\t\t\n\t}",
"public void writeToBuff(){\n for(Map.Entry item: SortMap.entrySet()){\n ByteBuffer buff = (ByteBuffer) item.getValue();\n if(buffer.capacity() > buffer.position()+ buff.capacity()){\n // if data fit in buffer\n buff.rewind();\n buffer.put(buff.array());\n }else{\n // when full add buffer to output queue to be collected later and create new buffer\n /*byte fillValue1 = buffer.get(buffer.position()-2); // Not a good fix for fill the gaps\n byte fillValue2 = buffer.get(buffer.position()-1);\n while(buffer.position() < buffer.capacity()){\n buffer.put(fillValue1);\n buffer.put(fillValue2);\n }*/\n if(buffer.position()%2 != 0){\n byte fillValue = buffer.get(buffer.position()-2);\n buffer.put(fillValue);\n }\n int size = buffer.position();\n ByteBuffer newBuff = ByteBuffer.allocate(size);//ByteBuffer.wrap(buffer.array());\n newBuff.put(buffer.array(),0, size);\n outQueue.add(newBuff); // (this.deepCopy(buffer));\n buffer.clear();\n buffer = ByteBuffer.allocate(capacity);\n buffer.put(buff.array());\n }\n }\n SortMap.clear();\n }",
"private void writeOutData() {\n if (valuesHeld == 0) {\n return;\n }\n int batchSize = batchItemSizePerEmmit == null ? DEFAULT_SORT_BATCH_PER_EMIT_BYTES\n : batchItemSizePerEmmit;\n ByteBuffer currentKey = getKeyValueFromPointer(0).getKey();\n List<ByteBuffer> currentValues = new ArrayList<>();\n int totalSize = 0;\n\n for (int i = 0; i < valuesHeld; i++) {\n KeyValue<ByteBuffer, ByteBuffer> keyValue = getKeyValueFromPointer(i);\n int compare = LexicographicalComparator.compareBuffers(keyValue.getKey(), currentKey);\n\n if (compare == 0) {\n if (!currentValues.isEmpty() && totalSize >= batchSize) {\n emitCurrentOrLeftover(currentKey, currentValues);\n totalSize = 0;\n }\n currentValues.add(keyValue.getValue());\n totalSize += Math.max(1, keyValue.getValue().remaining());\n } else if (compare > 0) {\n emitCurrentOrLeftover(currentKey, currentValues);\n currentKey = keyValue.getKey();\n currentValues.add(keyValue.getValue());\n totalSize = Math.max(1, keyValue.getValue().remaining());\n } else {\n throw new IllegalStateException(\"Sort failed to properly order output\");\n }\n }\n emitCurrentOrLeftover(currentKey, currentValues);\n if (leftover != null) {\n emit(leftover.getKey(), leftover.getValue());\n }\n }",
"protected void mergeFiles(ArrayList<File> sortedFiles, File outputFile){\n\t\t// TODO: put some code here\n\t\t\t// Create a new file merged \n\t\t\tFile merged = new File(\"sorting_run//merged.tempfile\");\n\t\t\t//iterate through the list of sorted files, \"moreChunks\" from sort method to be specific\n\t\t\tfor (int i = 1; i < sortedFiles.size(); i++){\n\t\t\t\t// have to check first case to give merge a value, which is why its last in parameter\n\t\t\t\t// of the merge call in the if statement\n\t\t\t\tif (i == 1){\n\t\t\t\t\t// can't forget about the 0th index, which is why is get(i -1)\n\t\t\t\t\t// then merge it with the first index to give merge a value (list of strings)\n\t\t\t\t\tmerge(sortedFiles.get(i - 1), sortedFiles.get(i), merged);\n\t\t\t\t}else{\n\t\t\t\t\t// use recursion to have merged being merged with the sorted values\n\t\t\t\t\t// to become merged after the two files have been merged\n\t\t\t\t\tmerge(merged, sortedFiles.get(i), merged);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t// copy the created merged file to the output file\n\t\t\tcopyFile(merged, outputFile);\n\t}",
"void mergeOut() {\n String outputName = outputDir + flist.get(0).getName().substring(0,\n flist.get(0).getName().lastIndexOf(\".\"));\n if (outputType.equals(\"Text\")) {\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n for (int j = 1; j < images.length; j++) {\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n }\n bWriter.close();\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n bWriter.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n for (int j = 1; j < images.length; j++) {\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n try {\n document.save(outputName + \".pdf\");\n document.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }",
"protected synchronized Instance processBuffers() {\n if (m_firstBuffer.size() > 0 && m_secondBuffer.size() > 0) {\n Sorter.InstanceHolder firstH = m_firstBuffer.peek();\n Sorter.InstanceHolder secondH = m_secondBuffer.peek();\n Instance first = firstH.m_instance;\n Instance second = secondH.m_instance;\n\n int cmp = compare(first, second, firstH, secondH);\n if (cmp == 0) {\n // match on all keys - output joined instance\n Instance newInst =\n generateMergedInstance(m_firstBuffer.remove(),\n m_secondBuffer.remove());\n\n return newInst;\n } else if (cmp < 0) {\n // second is ahead of first - discard rows from first\n do {\n m_firstBuffer.remove();\n if (m_firstBuffer.size() > 0) {\n firstH = m_firstBuffer.peek();\n first = firstH.m_instance;\n cmp = compare(first, second, firstH, secondH);\n }\n } while (cmp < 0 && m_firstBuffer.size() > 0);\n } else {\n // first is ahead of second - discard rows from second\n do {\n m_secondBuffer.remove();\n if (m_secondBuffer.size() > 0) {\n secondH = m_secondBuffer.peek();\n second = secondH.m_instance;\n cmp = compare(first, second, firstH, secondH);\n }\n } while (cmp > 0 && m_secondBuffer.size() > 0);\n }\n }\n\n return null;\n }",
"private BufferedWriter openOutputFile() {\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(oFile);\n } catch (FileNotFoundException e) {\n System.out\n .println(\"Cannot open output SAM file \" + oFile.getName());\n e.printStackTrace();\n }\n return new BufferedWriter(new OutputStreamWriter(fos));\n }",
"private static void merge() throws Exception{\n\t\tSystem.out.println(\"Merging the fragmented index for each file.\");\n\t\tFile fragmentedDirFile = new File( fragmentedDir );\n\n\t\tFile mergedIndex = new File(baseDir + \"\\\\FragmentedIndex\\\\merged\");\n\t\tmergedIndex.mkdirs();\n\t\tHashMap<String, PrintWriter> mergeWriters = new HashMap<String, PrintWriter>();\n\n\t\tFile[] fragmentedFiles = fragmentedDirFile.listFiles();\n\n\t\tfor(File file : fragmentedFiles) {\n\n\t\t\tif(file.isDirectory()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Merge: Processing file \" + file.getAbsolutePath());\n\n\t\t\t// For each file, collect the terms and the posting list associated with each term\n\t\t\tHashMap<String, HashSet<String>> postingLists = new HashMap<String, HashSet<String>>();\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\n\t\t\tString line;\n\n\t\t\tlong count = 0;\n\n\t\t\twhile ( (line = br.readLine()) != null ) {\n\n\t\t\t\tHashSet<String> postingList = null;\n\n\t\t\t\t// Each line will contain the term and the page id\n\t\t\t\tString[] elems = line.split(\"\\t\");\n\n\t\t\t\tif(postingLists.containsKey(elems[0])) {\n\t\t\t\t\tpostingList = postingLists.get(elems[0]);\n\n\t\t\t\t} else {\n\t\t\t\t\tpostingList = new HashSet<String>();\n\t\t\t\t\tpostingLists.put(elems[0], postingList);\n\t\t\t\t}\n\n\t\t\t\tpostingList.add(elems[1]);\n\n\t\t\t\tcount ++;\n\t\t\t\tif(count % 10000 == 0) {\n\t\t\t\t\tSystem.out.println(\"Processed. \" + count);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\tSystem.out.println(\"Done creating posting list for this file.\");\n\n\t\t\t// Now write the merged to another file.\n\t\t\tcount = 0;\n\n\t\t\tSystem.out.println(\"Writing merged lists to file.\");\n\n\t\t\tfor(String term : postingLists.keySet()) {\n\n\t\t\t\tHashSet<String> postingList = postingLists.get(term);\n\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\t\tsb.append(term);\n\t\t\t\tsb.append(\"\\t\");\n\n\t\t\t\tfor(String item : postingList) {\n\n\t\t\t\t\tsb.append(item);\n\t\t\t\t\tsb.append(\"\\t\");\n\t\t\t\t}\n\n\t\t\t\tPrintWriter pw = null;\n\n\t\t\t\tString fileId = getValidFilename( term.substring(0, 2) );\n\n\t\t\t\tif(mergeWriters.containsKey( fileId )) {\n\t\t\t\t\tpw = mergeWriters.get( fileId );\n\t\t\t\t} else {\n\t\t\t\t\tpw = new PrintWriter(mergedIndex + \"\\\\\" +fileId + \".txt\");\n\t\t\t\t\tmergeWriters.put(fileId, pw);\n\t\t\t\t}\n\n\t\t\t\tpw.println(sb.toString());\n\t\t\t\tpw.flush();\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Done writing merged lists to file(s)\");\t\n\n\t\t}\n\n\t\t// Cleanup MergeWriters\n\t\tfor(String c : mergeWriters.keySet()) {\n\n\t\t\tPrintWriter pw = mergeWriters.get(c);\n\t\t\tpw.close();\t\t\t\t\t\n\t\t}\n\n\t}",
"private void mergeSort(int amtFiles, String outputFile) throws IOException {\n // Base case\n if (amtFiles > 1) {\n for (int i = 1; i <= amtFiles; i += 2) {\n\n if (i <= amtFiles - 1) {\n try (Scanner file1 = new Scanner(Paths.get(outputFile + i + \".txt\"));\n Scanner file2 = new Scanner(Paths.get(outputFile + (i + 1) + \".txt\"));\n BufferedWriter writer = Files.newBufferedWriter(Paths.get(outputFile + \".txt\"),\n StandardCharsets.UTF_8);) {\n merge(file1, file2, writer);\n\n } // close the Scanner and BufferedWriter\n // Replace a file\n Files.move(Paths.get(outputFile + \".txt\"), Paths.get(outputFile + ((i + 1) / 2) + \".txt\"),\n StandardCopyOption.REPLACE_EXISTING);\n } else {\n Files.move(Paths.get(outputFile + i + \".txt\"), Paths.get(outputFile + ((i + 1) / 2) + \".txt\"),\n StandardCopyOption.REPLACE_EXISTING);\n } // end of if\n } // end of for\n\n amtFiles = (amtFiles / 2) + (amtFiles % 2);\n mergeSort(amtFiles, outputFile);\n } // end of if\n }",
"private static void stepSorter(String file, DataOutputStream d, int size) throws FileNotFoundException, IOException {\n\t\tDataInputStream inputA = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tDataInputStream inputB = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tint numDivisions = (int) Math.ceil(fileSize/((double) size));\n\t\tinputB.skip(size*4);\n\t\tfor (int j = 0; j < numDivisions/2; j++){\t\n\t\t\tint counterA = size;\n\t\t\tint counterB = Math.min(fileSize - j*size*2 - size, size);\n\t\t\tInteger a = inputA.readInt();\n\t\t\tInteger b = inputB.readInt();\n\t\t\twhile (counterA > 0 && counterB > 0){\n\t\t\t\tif (a < b){\n\t\t\t\t\td.writeInt(a);\n\t\t\t\t\tif (counterA > 1){\n\t\t\t\t\t\ta = inputA.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterA--;\n\t\t\t\t} else {\n\t\t\t\t\td.writeInt(b);\n\t\t\t\t\tif (counterB > 1){\n\t\t\t\t\t\tb = inputB.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterB--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counterA == 0){\n\t\t\t\td.writeInt(b);\n\t\t\t\tcounterB--;\n\t\t\t\tfor (int i =0; i < counterB; i++){\n\t\t\t\t\td.writeInt(inputB.readInt());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\td.writeInt(a);\n\t\t\t\tcounterA--;\n\t\t\t\tfor (int i =0; i < counterA; i++){\n\t\t\t\t\td.writeInt(inputA.readInt());\n\t\t\t\t}\n\t\t\t}\n\t\t\tinputA.skip(size*4);\n\t\t\tinputB.skip(size*4);\n\t\t}\n\t\t\n\t\t//copy the excess\n\t\twhile (inputA.available()>0){\n\t\t\td.writeInt(inputA.readInt());\n\t\t}\n\t\tinputA.close();\n\t\tinputB.close();\n\t\td.flush();\n\t}",
"public MergeSorter(Point[] pts) {\n\t\tsuper(pts);\n\t\talgorithm = \"merge sort\";\n\t\toutputFileName = \"merge.txt\";\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ \brief Match an argument. /template TEMPLATE | @Converted(kind = Converted.Kind.MANUAL_SEMANTIC,
source = "${LLVM_SRC}/llvm/include/llvm/IR/PatternMatch.h", line = 1183,
FQN="llvm::PatternMatch::m_Argument", NM="Tpl__ZN4llvm12PatternMatch10m_ArgumentERKT0_",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/Transforms/Scalar/EarlyCSE.cpp -nm=Tpl__ZN4llvm12PatternMatch10m_ArgumentERKT0_")
//</editor-fold>
public static /*inline*/ </*typename*/ Opnd_t extends match<Opnd_t>> Argument_match<Opnd_t> m_Argument(/*uint*/int OpI, final /*const*/ Opnd_t /*&*/ Op) {
return new Argument_match<Opnd_t>(OpI, Op);
} | [
"public static void main(String[] args) {\n System.out.println(new RegularExpressionMatching().isMatch(\"aab\", \"aab*a*\"));\n }",
"boolean match(String mnemonic, ParameterType[] parameters);",
"public static void main(String[] args)\n {\n try\n {\n System.out.println(\"Regular expression [\"+args[0]+\"]\");\n NameParser parser = new NameParser();\n StringMatcher matcher = parser.parse(args[0]);\n for (int index = 1; index < args.length; index++)\n {\n String string = args[index];\n System.out.print(\"String [\"+string+\"]\");\n System.out.println(\" -> match = \"+matcher.matches(args[index]));\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }",
"boolean match(String mnemonic, List<ParameterType>[] parameters);",
"public boolean matches(String arg) {\n switch (this.type) {\n case STRING:\n return true;\n case INTEGER:\n return arg.matches(\"\\\\d+\");\n default:\n /* The following default block can never be executed (because all Types are covered), but it must be\n * added, because otherwise I would get a VSCode error (saying that this method must return a boolean).\n */\n throw new IllegalArgumentException(\"The developer made a mistake. Please contact him to solve this\"\n + \" problem.\");\n }\n }",
"Object isMatch(Object arg, String wantedType);",
"@Test\n\tpublic void matchersArgument() {\n\t\tgiven(mockedList.get(anyInt())).willReturn(\"element\");\n\n\t\t// // stubbing using hamcrest (let's say isValid() returns your own\n\t\t// // hamcrest matcher):\n\t\t// given(mockedList.contains(argThat(new IsValidMatcherTest())))\n\t\t// .willReturn(\"element\");\n\n\t\t// following prints \"element\"\n\t\tSystem.out.println(mockedList.get(999));\n\n\t\t// you can also verify using an argument matcher\n\t\tverify(mockedList).get(anyInt());\n\t}",
"abstract void onPatternMatch();",
"public static void main(String[] args) {\n\t\tSystem.out.println(isMatch(\"daa\", \"d*ada*\"));\n\t\tSystem.out.println(isMatch(\"daa\", \"d*aa\"));\n\t}",
"String nextArgument();",
"String getArgument();",
"public static void main(String args[]){\n\tString w1= args[0];\n\tString w2 =args[1];\n\n\tSystem.out.println(isRegularExpression(w1,w2));\n\n }",
"@Test\n public void whenMatchworks_thenCorrect() {\n int input = 2;\n String output = Match(input).of(\n Case($(1), \"one\"),\n Case($(2), \"two\"),\n Case($(3), \"three\"),\n Case($(), \"?\"));\n\n assertEquals(\"two\", output);\n }",
"java.lang.String getArg();",
"Map match (String pattern, Map objectModel, Parameters parameters) throws PatternException;",
"@Override\n public boolean matches(User argument) {\n\n return argument != null && \"A\".equals(argument.getBloodType());\n }",
"public final void rewriteTemplateArg() throws RecognitionException {\n try {\n // ASTVerifier.g:415:2: ( ^( ARG ID ACTION ) )\n // ASTVerifier.g:415:6: ^( ARG ID ACTION )\n {\n match(input,ARG,FOLLOW_ARG_in_rewriteTemplateArg1926);\n\n match(input, Token.DOWN, null);\n match(input,ID,FOLLOW_ID_in_rewriteTemplateArg1928);\n match(input,ACTION,FOLLOW_ACTION_in_rewriteTemplateArg1930);\n\n match(input, Token.UP, null);\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"boolean match(String pattern, String path);",
"public static void main(String[] args) {\n String s = \"acdcb\", p = \"a*?b\";//true\n System.out.println(isMatch(s, p));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End of variables declaration//GENEND:variables Creates new form ControlsDialog | public ControlsDialog(java.awt.Frame parent) {
super(parent, true);
Preferences prefs = PrefsSingleton.get();
int[][] keys = {
{ prefs.getInt("keyUp1", KeyEvent.VK_UP), prefs.getInt("keyDown1", KeyEvent.VK_DOWN),
prefs.getInt("keyLeft1", KeyEvent.VK_LEFT), prefs.getInt("keyRight1", KeyEvent.VK_RIGHT),
prefs.getInt("keyA1", KeyEvent.VK_X), prefs.getInt("keyB1", KeyEvent.VK_Z),
prefs.getInt("keySelect1", KeyEvent.VK_SHIFT), prefs.getInt("keyStart1", KeyEvent.VK_ENTER), },
{ prefs.getInt("keyUp2", KeyEvent.VK_W), prefs.getInt("keyDown2", KeyEvent.VK_S),
prefs.getInt("keyLeft2", KeyEvent.VK_A), prefs.getInt("keyRight2", KeyEvent.VK_D),
prefs.getInt("keyA2", KeyEvent.VK_G), prefs.getInt("keyB2", KeyEvent.VK_F),
prefs.getInt("keySelect2", KeyEvent.VK_R), prefs.getInt("keyStart2", KeyEvent.VK_T) } };
this.keys = keys;
initComponents();
this.setTitle("jnesulator Controller Settings");
// set all of the text boxes
jField1Up.setText(KeyEvent.getKeyText(keys[0][0]));
jField1Down.setText(KeyEvent.getKeyText(keys[0][1]));
jField1Left.setText(KeyEvent.getKeyText(keys[0][2]));
jField1Right.setText(KeyEvent.getKeyText(keys[0][3]));
jField1A.setText(KeyEvent.getKeyText(keys[0][4]));
jField1B.setText(KeyEvent.getKeyText(keys[0][5]));
jField1Select.setText(KeyEvent.getKeyText(keys[0][6]));
jField1Start.setText(KeyEvent.getKeyText(keys[0][7]));
jField2Up.setText(KeyEvent.getKeyText(keys[1][0]));
jField2Down.setText(KeyEvent.getKeyText(keys[1][1]));
jField2Left.setText(KeyEvent.getKeyText(keys[1][2]));
jField2Right.setText(KeyEvent.getKeyText(keys[1][3]));
jField2A.setText(KeyEvent.getKeyText(keys[1][4]));
jField2B.setText(KeyEvent.getKeyText(keys[1][5]));
jField2Select.setText(KeyEvent.getKeyText(keys[1][6]));
jField2Start.setText(KeyEvent.getKeyText(keys[1][7]));
// set the controller text if we've detected some
String ctrl1 = prefs.get("controller0", "");
String ctrl2 = prefs.get("controller1", "");
if (!ctrl1.isEmpty()) {
jLabelCtrl1.setText(ctrl1);
}
if (!ctrl2.isEmpty()) {
jLabelCtrl2.setText(ctrl2);
}
jButtonOK.setActionCommand("OK");
jButtonCancel.setActionCommand("Cancel");
} | [
"static private boolean DIALOG_CreateControls32(int hwnd, int template, DLG_TEMPLATE dlgTemplate, int hInst, boolean unicode) {\n DialogInfo dlgInfo = WinWindow.get(hwnd).dlgInfo;\n DialogControlInfo info = new DialogControlInfo();\n int hwndCtrl = 0, hwndDefButton = 0;\n\n for (int i = 0; i < dlgTemplate.nbItems; i++) {\n template = DIALOG_GetControl32(template, info, dlgTemplate.dialogEx);\n info.style &= ~WS_POPUP;\n info.style |= WS_CHILD;\n\n if ((info.style & WS_BORDER) != 0) {\n info.style &= ~WS_BORDER;\n info.exStyle |= WS_EX_CLIENTEDGE;\n }\n if (unicode) {\n //hwndCtrl = CreateWindowExW( info.exStyle | WS_EX_NOPARENTNOTIFY, info.className, info.windowName, info.style | WS_CHILD,\n // info.x * dlgInfo.xBaseUnit / 4, info.y * dlgInfo.yBaseUnit / 8, info.cx * dlgInfo.xBaseUnit / 4, info.cy * dlgInfo.yBaseUnit / 8, hwnd, info.id, hInst, info.data);\n Win.panic(\"DIALOG_CreateControls32 unicode not implemented yet\");\n } else {\n int pClass = info.className;\n int caption = info.windowName;\n\n if (!IS_INTRESOURCE(pClass)) {\n pClass = StringUtil.allocateTempA(StringUtil.getStringW(pClass));\n }\n if (!IS_INTRESOURCE(caption)) {\n caption = StringUtil.allocateTempA(StringUtil.getStringW(caption));\n }\n hwndCtrl = WinWindow.CreateWindowExA(info.exStyle | WS_EX_NOPARENTNOTIFY, pClass, caption, info.style | WS_CHILD,\n info.x * dlgInfo.xBaseUnit / 4, info.y * dlgInfo.yBaseUnit / 8, info.cx * dlgInfo.xBaseUnit / 4, info.cy * dlgInfo.yBaseUnit / 8, hwnd, info.id, hInst, info.data);\n }\n if (hwndCtrl == 0) {\n log(\"DIALOG_CreateControls32 control creation failed\");\n if ((dlgTemplate.style & DS_NOFAILCREATE) != 0) continue;\n return false;\n }\n\n /* Send initialisation messages to the control */\n if (dlgInfo.hUserFont != 0)\n Message.SendMessageA(hwndCtrl, WM_SETFONT, dlgInfo.hUserFont, 0);\n if ((Message.SendMessageA(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON) != 0) {\n /* If there's already a default push-button, set it back */\n /* to normal and use this one instead. */\n if (hwndDefButton != 0)\n Message.SendMessageA(hwndDefButton, BM_SETSTYLE, BS_PUSHBUTTON, FALSE);\n hwndDefButton = hwndCtrl;\n dlgInfo.idResult = WinWindow.GetWindowLongA(hwndCtrl, GWLP_ID);\n }\n }\n return true;\n }",
"public void buildControlPanel() {\n controlPanel = new JPanel();\n controlPanel.setMinimumSize(new Dimension(dialogWidth, 40));\n controlPanel.setPreferredSize(new Dimension(dialogWidth, 40));\n\n controlPanel.add(finishButton);\n controlPanel.add(cancelButton);\n }",
"private void buildDialog()\n {\n setMinimumSize( new Dimension( 640, 480 ) );\n\n final JComponent settingsPane = createSettingsPane();\n final JComponent ioPane = createIOPane();\n\n final JPanel contentPane = new JPanel( new GridBagLayout() );\n contentPane.add( settingsPane, //\n new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.NONE, new Insets( 2,\n 0, 2, 0 ), 0, 0 ) );\n\n contentPane.add( ioPane, //\n new GridBagConstraints( 1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets( 2,\n 0, 2, 0 ), 0, 0 ) );\n\n final JButton closeButton = ToolUtils.createCloseButton();\n\n final JComponent buttonPane = SwingComponentUtils.createButtonPane( closeButton );\n\n SwingComponentUtils.setupDialogContentPane( this, contentPane, buttonPane );\n\n pack();\n }",
"public NewFieldJDialog() \r\n {\r\n initComponents();\r\n \r\n }",
"private void initPanel() {\r\n panel = new JDialog(mdiForm);\r\n panel.setTitle(\"Groups\");\r\n panel.setSize(325, 290);\r\n panel.getContentPane().add(groupsController.getControlledUI());\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n java.awt.Dimension dlgSize = panel.getSize();\r\n int x = screenSize.width/1 - ((dlgSize.width/1)+20);\r\n int y = screenSize.height/1 - ((dlgSize.height/1)+60);\r\n panel.setLocation(x, y);\r\n panel.setFocusable(false);\r\n panel.show();\r\n panel.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r\n panel.addWindowListener(new java.awt.event.WindowAdapter() {\r\n public void windowClosing(java.awt.event.WindowEvent event) {\r\n panel.dispose();\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n }\r\n });\r\n }",
"private JPanel createControlPanel() {\r\n JPanel controlPanel = new JPanel();\r\n\r\n controlPanel.setLayout(new FlowLayout());\r\n\r\n controlPanel.add(this.createResetButton());\r\n controlPanel.add(this.createCloseButton());\r\n\r\n return controlPanel;\r\n }",
"public void createControl(Composite parent) {\n Composite composite = new Composite(parent, SWT.NULL);\n composite.setFont(parent.getFont());\n \n initializeDialogUnits(parent);\n \n composite.setLayout(new GridLayout());\n composite.setLayoutData(new GridData(GridData.FILL_BOTH));\n \n createProjectNameGroup(composite);\n createLocationGroup(composite);\n createTargetGroup(composite);\n createPropertiesGroup(composite);\n \n // Update state the first time\n enableLocationWidgets();\n \n // Show description the first time\n setErrorMessage(null);\n setMessage(null);\n setControl(composite);\n \n // Validate. This will complain about the first empty field.\n setPageComplete(validatePage());\n }",
"public void addControls() {\n }",
"public JPanel getAdditionalControls() { return new JPanel(); }",
"public NewCharterPanelForm() {\n\t\tinitComponents();\n\t\trm = new RequestManager(new JFrame());\n\t\tcharter = new Charter();\n\t\tcontroller = new CharterControllerImpl();\n\t\tmanuallyIntComponents();\n\t}",
"ControlConstructList createControlConstructList();",
"@Override\n\t\tprotected Control createContents(Composite parent) {\n\t\t\t// create the top level composite for the dialog\n\t\t\tComposite composite = new Composite(parent, 0);\n\t\t\tGridLayout layout = new GridLayout();\n\t\t\tlayout.marginHeight = 0;\n\t\t\tlayout.marginWidth = 0;\n\t\t\tlayout.verticalSpacing = 0;\n\t\t\tcomposite.setLayout(layout);\n\t\t\tcomposite.setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\t\t// create the dialog area and button bar\n\t\t\tcontrolPadArea = createControlPadArea(composite);\n\t\t\tcreateLowerButtons(parent);\n\t\t\treturn composite;\n\t\t}",
"@Override\n public Control createDialogArea(Composite parent) {\n\n Composite top = (Composite) super.createDialogArea(parent);\n\n // Create the main layout for the shell.\n GridLayout mainLayout = new GridLayout(3, false);\n mainLayout.marginHeight = 3;\n mainLayout.marginWidth = 3;\n top.setLayout(mainLayout);\n\n // log.info(\"===right before calling initializeComponents(...) in TrackExtrapPointInfoDlg\");\n // Initialize all of the menus, controls, and layouts\n initializeComponents(top, parent);\n\n return top;\n }",
"@Override\n public ControlsFacade createControls() {\n \treturn new PassiveControls();\n }",
"public ChangeoverDialog() {\r\n\r\n\t\tKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);\r\n\r\n\t\t// Create current controller label\r\n\t\tcurrentControllerNameLabel = new JLabel();\r\n\t\tcurrentControllerNameLabel.setHorizontalAlignment(JLabel.CENTER);\r\n\r\n\t\t// Create list panel showing the icons of the modules.\r\n\t\tlistPanel = new JPanel();\r\n\t\tlistPanel.setBorder(UIManager.getBorder(UIConstants.CHANGEOVER_ICON_PANEL_BORDER));\r\n\t\tlistLayout = new GridBagLayout();\r\n\t\tlistPanel.setLayout(listLayout);\r\n\r\n\t\t// Set dialog properties\r\n\t\tsetSize(PANEL_DIMENSION);\r\n\t\tsetBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.BLACK), BorderFactory\r\n\t\t\t\t.createEmptyBorder(2, 2, 2, 2)));\r\n\r\n\t\t// Layout the dialog.\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(listPanel, BorderLayout.CENTER);\r\n\t\tadd(currentControllerNameLabel, BorderLayout.SOUTH);\r\n\r\n\t\tsetVisible(false);\r\n\t}",
"protected void createControls(){\n\t\tsetLayout(mainLayout);\n\t\tif (defaultSize == null){\n\t\t\tCombo tempCombo = new Combo(this, SWT.DROP_DOWN);\n\t\t\tdefaultSize = tempCombo.computeSize(SWT.DEFAULT, SWT.DEFAULT);\n\t\t\ttempCombo.dispose();\n\t\t}\n\t\tcontrolCombo = new JSSTableCombo(this, getStyle()){\n\t\t\t@Override\n\t\t\tprotected void setTableData(Table table) {\n\t\t\t\trefreshTableItems(table);\n\t\t\t}\n\t\t};\n\t\tdefaultBackgroundColor = ColorConstants.white;\n\t\t// tell the TableCombo that I want 2 blank columns auto sized.\n\t\tcontrolCombo.defineColumns(1);\n\t\t// set which column will be used for the selected item.\n\t\tcontrolCombo.setDisplayColumnIndex(0);\n\t\tcontrolCombo.setShowTableHeader(false);\n\t\tcontrolCombo.setShowColorWithinSelection(false);\n\t\tlayout();\n\t}",
"private void initControlList() {\n this.controlComboBox.addItem(CONTROL_PANELS);\n //this.controlComboBox.addItem(PEER_TEST_CONTROL);\n //this.controlComboBox.addItem(DISAGGREGATION_CONTROL);\n this.controlComboBox.addItem(AXIS_CONTROL);\n this.controlComboBox.addItem(DISTANCE_CONTROL);\n this.controlComboBox.addItem(SITES_OF_INTEREST_CONTROL);\n this.controlComboBox.addItem(CVM_CONTROL);\n this.controlComboBox.addItem(X_VALUES_CONTROL);\n }",
"public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"protected ControlPanel createControlPanel() {\n\t\tControlPanel cp = new ControlPanel(defaultFBWidth);\n\t\tadd(cp, BorderLayout.EAST);\n\t\treturn cp;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TRSDEAL_PROMISSORY_FX.OTHER_CY | public BigDecimal getOTHER_CY()
{
return OTHER_CY;
} | [
"public BigDecimal getOTHER_CY() {\r\n return OTHER_CY;\r\n }",
"public BigDecimal getACTUAL_PROMISSORY_OTHER_AMOUNT()\r\n {\r\n\treturn ACTUAL_PROMISSORY_OTHER_AMOUNT;\r\n }",
"public String getOtherCountry(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, OTHERCOUNTRY);\n\t}",
"public void setOTHER_CY(BigDecimal OTHER_CY) {\r\n this.OTHER_CY = OTHER_CY;\r\n }",
"public BigDecimal getOLD_PROMISSORY_OTHER_AMOUNT()\r\n {\r\n\treturn OLD_PROMISSORY_OTHER_AMOUNT;\r\n }",
"public void setOTHER_CY(BigDecimal OTHER_CY)\r\n {\r\n\tthis.OTHER_CY = OTHER_CY;\r\n }",
"public String getOtherCountryCurrency(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, OTHERCOUNTRYCURRENCY);\n\t}",
"public String getOtherCountry()\n\t{\n\t\treturn getOtherCountry( getSession().getSessionContext() );\n\t}",
"public BigDecimal getOTHERS() {\r\n return OTHERS;\r\n }",
"public BigDecimal getOTHER_CY_EXCH_RATE() {\r\n return OTHER_CY_EXCH_RATE;\r\n }",
"public BigDecimal getOTHER_DEAL_NO() {\r\n return OTHER_DEAL_NO;\r\n }",
"public BigDecimal getOTHER_UNIT()\r\n {\r\n\treturn OTHER_UNIT;\r\n }",
"public String getOtherCountryCurrency()\n\t{\n\t\treturn getOtherCountryCurrency( getSession().getSessionContext() );\n\t}",
"public void setACTUAL_PROMISSORY_OTHER_AMOUNT(BigDecimal ACTUAL_PROMISSORY_OTHER_AMOUNT)\r\n {\r\n\tthis.ACTUAL_PROMISSORY_OTHER_AMOUNT = ACTUAL_PROMISSORY_OTHER_AMOUNT;\r\n }",
"public BigDecimal getOTHER_AMOUNT()\r\n {\r\n\treturn OTHER_AMOUNT;\r\n }",
"org.hl7.fhir.Other getOther();",
"public void setOTHER_CY_EXCH_RATE(BigDecimal OTHER_CY_EXCH_RATE) {\r\n this.OTHER_CY_EXCH_RATE = OTHER_CY_EXCH_RATE;\r\n }",
"public BigDecimal getOTHER_CHARGES()\r\n {\r\n\treturn OTHER_CHARGES;\r\n }",
"public BigDecimal getOTHER_RATE()\r\n {\r\n\treturn OTHER_RATE;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the allEULAsAccepted property. | public Boolean isAllEULAsAccepted() {
return allEULAsAccepted;
} | [
"public static ArrayList<Errand> getUserAcceptedErrands() {\n return userAcceptedErrands;\n }",
"public Collection getAcceptedValues() {\n return acceptedLanguages;\n }",
"public boolean getAccepted_tou();",
"public Integer getEducateValidate() {\n return educateValidate;\n }",
"public String getIsPoaAccepted() {\n\t\treturn isPoaAccepted;\n\t}",
"public ArrayList<String> getAccepted_items() {\n\t\treturn accepted_items;\n\t}",
"public Boolean getEfaSupported() {\n return this.efaSupported;\n }",
"public String getEbaynoweligible() {\r\n return ebaynoweligible;\r\n }",
"public boolean getIncluyeInformeAvance() {\n\t\treturn this.adjuntos.size() > 0;\n\t}",
"public Integer getIsaccepted() {\n return isaccepted;\n }",
"public String getEligibleforpickupinstore() {\r\n return eligibleforpickupinstore;\r\n }",
"public List<String> getAccepted() {\n\t\treturn (!this.activeProfiles.isEmpty()) ? this.activeProfiles : this.defaultProfiles;\n\t}",
"public boolean getInsuranceOffered() {\n return insuranceOffered;\n }",
"boolean getAccepted();",
"public boolean accepted() {\n return accepted;\n }",
"String getAccepted_meet() {\n return accepted_meet;\n }",
"public boolean getAcceptsAudio() {\n\n return m_acceptsAudio;\n }",
"public boolean isAccepted_tou();",
"public String getUsosPotenciales() {\n return usosPotenciales;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sort opcodes in descending order of values | public HashMap<String, Integer> sort(HashMap<String, Integer> num_opcode) {
LinkedHashMap<String, Integer> sortedMap = new LinkedHashMap<>();
num_opcode.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))
.forEachOrdered(x -> sortedMap.put(x.getKey(), x.getValue()));
return sortedMap;
} | [
"void sortProcesses() {\n\t\tfor (int i = 0; i < noOfProcess; i++) {\n\t\t\tfor (int j = 0; j < noOfProcess - i - 1; j++) {\n\t\t\t\tif (input[j][0] > input[j + 1][0]) {\n\t\t\t\t\tswap(j, j + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void sortDescending()\n {\n cards.sort(new Card.CompareDescending());\n }",
"public void sortSymbolArray() {\n\t\t// sort symbols\n\t\tArrays.sort(symbols, new Comparator<Cell>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Cell c1, Cell c2) {\n\t\t\t\treturn c1.getLength() - c2.getLength();\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\tpublic int[] descending(int[] a) {\n\t\tint n = a.length;\n\t\t//loop 1 checks that the order is correct.\n\t\tfor (int y = 0; y < n; y++){\n\t\t\t//loop 2 compares and swaps pairs until it reaches the end.\n\t\t\tfor (int x = 0; x < n - 1; x++){\n\t\t\t\tif (a[x] < a[x + 1]){\n\t\t\t\t\tint temp = a[x];\n\t\t\t\t\ta[x] = a[x + 1];\n\t\t\t\t\ta[x + 1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}",
"@Test\n public void testRangeSortOrder() {\n final List<Long> values = Arrays.asList(10l, 0l, 15l, -275l, 982l, 430l, -1l, 1l, 82l);\n final List<byte[]> byteArrays = new ArrayList<>(values.size());\n for (final long value : values) {\n final byte[] bytes = getByteArray(value);\n byteArrays.add(bytes);\n }\n Collections.sort(values);\n Collections.sort(byteArrays, UnsignedBytes.lexicographicalComparator());\n final List<Long> convertedValues = new ArrayList<>(values.size());\n for (final byte[] bytes : byteArrays) {\n final long value = castToLong(strategy.getLexicoder().fromByteArray(bytes));\n convertedValues.add(value);\n }\n Assert.assertTrue(values.equals(convertedValues));\n }",
"public void descendingOrder() {\n this.data.sort(new Comparator<String>() {\n @Override\n public int compare(String o1, String o2) {\n int resultComp = number(o2, 1).compareTo(number(o1, 1));\n\n if (resultComp == 0) {\n if (number(o2, 2) == 0) {\n resultComp = 1;\n } else if (number(o1, 2) == 0) {\n resultComp = -1;\n } else {\n resultComp = number(o2, 2).compareTo(number(o1, 2));\n }\n }\n if (resultComp == 0) {\n if (number(o2, 3) == 0) {\n resultComp = 1;\n } else if (number(o1, 3) == 0) {\n resultComp = -1;\n } else {\n resultComp = number(o2, 3).compareTo(number(o1, 3));\n }\n }\n return resultComp;\n }\n });\n }",
"String sortedHeaderDescending();",
"public void sortBySize(){\n\t\tArrays.sort(this.portAssignments, new Comparator<BitVector>(){\n\t\t\t@Override\n\t\t\tpublic int compare(BitVector one, BitVector two){\n\t\t\t\tif(one.getNumber() < two.getNumber()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse if(one.getNumber() > two.getNumber()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}",
"public void sortingListByBalanceReverse ();",
"void sortV();",
"public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }",
"private void sort() {\n long templong = values[degree - 1];\n int tempint = frequency[degree - 1];\n for (int i = 0; i < degree; i++) {\n if (values[i] == -1) {\n values[i] = templong;\n frequency[i] = tempint;\n values[degree - 1] = -1;\n frequency[degree - 1] = -1;\n return;\n }\n if (values[i] > templong) {\n shift(i);\n values[i] = templong;\n frequency[i] = tempint;\n return;\n }\n }\n sortChildren();\n }",
"public static void sortInputBuiltIn() {\r\n\t\t\tEtmPoint point = monitor.createPoint(\"1.sortInputBuiltIn\");\r\n\r\n\t\t\tInput input = new Input(inputFile, BUFFERSIZE);\r\n\t\t\tList<Integer> integers = new ArrayList<Integer>();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tinput.open();\r\n\t\t\t\t\r\n\t\t\t\twhile (!input.end_of_stream()) {\r\n\t\t\t\t\t// read the value\r\n\t\t\t\t\tint value = input.read_next();\r\n\t\t\t\t\tintegers.add(value);\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\tCollections.sort(integers);\r\n\t\t\t\t\r\n\t\t\t\t// write the data to a file\r\n\t\t\t\tOutput output = new Output(outputFile, BUFFERSIZE);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (int i = 0; i < integers.size(); i++) {\r\n\t\t\t\t\t\toutput.write(integers.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t\toutput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\tSystem.out.println(\"File cannot be found.\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tpoint.collect();\r\n\t\t}",
"private void SortOrderEmptyPoolsArray(){\n final int size = mEmptyVBOPools.size();\n Pair<Integer, Integer> h, k;\n for(int i=0; i < size; ++i){\n h = mEmptyVBOPools.get(i);\n for(int j=0; j < size; ++j){\n k = mEmptyVBOPools.get(j);\n\n if(k.first > h.first)\n Collections.swap(mEmptyVBOPools, i, j);\n }\n }\n }",
"public void sort(){\r\n int swap_counter = -1;\r\n while (swap_counter != 0){\r\n swap_counter = 0;\r\n for (int i=0; i<count - 1; i++){\r\n if (vals.get(i).get_val() < vals.get(i+1).get_val()){\r\n //Swap nodes in LL\r\n Node nodei = vals.get(i);\r\n Node nodei1 = vals.get(i+1);\r\n int tmp = nodei.get_val();\r\n nodei.set_val(nodei1.get_val());\r\n nodei1.set_val(tmp);\r\n swap_counter++;\r\n //Swap nodes in AL\r\n String tmp_string = keys.get(i);\r\n keys.set(i, keys.get(i+1));\r\n keys.set(i+1, tmp_string);\r\n }\r\n }\r\n }\r\n }",
"public void sortHighscores(){\n Collections.sort(highscores);\n Collections.reverse(highscores);\n }",
"public void sort( List<Characteristic> s );",
"private void sortCoreTypes() {\n\t\tArrays.sort(coreBuiltin, (o1, o2) -> Long.compare(o1.id, o2.id));\n\t}",
"@Test\n public void testShellSort() throws Exception {\n int[] list = new int[]{49, 38, 65, 97, 76, 13, 27, 49, 55, 4};\n LogUtils.d(list);\n A_10_4_to_10_5.shellSort(list);\n LogUtils.d(list);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an Enumeration of the Cookies contained in the message. | public Enumeration getCookies (); | [
"public Enumeration getCookieNames ();",
"public List<Cookie> getCookies() {\n return header.getCookies();\n }",
"public List<Pair<String, String>> getCookies() {\n return cookies;\n }",
"public String[] getCookies() throws GGException{\n\t\tif(!authorized){\n\t\t\tthrow new GGException(GGErrorCodes.GG_UNABLE_TO_AUTH);\n\t\t}\n\t\treturn cookies;\n\t}",
"@NonNull Collection<HttpCookie> cookies();",
"public List<Cookie> getCookies() {\n return cookies == null ? Collections.EMPTY_LIST : cookies;\n }",
"public Cookie[] getCookieObjects() {\n Cookie[] result = request.getCookies();\n return result != null ? result : new Cookie[0];\n }",
"public List<HttpCookie> getCookies()\n\t{\n\t\tCookieStore cookieStore = getCookieStore();\n\t\tif(cookieStore == null)\n\t\t{\n\t\t\treturn new ArrayList<HttpCookie>();\n\t\t}\n\n\t\treturn cookieStore.getCookies();\n\t}",
"Cookie[] getCookies();",
"public RequestCookies getCookies() {\n return cookies;\n }",
"List<ICookie> getCookieJarContents();",
"public Map<String, String> getCookies() {\r\n return _cookies;\r\n }",
"public static synchronized Cookie[] getCookies(HttpSession session) {\n Vector cookiesPending = (Vector) getObject(session, COOKIES_PENDING);\n Vector cookiesSent = (Vector) getObject(session, COOKIES_SENT);\n\n // Determine the total number of cookies\n int cookieCount = 0;\n if (cookiesPending != null) {\n cookieCount = cookieCount + cookiesPending.size();\n }\n if (cookiesSent != null) {\n cookieCount = cookieCount + cookiesSent.size();\n }\n\n // Construct the list of cookies\n Cookie[] cookiesAll = null;\n if (cookieCount > 0) {\n cookiesAll = new Cookie[cookieCount];\n int cookieIdx = 0;\n\n // Get a combined list of all pending and sent cookies\n Cookie current = null;\n if (cookiesSent != null) {\n for (int s = 0; s < cookiesSent.size(); s++) {\n cookiesAll[cookieIdx] = (Cookie) cookiesSent.get(s);\n cookieIdx++;\n }\n }\n\n // Pending cookies will overwrite any existing cookies\n if (cookiesPending != null) {\n for (int p = 0; p < cookiesPending.size(); p++) {\n cookiesAll[cookieIdx] = (Cookie) cookiesPending.get(p);\n cookieIdx++;\n }\n }\n\n }\n\n\n return cookiesAll;\n }",
"public MultiValueMap<String, ResponseCookie> getResponseCookies() {\n\t\treturn new LinkedMultiValueMap<>(); // TODO: getResponseCookies\n\t}",
"public Series<Cookie> getCookies() {\n // Lazy initialization with double-check.\n Series<Cookie> c = this.cookies;\n if (c == null) {\n synchronized (this) {\n c = this.cookies;\n if (c == null) {\n this.cookies = c = new CookieSeries();\n }\n }\n }\n return c;\n }",
"@Override\r\n\tpublic Set<String> getCookieNames()\r\n\t{\r\n\t\treturn cookies.keySet();\r\n\t}",
"public List<String> getCookies(String name) {\r\n\t\tList<String> values = new ArrayList<>();\r\n\t\ttry {\r\n\t\t\tfor (ParameterizedHeaderValue h : mime.getHeadersValues(\"cookie\", ParameterizedHeaderValue.class)) {\r\n\t\t\t\tfor (Pair<String, String> p : h.getParameters())\r\n\t\t\t\t\tif (p.getValue1().equals(name))\r\n\t\t\t\t\t\tvalues.add(p.getValue2());\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// ignore\r\n\t\t}\r\n\t\treturn values;\r\n\t}",
"Set<NewCookie> getCookies();",
"public Set<String> getCookieNames();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the UID of the PingRequest that requested this Ping. | public UID getPingReqUID() { return pingReqUID; } | [
"public int getRequestID() {\n return requestID.getValue();\n }",
"public long getRequestid() {\n return requestid;\n }",
"public String getRequestorId() {\n String requestorId = _record.getSimpleField(LockInfoAttribute.REQUESTOR_ID.name());\n return requestorId == null ? LockConstants.DEFAULT_USER_ID : requestorId;\n }",
"public Integer getRequestID() {\n return this.requestID;\n }",
"public String getCurrentRequestId()\n\t{\n\t\tString reqID = (String) MDC.get(REQUEST_ID);\n\t\tif (reqID == null || \"\".equals(reqID))\n\t\t{\n\t\t\treqID = \"RID_\" + UUID.randomUUID().toString();\n\t\t\tMDC.put(REQUEST_ID, reqID);\n\t\t}\n\t\treturn reqID;\n\t}",
"public int getRequestID() {\n return requestID;\n }",
"public String getRequestCallId() {\n return getRequest().getCallId();\n }",
"public long getUID () {\n return ((long)id << PLOG_ID_UID_BITSHIFT) | timestamp;\n }",
"public String getUserIdFromRequest(String requestUri);",
"long getUid();",
"java.lang.String getUid();",
"int getUid();",
"@java.lang.Override\n public long getRequesterId() {\n return requesterId_;\n }",
"public String getUID() {\n return getDockerAddress();\n }",
"@java.lang.Override\n public long getRequesterId() {\n return requesterId_;\n }",
"@SuppressWarnings(\"cast\")\n private long getJobIdFromRequest()\n {\n PSRequest req = (PSRequest) PSRequestInfo\n .getRequestInfo(PSRequestInfo.KEY_PSREQUEST);\n HttpServletRequest request = (HttpServletRequest) req\n .getServletRequest();\n String jobIdString = request\n .getParameter(IPSHtmlParameters.PUBLISH_JOB_ID);\n \n if (!StringUtils.isBlank(jobIdString))\n { \n try\n {\n long jobId = Long.parseLong(jobIdString);\n return jobId > 0L ? jobId : -1L;\n }\n catch (Exception e)\n {\n }\n }\n return -1L;\n }",
"private String getUserId(HttpServletRequest request){\n final Claims claims = (Claims) request.getAttribute(\"claims\");\n if(claims == null) return null;\n return claims.getId();\n }",
"public String getpushRequestUUID() {\n\t\treturn this.pushRequestUUID;\n\t}",
"public Long getRequestingThreadId() {\n return requestingThreadId;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
store array as column in AL | @Override
public void storeArray(Float a[],int column)
{
for(int i=0;i<a.length;i++)
{
switch(column)
{
case 0:
attribute1.remove(i);
attribute1.add(i, a[i]);
break;
case 1:
attribute2.remove(i);
attribute2.add(i, a[i]);
break;
case 2:
attribute3.remove(i);
attribute3.add(i, a[i]);
break;
case 3:
attribute4.remove(i);
attribute4.add(i, a[i]);
break;
case 4:
attribute5.remove(i);
attribute5.add(i, a[i]);
break;
case 5:
attribute6.remove(i);
attribute6.add(i, a[i]);
break;
case 6:
attribute7.remove(i);
attribute7.add(i, a[i]);
break;
}
}
} | [
"protected abstract String[] assignTableElementsToArray();",
"public SettableAssign array(Expr array);",
"void setArray(int parameterIndex, Array x) throws SQLException;",
"public void loadData(Object[] columnData);",
"public void append(DataArray<?> array, ResultSet set, int column, int row, int type) throws SQLException {\n\t\tswitch (type) {\n\t\t\tcase Types.ARRAY:\n\t\t\t\tarray.setData(set.getArray(column).getArray(), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.DATALINK:\n\t\t\tcase Types.CHAR:\n\t\t\tcase Types.VARCHAR:\n\t\t\tcase Types.LONGVARCHAR:\n\t\t\tcase Types.NCHAR:\n\t\t\tcase Types.LONGNVARCHAR:\n\t\t\tcase Types.NVARCHAR:\n\t\t\t\tarray.setData(set.getString(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.BINARY:\n\t\t\tcase Types.VARBINARY:\n\t\t\tcase Types.LONGVARBINARY:\n\t\t\t\tarray.setData(set.getBytes(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.BIT:\n\t\t\tcase Types.BOOLEAN:\n\t\t\t\tarray.setData(set.getBoolean(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.TINYINT:\n\t\t\tcase Types.SMALLINT:\n\t\t\t\tarray.setData(set.getShort(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.INTEGER:\n\t\t\t\tarray.setData(set.getInt(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.BIGINT:\n\t\t\t\tarray.setData(set.getLong(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.DOUBLE:\n\t\t\t\tarray.setData(set.getDouble(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.FLOAT:\n\t\t\tcase Types.REAL:\n\t\t\t\tarray.setData(set.getFloat(column), row);\n\t\t\t\tbreak;\n\t\t\tcase Types.DECIMAL:\n\t\t\tcase Types.NUMERIC:\n\t\t\t\tif ( array.isIntegerNumber()) {\n\t\t\t\t\tarray.setData( set.getInt(column), row );\n\t\t\t\t} else {\n\t\t\t\t\tarray.setData( set.getDouble(column), row);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Types.DATE: {\n\t\t\t\tDate time = set.getDate(column);\n\t\t\t\tarray.setData( time.getTime(), row);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Types.TIME: {\n\t\t\t\tTime time = set.getTime(column);\n\t\t\t\tarray.setData( time.getTime(), row);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Types.TIMESTAMP: {\n\t\t\t\tTimestamp time = set.getTimestamp(column);\n\t\t\t\tarray.setData( time.getTime(), row);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Types.BLOB: {\n\t\t\t\tBlob blob = set.getBlob(column);\n\t\t\t\tif( blob != null ) {\n\t\t\t\t\t// Allocate a byte buffer\n\t\t\t\t\tint length = new Long( blob.length() ).intValue();\n\t\t\t\t\tByteBuffer buffer = ByteBuffer.allocate(length);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tblob.getBinaryStream().read(buffer.array());\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Unable to read clob from database!\", e);\n\t\t\t\t\t}\n\t\t\t\t\t// Get the blob's values\n\t\t\t\t\tbuffer.position(0);\n\t\t\t\t\tarray.setData( buffer.array(), row );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Types.NCLOB:\n\t\t\tcase Types.CLOB: {\n\t\t\t\t// Get the clob\n\t\t\t\tClob clob = set.getClob(column);\n\t\t\t\t\n\t\t\t\tif( clob != null ) {\n\t\t\t\t\t// Allocate a char buffer\n\t\t\t\t\tint length = new Long( clob.length() ).intValue();\n\t\t\t\t\tCharBuffer buffer = CharBuffer.allocate( length );\n\t\t\t\t\ttry {\n\t\t\t\t\t\tclob.getCharacterStream().read(buffer);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Unable to read clob from database!\", e);\n\t\t\t\t\t}\n\t\t\t\t\t// Get the clob's values\n\t\t\t\t\tbuffer.position(0);\n\t\t\t\t\tString values = buffer.toString();\t\n\t\t\t\t\tarray.setData( values, row );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Types.DISTINCT:\n\t\t\tcase Types.JAVA_OBJECT:\n\t\t\tcase Types.NULL:\n\t\t\tcase Types.OTHER:\n\t\t\tcase Types.REF:\n\t\t\tcase Types.ROWID:\n\t\t\tcase Types.SQLXML:\n\t\t\tcase Types.STRUCT:\n\t\t\t\tarray.setData(set.getObject(column), row);\n\t\t\t\tbreak;\n\t\t\tdefault: {\n\t\t\t\tObject value = set.getObject(column);\n\t\t\t\tarray.setData(value, row);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tarray.unlock();\n\t}",
"private void handleArrayElementFeature(XMLStreamReader reader, int attributeIndex, String attrName, String typeName, Type nodeType, Feature feature, ByteArrayOutputStream baos, TypeSystem ts) {\n final String[] valueSplit = reader.getAttributeValue(attributeIndex).split(\" \");\n writeInt(valueSplit.length, baos);\n Stream<String> arrayValues = Stream.of(valueSplit);\n // The list subtype names have already been resolved at the calling method\n String arrayTypeName = XmiSplitUtilities.isMultiValuedFeatureAttribute(nodeType, attrName) ? typeName : feature.getRange().getName();\n Type arrayType = ts.getType(arrayTypeName);\n if (ts.subsumes(ts.getType(CAS.TYPE_NAME_DOUBLE_ARRAY), arrayType) || ts.subsumes(ts.getType(CAS.TYPE_NAME_FLOAT_LIST), arrayType)) {\n arrayValues.mapToDouble(Double::valueOf).forEach(d -> writeDouble(d, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_SHORT_ARRAY), arrayType)) {\n arrayValues.mapToInt(Integer::valueOf).forEach(i -> writeShort((short) i, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_BYTE_ARRAY), arrayType)) {\n arrayValues.mapToInt(Integer::valueOf).forEach(baos::write);\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_BOOLEAN_ARRAY), arrayType)) {\n arrayValues.map(s -> Boolean.valueOf(s) ? 1 : 0).forEach(baos::write);\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_INTEGER_ARRAY), arrayType) || ts.subsumes(ts.getType(CAS.TYPE_NAME_INTEGER_LIST), arrayType)) {\n arrayValues.mapToInt(Integer::valueOf).forEach(i -> writeInt(i, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_LONG_ARRAY), arrayType)) {\n arrayValues.mapToLong(Long::valueOf).forEach(l -> writeLong(l, baos));\n } else if (ts.subsumes(ts.getType(CAS.TYPE_NAME_STRING_ARRAY), arrayType)) {\n // String arrays should only be embedded into the element if they are empty\n if (arrayValues.filter(Predicate.not(String::isBlank)).count() > 0)\n throw new IllegalArgumentException(\"Unhandled case of a StringArray that is embedded into the type element but is not empty for feature '\" + attrName + \"' of type '\" + typeName + \"'.\");\n // String of length 0\n writeInt(0, baos);\n } else throw new IllegalArgumentException(\"Unhandled feature '\" + attrName + \"' of type '\" + typeName + \"'.\");\n }",
"public void storeCustomChar(int[] columnArray, int mode){\n\t\t\n\t\t//function GS*\n\t\tprinter.write(0x1B);\n\t\tprinter.write(\"*\");\n\t\tprinter.write(mode);\n\t\tprinter.write( (mode==0 ||mode==1)? columnArray.length : columnArray.length / 3 );//number of cols\n\t\tprinter.write(0);\n\t\tfor (int i = 0 ; i < columnArray.length ; i++ )\n\t\t{\n\t\t\tprinter.write(columnArray[i]);\n\t\t}\n\t\t\n\t}",
"void column(int column, List<T> values);",
"public Expr array();",
"public static void columnasL(){\n for (int f=0; f<ma.length;f++){\n ma[0][f]=\"L\"; //fila 0 columna f\n ma[f][ma.length-1]=\"L\";\n ma[ma.length-1][f]=\"L\";\n ma[f][0]=\"L\";\n }\n }",
"public TArraysRecord() {\r\n\t\tsuper(org.jooq.mp.hsqldb.test.tables.TArrays.__T_ARRAYS);\r\n\t}",
"private Object wrapColumn(Object data, int size) throws TableException {\n\n checkFlatColumn(data, size);\n\n // Fold the 1D array into 2D array of subarrays for storing\n Class<?> type = data.getClass().getComponentType();\n int len = size == 0 ? nrow : Array.getLength(data) / size;\n\n // The parent array\n Object[] array = (Object[]) Array.newInstance(data.getClass(), len);\n\n int offset = 0;\n for (int i = 0; i < len; i++, offset += size) {\n // subarrays...\n array[i] = Array.newInstance(type, size);\n System.arraycopy(data, offset, array[i], 0, size);\n }\n\n return array;\n }",
"private static void createMultipleDataTypeArray() {\n Object[] array = {\"adas\", \"asd\", \"wer\", 1, 2.5};\n System.out.println(Arrays.toString(array));\n }",
"public void setCol(int col, Jewel[] arr)\n\t{\n\t\tfor(int i=0; i<grid.length; i++)\n\t\t{\t//copies given array values into selected column\n\t\t\tgrid[i][col] = arr[i];\n\t\t}\n\t}",
"protected void setArray(Expression expr)\n {\n setExpression(expr);\n }",
"public void agrega(Object [] fila){\n modelo.addRow(fila);\n\n }",
"ArrayType createArrayType();",
"double[][] toArray();",
"public static void addColumnElementsTo(CMLArray array, CMLElements<CMLTableRow> tableRows) {\r\n\t\tif (array.getSize() != tableRows.size()) {\r\n\t\t\tthrow new RuntimeException(\"inconsistent column size: \"\r\n\t\t\t\t\t+ array.getSize() + \" expected \" + tableRows.size());\r\n\t\t}\r\n\t\tString dataType = array.getDataType();\r\n\t\tif (XSD_DOUBLE.equals(dataType)) {\r\n\t\t\tdouble[] dd = array.getDoubles();\r\n\t\t\tint j = 0;\r\n\t\t\tfor (double d : dd) {\r\n\t\t\t\ttableRows.get(j++).appendChild(new CMLTableCell(d));\r\n\t\t\t}\r\n\t\t} else if (XSD_INTEGER.equals(dataType)) {\r\n\t\t\tint[] ii = array.getInts();\r\n\t\t\tint j = 0;\r\n\t\t\tfor (int i : ii) {\r\n\t\t\t\ttableRows.get(j++).appendChild(new CMLTableCell(i));\r\n\t\t\t}\r\n\t\t} else if (XSD_STRING.equals(dataType) || dataType == null) {\r\n\t\t\tString[] ss = array.getStrings();\r\n\t\t\tint j = 0;\r\n\t\t\tfor (String s : ss) {\r\n\t\t\t\ttableRows.get(j++).appendChild(new CMLTableCell(s));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new RuntimeException(\"unknown datatype: \" + dataType);\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Precondition: current speed is less than max speed Postcondition: Calculates and returns the amountOfFuel used by the boat using the formula: AmountOfFuel = motorEfficiency time (current speed)^2 | public double amountOfFuelUsed(double speed, double time)
{
if(speed>this.maxSpeed)
{
System.out.println("Current Speed cannot be greater than Max Speed!");
System.exit(0);
}
return this.efficiency*time*speed*speed;
} | [
"public double getCurrentFuel();",
"public abstract double maxSpeed();",
"public double calculateFuelConsumption()\n {\n return getFuelNeeds()/getDistance();\n }",
"public float getSpeed() {\n if ( MAXFUEL == 0 ) {\n throw new IllegalArgumentException(\"Zero division at SpaceStation.getSpeed(): MAXFUEL cannot be zero\");\n //return 0f;\n } else\n return fuelUnits / MAXFUEL;\n }",
"public double calcFuelEff() {\n\t\tdouble result=0;\n\t\tresult=getTankCapacity()*getCylinderCap()/100;\n\t\treturn result;\n\t}",
"double getSpeedLimit();",
"public void operateTheBoatForAmountOfTime(double time){// pass 1 as a time\n\t\t if(time > 0.0 && time <= 5.0 ){\n \tdouble fuelUsage = EfficiencyOfTheBoatMotor*currentSpeedOfTheBoat*currentSpeedOfTheBoat*time;\n \tfuelUsage = fuelUsage/10000;//since we have hp, and miles we have to divide by 10000 to get result in gallons \n double realTime; \n // Determine if we run out of fuel\n\t if(fuelUsage > amountOfFuelInTheTank){ \n\t realTime = time * (amountOfFuelInTheTank/fuelUsage); \n\t amountOfFuelInTheTank=0.0 ;\n\t }else{\n\t \tamountOfFuelInTheTank-=fuelUsage; \n\t realTime = time;\n\t }\n\t DistanceTraveled +=currentSpeedOfTheBoat * realTime; \n\t }\n\t }",
"private void calculateFuelFlow() {this.fuelFlow = (0.9+(throttle*14.8))*mixture;}",
"public double getSpeed() {\n\t\n\t\treturn maxSpeed;\n\t}",
"public double getMaxSpeed(){\n return maxSpeed;\n }",
"@Override\n\tpublic double calcSpendFuel() {\n\t\tdouble result = distance / (literFuel - fuelStart);\n\t\treturn result;\n\t}",
"public double getBurntFuelMass();",
"public double getMaxSpeed() { return this.mMaxSpeed; }",
"public double getMaxSpeed(){\r\n\t\treturn maxSpeed;\r\n\t}",
"public double getFuelEfficiency() {\n\t\treturn fuelEfficiency;\n\t}",
"float calFuelConsumption(float distance, float numLiters);",
"public int getMaxFuel() {\n return ship.getMAX_FUEL();\n }",
"public double FuelRemaining()\n {\n \treturn amountOfFuelInTheTank;\n }",
"public int getSpeedLimit()\r\n\t{\r\n\t\treturn speedLimit;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'authenResult' | @Test
public void authenResultTest() {
assertEquals("R", authResponse.getAuthenResult());
} | [
"@Test\n public void authorisedTest() {\n assertTrue(authResponse.isAuthorised());\n }",
"@Test\n public void authcodeTest() {\n assertEquals(\"12345\", authResponse.getAuthcode());\n }",
"@Test\n public void avsResultTest() {\n assertEquals(\"G\", authResponse.getAvsResult());\n }",
"@Test\n public void atrnTest() {\n assertEquals(\"atrn1\", authResponse.getAtrn());\n }",
"boolean hasAuthresponse();",
"private static boolean isLoginResult(final JsonObject result) {\n return result.has(Protocol.Field.TOKEN) && result.has(Protocol.Field.ID);\n }",
"@Test\n public void testAuthResponse() {\n assert authResponse != null;\n }",
"@Test\r\n public void testIsAuthenticated() {\r\n System.out.println(\"isAuthenticated\");\r\n User instance = testUser;\r\n boolean expResult = false; // haven't actually authenticated user\r\n boolean result = instance.isAuthenticated();\r\n assertEquals(expResult, result);\r\n }",
"@Test\n public void eciTest() {\n assertEquals(\"0\", authResponse.getEci());\n }",
"public Long getAuthenSuccess() {\r\n return authenSuccess;\r\n }",
"@Test\n public void atsdTest() {\n assertEquals(\"a\", authResponse.getAtsd());\n }",
"@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }",
"public void testValidAuth(){\n start();\n\n mChannel.receiveMessage(\"auth:user@example.com\");\n assertEquals(mAuthStatus, User.Status.AUTHORIZED);\n }",
"@Test\r\n public void testGetAuthorisationToken() throws Exception {\r\n LOG.info(\"getAuthorisationToken\");\r\n TokenAuthorisation result = tmdb.getAuthorisationToken();\r\n assertFalse(\"Token is null\", result == null);\r\n assertTrue(\"Token is not valid\", result.getSuccess());\r\n LOG.info(result.toString());\r\n }",
"@Test\n public void getAuthUser() {\n }",
"public void receiveResultauthSecureCust(\r\n com.solusoft.jpa.IDocServiceStub.AuthSecureCustResponse result\r\n ) {\r\n }",
"boolean getAuthenticated();",
"@Test\n public void testCheckAuth() throws Exception {\n SettingsManager manager = new SettingsManager();\n //manager.username = \"testUsername\";\n //manager.password = \"testPassword\";\n Assert.assertTrue(\"Correct credentials should return true\", manager.checkAuth(\"testUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad username should return false\", manager.checkAuth(\"badUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad password should return false\", manager.checkAuth(\"testUsername\", \"wrongPassword\"));\n }",
"public void receiveResultAuthenticate(\r\n net.exchangenetwork.www.schema.node._2.AuthenticateResponse result\r\n ) {\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the specified registry key. If the key already exists, the function opens it. Note that key names are not case sensitive. | LONG RegCreateKeyEx(
/* _In_ */HKEY hKey,
/* _In_ */String lpSubKey,
/* _Reserved_ */DWORD Reserved,
/* _In_opt_ */String lpClass,
/* _In_ */DWORD dwOptions,
/* _In_ *//* REGSAM */WORD samDesired,
/* _In_opt_ */SECURITY_ATTRIBUTES lpSecurityAttributes,
/* _Out_ */HKEY phkResult,
/* _Out_opt_ */DWORD lpdwDisposition); | [
"E create(K key) throws CreateException;",
"public static CreateResult createKey(int hKey, String subKey) throws RegistryException {\n // retval[NATIVE_HANDLE] will be the Native Handle of the registry entry\n // retval[ERROR_CODE] will be the error code; ERROR_SUCCESS means success\n // retval[DISPOSITION] will indicate whether key was created or existing key was opened */\n int[] retval = null;\n try {\n initialize();\n byte[] barr = stringToNullTerminated(subKey);\n retval = (int[])windowsRegCreateKeyEx.invoke(systemRoot, new Object[] { hKey, barr });\n if (retval.length!=3) throw new AssertionError(\"Invalid array length.\");\n if (retval[ERROR_CODE]!=ERROR_SUCCESS) throw newRegistryException(retval[ERROR_CODE], hKey, subKey);\n }\n catch(NoSuchMethodException nsme) {\n throw new RegistryException(\"Exception thrown in createKey\", nsme);\n }\n catch(IllegalArgumentException iae) {\n throw new RegistryException(\"Exception thrown in createKey\", iae);\n }\n catch(IllegalAccessException iae2) {\n throw new RegistryException(\"Exception thrown in createKey\", iae2);\n }\n catch(InvocationTargetException ite) {\n throw new RegistryException(\"Exception thrown in createKey\", ite);\n }\n return new CreateResult(retval[NATIVE_HANDLE], retval[DISPOSITION]==REG_CREATED_NEW_KEY);\n }",
"@Override\r\n public void createPath(\r\n String rootKey,\r\n String keyPath ) {\r\n\r\n log.info( \"Create regestry key path: \" + getDescription( rootKey, keyPath, null ) );\r\n\r\n int index = keyPath.lastIndexOf( \"\\\\\" );\r\n if( index < 1 ) {\r\n throw new RegistryOperationsException( \"Invalid path '\" + keyPath + \"'\" );\r\n }\r\n\r\n String keyParentPath = keyPath.substring( 0, index );\r\n String keyName = keyPath.substring( index + 1 );\r\n\r\n checkPathDoesNotExist( rootKey, keyPath );\r\n\r\n try {\r\n Advapi32Util.registryCreateKey( getHKey( rootKey ), keyParentPath, keyName );\r\n } catch( RuntimeException re ) {\r\n throw new RegistryOperationsException( \"Couldn't create registry key. \"\r\n + getDescription( rootKey, keyPath, keyName ), re );\r\n }\r\n }",
"T create(K key);",
"LONG RegOpenKey(/* _In_ */HKEY hKey, /* _In_opt_ */String lpSubKey, /* _Out_ */HKEYByReference phkResult);",
"Key createKey();",
"public static base_response create(nitro_service client, sslfipskey resource) throws Exception {\n\t\tsslfipskey createresource = new sslfipskey();\n\t\tcreateresource.fipskeyname = resource.fipskeyname;\n\t\tcreateresource.modulus = resource.modulus;\n\t\tcreateresource.exponent = resource.exponent;\n\t\treturn createresource.perform_operation(client,\"create\");\n\t}",
"public void createKey() {\n // The enrolling flow for fingerprint. This is where you ask the user to set up fingerprint\n // for your flow. Use of keys is necessary if you need to know if the set of\n // enrolled fingerprints has changed.\n try {\n mKeyStore.load(null);\n // Set the alias of the entry in Android KeyStore where the key will appear\n // and the constrains (purposes) in the constructor of the Builder\n mKeyGenerator.init(new KeyGenParameterSpec.Builder(KEY_NAME,\n KeyProperties.PURPOSE_ENCRYPT |\n KeyProperties.PURPOSE_DECRYPT)\n .setBlockModes(KeyProperties.BLOCK_MODE_CBC)\n // Require the user to authenticate with a fingerprint to authorize every use\n // of the key\n .setUserAuthenticationRequired(true)\n .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_PKCS7)\n .build());\n mKeyGenerator.generateKey();\n } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException\n | CertificateException | IOException e) {\n throw new RuntimeException(e);\n }\n }",
"boolean canCreate(K key);",
"void createNode(NodeKey key);",
"public NodeKey createNodeKey();",
"private @NotNull Key<String> createPathKey (@NotNull String pathKey)\n {\n Key<String> key = pathKeys.get (pathKey);\n if (key == null)\n {\n key = new Key<String> (pathKey);\n pathKeys.put (pathKey, key);\n }\n return key;\n }",
"public Key<T> createKey(String name) {\n return Key.create(ancestor(), typeClass, name);\n }",
"public final create_key_return create_key() throws RecognitionException {\n create_key_return retval = new create_key_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token SQL92_RESERVED_CREATE1=null;\n\n Object SQL92_RESERVED_CREATE1_tree=null;\n\n try {\n // main.java.PLSQLKeys.g:346:5: ( SQL92_RESERVED_CREATE )\n // main.java.PLSQLKeys.g:346:10: SQL92_RESERVED_CREATE\n {\n root_0 = (Object)adaptor.nil();\n\n\n SQL92_RESERVED_CREATE1=(Token)match(input,SQL92_RESERVED_CREATE,FOLLOW_SQL92_RESERVED_CREATE_in_create_key2266); \n SQL92_RESERVED_CREATE1_tree = \n (Object)adaptor.create(SQL92_RESERVED_CREATE1)\n ;\n adaptor.addChild(root_0, SQL92_RESERVED_CREATE1_tree);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public void createNewKey() throws Exception {\n try {\n currentKey.generateKey();\n } catch (Exception e) {\n throw new CryptoException(\"Create New Key in error\", e);\n }\n if (clearPassword != null) {\n setClearPassword(clearPassword);\n }\n }",
"public String generateNewKey();",
"KeyDescriptor createKeyDescriptor();",
"public RegistryEntry createEntry(String regName) {\r\n RegistryEntry entry = null;\r\n Registry registry = (Registry) registries.get(regName);\r\n\r\n if (registry != null) {\r\n entry = registry.createEntry();\r\n }\r\n\r\n return entry;\r\n }",
"GitHubDeployKey addDeployKey(String owner, String repo, String title, String key);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new String with all the vowels removed | public static String disemvowel(String originStr){
return originStr.replaceAll("[AaEeIiOoUu]","");
} | [
"public String removeAllVowels() {\n\t\t// remove the vowels\n\t\tString newWord;\n\t\tnewWord = \"\";\n\t\tchar hold;\n\t\tword = this.getOriginalString();\n\n\t\tfor (int idx = 0; idx < word.length(); idx++) {\n\t\t\thold = word.charAt(idx);\n\t\t\tif (hold != 'A' && hold != 'E' && hold != 'I' &&\n\t\t\t\t\thold != 'O' && hold != 'U' && hold != 'Y'\n\t\t\t\t\t&& hold != 'a' && hold != 'e' && hold != 'i'\n\t\t\t\t\t&& hold != '0' && hold != 'u' && hold != 'y') {\n\t\t\t\tnewWord = newWord + hold;\n\t\t\t}\n\t\t}\n\t\treturn newWord;\n\n\t}",
"public static String removeVowels(String s) {\n\n return s.replaceAll(\"[aeiouAEIOU]\", \"\");\n\n }",
"public static String stripVowels(String str)\r\n {\r\n String newStr = \"\";\r\n for (int i = 0; i < str.length(); i++)\r\n if (isVowell(str.charAt(i)) == false)\r\n newStr += str.charAt(i);\r\n return newStr;\r\n }",
"private static String vowelOnly(String name){\n return name.replaceAll(\"[^AEIOUaeiou]\",\"\");\n\n }",
"public String removeVowels(String s) {\n if (s == null) {\n return null;\n }\n String vowels = \"aeiou\";\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (vowels.indexOf(c) == -1) {\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"public String removeVowels(String str) {\n\t\t// base cases\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (str.equals(\"\")) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\t// recursive case\n\n\t\t// Make a recursive call to remove vowels from the\n\t\t// rest of the string.\n\t\tString removedFromRest = removeVowels(str.substring(1));\n\n\t\t// If the first character in str is a vowel,\n\t\t// we don't include it in the return value.\n\t\t// If it isn't a vowel, we do include it.\n\t\tchar first = Character.toLowerCase(str.charAt(0));\n\t\tif (first == 'a' || first == 'e' || first == 'i' || first == 'o'\n\t\t\t\t|| first == 'u') {\n\t\t\treturn removedFromRest;\n\t\t} else {\n\t\t\treturn first + removedFromRest;\n\t\t}\n\t}",
"public static String allVowels( String w ) {\n\n String ans = \"\"; //init return String\n\n for( int i = 0; i < w.length(); i++ ) {\n\n if ( isAVowel( w.substring(i,i+1) ) )\n ans += w.substring( i, i+1 ); //grow the return String\n }\n return ans;\n }",
"public static String allVowels( String w ) \n {\n\tString vowelsOnly = \"\";//holds possible vowels\n\tfor (int pos = 0; pos < w.length(); pos++){//loops through each char\n\n\t String it = w.substring(pos,pos+1);//holds the substr\n\t\n\t if (isAVowel(it)){//checks substrif vowel\n\t\tvowelsOnly += it;//increments vowelsOnly by 1\n\t }//end if statement\n\n\n\t}//end for loop\n\n\treturn vowelsOnly;\n }",
"public static String replaceVowels(String inputString) {\n\t\tString output = inputString;\n\t\toutput = output.replaceAll(\"[A]\", \"Z\");\n\t\toutput = output.replaceAll(\"a\",\"z\");\n\t\toutput = output.replaceAll(\"E\", \"V\");\n\t\toutput = output.replaceAll(\"e\", \"v\");\n\t\toutput = output.replaceAll(\"I\",\"R\");\n\t\toutput = output.replaceAll(\"i\",\"r\");\n\t\toutput = output.replaceAll(\"O\", \"L\");\n\t\toutput = output.replaceAll(\"o\", \"l\");\n\t\toutput = output.replaceAll(\"U\", \"F\");\n\t\toutput = output.replaceAll(\"u\", \"f\");\n\t\treturn output;\n\t}",
"public static String allVowels( String w ) {\n\tString retStr = \"\";\n\tif (w != null) {\n\t for (int index = 0; index <= w.length(); index++) {\n\t\tif (index + 1 > w.length()) {\n\t\t return retStr; \n\t\t} \n\t\tString temp = w.substring(index, index + 1);\n\t\tif (isAVowel(temp)) retStr += temp;\n\t }\n\t}\n\treturn retStr;\n }",
"public static String vowelOnly(String input) {\n String vowel = \"aeiou\";\n StringBuilder sb = new StringBuilder();\n for (char c : input.toCharArray()) {\n if (vowel.contains(String.valueOf(c).toLowerCase())) {\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"public static String allVowels( String w ) \r\n {String vowels = \"\";\r\n\tfor (int x = 0; x < w.length(); x +=1) {\r\n\t if (isAVowel(w.substring(x,x+1))) {//if the letter is a vowel...\r\n\t\tvowels += w.substring(x,x+1); //add that vowel to the string\r\n\t }//end if\r\n\t}//end for\r\n\treturn vowels;\r\n }",
"public String reverseVowels(String s) {\n\t\tchar[] sArray = s.toCharArray();\n\t\tint begin = 0;\n\t\tint end = sArray.length - 1;\n\t\tchar temp;\n\t\tSet<Character> vowels = new HashSet<Character>();\n\t\tvowels.add('a');\n\t\tvowels.add('e');\n\t\tvowels.add('i');\n\t\tvowels.add('o');\n\t\tvowels.add('u');\n\t\tvowels.add('A');\n\t\tvowels.add('E');\n\t\tvowels.add('I');\n\t\tvowels.add('O');\n\t\tvowels.add('U');\t\t\n\t\twhile(end > begin)\n\t\t{\n\t\t\tif(vowels.contains(sArray[begin]) && vowels.contains(sArray[end]))\n\t\t\t{\n\t\t\t\ttemp = sArray[begin];\n\t\t\t\tsArray[begin] = sArray[end];\n\t\t\t\tsArray[end] = temp;\t\n\t\t\t\tbegin++;\n\t\t\t\tend--;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(!vowels.contains(sArray[begin])) begin++;\n\t\t\t\tif(!vowels.contains(sArray[end])) end--;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new String(sArray);\n\t}",
"public static List<String> noVowel(List<String> in) {\n return in.stream()\n .distinct() // Ensure elements are unique\n .filter(i -> !i.matches(\"[aeiou]\")) // Keep elements that don't contain a vowel\n .collect(Collectors.toList()); // Collect result\n }",
"public static String allVowels( String w ) {\r\n\tString out = \"\"; // this is the output string\r\n\tif (hasAVowel(w)) { // if w has at least one vowel, then initiate for loop, else return a message saying no vowels\r\n\t for (int count = 0; count < w.length(); count++) {\r\n\t\tif (isAVowel(w.substring(count, count + 1))) { // iterate each string character and tests if it's a vowel\r\n\t\t out += w.substring(count, count + 1); // if it is a vowel, add it to out\r\n\t\t} \r\n\t }\r\n\t} else {\r\n\t return \" \";\r\n\t} return out; // return result\r\n }",
"@Test\n public void example1(){\n String s=\"youwillwinthis\";\n String output=\"ywllwnths\";\n String s1 = removeVowels(s);\n Assert.assertEquals(s1,output);\n }",
"public static String removeVowelsSmart(String str, int maxCountToRemove) {\n StringBuilder result = new StringBuilder(str);\n\n int firstIndex = 1;\n int lastIndex = result.length() - 2;\n for (int i = lastIndex, removed = 0; i >= firstIndex && removed < maxCountToRemove; i--) {\n if (isVowel(result.charAt(i))) {\n result.deleteCharAt(i);\n removed++;\n }\n }\n\n return result.toString();\n }",
"public static String replaceVowelsWithOodle(String s)\n\t{\n\t\t//String to be returned\n\t\tString yeet = \"\";\n\t\t//loop to go through the String s\n\t\tfor(int i = 0; i<s.length(); i++)\n\t\t{\n\t\t\t//determine if charAt i is a vowel and add oodle or the String to yeet accordingly\n\t\t\tif(s.charAt(i)=='a' ||s.charAt(i)=='A' ||s.charAt(i)=='e' ||s.charAt(i)=='E' ||s.charAt(i)=='i' ||s.charAt(i)=='I' ||s.charAt(i)=='o' || s.charAt(i)=='O' ||s.charAt(i)=='u' || s.charAt(i)=='U')\n\t\t\t{\n\t\t\t\tyeet = yeet + \"oodle\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tyeet = yeet + s.charAt(i);\n\t\t\t}\n\t\t}\n\t\treturn yeet;\n\t}",
"public String replaceAllVowelsWith(char c) {\n\t\t// replace variables with the character provided for by the user\n\t\tString newWord;\n\t\tnewWord = \"\";\n\t\tchar hold;\n\t\tword = this.getOriginalString();\n\t\tnewWord = word;\n\n\t\tfor (int idx = 0; idx < newWord.length(); idx++) {\n\t\t\thold = newWord.charAt(idx);\n\t\t\tif (hold == 'A' || hold == 'E' || hold == 'I' ||\n\t\t\t\t\thold == 'O' || hold == 'U' || hold == 'Y'\n\t\t\t\t\t|| hold == 'a' || hold == 'e' || hold == 'i'\n\t\t\t\t\t|| hold == 'o' || hold == 'u' || hold == 'y') {\n\t\t\t\tnewWord = newWord.substring( 0, idx) + c \n\t\t\t\t\t\t+ newWord.substring(idx + 1, newWord.length());\n\t\t\t}\n\t\t}\n\n\t\treturn newWord;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a warning marker of specified dimension with an ! inside. The resulting image is a triangular icon with an exclamation mark. | public static BufferedImage getWarningMarker(int dimension,
ColorSchemeEnum colorSchemeEnum) {
// new RGB image with transparency channel
BufferedImage image = new BufferedImage(dimension, dimension,
BufferedImage.TYPE_INT_ARGB);
// create new graphics and set anti-aliasing hint
Graphics2D graphics = (Graphics2D) image.getGraphics().create();
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
// create path for the outline
GeneralPath iconOutlinePath = new GeneralPath();
float d = dimension - 1;
float d32 = (float) (0.1 * d * Math.sqrt(3.0) / 2.0);
float height = (float) (1.1 * d * Math.sqrt(3.0) / 2.0);
iconOutlinePath.moveTo(0.45f * d, d32);
iconOutlinePath.quadTo(0.5f * d, 0, 0.55f * d, d32);
iconOutlinePath.lineTo(0.95f * d, height - d32);
iconOutlinePath.quadTo(d, height, 0.9f * d, height);
iconOutlinePath.lineTo(0.1f * d, height);
iconOutlinePath.quadTo(0, height, 0.05f * d, height - d32);
iconOutlinePath.lineTo(0.45f * d, d32);
// fill inside
graphics.setColor(colorSchemeEnum.getColorScheme().getMidColor());
graphics.fill(iconOutlinePath);
// create spot in the upper-left corner using temporary graphics
// with clip set to the icon outline
GradientPaint spot = new GradientPaint(0, 0, new Color(255, 255, 255,
200), dimension, dimension, new Color(255, 255, 255, 0));
Graphics2D tempGraphics = (Graphics2D) graphics.create();
tempGraphics.setPaint(spot);
tempGraphics.setClip(iconOutlinePath);
tempGraphics.fillRect(0, 0, dimension, dimension);
tempGraphics.dispose();
// draw outline of the icon
graphics.setColor(colorSchemeEnum.getColorScheme().getUltraDarkColor());
graphics.draw(iconOutlinePath);
// draw the ! sign
float dimOuter = (float) (0.5f * Math.pow(dimension, 0.75));
float dimInner = (float) (0.28f * Math.pow(dimension, 0.75));
GeneralPath markerPath = new GeneralPath();
markerPath.moveTo((float) 0.5 * d, (float) 0.3 * height);
markerPath.lineTo((float) 0.5 * d, (float) 0.6 * height);
markerPath.moveTo((float) 0.5 * d, (float) 0.85 * height);
markerPath.lineTo((float) 0.5 * d, (float) 0.85 * height);
graphics.setStroke(new BasicStroke(dimOuter, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND));
graphics.setColor(colorSchemeEnum.getColorScheme().getUltraDarkColor());
graphics.draw(markerPath);
graphics.setStroke(new BasicStroke(dimInner, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND));
graphics.setColor(colorSchemeEnum.getColorScheme().getUltraLightColor()
.brighter());
graphics.draw(markerPath);
// dispose
graphics.dispose();
return image;
} | [
"public static Icon getWarningMarkerIcon(int dimension,\r\n\t\t\tColorSchemeEnum colorSchemeEnum) {\r\n\t\treturn new ImageIcon(getWarningMarker(dimension, colorSchemeEnum));\r\n\t}",
"public static void paintWarningIcon(float x, float y, float width, float height, float stroke, Graphics2D g) {\n final GeneralPath p0 = new GeneralPath();\n double border = 2;\n\t \t double sin = Math.sin(Math.toRadians(60.0)) * border;\n\t\t double cos = Math.cos(Math.toRadians(60.0)) * border;\n\t float x_left_corner = x-width;\n\t float y_corners = y+height;\n\t float x_right_corner = x+width;\n\t\t //Backup old graphics value\n\t\t Color oldColor = g.getColor();\n\t\t Stroke oldStroke = g.getStroke();\n\t\t Object oldRendering = g.getRenderingHint(RenderingHints.KEY_ANTIALIASING);\n\t\t Paint oldGradient = g.getPaint();\n\t\t Font oldFont = g.getFont();\n\t\t //Paint the warning\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setStroke(new BasicStroke(stroke));\n\t g.setColor(borderColor);\n\t p0.moveTo(x - cos, y + sin);\n\t p0.lineTo(x_left_corner+cos, y_corners-sin);\n\t p0.curveTo(x_left_corner+cos, y_corners-sin, x_left_corner , y_corners, x_left_corner+border, y_corners);\n\t p0.lineTo(x_right_corner-border, y_corners);\n\t p0.curveTo(x_right_corner-border, y_corners, x_right_corner, y_corners, x_right_corner-cos, y_corners-sin);\n\t p0.lineTo(x+cos, y + sin);\n\t p0.curveTo(x+cos, y + sin, x, y, x - cos, y + sin);\n\t p0.closePath();\n\t g.draw(p0);\n\t GradientPaint gp = new GradientPaint(x, y,startColor, x, y_corners,endColor);\n\t g.setPaint(gp);\n\t g.fill(p0);\n\t g.setColor(Color.black);\n\t g.setFont(messageFont);\n\t int fontWidth = g.getFontMetrics().stringWidth(\"!\");\n\t float x_middle = new Float(x-((fontWidth)/2)-0.3);\n\t g.drawString(\"!\", x_middle, y+stroke+messageFont.getSize() );\n\t //Restore old graphics value\n\t g.setFont(oldFont);\n\t g.setColor(oldColor);\n\t g.setStroke(oldStroke);\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,oldRendering);\n\t\t g.setPaint(oldGradient);\n }",
"public void showWarningImageIfAppropriate()\n\t{\n\t\twarningImage.setVisible(showWarningImage);\n\t}",
"public static void displayIllegalInfo(){\n Alert infoAlert = new Alert(AlertType.WARNING);\n infoAlert.setTitle(\"Move Information\");\n infoAlert.setContentText(\"Illegal move. Try another one!\");\n infoAlert.showAndWait();\n }",
"public static ImageIcon getNoCoverIcon(int size) {\n String constant = new StringBuilder(\"NO_COVER_\").append(size).append('X').append(size)\n .toString();\n return getIcon(JajukIcons.valueOf(constant));\n }",
"public String warnMessage();",
"public static BufferedImage getInfoMarker(int dimension,\r\n\t\t\tColorSchemeEnum colorSchemeEnum) {\r\n\t\t// new RGB image with transparency channel\r\n\t\tBufferedImage image = new BufferedImage(dimension, dimension,\r\n\t\t\t\tBufferedImage.TYPE_INT_ARGB);\r\n\r\n\t\t// create new graphics and set anti-aliasing hint\r\n\t\tGraphics2D graphics = (Graphics2D) image.getGraphics().create();\r\n\t\tgraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\r\n\r\n\t\t// create path for the outline\r\n\t\tGeneralPath iconOutlinePath = new GeneralPath();\r\n\t\tfloat d = dimension - 1;\r\n\t\tfloat d32 = (float) (0.1 * d * Math.sqrt(3.0) / 2.0);\r\n\t\tfloat height = (float) (1.1 * d * Math.sqrt(3.0) / 2.0);\r\n\t\ticonOutlinePath.moveTo(0.45f * d, d32);\r\n\t\ticonOutlinePath.quadTo(0.5f * d, 0, 0.55f * d, d32);\r\n\t\ticonOutlinePath.lineTo(0.95f * d, height - d32);\r\n\t\ticonOutlinePath.quadTo(d, height, 0.9f * d, height);\r\n\t\ticonOutlinePath.lineTo(0.1f * d, height);\r\n\t\ticonOutlinePath.quadTo(0, height, 0.05f * d, height - d32);\r\n\t\ticonOutlinePath.lineTo(0.45f * d, d32);\r\n\r\n\t\t// fill inside\r\n\t\tgraphics.setColor(colorSchemeEnum.getColorScheme().getMidColor());\r\n\t\tgraphics.fill(iconOutlinePath);\r\n\r\n\t\t// create spot in the upper-left corner using temporary graphics\r\n\t\t// with clip set to the icon outline\r\n\t\tGradientPaint spot = new GradientPaint(0, 0, new Color(255, 255, 255,\r\n\t\t\t\t200), dimension, dimension, new Color(255, 255, 255, 0));\r\n\t\tGraphics2D tempGraphics = (Graphics2D) graphics.create();\r\n\t\ttempGraphics.setPaint(spot);\r\n\t\ttempGraphics.setClip(iconOutlinePath);\r\n\t\ttempGraphics.fillRect(0, 0, dimension, dimension);\r\n\t\ttempGraphics.dispose();\r\n\r\n\t\t// draw outline of the icon\r\n\t\tgraphics.setColor(colorSchemeEnum.getColorScheme().getUltraDarkColor());\r\n\t\tgraphics.draw(iconOutlinePath);\r\n\r\n\t\t// draw the ! sign\r\n\t\tfloat dimOuter = (float) (0.5f * Math.pow(dimension, 0.75));\r\n\t\tfloat dimInner = (float) (0.28f * Math.pow(dimension, 0.75));\r\n\t\tGeneralPath markerPath = new GeneralPath();\r\n\t\tmarkerPath.moveTo((float) 0.5 * d, (float) 0.3 * height);\r\n\t\tmarkerPath.lineTo((float) 0.5 * d, (float) 0.3 * height);\r\n\t\tmarkerPath.moveTo((float) 0.5 * d, (float) 0.55 * height);\r\n\t\tmarkerPath.lineTo((float) 0.5 * d, (float) 0.8 * height);\r\n\t\tgraphics.setStroke(new BasicStroke(dimOuter, BasicStroke.CAP_ROUND,\r\n\t\t\t\tBasicStroke.JOIN_ROUND));\r\n\t\tgraphics.setColor(colorSchemeEnum.getColorScheme().getUltraDarkColor());\r\n\t\tgraphics.draw(markerPath);\r\n\t\tgraphics.setStroke(new BasicStroke(dimInner, BasicStroke.CAP_ROUND,\r\n\t\t\t\tBasicStroke.JOIN_ROUND));\r\n\t\tgraphics.setColor(colorSchemeEnum.getColorScheme().getUltraLightColor()\r\n\t\t\t\t.brighter());\r\n\t\tgraphics.draw(markerPath);\r\n\r\n\t\t// dispose\r\n\t\tgraphics.dispose();\r\n\t\treturn image;\r\n\t}",
"public void setWarningDecoration(IClientContext context, int index, String message);",
"public static void printExclamation(String name) {\n\t\t\tSystem.out.println(name + \"!\"); \n\t\t}",
"private void createPanelWarning() {\r\n\r\n this.warningPanel = new JPanel();\r\n this.warningPanel.setLayout(new GridBagLayout());\r\n // this.warningPanel.setBorder(BorderFactory.createTitledBorder(\"Warning\"));\r\n\r\n GridBagConstraints c = new GridBagConstraints();\r\n c.anchor = GridBagConstraints.WEST;\r\n c.fill = GridBagConstraints.NONE;\r\n c.gridheight = 1;\r\n c.gridwidth = 1;\r\n c.gridx = 0;\r\n c.gridy = 0;\r\n c.weightx = 0;\r\n c.weighty = 0;\r\n\r\n final JLabel warningNoCodeImg = new JLabelWarning();\r\n // warningNoCodeImg.setHorizontalAlignment(SwingConstants.RIGHT);\r\n this.warningPanel.add(warningNoCodeImg, c);\r\n final JLabel warningNoCodeText = new JLabel(\"Impossible de pointer tant que le numéro de relevé n'est pas saisi!\");\r\n c.gridx++;\r\n this.warningPanel.add(warningNoCodeText, c);\r\n }",
"protected String getNatureWarningMessageKey() {\r\n \t\treturn \"SharableEditors.natureWarning.message\";\r\n \t}",
"static void drawActivityMessageOnException(Scene container, Pane activity, String message) {\n Label warning = new Label(message);\n activity.getChildren().add(warning);\n\n warning.getStyleClass().add(\"warning\");\n warning.setPrefWidth(MARGIN * 25);\n\n AnchorPane.setTopAnchor(warning, MARGIN * 5);\n AnchorPane.setLeftAnchor(warning, (activity.getPrefWidth() - warning.getPrefWidth())/2);\n\n container.widthProperty().addListener((observable, oldValue, newValue) ->\n AnchorPane.setLeftAnchor(\n warning, (\n AnchorPane.getLeftAnchor(warning) + ((Double) newValue - (Double) oldValue) / 2\n )\n ));\n }",
"public static synchronized Icon getIllegalIcon ()\n\t{\n\t\tif (_illegalIcon == null)\n\t\t{\n\t\t\t_illegalIcon = getIcon(\n\t\t\t\t\"org/openide/resources/propertysheet/invalid.gif\", // NOI18N\n\t\t\t\tMappingContextFactory.getDefault().getString(\"ICON_illegal\"));\n\t\t}\n\n\t\treturn _illegalIcon;\n\t}",
"public void warning(String message, BufferedImage image) {\r\n\t\treport(WARNING, message, image);\r\n\t}",
"String helpMessageIcon();",
"java.lang.String getNoAdditionIcon();",
"String getWarning();",
"void warningBox(String title, String message);",
"private void drawWarningCircles() {\n\t\tfor (Aircraft plane : planesTooNear) {\n\t\t\tVector midPoint = position.add(plane.position).scaleBy(0.5);\n\t\t\tdouble radius = position.sub(midPoint).magnitude() * 2;\n\t\t\tgraphics.setColour(128, 0, 0);\n\t\t\tgraphics.circle(false, midPoint.x(), midPoint.y(), radius);\n\t\t}\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__TimeSignature__Group__0__Impl" $ANTLR start "rule__TimeSignature__Group__1" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2649:1: rule__TimeSignature__Group__1 : rule__TimeSignature__Group__1__Impl rule__TimeSignature__Group__2 ; | public final void rule__TimeSignature__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2653:1: ( rule__TimeSignature__Group__1__Impl rule__TimeSignature__Group__2 )
// ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2654:2: rule__TimeSignature__Group__1__Impl rule__TimeSignature__Group__2
{
pushFollow(FOLLOW_rule__TimeSignature__Group__1__Impl_in_rule__TimeSignature__Group__15401);
rule__TimeSignature__Group__1__Impl();
state._fsp--;
pushFollow(FOLLOW_rule__TimeSignature__Group__2_in_rule__TimeSignature__Group__15404);
rule__TimeSignature__Group__2();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__TimeSignature__Group__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:2624:1: ( rule__TimeSignature__Group__0__Impl rule__TimeSignature__Group__1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2625:2: rule__TimeSignature__Group__0__Impl rule__TimeSignature__Group__1\n {\n pushFollow(FOLLOW_rule__TimeSignature__Group__0__Impl_in_rule__TimeSignature__Group__05341);\n rule__TimeSignature__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__TimeSignature__Group__1_in_rule__TimeSignature__Group__05344);\n rule__TimeSignature__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__TimeSignature__Group__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:2684:1: ( rule__TimeSignature__Group__2__Impl )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2685:2: rule__TimeSignature__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__TimeSignature__Group__2__Impl_in_rule__TimeSignature__Group__25463);\n rule__TimeSignature__Group__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 ruleTimeSignature() 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:297:2: ( ( ( rule__TimeSignature__Group__0 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:298:1: ( ( rule__TimeSignature__Group__0 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:298:1: ( ( rule__TimeSignature__Group__0 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:299:1: ( rule__TimeSignature__Group__0 )\n {\n before(grammarAccess.getTimeSignatureAccess().getGroup()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:300:1: ( rule__TimeSignature__Group__0 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:300:2: rule__TimeSignature__Group__0\n {\n pushFollow(FOLLOW_rule__TimeSignature__Group__0_in_ruleTimeSignature574);\n rule__TimeSignature__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getTimeSignatureAccess().getGroup()); \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__TimeSignature__Group__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:2665:1: ( ( '/' ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2666:1: ( '/' )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2666:1: ( '/' )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2667:1: '/'\n {\n before(grammarAccess.getTimeSignatureAccess().getSolidusKeyword_1()); \n match(input,46,FOLLOW_46_in_rule__TimeSignature__Group__1__Impl5432); \n after(grammarAccess.getTimeSignatureAccess().getSolidusKeyword_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__Parameter__Group_1_0__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:1491:1: ( ( 'TIME_SIGNATURE' ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1492:1: ( 'TIME_SIGNATURE' )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1492:1: ( 'TIME_SIGNATURE' )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1493:1: 'TIME_SIGNATURE'\n {\n before(grammarAccess.getParameterAccess().getTIME_SIGNATUREKeyword_1_0_0()); \n match(input,39,FOLLOW_39_in_rule__Parameter__Group_1_0__0__Impl3125); \n after(grammarAccess.getParameterAccess().getTIME_SIGNATUREKeyword_1_0_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 ruleSignature() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:792:2: ( ( ( rule__Signature__Group__0 ) ) )\r\n // InternalGo.g:793:2: ( ( rule__Signature__Group__0 ) )\r\n {\r\n // InternalGo.g:793:2: ( ( rule__Signature__Group__0 ) )\r\n // InternalGo.g:794:3: ( rule__Signature__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureAccess().getGroup()); \r\n }\r\n // InternalGo.g:795:3: ( rule__Signature__Group__0 )\r\n // InternalGo.g:795:4: rule__Signature__Group__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Signature__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.getSignatureAccess().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 rule__SignatureDeclaration__Group__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:447:1: ( rule__SignatureDeclaration__Group__1__Impl rule__SignatureDeclaration__Group__2 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:448:2: rule__SignatureDeclaration__Group__1__Impl rule__SignatureDeclaration__Group__2\n {\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__1__Impl_in_rule__SignatureDeclaration__Group__1846);\n rule__SignatureDeclaration__Group__1__Impl();\n _fsp--;\n\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__2_in_rule__SignatureDeclaration__Group__1849);\n rule__SignatureDeclaration__Group__2();\n _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__TimeSignature__Group__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:2636:1: ( ( ( rule__TimeSignature__QuantityAssignment_0 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2637:1: ( ( rule__TimeSignature__QuantityAssignment_0 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2637:1: ( ( rule__TimeSignature__QuantityAssignment_0 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2638:1: ( rule__TimeSignature__QuantityAssignment_0 )\n {\n before(grammarAccess.getTimeSignatureAccess().getQuantityAssignment_0()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2639:1: ( rule__TimeSignature__QuantityAssignment_0 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2639:2: rule__TimeSignature__QuantityAssignment_0\n {\n pushFollow(FOLLOW_rule__TimeSignature__QuantityAssignment_0_in_rule__TimeSignature__Group__0__Impl5371);\n rule__TimeSignature__QuantityAssignment_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getTimeSignatureAccess().getQuantityAssignment_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__SignatureDef__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7451:1: ( rule__SignatureDef__Group__1__Impl rule__SignatureDef__Group__2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7452:2: rule__SignatureDef__Group__1__Impl rule__SignatureDef__Group__2\r\n {\r\n pushFollow(FOLLOW_rule__SignatureDef__Group__1__Impl_in_rule__SignatureDef__Group__115708);\r\n rule__SignatureDef__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__SignatureDef__Group__2_in_rule__SignatureDef__Group__115711);\r\n rule__SignatureDef__Group__2();\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__SignatureDeclaration__Group__0() 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:416:1: ( rule__SignatureDeclaration__Group__0__Impl rule__SignatureDeclaration__Group__1 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:417:2: rule__SignatureDeclaration__Group__0__Impl rule__SignatureDeclaration__Group__1\n {\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__0__Impl_in_rule__SignatureDeclaration__Group__0784);\n rule__SignatureDeclaration__Group__0__Impl();\n _fsp--;\n\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__1_in_rule__SignatureDeclaration__Group__0787);\n rule__SignatureDeclaration__Group__1();\n _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__TimeSignature__Group__2__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:2695:1: ( ( ( rule__TimeSignature__NoteAssignment_2 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2696:1: ( ( rule__TimeSignature__NoteAssignment_2 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2696:1: ( ( rule__TimeSignature__NoteAssignment_2 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2697:1: ( rule__TimeSignature__NoteAssignment_2 )\n {\n before(grammarAccess.getTimeSignatureAccess().getNoteAssignment_2()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2698:1: ( rule__TimeSignature__NoteAssignment_2 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2698:2: rule__TimeSignature__NoteAssignment_2\n {\n pushFollow(FOLLOW_rule__TimeSignature__NoteAssignment_2_in_rule__TimeSignature__Group__2__Impl5490);\n rule__TimeSignature__NoteAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getTimeSignatureAccess().getNoteAssignment_2()); \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__Signature__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:6134:1: ( rule__Signature__Group__0__Impl rule__Signature__Group__1 )\r\n // InternalGo.g:6135:2: rule__Signature__Group__0__Impl rule__Signature__Group__1\r\n {\r\n pushFollow(FOLLOW_17);\r\n rule__Signature__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__Signature__Group__1();\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 ruleSignatureDef() 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:578:2: ( ( ( rule__SignatureDef__Group__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:579:1: ( ( rule__SignatureDef__Group__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:579:1: ( ( rule__SignatureDef__Group__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:580:1: ( rule__SignatureDef__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSignatureDefAccess().getGroup()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:581:1: ( rule__SignatureDef__Group__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:581:2: rule__SignatureDef__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__SignatureDef__Group__0_in_ruleSignatureDef1181);\r\n rule__SignatureDef__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.getSignatureDefAccess().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 rule__Signature__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:6161:1: ( rule__Signature__Group__1__Impl )\r\n // InternalGo.g:6162:2: rule__Signature__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Signature__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__SignatureDef__Group__0() 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:7422:1: ( rule__SignatureDef__Group__0__Impl rule__SignatureDef__Group__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7423:2: rule__SignatureDef__Group__0__Impl rule__SignatureDef__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__SignatureDef__Group__0__Impl_in_rule__SignatureDef__Group__015648);\r\n rule__SignatureDef__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__SignatureDef__Group__1_in_rule__SignatureDef__Group__015651);\r\n rule__SignatureDef__Group__1();\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__SignatureReference__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7390:1: ( rule__SignatureReference__Group__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7391:2: rule__SignatureReference__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__SignatureReference__Group__1__Impl_in_rule__SignatureReference__Group__115587);\r\n rule__SignatureReference__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rulesignatureDeclaration() 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:130:2: ( ( ( rule__SignatureDeclaration__Group__0 ) ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:131:1: ( ( rule__SignatureDeclaration__Group__0 ) )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:131:1: ( ( rule__SignatureDeclaration__Group__0 ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:132:1: ( rule__SignatureDeclaration__Group__0 )\n {\n before(grammarAccess.getSignatureDeclarationAccess().getGroup()); \n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:133:1: ( rule__SignatureDeclaration__Group__0 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:133:2: rule__SignatureDeclaration__Group__0\n {\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__0_in_rulesignatureDeclaration215);\n rule__SignatureDeclaration__Group__0();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getSignatureDeclarationAccess().getGroup()); \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__SignatureDeclaration__Group__0__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:428:1: ( ( '%sig' ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:429:1: ( '%sig' )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:429:1: ( '%sig' )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:430:1: '%sig'\n {\n before(grammarAccess.getSignatureDeclarationAccess().getSigKeyword_0()); \n match(input,16,FOLLOW_16_in_rule__SignatureDeclaration__Group__0__Impl815); \n after(grammarAccess.getSignatureDeclarationAccess().getSigKeyword_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__SignatureDeclaration__Group__2() 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:476:1: ( rule__SignatureDeclaration__Group__2__Impl rule__SignatureDeclaration__Group__3 )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:477:2: rule__SignatureDeclaration__Group__2__Impl rule__SignatureDeclaration__Group__3\n {\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__2__Impl_in_rule__SignatureDeclaration__Group__2906);\n rule__SignatureDeclaration__Group__2__Impl();\n _fsp--;\n\n pushFollow(FOLLOW_rule__SignatureDeclaration__Group__3_in_rule__SignatureDeclaration__Group__2909);\n rule__SignatureDeclaration__Group__3();\n _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 }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column dt_expense_adjstmnt.ACCOUNT_TITLE_ID | public void setAccountTitleId(Integer accountTitleId) {
this.accountTitleId = accountTitleId;
} | [
"public Integer getAccountTitleId() {\r\n return accountTitleId;\r\n }",
"public void setAudit_name_title_id(int audit_name_title_id) {\n this.audit_name_title_id = audit_name_title_id;\n }",
"public void setTitleHasAccountPK(TitleHasAccountPK titleHasAccountPK) {\r\n this.titleHasAccountPK = titleHasAccountPK;\r\n }",
"@Override\n\tpublic void setTitleId(long titleId) {\n\t\t_comment.setTitleId(titleId);\n\t}",
"public void setPrefTitle(int resId) {\n if (getActivity() == null)\n return;\n\n ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();\n if (actionBar != null) {\n actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME\n | ActionBar.DISPLAY_USE_LOGO\n | ActionBar.DISPLAY_SHOW_TITLE);\n\n actionBar.setLogo(R.drawable.ic_icon);\n actionBar.setTitle(resId);\n }\n }",
"public void setTitle(String title) {\r\n updateDBvalue(\"resource\", uniqueID, \"title\", title);\r\n this.title = title;\r\n }",
"public void setTitle_key(String title_key) {\n this.title_key = title_key == null ? null : title_key.trim();\n }",
"public int getAudit_name_title_id() {\n return audit_name_title_id;\n }",
"public void setTitleCode(java.lang.String titleCode) {\n this.titleCode = titleCode;\n }",
"public void setEntityTitle(java.lang.Object entityTitle) {\n this.entityTitle = entityTitle;\n }",
"public void setTitleID(String val){\n\t\ttid = val;\n\t}",
"String getTitle_id();",
"public Title updateTitle(int empId) {\n\t\t\n\t\tString newTitleName = null;\n\t\tTitle newTitle = new Title();\n\t\tint newTitleId = empDao.updateEmployeeTitle(empId);\n\t\tif(newTitleId > 0) {\n\t\t\tnewTitleName = empDao.getEmployeeTitle(newTitleId);\n\t\t}\n\t\tnewTitle.setTitleName(newTitleName);\n\t\tnewTitle.setTitleId(newTitleId);\n\t\treturn newTitle;\n\t}",
"@Override\n public void setTitle(int textId) {\n super.setTitle(textId);\n\n setTitle(getContext().getString(textId));\n }",
"public void setTitleContent(String titleContent) {\n this.titleContent = titleContent == null ? null : titleContent.trim();\n }",
"final private void setField_Title(String field_Title) {\n this.field_Title = field_Title;\n }",
"public ObjectId getTitleId() {\n return getValue(\"titleId\", ObjectId.FACTORY);\n }",
"public void setTitle(String title) {\n try {\n setStringForAttributeIndex(title, AttachmentAttributeTitle);\n } catch (InvalidAttributeValueException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_esfTournament.setTitle(title);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load the specified heap with the specified number of entries. | @SuppressWarnings("unchecked")
protected final KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] loadHeap(
final Heap<Integer, Integer> heapToLoad, final int size,
final boolean useRandom, int keyOffset)
throws IllegalArgumentException
{
if (keyOffset < 0) { throw new IllegalArgumentException(); }
// make stupid array of triples - note that Java won't let you actually
// allocate
// arrays of generic types... hence the unchecked suppression up top.
KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] triples = new KeyValueTriple[size];
Integer key;
Integer value;
Heap.Entry<Integer, Integer> newEntry;
Map<Integer, Object> keysAlreadyUsed = new HashMap<Integer, Object>();
for (int index = 0; index < size; index++)
{
if (useRandom == true)
{
// generate a random, but unique, key.
do
{
key = this.random.nextInt();
}
while (keysAlreadyUsed.containsKey(key));
// record the key we generated.
keysAlreadyUsed.put(key, null);
// finally, generate a random value.
value = this.random.nextInt();
}
else
{
key = index + keyOffset;
value = index;
}
// actually insert into the heap.
newEntry = heapToLoad.insert(key, value);
// now, store in stupid array.
triples[index] = new KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>(
key, value, newEntry);
}
// clear stupid map, perhaps to aid the garbage collector.
keysAlreadyUsed.clear();
return (triples);
} | [
"protected final KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] loadHeap(\n\t\t\tfinal Heap<Integer, Integer> heapToLoad, final int size)\n\t{\n\t\treturn (this.loadHeap(heapToLoad, size, this.getRandomFlag()));\n\t}",
"protected final KeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] loadHeap(\n\t\t\tfinal Heap<Integer, Integer> heapToLoad, final int size,\n\t\t\tfinal boolean useRandom)\n\t{\n\t\treturn (this.loadHeap(heapToLoad, size, useRandom, 0));\n\t}",
"public void load(int size);",
"public void loadHash(int pageSize) {\n\t\tFile heapFile = new File(HEAP_FNAME + pageSize);\n\t\tint pageCount, recCount, recordLen, rid, pageNum;\n\t\tpageCount = recCount = recordLen = rid = pageNum = 0;\n\t\tboolean isNextPage = true;\n\t\tboolean isNextRecord = true;\n\t\t\n\t\t// key variables for calculating bucket offsets\n\t\tint numOfRecords = countRecords(pageSize, heapFile);\n\t\tint numOfBuckets = calcNumOfBuckets(numOfRecords);\n\t\t// creates an empty byte array\n\t\tbyte[] hashIndex = initializeIndex(numOfBuckets);\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(heapFile);\n\t\t\t// reading page by page from heapfile\n\t\t\twhile (isNextPage) {\n\t\t\t\tbyte[] bPage = new byte[pageSize];\n\t\t\t\tbyte[] bPageNum = new byte[EOF_PAGENUM_SIZE];\n\t\t\t\tfis.read(bPage, 0, pageSize);\n\t\t\t\t// store pagenum to pass to storeInBucket()\n\t\t\t\tSystem.arraycopy(bPage, pageSize - EOF_PAGENUM_SIZE, bPageNum, 0, EOF_PAGENUM_SIZE);\n\t\t\t\tpageNum = ByteBuffer.wrap(bPageNum).getInt();\n\n\t\t\t\t// reading by record, return true to read the next record\n\t\t\t\tisNextRecord = true;\n\t\t\t\twhile (isNextRecord) {\n\t\t\t\t\tbyte[] bRecord = new byte[RECORD_SIZE];\n\t\t\t\t\tbyte[] bRid = new byte[RID_SIZE];\n\t\t\t\t\tbyte[] bRecName = new byte[BN_NAME_SIZE];\n\t\t\t\t\tString recName = \"\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.arraycopy(bPage, recordLen, bRecord, 0, RECORD_SIZE);\n\t\t\t\t\t\t// store rid to pass to storeInBucket()\n\t\t\t\t\t\tSystem.arraycopy(bRecord, 0, bRid, 0, RID_SIZE);\n\t\t\t\t\t\t// store recName to pass to storeInBucket()\n\t\t\t\t\t\tSystem.arraycopy(bRecord, BN_NAME_OFFSET, bRecName, 0, BN_NAME_SIZE);\n\t\t\t\t\t\trid = ByteBuffer.wrap(bRid).getInt();\n\t\t\t\t\t\trecName = new String(bRecName).trim();\n\t\t\t\t\t\tif (rid != recCount) {\n\t\t\t\t\t\t\tisNextRecord = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// attempts to store record in a bucket in hashIndex\n\t\t\t\t\t\t\t\thashIndex = storeInBucket(hashIndex, recName, pageNum, rid, pageSize, numOfBuckets);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trecordLen += RECORD_SIZE;\n\t\t\t\t\t\t\trecCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if recordLen exceeds pagesize, catch this to reset to next page\n\t\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t\t\t\tisNextRecord = false;\n\t\t\t\t\t\trecordLen = recCount = rid = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// check to complete all pages\n\t\t\t\tif (pageNum != pageCount) {\n\t\t\t\t\tisNextPage = false;\n\t\t\t\t}\n\t\t\t\tpageCount++;\n\t\t\t}\n\t\t\tfis.close();\n\t\t\t\n\t\t\t// writes hashindex to a file\n\t\t\thashIndexToFile(hashIndex, pageSize);\n\t\t\t\n\t\t\t// Uncomment to check if all records have been loaded into hashFile\n\t\t\t// properly.\n\t\t\t//checkHashRecords(pageSize, numOfRecords, numOfBuckets);\n\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File: \" + heapFile.getName() + \" not found.\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void readHeap(String path){\n try\r\n {\r\n String line = \"\";\r\n String splitBy = \",\";\r\n BufferedReader br = new BufferedReader(new FileReader(path));\r\n while ((line = br.readLine()) != null) //returns a Boolean value\r\n {\r\n line = removeUnwantedChars(line);\r\n String[] temp = line.split(splitBy); // use comma as separator\r\n heapObject myObject = new heapObject(Integer.parseInt(temp[0]), Integer.parseInt(temp[1]), Integer.parseInt(temp[2]));\r\n IDs.add(myObject);\r\n heap.put(myObject.id,myObject);\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void heap(Node[] keys, int n) {\n\t\tthis.capacity = n;\n\t\theap = new Node[capacity + 1];\n\t\tindex = new int[capacity];\n\t\theap[0] = new Node(-1, Integer.MIN_VALUE);\n\t\tcurrent_size = 0;\n\t\tfor (Node key : keys) {\n\t\t\tinsert(key);\n\t\t}\n\t}",
"FitsHeap(int size) {\n heap = new byte[size];\n heapSize = size;\n }",
"public int heapSize();",
"private void rebuildHeap()\n {\n for(int i = numberOfEntries / 2 - 1; i >= 0; i--)\n {\n heapify(i);\n }\n }",
"public void testMakeMinHeap() throws IOException {\n // empty case, does nothing\n assertEquals(0, heap.getSize());\n heap.makeMinHeap();\n \n // 10 records loaded to heap\n Heap tempHeap = new Heap(new byte[] {1, 1, 1, 1, 1, 1, 1, 1, \n 77, 0, 0, 0, 0, 0, 0, 0,\n 2, 2, 2, 2, 2, 2, 2, 2,\n 68, 0, 0, 0, 0, 0, 0, 0,\n 3, 3, 3, 3, 3, 3, 3, 3,\n 96, 0, 0, 0, 0, 0, 0, 0,\n 4, 4, 4, 4, 4, 4, 4, 4,\n 78, 0, 0, 0, 0, 0, 0, 0,\n 5, 5, 5, 5, 5, 5, 5, 5,\n 22, 0, 0, 0, 0, 0, 0, 0,\n 6, 6, 6, 6, 6, 6, 6, 6,\n 23, 0, 0, 0, 0, 0, 0, 0,\n 7, 7, 7, 7, 7, 7, 7, 7,\n 28, 0, 0, 0, 0, 0, 0, 0,\n 8, 8, 8, 8, 8, 8, 8, 8,\n 35, 0, 0, 0, 0, 0, 0, 0,\n 9, 9, 9, 9, 9, 9, 9, 9,\n 20, 0, 0, 0, 0, 0, 0, 0,\n 10, 10, 10, 10, 10, 10, 10, 10,\n 79, 0, 0, 0, 0, 0, 0, 0}, 160);\n \n // if it was heapified correctly...\n assertEquals(10, tempHeap.getSize());\n byte[] checkResult = new byte[] {9, 5, 6, 8, 1,\n 3, 7, 2, 4, 10};\n \n for (int i = 9; i >= 0; i--) {\n assertEquals(checkResult[i],\n tempHeap.remove(tempHeap.getSize() - 1).getKey()[0]);\n }\n }",
"protected void heapLoad(ProgramLocation obj, Register dest_r, Node base_n, jq_Field f) {\n FieldNode fn = FieldNode.get(base_n, f, obj);\n Set result = NodeSet.FACTORY.makeSet();\n heapLoad(result, base_n, f, fn);\n setRegister(dest_r, result);\n }",
"@Test\n\tpublic final void testInsert()\n\t{\n\t\t// get a new heap.\n\t\tHeap<Integer, Integer> heap = this.newHeap();\n\n\t\t// load it!\n\t\tKeyValueTriple<Integer, Integer, Heap.Entry<Integer, Integer>>[] loadedValues = this\n\t\t\t\t.loadHeap(heap, this.getInsertSize());\n\n\t\t// make sure that everything is equal.\n\t\tassertHeapIsEqualTo(heap, loadedValues);\n\t}",
"public com.nlu.entity.model.Heap create(long heapId);",
"public void buildHeap(){\n\t\tbuildHeap(1);\n\t}",
"private void heapify() {\n for (int i = minHeap.size() / 2; i >= 0; i--) {\n heapifyDown(i);\n }\n }",
"public void meld(BinomialHeap heap2) {\r\n\t\tthis.size = this.size + heap2.size;\r\n\t\tif (heap2.min != null && this.min != null && heap2.min.value < this.min.value) {\r\n\t\t\tthis.min = heap2.min;\r\n\t\t}\r\n\t\tif (heap2.min != null && this.min == null) {\r\n\t\t\tthis.min = heap2.min;\r\n\t\t}\r\n\t\tHeapNode[] heap2Arr = heap2.HeapTreesArray;\r\n\t\tif (this.empty() && !heap2.empty()) {\r\n\t\t\tthis.min = heap2.min;\r\n\t\t\tthis.empty = false;\r\n\t\t}\r\n\t\tfor (int i = 0; i < heap2Arr.length; i++) {\r\n\t\t\tif (heap2Arr[i] != null && this.HeapTreesArray[i] == null) {\r\n\t\t\t\tthis.HeapTreesArray[i] = heap2Arr[i];\r\n\t\t\t} else if (heap2Arr[i] != null && this.HeapTreesArray[i] != null) {\r\n\t\t\t\tHeapNode hN = merge(heap2Arr[i], this.HeapTreesArray[i]);\r\n\t\t\t\tHeapTreesArray[i] = null;\r\n\t\t\t\tint j = i + 1;\r\n\t\t\t\twhile (this.HeapTreesArray[j] != null) {\r\n\t\t\t\t\thN = merge(hN, this.HeapTreesArray[j]);\r\n\t\t\t\t\tHeapTreesArray[j] = null;\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t\tHeapTreesArray[j] = hN;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"private void fillHeap()\r\n{\r\n Random rand = new Random();\r\n for(int j = 1; j < this.max; j++)\r\n {\r\n this.heapSize++;\r\n this.heap[j] = createNode(rand.nextInt(40), this.heapSize);\r\n }\r\n\r\n\r\n}",
"private void buildHeap() {\r\n\t\tfor (int i = (((int) size) / 2); i >= 1; i--) {\r\n\t\t\tminHeapify(i); // Complexity is log(n).\r\n\t\t}\r\n\t}",
"public Heap(int maxSize, int[] _dist, int[] _hPos) \r\n {\r\n N = 0;\r\n h = new int[maxSize + 1];\r\n dist = _dist;\r\n hPos = _hPos;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find a territory to attack | @Override
public AttackPlan getTerritoryToAttack() {
AttackPlan result = null;
ITerritory t = this.getRandomTerritory();
for(ITerritory a: t.getAdjacentTerritoryObjects())
{
if(a.getOwner() != this)
{
result = new AttackPlan(t,a);
return result;
}
}
return result;
} | [
"private void actOnTerritory() {\n if(!engine.getConsoleGameManager().getCurrentPlayerTerritories().isEmpty()) {\n int territoryID;\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Select a territory to act on: \");\n territoryID = scanner.nextInt();\n while(!checkTerritoryIdValid(territoryID)) {\n System.out.println(\"Enter a valid territory ID.\");\n territoryID = scanner.nextInt();\n }\n Territory targetTerritory = engine.getConsoleGameManager().getGameDescriptor().getTerritoryMap().get(territoryID);\n engine.getConsoleGameManager().setSelectedTerritoryForTurn(targetTerritory);\n if(engine.getConsoleGameManager().isTerritoryBelongsCurrentPlayer()) { //Player working on his territory\n actOnSelfTerritory(territoryID, scanner, targetTerritory);\n }\n else if(engine.getConsoleGameManager().isConquered()) { //Belongs to a different player\n if(engine.getConsoleGameManager().isTargetTerritoryValid()){ // Is it valid too attack?\n attackConqueredTerritoryResult(targetTerritory);\n } else { //Not valid\n System.out.println(\"Invalid target territory\");\n }\n } else { // Neutral(When he has atleast one territory)\n if(engine.getConsoleGameManager().isTargetTerritoryValid()){\n getNeutralTerritory(targetTerritory);\n }\n else { //Not valid\n System.out.println(\"Invalid target territory\");\n }\n }\n } else {\n chooseTerritoryIfNone();\n }\n }",
"@Override\n public Collection<Territory> getAttackerRetreatTerritories() {\n if (headless\n || (!attackingUnits.isEmpty() && attackingUnits.stream().allMatch(Matches.unitIsAir()))\n || Properties.getRetreatingUnitsRemainInPlace(gameData)) {\n return Set.of(battleSite);\n }\n // its possible that a sub retreated to a territory we came from, if so we can no longer retreat\n // there\n // or if we are moving out of a territory containing enemy units, we cannot retreat back there\n final Predicate<Unit> enemyUnitsThatPreventRetreat =\n PredicateBuilder.of(Matches.enemyUnit(attacker, gameData))\n .and(Matches.unitIsNotInfrastructure())\n .and(Matches.unitIsBeingTransported().negate())\n .and(Matches.unitIsSubmerged().negate())\n .and(Matches.unitCanBeMovedThroughByEnemies().negate())\n .andIf(\n Properties.getIgnoreTransportInMovement(gameData),\n Matches.unitIsNotTransportButCouldBeCombatTransport())\n .build();\n Collection<Territory> possible =\n CollectionUtils.getMatches(\n attackingFrom,\n Matches.territoryHasUnitsThatMatch(enemyUnitsThatPreventRetreat).negate());\n // In WW2V2 and WW2V3 we need to filter out territories where only planes\n // came from since planes cannot define retreat paths\n if (Properties.getWW2V2(gameData) || Properties.getWW2V3(gameData)) {\n possible =\n CollectionUtils.getMatches(\n possible,\n t -> {\n final Collection<Unit> units = attackingFromMap.get(t);\n return units.isEmpty() || !units.stream().allMatch(Matches.unitIsAir());\n });\n }\n\n // the air unit may have come from a conquered or enemy territory, don't allow retreating\n final Predicate<Territory> conqueuredOrEnemy =\n Matches.isTerritoryEnemyAndNotUnownedWaterOrImpassableOrRestricted(attacker, gameData)\n .or(Matches.territoryIsWater().and(Matches.territoryWasFoughtOver(battleTracker)));\n possible.removeAll(CollectionUtils.getMatches(possible, conqueuredOrEnemy));\n\n // the battle site is in the attacking from if sea units are fighting a submerged sub\n possible.remove(battleSite);\n if (attackingUnits.stream().anyMatch(Matches.unitIsLand()) && !battleSite.isWater()) {\n possible = CollectionUtils.getMatches(possible, Matches.territoryIsLand());\n }\n if (attackingUnits.stream().anyMatch(Matches.unitIsSea())) {\n possible = CollectionUtils.getMatches(possible, Matches.territoryIsWater());\n }\n return possible;\n }",
"private void chooseTerritoryIfNone() {\n System.out.println(engine.getConsoleGameManager().getCurrentPlayerTurn().getPlayerName()\n + \", You have no territories!\"\n + \"\\n\");\n drawMap();\n System.out.println(\"Please select a territory: \");\n Scanner sc = new Scanner(System.in);\n int territoryID = sc.nextInt();\n while(!engine.getConsoleGameManager().getGameDescriptor().getTerritoryMap().containsKey(territoryID)) {\n System.out.println(\"Enter a valid territory ID as shown.\");\n territoryID = sc.nextInt();\n }\n Territory targetTerritory = engine.getConsoleGameManager().getGameDescriptor().getTerritoryMap().get(territoryID);\n engine.getConsoleGameManager().setSelectedTerritoryForTurn(targetTerritory);\n if(targetTerritory.isConquered()) {\n attackConqueredTerritoryResult(targetTerritory);\n }else {\n getNeutralTerritory(targetTerritory);\n }\n }",
"public int findTroops(Territory t){\n List<Troop> troops = army.getTroops();\n int count = 0;\n for(Troop troop : troops){\n if(troop.getLocation() == t){\n count += 1;\n }\n }\n return count;\n\n }",
"public Territory getTerritory(String territoryName){\r\n for (Territory t : territories){\r\n if (territoryName.equals(t.getTerritoryName())){\r\n return t;\r\n }\r\n }\r\n System.out.println(\"No territory with this name\");\r\n return null; //To compile\r\n }",
"public static MapLocation chooseTargetByDamageReduction() {\n double maxDamageReduction = 0;\n MapLocation attackLocation = null;\n for (int i = Handler.attackableEnemies.length; --i >= 0;) {\n double dmgReduction = 0;\n RobotType enemyType = Handler.attackableEnemies[i].type;\n MapLocation enemyLocation = Handler.attackableEnemies[i].location;\n // Sense my team's robots that can attack this. TODO: fix for\n // launchers + towers + HQ\n RobotInfo[] myTeamAttacking = Handler.rc.senseNearbyRobots(enemyLocation,\n 15, Handler.myTeam);\n double damageSum = 0;\n for (int j = myTeamAttacking.length; --j >= 0;) {\n if (myTeamAttacking[j].weaponDelay < 1\n && myTeamAttacking[j].location\n .distanceSquaredTo(enemyLocation) <= myTeamAttacking[j].type.attackRadiusSquared) {\n damageSum += myTeamAttacking[j].type.attackPower;\n }\n }\n if (damageSum > enemyType.maxHealth) {\n damageSum = enemyType.maxHealth;\n }\n\n if (enemyType != RobotType.LAUNCHER && enemyType.attackDelay != 0) {\n dmgReduction = enemyType.attackPower / enemyType.attackDelay\n * damageSum / enemyType.maxHealth;\n }\n // if (enemyType == RobotType.TOWER) {\n // dmgReduction *= 3;\n // }\n if (dmgReduction > maxDamageReduction) {\n maxDamageReduction = dmgReduction;\n attackLocation = Handler.attackableEnemies[i].location;\n }\n }\n return attackLocation;\n\n }",
"private void getNeutralTerritory(Territory targetTerritory) {\n System.out.println(\"Territory threshold: \"\n + targetTerritory.getArmyThreshold()\n + \" You have \"\n + engine.getConsoleGameManager().getCurrentPlayerFunds()\n + \" Turings\");\n printAndBuySelectedUnit();\n if(engine.getConsoleGameManager().conquerNeutralTerritory())\n System.out.println(\"Territory : \"\n + targetTerritory.getID()\n + \" Has been conquered!\"\n + \"\\n\");\n else\n System.out.println(\"Conquering failed , army is not above threshold.\");\n }",
"public Territory getTerritory(String territoryName){\n return genericWorldMap.getTerritory(territoryName);\n }",
"private PlayerTerritory isPlayerOwnTerritory(String territoryName) {\n\t\tfor (int i = 0; i < player_occupied_territory.size(); i++) {\n\t\t\tif (player_occupied_territory.get(i).getTerritoryName().equalsIgnoreCase(territoryName)) {\n\t\t\t\treturn player_occupied_territory.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public void attack() {\n //Grab an attacker.\n Territory attacker = potentialAttackers.remove(0);\n \n //Find the weakest adjacent territory\n int victimStrength = Integer.MAX_VALUE;\n Territory victim = null;\n List<Territory> adjs = gameController.getBoard().getAdjacentTerritories(attacker);\n for(Territory adj : adjs){\n \n //Verify that our odds are good enough for this attack to consider it.\n int aTroops = attacker.getNumTroops() - 1;\n int dTroops = adj.getNumTroops();\n double odds = MarkovLookupTable.getOddsOfSuccessfulAttack(aTroops, dTroops);\n boolean yes = Double.compare(odds, ACCEPTABLE_RISK) >= 0;\n \n //If we have a chance of winning this fight and its the weakest opponent.\n if(yes && adj.getNumTroops() < victimStrength && !adj.getOwner().equals(this)){\n victim = adj;\n victimStrength = adj.getNumTroops();\n }\n }\n \n //Resolve the Attack by building forces and settle the winner in Victim's land\n Force atkForce = attacker.buildForce(attacker.getNumTroops() - 1);\n Force defForce = victim.buildForce(victimStrength); //Guaranteed not null\n Force winner = atkForce.attack(defForce);\n victim.settleForce(winner);\n }",
"public Continent findContinentOfTerritory(Territory territory) {\r\n\t\tContinent continent = null;\r\n\t\tfor (int i = 0; i < continentArray.size(); i++) {\r\n\t\t\tif (continentArray.get(i).getTerritories().contains(territory)) {\r\n\t\t\t\tcontinent = continentArray.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn continent;\r\n\t}",
"private void territoryCaptured(Player player, Vertex defender, Vertex attack ) {\n // Player gets the territory\n Player defenderOwner = defender.getTerritory().getOwner();\n player.increaseTerritoriesOwned();\n defender.getTerritory().setOwner(player);\n map.setTroopCountColor(defender.getTerritory().getTerritoryNumber(), player);\n\n // defender loses his territory\n decreaseTerritories(defenderOwner);\n\n isGameOver(player);\n if (isEliminated(defenderOwner)) {\n receiveCards(player, defenderOwner);\n eliminatePlayer(defenderOwner);\n }\n\n // How many troops are sent over\n int troops;\n if (player.isBot() || player.isMCTSBot()) {\n troops = game.getAi().getBotAttacking().getTroopCarryOver(attack);\n } else {\n TerritoryCaptured popUp = new TerritoryCaptured(attack.getTerritory());\n while (!popUp.getValidNumberInserted()) {\n delay();\n }\n troops = popUp.getTroops();\n }\n attack.getTerritory().setNumberOfTroops(attack.getTerritory().getNumberOfTroops() - troops);\n defender.getTerritory().setNumberOfTroops(defender.getTerritory().getNumberOfTroops() + troops);\n map.updateTroopCount(attack.getTerritory().getTerritoryNumber(), attack.getTerritory().getNumberOfTroops());\n map.updateTroopCount(defender.getTerritory().getTerritoryNumber(), defender.getTerritory().getNumberOfTroops());\n narrator.addText(\"Player \" + player.getName() + \" send \" + troops + \" troop(s) from \" + attack.getTerritory().getTerritoryName() + \" to \" + defender.getTerritory().getTerritoryName());\n\n // When player receives cards from an elimination, if he has more then 5 cards he has to turn in a set\n if (player.getHand().size() >= 6) {\n turnInCardsAttacking(player);\n }\n }",
"public void suggestTerritory() {\r\n for (int i = 0; i < boardSize; i++) {\r\n for (int j = 0; j < boardSize; j++) {\r\n if (boardState[i][j] != -1) {\r\n winBoardState[i][j] = boardState[i][j]-3;\r\n }\r\n }\r\n }\r\n int c = 0, lp = -1;\r\n for (int i = 0; i < boardSize; i++) {\r\n c = 0;\r\n lp = -1;\r\n for (int j = 0; j < boardSize; j++) {\r\n if (winBoardState[i][j] == -3) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[i][k] == -1)\r\n winBoardState[i][k] += 5;\r\n }\r\n c = j;\r\n lp = 0;\r\n } else if (winBoardState[i][j] == -2) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[i][k] == -1)\r\n winBoardState[i][k] += 6;\r\n }\r\n c = j;\r\n lp = 1;\r\n } else if (j == boardSize-1) {\r\n if (lp == 0) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[i][k] == -1)\r\n winBoardState[i][k] += 5;\r\n }\r\n } else if (lp == 1) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[i][k] == -1)\r\n winBoardState[i][k] += 6;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < boardSize; i++) {\r\n c = 0;\r\n lp = 0;\r\n for (int j = 0; j < boardSize; j++) {\r\n if (winBoardState[j][i] == -3) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[k][i] == -1)\r\n winBoardState[k][i] += 5;\r\n }\r\n c = j;\r\n lp = 0;\r\n } else if (winBoardState[j][i] == -2) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[k][i] == -1)\r\n winBoardState[k][i] += 6;\r\n }\r\n c = j;\r\n lp = 1;\r\n } else if (j == boardSize-1) {\r\n if (lp == 0) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[k][i] == -1)\r\n winBoardState[k][i] += 5;\r\n }\r\n } else if (lp == 1) {\r\n for (int k = c; k <= j; k++) {\r\n if (boardState[k][i] == -1)\r\n winBoardState[k][i] += 6;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < boardSize; i++) {\r\n for (int j = 0; j < boardSize; j++) {\r\n if (winBoardState[i][j] == 9 && boardState[i][j] == -1) {\r\n winBoardState[i][j] = 0;\r\n } else if (winBoardState[i][j] == 15 && boardState[i][j] == -1) {\r\n winBoardState[i][j] = 0;\r\n } else if (winBoardState[i][j] == 11 && boardState[i][j] == -1) {\r\n winBoardState[i][j] = 1;\r\n } else if (winBoardState[i][j] == 16 && boardState[i][j] == -1) {\r\n winBoardState[i][j] = 1;\r\n } else if (winBoardState[i][j] == -3) {\r\n \r\n } else if (winBoardState[i][j] == -2) {\r\n \r\n }else {\r\n winBoardState[i][j] = -1;\r\n }\r\n }\r\n }\r\n for (int i = 0; i < boardSize; i++) {\r\n for (int j = 0; j < boardSize; j++) {\r\n if (countWinBreaths(i,j) > 0) {\r\n winBoardState[i][j] = -1;\r\n }\r\n }\r\n }\r\n int[][] temp = winBoardState;\r\n while (temp != winBoardState) {\r\n temp = winBoardState;\r\n for (int i = 0; i < boardSize; i++) {\r\n for (int j = 0; j < boardSize; j++) {\r\n if (countWinBreaths(i,j) > 0) {\r\n winBoardState[i][j] = -1;\r\n }\r\n }\r\n }\r\n }\r\n \r\n System.out.println();\r\n for (int i = 0; i < boardSize; i++) {\r\n System.out.println();\r\n for (int j = 0; j < boardSize; j++) {\r\n System.out.print(winBoardState[i][j] + \" | \");\r\n }\r\n }\r\n }",
"public Territory findTerritoryById(String id) {\n for(Territory t : territories) {\n if(t.id.equals(id)) {\n return t;\n }\n }\n return null;\n }",
"public Continent getContinentForTerritory(Territory t) {\n for(Map.Entry<String, Continent> item : continents.entrySet()) {\n Continent c = item.getValue();\n if (c.containsTerritory(t)) {\n return c;\n }\n }\n\n return null;\n }",
"public Territories getTerritory() {\r\n\t\treturn territory;\r\n\t}",
"public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }",
"public String getTerritory() {\n return territory;\n }",
"private boolean isTerritoryOwnedBy(Territory t, Player p) {\n return t.getOwner() == p;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the start of a BSON array element to the writer. | void writeStartArray(String name); | [
"void writeStartArray();",
"protected abstract void doWriteStartArray();",
"public void beginArray() {\n expect(JsonType.START_COLLECTION);\n stack.addFirst(Container.COLLECTION);\n input.read();\n }",
"void writeEndArray();",
"protected abstract void doWriteEndArray();",
"boolean startArray() throws JSONParseException, IOException;",
"public void writeArray(Object[] val, int off, int len) throws IOException;",
"public void writeArray(Object o) throws IOException;",
"public void __testIntroTC03ArrayMarshal() {\n try {\n \n FileWriter writer = new FileWriter(\"output.xml\");\n Marshaller marshaller = new Marshaller(writer);\n marshaller.marshal(_rootarray);\n \n compareResults(\"root-array\",true);\n \n } catch (Exception e) {\n fail(\"An error has occured: \"+e);\n }\n }",
"public void writeArray(Object[] val) throws IOException;",
"public void writeElementStart( String tag)\n {\n startLine();\n print( \"<\");\n print( tag);\n print( \">\");\n println();\n }",
"private void encodeArray(Encoder encoder, Array type, int size) throws IOException {\n\t\tif (type.isZeroLength()) {\n\t\t\t// TODO: Zero-element arrays not yet supported\n\t\t\tencodeOpaqueDataType(encoder, type, size);\n\t\t\treturn;\n\t\t}\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tencoder.writeString(ATTRIB_NAME, \"\");\n\t\tint sz = type.getLength();\n\t\tif (sz == 0) {\n\t\t\tsz = size;\n\t\t}\n\t\tencoder.writeString(ATTRIB_METATYPE, \"array\");\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, sz);\n\t\tencoder.writeSignedInteger(ATTRIB_ARRAYSIZE, type.getNumElements());\n\t\tencodeTypeRef(encoder, type.getDataType(), type.getElementLength());\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}",
"public void flush() {\r\n // Flushing is required only if there are written bytes in\r\n // the current data element.\r\n if (bytenum != 0) {\r\n data[offset] = elem;\r\n }\r\n }",
"@Override public void enterArray( @NotNull JSONParser.ArrayContext ctx ) {\n if (ctx.value() != null && ctx.value().size() > 1) {\n output.append('\\n');\n indent();\n output.append( \"[\\n\" );\n ++tabCount;\n indent();\n }\n else {\n // the array only has one value so format like this:\n // [ value ]\n output.append( '[' ); \n }\n }",
"void writeStartDocument();",
"public static void writeArrayDeclaration(PrintWriter writer, NBCCodeTypes type, String name) {\n writer.format(\" %s %s[]\", name, type.getRepresentation()).println();\n }",
"static DataEvent startIndefiniteArray() {\n\t\treturn IMMEDIATES[InitialByte.indefinite(Major.ARRAY).getRepresentation()];\n\t}",
"protected abstract void doWriteStartDocument();",
"public abstract void writeRange(int startElement, int count,\r\n ByteBuffer src, int offsetBytes, boolean bForward);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the tags for a jobTime. Get all existing jobTime tags. | public void getJobTimeTags(Integer jobTimeId) throws ApiException {
getJobTimeTagsWithHttpInfo(jobTimeId);
} | [
"public Set<String> getJobs(String tag, long timestamp);",
"public ApiResponse<Void> getJobTimeTagsWithHttpInfo(Integer jobTimeId) throws ApiException {\n com.squareup.okhttp.Call call = getJobTimeTagsValidateBeforeCall(jobTimeId, null, null);\n return apiClient.execute(call);\n }",
"public com.squareup.okhttp.Call getJobTimeTagsAsync(Integer jobTimeId, final ApiCallback<Void> callback) throws ApiException {\n\n ProgressResponseBody.ProgressListener progressListener = null;\n ProgressRequestBody.ProgressRequestListener progressRequestListener = null;\n\n if (callback != null) {\n progressListener = new ProgressResponseBody.ProgressListener() {\n @Override\n public void update(long bytesRead, long contentLength, boolean done) {\n callback.onDownloadProgress(bytesRead, contentLength, done);\n }\n };\n\n progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {\n @Override\n public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {\n callback.onUploadProgress(bytesWritten, contentLength, done);\n }\n };\n }\n\n com.squareup.okhttp.Call call = getJobTimeTagsValidateBeforeCall(jobTimeId, progressListener, progressRequestListener);\n apiClient.executeAsync(call, callback);\n return call;\n }",
"public List<FrameTags> getVideoTags(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n }\n return result;\n }",
"public void getLoggedTimeTags(Integer loggedTimeId) throws ApiException {\n getLoggedTimeTagsWithHttpInfo(loggedTimeId);\n }",
"Set<Tag> getAllSystemTags();",
"ITag[] getAllTags();",
"List<Tag> getTags();",
"public List<TagEntity> getTags();",
"List<JotTag> all();",
"Collection<Tag> getTags(Entity entity);",
"@GetMapping(\"/mark-tags\")\n @Timed\n public List<Tag> getAllMarkTags() {\n log.debug(\"REST request to get all MarkTags\");\n return markTagRepository.findAll();\n }",
"public List<TimeInformation> getAllEmployeesTimeInformation() {\r\n\t\tList<TimeInformation> employeeTimeInformation = repository.findAll();\r\n\t\tif(employeeTimeInformation.size() > 0) {\r\n\t\t\treturn employeeTimeInformation;\r\n\t\t} else {\r\n\t\t\treturn new ArrayList<TimeInformation>();\r\n\t\t}\r\n\t}",
"@GetMapping(\"/tags\")\n @Timed\n public List<TagsDTO> getAllTags() {\n log.debug(\"REST request to get all Tags\");\n return tagsService.findAll();\n }",
"public List<String> getAll(FieldKey genericKey) throws KeyNotFoundException\n {\n return getActiveTag().getAll(genericKey);\n }",
"Collection<Tag> getTagsWithContext(Entity entity, String tagContext);",
"@Test\n public void getWorkActivityTagsTest() throws ApiException {\n Integer workActivityId = null;\n api.getWorkActivityTags(workActivityId);\n\n // TODO: test validations\n }",
"public List<Tag> getTags() {\n return fullPhoto.getTags();\n }",
"public Set<Tag> getTags() {\n\t\tList<Long> ids = getForeignKeys(\"tag\", \"track_id\");\n\t\tSet<Tag> res = new HashSet<Tag>();\n\t\tfor (Long l : ids)\n\t\t\tres.add(new Tag(l));\n\t\treturn res;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call when a single node, v, is added to set, S ForAll u neighboursOf(v) (incl v) > Update edgesFromNodetoS(u) > Determine if nodeInB(u) by examining edgesFromNodeToS(u) & nodeInS(u) > Add/remove u to/from B | private void updateBAfterAdd(Node v) {
// ForAll u neighboursOf(v) (incl v)
long edgesFromVToS = 0;
long degV = deg(v);
for (Relationship ve : v.getRelationships(Direction.BOTH)) {
Node u = ve.getOtherNode(v);
// Only consider vertices that have not been partitioned yet
Byte colorU = (Byte) u.getProperty(Consts.COLOR);
if (colorU != -1)
continue;
boolean uInS = nodeInS(u);
// Update out degree of S
if (uInS == true) {
// Update edgesFromVToS
// computeEdgesFromNodeToS(v) works too, but more efficient here
edgesFromVToS++;
outDeg--;
} else
outDeg++;
long edgesFromUToS = computeEdgesFromNodeToS(u);
long degU = deg(u);
// Determine if nodeInB(u)
// By examining edgesFromNodeToS(u) & nodeInS(u)
// U is not in set S [AND] U has edges into set S --> U in set B
if ((uInS == false) && (edgesFromUToS > 0)) {
B.put(u.getId(), edgesFromUToS);
continue;
}
// U is in set S [AND] U has edges out of set S --> U in set B
if ((uInS == true) && (edgesFromUToS < degU)) {
B.put(u.getId(), edgesFromUToS);
continue;
}
// U is not in set S
B.remove(u.getId());
}
// Determine if nodeInB(v)
// By examining edgesFromNodeToS(v) & nodeInS(v)
// V in set S (ALWAYS TRUE) && V has edges out of set S --> V in set B
if (edgesFromVToS < degV) {
B.put(v.getId(), edgesFromVToS);
return;
}
// V is not in S
B.remove(v.getId());
} | [
"private void updateBAfterRemove(Node v) {\n\n\t\t// ForAll u neighboursOf(v) (incl v)\n\n\t\tlong edgesFromVToS = 0;\n\n\t\tfor (Relationship ve : v.getRelationships(Direction.BOTH)) {\n\t\t\tNode u = ve.getOtherNode(v);\n\n\t\t\t// Only consider vertices that have not been partitioned yet\n\t\t\tByte color = (Byte) u.getProperty(Consts.COLOR);\n\t\t\tif (color != -1)\n\t\t\t\tcontinue;\n\n\t\t\tboolean uInS = nodeInS(u);\n\n\t\t\tif (uInS == true) {\n\t\t\t\tedgesFromVToS++;\n\t\t\t\toutDeg--;\n\t\t\t} else\n\t\t\t\toutDeg++;\n\n\t\t\tlong edgesFromUToS = computeEdgesFromNodeToS(u);\n\t\t\tlong degU = deg(u);\n\n\t\t\t// Determine if nodeInB(u)\n\t\t\t// By examining edgesFromNodeToS(u) & nodeInS(u)\n\n\t\t\t// U is not in set S [AND] U has edges into set S --> U in set B\n\t\t\tif ((nodeInS(u) == false) && (edgesFromUToS > 0)) {\n\t\t\t\tB.put(u.getId(), edgesFromUToS);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// U is in set S [AND] U has edges out of set S --> U in set B\n\t\t\tif ((nodeInS(u) == true) && (edgesFromUToS > degU)) {\n\t\t\t\tB.put(u.getId(), edgesFromUToS);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// U is not in set S\n\t\t\tB.remove(u.getId());\n\n\t\t}\n\n\t\t// Determine if nodeInB(v)\n\t\t// By examining edgesFromNodeToS(v) & nodeInS(v)\n\n\t\t// V not in set S (ALWAYS TRUE) && V has edges into set S --> V in set B\n\t\tif ((nodeInS(v) == false) && (edgesFromVToS > 0)) {\n\t\t\tB.put(v.getId(), edgesFromVToS);\n\t\t\treturn;\n\t\t}\n\n\t\t// V is not in S\n\t\tB.remove(v.getId());\n\n\t}",
"private void addNodetoS(Node v) throws Exception {\n\n\t\tif (S.contains(v.getId()) == false) {\n\t\t\tS.add(v.getId());\n\n\t\t\t// Compute volume(St) = sum( deg(v elementOf St) )\n\t\t\tvolume += deg(v);\n\n\t\t\tupdateBAfterAdd(v);\n\t\t} else\n\t\t\tthrow new Exception(String.format(\"Node[%d] already in S!\", v\n\t\t\t\t\t.getId()));\n\t}",
"private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }",
"protected abstract Set<Node> adjacentNodes(Node sourceNode);",
"private long edgesFromNodetoS(Node v) {\n\t\tLong edgesFromNodeToS = B.get(v.getId());\n\n\t\tif (edgesFromNodeToS != null)\n\t\t\treturn edgesFromNodeToS;\n\n\t\tif (S.contains(v.getId()))\n\t\t\treturn deg(v);\n\n\t\treturn 0;\n\t}",
"private void reachable(Set s) {\n for (Iterator i = this.succ.iterator(); i.hasNext(); ) {\n IdentityHashCodeWrapper ap = (IdentityHashCodeWrapper)i.next();\n if (!s.contains(ap)) {\n s.add(ap);\n ((AccessPath)ap.getObject()).reachable(s);\n }\n }\n }",
"private boolean nodeInS(Node v) {\n\t\treturn S.contains(v.getId());\n\t}",
"private void bfs(Graph G, int s){\n queue.add(s);\n visited[s] = true;\n while (!queue.isEmpty()) {\n int v = queue.removeFirst();\n for (int w : G.adj(v)) {\n if (!visited[w]) {\n queue.add(w);\n visited[w] = true;\n edgeTo[w] = v;\n }\n }\n }\n }",
"void BFS(int s)\n {\n /* List of visited vertices; all false in the beginning) */\n boolean visited[] = new boolean[V];\n\n /* Queue data structure is used for BFS */\n LinkedList<Integer> queue = new LinkedList<>();\n\n /* Mark starting node s as visited and enqueue it */\n visited[s]=true;\n queue.add(s);\n\n /* Until queue is empty, dequeue a single node in queue and look for it's neighboring vertices.\n * If an adjecent node hasn't been visited yet, set it as visited and enqueue this node. s*/\n while (queue.size() != 0)\n {\n /* Dequeue */\n s = queue.poll();\n System.out.print( s + \" \");\n\n /* Get all adjacent vertices */\n Iterator<Integer> i = adj[s].listIterator();\n while (i.hasNext())\n {\n int n = i.next();\n if (!visited[n])\n {\n visited[n] = true;\n queue.add(n);\n }\n }\n }\n }",
"void informEdges() {\n this.incoming.head = this;\n this.outgoing.tail = this;\n }",
"@Override\n public void updateNeighbours(String nodeGUID, Set<String> neighboursGUIDS) {\n List<String> existingNeighboursGUIDs = getAllNeighbours(nodeGUID);\n if (isDifferentGraphContext(neighboursGUIDS, existingNeighboursGUIDs)) {\n removeObsoleteEdges(nodeGUID, neighboursGUIDS, existingNeighboursGUIDs);\n }\n }",
"private void updateQueue(Node current) {\n\n\t\t/**\n\t\t * Loop through all adjacent of currently removed vertex u and update in qeueue\n\t\t * if adjacent should not be in mst set current adjacent is v and weight(u,v) < v.key\n\t\t * v.key initialized with infinite(max value of Integer)\n\t\t * Make greedy choice locally\n\t\t */\n\t\tIterator<Entry<Node, Integer>> itr = current.adjacentNodes.entrySet().iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tEntry<Node, Integer> next = itr.next();\n\t\t\tNode v = next.getKey();\n\t\t\tif (!mst.contains(v)) {\n\t\t\t\tint weight = next.getValue();\n\t\t\t\tif (weight < v.key) {\n\t\t\t\t\tv.key = weight;\n\t\t\t\t\t// update this in queue\n\t\t\t\t\tqueue.remove(new Node(v.id));\n\t\t\t\t\tqueue.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n public boolean breadthFirstSearch(T start, T end) {\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n Queue<Vertex<T>> queue = new LinkedList<Vertex<T>>();\r\n Set<Vertex<T>> visited = new HashSet<>();\r\n\r\n queue.add(startV);\r\n visited.add(startV);\r\n\r\n while(queue.size() > 0){\r\n Vertex<T> next = queue.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if(next == endV){\r\n return true;\r\n }\r\n\r\n for (Vertex<T> neighbor: next.getNeighbors()){\r\n if(!visited.contains(neighbor)){\r\n visited.add(neighbor);\r\n queue.add(neighbor);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }",
"void BFS(int s) {\n // Mark all the vertices as not visited(By default\n // set as false)\n boolean visited[] = new boolean[V];\n\n // Create a queue for BFS\n LinkedList<Integer> queue = new LinkedList<Integer>();\n\n // Mark the current node as visited and enqueue it\n visited [s] = true;\n queue.add(s);\n\n while (queue.size() != 0) {\n // Dequeue a vertex from queue and print it\n s = queue.poll();\n System.out.print(s + \" \");\n\n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it\n // visited and enqueue it\n Iterator<Integer> i = adj [s].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n]) {\n visited [n] = true;\n queue.add(n);\n }\n }\n }\n }",
"public static boolean solve(VertexV a, VertexV b) {\n if(a.equals(b)){\n return true;\n }\n Queue<VertexV> q = new LinkedList<>();\n Set<VertexV> visited = new HashSet<>();\n q.add(a);\n visited.add(a);\n while(!q.isEmpty()){\n VertexV tmp = q.poll();\n if(tmp.equals(b)){\n return true;\n }\n if(!visited.contains(tmp)){\n visited.add(tmp);\n }\n List<VertexV> neighbours = new ArrayList<>();\n neighbours.addAll(tmp.getNeighbours());\n for(int i=0;i<neighbours.size();i++){\n if(!visited.contains(neighbours.get(i))){\n q.add(neighbours.get(i));\n }\n }\n }\n return false;\n // TODO\n }",
"private long computeEdgesFromNodeToS(Node v) {\n\t\tlong edgesFromUToS = 0;\n\n\t\tfor (Relationship e : v.getRelationships(Direction.BOTH)) {\n\t\t\tif (nodeInS(e.getOtherNode(v)) == true)\n\t\t\t\tedgesFromUToS++;\n\t\t}\n\n\t\treturn edgesFromUToS;\n\t}",
"public void reachableBFS(){\n Queue<Vertex> queue = new LinkedList<Vertex>();\t\t\t//object of MinHeap with the size of the vertexMap\n \n ArrayList<String> vertex = new ArrayList<String>(this.vertexMap.keySet());\n HashMap<Double,Vertex> ver = new HashMap<Double,Vertex>();\n \n Collections.sort(vertex);\n double d = 0.0;\n \n for(int i=0; i<vertex.size(); i++){\n Vertex source = vertexMap.get(vertex.get(i));\t\t// source vertex itterated through every vertex\n if(source.stat != DOWN){\n System.out.println(source.name);\n for(int j=0; j<vertex.size(); j++){\n Vertex v = this.vertexMap.get(vertex.get(j));\n if(v.equals(source)){\n v.dist = 0.0;\n v.color = G;\n }\n else{\n v.dist = INFINITY;\t\t\t\t//initialize dist of all vertices to be infinity and prev to null\n v.color = W;\n }\n v.prev = null;\n //ver.put(v.dist, v);\n }\n \n queue.add(source);\n \n \n while(!queue.isEmpty()){\t\t\t\t//BFS algorithm\n Vertex u = queue.remove();\n //System.out.println(u.name);\n for(int j=0; j<u.adj.size(); j++){\n Edge w = u.adj.get(j);\n Vertex v = u.adj.get(j).vertex;\n if(w.stat != DOWN && v.stat != DOWN){\t\t//checking if the edge or vertex is down\n if(v.color == W){\t\t//checking if vertex visited by color\n v.color = G;\t\t// changing color\n v.dist = u.dist + 1;\n v.prev = u;\n //System.out.println(\" \" + v.name);\n queue.add(v);\t\t// adding to queue\n }\n }\n }\n u.color = B;\t\t\t// color B represents all vertices reachable by source\n }\n \n for(int j=0; j<vertex.size(); j++){\t\t// printing every vertex reachable by source\n Vertex v = vertexMap.get(vertex.get(j));\n if(!v.equals(source)){\n //System.out.println(v.name + \" \" + v.color);\n if(v.color == B)\n System.out.println(\" \" + v.name);\n }\n }\n }\n }\n }",
"public void bfs()\r\n\t{\r\n\t\tSet<T> visited = new HashSet<T>(); // for each vertex we track if it was visited\r\n\t\tMap<T,T> parent = new HashMap<T,T>(); // for each vertex we track the parent\r\n\t\t//Set<T> processed = new HashSet<T>();\r\n\t\tLinkedList<T> queue = new LinkedList<T>();\r\n\t\t\r\n\t\t/*\r\n\t\t * For each element visited\r\n\t\t * Print it and add all it's child nodes to \r\n\t\t * the Linked list\r\n\t\t * Keep popping from the Linked list\r\n\t\t * check if this node is already visited\r\n\t\t * Print it, push all it's child nodes\r\n\t\t * mark the key as processed\r\n\t\t */\r\n\t\tT[] keyArr = (T[])map.keySet().toArray();\r\n\t\t\r\n\t\tqueue.add(keyArr[0]);\r\n\t\tvisited.add(keyArr[0]);\r\n\t\t\r\n\t\twhile(!queue.isEmpty())\r\n\t\t{\r\n\t\t\tT key = queue.getFirst() ;\r\n\t\t\tSystem.out.println(\"The node is: \" + key );\r\n\t\t\t\r\n\t\t\tfor(T v: map.get(key))\r\n\t\t\t{\r\n\t\t\t\tif(!visited.contains(v))\r\n\t\t\t\t{\r\n\t\t\t\t\tparent.put(v, key);\r\n\t\t\t\t\tqueue.add(v);\r\n\t\t\t\t\tvisited.add(v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tqueue.removeFirst();\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"The child=parents are:\" + parent.toString());\r\n\t}",
"@Test\r\n void add_remove_add() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\",\"D\");\r\n graph.addEdge(\"C\",\"D\");\r\n graph.addEdge(\"D\", \"E\"); \r\n // Check that E is in graph with correct edges\r\n List<String> adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n vertices = graph.getAllVertices(); \r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n //Remove E\r\n graph.removeVertex(\"E\");\r\n if(vertices.contains(\"E\") | adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n \r\n //Add E back into graph with different edge\r\n graph.addEdge(\"B\", \"E\");\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.contains(\"E\") | !adjacent.contains(\"E\")) {\r\n fail();\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test sharding using Tradefed internal algorithm. | @Test
public void testShardConfig_internal_shardIndex() throws Exception {
CommandOptions options = new CommandOptions();
OptionSetter setter = new OptionSetter(options);
setter.setOptionValue("disable-strict-sharding", "true");
setter.setOptionValue("shard-count", "5");
setter.setOptionValue("shard-index", "2");
mConfig.setCommandOptions(options);
mConfig.setCommandLine(new String[] {"empty"});
StubTest test = new StubTest();
setter = new OptionSetter(test);
setter.setOptionValue("num-shards", "5");
mConfig.setTest(test);
assertEquals(1, mConfig.getTests().size());
// We do not shard, we are relying on the current invocation to run.
assertFalse(mHelper.shardConfig(mConfig, mContext, mRescheduler));
// Rescheduled is NOT called because we use the current invocation to run the index.
Mockito.verify(mRescheduler, Mockito.times(0)).scheduleConfig(Mockito.any());
assertEquals(1, mConfig.getTests().size());
// Original IRemoteTest was replaced by the sharded one in the configuration.
assertNotEquals(test, mConfig.getTests().get(0));
} | [
"public void testShardedRun() throws Exception {\n final String shardableRunner = \"android.support.test.runner.AndroidJUnitRunner\";\n final String nonshardableRunner = \"android.test.InstrumentationTestRunner\";\n\n final String shardableTestPkg = \"com.example.shardabletest\";\n final String nonshardableTestPkg1 = \"com.example.nonshardabletest1\";\n final String nonshardableTestPkg2 = \"com.example.nonshardabletest2\";\n\n\n String shardableInstr = String.format(INSTR_OUTPUT_FORMAT, shardableTestPkg,\n shardableRunner, TEST_COVERAGE_TARGET);\n String nonshardableInstr1 = String.format(INSTR_OUTPUT_FORMAT, nonshardableTestPkg1,\n nonshardableRunner, TEST_COVERAGE_TARGET);\n String nonshardableInstr2 = String.format(INSTR_OUTPUT_FORMAT, nonshardableTestPkg2,\n nonshardableRunner, TEST_COVERAGE_TARGET);\n\n injectShellResponse(String.format(\"%s%s%s\", shardableInstr,\n nonshardableInstr1, nonshardableInstr2), 2);\n\n // Instantiate InstalledInstrumentationTest shards\n EasyMock.replay(mMockTestDevice, mMockListener);\n InstalledInstrumentationsTest shard0 = createInstalledInstrumentationsTest();\n shard0.setDevice(mMockTestDevice);\n shard0.setShardIndex(0);\n shard0.setTotalShards(2);\n InstalledInstrumentationsTest shard1 = createInstalledInstrumentationsTest();\n shard1.setDevice(mMockTestDevice);\n shard1.setShardIndex(1);\n shard1.setTotalShards(2);\n\n // Run tests in first shard. There should be only two tests run: a test shard, and a\n // nonshardable test.\n\n shard0.run(mMockListener);\n assertEquals(2, mMockInstrumentationTests.size());\n assertEquals(nonshardableTestPkg1, mMockInstrumentationTests.get(0).getPackageName());\n assertEquals(shardableTestPkg, mMockInstrumentationTests.get(1).getPackageName());\n assertEquals(\"0\", mMockInstrumentationTests.get(1).getInstrumentationArg(\"shardIndex\"));\n assertEquals(\"2\", mMockInstrumentationTests.get(1).getInstrumentationArg(\"numShards\"));\n mMockInstrumentationTests.clear();\n\n // Run tests in second shard. All tests should be accounted for.\n shard1.run(mMockListener);\n assertEquals(2, mMockInstrumentationTests.size());\n assertEquals(nonshardableTestPkg2, mMockInstrumentationTests.get(0).getPackageName());\n assertEquals(shardableTestPkg, mMockInstrumentationTests.get(1).getPackageName());\n assertEquals(\"1\", mMockInstrumentationTests.get(1).getInstrumentationArg(\"shardIndex\"));\n assertEquals(\"2\", mMockInstrumentationTests.get(1).getInstrumentationArg(\"numShards\"));\n\n EasyMock.verify(mMockListener, mMockTestDevice);\n }",
"boolean isNeedSharding();",
"@org.junit.Test\r\n public void testSharding(){\n orderService.qryOrdersByUserIdFromMaster();\r\n orderService.qryOrdersByUserId();\r\n }",
"@Test\n public void testOperateForHotShardonSingleDimension() {\n // 4.1 No hot shard across an index\n hotShardRca.mockFlowUnits(\n Arrays.asList(\n RcaTestHelper.generateFlowUnitForHotShard(\n index.index_1.name(),\n shard.shard_1.name(),\n node.node_1.name(),\n 0.03,\n CriteriaEnum.CPU_UTILIZATION_CRITERIA,\n Resources.State.UNHEALTHY),\n RcaTestHelper.generateFlowUnitForHotShard(\n index.index_1.name(),\n shard.shard_1.name(),\n node.node_2.name(),\n 0.035,\n CriteriaEnum.CPU_UTILIZATION_CRITERIA,\n Resources.State.UNHEALTHY)));\n\n ResourceFlowUnit<HotClusterSummary> flowUnit1 = hotShardClusterRca.operate();\n Assert.assertFalse(flowUnit1.getResourceContext().isUnhealthy());\n Assert.assertTrue(flowUnit1.getSummary().getNestedSummaryList().isEmpty());\n\n // 4.2 hot shards across an index as per CPU Utilization, ie. : CPU_UTILIZATION >=\n // CPU_UTILIZATION_threshold\n hotShardRca.mockFlowUnits(\n Arrays.asList(\n RcaTestHelper.generateFlowUnitForHotShard(\n index.index_1.name(),\n shard.shard_1.name(),\n node.node_1.name(),\n 0.075,\n CriteriaEnum.CPU_UTILIZATION_CRITERIA,\n Resources.State.UNHEALTHY),\n RcaTestHelper.generateFlowUnitForHotShard(\n index.index_1.name(),\n shard.shard_2.name(),\n node.node_1.name(),\n 0.01,\n CriteriaEnum.CPU_UTILIZATION_CRITERIA,\n Resources.State.UNHEALTHY),\n RcaTestHelper.generateFlowUnitForHotShard(\n index.index_1.name(),\n shard.shard_1.name(),\n node.node_2.name(),\n 0.011,\n CriteriaEnum.CPU_UTILIZATION_CRITERIA,\n Resources.State.UNHEALTHY),\n RcaTestHelper.generateFlowUnitForHotShard(\n index.index_2.name(),\n shard.shard_1.name(),\n node.node_1.name(),\n 0.02,\n CriteriaEnum.CPU_UTILIZATION_CRITERIA,\n Resources.State.UNHEALTHY),\n RcaTestHelper.generateFlowUnitForHotShard(\n index.index_2.name(),\n shard.shard_2.name(),\n node.node_2.name(),\n 0.08,\n CriteriaEnum.CPU_UTILIZATION_CRITERIA,\n Resources.State.UNHEALTHY)));\n\n ResourceFlowUnit flowUnit2 = hotShardClusterRca.operate();\n Assert.assertTrue(flowUnit2.getResourceContext().isUnhealthy());\n\n Assert.assertEquals(1, flowUnit2.getSummary().getNestedSummaryList().size());\n GenericSummary nodeSummary = flowUnit2.getSummary().getNestedSummaryList().get(0);\n Assert.assertEquals(2, nodeSummary.getNestedSummaryList().size());\n List<Object> hotShard1 = nodeSummary.getNestedSummaryList().get(0).getSqlValue();\n List<Object> hotShard2 = nodeSummary.getNestedSummaryList().get(1).getSqlValue();\n\n // verify the resource type, cpu utilization value, node ID, Index Name, shard ID\n Assert.assertEquals(ResourceUtil.CPU_USAGE.getResourceEnumValue(), hotShard1.get(0));\n Assert.assertEquals(ResourceUtil.CPU_USAGE.getResourceEnumValue(), hotShard2.get(0));\n\n Assert.assertEquals(0.075, hotShard1.get(3));\n String[] nodeIndexShardInfo1 = hotShard1.get(8).toString().split(\" \");\n Assert.assertEquals(node.node_1.name(), nodeIndexShardInfo1[0]);\n Assert.assertEquals(index.index_1.name(), nodeIndexShardInfo1[1]);\n Assert.assertEquals(shard.shard_1.name(), nodeIndexShardInfo1[2]);\n\n Assert.assertEquals(0.08, hotShard2.get(3));\n String[] nodeIndexShardInfo2 = hotShard2.get(8).toString().split(\" \");\n Assert.assertEquals(node.node_2.name(), nodeIndexShardInfo2[0]);\n Assert.assertEquals(index.index_2.name(), nodeIndexShardInfo2[1]);\n Assert.assertEquals(shard.shard_2.name(), nodeIndexShardInfo2[2]);\n }",
"int getShard();",
"@Test\n public void testShardConfig_internal_shardIndex_notShardable_shard1() throws Exception {\n CommandOptions options = new CommandOptions();\n OptionSetter setter = new OptionSetter(options);\n setter.setOptionValue(\"disable-strict-sharding\", \"true\");\n setter.setOptionValue(\"shard-count\", \"5\");\n setter.setOptionValue(\"shard-index\", \"1\");\n mConfig.setCommandOptions(options);\n mConfig.setCommandLine(new String[] {\"empty\"});\n IRemoteTest test =\n new IRemoteTest() {\n @Override\n public void run(ITestInvocationListener listener)\n throws DeviceNotAvailableException {\n // do nothing.\n }\n };\n mConfig.setTest(test);\n assertEquals(1, mConfig.getTests().size());\n // We do not shard, we are relying on the current invocation to run.\n assertFalse(mHelper.shardConfig(mConfig, mContext, mRescheduler));\n // Rescheduled is NOT called because we use the current invocation to run the index.\n Mockito.verify(mRescheduler, Mockito.times(0)).scheduleConfig(Mockito.any());\n // We have no tests to put in shard-index 1 so it's empty.\n assertEquals(0, mConfig.getTests().size());\n }",
"@Test\n public void testShardConfig_internal_shardIndex_notShardable_shard0() throws Exception {\n CommandOptions options = new CommandOptions();\n OptionSetter setter = new OptionSetter(options);\n setter.setOptionValue(\"disable-strict-sharding\", \"true\");\n setter.setOptionValue(\"shard-count\", \"5\");\n setter.setOptionValue(\"shard-index\", \"0\");\n mConfig.setCommandOptions(options);\n mConfig.setCommandLine(new String[] {\"empty\"});\n IRemoteTest test =\n new IRemoteTest() {\n @Override\n public void run(ITestInvocationListener listener)\n throws DeviceNotAvailableException {\n // do nothing.\n }\n };\n mConfig.setTest(test);\n assertEquals(1, mConfig.getTests().size());\n // We do not shard, we are relying on the current invocation to run.\n assertFalse(mHelper.shardConfig(mConfig, mContext, mRescheduler));\n // Rescheduled is NOT called because we use the current invocation to run the index.\n Mockito.verify(mRescheduler, Mockito.times(0)).scheduleConfig(Mockito.any());\n assertEquals(1, mConfig.getTests().size());\n // Original IRemoteTest is the same since the test was not shardable\n assertSame(test, mConfig.getTests().get(0));\n }",
"public TestShardlet() {}",
"public void testSendingShardFailure() throws Exception {\n List<String> nodes = startCluster(3, 2);\n String masterNode = internalCluster().getMasterName();\n List<String> nonMasterNodes = nodes.stream().filter(node -> !node.equals(masterNode)).collect(Collectors.toList());\n String nonMasterNode = randomFrom(nonMasterNodes);\n assertAcked(prepareCreate(\"test\")\n .setSettings(Settings.builder()\n .put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 3)\n .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 2)\n ));\n ensureGreen();\n String nonMasterNodeId = internalCluster().clusterService(nonMasterNode).localNode().getId();\n\n // fail a random shard\n ShardRouting failedShard =\n randomFrom(clusterService().state().getRoutingNodes().node(nonMasterNodeId).shardsWithState(ShardRoutingState.STARTED));\n ShardStateAction service = internalCluster().getInstance(ShardStateAction.class, nonMasterNode);\n CountDownLatch latch = new CountDownLatch(1);\n AtomicBoolean success = new AtomicBoolean();\n\n String isolatedNode = randomBoolean() ? masterNode : nonMasterNode;\n NetworkPartition networkPartition = addRandomIsolation(isolatedNode);\n networkPartition.startDisrupting();\n\n service.localShardFailed(failedShard, \"simulated\", new CorruptIndexException(\"simulated\", (String) null), new\n ShardStateAction.Listener() {\n @Override\n public void onSuccess() {\n success.set(true);\n latch.countDown();\n }\n\n @Override\n public void onFailure(Exception e) {\n success.set(false);\n latch.countDown();\n assert false;\n }\n });\n\n if (isolatedNode.equals(nonMasterNode)) {\n assertNoMaster(nonMasterNode);\n } else {\n ensureStableCluster(2, nonMasterNode);\n }\n\n // heal the partition\n networkPartition.removeAndEnsureHealthy(internalCluster());\n\n // the cluster should stabilize\n ensureStableCluster(3);\n\n latch.await();\n\n // the listener should be notified\n assertTrue(success.get());\n\n // the failed shard should be gone\n List<ShardRouting> shards = clusterService().state().getRoutingTable().allShards(\"test\");\n for (ShardRouting shard : shards) {\n assertThat(shard.allocationId(), not(equalTo(failedShard.allocationId())));\n }\n }",
"FailoverShardResult failoverShard(FailoverShardRequest failoverShardRequest);",
"public void shard(int shard, int threads)\n throws IOException, ParseException, InterruptedException {\n checkArgument(\n shard >= 0 && shard < totalShards, \"Shard number must be between 0 and shards_total-1\");\n checkArgument(threads > 0, \"Need at least 1 thread\");\n checkOutputIsWriteable();\n initTime.reset();\n totalTime.reset();\n totalTime.start();\n System.out.printf(\"Starting on shard %d.\\n\", shard);\n\n try (SafeCut safeCut = new SafeCut(shards, mindexes, vcfPaths, threads, reference).setVerbose(verbose)) {\n\n int numShardsInFile = safeCut.numShards();\n checkArgument(\n totalShards <= numShardsInFile,\n \"'shards_total' must be at most the number of rows in the shards file\");\n checkArgument(\n numShardsInFile % totalShards == 0,\n \"'shards_total' must be a divisor of the number of rows in the shards file. Got \" + totalShards + \", there are \" + numShardsInFile + \" shards in the file.\");\n int shardsAtATime = numShardsInFile / totalShards;\n\n // 1. Find safe begin cut point.\n initTime.start();\n if (verbose) {\n System.out.println(\"Computing first cut.\");\n }\n safeCut.init(shard * shardsAtATime);\n initTime.stop();\n beginCut = safeCut.findSafeCut();\n if (verbose) {\n System.out.println(\" First cut: \" + beginCut);\n }\n beginOffsets = safeCut.getPreviousOffsets();\n\n // 2. Find safe end cut point.\n int endShard = (shard + 1) * shardsAtATime;\n if (endShard < totalShards * shardsAtATime) {\n // Normal case: find the safe cut.\n initTime.start();\n if (verbose) {\n System.out.println(\"computing second cut.\");\n }\n safeCut.init(endShard);\n initTime.stop();\n endCut = safeCut.findSafeCut();\n endOffsets = safeCut.getPreviousOffsets();\n } else {\n if (verbose) {\n System.out.println(\"No second cut, we go until end of file.\");\n }\n // Final shard: we'll copy until the end.\n ImmutableList.Builder<Long> builder = ImmutableList.builder();\n for (Path element : vcfPaths) {\n builder.add(Files.size(element));\n }\n endOffsets = builder.build();\n endCut = null;\n }\n\n System.out.printf(\n \"Safe cut points found (%s - %s), cutting.\\n\", beginCut, (endCut == null ? \"EOF\" : endCut));\n\n if (!skipWriting) {\n // 3. Copy shard, between the cut points.\n writeTime.reset();\n writeTime.start();\n contigs = safeCut.contigs();\n safeCut.close();\n int perWorker = (int) Math.ceil(vcfPaths.size() / (double) threads);\n ExecutorService exec =\n Executors\n .newFixedThreadPool(threads, new ThreadFactoryBuilder().setDaemon(true).build());\n ImmutableList.Builder<Future<Boolean>> doneBuilder = ImmutableList.builder();\n for (int start = 0; start < vcfPaths.size(); start += perWorker) {\n int sharderStart = start;\n SubsetSharder worker = new SubsetSharder(sharderStart, sharderStart + perWorker);\n doneBuilder.add(exec.submit(worker::copy));\n }\n ImmutableList<Future<Boolean>> done = doneBuilder.build();\n for (Future<Boolean> doneYet : done) {\n try {\n doneYet.get();\n } catch (ExecutionException x) {\n if (x.getCause() instanceof IOException) {\n throw (IOException) x.getCause();\n }\n if (x.getCause() instanceof ParseException) {\n throw (ParseException) x.getCause();\n }\n throw new RuntimeException(\"Unexpected error\", x);\n }\n }\n exec.shutdown();\n exec.awaitTermination(10, TimeUnit.SECONDS);\n writeTime.stop();\n System.out.printf(\"Done writing %d shards.\\n\", vcfPaths.size());\n } else {\n System.out.printf(\"Done. Not writing the %d shards to disk, as requested.\\n\", vcfPaths.size());\n }\n totalTime.stop();\n\n // empty metrics file name -> don't save metrics\n if (!metricsPath.toString().isEmpty()) {\n saveMetrics(shard, threads);\n } else {\n System.out.println(\"Metrics path not specified, skipping metrics.\");\n }\n }\n }",
"boolean hasShardInfo();",
"@Test\n public void testShardToSubtaskMappingWithCustomHashFunction() throws Exception {\n int totalCountOfSubtasks = 10;\n int shardCount = 3;\n for (int i = 0; i < 2; i++) {\n final int hash = i;\n final KinesisShardAssigner allShardsSingleSubtaskFn = ( shard, subtasks) -> hash;\n Map<String, Integer> streamToShardCount = new HashMap<>();\n List<String> fakeStreams = new LinkedList<>();\n fakeStreams.add(\"fakeStream\");\n streamToShardCount.put(\"fakeStream\", shardCount);\n for (int j = 0; j < totalCountOfSubtasks; j++) {\n int subtaskIndex = j;\n // subscribe with default hashing\n final TestableKinesisDataFetcher fetcher = new TestableKinesisDataFetcher(fakeStreams, new TestSourceContext(), new Properties(), new org.apache.flink.streaming.connectors.kinesis.serialization.KinesisDeserializationSchemaWrapper(new SimpleStringSchema()), totalCountOfSubtasks, subtaskIndex, new AtomicReference(), new LinkedList(), KinesisDataFetcher.createInitialSubscribedStreamsToLastDiscoveredShardsState(fakeStreams), FakeKinesisBehavioursFactory.nonReshardedStreamsBehaviour(streamToShardCount));\n Whitebox.setInternalState(fetcher, \"shardAssigner\", allShardsSingleSubtaskFn);// override hashing\n\n List<StreamShardHandle> shards = fetcher.discoverNewShardsToSubscribe();\n fetcher.shutdownFetcher();\n String msg = String.format(\"for hash=%d, subtask=%d\", hash, subtaskIndex);\n if (j == i) {\n Assert.assertEquals(msg, shardCount, shards.size());\n } else {\n Assert.assertEquals(msg, 0, shards.size());\n }\n }\n }\n }",
"@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }",
"@Test(timeout = 240000)\n public void testWriteSplitsToAccumuloAndReadThem() throws Exception {\n\n Configuration conf = new Configuration();\n conf.setInt(ShardIdFactory.NUM_SHARDS, 1);\n conf.setInt(ShardedTableMapFile.SHARDS_BALANCED_DAYS_TO_VERIFY, 1);\n String today = formatDay(0) + \"_1\";\n\n MiniAccumuloCluster accumuloCluster = null;\n try {\n SortedSet<Text> sortedSet = new TreeSet<>();\n sortedSet.add(new Text(today));\n accumuloCluster = createMiniAccumuloWithTestTableAndSplits(sortedSet);\n\n configureAccumuloHelper(conf, accumuloCluster);\n\n conf.set(ShardedDataTypeHandler.SHARDED_TNAMES,\n TABLE_NAME + \",shard_ingest_unit_test_table_1,shard_ingest_unit_test_table_2,shard_ingest_unit_test_table_3\");\n conf.set(TableConfigurationUtil.JOB_OUTPUT_TABLE_NAMES, TABLE_NAME);\n setWorkingDirectory(conf);\n ShardedTableMapFile.setupFile(conf);\n } finally {\n if (null != accumuloCluster) {\n accumuloCluster.stop();\n }\n }\n\n TreeMap<Text,String> result = ShardedTableMapFile.getShardIdToLocations(conf, TABLE_NAME);\n Assert.assertNotNull(result.get(new Text(today)).toString());\n Assert.assertEquals(1, result.size());\n }",
"public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }",
"@Override\n protected ShardIterator shards(ClusterState clusterState, InternalRequest request) {\n \tShardRouting primaryShardRouting = new ShardRouting(request.concreteIndex(), 0, clusterService.localNode().id(), true, ShardRoutingState.STARTED);\n \treturn new PlainShardIterator(primaryShardRouting.shardId(), Collections.singletonList(primaryShardRouting));\n }",
"public boolean isSharding() {\n return sharding;\n }",
"@Test\n public void affinityTest() {\n // TODO: test affinity\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Context should have been initialized and an instance of Foo created | @Test
public void testContextShouldInitalizeChildContexts() {
assertThat(Foo.getInstanceCount()).isEqualTo(1);
ApplicationContext ctx = springClientFactory.getContext("testspec");
assertThat(Foo.getInstanceCount()).isEqualTo(1);
Foo foo = ctx.getBean("foo", Foo.class);
assertThat(foo).isNotNull();
} | [
"public Context() {}",
"Context createContext();",
"public void testInitAccuracy() throws Exception {\r\n this.serviceContext = new ServiceContextMock();\r\n this.instance.init(this.serviceContext);\r\n assertEquals(\"Service context should be set.\", this.serviceContext, this.instance.getServiceContext());\r\n }",
"private AppContext()\n {\n }",
"private ContextFactory() {\n\n }",
"public abstract ApplicationLoader.Context context();",
"@Before\n public void setup() {\n context = new ContextImplementation();\n CoreRegistry.setContext(context);\n }",
"private ContextAction() {\n initFields();\n }",
"private static void assertContextInjected() {\n if (applicationContext == null) {\n throw new IllegalStateException(\"applicaitonContext attribute is not injected, please enter applicationContext\" +\n \"Define SpringContextHolder in .xml or register SpringContextHolder in SpringBoot startup class.\");\n }\n }",
"public void init(Context context) {\n this.mContext = context;\n vollyRequestManager = new VollyRequestManager(VolleyUtil.getInstance(mContext).getRequestQueue());\n }",
"private TabsContext createContext() {\n return new TabsContext();\n }",
"@Test\n public void contextGetIndependenceFromContextInterfaceImplementation() {\n assertEquals(CoreRegistry.get(Context.class), context);\n\n assertEquals(context.get(Context.class), null);\n }",
"public void initialize() {\r\n\t\tcontext.initialize();\r\n\t}",
"@Before\n public void init() {\n fb = new FizzBuzz();\n }",
"@Before\n public void setup(){\n context = getTargetContext();\n }",
"public MockPageContext() {\n super();\n MockPageContext.init();\n }",
"public void testGetServiceContextAccuracy() throws Exception {\r\n ServiceContext context = new ServiceContext();\r\n this.instance.setServiceContext(context);\r\n assertEquals(\"ServiceContext should match.\", context, this.instance.getServiceContext());\r\n }",
"public OgnlContext() {\n super();\n }",
"public Object createContext(ApplicationRequest request,\n ApplicationResponse response);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a signal corresponding to the passed state | public SignalBase getSignalForState(Integer state) {
Integer signalId = idForSignalFromState(state);
if(isSignalIdForDirectionProvider(signalId)) {
return (SignalBase)getSignalDirectionProviderForState(state, signalId);
}
return null;
} | [
"Signal getSignal();",
"java.lang.String getSignal();",
"public double getSignal() {return _signal;}",
"public OtuSignalType signalType();",
"public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}",
"com.google.analytics.admin.v1alpha.GoogleSignalsState getState();",
"abstract public String getSignalString();",
"public jigl.signal.Signal getSignal() {\n\t\treturn jsignal;\n\t}",
"public static Signal obtain() {\n return new Signal();\n }",
"String getSignalName();",
"private void generateSignal() {\n }",
"lyd.ai.ml.dataflow.protocol.Calls.SignalingEvent getSignalingEvent();",
"public State fromState();",
"public interface SignalSource {\r\n\t\r\n\t/**\r\n\t * Returns the number of output signals from the device\r\n\t * @return the number of signals (>0)\r\n\t */\r\n\tpublic int getNumberOfSignals();\r\n\t\r\n\t/**\r\n\t * Returns index:th signal's signal name\r\n\t * @param index signal index\r\n\t * @return name of the signal\r\n\t */\r\n\tpublic String getSignalName(int index);\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns index for signal name (signal number)\r\n\t * @param name the name of the signal\r\n\t * @return signal index\r\n\t */\r\n\tpublic int getSignalNameNumber(String name);\r\n\t\r\n\t/**\r\n\t * Returns current value of the signal\r\n\t * @param index signal index\r\n\t * @return value of the signal [0,1]\r\n\t */\r\n\tpublic float getSignalValue(int index);\r\n\r\n}",
"public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 if (bs.isValidUtf8()) {\n signal_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\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 if (bs.isValidUtf8()) {\n signal_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"int getState();",
"public String getSignalName(int index);",
"public SignalType signalType() {\n return this.signalType;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Feature: previous getter for previous gets the annotation that preceded this diagnosis before rule application, if any | public Annotation getPrevious() {
return (Annotation)(_getFeatureValueNc(wrapGetIntCatchException(_FH_previous)));
} | [
"public void setPrevious(Annotation v) {\n _setFeatureValueNcWj(wrapGetIntCatchException(_FH_previous), v);\n }",
"public KnownVehicle getPrevious() {\r\n\t\treturn previous_;\r\n\t}",
"public String getPrevious() {\r\n\t\treturn previous;\r\n\t}",
"public Train getPrev() {\n\t\treturn this.prev;\n\t}",
"public AStarNode getPrevious() {\n return previous;\n }",
"public TrainCarNode getPrevious() {\n return previous;\n }",
"public IEvent getPreviousEvent();",
"public DSAGraphNode<E> getPrevious()\n {\n return previous;\n }",
"public State getPrevious() {\n return previous;\n }",
"@Override\r\n public int previousIndex() {\r\n if (previous == null) {\r\n return -1;\r\n }\r\n return previousIndex;\r\n }",
"SolutionChange getPreviousChange();",
"public Segment prev() {\n return prev;\n }",
"public int getBefore()\n {\n return this.before;\n }",
"public long\tgetOldPKClassifyEvent()\r\n{\r\n\treturn getData(\"PKClassifyEvent\").getPreviouslong();\r\n}",
"public double getYPrevious()\r\n\t{\r\n\t\treturn yPrevious;\r\n\t}",
"public List<AnnotationVertex> getAnnotations() {\n return previousLineAnnotations.get();\n }",
"public int getPrevArmies() {\r\n\t\treturn prevArmies;\r\n\t}",
"String getPrevStep();",
"@Override public boolean hasPrevious() {\n \n return this.anterior != null ? true : false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To get the alt attribute of the html element (ex : input, area, ...) | String alt(Component component) {
return evaluator.attribute(component.id(), Attribute.alt);
} | [
"public final String getAltAttribute() {\n return getAttributeValue(\"alt\");\n }",
"@JsxGetter(@WebBrowser(IE))\n public String getAlt() {\n final String alt = getDomNodeOrDie().getAttribute(\"alt\");\n return alt;\n }",
"public String getAltTag() {\n return altTag;\n }",
"public java.lang.String getAlt() {\n return alt;\n }",
"public int getALT() {\n return alt;\n }",
"public void setAlt(String alt) {\n DOM.setElementAttribute(getElement(), \"alt\", alt);\n }",
"public void setAlt(String alt) {\r\n this.alt = alt;\r\n }",
"public void setAlt(String alt) {\r\r\n this.alt = alt;\r\r\n }",
"public Double getAlt() {\r\n\t\treturn alt;\r\n\t}",
"public String getAlt_ext() {\r\n return (String) get(\"alt_ext\");\r\n }",
"@Test\n public void imageAltTextExists()\n {\n String html = \"<html><head><title>First parse</title></head>\"\n + \"<body><img alt=\\\"This is alt text\\\"></img><img alt></img><p>Parsed HTML into a doc.</p></body></html>\";\n\n Document doc = Jsoup.parse(html);\n\n Elements images = doc.getElementsByTag(\"img\");\n\n // iterate through images...\n for (Element img : images) {\n String value = img.attr(\"alt\");\n System.out.println(\"Value: \" + value);\n }\n\n assertThat(images.get(0).attr(\"alt\"), is(not(Matchers.emptyString())));\n assertThat(images.get(1).attr(\"alt\"), is((Matchers.emptyString())));\n }",
"public String getImageAltText() {\r\n\t\tString imageAltText = this.imageAltText;\r\n\t\tif(null == imageAltText) {\r\n\t\t\timageAltText = CommonUtil.getAssetAltText(this.resourceResolver, this.imagePath);\r\n\t\t}\r\n\t\treturn imageAltText;\r\n\t}",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.AltText getAltText() {\r\n return altText;\r\n }",
"public String getAltText()\n {\n return configuration.altText;\n }",
"public String getItemIconAlternateText(Object itemId) {\n String storedAlt = itemIconAlts.get(itemId);\n return storedAlt == null ? \"\" : storedAlt;\n }",
"public String getEmailAlt() {\n\t\t\treturn emailAlt;\n\t\t}",
"public String getXPageAlt();",
"@Nullable private String getAltText() {\n\n //\n // First see what the user tried\n //\n String value = altTxt;\n if (null != value && 0 != value.length()) {\n return value;\n }\n\n //\n // Try the request\n //\n value = getServiceName();\n if (null != value && 0 != value.length()) {\n return value;\n }\n\n return DEFAULT_ALT_TXT;\n }",
"public void setALT(int value) {\n this.alt = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Our private constructor so only a static "factory" method from this class can create a SingletonScrabble instance | private SingletonScrabble(){
} | [
"private SingletonPattern() {\n\t\t\n\t}",
"private HelloSingleton() {\r\n\t}",
"private OnlyOneInstance () { }",
"private J2_Singleton() {}",
"private BleUtility() {\n }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"private HibernateUtilSingleton() {\n\n\t}",
"private ICATAdminSingleton() {\n }",
"private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}",
"private CSQuickBornPlant() {}",
"private ShapeColorSingleton() {\r\n\r\n }",
"private SingletonStatementGenerator() {\n\t}",
"static public synchronized StandardCodes make() {\n\t\tif (singleton == null) singleton = new StandardCodes();\n\t\treturn singleton;\n\t}",
"private Commons() {\n super();\n }",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\n Class objectClass = LazyMethodSingleton.class;\n\n Constructor constructor = objectClass.getDeclaredConstructor();\n constructor.setAccessible(true);\n\n LazyMethodSingleton instance = LazyMethodSingleton.getInstance();\n LazyMethodSingleton newInstance = (LazyMethodSingleton) constructor.newInstance();\n\n// HungrySingleton instance = HungrySingleton.getInstance();\n// HungrySingleton newInstance = (HungrySingleton) constructor.newInstance();\n\n// LazyStaticInnerClassSingleton instance = LazyStaticInnerClassSingleton.getInstance();\n// LazyStaticInnerClassSingleton newInstance = (LazyStaticInnerClassSingleton) constructor.newInstance();\n\n System.out.println(instance);\n System.out.println(newInstance);\n System.out.println(instance == newInstance);\n\n\n\n\n }",
"private JDBCSingleton() {\n\t}",
"private FiltriUscitaFactory() {\n }",
"Instance createInstance();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build the Hugo site through hugo cmd line | private void hugoBuild(@Nonnull Run<?, ?> run, Launcher launcher, TaskListener listener, @Nonnull FilePath workspace)
throws IOException, InterruptedException
{
PrintStream logger = listener.getLogger();
EnvVars env = run.getEnvironment(listener);
String hugoCmd;
if(getHugoHome() == null || "".equals(getHugoHome().trim()))
{
hugoCmd = "hugo";
}
else
{
hugoCmd = getHugoHome() + "hugo";
}
launcher.launch().cmds(hugoCmd).envs(env).stdout(logger).stderr(logger);
} | [
"public void execute()\n throws MojoExecutionException\n {\n if ( templateDirectory == null )\n {\n siteRenderer.setTemplateClassLoader( SiteMojo.class.getClassLoader() );\n }\n else\n {\n try\n {\n URL templateDirectoryUrl = new URL( templateDirectory );\n \n URL[] urls = {templateDirectoryUrl};\n \n URLClassLoader urlClassloader = new URLClassLoader( urls );\n \n siteRenderer.setTemplateClassLoader( urlClassloader );\n }\n catch ( MalformedURLException e )\n {\n throw new MojoExecutionException( templateDirectory + \" isn't a valid URL.\", e );\n }\n }\n \n if ( attributes == null )\n {\n attributes = new HashMap();\n }\n \n if ( attributes.get( \"project\" ) == null )\n {\n attributes.put( \"project\", project );\n }\n \n if ( attributes.get( \"outputEncoding\" ) == null )\n {\n attributes.put( \"outputEncoding\", outputEncoding );\n }\n \n List reports = filterReports( this.reports );\n \n Map categories = categorizeReports( reports );\n \n Comparator reportComparator = new ReportComparator();\n List projectInfos = Collections.sort( (List) categories.get( MavenReport.CATEGORY_PROJECT_INFORMATION ), reportComparator );\n List projectReports = Collections.sort( (List) categories.get( MavenReport.CATEGORY_PROJECT_REPORTS ), reportComparator );\n \n if ( projectInfos == null )\n {\n projectInfos = Collections.EMPTY_LIST;\n }\n \n if ( projectReports == null )\n {\n projectReports = Collections.EMPTY_LIST;\n }\n \n try\n {\n List localesList = initLocalesList();\n if ( localesList.isEmpty() )\n {\n localesList = Collections.singletonList( Locale.ENGLISH );\n }\n \n // Default is first in the list\n Locale defaultLocale = (Locale) localesList.get( 0 );\n Locale.setDefault( defaultLocale );\n \n for ( Iterator iterator = localesList.iterator(); iterator.hasNext(); )\n {\n Locale locale = (Locale) iterator.next();\n \n File outputDirectory = getOutputDirectory( locale, defaultLocale );\n \n // Safety\n if ( !outputDirectory.exists() )\n {\n outputDirectory.mkdirs();\n }\n \n // Generate static site\n File siteDirectoryFile = siteDirectory;\n if ( !locale.getLanguage().equals( defaultLocale.getLanguage() ) )\n {\n siteDirectoryFile = new File( siteDirectory, locale.getLanguage() );\n }\n \n // Try to find duplicate files\n Map duplicate = new LinkedHashMap();\n String defaultExcludes = StringUtils.join( FileUtils.getDefaultExcludes(), \",\" );\n \n if ( siteDirectoryFile.exists() )\n {\n // TODO: avoid this hardcoding - the resources dir might be elsewhere. We should really test for duplicate targets, not guess at what source files will be html.\n // add the site's 'resources' directory to the default exclude list\n String actualExcludes = defaultExcludes + \",\" + \"resources/**\";\n \n tryToFindDuplicates( siteDirectoryFile, actualExcludes, duplicate );\n }\n \n // Handle the GeneratedSite Directory\n if ( generatedSiteDirectory.exists() )\n {\n tryToFindDuplicates( generatedSiteDirectory, defaultExcludes, duplicate );\n }\n \n // Exception if a file is duplicate\n String msg = createDuplicateExceptionMsg( duplicate, locale );\n if ( msg != null )\n {\n throw new MavenReportException( msg );\n }\n \n String siteDescriptor = getSiteDescriptor( reports, locale, projectInfos, projectReports );\n \n //Generate reports\n List generatedReportsFileName = Collections.EMPTY_LIST;\n if ( reports != null )\n {\n generatedReportsFileName =\n generateReportsPages( reports, locale, outputDirectory, defaultLocale, siteDescriptor );\n }\n \n //Generate overview pages\n if ( projectInfos.size() > 0 )\n {\n generateProjectInfoPage( siteDescriptor, locale, projectInfos, outputDirectory );\n }\n \n if ( projectReports.size() > 0 )\n {\n generateProjectReportsPage( siteDescriptor, locale, projectReports, outputDirectory );\n }\n \n // Try to generate the index.html\n String displayLanguage = locale.getDisplayLanguage( Locale.ENGLISH );\n if ( duplicate.get( \"index\" ) != null )\n {\n getLog().info( \"Ignoring the index file generation for the \" + displayLanguage + \" version.\" );\n }\n else\n {\n getLog().info( \"Generate an index file for the \" + displayLanguage + \" version.\" );\n generateIndexPage( siteDescriptor, locale, outputDirectory );\n }\n \n // Log if a user override a report file\n for ( Iterator it = generatedReportsFileName.iterator(); it.hasNext(); )\n {\n String reportFileName = (String) it.next();\n \n if ( duplicate.get( reportFileName ) != null )\n {\n getLog().info( \"Override the generated file \\\"\" + reportFileName + \"\\\" for the \" +\n displayLanguage + \" version.\" );\n }\n }\n \n siteRenderer.render( siteDirectoryFile, outputDirectory, siteDescriptor, template, attributes, locale );\n \n copyResources( outputDirectory );\n \n // Copy site resources\n if ( resourcesDirectory != null && resourcesDirectory.exists() )\n {\n copyDirectory( resourcesDirectory, outputDirectory );\n }\n \n // Copy the generated site in parent site if needed to provide module links\n if ( addModules )\n {\n MavenProject parentProject = project.getParent();\n if ( parentProject != null )\n {\n // TODO Handle user plugin configuration\n /* TODO: Not working, and would be better working as a top-level aggregation rather than pushing from the subprojects...\n File basedir = parentProject.getBasedir();\n if ( basedir != null )\n {\n String path = parentProject.getBuild().getDirectory() + \"/site/\" + project.getArtifactId();\n File parentSiteDir = new File( basedir, path );\n \n if ( !parentSiteDir.exists() )\n {\n parentSiteDir.mkdirs();\n }\n \n File siteDir = new File( outputDirectory );\n FileUtils.copyDirectoryStructure( siteDir, parentSiteDir );\n }\n else\n {\n getLog().info( \"Not using parent as it was not located on the filesystem\" );\n }\n */\n }\n }\n \n if ( generatedSiteDirectory.exists() )\n {\n siteRenderer.render( generatedSiteDirectory, outputDirectory, siteDescriptor, template, attributes,\n locale );\n }\n }\n }\n catch ( MavenReportException e )\n {\n throw new MojoExecutionException( \"Error during report generation\", e );\n }\n catch ( RendererException e )\n {\n throw new MojoExecutionException( \"Error during page generation\", e );\n }\n catch ( IOException e )\n {\n throw new MojoExecutionException( \"Error during site generation\", e );\n }\n }",
"@NotNull public static WebSite.Builder webSite() { return new WebSite.Builder(new HashMap<String,Object>()); }",
"void build(List<Website> sites);",
"private void generateIndexPage( String siteDescriptor, Locale locale, File outputDirectory )\n throws RendererException, IOException\n {\n String outputFileName = \"index.html\";\n \n SiteRendererSink sink = siteRenderer.createSink( siteDirectory, outputFileName, siteDescriptor );\n \n String title = i18n.getString( \"site-plugin\", locale, \"report.index.title\" ).trim() + \" \" + project.getName();\n \n sink.head();\n sink.title();\n sink.text( title );\n sink.title_();\n sink.head_();\n sink.body();\n \n sink.section1();\n sink.sectionTitle1();\n sink.text( title );\n sink.sectionTitle1_();\n \n sink.paragraph();\n if ( project.getDescription() != null )\n {\n // TODO How to handle i18n?\n sink.text( project.getDescription() );\n }\n else\n {\n sink.text( i18n.getString( \"site-plugin\", locale, \"report.index.nodescription\" ) );\n }\n sink.paragraph_();\n \n sink.body_();\n \n sink.flush();\n \n sink.close();\n \n File outputFile = new File( outputDirectory, outputFileName );\n \n siteRenderer.generateDocument( new OutputStreamWriter( new FileOutputStream( outputFile ), outputEncoding ),\n template, attributes, sink, locale );\n }",
"public MasterBuild(String[] args) {\n log(\"***** Starting automated build process *****\\n\");\n \n readBuildInfo();\n overwriteWithUserArguments(args);\n \n if (!buildInfoSpecified()) {\n usage();\n } \n }",
"public static void main(String[] args) {\n if (args.length != 2) {\n System.out.println(\"Usage: pass 2 arguments:\");\n System.out.println(\" first argument contains the path to a web application\");\n System.out.println(\" second argument contains the path to a webdefault.xml file.\");\n System.exit(1);\n }\n String path = args[0];\n String webDefault = args[1];\n File fpath = new File(path);\n if (!fpath.exists()) {\n System.out.println(\"Error: Web Application directory does not exist: \" + fpath);\n System.exit(1);\n }\n File fWebDefault = new File(webDefault);\n if (!fWebDefault.exists()) {\n System.out.println(\"Error: webdefault.xml file does not exist: \" + fWebDefault);\n System.exit(1);\n }\n fpath = new File(fpath, \"WEB-INF\");\n if (!fpath.exists()) {\n System.out.println(\"Error: Path does not exist: \" + fpath);\n System.exit(1);\n }\n // Keep Jetty silent for INFO messages.\n System.setProperty(\"org.eclipse.jetty.server.LEVEL\", \"WARN\");\n System.setProperty(\"org.eclipse.jetty.quickstart.LEVEL\", \"WARN\");\n boolean success = generate(path, fWebDefault);\n System.exit(success ? 0 : 1);\n }",
"Lighter build();",
"public interface JssgService {\n /** \n * Generate the static web site.\n */\n public void generate(boolean backup);\n\n /**\n * Init the directory structure.\n * Creates the following directory:\n * _posts/\n * _layout/\n * And a demo post and index landing page\n * _posts/yyyy-MM-dd-Hello.mkd\n * index.textile\n */\n public void init() throws IOException;\n}",
"default void buildMainGenerateAPIDocumentation() {\n if (!bach().project().settings().tools().enabled(\"javadoc\")) return;\n say(\"Generate API documentation\");\n var api = bach().folders().workspace(\"documentation\", \"api\");\n bach().run(buildMainJavadoc(api)).requireSuccessful();\n bach().run(buildMainJavadocJar(api)).requireSuccessful();\n }",
"SiteWriterTemplate startSites() throws Exception;",
"public static void ConvertToBuilt()\r\n\t{\r\n\t\t Browser.instance.findElement(exitButton).click();\r\n\t\tBuildBagsPage.goTo();\r\n\t\tBuildBagsPage.EmptyToBuilt();\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t \n\t\tAdvertisingReader add = new AdvertisingReader();\n\t\tManipulationFrontend mani = new ManipulationFrontend(add);\n\t\tmani.createAndShowGUI();\n\t\t//while true loop added - makes it possible to run project with ant\n\t\twhile(true){\n\t\t\t\n\t\t}\n\t\t\n\t\n\t}",
"public static void main(String[] args) {\n Log4J.force();\n // HACK: make DOTranslatorUtility happy\n System.setProperty(\"fedoraServerHost\", \"localhost\");\n System.setProperty(\"fedoraServerPort\", \"80\");\n if (args.length != 1) {\n System.out.println(Messages.GENERATOR_USAGE);\n System.exit(0);\n } else {\n if (args[0].equals(\"--help\")) {\n System.out.println(Messages.GENERATOR_HELP);\n System.exit(0);\n }\n try {\n Properties props;\n if (args[0].equals(\"--\")) {\n props = System.getProperties();\n } else {\n props = new Properties();\n props.load(new FileInputStream(args[0]));\n }\n new Generator(props).generateAll();\n } catch (FileNotFoundException e) {\n LOG.error(\"Configuration file not found: \" + args[0]);\n exitFatally();\n } catch (IllegalArgumentException e) {\n LOG.error(e.getMessage());\n exitFatally();\n // CHECKSTYLE:OFF\n } catch (Throwable th) {\n // CHECKSTYLE:ON\n LOG.error(\"Generator failed due to an unexpected error\", th);\n exitFatally();\n }\n }\n }",
"private static void addBuildStep( @Nonnull final Step step )\n {\n step.addTerminalMethod( \"build\", \"build\", REACT_NODE_CLASSNAME );\n }",
"default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }",
"public void generate() {\n renderGrammarFromTemplate();\n copyGrammar();\n parseGrammar();\n }",
"public interface BuildStep {\n Panino build();\n }",
"public interface SitemapGenerator {\r\n\r\n\tvoid create(String website, VisitedSubdomainsRepository visitedSubdomainsRepository);\r\n\r\n}",
"public void build() {\n\tFile f = new File(dirname);\n\tmdir = build(f);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "curvature" attribute | org.landxml.schema.landXML11.Clockwise xgetCurvature(); | [
"org.landxml.schema.landXML11.Clockwise.Enum getCurvature();",
"void xsetCurvature(org.landxml.schema.landXML11.Clockwise curvature);",
"void setCurvature(org.landxml.schema.landXML11.Clockwise.Enum curvature);",
"String getMinCurvatureRadiusAsString();",
"double getMinCurvatureRadius();",
"public double curvature()\n {\n return _rho;\n }",
"Double getMinCurvatureRadius();",
"@JSGetter\n public String getCurvedWkt() {\n return ((org.geotools.geometry.jts.CompoundCurve) getGeometry()).toCurvedText();\n }",
"org.apache.xmlbeans.XmlDouble xgetCantGradient();",
"public List<double[]> calculateCurvature(){\n List<double[]> values = new ArrayList<>();\n\n\n for(Node3D node: mesh.nodes){\n List<Triangle3D> t_angles = node_to_triangle.get(node);\n //all touching triangles.\n if(t_angles==null) continue;\n\n double[] curvature = getNormalAndCurvature(node, t_angles);\n double[] pt = node.getCoordinates();\n double mixedArea = calculateMixedArea(node);\n values.add(new double[]{\n pt[0], pt[1], pt[2],\n curvature[3],\n curvature[0], curvature[1], curvature[2],\n mixedArea\n });\n\n\n }\n return values;\n }",
"@Override\n\tpublic Boolean hasCurvature() {\n\t\treturn true;\n\t}",
"String getFlangeEdgeRadiusAsString();",
"private Vector getCurvatureSeg(Stroke theStroke)\n\t{\n\t\tdouble[] curvatureData = theStroke.getCurvatureData();\n\t\tm_curvatureSeg = new CurvatureBasedDetection(curvatureData);\n\t\tVector segPt_curvature = m_curvatureSeg.detectSegmentPoints();\n\t\treturn segPt_curvature;\n\t}",
"public ForwardRateVolatilitySurfaceCurvature() {\n\t\tsuper();\n\t}",
"@org.junit.Test\n public void getCurvatureTestCurve4() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(20, 20),\n new Vector(10, 30), new Vector(20, 30));\n assertEquals(0, curve.getCurvature(0).dot(new Vector(1, 0)), 0);\n assertEquals(0, curve.getCurvature(0.5).dot(new Vector(0, 1)), 0);\n assertEquals(0, curve.getCurvature(1).dot(new Vector(1, 0)), 0);\n }",
"String getWebEdgeRadiusAsString();",
"String getCx();",
"public float getBoundingRadius ();",
"public double getStartAngle()\n {\n return getAttributes().getStartAngle();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'EOPENACC Case'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseEOPENACCCase(EOPENACCCase object)
{
return null;
} | [
"public T caseEOPENACC(EOPENACC object)\n {\n return null;\n }",
"public T caseEOPENCLCase(EOPENCLCase object)\n {\n return null;\n }",
"public T caseEOPENCL(EOPENCL object)\n {\n return null;\n }",
"public T caseEOPENMPCase(EOPENMPCase object)\n {\n return null;\n }",
"public T caseExpr(Expr object)\n {\n return null;\n }",
"public T caseEnumStatement(EnumStatement object) {\n\t\treturn null;\n\t}",
"public T caseEHPC(EHPC object)\n {\n return null;\n }",
"public <C, EL> T caseEnumLiteralExp(EnumLiteralExp<C, EL> object) {\n return null;\n }",
"public T caseEnumLiteralOrStaticPropertyExpCS(EnumLiteralOrStaticPropertyExpCS object) {\r\n return null;\r\n }",
"public <C> T caseOCLExpression(OCLExpression<C> object) {\n return null;\n }",
"public T caseSwitch(Engine.Switch object) {\n\t\treturn null;\n\t}",
"public T caseEnum(uws.engage.dsl.assess.Enum object)\n {\n return null;\n }",
"public T caseTERM(TERM object)\n {\n return null;\n }",
"public T caseExpression(Expression object)\n {\n return null;\n }",
"public T caseCharEnum(CharEnum object)\n {\n return null;\n }",
"public T caseExpressionStatement(ExpressionStatement object) {\n\t\treturn null;\n\t}",
"public T caseAdvance(Advance object) {\n\t\treturn null;\n\t}",
"public T caseStatement(Statement object)\n {\n return null;\n }",
"public T caseEnumLiteral(EnumLiteral object)\n {\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setup the node name filter handler | private NodeRecordFilter makeNodeNameFilterHandler() {
final WindowReference windowReference = _mainWindowReference;
final JTextField nodeFilterField = (JTextField)windowReference.getView( "NodeFilterField" );
final NodeRecordNameFilter nameFilter = new NodeRecordNameFilter();
final FreshProcessor nodeFilterProcessor = new FreshProcessor();
nodeFilterField.getDocument().addDocumentListener( new DocumentListener() {
public void changedUpdate( final DocumentEvent event ) {
nodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );
}
public void insertUpdate( final DocumentEvent event ) {
nodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );
}
public void removeUpdate( final DocumentEvent event ) {
nodeFilterProcessor.post( new NodeNameFilterOperation( nodeFilterField.getText(), nameFilter) );
}
});
final JButton clearButton = (JButton)windowReference.getView( "NodeNameFilterClearButton" );
clearButton.addActionListener( new ActionListener() {
public void actionPerformed( final ActionEvent event ) {
nodeFilterField.setText( "" );
}
});
return nameFilter;
} | [
"public FNameFilter() {\r\n }",
"private void setFilterMapping() {\n try {\n XPath xpath = XPathFactory.newInstance().newXPath();\n Element eleFltMapping = (Element) xpath.\n \t\t evaluate(Messages.exprFltMapping,\n \t\t\t\t doc, XPathConstants.NODE);\n if (eleFltMapping == null) {\n Element filterMapping = doc.\n \t\t createElement(Messages.filterMapTag);\n Element filterName = doc.createElement(Messages.filterEle);\n filterName.setTextContent(Messages.acsfilter);\n filterMapping.appendChild(filterName);\n\n Element urlPattern = doc.createElement(Messages.urlPatternTag);\n urlPattern.setTextContent(\"/*\");\n filterMapping.appendChild(urlPattern);\n doc.getDocumentElement().appendChild(filterMapping);\n }\n } catch (Exception ex) {\n \tActivator.getDefault().log(ex.getMessage(), ex);\n }\n\n }",
"protected void visit_name(ITreeNode node)\n {\n // You should *not* place your code right here. \n // Instead, you should override this method via a subclass.\n visitUnknown(node); // Default Behavior\n }",
"private void populateFilter() throws TransformerConfigurationException\r\n\t{\r\n\t\tthis.filter = new AddressSet(\"./filtered.xml\");\r\n\t\tthis.filter.addElement(\"postmaster\");\r\n\t\tthis.filter.addElement(\"uucp\");\r\n\t\tthis.filter.addElement(\"mailer-daemon\");\r\n\t\tthis.filter.addElement(\"maildaemon\");\r\n\t\tthis.filter.addElement(\"majordomo\");\r\n\t\tthis.filter.addElement(\"mailerdaemon\");\r\n\t\tthis.filter.addElement(\"abuse@\");\r\n\t\tthis.filter.addElement(\"-relay\");\r\n\t\tthis.filter.addElement(\"-request@\");\r\n\t}",
"public void setNodeAttributeFilter( AttributeFilter filter )\n \t{\n \t\tnodeAttributeFilter = filter;\n \t}",
"public Filter(String name) { \n\tthis.name = name;\n }",
"public void addNodeFilter (INodeFilter filter);",
"private void setNodeName(Node node, String name) {\n node.setName(name);\n node.setTitle(name);\n }",
"public NamespaceFilterTestCase(String name) {\n super(name);\n }",
"public void filterNodes(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_nodes.getChildren().clear();\n for (INode node : universe.getNodes()) {\n if (node.getID().contains(filter)) {\n parseNode(node, tree_nodes, filter);\n }\n }\n\n }",
"void filterChanged(String filter) {\n if (filter.isEmpty()) {\n treeView.setRoot(rootTreeItem);\n } else {\n TreeItem<FilePath> filteredRoot = createTreeRoot();\n filter(rootTreeItem, filter, filteredRoot);\n treeView.setRoot(filteredRoot);\n }\n }",
"static public void init() {\n XMLReader.registerFactory(XML_TAG, new SecNameFactory());\n }",
"public NameProductFilter(String filterPattern) {\n Objects.requireNonNull(filterPattern);\n this.filterPattern = filterPattern;\n }",
"@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n nodeName = localName;\n }",
"public static void setSpiceUseNodeNames(boolean u) { cacheSpiceUseNodeNames.setBoolean(u); }",
"void addBefore(String baseName, String name, Filter filter);",
"protected NamedHandler(String name) {\n\t\tif (name == null)\n\t\t\tname = \"\";\n\t\tthis.name = name;\n\t}",
"public abstract void setupDataFilter(DataFilter filter);",
"private static void checkNode(Node node){\n if(node != null){\n if(node.getSnames() == null || node.getSnames().isEmpty()){\n if(node.getName() != null){\n node.addSearchName(node.getName());\n }\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tests the getWeight method for item | public void testGetWeight()
{
assertEquals(2, item.getWeight(), 0.01);
} | [
"public void testWeight() {\n assertTrue(mTestItem.getWeight() == 0);\n mTestItem.setWeight(123);\n assertTrue(mTestItem.getWeight() == 123);\n }",
"public int getWeight(Item item) {\n\t\treturn weight.get(item);\n\t}",
"public int getItemWeight()\n {\n return weight;\n }",
"double getWeight();",
"public Weight getWeight();",
"double weigh(ITEM item, CONTEXT context, Options options);",
"public void testWeight() {\r\n\t\tassertEquals(\"b.getWeight should be [\" + BALL_WEIGHT + \"] but it is [\"\r\n\t\t\t\t+ b.getWeight() + \"] instead!\", BALL_WEIGHT, b.getWeight(),\r\n\t\t\t\tJUNIT_DOUBLE_DELTA);\r\n\t}",
"public float get_item_weight2(Integer item) {\n\t\treturn 0;\n\t}",
"@Test\n public void testGetWeight() {\n assertEquals(node.getWeight(), 2);\n }",
"public double getWeight(){\r\n\t\treturn this.weight;\r\n\t}",
"public int getWeight() {\n\t\tint weight = 0;\n\t\tItem item = null;\n\t\tSet<Item> items = inventory.keySet();\n\t\tIterator<Item> itr = items.iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\titem = itr.next();\n\t\t\tweight += item.getWeight() * inventory.get(item);\n\t\t}\n\t\treturn weight;\n\t}",
"public float get_item_weight1(Integer item) {\n\t\treturn 0;\n\t}",
"public double calculateItemValue() {\n return itemGain / weight;\n }",
"private void refreshWeight()\n\t{\n\t\tlong weight = 0;\n\n\t\tfor(final L2ItemInstance element : _items)\n\t\t\tweight += element.getItem().getWeight() * element.getCount();\n\n\t\tif(weight > Integer.MAX_VALUE)\n\t\t\t_totalWeight = Integer.MAX_VALUE;\n\t\telse\n\t\t\t_totalWeight = (int) weight;\n\t\t// notify char for overload checking\n\t\tonRefreshWeight();\n\t}",
"public abstract double getWeight(int v);",
"public int getWeight () {\n return weight;\n }",
"@Test\n public void testGetWeight() {\n assertEquals(strand.getWeight(), 2);\n strand.setWeight(4);\n assertEquals(strand.getWeight(), 4);\n }",
"@Test\r\n public void testGetWeight() {\r\n System.out.println(\"getWeight\");\r\n Address customerAddress1 = new Address(\"67 Torch Rd\", \"Tree line\", \"Mt High\", \"799\", new Coordinates(1102, 87));\r\n Customer c = new Customer(\"Andy Bravo\", customerAddress1);\r\n \r\n Address depotAddress = new Address(\"23 Good Luck St\", \"Blue View\", \"Sandy Shores\", \"H337\", new Coordinates(138, 995));\r\n Depot d = new Depot(\"Main Depot\", depotAddress);\r\n \r\n Manifest m = new Manifest();\r\n m.addProduct(new Product(\"Saw\", 5, true, false), 1);\r\n assertEquals(5, m.getTotalWeight(), 0.0);\r\n Manifest n = new Manifest();\r\n n.addProduct(new Product(\"Light Bulbs\", 1, false, true), 20);\r\n assertEquals(20, n.getTotalWeight(), 0.0);\r\n Manifest l = new Manifest();\r\n l.addProduct(new Product(\"Nails\", 1, false, false), 21);\r\n List<Box> instance = Packer.packProducts(c, d, m);\r\n for (Box b : instance) {\r\n System.out.println(b);\r\n }\r\n assertEquals(21, l.getTotalWeight(), 0.0);\r\n \r\n }",
"@Test\r\n public void testGetWeight() {\r\n System.out.println(\"getWeight\");\r\n int weight = 0;\r\n Polygon instance = new Polygon();\r\n instance.setWeight(weight);\r\n int expResult = weight;\r\n int result = instance.getWeight();\r\n assertEquals(expResult, result);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test getFileBytesIterator(String, String) method, if an exception occurs while performing the operation, throw FilePersistenceException. | public void testGetFileBytesIteratorFilePersistenceException() {
assertNotNull("setup fails", filePersistence);
try {
filePersistence.getFileBytesIterator(VALID_FILELOCATION, DIRNAME);
fail("if an exception occurs while performing the operation, throw FilePersistenceException");
} catch (FilePersistenceException e) {
// good
}
} | [
"public void testNextBytesFilePersistenceException() {\r\n BytesIterator iterator = new InputStreamBytesIterator(new MockInputStream(), 10);\r\n try {\r\n iterator.nextBytes();\r\n fail(\"if an exception occurs while performing the operation, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"public void testhasNextBytesFilePersistenceException() throws Exception {\r\n BytesIterator iterator = new InputStreamBytesIterator(new MockInputStream(), 10);\r\n try {\r\n iterator.hasNextBytes();\r\n fail(\"an exception occurs as inputStream is closed, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"public void testGetFileBytesIteratorSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String writeString = \"Hello World\";\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n filePersistence.appendBytes(fileCreationId, writeString.getBytes());\r\n filePersistence.closeFile(fileCreationId);\r\n assertTrue(\"the file should exist\", new File(VALID_FILELOCATION, FILENAME).exists());\r\n BytesIterator bytesIterator = filePersistence.getFileBytesIterator(VALID_FILELOCATION, FILENAME);\r\n assertTrue(\"as already append bytes to it, hasNextBytes method should return true\", bytesIterator\r\n .hasNextBytes());\r\n bytesIterator.dispose();\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n\r\n }",
"public void testDisposeFilePersistenceException() {\r\n BytesIterator iterator = new InputStreamBytesIterator(new MockInputStream(), 10);\r\n try {\r\n iterator.dispose();\r\n fail(\"if an exception occurs while performing the operation, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"public void testGetFileBytesIteratorIllegalArgumentException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.getFileBytesIterator(\" \", \"valid\");\r\n fail(\"if fileLocation is empty, throw IllegalArgumentException\");\r\n } catch (IllegalArgumentException e) {\r\n // good\r\n }\r\n try {\r\n filePersistence.getFileBytesIterator(\"valid\", \" \");\r\n fail(\"if persistenceName is empty, throw IllegalArgumentException\");\r\n } catch (IllegalArgumentException e) {\r\n // good\r\n }\r\n }",
"public void testGetFileBytesIteratorNullPointerException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.getFileBytesIterator(null, \"valid\");\r\n fail(\"if fileLocation is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n try {\r\n filePersistence.getFileBytesIterator(\"valid\", null);\r\n fail(\"if persistenceName is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }",
"public void testAppendBytesFilePersistenceException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.appendBytes(\"NotExist\", new byte[10]);\r\n fail(\"if no open output stream associate with the fileCreationId, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"public void testhasNextBytesSuccess() throws Exception {\r\n String text = \"A piece of text\";\r\n byte[] bytes = text.getBytes();\r\n InputStream is = new ByteArrayInputStream(bytes);\r\n BytesIterator iterator = new InputStreamBytesIterator(is, bytes.length + 1);\r\n assertTrue(\"Should have next Bytes\", iterator.hasNextBytes());\r\n iterator.nextBytes();\r\n assertFalse(\"Shouldn't have next Bytes\", iterator.hasNextBytes());\r\n is = new ByteArrayInputStream(new byte[0]);\r\n iterator = new InputStreamBytesIterator(is, 10);\r\n assertFalse(\"Shouldn't have next Bytes\", iterator.hasNextBytes());\r\n }",
"public void testNextBytesNoSuchElementException() throws Exception {\r\n InputStream is = new ByteArrayInputStream(new byte[0]);\r\n BytesIterator iterator = new InputStreamBytesIterator(is, 10);\r\n try {\r\n iterator.nextBytes();\r\n fail(\"if no more bytes can be read, throw NoSuchElementException\");\r\n } catch (NoSuchElementException e) {\r\n // good\r\n }\r\n }",
"public void testNextBytesSuccess() throws Exception {\r\n String text = \"A piece of text\";\r\n byte[] bytes = text.getBytes();\r\n InputStream is = new ByteArrayInputStream(bytes);\r\n BytesIterator iterator = new InputStreamBytesIterator(is, bytes.length + 1);\r\n byte[] nextBytes = iterator.nextBytes();\r\n assertEquals(\"returned nextBytes's size not correct\", nextBytes.length, bytes.length);\r\n for (int i = 0; i < bytes.length; i++) {\r\n assertEquals(\"byte of the returned nextBytes at index \" + i + \" not correct\", nextBytes[i], bytes[i]);\r\n }\r\n }",
"public void testCtorSuccess() throws Exception {\r\n String text = \"A piece of text\";\r\n byte[] bytes = text.getBytes();\r\n InputStream is = new ByteArrayInputStream(bytes);\r\n BytesIterator iterator = new InputStreamBytesIterator(is, 10);\r\n assertTrue(\"should have next bytes\", iterator.hasNextBytes());\r\n }",
"@Test\r\n public void test_performLogic_Failure1() throws Exception {\r\n try {\r\n UploadedDocument doc = new UploadedDocument();\r\n doc.setDocumentId(1);\r\n doc.setContestId(1);\r\n doc.setFileName(\"fake.txt\");\r\n doc.setPath(\"test_files\");\r\n doc.setMimeTypeId(new MimeTypeRetriever().getMimeTypeIdFromFileName(\"test_files/test.txt\"));\r\n List<UploadedDocument> docUploads = new ArrayList<UploadedDocument>();\r\n docUploads.add(doc);\r\n\r\n instance.performLogic(docUploads);\r\n fail(\"FileNotFoundException is expected\");\r\n } catch (FileNotFoundException e) {\r\n // success\r\n }\r\n }",
"public void testGetFileSizeIllegalArgumentException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.getFileSize(\" \", \"valid\");\r\n fail(\"if fileLocation is empty, throw IllegalArgumentException\");\r\n } catch (IllegalArgumentException e) {\r\n // good\r\n }\r\n try {\r\n filePersistence.getFileSize(\"valid\", \" \");\r\n fail(\"if persistenceName is empty, throw IllegalArgumentException\");\r\n } catch (IllegalArgumentException e) {\r\n // good\r\n }\r\n }",
"public void testAppendBytesIllegalArgumentException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.appendBytes(\" \", new byte[0]);\r\n fail(\"if fileCreationId is empty, throw IllegalArgumentException\");\r\n } catch (IllegalArgumentException e) {\r\n // good\r\n }\r\n }",
"public void testCreateFileFilePersistenceException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.createFile(VALID_FILELOCATION, DIRNAME);\r\n fail(\"if an exception occurs while performing the operation, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n try {\r\n filePersistence.createFile(VALID_FILELOCATION, READONLYFILENAME);\r\n fail(\"if an exception occurs while performing the operation, throw FilePersistenceException\");\r\n } catch (FilePersistenceException e) {\r\n // good\r\n }\r\n }",
"@Test\n public void testRead_byteArr() throws Exception {\n System.out.println(\"read\");\n final String unit = \"TEST_STRING\";\n List<String> strings = new ArrayList<>(1000);\n for (int i = 0; i < strings.size(); i++) {\n strings.set(i, unit);\n }\n IteratorInputStream instance = new IteratorInputStream<String>(strings.iterator()) {\n @Override\n protected InputStream inputStreamProvider(String item) throws NoSuchElementException {\n return new ByteArrayInputStream(item.getBytes());\n }\n };\n for (int i = 0; i < strings.size(); i++) {\n assertEquals(unit.length(), instance.read(new byte[unit.length()]));\n }\n assertEquals(-1, instance.read());\n }",
"@Test\n public void testWriteReadBytesToFile() throws Exception {\n File testFile = new File(\"byteutils_test.bin\");\n testFile.deleteOnExit();\n \n ByteUtils.writeBytesToFile(testFile, testBytes);\n byte[] bytes = ByteUtils.readBytesFromFile(testFile);\n \n assertArrayEquals(testBytes, bytes);\n }",
"@Test\n\tpublic void testGetFileAsStream_2()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tlong companyId = 1L;\n\t\tlong repositoryId = 1L;\n\t\tString fileName = \"\";\n\n\t\tInputStream result = fixture.getFileAsStream(companyId, repositoryId, fileName);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t\tassertNotNull(result);\n\t}",
"@Test\n\tpublic void testGetFileAsStream_3()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tlong companyId = 1L;\n\t\tlong repositoryId = 1L;\n\t\tString fileName = \"\";\n\n\t\tInputStream result = fixture.getFileAsStream(companyId, repositoryId, fileName);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t\tassertNotNull(result);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
performAction implementation: ask to the player which weapon he want to discard | @Override
public Event performAction(RemoteView remoteView) {
return remoteView.weaponDiscardChoice(getWeapons());
} | [
"public abstract Result attack(Weapon weapon);",
"public static void attackSelectorPlayer(Player play, Entity enemy) {\r\n\t\tSystem.out.println(\"Choose your action: Enter number of choice\");\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tint resp; // user response\r\n\t\tswitch(play.getType()) {\r\n\t\tcase \"Fighter\":\r\n\t\t\tSystem.out.println(\"1. Swing Sword\"); \r\n\t\t\tSystem.out.println(\"2. Stab Dagger\");\r\n\t\t\tSystem.out.println(\"3. Use Shield\");\r\n\r\n\t\t\t// convert back to fighter object\r\n\t\t\tif (!(play instanceof Fighter)) {\r\n\t\t\t\tSystem.out.println(\"Error: Player Attack Selection\");\r\n\t\t\t\tSystem.exit(3);\r\n\t\t\t}\r\n\t\t\tFighter fig = (Fighter) play;\r\n\r\n\t\t\tswitch (resp = getAttackAction()) {\r\n\t\t\tcase 1: \r\n\t\t\t\tfig.swingPrimaryWeapon(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: \r\n\t\t\t\tfig.swingSecondaryWeapon(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: \r\n\t\t\t\tfig.useShield();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase \"Rogue\":\r\n\t\t\tSystem.out.println(\"1. Swing Short Sword\"); \r\n\t\t\tSystem.out.println(\"2. Sneak Attack\");\r\n\t\t\tSystem.out.println(\"3. Sneak Past Enemy\");\r\n\r\n\t\t\t// convert back to Rouge object\r\n\t\t\tif (!(play instanceof Rogue)) {\r\n\t\t\t\tSystem.out.println(\"Error: Player Attack Selection\");\r\n\t\t\t\tSystem.exit(3);\r\n\t\t\t}\r\n\t\t\tRogue rg = (Rogue) play;\r\n\r\n\t\t\tswitch (getAttackAction()) {\r\n\t\t\tcase 1: \r\n\t\t\t\trg.swingPrimaryWeapon(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: \r\n\t\t\t\trg.sneakAttack(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: \r\n\t\t\t\trg.sneakPastEnemy(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase \"Paladin\":\r\n\t\t\tSystem.out.println(\"1. Swing Sword\"); \r\n\t\t\tSystem.out.println(\"2. Command Enemy\");\r\n\t\t\tSystem.out.println(\"3. Heal Yourself\");\r\n\r\n\t\t\t// convert back to Paladin object\r\n\t\t\tif (!(play instanceof Paladin)) {\r\n\t\t\t\tSystem.out.println(\"Error: Player Attack Selection\");\r\n\t\t\t\tSystem.exit(3);\r\n\t\t\t}\r\n\t\t\tPaladin pal = (Paladin) play;\r\n\r\n\t\t\tswitch (resp = getAttackAction()) {\r\n\t\t\tcase 1: \r\n\t\t\t\tpal.swingPrimaryWeapon(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: \r\n\t\t\t\tpal.command(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: \r\n\t\t\t\tpal.healSelf();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase \"Wizard\":\r\n\t\t\tSystem.out.println(\"1. Use Quarterstaff\"); \r\n\t\t\tSystem.out.println(\"2. Acid Throw\");\r\n\t\t\tSystem.out.println(\"3. Fire Blast\");\r\n\r\n\t\t\t// convert back to Wizard object\r\n\t\t\tif (!(play instanceof Wizard)) {\r\n\t\t\t\tSystem.out.println(\"Error: Player Attack Selection\");\r\n\t\t\t\tSystem.exit(3);\r\n\t\t\t}\r\n\t\t\tWizard wiz = (Wizard) play;\r\n\r\n\t\t\tswitch (resp = getAttackAction()) {\r\n\t\t\tcase 1: \r\n\t\t\t\twiz.swingPrimaryWeapon(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: \r\n\t\t\t\twiz.acidThrow(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: \r\n\t\t\t\twiz.burningHands(enemy);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"@Override\n public Event weaponDiscardChoice(ArrayList<String> yourWeapon) {\n int weaponSelected;\n System.out.println(Color.ANSI_BLACK_BACKGROUND.escape() + Color.ANSI_GREEN.escape() + \"You choose to discard one weapon:\");\n weaponSelected = CLIHandler.arraylistPrintRead(yourWeapon);\n return new WeaponDiscardChoiceEvent(getUser(), yourWeapon.get(weaponSelected));\n }",
"public void equipSelectedWeapon() {\n }",
"private DrawDestinyToPowerOnlyEffect(Action action, String playerId) {\n super(action);\n _playerId = playerId;\n }",
"protected abstract void unequip();",
"private void doAction() {\n if (doer == null) {\n doer = currentPlayer.getFigureOnPos(clickb);\n }\n if (doer != null) switch (selectedAction) {\n case \"Attack\" -> executeAttack();\n case \"Move\" -> executeMove();\n case \"Heal\" -> executeHeal();\n }\n }",
"private boolean evaluateItem(EquipmentCard equipmentItem, Player victim) {\t\t\t\n\t\ttakeButton.setEnabled(false);\n\t\tnoUseLabel.setText(\"\");\n\t\t\t\t\n\t\t// Can't take item if it fits the following categories\n\t\tif (player.hasMalignMirror() && equipmentItem.isWeapon()) {\n\t\t\tnoUseLabel.setText(\"You can't use weapons in this battle.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\tif (!CardPlayManager.canCarryItem(player, equipmentItem)) {\n\t\t\tnoUseLabel.setText(\"You can't carry any more big items.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\tint bonus = equipmentItem.getBonus(player);\n\t\tremoveItems.clear();\n\t\t\n\t\t// Unequip any current items needed in order to equip and use the selected item\n\t\tString noEquipReason = player.equip(equipmentItem);\n\t\tif (noEquipReason.equals(\"Your hands are full.\")) {\n\t\t\tEquipmentCard lowestBonusItem = null;\n\t\t\tfor (EquipmentCard item : player.getEquippedItems()) {\n\t\t\t\tif (item != player.getCheatingItemCard()) {\n\t\t\t\t\tif (item.getEquipmentType() == EquipmentCard.EquipmentType.ONE_HAND) {\n\t\t\t\t\t\tif (lowestBonusItem == null || lowestBonusItem.getBonus(player) > item.getBonus(player))\n\t\t\t\t\t\t\tlowestBonusItem = item;\n\t\t\t\t\t}\n\t\t\t\t\telse if (item.getEquipmentType() == EquipmentCard.EquipmentType.TWO_HANDS) {\n\t\t\t\t\t\tlowestBonusItem = item;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tremoveItems.add(lowestBonusItem);\n\t\t}\n\t\telse if (noEquipReason.equals(\"You don't have two free hands.\")) {\n\t\t\tfor (EquipmentCard item : player.getEquippedItems()) {\n\t\t\t\tif (item != player.getCheatingItemCard()) {\n\t\t\t\t\tif (item.getEquipmentType() == EquipmentCard.EquipmentType.ONE_HAND)\n\t\t\t\t\t\tremoveItems.add(item);\n\t\t\t\t\telse if (item.getEquipmentType() == EquipmentCard.EquipmentType.TWO_HANDS) {\n\t\t\t\t\t\tremoveItems.add(item);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (noEquipReason.startsWith(\"You are already wearing\")) {\n\t\t\tEquipmentCard.EquipmentType takeType = equipmentItem.getEquipmentType();\n\t\t\tfor (EquipmentCard item : player.getEquippedItems()) {\n\t\t\t\tif (item != player.getCheatingItemCard()) {\n\t\t\t\t\tif (item.getEquipmentType() == takeType) {\n\t\t\t\t\t\tremoveItems.add(item);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (!noEquipReason.equals(\"\")) {\n\t\t\tnoUseLabel.setText(noEquipReason);\n\t\t\trefresh();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// If selected equipment item bonus minus bonus from any unequipped items is enough to win the battle,\n\t\t// then the card may be take, otherwise it cannot be taken.\n\t\tfor (EquipmentCard removeItem : removeItems)\n\t\t\tbonus -= removeItem.getBonus(player);\n\t\t\n\t\tboolean victimHadEquipped = victim.hasEquipped(equipmentItem);\n\t\tvictim.removeEquipmentItem(equipmentItem);\n\t\t\n\t\tif (battle.getPlayersLevel() + bonus > battle.getMonstersLevel())\n\t\t\ttakeButton.setEnabled(true);\n\t\telse if (battle.activePlayer.isWarrior() || (battle.isHelper() && battle.helper.isWarrior())) {\n\t\t\tif (battle.getPlayersLevel() + bonus == battle.getMonstersLevel())\n\t\t\t\ttakeButton.setEnabled(true);\n\t\t}\n\t\t\t\t\n\t\tvictim.addUnequippedItem(equipmentItem);\n\t\tif (victimHadEquipped)\n\t\t\tvictim.equip(equipmentItem);\n\t\t\n\t\treturn takeButton.isEnabled();\n\t}",
"@Override\n public void action() {\n while (turn.getPlayer().getFightDecision() == null){\n ;\n }\n FightDecision decision = turn.getPlayer().getFightDecision();\n if (decision== FightDecision.IGNORE){\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new MovePhase(y));\n }else{\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new FightPhase());\n }\n }",
"@Override\n public void doRemove()\n {\n Player target = p.getServer().getPlayer(targetID);\n if (target == null)\n return;\n\n // teleport them back to their original location\n target.teleport(originalLocation);\n\n // remove flying and immobolize effects\n for (O2EffectType effectType : additionalEffects)\n {\n Ollivanders2API.getPlayers().playerEffects.removeEffect(targetID, effectType);\n }\n }",
"public String itemDefenseAction() {\r\n\t\tPlayer p = CommonMethods.toPlayer(playerID, playerList);\r\n\t\t((Human) p).setShield(true);\r\n\t\treturn \"OK\";\r\n\r\n\t}",
"@Override\r\n\tpublic String attack() {\r\n\t\treturn \"Scissors \" + weapon.attack();\t\t\t\t\r\n\t}",
"void grabPlayerWeapon(Player player, String weapon, int r, int c) {\n // Here we select the spawnpoint from which remove the weapon grabbed\n getSpawnpointWeapons(r, c).remove(weapon);\n // then we add the weapon to player's wallet\n selectPlayer(player).getWallet().getLoadedWeapons().add(weapon);\n }",
"private void doCardAction(PotLuck potluck) {\n String action = potluck.getAction();\n switch (action) {\n case \"Bank pays player £20\":\n bank.withdraw(20);\n activePlayer.increaseBalance(20);\n SM.changeScene(View.GAME);\n break;\n case \"Bank pays player £50\":\n bank.withdraw(50);\n activePlayer.increaseBalance(50);\n SM.changeScene(View.GAME);\n break;\n case \"Bank pays player £100\":\n bank.withdraw(100);\n activePlayer.increaseBalance(100);\n SM.changeScene(View.GAME);\n break;\n case \"Bank pays player £200\":\n bank.withdraw(200);\n activePlayer.increaseBalance(200);\n SM.changeScene(View.GAME);\n break;\n case \"Player token moves backwards to Crapper Street\":\n activePlayer.setLocation(1);\n playerLocations.set(amountOfPlayers.indexOf(activePlayer), 1);\n SM.changeScene(View.GAME);\n break;\n case \"If fine paid, player puts £10 on free parking\":\n //FIX THIS CODE NEED TO ASK PLAYER\n FreeParkingPiece fpp = (FreeParkingPiece) board.getBoardLocations().get(20);\n fpp.setBalance(fpp.getBalance() + 10);\n activePlayer.increaseBalance(-10);\n checkIfBankrupt();\n break;\n case \"Player puts £50 on free parking\":\n FreeParkingPiece fpp2 = (FreeParkingPiece) board.getBoardLocations().get(20);\n fpp2.setBalance(fpp2.getBalance() + 50);\n activePlayer.increaseBalance(-50);\n checkIfBankrupt();\n break;\n case \"Bank pays £100 to the player\":\n bank.withdraw(100);\n activePlayer.increaseBalance(100);\n SM.changeScene(View.GAME);\n break;\n case \"Bank pays player £25\":\n bank.withdraw(25);\n activePlayer.increaseBalance(25);\n SM.changeScene(View.GAME);\n break;\n case \"Player receives £10 from each player\":\n amountOfPlayers.stream().map((p) -> {\n p.increaseBalance(-10);\n return p;\n }).forEachOrdered((_item) -> {\n activePlayer.increaseBalance(10);\n });\n SM.changeScene(View.GAME);\n break;\n case \"As the card says\":\n goToJail();\n SM.changeScene(View.GAME);\n break;\n case \"Player moves forwards to GO\":\n activePlayer.setLocation(0);\n passingGo();\n SM.changeScene(View.GAME);\n break;\n case \"Retained by the player until needed. No resale or trade value\":\n activePlayer.setGOJF(potluck);\n SM.changeScene(View.GAME);\n break;\n case \"Player pays £50 to the bank\":\n activePlayer.increaseBalance(-50);\n bank.deposit(50);\n SM.changeScene(View.GAME);\n break;\n case \"Player pays £100 to the bank\":\n activePlayer.increaseBalance(-100);\n checkIfBankrupt();\n bank.deposit(100);\n SM.changeScene(View.GAME);\n break;\n }\n }",
"public void attackWith(RpgItem item) {\r\n\t\tif(item.type == RpgItemType.Single_Use_Weapon) {\r\n\t\t\tinv.removeItem(item);\r\n\t\t\tequippedItem = null;\r\n\t\t} else if(item.type == RpgItemType.Spell) {\r\n\t\t\tmana -= item.manaConsumption;\r\n\t\t\tif(mana < 0) {\r\n\t\t\t\tmana = 0;\r\n\t\t\t\tSystem.out.print(\"Mana was consumed past 0...?\\n\");\r\n\t\t\t}\r\n\t\t\tif(item.effect != null) {\r\n\t\t\t\teffect = item.effect;\r\n\t\t\t\teffectTurns = item.effectTurns;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public Event performAction(RemoteView remoteView) {\n\n return remoteView.reloadChoice(getWeapons());\n }",
"@Override\n\tpublic void ActionByWarlock(Warlock w) {\n\t\tthis.receiveDamage(2*w.getAttack());\n\t}",
"public abstract void performAction(Individual victim) {\n\tvictim.health -= this.performance;\n}",
"public String itemAttackAction() {\r\n\t\tthis.updateAllJournals(\"Player \" + playerID + \" uses: Attack card.\");\r\n\t\tPlayer p = CommonMethods.toPlayer(playerID, playerList);\r\n\t\tp.setCanAttack(true);\r\n\t\tusedAttackCard = true;\r\n\t\treturn \"OK\";\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recursive helper method which returns a String representation of the BST rooted at current. An example of the String representation of the contents of a MovieTree is provided in the description of the above toString() method. | protected static String toStringHelper(BSTNode<Movie> current) {
String stringy = "";
if(current == null) {
return "";
}
stringy = stringy + toStringHelper(current.getLeft());
stringy = stringy + current.getData().toString() + "\n";
stringy = stringy + toStringHelper(current.getRight());
return stringy; // remove this statement.
} | [
"public String toStringTreeFormat() {\r\n \tStringBuilder s = new StringBuilder();\r\n \tpreOrderPrint (root, 0, s);\r\n \treturn s.toString();\r\n }",
"public String toTreeString() {\n return toTreeString(overallRoot);\n }",
"public String treeToString() {\n\t\treturn treeToString(false);\n\t}",
"public String levelwiseToString() {\r\n Node<E> cur;\r\n StringBuilder sb = new StringBuilder();\r\n levelQueue.add(root);\r\n if(root != null) {\r\n while(!levelQueue.isEmpty()) {\r\n cur = levelQueue.poll();\r\n sb.append(cur.data.toString());\r\n if(cur.left != null)\r\n levelQueue.add(cur.left);\r\n if(cur.right != null)\r\n levelQueue.add(cur.right);\r\n }\r\n }\r\n return sb.toString();\r\n \t }",
"public String toStringTree() {\n\t\tString s = toString();\n\t\tif (hasLeft()) {\n\t\t\ts += getLeft().toStringTree();\n\t\t} else {\n\t\t\ts += StringNode.formatEmptyRow(getLevel() + 1);\n\t\t}\n\t\tif (hasRight()) {\n\t\t\ts += getRight().toStringTree();\n\t\t} else {\n\t\t\ts += StringNode.formatEmptyRow(getLevel() + 1);\n\t\t}\n\n\t\treturn s;\n\t}",
"String getTreeString();",
"public static String printTree()\r\n {\r\n String result = \"\";\r\n for (String s: tree.toArrayList())\r\n result = result + \" \" + s;\r\n return result;\r\n }",
"public String toString() {\n StringBuilder sb = new StringBuilder();\n Node<T> current = leftMost;\n while (current != null) {\n sb.append(String.format(\"%s \", current.getInfo()));\n current = current.getRight();\n }\n return sb.toString();\n }",
"@Override\n public String toString () {\n StringBuilder sb = new StringBuilder ();\n traversePreOrder (root,sb);\n return sb.toString ();\n }",
"public String print()\n {\n int height = maxDepth(this.getRoot()); // get max height of tree\n String s = printLevel(this.getRoot(), 0);\n for(int i = 1; i < height; i++) // create string by finding payloads in each level\n {\n s += \"\\n\" + printLevel(this.getRoot(), i);\n }\n return s; // return string\n }",
"public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }",
"public String preorderToString() {\r\n StringBuilder sb = new StringBuilder();\r\n\tpreorderToString(sb, root);\r\n\treturn sb.toString();\r\n }",
"public String toStringAST() {\n\n LimitedStringBuilder builder = new LimitedStringBuilder();\n\n walk(root, builder);\n\n return builder.toString();\n }",
"public String toStringPreOrder()\r\n\t{\r\n\t\tString output = \"\";\r\n\t\t\r\n\t\toutput = buildStringPreOrder(root);\r\n\t\t\r\n\t\treturn output;\r\n\t}",
"@Override\n public String toString() { // display subtree in order traversal\n String output = \"[\";\n LinkedList<Node<T>> q = new LinkedList<>();\n q.add(this);\n while(!q.isEmpty()) {\n Node<T> next = q.removeFirst();\n if(next.leftChild != null) q.add(next.leftChild);\n if(next.rightChild != null) q.add(next.rightChild);\n output += next.data.toString();\n if(!q.isEmpty()) output += \", \";\n }\n return output + \"]\";\n }",
"public String formatAsTree() {\n\t\tint height = treeHeight();\n\t\tint maxWidth = 0;\n\t\tfor (int i = 1; i <= heap.size(); ++i) {\n\t\t\tObject thing = heap.peek(i);\n\t\t\tString s = thing + \"\";\n\t\t\tmaxWidth = Math.max(maxWidth, s.length());\n\t\t}\n\t\tif (maxWidth % 2 == 0)\n\t\t\tmaxWidth = maxWidth + 1;\n\t\tint frontier = (1 << (height-1)) & 0x7fffffff;\n\t\tString ans = \"\";\n\t\tList<Integer> lnodes = new LinkedList<Integer>();\n\t\tList<Integer> cnodes = new LinkedList<Integer>();\n\t\tif (heap.size() > 0)\n\t\t\tlnodes.add(1);\n\t\twhile (!lnodes.isEmpty()) {\n\t\t\twhile (!lnodes.isEmpty()) {\n\t\t\t\tint index = lnodes.remove(0);\n\t\t\t\tString e = index == -1 ? \"\" : \"\"+heap.peek(index);\n\t\t\t\tString s = formatEntry(e, maxWidth, frontier);\n\t\t\t\tans = ans + s;\n\t\t\t\tif (!lnodes.isEmpty()) {\n\t\t\t\t\tans = ans + \" \";\n\t\t\t\t}\n\t\t\t\tif (index != -1) {\n\t\t\t\t\tfor (int c : new int[] { getLeftChildIndex(index), getRightChildIndex(index) }) {\n\t\t\t\t\t\tif (c != -1) \n\t\t\t\t\t\t\tcnodes.add(c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = ans + \"\\n\";\n\t\t\tfrontier = frontier / 2;\n\t\t\tlnodes = cnodes;\n\t\t\tcnodes = new LinkedList<Integer>();\n\t\t}\n\n\t\treturn ans;\n\t}",
"public String toStringTree() {\n\t\treturn BinaryHeapFormatter.toStringTree(this, Integer.MAX_VALUE);\n\t}",
"public String inorderToString() {\r\n StringBuilder sb = new StringBuilder();\r\n\t inorderToString(sb, root);\r\n\t return sb.toString();\r\n }",
"public String breadthFirst() {\n\t\tArrayList<Node> remaining = new ArrayList<Node>();\n\t\tremaining.add(root);\n\t\treturn breadthFirst(remaining);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the PriorPremiums_amt field. | @gw.internal.gosu.parser.ExtendedProperty
public java.math.BigDecimal getPriorPremiums_amt() {
return (java.math.BigDecimal)__getInternalInterface().getFieldValue(PRIORPREMIUMS_AMT_PROP.get());
} | [
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getPriorPremiums_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(PRIORPREMIUMS_AMT_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public gw.pl.currency.MonetaryAmount getPriorPremiums() {\n return (gw.pl.currency.MonetaryAmount)__getInternalInterface().getFieldValue(PRIORPREMIUMS_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public gw.pl.currency.MonetaryAmount getPriorPremiums() {\n return (gw.pl.currency.MonetaryAmount)__getInternalInterface().getFieldValue(PRIORPREMIUMS_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getPriorTotalIncurred_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(PRIORTOTALINCURRED_AMT_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getPriorTotalIncurred_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(PRIORTOTALINCURRED_AMT_PROP.get());\n }",
"private void setPriorPremiums_amt(java.math.BigDecimal value) {\n __getInternalInterface().setFieldValue(PRIORPREMIUMS_AMT_PROP.get(), value);\n }",
"public void setPriorPremiums_amt(java.math.BigDecimal value) {\n __getInternalInterface().setFieldValue(PRIORPREMIUMS_AMT_PROP.get(), value);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.Currency getPriorPremiums_cur() {\n return (typekey.Currency)__getInternalInterface().getFieldValue(PRIORPREMIUMS_CUR_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.Currency getPriorPremiums_cur() {\n return (typekey.Currency)__getInternalInterface().getFieldValue(PRIORPREMIUMS_CUR_PROP.get());\n }",
"public void setPriorPremiums(gw.pl.currency.MonetaryAmount value) {\n __getInternalInterface().setFieldValue(PRIORPREMIUMS_PROP.get(), value);\n }",
"public void setPriorPremiums(gw.pl.currency.MonetaryAmount value) {\n __getInternalInterface().setFieldValue(PRIORPREMIUMS_PROP.get(), value);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getCededPremium_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(CEDEDPREMIUM_AMT_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getCededPremium_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(CEDEDPREMIUM_AMT_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public gw.pl.currency.MonetaryAmount getPriorTotalIncurred() {\n return (gw.pl.currency.MonetaryAmount)__getInternalInterface().getFieldValue(PRIORTOTALINCURRED_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public gw.pl.currency.MonetaryAmount getPriorTotalIncurred() {\n return (gw.pl.currency.MonetaryAmount)__getInternalInterface().getFieldValue(PRIORTOTALINCURRED_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getCededPremiumMarkup_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(CEDEDPREMIUMMARKUP_AMT_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getCededPremiumMarkup_amt() {\n return (java.math.BigDecimal)__getInternalInterface().getFieldValue(CEDEDPREMIUMMARKUP_AMT_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public gw.pl.currency.MonetaryAmount getCededPremium() {\n return (gw.pl.currency.MonetaryAmount)__getInternalInterface().getFieldValue(CEDEDPREMIUM_PROP.get());\n }",
"public BigDecimal getPremAmt() {\n\t\treturn premAmt;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves a hero to a point | public void moveToPoint(int x, int y) {
/**
* DO NOT EDIT THIS CODE TO REMOVE DUPLICATIONS IT WILL BREAK MULTIPLAYER
* SERIOUSLY JUST DO NOT DO IT
*
* DON'T DO IT
*
*
* JUST DON'T TOUCH THIS CODE AT ALL
*/
AbstractHero hero = map.getCurrentTurnHero();
// This short circuits but if it's not multiplayer the second statement will do nothing
if (map.moveEntity(map.getCurrentTurnHero(), x, y)) {
map.updateVisibilityArray();
visionChanged = true;
gameState.updateMovementGoal(x, y);
}
updateLiveTileEffectsOnCharacter(hero);
gameChanged = true;
minimapChanged = true;
visionChanged = true;
movementChanged = true;
centerMapOnCurrentHero();
} | [
"void moveHero(int x, int y) {\n setOnTile(heroC.getX(), heroC.getY(), false);\n // vector needed to aim\n setVector(x, y, heroC);\n setLastXYArray(heroC);\n //Log.i(\"dan\", \"SET VECTOR TO : \" + heroC.getVector());\n creatures.get(0).setX(x);\n creatures.get(0).setY(y);\n setOnTile(x, y, true);\n paintSquare(-1, -1);\n checkHeroHarrasing();\n checkEnemyDeath();\n addTurn();\n enemyTurn();\n saveGame(context, level, turn, creatures);\n }",
"void moveTo(Point whereToGo);",
"Point move(Direction direction);",
"private void moveHeroBy(double dx, double dy) {\n if (dx == 0 && dy == 0) {\n return; //if horizontal and vertical distances for which the hero is to be moved \n } //= 0, then return nothing (i.e do nothing)\n\n //get the width and height of the sprite, and divide it by 2 to get the distance \n //from the centre of the sprite to its edges \n final double cx = hero.getBoundsInLocal().getWidth() / 2;\n final double cy = hero.getBoundsInLocal().getHeight() / 2;\n\n //x and y are the new coordinates. hero.getLayout() is a javaFX function so returns\n //the coordinate of the top left of the sprite, so we need to add cx in order to get\n //the coordinate of the sprite centre. We also add dx and dy to perform the move. \n //Then we call moveHeroTo(x,y), which takes a desired centre point as its parametersm, \n //and actually moves the sprite.\n double x = cx + hero.getLayoutX() + dx;\n double y = cy + hero.getLayoutY() + dy;\n\n moveHeroTo(x, y);\n }",
"public void moveHero(Direction d) {\r\n\t\thero.move(d);\r\n\t}",
"public Place movePlayer( Place target );",
"public void move() {\n\t\tthis.loc = (new Point((int)(this.loc.getX() + this.speed*this.turns.getX()),\n\t\t\t\t(int)(this.loc.getY() + this.speed*this.turns.getY())));\n\t}",
"public void turnAround() {\n pos.turnAround();\n }",
"public void movePiece(Coordinate from, Coordinate to);",
"public void makeMove()\n {\n movementPoints--;\n }",
"public PlayerState move(UnitState unit, Point2i newPosition);",
"public void move(String player, int x, int y) {\n\t\t\n\t}",
"private void moveTowardsPoint(GPoint pt) {\n\t\tdouble dy = pt.getY() - img.getY();\n\t\tdouble dx = pt.getX() - img.getX();\n\t\tdouble dist = Math.sqrt(dx * dx + dy * dy);\n\t\tchoosePicture(dx);\n\t\tif(dist > MOVE_AMT) {\n\t\t\t// move MOVE_AMT pixels towards the goal\n\t\t\tdouble moveX = MOVE_AMT / dist * dx;\n\t\t\tdouble moveY = MOVE_AMT / dist * dy;\n\t\t\timg.move(moveX, moveY);\n\t\t} else {\n\t\t\t// you reached your goal! You no longer have a goal.\n\t\t\tdestination = getRandomGoal();\n\t\t}\n\t}",
"public void moveHero(EnumMoves movement) {\n\n\t\tint x_hero = hero.getXCoordinate();\n\t\tint y_hero = hero.getYCoordinate();\n\n\t\tif(movement == EnumMoves.LEFT) \n\t\t\ty_hero -= 1;\n\t\telse if(movement == EnumMoves.RIGHT)\t\n\t\t\ty_hero += 1;\n\t\telse if(movement == EnumMoves.UP)\n\t\t\tx_hero -= 1;\n\t\telse if(movement == EnumMoves.DOWN)\n\t\t\tx_hero += 1;\n\n\t\tif(canMoveHero(x_hero, y_hero)) {\n\t\t\thero.moveHero(x_hero, y_hero);\n\t\t\thero.setCharacter();\n\t\t}\n\n\t\tif(canMoveGuard)\n\t\t\tmoveVilans();\n\n\t\tcheckLostGame();\n\t}",
"public void driveTo(int targetPos);",
"public abstract void moveTo(int x, int y);",
"public void moveToSelected() {\n if (selectionX != -1) {\n // This short circuits but if it's not multiplayer the second statement will do nothing\n if (map.moveEntity(map.getCurrentTurnHero(), selectionX, selectionY) && multiplayerGameManager\n .hookPlayerMove(selectionX, selectionY)) {\n map.updateVisibilityArray();\n visionChanged = true;\n // See if this hero has moved on a position that meets any movement objectives\n gameState.updateMovementGoal(selectionX, selectionY);\n }\n }\n\n if (map.getCurrentTurnHero().getActionPoints() < 2) {\n nextTurn();\n }\n }",
"public void heroPosDoor(MyPlace dest, MyEntity door) {\n\n MyImageView d = dest.getDoor(door).view;\n int newX = d.x;\n int newY =d.y;\n\n if (newY == 0) {\n HERO_IM.x.setValue(newX);\n HERO_IM.y.setValue(newY + 1);\n }\n else if (newY == dest.getMaxYBound()) {\n HERO_IM.x.setValue(newX);\n HERO_IM.y.setValue(newY - 1);\n }\n else if (newX == dest.getMinXBound()) {\n HERO_IM.x.setValue(newX + 1);\n HERO_IM.y.setValue(newY);\n }\n else if (newX == dest.getMaxXBound()) {\n HERO_IM.x.setValue(newX - 1);\n HERO_IM.y.setValue(newY);\n }\n }",
"public void move() {\r\n\r\n // Choose a random direction each time move() is called.\r\n switch(direction) {\r\n case 0:\r\n _location.x++;\r\n break;\r\n case 1:\r\n _location.x--;\r\n break;\r\n case 2:\r\n _location.y++;\r\n break;\r\n case 3:\r\n _location.y--;\r\n break;\r\n default:\r\n break;\r\n }\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ID of the "basic authentication" secret stored in Sources. | Long getBasicAuthenticationSourcesId(); | [
"void setBasicAuthenticationSourcesId(Long basicAuthenticationSourcesId);",
"public String getBasicAuthKey() {\n String token = this.userInfo.getUserName() + \":\" + userInfo.getPassword();\n byte[] tokenBytes = token.getBytes(StandardCharsets.UTF_8);\n String encodedToken = new String(Base64.encodeBase64(tokenBytes), StandardCharsets.UTF_8);\n return (LAIntegrationTestConstants.BASIC + encodedToken);\n }",
"Long getSecretTokenSourcesId();",
"String getAuthenticationID();",
"public int getSecretId() {\r\n return secretId;\r\n }",
"public String secretId() {\n return this.secretId;\n }",
"public String getSecretid() {\n return secretid;\n }",
"java.lang.String getPasswordId();",
"String getServiceOwnerApiSecret();",
"java.lang.String getSecret();",
"String getSecret();",
"abstract public String getAuthenticationId();",
"String getServiceApiSecret();",
"Object getAuthInfoKey();",
"public String getPairingSecret(String hostId) {\n SharedPreferences prefs = mApplicationContext.getPreferences(Activity.MODE_PRIVATE);\n return prefs.getString(hostId + \"_secret\", \"\");\n }",
"public interface SourcesSecretable {\n /**\n * Get the contents of the secret token.\n * @return the contents of the secret token.\n */\n String getSecretToken();\n\n /**\n * Set the contents of the secret token.\n * @param secretToken the contents of the secret token.\n */\n void setSecretToken(String secretToken);\n\n /**\n * Get the ID of the \"secret token\" secret stored in Sources.\n * @return the ID of the secret.\n */\n Long getSecretTokenSourcesId();\n\n /**\n * Set the ID of the \"secret token\" secret stored in Sources.\n * @param secretTokenSourcesId the ID of the secret.\n */\n void setSecretTokenSourcesId(Long secretTokenSourcesId);\n\n /**\n * Get the basic authentication object.\n * @return the basic authentication object.\n */\n BasicAuthentication getBasicAuthentication();\n\n /**\n * Set the basic authentication object.\n * @param basicAuthentication the basic authentication object to be set.\n */\n void setBasicAuthentication(BasicAuthentication basicAuthentication);\n\n\n /**\n * Get the ID of the \"basic authentication\" secret stored in Sources.\n * @return the ID of the secret.\n */\n Long getBasicAuthenticationSourcesId();\n\n /**\n * Set the ID of the \"basic authentication\" secret stored in Sources.\n * @param basicAuthenticationSourcesId the ID of the secret.\n */\n void setBasicAuthenticationSourcesId(Long basicAuthenticationSourcesId);\n}",
"String getComponentAppSecret();",
"com.tshang.peipei.protocol.protobuf.ByteString getAuth();",
"String getAuthenticationKey();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for row height settings. | public Row setHeight(String height) {
if (jsBase == null) {
this.height = null;
this.height1 = null;
this.height = height;
} else {
this.height = height;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".height(%s)", wrapQuotes(height)));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".height(%s);", wrapQuotes(height)));
js.setLength(0);
}
}
return this;
} | [
"public void setRowHeight(double height) {\n setBarHeight(height);\n }",
"protected void setRowHeight (int rowHeight ){\r\n\t\tcancelEditing(tree);\r\n\t\tif(treeState != null) {\r\n\t\t\ttreeState.setRowHeight(rowHeight);\r\n\t\t\tupdateSize();\r\n\t\t}\r\n\t}",
"public void setRowHeight(int rowHeight) {\n\t\tsuper.setRowHeight(rowHeight);\n\t\tif(getTree() != null && getTree().getRowHeight() != rowHeight) {\n\t\t getTree().setRowHeight(getRowHeight());\n\t\t}\n\t}",
"public void setBodyRowHeight(double rowHeight) {\n\t\tgetGrid().setBodyRowHeight(rowHeight);\n\t}",
"public void setHeight(int value) {\n this.height = value;\n }",
"public void setHeight( int h );",
"public void setHeight(int value) { height = value; }",
"public void setHeight(int h) { fHeight = h; }",
"void setDefaultRowHeight(double points);",
"void setHeight(int height);",
"public final void setRowHeightPoint(java.lang.Integer rowheightpoint)\r\n\t{\r\n\t\tsetRowHeightPoint(getContext(), rowheightpoint);\r\n\t}",
"public int getRowHeight() {\n return rowHeight;\n }",
"public void setDyaRowHeight( int field_4_dyaRowHeight )\n {\n this.field_4_dyaRowHeight = field_4_dyaRowHeight;\n }",
"public void setRowSize() {\n \t\tfor (int i = 0; i < model.getRowCount(); i++) {\n \n \t\t\tthis.setRowHeight(i, 60);\n \t\t\tthis.setRowMargin(5);\n \t\t}\n \t\tSystem.out.println(\"Row count\" + getRowCount());\n \n \t}",
"public int getRowHeight()\n {\n return rowHeight;\n }",
"public void setHeight(int newValue)\n {\n height = newValue;\n }",
"@Override\n public void setRowHeight(int newRowHeight) {\n\tsuper.setRowHeight(newRowHeight);\n\tif (tree != null && tree.getRowHeight() != newRowHeight) {\n\t tree.setRowHeight(getRowHeight());\n\t}\n }",
"private void rescaleRowHeightIfExplicitlySet() {\n if (uiScaleWhenRowHeightSet != null && uiScaleWhenRowHeightSet != UiScaling.getScaling()) {\n\n // TODO: this may have rounding errors so may 'drift' after multiple changes.\n setRowHeight(getRowHeight() * UiScaling.getScaling() / uiScaleWhenRowHeightSet);\n }\n }",
"private void setHeight( int h )\n {\n this.height = h; //set the height\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the applicationSecurityGroups property: Application security groups in which the private endpoint IP configuration is included. | public PrivateEndpointPropertiesInner withApplicationSecurityGroups(
List<ApplicationSecurityGroupInner> applicationSecurityGroups) {
this.applicationSecurityGroups = applicationSecurityGroups;
return this;
} | [
"public VirtualMachineScaleSetUpdateIpConfigurationProperties withApplicationSecurityGroups(\n List<SubResource> applicationSecurityGroups) {\n this.applicationSecurityGroups = applicationSecurityGroups;\n return this;\n }",
"public List<ApplicationSecurityGroupInner> applicationSecurityGroups() {\n return this.applicationSecurityGroups;\n }",
"public List<SubResource> applicationSecurityGroups() {\n return this.applicationSecurityGroups;\n }",
"public void setSecurityGroups(List<Group> securityGroups) {\n this.securityGroups = securityGroups;\n }",
"public void setAvailableSecurityGroups(List<Group> availableSecurityGroups) {\n this.availableSecurityGroups = availableSecurityGroups;\n }",
"private static void initSecurityGroups() {\r\n Set<UserGroup> securityGroups = new HashSet<UserGroup>();\r\n user.setSecurityGroups(securityGroups);\r\n UserGroup userGroup = new UserGroup();\r\n SecurityGroup securityGroup = new SecurityGroup();\r\n Set<RegistrationType> registrationTypes = new HashSet<RegistrationType>();\r\n RegistrationType registrationType1 = new RegistrationType(1);\r\n RegistrationType registrationType2 = new RegistrationType(2);\r\n registrationTypes.add(registrationType1);\r\n registrationTypes.add(registrationType2);\r\n BaseStressTest.setFieldValue(\"registrationTypes\", registrationTypes, securityGroup, SecurityGroup.class);\r\n userGroup.setSecurityGroup(securityGroup);\r\n userGroup.setId(1L);\r\n userGroup.setSecurityStatusId(SecurityGroup.ACTIVE);\r\n securityGroups.add(userGroup);\r\n }",
"public List<Group> getSecurityGroups() {\n return this.securityGroups;\n }",
"public java.util.List<String> getSecurityGroups() {\n return securityGroups;\n }",
"public void setSecurityGroupSet(String [] SecurityGroupSet) {\n this.SecurityGroupSet = SecurityGroupSet;\n }",
"@Required\n @Updatable\n public Set<SecurityGroupResource> getSecurityGroups() {\n if (securityGroups == null) {\n securityGroups = new HashSet<>();\n }\n\n return securityGroups;\n }",
"@Updatable\n public Set<SecurityGroupResource> getSecurityGroups() {\n if (securityGroups == null) {\n securityGroups = new LinkedHashSet<>();\n }\n\n return securityGroups;\n }",
"@Test\n public void testGetSecurityGroups() {\n \n System.out.println(\"getSecurityGroups\");\n LaunchConfiguration lc = testLaunchConfigurations.get(testLaunchConfigurationNames.get(0));\n com.amazonaws.services.autoscaling.model.LaunchConfiguration awsLc = \n awsLaunchConfigurations.get(testLaunchConfigurationNames.get(0));\n \n assertEquals(awsLc.getSecurityGroups(), lc.getSecurityGroups());\n }",
"private EC2AuthorizeRevokeSecurityGroup toSecurityGroup( String groupName, IpPermissionType[] items ) {\r\n EC2AuthorizeRevokeSecurityGroup request = new EC2AuthorizeRevokeSecurityGroup();\r\n \r\n request.setName( groupName );\r\n \r\n for( int i=0; i < items.length; i++ ) {\r\n \t EC2IpPermission perm = new EC2IpPermission(); \t\r\n \t perm.setProtocol( items[i].getIpProtocol());\r\n \t perm.setFromPort( items[i].getFromPort());\r\n \t perm.setToPort( items[i].getToPort());\r\n \t\r\n \t UserIdGroupPairSetType groups = items[i].getGroups();\r\n \t if (null != groups) {\r\n \t\t UserIdGroupPairType[] groupItems = groups.getItem();\r\n \t\t for( int j=0; j < groupItems.length; j++ ) {\r\n \t\t\t EC2SecurityGroup user = new EC2SecurityGroup();\r\n \t\t\t user.setName( groupItems[j].getUserId());\r\n \t\t\t user.setAccount( groupItems[j].getGroupName());\r\n \t\t\t perm.addUser( user );\r\n \t\t } \t\t\r\n \t } \t\r\n \r\n \t IpRangeSetType ranges = items[i].getIpRanges();\r\n \t if (null != ranges) {\r\n \t\t IpRangeItemType[] rangeItems = ranges.getItem();\r\n \t\t for( int k=0; k < rangeItems.length; k++ ) \r\n \t\t\t perm.addIpRange( rangeItems[k].getCidrIp());\r\n \t } \r\n \r\n \t request.addIpPermission( perm );\r\n }\r\n return request;\r\n }",
"public java.util.List<String> getSecurityGroupIds() {\n return securityGroupIds;\n }",
"@Named(\"ListNetworkSecurityGroups\")\n @Path(\"/networksecuritygroups\")\n @GET\n @XMLResponseParser(ListNetworkSecurityGroupsHandler.class)\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<NetworkSecurityGroup> list();",
"public List<EffectiveNetworkSecurityGroups> effectiveNetworkSecurityGroups() {\n return this.innerProperties() == null ? null : this.innerProperties().effectiveNetworkSecurityGroups();\n }",
"public void createSecurityGroup(String securityGroupName) {\n\t\tCreateSecurityGroupRequest csgr = new CreateSecurityGroupRequest();\n\t\tcsgr.withGroupName(securityGroupName).withDescription(\"Security Group for Kubernetes Management Server\");\n\t\tec2.createSecurityGroup(csgr);\n\t\tec2.authorizeSecurityGroupIngress(createIpPermissions(securityGroupName, 22));\n\t\tec2.authorizeSecurityGroupIngress(createIpPermissions(securityGroupName, 1883));\n\t}",
"@Test\n public void testModifyInstanceWithSecgrpParamgrp()\n {\n DBInstance mockInstance = mock(DBInstance.class);\n when(mockRdsClient.modifyDBInstance(any(ModifyDBInstanceRequest.class))).thenReturn(mockInstance);\n Collection<String> securityGroups = new ArrayList<String>();\n securityGroups.add(SECURITY_GROUP);\n\n assertEquals(mockInstance, rdsClient.modifyInstanceWithSecgrpParamgrp(INSTANCE_NAME, securityGroups, PARAM_GROUP));\n }",
"protected void addSecurityGroupWithISecurityGroup_software_amazon_awscdk_services_ec2_ISecurityGroup_AsReferencePropertyDescriptor(\n\t\t\tObject object) {\n\t\titemPropertyDescriptors.add(createItemPropertyDescriptor(\n\t\t\t\t((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),\n\t\t\t\tgetString(\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_securityGroupWithISecurityGroup_software_amazon_awscdk_services_ec2_ISecurityGroup_AsReference_feature\"),\n\t\t\t\tgetString(\"_UI_PropertyDescriptor_description\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_securityGroupWithISecurityGroup_software_amazon_awscdk_services_ec2_ISecurityGroup_AsReference_feature\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_type\"),\n\t\t\t\tAwsworkbenchPackage.Literals.APPLICATION_LOAD_BALANCER_BUILDER_ELASTICLOADBALANCINGV2__SECURITY_GROUP_WITH_ISECURITY_GROUP_SOFTWARE_AMAZON_AWSCDK_SERVICES_EC2_ISECURITY_GROUP_AS_REFERENCE,\n\t\t\t\ttrue, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subnetwork Aggregated Data by (a) componentId for UI mostly (b) subnetId (c) List of subnet Ids (d) List of Tags | CloudSubNetworkAggregatedResponse getSubNetworkAggregatedData (String componentIdString); | [
"Collection<CloudSubNetwork> getSubNetworkDetailsByComponentId (String componentIdString);",
"int getSubnetId();",
"public List<VerticalServiceInstance> getVsInstancesFromNetworkSliceSubnet(String sliceSubnetId) {\n\t\tList<VerticalServiceInstance> vsiWithNsi = vsInstanceRepository.findAll().stream()\n\t\t\t\t.filter(currentVsi -> currentVsi.getNssis().keySet().contains(sliceSubnetId))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn vsiWithNsi;\n\t}",
"@GET\n @PermitAll\n @Produces({ VendorMediaType.APPLICATION_DHCP_SUBNET_COLLECTION_JSON,\n VendorMediaType.APPLICATION_DHCP_SUBNET_COLLECTION_JSON_V2})\n public List<DhcpSubnet> list()\n throws StateAccessException, SerializationException {\n\n if (!authorizer.authorize(context, AuthAction.READ, bridgeId)) {\n throw new ForbiddenHttpException(\n \"Not authorized to view DHCP config of this bridge.\");\n }\n\n List<Subnet> subnetConfigs =\n dataClient.dhcpSubnetsGetByBridge(bridgeId);\n\n List<DhcpSubnet> subnets = new ArrayList<>();\n URI dhcpsUri = ResourceUriBuilder.getBridgeDhcps(getBaseUri(),\n bridgeId);\n for (Subnet subnetConfig : subnetConfigs) {\n DhcpSubnet subnet = new DhcpSubnet(subnetConfig);\n subnet.setParentUri(dhcpsUri);\n subnets.add(subnet);\n }\n\n return subnets;\n }",
"com.google.protobuf.ByteString getSubnetBytes();",
"private void assignSubnets() {\n final List<String> networks = configFile.getList(\"network\");\n if (networks == null) {\n throw new RuntimeException(\"No network directives found.\");\n }\n\n final Iterator<String> networkIt = networks.iterator();\n while (networkIt.hasNext()) {\n final String network = networkIt.next();\n final ConfigFile netConfig = configFile.getSubConfig(network, true);\n final List<String> subnets = netConfig.getList(\"subnet\");\n if (subnets == null) {\n LOGGER.info(\"No subnet directives for network \" + network + \" found. Skipping.\");\n networkIt.remove();\n continue;\n }\n\n final Iterator<String> subnetIt = subnets.iterator();\n while (subnetIt.hasNext()) {\n final String subnet = subnetIt.next();\n final ConfigFile subnetConfig = netConfig.getSubConfig(subnet, true);\n if (subnetConfig.getList(\"channel\") == null) {\n LOGGER.warn(\"No channel directives for subnet \" + subnet + \" found. Skipping.\");\n subnetIt.remove();\n continue;\n } else {\n webApp.addSubnet(network, subnet);\n }\n\n final String dataSource = subnetConfig.getString(\"dataSource\");\n if (dataSource != null) {\n final AbstractPlotScheduler scheduler = plotScheduler.get(dataSource);\n LOGGER.info(\"Assigning subnet \" + subnet + \" to \" + dataSource);\n scheduler.add(new SubnetPlotter(network, subnet, subnetConfig));\n } else {\n LOGGER.error(\"Cannot find dataSource for subnet {}. I'll skip it this time.\", subnet);\n }\n }\n netConfig.putList(\"subnet\", subnets);\n }\n configFile.putList(\"network\", networks);\n\n final Iterator<String> schedulerIt = plotScheduler.keySet().iterator();\n while (schedulerIt.hasNext()) {\n final String server = schedulerIt.next();\n final AbstractPlotScheduler ps = plotScheduler.get(server);\n if (ps.subnetCount() < 1) {\n LOGGER.warn(\"No subnets feeding from \" + ps.name + \". I'll prune it.\");\n schedulerIt.remove();\n }\n }\n }",
"private Vector getVisitedSubnets(String subnets) {\r\n\t\t\tVector result = new Vector();\r\n\t\t\tStringTokenizer tok = new StringTokenizer(subnets, \",\");\r\n\t\t\twhile (tok.hasMoreTokens()) {\r\n\t\t\t\tString token = tok.nextToken();\r\n\t\t\t\tresult.add(token);\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}",
"public static void listGeometryOnNetworkCommand()\n {\n \t Cell cell = WindowFrame.needCurCell();\n if (cell == null) return;\n EditWindow wnd = EditWindow.needCurrent();\n if (wnd == null) return;\n Highlighter highlighter = wnd.getHighlighter();\n \n Set nets = highlighter.getHighlightedNetworks();\n \t Netlist netlist = cell.getUserNetlist();\n \n \t if (nets.isEmpty())\n \t {\n \t\t System.out.println(\"No network in cell '\" + cell.describe() + \"' selected\");\n \t\t return;\n \t }\n \n for(Iterator it = nets.iterator(); it.hasNext(); )\n {\n \t Network net = (Network)it.next();\n \t System.out.println(\"For network '\" + net.describe() + \"' in cell '\" + cell.describe() + \"':\");\n }\n \t long startTime = System.currentTimeMillis();\n PolyQTree tree = new PolyQTree(cell.getBounds());\n \t LayerCoverageJob.LayerVisitor visitor = new LayerCoverageJob.LayerVisitor(true, tree, null, LayerCoverageJob.NETWORK, null, nets);\n \t HierarchyEnumerator.enumerateCell(cell, VarContext.globalContext, netlist, visitor);\n \n \t\tdouble totalWire = 0;\n double lambda = 1; // lambdaofcell(np);\n \n \t\t// Traversing tree with merged geometry\n \t\tfor (Iterator it = tree.getKeyIterator(); it.hasNext(); )\n \t\t{\n \t\t\tLayer layer = (Layer)it.next();\n \t\t\tCollection set = tree.getObjects(layer, false, true);\n \t\t\tdouble layerArea = 0;\n \t\t\tdouble perimeter = 0;\n \n \t\t\t// Get all objects and sum the area\n \t\t\tfor (Iterator i = set.iterator(); i.hasNext(); )\n \t\t\t{\n \t\t\t\tPolyQTree.PolyNode area = (PolyQTree.PolyNode)i.next();\n \t\t\t\tlayerArea += area.getArea();\n \t\t\t\tperimeter += area.getPerimeter();\n \t\t\t}\n \t\t\tlayerArea /= lambda;\n \t\t\tperimeter /= 2;\n \n \t\t\tLayer.Function func = layer.getFunction();\n \n \t\t\t/* accumulate total wire length on all metal/poly layers */\n \t\t\tif (func.isPoly() && !func.isGatePoly() || func.isMetal())\n \t\t\t\ttotalWire += perimeter;\n \n \t\t\tSystem.out.println(\"Layer \" + layer.getName()\n \t\t\t + \":\\t area \" + TextUtils.formatDouble(layerArea)\n \t\t\t + \"\\t half-perimeter \" + TextUtils.formatDouble(perimeter)\n \t\t\t + \"\\t ratio \" + TextUtils.formatDouble(layerArea/perimeter));\n \t\t}\n \t long endTime = System.currentTimeMillis();\n \t if (totalWire > 0)\n \t\t System.out.println(\"Total wire length = \" + TextUtils.formatDouble(totalWire/lambda) + \" (took \" + TextUtils.getElapsedTime(endTime - startTime) + \")\");\n \n \t\t// @TODO GVG lambda and ratio ==0 (when is the case?)\n }",
"@java.lang.Override\n public int getSubnetId() {\n return subnetId_;\n }",
"DescribeSubnetGroupsResult describeSubnetGroups(DescribeSubnetGroupsRequest describeSubnetGroupsRequest);",
"public List<Subnets> getSubnets() {\n\tList<Map<String,Object>> secondary = mASPService.getSecondaryASP(\"subnets\");\n\tif(secondary == null) return Collections.emptyList();\n\tList<Subnets> values = new ArrayList<Subnets>();\n\tfor(Map<String,Object> row : secondary) {\n\t\tvalues.add(new Subnets(\n\t\t\t(String)row.get(\"address\"),\n\t\t\t(String)row.get(\"mask\")));\n\t}\n\treturn Collections.unmodifiableList(values);\n}",
"public String getSubnetId() {\n return this.SubnetId;\n }",
"public List<Subnet> getSubnets()\n {\n return subnets;\n }",
"private void addSubnets(DefaultMutableTreeNode root, Experiment experiment, int[][] clusters, boolean clusterGenes) {\r\n DefaultMutableTreeNode node = new DefaultMutableTreeNode(\"Expression Images\");\r\n RelevanceNetworkLayout layout = new RelevanceNetworkLayout();\r\n int[][] subnets = layout.formRelevanceNetworks(clusters);\r\n int[] indices = getSortedIndices(subnets);\r\n IViewer viewer;\r\n if (clusterGenes)\r\n viewer = new RelNetExperimentViewer(experiment, subnets);\r\n else\r\n viewer = new RelNetExperimentClusterViewer(experiment, subnets);\r\n \r\n for (int i=0; i<subnets.length; i++)\r\n node.add(new DefaultMutableTreeNode(new LeafInfo(\"Subnet \"+String.valueOf(i+1)+\" (\"+subnets[indices[i]].length+\")\", viewer, new Integer(indices[i]))));\r\n root.add(node);\r\n addSubnetCentroidViews(root, experiment, subnets, indices, clusterGenes);\r\n addSubnetTableViews(root, experiment, subnets, indices, clusterGenes);\r\n addSubnetClusterInfo(root, experiment, subnets, indices, clusterGenes);\r\n }",
"protected void addVpcSubnetsWithSubnetSelection_software_amazon_awscdk_services_ec2_SubnetSelection_AsReferencePropertyDescriptor(\n\t\t\tObject object) {\n\t\titemPropertyDescriptors.add(createItemPropertyDescriptor(\n\t\t\t\t((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),\n\t\t\t\tgetString(\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_vpcSubnetsWithSubnetSelection_software_amazon_awscdk_services_ec2_SubnetSelection_AsReference_feature\"),\n\t\t\t\tgetString(\"_UI_PropertyDescriptor_description\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_vpcSubnetsWithSubnetSelection_software_amazon_awscdk_services_ec2_SubnetSelection_AsReference_feature\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_type\"),\n\t\t\t\tAwsworkbenchPackage.Literals.APPLICATION_LOAD_BALANCER_BUILDER_ELASTICLOADBALANCINGV2__VPC_SUBNETS_WITH_SUBNET_SELECTION_SOFTWARE_AMAZON_AWSCDK_SERVICES_EC2_SUBNET_SELECTION_AS_REFERENCE,\n\t\t\t\ttrue, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));\n\t}",
"@Override\n public InetAddress attachNetwork(String containerId, String subnetId) {\n InetAddress address = getEntity().getAttribute(SdnAgent.SDN_PROVIDER).getNextContainerAddress(subnetId);\n\n // Run some commands to get information about the container network namespace\n String ipAddrOutput = getEntity().getAttribute(SdnAgent.DOCKER_HOST).execCommand(sudo(\"ip addr show dev docker0 scope global label docker0\"));\n String dockerIp = Strings.getFirstWordAfter(ipAddrOutput.replace('/', ' '), \"inet\");\n String dockerPid = Strings.trimEnd(getEntity().getAttribute(SdnAgent.DOCKER_HOST).runDockerCommand(\"inspect -f '{{.State.Pid}}' \" + containerId));\n Cidr subnetCidr = getEntity().getAttribute(SdnAgent.SDN_PROVIDER).getSubnetCidr(subnetId);\n InetAddress agentAddress = getEntity().getAttribute(SdnAgent.SDN_AGENT_ADDRESS);\n\n // Determine whether we are attatching the container to the initial application network\n boolean initial = false;\n for (Entity container : getEntity().getAttribute(SdnAgent.DOCKER_HOST).getDockerContainerList()) {\n if (containerId.equals(container.getAttribute(DockerContainer.CONTAINER_ID))) {\n Entity running = container.getAttribute(DockerContainer.ENTITY);\n String applicationId = running.getApplicationId();\n if (subnetId.equals(applicationId)) {\n initial = true;\n }\n break;\n }\n }\n\n // Add the container if we have not yet done so\n if (initial) {\n newScript(\"addContainer\")\n .body.append(sudo(String.format(\"%s container add %s %s\", getCalicoCommand(), containerId, address.getHostAddress())))\n .execute();\n }\n\n // Return its endpoint ID\n ScriptHelper getEndpointId = newScript(\"getEndpointId\")\n .body.append(sudo(String.format(\"%s container %s endpoint-id show\", getCalicoCommand(), containerId, address.getHostAddress())))\n .noExtraOutput()\n .gatherOutput();\n getEndpointId.execute();\n String endpointId = Strings.getFirstWord(getEndpointId.getResultStdout());\n\n // Add to the application profile\n newScript(\"addCalico\")\n .body.append(sudo(String.format(\"%s endpoint %s profile append %s\", getCalicoCommand(), endpointId, subnetId))) // Idempotent\n .execute();\n\n // Set up the network\n List<String> commands = MutableList.of();\n commands.add(sudo(\"mkdir -p /var/run/netns\"));\n commands.add(BashCommands.ok(sudo(String.format(\"ln -s /proc/%s/ns/net /var/run/netns/%s\", dockerPid, dockerPid))));\n if (initial) {\n commands.add(sudo(String.format(\"ip netns exec %s ip route del default\", dockerPid)));\n commands.add(sudo(String.format(\"ip netns exec %s ip route add default via %s\", dockerPid, dockerIp)));\n commands.add(sudo(String.format(\"ip netns exec %s ip route add %s via %s\", dockerPid, subnetCidr.toString(), agentAddress.getHostAddress())));\n } else {\n commands.add(sudo(String.format(\"ip netns exec %s ip addr add %s/%d dev eth1\", dockerPid, address.getHostAddress(), subnetCidr.getLength())));\n }\n newScript(\"setupNetwork\")\n .body.append(commands)\n .execute();\n\n return address;\n }",
"DescribeCacheSubnetGroupsResult describeCacheSubnetGroups(DescribeCacheSubnetGroupsRequest describeCacheSubnetGroupsRequest);",
"public VirtualNetworkSubnetUsageResultInner() {\n }",
"entities.Torrent.SubnetRequest getSubnetRequest();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Brings up the "dialpad chooser" UI in place of the usual Dialer elements (the textfield/button and the dialpad underneath). We show this UI if the user brings up the Dialer while a call is already in progress, since there's a good chance we got here accidentally (and the user really wanted the incall dialpad instead). So in this situation we display an intermediate UI that lets the user explicitly choose between the incall dialpad ("Use touch tone keypad") and the regular Dialer ("Add call"). (Or, the option "Return to call in progress" just goes back to the incall UI with no dialpad at all.) | private void showDialpadChooser(boolean enabled) {
// Check if onCreateView() is already called by checking one of View objects.
if (!isLayoutReady()) {
return;
}
if (enabled) {
// Log.i(TAG, "Showing dialpad chooser!");
if (mDigitsContainer != null) {
mDigitsContainer.setVisibility(View.GONE);
} else {
// mDigits is not enclosed by the container. Make the digits field itself gone.
mDigits.setVisibility(View.GONE);
}
if (mDialpad != null) mDialpad.setVisibility(View.GONE);
if (mDialButtonContainer != null) mDialButtonContainer.setVisibility(View.GONE);
mDialpadChooser.setVisibility(View.VISIBLE);
// Instantiate the DialpadChooserAdapter and hook it up to the
// ListView. We do this only once.
if (mDialpadChooserAdapter == null) {
mDialpadChooserAdapter = new DialpadChooserAdapter(getActivity());
}
mDialpadChooser.setAdapter(mDialpadChooserAdapter);
} else {
// Log.i(TAG, "Displaying normal Dialer UI.");
if (mDigitsContainer != null) {
mDigitsContainer.setVisibility(View.VISIBLE);
} else {
mDigits.setVisibility(View.VISIBLE);
}
if (mDialpad != null) mDialpad.setVisibility(View.VISIBLE);
if (mDialButtonContainer != null) mDialButtonContainer.setVisibility(View.VISIBLE);
mDialpadChooser.setVisibility(View.GONE);
}
} | [
"private void addDialInInfo() {\n\t\tif(ConferenceGlobals.showPhoneInfo )\n\t\t{\n\t\t\t\tconsoleLayout.addWidgetToID(\"dailinfo\", new Label(UIStrings.getTollInfoLabel()));\n\t\t\t\tconsoleLayout.addWidgetToID(\"confid\", new Label(UIStrings.getAttendePasscodeLabel()));\t\t\n\t\t\t\n\t\t\t\tLabel internToll = new Label(getSubString(ConferenceGlobals.internToll, 20));\n\t\t\t\tLabel attPassCode = new Label(getSubString(ConferenceGlobals.attendeePasscode, 20));\n\t\t\t\t\n\t\t\t\tinternToll.setTitle(ConferenceGlobals.internToll);\n\t\t\t\tattPassCode.setTitle(ConferenceGlobals.attendeePasscode);\n\t\t\t\tconsoleLayout.addWidgetToID(\"dailinfo_txt\", internToll);\n\t\t\t\tconsoleLayout.addWidgetToID(\"confid_txt\", attPassCode);\n\t\t\t\n\t\t\t\tif(ConferenceGlobals.internToll.length() > 0)\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"dailinfo_panel\", true);\n\t\t\t\telse\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"dailinfo_panel\", false);\n\n\t\t\t\tif(ConferenceGlobals.attendeePasscode.length() > 0)\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"passcode_panel\", true);\n\t\t\t\telse\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"passcode_panel\", false);\n\t\t}\n\t\t\n\t}",
"private void showDialpadChooser(boolean enabled) {\n // Check if onCreateView() is already called by checking one of View\n // objects.\n if (!isLayoutReady()) {\n return;\n }\n\n if (enabled) {\n // Log.i(TAG, \"Showing dialpad chooser!\");\n if (mDigitsContainer != null) {\n mDigitsContainer.setVisibility(View.GONE);\n } else {\n // mDigits is not enclosed by the container. Make the digits\n // field itself gone.\n mDigits.setVisibility(View.GONE);\n }\n if (mDialpad != null)\n mDialpad.setVisibility(View.GONE);\n if (mDialButtonContainer != null)\n mDialButtonContainer.setVisibility(View.GONE);\n\n mDialpadChooser.setVisibility(View.VISIBLE);\n\n // Instantiate the DialpadChooserAdapter and hook it up to the\n // ListView. We do this only once.\n if (mDialpadChooserAdapter == null) {\n mDialpadChooserAdapter = new DialpadChooserAdapter(getActivity());\n }\n mDialpadChooser.setAdapter(mDialpadChooserAdapter);\n } else {\n // Log.i(TAG, \"Displaying normal Dialer UI.\");\n if (mDigitsContainer != null) {\n mDigitsContainer.setVisibility(View.VISIBLE);\n } else {\n mDigits.setVisibility(View.VISIBLE);\n }\n if (mDialpad != null)\n mDialpad.setVisibility(View.VISIBLE);\n if (mDialButtonContainer != null)\n mDialButtonContainer.setVisibility(View.VISIBLE);\n mDialpadChooser.setVisibility(View.GONE);\n }\n }",
"public void dialButtonPressed(boolean isIpCall) {\n if (isDigitsEmpty()) { // No number entered.\n if (phoneIsCdma() && phoneIsOffhook()) {\n // This is really CDMA specific. On GSM is it possible\n // to be off hook and wanted to add a 3rd party using\n // the redial feature.\n startActivity(newFlashIntent());\n } else {\n if (!TextUtils.isEmpty(mLastNumberDialed)) {\n // Recall the last number dialed.\n mDigits.setText(mLastNumberDialed);\n\n // ...and move the cursor to the end of the digits string,\n // so you'll be able to delete digits using the Delete\n // button (just as if you had typed the number manually.)\n //\n // Note we use mDigits.getText().length() here, not\n // mLastNumberDialed.length(), since the EditText widget now\n // contains a *formatted* version of mLastNumberDialed (due to\n // mTextWatcher) and its length may have changed.\n mDigits.setSelection(mDigits.getText().length());\n } else {\n // There's no \"last number dialed\" or the\n // background query is still running. There's\n // nothing useful for the Dial button to do in\n // this case. Note: with a soft dial button, this\n // can never happens since the dial button is\n // disabled under these conditons.\n playTone(ToneGenerator.TONE_PROP_NACK);\n }\n }\n } else {\n final String number = mDigits.getText().toString();\n\n // \"persist.radio.otaspdial\" is a temporary hack needed for one carrier's automated\n // test equipment.\n // TODO: clean it up.\n if (number != null\n && !TextUtils.isEmpty(mProhibitedPhoneNumberRegexp)\n && number.matches(mProhibitedPhoneNumberRegexp)\n && (SystemProperties.getInt(\"persist.radio.otaspdial\", 0) != 1)) {\n Log.i(TAG, \"The phone number is prohibited explicitly by a rule.\");\n if (getActivity() != null) {\n DialogFragment dialogFragment = ErrorDialogFragment.newInstance(\n R.string.dialog_phone_call_prohibited_title);\n dialogFragment.show(getFragmentManager(), \"phone_prohibited_dialog\");\n }\n\n // Clear the digits just in case.\n mDigits.getText().clear();\n } else {\n final Intent intent = newDialNumberIntent(number);\n if (getActivity() instanceof DialtactsActivity) {\n intent.putExtra(DialtactsActivity.EXTRA_CALL_ORIGIN,\n DialtactsActivity.CALL_ORIGIN_DIALTACTS);\n }\n\t\t if(isIpCall){\n\t\t \tintent.putExtra(IP_CALL_MODE_KEY,isIpCall) ;\n\t\t }\n startActivity(intent);\n mDigits.getText().clear(); // TODO: Fix bug 1745781\n getActivity().finish();\n }\n }\n }",
"private void returnToInCallScreen(boolean showDialpad) {\n try {\n ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.checkService(\"phone\"));\n if (phone != null)\n phone.showCallScreenWithDialpad(showDialpad);\n } catch (RemoteException e) {\n Log.w(TAG, \"phone.showCallScreenWithDialpad() failed\", e);\n }\n\n // Finally, finish() ourselves so that we don't stay on the\n // activity stack.\n // Note that we do this whether or not the showCallScreenWithDialpad()\n // call above had any effect or not! (That call is a no-op if the\n // phone is idle, which can happen if the current call ends while\n // the dialpad chooser is up. In this case we can't show the\n // InCallScreen, and there's no point staying here in the Dialer,\n // so we just take the user back where he came from...)\n getActivity().finish();\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n DialpadChooserAdapter.ChoiceItem item = (DialpadChooserAdapter.ChoiceItem) parent.getItemAtPosition(position);\n int itemId = item.id;\n switch (itemId) {\n case DialpadChooserAdapter.DIALPAD_CHOICE_USE_DTMF_DIALPAD:\n // Log.i(TAG, \"DIALPAD_CHOICE_USE_DTMF_DIALPAD\");\n // Fire off an intent to go back to the in-call UI\n // with the dialpad visible.\n returnToInCallScreen(true);\n break;\n\n case DialpadChooserAdapter.DIALPAD_CHOICE_RETURN_TO_CALL:\n // Log.i(TAG, \"DIALPAD_CHOICE_RETURN_TO_CALL\");\n // Fire off an intent to go back to the in-call UI\n // (with the dialpad hidden).\n returnToInCallScreen(false);\n break;\n\n case DialpadChooserAdapter.DIALPAD_CHOICE_ADD_NEW_CALL:\n // Log.i(TAG, \"DIALPAD_CHOICE_ADD_NEW_CALL\");\n // Ok, guess the user really did want to be here (in the\n // regular Dialer) after all. Bring back the normal Dialer UI.\n showDialpadChooser(false);\n break;\n\n default:\n Log.w(TAG, \"onItemClick: unexpected itemId: \" + itemId);\n break;\n }\n }",
"private void returnToInCallScreen(boolean showDialpad) {\n if (TelephonyManager.getDefault().isMultiSimEnabled()) {\n try {\n ITelephonyMSim phone = ITelephonyMSim.Stub.asInterface(ServiceManager\n .checkService(Context.MSIM_TELEPHONY_SERVICE));\n if (phone != null)\n phone.showCallScreenWithDialpad(showDialpad);\n } catch (RemoteException e) {\n Log.w(TAG, \"phone.showCallScreenWithDialpad() failed\", e);\n }\n } else {\n try {\n ITelephony phone = ITelephony.Stub\n .asInterface(ServiceManager.checkService(\"phone\"));\n if (phone != null)\n phone.showCallScreenWithDialpad(showDialpad);\n } catch (RemoteException e) {\n Log.w(TAG, \"phone.showCallScreenWithDialpad() failed\", e);\n }\n }\n\n // Finally, finish() ourselves so that we don't stay on the\n // activity stack.\n // Note that we do this whether or not the showCallScreenWithDialpad()\n // call above had any effect or not! (That call is a no-op if the\n // phone is idle, which can happen if the current call ends while\n // the dialpad chooser is up. In this case we can't show the\n // InCallScreen, and there's no point staying here in the Dialer,\n // so we just take the user back where he came from...)\n getActivity().finish();\n }",
"public void onItemClick(AdapterView parent, View v, int position, long id) {\n DialpadChooserAdapter.ChoiceItem item =\n (DialpadChooserAdapter.ChoiceItem) parent.getItemAtPosition(position);\n int itemId = item.id;\n switch (itemId) {\n case DialpadChooserAdapter.DIALPAD_CHOICE_USE_DTMF_DIALPAD:\n // Log.i(TAG, \"DIALPAD_CHOICE_USE_DTMF_DIALPAD\");\n // Fire off an intent to go back to the in-call UI\n // with the dialpad visible.\n returnToInCallScreen(true);\n break;\n\n case DialpadChooserAdapter.DIALPAD_CHOICE_RETURN_TO_CALL:\n // Log.i(TAG, \"DIALPAD_CHOICE_RETURN_TO_CALL\");\n // Fire off an intent to go back to the in-call UI\n // (with the dialpad hidden).\n returnToInCallScreen(false);\n break;\n\n case DialpadChooserAdapter.DIALPAD_CHOICE_ADD_NEW_CALL:\n // Log.i(TAG, \"DIALPAD_CHOICE_ADD_NEW_CALL\");\n // Ok, guess the user really did want to be here (in the\n // regular Dialer) after all. Bring back the normal Dialer UI.\n showDialpadChooser(false);\n break;\n\n default:\n Log.w(TAG, \"onItemClick: unexpected itemId: \" + itemId);\n break;\n }\n }",
"private void switchToCallingUI() {\n if (mIsCallingUI) return;\n else mIsCallingUI = true;\n\n // Change the buttons layout\n mAnswerButton.hide();\n }",
"private void showCallUsCard() {\n\n //setting the visibility of mPopUpText Object to visible\n // because it will be set to GONE in case the user has already clicked on the address or working hours buttons\n // so it needs to be set to visible again so that we can set the text on it\n mPopUpText.setVisibility(View.VISIBLE);\n\n mPopUpIntroduction.setText(R.string.phone_card_introduction);\n mPopUpText.setText(R.string.phone_number);\n\n //setting the visibility of mPopUpButton to visible\n //because it will be set to GONE in case the user has already clicked on the address or working hours buttons\n //so it needs to be visible again so that we can set the text and OnClickListener on it\n\n mPopUpButton.setVisibility(View.VISIBLE);\n mPopUpButton.setText(R.string.call_button);\n mPopUpButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n //Initializing a phone call intent to open the dialer/phone app and dial a phone number\n\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:+20226079434\"));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n });\n\n //setting the background of the dialog window to transparent\n\n if (mDialog.getWindow() != null) {\n mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n }\n mDialog.show();\n\n }",
"@Override\n public void onCallStateChanged(int state, String incomingNumber) {\n // Log.i(TAG, \"PhoneStateListener.onCallStateChanged: \"\n // + state + \", '\" + incomingNumber + \"'\");\n if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) {\n // Log.i(TAG,\n // \"Call ended with dialpad chooser visible! Taking it down...\");\n // Note there's a race condition in the UI here: the\n // dialpad chooser could conceivably disappear (on its\n // own) at the exact moment the user was trying to select\n // one of the choices, which would be confusing. (But at\n // least that's better than leaving the dialpad chooser\n // onscreen, but useless...)\n showDialpadChooser(false);\n }\n }",
"private void updateDialAndDeleteButtonEnabledState() {\n final boolean digitsNotEmpty = !isDigitsEmpty();\n\n if (mDialButton != null) {\n // On CDMA phones, if we're already on a call, we *always*\n // enable the Dial button (since you can press it without\n // entering any digits to send an empty flash.)\n if (phoneIsCdma() && phoneIsOffhook()) {\n mDialButton.setEnabled(true);\n } else {\n // Common case: GSM, or CDMA but not on a call.\n // Enable the Dial button if some digits have\n // been entered, or if there is a last dialed number\n // that could be redialed.\n mDialButton.setEnabled(digitsNotEmpty || !TextUtils.isEmpty(mLastNumberDialed));\n }\n }\n mDelete.setEnabled(digitsNotEmpty);\n }",
"private void createIncomingCallPopup(IKandyIncomingCall pInCall) {\n mCurrentCall = pInCall;\n\n if (isFinishing()) {\n return;\n }\n\n AlertDialog.Builder builder = new AlertDialog.Builder(VideoActivity.this);\n builder.setPositiveButton(getString(R.string.activity_calls_answer_button_label), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n accept();\n callDidStart = true;\n dialog.dismiss();\n }\n });\n\n builder.setNeutralButton(getString(R.string.activity_calls_ignore_incoming_call_button_label), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ignoreIncomingCall((IKandyIncomingCall) mCurrentCall);\n dialog.dismiss();\n }\n });\n\n builder.setNegativeButton(getString(R.string.activity_calls_reject_incoming_call_button_label), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n rejectIncomingCall((IKandyIncomingCall) mCurrentCall);\n dialog.dismiss();\n }\n });\n\n builder.setMessage(\"You have an incoming call. Would you like to continue?\");\n\n mIncomingCallDialog = builder.create();\n mIncomingCallDialog.show();\n }",
"@Override\n public void onCallStateChanged(int state, String incomingNumber) {\n // Log.i(TAG, \"PhoneStateListener.onCallStateChanged: \"\n // + state + \", '\" + incomingNumber + \"'\");\n if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) {\n // Log.i(TAG, \"Call ended with dialpad chooser visible! Taking it down...\");\n // Note there's a race condition in the UI here: the\n // dialpad chooser could conceivably disappear (on its\n // own) at the exact moment the user was trying to select\n // one of the choices, which would be confusing. (But at\n // least that's better than leaving the dialpad chooser\n // onscreen, but useless...)\n showDialpadChooser(false);\n }\n }",
"@Override\n public void onCallStateChanged(int state, String incomingNumber) {\n // Log.i(TAG, \"PhoneStateListener.onCallStateChanged: \"\n // + state + \", '\" + incomingNumber + \"'\");\n if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) {\n // Log.i(TAG, \"Call ended with dialpad chooser visible! Taking it down...\");\n // Note there's a race condition in the UI here: the\n // dialpad chooser could conceivably disappear (on its\n // own) at the exact moment the user was trying to select\n // one of the choices, which would be confusing. (But at\n // least that's better than leaving the dialpad chooser\n // onscreen, but useless...)\n showDialpadChooser(phoneIsInUse());\n }\n }",
"void showPicker() {\r\n\t\tRunnable run = new Runnable() {\r\n\t\t\tpublic void run() {\r\n \t\tInputMethodManager inputManager = (InputMethodManager) getSystemService (INPUT_METHOD_SERVICE);\t\t\r\n \t\tinputManager.showInputMethodPicker();\t\t\t\t\r\n\t\t\t}\r\n\t\t};\t\r\n\t\t\r\n\t\tHandler h=new android.os.Handler();\r\n\t\th.postDelayed(run,250);\r\n\t}",
"public TransferToANumberDialogGUI(String callId) {\r\n\tsuper(GUIComponent.UNITY_BASE_DIALOG, new int[] { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 }, new int[] { 2, 30, 2 });\r\n\tthis.callId = callId;\r\n\ttry {\r\n\t setTitle(getValue(\"CallButtonShowing.Transfer\"));\r\n\t setSize(239, 120);\r\n\t setResizable(false);\r\n\t addComponent(lblNumber, 1, 1, 5, 0);\r\n\t addComponent(txtNumber, 5, 1, 9, 1);\r\n\r\n\t txtNumber.addKeyListener(this);\r\n\t txtNumber.setName(\"EnterKeyNumber\");\r\n\r\n\t getOKButton().setActionCommand(\"okButton\");\r\n\t getCancelButton().setActionCommand(\"cancelButton\");\r\n\r\n\t getOKButton().addActionListener(this);\r\n\t getCancelButton().addActionListener(this);\r\n\t} catch (InvalidGUIObjectException e) {\r\n\t}\r\n }",
"public void actionDialClean(){\n\t\tdialText.setText(\"\");\n\t\tdialText.setVisibility(View.INVISIBLE);\n\t}",
"public void openAddContactUI() {\n addContact.hide();\n cancelAddContact.show();\n addContactByEmail.show();\n showQR.show();\n openScanner.show();\n }",
"public void setDialingCode(int dialingCode) {\r\n this.dialingCode = dialingCode;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether or not this abstract planner matches a specification. | @Override
public synchronized boolean matches(Specification<? extends FactoryProduct> specification) {
boolean matches = false;
if ((null != specification)
&& specification.getId().equals(this.getId())
&& (specification.getProperties() instanceof AbstractPlannerProperties)) {
AbstractPlannerProperties properties =
(AbstractPlannerProperties) specification.getProperties();
matches = this.getCostPolicy().equals(properties.getCostPolicy())
&& this.getRiskPolicy().equals(properties.getRiskPolicy());
}
return matches;
} | [
"public abstract boolean matches(CurveSpecification curveSpec);",
"public boolean matches(final LiveDataSpecification liveDataSpec) {\n return getFullyQualifiedLiveDataSpecification().equals(liveDataSpec);\n }",
"public abstract boolean isMatched();",
"public boolean matches()\n\t{\n\t\treturn matcher.matches();\n\t}",
"boolean isSatisfied();",
"public abstract boolean isMatching(Properties p);",
"protected abstract boolean isSatisfiedBy(Design design, AUndertaking t);",
"public abstract boolean matches(VariableResolver<Boolean> resolver);",
"protected abstract boolean isSatisfiedByInternal(Assertion assertion);",
"boolean matchesPreset(@NotNull Object preset);",
"public boolean isSetSpec() {\n return this.spec != null;\n }",
"@Override\n\tpublic synchronized boolean update(Specification<? extends FactoryProduct> specification) {\n\t\tboolean updated = false;\n\t\t\n\t\tif ((null != specification)\n\t\t\t\t&& specification.getId().equals(this.getId())\n\t\t\t\t&& (specification.getProperties() instanceof AbstractPlannerProperties)\n\t\t\t\t&& !this.matches(specification)) {\n\t\t\tAbstractPlannerProperties properties =\n\t\t\t\t\t(AbstractPlannerProperties) specification.getProperties();\n\t\t\tthis.setCostPolicy(properties.getCostPolicy());\n\t\t\tthis.setRiskPolicy(properties.getRiskPolicy());\n\t\t\tupdated = true;\n\t\t}\n\t\t\n\t\treturn updated;\n\t}",
"boolean isSatisfiedBy(T target);",
"List<T> matching(Specification<T> specification);",
"public boolean matchable() {\n\n boolean hasDriver = rides.get(RideRole.DRIVER) != null, hasPassenger = rides.get(RideRole.PASSENGER) != null;\n\n if (hasDriver && hasPassenger) {\n\n if (!(getRide(RideRole.DRIVER).getMatch() == null && getRide(RideRole.PASSENGER).getMatch() == null)) {\n return false;\n }\n\n if (!(getRide(RideRole.DRIVER).getFrom().distance(getRide(RideRole.PASSENGER).getFrom()) <= Matcher.getRadius())) {\n return false;\n }\n\n if (!(getRide(RideRole.DRIVER).getTo().distance(getRide(RideRole.PASSENGER).getTo()) <= Matcher.getRadius())) {\n return false;\n }\n\n return true;\n }\n\n return false;\n }",
"boolean containsAny(Specification<T> specification);",
"boolean supportsStrategy(String strategy);",
"private boolean matches(MetricalLpcfgMatch matchType) {\n\t\tswitch (matchType) {\n\t\t\tcase SUB_BEAT:\n\t\t\t\treturn subBeatMatches > 0;\n\t\t\t\t\n\t\t\tcase BEAT:\n\t\t\t\treturn beatMatches > 0;\n\t\t\t\t\n\t\t\tcase WRONG:\n\t\t\t\treturn isWrong();\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"boolean exactMatch(FlowRule rule);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//GENEND:|432getter|2| //GENBEGIN:|435getter|0|435preInit Returns an initiliazed instance of itemCommand26 component. | public Command getItemCommand26() {
if (itemCommand26 == null) {//GEN-END:|435-getter|0|435-preInit
// write pre-init user code here
itemCommand26 = new Command("Acerca de...", Command.ITEM, 0);//GEN-LINE:|435-getter|1|435-postInit
// write post-init user code here
}//GEN-BEGIN:|435-getter|2|
return itemCommand26;
} | [
"public Command getItemCommand27() {\n if (itemCommand27 == null) {//GEN-END:|438-getter|0|438-preInit\n // write pre-init user code here\n itemCommand27 = new Command(\"Atras\", Command.ITEM, 0);//GEN-LINE:|438-getter|1|438-postInit\n // write post-init user code here\n }//GEN-BEGIN:|438-getter|2|\n return itemCommand27;\n }",
"public Command getItemCommand28() {\n if (itemCommand28 == null) {//GEN-END:|441-getter|0|441-preInit\n // write pre-init user code here\n itemCommand28 = new Command(\"Contactar\", Command.ITEM, 0);//GEN-LINE:|441-getter|1|441-postInit\n // write post-init user code here\n }//GEN-BEGIN:|441-getter|2|\n return itemCommand28;\n }",
"public Command getItemCommand23() {\n if (itemCommand23 == null) {//GEN-END:|419-getter|0|419-preInit\n // write pre-init user code here\n itemCommand23 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|419-getter|1|419-postInit\n // write post-init user code here\n }//GEN-BEGIN:|419-getter|2|\n return itemCommand23;\n }",
"public Command getItemCommand18() {\n if (itemCommand18 == null) {//GEN-END:|401-getter|0|401-preInit\n // write pre-init user code here\n itemCommand18 = new Command(\"Item\", Command.ITEM, 0);//GEN-LINE:|401-getter|1|401-postInit\n // write post-init user code here\n }//GEN-BEGIN:|401-getter|2|\n return itemCommand18;\n }",
"public Command getItemCommand17() {\n if (itemCommand17 == null) {//GEN-END:|395-getter|0|395-preInit\n // write pre-init user code here\n itemCommand17 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|395-getter|1|395-postInit\n // write post-init user code here\n }//GEN-BEGIN:|395-getter|2|\n return itemCommand17;\n }",
"public Command getItemCommand19() {\n if (itemCommand19 == null) {//GEN-END:|403-getter|0|403-preInit\n // write pre-init user code here\n itemCommand19 = new Command(\"Item\", Command.ITEM, 0);//GEN-LINE:|403-getter|1|403-postInit\n // write post-init user code here\n }//GEN-BEGIN:|403-getter|2|\n return itemCommand19;\n }",
"public Command getItemCommand24() {\n if (itemCommand24 == null) {//GEN-END:|423-getter|0|423-preInit\n // write pre-init user code here\n itemCommand24 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|423-getter|1|423-postInit\n // write post-init user code here\n }//GEN-BEGIN:|423-getter|2|\n return itemCommand24;\n }",
"public Command getItemCommand11() {\n if (itemCommand11 == null) {//GEN-END:|363-getter|0|363-preInit\n // write pre-init user code here\n itemCommand11 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|363-getter|1|363-postInit\n // write post-init user code here\n }//GEN-BEGIN:|363-getter|2|\n return itemCommand11;\n }",
"public Command getItemCommand21() {\n if (itemCommand21 == null) {//GEN-END:|409-getter|0|409-preInit\n // write pre-init user code here\n itemCommand21 = new Command(\"Item\", Command.ITEM, 0);//GEN-LINE:|409-getter|1|409-postInit\n // write post-init user code here\n }//GEN-BEGIN:|409-getter|2|\n return itemCommand21;\n }",
"public Command getItemCommand13() {\n if (itemCommand13 == null) {//GEN-END:|376-getter|0|376-preInit\n // write pre-init user code here\n itemCommand13 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|376-getter|1|376-postInit\n // write post-init user code here\n }//GEN-BEGIN:|376-getter|2|\n return itemCommand13;\n }",
"public Command getItemCommand15() {\n if (itemCommand15 == null) {//GEN-END:|387-getter|0|387-preInit\n // write pre-init user code here\n itemCommand15 = new Command(\"Item\", Command.ITEM, 0);//GEN-LINE:|387-getter|1|387-postInit\n // write post-init user code here\n }//GEN-BEGIN:|387-getter|2|\n return itemCommand15;\n }",
"public Command getItemCommand16() {\n if (itemCommand16 == null) {//GEN-END:|389-getter|0|389-preInit\n // write pre-init user code here\n itemCommand16 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|389-getter|1|389-postInit\n // write post-init user code here\n }//GEN-BEGIN:|389-getter|2|\n return itemCommand16;\n }",
"public Command getItemCommand25() {\n if (itemCommand25 == null) {//GEN-END:|429-getter|0|429-preInit\n // write pre-init user code here\n itemCommand25 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|429-getter|1|429-postInit\n // write post-init user code here\n }//GEN-BEGIN:|429-getter|2|\n return itemCommand25;\n }",
"public Command getItemCommand10() {\n if (itemCommand10 == null) {//GEN-END:|355-getter|0|355-preInit\n // write pre-init user code here\n itemCommand10 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|355-getter|1|355-postInit\n // write post-init user code here\n }//GEN-BEGIN:|355-getter|2|\n return itemCommand10;\n }",
"public Command getItemCommand14() {\n if (itemCommand14 == null) {//GEN-END:|382-getter|0|382-preInit\n // write pre-init user code here\n itemCommand14 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|382-getter|1|382-postInit\n // write post-init user code here\n }//GEN-BEGIN:|382-getter|2|\n return itemCommand14;\n }",
"public Command getItemCommand12() {\n if (itemCommand12 == null) {//GEN-END:|369-getter|0|369-preInit\n // write pre-init user code here\n itemCommand12 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|369-getter|1|369-postInit\n // write post-init user code here\n }//GEN-BEGIN:|369-getter|2|\n return itemCommand12;\n }",
"public Command getItemCommand3() {\n if (itemCommand3 == null) {//GEN-END:|314-getter|0|314-preInit\n // write pre-init user code here\n itemCommand3 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|314-getter|1|314-postInit\n // write post-init user code here\n }//GEN-BEGIN:|314-getter|2|\n return itemCommand3;\n }",
"public Command getItemCommand9() {\n if (itemCommand9 == null) {//GEN-END:|349-getter|0|349-preInit\n // write pre-init user code here\n itemCommand9 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|349-getter|1|349-postInit\n // write post-init user code here\n }//GEN-BEGIN:|349-getter|2|\n return itemCommand9;\n }",
"public Command getItemCommand1() {\n if (itemCommand1 == null) {//GEN-END:|296-getter|0|296-preInit\n // write pre-init user code here\n itemCommand1 = new Command(\"Escuchar\", Command.ITEM, 0);//GEN-LINE:|296-getter|1|296-postInit\n // write post-init user code here\n }//GEN-BEGIN:|296-getter|2|\n return itemCommand1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the validationData property: Validation data inputs. | public Forecasting withValidationData(MLTableJobInput validationData) {
this.validationData = validationData;
return this;
} | [
"public void setDataValidation(String dataValidation);",
"public ValidationData getValidationData() {\n return validationData;\n }",
"public void setValidationValue() {\n\n\t}",
"@Override\n\tpublic void setValidationDate(Date validationDate) {\n\t\t_pathologyData.setValidationDate(validationDate);\n\t}",
"public MLTableJobInput validationData() {\n return this.validationData;\n }",
"public void setValidationValues(Map<String, String> validationValues) {\n\t\tthis.validationValues = validationValues;\n\t}",
"public void passDataObjToValidationObject(){\n if(null == m_InstanceOfDataClass) return ;\n passValidationObject( \"setXmlDataObj\" , m_InstanceOfDataClass ) ;\n }",
"public void setValidation(String validation) {\n this.validation = validation;\n }",
"public void setValidationFailed(String validation) {\r\n validationFailed = validation;\r\n }",
"public void setTrainingData(TrainingData trainingData) {\n\t\t// normalise the input and outputs\n\t\tthis.X = m.normalise(trainingData.getTrainingInput(), trainingData.getMaxInput());\n\t\tthis.y = m.normalise(trainingData.getTrainingOutput(), trainingData.getMaxOutput());\n\t}",
"public void setValidationController(ValidationController validationController)\r\n\t{\r\n\t\tthis.validationController = validationController;\r\n\t}",
"private boolean addManualValidationDataPairToDataSet(FloatMLDataPair data, boolean isValidation) {\n if(isValidation) {\n this.validationData.add(data);\n } else {\n this.trainingData.add(data);\n }\n return !isValidation;\n }",
"public void setDataValidateOnFocusLost(boolean dataValidateOnFocusLost) {\r\n\t\tboolean oldValue = fieldDataValidateOnFocusLost;\r\n\t\tfieldDataValidateOnFocusLost = dataValidateOnFocusLost;\r\n\t\tfirePropertyChange(\"dataValidateOnFocusLost\", new Boolean(oldValue), new Boolean(dataValidateOnFocusLost));\r\n\t}",
"public void setValidationJson(String validationJson) {\n\t\tthis.validationJson = validationJson;\n\t}",
"public Builder setTrainingDatasetValidation(\n com.google.cloud.documentai.v1.TrainProcessorVersionMetadata.DatasetValidation value) {\n if (trainingDatasetValidationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n trainingDatasetValidation_ = value;\n } else {\n trainingDatasetValidationBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }",
"public void setValidationEnabled(boolean validationEnabled);",
"void setValidationPossible(boolean validationPossible);",
"public Forecasting withValidationDataSize(Double validationDataSize) {\n this.validationDataSize = validationDataSize;\n return this;\n }",
"public void setDataInizioValiditaFiltro(Date dataInizioValiditaFiltro) {\n\t\tthis.dataInizioValiditaFiltro = dataInizioValiditaFiltro;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an AnnotatedPrivateKey with a single annotation using AnnotatedPrivateKey.LABEL as a key. | public static AnnotatedPrivateKey annotate(PrivateKey privKey, String label)
{
return new AnnotatedPrivateKey(privKey, label);
} | [
"PrivateKey getPrivateKey();",
"private static PrivateKey generatePrivateKey(byte[] encodedPrivateKey) {\n try {\n return KeyFactory.getInstance(\"RSA\").generatePrivate(new PKCS8EncodedKeySpec(encodedPrivateKey));\n } catch (Exception e) {\n System.out.println(\"Error on generating private key\");\n }\n return null;\n }",
"KeyDescriptor createKeyDescriptor();",
"public abstract PrivateKey generatePrivate(KeySpec keySpec)\n\t throws InvalidKeySpecException;",
"@ConfiguredOption\n Optional<PrivateKey> privateKey();",
"public PrivateKey makePrivateKey() {\n return new PrivateKey(decryptingBigInt, primesMultiplied);\n }",
"String getPrivateKey();",
"@Override\n protected PrivateKey engineGeneratePrivate(KeySpec keySpec)\n throws InvalidKeySpecException {\n\tif (keySpec instanceof PKCS8EncodedKeySpec ) {\n\t return new IosRSAKey.IosRSAPrivateKey(((PKCS8EncodedKeySpec) keySpec).getEncoded()); \n\t}\n if (keySpec instanceof X509EncodedKeySpec) {\n X509EncodedKeySpec x509Spec = (X509EncodedKeySpec) keySpec;\n return new IosRSAKey.IosRSAPrivateKey(x509Spec.getEncoded());\n } else if (keySpec instanceof RSAPrivateKeySpec) {\n return new IosRSAKey.IosRSAPrivateKey((RSAPrivateKeySpec) keySpec);\n }\n throw new InvalidKeySpecException(\n \"Must use PKCS8EncodedKeySpec, X509EncodedKeySpec or RSAPrivateKeySpec; was \"\n + keySpec.getClass().getName());\n }",
"public String getPrivateKeyString();",
"private static PrivateKey buildPrivateKeyFromString(String privateKeyAsString) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, KeyStoreException, CertificateException {\n String privateKeyStrWithoutHeaderFooter = privateKeyAsString.\n replaceAll(\"-----BEGIN PRIVATE KEY-----\", \"\").\n replaceAll(\"-----END PRIVATE KEY-----\", \"\").\n replaceAll(\"\\n\", \"\");\n byte[] privateKeyBytes =\n Base64.getDecoder().decode(privateKeyStrWithoutHeaderFooter.getBytes());\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes);\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\n return fact.generatePrivate(keySpec);\n }",
"public String getPrivateKey();",
"public ElgamalPrivateKey(Group groupG, GroupElement g, ZnElement a) {\n init(groupG, g, a);\n }",
"protected java.security.PrivateKey engineGeneratePrivate(\n\t java.security.spec.KeySpec keySpec)\n\t throws java.security.spec.InvalidKeySpecException {\n\n\tif (keySpec != null && !(keySpec instanceof KeySpec)) {\n\t if (keySpec instanceof java.security.spec.PKCS8EncodedKeySpec) {\n\t\tKeySpec encKeySpec = new PKCS8EncodedKeySpec(\n\t\t\t(java.security.spec.PKCS8EncodedKeySpec) keySpec);\n\t\treturn generatePrivate(encKeySpec);\n\t }\n\n\t throw new java.security.spec.InvalidKeySpecException();\n\t}\n\n\treturn generatePrivate((KeySpec) keySpec);\n }",
"private void generateAndStorePrivateKey() throws IOException, GeneralSecurityException {\n File keysetFile = new File(PRIVATE_KEYSET_FILENAME);\n\n if (!keysetFile.exists()) {\n KeysetHandle keysetHandle = KeysetHandle.generateNew(HybridKeyTemplates.ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM);\n keysetHandle.write(JsonKeysetWriter.withFile(keysetFile), new AwsKmsClient().withDefaultCredentials().getAead(AWS_MASTER_KEY_URI));\n }\n }",
"void storePrivateKey(CryptoParser parser);",
"public static PrivateKeyInfo createPrivateKeyInfo(AsymmetricKeyParameter privateKey) throws IOException\n {\n return createPrivateKeyInfo(privateKey, null);\n }",
"interface WithCreate extends\n WithZoneConfigure,\n Creatable<PrivateDnsZoneGroup> {\n }",
"public static PrivateKey decodePrivateKey(byte[] encoded) {\n try {\n return KeyFactory.getInstance(ALGORITHM).generatePrivate(new PKCS8EncodedKeySpec(encoded));\n } catch (InvalidKeySpecException | NoSuchAlgorithmException e) {\n throw new KeyPairFactoryException(e);\n }\n }",
"public static RSAPrivateKey getPrivateKey () throws InvalidKeyException, FileNotFoundException, IOException, ClassNotFoundException, NoSuchAlgorithmException, InvalidKeySpecException, SignatureException {\n\t\tFile privKeyFile = new File(\"/Users/rajiv/layer4.pk8\");\n DataInputStream dis = new DataInputStream(new FileInputStream(privKeyFile));\n System.out.println((int) privKeyFile.length());\n byte[] privateBytes = new byte[(int) privKeyFile.length()];\n dis.readFully(privateBytes);\n dis.close();\n \n\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\t\tEncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(privateBytes);\n PrivateKey privateKey = keyFactory.generatePrivate(privateKeySpec);\n \n return (RSAPrivateKey) privateKey;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For accepted, either returns null or a ChabuConnectionAcceptInfo with code set to 0. | public ChabuConnectionAcceptInfo isAccepted( ChabuSetupInfo local, ChabuSetupInfo remote ); | [
"public Integer getAcceptedAchCount() {\n return acceptedAchCount;\n }",
"public void setAcceptedAchCount(Integer acceptedAchCount) {\n this.acceptedAchCount = acceptedAchCount;\n }",
"public String getAccept() {\n return this.accept;\n }",
"public String getAccept_no() {\n return accept_no;\n }",
"public Integer getAcceptedCount() {\n return acceptedCount;\n }",
"public Boolean getAccept() {\n return this.accept;\n }",
"void accepted() throws IOException {\n\n checkConnection();\n\n JsonObject message = new JsonObject();\n message.add(JsonInterface.TYPE, JsonInterface.ACCEPTED);\n message.add(JsonInterface.ARGUMENTS, new JsonObject());\n\n sendMessage(message);\n }",
"public void connectionAccepted();",
"boolean getAccepted();",
"public void handlePaxosAcceptRequestAccepted(Transaction t, int shardIdOfSender) {\n\t\tif (this.paxosAcceptsManager.increaseAcceptAccepted(t)) {\n\t\t\t// Transaction has to be committed\n\t\t\tthis.start2PCcommitInDatacenter(t);\n\t\t}\n\t}",
"Accept createAccept();",
"public \n AcceptChallengeReply(AcceptChallengeRequest request)\n {\n super( request.getRequestId(),request.getReturnAddress() );\n itsChallengerUserId = request.getChallengerUserId();\n itsChallengedUserId = request.getChallengedUserId();\n itsGameId = 0L;\n }",
"private void manageAcceptedPacket(MeetingPacket packet) {\n Console.comment(\"=> Meeting response packet accepted from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnAccepted != null) {\n this.callbackOnAccepted.handle(packet.getSourceUser()) ;\n }\n }",
"public void setAccepted() {\r\n\t\tstatus = \"Accepted\";\r\n\t}",
"AcceptVpcPeeringConnectionResult accept(AcceptVpcPeeringConnectionRequest\n request);",
"public static native short AcceptChannel_get_max_accepted_htlcs(long this_ptr);",
"org.axesoft.jaxos.network.protobuff.PaxosMessage.BallotValue getAcceptedValue();",
"public Integer getIsaccepted() {\n return isaccepted;\n }",
"public void setAcceptedCount(Integer acceptedCount) {\n this.acceptedCount = acceptedCount;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Tests containsFavorite with a one element list. Also exercises isFavorite and toggleFavorite. Prerequisites: Set of favorites is empty Procedure: 1. Add 1 PwPair to list 2. Verify list does not contain favorite 3. Add site used for PwPair to favorites 4. Verify list contains favorite | @Test
public void testContainsFavoriteOneItem() throws Exception {
String siteUrl = siteUrls.get(0);
List<PwPair> pairs = new ArrayList<>();
pairs.add(new PwPair(null, new PwsResult("", siteUrl)));
Assert.assertFalse(Utils.containsFavorite(pairs));
Utils.toggleFavorite(siteUrl);
Assert.assertTrue(Utils.containsFavorite(pairs));
} | [
"@Test\n public void testContainsFavoriteTwoItems() throws Exception {\n String siteUrl = siteUrls.get(0);\n List<PwPair> pairs = new ArrayList<>();\n pairs.add(new PwPair(null, new PwsResult(\"\", siteUrl)));\n pairs.add(new PwPair(null, new PwsResult(\"\", siteUrls.get(1))));\n Assert.assertFalse(Utils.containsFavorite(pairs));\n Utils.toggleFavorite(siteUrl);\n Assert.assertTrue(Utils.containsFavorite(pairs));\n }",
"@Test\n public void testContainsFavoriteEmptyList() throws Exception {\n List<PwPair> pairs = new ArrayList<>();\n Assert.assertFalse(Utils.containsFavorite(pairs));\n }",
"public Sources verifyFavorite(String RecentList, String Exist) {\n\t\tboolean blnFlag = false;\n\t\tWebElement btnClassFilter = commonLibrary.isExist(UIMAP_Home.btnClassFilter, 20);\n\t\tif (!(btnClassFilter.getAttribute(\"class\").contains(\"selected\"))) {\n\t\t\tcommonLibrary.clickButtonParentWithWait(btnClassFilter, \"Filter\");\n\t\t}\n\n\t\tWebElement mnuFilterToolBar = commonLibrary.isExist(UIMAP_Home.mnuFilterToolBar, 20);\n\t\tif (mnuFilterToolBar != null) {\n\t\t\tWebElement RecentFavorites = commonLibrary.isExist(mnuFilterToolBar, UIMAP_Home.btnIdRecentFavorites, 20);\n\t\t\tcommonLibrary.clickButtonParentWithWait(RecentFavorites, \"Recent & Favorites\");\n\t\t}\n\n\t\tWebElement RecentFav = commonLibrary.isExist(UIMAP_Home.recentFavoritesFilter, 20);\n\n\t\tList<WebElement> RecentFavList = commonLibrary.isExistList(RecentFav, UIMAP_Home.lstTagListItems, 20);\n\t\tfor (WebElement item : RecentFavList) {\n\t\t\tif (item.getText().contains(RecentList)) {\n\t\t\t\tWebElement favIcon = commonLibrary.isExist(item, UIMAP_Home.addFavorite, 20);\n\t\t\t\tif (favIcon.getAttribute(\"class\").contains(\"FavoriteFull\"))\n\t\t\t\t\tblnFlag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tswitch (Exist) {\n\t\tcase \"Exist\": {\n\t\t\tif (blnFlag) {\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed as a favorite item with star filled in\", RecentList + \" is displayed as a favorite item with star filled in\", Status.PASS);\n\t\t\t} else\n\n\t\t\t{\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed as a favorite item with star filled in\", RecentList + \" is not displayed as a favorite item with star filled in\", Status.FAIL);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"NotExist\": {\n\t\t\tif (!blnFlag) {\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed under Recent & Favorites\", RecentList + \" is not displayed under Recent & Favorites\", Status.PASS);\n\t\t\t} else\n\n\t\t\t{\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed under Recent & Favorites\", RecentList + \" is displayed under Recent & Favorites\", Status.FAIL);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t}\n\n\t\treturn new Sources(scriptHelper);\n\t}",
"@Test(dependsOnMethods = \"selectSite\")\n public void isSiteFavouriteTest()\n {\n SharePage page = resolvePage(driver).render();\n dashBoard = page.getNav().selectMyDashBoard().render();\n MySitesDashlet dashlet = dashBoard.getDashlet(\"my-sites\").render();\n //Site created by api is not a favorite by default.\n Assert.assertFalse(dashlet.isSiteFavourite(siteName));\n dashlet.selectFavorite(siteName);\n Assert.assertTrue(dashlet.isSiteFavourite(siteName));\n Assert.assertFalse(dashlet.isSiteFavourite(sampleSiteFullName));\n }",
"private boolean isFavorite() {\n for (int favoriteIndex : favoriteIndexes) {\n if (favoriteIndex == shownTipIndex) {\n return true;\n }\n }\n return false;\n }",
"public void setFavoriteSiteList(ArrayList<Site> favoriteSiteList) \n {\n this.favoriteSiteList = favoriteSiteList;\n }",
"@Test\n public void deleteFavoriteNeighbourWithSuccessFromFavoriteList() {\n Neighbour neighbourToDelete = service.getNeighbours().get(0);\n neighbourToDelete.setFavorite(true);\n service.deleteNeighbour(neighbourToDelete);\n assertFalse(service.getNeighbourIsFavorite().contains(neighbourToDelete));\n }",
"public Sources verifyRecentFavoritesPreFilters(String RecentList, String Exist) {\n\t\tboolean blnFlag = false;\n\t\tWebElement btnClassFilter = commonLibrary.isExist(UIMAP_Home.btnClassFilter, 20);\n\t\tif (!(btnClassFilter.getAttribute(\"class\").contains(\"selected\"))) {\n\t\t\tcommonLibrary.clickButtonParentWithWait(btnClassFilter, \"Filter\");\n\t\t}\n\n\t\tWebElement mnuFilterToolBar = commonLibrary.isExist(UIMAP_Home.mnuFilterToolBar, 20);\n\t\tif (mnuFilterToolBar != null) {\n\t\t\tWebElement RecentFavorites = commonLibrary.isExist(mnuFilterToolBar, UIMAP_Home.btnIdRecentFavorites, 20);\n\t\t\tcommonLibrary.clickButtonParentWithWait(RecentFavorites, \"Recent & Favorites\");\n\t\t}\n\n\t\tWebElement RecentFav = commonLibrary.isExist(UIMAP_Home.recentFavoritesFilter, 20);\n\n\t\tList<WebElement> RecentFavList = commonLibrary.isExistList(RecentFav, UIMAP_Home.lstTagListItems, 20);\n\t\tfor (WebElement item : RecentFavList) {\n\t\t\tif (item.getText().contains(RecentList)) {\n\n\t\t\t\tblnFlag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tswitch (Exist) {\n\t\tcase \"Exist\": {\n\t\t\tif (blnFlag) {\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed under Recent & Favorites\", RecentList + \" is displayed under Recent & Favorites\", Status.PASS);\n\t\t\t} else\n\n\t\t\t{\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed under Recent & Favorites\", RecentList + \" is not displayed under Recent & Favorites\", Status.FAIL);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"NotExist\": {\n\t\t\tif (!blnFlag) {\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed under Recent & Favorites\", RecentList + \" is not displayed under Recent & Favorites\", Status.PASS);\n\t\t\t} else\n\n\t\t\t{\n\t\t\t\treport.updateTestLog(\"Verify \" + RecentList + \" is displayed under Recent & Favorites\", RecentList + \" is displayed under Recent & Favorites\", Status.FAIL);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t}\n\n\t\treturn new Sources(scriptHelper);\n\t}",
"private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }",
"private void addToFavorite() {\n\n ArrayList<String> favorite;\n String text = tvMessage.getText().toString();\n boolean textAlreadyExists=false;\n if(AppPreferences.getFavoriteList(getActivity())== null) {\n favorite = new ArrayList<>();\n favorite.add(text);\n AppPreferences.setFavoriteList(getActivity(),favorite);\n Snackbar.make(tvMessage, R.string.added_to_fav,Snackbar.LENGTH_LONG).show();\n }else {\n favorite = AppPreferences.getFavoriteList(getActivity());\n\n for(int i=0;i<favorite.size();i++)\n {\n if(text.equals(favorite.get(i)))\n {\n textAlreadyExists=true;\n break;\n }\n }\n if(!textAlreadyExists)\n {\n favorite.add(text);\n AppPreferences.setFavoriteList(getActivity(),favorite);\n Snackbar.make(tvMessage, R.string.added_to_fav,Snackbar.LENGTH_LONG).show();\n updateWidget(getActivity());\n }else{\n Snackbar.make(tvMessage, R.string.already_exist_in_fav_list,Snackbar.LENGTH_LONG).show();\n }\n }\n }",
"@Test\t\t\r\n\tpublic void Tests_favorites_add_fromLessThen5() throws Exception {\r\n\t\tSystem.out.println(\"Running test for adding to favorites from the less-than-5 tab\");\t\t\r\n\r\n\t\t//open the less-than-5 tab\r\n\t\tdriver.get(ElementsWebsites.Zipy_il_lessThan5);\r\n\r\n\t\t//click the pin button on the thumbnail\r\n\t\tnew Actions(driver).moveToElement(driver.findElement(By.xpath(ElementsThumbs.lessThan5_3)))\r\n\t\t.moveToElement(driver.findElement(By.xpath(ElementsThumbs.lessThan5_3_PinThumbIcon))).click().build().perform();\r\n\t\t\r\n\t\t//save products title\t\t\t\r\n\t\tString ProductTitle = act.elementText(ElementsThumbs.lessThan5_3_title, driver);\r\n\t\t\t\t\t\r\n\t\t// open the favorites window and save its contents\r\n\t\tact.click(ElementsBuying.Product_favoritesButton, driver);\r\n\t\tThread.sleep(500);\r\n\t\tString favoritesFrame = act.elementText(ElementsBuying.Product_favoritesFrame, driver);\r\n\t\t\r\n\t\t// if correct, the product title will be found in the favorites window:\r\n\t\tAssert.assertTrue(favoritesFrame.contains(ProductTitle) );\r\n\t\t\r\n\t\t//at the end, remove the products from the favorites, for the future tests\t\t\r\n\t\tact.click(ElementsBuying.Product_favoritesRemove, driver);\r\n\t}",
"private void updateFavorites() {\n mFavoriteSelected = !mFavoriteSelected;\n setFavoriteColor();\n }",
"@Test\n public void addNeighbourToFavoritesWithSuccess() {\n Neighbour neighbourToAddToFavorites = service.getNeighbours().get( 0 );\n /// modification de la valeur du booleen et modification dans la liste des voisins\n neighbourToAddToFavorites.setIsFavorit( true);\n service.modifyNeighbour(neighbourToAddToFavorites);\n // Le voisin modifié est présent dans les deux listes\n assertTrue(service.getFavoriteNeighbours().contains(neighbourToAddToFavorites));\n }",
"@Test (expected = IndexOutOfBoundsException.class)\n public void getFavoriteNeighboursWithSuccessFromEmptyList() {\n Neighbour expectedNeighbours = service.getNeighbourIsFavorite().get(5);\n assertTrue(service.getNeighbourIsFavorite().contains(expectedNeighbours));\n }",
"public boolean isFavorite() {\r\n return favorited;\r\n }",
"@Test\t\t\r\n\tpublic void Tests_favorites_add_fromProductPage() throws Exception {\r\n\t\tSystem.out.println(\"Running test for adding to favorites from the product page\");\t\t\r\n\r\n\t\t//get to the required product page and save its title\r\n\t\tdriver.get(ElementsBuying.Product_noVariations);\t\t\r\n\t\tString ProductTitle = act.elementAttText(ElementsBuying.Product_titleFromPicture, \"alt\", driver);\r\n\r\n\t\t//add to the favorites\r\n\t\tact.click(ElementsBuying.Product_pin, driver);\r\n\r\n\t\t// open the favorites window and save its contents \r\n\t\tact.click(ElementsBuying.Product_favoritesButton, driver);\r\n\t\tThread.sleep(500);\r\n\t\t\r\n\t\tString favoritesFrame = act.elementText(ElementsBuying.Product_favoritesFrame, driver);\r\n\t\t\r\n\t\t// if correct, the product title will be found in the favorites window:\r\n\t\tAssert.assertTrue(favoritesFrame.contains(ProductTitle) );\r\n\t\t\r\n\t\t//at the end, remove the products from the favorites, for the future tests\t\t\r\n\t\tdriver.findElement(By.xpath(ElementsBuying.Product_favoritesRemove)).click();\r\n\t}",
"private boolean checkIfFavorite() {\n if (favoriteIds.contains(movie.getId())) {\n movie.setFavorite(true);\n return true;\n }\n movie.setFavorite(false);\n return false;\n }",
"boolean isFavorite(int id);",
"@Test\n public void testGetMemes_validateFavouritedMemes() {\n System.out.println(\"Testing getMemes(), validating favourites list\");\n List<Meme> favouritedMemes = accessFavourites.getMemes();\n for(int i = 0; i < favouritedMemes.size(); i++){\n assertTrue(favouritedMemes.get(i).isFavourite());\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to find the EJBean with a given Primary Key from the persistent storage. | public String ejbFindByPrimaryKey(String pk)
throws ObjectNotFoundException
{
log("ejbFindByPrimaryKey (" + pk + ")");
Connection con = null;
PreparedStatement ps = null;
try {
con = getConnection();
ps = con.prepareStatement("select bal from ejbAccounts where id = ?");
ps.setString(1, pk);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
balance = rs.getDouble(1);
} else {
String error = "ejbFindByPrimaryKey: AccountBean (" + pk + ") not found";
log(error);
throw new ObjectNotFoundException (error);
}
} catch (SQLException sqe) {
log("SQLException: " + sqe);
throw new EJBException (sqe);
} finally {
cleanup(con, ps);
}
log("ejbFindByPrimaryKey (" + pk + ") found");
return pk;
} | [
"public EventEntityPK ejbFindByPrimaryKey(EventEntityPK pk) throws FinderException {\n\t\ttry {\n\t\t\tConnection connection = Util.getInstance().getConnection();\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = connection.prepareStatement(\"SELECT pk FROM Event WHERE pk = ?\");\n\t\t\t\ttry {\n\t\t\t\t\tstatement.setInt(1, pk.id);\n\t\t\t\t\tResultSet resultSet = statement.executeQuery();\n\n\t\t\t\t\t// check if bean can be loaded from database\n\t\t\t\t\tif (!resultSet.next()) {\n\t\t\t\t\t\tthrow new FinderException(\"Could not find Event: \" + pk.id);\n\t\t\t\t\t}\n\t\t\t\t\treturn new EventEntityPK(pk.id);\n\t\t\t\t} finally {\n\t\t\t\t\tstatement.close();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t} catch (SQLException ex) {\n\t\t\tthrow new EJBException(ex);\n\t\t}\n\n\t}",
"public com.vh.locker.ejb.Contact findByPrimaryKey(java.lang.Long primaryKey) throws javax.ejb.FinderException;",
"public UnitOfLearningPK ejbFindByPrimaryKey(UnitOfLearningPK pk) throws FinderException {\n\t\tint id = pk.id;\n\n\t\ttry {\n\t\t\tConnection connection = Util.getInstance().getConnection();\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = connection.prepareStatement(\"SELECT Id FROM UnitOfLearning WHERE Id = ?\");\n\t\t\t\ttry {\n\t\t\t\t\tstatement.setInt(1, id);\n\t\t\t\t\tResultSet resultSet = statement.executeQuery();\n\n\t\t\t\t\t// check if bean can be loaded from database\n\t\t\t\t\tif (!resultSet.next()) {\n\t\t\t\t\t\tthrow new FinderException(\"Could not find UnitOfLearning: \" + id);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tstatement.close();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t\treturn new UnitOfLearningPK(id);\n\t\t} catch (SQLException ex) {\n\t\t\tthrow new EJBException(ex);\n\t\t}\n\t}",
"public E findById(Serializable pk) ;",
"public E findByPK(Serializable pk) {\n Session session = DAOUtils.getSession();\n Transaction trans = session.beginTransaction();\n\n E entity = session.get(genericType, pk);\n\n trans.commit();\n return entity;\n }",
"T findOne(K key) throws SQLException;",
"public T getByPK(PK key) throws PersistException;",
"GenericValue findByPrimaryKey(GenericPK primaryKey) throws GenericEntityException;",
"public IBeanObject getObject(String key) throws BeanObjectException;",
"public Persona findByPrimaryKey(PersonaPk pk) throws PersonaDaoException;",
"public UserDTO findbypk(long pk) throws ApplicationException {\n UserDTO dto = null;\n \t\tSession s=null;\n \t\ttry{\t\n \t\t\t s= HIBdatasource.getsession();\n \t\t\t dto= (UserDTO) s.get(UserDTO.class, pk);\n \t\t\t\n \t\t }\n \t\tcatch(HibernateException hb)\n \t\t {\n \t\t\thb.printStackTrace();\n \t\t\tthrow new ApplicationException(\"Exception in findbypk operation\");\t\t\n \t\t }\n \t\tfinally{\n \t\t\tHIBdatasource.closesession(s);\n \t\t }\n \t\t\treturn dto;\n\n\t}",
"Object getPrimaryKey() throws RemoteException;",
"T findByPrimaryKey(Object id);",
"public Entry findByPrimaryKey(EntryPK pk) throws FinderException, RemoteException;",
"public Object getFromIdentityMap(Record rowContainingPrimaryKey, Class theClass);",
"public Object getFromIdentityMap(Vector primaryKey, Class theClass);",
"public Customer findByPrimaryKey(CustomerPk pk) throws CustomerDaoException;",
"T findByPrimaryKey(Object id, ContextInfo contextInfo);",
"public Documents findByPrimaryKey(DocumentsPk pk) throws DocumentsDaoException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the valorBinario property. | public byte[] getValorBinario() {
return valorBinario;
} | [
"public void setValorBinario(byte[] value) {\n this.valorBinario = value;\n }",
"public ByteArray getBin() {\n return bin;\n }",
"public String getBin() {\n return bin;\n }",
"public java.lang.String getBin() {\r\n return bin;\r\n }",
"public byte[] getBinaryValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not a hexBinary.\");\n }",
"public String Octal_Binario(String Valor)\n {\n int Decimal=Integer.parseInt(Valor,8);\n Valor=Integer.toBinaryString(Decimal);\n return Valor;\n }",
"public Binary getBinaryValue()\n {\n return ((BinaryEntry) m_entry).getOriginalBinaryValue();\n }",
"public String getValue(){\r\n return valor.valor;\r\n }",
"public byte[] getValue()\n\t{\n\t\tJNIBinaryField jBinField = (JNIBinaryField) getInternal();\n\n\t\treturn jBinField.getValue();\n\t}",
"@JsonProperty(\"bin\")\n public String getBinAsString() {\n return bin;\n }",
"public String getNUM_BICO() {\n return NUM_BICO;\n }",
"public byte getValorContingencias() {\n return valorContingencias;\n }",
"public java.math.BigInteger getBambini()\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(BAMBINI$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }",
"@Override\n\tpublic int getValorSeguro() {\n\t\treturn this.valor;\n\t}",
"public BigDecimal getValorRendaBruta() {\n\t\treturn valorRendaBruta;\n\t}",
"Bin getBin();",
"public ArbolBinario(){\n\t\tsetRaiz(new NodoArbol<E>(\"\",\"\",null,null));\n\t}",
"public int getBinNumber() {\r\n return binNumber; // may be -1\r\n }",
"public java.math.BigDecimal getValTotBoletasVendidas() {\n\t\treturn valTotBoletasVendidas;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'var123' field has been set. | public boolean hasVar123() {
return fieldSetFlags()[124];
} | [
"public boolean hasField123() {\n return fieldSetFlags()[123];\n }",
"public boolean hasVar112() {\n return fieldSetFlags()[113];\n }",
"public boolean hasVar131() {\n return fieldSetFlags()[132];\n }",
"public boolean hasVar231() {\n return fieldSetFlags()[232];\n }",
"public abstract boolean hasVarAndVarSons();",
"boolean check (Env env) {\n if (Env.find (env, nameOfVar) != null) {\n return true;\n } else {\n System.err.println (\"Semantic error: The variable \\\"\" \n + nameOfVar + \"\\\" was used but was not declared!\");\n return false;\n }\n }",
"private boolean assertIdAndVarName() {\r\n\t\tfinal boolean isValidId = assertNotEmpty(cmpCfg.getId(),\r\n\t\t\t\tYValidationAspekt.VIEW_ID_NOT_SPECIFIED);\r\n\r\n\t\tfinal boolean isValidVar = assertNotEmpty(cmpCfg.getVariableName(),\r\n\t\t\t\tYValidationAspekt.VIEW_VAR_NOT_SPECIFIED);\r\n\r\n\t\tfinal boolean isValid = isValidId && isValidVar;\r\n\t\treturn isValid;\r\n\r\n\t}",
"public boolean hasVar133() {\n return fieldSetFlags()[134];\n }",
"public boolean hasVar234() {\n return fieldSetFlags()[235];\n }",
"public boolean hasVar122() {\n return fieldSetFlags()[123];\n }",
"public boolean hasVar124() {\n return fieldSetFlags()[125];\n }",
"public boolean hasVar121() {\n return fieldSetFlags()[122];\n }",
"public boolean hasVar120() {\n return fieldSetFlags()[121];\n }",
"public boolean hasVar132() {\n return fieldSetFlags()[133];\n }",
"public boolean hasVar43() {\n return fieldSetFlags()[44];\n }",
"public boolean hasVar111() {\n return fieldSetFlags()[112];\n }",
"public boolean hasVar145() {\n return fieldSetFlags()[146];\n }",
"public boolean hasVar42() {\n return fieldSetFlags()[43];\n }",
"public boolean hasVar130() {\n return fieldSetFlags()[131];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "cp_term_symbol" $ANTLR start "function" /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:951:1: function : functionName ( ws )? LPAREN ( ws )? ( fnAttributes |) RPAREN ; | public final void function() throws RecognitionException {
try { dbg.enterRule(getGrammarFileName(), "function");
if ( getRuleLevel()==0 ) {dbg.commence();}
incRuleLevel();
dbg.location(951, 0);
try {
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:952:2: ( functionName ( ws )? LPAREN ( ws )? ( fnAttributes |) RPAREN )
dbg.enterAlt(1);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:952:5: functionName ( ws )? LPAREN ( ws )? ( fnAttributes |) RPAREN
{
dbg.location(952,5);
pushFollow(FOLLOW_functionName_in_function6075);
functionName();
state._fsp--;
if (state.failed) return;dbg.location(952,18);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:952:18: ( ws )?
int alt259=2;
try { dbg.enterSubRule(259);
try { dbg.enterDecision(259, decisionCanBacktrack[259]);
int LA259_0 = input.LA(1);
if ( (LA259_0==COMMENT||LA259_0==NL||LA259_0==WS) ) {
alt259=1;
}
} finally {dbg.exitDecision(259);}
switch (alt259) {
case 1 :
dbg.enterAlt(1);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:952:18: ws
{
dbg.location(952,18);
pushFollow(FOLLOW_ws_in_function6077);
ws();
state._fsp--;
if (state.failed) return;
}
break;
}
} finally {dbg.exitSubRule(259);}
dbg.location(953,3);
match(input,LPAREN,FOLLOW_LPAREN_in_function6082); if (state.failed) return;dbg.location(953,10);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:953:10: ( ws )?
int alt260=2;
try { dbg.enterSubRule(260);
try { dbg.enterDecision(260, decisionCanBacktrack[260]);
int LA260_0 = input.LA(1);
if ( (LA260_0==COMMENT||LA260_0==NL||LA260_0==WS) ) {
alt260=1;
}
} finally {dbg.exitDecision(260);}
switch (alt260) {
case 1 :
dbg.enterAlt(1);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:953:10: ws
{
dbg.location(953,10);
pushFollow(FOLLOW_ws_in_function6084);
ws();
state._fsp--;
if (state.failed) return;
}
break;
}
} finally {dbg.exitSubRule(260);}
dbg.location(954,3);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:954:3: ( fnAttributes |)
int alt261=2;
try { dbg.enterSubRule(261);
try { dbg.enterDecision(261, decisionCanBacktrack[261]);
int LA261_0 = input.LA(1);
if ( ((LA261_0 >= ANGLE && LA261_0 <= AT_SIGN)||(LA261_0 >= BOTTOMCENTER_SYM && LA261_0 <= BOTTOMRIGHT_SYM)||LA261_0==CHARSET_SYM||LA261_0==COUNTER_STYLE_SYM||LA261_0==DIMENSION||LA261_0==EMS||LA261_0==EXS||(LA261_0 >= FONT_FACE_SYM && LA261_0 <= FREQ)||LA261_0==GEN||(LA261_0 >= HASH && LA261_0 <= HASH_SYMBOL)||(LA261_0 >= IDENT && LA261_0 <= IMPORT_SYM)||(LA261_0 >= LBRACE && LA261_0 <= LENGTH)||(LA261_0 >= LESS_AND && LA261_0 <= LESS_JS_STRING)||LA261_0==LPAREN||(LA261_0 >= MEDIA_SYM && LA261_0 <= MOZ_DOCUMENT_SYM)||LA261_0==NAMESPACE_SYM||(LA261_0 >= NOT && LA261_0 <= NUMBER)||(LA261_0 >= PAGE_SYM && LA261_0 <= PERCENTAGE_SYMBOL)||LA261_0==PLUS||(LA261_0 >= REM && LA261_0 <= RIGHTTOP_SYM)||(LA261_0 >= SASS_AT_ROOT && LA261_0 <= SASS_DEBUG)||(LA261_0 >= SASS_EACH && LA261_0 <= SASS_ELSE)||LA261_0==SASS_EXTEND||(LA261_0 >= SASS_FOR && LA261_0 <= SASS_FUNCTION)||(LA261_0 >= SASS_IF && LA261_0 <= SASS_MIXIN)||(LA261_0 >= SASS_RETURN && LA261_0 <= SASS_WHILE)||LA261_0==STRING||(LA261_0 >= TILDE && LA261_0 <= TOPRIGHT_SYM)||(LA261_0 >= URANGE && LA261_0 <= URI)||LA261_0==VARIABLE||LA261_0==WEBKIT_KEYFRAMES_SYM) ) {
alt261=1;
}
else if ( (LA261_0==RPAREN) ) {
alt261=2;
}
else {
if (state.backtracking>0) {state.failed=true; return;}
NoViableAltException nvae =
new NoViableAltException("", 261, 0, input);
dbg.recognitionException(nvae);
throw nvae;
}
} finally {dbg.exitDecision(261);}
switch (alt261) {
case 1 :
dbg.enterAlt(1);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:955:21: fnAttributes
{
dbg.location(955,21);
pushFollow(FOLLOW_fnAttributes_in_function6111);
fnAttributes();
state._fsp--;
if (state.failed) return;
}
break;
case 2 :
dbg.enterAlt(2);
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:957:3:
{
}
break;
}
} finally {dbg.exitSubRule(261);}
dbg.location(958,3);
match(input,RPAREN,FOLLOW_RPAREN_in_function6142); if (state.failed) return;
}
}
catch ( RecognitionException rce) {
reportError(rce);
consumeUntil(input, BitSet.of(RPAREN, SEMI, RBRACE));
}
finally {
// do for sure before leaving
}
dbg.location(959, 1);
}
finally {
dbg.exitRule(getGrammarFileName(), "function");
decRuleLevel();
if ( getRuleLevel()==0 ) {dbg.terminate();}
}
} | [
"Rule Function() {\n // Push 1 FunctionNode onto the value stack\n StringVar functionName = new StringVar(\"\");\n return Sequence(\n Optional(\"oneway \"),\n FunctionType(),\n Identifier(),\n actions.pop(),\n ACTION(functionName.set(match())),\n \"( \",\n ZeroOrMore(Field()),\n \") \",\n Optional(Throws()),\n Optional(ListSeparator()),\n push(new IdentifierNode(functionName.get())),\n actions.pushFunctionNode());\n }",
"public Node function()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.IDENTIFIER)\r\n\t\t{\r\n\t\t\tString name = lexer.getString();\r\n\t\t\tif(lexer.getToken()==Lexer.Token.LEFT_BRACKETS)\r\n\t\t\t{\r\n\t\t\t\tNode exp = expression();\r\n\t\t\t\tif(exp!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(lexer.getToken()==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(name.equals(\"sin\")) return new Sin(exp);\r\n\t\t\t\t\t\tif(name.equals(\"cos\")) return new Cos(exp);\r\n\t\t\t\t\t\tif(name.equals(\"tan\")) return new Tan(exp);\r\n\t\t\t\t\t\tif(name.equals(\"log\")) return new Log(exp);\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\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}",
"public Token functionName() throws SyntaxException{\r\n\t\tToken name = null;\r\n\t\tswitch (t.getKind()) {\r\n\t\t\tcase KW_sin:\r\n\t\t\t\tname = match(KW_sin);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_cos:\r\n\t\t\t\t name = match(KW_cos);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_atan:\r\n\t\t\t\tname = match(KW_atan);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_abs:\r\n\t\t\t\tname = match(KW_abs);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_log:\r\n\t\t\t\tname = match(KW_log);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_cart_x:\r\n\t\t\t\tname = match(KW_cart_x);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_cart_y:\r\n\t\t\t\tname = match(KW_cart_y);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_polar_a:\r\n\t\t\t\tname = match(KW_polar_a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_polar_r:\r\n\t\t\t\tname = match(KW_polar_r);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_int:\r\n\t\t\t\tname = match(KW_int);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_float:\r\n\t\t\t\tname = match(KW_float);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_width:\r\n\t\t\t\tname = match(KW_width);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KW_height:\r\n\t\t\t\tname = match(KW_height);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tname = color();\r\n\t\t}\r\n\t\treturn name;\r\n\t}",
"public final void term() throws RecognitionException {\n try {\n // css21.g:190:5: ( ( unaryOperator )? ( NUMBER | PERCENTAGE | LENGTH | EMS | EXS | ANGLE | TIME | FREQ ) | STRING | IDENT ( LPAREN expr RPAREN )? | URI | hexColor )\n int alt26=5;\n switch ( input.LA(1) ) {\n case ANGLE:\n case EMS:\n case EXS:\n case FREQ:\n case LENGTH:\n case MINUS:\n case NUMBER:\n case PERCENTAGE:\n case PLUS:\n case TIME:\n {\n alt26=1;\n }\n break;\n case STRING:\n {\n alt26=2;\n }\n break;\n case IDENT:\n {\n alt26=3;\n }\n break;\n case URI:\n {\n alt26=4;\n }\n break;\n case HASH:\n {\n alt26=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 26, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt26) {\n case 1 :\n // css21.g:190:7: ( unaryOperator )? ( NUMBER | PERCENTAGE | LENGTH | EMS | EXS | ANGLE | TIME | FREQ )\n {\n // css21.g:190:7: ( unaryOperator )?\n int alt24=2;\n int LA24_0 = input.LA(1);\n\n if ( (LA24_0==MINUS||LA24_0==PLUS) ) {\n alt24=1;\n }\n switch (alt24) {\n case 1 :\n // css21.g:190:7: unaryOperator\n {\n pushFollow(FOLLOW_unaryOperator_in_term1286);\n unaryOperator();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n\n if ( input.LA(1)==ANGLE||input.LA(1)==EMS||input.LA(1)==EXS||input.LA(1)==FREQ||input.LA(1)==LENGTH||input.LA(1)==NUMBER||input.LA(1)==PERCENTAGE||input.LA(1)==TIME ) {\n input.consume();\n state.errorRecovery=false;\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n\n }\n break;\n case 2 :\n // css21.g:201:7: STRING\n {\n match(input,STRING,FOLLOW_STRING_in_term1443); if (state.failed) return ;\n\n }\n break;\n case 3 :\n // css21.g:202:7: IDENT ( LPAREN expr RPAREN )?\n {\n match(input,IDENT,FOLLOW_IDENT_in_term1451); if (state.failed) return ;\n\n // css21.g:202:13: ( LPAREN expr RPAREN )?\n int alt25=2;\n int LA25_0 = input.LA(1);\n\n if ( (LA25_0==LPAREN) ) {\n alt25=1;\n }\n switch (alt25) {\n case 1 :\n // css21.g:203:17: LPAREN expr RPAREN\n {\n match(input,LPAREN,FOLLOW_LPAREN_in_term1474); if (state.failed) return ;\n\n pushFollow(FOLLOW_expr_in_term1476);\n expr();\n\n state._fsp--;\n if (state.failed) return ;\n\n match(input,RPAREN,FOLLOW_RPAREN_in_term1478); if (state.failed) return ;\n\n }\n break;\n\n }\n\n\n }\n break;\n case 4 :\n // css21.g:205:7: URI\n {\n match(input,URI,FOLLOW_URI_in_term1501); if (state.failed) return ;\n\n }\n break;\n case 5 :\n // css21.g:206:7: hexColor\n {\n pushFollow(FOLLOW_hexColor_in_term1509);\n hexColor();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }",
"public final void fnAttribute() throws RecognitionException {\n\t\ttry { dbg.enterRule(getGrammarFileName(), \"fnAttribute\");\n\t\tif ( getRuleLevel()==0 ) {dbg.commence();}\n\t\tincRuleLevel();\n\t\tdbg.location(978, 0);\n\n\t\ttry {\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:979:2: ( ( fnAttributeName ( ws )? ( OPEQ | COLON ) )=> fnAttributeName ( ws )? ( OPEQ | COLON ) ( ws )? fnAttributeValue | ( cp_expression )=> cp_expression | expression )\n\t\t\tint alt271=3;\n\t\t\ttry { dbg.enterDecision(271, decisionCanBacktrack[271]);\n\n\t\t\tint LA271_0 = input.LA(1);\n\t\t\tif ( (LA271_0==IDENT) ) {\n\t\t\t\tint LA271_1 = input.LA(2);\n\t\t\t\tif ( (synpred38_Css3()) ) {\n\t\t\t\t\talt271=1;\n\t\t\t\t}\n\t\t\t\telse if ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==AT_IDENT||(LA271_0 >= BOTTOMCENTER_SYM && LA271_0 <= BOTTOMRIGHT_SYM)||LA271_0==CHARSET_SYM||LA271_0==COUNTER_STYLE_SYM||LA271_0==FONT_FACE_SYM||LA271_0==IMPORT_SYM||(LA271_0 >= LEFTBOTTOM_SYM && LA271_0 <= LEFTTOP_SYM)||LA271_0==MEDIA_SYM||LA271_0==MOZ_DOCUMENT_SYM||LA271_0==NAMESPACE_SYM||LA271_0==PAGE_SYM||(LA271_0 >= RIGHTBOTTOM_SYM && LA271_0 <= RIGHTTOP_SYM)||(LA271_0 >= SASS_AT_ROOT && LA271_0 <= SASS_DEBUG)||(LA271_0 >= SASS_EACH && LA271_0 <= SASS_ELSE)||LA271_0==SASS_EXTEND||(LA271_0 >= SASS_FOR && LA271_0 <= SASS_FUNCTION)||(LA271_0 >= SASS_IF && LA271_0 <= SASS_MIXIN)||LA271_0==SASS_RETURN||(LA271_0 >= SASS_WARN && LA271_0 <= SASS_WHILE)||(LA271_0 >= TOPCENTER_SYM && LA271_0 <= TOPRIGHT_SYM)||LA271_0==WEBKIT_KEYFRAMES_SYM) ) {\n\t\t\t\tint LA271_2 = input.LA(2);\n\t\t\t\tif ( (((synpred38_Css3()&&evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\"))&&evalPredicate(isLessSource(),\"isLessSource()\"))) ) {\n\t\t\t\t\talt271=1;\n\t\t\t\t}\n\t\t\t\telse if ( (((evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\")&&evalPredicate(isLessSource(),\"isLessSource()\"))&&synpred39_Css3())) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( ((evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\")&&evalPredicate(isLessSource(),\"isLessSource()\"))) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 271, 2, input);\n\t\t\t\t\t\tdbg.recognitionException(nvae);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==SASS_VAR) ) {\n\t\t\t\tint LA271_3 = input.LA(2);\n\t\t\t\tif ( (((synpred38_Css3()&&evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\"))&&evalPredicate(isScssSource(),\"isScssSource()\"))) ) {\n\t\t\t\t\talt271=1;\n\t\t\t\t}\n\t\t\t\telse if ( (((evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\")&&synpred39_Css3())&&evalPredicate(isScssSource(),\"isScssSource()\"))) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( ((evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\")&&evalPredicate(isScssSource(),\"isScssSource()\"))) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 271, 3, input);\n\t\t\t\t\t\tdbg.recognitionException(nvae);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==LBRACE) && (synpred39_Css3())) {\n\t\t\t\talt271=2;\n\t\t\t}\n\t\t\telse if ( (LA271_0==NOT) && (synpred39_Css3())) {\n\t\t\t\talt271=2;\n\t\t\t}\n\t\t\telse if ( (LA271_0==MINUS||LA271_0==PLUS) ) {\n\t\t\t\tint LA271_6 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==VARIABLE) ) {\n\t\t\t\tint LA271_7 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==LBRACKET) ) {\n\t\t\t\tint LA271_8 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==NUMBER) ) {\n\t\t\t\tint LA271_9 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==URANGE) ) {\n\t\t\t\tint LA271_10 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==PERCENTAGE) ) {\n\t\t\t\tint LA271_11 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==LENGTH) ) {\n\t\t\t\tint LA271_12 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==EMS) ) {\n\t\t\t\tint LA271_13 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==REM) ) {\n\t\t\t\tint LA271_14 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==EXS) ) {\n\t\t\t\tint LA271_15 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==ANGLE) ) {\n\t\t\t\tint LA271_16 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==TIME) ) {\n\t\t\t\tint LA271_17 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==FREQ) ) {\n\t\t\t\tint LA271_18 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==RESOLUTION) ) {\n\t\t\t\tint LA271_19 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==DIMENSION) ) {\n\t\t\t\tint LA271_20 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==STRING) ) {\n\t\t\t\tint LA271_21 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==TILDE) ) {\n\t\t\t\tint LA271_22 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==LESS_JS_STRING) ) {\n\t\t\t\tint LA271_23 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==GEN) ) {\n\t\t\t\tint LA271_24 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==URI) ) {\n\t\t\t\tint LA271_25 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==HASH) ) {\n\t\t\t\tint LA271_26 = input.LA(2);\n\t\t\t\tif ( (synpred39_Css3()) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==LESS_AND) ) {\n\t\t\t\tint LA271_27 = input.LA(2);\n\t\t\t\tif ( ((synpred39_Css3()&&evalPredicate(isScssSource(),\"isScssSource()\"))) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (evalPredicate(isScssSource(),\"isScssSource()\")) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 271, 27, input);\n\t\t\t\t\t\tdbg.recognitionException(nvae);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==HASH_SYMBOL) ) {\n\t\t\t\tint LA271_28 = input.LA(2);\n\t\t\t\tif ( ((synpred39_Css3()&&evalPredicate(isScssSource(),\"isScssSource()\"))) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (evalPredicate(isScssSource(),\"isScssSource()\")) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 271, 28, input);\n\t\t\t\t\t\tdbg.recognitionException(nvae);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==AT_SIGN) ) {\n\t\t\t\tint LA271_29 = input.LA(2);\n\t\t\t\tif ( ((evalPredicate(isLessSource(),\"isLessSource()\")&&synpred39_Css3())) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (evalPredicate(isLessSource(),\"isLessSource()\")) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 271, 29, input);\n\t\t\t\t\t\tdbg.recognitionException(nvae);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==PERCENTAGE_SYMBOL) ) {\n\t\t\t\tint LA271_30 = input.LA(2);\n\t\t\t\tif ( ((evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\")&&synpred39_Css3())) ) {\n\t\t\t\t\talt271=2;\n\t\t\t\t}\n\t\t\t\telse if ( (evalPredicate(isCssPreprocessorSource(),\"isCssPreprocessorSource()\")) ) {\n\t\t\t\t\talt271=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 271, 30, input);\n\t\t\t\t\t\tdbg.recognitionException(nvae);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse if ( (LA271_0==IMPORTANT_SYM) && (synpred39_Css3())) {\n\t\t\t\talt271=2;\n\t\t\t}\n\t\t\telse if ( (LA271_0==LPAREN) && (synpred39_Css3())) {\n\t\t\t\talt271=2;\n\t\t\t}\n\n\t\t\t} finally {dbg.exitDecision(271);}\n\n\t\t\tswitch (alt271) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:980:9: ( fnAttributeName ( ws )? ( OPEQ | COLON ) )=> fnAttributeName ( ws )? ( OPEQ | COLON ) ( ws )? fnAttributeValue\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(980,46);\n\t\t\t\t\tpushFollow(FOLLOW_fnAttributeName_in_fnAttribute6289);\n\t\t\t\t\tfnAttributeName();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;dbg.location(980,62);\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:980:62: ( ws )?\n\t\t\t\t\tint alt269=2;\n\t\t\t\t\ttry { dbg.enterSubRule(269);\n\t\t\t\t\ttry { dbg.enterDecision(269, decisionCanBacktrack[269]);\n\n\t\t\t\t\tint LA269_0 = input.LA(1);\n\t\t\t\t\tif ( (LA269_0==COMMENT||LA269_0==NL||LA269_0==WS) ) {\n\t\t\t\t\t\talt269=1;\n\t\t\t\t\t}\n\t\t\t\t\t} finally {dbg.exitDecision(269);}\n\n\t\t\t\t\tswitch (alt269) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:980:62: ws\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdbg.location(980,62);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_ws_in_fnAttribute6291);\n\t\t\t\t\t\t\tws();\n\t\t\t\t\t\t\tstate._fsp--;\n\t\t\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t\t} finally {dbg.exitSubRule(269);}\n\t\t\t\t\tdbg.location(980,66);\n\t\t\t\t\tif ( input.LA(1)==COLON||input.LA(1)==OPEQ ) {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tstate.errorRecovery=false;\n\t\t\t\t\t\tstate.failed=false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\t\t\tdbg.recognitionException(mse);\n\t\t\t\t\t\tthrow mse;\n\t\t\t\t\t}dbg.location(980,79);\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:980:79: ( ws )?\n\t\t\t\t\tint alt270=2;\n\t\t\t\t\ttry { dbg.enterSubRule(270);\n\t\t\t\t\ttry { dbg.enterDecision(270, decisionCanBacktrack[270]);\n\n\t\t\t\t\tint LA270_0 = input.LA(1);\n\t\t\t\t\tif ( (LA270_0==COMMENT||LA270_0==NL||LA270_0==WS) ) {\n\t\t\t\t\t\talt270=1;\n\t\t\t\t\t}\n\t\t\t\t\t} finally {dbg.exitDecision(270);}\n\n\t\t\t\t\tswitch (alt270) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:980:79: ws\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdbg.location(980,79);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_ws_in_fnAttribute6300);\n\t\t\t\t\t\t\tws();\n\t\t\t\t\t\t\tstate._fsp--;\n\t\t\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t\t} finally {dbg.exitSubRule(270);}\n\t\t\t\t\tdbg.location(980,83);\n\t\t\t\t\tpushFollow(FOLLOW_fnAttributeValue_in_fnAttribute6303);\n\t\t\t\t\tfnAttributeValue();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\tdbg.enterAlt(2);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:981:11: ( cp_expression )=> cp_expression\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(981,29);\n\t\t\t\t\tpushFollow(FOLLOW_cp_expression_in_fnAttribute6320);\n\t\t\t\t\tcp_expression();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tdbg.enterAlt(3);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:982:11: expression\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(982,11);\n\t\t\t\t\tpushFollow(FOLLOW_expression_in_fnAttribute6332);\n\t\t\t\t\texpression();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\tdbg.location(983, 1);\n\n\t\t}\n\t\tfinally {\n\t\t\tdbg.exitRule(getGrammarFileName(), \"fnAttribute\");\n\t\t\tdecRuleLevel();\n\t\t\tif ( getRuleLevel()==0 ) {dbg.terminate();}\n\t\t}\n\n\t}",
"public final void mFUNCTION() throws RecognitionException {\n try {\n int _type = FUNCTION;\n // XQuery.g:265:10: ( 'function' )\n // XQuery.g:265:12: 'function'\n {\n match(\"function\"); \n\n\n\n }\n\n state.type = _type;\n }\n finally {\n }\n }",
"public final void sass_function_declaration() throws RecognitionException {\n\t\ttry { dbg.enterRule(getGrammarFileName(), \"sass_function_declaration\");\n\t\tif ( getRuleLevel()==0 ) {dbg.commence();}\n\t\tincRuleLevel();\n\t\tdbg.location(1320, 0);\n\n\t\ttry {\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1321:5: ( SASS_FUNCTION ws sass_function_name ( ws )? LPAREN ( ws )? ( cp_args_list )? RPAREN ( ws )? LBRACE ( ws )? ( declarations )? RBRACE )\n\t\t\tdbg.enterAlt(1);\n\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:5: SASS_FUNCTION ws sass_function_name ( ws )? LPAREN ( ws )? ( cp_args_list )? RPAREN ( ws )? LBRACE ( ws )? ( declarations )? RBRACE\n\t\t\t{\n\t\t\tdbg.location(1326,5);\n\t\t\tmatch(input,SASS_FUNCTION,FOLLOW_SASS_FUNCTION_in_sass_function_declaration9084); if (state.failed) return;dbg.location(1326,19);\n\t\t\tpushFollow(FOLLOW_ws_in_sass_function_declaration9086);\n\t\t\tws();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return;dbg.location(1326,22);\n\t\t\tpushFollow(FOLLOW_sass_function_name_in_sass_function_declaration9088);\n\t\t\tsass_function_name();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return;dbg.location(1326,41);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:41: ( ws )?\n\t\t\tint alt429=2;\n\t\t\ttry { dbg.enterSubRule(429);\n\t\t\ttry { dbg.enterDecision(429, decisionCanBacktrack[429]);\n\n\t\t\tint LA429_0 = input.LA(1);\n\t\t\tif ( (LA429_0==COMMENT||LA429_0==NL||LA429_0==WS) ) {\n\t\t\t\talt429=1;\n\t\t\t}\n\t\t\t} finally {dbg.exitDecision(429);}\n\n\t\t\tswitch (alt429) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:41: ws\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(1326,41);\n\t\t\t\t\tpushFollow(FOLLOW_ws_in_sass_function_declaration9090);\n\t\t\t\t\tws();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(429);}\n\t\t\tdbg.location(1326,45);\n\t\t\tmatch(input,LPAREN,FOLLOW_LPAREN_in_sass_function_declaration9093); if (state.failed) return;dbg.location(1326,52);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:52: ( ws )?\n\t\t\tint alt430=2;\n\t\t\ttry { dbg.enterSubRule(430);\n\t\t\ttry { dbg.enterDecision(430, decisionCanBacktrack[430]);\n\n\t\t\tint LA430_0 = input.LA(1);\n\t\t\tif ( (LA430_0==COMMENT||LA430_0==NL||LA430_0==WS) ) {\n\t\t\t\talt430=1;\n\t\t\t}\n\t\t\t} finally {dbg.exitDecision(430);}\n\n\t\t\tswitch (alt430) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:52: ws\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(1326,52);\n\t\t\t\t\tpushFollow(FOLLOW_ws_in_sass_function_declaration9095);\n\t\t\t\t\tws();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(430);}\n\t\t\tdbg.location(1326,56);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:56: ( cp_args_list )?\n\t\t\tint alt431=2;\n\t\t\ttry { dbg.enterSubRule(431);\n\t\t\ttry { dbg.enterDecision(431, decisionCanBacktrack[431]);\n\n\t\t\tint LA431_0 = input.LA(1);\n\t\t\tif ( (LA431_0==AT_IDENT||(LA431_0 >= BOTTOMCENTER_SYM && LA431_0 <= BOTTOMRIGHT_SYM)||LA431_0==CHARSET_SYM||(LA431_0 >= COUNTER_STYLE_SYM && LA431_0 <= CP_DOTS)||LA431_0==FONT_FACE_SYM||LA431_0==IDENT||LA431_0==IMPORT_SYM||(LA431_0 >= LEFTBOTTOM_SYM && LA431_0 <= LEFTTOP_SYM)||LA431_0==LESS_REST||LA431_0==MEDIA_SYM||LA431_0==MOZ_DOCUMENT_SYM||LA431_0==NAMESPACE_SYM||LA431_0==PAGE_SYM||(LA431_0 >= RIGHTBOTTOM_SYM && LA431_0 <= RIGHTTOP_SYM)||(LA431_0 >= SASS_AT_ROOT && LA431_0 <= SASS_DEBUG)||(LA431_0 >= SASS_EACH && LA431_0 <= SASS_ELSE)||LA431_0==SASS_EXTEND||(LA431_0 >= SASS_FOR && LA431_0 <= SASS_FUNCTION)||(LA431_0 >= SASS_IF && LA431_0 <= SASS_MIXIN)||(LA431_0 >= SASS_RETURN && LA431_0 <= SASS_WHILE)||(LA431_0 >= TOPCENTER_SYM && LA431_0 <= TOPRIGHT_SYM)||LA431_0==WEBKIT_KEYFRAMES_SYM) ) {\n\t\t\t\talt431=1;\n\t\t\t}\n\t\t\t} finally {dbg.exitDecision(431);}\n\n\t\t\tswitch (alt431) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:56: cp_args_list\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(1326,56);\n\t\t\t\t\tpushFollow(FOLLOW_cp_args_list_in_sass_function_declaration9098);\n\t\t\t\t\tcp_args_list();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(431);}\n\t\t\tdbg.location(1326,70);\n\t\t\tmatch(input,RPAREN,FOLLOW_RPAREN_in_sass_function_declaration9101); if (state.failed) return;dbg.location(1326,77);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:77: ( ws )?\n\t\t\tint alt432=2;\n\t\t\ttry { dbg.enterSubRule(432);\n\t\t\ttry { dbg.enterDecision(432, decisionCanBacktrack[432]);\n\n\t\t\tint LA432_0 = input.LA(1);\n\t\t\tif ( (LA432_0==COMMENT||LA432_0==NL||LA432_0==WS) ) {\n\t\t\t\talt432=1;\n\t\t\t}\n\t\t\t} finally {dbg.exitDecision(432);}\n\n\t\t\tswitch (alt432) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:77: ws\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(1326,77);\n\t\t\t\t\tpushFollow(FOLLOW_ws_in_sass_function_declaration9103);\n\t\t\t\t\tws();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(432);}\n\t\t\tdbg.location(1326,81);\n\t\t\tmatch(input,LBRACE,FOLLOW_LBRACE_in_sass_function_declaration9106); if (state.failed) return;dbg.location(1326,88);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:88: ( ws )?\n\t\t\tint alt433=2;\n\t\t\ttry { dbg.enterSubRule(433);\n\t\t\ttry { dbg.enterDecision(433, decisionCanBacktrack[433]);\n\n\t\t\tint LA433_0 = input.LA(1);\n\t\t\tif ( (LA433_0==COMMENT||LA433_0==NL||LA433_0==WS) ) {\n\t\t\t\talt433=1;\n\t\t\t}\n\t\t\t} finally {dbg.exitDecision(433);}\n\n\t\t\tswitch (alt433) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:88: ws\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(1326,88);\n\t\t\t\t\tpushFollow(FOLLOW_ws_in_sass_function_declaration9108);\n\t\t\t\t\tws();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(433);}\n\t\t\tdbg.location(1326,92);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:92: ( declarations )?\n\t\t\tint alt434=2;\n\t\t\ttry { dbg.enterSubRule(434);\n\t\t\ttry { dbg.enterDecision(434, decisionCanBacktrack[434]);\n\n\t\t\tint LA434_0 = input.LA(1);\n\t\t\tif ( ((LA434_0 >= AT_IDENT && LA434_0 <= AT_SIGN)||(LA434_0 >= BOTTOMCENTER_SYM && LA434_0 <= BOTTOMRIGHT_SYM)||(LA434_0 >= CHARSET_SYM && LA434_0 <= COLON)||LA434_0==COUNTER_STYLE_SYM||(LA434_0 >= DCOLON && LA434_0 <= DOT)||LA434_0==FONT_FACE_SYM||(LA434_0 >= GEN && LA434_0 <= GREATER)||(LA434_0 >= HASH && LA434_0 <= HASH_SYMBOL)||LA434_0==IDENT||LA434_0==IMPORT_SYM||(LA434_0 >= LBRACKET && LA434_0 <= LEFTTOP_SYM)||LA434_0==LESS_AND||(LA434_0 >= MEDIA_SYM && LA434_0 <= MOZ_DOCUMENT_SYM)||LA434_0==NAMESPACE_SYM||LA434_0==PAGE_SYM||(LA434_0 >= PIPE && LA434_0 <= PLUS)||(LA434_0 >= RIGHTBOTTOM_SYM && LA434_0 <= RIGHTTOP_SYM)||(LA434_0 >= SASS_AT_ROOT && LA434_0 <= SASS_DEBUG)||(LA434_0 >= SASS_EACH && LA434_0 <= SASS_ELSE)||(LA434_0 >= SASS_ERROR && LA434_0 <= SASS_FUNCTION)||(LA434_0 >= SASS_IF && LA434_0 <= SASS_MIXIN)||(LA434_0 >= SASS_RETURN && LA434_0 <= SEMI)||LA434_0==STAR||LA434_0==SUPPORTS_SYM||LA434_0==TILDE||(LA434_0 >= TOPCENTER_SYM && LA434_0 <= TOPRIGHT_SYM)||LA434_0==VARIABLE||LA434_0==WEBKIT_KEYFRAMES_SYM) ) {\n\t\t\t\talt434=1;\n\t\t\t}\n\t\t\t} finally {dbg.exitDecision(434);}\n\n\t\t\tswitch (alt434) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1326:92: declarations\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(1326,92);\n\t\t\t\t\tpushFollow(FOLLOW_declarations_in_sass_function_declaration9111);\n\t\t\t\t\tdeclarations();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(434);}\n\t\t\tdbg.location(1326,106);\n\t\t\tmatch(input,RBRACE,FOLLOW_RBRACE_in_sass_function_declaration9114); if (state.failed) return;\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\tdbg.location(1327, 4);\n\n\t\t}\n\t\tfinally {\n\t\t\tdbg.exitRule(getGrammarFileName(), \"sass_function_declaration\");\n\t\t\tdecRuleLevel();\n\t\t\tif ( getRuleLevel()==0 ) {dbg.terminate();}\n\t\t}\n\n\t}",
"public void parseFunctions(){\n\t\t\n\t}",
"public final void functionName() throws RecognitionException {\n\t\ttry { dbg.enterRule(getGrammarFileName(), \"functionName\");\n\t\tif ( getRuleLevel()==0 ) {dbg.commence();}\n\t\tincRuleLevel();\n\t\tdbg.location(965, 0);\n\n\t\ttry {\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:969:2: ( ( IDENT COLON )? IDENT ( DOT IDENT )* )\n\t\t\tdbg.enterAlt(1);\n\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:970:9: ( IDENT COLON )? IDENT ( DOT IDENT )*\n\t\t\t{\n\t\t\tdbg.location(970,9);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:970:9: ( IDENT COLON )?\n\t\t\tint alt262=2;\n\t\t\ttry { dbg.enterSubRule(262);\n\t\t\ttry { dbg.enterDecision(262, decisionCanBacktrack[262]);\n\n\t\t\tint LA262_0 = input.LA(1);\n\t\t\tif ( (LA262_0==IDENT) ) {\n\t\t\t\tint LA262_1 = input.LA(2);\n\t\t\t\tif ( (LA262_1==COLON) ) {\n\t\t\t\t\talt262=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t} finally {dbg.exitDecision(262);}\n\n\t\t\tswitch (alt262) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:970:10: IDENT COLON\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(970,10);\n\t\t\t\t\tmatch(input,IDENT,FOLLOW_IDENT_in_functionName6194); if (state.failed) return;dbg.location(970,16);\n\t\t\t\t\tmatch(input,COLON,FOLLOW_COLON_in_functionName6196); if (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(262);}\n\t\t\tdbg.location(970,24);\n\t\t\tmatch(input,IDENT,FOLLOW_IDENT_in_functionName6200); if (state.failed) return;dbg.location(970,30);\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:970:30: ( DOT IDENT )*\n\t\t\ttry { dbg.enterSubRule(263);\n\n\t\t\tloop263:\n\t\t\twhile (true) {\n\t\t\t\tint alt263=2;\n\t\t\t\ttry { dbg.enterDecision(263, decisionCanBacktrack[263]);\n\n\t\t\t\tint LA263_0 = input.LA(1);\n\t\t\t\tif ( (LA263_0==DOT) ) {\n\t\t\t\t\talt263=1;\n\t\t\t\t}\n\n\t\t\t\t} finally {dbg.exitDecision(263);}\n\n\t\t\t\tswitch (alt263) {\n\t\t\t\tcase 1 :\n\t\t\t\t\tdbg.enterAlt(1);\n\n\t\t\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:970:31: DOT IDENT\n\t\t\t\t\t{\n\t\t\t\t\tdbg.location(970,31);\n\t\t\t\t\tmatch(input,DOT,FOLLOW_DOT_in_functionName6203); if (state.failed) return;dbg.location(970,35);\n\t\t\t\t\tmatch(input,IDENT,FOLLOW_IDENT_in_functionName6205); if (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop263;\n\t\t\t\t}\n\t\t\t}\n\t\t\t} finally {dbg.exitSubRule(263);}\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\t\t}\n\t\tdbg.location(971, 5);\n\n\t\t}\n\t\tfinally {\n\t\t\tdbg.exitRule(getGrammarFileName(), \"functionName\");\n\t\t\tdecRuleLevel();\n\t\t\tif ( getRuleLevel()==0 ) {dbg.terminate();}\n\t\t}\n\n\t}",
"FunctionDecl createFunctionDecl();",
"public final Term term() throws RecognitionException {\n\t\tTerm value = null;\n\n\n\t\tFunction function28 =null;\n\t\tVariable variable29 =null;\n\t\tTerm literal30 =null;\n\n\t\ttry {\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/TurtleOBDA.g:511:3: ( function | variable | literal )\n\t\t\tint alt16=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase PREFIXED_NAME:\n\t\t\tcase STRING_WITH_BRACKET:\n\t\t\t\t{\n\t\t\t\talt16=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase STRING_WITH_CURLY_BRACKET:\n\t\t\t\t{\n\t\t\t\talt16=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DECIMAL:\n\t\t\tcase DECIMAL_NEGATIVE:\n\t\t\tcase DECIMAL_POSITIVE:\n\t\t\tcase DOUBLE:\n\t\t\tcase DOUBLE_NEGATIVE:\n\t\t\tcase DOUBLE_POSITIVE:\n\t\t\tcase FALSE:\n\t\t\tcase INTEGER:\n\t\t\tcase INTEGER_NEGATIVE:\n\t\t\tcase INTEGER_POSITIVE:\n\t\t\tcase STRING_WITH_QUOTE_DOUBLE:\n\t\t\tcase TRUE:\n\t\t\t\t{\n\t\t\t\talt16=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 16, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt16) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/TurtleOBDA.g:511:5: function\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_function_in_term680);\n\t\t\t\t\tfunction28=function();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t value = function28; \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/TurtleOBDA.g:512:5: variable\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_variable_in_term688);\n\t\t\t\t\tvariable29=variable();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t value = variable29; \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/TurtleOBDA.g:513:5: literal\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_literal_in_term696);\n\t\t\t\t\tliteral30=literal();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t value = literal30; \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn value;\n\t}",
"FuncDecl createFuncDecl();",
"public final String functionName() throws RecognitionException {\n String s = null;\n\n Token f=null;\n String u = null;\n\n\n try {\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:712:5: (f= IDENT | u= unreserved_function_keyword | K_TOKEN )\n int alt76=3;\n switch ( input.LA(1) ) {\n case IDENT:\n {\n alt76=1;\n }\n break;\n case K_FILTERING:\n case K_VALUES:\n case K_TIMESTAMP:\n case K_COUNTER:\n case K_KEY:\n case K_COMPACT:\n case K_STORAGE:\n case K_CLUSTERING:\n case K_TYPE:\n case K_LIST:\n case K_ALL:\n case K_PERMISSIONS:\n case K_PERMISSION:\n case K_KEYSPACES:\n case K_USER:\n case K_SUPERUSER:\n case K_NOSUPERUSER:\n case K_USERS:\n case K_PASSWORD:\n case K_ASCII:\n case K_BIGINT:\n case K_BLOB:\n case K_BOOLEAN:\n case K_DECIMAL:\n case K_DOUBLE:\n case K_FLOAT:\n case K_INET:\n case K_INT:\n case K_TEXT:\n case K_UUID:\n case K_VARCHAR:\n case K_VARINT:\n case K_TIMEUUID:\n case K_MAP:\n {\n alt76=2;\n }\n break;\n case K_TOKEN:\n {\n alt76=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 76, 0, input);\n\n throw nvae;\n }\n\n switch (alt76) {\n case 1 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:712:7: f= IDENT\n {\n f=(Token)match(input,IDENT,FOLLOW_IDENT_in_functionName4215); \n s = (f!=null?f.getText():null); \n\n }\n break;\n case 2 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:713:7: u= unreserved_function_keyword\n {\n pushFollow(FOLLOW_unreserved_function_keyword_in_functionName4249);\n u=unreserved_function_keyword();\n\n state._fsp--;\n\n s = u; \n\n }\n break;\n case 3 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:714:7: K_TOKEN\n {\n match(input,K_TOKEN,FOLLOW_K_TOKEN_in_functionName4259); \n s = \"token\"; \n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return s;\n }",
"private static String processFunction(String function){\n return \"urn:oasis:names:tc:xacml:1.0:function:\" + function;\n }",
"public final List<Term.Raw> functionArgs() throws RecognitionException {\n List<Term.Raw> a = null;\n\n Term.Raw t1 = null;\n\n Term.Raw tn = null;\n\n\n try {\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:718:5: ( '(' ')' | '(' t1= term ( ',' tn= term )* ')' )\n int alt78=2;\n int LA78_0 = input.LA(1);\n\n if ( (LA78_0==127) ) {\n int LA78_1 = input.LA(2);\n\n if ( (LA78_1==128) ) {\n alt78=1;\n }\n else if ( (LA78_1==INTEGER||LA78_1==K_FILTERING||LA78_1==K_VALUES||LA78_1==K_TIMESTAMP||LA78_1==K_COUNTER||(LA78_1>=K_KEY && LA78_1<=K_CLUSTERING)||LA78_1==IDENT||LA78_1==K_TYPE||LA78_1==K_LIST||(LA78_1>=K_ALL && LA78_1<=STRING_LITERAL)||(LA78_1>=FLOAT && LA78_1<=K_TOKEN)||(LA78_1>=K_ASCII && LA78_1<=K_MAP)||LA78_1==127||LA78_1==131||LA78_1==136) ) {\n alt78=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 78, 1, input);\n\n throw nvae;\n }\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 78, 0, input);\n\n throw nvae;\n }\n switch (alt78) {\n case 1 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:718:7: '(' ')'\n {\n match(input,127,FOLLOW_127_in_functionArgs4304); \n match(input,128,FOLLOW_128_in_functionArgs4306); \n a = Collections.emptyList(); \n\n }\n break;\n case 2 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:719:7: '(' t1= term ( ',' tn= term )* ')'\n {\n match(input,127,FOLLOW_127_in_functionArgs4316); \n pushFollow(FOLLOW_term_in_functionArgs4320);\n t1=term();\n\n state._fsp--;\n\n List<Term.Raw> args = new ArrayList<Term.Raw>(); args.add(t1); \n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:720:11: ( ',' tn= term )*\n loop77:\n do {\n int alt77=2;\n int LA77_0 = input.LA(1);\n\n if ( (LA77_0==129) ) {\n alt77=1;\n }\n\n\n switch (alt77) {\n \tcase 1 :\n \t // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:720:13: ',' tn= term\n \t {\n \t match(input,129,FOLLOW_129_in_functionArgs4336); \n \t pushFollow(FOLLOW_term_in_functionArgs4340);\n \t tn=term();\n\n \t state._fsp--;\n\n \t args.add(tn); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop77;\n }\n } while (true);\n\n match(input,128,FOLLOW_128_in_functionArgs4354); \n a = args; \n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return a;\n }",
"Rule FunctionType() {\n // Push 1 FunctionType node onto the value stack\n return Sequence(\n FirstOf(\n FieldType(),\n Sequence(\"void \", push(new VoidNode()))),\n actions.pushFunctionTypeNode());\n }",
"public final void sass_function_name() throws RecognitionException {\n\t\ttry { dbg.enterRule(getGrammarFileName(), \"sass_function_name\");\n\t\tif ( getRuleLevel()==0 ) {dbg.commence();}\n\t\tincRuleLevel();\n\t\tdbg.location(1329, 0);\n\n\t\ttry {\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1330:5: ( IDENT )\n\t\t\tdbg.enterAlt(1);\n\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1331:5: IDENT\n\t\t\t{\n\t\t\tdbg.location(1331,5);\n\t\t\tmatch(input,IDENT,FOLLOW_IDENT_in_sass_function_name9135); if (state.failed) return;\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\tdbg.location(1332, 4);\n\n\t\t}\n\t\tfinally {\n\t\t\tdbg.exitRule(getGrammarFileName(), \"sass_function_name\");\n\t\t\tdecRuleLevel();\n\t\t\tif ( getRuleLevel()==0 ) {dbg.terminate();}\n\t\t}\n\n\t}",
"public final GremlinEvaluator.function_definition_statement_return function_definition_statement() throws RecognitionException {\n GremlinEvaluator.function_definition_statement_return retval = new GremlinEvaluator.function_definition_statement_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree ns=null;\n CommonTree fn_name=null;\n CommonTree FUNC66=null;\n CommonTree FUNC_NAME67=null;\n CommonTree NS68=null;\n CommonTree NAME69=null;\n CommonTree ARGS70=null;\n CommonTree ARG71=null;\n CommonTree VARIABLE72=null;\n GremlinEvaluator.block_return block73 = null;\n\n\n CommonTree ns_tree=null;\n CommonTree fn_name_tree=null;\n CommonTree FUNC66_tree=null;\n CommonTree FUNC_NAME67_tree=null;\n CommonTree NS68_tree=null;\n CommonTree NAME69_tree=null;\n CommonTree ARGS70_tree=null;\n CommonTree ARG71_tree=null;\n CommonTree VARIABLE72_tree=null;\n\n\n List<String> params = new ArrayList<String>();\n \n try {\n // src/main/java/com/tinkerpop/gremlin/compiler/GremlinEvaluator.g:466:2: ( ^( FUNC ^( FUNC_NAME ^( NS ns= IDENTIFIER ) ^( NAME fn_name= IDENTIFIER ) ) ^( ARGS ( ^( ARG VARIABLE ) )* ) block ) )\n // src/main/java/com/tinkerpop/gremlin/compiler/GremlinEvaluator.g:466:4: ^( FUNC ^( FUNC_NAME ^( NS ns= IDENTIFIER ) ^( NAME fn_name= IDENTIFIER ) ) ^( ARGS ( ^( ARG VARIABLE ) )* ) block )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();_last = (CommonTree)input.LT(1);\n FUNC66=(CommonTree)match(input,FUNC,FOLLOW_FUNC_in_function_definition_statement1424); \n FUNC66_tree = (CommonTree)adaptor.dupNode(FUNC66);\n\n root_1 = (CommonTree)adaptor.becomeRoot(FUNC66_tree, root_1);\n\n\n\n match(input, Token.DOWN, null); \n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_2 = _last;\n CommonTree _first_2 = null;\n CommonTree root_2 = (CommonTree)adaptor.nil();_last = (CommonTree)input.LT(1);\n FUNC_NAME67=(CommonTree)match(input,FUNC_NAME,FOLLOW_FUNC_NAME_in_function_definition_statement1427); \n FUNC_NAME67_tree = (CommonTree)adaptor.dupNode(FUNC_NAME67);\n\n root_2 = (CommonTree)adaptor.becomeRoot(FUNC_NAME67_tree, root_2);\n\n\n\n match(input, Token.DOWN, null); \n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_3 = _last;\n CommonTree _first_3 = null;\n CommonTree root_3 = (CommonTree)adaptor.nil();_last = (CommonTree)input.LT(1);\n NS68=(CommonTree)match(input,NS,FOLLOW_NS_in_function_definition_statement1430); \n NS68_tree = (CommonTree)adaptor.dupNode(NS68);\n\n root_3 = (CommonTree)adaptor.becomeRoot(NS68_tree, root_3);\n\n\n\n match(input, Token.DOWN, null); \n _last = (CommonTree)input.LT(1);\n ns=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_function_definition_statement1434); \n ns_tree = (CommonTree)adaptor.dupNode(ns);\n\n adaptor.addChild(root_3, ns_tree);\n\n\n match(input, Token.UP, null); adaptor.addChild(root_2, root_3);_last = _save_last_3;\n }\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_3 = _last;\n CommonTree _first_3 = null;\n CommonTree root_3 = (CommonTree)adaptor.nil();_last = (CommonTree)input.LT(1);\n NAME69=(CommonTree)match(input,NAME,FOLLOW_NAME_in_function_definition_statement1438); \n NAME69_tree = (CommonTree)adaptor.dupNode(NAME69);\n\n root_3 = (CommonTree)adaptor.becomeRoot(NAME69_tree, root_3);\n\n\n\n match(input, Token.DOWN, null); \n _last = (CommonTree)input.LT(1);\n fn_name=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_function_definition_statement1442); \n fn_name_tree = (CommonTree)adaptor.dupNode(fn_name);\n\n adaptor.addChild(root_3, fn_name_tree);\n\n\n match(input, Token.UP, null); adaptor.addChild(root_2, root_3);_last = _save_last_3;\n }\n\n\n match(input, Token.UP, null); adaptor.addChild(root_1, root_2);_last = _save_last_2;\n }\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_2 = _last;\n CommonTree _first_2 = null;\n CommonTree root_2 = (CommonTree)adaptor.nil();_last = (CommonTree)input.LT(1);\n ARGS70=(CommonTree)match(input,ARGS,FOLLOW_ARGS_in_function_definition_statement1447); \n ARGS70_tree = (CommonTree)adaptor.dupNode(ARGS70);\n\n root_2 = (CommonTree)adaptor.becomeRoot(ARGS70_tree, root_2);\n\n\n\n if ( input.LA(1)==Token.DOWN ) {\n match(input, Token.DOWN, null); \n // src/main/java/com/tinkerpop/gremlin/compiler/GremlinEvaluator.g:466:78: ( ^( ARG VARIABLE ) )*\n loop13:\n do {\n int alt13=2;\n int LA13_0 = input.LA(1);\n\n if ( (LA13_0==ARG) ) {\n alt13=1;\n }\n\n\n switch (alt13) {\n \tcase 1 :\n \t // src/main/java/com/tinkerpop/gremlin/compiler/GremlinEvaluator.g:466:80: ^( ARG VARIABLE )\n \t {\n \t _last = (CommonTree)input.LT(1);\n \t {\n \t CommonTree _save_last_3 = _last;\n \t CommonTree _first_3 = null;\n \t CommonTree root_3 = (CommonTree)adaptor.nil();_last = (CommonTree)input.LT(1);\n \t ARG71=(CommonTree)match(input,ARG,FOLLOW_ARG_in_function_definition_statement1452); \n \t ARG71_tree = (CommonTree)adaptor.dupNode(ARG71);\n\n \t root_3 = (CommonTree)adaptor.becomeRoot(ARG71_tree, root_3);\n\n\n\n \t match(input, Token.DOWN, null); \n \t _last = (CommonTree)input.LT(1);\n \t VARIABLE72=(CommonTree)match(input,VARIABLE,FOLLOW_VARIABLE_in_function_definition_statement1454); \n \t VARIABLE72_tree = (CommonTree)adaptor.dupNode(VARIABLE72);\n\n \t adaptor.addChild(root_3, VARIABLE72_tree);\n\n \t params.add((VARIABLE72!=null?VARIABLE72.getText():null)); \n\n \t match(input, Token.UP, null); adaptor.addChild(root_2, root_3);_last = _save_last_3;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop13;\n }\n } while (true);\n\n\n match(input, Token.UP, null); \n }adaptor.addChild(root_1, root_2);_last = _save_last_2;\n }\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_block_in_function_definition_statement1463);\n block73=block();\n\n state._fsp--;\n\n adaptor.addChild(root_1, block73.getTree());\n\n match(input, Token.UP, null); adaptor.addChild(root_0, root_1);_last = _save_last_1;\n }\n\n\n NativeFunction fn = new NativeFunction((fn_name!=null?fn_name.getText():null), params, (block73!=null?block73.cb:null));\n this.registerFunction((ns!=null?ns.getText():null), fn);\n\n retval.op = new UnaryOperation(new Atom<Boolean>(true));\n \n\n }\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return retval;\n }",
"java.lang.String getFunctionName();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes this class's type parameters. | public void setTypeParameters(TypeParameterListNode typeParameters); | [
"public void alterType(AttrType newType) { type = newType; }",
"void setClassType(String classType);",
"void setType(Type t);",
"protected void adjustTypeAttributes() {\n /// Override to alter attributes.\n }",
"public void setOriginalType(JavaClass type) {\r\n originalType = type;\r\n }",
"void setClassType(String s);",
"public void setTypes(Types types);",
"public void setParameterTypes(List parameterTypes);",
"public void setType(Class type) {\r\n this.type = type;\r\n }",
"public void setType(Type t) {\n type = t;\n }",
"public void setParameters(List<Type> parameters) {\n checkNotSealed();\n this.parameters = parameters;\n }",
"void changeType(NoteTypes newType) {\n this.type = newType;\n }",
"public\n void setTypeArguments(List<? extends AnnotatedTypeMirror> ts) {\n typeArgs = Collections.unmodifiableList(new ArrayList<AnnotatedTypeMirror>(ts));\n }",
"public void setType(String newVal) {\n if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || \n (newVal == null && this.type == null && type_is_initialized)) {\n return; \n } \n this.type = newVal; \n\n type_is_modified = true; \n type_is_initialized = true; \n }",
"void setTypes(TypeDescription[] aTypes);",
"void setParameterTypes(\n List<? extends AnnotatedTypeMirror> params) {\n paramTypes.clear();\n paramTypes.addAll(params);\n }",
"protected void setJavaClass(Class type) {\n this._class = type;\n }",
"public void setOldType(TypeElement type) {\n\t\toldType = type;\n\t}",
"public Typed<B, T, V> setStaticType(StaticType newStaticType);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data ElasticSearch repository for the Cr_element entity. | public interface Cr_elementSearchRepository extends ElasticsearchRepository<Cr_element, Long> {
} | [
"public interface OrderConsigneeSearchRepository extends ElasticsearchRepository<OrderConsignee, Long> {\n}",
"public interface ChemicalsSearchRepository extends ElasticsearchRepository<Chemicals, Long> {\n}",
"public interface Cr_objet_craftSearchRepository extends ElasticsearchRepository<Cr_objet_craft, Long> {\n}",
"public interface OrderComponentSearchRepository extends ElasticsearchRepository<OrderComponent, Long> {\n}",
"public interface EvDiagramSearchRepository extends ElasticsearchRepository<EvDiagram, Long> {\n}",
"public interface CirculationSearchRepository extends ElasticsearchRepository<Circulation, Long> {\n}",
"public interface RedactionSearchRepository extends ElasticsearchRepository<Redaction, Long> {\n}",
"public interface BibliographicEntitySearchRepository extends ElasticsearchRepository<BibliographicEntity, Long> {\n}",
"public interface EdgeSearchRepository extends ElasticsearchRepository<Edge, Long> {\n}",
"public interface ClotureSearchRepository extends ElasticsearchRepository<Cloture, Long> {\n}",
"public interface Tbc_clienteSearchRepository extends ElasticsearchRepository<Tbc_cliente, Long> {\n}",
"public interface AssetassetmbrSearchRepository extends ElasticsearchRepository<Assetassetmbr, Long> {\n}",
"public interface PlaybookplaybookcomponentmbrSearchRepository extends ElasticsearchRepository<Playbookplaybookcomponentmbr, Long> {\n}",
"public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {\n}",
"public interface CorpsEtatSearchRepository extends ElasticsearchRepository<CorpsEtat, Long> {\n}",
"public interface CartItemsSearchRepository extends ElasticsearchRepository<CartItems, Long> {\n}",
"public interface Cr_puissanceSearchRepository extends ElasticsearchRepository<Cr_puissance, Long> {\n}",
"public interface PlaybookcomponentSearchRepository extends ElasticsearchRepository<Playbookcomponent, Long> {\n}",
"public interface OrderEntitySearchRepository extends ElasticsearchRepository<OrderEntity, Long> {\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the mapping code for a given character. The mapping codes are maintained in an internal char array named soundexMapping, and the default values of these mappings are US English. | private char getMappingCode(char c) {
if (!Character.isLetter(c)) {
return 0;
} else {
return soundexMapping[Character.toUpperCase(c) - 'A'];
}
} | [
"protected char map(char c) {\r\n int index = findFromIndex(c);\r\n if(index < 0) return c;\r\n return toChars[index];\r\n }",
"public abstract char mapChar(char c);",
"public static int getIndexFromChar(Character c){\n\t\treturn charToIndexMap.get(c);\n\t}",
"public String soundex(String str) {\r\n if (null == str || str.length() == 0) { return str; }\r\n \r\n StringBuffer sBuf = new StringBuffer(); \r\n str = str.toUpperCase();\r\n\r\n sBuf.append(str.charAt(0));\r\n\r\n char last, current;\r\n last = '*';\r\n\r\n for (int i = 0; i < str.length(); i++) {\r\n\r\n current = getMappingCode(str.charAt(i));\r\n if (current == last) {\r\n continue;\r\n } else if (current != 0) {\r\n sBuf.append(current); \r\n }\r\n \r\n last = current; \r\n \r\n }\r\n \r\n return sBuf.toString();\r\n }",
"private char translateChar(char[] mapping, char character)\n { if (character==' ') return character;\n\n int lower = lowerKeyCodeMapping.indexOf(character);\n int upper = upperKeyCodeMapping.indexOf(character);\n\n int mapValue = lower;\n if (lower<0) mapValue = upper;\n if (mapValue<0) return '\\0';\n return mapping[mapValue];\n }",
"public int mapChar(char ch) {\n return this.mapChar(ch, this.substitutes);\n }",
"@Override\n\tpublic char mapCharacter(char c) {\n\t\tif(Character.isLetter(c)) {\n\t\t\tif(Character.isUpperCase(c)) {\n\t\t\t\tint ascii = (int) c ;\n\t\t\t\tint rotInt = 'Z' - ascii + 'A';\n\t\t\t\tchar rotChar = (char) rotInt;\n\t\t\t\treturn rotChar;\n\t\t\t}\n\t\t\telse if(Character.isLowerCase(c)) {\n\t\t\t\tint ascii = (int) c ;\n\t\t\t\tint rotInt = 'z' - ascii + 'a';\n\t\t\t\tchar rotChar = (char) rotInt;\n\t\t\t\treturn rotChar;\n\t\t\t}\n\t\t}\n\t\t//if c is not a letter then return it\n\t\telse {\n\t\t\treturn c;\n\t\t}\n\t\tSystem.out.println(\"Something's wrong\");\n\t\treturn 0;\n\t}",
"protected int charIndex(char c) {\r\n\t\ttry {\r\n\t\t\treturn characterMap.indexOf(c);\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}",
"public RefinedSoundex(char[] mapping) {\r\n this.soundexMapping = mapping;\r\n }",
"public static char scanChar(String s) {\n\t\tCharacter key = null;\n\t\tMap<Character, String> mapping = new HashMap<>();\n\t\tfor (char c = 'A'; c <= '?'; c++) {\n\t\t\tmapping.put(c, AsciiArt.printChar(c));\n\t\t}\n\n\t\tfor (Map.Entry entry : mapping.entrySet()) {\n\t\t\tif (s.equals(entry.getValue())) {\n\t\t\t\tkey = (char) entry.getKey();\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tkey = '?';\n\t\t\t}\n\t\t}\n\n\t\treturn key;\n\n\t}",
"private static int getIndexForBase16Character(char c) {\n switch (c) {\n case '0':\n return 0;\n case '1':\n return 1;\n case '2':\n return 2;\n case '3':\n return 3;\n case '4':\n return 4;\n case '5':\n return 5;\n case '6':\n return 6;\n case '7':\n return 7;\n case '8':\n return 8;\n case '9':\n return 9;\n case 'A':\n return 10;\n case 'B':\n return 11;\n case 'C':\n return 12;\n case 'D':\n return 13;\n case 'E':\n return 14;\n case 'F':\n return 15;\n case 'a':\n return 10;\n case 'b':\n return 11;\n case 'c':\n return 12;\n case 'd':\n return 13;\n case 'e':\n return 14;\n case 'f':\n return 15;\n\n default:\n throw new RuntimeException(\"Character \" + c + \" is not Base64\");\n }\n }",
"public char dna_to_code (String codon) {\n\r\n String code = (String) dna_to_code.get(codon.toUpperCase());\r\n if (code == null) {\r\n // failed lookup; sequence with Ns, etc\r\n return '?';\r\n } else if (code.length() == 1) {\r\n return code.charAt(0);\r\n } else if (code.equals(STOP_STRING)) {\r\n return STOP_CODE;\r\n } else {\r\n System.out.println(\"dna_to_code: wtf???\"); // debug\r\n }\r\n return '?';\r\n }",
"public int mapChar(char ch, Map<Character, Character> substitutes) {\n if (!hasChar(ch)) {\n try {\n ch = substitutes.get(ch);\n return new String(chars).indexOf(ch);\n } catch (Exception e) {\n LOGGER.error(e.getMessage());\n throw new RuntimeException(\"Error: The char '\" + ch + \"' is not from the alphabet and there is no substitutes for it.\");\n }\n }\n return new String(chars).indexOf(ch);\n }",
"public int getAphabeticIndex(char c) {\r\n if (!isValid(c))\r\n throw new IllegalArgumentException(\"unexpected char:\" + c);\r\n return TURKISH_ALPHABET_INDEXES[c];\r\n }",
"private void buildCharMap() {\n\t\tcharMap = new HashMap<Character , Integer>();\n\t\tcharMap.put('a', 0);\n\t\tcharMap.put('b', 1);\n\t\tcharMap.put('c', 2);\n\t\tcharMap.put('d', 3);\n\t\tcharMap.put('e', 4);\n\t\tcharMap.put('f', 5);\n\t\tcharMap.put('g', 6);\n\t\tcharMap.put('h', 7);\n\t\tcharMap.put('i', 8);\n\t\tcharMap.put('j', 9);\n\t\tcharMap.put('k', 10);\n\t\tcharMap.put('l', 11);\n\t\tcharMap.put('m', 12);\n\t\tcharMap.put('n', 13);\n\t\tcharMap.put('o', 14);\n\t\tcharMap.put('p', 15);\n\t\tcharMap.put('q', 16);\n\t\tcharMap.put('r', 17);\n\t\tcharMap.put('s', 18);\n\t\tcharMap.put('t', 19);\n\t\tcharMap.put('u', 20);\n\t\tcharMap.put('v', 21);\n\t\tcharMap.put('w', 22);\n\t\tcharMap.put('x', 23);\n\t\tcharMap.put('y', 24);\n\t\tcharMap.put('z', 25);\t\n\t}",
"public static int mnemonicToChar(String mnemonic) {\n Integer c = mnemonicMap.get(mnemonic);\n if (c == null)\n return -1;\n else\n return c;\n }",
"public abstract char getCodeChar();",
"public int charScrabbleValue(String chr) {\n /* ENGLISH SCRABBLE VALUES\n 1 point: E ×12, A ×9, I ×9, O ×8, N ×6, R ×6, T ×6, L ×4, S ×4, U ×4\n 2 points: D ×4, G ×3\n 3 points: B ×2, C ×2, M ×2, P ×2\n 4 points: F ×2, H ×2, V ×2, W ×2, Y ×2\n 5 points: K ×1\n 8 points: J ×1, X ×1\n 10 points: Q ×1, Z ×1\n */\n int charValue = 0;\n\n if ((chr.contains(\"a\")) || (chr.contains(\"e\")) || (chr.contains(\"i\")) || (chr.contains(\"o\")) || (chr.contains(\"n\"))\n || (chr.contains(\"r\")) || (chr.contains(\"t\")) || (chr.contains(\"l\")) || (chr.contains(\"s\")) || (chr.contains(\"u\"))\n ) {\n charValue = 1;\n }\n if ((chr.contains(\"d\")) || (chr.contains(\"g\"))) {\n charValue = 2;\n }\n if ((chr.contains(\"b\")) || (chr.contains(\"c\")) || (chr.contains(\"m\")) || (chr.contains(\"p\"))) {\n charValue = 3;\n }\n if ((chr.contains(\"f\")) || (chr.contains(\"h\")) || (chr.contains(\"v\")) || (chr.contains(\"w\")) || (chr.contains(\"y\"))\n ) {\n charValue = 4;\n }\n if ((chr.contains(\"k\"))) {\n charValue = 5;\n }\n if ((chr.contains(\"j\")) || (chr.contains(\"x\"))) {\n charValue = 8;\n }\n if ((chr.contains(\"q\")) || (chr.contains(\"z\"))) {\n charValue = 10;\n }\n\n return charValue;\n }",
"static byte getDirectionCode(char c) {\n return dirValues[(dirIndices[c >> 7] << 7) + (c & 0x7f)];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Translates one or more (non) transient Vaadin sort orders to OCS sort orders | @SafeVarargs
public static com.ocs.dynamo.dao.SortOrder[] translateSortOrders(SortOrder<?>... originalOrders) {
if (originalOrders != null && originalOrders.length > 0) {
final com.ocs.dynamo.dao.SortOrder[] orders = new com.ocs.dynamo.dao.SortOrder[originalOrders.length];
for (int i = 0; i < originalOrders.length; i++) {
orders[i] = new com.ocs.dynamo.dao.SortOrder(originalOrders[i].getSorted().toString(),
SortDirection.ASCENDING.equals(originalOrders[i].getDirection()) ? Direction.ASC : Direction.DESC);
}
return orders;
}
return null;
} | [
"Map<String, org.springframework.batch.item.database.Order> genBatchOrderByFromSort(TableFields tableFields, Sort sort);",
"io.dstore.values.StringValue getOrderBy();",
"public void changeSortOrder();",
"io.dstore.values.StringValueOrBuilder getOrderByOrBuilder();",
"String getOrdering();",
"public void setSortOrder(String sortOrder);",
"String convertToSortProperty(String sortParameter) throws ValidationFailureException;",
"public default void addOrderBy(JPAQuery<ProjectEntity> query, ProjectEntity alias, Sort sort) {\n\n if (sort != null && sort.isSorted()) {\n Iterator<Order> it = sort.iterator();\n while (it.hasNext()) {\n Order next = it.next();\n switch (next.getProperty()) {\n case \"status_id\":\n if (next.isAscending()) {\n query.orderBy($(alias.getStatus_id()).asc());\n } else {\n query.orderBy($(alias.getStatus_id()).desc());\n }\n break;\n case \"type_id\":\n if (next.isAscending()) {\n query.orderBy($(alias.getType_id()).asc());\n } else {\n query.orderBy($(alias.getType_id()).desc());\n }\n break;\n case \"delunit_id\":\n if (next.isAscending()) {\n query.orderBy($(alias.getDelunit_id()).asc());\n } else {\n query.orderBy($(alias.getDelunit_id()).desc());\n }\n break;\n case \"rate_card_id\":\n if (next.isAscending()) {\n query.orderBy($(alias.getRate_card_id()).asc());\n } else {\n query.orderBy($(alias.getRate_card_id()).desc());\n }\n break;\n case \"pon_code\":\n if (next.isAscending()) {\n query.orderBy($(alias.getPon_code()).asc());\n } else {\n query.orderBy($(alias.getPon_code()).desc());\n }\n break;\n case \"short_desc\":\n if (next.isAscending()) {\n query.orderBy($(alias.getShort_desc()).asc());\n } else {\n query.orderBy($(alias.getShort_desc()).desc());\n }\n break;\n case \"long_desc\":\n if (next.isAscending()) {\n query.orderBy($(alias.getLong_desc()).asc());\n } else {\n query.orderBy($(alias.getLong_desc()).desc());\n }\n break;\n case \"activity\":\n if (next.isAscending()) {\n query.orderBy($(alias.getModif_user()).asc());\n } else {\n query.orderBy($(alias.getModif_user()).desc());\n }\n break;\n case \"active\":\n if (next.isAscending()) {\n query.orderBy($(alias.getModif_user()).asc());\n } else {\n query.orderBy($(alias.getModif_user()).desc());\n }\n break;\n case \"create_date\":\n if (next.isAscending()) {\n query.orderBy($(alias.getCreate_date()).asc());\n } else {\n query.orderBy($(alias.getCreate_date()).desc());\n }\n break;\n case \"modif_date\":\n if (next.isAscending()) {\n query.orderBy($(alias.getModif_date()).asc());\n } else {\n query.orderBy($(alias.getModif_date()).desc());\n }\n break;\n case \"create_user\":\n if (next.isAscending()) {\n query.orderBy($(alias.getCreate_user()).asc());\n } else {\n query.orderBy($(alias.getCreate_user()).desc());\n }\n break;\n case \"modif_user\":\n if (next.isAscending()) {\n query.orderBy($(alias.getModif_user()).asc());\n } else {\n query.orderBy($(alias.getModif_user()).desc());\n }\n break;\n default:\n throw new IllegalArgumentException(\"Sorted by the unknown property '\" + next.getProperty() + \"'\");\n }\n }\n }\n }",
"io.dstore.values.IntegerValue getOrderBy();",
"@VTID(25)\n com.exceljava.com4j.excel.XlSlicerSort getSortItems();",
"java.lang.String getOrderBy();",
"com.vitessedata.llql.llql_proto.LLQLQuery.Sort getSort();",
"public static OrderByDirection convert(SortOrder ob) {\n switch (ob) {\n case DESCENDING:\n return OrderByDirection.DESC;\n default:\n return OrderByDirection.ASC;\n }\n }",
"public void setSortOrder(String sortOrder) {\n this.sortOrder = sortOrder;\n }",
"io.dstore.values.BooleanValue getSortOrder();",
"protected void generateOrderBy( SQLQueryModel query, LogicalModel model, List<Order> orderBy,\n DatabaseMeta databaseMeta, String locale, Map<LogicalTable, String> tableAliases, Map<String, String> columnsMap,\n Map<String, Object> parameters, boolean genAsPreparedStatement ) {\n if ( orderBy != null ) {\n for ( Order orderItem : orderBy ) {\n LogicalColumn businessColumn = orderItem.getSelection().getLogicalColumn();\n String alias = null;\n if ( columnsMap != null ) {\n // The column map is a unique mapping of Column alias to the column ID\n // Here we have the column ID and we need the alias.\n // We need to do the order by on the alias, not the column name itself.\n // For most databases, it can be both, but the alias is more standard.\n //\n // Using the column name and not the alias caused an issue on Apache Derby.\n //\n for ( String key : columnsMap.keySet() ) {\n String value = columnsMap.get( key );\n if ( value.equals( businessColumn.getId() ) ) {\n // Found it: the alias is the key\n alias = key;\n break;\n }\n }\n }\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, orderItem.getSelection(), tableAliases, parameters, genAsPreparedStatement,\n databaseMeta, locale );\n query.addOrderBy( sqlAndTables.getSql(), databaseMeta.quoteField( alias ), orderItem.getType() != Type.ASC\n ? OrderType.DESCENDING : null );\n }\n }\n }",
"protected String compileOrdering()\n {\n if (compilation.getExprOrdering() != null)\n {\n StringBuilder orderStr = new StringBuilder();\n compileComponent = CompilationComponent.ORDERING;\n Expression[] orderingExpr = compilation.getExprOrdering();\n try\n {\n for (int i = 0; i < orderingExpr.length; i++)\n {\n OrderExpression orderExpr = (OrderExpression) orderingExpr[i];\n CassandraFieldExpression orderCassExpr = (CassandraFieldExpression) orderExpr.getLeft().evaluate(this);\n String orderDir = orderExpr.getSortOrder();\n int direction = ((orderDir == null || orderDir.equals(\"ascending\")) ? 1 : -1);\n if (orderStr.length() > 0)\n {\n orderStr.append(',');\n }\n orderStr.append(orderCassExpr.getColumnName()).append(\" \");\n orderStr.append(direction == 1 ? \"ASC\" : \"DESC\");\n }\n }\n catch (Exception e)\n {\n // Impossible to compile all to run in the datastore, so just exit\n if (NucleusLogger.QUERY.isDebugEnabled())\n {\n NucleusLogger.QUERY.debug(\"Compilation of order to be evaluated completely in-datastore was impossible : \" + e.getMessage());\n }\n orderComplete = false;\n }\n compileComponent = null;\n if (orderComplete && orderStr.length() > 0)\n {\n return orderStr.toString();\n }\n }\n return null;\n }",
"@VTID(28)\n boolean getSortUsingCustomLists();",
"java.lang.String getOrderByDataItem();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts seconds to ticks. | public static int toTicks(float seconds)
{
return Math.round(seconds * ReferenceConfig.TARGET_UPS);
} | [
"public static String convertTicksToSecondsString(long ticks) {\n return String.format(\"%.2fs\", (double) (ticks / 20) + 0.05D * (ticks % 20));\n }",
"protected long secondsToNanoseconds(double seconds) {\n\n\treturn (long)(seconds * ONE_SECOND);\n }",
"public TimeConverter (int sec)\r\n {\r\n seconds = sec;\r\n }",
"public static float toSeconds(int tick)\n\t{\n\t\treturn (float) tick / ReferenceConfig.TARGET_UPS;\n\t}",
"public static long getMicrosecondsFromSeconds(Long seconds) {\n return TimeUnit.SECONDS.toMicros(seconds);\n }",
"public final native double setSeconds(int seconds, int millis) /*-{\n this.setSeconds(seconds, millis);\n return this.getTime();\n }-*/;",
"public float getTimeSeconds() { return getTime()/1000f; }",
"public static long timeInSeconds(long millisecs) {\r\n\t\t\treturn millisecs / 1000;\r\n\t\t}",
"public final native double setSeconds(int seconds) /*-{\n this.setSeconds(seconds);\n return this.getTime();\n }-*/;",
"private long toSeconds(long x) {\r\n\t\tboolean neg = false;\r\n\t\tif (x < 0) {\r\n\t\t\tneg = true;\r\n\t\t}\r\n\t\tx = Math.abs(x);\r\n\t\tlong sec = x % 100;// get first two digits\r\n\t\tx = x / 100;// move over two places\r\n\t\tlong min = x % 100;// get next two digits\r\n\t\tx = x / 100;// move to places\r\n\t\tlong answer = (x * 3600 + min * 60 + sec);// conversion equation\r\n\t\tif (neg) { // check if negative needs to be applied.\r\n\t\t\treturn answer * -1;\r\n\t\t}\r\n\t\treturn answer;\r\n\t}",
"public void tick() {\n secCounter++;\n hour = secCounter / 3600;\n min = secCounter / 60;\n min %= 60 ;\n sec = secCounter % 60;\n }",
"public static ElapsedSecondTimestamp toSeconds(RelativeTimestamp ts) {\n\treturn new ElapsedSecondTimestamp(ts.getSeconds(), ts.getNanoSeconds());\n }",
"public final native double setUTCSeconds(int seconds, int millis) /*-{\n this.setUTCSeconds(seconds, millis);\n return this.getTime();\n }-*/;",
"public double asSeconds() {\n\t\treturn asNanoseconds() / SECOND;\n\t}",
"public static long getSecondsSinceEpoch() {\n return System.currentTimeMillis() / 1000L;\n }",
"public void setTicks(final int t) {\r\n ticks = t;\r\n }",
"EDataType getSeconds();",
"private static double toSeconds(int hours, int minutes, double seconds){\n return hours*3600 + minutes*60 + seconds;\n }",
"public static long fromUnixTime(long seconds, int microseconds) {\n long millisec = seconds*1000+microseconds/1000;\n return taiUtcConverter.unixToInstant(millisec);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for manager. | public void setManager(Manager aManager) {
manager = aManager;
} | [
"public void setManager(Manager manager);",
"public void setManager ( Object manager ) {\r\n\t\tgetStateHelper().put(PropertyKeys.manager, manager);\r\n\t\thandleAttribute(\"manager\", manager);\r\n\t}",
"@Override\n public void setToBeManager() throws RemoteException {\n this.isManager = true;\n }",
"public void setManagerID(int managerID) { this.managerID = managerID; }",
"public void setManager(String manager) {\n this.manager = manager;\n }",
"@Override\n public void setManagerName(java.lang.String managerName) {\n _manager.setManagerName(managerName);\n }",
"public void setManager(boolean manager) {\n\t\tthis.manager = manager;\n\t}",
"public void setIsManager(Integer isManager) {\n this.isManager = isManager;\n }",
"public void setMgr(Integer mgr) {\r\n this.mgr = mgr;\r\n }",
"public void setIsManager(Byte isManager) {\n this.isManager = isManager;\n }",
"public void setStateManager(StateManager stateManager) {\r\n\t\tthis.stateManager = stateManager;\r\n\t}",
"public void setIdManagerEntity(int value) {\n this.idManagerEntity = value;\n }",
"public void setMemManager(MemoryManager memManager) {\r\n\t\tKnowledgeBaseManager.memManager = memManager;\r\n\t}",
"public void setManagerId(Integer managerId) {\n this.managerId = managerId;\n }",
"public void setMgr(Long mgr) {\n\t\tthis.mgr = mgr;\n\t}",
"public void setManagerId(Integer value) {\r\n setAttributeInternal(MANAGERID, value);\r\n }",
"private void setupManager() {\n }",
"void setPluginManager(MagePluginManager manager);",
"public void setQueryManager(QueryManager queryManager) {\r\n this.queryManager = queryManager;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bitfinex tick event consumer | public void onTickEvent(BiConsumer<BitfinexTickerSymbol, BitfinexTick> consumer) {
this.tickConsumer = consumer;
} | [
"public void tick() {}",
"void tick(long tickSinceStart);",
"public abstract void tick();",
"private void tick() {\n Log.enter();\n Log.write(\"[:Timer].tick()\");\n Log.exit();\n }",
"void tick(H host, int systemTick);",
"void applyTick(int tick);",
"private void tick(){\n time++;\n }",
"public void onTick(Object data) {\n if (i == 0) {\n System.out.println(\" Registering for shutdown signal.\");\n try {\n reactor.getReactorShutdownSignal().subscribe(this);\n reactor.runTimerOneShot(this, 1000, null);\n } catch (Exception error) {\n Assert.fail(\"Failed to start timer : \" + error.toString());\n }\n } else if (i == 1) {\n System.out.println(\" Stopping reactor.\");\n reactorControl.stop();\n }\n i++;\n }",
"protected WrapperTickEvent()\n {\n }",
"public void tick() \n {\n //Einfache Bildschirmausgabe. Kann spaeter in Subklasse beliebig ueberschreiben werden.\n zaehler++;\n zaehler = zaehler % 2;\n if ( zaehler == 1 ) \n {\n System.out.println( \"Tick!\" );\n }\n else \n {\n System.out.println( \"Tack!\" );\n }\n }",
"public static native void ChannelManager_timer_tick_occurred(long this_arg);",
"public void onTimerTick();",
"void setTick(int tick);",
"@Override\r\n\tpublic void tickGeneric(int tickerId, int tickType, double value) {\n\t}",
"public interface EngineTickCallback {\n\t/**\n\t * The method the engine calls when it ticks.\n\t */\n\tvoid tick();\n}",
"int getFinalTick();",
"public void cycleOutput(long tick)\n {\n }",
"public boolean tick() {\r\n \t\treturn false;\r\n \t}",
"private void tick(){\n \n this.village.tick();\n if(this.village.getTurn() > 1){\n this.lastEventTextBox.setText(this.currentEvent.getEventResultText());\n }\n this.currentEvent = this.getNewEvent();\n this.updateUIAfterTick();\n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the expectedDateOfDelivery value for this ReferenceNumberResponse. | public java.util.Date getExpectedDateOfDelivery() {
return expectedDateOfDelivery;
} | [
"public Date getExpectedDeliveryDate() {\n return expectedDeliveryDate;\n }",
"public void setExpectedDateOfDelivery(java.util.Date expectedDateOfDelivery) {\r\n this.expectedDateOfDelivery = expectedDateOfDelivery;\r\n }",
"com.google.protobuf.Int64Value getDeliveryDateBefore();",
"com.google.protobuf.Int64ValueOrBuilder getDeliveryDateBeforeOrBuilder();",
"@java.lang.Override\n public long getDeliveryDate() {\n return deliveryDate_;\n }",
"public String getDeliveryDate() {\r\n\t\treturn deliveryDate;\r\n\t}",
"public java.lang.String getDeliveryDate(\r\n ) {\r\n return this._deliveryDate;\r\n }",
"public java.util.Calendar getDatePromisedDelivery() {\n return datePromisedDelivery;\n }",
"com.google.protobuf.Int64Value getDeliveryDateAfter();",
"public ZonedDateTime getDeliveryDate() {\n return _deliveryDate;\n }",
"public Date getDeliveryDate() {\n return (Date) getAttributeInternal(DELIVERYDATE);\n }",
"public Date getDeliveryDate() {\n return (Date)getAttributeInternal(DELIVERYDATE);\n }",
"com.google.protobuf.Int64ValueOrBuilder getDeliveryDateAfterOrBuilder();",
"public Date getDELIVERED_DATE() {\r\n return DELIVERED_DATE;\r\n }",
"public String getDeliverydate() {\n return deliverydate;\n }",
"public XMLGregorianCalendar getDeliveryDeadline() {\n return deliveryDeadline;\n }",
"public Date getDeliveryStartDate() {\n return (Date)getAttributeInternal(DELIVERYSTARTDATE);\n }",
"public XMLGregorianCalendar getDeadlineDelivery() {\n return deadlineDelivery;\n }",
"public Date getDELIVERY_DATE() {\r\n return DELIVERY_DATE;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build call for getBudgetsBySeller | public okhttp3.Call getBudgetsBySellerCall(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/sellers/{sellerId}/budgets"
.replaceAll("\\{" + "sellerId" + "\\}", localVarApiClient.escapeString(sellerId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
if (status != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status));
}
if (withBalance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withBalance", withBalance));
}
if (withSpend != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withSpend", withSpend));
}
if (endAfterDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAfterDate", endAfterDate));
}
if (startBeforeDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startBeforeDate", startBeforeDate));
}
if (campaignId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("campaignId", campaignId));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
} | [
"ImmutableList<SchemaOrgType> getSellerList();",
"public okhttp3.Call getSellerBudgetsCall(String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String sellerId, String type, Integer advertiserId, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/v2/crp/budgets\";\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (status != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"status\", status));\n }\n\n if (withBalance != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withBalance\", withBalance));\n }\n\n if (withSpend != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withSpend\", withSpend));\n }\n\n if (endAfterDate != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"endAfterDate\", endAfterDate));\n }\n\n if (startBeforeDate != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"startBeforeDate\", startBeforeDate));\n }\n\n if (campaignId != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"campaignId\", campaignId));\n }\n\n if (sellerId != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"sellerId\", sellerId));\n }\n\n if (type != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"type\", type));\n }\n\n if (advertiserId != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"advertiserId\", advertiserId));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n if (authorization != null) {\n localVarHeaderParams.put(\"Authorization\", localVarApiClient.parameterToString(authorization));\n }\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\", \"text/html\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"Authorization\" };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);\n }",
"@Override\n public List<DebtorsAgingHelper> getDebtorsAging(String customerId, Date atDate, DebtorsAgingMode mode, DebtorsAgingPeriod period, DebtorsParameters parameters, EMCUserData userData) {\n if (atDate == null) {\n atDate = Functions.nowDate();\n }\n\n List<DebtorsAgingHelper> agingList = new ArrayList<DebtorsAgingHelper>();\n\n if (parameters == null) {\n parameters = debtorsParametersBean.getDebtorsParameters(userData);\n }\n\n if (parameters == null) {\n logMessage(Level.SEVERE, ServerDebtorsMessageEnum.PARAM_NOT_FOUND, userData);\n return null;\n }\n\n if (mode == null || period == null) {\n if (mode == null) {\n mode = DebtorsAgingMode.fromString(parameters.getDebtorsAgingMode());\n }\n\n if (period == null) {\n period = DebtorsAgingPeriod.fromString(parameters.getDebtorsAgingPeriod());\n }\n }\n\n if (!isBlank(parameters.getAgingCurrentBinName())) {\n DebtorsAgingHelper helper = new DebtorsAgingHelper();\n helper.setBinName(parameters.getAgingCurrentBinName());\n agingList.add(helper);\n }\n\n if (!isBlank(parameters.getAgingBin1Name())) {\n DebtorsAgingHelper helper = new DebtorsAgingHelper();\n helper.setBinName(parameters.getAgingBin1Name());\n agingList.add(helper);\n }\n\n if (!isBlank(parameters.getAgingBin2Name())) {\n DebtorsAgingHelper helper = new DebtorsAgingHelper();\n helper.setBinName(parameters.getAgingBin2Name());\n agingList.add(helper);\n }\n\n if (!isBlank(parameters.getAgingBin3Name())) {\n DebtorsAgingHelper helper = new DebtorsAgingHelper();\n helper.setBinName(parameters.getAgingBin3Name());\n agingList.add(helper);\n }\n\n if (!isBlank(parameters.getAgingBin4Name())) {\n DebtorsAgingHelper helper = new DebtorsAgingHelper();\n helper.setBinName(parameters.getAgingBin4Name());\n agingList.add(helper);\n }\n\n if (!isBlank(parameters.getAgingBin5Name())) {\n DebtorsAgingHelper helper = new DebtorsAgingHelper();\n helper.setBinName(parameters.getAgingBin5Name());\n agingList.add(helper);\n }\n\n if (!isBlank(parameters.getAgingBin6Name())) {\n DebtorsAgingHelper helper = new DebtorsAgingHelper();\n helper.setBinName(parameters.getAgingBin6Name());\n agingList.add(helper);\n }\n\n //If no bins were set up, return.\n if (agingList.isEmpty()) {\n return agingList;\n }\n\n //This list will contain a query for each period.\n List<EMCQuery> periodQueries = new ArrayList<EMCQuery>();\n\n //All period queries will be copied from this query. Select total and subtract settled amounts.\n EMCQuery templateQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactions.class);\n templateQuery.addFieldAggregateFunction(\"debit\", \"SUM\");\n templateQuery.addFieldAggregateFunction(\"debitAmountSettled\", \"SUM\");\n\n //Customer is optional.\n if (customerId != null) {\n templateQuery.addAnd(\"customerId\", customerId);\n }\n\n //Ensure that only data which was valid at atDate is selected. Bev requested that we remove this check.\n //templateQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n if (period.equals(DebtorsAgingPeriod.CALENDAR_MONTHS)) {\n //Add queries for each period\n //Get current month\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(atDate);\n\n for (int i = 0; i < agingList.size(); i++) {\n EMCQuery query = templateQuery.copyQuery();\n\n //Start on the first day of the month\n Date firstDay = dateHandler.buildDate(calendar.get(Calendar.YEAR),\n calendar.get(Calendar.MONTH),\n 1,\n calendar.get(Calendar.HOUR),\n calendar.get(Calendar.MINUTE),\n calendar.get(Calendar.SECOND));\n\n Date lastDay = null;\n\n if (i == 0) {\n //Current bin. Only include transactions up to at date.\n lastDay = atDate;\n } else {\n //Go to the last day\n lastDay = dateHandler.buildDate(calendar.get(Calendar.YEAR),\n calendar.get(Calendar.MONTH),\n calendar.getActualMaximum(Calendar.DAY_OF_MONTH),\n calendar.get(Calendar.HOUR),\n calendar.get(Calendar.MINUTE),\n calendar.get(Calendar.SECOND));\n }\n\n query.addAnd(\"transactionDate\", lastDay, EMCQueryConditions.LESS_THAN_EQ);\n\n //Last bin should go ignore start of month and select everything older than month.\n if (i != agingList.size() - 1) {\n query.addAnd(\"transactionDate\", firstDay, EMCQueryConditions.GREATER_THAN_EQ);\n agingList.get(i).setBinStartDate(firstDay);\n }\n\n periodQueries.add(query);\n\n agingList.get(i).setBinEndDate(lastDay);\n\n //Go to previous month\n calendar.add(Calendar.MONTH, -1);\n }\n } else if (period.equals(DebtorsAgingPeriod.FINANCIAL_PERIODS)) {\n //Get current financial period.\n EMCQuery periodQuery = new EMCQuery(enumQueryTypes.SELECT, GLFinancialPeriods.class);\n periodQuery.addAnd(\"startDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n periodQuery.addAnd(\"endDate\", atDate, EMCQueryConditions.GREATER_THAN_EQ);\n periodQuery.addField(\"startDate\");\n periodQuery.addField(\"endDate\");\n periodQuery.addOrderBy(\"startDate\", GLFinancialPeriods.class.getName(), EMCQueryOrderByDirections.DESC);\n\n Object[] currentPeriod = (Object[]) util.executeSingleResultQuery(periodQuery, userData);\n\n if (currentPeriod != null) {\n //Add current period query\n EMCQuery query = templateQuery.copyQuery();\n query.addAnd(\"transactionDate\", currentPeriod[0], EMCQueryConditions.GREATER_THAN_EQ);\n query.addAnd(\"transactionDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n periodQueries.add(query);\n\n agingList.get(0).setBinStartDate((Date) currentPeriod[0]);\n agingList.get(0).setBinEndDate(atDate);\n } else {\n //Current bin query should select nothing\n EMCQuery query = templateQuery.copyQuery();\n query.addAnd(\"recordID\", 0);\n\n periodQueries.add(query);\n }\n\n //Get previous financial periods\n periodQuery.removeAnd(\"endDate\");\n periodQuery.removeAnd(\"startDate\");\n periodQuery.addAnd(\"endDate\", atDate, EMCQueryConditions.LESS_THAN);\n\n List<Object[]> financialPeriods = (List<Object[]>) util.executeGeneralSelectQuery(periodQuery, userData);\n\n //Only do this if there is more that one bin\n if (agingList.size() > 1) {\n for (int i = 0; i < agingList.size() - 1; i++) {\n //Is there another period?\n if (financialPeriods.size() == i) {\n break;\n }\n\n currentPeriod = financialPeriods.get(i);\n\n EMCQuery query = templateQuery.copyQuery();\n\n //Ignore start date for last bin\n if (i != agingList.size() - 2) {\n query.addAnd(\"transactionDate\", currentPeriod[0], EMCQueryConditions.GREATER_THAN_EQ);\n agingList.get(i + 1).setBinStartDate((Date) currentPeriod[0]);\n }\n\n query.addAnd(\"transactionDate\", currentPeriod[1], EMCQueryConditions.LESS_THAN_EQ);\n\n periodQueries.add(query);\n\n //Set aging bin dates.\n agingList.get(i + 1).setBinEndDate((Date) currentPeriod[1]);\n }\n }\n }\n\n //Calculate totals for each bin\n switch (mode) {\n case NONE:\n calculateDebitAgingNONE(periodQueries, agingList, atDate, customerId, userData);\n break;\n case DATE:\n calculateDebitAgingDATE(periodQueries, agingList, atDate, customerId, userData);\n break;\n case OLDEST:\n calculateDebitAgingOLDEST(customerId, periodQueries, agingList, atDate, userData);\n break;\n }\n\n return agingList;\n }",
"public List<Offer> getOffersBySellerId(long sellerId);",
"public List<Item> getItemsOfAllSellersByCategoryAndBuyer(CategoryTree category, Person buyer){\n return null;\n }",
"public List<SellerDTO> showSellers(){\n\t\tList<Seller> sellersEntities=sellerRepository.findAll();\n\t\tList<SellerDTO> sellers=new ArrayList<>();\n\t\tfor(Seller seller:sellersEntities) {\n\t\t\tsellers.add(SellerDTO.valueOf(seller));\n\t\t}\n\t\treturn sellers;\n\t\t}",
"Builder addSeller(Person value);",
"public okhttp3.Call getBudgetsBySellerCampaignIdCall(String sellerCampaignId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, String type, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/v2/crp/seller-campaigns/{sellerCampaignId}/budgets\"\n .replaceAll(\"\\\\{\" + \"sellerCampaignId\" + \"\\\\}\", localVarApiClient.escapeString(sellerCampaignId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (status != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"status\", status));\n }\n\n if (withBalance != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withBalance\", withBalance));\n }\n\n if (withSpend != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withSpend\", withSpend));\n }\n\n if (endAfterDate != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"endAfterDate\", endAfterDate));\n }\n\n if (startBeforeDate != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"startBeforeDate\", startBeforeDate));\n }\n\n if (type != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"type\", type));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n if (authorization != null) {\n localVarHeaderParams.put(\"Authorization\", localVarApiClient.parameterToString(authorization));\n }\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\", \"text/html\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"Authorization\" };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);\n }",
"Builder addSeller(String value);",
"public okhttp3.Call getBudgetsByAdvertiserCall(Integer advertiserId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Long budgetId, Long sellerId, String type, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/v2/crp/advertisers/{advertiserId}/budgets\"\n .replaceAll(\"\\\\{\" + \"advertiserId\" + \"\\\\}\", localVarApiClient.escapeString(advertiserId.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (status != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"status\", status));\n }\n\n if (withBalance != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withBalance\", withBalance));\n }\n\n if (withSpend != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withSpend\", withSpend));\n }\n\n if (endAfterDate != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"endAfterDate\", endAfterDate));\n }\n\n if (startBeforeDate != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"startBeforeDate\", startBeforeDate));\n }\n\n if (budgetId != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"budgetId\", budgetId));\n }\n\n if (sellerId != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"sellerId\", sellerId));\n }\n\n if (type != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"type\", type));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n if (authorization != null) {\n localVarHeaderParams.put(\"Authorization\", localVarApiClient.parameterToString(authorization));\n }\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\", \"text/html\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"Authorization\" };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);\n }",
"public List<Seller> getAllSeller() throws DatabaseConnectivityFailedException;",
"Builder addSeller(Organization value);",
"public List<ProductDTO> getProductBasedOnSellerId(int sellerid){\n\t\tList<Product> product =productRepo.findBySellerid(sellerid);\n\t\tList<ProductDTO> productList = new ArrayList<ProductDTO>();\n\t\tfor(Product pr : product) {\n\t\t\tproductList.add(ProductDTO.valueOf(pr));\n\t\t}\n\t\treturn productList;\n\t\t\n\t}",
"public okhttp3.Call getBudgetsBySellerAsync(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type, final ApiCallback<List<SellerBudgetMessage>> _callback) throws ApiException {\n\n okhttp3.Call localVarCall = getBudgetsBySellerValidateBeforeCall(sellerId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, type, _callback);\n Type localVarReturnType = new TypeToken<List<SellerBudgetMessage>>(){}.getType();\n localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);\n return localVarCall;\n }",
"public okhttp3.Call createSellerBudgetsCall(String authorization, List<CreateSellerBudgetMapiMessage> createSellerBudgets, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = createSellerBudgets;\n\n // create path and map variables\n String localVarPath = \"/v2/crp/budgets\";\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n if (authorization != null) {\n localVarHeaderParams.put(\"Authorization\", localVarApiClient.parameterToString(authorization));\n }\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\", \"text/html\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\", \"application/x-www-form-urlencoded\", \"text/html\"\n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"Authorization\" };\n return localVarApiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);\n }",
"@RequestMapping(\"/OrdersBySeller/{id}\")\n\tpublic List<Order> getOrdersBySeller(@PathVariable(\"id\") String id) {\n\t\t//get all order's details of a specific seller\n\t\tList<OrderDetail> alldetails = (List<OrderDetail>)orderDetailRepository.findBySeller(id);\n\t\t// Retrieve ids of orders f\n\t\tList<String> ids = alldetails.stream().map(OrderDetail::getOrder).collect(Collectors.toList());\n\t\t//get the orders by ids\n\t\tList<Order> orders = (List<Order>) orderRepository.findAllById(ids);\n\t\tfor (int i=0 ; i< orders.size();i++) {\n\t\t\t//get the order's detail for each order\n\t\t\tList<OrderDetail> details = orderDetailRepository.findBySellerAndOrder(id, orders.get(i).getId());\n\t\t\t//set the order's detail for each order\n\t\t\torders.get(i).setDetails(details);\n\t\t}\n\t\t//return the list of orders\n\t\treturn orders;\n\n\t}",
"public okhttp3.Call getSellersCall(String authorization, String sellerStatus, Boolean withProducts, String withBudgetStatus, String sellerName, Integer advertiserId, Integer campaignId, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/v2/crp/sellers\";\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (sellerStatus != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"sellerStatus\", sellerStatus));\n }\n\n if (withProducts != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withProducts\", withProducts));\n }\n\n if (withBudgetStatus != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"withBudgetStatus\", withBudgetStatus));\n }\n\n if (sellerName != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"sellerName\", sellerName));\n }\n\n if (advertiserId != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"advertiserId\", advertiserId));\n }\n\n if (campaignId != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"campaignId\", campaignId));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n if (authorization != null) {\n localVarHeaderParams.put(\"Authorization\", localVarApiClient.parameterToString(authorization));\n }\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\", \"text/html\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { \"Authorization\" };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);\n }",
"@RequestMapping(value = \"\", method = RequestMethod.GET)\n public ArrayList<Seller> getAllSeller()\n {\n return DatabaseSeller.getSellerDatabase();\n }",
"public void buyer() {\r\n\t\tfor(int i = 0;i< bookList.size();i++) {\r\n\t\t\tBook[] listan = new Book[amountList.get(i)];\r\n\t\t\tfor(int j = 0;j< amountList.get(i);j++) {\r\n\t\t\t\tlistan[j] = bookList.get(i);\r\n\t\t\t}\r\n\t\t\tint[] kalle = new int[listan.length];\r\n\t\t\tStore sd = Store.getInstance();\r\n\t\t\tkalle = sd.buy(listan);\r\n\t\t\tint acc = 0;\r\n\t\t\tfor(int j = 0;j< kalle.length;j++) {\r\n\t\t\t\tif(kalle[j] == 0) {\r\n\t\t\t\t\tacc += 1;\r\n\t\t\t\t\ttotal = total.add(bookList.get(i).getPrice());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tamountstatus.set(i,acc);\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add the given resource to this JsonLd object using the resourceId as key. | public void put(String resourceId, JsonLdResource resource) {
this.resourceMap.put(resourceId, resource);
} | [
"public void addResource(TIdentifiable resource) {\r\n // make sure that the resource doesn't exists already\r\n\t if (resourceExists(resource)) return;\t \r\n\t \r\n // check to see if we need to expand the array:\r\n\t if (m_current_resources_count == m_current_max_resources) expandTable(1, 2);\t \t \r\n\t m_resources.addID(resource);\r\n\t m_current_resources_count++;\r\n }",
"public void addResource(Resource resource);",
"public void addResource(Resource resource) {\n\t\tresources.add(resource);\n\t}",
"@Override\n public void addResource(String resourceKey, Object resource)\n {\n synchronized(InProcessCache.class) {\n if(!hasResource(resourceKey)) {\n WeakReference weak = new WeakReference(resource);\n _cache.put(resourceKey, weak);\n }\n }\n }",
"public void add( SoundResource soundResource ) {\n \tmodel.add(soundResource, resolution);\n }",
"public void add(BindResource resource) {\n \tif(resource==null)\n \t\tthrow new IllegalArgumentException(\"resourceProperties cannot be null\");\n \tif(resources==null)\n \t\tresources = new ArrayList<BindResource>();\n \t\n \tresources.add(resource);\n }",
"public void addResource(String peerIp, Resource resource){\n resource.setId(currentResourceId++);\n resource.setPeerIp(peerIp);\n List<Resource> resourcesList = resourceStore.get(peerIp);\n resourcesList.add(resource);\n resourceStore.put(peerIp, resourcesList);\n }",
"public void onResourceAdded(final ResourceEvent resourceEvent);",
"public void insertSingleResource(Resource resource) {\n new InsertSingleResourceAsyncTask(mResourceDao).execute(resource);\n }",
"void registerResource(Resource resource);",
"void append(String resourceKey);",
"public <TValue> ByProjectKeyByResourceTypeGet addResourceKey(final TValue resourceKey) {\n return copy().addQueryParam(\"resourceKey\", resourceKey);\n }",
"private Resource setNewResourceId(Resource resource) {\n return resource.toBuilder().id(UUID.randomUUID().toString()).build();\n }",
"public void addServiceRequestResource(ServiceRequestResource serviceRequestResource) {\r\n\t\tthis.serviceRequestResources.put(serviceRequestResource.getName(), serviceRequestResource);\r\n\t}",
"public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }",
"void setResourceID(String resourceID);",
"public DnsMessage addAdditionalResource(DnsResource resource) {\n if (additional == null) {\n additional = new LinkedList<DnsResource>();\n }\n additional.add(resource);\n return this;\n }",
"void addConfigurationFromResource( String resource )\n throws RegistryException;",
"public void add(RootResource rootResource) {\n if (rootResource.isInterface()) {\n //if the root resource is an interface, don't add it if its implementation has already been added (avoid duplication).\n for (RootResource resource : this.rootResources) {\n if (((DecoratedTypeMirror)(resource.asType())).isInstanceOf(rootResource)) {\n debug(\"%s was identified as a JAX-RS root resource, but will be ignored because root resource %s implements it.\", rootResource.getQualifiedName(), resource.getQualifiedName());\n return;\n }\n }\n }\n else {\n //remove any interfaces of this root resource that have been identified as root resources (avoid duplication)\n DecoratedTypeMirror rootResourceType = (DecoratedTypeMirror) rootResource.asType();\n Iterator<RootResource> it = this.rootResources.iterator();\n while (it.hasNext()) {\n RootResource resource = it.next();\n if (resource.isInterface() && rootResourceType.isInstanceOf(resource)) {\n debug(\"%s was identified as a JAX-RS root resource, but will be ignored because root resource %s implements it.\", resource.getQualifiedName(), rootResource.getQualifiedName());\n it.remove();\n }\n }\n }\n\n this.rootResources.add(rootResource);\n debug(\"Added %s as a JAX-RS root resource.\", rootResource.getQualifiedName());\n\n if (getContext().getProcessingEnvironment().findSourcePosition(rootResource) == null) {\n OneTimeLogMessage.SOURCE_FILES_NOT_FOUND.log(getContext());\n if (OneTimeLogMessage.SOURCE_FILES_NOT_FOUND.getLogged() <= 3) {\n info(\"Unable to find source file for %s.\", rootResource.getQualifiedName());\n }\n else {\n debug(\"Unable to find source file for %s.\", rootResource.getQualifiedName());\n }\n }\n }"
] | {
"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.