query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
sequencelengths
19
20
metadata
dict
Counts the number of detailInventaire in the database
@Transactional(readOnly = true) public Long countDetailInventaire() { return countDetailInventaire(null); }
[ "int getNewsindentifydetailCount();", "public int getOrderDetailCount() {\n String sqlCountQuery = \"SELECT * FROM \" + CoffeeShopDatabase.OrderDetailTable.TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(sqlCountQuery, null);\n cursor.close();\n int count = cursor.getCount();\n return count;\n }", "long countBatimentByTypeInventaire(String typeInventaire);", "private int count() {\n //int n=0;\n if(DBConnection.isClosed(con))\n con = DBConnection.getConnection();\n if(!DBConnection.isClosed(con)) {\n try {\n String query = \"select * from enrollment\";\n pstmt = con.prepareStatement(query);\n res = pstmt.executeQuery();\n res.last();\n noOfRows= res.getRow();\n res.beforeFirst();\n } catch (SQLException sqle) {\n sqle.printStackTrace();\n }\n }\n return noOfRows;\n }", "@Transactional(readOnly = true)\n\tpublic Long countNonAffectedDetailInventaire(String property) {\n\t\treturn countNonAffectedDetailInventaire(property, null);\n\t}", "public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "int count(long eventId) throws DaoException;", "long countNumberOfProductsInDatabase();", "public int getListCountNum(WmsCreCustomerChangeLineHouseinfoSearchBeanVO queryInfo);", "public int numberOfRowsByContest(long contestId,SQLiteDatabase dbN);", "public int countByExpenseId(long expenseId);", "public int countByIN(java.lang.String identificationNo)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public int calImpression() {\n int count = 0;\n String query = \"SELECT count(ID) FROM Impression \";\n query += whereClause();\n try {\n ResultSet rs = statement.executeQuery(query);\n while (rs.next()) {\n count = rs.getInt(\"count(ID)\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return count;\n }", "@Transactional\n\tpublic Integer countIndStatess() {\n\t\treturn ((Long) indStatesDAO.createQuerySingleResult(\"select count(o) from IndStates o\").getSingleResult()).intValue();\n\t}", "int getDayPhoneDetailCount();", "public int countByequip_id(long equip_id);", "public int getNewsindentifydetailCount() {\n return newsindentifydetail_.size();\n }", "public int countRequerentes();", "int getExaminationsCount();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GIVEN WHEN se ejecuta el metodo fibonacciIterativo() para varios casos THEN se comprueba que el resultado sea el esperado
@org.junit.jupiter.api.Test void testFibonacciIterativo() { assertEquals(0, Algoritmos.fibonacciIterativo(-5)); assertEquals(0, Algoritmos.fibonacciIterativo(-1)); assertEquals(0, Algoritmos.fibonacciIterativo(0)); assertEquals(1, Algoritmos.fibonacciIterativo(1)); assertEquals(1, Algoritmos.fibonacciIterativo(2)); assertEquals(5, Algoritmos.fibonacciIterativo(5)); assertEquals(1, Algoritmos.fibonacciIterativo(2)); assertEquals(34, Algoritmos.fibonacciIterativo(9)); // assertEquals(1231, Algoritmos.fibonacciIterativo(60)); }
[ "@Test\n public void fibonacciTest() {\n final Sequence<Integer> fibo = getFibo();\n final Number answer = fibo.takeWhile(lessThan(4000000))\n .filter(even())\n .reduce(sum());\n assertThat(answer, is(4613732));\n }", "@Test\n void prueba_fibonacci() {\n Assertions.assertEquals(0, numero.Fibonacci(0));\n Assertions.assertEquals(1, numero.Fibonacci(2));\n Assertions.assertEquals(610, numero.Fibonacci(15));\n }", "@Test\n\tpublic void fibonacciTest() {\n\t\tint a = 5;\n\t\tint resultado = 3;\n\t\tint obtenido = calculadora.fibonacci(a);\n\t\tAssert.assertEquals(resultado, obtenido);\n\t}", "@Test\n\tpublic void isFibonacciTest() {\n\t\tAssert.assertTrue(ifn.isFibonacci(21));\n\t\tAssert.assertTrue(ifn.isFibonacci(144));\n\t\tAssert.assertTrue(!ifn.isFibonacci(150));\n\t\tAssert.assertTrue(!ifn.isFibonacci(56));\n\t}", "@Test\n\tpublic void FibonacciTest() \n\t{\n\t\tint tc1 = 0;\n\t\tint tc2 = 1;\n\t\tint tc3 = 2;\n\t\tint tc4 = 3;\n\t\t\n\t\tassertEquals(0, Utilities.Fibonacci(tc1));\n\t\tassertEquals(1, Utilities.Fibonacci(tc2));\n\t\tassertEquals(1, Utilities.Fibonacci(tc3));\n\t\tassertEquals(2, Utilities.Fibonacci(tc4));\n\t}", "@Test\n\tpublic void fibonaccitest1() {\n\t\t\n\t\tlong result;\n\t\t\n\t\tFibonacciFactorial fib = new FibonacciFactorial();\n\t\tresult = fib.incfibonacci(10);\n\t\tassertTrue(result == 34);\n\t}", "@Test\n\tvoid FibonacciTest() \n\t{\tassertEquals(0, utilities.Fibonacci(0));\n\t\tassertEquals(1, utilities.Fibonacci(1));\n\t\tassertEquals(1, utilities.Fibonacci(2));\n\t\tassertEquals(2, utilities.Fibonacci(3));\n\t\tassertEquals(3, utilities.Fibonacci(4));\n\t\tassertEquals(89, utilities.Fibonacci(11));\n\n\t}", "public void testIteratorFibonacci()\r\n {\r\n ListIterator<Integer> iter;\r\n\r\n // Now iterate through the list to near the middle, read the\r\n // previous two entries and verify the sum.\r\n iter = fib.listIterator();\r\n int sum = 0;\r\n for (int j = 1; j < FIBMAX/2; j++)\r\n sum = iter.next();\r\n iter.previous();\r\n assertEquals(iter.previous() + iter.previous(),sum);\r\n // Go forward with the list iterator\r\n assertEquals(iter.next() + iter.next(),sum);\r\n }", "@Test \n\tpublic void calculatorFibonacciBaseFunctionality() {\n\t\tassertEquals(Calculator.termInFibonacciSequence(1), new Integer(1));\n\t\tassertEquals(Calculator.termInFibonacciSequence(2), new Integer(1));\n\t\tassertEquals(Calculator.termInFibonacciSequenceIteratively(1), new Integer(1));\n\t\tassertEquals(Calculator.termInFibonacciSequenceIteratively(2), new Integer(1));\n\t}", "public static int fibonacci(int numero) {\n //if((numero > 0){\n // throw.NumberFormatException(\" o numero nao deve ser negativo\");\n if (numero == 0 || numero == 1) {\n return 1;\n }\n\n System.out.println(numero);\n return (fibonacci(numero - 1) * fibonacci(numero - 2));\n\n }", "@Test\n\t\tpublic void testFibonacci100() {\n\t\t\tBigInteger expected = new BigInteger(\"354224848179261915075\");\n\t\t\tassertEquals(expected, FibonacciGenerator.fibonacciNumber(100));\n\t\t}", "public static int fibonacci(int geracao) {\n \n int anterior = 0;\n int atual = 1;\n \n return geracao;\n \n }", "@Test\n public void getValueAt() {\n fibonacciTest(0,0);\n fibonacciTest(1,1);\n fibonacciTest(2,1);\n fibonacciTest(5,5);\n fibonacciTest(10,55);\n fibonacciTest(15,610);\n fibonacciTest(20,6765);\n fibonacciTest(25,75025);\n fibonacciTest(30,832040);\n fibonacciTest(35,9227465);\n fibonacciTest(40,102334155);\n fibonacciTest(45,1134903170);\n fibonacciTest(46,1836311903);\n }", "@Test\n\t\tpublic void testFibonacci20() {\n\t\t\tBigInteger expected = BigInteger.valueOf(6765);\n\t\t\tassertEquals(expected, FibonacciGenerator.fibonacciNumber(20));\n\t\t}", "public static void fib(int a){\n int x = 0; // alkuarvot\n int y = 1;\n int sum = 0;\n for(int i = 0; i < a && y < 4000000; i++){\n int edellinen = x; //edellinen luku on 0\n x = y; // x on nyt edellinen + y\n y = edellinen + y; // y = edellinen + y\n System.out.println(x); // Tulostetaan x\n if(x % 2 == 0){\n sum = sum+x;\n }\n }\n System.out.println(sum);\n /* ADD YOUR CODE HERE */\n }", "@Test\n public void testFibonacciInvalidInteger()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"0\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "@TestFactory\n\t\tpublic Stream<DynamicTest> testFibonacciNumber() {\n\t\t\tList<BigInteger> expected = List.of(0, 1, 1, 2, 3, 5, 8, 13, 21, 34).stream()\n\t\t\t\t\t.map(item -> BigInteger.valueOf(item)).collect(Collectors.toList());\n\n\t\t\tStream<DynamicTest> testSizes = IntStream.range(0, expected.size())\n\t\t\t\t\t.mapToObj(i -> generateSizeTest(i));\n\n\t\t\tStream<DynamicTest> testContents = IntStream.range(0, expected.size())\n\t\t\t\t\t.mapToObj(i -> generateContentTest(i, expected));\n\n\t\t\treturn Stream.concat(testSizes, testContents);\n\t\t}", "public void fibTest(){\r\n \r\n for(int j=0;j<eDB.staff.size();j++){\r\n String y = eDB.staff.get(j).getId().replaceAll(\"[^\\\\d.]\", \"\"); //removes letters from id\r\n int n = Integer.parseInt(y);\r\n\r\n {\r\n int a=0, b=1 ,c=0; \r\n \r\n while(c<n) \r\n {\r\n c = a + b; \r\n a = b;\r\n b = c;\r\n }\r\n \r\n \r\n \r\n if(c==n) \r\n fibSpies.add(eDB.staff.get(j));\r\n \r\n \r\n }\r\n \r\n}\r\n }", "@Test\n public void testFibonacciInvalidNonInteger()\n {\n driver.findElement(By.linkText(\"Fibonacci\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"hello\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column CTSTELLER.ROLE_CODE
public void setROLE_CODE(BigDecimal ROLE_CODE) { this.ROLE_CODE = ROLE_CODE; }
[ "public void setRoleCode(Integer roleCode) {\n this.roleCode = roleCode;\n }", "public String getRoleCode() {\n return roleCode;\n }", "public BigDecimal getROLE_CODE() {\r\n return ROLE_CODE;\r\n }", "public void setRoleCode(String roleCode) {\n this.roleCode = roleCode == null ? null : roleCode.trim();\n }", "private void setRole() throws SQLException {\n super.roleId = DatabaseHelperAdapter.getRoleIdByName(\"CUSTOMER\");\n }", "@JoinColumn(name = \"code_role\")\n @ManyToOne(cascade = { PERSIST, MERGE }, fetch = EAGER)\n public Userrole getCodeRole() {\n return codeRole;\n }", "public void setRoleId(DBSequence value) {\n setAttributeInternal(ROLEID, value);\n }", "public void setRole(long value) {\n this.role = value;\n }", "@PermitAll\n @Override\n public Role getRole(String roleCode) {\n return getRepository().getEntity(Role.class, roleCode);\n }", "public void setROLE(webservice.hospindex.InsuranceINSROLE ROLE) {\n this.ROLE = ROLE;\n }", "public void setRole(String value) {\n setAttributeInternal(ROLE, value);\n }", "public Integer getRoleId() {\r\n return roleId;\r\n }", "public void setRealmCode(Code realmCode) {\n\t\tthis.realmCode = realmCode;\n\t}", "public Integer getRoleId() {\n return roleId;\n }", "public void setRole(final String value) {\n this.role = value;\n }", "public Integer getRoleid() {\r\n return roleid;\r\n }", "java.lang.String getRoleid();", "public void setLcRole(String lcRole) {\r\n\t\tthis.lcRole = lcRole;\r\n\t}", "public Integer getRoleId(Integer role_id) {\n return roleId;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the default binary parser if no binary parser configured.
public static boolean addDefaultBinaryParser(IProject project) throws CoreException { ICConfigExtensionReference[] binaryParsers = CCorePlugin.getDefault().getDefaultBinaryParserExtensions(project); if (binaryParsers == null || binaryParsers.length == 0) { ICProjectDescription desc = CCorePlugin.getDefault().getProjectDescription(project); if (desc == null) { return false; } desc.getDefaultSettingConfiguration().create(CCorePlugin.BINARY_PARSER_UNIQ_ID, CCorePlugin.DEFAULT_BINARY_PARSER_UNIQ_ID); CCorePlugin.getDefault().setProjectDescription(project, desc); } return true; }
[ "MarkupParser defaultParser();", "public BinaryParser(final String binary) {\r\n this.binary = binary;\r\n }", "void registerParser(BaseParser parser);", "private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }", "private static Parser SetupParser() {\n if (questionParser == null) {\n InputStream inputStream = null;\n try {\n inputStream = App.getContext().getResources().getAssets().open(\"en-parser-chunking.bin\");\n final ParserModel parseModel = new ParserModel(inputStream);\n inputStream.close();\n\n questionParser = ParserFactory.create(parseModel);\n } catch (final IOException ioe) {\n ioe.printStackTrace();\n }\n }\n return questionParser;\n }", "protected SupportedParsers() {\n\t\t\n\t\tparsers = new Vector<Parser>();\n\t\tparsers.add(new TwigParser());\n\t\tparsers.add(new DDGParser());\n\t\tparsers.add(new PhyloXMLParser());\n\t\tparsers.add(new RDFParser());\n\t\tparsers.add(new OPMParser());\n\t\tparsers.add(new CPLParser());\n\t}", "public void addParser(String extension, Class<? extends FileParser> parser) {\n parsers.put(extension, parser);\n }", "@Bean(initMethod = \"initialize\")\n public StaticBasicParserPool parserPool() {\n return new StaticBasicParserPool();\n }", "protected abstract Parser createParser();", "public void setParser(Parser p);", "@Before public void initParser() {\n\t\tparser = new CliParserImpl(\"-\", \"--\");\n\t}", "public CommandLineParser() {\n this.options = new Options();\n }", "public abstract ArgumentParser makeParser();", "public void setSupportedOptions( OptionParser parser ) {\n \t/* no options for the XMLFormatter */\n }", "public LangDistStoreBuilder registerParser(SampleParser parser) {\n parsers.add(parser);\n\n return this;\n }", "void setParser(CParser parser);", "@Before\n\tpublic void initParser() {\n\t\tXMLTagParser.init(file);\n\t}", "public static void setUserSpecificParser(UserSpecificTypeParser parser) {\r\n\t\tuserSpecificParser = parser;\r\n\t}", "public Parser() {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column sales_record.market_activity_id
public String getMarketActivityId() { return marketActivityId; }
[ "public Integer getActivityId() {\n\t\treturn activityId;\n\t}", "public Integer getActivityId() {\n return activityId;\n }", "public Integer getActivity_id() {\n return activity_id;\n }", "@Column(name = \"user_activity_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getUserActivityId() {\n return userActivityId;\n }", "public void setActivityId(long value) {\n this.activityId = value;\n }", "public long getActivityId() {\n return activityId;\n }", "public String getMarketActivityCode() {\n\t\treturn marketActivityCode;\n\t}", "String getCaseActivityId();", "public Long getActivityProductId() {\n return activityProductId;\n }", "public void setActivity_id(Integer activity_id) {\n this.activity_id = activity_id;\n }", "public String getACTIVITY_ID() {\n return ACTIVITY_ID;\n }", "public void setActivityId(Integer activityId) {\n this.activityId = activityId;\n }", "public java.lang.String getActivityId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACTIVITYID$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "int getMarketId();", "public void setMarketActivityId(String marketActivityId) {\n\t\tthis.marketActivityId = marketActivityId == null ? null\n\t\t\t\t: marketActivityId.trim();\n\t}", "public String getMarketActivityName() {\n\t\treturn marketActivityName;\n\t}", "java.lang.String getMarketId();", "public void setActivityId(String activityId) {\n this.activityId = activityId;\n }", "public Integer getActivitytypeid() {\n return activitytypeid;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleERequirementAssignment" $ANTLR start "ruleERequirementAssignment" InternalAADMParser.g:274:1: ruleERequirementAssignment : ( ( rule__ERequirementAssignment__Group__0 ) ) ;
public final void ruleERequirementAssignment() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:278:2: ( ( ( rule__ERequirementAssignment__Group__0 ) ) ) // InternalAADMParser.g:279:2: ( ( rule__ERequirementAssignment__Group__0 ) ) { // InternalAADMParser.g:279:2: ( ( rule__ERequirementAssignment__Group__0 ) ) // InternalAADMParser.g:280:3: ( rule__ERequirementAssignment__Group__0 ) { if ( state.backtracking==0 ) { before(grammarAccess.getERequirementAssignmentAccess().getGroup()); } // InternalAADMParser.g:281:3: ( rule__ERequirementAssignment__Group__0 ) // InternalAADMParser.g:281:4: rule__ERequirementAssignment__Group__0 { pushFollow(FOLLOW_2); rule__ERequirementAssignment__Group__0(); state._fsp--; if (state.failed) return ; } if ( state.backtracking==0 ) { after(grammarAccess.getERequirementAssignmentAccess().getGroup()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void ruleERequirementAssignments() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:253:2: ( ( ( rule__ERequirementAssignments__Group__0 ) ) )\n // InternalAADMParser.g:254:2: ( ( rule__ERequirementAssignments__Group__0 ) )\n {\n // InternalAADMParser.g:254:2: ( ( rule__ERequirementAssignments__Group__0 ) )\n // InternalAADMParser.g:255:3: ( rule__ERequirementAssignments__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementAssignmentsAccess().getGroup()); \n }\n // InternalAADMParser.g:256:3: ( rule__ERequirementAssignments__Group__0 )\n // InternalAADMParser.g:256:4: rule__ERequirementAssignments__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignments__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementAssignmentsAccess().getGroup()); \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__ERequirementAssignment__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4936:1: ( rule__ERequirementAssignment__Group__0__Impl rule__ERequirementAssignment__Group__1 )\n // InternalAADMParser.g:4937:2: rule__ERequirementAssignment__Group__0__Impl rule__ERequirementAssignment__Group__1\n {\n pushFollow(FOLLOW_8);\n rule__ERequirementAssignment__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__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__ERequirements__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:18206:1: ( ( ( rule__ERequirements__RequirementsAssignment_1 )* ) )\n // InternalAADMParser.g:18207:1: ( ( rule__ERequirements__RequirementsAssignment_1 )* )\n {\n // InternalAADMParser.g:18207:1: ( ( rule__ERequirements__RequirementsAssignment_1 )* )\n // InternalAADMParser.g:18208:2: ( rule__ERequirements__RequirementsAssignment_1 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementsAccess().getRequirementsAssignment_1()); \n }\n // InternalAADMParser.g:18209:2: ( rule__ERequirements__RequirementsAssignment_1 )*\n loop50:\n do {\n int alt50=2;\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==RULE_ID) ) {\n alt50=1;\n }\n\n\n switch (alt50) {\n \tcase 1 :\n \t // InternalAADMParser.g:18209:3: rule__ERequirements__RequirementsAssignment_1\n \t {\n \t pushFollow(FOLLOW_7);\n \t rule__ERequirements__RequirementsAssignment_1();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop50;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementsAccess().getRequirementsAssignment_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__ERequirementAssignments__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4920:1: ( ( ( rule__ERequirementAssignments__RequirementsAssignment_1 )* ) )\n // InternalAADMParser.g:4921:1: ( ( rule__ERequirementAssignments__RequirementsAssignment_1 )* )\n {\n // InternalAADMParser.g:4921:1: ( ( rule__ERequirementAssignments__RequirementsAssignment_1 )* )\n // InternalAADMParser.g:4922:2: ( rule__ERequirementAssignments__RequirementsAssignment_1 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementAssignmentsAccess().getRequirementsAssignment_1()); \n }\n // InternalAADMParser.g:4923:2: ( rule__ERequirementAssignments__RequirementsAssignment_1 )*\n loop12:\n do {\n int alt12=2;\n int LA12_0 = input.LA(1);\n\n if ( (LA12_0==RULE_ID) ) {\n alt12=1;\n }\n\n\n switch (alt12) {\n \tcase 1 :\n \t // InternalAADMParser.g:4923:3: rule__ERequirementAssignments__RequirementsAssignment_1\n \t {\n \t pushFollow(FOLLOW_7);\n \t rule__ERequirementAssignments__RequirementsAssignment_1();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop12;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementAssignmentsAccess().getRequirementsAssignment_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__ERequirementAssignment__Group_3__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:5083:1: ( ( Node ) )\n // InternalAADMParser.g:5084:1: ( Node )\n {\n // InternalAADMParser.g:5084:1: ( Node )\n // InternalAADMParser.g:5085:2: Node\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementAssignmentAccess().getNodeKeyword_3_0()); \n }\n match(input,Node,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementAssignmentAccess().getNodeKeyword_3_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__ERequirementAssignment__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4948:1: ( ( ( rule__ERequirementAssignment__NameAssignment_0 ) ) )\n // InternalAADMParser.g:4949:1: ( ( rule__ERequirementAssignment__NameAssignment_0 ) )\n {\n // InternalAADMParser.g:4949:1: ( ( rule__ERequirementAssignment__NameAssignment_0 ) )\n // InternalAADMParser.g:4950:2: ( rule__ERequirementAssignment__NameAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementAssignmentAccess().getNameAssignment_0()); \n }\n // InternalAADMParser.g:4951:2: ( rule__ERequirementAssignment__NameAssignment_0 )\n // InternalAADMParser.g:4951:3: rule__ERequirementAssignment__NameAssignment_0\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__NameAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementAssignmentAccess().getNameAssignment_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__EEvenFilter__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:10605:1: ( ( ( rule__EEvenFilter__RequirementAssignment_1_1 ) ) )\n // InternalAADMParser.g:10606:1: ( ( rule__EEvenFilter__RequirementAssignment_1_1 ) )\n {\n // InternalAADMParser.g:10606:1: ( ( rule__EEvenFilter__RequirementAssignment_1_1 ) )\n // InternalAADMParser.g:10607:2: ( rule__EEvenFilter__RequirementAssignment_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEEvenFilterAccess().getRequirementAssignment_1_1()); \n }\n // InternalAADMParser.g:10608:2: ( rule__EEvenFilter__RequirementAssignment_1_1 )\n // InternalAADMParser.g:10608:3: rule__EEvenFilter__RequirementAssignment_1_1\n {\n pushFollow(FOLLOW_2);\n rule__EEvenFilter__RequirementAssignment_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getEEvenFilterAccess().getRequirementAssignment_1_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__ERequirementAssignment__Group_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:5071:1: ( rule__ERequirementAssignment__Group_3__0__Impl rule__ERequirementAssignment__Group_3__1 )\n // InternalAADMParser.g:5072:2: rule__ERequirementAssignment__Group_3__0__Impl rule__ERequirementAssignment__Group_3__1\n {\n pushFollow(FOLLOW_4);\n rule__ERequirementAssignment__Group_3__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__Group_3__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__ERequirementDefinition__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:18234:1: ( ( ( rule__ERequirementDefinition__NameAssignment_0 ) ) )\n // InternalAADMParser.g:18235:1: ( ( rule__ERequirementDefinition__NameAssignment_0 ) )\n {\n // InternalAADMParser.g:18235:1: ( ( rule__ERequirementDefinition__NameAssignment_0 ) )\n // InternalAADMParser.g:18236:2: ( rule__ERequirementDefinition__NameAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementDefinitionAccess().getNameAssignment_0()); \n }\n // InternalAADMParser.g:18237:2: ( rule__ERequirementDefinition__NameAssignment_0 )\n // InternalAADMParser.g:18237:3: rule__ERequirementDefinition__NameAssignment_0\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementDefinition__NameAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementDefinitionAccess().getNameAssignment_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__ERequirementAssignment__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:5017:1: ( rule__ERequirementAssignment__Group__3__Impl rule__ERequirementAssignment__Group__4 )\n // InternalAADMParser.g:5018:2: rule__ERequirementAssignment__Group__3__Impl rule__ERequirementAssignment__Group__4\n {\n pushFollow(FOLLOW_6);\n rule__ERequirementAssignment__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__Group__4();\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__ERequirementAssignment__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4990:1: ( rule__ERequirementAssignment__Group__2__Impl rule__ERequirementAssignment__Group__3 )\n // InternalAADMParser.g:4991:2: rule__ERequirementAssignment__Group__2__Impl rule__ERequirementAssignment__Group__3\n {\n pushFollow(FOLLOW_12);\n rule__ERequirementAssignment__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__Group__3();\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__ERequirementAssignments__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4882:1: ( rule__ERequirementAssignments__Group__0__Impl rule__ERequirementAssignments__Group__1 )\n // InternalAADMParser.g:4883:2: rule__ERequirementAssignments__Group__0__Impl rule__ERequirementAssignments__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__ERequirementAssignments__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignments__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__ERequirementAssignment__Group_3__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:5109:1: ( ( ( rule__ERequirementAssignment__NodeAssignment_3_1 ) ) )\n // InternalAADMParser.g:5110:1: ( ( rule__ERequirementAssignment__NodeAssignment_3_1 ) )\n {\n // InternalAADMParser.g:5110:1: ( ( rule__ERequirementAssignment__NodeAssignment_3_1 ) )\n // InternalAADMParser.g:5111:2: ( rule__ERequirementAssignment__NodeAssignment_3_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementAssignmentAccess().getNodeAssignment_3_1()); \n }\n // InternalAADMParser.g:5112:2: ( rule__ERequirementAssignment__NodeAssignment_3_1 )\n // InternalAADMParser.g:5112:3: rule__ERequirementAssignment__NodeAssignment_3_1\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__NodeAssignment_3_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementAssignmentAccess().getNodeAssignment_3_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__ERequirementAssignment__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:4963:1: ( rule__ERequirementAssignment__Group__1__Impl rule__ERequirementAssignment__Group__2 )\n // InternalAADMParser.g:4964:2: rule__ERequirementAssignment__Group__1__Impl rule__ERequirementAssignment__Group__2\n {\n pushFollow(FOLLOW_5);\n rule__ERequirementAssignment__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__Group__2();\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__ERequirementAssignment__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:5055:1: ( ( RULE_END ) )\n // InternalAADMParser.g:5056:1: ( RULE_END )\n {\n // InternalAADMParser.g:5056:1: ( RULE_END )\n // InternalAADMParser.g:5057:2: RULE_END\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementAssignmentAccess().getENDTerminalRuleCall_4()); \n }\n match(input,RULE_END,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementAssignmentAccess().getENDTerminalRuleCall_4()); \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__ERequirementDefinition__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:18315:1: ( ( ( rule__ERequirementDefinition__RequirementAssignment_3 ) ) )\n // InternalAADMParser.g:18316:1: ( ( rule__ERequirementDefinition__RequirementAssignment_3 ) )\n {\n // InternalAADMParser.g:18316:1: ( ( rule__ERequirementDefinition__RequirementAssignment_3 ) )\n // InternalAADMParser.g:18317:2: ( rule__ERequirementDefinition__RequirementAssignment_3 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementDefinitionAccess().getRequirementAssignment_3()); \n }\n // InternalAADMParser.g:18318:2: ( rule__ERequirementDefinition__RequirementAssignment_3 )\n // InternalAADMParser.g:18318:3: rule__ERequirementDefinition__RequirementAssignment_3\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementDefinition__RequirementAssignment_3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementDefinitionAccess().getRequirementAssignment_3()); \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 ruleERequirementDefinition() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:2403:2: ( ( ( rule__ERequirementDefinition__Group__0 ) ) )\n // InternalAADMParser.g:2404:2: ( ( rule__ERequirementDefinition__Group__0 ) )\n {\n // InternalAADMParser.g:2404:2: ( ( rule__ERequirementDefinition__Group__0 ) )\n // InternalAADMParser.g:2405:3: ( rule__ERequirementDefinition__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementDefinitionAccess().getGroup()); \n }\n // InternalAADMParser.g:2406:3: ( rule__ERequirementDefinition__Group__0 )\n // InternalAADMParser.g:2406:4: rule__ERequirementDefinition__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementDefinition__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementDefinitionAccess().getGroup()); \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__ERequirementAssignment__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:5029:1: ( ( ( rule__ERequirementAssignment__Group_3__0 ) ) )\n // InternalAADMParser.g:5030:1: ( ( rule__ERequirementAssignment__Group_3__0 ) )\n {\n // InternalAADMParser.g:5030:1: ( ( rule__ERequirementAssignment__Group_3__0 ) )\n // InternalAADMParser.g:5031:2: ( rule__ERequirementAssignment__Group_3__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementAssignmentAccess().getGroup_3()); \n }\n // InternalAADMParser.g:5032:2: ( rule__ERequirementAssignment__Group_3__0 )\n // InternalAADMParser.g:5032:3: rule__ERequirementAssignment__Group_3__0\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementAssignment__Group_3__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementAssignmentAccess().getGroup_3()); \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__ERequirementDefinitionBody__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:18449:1: ( ( ( rule__ERequirementDefinitionBody__NodeAssignment_1_1 ) ) )\n // InternalAADMParser.g:18450:1: ( ( rule__ERequirementDefinitionBody__NodeAssignment_1_1 ) )\n {\n // InternalAADMParser.g:18450:1: ( ( rule__ERequirementDefinitionBody__NodeAssignment_1_1 ) )\n // InternalAADMParser.g:18451:2: ( rule__ERequirementDefinitionBody__NodeAssignment_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getERequirementDefinitionBodyAccess().getNodeAssignment_1_1()); \n }\n // InternalAADMParser.g:18452:2: ( rule__ERequirementDefinitionBody__NodeAssignment_1_1 )\n // InternalAADMParser.g:18452:3: rule__ERequirementDefinitionBody__NodeAssignment_1_1\n {\n pushFollow(FOLLOW_2);\n rule__ERequirementDefinitionBody__NodeAssignment_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getERequirementDefinitionBodyAccess().getNodeAssignment_1_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 }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint64 valid_until_time = 2;
@java.lang.Override public boolean hasValidUntilTime() { return ((bitField0_ & 0x00000002) != 0); }
[ "long getValidUntilTime();", "boolean hasValidUntilTime();", "boolean hasValidUntilTimestampMsec();", "com.google.protobuf.Timestamp getRequestedExpiration();", "public boolean hasValidUntil() {\n return fieldSetFlags()[9];\n }", "com.google.protobuf.TimestampOrBuilder getRequestedExpirationOrBuilder();", "io.dstore.values.TimestampValue getFromCodeValidUntil();", "public void setValidUntil(java.lang.Long value) {\n this.valid_until = value;\n }", "io.dstore.values.TimestampValue getToCodeValidUntil();", "long getValidFrom();", "public static long generateUntilValidTimestamp(int timeout) {\n\t\treturn (System.currentTimeMillis() / 1000L) + timeout;\n\t}", "public java.lang.Long getValidUntil() {\n return valid_until;\n }", "boolean test4(Tester t) {\r\n return t.checkExpect(nineThirtyAM.isTimeValid(),\r\n true);\r\n }", "Builder addTimeRequired(String value);", "public void requireValidTimestamp() {\n long clockSkewInMillis = TimeUnit.MINUTES.toMillis(1);\n long currentTime = System.currentTimeMillis();\n Date exp = claims.getExpirationTime();\n if (isNull(exp)) {\n throw new IllegalStateException(\"Missing expiration time (exp) claim\");\n }\n if ((exp.getTime() + clockSkewInMillis) < currentTime) {\n throw new IllegalStateException(\"Token is expired \" + exp);\n }\n\n Date iat = claims.getIssueTime();\n if (isNull(iat)) {\n throw new IllegalStateException(\"Missing issue time (iat) claim\");\n }\n if ((iat.getTime() - clockSkewInMillis) > currentTime) {\n throw new IllegalStateException(\"Issue time must be after current time \" + iat);\n }\n\n Date nbf = claims.getNotBeforeTime();\n if (!isNull(nbf) && (nbf.getTime() - clockSkewInMillis) > currentTime) {\n throw new IllegalStateException(\"Token is not valid before \" + nbf);\n }\n }", "@Test\n\tpublic void isValidTimeLegalCase() {\n\t\tassertTrue(FlyingObject.isValidTime(200000));\n\t}", "boolean hasTrialUntilTimestampMsec();", "public java.lang.Long getValidUntil() {\n return valid_until;\n }", "boolean hasInitiationTimestampMsec();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstExpressionBitxor__RightAssignment_1_2" $ANTLR start "rule__AstExpressionBitand__OperatorAssignment_1_1" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25220:1: rule__AstExpressionBitand__OperatorAssignment_1_1 : ( ( '&' ) ) ;
public final void rule__AstExpressionBitand__OperatorAssignment_1_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25224:1: ( ( ( '&' ) ) ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25225:1: ( ( '&' ) ) { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25225:1: ( ( '&' ) ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25226:1: ( '&' ) { before(grammarAccess.getAstExpressionBitandAccess().getOperatorAmpersandKeyword_1_1_0()); // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25227:1: ( '&' ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25228:1: '&' { before(grammarAccess.getAstExpressionBitandAccess().getOperatorAmpersandKeyword_1_1_0()); match(input,93,FOLLOW_93_in_rule__AstExpressionBitand__OperatorAssignment_1_150679); after(grammarAccess.getAstExpressionBitandAccess().getOperatorAmpersandKeyword_1_1_0()); } after(grammarAccess.getAstExpressionBitandAccess().getOperatorAmpersandKeyword_1_1_0()); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__AstExpressionBitxor__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25209:1: ( ( ruleAstExpressionBitand ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25210:1: ( ruleAstExpressionBitand )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25210:1: ( ruleAstExpressionBitand )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25211:1: ruleAstExpressionBitand\n {\n before(grammarAccess.getAstExpressionBitxorAccess().getRightAstExpressionBitandParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleAstExpressionBitand_in_rule__AstExpressionBitxor__RightAssignment_1_250643);\n ruleAstExpressionBitand();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionBitxorAccess().getRightAstExpressionBitandParserRuleCall_1_2_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__BitAndExpression__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:11081:1: ( ( ruleBitAndExpression ) )\n // InternalReflex.g:11082:2: ( ruleBitAndExpression )\n {\n // InternalReflex.g:11082:2: ( ruleBitAndExpression )\n // InternalReflex.g:11083:3: ruleBitAndExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getBitAndExpressionAccess().getRightBitAndExpressionParserRuleCall_1_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleBitAndExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getBitAndExpressionAccess().getRightBitAndExpressionParserRuleCall_1_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__AstExpressionBitand__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17622:1: ( ( ( rule__AstExpressionBitand__RightAssignment_1_2 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17623:1: ( ( rule__AstExpressionBitand__RightAssignment_1_2 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17623:1: ( ( rule__AstExpressionBitand__RightAssignment_1_2 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17624:1: ( rule__AstExpressionBitand__RightAssignment_1_2 )\n {\n before(grammarAccess.getAstExpressionBitandAccess().getRightAssignment_1_2()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17625:1: ( rule__AstExpressionBitand__RightAssignment_1_2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17625:2: rule__AstExpressionBitand__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__AstExpressionBitand__RightAssignment_1_2_in_rule__AstExpressionBitand__Group_1__2__Impl35462);\n rule__AstExpressionBitand__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExpressionBitandAccess().getRightAssignment_1_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 }", "private static Expression matchLogicalAndOrBinaryAnd()\n {\n Expression left = matchEqualityOrAssignment();\n\n while (ScriptParser.tokenizer.match('&'))\n {\n // Match &&\n if (ScriptParser.tokenizer.match('&'))\n {\n if (ExpressionType.isBoolean(left) && left.booleanValue == false)\n {\n // Evaluated to false; we need not evaluate anything up until the next\n // ||, ) or ;.\n while (ScriptParser.tokenizer.tokenNext(\"\\\")\\\"\"))\n {\n if (ScriptParser.tokenizer.tokenIs('('))\n while (ScriptParser.tokenizer.tokenNext(\"\\\")\\\"\"))\n if (ScriptParser.tokenizer.match(')'))\n break;\n if (ScriptParser.tokenizer.tokenIs(')') || ScriptParser.tokenizer.tokenIs('|') || ScriptParser.tokenizer.tokenIs(';'))\n break;\n }\n }\n else\n {\n left = createBoolean(left, \"&&\", matchEqualityOrAssignment());\n }\n }\n // Match &= (assignment)\n else if (ScriptParser.tokenizer.match('='))\n {\n if (!left.type.equals(ExpressionType.Register))\n throw new NslException(\"The left operand must be a variable\", true);\n\n left = new AssignmentExpression(left.integerValue, createMathematical(left, \"&\", matchComplex()));\n Scope.getCurrent().addVar(left.integerValue);\n }\n // Matched &\n else\n {\n left = createMathematical(left, \"&\", matchEqualityOrAssignment());\n }\n }\n\n return left;\n }", "public Object visitBitwiseAndExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a & (Long) b;\n }\n else {\n result = parens(a) + \" & \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void rule__AstExpressionBitand__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25247:1: ( ( ruleAstExpressionEq ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25248:1: ( ruleAstExpressionEq )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25248:1: ( ruleAstExpressionEq )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25249:1: ruleAstExpressionEq\n {\n before(grammarAccess.getAstExpressionBitandAccess().getRightAstExpressionEqParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleAstExpressionEq_in_rule__AstExpressionBitand__RightAssignment_1_250718);\n ruleAstExpressionEq();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionBitandAccess().getRightAstExpressionEqParserRuleCall_1_2_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 }", "private static Expression matchBinaryExclusiveOr()\n {\n Expression left = matchLogicalAndOrBinaryAnd();\n\n while (ScriptParser.tokenizer.match('^'))\n {\n // Match ^= (assignment)\n if (ScriptParser.tokenizer.match('='))\n {\n if (!left.type.equals(ExpressionType.Register))\n throw new NslException(\"The left operand must be a variable\", true);\n\n left = new AssignmentExpression(left.integerValue, createMathematical(left, \"^\", matchComplex()));\n Scope.getCurrent().addVar(left.integerValue);\n }\n // Matched ^\n else\n {\n left = createMathematical(left, \"^\", matchLogicalAndOrBinaryAnd());\n }\n }\n\n return left;\n }", "public final void rule__AstExpressionBitxor__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17439:1: ( ( ( rule__AstExpressionBitxor__OperatorAssignment_1_1 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17440:1: ( ( rule__AstExpressionBitxor__OperatorAssignment_1_1 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17440:1: ( ( rule__AstExpressionBitxor__OperatorAssignment_1_1 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17441:1: ( rule__AstExpressionBitxor__OperatorAssignment_1_1 )\n {\n before(grammarAccess.getAstExpressionBitxorAccess().getOperatorAssignment_1_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17442:1: ( rule__AstExpressionBitxor__OperatorAssignment_1_1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17442:2: rule__AstExpressionBitxor__OperatorAssignment_1_1\n {\n pushFollow(FOLLOW_rule__AstExpressionBitxor__OperatorAssignment_1_1_in_rule__AstExpressionBitxor__Group_1__1__Impl35100);\n rule__AstExpressionBitxor__OperatorAssignment_1_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExpressionBitxorAccess().getOperatorAssignment_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExpressionBitxor__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17467:1: ( ( ( rule__AstExpressionBitxor__RightAssignment_1_2 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17468:1: ( ( rule__AstExpressionBitxor__RightAssignment_1_2 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17468:1: ( ( rule__AstExpressionBitxor__RightAssignment_1_2 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17469:1: ( rule__AstExpressionBitxor__RightAssignment_1_2 )\n {\n before(grammarAccess.getAstExpressionBitxorAccess().getRightAssignment_1_2()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17470:1: ( rule__AstExpressionBitxor__RightAssignment_1_2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17470:2: rule__AstExpressionBitxor__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__AstExpressionBitxor__RightAssignment_1_2_in_rule__AstExpressionBitxor__Group_1__2__Impl35157);\n rule__AstExpressionBitxor__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExpressionBitxorAccess().getRightAssignment_1_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__AstExpressionBitor__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25171:1: ( ( ruleAstExpressionBitxor ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25172:1: ( ruleAstExpressionBitxor )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25172:1: ( ruleAstExpressionBitxor )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25173:1: ruleAstExpressionBitxor\n {\n before(grammarAccess.getAstExpressionBitorAccess().getRightAstExpressionBitxorParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleAstExpressionBitxor_in_rule__AstExpressionBitor__RightAssignment_1_250568);\n ruleAstExpressionBitxor();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionBitorAccess().getRightAstExpressionBitxorParserRuleCall_1_2_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 TigerParser.and_operator_return and_operator() throws RecognitionException {\n\t\tTigerParser.and_operator_return retval = new TigerParser.and_operator_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tToken set166=null;\n\n\t\tCommonTree set166_tree=null;\n\n\t\ttry {\n\t\t\t// cs4240_team1/Tiger.g:297:14: ( '&' | '|' )\n\t\t\t// cs4240_team1/Tiger.g:\n\t\t\t{\n\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\tset166=input.LT(1);\n\t\t\tif ( input.LA(1)==AND||input.LA(1)==OR ) {\n\t\t\t\tinput.consume();\n\t\t\t\tadaptor.addChild(root_0, (CommonTree)adaptor.create(set166));\n\t\t\t\tstate.errorRecovery=false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t\tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "private Node parseXor() {\n\t\tList<Node> children = new LinkedList<>();\n\t\t\n\t\twhile (true) {\n\t\t\tchildren.add(parseAnd());\n\t\t\t\n\t\t\tcheckPostExpression();\n\t\t\t\n\t\t\tif (tokenIsType(TokenType.OPERATOR) && \"xor\".equals(getTokenValue())) {\n\t\t\t\tgetNextToken();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (children.size() == 1) {\n\t\t\treturn children.get(0);\n\t\t}\n\t\t\n\t\treturn new BinaryOperatorNode(\n\t\t\t\t\"xor\",\n\t\t\t\tchildren,\n\t\t\t\tBoolean::logicalXor\n\t\t);\n\t}", "private Term parseBitwiseAnd(final boolean required) throws ParseException {\n Term t1 = parseAdd(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '&') {\n Term t2 = parseAdd(true);\n if ((t1.isI() && t2.isI()) || !isTypeChecking()) {\n t1 = new Term.AndI(t1, t2);\n } else {\n reportTypeErrorI2(\"'&'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public final void rule__BooleanBinaryOperator__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:1088:1: ( ( ( '&' ) ) | ( ( '|' ) ) )\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0==21) ) {\n alt9=1;\n }\n else if ( (LA9_0==22) ) {\n alt9=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n }\n switch (alt9) {\n case 1 :\n // InternalActivityDiagram.g:1089:1: ( ( '&' ) )\n {\n // InternalActivityDiagram.g:1089:1: ( ( '&' ) )\n // InternalActivityDiagram.g:1090:1: ( '&' )\n {\n before(grammarAccess.getBooleanBinaryOperatorAccess().getANDEnumLiteralDeclaration_0()); \n // InternalActivityDiagram.g:1091:1: ( '&' )\n // InternalActivityDiagram.g:1091:3: '&'\n {\n match(input,21,FollowSets000.FOLLOW_2); \n\n }\n\n after(grammarAccess.getBooleanBinaryOperatorAccess().getANDEnumLiteralDeclaration_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // InternalActivityDiagram.g:1096:6: ( ( '|' ) )\n {\n // InternalActivityDiagram.g:1096:6: ( ( '|' ) )\n // InternalActivityDiagram.g:1097:1: ( '|' )\n {\n before(grammarAccess.getBooleanBinaryOperatorAccess().getOREnumLiteralDeclaration_1()); \n // InternalActivityDiagram.g:1098:1: ( '|' )\n // InternalActivityDiagram.g:1098:3: '|'\n {\n match(input,22,FollowSets000.FOLLOW_2); \n\n }\n\n after(grammarAccess.getBooleanBinaryOperatorAccess().getOREnumLiteralDeclaration_1()); \n\n }\n\n\n }\n break;\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 EObject ruleBitwiseOrExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_2=null;\r\n EObject this_BitwiseAndExpression_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2812:28: ( (this_BitwiseAndExpression_0= ruleBitwiseAndExpression ( () otherlv_2= '|' ( (lv_rightOperand_3_0= ruleBitwiseAndExpression ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2813:1: (this_BitwiseAndExpression_0= ruleBitwiseAndExpression ( () otherlv_2= '|' ( (lv_rightOperand_3_0= ruleBitwiseAndExpression ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2813:1: (this_BitwiseAndExpression_0= ruleBitwiseAndExpression ( () otherlv_2= '|' ( (lv_rightOperand_3_0= ruleBitwiseAndExpression ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2814:5: this_BitwiseAndExpression_0= ruleBitwiseAndExpression ( () otherlv_2= '|' ( (lv_rightOperand_3_0= ruleBitwiseAndExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getBitwiseOrExpressionAccess().getBitwiseAndExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleBitwiseAndExpression_in_ruleBitwiseOrExpression6455);\r\n this_BitwiseAndExpression_0=ruleBitwiseAndExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_BitwiseAndExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2822:1: ( () otherlv_2= '|' ( (lv_rightOperand_3_0= ruleBitwiseAndExpression ) ) )*\r\n loop45:\r\n do {\r\n int alt45=2;\r\n int LA45_0 = input.LA(1);\r\n\r\n if ( (LA45_0==51) ) {\r\n alt45=1;\r\n }\r\n\r\n\r\n switch (alt45) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2822:2: () otherlv_2= '|' ( (lv_rightOperand_3_0= ruleBitwiseAndExpression ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2822:2: ()\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2823:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getBitwiseOrExpressionAccess().getBitwiseOrExpressionLeftOperandAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t otherlv_2=(Token)match(input,51,FOLLOW_51_in_ruleBitwiseOrExpression6476); if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \tnewLeafNode(otherlv_2, grammarAccess.getBitwiseOrExpressionAccess().getVerticalLineKeyword_1_1());\r\n \t \r\n \t }\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2832:1: ( (lv_rightOperand_3_0= ruleBitwiseAndExpression ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2833:1: (lv_rightOperand_3_0= ruleBitwiseAndExpression )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2833:1: (lv_rightOperand_3_0= ruleBitwiseAndExpression )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2834:3: lv_rightOperand_3_0= ruleBitwiseAndExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getBitwiseOrExpressionAccess().getRightOperandBitwiseAndExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleBitwiseAndExpression_in_ruleBitwiseOrExpression6497);\r\n \t lv_rightOperand_3_0=ruleBitwiseAndExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getBitwiseOrExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"rightOperand\",\r\n \t \t\tlv_rightOperand_3_0, \r\n \t \t\t\"BitwiseAndExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop45;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "private Node parseXor() {\n\t\tNode first = parseAnd();\n\t\t\n\t\tisTokenValid();\t\t\n\t\tList<Node> list = new ArrayList<Node>();\n\t\tlist.add(first);\t\t\n\t\t\n\t\twhile (isTokenOfType(TokenType.OPERATOR) && token.getTokenValue().equals(\"xor\")) {\n\t\t\ttoken = lexer.nextToken();\n\t\t\tNode second = parseAnd();\n\t\t\tlist.add(second);\t\t\t\n\t\t}\n\t\t\n\t\tif (list.size() > 1) {\n\t\t\tfirst = new BinaryOperatorNode(\"xor\", list, (x, y) -> x ^ y);\n\t\t}\n\t\t\n\t\treturn first;\n\t}", "public final void rule__BitXorExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:8862:1: ( ( ruleBitAndExpression ) )\n // InternalReflex.g:8863:1: ( ruleBitAndExpression )\n {\n // InternalReflex.g:8863:1: ( ruleBitAndExpression )\n // InternalReflex.g:8864:2: ruleBitAndExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getBitXorExpressionAccess().getBitAndExpressionParserRuleCall_0()); \n }\n pushFollow(FOLLOW_2);\n ruleBitAndExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getBitXorExpressionAccess().getBitAndExpressionParserRuleCall_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__LogicOperator__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1304:1: ( ( ( '&' ) ) | ( ( '|' ) ) )\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==16) ) {\n alt10=1;\n }\n else if ( (LA10_0==17) ) {\n alt10=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 10, 0, input);\n\n throw nvae;\n }\n switch (alt10) {\n case 1 :\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1305:1: ( ( '&' ) )\n {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1305:1: ( ( '&' ) )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1306:1: ( '&' )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getLogicOperatorAccess().getANDEnumLiteralDeclaration_0()); \n }\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1307:1: ( '&' )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1307:3: '&'\n {\n match(input,16,FOLLOW_16_in_rule__LogicOperator__Alternatives2761); if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getLogicOperatorAccess().getANDEnumLiteralDeclaration_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1312:6: ( ( '|' ) )\n {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1312:6: ( ( '|' ) )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1313:1: ( '|' )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getLogicOperatorAccess().getOREnumLiteralDeclaration_1()); \n }\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1314:1: ( '|' )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1314:3: '|'\n {\n match(input,17,FOLLOW_17_in_rule__LogicOperator__Alternatives2782); if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getLogicOperatorAccess().getOREnumLiteralDeclaration_1()); \n }\n\n }\n\n\n }\n break;\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" ] ] } }
Set shopper id address.
void setShopperIpAddress( String shopperIpAddress);
[ "public void setBillingAddressInCart(Address addr);", "public void setShippingAddressInCart(Address addr);", "public void setShopId(java.lang.String value) {\n this.shopId = value;\n }", "public void setIdPersonAddress(int value) {\n this.idPersonAddress = value;\n }", "public void setAddressId(int value) {\n this.addressId = value;\n }", "void xsetSellerId(org.apache.xmlbeans.XmlLong sellerId);", "public void setIdCodigoPostal(int idCodigoPostal){\r\n this.idCodigoPostal=idCodigoPostal;\r\n }", "public void setAddress(String address) {\n this.currentCustomer.setAddress(address);\n ;\n }", "@Override\n public void setAddress(CsParcel.AddressList address) {\n if(address==null)return;\n mView.showAddress(address);\n showShippingMethod(address.getCustomeraddressid() + \"\", mWarehouseid + \"\");\n// save2Db(null, false);\n }", "Restaurant setRestaurantAddress(Address address);", "public void setAddress(String address) {\r\n this.address = address; // set the address\r\n }", "@Override\n\tpublic void setId(long id) {\n\t\t_dmGTShipPosition.setId(id);\n\t}", "void setAddressForPayment(java.lang.String addressForPayment);", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddressId(Integer addressId){\n this.addressId = addressId;\n }", "public void setShopId(Integer shopId) {\n this.shopId = shopId;\n }", "@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}", "public void setAddress(ShippingAddress address) {\n this.address = address;\n }", "public void setOriginId(long id)\r\n {\r\n myOriginId = id;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate trade date based on setllement date and currency i.e. returns the next working date for a non working settlement date.
private LocalDate getTradeDay(String currency, LocalDate settlementDate) { return new TradableDays().getTradableDate(currency, settlementDate); }
[ "public LocalDate getNextWorkingDay(TradeEntity e) {\r\n\t\tLocalDate date = e.getSettlementDate();\r\n\t\twhile (!isWorkingDay(e.getCurrency(), date.getDayOfWeek())) {\r\n\t\t\tdate = date.plusDays(1);\r\n\t\t}\r\n\t\treturn date;\r\n\t}", "public static Date updateSettlementDateToNextWorkingDay(Date settlementDate) {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(settlementDate);\n\t\tif(cal.get(Calendar.DAY_OF_WEEK)==6) {\n\t\t\tcal.add(Calendar.DATE, 2);\n\t\t}else if (cal.get(Calendar.DAY_OF_WEEK)==7) {\n\t\t\tcal.add(Calendar.DATE, 1);\n\t\t}\n\t\tsettlementDate = cal.getTime();\n\t\treturn settlementDate;\n\t}", "TradeBO getSettlementDate(TradeBO trade);", "public static void calculateSettlementDate(DataRow dataRow) {\n // Select proper strategy based on the Currency\n final IWorkingDays workingDaysMechanism = getWorkingDaysStrategy(dataRow.getCurrency());\n\n // find the correct settlement date\n final LocalDate newSettlementDate =\n workingDaysMechanism.findFirstWorkingDate(dataRow.getSettlementDate());\n\n if (newSettlementDate != null) {\n // set the correct settlement date\n dataRow.setSettlementDate(newSettlementDate);\n }\n }", "@Override\n public LocalDate AdjustSettlementDateIfThatIsNotWorkingDay(LocalDate date, Currency currency)\n {\n\n AreaByCurrency currencyArea=AreaByCurrency.getFromName(currency.getCurrencyCode());\n\n List<DayOfWeek> nonWorkingDays= nonWorkingDaysInWorld.get(currencyArea);\n\n while (isNonWorkingDay(date.getDayOfWeek(), nonWorkingDays))\n {\n date= date.plus(1, ChronoUnit.DAYS);\n }\n\n return date;\n }", "private static LocalDate getNextAutoOrderDate(SingleProviderOrder singleProviderOrder){\n\t\tfor(int i = 0;i<7;i++){\n\t\t\tLocalDate date_i_DaysFromNow = StoreController.current_date.plus(i, ChronoUnit.DAYS); //calculate the date i days from now\n\t\t\tif(singleProviderOrder.isComingAtDay((i + StoreController.Day_In_Week - 1) %7)){ //is working i days from now.\n\t\t\t\treturn date_i_DaysFromNow;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void testGetNextWorkingDayIfWeekendWhenNormalWorkingDayThenSameDate() {\r\n\r\n\t\tLocalDate date = LocalDate.of(2018, 8, 24);\r\n\r\n\t\tLocalDate actualSettlementDate = dateService.getNextWorkingDayIfWeekend(date, \"SGP\");\r\n\r\n\t\tassertEquals(date, actualSettlementDate);\r\n\t}", "@Test\r\n\tpublic void testGetNextWorkingDayIfWeekendWhenExceptionalWorkingDayThenSameDate() {\r\n\r\n\t\tLocalDate date = LocalDate.of(2018, 8, 26);\r\n\r\n\t\tLocalDate actualSettlementDate = dateService.getNextWorkingDayIfWeekend(date, \"AED\");\r\n\r\n\t\tassertEquals(date, actualSettlementDate);\r\n\t}", "public LocalDate tradeDate() {\n\n\t\tif (tradeDate == null) {\n\n\t\t\tfinal DateOnlyValue dv = ProtoDateUtil.fromDecimalDateOnly(message.getBaseTradeDate());\n\n\t\t\ttradeDate = new LocalDate(dv.getYear(), dv.getMonth(), dv.getDay());\n\n\t\t}\n\n\t\treturn tradeDate;\n\n\t}", "long getSettlementDate();", "public default LocalDate calculateSpotDateFromTradeDate(LocalDate tradeDate, ReferenceData refData) {\n return getSpotDateOffset().adjust(tradeDate, refData);\n }", "@Test\r\n\tpublic void testGetNextWorkingDayIfWeekendWhenNormalSundayThenAdd1Day() {\r\n\r\n\t\tLocalDate date = LocalDate.of(2018, 8, 26);\r\n\r\n\t\tLocalDate actualSettlementDate = dateService.getNextWorkingDayIfWeekend(date, \"SGP\");\r\n\r\n\t\tLocalDate expectedDate = LocalDate.of(2018, 8, 27);\r\n\r\n\t\tassertEquals(expectedDate, actualSettlementDate);\r\n\t}", "protected abstract void calcNextDate();", "private Date calculateDueDate() {\n Date date = new Date();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(date);\n calendar.add(Calendar.DATE, 30);\n date = calendar.getTime();\n return date;\n }", "long getTradeDate();", "@Test\r\n\tpublic void testGetNextWorkingDayIfWeekendWhenExceptionalSaturdayThenAdd1Day() {\r\n\r\n\t\tLocalDate date = LocalDate.of(2018, 8, 25);\r\n\r\n\t\tLocalDate actualSettlementDate = dateService.getNextWorkingDayIfWeekend(date, \"AED\");\r\n\r\n\t\tLocalDate expectedDate = LocalDate.of(2018, 8, 26);\r\n\r\n\t\tassertEquals(expectedDate, actualSettlementDate);\r\n\t}", "private Date getTargetFundDate(Date commitmentExprDate){\n\t\tDate tempDate = null;\n\t\tif (!(commitmentExprDate == null)){\n\t\t\ttempDate = DateUtil.addDays(commitmentExprDate, 8); // 7 calendar days\n\t\t}\n\t\treturn tempDate;\n\t}", "private double referencePrice(ResolvedOvernightFutureOptionTrade trade, LocalDate valuationDate, double lastSettlementPrice) {\n ArgChecker.notNull(valuationDate, \"valuationDate\");\n return trade.getTradedPrice()\n .filter(tp -> tp.getTradeDate().equals(valuationDate))\n .map(TradedPrice::getPrice)\n .orElse(lastSettlementPrice);\n }", "public void setSettlementDate(String settlementDate) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tthis.settlementDate = this.sdf.parse(settlementDate);\r\n\r\n\t\t\tthis.c.setTime(this.settlementDate);\r\n\r\n\t\t\tint iDayOfWeek = this.c.get(Calendar.DAY_OF_WEEK);\r\n\r\n\t\t\t/*\r\n\t\t\t * We add 1 day to settlement date until the settlement date not\r\n\t\t\t * fall in weekend\r\n\t\t\t */\r\n\t\t\twhile (!((iDayOfWeek >= this.cur.getWeekStart()) && (iDayOfWeek <= this.cur.getWeekEnds()))) {\r\n\r\n\t\t\t\tthis.c.add(Calendar.DATE, 1);\r\n\r\n\t\t\t\tiDayOfWeek = this.c.get(Calendar.DAY_OF_WEEK);\r\n\t\t\t}\r\n\r\n\t\t\tthis.settlementDate = this.c.getTime();\r\n\r\n\t\t} catch (ParseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets roles and users permitted to write stream metadata.
public Builder metaWriteRoles(List<String> metaWriteRoles) { this.metaWriteRoles = metaWriteRoles; return this; }
[ "private boolean hasWritePermission() {\n return true;\n\n }", "private void changeWriteSettingsPermission(Context context) {\n Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);\n context.startActivity(intent);\n }", "public void setWriteOnly(boolean is) {\n _writeOnly = is;\n }", "public Builder writeRoles(List<String> writeRoles) {\n this.writeRoles = writeRoles;\n return this;\n }", "public void setWriteInterest() {\n setInterestOperations(SelectionKey.OP_WRITE);\n }", "private void setTenantAdminSCIMAttributes(int tenantId) {\n\n try {\n UserStoreManager userStoreManager = (UserStoreManager) SCIMCommonComponentHolder.getRealmService()\n .getTenantUserRealm(tenantId).getUserStoreManager();\n\n if (userStoreManager.isSCIMEnabled()) {\n Map<String, String> claimsMap = new HashMap<String, String>();\n String adminUsername = ClaimsMgtUtil.getAdminUserNameFromTenantId(IdentityTenantUtil.getRealmService(),\n tenantId);\n String id = UUID.randomUUID().toString();\n Date date = new Date();\n String createdDate = SCIMCommonUtils.formatDateTime(date);\n\n claimsMap.put(SCIMConstants.META_CREATED_URI, createdDate);\n claimsMap.put(SCIMConstants.USER_NAME_URI, adminUsername);\n claimsMap.put(SCIMConstants.META_LAST_MODIFIED_URI, createdDate);\n claimsMap.put(SCIMConstants.ID_URI, id);\n\n userStoreManager.setUserClaimValues(adminUsername, claimsMap,\n UserCoreConstants.DEFAULT_PROFILE);\n\n SCIMCommonUtils.addAdminGroup(userStoreManager);\n }\n } catch (Exception e) {\n String msg = \"Error while adding SCIM metadata to the tenant admin in tenant ID : \" + tenantId;\n log.error(msg, e);\n }\n }", "boolean isWriteAccess();", "void setAccessPermissionWrite(String zone, String absolutePath,\n\t\t\tString userName, boolean recursive) throws JargonException;", "public void setWriteOnly(boolean isWriteOnly) {\r\n this.isWriteOnly = isWriteOnly;\r\n }", "void setRole(String roles);", "void setPrivileges(Privileges privileges);", "public static void changeWriteSettingsPermission(Context context)\n {\n Intent intent = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M)\n {\n intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n }\n context.startActivity(intent);\n }", "public void writeMoleStats() {\n userManager.setOrUpdateStatistics(getApplicationContext(), user, GameConstants.update);\n }", "public void checkWriteExtFileAccPerm() throws AccessDeniedException;", "public void setDataAccessRole(String dataAccessRole) {\n this.dataAccessRole = dataAccessRole;\n }", "public void setLogFilePermission(String fileName) throws IOException {\n Path absFile = logRootDir.resolve(fileName).toAbsolutePath().normalize();\n if (!absFile.startsWith(logRootDir)) {\n return;\n }\n boolean runAsUser = ObjectReader.getBoolean(stormConf.get(SUPERVISOR_RUN_WORKER_AS_USER), false);\n Path parent = logRootDir.resolve(fileName).getParent();\n Optional<Path> mdFile = (parent == null) ? Optional.empty() : getMetadataFileForWorkerLogDir(parent);\n Optional<String> topoOwner = mdFile.isPresent()\n ? Optional.of(getTopologyOwnerFromMetadataFile(mdFile.get().toAbsolutePath().normalize()))\n : Optional.empty();\n\n if (runAsUser && topoOwner.isPresent() && absFile.toFile().exists() && !Files.isReadable(absFile)) {\n LOG.debug(\"Setting permissions on file {} with topo-owner {}\", fileName, topoOwner);\n try {\n ClientSupervisorUtils.processLauncherAndWait(stormConf, topoOwner.get(),\n Lists.newArrayList(\"blob\", absFile.toAbsolutePath().normalize().toString()), null,\n \"setup group read permissions for file: \" + fileName);\n } catch (IOException e) {\n numSetPermissionsExceptions.mark();\n throw e;\n }\n }\n }", "public boolean setPermissions (Object CIS, Object permissions);", "public void setUserRoles(String[] roles) {}", "private void requestWriteStoragePermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n //show explanation to user\n Toast.makeText(this, \"Write storage permission is needed to save photos/videos\", Toast.LENGTH_LONG).show();\n //request the permission\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n WRITE_EXTERNAL_STORAGE_CODE);\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n WRITE_EXTERNAL_STORAGE_CODE);\n\n // WRITE_EXTERNAL_STORAGE_CODE is an\n // app-defined int constant. The onRequestPermissionsResult method gets the code\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new risk reinforcement phase model.
private RiskReinforcementPhaseModel() { }
[ "public static RiskReinforcementPhaseModel getInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new RiskReinforcementPhaseModel();\r\n\t\treturn instance;\r\n\t}", "public TradingModel() {\r\n }", "QualityRisk createQualityRisk();", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public RDR_RDR() { \r\n this(new DefaultModelClassFactory());\r\n }", "QualityAssuranceStep createQualityAssuranceStep();", "EvidenceModel createEvidenceModel();", "public Risk(){\n description=\"\";\n probability=0;\n consequence=0;\n\n }", "public RecurrenceTransaction() {\n\n this.paymentRequest = new PaymentRequest();\n }", "public Requisition() {\n\n }", "protected BankRemittance() {\n\t\t// Default empty constructor.\n\t}", "ArmOp createArmOp();", "public entity.Reinsurable createReinsurableRisk() {\n return ((gw.api.reinsurance.ReinsurableCoverable)__getDelegateManager().getImplementation(\"gw.api.reinsurance.ReinsurableCoverable\")).createReinsurableRisk();\n }", "public ObjectiveModel() {\n\t\tsuper(0,0,1,1);\n\t}", "public DamageModel() \n {\n init();\n }", "public RoleManagementPolicyApprovalRule() {\n }", "public Prediction() {\n }", "public Arm() {\n initializeLogger();\n initializeCurrentLimiting();\n setBrakeMode();\n encoder.setDistancePerPulse(1.0/256.0);\n lastTimeStep = Timer.getFPGATimestamp();\n }", "ClaimSoftgoal createClaimSoftgoal();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last facility user mapping in the ordered set where customerId = &63; and customerContactId = &63;.
public FacilityUserMapping fetchByFacilityByCustomerContact_Last( long customerId, long customerContactId, OrderByComparator orderByComparator) throws SystemException { int count = countByFacilityByCustomerContact(customerId, customerContactId); List<FacilityUserMapping> list = findByFacilityByCustomerContact(customerId, customerContactId, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
[ "public FacilityUserMapping fetchByFumByFacilityCustomerContact_Last(\n\t\tlong customerId, long customerContactId, long faciltyId,\n\t\tOrderByComparator orderByComparator) throws SystemException {\n\t\tint count = countByFumByFacilityCustomerContact(customerId,\n\t\t\t\tcustomerContactId, faciltyId);\n\n\t\tList<FacilityUserMapping> list = findByFumByFacilityCustomerContact(customerId,\n\t\t\t\tcustomerContactId, faciltyId, count - 1, count,\n\t\t\t\torderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public FacilityUserMapping fetchByFacilityUserMappingByCustomerId_Last(\n\t\tlong customerId, OrderByComparator orderByComparator)\n\t\tthrows SystemException {\n\t\tint count = countByFacilityUserMappingByCustomerId(customerId);\n\n\t\tList<FacilityUserMapping> list = findByFacilityUserMappingByCustomerId(customerId,\n\t\t\t\tcount - 1, count, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public FacilityUserMapping findByFumByFacilityCustomerContact_Last(\n\t\tlong customerId, long customerContactId, long faciltyId,\n\t\tOrderByComparator orderByComparator)\n\t\tthrows NoSuchFacilityUserMappingException, SystemException {\n\t\tFacilityUserMapping facilityUserMapping = fetchByFumByFacilityCustomerContact_Last(customerId,\n\t\t\t\tcustomerContactId, faciltyId, orderByComparator);\n\n\t\tif (facilityUserMapping != null) {\n\t\t\treturn facilityUserMapping;\n\t\t}\n\n\t\tStringBundler msg = new StringBundler(8);\n\n\t\tmsg.append(_NO_SUCH_ENTITY_WITH_KEY);\n\n\t\tmsg.append(\"customerId=\");\n\t\tmsg.append(customerId);\n\n\t\tmsg.append(\", customerContactId=\");\n\t\tmsg.append(customerContactId);\n\n\t\tmsg.append(\", faciltyId=\");\n\t\tmsg.append(faciltyId);\n\n\t\tmsg.append(StringPool.CLOSE_CURLY_BRACE);\n\n\t\tthrow new NoSuchFacilityUserMappingException(msg.toString());\n\t}", "public FacilityUserMapping fetchByFacilityByFacilityAndNonPacnetUserId_Last(\n\t\tlong customerId, long nonPacnetUserId, long faciltyId,\n\t\tOrderByComparator orderByComparator) throws SystemException {\n\t\tint count = countByFacilityByFacilityAndNonPacnetUserId(customerId,\n\t\t\t\tnonPacnetUserId, faciltyId);\n\n\t\tList<FacilityUserMapping> list = findByFacilityByFacilityAndNonPacnetUserId(customerId,\n\t\t\t\tnonPacnetUserId, faciltyId, count - 1, count, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public FacilityUserMapping fetchByFacilityByNonPacnetUserId_Last(\n\t\tlong customerId, long nonPacnetUserId,\n\t\tOrderByComparator orderByComparator) throws SystemException {\n\t\tint count = countByFacilityByNonPacnetUserId(customerId, nonPacnetUserId);\n\n\t\tList<FacilityUserMapping> list = findByFacilityByNonPacnetUserId(customerId,\n\t\t\t\tnonPacnetUserId, count - 1, count, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public Order getLastByCustomer(Customer customer);", "public int lastCustomer() {\n return route.get(route.size() - 1);\n }", "public FacilityUserMapping fetchByFacilityUserMappingByFacility_Last(\n\t\tlong faciltyId, OrderByComparator orderByComparator)\n\t\tthrows SystemException {\n\t\tint count = countByFacilityUserMappingByFacility(faciltyId);\n\n\t\tList<FacilityUserMapping> list = findByFacilityUserMappingByFacility(faciltyId,\n\t\t\t\tcount - 1, count, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public FacilityUserMapping findByFacilityByFacilityAndNonPacnetUserId_Last(\n\t\tlong customerId, long nonPacnetUserId, long faciltyId,\n\t\tOrderByComparator orderByComparator)\n\t\tthrows NoSuchFacilityUserMappingException, SystemException {\n\t\tFacilityUserMapping facilityUserMapping = fetchByFacilityByFacilityAndNonPacnetUserId_Last(customerId,\n\t\t\t\tnonPacnetUserId, faciltyId, orderByComparator);\n\n\t\tif (facilityUserMapping != null) {\n\t\t\treturn facilityUserMapping;\n\t\t}\n\n\t\tStringBundler msg = new StringBundler(8);\n\n\t\tmsg.append(_NO_SUCH_ENTITY_WITH_KEY);\n\n\t\tmsg.append(\"customerId=\");\n\t\tmsg.append(customerId);\n\n\t\tmsg.append(\", nonPacnetUserId=\");\n\t\tmsg.append(nonPacnetUserId);\n\n\t\tmsg.append(\", faciltyId=\");\n\t\tmsg.append(faciltyId);\n\n\t\tmsg.append(StringPool.CLOSE_CURLY_BRACE);\n\n\t\tthrow new NoSuchFacilityUserMappingException(msg.toString());\n\t}", "public FacilityUserMapping[] findByFumByFacilityCustomerContact_PrevAndNext(\n\t\tlong id, long customerId, long customerContactId, long faciltyId,\n\t\tOrderByComparator orderByComparator)\n\t\tthrows NoSuchFacilityUserMappingException, SystemException {\n\t\tFacilityUserMapping facilityUserMapping = findByPrimaryKey(id);\n\n\t\tSession session = null;\n\n\t\ttry {\n\t\t\tsession = openSession();\n\n\t\t\tFacilityUserMapping[] array = new FacilityUserMappingImpl[3];\n\n\t\t\tarray[0] = getByFumByFacilityCustomerContact_PrevAndNext(session,\n\t\t\t\t\tfacilityUserMapping, customerId, customerContactId,\n\t\t\t\t\tfaciltyId, orderByComparator, true);\n\n\t\t\tarray[1] = facilityUserMapping;\n\n\t\t\tarray[2] = getByFumByFacilityCustomerContact_PrevAndNext(session,\n\t\t\t\t\tfacilityUserMapping, customerId, customerContactId,\n\t\t\t\t\tfaciltyId, orderByComparator, false);\n\n\t\t\treturn array;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow processException(e);\n\t\t}\n\t\tfinally {\n\t\t\tcloseSession(session);\n\t\t}\n\t}", "public FacilityUserMapping[] findByFacilityByCustomerContact_PrevAndNext(\n\t\tlong id, long customerId, long customerContactId,\n\t\tOrderByComparator orderByComparator)\n\t\tthrows NoSuchFacilityUserMappingException, SystemException {\n\t\tFacilityUserMapping facilityUserMapping = findByPrimaryKey(id);\n\n\t\tSession session = null;\n\n\t\ttry {\n\t\t\tsession = openSession();\n\n\t\t\tFacilityUserMapping[] array = new FacilityUserMappingImpl[3];\n\n\t\t\tarray[0] = getByFacilityByCustomerContact_PrevAndNext(session,\n\t\t\t\t\tfacilityUserMapping, customerId, customerContactId,\n\t\t\t\t\torderByComparator, true);\n\n\t\t\tarray[1] = facilityUserMapping;\n\n\t\t\tarray[2] = getByFacilityByCustomerContact_PrevAndNext(session,\n\t\t\t\t\tfacilityUserMapping, customerId, customerContactId,\n\t\t\t\t\torderByComparator, false);\n\n\t\t\treturn array;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow processException(e);\n\t\t}\n\t\tfinally {\n\t\t\tcloseSession(session);\n\t\t}\n\t}", "public List<FacilityUserMapping> findByFumByFacilityCustomerContact(\n\t\tlong customerId, long customerContactId, long faciltyId)\n\t\tthrows SystemException {\n\t\treturn findByFumByFacilityCustomerContact(customerId,\n\t\t\tcustomerContactId, faciltyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,\n\t\t\tnull);\n\t}", "public List<FacilityUserMapping> findByFacilityByCustomerContact(\n\t\tlong customerId, long customerContactId) throws SystemException {\n\t\treturn findByFacilityByCustomerContact(customerId, customerContactId,\n\t\t\tQueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public int countByFacilityUserMappingByCustomerId(long customerId)\n\t\tthrows SystemException {\n\t\tObject[] finderArgs = new Object[] { customerId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_FACILITYUSERMAPPINGBYCUSTOMERID,\n\t\t\t\tfinderArgs, this);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_FACILITYUSERMAPPING_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_FACILITYUSERMAPPINGBYCUSTOMERID_CUSTOMERID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(customerId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tif (count == null) {\n\t\t\t\t\tcount = Long.valueOf(0);\n\t\t\t\t}\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_FACILITYUSERMAPPINGBYCUSTOMERID,\n\t\t\t\t\tfinderArgs, count);\n\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public CouncilSession fetchByUuid_C_Last(\n\t\tString uuid, long companyId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<CouncilSession>\n\t\t\torderByComparator);", "public FacilityUserMapping fetchByFumByFacilityCustomerContact_First(\n\t\tlong customerId, long customerContactId, long faciltyId,\n\t\tOrderByComparator orderByComparator) throws SystemException {\n\t\tList<FacilityUserMapping> list = findByFumByFacilityCustomerContact(customerId,\n\t\t\t\tcustomerContactId, faciltyId, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer fetchByUuid_C_Last(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;", "public com.refcodes.portlets.businesscenter.model.BusinessUser fetchByUuid_C_Last(\n java.lang.String uuid, long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;", "public jkt.hms.masters.business.Users getLastChgBy () {\n\t\treturn lastChgBy;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
whether the MDate is before the given MDate
public boolean before(MDate md){ return time<md.time;}
[ "public boolean isBefore(Date that) {\n return compareTo(that) < 0;\n }", "public boolean before(Date other){\r\n\t\t//checking the year, if the year is before then no need to check month or day\r\n\t\tif(this.getYear() < other.getYear()){\r\n\t\t\treturn true;\r\n\t\t//if the year is the same, checking only month\r\n\t\t} else if((this.getYear() == other.getYear()) && (this.getMonth() < other.getMonth())){\r\n\t\t\treturn true;\r\n\t\t//if the year and month are the same, only then checking day\r\n\t\t} else if((this.getYear() == other.getYear()) &&\r\n\t\t\t\t\t(this.getMonth() == other.getMonth()) &&\r\n\t\t\t\t\t(this.getDay() == other.getDay())){\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t//If we are here meaning the date is not before\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isBefore(Date b) {\r\n\t\treturn compareTo(b) < 0;\r\n\t}", "public boolean isBefore(Date date)\n {\n return isBefore(new SpentOn(date));\n }", "private boolean before(Date date1, Date date2) {\n if (date1.getYear() < date2.getYear()) {\n return true;\n }\n else if (date1.getYear() > date2.getYear()) {\n return false;\n }\n else {\n if (date1.getMonth() < date2.getMonth()) {\n return true;\n }\n else if (date1.getMonth() > date2.getMonth()) {\n return false;\n }\n else {\n if (date1.getDay() < date2.getDay()) {\n return true;\n }\n else if (date1.getDay() > date2.getDay()) {\n return false;\n }\n else {\n return true;\n }\n }\n }\n }", "boolean isBefore( DateTime other );", "public boolean before(SimpleDate other) {\n return (this.year < other.year || (this.month < other.month && this.year == other.year) ||\n (this.day < other.day && this.month == other.month && this.year == other.year));\n }", "public boolean isBefore(final String date1, final String date2) {\n return compare(date1, date2) < 0;\n }", "public boolean isBefore(MonthDay other) {\n if(month < other.month) {\n return true;\n } else if(month == other.month && day < other.day) {\n return true;\n } else {\n return false;\n }\n }", "public static boolean before(Date target, Date date){\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(target);\n\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date);\n\n if(cal1.compareTo(cal2) == -1) return true;\n return false;\n }", "public boolean before(SimpleDate compared) {\n //comparing years\n if (this.year < compared.year) {\n return true;\n }\n\n if (this.year > compared.year) {\n return false;\n }\n\n //comparing months if years are the same\n if (this.month < compared.month) {\n return true;\n }\n\n if (this.month > compared.month) {\n return false;\n }\n\n //comparing days if year and month are the same\n return this.day < compared.day;\n }", "public boolean isBefore(Group3Date b) {\n\t\t\treturn compareTo(b) < 0;\n\t\t}", "public boolean lessThan(MyDate other){\t\n \t\tif (other.year > year){\n \t\t\treturn true;\n \t\t}\n \t\telse if (other.year == year){\n \t\t\tif (other.month > month){\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\telse if (other.month == month){\n \t\t\t\tif (other.day > day){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n\t}", "public static boolean dateBeforeNow(Date date) {\n if (date == null) {\n return false;\n }\n\n //convert date to LocalDate\n LocalDate testingLocalDate = convertToLocalDate(date);\n\n //now\n LocalDate currentLocalDate = LocalDate.now();\n\n //perform check\n return testingLocalDate.isBefore(currentLocalDate);\n }", "public Date getBeforeDate() {\n\t\treturn beforeDate;\n\t}", "public boolean isBefore(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) < spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) < spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) < spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }", "public boolean isBefore(@NonNull final CalendarDay other) {\n return date.isBefore(other.getDate());\n }", "public boolean isLower(DateTime dt) {\n return Long.parseLong(this.vStamp) < Long.parseLong(dt.getStamp());\r\n }", "public boolean after(MDate md) { return time>md.time;}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the painted line's width
public void setLineWidth(int width) { mPaintLine.setStrokeWidth(width); }
[ "void setLineWidth(float width) { }", "int LineSetWidth(int id, int width);", "public void setLineWidth ( int width ) {\r\n\t\tline_width = width;\r\n\t}", "void setLineThickness(int thickness);", "public void setLineWidth(float newWidth) {\r\n Validate.nonNegative(newWidth, \"new width\");\r\n this.effectiveLineWidth = newWidth;\r\n }", "public void incLineWidth() {\n\t\tlineWidth++;\n\t}", "private void setLineChartLineWidth() {\n Set<Node> lineNodes = lineChart.lookupAll(\".chart-series-line\");\n for (Node node : lineNodes) {\n double width = 3 / Math.log10(CsvData.TickerData.size());\n String style = \"-fx-stroke-width: \" + width + \"px;\";\n node.setStyle(style);\n }\n }", "public abstract void setLineThickness(double thickness);", "public int getLineWidth() {\r\n return LineWidth;\r\n }", "private void setLineWidthTextField(int lineWidth) {\n drawPanel.setLineWidth(lineWidth);\n }", "public int getLineWidth ( ) {\r\n\t\treturn line_width;\r\n\t}", "public void setPaintStrokeWidth(int width) {\n paint.setStrokeWidth(width);\n }", "public void setStrokeWidth(float width) {\n \t\n }", "private void updateLineWidth() {\r\n Node subtreeNode = (Node) getSubtree();\r\n Geometry lines = (Geometry) subtreeNode.getChild(linesChildPosition);\r\n assert effectiveLineWidth >= 1f : effectiveLineWidth;\r\n assert lineMaterial == lines.getMaterial();\r\n RenderState rs = lineMaterial.getAdditionalRenderState();\r\n rs.setLineWidth(effectiveLineWidth);\r\n }", "public native void setOutlineWidth(double width);", "double setPenWidth(double pixels);", "public void setBorderWidth(int newWidth) { borderSize = newWidth; redrawSelf(); }", "@Override\n public void setLineWidth(int w) {\n cover.setLineWidth(w);\n }", "public final Pen changeWidth(float width) {\n Color resultColor = this.color;\n LineStyle style = LineStyleUtils.getLineStyle(stroke);\n BasicStroke resultStroke = LineStyleUtils.getStroke(style, width);\n return new Pen(resultStroke, resultColor);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the final status of stones.
public void resetFinalStatus() { finalStatus = new GoBoard(_size); }
[ "public void reset() {\r\n state = 0;\r\n }", "public void resetSiegeStatus() {\n if (this.getSiegeStatus().equals(FarmInformation.SIEGE_STATUS.AT_HOME)) {\n // only reset, if reset is needed\n } else {\n siegeTroop = null;\n siegeTroopArrival = -1;\n lastResult = FARM_RESULT.UNKNOWN;\n if (!inactive && !isFinal) {\n setSiegeStatus(SIEGE_STATUS.AT_HOME);\n if (getBuilding(\"main\") == 1 && getBuilding(\"smith\") == 0 && getBuilding(\"barracks\") == 0 &&\n getBuilding(\"stable\") == 0 && getBuilding(\"garage\") == 0 &&\n getBuilding(\"market\") == 0 && getBuilding(\"wall\") == 0 &&\n this.getVillage().getPoints() >= ServerSettings.getSingleton().getBarbarianPoints()) {\n setSiegeStatus(SIEGE_STATUS.FINAL_FARM);\n }\n }\n }\n }", "public void reset()\n {\n sstack = new State[ 128];\n pstack = new int[ 128];\n sindex = 0;\n \n sstack[ 0] = start;\n pstack[ 0] = 0;\n }", "private void setNextStone() {\n stones.remove(0);\n currentStone = stones.get(0);\n }", "void resetState() {\n foul = false;\n throwNumber = 1;\n resetPins();\n Util.busyWait(1000);\n pinsDownedOnThisThrow = -1;\n }", "public void resetState() {\n green = 0;\n frameCounter = 0;\n }", "public void reset() {\n \t\tpacketState = PacketState.START;\n \t}", "public void resetState();", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void reset() \r\n\t{\r\n\t\tthis.displacementX = 0.0;\r\n\t\tthis.displacementY = 0.0;\r\n\t}", "public void reset() {\n this.lastRun = 0;\n }", "@Override\n public void reset()\n {\n state = \"initial state\";\n nbChanges = 0;\n nbResets++;\n }", "public void reset() {\n planeBits = 0;\n }", "public synchronized void reset() {\n state = State.WAITING_TO_START;\n }", "public void reset() {\r\n\t\tundoStorage.clear();\r\n\t\tredoStorage.clear();\r\n\r\n\t\t/*\r\n\t\t * Set the recentGrid to the startGrid (initial state).\r\n\t\t */\r\n\t\tthis.recentGrid = SudokuBuilder.deepCopy(this.startGrid);\r\n\r\n\t}", "public void reset() {\n\t\ttaskState = TaskState.NONE;\n\t\texitValue = 0;\n\t\trunningStartTime = null;\n\t\trunningEndTime = null;\n\t\tpostMortemInfo = null;\n\t\terrorMsg = null;\n\t}", "protected void resetState()\n {\n // Nothing to do by default.\n }", "public void reset() {\n reset(initialCount);\n }", "public void resetFarmStatus() {\n if (this.getStatus().equals(FarmInformation.FARM_STATUS.READY)) {\n // only reset, if reset is needed\n } else {\n farmTroop = null;\n farmTroopArrive = -1;\n lastResult = FARM_RESULT.UNKNOWN;\n lastSendInformation = null;\n if (!inactive) {\n if (spyed) {\n setStatus(FARM_STATUS.READY);\n } else {\n setStatus(FARM_STATUS.NOT_INITIATED);\n setInitialResources();\n // now it is time to check updates in building levels\n }\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.err.println(String.format("} BSVTypeVisitor.popScope() %s", scope.name));
public void popScope() { scope = scopeStack.pop(); assert scopeStack.size() > 0; // nobody should pop the global scope }
[ "public void popScope() {\n\t\tscopeStack.pop();\n\t}", "public void popScope() {\n if (DEBUG) System.out.println(\"popScope(\" + nesting + \")\");\n top.clear(FLAG_SCOPE);\n }", "@Override\n\tpublic void exitParStat(EmojiLangParser.ParStatContext ctx) {\n\t\tscope = scopestack.pop();\n\t}", "public void popScope()\n {\n try {\n scopes.removeLast();\n } catch (NoSuchElementException e) {\n return;\n }\n }", "public final void endScope() {\n final HashMap variableMap = (HashMap) getCurrentVariableMapStack().pop();\r\n final HashMap typeMap = (HashMap) typeMapStack.pop();\r\n final Scope attachable = (Scope) scopeAttachmentStack.pop();\r\n attachable.initScope(variableMap, typeMap);\r\n }", "public void leaveTypeScope() {\n depth--;\n typeTable = typeStack.removeFirst();\n debug(\"Leave type scope.\");\n }", "public void leaveScope() {\n scopeStack.pop();\n }", "void exitScope();", "protected void popScope() {\n currentScope = currentScope.getParent();\n }", "public void exitScope() {\n\t\tif (map.size() > 0) {\n\t\t\tmap.remove(map.size() - 1);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"There is no other level.\");\n\t\t}\n\t}", "@Override public void close() {\n // Promote forward refs to the next outer scope\n StructNode stk = _scope.stk();\n assert stk.is_closed();\n stk.promote_forward( _par._scope.stk());\n for( String tname : _scope.typeNames() ) {\n TypeNil t = _scope.get_type(tname);\n //if( t.is_forward_type() )\n // pscope.add_type(tname,t);\n throw unimpl();\n }\n\n Node xscope = KEEP_ALIVE.pop();// Unhook scope\n assert _scope==xscope;\n GVN.add_flow_defs(_scope); // Recompute liveness of scope inputs\n GVN.iter();\n }", "public void exitScope( )\n \t{\n \t\tScriptable protoScope = scope.getParentScope( );\n \t\tif ( protoScope != null )\n \t\t\tscope = protoScope;\n \t\tsharedScope.setParentScope( scope );\n \t}", "public void endScope(){\n if(front == null) return;\n\n ListNode<String,Object> temp = front;\n ListNode<String,Object> prev = front;\n\n while(temp != null && temp.scope != scope){\n prev = temp;\n temp = temp.next;\n }\n\n prev.next = null;\n if(prev.scope == scope)\n prev = null;\n front = prev;\n scope--;\n }", "public void CloseScope(){\n currentScope = currentScope.GetParent();\n }", "public void endScope() {\n while (top != null) {\n Binder<T> e = table.get(top);\n if (e.tail != null)\n table.put(top, e.tail);\n else\n table.remove(top);\n top = e.prevtop;\n }\n top = marks.prevtop;\n marks = marks.tail;\n }", "static void removeScopeTest() {\r\n\t\t// Empty the symbol table \r\n\t\tsymtab = new SymTable();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tsymtab.addDecl(intKey, intVal);\r\n\t\t\tsymtab.addScope();\r\n\t\t\tsymtab.addDecl(charKey, charVal);\r\n\t\t\t\r\n\t\t\tsymtab.removeScope();\r\n\t\t\t// Ensure entries in removed scopes cannot be retrieved\r\n\t\t\tif (symtab.lookupGlobal(charKey) != null) {\r\n\t\t\t\tSystem.out.println(\"removeScopeTest() ERROR -\"\r\n\t\t\t\t\t\t+ \" lookupGlobal locating entry from removed scope.\");\r\n\t\t\t}\r\n\t\t\t// Ensure integrity of scope locality remains;\r\n\t\t\t// the scope above the just-removed scope must function as local.\r\n\t\t\ttempSym = symtab.lookupLocal(intKey);\r\n\t\t\tif ( (tempSym == null) || \r\n\t\t\t\t !(tempSym.getType().equals(intVal.getType()))) {\r\n\t\t\t\tSystem.out.println(\"removeScopeTest() ERROR -\"\r\n\t\t\t\t\t\t+ \"unable to locate entry in new local scope.\");\r\n\t\t\t}\r\n\t\t\tsymtab.removeScope();\r\n\t\t\t// Ensure that all scopes have been removed by attempting to\r\n\t\t\t// remove a scope from an empty table. Expect an ESE to be thrown.\r\n\t\t\ttry {\r\n\t\t\t\tsymtab.removeScope();\r\n\t\t\t} catch (EmptySymTableException e) {\r\n\t\t\t\tthrown = true;\r\n\t\t\t} finally {\r\n\t\t\t\tif (!thrown) {\r\n\t\t\t\t\tSystem.out.println(\"removeScopeTest() ERROR -\"\r\n\t\t\t\t\t\t\t+ \"not all scopes removed.\");\r\n\t\t\t\t}\r\n\t\t\t\tthrown = false;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"removeScopeTest() ERROR - exception thrown.\");\r\n\t\t}\r\n\t\t// Empty the symbol table \r\n\t\tsymtab = new SymTable();\r\n\t}", "public void closeScope() {\n if (!scopes.isEmpty()) {\n scopes.remove(currentScopeLevel--);\n }\n }", "public void resetScope() {\n\t // TODO Auto-generated method stub\n\t _scope = _oldScope;\n }", "CheckerEnv exitScope() {\n Scopes parentDecls = declarations.pop();\n return new CheckerEnv(this.container, this.provider, parentDecls, this.aggLitElemType);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Access method for ridAudUid.
public Integer getRidAudUid() { return ridAudUid; }
[ "public void setRidAudUid(Integer aRidAudUid) {\n ridAudUid = aRidAudUid;\n }", "public Integer getBtrAudUid() {\n return btrAudUid;\n }", "public Integer getAtrfAudUid() {\n return atrfAudUid;\n }", "public void setBtrAudUid(Integer aBtrAudUid) {\n btrAudUid = aBtrAudUid;\n }", "int getVUid();", "java.lang.String getUid();", "public void setAtrfAudUid(Integer aAtrfAudUid) {\n atrfAudUid = aAtrfAudUid;\n }", "int getUid();", "long getUid();", "java.lang.String getKeyUid();", "java.lang.String getUdid();", "public int getVUid() {\n return vUid_;\n }", "@Override\n public Object getUID() {\n return uniqueId;\n }", "public void getUID(int seqid, String prefix, String uid);", "public java.lang.String getUid() {\n return uid;\n }", "public Long getRussId()\n {\n return this.russId;\n }", "java.lang.String getToUid();", "long getToUid();", "@Override\n public long getUserId() {\n return _auditReport.getUserId();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets the position the objectView based on a position
public void setObjectPosition(int iPosition){ objectView.setLocation(getPositionX(iPosition), iObjectPosY); }
[ "PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }", "void setPosition(EnvironmentalObject object, int x, int y);", "protected ViewObjectPosition(Position position){\r\n super(position);\r\n \r\n this.position = position;\r\n fillData();\r\n }", "public void setPosition(Position pos);", "void setPosition(Position position);", "public void setPosition(Point position);", "void setPosition(double xPos, double yPos);", "@Override\r\n public void set(View object, Rect value) {\n object.setTranslationX(value.left);\r\n object.setTranslationY(value.top);\r\n object.getLayoutParams().width = value.width();\r\n object.getLayoutParams().height = value.height();\r\n object.requestLayout();\r\n }", "public void setPosition(int position) {\r\n\t\tvehicle.setPosition(position);\r\n\t}", "public void setOrigin(int ox, int oy);", "public void setPosition(double position) {\n this.position = position;\r\n }", "public void setPos(int pos);", "public void setObjPos(int index){\n \tObj tempobj = ((Obj)objectList.elementAt(index));\n \ttempobj.setPos(x+xoffset+objwidth*(index%objperrow),y+yoffset+objheight*(index/objperrow));\n }", "public void setObjectAtLocation(Point p, Object o);", "private void updateViewPosition() {\n\t\twmParams.x = (int) (x - mTouchStartX);\n\t\twmParams.y = (int) (y - mTouchStartY);\n\t\tif (viFloatingWindow != null) {\n\t\t\twindowManager.updateViewLayout(viFloatingWindow, wmParams);\n\t\t}\n\t}", "public void setCoordinates(Context context, PointF pos) {\n this.pos = pos;\n\n // https://stackoverflow.com/questions/12351695/programmatically-set-imageview-position-in-dp\n float factor = context.getResources().getDisplayMetrics().density; // display independent\n\n int xOffsetDP = 18; // 18dp\n float xOffsetPX = xOffsetDP * factor;\n int yOffsetDP = 20; // 20dp\n float yOffsetPX = yOffsetDP * factor;\n\n sprite.setX(pos.x);\n sprite.setY(pos.y);\n HPText.setX(pos.x + xOffsetPX); // Adding will move it to the right\n HPText.setY(pos.y - yOffsetPX); // Reducing will make the object go higher\n// System.out.println(sprite.getWidth() + sprite.getHeight()); // Useless, it will only return 0\n\n // This is mostly for drawing correctly\n this.pos.x = pos.x + xOffsetPX;\n this.pos.y = pos.y + yOffsetPX;\n }", "double setPosition(double x, double y);", "public void setPosition(Vector3D p) {this.position=p;}", "public void setPosition(Position pos) {\n this.curPos = pos;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the method of the ConfigurationService class with the specified name and argument list.
private static Method getMethod( String name, List<Pair<OvsDbConverter.Entry, Object>> args) throws NoSuchMethodException { Class<?>[] types = new Class<?>[args.size()]; for (int index = 0; index < args.size(); index++) { types[index] = args.get(index).first.type; } return ConfigurationService.class.getDeclaredMethod(name, types); }
[ "public Class<ServiceConfig> getConfigurationClass();", "public String getServiceClassName(String name);", "ServiceConfiguration getServiceConfiguration (\n String classname)\n throws RemoteException, ArgumentMalformedException,\n ConfigurationFactoryFailedException;", "Method getGetMethod();", "public ConfigMethod newInstance(Class<?> configInterface, Method method);", "ServiceMethod createServiceMethod();", "KNNMethod getMethod(String methodName);", "public Object getServiceHandler(String name);", "public HopService getServiceByName(String name);", "ServiceDef getServiceDef();", "ClassOfService getClassOfService();", "private static Method _getMethodForClass(Class targetClass, String methodName, String[] paramTypeNames)\n throws ClassNotFoundException, NoSuchMethodException\n {\n int numParams = (paramTypeNames != null ? paramTypeNames.length : 0);\n Class[] paramTypes = new Class[numParams];\n ClassLoader loader = targetClass.getClassLoader();\n for (int i = 0; i<numParams; i++)\n {\n\tString typeName = paramTypeNames[i];\n\tif (typeName.equals(\"int\"))\n\t paramTypes[i] = Integer.TYPE;\n\telse if (typeName.equals(\"double\"))\n\t paramTypes[i] = Double.TYPE;\n\telse if (typeName.equals(\"boolean\"))\n\t paramTypes[i] = Boolean.TYPE;\n\telse if (loader == null)\n\t paramTypes[i] = Class.forName(paramTypeNames[i]);\n\telse\n\t paramTypes[i] = loader.loadClass(paramTypeNames[i]);\n }\n Method method = targetClass.getMethod(methodName, paramTypes);\n return method;\n }", "private static ConfigMethod newInstance(Class<?> configInterface, Method method) {\n for (Factory factory : CONFIG_METHOD_FACTORIES) {\n if (factory.canHandle(method)) {\n return factory.newInstance(configInterface, method);\n }\n }\n throw new ConfigurationRuntimeException(\"Invalid config interface method: \" + method);\n }", "public static synchronized ConfigMethod getInstance(Class<?> configInterface, Method method) {\n InterfaceAndMethod key = new InterfaceAndMethod(configInterface, method);\n ConfigMethod configMethod = __configMethods.get(key);\n if (configMethod == null) {\n configMethod = newInstance(configInterface, method);\n __configMethods.put(key, configMethod);\n }\n return configMethod;\n }", "private static Method getMethod(String[] argsInLine) throws Exception {\n\t\t// Specify here for easy access later\n\t\tString className = argsInLine[argsInLine.length - 2];\n\t\tString methodName = argsInLine[argsInLine.length - 1];\n\n\t\t// Get class if exists, else throws ClassNotFoundException\n\t\tClass classToRunOn = Class.forName(className);\n\n\t\t// Get methods in the class\n\t\tMethod[] classToRunOnMethods = classToRunOn.getMethods();\n\n\t\t// Find the method whose name matches \"methodName\"\n\t\tMethod methodToRun = null;\n\t\tfor (Method classToRunOnMethod : classToRunOnMethods) {\n\t\t\tif (classToRunOnMethod.getName().equals(methodName)) {\n\t\t\t\t// Check to make sure only one method matches \"methodName\", else throw Exception todo pick better exception for duplicate method\n\t\t\t\tif (methodToRun != null) {\n\t\t\t\t\tthrow new Exception(\"Public Method is duplicate \" + methodToRun.getName() + \" in Class \" + classToRunOn.getName() + \".\");\n\t\t\t\t}\n\t\t\t\tmethodToRun = classToRunOnMethod;\n\n\t\t\t}\n\t\t}\n\n\t\t// If no methods match \"methodName\" then throw Exception todo pick better exception for missing method\n\t\tif (methodToRun == null) {\n\t\t\tthrow new Exception(\"Method \" + methodName + \" in Class \" + classToRunOn.getName() + \" does not exist.\");\n\n\t\t}\n\n\t\treturn methodToRun;\n\t}", "public static <T> MethodAccessor<T> getMethodAccessor(String clazz, String name, Class<?>... args)\n\t{\n\t\tObjects.requireNonNull(clazz);\n\t\tObjects.requireNonNull(name);\n\t\tObjects.requireNonNull(args);\n\n\t\ttry\n\t\t{\n\t\t\treturn getMethodAccessor(getClass(clazz).getDeclaredMethod(name, args));\n\t\t}\n\t\tcatch (ReflectiveOperationException e)\n\t\t{\n\t\t\tthrow new NMSReflectionException(e);\n\t\t}\n\t}", "public SootMethod getMethod(String name, List parameterTypes) throws\n ca.mcgill.sable.soot.NoSuchMethodException, ca.mcgill.sable.soot.AmbiguousMethodException\n {\n boolean found = false;\n SootMethod foundMethod = null;\n \n resolveIfNecessary();\n // inefficient\n\n Iterator methodIt = getMethods().iterator();\n\n while(methodIt.hasNext())\n {\n SootMethod method = (SootMethod) methodIt.next();\n\n if(method.getName().equals(name) &&\n parameterTypes.equals(method.getParameterTypes()))\n {\n if(found)\n throw new ca.mcgill.sable.soot.AmbiguousMethodException();\n else { \n found = true;\n foundMethod = method;\n }\n }\n }\n\n if(found)\n return foundMethod;\n else\n throw new ca.mcgill.sable.soot.NoSuchMethodException();\n }", "private Method getDeclaredMethodFor(Class<?> clazz, String name, Class<?>... parameterTypes) {\n try {\n return clazz.getDeclaredMethod(name, parameterTypes);\n } catch (NoSuchMethodException e) {\n Class<?> superClass = clazz.getSuperclass();\n if (superClass != null) {\n return getDeclaredMethodFor(superClass, name, parameterTypes);\n }\n }\n return null;\n }", "public SootMethod getMethod(String name, List parameterTypes, Type returnType) throws\n ca.mcgill.sable.soot.NoSuchMethodException\n {\n resolveIfNecessary();\n // inefficient\n\n Iterator methodIt = getMethods().iterator();\n\n while(methodIt.hasNext())\n {\n SootMethod method = (SootMethod) methodIt.next();\n\n if(method.getName().equals(name) &&\n parameterTypes.equals(method.getParameterTypes()) &&\n returnType.equals(method.getReturnType()))\n {\n return method;\n }\n }\n\n throw new ca.mcgill.sable.soot.NoSuchMethodException(getName() + \".\" + name + \"(\" + \n parameterTypes + \")\" + \" : \" + returnType);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string last_price = 86;
String getLastPrice();
[ "java.lang.String getLastPrice();", "public String getLastPrice() {\n Object ref = lastPrice_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n lastPrice_ = s;\n }\n return s;\n }\n }", "public java.lang.String getLastPrice() {\n java.lang.Object ref = lastPrice_;\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 lastPrice_ = s;\n return s;\n }\n }", "public java.lang.String getLastPrice() {\n java.lang.Object ref = lastPrice_;\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 lastPrice_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "double getLastPrice();", "public Builder setLastPrice(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n lastPrice_ = value;\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString getLastPriceBytes() {\n Object ref = lastPrice_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((String) ref);\n lastPrice_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getPrice();", "String getAvBuyPrice();", "public double getLastPrice() {\r\n\t\treturn lastPrice;\r\n\t}", "java.lang.String getPrice3();", "java.lang.String getPrice2();", "java.lang.String getPrice1();", "java.lang.String getServicePrice();", "String getFairPrice();", "public BigDecimal getPriceLastInv();", "java.lang.String getHighPrice();", "java.lang.String getBidPrice3();", "public void setPriceLastOrd (BigDecimal PriceLastOrd);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first nLines lines from a buffer.
public static StringBuilder getFirstLines(BufferedReader buff, int nLines) { StringBuilder ret = null; try { String crtLine = null; int lineCnt = 0; if (buff != null) { ret = new StringBuilder(); while ((crtLine = buff.readLine()) != null && lineCnt < nLines) { ret.append(crtLine + "\n"); lineCnt++; } if (ret.length() == 0) ret = null; } } catch (Exception e) { return null; } return ret; }
[ "public String getLine(BufferedReader buffer) throws IOException{\r\n\t\tString line = buffer.readLine();\r\n\t\t++nbOfLines;\r\n\t\treturn line;\r\n\t}", "int getBufferLineCount();", "List<String> getLastNFileLines(File readFile, int linesToRead, int headSize);", "List<String> getLastNFileLines(File readFile, int linesToRead);", "org.tensorflow.proto.profiler.XLine getLines(int index);", "public int nextFreeBufferLine() {\n\t\tlogger.debug(\">> nextFreeBufferLine()\");\n\t\tint line = getRndLine();\n\t\tlogger.debug(\"<< nextFreeBufferLine(): %s\", line);\n\t\treturn line;\n\t}", "public List<String> nextSeveralLines() throws IOException {\n if (StringUtils.isBlank(currentPath)) return null;\n List<String> lista = new ArrayList<String>();\n String sCurrentLine;\n int temp = 1;\n\n bufferReader.mark(10000000);\n while ((sCurrentLine = bufferReader.readLine()) != null) {\n temp++;\n if (temp > counterSeveralLines) {\n for (int i = 0; i < linesAfter; i++) {\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n counterSeveralLines++;\n lista.add(sCurrentLine);\n }\n }\n bufferReader.reset();\n return lista;\n }\n }\n return lista;\n }", "private static int findEndOfLine(final ByteBuf buffer) {\n final int n = buffer.writerIndex();\n for (int i = buffer.readerIndex(); i < n; i++) {\n final byte b = buffer.getByte(i);\n if (b == '\\r' && i < n - 1 && buffer.getByte(i + 1) == '\\n') {\n return i; // \\r\\n\n }\n }\n return -1; // Not found.\n }", "public int getLineCount() {\n return GtkTextBuffer.getLineCount(this);\n }", "private static int findEndOfLine(final ChannelBuffer buffer) {\n final int n = buffer.writerIndex();\n for (int i = buffer.readerIndex(); i < n; i ++) {\n final byte b = buffer.getByte(i);\n if (b == '\\n') {\n return i;\n } else if (b == '\\r' && i < n - 1 && buffer.getByte(i + 1) == '\\n') {\n return i; // \\r\\n\n }\n }\n return -1; // Not found.\n }", "int getFixedLines();", "private static int getLineSampleCount() {\n return line.getBufferSize() - line.available();\n }", "public final static String getLine(long index, InputStream in)\n throws IOException\n {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new InputStreamReader(in), 8192);\n long max = Long.parseLong(br.readLine());\n\n long actual = index % max;\n long cur = 0l;\n while (cur < actual) {\n br.readLine(); // skip past this many.\n cur++;\n }\n return br.readLine();\n }\n finally {\n if (br != null) {\n try { br.close(); }\n catch (IOException ign) {}\n }\n }\n }", "private int getLineNum(\n\t\t\tStringBufferEx\tsbsrc,\n\t\t\tint\t\t\t\tatindex\n\t)\n\t{\n\t\tint idx = 0;\n\t\tint linenum = 0;\n\n\t\tdo {\n\t\t\tidx = sbsrc.indexOf(NEWLINE, idx);\n\t\t\tlinenum ++;\n\t\t\tidx ++;\n\n\t\t} while (idx >= 0 && idx < atindex);\n\n\t\treturn linenum;\n\t}", "private int fillBuffer(int count) throws IOException {\n int rem = size - offset;\n if (rem >= count) {\n return count;\n }\n\n int delta = (count - rem) * 2; // to avoid long sequence of the \\n\\r\n if (delta < MIN_BUFFER_DELTA_SIZE) {\n delta = MIN_BUFFER_DELTA_SIZE;\n }\n\n ensureCapacity(delta);\n int length = in.read(buffer, size, delta);\n if (length < 0) {\n return rem == 0 ? EOF : rem;\n }\n\n for (int i = size, j = size + length; i < j;) {\n int ch = buffer[i++];\n switch (ch) {\n case '\\n':\n buffer[size++] = '\\n';\n if (i < j) {\n if (buffer[i] == '\\r')\n i++;\n } else {\n do { // read until \\n? sequence ends\n ch = in.read();\n if (!(ch < 0 || ch == '\\r')) {\n ensureCapacity(1);\n buffer[size++] = (char) ch;\n }\n } while (ch == '\\n');\n }\n break;\n\n case '\\r':\n buffer[size++] = '\\n';\n if (i < j) {\n if (buffer[i] == '\\n')\n i++;\n } else {\n do { // read until \\r? sequence ends\n ch = in.read();\n if (!(ch < 0 || ch == '\\n')) {\n ensureCapacity(1);\n buffer[size++] = ch == '\\r' ? '\\n' : (char) ch;\n }\n } while (ch == '\\r');\n }\n break;\n\n default:\n buffer[size++] = (char) ch;\n break;\n }\n }\n\n return size - offset;\n }", "private String getLinha(StringBuffer bf) {\n\t\tString linha = null;\n\t\tint lf = bf.indexOf(\"\\n\");\n\t\t\n\t\tif (lf == -1) {\n\t\t\tlf = bf.indexOf(\"\\r\");\n\t\t}\n\t\t\n\t\tif (lf != -1) {\n\t\t\tlinha = bf.substring(0, lf).trim();\n\t\t\tbf.delete(0, lf + 1);\n\t\t}\n\n\t\treturn linha;\n\t}", "int getBrokenLines();", "long getBufferStartingPosition();", "private String getLine(final int index) {\n Element elem = TextUtils.getParagraphElement(document, index);\n if (elem == null) {\n return null;\n }\n int start = elem.getStartOffset();\n int length = elem.getEndOffset() - start;\n String result = null;\n try {\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n return result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Implement tenant deletion
@Override public void deleteTenant(int tenantId, boolean removeFromPersistentStorage) throws UserStoreException { return; }
[ "public Result deleteTenant() {\n\t\ttry {\n\t\t\tTenantDao tenantDao = cassandraFactory.getTenantDao();\n\t\t\ttenantDao.deleteTenant(selectedTenant.getTenantId());\n\t\t} catch (DaoException e) {\n\t\t\tLogger.error(\"Error occurred while deleting tenant \", e);\n\t\t}\n\n\t\treturn redirect(\"/tenant/1/10/descendingName\");\n\t}", "public int deletePak2(int tenantId, int memberId);", "void deleteModelForTenant(Long id, String tenantId);", "protected void deleteTenantMeta() {\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n TenantInfo tenantInfo = getTenantInfo();\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n if (tenantInfo.getTenantStatus() == TenantStatus.DROPPED) {\n adapter.deleteTenantMeta(adminSchemaName, tenantInfo.getTenantId());\n } else {\n throw new IllegalStateException(\"Cannot delete tenant meta data until status is \" + TenantStatus.DROPPED.name());\n }\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n }", "public void removeTenant(Integer tenantId);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete TenantSuperAdmin : {}\", id);\n tenantSuperAdminRepository.deleteById(id);\n }", "@Override\n\tpublic void forceDelete(String tenantId, String serverId) {\n\t\tSystem.out.println(\"force delete \" + tenantId + \"'s server \" + serverId + \"!!\");\n\t}", "@DeleteMapping(\"/tenant-users/{id}\")\n @Timed\n public ResponseEntity<Void> deleteTenantUser(@PathVariable Long id) {\n log.debug(\"REST request to delete TenantUser : {}\", id);\n tenantUserService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@DeleteMapping(\"/tenant-details/{id}\")\n @Timed\n public ResponseEntity<Void> deleteTenantDetails(@PathVariable Long id) {\n log.debug(\"REST request to delete TenantDetails : {}\", id);\n tenantDetailsRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "void unsetTenantId();", "public static void deleteTenantUMData(int tenantId, Connection conn) throws Exception {\n try {\n conn.setAutoCommit(false);\n String deleteUserPermissionSql = \"DELETE FROM UM_USER_PERMISSION WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteUserPermissionSql, tenantId);\n\n String deleteRolePermissionSql = \"DELETE FROM UM_ROLE_PERMISSION WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteRolePermissionSql, tenantId);\n\n String deletePermissionSql = \"DELETE FROM UM_PERMISSION WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deletePermissionSql, tenantId);\n\n String deleteClaimBehaviourSql = \"DELETE FROM UM_CLAIM_BEHAVIOR WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteClaimBehaviourSql, tenantId);\n\n String deleteProfileConfigSql = \"DELETE FROM UM_PROFILE_CONFIG WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteProfileConfigSql, tenantId);\n\n String deleteClaimSql = \"DELETE FROM UM_CLAIM WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteClaimSql, tenantId);\n\n String deleteDialectSql = \"DELETE FROM UM_DIALECT WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteDialectSql, tenantId);\n\n String deleteUserAttributeSql = \"DELETE FROM UM_USER_ATTRIBUTE WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteUserAttributeSql, tenantId);\n\n String deleteHybridUserRoleSql = \"DELETE FROM UM_HYBRID_USER_ROLE WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteHybridUserRoleSql, tenantId);\n\n String deleteHybridRoleSql = \"DELETE FROM UM_HYBRID_ROLE WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteHybridRoleSql, tenantId);\n\n String deleteHybridRememberMeSql = \"DELETE FROM UM_HYBRID_REMEMBER_ME WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteHybridRememberMeSql, tenantId);\n\n String deleteUserRoleSql = \"DELETE FROM UM_USER_ROLE WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteUserRoleSql, tenantId);\n\n String deleteRoleSql = \"DELETE FROM UM_ROLE WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteRoleSql, tenantId);\n\n String deleteUserSql = \"DELETE FROM UM_USER WHERE UM_TENANT_ID = ?\";\n executeDeleteQuery(conn, deleteUserSql, tenantId);\n\n String deleteTenantSql = \"DELETE FROM UM_TENANT WHERE UM_ID = ?\";\n executeDeleteQuery(conn, deleteTenantSql, tenantId);\n\n conn.commit();\n } catch (Exception e) {\n conn.rollback();\n String errorMsg = \"An error occurred while deleting registry data for tenant: \" + tenantId;\n log.error(errorMsg, e);\n throw new Exception(errorMsg, e);\n } finally {\n conn.close();\n }\n }", "public boolean removeTenant(String orgNo, String countryCode) throws Exception ;", "@RequestMapping(value = { \"/delete-{id}-tenant\" }, method = RequestMethod.GET)\r\n\tpublic String deleteTenant(@PathVariable Integer id) {\r\n\t\tservice.deleteTenantById(id);\r\n\t\treturn \"redirect:/list\";\r\n\t}", "private boolean deleteRequester(long activeTenantId) throws SystemException {\n ActiveTenantResourceClient client;\n try {\n client = clientServiceUtil.getActiveTenantResourceClient(oafAccess.\n getProperty(OAFProperties.SYSTEM_MS_ENDPOINT_TENANTMANAGEMENT));\n } catch (MalformedURLException malformedURLException){\n throw new SystemException(malformedURLException.getMessage());\n }\n try (Response response = client.delete(activeTenantId)) {\n if(response.getStatusInfo().getFamily() == Response.Status.Family.SUCCESSFUL) {\n return true;\n } else {\n String issueMessage = response.readEntity(String.class);\n log.error(issueMessage);\n return false;\n }\n } catch (ProcessingException pe) {\n throw new SystemException(pe.getMessage());\n }\n }", "protected void dropTenant() {\n if (!MULTITENANT_FEATURE_ENABLED.contains(dbType)) {\n return;\n }\n\n // Mark the tenant as being dropped. This should prevent it from\n // being used in any way because the SET_TENANT stored procedure\n // will reject any request for the tenant being dropped.\n TenantInfo tenantInfo = freezeTenant();\n\n // Build the model of the data (FHIRDATA) schema which is then used to drive the drop\n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, tenantInfo.getTenantSchema());\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n // Detach the tenant partition from each of the data tables\n detachTenantPartitions(pdm, tenantInfo);\n \n // this may not complete successfully because Db2 runs the detach as an async\n // process. Just need to run --drop-detached to clean up.\n dropDetachedPartitionTables(pdm, tenantInfo);\n\n }", "@Override\r\n public void delete() throws NotAuthorizedException, ConflictException, BadRequestException {\r\n deleteNoTx();\r\n commit();\r\n }", "@Override\n public boolean delete(long activeTenantId) throws SystemException {\n try {\n return deleteRequester(activeTenantId);\n } catch (TokenExpiredException expiredException) {\n refreshToken();\n try{\n return deleteRequester(activeTenantId);\n } catch (TokenExpiredException expiredException1){\n throw new SystemException(GenericErrorCodeMessage.EXPIRED_ACCESS_TOKEN.toString());\n }\n }\n }", "private Delete() {}", "public void deleteAccount(Account entity) throws Exception;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Unregister: Given a student id number and a course code, this function should unregister the student from that course.
static void unregisterStudent(Connection conn, String student, String course) throws SQLException { if(!isCourseExist(conn, course)) { System.out.println("Course "+course+" does not exist."); return; } String courseFullName = getCourseFullName(conn, course); String UnregisterQuery = "DELETE FROM Registrations WHERE student = ? AND course = ?"; try (PreparedStatement pstmt = conn.prepareStatement(UnregisterQuery)){ pstmt.setString(1,student); pstmt.setString(2,course); pstmt.executeUpdate(); System.out.println("Student " + student +" is now unregistered from course " + courseFullName); }catch (SQLException ex) { System.out.println("Unregister Operation Failed"); ex.printStackTrace(); } }
[ "public String unregister(String student, String courseCode){\n String query = \"DELETE FROM Registrations WHERE student = '\" + student + \"' AND course = '\" + courseCode + \"';\";\n try(Statement ps = conn.createStatement();){\n int n = ps.executeUpdate(query);\n ps.close();\n if(n == 0)\n return \"{\\\"success\\\":false, \\\"error\\\":\\\" Student \" + student + \" is not registered to the course \" + courseCode + \"\\\"}\";\n else\n return \"{\\\"success\\\":true}\";\n }catch (SQLException e){\n return \"{\\\"success\\\":false, \\\"error\\\":\\\"\"+getError(e)+\"\\\"}\";\n }\n }", "static void unregisterStudent(Connection conn, String student, String course)\n throws SQLException\n {\n \tString query = \"DELETE FROM \\\"registrations\\\" r WHERE r.code = '\" + course + \"' AND r.national_id = '\" + student + \"'\";\n PreparedStatement ps = conn.prepareStatement(query);\n \n int r = ps.executeUpdate();\n if (r == 0) System.out.println(\"Registration does not exist or invalid course ID\");\n else System.out.println(\"Successfully unregistered \" + student + \" for the course: \" + course);\n }", "static void unregisterStudent(Connection conn, String student, String course) throws SQLException {\n String query = \"SELECT * FROM studentsfollowing WHERE studentsfollowing.nationalidnbr = ?\";\n PreparedStatement statement = conn.prepareStatement(query);\n statement.setString(1, student);\n ResultSet resultSet = statement.executeQuery();\n resultSet.next();\n String studentID = resultSet.getString(1);\n resultSet.close();\n query = \"DELETE FROM registrations WHERE registrations.studentid = '\" + studentID + \"' AND registrations.coursecode = ?\";\n statement.close();\n try {\n statement = conn.prepareStatement(query);\n statement.setString(1, course);\n statement.executeUpdate();\n\n System.out.println(\"Student no longer registered on course\");\n } catch (PSQLException e) {\n System.out.println(e.getServerErrorMessage());\n }\n statement.close();\n }", "public void unEnroll(String studentId, String courseId)\r\n throws RemoteException;", "public boolean dropCourse(String courseCode, int studentId) throws SQLException;", "public boolean dropCourse(String courseCode, String studentId, List<Course> registeredCourseList) throws CourseNotFoundException, SQLException;", "@Override\n\tpublic void removecourse(long pk, com.servicemapping.model.course course) {\n\t\tregistrationDetailsTocourseTableMapper.deleteTableMapping(pk,\n\t\t\tcourse.getPrimaryKey());\n\t}", "public void removeCourse(String course);", "public void removeStudents (String crsId, String studentId) throws Exception\n\t{throw new Exception(\"Not Implemented.\");\n\t}", "@DeleteMapping(\"/students/{student_id}/courses/{course_id}\")\n public void removeCourse(@PathVariable(value=\"student_id\") short student_id, @PathVariable(value=\"course_id\") short course_id) {\n Student student = studentRepository.getOne(student_id);\n Course course = courseRepository.getOne(course_id);\n student.getCourseList().remove(course);\n course.getStudentList().remove(student);\n student.setStudentId(student_id);\n studentRepository.save(student);\n }", "@DELETE\n @Path(\"/dropCourse\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response dropCourse(\n @NotNull\n @QueryParam(\"courseCode\") String courseCode,\n @NotNull\n @QueryParam(\"studentId\") String studentId,@HeaderParam(\"authKey\") String authKey) throws ValidationException {\n\n\n if(com.flipkart.restController.UserAuth.isStudentLogin(authKey) == null){\n return Response.status(403).entity(\"Access Denied\").build();\n }\n\n try {\n if (registrationInterface.getRegistrationStatus(studentId) == false)\n return Response.status(200).entity(\"Student course registration is pending\").build();\n\n List<Course> registeredCourseList = registrationInterface.viewRegisteredCourses(studentId);\n registrationInterface.dropCourse(courseCode, studentId, registeredCourseList);\n return Response.status(201).entity(\"You have successfully dropped Course : \" + courseCode).build();\n } catch (Exception e) {\n logger.info(e.getMessage());\n return Response.status(501).entity(\"You have not registered for course : \" + courseCode).build();\n }\n\n }", "public void removeStudentFromCourse(Course course, Student student){\n \n String statement = REMOVE_STUDENT_FROM_COURSE;\n data.makeUpdateStatement(statement,new Object[]{(Object)course.getId(),(Object)student.getId()});\n data.closeConnections(data.ps, data.conn);\n }", "public void unregisterProfessorFromCourse(Professor professor, CourseSection course){\n\t\t\n\t\t//Prior to removing course_section, create an announcement record for reference\n\t\tcourseDAO.createAnnouncement(professor, course);\n\t\t\n\t\tCourseService helper = new CourseService();\n\t\tString term = helper.getTermForCourseSection(course);\n\t\tint year = helper.getYearForGivenCourseSection(course);\n\t\t\t\t\n\t\t\t\t\n\t\t//Also get list of students currently enrolled in the course to be canceled. Will use this list to update bill reports\n\t\tList<Student> origRoster = course.getRoster();\t\t\n\t\t\n\t\t//removes course section from professor's teaching list (course_section table)\n\t\tremoveProfessorFromCourseTeaching(professor, course); // HELPER method\n\t\t\n\t\t//After removal was completely successful, update bill reports for students no longer are enrolled in the course.\n\t\tfor (Student s: origRoster){\n\t\t\tSystem.out.println(\"Trying to update student bill reports...\");\n\t\t\t//Get updated versions of each student previously enrolled in the deleted course\n\t\t\tStudentDAO studentDAO = new StudentDAO();\n\t\t\tStudent newStudVersion = studentDAO.getStudentById(s.getID());\n\t\t\t\n\t\t\t//Update each student's bill report\n\t\t\tBillReportDAO bpdao = new BillReportDAO();\n\t\t\tbpdao.updateBillReport(newStudVersion, term, year);\n\t\t}\n\t}", "@DELETE\r\n\t@Path(\"/{courseID}/student/{studentID}\")\r\n\tpublic void deleteTAtoCourse(@PathParam(\"studentID\") String studentID, @PathParam(\"courseID\") String courseID) {\r\n\r\n\t\tStudent student = InMemoryDataStore.getStudent(studentID);\r\n\t\tCourse course = InMemoryDataStore.getCourse(courseID);\r\n\r\n\t\tif (student == null || course == null) {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\tString currentTA = course.getTaStudentID();\r\n\t\tif (studentID.equals(currentTA)) {\r\n\t\t\tcourse.setTaStudentID(null);\r\n\t\t} else {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\t}", "public ReturnCodesUg removeTrackingStudentFromCourse(Student student,\n CourseKey courseKey);", "public void removeStudent () {\n\t\tif (list.isEmpty())\n\t\t\tSystem.out.println (\"\\nStudent List is empty.\\n\");\n\t\telse {\n\t\t\tScanner sc = new Scanner (System.in);\n\t\t\tSystem.out.print (\"\\nEnter roll number: \");\n\t\t\tString rollno = sc.nextLine ();\t\t// input the roll no\n\n\t\t\tIterator <RegisteredStudent> it = list.iterator ();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tRegisteredStudent rs = it.next();\n\t\t\t\tif (rs.checkEqualityOfRoll(rollno)) {\t// if a student with the roll number exists\n\t\t\t\t\tit.remove();\t// remove the student from list\n\t\t\t\t\tSystem.out.println (\"\\nStudent with roll number \" + rollno + \" removed successfully.\\n\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println (\"Student could not be found.\\n\");\n\t\t}\n\t}", "public void removeActiveCourse(String courseCode) \n {\n if (courses.containsKey(courseCode)) \n {\n courses.remove(courseCode); \n }\n }", "@Override\n public void unsetCourse(Long student_id, Long course_id) {\n courseRepository.unsetStudentFromCourse(course_id, student_id);\n }", "public boolean unregisterFromCourse(User user,int numCourse){\n\t\tif (!registeredToCourse(user,numCourse))\n\t\t\treturn false;\n\t\tuser.removeFromCourse(numCourse);\n\t\tCourse course=numCourseMap.get(numCourse);\n\t\tsynchronized (course) {\n\t\t\tregisterMap.get(course).remove(user);\n\t\t}\n\t\treturn true;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.
void setDiscoverTargets(@ParamName("discover") Boolean discover);
[ "public void onTargetsLoaded() {\n IAndroidTarget[] targets = null;\n if (Sdk.getCurrent() != null) {\n targets = Sdk.getCurrent().getTargets();\n }\n mSdkTargetSelector.setTargets(targets);\n \n // If there's only one target, select it\n if (targets != null && targets.length == 1) {\n mSdkTargetSelector.setSelection(targets[0]);\n }\n }", "public void registerTargets(){\n synchronized(targets){\n while(targets.size()>0){\n Target target= (Target) targets.removeFirst();\n try {\n target.socketChannel.register(selector,SelectionKey.OP_CONNECT,target);\n } catch (ClosedChannelException e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n try {\n target.socketChannel.close();\n } catch (IOException e1) {\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n target.failure=e;\n addFinishedTarget(target);\n }\n }\n }\n }", "public void setTargets(List<Target> targets) {\n this.targets = targets;\n }", "public void viewTargets ()\n throws GeneralException\n\t{\n\n throw new UnsupportedOperationException (\"Not supported.\");\n\n\t}", "protected void notifyTargetsOfFilters() {\n IDebugTarget[] targets = DebugPlugin.getDefault().getLaunchManager().getDebugTargets();\n for (int i = 0; i < targets.length; i++) {\n if (targets[i] instanceof IJavaDebugTarget) {\n IJavaDebugTarget target = (IJavaDebugTarget) targets[i];\n notifyTargetOfFilters(target);\n }\n }\n }", "public void setTargets(List targets) {\n this.targets = targets;\n setClean(false);\n }", "public void setTarget (Targets target)\n\t{\n\t\tthis.Target = target;\n\t}", "private static List<TargetSelection> findTargets(String target)\n \t\t{\n \t\tArrayList<TargetSelection> targets = new ArrayList<TargetSelection>();\n \n \t\tFile f = new File(EnigmaRunner.WORKDIR,\"ENIGMAsystem\");\n \t\tf = new File(f,\"SHELL\");\n \t\tf = new File(f,target);\n \t\tFile files[] = f.listFiles();\n \t\tif (files == null) return targets;\n \t\tfor (File dir : files)\n \t\t\t{\n \t\t\tif (!dir.isDirectory()) continue;\n \t\t\t//technically this could stand to be a .properties file, rather than e-yaml\n\t\t\tFile prop = new File(dir,\"About.ey\");\n \t\t\ttry\n \t\t\t\t{\n \t\t\t\tSet<String> depends = new HashSet<String>();\n \t\t\t\tSet<String> defaultOn = new HashSet<String>();\n \t\t\t\tYamlNode node;\n \n \t\t\t\tif (target.equals(\"Platforms\"))\n \t\t\t\t\t{\n \t\t\t\t\tnode = YamlParser.parse(prop);\n \t\t\t\t\tString norm = normalize(node.getMC(\"Build-Platforms\"));\n \t\t\t\t\tif (norm.isEmpty()) continue;\n \t\t\t\t\tfor (String s : norm.split(\",\"))\n \t\t\t\t\t\tif (!s.isEmpty()) depends.add(s);\n \t\t\t\t\t}\n \t\t\t\telse if (target.equals(\"Collision_Systems\"))\n \t\t\t\t\t{\n \t\t\t\t\tnode = YamlParser.parse(new Scanner(prop));\n \t\t\t\t\tdepends.add(\"all\");\n \t\t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\tif (dir.getName().equals(\"None\"))\n \t\t\t\t\t\tdepends.add(\"all\");\n \t\t\t\t\telse\n \t\t\t\t\t\t{\n \t\t\t\t\t\tString[] configs = new File(dir,\"Config\").list();\n \t\t\t\t\t\tif (configs == null) continue;\n \t\t\t\t\t\tfor (String conf : configs)\n \t\t\t\t\t\t\tif (conf.endsWith(\".ey\"))\n \t\t\t\t\t\t\t\tdepends.add(normalize(conf.substring(0,conf.length() - 3)));\n \t\t\t\t\t\tif (depends.isEmpty()) continue;\n \t\t\t\t\t\t}\n \t\t\t\t\tnode = YamlParser.parse(new Scanner(prop));\n \t\t\t\t\t}\n \n \t\t\t\tString norm = normalize(node.getMC(\"Represents\",\"\"));\n \t\t\t\tfor (String s : norm.split(\",\"))\n \t\t\t\t\tif (!s.isEmpty()) defaultOn.add(s);\n \n \t\t\t\tTargetSelection ps = new TargetSelection();\n \t\t\t\tps.name = node.getMC(\"Name\");\n \t\t\t\tps.id = node.getMC(\"Identifier\");\n \t\t\t\tps.depends = depends;\n \t\t\t\tps.defaultOn = defaultOn;\n \t\t\t\tps.desc = node.getMC(\"Description\",null);\n \t\t\t\tps.auth = node.getMC(\"Author\",null);\n \t\t\t\tps.ext = node.getMC(\"Build-Extension\",null);\n \t\t\t\ttargets.add(ps);\n \t\t\t\t}\n \t\t\tcatch (FileNotFoundException e)\n \t\t\t\t{\n \t\t\t\t//yaml file missing, skip to next file\n \t\t\t\t}\n \t\t\tcatch (IndexOutOfBoundsException e)\n \t\t\t\t{\n \t\t\t\t//insufficient yaml, skip to next file\n \t\t\t\t}\n \t\t\t}\n \t\t//if not empty, we may safely assume that the first one is the default selection,\n \t\t//or technically, that any of them is the default. The user can/will change it in UI.\n \t\treturn targets;\n \t\t}", "long getTargetsLoaded();", "public void markTargets() {\n defaultOp.setBranchTarget();\n for (int i=0; i<targetsOp.length; i++)\n targetsOp[i].setBranchTarget();\n }", "public static Targets ValidTargets(){\r\n return new Targets();\r\n }", "public static void waitForDiscovery(int expectedTargets) throws Exception {\n long startTime = System.currentTimeMillis();\n int successes = 0;\n while (true) {\n int numTargets = queryTargets().get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS).size();\n if (numTargets == expectedTargets + 1) {\n System.out.println(\n String.format(\n \"expected target count (%d) observed, counting success %d/%d\",\n expectedTargets + 1, ++successes, STABILITY_COUNT));\n if (successes >= STABILITY_COUNT) {\n System.out.println(\"discovery complete\");\n break;\n }\n Thread.sleep(DISCOVERY_POLL_PERIOD_MS);\n } else if (numTargets < expectedTargets + 1) {\n System.err.println(\n String.format(\n \"%d/%d targets found - waiting for discovery to complete\",\n numTargets, expectedTargets + 1));\n if (System.currentTimeMillis() > startTime + DISCOVERY_TIMEOUT_MS) {\n throw new Exception(\"discovery failed - timed out\");\n }\n successes = 0;\n Thread.sleep(DISCOVERY_POLL_PERIOD_MS);\n } else {\n if (System.currentTimeMillis() > startTime + DISCOVERY_TIMEOUT_MS) {\n throw new Exception(\n String.format(\n \"%d targets found - too many (expected %d) after timeout!\",\n numTargets, expectedTargets + 1));\n }\n System.err.println(\n String.format(\n \"%d targets found - too many (expected %d)! Waiting to see if JDP\"\n + \" settles...\",\n numTargets, expectedTargets + 1));\n successes = 0;\n Thread.sleep(DISCOVERY_POLL_PERIOD_MS);\n }\n }\n System.out.println(\n String.format(\n \"discovery completed in %dms\", System.currentTimeMillis() - startTime));\n }", "public void setTargets(SimpleStringProperty Targets) \n {\n this.Targets = Targets;\n }", "public List<Target> getTargets()\n {\n return targets;\n }", "long getTargetsConfigured();", "public void clearTargets() {\n try {\n\n Object handle = getHandle();\n Object pfgs = createPathFinderGoalSelector(handle);\n handle.getClass().getField(\"targetSelector\").set(handle, pfgs);\n\n } catch (Exception ex) {\n MirrorMirror.logger().warning(\"Error clearning targets for entity: \" + baseEntity.getUniqueId());\n MirrorMirror.logger().warning(ex.getMessage());\n ex.printStackTrace();\n }\n }", "public void printFinishedTarget() {\n try {\n for (; ;) {\n Target target = null;\n synchronized (finishedTargets) {\n while (finishedTargets.size() == 0) {\n finishedTargets.wait();\n }//while\n target= (Target) finishedTargets.removeFirst();\n target.show();\n }\n }//for\n } catch (InterruptedException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "void processPendingTargets() throws IOException {\n synchronized (pending) {\n while (pending.size() > 0) {\n Target t = (Target) pending.removeFirst();\n try {\n\n // Register the channel with the selector, indicating\n // interest in connection completion and attaching the\n // target object so that we can get the target back\n // after the key is added to the selector's\n // selected-key set\n t.channel.register(sel, SelectionKey.OP_CONNECT, t);\n\n } catch (IOException x) {\n // Something went wrong, so close the channel and\n // record the failure\n t.channel.close();\n t.failure = x;\n printer.add(t);\n }\n }\n\n }\n }", "public List<Target> getTargets() {\n return targets;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces A XOr B with (A AND !B) OR (!A AND B)
private Node removeXOr(Node node) { Node newLeftNode = new Node(new EquationEntity(EntitySymbols.AND), node.getLeftNode(), new Node(new EquationEntity(EntitySymbols.NOT), node.getRightNode())); Node newRightNode = new Node(new EquationEntity(EntitySymbols.AND), new Node(new EquationEntity(EntitySymbols.NOT), node.getLeftNode()), node.getRightNode()); return new Node(new EquationEntity(EntitySymbols.OR), newLeftNode, newRightNode); }
[ "public static void InclusiveOR()\n\t{\n\t\tSystem.out.println(a | b);\n\t\tSystem.out.println(a | c);\n\t\tSystem.out.println(b | d);\n\n\t}", "void applyDisjunction(List filterElements);", "void applyOr(FilterElement lhs, FilterElement rhs);", "private static Expression matchLogicalOrOrBinaryInclusiveOr()\n {\n Expression left = matchBinaryExclusiveOr();\n\n while (ScriptParser.tokenizer.match('|'))\n {\n // Match ||\n if (ScriptParser.tokenizer.match('|'))\n {\n if (ExpressionType.isBoolean(left) && left.booleanValue == true)\n {\n // Evaluated to true; we can ignore the rest of the expression.\n while (ScriptParser.tokenizer.tokenNext(\"\\\")\\\" or \\\";\\\"\"))\n if (ScriptParser.tokenizer.tokenIs(')') || ScriptParser.tokenizer.tokenIs(';'))\n break;\n }\n else\n {\n left = createBoolean(left, \"||\", matchBinaryExclusiveOr());\n }\n }\n // Match |= (assignment)\n else if (ScriptParser.tokenizer.match('='))\n {\n if (!left.type.equals(ExpressionType.Register))\n throw new NslException(\"The left operand must be a variable\", true);\n\n left = new AssignmentExpression(left.integerValue, createMathematical(left, \"|\", matchComplex()));\n Scope.getCurrent().addVar(left.integerValue);\n }\n // Matched |\n else\n {\n left = createMathematical(left, \"|\", matchBinaryExclusiveOr());\n }\n }\n\n return left;\n }", "private void handleOr( ObjRef or, ObjRef exp, SymbolTable symbolTable, ObjRef boolContext )\n throws NoSuchTypeException, MissingElementException, TypeMismatchException\n {\n ObjRef left = ( ObjRef )xArch.get( or, \"BooleanExp1\" );\n ObjRef right = ( ObjRef )xArch.get( or, \"BooleanExp2\" );\n \n // makes sure both expressions exists\n if( left == null || right == null )\n throw new MissingElementException( \"Operator or \" + or + \n \" is missing left/right boolean expression.\" );\n \n // the result of the left expression\n evalExp( left, symbolTable, boolContext );\n ObjRef leftResult = ( ObjRef )xArch.get( left, \"Bool\" );\n // short circuit out, don't have to eval the right exp\n if( leftResult != null && boolValue( leftResult ) )\n {\n xArch.clear( exp, \"Or\" ); // need to clear the current exp\n // since the left is true, the whole or is true\n xArch.set( exp, \"Bool\", leftResult );\n \n return;\n }\n \n // result of the right expression\n evalExp( right, symbolTable, boolContext );\n ObjRef rightResult = ( ObjRef )xArch.get( right, \"Bool\" );\n \n // as long as one expression is true, \"or\" returns true\n if( rightResult != null && boolValue( rightResult ) )\n {\n xArch.clear( exp, \"Or\" ); // need to clear the current exp\n xArch.set( exp, \"Bool\", rightResult );\n \n return;\n }\n\n // partial eval, since one of the expressions isn't a bool\n if( rightResult == null || leftResult == null )\n {\n // both expressions are unknown, so we can't prune any part of it\n if( leftResult == null && rightResult == null )\n {\n return;\n }\n else\n {\n ObjRef unknown;\n // checks to see which expression contains the unknown expression\n if( leftResult == null )\n unknown = left;\n else\n unknown = right;\n \n // gets the reference to the element that contains the current expression\n ObjRef parent = xArch.getParent( exp );\n\t\t\t\tif( parent == null )\n\t\t\t\t{\n\t\t\t\t\tthrow new MissingElementException( \"Boolean Expression Or \" +\n\t\t\t\t\t\texp + \" is missing its parent.\" );\n\t\t\t\t}\n\t\t\t\t// now we check to see if the parent is a BooleanGuard, Not, or ParenExp\n\t\t\t\tif( xArch.isInstanceOf( parent, \"boolguard#BooleanGuard\" ) ||\n\t\t\t\t\txArch.isInstanceOf( parent, \"boolguard#Not\" ) ||\n\t\t\t\t\txArch.isInstanceOf( parent, \"boolguard#Paren\" ) )\n\t\t\t\t{\n\t\t\t\t\t// these elements ONLY have \"BooleanExp\"\n\t\t\t\t\txArch.clear( parent, \"BooleanExp\" );\n\t\t\t\t\txArch.set( parent, \"BooleanExp\", unknown );\n\t\t\t\t}\n\t\t\t\t// the parent must be And/Or \n\t\t\t\telse if( xArch.isInstanceOf( parent, \"boolguard#And\" ) ||\n\t\t\t\t\txArch.isInstanceOf( parent, \"boolguard#Or\" ) )\n\t\t\t\t{\n\t\t\t\t\tObjRef exp1 = ( ObjRef ) xArch.get( parent, \"BooleanExp1\" );\n\t\t\t\t\tif( exp1 != null && exp1.equals( unknown ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// the unknown part of the expression is under BooleanExp1\n\t\t\t\t\t\t// so we replace it\n\t\t\t\t\t\txArch.clear( parent, \"BooleanExp1\" );\n\t\t\t\t\t\txArch.set( parent, \"BooleanExp1\", unknown );\n\t\t\t\t\t\t// done, so return\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tObjRef exp2 = ( ObjRef ) xArch.get( parent, \"BooleanExp2\" );\n\t\t\t\t\tif( exp2 != null && exp2.equals( unknown ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// the unknown part of the expression is BooleanExp2, so we replace that\n\t\t\t\t\t\txArch.clear( parent, \"BooleanExp2\" );\n\t\t\t\t\t\txArch.set( parent, \"BooleanExp2\", unknown );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tthrow new MissingElementException( \"Boolean Expression Or\" +\n\t\t\t\t\t\texp + \"is missing a valid parent. Unable to reconnect Or.\" \t);\n }\n } \n // both expressions were false\n else \n {\n xArch.clear( exp, \"Or\" );\n // since both are false, doesn't matter which we use\n xArch.set( exp, \"Bool\", leftResult );\n }\n }", "public void setAndOr (String AndOr);", "private static Expression matchBinaryExclusiveOr()\n {\n Expression left = matchLogicalAndOrBinaryAnd();\n\n while (ScriptParser.tokenizer.match('^'))\n {\n // Match ^= (assignment)\n if (ScriptParser.tokenizer.match('='))\n {\n if (!left.type.equals(ExpressionType.Register))\n throw new NslException(\"The left operand must be a variable\", true);\n\n left = new AssignmentExpression(left.integerValue, createMathematical(left, \"^\", matchComplex()));\n Scope.getCurrent().addVar(left.integerValue);\n }\n // Matched ^\n else\n {\n left = createMathematical(left, \"^\", matchLogicalAndOrBinaryAnd());\n }\n }\n\n return left;\n }", "private Node removeEquiv(Node node) {\r\n\t\tNode newLeftNode = new Node(new EquationEntity(EntitySymbols.AND), node.getLeftNode(), node.getRightNode());\r\n\t\tNode newRightNode = new Node(new EquationEntity(EntitySymbols.AND),\r\n\t\t\t\tnew Node(new EquationEntity(EntitySymbols.NOT), node.getLeftNode()),\r\n\t\t\t\tnew Node(new EquationEntity(EntitySymbols.NOT), node.getRightNode()));\r\n\t\treturn new Node(new EquationEntity(EntitySymbols.OR), newLeftNode, newRightNode);\r\n\t}", "int xnor(int num1, int num2)\n {\n return ~((num1 | num2) & ~(num1 & num2));\n }", "public String getAndOr();", "private Expr or() {\n Expr expr = and();\n while (match(OR)) {\n Token operator = previous();\n Expr right = and();\n expr = new Expr.Logical(expr, operator, right);\n }\n\n return expr;\n }", "@OperationMeta(opType = OperationType.INFIX)\n public static boolean or(boolean b1, boolean b2) {\n return b1 | b2;\n }", "boolean performAndOrShortcut(Node a, Node b) {\n if (b.getInEdges().size() != 1) return false;\n if (b.block.getChildCount() > 0) {\n // Node b is not a mere conditional.\n return false;\n }\n\n \n ConditionalEdge aToC;\n ConditionalEdge bToC;\n boolean isOR = true;\n \n while(true) {\n aToC = a.getConditionalEdge(isOR);\n bToC = b.getConditionalEdge(isOR);\n if (bToC.target == aToC.target) break;\n if (!isOR) return false;\n isOR = false;\n }\n \n if (aToC.target.getInEdges().size() != 2) return false;\n\n ConditionalEdge bToD = b.getConditionalEdge(!isOR);\n ConditionalEdge aToB = a.getConditionalEdge(!isOR);\n \n aToB.redirect(bToD.target);\n removeEdge(bToC);\n removeEdge(bToD);\n removeNode(b);\n \n InfixExpression infix = new InfixExpression(\n isOR?InfixExpression.Operator.CONDITIONAL_OR:InfixExpression.Operator.CONDITIONAL_AND);\n // Note that the order aToC, then bToC is important.\n infix.setOperands(\n aToC.getBooleanExpression().getExpression(), \n bToC.getBooleanExpression().getExpression());\n \n BooleanExpression be = new BooleanExpression(infix);\n aToC.setBooleanExpression(be);\n aToB.setBooleanExpression(be);\n \n logger.debug(\"Created shortcut and removed \" + b);\n \n return true;\n }", "private Node removeImplies(Node node) {\r\n\t\tNode newLeftNode = new Node(new EquationEntity(EntitySymbols.NOT), node.getLeftNode());\r\n\t\tNode newRightNode = node.getRightNode();\r\n\t\treturn new Node(new EquationEntity(EntitySymbols.OR), newLeftNode, newRightNode);\r\n\t}", "BooleanExpression xor(Expression a, Expression b);", "@Test\n public void testOr3(){\n or1 = factory.getOr(cons1, cons2);\n\n cons1.setValue(false);\n cons2.setValue(false);\n\n assertFalse(or1.getValue());\n }", "public SingleRuleBuilder orNot(String predicate, String... variables) { return or(true, predicate, variables); }", "public static ImagePlus booleanOR(ImagePlus a, ImagePlus b) {\n \tImagePlus a_ = a.duplicate();\n \tImagePlus b_ = b.duplicate();\n \ta_ = normalizePixelValues(a_, 0, 255, true);\n \tb_ = normalizePixelValues(b_, 0, 255, true);\n ImagePlus c = a_.duplicate();\n int[][] apixels = a_.getProcessor().getIntArray();\n int[][] bpixels = b_.getProcessor().getIntArray();\n int rows = apixels.length <= bpixels.length ? apixels.length : bpixels.length;\n int cols = apixels[0].length <= bpixels[0].length ? apixels[0].length : bpixels[0].length;\n for (int i = 0; i < rows; ++i) {\n for (int j = 0; j < cols; ++j) {\n //a | b\n apixels[i][j] = apixels[i][j] | bpixels[i][j];\n }\n }\n c.getProcessor().setIntArray(apixels);\n c.setTitle(\"\");\n return c;\n }", "DSL_Expression_Or createDSL_Expression_Or();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates the controls for RootCommit Area
public void createControlsRootCommit(Composite parent) { if (this.process == null) { commitRoot.setParent(shell_dummy_commitRoot); commitRoot.setVisible(false); hinweisComposite.setParent(parent); hinweisComposite.setVisible(true); parent.layout(true); } else { hinweisComposite.setVisible(false); hinweisComposite.setParent(shell_dummy_hinweis); // wenn es fuer diese version schon einen composite gibt, dann diesen anzeigen if ( this.commitRootOld.containsKey(getActualCommitRootName()) ) { // den bisher angezeigten prozess ausblenden commitRoot.setParent(shell_dummy_commitRoot); commitRoot.setVisible(false); // den schon vorhandenen prozess einblenden // Composite old = this.commitRootOld.get((combo_processes.getText()+combo_versions.getText())); commitRoot = this.commitRootOld.get(getActualCommitRootName()); commitRoot.setParent(parent); commitRoot.setVisible(true); parent.layout(true); log("info", "reactivating an existent commitRoot page"); // das feld aktuell halten this.process = this.commitCreatorOld.get(getActualCommitRootName()).getStep().getParent(); } // ein neues composite erstellen else if (this.process.isStep("root")) { // den bisher angezeigten prozess ausblenden commitRoot.setParent(shell_dummy_commitRoot); commitRoot.setVisible(false); Composite actualComposite = new Composite(shell_dummy_commitRoot, SWT.NONE); // actualComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); // actualComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); // GridLayout gl_actualComposite = new GridLayout(1, false); actualComposite.setLayout(new FillLayout()); CommitCreator commitCreator = new CommitCreator(this, actualComposite, this.process.getRootStep()); actualComposite = commitCreator.createControls(); // actualComposite.pack(); commitRoot = actualComposite; commitRoot.setParent(parent); commitRoot.setVisible(true); parent.layout(true); log("info", "creating a new commitRoot page"); commitRootOld.put(getActualCommitRootName(), commitRoot); commitCreatorOld.put(getActualCommitRootName(), commitCreator); } else { log("error", "selected process definition does not contain a step 'root'"); commitRoot.setParent(shell_dummy_commitRoot); commitRoot.setVisible(false); hinweisComposite.setParent(parent); hinweisComposite.setVisible(true); parent.layout(true); } } }
[ "public void createControl(Composite ancestor) {\n\t\tfControl = SWTFactory.createComposite(ancestor, 1, 1,\n\t\t\t\tGridData.FILL_BOTH);\n\t\tif (fTitle == null) {\n\t\t\tfTitle = PHPDebugUIMessages.PHPexesComboBlock_3;\n\t\t}\n\t\tGroup group = SWTFactory.createGroup(fControl, fTitle, 1, 1,\n\t\t\t\tGridData.FILL_HORIZONTAL);\n\t\tComposite comp = SWTFactory.createComposite(group, group.getFont(), 3,\n\t\t\t\t1, GridData.FILL_BOTH, 0, 0);\n\n\t\tcreateDefaultPHPControls(comp);\n\t\tcreateEEControls(comp);\n\t\tcreateAlternatePHPControls(comp);\n\t\tsetUseDefaultPHP();\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 loadControlButtons() {\n\n\t\tcontrolLayout.insets = new Insets(10, 2, 5, 2);\n\n\t\tsaveCtrlButton = new JButton(\"Save\");\n\t\tsaveCtrlButton.addActionListener(this);\n\t\tsaveCtrlButton.setEnabled(false);\n\t\tcontrolArea.add(saveCtrlButton, controlLayout);\n\n\t\teditCtrlButton = new JButton(\"Edit\");\n\t\teditCtrlButton.addActionListener(this);\n\t\tcontrolArea.add(editCtrlButton, controlLayout);\n\n\t\tclearAllCtrlButton = new JButton(\"Clear All\");\n\t\tclearAllCtrlButton.addActionListener(this);\n\t\tclearAllCtrlButton.setEnabled(false);\n\t\tcontrolArea.add(clearAllCtrlButton, controlLayout);\n\t}", "private void setUpButtons()\n\t{\n\t\tsubmitButton = new Button(\"Log Entry\");\n\t\tsubmitButton.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\n\t\t\tpublic void handle(MouseEvent event)\n\t\t\t{\n\t\t\t\tcleanUpScene();\n\t\t\t\tgetGUIManager().moveToMainMenu();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t\tBorderPane.setAlignment(submitButton, Pos.BOTTOM_CENTER);\n\t\tcenterSubPane.setRight(submitButton);\n\t\n\t\t\n\t\t\n\t\tbackButton = new Button(\"Main Menu\");\n\t\tbackButton.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\n\t\t\tpublic void handle(MouseEvent event)\n\t\t\t{\n\t\t\t\tgetGUIManager().moveToMainMenu();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t\tBorderPane.setAlignment(backButton, Pos.BOTTOM_CENTER);\n\t\tcenterSubPane.setLeft(backButton);\n\t\t\n\t}", "private void createRootGroup(Composite parent) {\n // separator\n Label label = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);\n label.setLayoutData(newGridData(NUM_COL, GridData.GRAB_HORIZONTAL));\n\n // label before the root combo\n String tooltip = \"The root element to create in the XML file.\";\n label = new Label(parent, SWT.NONE);\n label.setText(\"Select the root element for the XML file:\");\n label.setLayoutData(newGridData(NUM_COL));\n label.setToolTipText(tooltip);\n\n // root combo\n emptyCell(parent);\n\n mRootElementCombo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);\n mRootElementCombo.setEnabled(false);\n mRootElementCombo.select(0);\n mRootElementCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mRootElementCombo.setToolTipText(tooltip);\n\n padWithEmptyCells(parent, 2);\n }", "private void createMainMenuFooterComposite() {\n\n\t\tGridData gridData22 = new GridData();\n\t\tgridData22.horizontalAlignment = GridData.BEGINNING;\n\t\tgridData22.verticalAlignment = GridData.END;\n\t\tGridData gridData2 = new GridData();\n\t\tgridData2.grabExcessHorizontalSpace = true;\n\t\tgridData2.grabExcessVerticalSpace = true;\n\t\tgridData2.verticalAlignment = GridData.END;\n\t\tgridData2.heightHint = 75;\n\t\tgridData2.widthHint = 75;\n\t\tgridData2.horizontalAlignment = GridData.END;\n\n\t\tGridLayout gridLayout2 = new GridLayout();\n\t\tgridLayout2.horizontalSpacing = 30;\n\t\tgridLayout2.marginHeight = 20;\n\t\tgridLayout2.numColumns = 2;\n\t\tgridLayout2.marginWidth = 20;\n\n\t\tGridData gridData = new GridData();\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.verticalAlignment = GridData.END;\n\t\tgridData.heightHint = 150;\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tmainMenuFooterComposite = new Composite(this, SWT.NONE);\n\t\tmainMenuFooterComposite.setBackground(new Color(Display.getCurrent(),\n\t\t\t\t255, 255, 255));\n\t\tmainMenuFooterComposite.setLayout(gridLayout2);\n\t\tmainMenuFooterComposite.setLayoutData(gridData);\n\n\t\tlblBallyCopyright = new CbctlLabel(mainMenuFooterComposite, SWT.NONE);\n\t\tlblBallyCopyright.setText(LabelLoader.getLabelValue(LabelKeyConstants.BALLY_COPYRIGHT_LABEL));\n\t\tlblBallyCopyright.setLayoutData(gridData22);\n\t\tlblBallyCopyright.setFont(new Font(Display.getDefault(), \"Arial\", 8, SWT.NORMAL));\n\t\tbtnExit = new CbctlButton(mainMenuFooterComposite, SWT.NONE, \"\",\n\t\t\t\tLabelKeyConstants.EXIT_BUTTON);\n\t\tbtnExit.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgExitBtn)));\n\t\tbtnExit.setLayoutData(gridData2);\n\t}", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "private void createControlsGroup() {\r\n PaletteContainer group = new PaletteToolbar(Messages.ArchimateDiagramEditorPalette_0);\r\n \r\n // The selection tool\r\n ToolEntry tool = new PanningSelectionToolEntry();\r\n tool.setToolClass(PanningSelectionExtendedTool.class);\r\n group.add(tool);\r\n\r\n // Use selection tool as default entry\r\n setDefaultEntry(tool);\r\n \r\n PaletteStack stack = createMarqueeSelectionStack();\r\n group.add(stack);\r\n \r\n // Format Painter\r\n formatPainterEntry = new FormatPainterToolEntry();\r\n group.add(formatPainterEntry);\r\n \r\n add(group);\r\n \r\n // Relations group will be inserted before this\r\n add(new PaletteSeparator(\"relations\")); //$NON-NLS-1$\r\n }", "private void addNodes() {\n\t\t\n\t\t// first line of controls\n\t\tHBox hbox1 = new HBox(10);\n\t\thbox1.setAlignment(Pos.CENTER_RIGHT);\n\t\t\n\t\tresetButton = new Button (\"Reset\");\n\t\t\n\t\thbox1.getChildren().add(resetButton);\n\t\t\n\t\t// second line of controls\n\t\tHBox hbox2 = new HBox(30);\n\t\t\n\t\tLabel filterBy = new Label(\"Filter by:\");\n\t\t\n\t\trbCourse.setUserData(\"Course\");\n\t\trbCourse.setToggleGroup(toggleGroup);\n\t\t\n\t\trbAuthor.setUserData(\"Author\");\n\t\trbAuthor.setToggleGroup(toggleGroup);\n\t\t\n\t\trbNone.setUserData(\"None\");\n\t\trbNone.setToggleGroup(toggleGroup);\n\t\trbNone.setSelected(true);\n\t\t\n\t\thbox2.getChildren().addAll(filterBy, rbCourse, rbAuthor, rbNone);\n\t\t\n\t\t// third line of controls\n\t\thbox3.getChildren().addAll(CourseSelectionBox.instance(), applyButton);\n\t\thbox3.setDisable(true);\n\t\t\n\t\t// fourth line of controls\n\t\tHBox hbox4 = new HBox(30);\n\t\t\n\t\tquizIDField.setPromptText(\"Enter quiz ID\");\n\t\t\n\t\thbox4.getChildren().addAll(quizIDField, searchButton);\n\t\t\n\t\t// add all nodes\n\t\tthis.getChildren().addAll(hbox1, hbox2, hbox3, hbox4);\n\t\t\n\t}", "private void createMainMenu() {\r\n\t\t// Create a layout to hold the menu buttons.\r\n\t\tBorderPane border = new BorderPane();\r\n\r\n\t\t// Create the buttons.\r\n\t\tButton startGameButton = new Button(Constants.START_GAME_BUTTON_LABEL);\r\n\t\tstartGameButton.setOnAction(new StartGameButtonOnClickListener(border,\r\n\t\t\t\tthis));\r\n\t\tButton exitButton = new Button(Constants.EXIT_GAME_BUTTON_LABEL);\r\n\t\t// Set click listeners\r\n\t\texitButton.setOnAction(new ExitButtonOnClickListener());\r\n\r\n\t\t// Add the buttons to this list to avoid repeating longer code.\r\n\t\tList<Button> mainMenuButtons = new ArrayList<Button>();\r\n\t\tmainMenuButtons.add(startGameButton);\r\n\t\tmainMenuButtons.add(exitButton);\r\n\r\n\t\t// Create a vertical box to hold the buttons in a vertical order.\r\n\t\tVBox buttonHolder = new VBox(10f);\r\n\t\t// Center the buttons in the border layout.\r\n\t\tbuttonHolder.setAlignment(Pos.CENTER);\r\n\t\tbuttonHolder.getChildren().addAll(mainMenuButtons);\r\n\r\n\t\t// Add the box containing the buttons into the root holder.\r\n\t\tborder.setCenter(buttonHolder);\r\n\r\n\t\t// Add it to the root so it is displayed in the frame.\r\n\t\troot.getChildren().add(border);\r\n\t}", "private void drawControls() {\n\t\tcontrolsVb = new VBox();\n\t\tcontrolsVb.setSpacing(8);\n\t\tcontrolsVb.setAlignment(Pos.CENTER_LEFT);\n\t\tcontrolsVb.setPadding(new Insets(15));\n\t\t\n\t\troot.getChildren().add(controlsVb);\n\n\t\tText controlsHead = new Text(\"Controls:\");\n\t\tcontrolsHead.setFont(Font.font(\"Arial\", FontWeight.MEDIUM, 30));\n\t\tcontrolsHead.setFill(Color.YELLOW);\n\t\tcontrolsVb.getChildren().add(controlsHead);\n\t\t\n\t\tText controls = new Text(\"Movement - W A S D\\n\"\n\t\t\t\t\t\t\t\t+\"Attack/Use - Left Mouse Button\\n\"\n\t\t\t\t\t\t\t\t+ \"Aim - Mouse Position\\n\"\n\t\t\t\t\t\t\t\t+ \"Pickup Item - E\\n\"\n\t\t\t\t\t\t\t\t+ \"Drop Item - X\\n\"\n\t\t\t\t\t\t\t\t+ \"Equip Item - 1 and 2\\n\"\n\t\t\t\t\t\t\t\t+ \"Pause - ESC\\n\");\n\t\tcontrols.setFont(Font.font(\"Arial\", FontWeight.LIGHT, 20));\n\t\tcontrols.setFill(Color.YELLOW);\n\t\tcontrolsVb.getChildren().add(controls);\n\t}", "private void createBottomButtons() {\n Composite buttonArea = new Composite(shell, SWT.NONE);\n buttonArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n buttonArea.setLayout(new GridLayout(1, false));\n\n // The intent is for this composite to be centered\n GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);\n Composite buttons = new Composite(buttonArea, SWT.NONE);\n buttons.setLayoutData(gd);\n buttons.setLayout(new GridLayout(2, true));\n\n gd = new GridData(100, SWT.DEFAULT);\n okBtn = new Button(buttons, SWT.PUSH);\n okBtn.setText(\"OK\");\n okBtn.setEnabled(true);\n okBtn.setLayoutData(gd);\n okBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n setReturnValue(siteIdTF.getText());\n close();\n }\n });\n\n gd = new GridData(100, SWT.DEFAULT);\n Button cancelBtn = new Button(buttons, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n setReturnValue(null);\n close();\n }\n });\n }", "@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}", "private void initRoot() {\n root = new VBox(10);\n root.setAlignment(Pos.CENTER);\n root.setPadding(new Insets(10));\n root.setPrefWidth(300);\n root.setPrefHeight(150);\n }", "protected ControlPanel createControlPanel() {\n\t\tControlPanel cp = new ControlPanel(defaultFBWidth);\n\t\tadd(cp, BorderLayout.EAST);\n\t\treturn cp;\n\t}", "private void setRootDirLines() {\n List<GuiLine> newLines = genLines(currentFilepath);\n newLines.add(new GuiLine(\"#\",\"Delete\"));\n super.setSelectionZoneHeight(newLines.size(), newLines);\n }", "private void afterCreateWidgets() {\n\n\t\t_viewer.setInput(ROOT);\n\t\t_viewer.expandToLevel(3);\n\n\t\t// drag and drop\n\n\t\tTransfer[] types = { LocalSelectionTransfer.getTransfer(), TextTransfer.getInstance() };\n\t\t_viewer.addDragSupport(DND.DROP_MOVE | DND.DROP_DEFAULT, types, new DragSourceAdapter() {\n\n\t\t\tprivate Object[] _data;\n\n\t\t\t@Override\n\t\t\tpublic void dragStart(DragSourceEvent event) {\n\t\t\t\tLocalSelectionTransfer transfer = LocalSelectionTransfer.getTransfer();\n\t\t\t\t_data = ((IStructuredSelection) _viewer.getSelection()).toArray();\n\t\t\t\ttransfer.setSelection(new StructuredSelection(_data));\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void dragSetData(DragSourceEvent event) {\n\t\t\t\tJSONArray array = new JSONArray();\n\t\t\t\tfor (Object elem : _data) {\n\t\t\t\t\tif (elem instanceof IAssetKey) {\n\t\t\t\t\t\tarray.put(AssetPackCore.getAssetJSONReference((IAssetKey) elem));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevent.data = array.toString();\n\t\t\t}\n\t\t});\n\n\t\t// selection provider\n\n\t\tgetViewSite().setSelectionProvider(_viewer);\n\n\t\t{\n\n\t\t\t// menu\n\t\t\tMenuManager manager = new MenuManager();\n\t\t\tTree tree = _viewer.getTree();\n\t\t\tMenu menu = manager.createContextMenu(tree);\n\t\t\ttree.setMenu(menu);\n\n\t\t\tgetViewSite().registerContextMenu(manager, _viewer);\n\t\t}\n\n\t\t// tooltips\n\t\tAssetPackUI.installAssetTooltips(_viewer);\n\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public void createControl( Composite parent )\r\n {\n ScrolledComposite tabScroller = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);\r\n tabScroller.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );\r\n tabScroller.setLayout( new GridLayout( 1, false ) );\r\n tabScroller.setExpandHorizontal(true);\r\n tabScroller.setExpandVertical(true);\r\n Composite tab = new Composite(tabScroller, SWT.NONE);\r\n tab.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );\r\n tab.setLayout( new GridLayout( 1, false ) );\r\n\r\n Composite buttons = new Composite(tab, SWT.NONE);\r\n buttons.setLayoutData( new GridData( GridData.HORIZONTAL_ALIGN_CENTER ) );\r\n buttons.setLayout( new GridLayout( 2, false ) );\r\n\r\n setControl( tabScroller );\r\n tabScroller.setContent(tab);\r\n\r\n // Add the relevant controls for selecting parameters\r\n final UpdatableControlIF topFile = ControlRenderingFactory.fileSelectButton(buttons, \"Set top model from file selection\", false, (ConfigFile)getConfigs().get(ConfigGroup.TOP_MODEL_FILE));\r\n /*final Button defaults =*/ this.getDefaultButton(buttons);\r\n\r\n final Composite group2 = new Composite(tab, SWT.SHADOW_IN);\r\n group2.setLayoutData( new GridData(SWT.FILL, SWT.BEGINNING, true,true) );\r\n group2.setLayout( new GridLayout( 2, true ) );\r\n\r\n final Composite leftCol = new Composite(group2, SWT.NONE);\r\n leftCol.setLayoutData( new GridData(SWT.FILL, SWT.BEGINNING, true,true) );\r\n leftCol.setLayout( new GridLayout( 1, true ) );\r\n\r\n final Composite rightCol = new Composite(group2, SWT.NONE);\r\n rightCol.setLayoutData( new GridData(SWT.FILL, SWT.BEGINNING, true,true) );\r\n rightCol.setLayout( new GridLayout( 1, true ) );\r\n\r\n final UpdatableControlIF runDir = ControlRenderingFactory.renderConfigFileSelect((ConfigFile)getConfigs().get(ConfigGroup.RUN_DIR), leftCol, true, true); \r\n final UpdatableControlIF topName = ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.TOP_MODEL_NAME), leftCol); \r\n addControl(ConfigGroup.CACHE_DIR, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.CACHE_DIR), leftCol));\r\n\r\n final Composite leftColShort = new Composite(leftCol, SWT.NONE);\r\n leftColShort.setLayoutData( new GridData(SWT.FILL, SWT.BEGINNING, true,true) );\r\n leftColShort.setLayout( new GridLayout( 2, true ) );\r\n addControl(ConfigGroup.SIM_TIME, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_TIME), leftColShort));\r\n addControl(ConfigGroup.SIM_STEPS, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_STEPS), leftColShort));\r\n addControl(ConfigGroup.SIM_MAX_ERRORS, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_MAX_ERRORS), leftColShort));\r\n addControl(ConfigGroup.SIM_BUFFER_SIZE_WARNING, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_BUFFER_SIZE_WARNING), leftColShort));\r\n \r\n addControl(ConfigGroup.ELABORATE_TOP, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.ELABORATE_TOP), leftColShort));\r\n addControl(ConfigGroup.ENABLE_ASSERTIONS, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.ENABLE_ASSERTIONS), leftColShort));\r\n addControl(ConfigGroup.SIM_BUFFER_IGNORE, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_BUFFER_IGNORE), leftColShort));\r\n addControl(ConfigGroup.SIM_BUFFER_RECORD, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_BUFFER_RECORD), leftColShort));\r\n addControl(ConfigGroup.SIM_TRACE, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_TRACE), leftColShort));\r\n addControl(ConfigGroup.SIM_TYPE_CHECK, ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.SIM_TYPE_CHECK), leftColShort));\r\n \r\n addControl(ConfigGroup.SIM_INPUT_FILE, ControlRenderingFactory.renderConfigFileSelect((ConfigFile)getConfigs().get(ConfigGroup.SIM_INPUT_FILE), rightCol, true, true));\r\n addControl(ConfigGroup.SIM_OUTPUT_FILE, ControlRenderingFactory.renderConfigFileSelect((ConfigFile)getConfigs().get(ConfigGroup.SIM_OUTPUT_FILE), rightCol, true, true));\r\n final UpdatableControlIF modelPath = ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.MODEL_PATH), rightCol); \r\n final UpdatableControlIF modelParams = ControlRenderingFactory.renderConfig(getConfigs().get(ConfigGroup.TOP_MODEL_PARAMS), rightCol); \r\n addControl(ConfigGroup.MESSAGE_SUPPRESS_IDS, ControlRenderingFactory.renderConfig((ConfigList)getConfigs().get(ConfigGroup.MESSAGE_SUPPRESS_IDS), rightCol));\r\n\r\n addControl(ConfigGroup.MODEL_PATH, modelPath);\r\n addControl(ConfigGroup.RUN_DIR, runDir);\r\n addControl(ConfigGroup.TOP_MODEL_NAME, topName);\r\n addControl(ConfigGroup.TOP_MODEL_PARAMS, modelParams);\r\n\r\n // If the user uses the button to set the model by file selection, overide any values in \r\n // the relevent fields\r\n topFile.addModifyListener(new ConfigModificationListener(){\r\n public void registerModification (int type) { \r\n // Set to false to only update in case of no user setting.\r\n final boolean forceUpdate = true;\r\n\r\n ConfigFile topFileConfig = (ConfigFile)getConfigs().get(ConfigGroup.TOP_MODEL_FILE);\r\n // In case of spurious events ignore them (possible?)\r\n if (!topFileConfig.isUserSpecified())\r\n return;\r\n\r\n // Update the run directory whenever the top file is updated\r\n ConfigFile runDirConfig = (ConfigFile)getConfigs().get(ConfigGroup.RUN_DIR);\r\n if (forceUpdate/* || !runDirConfig.isUserSpecified()*/)\r\n runDirConfig.setValue(topFileConfig.getValueFile().getParent(), true);\r\n runDir.updateValue();\r\n\r\n // Update the top level model name\r\n ConfigString topNameConfig = (ConfigString)getConfigs().get(ConfigGroup.TOP_MODEL_NAME);\r\n if (forceUpdate/* || !topNameConfig.isUserSpecified()*/)\r\n {\r\n String name = topFileConfig.getValueFile().getName();\r\n name = name.indexOf('.') > 0 ? name.substring(0, name.lastIndexOf('.')):name;\r\n topNameConfig.setValue(name, true);\r\n }\r\n topName.updateValue();\r\n\r\n // Ensure that the model path contains the run directory\r\n ConfigList modelPathConfig = (ConfigList)getConfigs().get(ConfigGroup.MODEL_PATH);\r\n if (!modelPathConfig.getValue().contains(runDirConfig.getValue()))\r\n {\r\n // The contract for setValue on collections is to append\r\n modelPathConfig.addValue(Collections.singletonList(runDirConfig.getValue()), modelPathConfig.isUserSpecified());\r\n }\r\n modelPath.updateValue();\r\n\r\n // Update the model parameters\r\n ConfigMap paramsConfig = (ConfigMap)getConfigs().get(ConfigGroup.TOP_MODEL_PARAMS);\r\n if (forceUpdate/* || !paramsConfig.isUserSpecified()*/)\r\n {\r\n String[] modelPathArr = (String[])modelPathConfig.getValue().toArray(new String[0]);\r\n try {\r\n List<TopModelParamParse.ModelParameter> params = TopModelParamParse.parseModel(topNameConfig.getValue(), modelPathArr);\r\n Map map = new HashMap();\r\n for (ModelParameter mp : params)\r\n map.put(mp.getName(), mp.getValue());\r\n paramsConfig.setValue(map, false);\r\n } catch (TopModelParamParse.ModelAnalysisException exc) {\r\n Logging.dbg().severe(\"Error loading top model \" + exc);\r\n }\r\n }\r\n modelParams.updateValue();\r\n }\r\n });\r\n\r\n // The topFile control must be added AFTER the above modificationListener is added\r\n // so that the changes instituted there will be reflected in the call to updateLaunchConfigurationDialog().\r\n addControl(ConfigGroup.TOP_MODEL_FILE, topFile);\r\n\r\n tabScroller.setMinSize(tab.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n }", "private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column tb_app_release.serial_no
public String getSerialNo() { return serialNo; }
[ "public String getSerialNo() {\r\n return serialNo;\r\n }", "public String getSerialNo() {\n\t\treturn serialNo;\n\t}", "public java.lang.String getSerialNo () {\n\t\treturn serialNo;\n\t}", "public java.lang.Integer getSerialNo() {\n return serialNo;\n }", "public java.lang.String getProjectSerialNo() {\r\n return projectSerialNo;\r\n }", "public BigDecimal getSERIAL_NO() {\r\n return SERIAL_NO;\r\n }", "public int getSerialNumber(){\r\n return serial;\r\n }", "public Long getSerialId() {\n return serialId;\n }", "public long getSerial() {\n\t\treturn this.serialNumber;\n\t}", "public static String getSerialNumber() {\n String[] propKeys = {\"ro.boot.serialno\", \"ro.serialno\"};\n String value = \"\";\n\n for (String key : propKeys) {\n value = getAndroidSystemProperties(key);\n if (value.length() > 0) {\n break;\n }\n }\n\n return value;\n }", "java.lang.String getSerialNumber();", "java.lang.String getSerialnumber();", "public void setSerialNo(String serialNo) {\r\n this.serialNo = serialNo;\r\n }", "public Integer getCocSerialNo() {\n\t\treturn cocSerialNo;\n\t}", "public Long getSEQ_NBR() {\n return SEQ_NBR;\n }", "public void setSerialNo(String serialNo) {\n\n this.serialNo = serialNo;\n }", "private String getSerialSelectQuery() {\n\t\tString query = \"SELECT serialno from model ;\";\n\t\tlogQuery(query);\n\t\treturn query;\n\t}", "public int getSerial() {\n\t\treturn serial;\n\t}", "public void setSerialNo(java.lang.Integer serialNo) {\n this.serialNo = serialNo;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new PKCS8EncodedKeySpec with the given encoded key.
public PKCS8EncodedKeySpec(byte[] encodedKey) { super(encodedKey); }
[ "public PKCS8EncodedKeySpec getKeySpec(\n Cipher c)\n throws InvalidKeySpecException\n {\n try\n {\n return new PKCS8EncodedKeySpec(c.doFinal(this.getEncryptedData()));\n }\n catch (Exception e)\n {\n throw new InvalidKeySpecException(\"can't get keySpec: \" + e.toString());\n }\n }", "protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec)\r\n throws InvalidKeySpecException\r\n {\r\n if ((key==null)||(keySpec == null))\r\n {\r\n throw new InvalidKeySpecException(\"Null parameter provided.\");\r\n }\r\n\r\n Class specClass = null;\r\n try\r\n {\r\n specClass = Class.forName(\"javax.crypto.spec.PBEKeySpec\");\r\n }\r\n catch (ClassNotFoundException cnfe)\r\n {\r\n throw new InvalidKeySpecException(\"Cannot create\"\r\n +\" KeySpec class not found!\");\r\n }\r\n\r\n // Check if keySpec is the same as or a super class (interface) of\r\n // PBEKeySpec.\r\n\r\n if (keySpec.isAssignableFrom(specClass))\r\n {\r\n\r\n byte [] keyData = key.getEncoded();\r\n char [] rawKeyData = new char[keyData.length];\r\n\r\n // use System.arraycopy?\r\n for (int i=0; i<keyData.length; i++)\r\n {\r\n rawKeyData[i] = (char)(keyData[i]);\r\n }\r\n\r\n // Use reflection to detect constructor of keySpec and create it.\r\n // FIXME: MAYBE JUST DO WHAT (PW) does in BlockParameters.java\r\n // (jh)\r\n\r\n Object [] initArgs = new Object[] {rawKeyData};\r\n\r\n // This is the parameter type the constructor should take.\r\n Class [] constructorArgs = {char[].class};\r\n\r\n KeySpec pks = null;\r\n\r\n // Get constructors.\r\n try\r\n {\r\n Constructor specConstructor =\r\n keySpec.getConstructor(constructorArgs);\r\n\r\n pks = (KeySpec) specConstructor.newInstance(initArgs);\r\n\r\n }\r\n catch (InstantiationException e)\r\n {\r\n throw new InvalidKeySpecException(\"InvalidKeySpec.\");\r\n }\r\n catch (IllegalAccessException e)\r\n {\r\n throw new InvalidKeySpecException(\"IllegalAccess.\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n throw new InvalidKeySpecException(\"Illegal constr. argument.\");\r\n }\r\n catch (InvocationTargetException e)\r\n {\r\n throw new InvalidKeySpecException(\"InvocationTargetException.\");\r\n }\r\n catch (NoSuchMethodException e)\r\n {\r\n throw new InvalidKeySpecException(\"Method not found.\");\r\n }\r\n\r\n return pks;\r\n }\r\n else\r\n {\r\n throw new InvalidKeySpecException(\"Cannot assign to KeySpec.\");\r\n }\r\n\r\n }", "@Value(\"${jwt.encodedKey}\")\n public final void setEncodedKey(String encodedKey) {\n\n byte[] decodedKey = DatatypeConverter.parseBase64Binary(encodedKey);\n this.secretKey = new SecretKeySpec(decodedKey, SIGNATURE_ALGORITHM.getJcaName());\n\n }", "protected KeySpec engineGetKeySpec(\n Key key,\n Class spec)\n throws InvalidKeySpecException\n {\n if (spec.isAssignableFrom(RSAPrivateKeySpec.class) && key instanceof EBRSAKey)\n {\n throw new InvalidKeySpecException(\"EBRSAPrivate key is not extractable\");\n }\n else if (spec.isAssignableFrom(RSAPublicKeySpec.class) && key instanceof EBRSAKey)\n {\n final EBRSAKey k = (EBRSAKey) key;\n\n return new RSAPublicKeySpec(k.getModulus(), k.getPublicExponent());\n }\n else if (spec.isAssignableFrom(EBJSONEncodedUOKeySpec.class) && key instanceof EBRSAKey)\n {\n final EBRSAKey k = (EBRSAKey) key;\n\n return new EBJSONEncodedUOKeySpec(k.toJSON(null));\n }\n else if (spec.isAssignableFrom(EBConfigurationUOKeySpec.class) && key instanceof EBRSAKey)\n {\n final EBRSAKey k = (EBRSAKey) key;\n try {\n return new EBConfigurationUOKeySpec(new EBURLConfig.Builder()\n .setFromEngine(engine)\n .addElement(k, k instanceof EBRSAPrivateKey ? FIELD_RSA_PRIVATE : FIELD_RSA_PUBLIC)\n .build()\n .toString());\n\n } catch (MalformedURLException e) {\n throw new InvalidKeySpecException(\"Exception in generating specs\", e);\n }\n }\n else if (spec.isAssignableFrom(RSAPublicKeySpec.class) && key instanceof RSAPublicKey)\n {\n RSAPublicKey k = (RSAPublicKey)key;\n\n return new RSAPublicKeySpec(k.getModulus(), k.getPublicExponent());\n }\n else if (spec.isAssignableFrom(RSAPrivateKeySpec.class) && key instanceof java.security.interfaces.RSAPrivateKey)\n {\n java.security.interfaces.RSAPrivateKey k = (java.security.interfaces.RSAPrivateKey)key;\n\n return new RSAPrivateKeySpec(k.getModulus(), k.getPrivateExponent());\n }\n else if (spec.isAssignableFrom(RSAPrivateCrtKeySpec.class) && key instanceof RSAPrivateCrtKey)\n {\n RSAPrivateCrtKey k = (RSAPrivateCrtKey)key;\n\n return new RSAPrivateCrtKeySpec(\n k.getModulus(), k.getPublicExponent(),\n k.getPrivateExponent(),\n k.getPrimeP(), k.getPrimeQ(),\n k.getPrimeExponentP(), k.getPrimeExponentQ(),\n k.getCrtCoefficient());\n }\n\n return super.engineGetKeySpec(key, spec);\n }", "public abstract KeySpec getKeySpec(Key key, Class keySpec)\n\t throws InvalidKeySpecException;", "@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 }", "private static SecretKeySpec createKey(String keyStr) throws Exception {\n\t\tbyte[] key = (keyStr).getBytes(\"UTF-8\");\r\n\t\t// aus dem Array einen Hash-Wert erzeugen mit MD5 oder SHA\r\n\t\tMessageDigest sha = MessageDigest.getInstance(\"SHA-256\");\r\n\t\tkey = sha.digest(key);\r\n\t\t// nur die ersten 128 bit nutzen\r\n\t\tkey = Arrays.copyOf(key, 16);\r\n\t\t// der fertige Schluessel\r\n\t\tSecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\r\n\r\n\t\treturn secretKeySpec;\r\n\t}", "public Base64StringKeyGenerator(Base64.Encoder encoder) {\n this(encoder, DEFAULT_KEY_LENGTH);\n }", "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 }", "static SecretKey SecretkeyDecode(String encodedKey, String method) {\n\t\tbyte[] decodedKey = Base64.getDecoder().decode(encodedKey);\n\t\t\t// rebuild key using SecretKeySpec\n\t\treturn new SecretKeySpec(decodedKey, 0, decodedKey.length, method);\n\t\t}", "public static SecretKey loadKey(String hmacKey) {\n\t\treturn new SecretKeySpec(Base64.getDecoder().decode(hmacKey), ALGORITHM);\n\t}", "public MovaSecretKey(byte [] encodedKey){\n\t\tthis.p = new BigInteger(encodedKey);\n\t}", "@CalledByNative\n public static byte[] getPrivateKeyEncodedBytes(PrivateKey key) {\n return key.getEncoded();\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 getPrivateKeyFromPemPKCS8(final String privateKeyStr) {\n try {\n String adjustStr = StringUtils.replace(privateKeyStr, \"-----BEGIN PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----BEGIN RSA PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----END PRIVATE KEY-----\", \"\");\n adjustStr = StringUtils.replace(adjustStr, \"-----END RSA PRIVATE KEY-----\", \"\");\n adjustStr = adjustStr.replace(\"\\n\", \"\");\n\n byte[] buffer = BinaryUtil.fromBase64String(adjustStr);\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(buffer);\n KeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\n return (RSAPrivateKey) keyFactory.generatePrivate(keySpec);\n } catch (Exception e) {\n throw new ClientException(\"Get private key from PKCS8 pem String error: \" + e.getMessage(), e);\n }\n }", "public ByteBuffer encodeKey(K key) {\r\n\t\tfinal ByteArrayOutputStream bos = new ByteArrayOutputStream();\r\n\t\tObjectOutput out = null;\r\n\t\ttry {\r\n\t\t\tout = new ObjectOutputStream(bos);\r\n\t\t\tout.writeObject(key);\r\n\t\t\tout.flush();\r\n\t\t\treturn ByteBuffer.wrap(bos.toByteArray());\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOGGER.error(e);\r\n\t\t}\r\n\t\treturn ByteBuffer.wrap(bos.toByteArray());\r\n\t\t\r\n\t}", "protected SecretKey engineGenerateSecret(KeySpec keySpec)\r\n throws InvalidKeySpecException\r\n {\r\n // Check if parameter is valid.\r\n if ((keySpec==null) || !(keySpec instanceof PBEKeySpec))\r\n {\r\n // FIXME: Anything else to do here?\r\n // We could do keySpec.getEncoded()\r\n throw new InvalidKeySpecException(\r\n \"Cannot generate SecretKey using given KeySpec.\");\r\n }\r\n else\r\n {\r\n // FIXME: We could get a KeySpec which is not a PBEKeySpec\r\n // so it should be possible to convert it!\r\n }\r\n\r\n // keySpec is valid -> cast keySpec\r\n pbeKeySpec = (PBEKeySpec) keySpec;\r\n\r\n // create RawSecretKey using the keySpec.\r\n RawSecretKey key = new RawSecretKey(\"PBE\",new String(pbeKeySpec.getPassword()).getBytes());\r\n\r\n return key;\r\n }", "private PBEKeySpec getKeySpec() {\n PBEKeySpec spec;\n if(salt == null)\n spec = new PBEKeySpec(password);\n else if(keyLength == 0)\n spec = new PBEKeySpec(password, salt, iterations);\n else\n spec = new PBEKeySpec(password, salt, iterations, keyLength);\n return spec;\n }", "public abstract PrivateKey generatePrivate(KeySpec keySpec)\n\t throws InvalidKeySpecException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We must determine if a set has already been tried before, so we don't waste resources trying it again. We don't want to try combinations that have been subsumed by a successful combination, nor do we want to try combinations that have been attempted before.
private static boolean isCombinationAllowed(Set<Set<Integer>> triedCombinations, Set<Set<Integer>> successfulCombinations, Set<Integer> combination, int requiredCombinationSize) { //If a combination doesn't have the right size (ie it was created with duplicate indexes), //we should reject it if (combination.size() != requiredCombinationSize) { return false; } //If we have already tried our combination before, we should not bother trying it again if (triedCombinations.contains(combination)){ return false; } //If some successful combination is a subset of this combination, then this set is subsumed by that set //So we should not bother trying again for (Set<Integer> successfulCombination: successfulCombinations) { if(combination.containsAll(successfulCombination)) { return false; } } //If we got here, it's a potential combination return true; }
[ "public void checkAndRedeal() {\n\t\tcheckForSet();\n\t\twhile (nbrOfSets <= 0) {\n\t\t\tLog.i(\"TagBag\", \"Inget SET\");\n\t\t\tremoveFromActive();\n\t\t\tCollections.shuffle(deckArray);\n\t\t\tplaceCardsOnTable(12);\n\t\t\tcheckForSet();\n\t\t}\n\t}", "public static boolean settleDuplicateTest() {\r\n Sett test12 = new Sett(); // empty sett\r\n test12.settleBadger(33); // Badger with size 33 is added to the sett\r\n // try-catch to catch an exception because a badger with size 33 is added again to the sett\r\n try {\r\n test12.settleBadger(33);\r\n } catch (IllegalArgumentException exc) {\r\n // checks whether the correct message is displayed when the exception is thrown\r\n if (exc.getMessage().equals(\"WARNING: failed to settle the badger with size 33, as there is\"\r\n + \" already a badger with the same size in this sett\"))\r\n return true;\r\n }\r\n return false;\r\n }", "private void createNewItemsetsFromPreviousOnes() {\n // by construction, all existing itemsets have the same size\n int currentSizeOfItemsets = itemsets.get(0).length;\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Creating itemsets of size {0} based on {1} itemsets of size {2}\", new Object[]{currentSizeOfItemsets + 1, itemsets.size(), currentSizeOfItemsets});\n\n HashMap<String, String[]> tempCandidates = new HashMap<>(); //temporary candidates\n\n // compare each pair of itemsets of size n-1\n for (int i = 0; i < itemsets.size(); i++) {\n for (int j = i + 1; j < itemsets.size(); j++) {\n String[] X = itemsets.get(i);\n String[] Y = itemsets.get(j);\n\n assert (X.length == Y.length);\n\n //make a string of the first n-2 tokens of the strings\n String[] newCand = new String[currentSizeOfItemsets + 1];\n for (int s = 0; s < newCand.length - 1; s++) {\n newCand[s] = X[s];\n }\n\n int ndifferent = 0;\n // then we find the missing value\n for (int s1 = 0; s1 < Y.length; s1++) {\n boolean found = false;\n // is Y[s1] in X?\n for (int s2 = 0; s2 < X.length; s2++) {\n if (X[s2].equals(Y[s1])) {\n found = true;\n break;\n }\n }\n if (!found) { // Y[s1] is not in X\n ndifferent++;\n // we put the missing value at the end of newCand\n newCand[newCand.length - 1] = Y[s1];\n }\n\n }\n\n // we have to find at least 1 different, otherwise it means that we have two times the same set in the existing candidates\n assert (ndifferent > 0);\n\n /*if (ndifferent==1) {\n \tArrays.sort(newCand);*/\n tempCandidates.put(Arrays.toString(newCand), newCand);\n //}\n }\n }\n\n //set the new itemsets\n itemsets = new ArrayList<>(tempCandidates.values());\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Created {0} unique itemsets of size {1}\", new Object[]{itemsets.size(), currentSizeOfItemsets + 1});\n\n }", "public void checkForSet() {\n\t\tnbrOfSets = 0;\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(2));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(3));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(4));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(1),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2), activeCards.get(3));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2), activeCards.get(4));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(2),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3), activeCards.get(4));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(3),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(4), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(4), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(4), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(4), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(4), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(4),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(4),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(5), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(5), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(5), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(5), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(5),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(5),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(6), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(6), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(6), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(6),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(6),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(7), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(7), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(7),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(7),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(0), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2), activeCards.get(3));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2), activeCards.get(4));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(2),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3), activeCards.get(4));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(3),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(4), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(4), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(4), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(4), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(4), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(4),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(4),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(5), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(5), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(5), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(5), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(5),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(5),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(6), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(6), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(6), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(6),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(6),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(7), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(7), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(7),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(7),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(1), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3), activeCards.get(4));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(3),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(4), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(4), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(4), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(4), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(4), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(4),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(4),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(5), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(5), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(5), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(5), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(5),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(5),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(6), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(6), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(6), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(6),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(6),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(7), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(7), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(7),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(7),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(2), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(4), activeCards.get(5));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(4), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(4), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(4), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(4), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(4),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(4),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(5), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(5), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(5), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(5), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(5),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(5),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(6), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(6), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(6), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(6),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(6),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(7), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(7), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(7),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(7),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(3), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(5), activeCards.get(6));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(5), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(5), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(5), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(5),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(5),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(6), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(6), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(6), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(6),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(6),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(7), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(7), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(7),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(7),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(4), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(6), activeCards.get(7));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(6), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(6), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(6),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(6),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(7), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(7), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(7),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(7),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(5), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(7), activeCards.get(8));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(7), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(7),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(7),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(6), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(7), activeCards.get(8), activeCards.get(9));\n\t\tisSetOnTable(activeCards.get(7), activeCards.get(8),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(7), activeCards.get(8),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(7), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(7), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(7), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(8), activeCards.get(9),\n\t\t\t\tactiveCards.get(10));\n\t\tisSetOnTable(activeCards.get(8), activeCards.get(9),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(8), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tisSetOnTable(activeCards.get(9), activeCards.get(10),\n\t\t\t\tactiveCards.get(11));\n\t\tLog.i(\"TagBag\", \"SET i kort: \" + nbrOfSets);\n\t}", "@Test\r\n public void testCombinationGuesser() {\r\n final Combination toBeFound = new Combination(0, 3, 7, 9);\r\n final GeneticAlgorithm<Combination> algo = new GeneticAlgorithm<Combination>(c -> c.evaluate(toBeFound), () -> Combination.newInstance(), (first,\r\n second) -> first.merge(second), c -> c.mutate());\r\n\r\n algo.setShuffler(list -> {\r\n Collections.shuffle(list, random);\r\n });\r\n algo.initialize(9);\r\n algo.iterate(10, 5, 20, 20, 20);\r\n //algo.printTo(System.err);\r\n assertEquals(toBeFound, algo.best());\r\n }", "@Test\n\tpublic void testAddDuplicates()\n\t{\n\t\tassertTrue(set.add(\"Psy\"));\n\t\tassertFalse(set.add(\"Psy\"));\n\t}", "public Set<List<String>> getCombination(int[] inHand) {\n Set<List<String>> result = new HashSet<>();\n for (int i = 0; i < inHand.length; i++) {\n if (inHand[i] < 1) continue;\n int[] copyHand = copyArray(inHand);\n //possibility of A AA AAA\n for (int j = 1; j <= inHand[i]; j++) {\n if (j == 1) {\n String cSet = \"\";\n\n for (int seq = i; seq <= i + 2; seq++) {\n if (seq >= inHand.length || copyHand[seq] < 1) continue;\n cSet += seq;\n copyHand[seq] -= 1;\n }\n// System.out.println(\"i: \" + i + \" j: \" + j+\"inhand: \" + arrayToString\n// (inHand));\n\n Set<List<String>> a = getCombination(copyHand);\n Set<List<String>> newA = new HashSet<>();\n for (List<String> s : a) {\n s.add(cSet);\n s.sort(Comparator.naturalOrder());\n if (s.equals(\"\")) continue;\n newA.add(s);\n }\n result.addAll(newA);\n continue;\n }\n\n String currentSet = \"\";\n int[] copyOfInHand = copyArray(inHand);\n for (int t = 0; t < j; t++) {\n currentSet += i;\n }\n\n copyOfInHand[i] -= j;\n Set<List<String>> after = getCombination(copyOfInHand);\n Set<List<String>> newAfter = new HashSet<>();\n for (List<String> s : after) {\n s.add(currentSet);\n s.sort(Comparator.naturalOrder());\n newAfter.add(s);\n }\n result.addAll(newAfter);\n }\n }\n if (result.isEmpty()) result.add(new ArrayList<>());\n int min = result.stream().map(set -> set.size()).min(Comparator\n .naturalOrder()).get();\n Set<List<String>> minSets = result.stream().filter(set -> set.size() == min)\n .collect(Collectors\n .toSet());\n// combinationCache.put(inHand, minSets);\n return minSets;\n }", "private void addToWorkingSet(Literal guess) {\n for (int i = 0; i < workingSet.size(); i++) {\n if (guess.get() < workingSet.get(i).get()) {\n workingSet.add(i, new Literal(guess.get(), true));\n return;\n }\n }\n workingSet.add(new Literal(guess.get(), true));\n }", "public static boolean check(ArrayList<Integer> set){\n\t\t{\n\t\t\tint setA = set.get(0) + set.get(1);\n\t\t\tint setB = set.get(set.size()-1);\n\t\t\tfor(int i = 2; i <= set.size()/2; i++){\n\t\t\t\tsetA+=set.get(i);\n\t\t\t\tsetB+=set.get(set.size()-i);\n\t\t\t\tif(setA <= setB) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//rule 1 - expensive\n\t\t// setA, setB : represents two sets as binary digits\n\t\t// setA & setB = 0 a must for sets to be disjoint\n\t\t// setA > setB to avoid duplicate entries\t\t\n\t\tint LIMIT = (int)Math.pow(2, set.size());\n\t\tfor(int setA = 1; setA < LIMIT; setA++){\n\t\t\tint _setA = setA;\n\t\t\tint LIMIT2 = 1;\n\t\t\twhile( _setA > 1 ){\n\t\t\t\tif( (_setA & 1 ) == 0 ) LIMIT2 <<= 1;\n\t\t\t\t_setA >>= 1;\n\t\t\t}\n\t\t\tfor(int setB = 1; setB < LIMIT2; setB++){\n\t\t\t\t_setA = setA;\n\t\t\t\tint _setB = setB;\n\t\t\t\tint sumA = 0, sumB = 0;\n\t\t\t\tint index = 0;\t\t\t\t\n\t\t\t\t\n\t\t\t\twhile( _setA > 0){\n\t\t\t\t\tif( (_setA & 1) == 1)\n\t\t\t\t\t\tsumA += set.get(index);\n\t\t\t\t\telse{\n\t\t\t\t\t\tif( (_setB & 1 ) == 1 )\n\t\t\t\t\t\t\tsumB += set.get(index);\n\t\t\t\t\t\t_setB >>= 1;\n\t\t\t\t\t}\t\n\t\t\t\t\tindex++;\n\t\t\t\t\t_setA >>= 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( sumA == sumB ) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean hasMoreCombination() {\n\t\treturn cursor < combos.length;\n\t}", "protected void checkSubsetsAreGenerated() {\r\n\t\t// Grab a set of subsets for each region if required:\r\n\t\tif (subsetsForEachRegion1 == null) {\r\n\t\t\tsubsetsForEachRegion1 = rg.generateNRandomSets(totalVars1, jointVars1, maxNumSubsets); \r\n\t\t\tsubsetsForEachRegion2 = rg.generateNRandomSets(totalVars2, jointVars2, maxNumSubsets); \r\n\t\t\tnumOfSets = Math.min(subsetsForEachRegion1.length, subsetsForEachRegion2.length);\r\n\t\t}\r\n\t}", "private static boolean fillSet(final int atLeast, final SortedSet<PeerStatistic> set,\n final Map<Number160, PeerStatistic> tmp) {\n synchronized (tmp) {\n for (final PeerStatistic peerStatistic : tmp.values()) {\n \tset.add(peerStatistic);\n }\n }\n return set.size() >= atLeast;\n }", "public boolean guessWasSet();", "public boolean recomputeSets() {\n\t\tSet<NodeWithStack> endPoints = new HashSet<>();\n\t\tSet<NodeWithStack> reachablesWithStack = new HashSet<>();\n\t\tassert (!(this.getNode() instanceof EndNode && this.getNode().getParent() instanceof ParallelConstruct));\n\t\tfor (NodeWithStack succ : this.getNode().getInfo().getCFGInfo()\n\t\t\t\t.getInterProceduralLeafSuccessors(this.getCallStack())) {\n\t\t\tSet<NodeWithStack> someEndPoints = new HashSet<>();\n\t\t\treachablesWithStack\n\t\t\t\t\t.addAll(CollectorVisitor.collectNodesIntraTaskForwardBarrierFreePath(succ, someEndPoints));\n\t\t\treachablesWithStack.add(succ);\n\t\t\treachablesWithStack.addAll(someEndPoints);\n\t\t\tendPoints.addAll(someEndPoints);\n\t\t}\n\n\t\tSet<Node> newReachableNodeSet;\n\t\tSet<EndPhasePoint> newNextBarrierSet;\n\t\tnewReachableNodeSet = new HashSet<>();\n\t\tfor (NodeWithStack nodeWithStack : reachablesWithStack) {\n\t\t\tnewReachableNodeSet.add(nodeWithStack.getNode());\n\t\t}\n\t\tnewNextBarrierSet = new HashSet<>();\n\t\tfor (NodeWithStack nodeWithStack : endPoints) {\n\t\t\tnewNextBarrierSet.add(new EndPhasePoint(nodeWithStack.getNode(), nodeWithStack.getCallStack()));\n\t\t}\n\t\t// Equate reachableNodeSet to newReachableNodeSet.\n\t\tif (reachableNodeSet == null) {\n\t\t\treachableNodeSet = new HashSet<>();\n\t\t}\n\t\tboolean changed = this.reachableNodeSet.retainAll(newReachableNodeSet);\n\t\tchanged |= this.reachableNodeSet.addAll(newReachableNodeSet);\n\n\t\t// Equate nextBarrierSet to newNextBarrierSet.\n\t\tif (this.nextBarrierSet == null) {\n\t\t\tthis.nextBarrierSet = new HashSet<>();\n\t\t}\n\t\tchanged |= this.nextBarrierSet.retainAll(newNextBarrierSet);\n\t\tchanged |= this.nextBarrierSet.addAll(newNextBarrierSet);\n\t\t// this.setsInvalid = false;\n\t\treturn changed;\n\t}", "private void checkForDuplicates()\n {\n boolean keyAlreadyDefined = duplicateCheck(selection);\n \n if(keyAlreadyDefined)\n {\n duplicateWarning = true;\n }\n else\n {\n duplicateWarning = false;\n keyCodeIndex ++;\n ChoiceHandler.setChoice(0);\n selectDown();\n }\n }", "private Set<Set<Move>> combinations(Set<Set<Move>> original) {\n Set<Set<Move>> combined = new HashSet<>();\n for (Set<Move> set : original) {\n combined = sprinkle(combined,set);\n }\n return combined;\n }", "private void checkOneChain(TableEntry entry) {\r\n if (entry.index == 0) {\r\n // table is empty -> nothing to do\r\n return;\r\n }\r\n // chain contains the invers of the assumption -> assumption is false\r\n if ((entry.isStrong(0) && entry.offSets[entry.getCandidate(0)].contains(entry.getCellIndex(0)))\r\n || (!entry.isStrong(0) && entry.onSets[entry.getCandidate(0)].contains(entry.getCellIndex(0)))) {\r\n globalStep.reset();\r\n globalStep.setType(SolutionType.FORCING_CHAIN_CONTRADICTION);\r\n if (entry.isStrong(0)) {\r\n globalStep.addCandidateToDelete(entry.getCellIndex(0), entry.getCandidate(0));\r\n } else {\r\n globalStep.addIndex(entry.getCellIndex(0));\r\n globalStep.addValue(entry.getCandidate(0));\r\n }\r\n globalStep.setEntity(Sudoku2.CELL);\r\n globalStep.setEntityNumber(tmpSet.get(0));\r\n resetTmpChains();\r\n addChain(entry, entry.getCellIndex(0), entry.getCandidate(0), !entry.isStrong(0));\r\n replaceOrCopyStep();\r\n }\r\n // same candidate set in and deleted from a cell -> assumption is false\r\n for (int i = 0; i < entry.onSets.length; i++) {\r\n // check all candidates\r\n tmpSet.set(entry.onSets[i]);\r\n tmpSet.and(entry.offSets[i]);\r\n if (!tmpSet.isEmpty()) {\r\n globalStep.reset();\r\n globalStep.setType(SolutionType.FORCING_CHAIN_CONTRADICTION);\r\n if (entry.isStrong(0)) {\r\n globalStep.addCandidateToDelete(entry.getCellIndex(0), entry.getCandidate(0));\r\n } else {\r\n globalStep.addIndex(entry.getCellIndex(0));\r\n globalStep.addValue(entry.getCandidate(0));\r\n }\r\n globalStep.setEntity(Sudoku2.CELL);\r\n globalStep.setEntityNumber(tmpSet.get(0));\r\n resetTmpChains();\r\n addChain(entry, tmpSet.get(0), i, false);\r\n addChain(entry, tmpSet.get(0), i, true);\r\n replaceOrCopyStep();\r\n }\r\n }\r\n // two different values set in one and the same cell -> assumption is false\r\n for (int i = 1; i < entry.onSets.length; i++) {\r\n for (int j = i + 1; j < entry.onSets.length; j++) {\r\n tmpSet.set(entry.onSets[i]);\r\n tmpSet.and(entry.onSets[j]);\r\n if (!tmpSet.isEmpty()) {\r\n globalStep.reset();\r\n globalStep.setType(SolutionType.FORCING_CHAIN_CONTRADICTION);\r\n if (entry.isStrong(0)) {\r\n globalStep.addCandidateToDelete(entry.getCellIndex(0), entry.getCandidate(0));\r\n } else {\r\n globalStep.addIndex(entry.getCellIndex(0));\r\n globalStep.addValue(entry.getCandidate(0));\r\n }\r\n globalStep.setEntity(Sudoku2.CELL);\r\n globalStep.setEntityNumber(tmpSet.get(0));\r\n resetTmpChains();\r\n addChain(entry, tmpSet.get(0), i, true);\r\n addChain(entry, tmpSet.get(0), j, true);\r\n replaceOrCopyStep();\r\n }\r\n }\r\n }\r\n // one value set twice in one house\r\n checkHouseSet(entry, Sudoku2.LINE_TEMPLATES, Sudoku2.LINE);\r\n checkHouseSet(entry, Sudoku2.COL_TEMPLATES, Sudoku2.COL);\r\n checkHouseSet(entry, Sudoku2.BLOCK_TEMPLATES, Sudoku2.BLOCK);\r\n\r\n // cell without candidates -> assumption false\r\n // chain creates a cell without candidates (delete sets OR ~allowedPositions, AND all\r\n // together, AND with ~set sets -> must not be 1\r\n // CAUTION: exclude all cells in which a value is already set\r\n tmpSet.setAll();\r\n for (int i = 1; i < entry.offSets.length; i++) {\r\n tmpSet1.set(entry.offSets[i]);\r\n tmpSet1.orNot(finder.getCandidates()[i]);\r\n tmpSet.and(tmpSet1);\r\n }\r\n for (int i = 0; i < entry.onSets.length; i++) {\r\n tmpSet.andNot(entry.onSets[i]);\r\n }\r\n tmpSet2.clear();\r\n for (int i = 1; i < finder.getPositions().length; i++) {\r\n tmpSet2.or(finder.getPositions()[i]);\r\n }\r\n tmpSet.andNot(tmpSet2);\r\n if (!tmpSet.isEmpty()) {\r\n for (int i = 0; i < tmpSet.size(); i++) {\r\n globalStep.reset();\r\n globalStep.setType(SolutionType.FORCING_CHAIN_CONTRADICTION);\r\n if (entry.isStrong(0)) {\r\n globalStep.addCandidateToDelete(entry.getCellIndex(0), entry.getCandidate(0));\r\n } else {\r\n globalStep.addIndex(entry.getCellIndex(0));\r\n globalStep.addValue(entry.getCandidate(0));\r\n }\r\n globalStep.setEntity(Sudoku2.CELL);\r\n globalStep.setEntityNumber(tmpSet.get(i));\r\n resetTmpChains();\r\n int[] cands = sudoku.getAllCandidates(tmpSet.get(i));\r\n for (int j = 0; j < cands.length; j++) {\r\n addChain(entry, tmpSet.get(i), cands[j], false);\r\n }\r\n if (entry.isStrong(0)) {\r\n replaceOrCopyStep();\r\n } else {\r\n replaceOrCopyStep();\r\n }\r\n }\r\n }\r\n // all instances of a candidate delete from a house -> assumption is false\r\n checkHouseDel(entry, Sudoku2.LINE_TEMPLATES, Sudoku2.LINE);\r\n checkHouseDel(entry, Sudoku2.COL_TEMPLATES, Sudoku2.COL);\r\n checkHouseDel(entry, Sudoku2.BLOCK_TEMPLATES, Sudoku2.BLOCK);\r\n }", "@Test\n public void testGetAllButNoDuplicates_Question4a() {\n System.out.println(\"getAllButNoDuplicates -- Question 4a\");\n Set<MediaItem> inputSet1 = new HashSet<>(); \n inputSet1.addAll(TestHelper.getAllBillEvans1());\n inputSet1.addAll(TestHelper.getAllBudPowell1());\n inputSet1.add(TestHelper.oscarPeterson1b());\n\n Set<MediaItem> inputSet2 = TestHelper.getStandardSet();\n \n DuplicateFinder instance = new DuplicateFindFromID3();\n \n Set<MediaItem> expResult = TestHelper.getStandardSet();\n // System.out.println(\"Expected result =\" + expResult);\n Set<MediaItem> result = instance.getAllButNoDuplicates(inputSet1, inputSet2);\n assertSameMedia(expResult, result);\n }", "private void checkCombination(int[] indexArr){\n for(int j = 0; j < indexArr.length; j++){\n if(indexArr[j] >= numOfItems) //if index value greater than number of items exit\n return;\n }\n\n for(int i = 0; i < indexArr.length; i++) { \n for(int j = i + 1; j < indexArr.length; j++) { \n if(indexArr[i] == indexArr[j]){ //if the same index is duplicated exit, can't use same element twice (won't happen with our combos but safety net)\n return; \n }\n } \n } \n\n String myItems[][] = new String[number][categories.length]; //creates an empty 2D array the size of the furniture pieces and # of items requested to know whether the combo is sucesfful\n\n for(int num = 0; num < number; num++){\n for(int cat = 0; cat < myItems[0].length; cat++){\n myItems[num][cat] = \"N\"; //default nothing has been added all furniture items are N\n }\n }\n \n for(int j = 0; j < indexArr.length; j++){\n for(int category = 0; category < myItems[0].length; category++){\n for(int num = 0; num < number; num++){ //go down the category to fulfill other orders if ones before already Y for that furniture piece\n if(myItems[num][category].equals(\"N\")){\n myItems[num][category] = typeAvailable[indexArr[j]][category]; //copies in the Y and N values at the given index to our items array to see if can fill up the whole thing with Y\n break;\n }\n }\n }\n }\n\n if(comboFound(myItems)){ //if our array is all Y, sucesfull combo!\n this.fulfilled = true;\n Integer price = 0;\n\n for(int i = 0; i < indexArr.length; i++){\n price += Integer.parseInt(itemsAvailablePrice[indexArr[i]]); //set temp price variable as addition of all prices at inputed index\n }\n\n if(this.cheapestPrice == 0){ //no other combo has been sucesfull previously\n this.cheapestPrice = price; //set private variable cheapestPrice to temporary price\n int j = 0;\n this.itemCombination = new String[indexArr.length];\n for(int i = 0; i < indexArr.length; i++){ \n this.itemCombination[j] = itemIds[indexArr[i]]; //set itemCombination array to the IDs at inputed index\n j++;\n } \n } else if(this.cheapestPrice > price){ //another combo was sucesfull but our price is cheaper\n this.cheapestPrice = price;\n int j = 0;\n this.itemCombination = new String[indexArr.length];\n for(int i = 0; i < indexArr.length; i++){\n this.itemCombination[j] = itemIds[indexArr[i]];\n j++;\n } \n } \n }\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new SortingFocusTraversalPolicy with the given comparator set.
public SortingFocusTraversalPolicy(Comparator comparator) { this.comparator = comparator; }
[ "public SortingFocusTraversalPolicy(Comparator comparator) {\n\tthis.comparator = comparator;\n }", "LayoutFocusTraversalPolicy(Comparator<? super Component> c) {\n super(c);\n }", "protected SortingFocusTraversalPolicy() {\n }", "public SortedList(Comparator<T> comparator){\n this(null, comparator);\n }", "protected void setComparator(Comparator comparator) {\n\tthis.comparator = comparator;\n }", "protected Comparator<?> getInitialSortOrderComparator() {\n MetaData md = PmTableImpl.this.getOwnMetaDataWithoutPmInitCall();\n return (md.initialBeanSortComparatorClass != null)\n ? (Comparator<?>)ClassUtil.newInstance(md.initialBeanSortComparatorClass)\n : null;\n }", "public static <T> PriorityQueue<T> of(Comparator<? super T> comparator, int initialCapacity) {\n\t\treturn new PriorityQueue<>(comparator, initialCapacity);\n\t}", "public SortCommand(Comparator<Record> comparator) {\n requireNonNull(comparator);\n this.comparator = comparator;\n }", "public void setComparator(Comparator<T> comparator){\n if(comparator != null){\n this.comparator = comparator;\n }\n else{\n this.comparator = new DefaultComparator();\n }\n\n Collections.sort(list, this.comparator);\n }", "Comparator createComparatorRange();", "public Enumerable<T> orderBy(Comparator<T> comparator) {\n return new Enumerable<>(() -> new OrderIterator<>(iterator(), comparator));\n }", "public ExportedService setComparator(String cmp) {\n m_comparator = cmp;\n return this;\n }", "public static <T> PriorityQueue<T> of(Comparator<? super T> comparator) {\n\t\treturn new PriorityQueue<>(comparator);\n\t}", "default Stream<T> sorted(Comparator<T> comparator) {\n return stream().sorted(comparator);\n }", "public static <T> Comparator<T> chain(final List<Comparator<? super T>> c) {\n return new Comparator<T>() {\n public int compare(T o1, T o2) {\n int x = 0;\n Iterator<Comparator<? super T>> it = c.iterator();\n while (x == 0 && it.hasNext()) {\n x = it.next().compare(o1, o2);\n }\n return x;\n }\n };\n }", "public ActivityIteratorExpressionBuilder setOrderByPriority(boolean ascending);", "@SafeVarargs\r\n public Blenderator(final Comparator<T> comparator,\r\n Spliterator<T>... spliterators)\r\n {\r\n this(comparator, Arrays.asList(spliterators));\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic MyMinPriorityQueue( int initCapacity, Comparator<Key> comparator) \n\t{\n\t\tthis.comparator = comparator;\n\t\tpq = (Key[]) new Object[initCapacity + 1];\n\t\tN = 0;\n\t}", "public SortedSqrtDecomposition(Comparator<T> comparator) {\n this(10, comparator);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends a ControlToken.BOARDREQUEST to the first client in the vector, who presumably has the updated positions.
public void requestBoard(){ try { clientThreads.get(0).getOOS().writeObject( new DataWrapper(DataWrapper.CTCODE, new ControlToken(ControlToken.BOARDREQUEST))); } catch(IOException ioe){ ioe.printStackTrace(); } }
[ "@Override\r\n public void update(ActionMessage message) {\r\n\r\n if(message instanceof ActionRequest){\r\n String s=((ActionRequest) message).getAction();\r\n switch(s){\r\n case \"move\"-> status.resetStatus(PerformingAction.MOVE);\r\n case \"build\"-> status.resetStatus(PerformingAction.BUILD);\r\n case \"end\"-> {\r\n status.resetStatus(PerformingAction.UNSET);\r\n connection.send(new EndChoice());\r\n }\r\n case \"quit\"-> {\r\n status.resetStatus(PerformingAction.UNSET);\r\n connection.send(new QuitChoice());\r\n }\r\n }\r\n }\r\n\r\n else if(message instanceof BoardSelection){\r\n\r\n int x=((BoardSelection) message).getX();\r\n int y=((BoardSelection) message).getY();\r\n\r\n if(status.getCurrentAction()==PerformingAction.UNSET){\r\n JOptionPane.showMessageDialog(frame,\"You must select the action to perform before using the board\",\"Error Message\",JOptionPane.ERROR_MESSAGE);\r\n }else{\r\n //if worker is not assigned yet, it is the next thing to select\r\n if(status.getChosenWorker()==-1){\r\n int w=checkOwnWorkerPosition(x,y);\r\n if(w==-1){\r\n JOptionPane.showMessageDialog(frame,\"You must select a cell that contains one of your workers\",\"Error Message\",JOptionPane.ERROR_MESSAGE);\r\n }else{\r\n status.setChosenWorker(w);\r\n }\r\n //if the worker has already been selected, coordinates are saved\r\n }else {\r\n status.setTowardsX(x);\r\n status.setTowardsY(y);\r\n\r\n //if player was moving, move information is sent\r\n if (status.getCurrentAction() == PerformingAction.MOVE) {\r\n connection.send(new MoveData(status.getChosenWorker()-1, status.getTowardsX(), status.getTowardsY()));\r\n }\r\n //if player was building, requests what to build and then send\r\n else {\r\n String request=\"What piece type do you want to build?\";\r\n String title=\"Piece type selection\";\r\n String[] options={\"Block\",\"Dome\"};\r\n int choice=JOptionPane.showOptionDialog(frame,request,title,JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[0]);\r\n String pieceType;\r\n if(choice==JOptionPane.YES_OPTION){\r\n pieceType=options[0];\r\n }else{\r\n pieceType=options[1];\r\n }\r\n connection.send(new BuildData(status.getChosenWorker()-1,status.getTowardsX(),status.getTowardsY(),pieceType));\r\n }\r\n //reset after send\r\n status.resetStatus(PerformingAction.UNSET);\r\n }\r\n }\r\n\r\n }\r\n\r\n else if(message instanceof PlayerPersonalData){\r\n connection.send(((PlayerPersonalData) message).getPlayerInfo());\r\n\r\n }\r\n\r\n else if(message instanceof SelectedGods){\r\n connection.send(((SelectedGods) message).getCardChoice());\r\n\r\n }\r\n\r\n else if(message instanceof StartingPlacement){\r\n connection.send(((StartingPlacement) message).getStartingPositionChoice());\r\n }\r\n }", "public void run() {\n GlobalLogger.log(this, LogLevel.INFO, \"STARTING RequestThread\");\n while(true) {\n int request = client.recvInt();\n if (request == -2147483648) {\n return;\n }\n int i;\n int d;\n int id;\n int x;\n int y;\n switch(request) {\n case 0xC0:\n mustSync = true;\n break;\n case 1:\n i = receiveUntilNotSync();\n d = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"Updating direction of client %d to %d\",i, d);\n if(getOpponentByClientId(i) != null) getOpponentByClientId(i).setDirection(d);\n break;\n case 2:\n id = receiveUntilNotSync();\n x = receiveUntilNotSync();\n y = receiveUntilNotSync();\n MySnakeMultiplayerOpponent newopponent = new MySnakeMultiplayerOpponent(id);\n GlobalLogger.log(this, LogLevel.INFO, \"New opponent at id %d, on pos (%d,%d)\",id,x,y);\n newopponent.addPiece(new MySnakePiece(x,y));\n newopponent.addPiece(new MySnakePiece(x+1,y));\n opponents.add(newopponent);\n break;\n case 3:\n id = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"Apple eaten by opponent %d!\", id);\n if(getOpponentByClientId(id) != null) getOpponentByClientId(id).addPiece(new MySnakePiece(getOpponentByClientId(id).getSnake().get(getOpponentByClientId(id).getSnake().size()-1).getX(), getOpponentByClientId(id).getSnake().get(getOpponentByClientId(id).getSnake().size()-1).getY()));\n break;\n case 4:\n x = receiveUntilNotSync();\n y = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"New apple pos is (%d,%d)\",x,y);\n apple.x = x;\n apple.y = y;\n break;\n case 5:\n int playern = receiveUntilNotSync();\n // GlobalLogger.log(this, LogLevel.INFO, \"Global sync received\");\n // GlobalLogger.log(this, LogLevel.INFO, \"%d players currently connected (besides you)\", playern);\n for(int k=0; k<playern; k++) {\n id = receiveUntilNotSync();\n MySnakeMultiplayerOpponent currentOpponent = getOpponentByClientId(id);\n if(currentOpponent != null) {\n currentOpponent.setDirection(client.recvInt());\n int tailsn = receiveUntilNotSync();\n for(int j=0; j<tailsn; j++) {\n int tailx = receiveUntilNotSync();\n int taily = receiveUntilNotSync();\n currentOpponent.getSnake().get(j).setX(tailx);\n currentOpponent.getSnake().get(j).setY(taily);\n }\n }\n }\n\n int controlcode = receiveUntilNotSync();\n if(controlcode != 1908) {\n GlobalLogger.log(this, LogLevel.SEVERE, \"Something went horribly wrong. Got %d for control code\", controlcode);\n } else {\n // GlobalLogger.log(this, LogLevel.INFO, \"Seems like everything went smoothly :D! Noice!\");\n }\n break;\n case 6:\n fuckingDead = true;\n break;\n\n case 7:\n id = receiveUntilNotSync();\n opponents.remove(getOpponentByClientId(id));\n break;\n\n default:\n GlobalLogger.log(this, LogLevel.SEVERE, \"Invalid request %d received from server\", request);\n this.stop();\n break;\n }\n }\n }", "public void receiveRequest(Request request){\n int newDestination= request.getDestinationFloor();\n if(emergency){\n System.out.println(\"The elevator is out of order until the emergency is lifted\");\n return;\n }\n if(toDoList.isEmpty()){\n this.destinationFloor= newDestination;\n this.direction=request.getDirection();\n toDoList.add(destinationFloor);\n }\n else if(direction==Direction.UP){\n\n if(destinationFloor>=newDestination && newDestination>=currentFloor){\n toDoList.add(0,newDestination);\n destinationFloor= newDestination;\n\n }\n else{\n toDoList.add(toDoList.size(),newDestination);\n }\n }\n else if(direction==Direction.DOWN){\n if(destinationFloor<=newDestination && newDestination<=currentFloor){\n toDoList.add(0,newDestination);\n destinationFloor= newDestination;\n toDoList.add(0,newDestination);\n }\n else{\n toDoList.add(toDoList.size(),newDestination);\n }\n }\n\n }", "private void networkClient(java.awt.event.MouseEvent evt) {\n\t\tgameChoice = 'c';\n\t\twindowComplete = true;\n\t}", "public void selectedABoard() {\n drawSelectedWhiteboard();\n log.info(\"selected board: \" + selectedBoard.getName());\n\n //To send the listenBoard event to peer itself to keep listening the selection of board.\n // It should only be captured by peer's own.\n // Then the event should trigger the collaboration.\n if (indexClientEndpoint != null) {\n indexClientEndpoint.emit(listenBoard, myEventInfo(selectedBoard.getName()));\n }\n }", "private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed\n String str = requestCommand.getText();\n sC.sendCommand(str); \n requestCommand.requestFocus();\n }", "private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getActionCommand().equals(\"DRAW\")){\n if(numOfCardToDraw==2)\n mainFrame.getRemoteView().notify(new DrawPowerUpCards(\"\", mainFrame.getRemoteView().getNetworkHandler().getClient().getNickname(),2));\n if(numOfCardToDraw==1) {\n mainFrame.getRemoteView().notify(new DrawPowerUpCards(\"\", mainFrame.getRemoteView().getNetworkHandler().getClient().getNickname(), 1));\n }\n }\n dialogForRequestToDraw.setVisible(false);\n }", "private void reservePoint(){\n // Check if another client currently has that position.\n\n /* Add to client list */\n String rc_name = packetFromRC.client_name;\n Point rc_point = packetFromRC.client_location;\n\n\n MazePacket serverResponse = new MazePacket();\n serverResponse.packet_type = MazePacket.RESERVE_POINT; \t \n\n if(data.setPosition(rc_name,rc_point)){\n serverResponse.error_code = 0;\n debug(\"reserving position successful. \" + rc_name );\n }else{\t\n serverResponse.error_code = MazePacket.ERROR_RESERVED_POSITION;\n debug(\"Reserving position failed. \" + rc_name );\n }\n\n try{\n cout.writeObject(serverResponse);\n\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"server done broke\");\n }\n }", "void userMoveRequested(int playerIndex);", "private void predefinedSendRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_predefinedSendRedActionPerformed\n // TODO add your handling code here:\n String commandString = \"\";\n String selectedMessage = (String) messages.getSelectedItem();\n String[] titleKey = selectedMessage.split(\"\\\\. \");\n System.out.println(selectedMessage);\n String lineTitle = titleKey[1].trim();\n System.out.println(\"Clicked - red predef message: \" + lineTitle);\n for (int i = 0; i < lines.size(); i++) {\n String line = (String) lines.get(i);\n if (line.contains(lineTitle)) {\n String current = (String) lines.get(i);\n String[] parts = current.split(\";\");\n commandString = parts[2];\n }\n }\n \n String sendString = \"VR\" + commandString;\n \n sendRawMessage(sendString);\n }", "public static void sendElectionRequest()\n {\n System.out.println(\"INFO : Election initiated\");\n int numberOfFailedRequests = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if( key > ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n try {\n MessageTransfer.sendServer(\n ServerMessage.getElection( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent election request to s\"+destServer.getServerID());\n }\n catch(Exception e){\n System.out.println(\"WARN : Server s\"+destServer.getServerID() +\n \" has failed, cannot send election request\");\n numberOfFailedRequests++;\n }\n }\n\n }\n if (numberOfFailedRequests == ServerState.getInstance().getNumberOfServersWithHigherIds()) {\n if(!electionInProgress){\n //startTime=System.currentTimeMillis();\n electionInProgress = true;\n receivedOk = false;\n Runnable timer = new BullyAlgorithm(\"Timer\");\n new Thread(timer).start();\n }\n }\n }", "public void sendToCurrClient ( String message ){\n currClient.send( message );\n ServerConnection[] clients = new ServerConnection[]{client1, client2, client3};\n for(ServerConnection c: clients){\n if(c != currClient && c != null )\n if ( !message.contains(\"You won\") )\n c.send(\"Wait for \" + currClient.getName() + \" to end his turn\" );\n else c.send(\"You lost the match. \" + currClient.getName() + \" won the game.\");\n }\n }", "public void singlePlayerSelected()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startSinglePlayerGame();\n }", "public synchronized void informPlaneReadyForBoarding() {\n\t\tClientCom com = new ClientCom (serverHostName, serverPortNumb);\n\n\t\twhile(!com.open()){\n\t\t\ttry {\n\t\t\t\tThread.currentThread ();\n\t\t\t\tThread.sleep ((10));\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t}\n\t\t}\n\n\t\tMessage msg = new Message(MessageType.INFORM_PLANE_READY_FOR_BOARDING);\n\t\tcom.writeObject(msg);\n\t\tMessage inMessage = (Message) com.readObject();\n\t\tcom.close ();\n\t}", "public void recieveVector(CVector vector){\n recievedVectors.add(vector);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n respondFriendRequest(idC, cmc, guidemo, sm);\n }", "public void sendLobby() {\n if(playerNumberSelect.getValue().equals(\"3 players\")) {\n sender.sendInput(\"3\");\n } else {\n sender.sendInput(\"2\");\n }\n }", "public void requestLeaderboard() {\r\n connection.requestLeaderboard();\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the first position point and shifts the rest of the points accordingly. Returns the vector that it shifted all the points by
public Vector2f setFirstPositionAndShiftAll(Vector2f n) { Vector2f d = n.pureSubtract(pts[0]); shiftAllPoints(d); bounds.shiftRectangleBy(d); return d; }
[ "public Vector2f setFirstPositionAndShiftAll(float x, float y)\n\t{\n\t\treturn setFirstPositionAndShiftAll(new Vector2f(x, y));\n\t}", "@Test public void setAllPoints()\n\t{\n\n\t\t{\n\t\t\tPolygon p = new Polygon(new Vector2f(0, 0),\n\t\t\t\t\t\tnew Vector2f(1, 1));\n\n\t\t\tp.setFirstPositionAndShiftAll(3, 3);\n\n\t\t\tVector2fTest.assertVectorsAreEqual(p.pts()[0], 3, 3);\n\t\t\tVector2fTest.assertVectorsAreEqual(p.pts()[1], 4, 4);\n\t\t}\n\n\t\t{\n\t\t\tPolygon p = new Polygon(new Vector2f(4, 4),\n\t\t\t\t\t\tnew Vector2f(1, 1));\n\n\t\t\tp.setFirstPositionAndShiftAll(3, 3);\n\n\t\t\tVector2fTest.assertVectorsAreEqual(p.pts()[0], 3, 3);\n\t\t\tVector2fTest.assertVectorsAreEqual(p.pts()[1], 0, 0);\n\t\t}\n\n\t\t{\n\t\t\tPolygon p = new Polygon(new Vector2f(-4, -4),\n\t\t\t\t\t\tnew Vector2f(1, 1));\n\n\t\t\tp.setFirstPositionAndShiftAll(3, 3);\n\n\t\t\tVector2fTest.assertVectorsAreEqual(p.pts()[0], 3, 3);\n\t\t\tVector2fTest.assertVectorsAreEqual(p.pts()[1], 8, 8);\n\t\t}\n\t}", "public Polygon pureSetFirstPositionAndShiftAll(float x, float y)\n\t{\n\t\tPolygon p = new Polygon(this);\n\t\tp.setFirstPositionAndShiftAll(x, y);\n\t\treturn p;\n\t}", "void shiftLeftS(){\n Color sign = getPoint(122);\n shiftLeft();\n setPoint(122, sign);\n }", "@Override\n public Vec2 startPosition() {\n return new Vec2(-7, -7);\n }", "public Position2D getPosition(boolean first) {\n Position2D temp = null;\n\n if (first) {\n temp = this.shape.getPos();\n } else {\n temp = this.endShape.getPos();\n }\n\n return temp;\n }", "public Vector deflectX() {\n\t\treturn new Vector(-deltaX, deltaY);\n\t}", "private void changeOffSetToPositiveOffset(Position source, Position offSet) {\n if (offSet.getX() < 0) {\n source.setX(source.getX() + offSet.getX() + 1);\n offSet.setX(offSet.getX() * -1);\n }\n\n if (offSet.getY() < 0) {\n source.setY(source.getY() + offSet.getY() + 1);\n offSet.setY(offSet.getY() * -1);\n }\n\n if (offSet.getZ() < 0) {\n source.setZ(source.getZ() + offSet.getZ() + 1);\n offSet.setZ(offSet.getZ() * -1);\n }\n }", "void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }", "public void sub_1_from_0() {\n x_0 -= x_1;\n y_0 -= y_1;\n }", "public Point<Float> getShifted(Float xDelta, Float yDelta) {\n return new Point<>(this.x.floatValue() + xDelta, this.y.floatValue() + yDelta);\n }", "double setPosition(double x, double y);", "public void moveLeft()\r\n {\r\n this.x -= this.offset;\r\n }", "private Vector2D initialPosition() {\n final Vector2D currentPosition = new Vector2D(particle.x(), particle.y());\n final Vector2D velocityFactor = new Vector2D(particle.vx(), particle.vy());\n final Vector2D forceFactor = new Vector2D(particle.forceX(), particle.forceY());\n\n velocityFactor.times(-dt);\n forceFactor.times( Math.pow(-dt, 2) / (2 * particle.mass()) );\n\n // O(dt^3) is not taken into account\n // Notice that current time (t) is never used, so may be we can erase it\n\n return currentPosition\n .add(velocityFactor)\n .add(forceFactor);\n }", "public void copy_from_1_to_0() {\n x_0 = x_1;\n y_0 = y_1;\n }", "double getPositionX();", "public void copy_from_0_to_1() {\n x_1 = x_0;\n y_1 = y_0;\n }", "void setPrevPos(Vec3 pos);", "public void restorePos()\n { posReal.set(formerPos); }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column dbo.FLOW_Form.isPageForm
public Integer getIspageform() { return ispageform; }
[ "public Field<Boolean> getManualField() throws AccessPoemException {\n Column<Boolean> c = _getEventTable().getManualColumn();\n return new Field<Boolean>((Boolean)c.getRaw(this), c);\n }", "Method method(Form form) {\n String method = evaluator.attribute(form.id(), Attribute.method).toLowerCase();\n if (method.equals(\"\"))\n return Method.get;\n return Method.valueOf(method);\n }", "public String getPage_flow() {\n return page_flow;\n }", "public void setIspageform(Integer ispageform) {\n this.ispageform = ispageform;\n }", "@Attribute(defaultValue=\"true\",dataType=Boolean.class)\n public String getMbeanEnabled();", "public boolean isSetPage() {\n return this.page != null;\n }", "public int getIs_proforma() {\n return is_proforma;\n }", "io.dstore.values.BooleanValue getSelectResult();", "Boolean getFormValid();", "public SQLInteger getPage() {\n\t\treturn page;\n\t}", "@JsonIgnore\n public boolean getBooleanValue() {\n if (type != Type.BOOLEAN) {\n throw new IllegalStateException(\"Attribute \" + name + \" is type \" + type);\n }\n return Boolean.parseBoolean(value);\n }", "public int getRequestPageType();", "@Override\n\tpublic List<BasePojo> queryByConditionPage(HashMap<String, Object> paraMap,\n\t\t\tPageInation page, Class<?> clazz) {\n\t\tList<BasePojo> pojoList = new ArrayList<BasePojo>();\n\t\tList<String> paraNameList;\n\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"\";\n\n\t\t// Object resValue = null;\n\t\tResultSetTools rsTools = null;\n\t\ttry {\n\t\t\trsTools = new ResultSetTools(dbNameResolver, sqlbuilder);\n\t\t\tparaNameList = getParaName(paraMap);\n\t\t\tconn = this.loadNewConnection();\n\t\t\t// conn.setAutoCommit(false);\n\n\t\t\tString item = sqlBuilder.getSelectItem();\n\t\t\tString bTable = sqlBuilder.getKmMapTable();\n\t\t\t\n\t\t\tsql = buildPagingSql(paraNameList, page);\n\t\t\tsql = sqlBuilder.getQueryConditionSql(paraNameList,item,sql,bTable);\n\t\t\tpstmt = conn.prepareStatement(sql);\n\n\t\t\tif (SqlUtil.isSearchTypeValueExists(paraNameList)) {\n\t\t\t\tparaNameList.remove(paraNameList.size() - 1);\n\t\t\t}\n\t\t\t//// 如果SQL中有问号时才进行赋值\n\t\t\tif (sql.indexOf(\"?\") > -1) {\n\t\t\t\tint index = 1;\n\t\t\t\tObject paraValue;\n\t\t\t\tfor (String valueFieldName : paraNameList) {\n\t\t\t\t\tif (\"N_CHECK_STATE\".equalsIgnoreCase(valueFieldName)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t/**Start 20150430 added by liubo.BUG #111830 数据审核管理点击A区可选项目,有些界面报错\n\t\t\t\t\t * 过滤掉QUERY_SOURCE的赋值,数据审核管理有几个界面会直接走基类查询,然后传入这个参数,这样产生无效的列索引的异常*/\n\t\t\t\t\tif (\"QUERY_SOURCE\".equalsIgnoreCase(valueFieldName)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t/**End 20150430 added by liubo.BUG #111830 数据审核管理点击A区可选项目,有些界面报错*/\n\n\t\t\t\t\tif (valueFieldName.startsWith(\"ARRAY_\")) {\n\t\t\t\t\t\tpstmt.setArray(index, OraDbTool.newInstance().sqlOverLongCondition(String\n\t\t\t\t\t\t\t\t.valueOf(paraMap.get(valueFieldName)),conn));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparaValue = paraMap.get(valueFieldName);\n\t\t\t\t\t\tif (paraValue instanceof java.util.Date) {\n\t\t\t\t\t\t\tDate dateValue = new Date(\n\t\t\t\t\t\t\t\t\t((java.util.Date) paraValue).getTime());\n\t\t\t\t\t\t\tpstmt.setDate(index, dateValue);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpstmt.setObject(index, paraValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n//\t\t\tlong begin = System.currentTimeMillis();\n//\t\t\tSystem.out.println(\"打开结果集当前时间戳:\" + begin);\n\t\t\trs = pstmt.executeQuery();\n//\t\t\tlong mid = System.currentTimeMillis();\n//\t\t\tSystem.out.println(\"打开结果集完成,花费时间:\" + (mid - begin) + \"ms\");\n\t\t\t\n\t\t\tBasePojo pojo = (BasePojo) clazz.newInstance();\n\t\t\tPropertyDescriptor[] props = PojoUtils.getPropertyDescriptors(pojo);\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tBasePojo t = setResultSet(rsTools, rs, clazz, props);\n\t\t\t\tgetConvertKey(props, t);\n\t\t\t\tpojoList.add(t);\n\t\t\t}\n\n//\t\t\tlong end = System.currentTimeMillis();\n//\t\t\tSystem.out.println(\"结果集滚动完成,花费时间: \" + (end - mid) + \"ms\");\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new DataAccessException(\"查询失败:\" + ex.getMessage(), ex);\n\t\t} finally {\n\t\t\tcloseResultSetFinal(rs);\n\t\t\tcloseStatementFinal(pstmt);\n\t\t\treleaseConnection(conn);\n\t\t}\n\t\treturn pojoList;\n\t}", "public boolean isSetPage() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);\n }", "public boolean isSetFeaturePage() {\n return this.featurePage != null;\n }", "@VTID(123)\r\n boolean getEnableFieldList();", "boolean isSetPages();", "public int getActivePage()\n {\n return activePage;\n }", "public Boolean getValue() {\r\n return Boolean.valueOf(this.value);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column g_person.PERSON_IMAGE
public void setPersonImage(String personImage) { this.personImage = personImage == null ? null : personImage.trim(); }
[ "public String getPersonImage() {\r\n return personImage;\r\n }", "public void setPicture(String img_file){\n\t\tscript.ageList.get(script.currentAge).setPicture(img_file);\n\t}", "public void setProfileImg() {\n }", "public void setImage(String value) {\n setAttributeInternal(IMAGE, value);\n }", "public void setImage(Image img){\r\n this.elementImage = img;\r\n }", "private void putProfPic(Blob gbPhoto) throws SQLException, FileNotFoundException, IOException {\n if(gbPhoto == null){\n ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();\n File file = new File(externalContext.getRealPath(\"\")+\"\\\\resources\\\\images\\\\user_default.png\");\n imagePic = new OracleSerialBlob(FileUtils.getBytes(file));\n Long size = imagePic.length();\n photo_profile = new ByteArrayContent(imagePic.getBytes(1, size.intValue()));\n }else{\n imagePic = gbPhoto;\n Long size = gbPhoto.length();\n photo_profile = new ByteArrayContent(gbPhoto.getBytes(1, size.intValue()));\n }\n }", "abstract void setImage();", "Imports setImageRef(String imageRef);", "public void setImage(Image im){\r\n imagen = im;\r\n }", "public void setImage(String image) {\r\n this.image = image;\r\n }", "public void setImage(PImage img) {\r\n\t\tthis.img.putImage(img);\r\n \t}", "public void setProfilePic(){\n mDBManager.databaseOpenToRead();\n mUser = mDBManager.findUserByID(sSharedPreferences.getLong(Constants.CURRENT_USER_ID,-1));\n mProfilePic.setImageBitmap(mUser.getImageBitmap());\n }", "public void setColumnImage( int columnIndex, Object image)\n {\n if ( columns.size() <= columnIndex)\n {\n for( int i = columns.size(); i <= columnIndex; i++)\n columns.add( new Column());\n }\n columns.get( columnIndex).image = image;\n }", "public static void setImg(nsIDOMElement img, String fileImageName) {\r\n img.setAttribute(HTML.ATTR_SRC, \"file://\" //$NON-NLS-1$\r\n + getAbsoluteResourcePath(fileImageName).replace('\\\\', '/'));\r\n }", "public void updateImageBackend() {\n BackendAPI.node().setImage(id, image);\n }", "public void setImage(java.lang.String image) {\n\t\t_imageCompanyAg.setImage(image);\n\t}", "@Override\n public void assigneImage() {\n image = Images.SORTIE;\n }", "private void setPhotoAttcher() {\n\n }", "public Object getColumnImage( int columnIndex)\n {\n return columns.get( columnIndex).image;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use this API to add responderpolicy.
public static base_response add(nitro_service client, responderpolicy resource) throws Exception { responderpolicy addresource = new responderpolicy(); addresource.name = resource.name; addresource.rule = resource.rule; addresource.action = resource.action; addresource.undefaction = resource.undefaction; addresource.comment = resource.comment; addresource.logaction = resource.logaction; addresource.appflowaction = resource.appflowaction; return addresource.add_resource(client); }
[ "void addPolicy(Policy policy);", "public static base_responses add(nitro_service client, responderpolicy resources[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tresponderpolicy addresources[] = new responderpolicy[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\taddresources[i] = new responderpolicy();\n\t\t\t\taddresources[i].name = resources[i].name;\n\t\t\t\taddresources[i].rule = resources[i].rule;\n\t\t\t\taddresources[i].action = resources[i].action;\n\t\t\t\taddresources[i].undefaction = resources[i].undefaction;\n\t\t\t\taddresources[i].comment = resources[i].comment;\n\t\t\t\taddresources[i].logaction = resources[i].logaction;\n\t\t\t\taddresources[i].appflowaction = resources[i].appflowaction;\n\t\t\t}\n\t\t\tresult = add_bulk_request(client, addresources);\n\t\t}\n\t\treturn result;\n\t}", "public void addPolicy(Policy policy) {\n //Add policy implementation is going\n }", "PolicyHolder addPolicyHolder(Integer agentId , PolicyHolder pHolder);", "public static base_response update(nitro_service client, responderpolicy resource) throws Exception {\n\t\tresponderpolicy updateresource = new responderpolicy();\n\t\tupdateresource.name = resource.name;\n\t\tupdateresource.rule = resource.rule;\n\t\tupdateresource.action = resource.action;\n\t\tupdateresource.undefaction = resource.undefaction;\n\t\tupdateresource.comment = resource.comment;\n\t\tupdateresource.logaction = resource.logaction;\n\t\tupdateresource.appflowaction = resource.appflowaction;\n\t\treturn updateresource.update_resource(client);\n\t}", "public org.xmlsoap.schemas.ws.x2004.x09.policy.Policy addNewPolicy()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.ws.x2004.x09.policy.Policy target = null;\n target = (org.xmlsoap.schemas.ws.x2004.x09.policy.Policy)get_store().add_element_user(POLICY$0);\n return target;\n }\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "void register(PolicyDefinition policyDefinition);", "void register_policy_factory (int type, org.omg.PortableInterceptor.PolicyFactory policy_factory);", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public org.xmlsoap.schemas.ws.x2004.x09.policy.PolicyReferenceDocument.PolicyReference addNewPolicyReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.ws.x2004.x09.policy.PolicyReferenceDocument.PolicyReference target = null;\n target = (org.xmlsoap.schemas.ws.x2004.x09.policy.PolicyReferenceDocument.PolicyReference)get_store().add_element_user(POLICYREFERENCE$6);\n return target;\n }\n }", "org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);", "public void addPolicyToBatch(Record inputRecord);", "@Override\n public PolicyHolder addPolicyHolder(PolicyHolder policyHolder)\n {\n \tholderdao.save(policyHolder);\n \treturn policyHolder;\n }", "public org.etsi.uri.x01903.v13.SignaturePolicyIdentifierType addNewSignaturePolicyIdentifier()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.etsi.uri.x01903.v13.SignaturePolicyIdentifierType target = null;\r\n target = (org.etsi.uri.x01903.v13.SignaturePolicyIdentifierType)get_store().add_element_user(SIGNATUREPOLICYIDENTIFIER$4);\r\n return target;\r\n }\r\n }", "public static base_response add(nitro_service client, policyexpression resource) throws Exception {\n\t\tpolicyexpression addresource = new policyexpression();\n\t\taddresource.name = resource.name;\n\t\taddresource.value = resource.value;\n\t\taddresource.description = resource.description;\n\t\taddresource.comment = resource.comment;\n\t\taddresource.clientsecuritymessage = resource.clientsecuritymessage;\n\t\treturn addresource.add_resource(client);\n\t}", "public void addPolicyConfiguration(ConfigurationContext configurationContext, Policy policyConfig)throws PolicyConfigurationException;", "public void setPolicy(PO newPolicy);", "public boolean addRankPolicy(League league, Season season, String rankPolicyId, User user) {\n if (! canSetPolicy(user)){\n return false;\n }\n\n if (league == null || season == null) {\n return false;\n }\n\n if (rankPolicyId.length() == 0) {\n return false;\n }\n\n LeagueRankPolicy rankPolicy;\n\n switch (rankPolicyId) {\n case \"1\":\n rankPolicy = new NumberOfWins(league, season);\n league.addRankPolicy(season, rankPolicy);\n season.addRankPolicy(league, rankPolicy);\n break;\n\n case \"2\":\n rankPolicy = new GoalDifference(league, season);\n league.addRankPolicy(season, rankPolicy);\n season.addRankPolicy(league, rankPolicy);\n break;\n\n default:\n return false;\n }\n\n return true;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the type for the key
public void setKeyType( KeyType type ) { m_keyType = type; }
[ "public void setTypeKey(String typeKey) {\n this.typeKey = typeKey;\n }", "public void setKeyTypeAsString( String type ) throws Exception {\n boolean found = false;\n for ( KeyType k : KeyType.values() ) {\n if ( k.toString().equalsIgnoreCase( type ) ) {\n m_keyType = k;\n found = true;\n break;\n }\n }\n\n if ( !found ) {\n throw new Exception( \"Unknown key type: \" + type );\n }\n }", "public com.opentext.bn.converters.avro.entity.ContentKey.Builder setKeyType(java.lang.String value) {\n validate(fields()[2], value);\n this.keyType = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public Builder setKeyClass(Type keyType) {\n this.keyType = keyType;\n return this;\n }", "public KeyValueElement setType(KeyValueType type) {\n this.type = type;\n return this;\n }", "public String\ttype(String key);", "private void setPkiType(\n java.lang.String value) {\n java.lang.Class<?> valueClass = value.getClass();\n bitField0_ |= 0x00000002;\n pkiType_ = value;\n }", "public void setSecurityType(typekey.NoteSecurityType value);", "public abstract void set(String key, T data);", "public void setKey(String key);", "public interface TypeKey {\n}", "TrackerType(String key) {\n this.key = key;\n }", "public Class<?> keyType() {\n return null;\n }", "void setType(Type t);", "public void setOpckeytype(java.lang.Long value) {\n\t\tsetValue(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS.OPCKEYTYPE, value);\n\t}", "public void setType(Object type) {\n this.type = type;\n }", "boolean isTypeKey(String key);", "public TypeKeyTransferable(TypeKeyEntry entry)\r\n {\r\n myTypeKeyEntry = entry;\r\n }", "public void setPropertyKeyTypes(Map<String, String> propertyKeyTypes) {\n this.propertyKeyTypes = propertyKeyTypes;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method for determining a reverse iterator for the specified key. This implementation returns an iterator that returns the parts of the given key in reverse order, ignoring indices.
protected Iterator<String> reverseIterator(final DefaultConfigurationKey key) { final List<String> list = new ArrayList<>(); for (final DefaultConfigurationKey.KeyIterator it = key.iterator(); it.hasNext();) { list.add(it.nextKey()); } Collections.reverse(list); return list.iterator(); }
[ "IReverseIterator<ITrieNode<TKey>> getChildrenReverseIterator();", "Iterator<T> reverseEnd();", "Iterator<T> reverseBegin();", "public Iterator<Entry<V>> reverseIterator() { return new RevIterator((Node<V>)max()); }", "CloseableIterator<IndexEntry> descendingIterator();", "public Iterator<E> iteratorRev();", "public Iterator<Entry<V>> reverseIterator( final SVInterval interval ) {\n return new RevIterator((Node<V>)max(interval));\n }", "public SequenceIterator getReverseIterator() {\n return new ArrayIterator(items, start, end);\n }", "@Override\n\tpublic ReverseIterator<E> reverseIterator() {\n\t\treturn new ReverseListIterator();\n\t}", "@Override\n public IReverseIterator<T> getReverseIterator() {\n return CircularListReverseIterator.make(this);\n }", "@Override\n\tpublic Iterator<Integer> getSubTraceIDSequenceReverseIterator(final int subTraceSequenceIndex) {\n\t\treturn new Iterator<Integer>() {\n private int pos = subTraceIdSequences[subTraceSequenceIndex].length - 1;\n\n public boolean hasNext() {\n return pos >= 0;\n }\n\n public Integer next() {\n return subTraceIdSequences[subTraceSequenceIndex][pos--];\n }\n };\n\t}", "public static PathIterator getReversePathIterator(Shape shape) {\n return new ReversePathIterator(shape.getPathIterator(null));\n }", "Iterable<P> backwards();", "public Iterator<V> iterator(Object key) {\n Collection coll = getCollection(key);\n if (coll == null) {\n\n return new Iterator<V>() {\n\n public boolean hasNext() {\n return false;\n }\n\n public V next() {\n return null;\n }\n\n public void remove() {\n }\n\n }; \n }\n return coll.iterator();\n }", "public Iterator<T> backward_iterator() {\n\t\treturn thisQueue.backward_iterator();\n }", "@Test\n void descendingSetDescendingIteratorNextReturnsCorrectValue() {\n var it = reverseSet.descendingIterator();\n assertEquals(Integer.valueOf(1), it.next());\n assertEquals(Integer.valueOf(2), it.next());\n assertEquals(Integer.valueOf(4), it.next());\n assertEquals(Integer.valueOf(6), it.next());\n assertEquals(Integer.valueOf(9), it.next());\n }", "public static PathIterator getReversePathIterator(Shape shape, int windingRule) {\n return new ReversePathIterator(shape.getPathIterator(null), windingRule);\n }", "@Test\n void descendingSetIteratorNextReturnsCorrectValue() {\n var it = reverseSet.iterator();\n assertEquals(Integer.valueOf(9), it.next());\n assertEquals(Integer.valueOf(6), it.next());\n assertEquals(Integer.valueOf(4), it.next());\n assertEquals(Integer.valueOf(2), it.next());\n assertEquals(Integer.valueOf(1), it.next());\n }", "@Override\n public int getInvertedReverseIndex(int rowId) {\n return invertedIndexReverse[rowId];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the difference between currentNode's subRightTreeHeight and subLeftTreeHeight
public int subTreeDiff(BSTNode<K> currentNode) { int diff = nodeHeight(currentNode.getRightChild()) - nodeHeight(currentNode.getLeftChild()); return diff; }
[ "int heightDifference(Node node) {\n\t\tint leftTarget = 0;\n\t\tint rightTarget = 0;\n\t\tif (node.left != null) {\n\t\t\tleftTarget = 1 + node.left.height;\n\t\t}\n\t\tif (node.right != null) {\n\t\t\trightTarget = 1 + node.right.height;\n\t\t}\n\n\t\treturn leftTarget - rightTarget;\n\t}", "private int _height(BSTNode<E> root) {\r\n if (root == null)\r\n return -1; // If you want calucate for no of edges in longest path then return zero here.\r\n int lefSubHeight = _height(root.left);\r\n int rightSubHeight = _height(root.right);\r\n return Math.max(lefSubHeight, rightSubHeight) + 1; // consider the leaf node height as one\r\n }", "public int height(){\r\n \r\n // call the recursive method with the root\r\n return height(root);\r\n }", "public int treeHeight(){\n\t\tif(root == null){\n\t\t\tSystem.err.println(\"The tree is empty\");\n\t\t\treturn -1;\n\t\t}\n\t\treturn root.height;\n\t}", "private static int heightOfTree(Tree tree) {\n\n if(tree == null){\n return 0;\n }\n int leftHeight = 0;\n if(tree.left!=null){\n leftHeight = heightOfTree(tree.left);\n }\n int rightHeight = 0;\n if(tree.right!=null){\n rightHeight = heightOfTree(tree.right);\n }\n return (Math.max(leftHeight, rightHeight))+1;\n\n }", "public int height(Node tree){\n\t\tif(tree == null){\n\t\t\treturn 0;\n\t\t}\n\t\telse{\n\t\t\tint lheight = height(tree.getLeft());\n\t\t\tint rheight = height(tree.getRight());\n\t\t\t\n\t\t\t//take the branch which is longer\n\t\t\tif(lheight>rheight){\n\t\t\t\treturn (lheight+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(rheight+1);\n\t\t\t}\n\t\t}\n\t}", "private int height(Node<T> node){\n if(node == null){\n return 0;\n }else{\n int leftHight = height(node.left) + 1;\n int rightHight = height(node.right) + 1;\n if(leftHight > rightHight){\n return leftHight;\n }else{\n return rightHight;\n }\n }\n }", "private static int checkHeightDiff(BinaryTreeNode root, int depth, int diff) throws Exception {\n\t\tif (root == null) {\n\t\t\treturn depth;\n\t\t}\n\t\t\n\t\tint left = checkHeightDiff(root.left, depth + 1, diff);\n\t\tint right = checkHeightDiff(root.right, depth + 1, diff);\n\t\t\n\t\tif (Math.abs(left - right) > diff) {\n\t\t\tthrow new Exception();\n\t\t}\n\n\t\treturn left > right ? left : right;\n\t}", "private void updateHeight() {\r\n // One more than the height of the highest subtree.\r\n height = 1 + Integer.max(getHeight(getLeftNode()), getHeight(getRightNode()));\r\n }", "public int height() \n\t{\n\t\treturn height(root); //call recursive height method, starting at root\n\t}", "public double getWeightedHeight() {\n return weightedNodeHeight(overallRoot);\n }", "private int getExpectedHeight(RedBlackTree<Integer> tree) {\n return 2 * ((int) Math.round(Math.log(tree.getSize()) / Math.log(2))) + 1;\n }", "@Override\n public int getHeight() {\n // checking if root is null\n if (root == null) {\n return 0;\n }\n // calling helper method to return height\n return getHeight(root);\n }", "public void update_height() {\r\n int tmp_height = 0;\r\n int tmp_left = -1;\r\n int tmp_right = -1;\r\n\r\n // set height of null children to -1\r\n if (leftChild != null) {\r\n tmp_left = leftChild.height;\r\n }\r\n if (rightChild != null) {\r\n tmp_right = rightChild.height;\r\n }\r\n\r\n // find highest child\r\n if (tmp_left > tmp_right) {\r\n tmp_height = tmp_left;\r\n }\r\n else {\r\n tmp_height = tmp_right;\r\n }\r\n\r\n // update this node's height\r\n height = tmp_height + 1;\r\n }", "private int HeightCalc(IAVLNode node) {\r\n\t\tif (node.isRealNode()) \r\n\t\t\treturn Math.max(node.getLeft().getHeight(), node.getRight().getHeight())+1;\r\n\t\treturn -1; //external's height is -1 \r\n\t}", "private double findOntologyTreeHeight() \r\n\t{\r\n\t\tString cls = getClass(Constants.DBPEDIA_ROOT_CLASS_NAME);\t\r\n\t\t\r\n\t\tif (cls == null){\r\n\t\t\tmsg.logger.log(Level.SEVERE, \"Invalid class repository! EXIT\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tString strTH = Constants.NS_PROPERTIES + Constants.DBPEDIA_PROPERTY_TREE_HEIGHT;\r\n\t\tString l = SDBHelper.getPropertyValue(cls, strTH, store);\r\n\t\t\r\n\t\tif (l != null && l != \"\")\r\n\t\t\treturn Double.parseDouble(l.toString());\r\n\r\n\t\treturn 0.0;\r\n\t}", "public float getHeight() {\n return vertexGreaterThanEveryOtherVertex.y - vertexLessThanEveryOtherVertex.y;\n }", "@Test\r\n public void testHeightAddNodesRight(){\r\n \ttree.add(\"g\");\r\n \ttree.add(\"f\");\r\n \ttree.add(\"e\");\r\n \tassertEquals(tree.height(),2);\r\n \t\r\n \t//testing height of 3\r\n \ttree.add(\"d\"); //height now 3, d is right\r\n \tassertEquals(tree.height(), 3);\r\n \t\r\n \ttree.add(\"c\");\r\n \ttree.add(\"b\"); \r\n \ttree.add(\"a\"); \r\n \tassertEquals(tree.height(),6); //last\r\n }", "@Test\r\n public void testHeightCompleteTree(){\r\n \ttree.add(\"deer\");\r\n \ttree.add(\"bar\"); //adding as child to left\r\n \ttree.add(\"jar\"); //add as child to right \r\n \ttree.add(\"apple\"); //adding to right side of right node\r\n \tassertEquals(tree.height(), 2); \r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a filter that accepts SyndEntry objects with a pubDate less than or equal to the current time, as given by System.currentTimeMillis().
public PubDateFilter() { this(System.currentTimeMillis()); }
[ "public PubDateFilter(long epoch) {\r\n this(epoch,false);\r\n }", "public void applyFilterToItemsLessThanOrEqual(List<StatusItem> input, Date time)\n\t{\n\t\t// the items from AWS are NOT in order! We need to filter them down. then sort. \n\t\tPredicate<StatusItem> personPredicate = item -> item.getPublishedDate().compareTo(time) <= 0;\n\t\tinput.removeIf(personPredicate);\n\t\t\n\t\tCollections.sort(input, this.new AwsStatusItemComparitor());\n\t}", "static EventFilter createdBefore(Instant i) {\n return e -> e.getEventCreationTimestamp().isBefore(i);\n }", "public LogEntrySet filterTimeStamp(long value)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (value == obj.getTimeStamp())\n {\n result.add(obj);\n }\n }\n \n return result;\n }", "ArrayList<FilmData> filterByDuration(float durationMin){\n ArrayList<FilmData> filteredSet = new ArrayList<FilmData>();\n for(FilmData film: films){\n if(film.getDuration() >= durationMin){\n filteredSet.add(film);\n }\n }\n return filteredSet;\n }", "public ModTimeFilter(long time, boolean newer) {\n this.modTime = time;\n this.newer = newer;\n }", "public LogEntrySet createTimeStampCondition(long value)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (value == obj.getTimeStamp())\n {\n result.add(obj);\n }\n }\n \n return result;\n }", "public PubDateFilter(long epoch, boolean after) {\r\n this.epoch = epoch;\r\n this.after = after;\r\n }", "public LogEntrySet filterTimeStamp(long lower, long upper)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (lower <= obj.getTimeStamp() && obj.getTimeStamp() <= upper)\n {\n result.add(obj);\n }\n }\n \n return result;\n }", "public void filterListTo(HiResDate start, HiResDate end);", "public static native long GossipTimestampFilter_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);", "public LocalTime getFilterFrom() {\n return filterFrom;\n }", "boolean isFilterByDate();", "@Override\n public boolean isFiltered(VocabEntry entry) {\n return entry.frequency < minFrequency;\n }", "static EventFilter createdAfter(Instant i) {\n return e -> e.getEventCreationTimestamp().isAfter(i);\n }", "public LogEntrySet createTimeStampCondition(long lower, long upper)\n {\n LogEntrySet result = new LogEntrySet();\n \n for (LogEntry obj : this)\n {\n if (lower <= obj.getTimeStamp() && obj.getTimeStamp() <= upper)\n {\n result.add(obj);\n }\n }\n \n return result;\n }", "public TimePartitionFilter getTimePartitionFilter() {\n Set<Integer> slotSet =\n new HashSet<>(\n ((SlotPartitionTable) metaGroupMember.getPartitionTable()).getNodeSlots(getHeader()));\n return new SlotTimePartitionFilter(slotSet);\n }", "public void Filter(LocalDateTime filterDate)\r\n {\r\n Iterator<ServiceRecord> iterator = this.records.iterator();\r\n ServiceRecord current = null;\r\n \r\n //Service records are organized in chronological order, so we can simply traverse\r\n //and remove records while they are less than or equal to the filter date.\r\n while (iterator.hasNext() && (Utilities.IsWithinDate((current = iterator.next()).GetCurrentDateTime(), filterDate)))\r\n {\r\n iterator.remove(); //Remove the record from the main disk.\r\n \r\n ServiceRecordList member = this.GetServiceList(this.recordsByMemberNum, current.GetMemberNumber());\r\n ServiceRecordList provider = this.GetServiceList(this.recordsByProviderNum, current.GetProviderNumber());\r\n \r\n //Remove the record from the corresponding member's and provider's service records, if it exists\r\n member.RemoveServiceRecord(current);\r\n provider.RemoveServiceRecord(current);\r\n }\r\n }", "public void filtrateByDate() {\n ObservableList<Records> observableList = recordsTableView.getItems();\n\n if (observableList.isEmpty()) {\n Alerts.notSelectionAlert(\"No se encuentran registros para filtrar!\");\n return;\n }\n\n LocalDate initialLocalDate = initDate.getValue();\n LocalDate finalLocalDate = finalDate.getValue();\n\n Instant instant = Instant.from(initialLocalDate.atStartOfDay(ZoneId.systemDefault()));\n Instant instant2 = Instant.from(finalLocalDate.atStartOfDay(ZoneId.systemDefault()));\n\n Date initialDate = Date.from(instant);\n Date lastDate = Date.from(instant2);\n\n ObservableList<Records> filteredRecords = FXCollections.observableArrayList();\n\n for (Records record : observableList) {\n if (record.getDateOfRecord().after(initialDate) && record.getDateOfRecord().before(lastDate)) {\n filteredRecords.add(record);\n }\n }\n\n recordsTableView.setItems(filteredRecords);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'transactionStatus' field.
public com.opentext.bn.converters.avro.entity.FinalTaskInfo.Builder setTransactionStatus(com.opentext.bn.converters.avro.entity.TransactionStatus value) { validate(fields()[0], value); this.transactionStatus = value; fieldSetFlags()[0] = true; return this; }
[ "public void setTransactionStatus(com.mgipaypal.ac1211.client.TransactionStatus transactionStatus) {\r\n this.transactionStatus = transactionStatus;\r\n }", "public void setTransactionStatus(String value) {\n setAttributeInternal(TRANSACTIONSTATUS, value);\n }", "public void setStatus(TransactionStatus status) {\n this.status = status;\n }", "public void setSettlementStatus(java.lang.String settlementStatus) {\n this.settlementStatus = settlementStatus;\n }", "public void setTransstatus(String transstatus) {\n this.transstatus = transstatus;\n }", "public void setTransstatus(String transstatus) {\n\t\tthis.transstatus = transstatus;\n\t}", "public void setSettlementStatus(Boolean settlementStatus) {\r\n this.settlementStatus = settlementStatus;\r\n }", "public void setRollbackStatus(Byte rollbackStatus) {\r\n this.rollbackStatus = rollbackStatus;\r\n }", "public void setStatus(final TransferStatusEnum aStatus) {\n this.status = aStatus;\n }", "public void setTransactionId(long transactionId) {\n _sTransaction.setTransactionId(transactionId);\n }", "public void setStatus(TradeStatus status) {\n this.status = status;\n }", "@Override\n\tpublic void setStatus(java.lang.String status) {\n\t\t_commitment.setStatus(status);\n\t}", "public void setStatus( int pStatus )\r\n {\r\n mStatus = pStatus;\r\n }", "public void setTradeStatus(Integer tradeStatus) {\r\n this.tradeStatus = tradeStatus;\r\n }", "public void setCurrentStatus(int status) {\n this.currentStatus = status;\n }", "public void setStatus(TaskStatus status) {\n\t\tthis.status = status;\n\t}", "public void setStatus(Integer status) {\r\n this.status = status;\r\n }", "public void setStatus(OrderStatus status){\r\n this.status = status;\r\n }", "public void setStatus(int status)\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(STATUS$12, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STATUS$12);\n }\n target.setIntValue(status);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the name of the token file. Used to distingush between client and server names.
public static void setOutTokenFile(String file) { if(gTokenToClassName != null) { throw new IllegalStateException("Must be set before initializing this class"); } gOutTokenFile = file; }
[ "public static void setTokenFile(String file) {\n if(gTokenToClassName != null) {\n throw new IllegalStateException(\"Must be set before initializing this class\");\n }\n gTokenFile = file;\n }", "public void setTokenName(String name)\r\n {\r\n tokenName = name;\r\n }", "public void setFileName(final String theName)\r\n {\r\n\r\n // this means we are currently in a save operation\r\n _modified = false;\r\n\r\n // store the filename\r\n _fileName = theName;\r\n\r\n // and use it as the name\r\n if (theName.equals(NewSession.DEFAULT_NAME))\r\n setName(theName);\r\n\r\n }", "public void setFileName(String filename)\n\t{\n\t\tsuper.setFileName(filename);\n\t\t\n\t\t//#CM702602\n\t\t// Generate the path name of Working data File. \n\t\tworkingDataFileName = wFileName.replaceAll(\"\\\\\\\\send\\\\\\\\\", \"\\\\\\\\recv\\\\\\\\\");\n\t}", "void setSecurityToken(String token);", "public final void setSourceName(String name) {\n\n\t // Convert the name to NetBIOS RFC encoded name\n\n\t NetBIOSSession.EncodeName ( name, NetBIOSName.FileServer, m_buf, NB_FROMNAME);\n\t}", "private void storeToken(String serviceToken) {\n\t\tSystem.setProperty(\"token\", serviceToken);\n\t}", "public void setFileName(String fileName)\r\n {\r\n sFileName = fileName;\r\n }", "public void setConfigFileName(String nm)\n\t{\n\t\tcfgFile = new File(nm);\n\t}", "public void setFileName (String FileName);", "public static void setPreferencesName(String prefFileName) {\n\n if (prefFileName == null) {\n throw new IllegalArgumentException(\"Preferences file name cannot be null\");\n }\n\n SharedPrefManager.prefName = prefFileName;\n }", "public void setFileName( String name ) {\n\tfilename = name;\n }", "private void setName(String name){\n this.userName = name;\n }", "public void setAuthToken(String token) {\n\t\t\n\t\tConfigurationManager.instance.authToken = token;\n\t}", "public void setName(String name){\n\t\tthis.name=name;\n\t\tinPath=rootPath+name+File.separator;\n\t\tbuildPaths();\n\t}", "public static void setCurrentSessionFileName(String newName) {\n\t\tcurrentSessionFileName = newName;\n\t}", "public void setName (String name) {\n this.name = name;\n NameRegistrar.register (\"server.\"+name, this);\n }", "public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "private void setFilename(String filename) {\n checkFilename(filename);\n _filename = filename;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populates a RCU packet ready to be delivered to the Target ASN
public RCU getRCU(ASN targetASN, int RTTFlag) { try { InetAddress ipaddress =InetAddress.getByName(targetASN.getIpa()); RCU packet = new RCU(RouteController.LocalConfig.myASN.getRCID(), targetASN.getASNID(),2,targetASN.getLinkCost(),RTTFlag,ipaddress); if (targetASN.getRCID() != -1) { packet.setLinkType(1); } return packet; } catch (UnknownHostException uhe){ uhe.printStackTrace(); } return null; }
[ "protected void pktDupeAcked(int seqNum) {}", "public static native void ChannelCounterparty_set_unspendable_punishment_reserve(long this_ptr, long val);", "public NetBIOSDatagram ( byte[] pkt) {\n\t m_buf = pkt;\n\t}", "protected void pktsAcked(int n, long rtt) {}", "public void DHCPRelease()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Building DHCP Release \\n\");\r\n\r\n\t\t\tDHCPMessage message = new DHCPMessage();\r\n\t\r\n\t\t\tmessage.opCode = DHCPMessage.BOOTREQUEST; \r\n\t\t\tmessage.hardWareType = DHCPMessage.ETHERNET;\r\n\t\t\tmessage.hardWareAddressLength = MACLENGTH;\r\n\t\t\tmessage.hopCount = 0;\r\n\t\t\t\r\n\t\t\t// Hashcode 32 bit = 4 byte fills transactionID with exactly 4 byte\r\n\t\t\tByteBuffer a = ByteBuffer.allocate(4);\r\n\t\t\ta.putInt(message.hashCode());\r\n\t\t\tmessage.transactionID = a.array();\r\n\t\t\t\r\n\t\t\t// Secs to zero\r\n\t\t\tint[] b = {0,0};\r\n\t\t\tmessage.secs = Utility.toBytes(b);\r\n\t\t\t\r\n\t\t\t// Flags to zero\r\n\t\t\tint[] c = {0,0};\r\n\t\t\tmessage.flags = Utility.toBytes(c);\r\n\t\t\t\r\n\t\t\t// Set the client IP to the IP that was allocated\r\n\t\t\tmessage.clientIP = IPAllocated;\r\n\t\t\t\r\n\t\t\t// Set your IP to zero\r\n\t\t\tint[] e = {0,0,0,0};\r\n\t\t\tmessage.yourIP = Utility.toBytes(e);\r\n\t\t\t\r\n\t\t\t// Set server IP to zero\r\n\t\t\tint[] e2 = {0,0,0,0};\r\n\t\t\tmessage.serverIP = Utility.toBytes(e2);\r\n\t\t\t\r\n\t\t\t// Gateway ip set to zero\r\n\t\t\tint[] f = {0,0,0,0};\r\n\t\t\tmessage.gateWayIP = Utility.toBytes(f);\r\n\t\t\t\r\n\t\t\t// Client hardware address\t\t\t\r\n\t\t\tmessage.clientHardWareAddress = Utility.toBytes(macAddress);\r\n\t\t\t\r\n\t\t\t// Optional: set or not set Server Host Name\r\n\t\t\tint[] g = new int[64];\r\n\t\t\tfor(int i = 0; i < g.length; i++)\r\n\t\t\t\tg[i] = 0;\r\n\t\t\tmessage.serverHostName = Utility.toBytes(g);\r\n\t\t\t\r\n\t\t\t// Optional: set or not set Server Host Name\r\n\t\t\tint[] h = new int[128];\r\n\t\t\tfor(int i = 0; i < h.length; i++)\r\n\t\t\t\th[i] = 0;\r\n\t\t\tmessage.bootFileName = Utility.toBytes(h);\r\n\t\t\t\r\n\t\t\t// Set the magic cookie\r\n\t\t\tmessage.magicCookie = DHCPMessage.COOKIE;\r\n\t\t\t\r\n\t\t\t// Set option 53 to value 7\r\n\t\t\tbyte[] i = {DHCPMessage.DHCPRELEASE};\r\n\t\t\tmessage.addOption((byte)53, (byte)1, i);\r\n\t\t\t\r\n\t\t\t// Set option 54 to value of the IP of the server that allocated the IP address\r\n\t\t\t\r\n\t\t\tmessage.addOption((byte)54, (byte)4, IPInUse.getBytes());\r\n\t\t\t// Set option 255 to indicate the end of the message\r\n\t\t\tint[] j = {0};\r\n\t\t\tmessage.addOption((byte) 255, (byte)0, Utility.toBytes(j));\r\n\t\t\t\r\n\t\t\t// Send the message to the server\r\n\t\t\tIPServer = InetAddress.getByName(IPInUse);\r\n\t\t\tDatagramPacket sendingPacket = new DatagramPacket(message.retrieveBytes(), message.getLength(), IPServer, portServer);\r\n\t\t\tclientSocket.send(sendingPacket);\t\r\n\t\t\tSystem.out.println(\"DHCPRelease sent\\n\");\r\n\t\t}\r\n\t\tcatch(Exception e){e.printStackTrace();}\r\n\t}", "void fillTransmitBuffer(){\n\t\ttransmitBuffer.clear();\n\t\tdataTimeBuffer.clear();\n\n\t\tEnumeration<String> keys=dataLink.keys();\n\t\twhile(keys.hasMoreElements()){\n\t\t\tString key=keys.nextElement();\n\t\t\ttransmitBuffer.put(key, ((SmartInteger)dataLink.get(key).clone()));\n\t\t\tdataTimeBuffer.put(key, ((SmartInteger)dataTime.get(key).clone()));\n\t\t}\n\t\t\n\t}", "public static native void ChannelDetails_set_unspendable_punishment_reserve(long this_ptr, long val);", "private void basicReleaseLock() {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[DLockToken.basicReleaseLock] releasing ownership: {}\",\n this);\n }\n\n leaseId = -1;\n lesseeThread = null;\n leaseExpireTime = -1;\n thread = null;\n recursion = 0;\n ignoreForRecovery = false;\n\n decUsage();\n }", "public interface UDPPacket extends Packet {\n /**\n * \n * @return 0 - Assuming there is no offset and all of the provided data shall be sent completely.\n */\n @Override\n default int getOffset() {\n return 0;\n }\n\n /**\n * \n * @return The payload's length - if there is any. Assuming there all of the provided data shall\n * be sent completely.\n */\n @Override\n default int getLength() {\n final byte[] b = this.getPayload();\n return b != null ? b.length : -1;\n }\n\n /**\n * \n * @param receiver For the usage together with a DatagramPacket constructed from this Packet\n */\n void addReceiver(SocketAddress receiver);\n\n /**\n * \n * @return An unmodifiable Collection of SocketAdress instances - all receivers registered for\n * this package\n */\n Collection<SocketAddress> getReceivers();\n\n /**\n * For smooth access to the UDPPacket.\n * \n * @author trh0\n *\n */\n public static class Builder {\n\n private final UDPPacket packet;\n\n public Builder() {\n this.packet = new UDPPacket() {\n\n private final Collection<SocketAddress> receivers =\n Collections.synchronizedCollection(new ArrayList<>());\n private byte[] data;\n private boolean retry;\n\n @Override\n public synchronized void addReceiver(SocketAddress receiver) {\n if (receiver != null && !this.receivers.contains(receiver))\n this.receivers.add(receiver);\n }\n\n @Override\n public Collection<SocketAddress> getReceivers() {\n return Collections.unmodifiableCollection(this.receivers);\n }\n\n @Override\n public synchronized byte[] getPayload() {\n return this.data;\n }\n\n @Override\n public synchronized void setPayload(byte[] data) {\n synchronized (data) {\n this.data = data;\n }\n }\n\n @Override\n public Collection<String> getTargets() {\n return Collections.unmodifiableCollection(\n this.receivers.stream().map(m -> m.toString()).collect(Collectors.toList()));\n }\n\n @Override\n public void addTarget(String target) throws IllegalArgumentException {\n try {\n String[] hostport = target.split(Pattern.quote(\":\"));\n this.receivers.add(new InetSocketAddress(hostport[0], Integer.parseInt(hostport[1])));\n } catch (Exception e) {\n throw new IllegalArgumentException(\n \"Malformed input. String should be format '<host>:<port>'\", e);\n }\n }\n\n @Override\n public boolean getRetrySending() {\n return retry;\n }\n\n @Override\n public void setRetrySending(boolean b) {\n this.retry = b;\n }\n\n };\n }\n\n /**\n * @return The freshly build packet.\n */\n public UDPPacket build() {\n return this.packet;\n }\n\n /**\n * \n * @param retry Shall the packet be cached until a the PacketGateway can send it?\n * @return The builder to continue building.\n */\n public Builder withRetry(boolean retry) {\n this.packet.setRetrySending(retry);\n return this;\n }\n\n /**\n * \n * @param addresses Some targets to send the package to.\n * @return The builder to continue building.\n */\n public Builder withTargets(SocketAddress... addresses) {\n if (addresses != null)\n Arrays.stream(addresses).forEach(this.packet::addReceiver);\n return this;\n }\n\n /**\n * @param payload Some data.\n * @return The builder to continue building.\n */\n public Builder withPayload(byte[] payload) {\n if (payload != null)\n this.packet.setPayload(payload);\n return this;\n }\n }\n\n}", "public static native long ChannelCounterparty_get_unspendable_punishment_reserve(long this_ptr);", "public LSRPacket() {\n linkID = \"\";\n adv_router = \"\";\n }", "public NetworkPacket() { \r\n this.setTtl(SDN_WISE_DFLT_TTL_MAX);\r\n this.setLen(SDN_WISE_DFLT_HDR_LEN);\r\n }", "void finishPacket(ByteBuffer buffer) {\n addTlv(buffer, DHCP_MESSAGE_TYPE, DHCP_MESSAGE_TYPE_DISCOVER);\n addTlv(buffer, DHCP_CLIENT_IDENTIFIER, getClientId());\n addCommonClientTlvs(buffer);\n addTlv(buffer, DHCP_PARAMETER_LIST, mRequestedParams);\n addTlvEnd(buffer);\n }", "@Override\n protected void allocateAttributes() {\n super.allocateAttributes();\n\n owner = new ByteArrayAttribute(Attribute.OWNER);\n acIssuer = new ByteArrayAttribute(Attribute.AC_ISSUER);\n serialNumber = new ByteArrayAttribute(Attribute.SERIAL_NUMBER);\n attrTypes = new ByteArrayAttribute(Attribute.ATTR_TYPES);\n value = new ByteArrayAttribute(Attribute.VALUE);\n\n putAttributesInTable(owner, acIssuer, serialNumber, attrTypes, value);\n }", "public static native long ChannelDetails_get_unspendable_punishment_reserve(long this_ptr);", "@Override\n\t\tpublic void gotPacket(Packet packet) {\n\t\t\tif(packet.contains(IpV4Packet.class)){\t\n\t\n\t\t\t\tbyte[] rec = obtainPackets4Source(packet);\n\t\t\t\t\n\t\t\t\t//if(!useBatch4Pcap){\n\t\t\t\t//\tpublishEntry(topic,rec);\n\t\t\t\t//}else{\n\t\t\t\t if(rec!=null){\n\t\t\t\t\tcacheUpdate(topic,rec);\n\t\t\t\t }else{\n\t\t\t\t\t log.warn(\"packet is null!\");\n\t\t\t\t }\n\t\t\t\t//}\n\t\t\t}\n\t\t\t\n\t\t}", "public interface Packet {\n /**\n * Read body from byte buffer\n * @param bb \n * @throws java.lang.Exception \n */\n void readBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Write body to byte buffer\n * @param bb \n * @param context \n * @throws java.lang.Exception \n */\n void writeBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Calculate and return body size in bytes\n * @param context\n * @return \n */\n int calculateBodyLength(TranscoderContext context);\n \n /**\n * Calculate and set field with body length\n * @param context\n */\n void calculateAndSetBodyLength(TranscoderContext context);\n \n /**\n * Get body length from field\n * @return \n */\n int getBodyLength();\n\n /**\n * Get sequence number field value\n * @return \n */\n int getSequenceNumber();\n \n /**\n * Set sequence number field value\n * @param sequenceNumber \n */\n void setSequenceNumber(int sequenceNumber); \n}", "void handleNewDataPacket(UDPAddress sender, UDPDataPacket packet) {\n Hashtable<Integer, UDPDataPacket> waitArea = null;\n Integer nextExpected = null; \n UDPDataPacket[] newMsg = null;\n\n // Store the message in the waiting area\n waitArea = (Hashtable<Integer, UDPDataPacket>) waitingPackets.get(sender);\n if (waitArea == null) {\n waitArea = new Hashtable<Integer, UDPDataPacket>();\n waitingPackets.put(sender, waitArea);\n }\n waitArea.put(new Integer(packet.seqNum), packet);\n // PRAGMA [DEBUG] Debug.out.println(\"*** UDPInstance ***: New packet put in waiting area\");\n\n // Figure out the next packet we expect from this sender\n nextExpected = (Integer) globalSeqNum.get(sender);\n if (nextExpected == null) {\n nextExpected = new Integer(0);\n globalSeqNum.put(sender, nextExpected);\n }\n // PRAGMA [DEBUG] Debug.out.println(\"*** UDPInstance ***: Next expected packet is \" + nextExpected);\n\n // Now keep processing packets until we either run out or we can't\n // find the next expected packet\n while ((!waitArea.isEmpty()) &&\n\t (waitArea.containsKey(nextExpected))) {\n\n // Get the next ready packet. Don't forget to delete it out of\n // the wait area.\n UDPDataPacket nextPack = (UDPDataPacket) waitArea.get(nextExpected);\n waitArea.remove(nextExpected);\n // PRAGMA [DEBUG] Debug.out.println(\"*** UDPInstance ***: Handling packet \" + nextPack);\n\n // If there is already a message being constructed for this\n // sender, then add the new packet to the end. Otherwise this\n // data packet must be the beginning of a new message.\n newMsg = (UDPDataPacket[]) nextMsg.get(sender);\n\n if (newMsg == null) {\n\t// Ok, this is the start of a new message. Need to figure out\n\t// how big the new message will be and allocate the\n\t// appropriate space for it.\n\t// PRAGMA [DEBUG] Debug.out.println(\"Starting new user level message\");\n\tnewMsg = new UDPDataPacket[nextPack.totPackets];\n\tnextMsg.put(sender, newMsg);\n }\n\n // Add the new packet\n newMsg[nextPack.streamNum] = nextPack;\n\n // Now check to see if the new message is completed. If so then\n // build a UDPMessage and store it in the msgsReceived queue.\n if ((nextPack.streamNum + 1) == nextPack.totPackets) {\n\t// PRAGMA [DEBUG] Debug.out.println(\"User level message complete, delivering\");\n\tbuildNewRcvdMsg(sender, newMsg);\n\tnextMsg.remove(sender);\n }\n\n // Increment next expected\n nextExpected = new Integer(nextExpected.intValue() + 1);\n globalSeqNum.put(sender, nextExpected);\n }\n\n // If we couldn't find the next message then generate a NACK\n if (!waitArea.isEmpty())\n generateNACK(sender, nextExpected.intValue());\n }", "@Override\n public void sendPacket0(CoapPacket coapPacket, InetSocketAddress adr, TransportContext tranContext) {\n if (!hasDropped) {\n hasDropped = true;\n res.setResourceBody(\"dropped\");\n System.out.println(\"dropped\");\n } else {\n super.sendPacket0(coapPacket, adr, tranContext);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A media bundle asset to be used in the ad. For information about the media bundle for HTML5_UPLOAD_AD, see Media bundles that are part of dynamic product types use a special format that needs to be created through the Google Web Designer. See for more information. .google.ads.googleads.v14.common.AdMediaBundleAsset media_bundle = 2;
@java.lang.Override public com.google.ads.googleads.v14.common.AdMediaBundleAssetOrBuilder getMediaBundleOrBuilder() { if (mediaAssetCase_ == 2) { return (com.google.ads.googleads.v14.common.AdMediaBundleAsset) mediaAsset_; } return com.google.ads.googleads.v14.common.AdMediaBundleAsset.getDefaultInstance(); }
[ "@java.lang.Override\n public com.google.ads.googleads.v14.common.AdMediaBundleAsset getMediaBundle() {\n if (mediaAssetCase_ == 2) {\n return (com.google.ads.googleads.v14.common.AdMediaBundleAsset) mediaAsset_;\n }\n return com.google.ads.googleads.v14.common.AdMediaBundleAsset.getDefaultInstance();\n }", "@java.lang.Override\n public com.google.ads.googleads.v14.common.AdMediaBundleAsset getMediaBundle() {\n if (mediaBundleBuilder_ == null) {\n if (mediaAssetCase_ == 2) {\n return (com.google.ads.googleads.v14.common.AdMediaBundleAsset) mediaAsset_;\n }\n return com.google.ads.googleads.v14.common.AdMediaBundleAsset.getDefaultInstance();\n } else {\n if (mediaAssetCase_ == 2) {\n return mediaBundleBuilder_.getMessage();\n }\n return com.google.ads.googleads.v14.common.AdMediaBundleAsset.getDefaultInstance();\n }\n }", "@java.lang.Override\n public com.google.ads.googleads.v14.common.AdMediaBundleAssetOrBuilder getMediaBundleOrBuilder() {\n if ((mediaAssetCase_ == 2) && (mediaBundleBuilder_ != null)) {\n return mediaBundleBuilder_.getMessageOrBuilder();\n } else {\n if (mediaAssetCase_ == 2) {\n return (com.google.ads.googleads.v14.common.AdMediaBundleAsset) mediaAsset_;\n }\n return com.google.ads.googleads.v14.common.AdMediaBundleAsset.getDefaultInstance();\n }\n }", "@java.lang.Override\n public com.google.ads.googleads.v9.common.MediaBundleAsset getMediaBundleAsset() {\n if (assetDataCase_ == 6) {\n return (com.google.ads.googleads.v9.common.MediaBundleAsset) assetData_;\n }\n return com.google.ads.googleads.v9.common.MediaBundleAsset.getDefaultInstance();\n }", "public Builder setMediaBundle(com.google.ads.googleads.v14.common.AdMediaBundleAsset value) {\n if (mediaBundleBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n mediaAsset_ = value;\n onChanged();\n } else {\n mediaBundleBuilder_.setMessage(value);\n }\n mediaAssetCase_ = 2;\n return this;\n }", "@java.lang.Override\n public com.google.ads.googleads.v9.common.MediaBundleAssetOrBuilder getMediaBundleAssetOrBuilder() {\n if (assetDataCase_ == 6) {\n return (com.google.ads.googleads.v9.common.MediaBundleAsset) assetData_;\n }\n return com.google.ads.googleads.v9.common.MediaBundleAsset.getDefaultInstance();\n }", "@java.lang.Override\n public com.google.ads.googleads.v9.common.MediaBundleAsset getMediaBundleAsset() {\n if (mediaBundleAssetBuilder_ == null) {\n if (assetDataCase_ == 6) {\n return (com.google.ads.googleads.v9.common.MediaBundleAsset) assetData_;\n }\n return com.google.ads.googleads.v9.common.MediaBundleAsset.getDefaultInstance();\n } else {\n if (assetDataCase_ == 6) {\n return mediaBundleAssetBuilder_.getMessage();\n }\n return com.google.ads.googleads.v9.common.MediaBundleAsset.getDefaultInstance();\n }\n }", "void setMedia(org.hl7.fhir.Media media);", "com.google.ads.googleads.v6.resources.MediaFile getMediaFile();", "com.google.ads.googleads.v1.resources.MediaFile getMediaFile();", "public void setMedia(Media media) {\r\n\t\tthis.media = media;\r\n\t}", "org.hl7.fhir.Media getMedia();", "public void setMedia(String media) {\n this.getHints().put(ImageTranscoder.KEY_MEDIA, media);\n }", "com.google.ads.googleads.v6.resources.MediaFileOrBuilder getMediaFileOrBuilder();", "com.google.ads.googleads.v1.resources.MediaFileOrBuilder getMediaFileOrBuilder();", "public com.whensunset.wsvideoeditorsdk.model.MediaFileHolder getMediaAssetFileHolder() {\n return mediaAssetFileHolder_ == null ? com.whensunset.wsvideoeditorsdk.model.MediaFileHolder.getDefaultInstance() : mediaAssetFileHolder_;\n }", "com.google.ads.googleads.v6.resources.Asset getAsset();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Specify the CSS media type. Defaults to \\\"print\\\" but you may want to use \\\"screen\\\" for web styles.\")\n @JsonProperty(JSON_PROPERTY_MEDIA)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getMedia() {\n return media;\n }", "@java.lang.Override\n public com.google.ads.googleads.v9.common.MobileAppAssetOrBuilder getMobileAppAssetOrBuilder() {\n if ((assetDataCase_ == 25) && (mobileAppAssetBuilder_ != null)) {\n return mobileAppAssetBuilder_.getMessageOrBuilder();\n } else {\n if (assetDataCase_ == 25) {\n return (com.google.ads.googleads.v9.common.MobileAppAsset) assetData_;\n }\n return com.google.ads.googleads.v9.common.MobileAppAsset.getDefaultInstance();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a boolean value of an annotation from a Kubernetes metadata object
private static boolean booleanAnnotation(ObjectMeta metadata, String annotation, boolean defaultValue, String... deprecatedAnnotations) { String str = annotation(annotation, null, metadata, deprecatedAnnotations); return str != null ? parseBoolean(str) : defaultValue; }
[ "boolean hasKubernetesMetadata();", "public static boolean booleanAnnotation(HasMetadata resource, String annotation, boolean defaultValue, String... deprecatedAnnotations) {\n ObjectMeta metadata = resource.getMetadata();\n String str = annotation(annotation, null, metadata, deprecatedAnnotations);\n return str != null ? parseBoolean(str) : defaultValue;\n }", "boolean isAnnotationType();", "public boolean isAnnotation()\n {\n return (m_nFlags & ACC_ANNOTATION) != 0;\n }", "AnnotationMetadata getAnnotationMetadata();", "public boolean isAnnotation() {\r\n\t\treturn isAnnotation;\r\n\t}", "public String getAnnotation();", "public boolean anyMetadataEnabled() {\n\n boolean result = false;\n ConfigurationSection ymlMetadata = getConfig().getConfigurationSection(\"metadata\");\n if (ymlMetadata != null) {\n for (String key : ymlMetadata.getKeys(false)) {\n if (ymlMetadata.isBoolean(key) && ymlMetadata.getBoolean(key)) {\n result = true;\n break;\n }\n }\n }\n return result;\n }", "public static boolean hasAnnotation(HasMetadata resource, String annotation) {\n ObjectMeta metadata = resource.getMetadata();\n String str = annotation(annotation, null, metadata, null);\n return str != null;\n }", "public boolean hasAnnotatedFeature();", "boolean isMetadataType(TypeReference t);", "DataMap getCustomAnnotations();", "boolean isMetadataPropagable();", "PropertyAnnotation findAnnotation(String name);", "boolean isSupportedTypeAnnotation();", "boolean hasMetadataLocation();", "String booleanAttributeToGetter(String arg0);", "public Boolean getBooleanAttribute();", "boolean getBoolean(String propertyName);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the next step of the path.
@Override public MFEDirection next() { if (!this.isPathValid()) { String msg = "Annotated Path" + this.getStart().getLocation() + "->" + this.getGoal().getLocation() + ": Cannot get next step " + "when path is invalid."; logger.severe(msg); throw new IllegalStateException(msg); } final MFEDirection dir = this.path.poll(); if (dir == null) { String msg = "Annotated Path " + this.getStart().getLocation() + "->" + this.getGoal().getLocation() + ": No more steps."; logger.severe(msg); throw new NoSuchElementException(msg); } return dir; }
[ "java.lang.String getNextStep();", "public ActionItemWork getNextStep() {\n return nextStep;\n }", "public String nextStep();", "public Step<E, ?> getNextStep();", "String getStep();", "String getPrevStep();", "public MapPath getNextMapPath() {\n return this.next;\n }", "private String getNextLevelPath() {\n String path = levelsPath.get(0);\n levelsPath.remove(0);\n return path;\n }", "int getStep();", "public CrossRoad getNextIntermediateDestination()\n\t{\n\t\treturn this.getHead().getIntermediate();\n\t}", "private GameStateChange nextStep() {\n return nextStep(null);\n }", "public int getNextWalkDirection () {\n\t\treturn nextWalkDirection;\n\t}", "public abstract String [] getPossibleNextSteps(RxStep current);", "public Waypoint getNextPoint(){\n\t\tif (curIndex_ >= route_.size()){\n\t\t\treturn null;\n\t\t}else{\n\t\t\treturn route_.get(curIndex_++);\n\t\t}\n\n\t}", "public PathTile getNextTile() {\n\t\treturn nextTile;\n\t}", "public boolean nextStep(int nextStep);", "public String getNextLocation() {\n return nextLocation;\n }", "private Vector2 FollowPath() {\n //move to next target if close enough to current target (working in\n //distance squared space)\n if (m_pPath.CurrentWaypoint().dst2(m_pVehicle.getPosition()) < m_dWaypointSeekDistSq) {\n m_pPath.SetNextWaypoint();\n }\n\n if (!m_pPath.Finished()) {\n return Seek(m_pPath.CurrentWaypoint());\n } else {\n return Arrive(m_pPath.CurrentWaypoint(), Deceleration.normal);\n }\n }", "Double getStep();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of cnpj
public String getCnpj() { return cnpj; }
[ "public String getCnpj()\n\t{\n\t\treturn cnpj;\n\t}", "public String getCpf_cnpj() {\n return cpf_cnpj;\n }", "public double getJc() {\r\n\t\treturn jc;\r\n\t}", "public String getCnpj() throws ACBrException {\n ByteBuffer lCnpj = ByteBuffer.allocate(STR_BUFFER_LEN);\n int ret = ACBrAACInterop.INSTANCE.AAC_IdentPaf_Empresa_GetCNPJ(getHandle(), lCnpj, STR_BUFFER_LEN);\n checkResult(ret); \n return fromUTF8(lCnpj, ret);\n }", "public void setCnpj(java.lang.String cnpj) {\n this.cnpj = cnpj;\n }", "public String getCjsj() {\n return cjsj;\n }", "public short getJc()\n {\n return field_2_jc;\n }", "String getCpr();", "public Integer getCgjl() {\n return cgjl;\n }", "public String getCn() {\r\n return cn;\r\n }", "public String getcCjuser() {\n return cCjuser;\n }", "public String getOutputValue() {\n// System.out.println(\"geting output value from connection\");\n// System.out.println(\"out:\" + ncOutput.getName() + \" in:\" + ncInput.getName() );\n return _output.getOutputValue();\n }", "String getCviNumber();", "public BigDecimal getSjCb() {\r\n return sjCb;\r\n }", "public java.lang.String getCn() {\r\n return cn;\r\n }", "public BigDecimal getCIF_NO()\r\n {\r\n\treturn CIF_NO;\r\n }", "public String getCscNumber() {\n return cscNumber;\n }", "public BigDecimal getCLT_CIF() {\r\n return CLT_CIF;\r\n }", "public String getCvvNumber();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column user.des
public String getDes() { return des; }
[ "public String getDelectuser() {\n return delectuser;\n }", "public String getDesName() {\r\n\t\treturn desName;\r\n\t}", "public String getOisDeluser() {\n return oisDeluser;\n }", "@Column(name = \"SD_PRO_DES\")\n\tpublic String getTaskDes()\n\t{\n\t\treturn taskDes;\n\t}", "public String getDesCodigo() {\r\n return desCodigo;\r\n }", "public String getDelUser() {\n return delUser;\n }", "public String getGameDes() {\n return gameDes;\n }", "public BigDecimal getEddl() {\n return eddl;\n }", "public String getItemdes() {\n return itemdes;\n }", "public String getPaydes() {\n\treturn paydes;\n }", "public String getUserDesc() {\r\n return userDesc;\r\n }", "final String getDDUser() {\r\n\t\treturn ddUser;\r\n\t}", "public String getUserDepartment() {\r\n return userDepartment;\r\n }", "public String getDesNombre() {\r\n return desNombre;\r\n }", "public void setDes(String des) {\n this.des = des == null ? null : des.trim();\n }", "public void setDesName(String desName) {\r\n\t\tthis.desName = desName;\r\n\t}", "public String getUserDelete() {\n return userDelete;\n }", "public String getDesAbreviacion() {\r\n return desAbreviacion;\r\n }", "public String getEdu() {\n return edu;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use SemanticLangidParams.newBuilder() to construct.
private SemanticLangidParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "speech.multilang.Params.SemanticLangidParamsOrBuilder getSemanticLangidParamsOrBuilder();", "public Builder setSemanticLangidParams(speech.multilang.Params.SemanticLangidParams value) {\n if (semanticLangidParamsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n semanticLangidParams_ = value;\n onChanged();\n } else {\n semanticLangidParamsBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000004;\n return this;\n }", "speech.multilang.Params.SemanticLangidParams getSemanticLangidParams();", "public speech.multilang.Params.SemanticLangidParams getSemanticLangidParams() {\n if (semanticLangidParamsBuilder_ == null) {\n return semanticLangidParams_ == null ? speech.multilang.Params.SemanticLangidParams.getDefaultInstance() : semanticLangidParams_;\n } else {\n return semanticLangidParamsBuilder_.getMessage();\n }\n }", "@java.lang.Override\n public speech.multilang.Params.SemanticLangidParams getSemanticLangidParams() {\n return semanticLangidParams_ == null ? speech.multilang.Params.SemanticLangidParams.getDefaultInstance() : semanticLangidParams_;\n }", "boolean hasSemanticLangidParams();", "public Builder setSemanticLangidModelName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n semanticLangidModelName_ = value;\n onChanged();\n return this;\n }", "Language createLanguage();", "private Lang(){}", "public L0Language ( )\n {\n // nothing to do here...\n }", "private LanguageDecisionParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public abstract void setLanguage(TagContent lang) throws TagFormatException;", "Builder addInLanguage(Language.Builder value);", "private SemanticTokens(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "Builder addInLanguage(String value);", "void createLocale(String locale, String content, String id);", "public LanguageModel(String name) { languageName = name; }", "private StructuredCommandLineId(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public LanguageIdHandler(LanguageID id) {\n\t\tthis.id = id.getIdAsString().split(\":\");\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test when moving the Rook up to a place where the path is blocked
@Test void RookMoveUpBlocked() { Board board = new Board(8, 8); Piece rook1 = new Rook(board, 6, 4, 1); Piece rook2 = new Rook(board, 6, 2, 1); board.getBoard()[6][4] = rook1; board.getBoard()[6][2] = rook2; board.movePiece(rook1, 6, 1); Assertions.assertEquals(rook1, board.getBoard()[6][4]); Assertions.assertEquals(rook2, board.getBoard()[6][2]); Assertions.assertNull(board.getBoard()[6][1]); }
[ "private void followPath(){\r\n\t\tif(noBeepersPresent()){\r\n\t\t\twhile(frontIsClear() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tmakeMove();\r\n\t\t\t}\r\n\t\t\tif(frontIsBlocked() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tturnAround();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t\tfollowPath();\r\n\t\t\t}else{\r\n\t\t\t\tcheckPaths();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean shouldReplanPath(State.StateView state, History.HistoryView history, Stack<MapLocation> currentPath)\n {\n \t\t/* TODO: Write this method\n \t\t * Check if the path is blocked every step or check if the next spot is blocked?\n \t\t * Does enemy attack if you get too close?\n \t\t */\n \t\n \t\n \t\t//checking if the next step is blocked\n \t\t//setting up local fields\n \t\tUnitView enemy = state.getUnit(enemyFootmanID);\n \t\tMapLocation next;\n \t\tif (!path.isEmpty()) {\n \t\t\tnext = path.peek();\n \t\t\n \t\t\tif(next.x == enemy.getXPosition() && next.y == enemy.getYPosition()) \n \t\t\t\treturn true;\n \t\t\t\n \t\t}\n \t\t\n return false;\n }", "@Test\n void RookMoveDownBlocked() {\n Board board = new Board(8, 8);\n Piece rook1 = new Rook(board, 7, 1, 1);\n Piece rook2 = new Rook(board, 7, 4, 1);\n\n board.getBoard()[7][1] = rook1;\n board.getBoard()[7][4] = rook2;\n\n board.movePiece(rook1, 7, 7);\n\n Assertions.assertEquals(rook1, board.getBoard()[7][1]);\n Assertions.assertEquals(rook2, board.getBoard()[7][4]);\n Assertions.assertNull(board.getBoard()[7][7]);\n }", "@Test\n public void moveFromFinishLineNotReachingGoal(){\n Square start = finishPath.get(3);\n start.enter(token);\n token.setSquare(start);\n token.move(1);\n assertEquals(start,token.getSquare());\n }", "private void checkPathing() {\n if(pathing == null) {\n while(pathing == null) {\n map.destroyRandomTower();\n pathing = findPath(74, 17, xDest, yDest);\n }\n }\n }", "private void performUnloadPathRecheck() {\r\n\t\trecheckUnloadPath = false;\r\n\t\tTile oldTile = gameMap.get(myRC.getLocation());\r\n\t\tTile actTile;\r\n\t\t\r\n\t\t/* cut where path is not accessible */\r\n\t\tfor (MapLocation loc : path) {\r\n\t\t\tactTile = gameMap.get(loc);\r\n\t\t\tif (actTile.totalHeight - oldTile.totalHeight > WORKER_MAX_HEIGHT_DELTA) {\r\n\t\t\t\tpath = path.subList(0, path.indexOf(loc));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\toldTile = actTile;\r\n\t\t}\r\n\t\t\r\n\t\t/* cut where we can unload */\r\n\t\tpath.add(0, myRC.getLocation());\r\n\t\tif (path.size() >= 2)\r\n\t\t\tif (gameMap.get(path.get(path.size() - 1)).totalHeight - \r\n\t\t\t\tgameMap.get(path.get(path.size() - 2)).totalHeight >= WORKER_MAX_HEIGHT_DELTA) {\r\n\t\t\t\t/* we can't unload at the end of the path. get to the end and drop it */\r\n\t\t\t\tpath.add(path.get(path.size() - 2));\r\n\t\t\t}\r\n\t\tpath.remove(0);\r\n//\t\tpath.add(0, myRC.getLocation());\r\n//\t\tint size = path.size();\r\n//\t\toldTile = gameMap.get(path.get(size - 1));\r\n//\t\twhile(size >= 2){\r\n//\t\t\tactTile = gameMap.get(path.get(size - 2));\r\n//\t\t\tif (gameMap.get(path.get(path.size() - 1)).totalHeight - gameMap.get(path.get(path.size() - 2)).totalHeight >= WORKER_MAX_HEIGHT_DELTA) {\r\n//\t\t\t\tpath.remove(size - 1);\r\n//\t\t\t\tsize--;\r\n//\t\t\t} else\r\n//\t\t\t\tbreak;\r\n//\t\t\toldTile = actTile;\r\n//\t\t}\r\n//\t\tpath.remove(0);\r\n\t}", "@Test\n public void moveFromFinishLineReachGoal(){\n Square start = finishPath.get(5);\n start.enter(token);\n token.setSquare(start);\n token.move(1);\n assertEquals(finishPath.get(6),token.getSquare());\n assertEquals(true, token.getSquare().isGoalSquare());\n }", "public void testNoPathAvailableDueToCampInTheWay() {\n Game game = getStandardGame();\n Map map = getSingleLandPathMap(game);\n game.setMap(map);\n \n // set obstructing indian camp\n Tile settlementTile = map.getTile(2,10);\n FreeColTestCase.IndianSettlementBuilder builder = new FreeColTestCase.IndianSettlementBuilder(game);\n builder.settlementTile(settlementTile).build();\n \n // set unit\n Player dutchPlayer = game.getPlayer(\"model.nation.dutch\");\n Tile unitTile = map.getTile(1, 11);\n Tile destinationTile = map.getTile(3,7);\n Unit colonist = new Unit(game, unitTile, dutchPlayer, colonistType, UnitState.ACTIVE);\n colonist.setDestination(destinationTile);\n \n PathNode path = map.findPath(colonist, colonist.getTile(), destinationTile);\n assertNull(\"No path should be available\",path);\n }", "public void goToLocation (Locator checkpoint) { //Patrolling Guard and Stationary Guard\r\n\t\tVector2i start = new Vector2i((int)(creature.getXlocation()/Tile.TILEWIDTH), (int)(creature.getYlocation()/Tile.TILEHEIGHT));\r\n\t\tint destx = (int)(checkpoint.getX()/Tile.TILEWIDTH);\r\n\t\tint desty = (int)(checkpoint.getY()/Tile.TILEHEIGHT);\r\n\t\tif (!checkCollision(destx, desty)) {\r\n\t\tVector2i destination = new Vector2i(destx, desty);\r\n\t\tpath = pf.findPath(start, destination);\r\n\t\tfollowPath(path);\r\n\t\t}\r\n\t\tarrive();\r\n\t}", "@Test(timeout = 30000)\n public void testMoveBlockFailure() {\n // Test copy\n testMoveBlockFailure(conf);\n // Test hardlink\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.5);\n testMoveBlockFailure(conf);\n }", "public void moveRobber(HexLocation loc) {\n\n\t}", "public void move() {\n\t\t// tolerance of angle at which the Base starts moving\n\t\tint tolerance = 10;\n\t\tif(Math.abs(angle) < Math.abs(angleDesired)+tolerance && Math.abs(angleDesired)-tolerance < Math.abs(angle)) {\n\t\t\tdouble vX = Math.cos(Math.toRadians(this.angle + 90)) * v;\n\t\t\tdouble vY = Math.sin(Math.toRadians(this.angle + 90)) * v;\n\t\t\t\n\t\t\tthis.x += vX;\n\t\t\tthis.y += vY;\t\n\t\t\tthis.rectHitbox = new Rectangle((int)(x-rectHitbox.width/2),(int)(y-rectHitbox.height/2),rectHitbox.width,rectHitbox.height);\n\t\t}\n\t\t// curTargetPathBoardRectangle\n\t\tRectangle curTPBR = pathBoardRectangles.get(curTargetPathCellIndex).rect;\n\t\tRectangle rectSmallerBR = new Rectangle((int)curTPBR.getCenterX()-5,(int)curTPBR.getCenterY()-5,10,10);\n\t\t// updates the index when it crosses a pathCell so it counts down from pathCell to pathCell,\n\t\t// always having the next pathCell in the array as the target until the end is reached then it stops\n\t\tif(rectSmallerBR.contains(new Point((int)x,(int)y))) {\n\t\t\tif(curTargetPathCellIndex < pathBoardRectangles.size()-1) {\n\t\t\t\tcurTargetPathCellIndex++;\n\t\t\t\tparentGP.boardRect = pathBoardRectangles.get(curTargetPathCellIndex-1);\n\t\t\t\ttAutoDirectionCorrection.restart();\n\t\t\t}else {\n\t\t\t\tparentGP.isMoving = false;\n\t\t\t\tparentGP.boardRect = pathBoardRectangles.get(curTargetPathCellIndex);\n\t\t\t\tpathBoardRectangles.clear();\n\t\t\t\ttAutoDirectionCorrection.stop();\n\t\t\t\tStagePanel.tryCaptureGoldMine(parentGP);\n\t\t\t}\n\t\t}\n\t}", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "@Test\n void RookMoveRightBlocked() {\n Board board = new Board(8, 8);\n Piece rook1 = new Rook(board, 2, 3, 1);\n Piece rook2 = new Rook(board, 6, 3, 1);\n\n board.getBoard()[2][3] = rook1;\n board.getBoard()[6][3] = rook2;\n\n board.movePiece(rook1, 7, 3);\n\n Assertions.assertEquals(rook1, board.getBoard()[2][3]);\n Assertions.assertEquals(rook2, board.getBoard()[6][3]);\n Assertions.assertNull(board.getBoard()[7][3]);\n }", "private void MoveUpIfEastBlocked() {\n\t\tturnLeft();\n\t\tif (frontIsClear()) {\n\t\t\tmove();\n\t\t\tturnLeft();\n\t\t} \n\t}", "@Test\n public void pathfinderGetsCloserToTarget() throws Exception {\n\tString[] map = Referee.maze.getMap();\n\tint width = Referee.maze.dim.x;\n\tint height = Referee.maze.dim.y;\n boolean[][] passable = new boolean[width][height];\n\tList<Vector2D> free = new ArrayList<>();\n\tfor (int y = 0; y < height; y++) {\n\t for (int x = 0; x < width; x++) {\n\t\tif (Referee.maze.isEmpty(map[y].charAt(x))) {\n\t\t passable[x][y] = true;\n\t\t free.add(new Vector2D(x, y));\n\t\t}\n\t }\n\t}\n\t\n\tPathFinder pathfinder = new PathFinder().withWeightFunction(Cell::getMinionPathLength);\n\tfor (Vector2D end : free) {\n\t int[][] dist = BFS(passable, end, width, height);\n\t for (Vector2D start : free) {\n\t\tif (start == end || dist[start.x][start.y] == -1) continue;\n\t\tPathFinder.PathFinderResult findPath = pathfinder\n .from(Referee.playfield.getCell(start.x, start.y))\n .to(Referee.playfield.getCell(end.x, end.y))\n .findPath();\n\t\tCell next = findPath.getNextCell();\n\t\tassertThat(dist[next.pos.x][next.pos.y], is(dist[start.x][start.y] - 1));\n\t }\n\t}\n }", "@Test\n public void testFindGoalSquare2(){\n Square start = finishPath.get(5);\n Square stop = board.findGoalSquare(start,token,1);\n assertEquals(6, finishPath.indexOf(stop));\n assertEquals(true, stop.isGoalSquare());\n }", "@Test\n public void testFindGoalSquare(){\n Square start = finishPath.get(0);\n Square stop = board.findGoalSquare(start,token,10);\n assertEquals(0, finishPath.indexOf(stop));\n assertEquals(false,stop.isGoalSquare());\n }", "private void navToPoint(Unit unit){\n\t\tMapLocation currentLocation = unit.location().mapLocation();\n\t\tMapLocation locationToTest;\n\t\tMapLocation targetLocation = orderStack.peek().getLocation();\n\t\tlong smallestDist=1000000000; //arbitrary large number\n\t\tlong temp;\n\t\tDirection closestDirection=null;\n\t\tint i=1;\n\t\t\n\t\tif(gc.isMoveReady(unitID)){\n\t\t\t//first find the direction that moves us closer to the target\n\t\t\tfor(Direction dir : Direction.values()){\n\t\t\t\tif (debug) System.out.println(\"this (\"+dir.name()+\") is the \"+i+\"th direction to check, should get to 9\");\n\t\t\t\tlocationToTest=currentLocation.add(dir);\n\t\t\t\t//make sure it is on the map and is passable\n\t\t\t\tif (debug){\n\t\t\t\t\tSystem.out.println(\"testing this location: \"+locationToTest);\n\t\t\t\t\tSystem.out.println(\"valid move? \"+gc.canMove(unitID, dir));\n\t\t\t\t}\n\t\t\t\tif(gc.canMove(unitID, dir)){\n\t\t\t\t\tif (debug)System.out.println(\"we can indeed move there...\");\n\t\t\t\t\t//make sure the location hasn't already been visited\n\t\t\t\t\tif(!pastLocations.contains(locationToTest)){\n\t\t\t\t\t\tif (debug)System.out.println(\"not been there recently...\");\n\t\t\t\t\t\t//at this point its a valid location to test, check its distance\n\t\t\t\t\t\ttemp = locationToTest.distanceSquaredTo(targetLocation);\n\t\t\t\t\t\tif (debug)System.out.println(\"distance :\"+temp);\n\t\t\t\t\t\tif (temp<smallestDist){\n\t\t\t\t\t\t\tif (debug)System.out.println(\"new closest!\");\n\t\t\t\t\t\t\t//new closest point, update accordingly\n\t\t\t\t\t\t\tsmallestDist=temp;\n\t\t\t\t\t\t\tclosestDirection=dir;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}//end of for-each loop\n\t\t}//end move ready if.\n\t\t\n\t\t//actual movement and maintenance of places recently visited\n\t\tif(closestDirection!=null){\n\t\t\tif (debug){\n\t\t\t\tSystem.out.println(\"found a closest direction, calling navInDirection()\");\n\t\t\t\tSystem.out.println(\"heading \"+closestDirection.name());\n\t\t\t}\n\t\t\tmoveInDirection(closestDirection, unit);\n\t\t\tcleanUpAfterMove(unit);\n\t\t}else{\n\t\t\t//can't get any closer\n\t\t\tif (debug) System.out.println(\"can't get closer, erasing past locations\");\n\t\t\tpastLocations.clear();\n\t\t}\n\t\t\n\t\t//have we arrived close enough?\n\t\tif(unit.location().mapLocation().distanceSquaredTo(targetLocation)<=howCloseToDestination){\n\t\t\t//atTargetLocation=true;\n\t\t\t\n\t\t\t//if order was a MOVE order, it is complete, go ahead and pop it off the stack\n\t\t\tif(orderStack.peek().getType().equals(OrderType.MOVE)){\n\t\t\t\torderStack.pop();\n\t\t\t}\n\t\t\tif (debug) System.out.println(\"Unit \"+unit.id()+\" arrived at destination.\");\n\t\t}\n\t\t\n\t\t;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Check a string is school year format. Ex: 20172018
public static boolean validSchoolYear(String schoolYear) { String regex = "^[0-9]{4}-[0-9]{4}$"; return schoolYear != null && schoolYear.matches(regex); }
[ "private boolean isYear(String s) {\n if (s.length() != 4) {\n return false;\n }\n for (int i=0; i<s.length(); i++) {\n if (!Character.isDigit(s.charAt(i))) {\n return false;\n }\n }\n return true;\n }", "public boolean validYear (String input) {\n\t\t\n\t\tif (input == null) {return false;}\n\t\telse {\n\t\tPattern p = Pattern.compile(\"20[0-9]{2}|19[0-9]{2}\");\n\t\tMatcher m = p.matcher(input);\n\t\treturn m.matches();\n\t\t}\n\t}", "private boolean isYear(String year) {\n\t\tif (year.length() == 0) {\n\t\t\t// empty\n\t\t\tSystem.out.println(\"year is empty\");\n\t\t\treturn true;\n\t\t}\n\n\t\tboolean allNums = true;\n\n\t\tfor (int i = 0; i < year.length(); i++) {\n\t\t\tif (isNum(year.charAt(i)) == false) {\n\t\t\t\t// there is a character that is not a number (ex. c, ~, etc), not valid year\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static boolean checkIyr(String value) {\n return Integer.parseInt(value) >= 2010 && Integer.parseInt(value) <= 2020;\n }", "private boolean checkIfYear(String token)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif (Integer.parseInt(token) > 0)\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException e)\r\n\t\t{\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "private boolean checkYear() {\n String year = \"\";\n for (Field f : this.getFields()) {\n if (f.getKey() == FType.year) {\n year = f.getValue();\n if (year.trim().length() == 0) {\n if (!f.isRequired()) { // if year is not required and empty returns true.\n return true;\n }\n break;\n }\n }\n }\n// if year is not null and not empty\n for (int i = 0; i < year.trim().length(); i++) {\n if (year.charAt(i) > '9' || year.charAt(i) < '0') {\n throw new IllegalArgumentException(\"Year value must be a number\");\n }\n }\n int currentYear = Calendar.getInstance().get(Calendar.YEAR);\n if ((Integer.parseInt(year) > currentYear)\n || (Integer.parseInt(year) < 0)) {\n throw new IllegalArgumentException(\"Year value must not be negative or grether then current year!\");\n }\n return true;\n }", "private static boolean checkEyr(String value) {\n return Integer.parseInt(value) >= 2020 && Integer.parseInt(value) <= 2030;\n }", "private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }", "private boolean startWithYear(String v, int offset) {\n\t\tint count=0;\n\t\tString resultInteger=\"\";\n\t\tboolean found= false;\n\t\tchar currentChar;\n\t\twhile(count<8 && offset+count<v.length())\n\t\t{\n\t\t\tcurrentChar = v.charAt(offset+count);\n\t\t\tif(!found)\n\t\t\t{\n\t\t\t\tif(isDigital(currentChar))\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tresultInteger+=currentChar;\n\t\t\t\t}\n\t\t\t\tcount++;\n\t\t\t}\telse\n\t\t\t{\n\t\t\t\tif(isDigital(currentChar)) {\n\t\t\t\t\tresultInteger += currentChar;\n\t\t\t\t\tcount++;\n\t\t\t\t}else if(currentChar<=32 ||currentChar==' ') //skip empty chars and quanjiao space\n\t\t\t\t{\n\t\t\t\t\tcount++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfound = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(resultInteger.length()==0)\n\t\t\treturn false;\n\t\telse if (new Integer(resultInteger)<1900 || new Integer(resultInteger)>2025)\n\t\t\treturn false;\n\t\telse return true;\n\t}", "@Test\n public void isValidScheduleYear_inValidYear_validYearFalse() {\n assertFalse(Year.isValidYear(\"0000\")); //year left Max tail boundary\n assertFalse(Year.isValidYear(\"1999\")); //year left Max tail boundary\n assertFalse(Year.isValidYear(\"2100\")); //year right Min tail boundary\n assertFalse(Year.isValidYear(\"9999\")); //year right Max tail boundary\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 }", "private static int getYear(String string) {\n String[] pieces = string.split(\"-\");\n\n return Integer.parseInt(pieces[0]);\n }", "static public String getYearFromDate(String dateStr) {\n if (dateStr != null) {\n int i = dateStr.indexOf('-');\n String year = (i > 0) ? dateStr.substring(0,i) : dateStr;\n try {\n if (Integer.parseInt(year) > 0) {\n return year;\n }\n } catch (NumberFormatException ex) {\n log.debug2(\"Year field of date is not a number: \" + dateStr);\n }\n }\n return null;\n }", "private boolean validYear(int year)\n {\n return (((year >= FileHandler.FIRST_YEAR) && (year <= FileHandler.LAST_YEAR)) || (year == QUIT));\n }", "@Test\n\tpublic void parseDateTextFieldYearTest() {\n\t\tassertEquals(2016,\n\t\t\t\tInteger.parseInt(textFieldDate.getText().substring(0, 4)));\n\t}", "private static int retrieveYear(String year) {\n\t\t\n\t\tint result = Constants.INVALID_YEAR;\n\t\t\n\t\tif (year == null) { \n\t\t\n\t\t\tresult = Calendar.getInstance().get(Calendar.YEAR);\n\t\t\tyear = String.valueOf(result);\n\t\t\n\t\t}\n\n\t\tboolean isNumeric = StringUtils.isNumeric(year);\n\t\t\n\t\tif (isNumeric == true) {\n\t\t\n\t\t\tresult = Integer.parseInt(year);\n\t\t\n\t\t} else { \n\t\t\n\t\t\tthrow new IllegalArgumentException(Constants.ERROR_INVALID_DATE);\n\t\t\n\t\t}\n\t\t\n\t\tif (result < Constants.DATE_YEAR_MIN || result > Constants.DATE_YEAR_MAX) {\n\t\t\n\t\t\tthrow new IllegalArgumentException(Constants.ERROR_INVALID_DATE);\n\t\t\n\t\t}\n\t\t\n\t\treturn result;\n\t\n\t}", "private static boolean validateEyr(boolean validEyr, String entry) {\n if (entry.substring(4).matches(\"^[0-9]{4}$\")\n && Integer.parseInt(entry.substring(4)) >= 2020\n && Integer.parseInt(entry.substring(4)) <= 2030) {\n validEyr = true;\n }\n return validEyr;\n }", "public void validationsYear() {\n\t\tString txtReleaseYear = releaseYear.getText();\n int yearNumber = Integer.parseInt(txtReleaseYear);\n \n //Release Year must be a 4 digit number\n if(releaseYear.getText().length()<4) {\n \tJOptionPane.showMessageDialog(null, \"A valid Release Year must have 4 digits\");\n } else {\n \t//Validation of Current Year less than 2020\n\t \tif(yearNumber <= 2020) {\t\t//Year number must be equal or less than current year (2020)\n\t \t\t//Call method 'insertInformation'\n\t \t\tinsertInformation();\n\t \t}else {\t\t//If the Release Year is greater than current year (2020)\n\t \t\tJOptionPane.showMessageDialog(null, \"Release year cannot be after the current year\");\n\t }\n }\n\t}", "public static Matcher<LocalDateTime> isYear(final int year) {\r\n\t\treturn new IsYear<LocalDateTime>(year, t -> t);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Ogr Tables in Database
public String getOgrTables() { return conn.getOgrTables(); }
[ "Object getTables();", "java.lang.String getTable();", "public ArrayList<Table> getTablesFromDataBase() {\n currResponse = sercli.httpGet(\"http://shouganai.net:8080/restaurant/rest/tables\");\n allDbTables= (Tables) sercli.convertXML(currResponse, Tables.class); \n return allDbTables.getTables();\n }", "public ArrayList getTables(String Db);", "Set<TableWithAlias> getQueriedTables();", "public Collection<TapTable> findAllTables();", "public static String table(){initDBI();return dbi.tableName();}", "public String getTableSQL();", "private List<Table<?>> listTables() throws IOException {\n return database.query(context -> context.meta().getSchemas(DEFAULT_SCHEMA).stream()\n .flatMap(schema -> context.meta(schema).getTables().stream())\n .collect(Collectors.toList()));\n }", "protected TableModel getCronusTables2() {\r\n String sqlString = \"SELECT TABLE_NAME AS Tabellnamn FROM INFORMATION_SCHEMA.TABLES\";\r\n ResultSet rs = this.excecuteQuery(sqlString);\r\n TableModel tm = this.getResultSetAsDefaultTableModel(rs);\r\n return tm;\r\n\r\n }", "String getTable(String tableName);", "List<TDTable> listTables(String databaseName);", "public ArrayList<String> getTableNames(){\n\t\tArrayList<String> tables = new ArrayList<String>();\n\t\tDatabaseMetaData dbmd = getDBMetaData();\n\t\tif (dbmd != null){\n\t\t\ttry {\n\t\t\t\tResultSet rs = dbmd.getTables(null, null, \"%\", null);\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif (rs.getString(2).equals(\"dbo\")){\n\t\t\t\t\t\ttables.add(rs.getString(3));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn tables;\n\t}", "@GET\n @Path(\"/getall\")\n public List<Table> getAllTables(){\n if(tables==null)return new ArrayList<>();\n return tables;\n }", "protected final Iterator allTables() {\n\n return new WrapperIterator(\n database.schemaManager.databaseObjectIterator(SchemaObject.TABLE),\n new WrapperIterator(sysTables, true));\n }", "public ArrayList<Table> getAllTablesAndViews() {\n synchronized (database) {\n return New.arrayList(tablesAndViews.values());\n }\n }", "public List<String> getTableNames() {\r\n\t\tList<String> TBL_LIST = new ArrayList<String>();\r\n\t\tConnection con = null;\r\n\t\tString sql = \"select LOGIC_TBL_NM from TBL_DTL\";\r\n\t\ttry {\r\n\r\n\t\t\tcon = ConnectionMgt.getConnectionObject();\r\n\t\t\tsql = \"select * from tbl_dtl order by PHYS_TBL_NM\";\r\n\t\t\tPreparedStatement stmt = null;\r\n\t\t\tstmt = con.prepareStatement(sql);\r\n\t\t\tResultSet rst = stmt.executeQuery();\r\n\t\t\twhile (rst.next()) {\r\n\t\t\t\tTBL_LIST.add(rst.getString(\"LOGIC_TBL_NM\"));\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn TBL_LIST;\r\n\r\n\t}", "protected TableModel getCronusTables1() {\r\n String sqlString = \"SELECT name AS Tabellnamn FROM sys.tables\";\r\n ResultSet rs = this.excecuteQuery(sqlString);\r\n TableModel tm = this.getResultSetAsDefaultTableModel(rs);\r\n return tm;\r\n\r\n }", "public List<String> get_table_names() {\n LinkedList<String> res = new LinkedList<>();\n\n //the table name information is stored in sqlite_master\n ResultSet resultSet = execute_statement(\"SELECT name FROM sqlite_master WHERE type='table'\" +\n \"AND name <> 'sqlite_sequence' AND name <> 'relationship'\", true);\n\n try {\n while (resultSet.next()) {\n res.add(resultSet.getString(1));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return res;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a member of a queue. PropertyChangeEvents are fired for the following properties: state position reportedPosition
public interface AsteriskQueueEntry extends LiveObject { String PROPERTY_STATE = "state"; String PROPERTY_POSITION = "position"; String PROPERTY_REPORTED_POSITION = "reportedPosition"; int POSITION_UNDETERMINED = -1; /** * Returns the date this member joined the Queue.<p> * This property is immutable. * * @return the date this member joined the Queue */ Date getDateJoined(); /** * Returns the date this member left the queue room.<p> * This property is <code>null</code> as long as the user is * in state {@link QueueEntryState#JOINED} and set to date the * member left when entering {@link QueueEntryState#LEFT}. * * @return the date this member left the Queue or * <code>null</code> if the user did not yet leave. */ Date getDateLeft(); /** * Returns the lifecycle status of this AsteriskQueueEntry.<p> * Initially the user is in state {@link org.asteriskjava.live.QueueEntryState#JOINED}. * * @return the lifecycle status of this AsteriskQueueEntry. */ QueueEntryState getState(); /** * Returns the Queue this member joined.<p> * This property is immutable. * * @return the Queue this entry joined. */ AsteriskQueue getQueue(); /** * Returns the channel associated with this entry.<p> * This property is immutable. * * @return the channel associated with this entry. */ AsteriskChannel getChannel(); /** * Returns the name of the channel associated with this entry.<p> * Comodity bridge, don't duplicate channel name as it can be renamed. * * @return the name of the channel associated with this entry. */ String getChannelName(); /** * Returns the position of this queue entry in the queue.<p> * * @return the name of the channel associated with this entry. */ int getPosition(); }
[ "public void stateChanged(ChangeEvent e) {\n _updateQueueDisplay();\n }", "public static interface MemberForwardObserver\n {\n /**\n * Called when the supplied member object is about to be sent to the specified node.\n */\n void memberWillBeSent (String node, MemberObject member);\n }", "public void playerQueueUpdated(IPlayerQueue queue);", "void memberUpdated(final TypeMember member);", "public interface Listener {\n\n /**\n * Dispatches an event notifying that the intermediate\n * X value of a FlowPosition object has changed.\n * @param now The new intermediate X value.\n */\n void horizontalChange(float now);\n\n /**\n * Dispatches an event notifying that the intermediate\n * Y value of a FlowPosition object has changed.\n * @param now The new intermediate Y value.\n */\n void verticalChange(float now);\n }", "public static interface MemberObserver\n {\n /**\n * Notifies the observer when a member has entered a new scene.\n */\n void memberEnteredScene (String peerName, int memberId, int sceneId);\n }", "public int getQueuePosition();", "private iCellUnitPropertyChange(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public void taskPropertyUpdate(TaskPropertyEvent event) {\n }", "protected void addQueueMonitoringPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_MQQueueManager_queueMonitoring_feature\"), //$NON-NLS-1$\r\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_MQQueueManager_queueMonitoring_feature\", \"_UI_MQQueueManager_type\"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\t\t\t MqPackage.Literals.MQ_QUEUE_MANAGER__QUEUE_MONITORING,\r\n\t\t\t\t true,\r\n\t\t\t\t false,\r\n\t\t\t\t false,\r\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\r\n\t\t\t\t null,\r\n\t\t\t\t null));\r\n\t}", "public CmsEventQueueRecord() {\n super(CmsEventQueue.CMS_EVENT_QUEUE);\n }", "public Member getMember() {\n return member;\n }", "@ApiModelProperty(value = \"The FlowFile's position in the queue.\")\n public Integer getPosition() {\n return position;\n }", "public java.lang.Boolean getDisplayQueuePosition() {\r\n return displayQueuePosition;\r\n }", "public Member getMember() {\r\n \t\t\treturn member;\r\n \t\t}", "public MovementQueue getMovementQueue() {\n\t\treturn movementQueue;\n\t}", "public void processObjectPropertyChange(ProcessObject obj, String name, String oldValue, String newValue);", "void memberWillBeSent (String node, MemberObject member);", "protected void addQueueManagerStatusPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_MQQueueManager_queueManagerStatus_feature\"), //$NON-NLS-1$\r\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_MQQueueManager_queueManagerStatus_feature\", \"_UI_MQQueueManager_type\"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n\t\t\t\t MqPackage.Literals.MQ_QUEUE_MANAGER__QUEUE_MANAGER_STATUS,\r\n\t\t\t\t true,\r\n\t\t\t\t false,\r\n\t\t\t\t false,\r\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\r\n\t\t\t\t null,\r\n\t\t\t\t null));\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'field499' field. doc for field499
public java.lang.CharSequence getField499() { return field499; }
[ "public java.lang.CharSequence getField499() {\n return field499;\n }", "java.lang.String getField1500();", "java.lang.String getField1000();", "java.lang.String getField1301();", "java.lang.String getField1999();", "public java.lang.CharSequence getField1000() {\n return field1000;\n }", "public java.lang.CharSequence getField498() {\n return field498;\n }", "java.lang.String getField1599();", "java.lang.String getField1164();", "java.lang.String getField1499();", "java.lang.String getField1200();", "public java.lang.CharSequence getField1000() {\n return field1000;\n }", "java.lang.String getField1900();", "public java.lang.CharSequence getField99() {\n return field99;\n }", "java.lang.String getField1199();", "public java.lang.CharSequence getField498() {\n return field498;\n }", "java.lang.String getField1098();", "java.lang.String getField1001();", "java.lang.String getField1950();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor that sets the display loc variable to new, so that a new image is created once the algorithm completes.
public void setDisplayLocNew() { displayLoc = NEW; }
[ "@Override\n public void setDisplayedLocation(Location loc) {\n pane.setVvalue(loc.getyCoord());\n pane.setHvalue(loc.getxCoord());\n setCurrentFloor(loc.getLevel());\n displayedLocation = getDisplayedLocation();\n }", "public void setDisplayLocReplace() {\r\n displayLoc = REPLACE;\r\n }", "void updateDisplay(){\n int [] pixels = (int []) display.clone();\n \n displayImage = \n\tparameters.createImage(\n new MemoryImageSource(\n input1.getWidth(), \n\t\t input1.getHeight(), \n\t\t pixels,\n 0, \n\t\t input1.getWidth()));\n imageIcon = new ImageIcon(displayImage);\n imageLabel.setIcon(imageIcon);\n updateParameters();\n }", "public void setDisplayPicture() {\n grid.setRotate(45); //sets the to isometric view\n grid.setRotatey(35); //\"\" \"\" \"\" \"\" \"\"\n grid.setZoom((int) (40.0 / Math.sqrt(getCanvasHeight())));\n grid.setLocation(EditorScreen.s_maxWidth / 2, EditorScreen.s_maxHeight / 2 + 200);// moves the canvas to the centre of the screen\n if (isNormalColour)\n ComponentManager.getCanvasManipulator().getContourDefaultToggle().getActionEvent();\n update();\n displayPicture.setBounds( //sets the rectangle\n (int) (grid.getPts()[0][0][side - 1].getVec().getX()),\n (int) (grid.getPts()[height - 1][0][0].getVec().getY()),\n (int) (grid.getPts()[height - 1][side - 1][0].getVec().getX() - grid.getPts()[0][0][side - 1].getVec().getX()),\n (int) (grid.getPts()[0][side - 1][side - 1].getVec().getY() - grid.getPts()[height - 1][0][0].getVec().getY()));\n ComponentManager.minimizeAll(EditorScreen.getComponentManager());\n ComponentManager.turnOffSettings();\n\n }", "public static void setIconGenInstanceLocation(int loc) { cacheIconGenInstanceLocation.setInt(loc); }", "public void updateDisplay() {\n if (useDisplay) {\n Bitmap bitmap = Visuals.spaceMapToBitmap(spaceMap.getRawMap());\n bitmap = Bitmap.createScaledBitmap(bitmap, bitmapDisplaySize, bitmapDisplaySize, false);\n displaySource.updateImageView(bitmap);\n }\n }", "public Image getCurrentView(String loc) {\n\t\tcurrent_location = world.getLocation(loc);\n\t\treturn current_location.getView();\n\t}", "public void refreshDisplay() {\n refreshDisplay(iAceTree.getImageManager().getCurrentImageName(),\n iAceTree.getImageManager().makeImage(),\n iAceTree.getImageManager().getCurrImagePlane());\n }", "private void updateDisplay(){\n display = new Display(primaryStage, ROWS, COLUMNS, board, inputState, score);\n }", "Label setLocation();", "public RBLocation(int newOffset, int newFrame, int newFrameOffset) {\n offset = newOffset;\n frame = newFrame;\n frameOffset = newFrameOffset;\n }", "public void setButtonDisplayLocation(int loc) {\r\n\t\t_buttonDisplayLocation = loc;\r\n\t}", "public void setSpawn(Location loc) {\n if (loc != null) {\n spawn = new ImmutableSimpleLocation(loc);\n }\n }", "public void setVisibleLocation(location A){\n\t\tvisibleLocation = A;\n\t}", "public void setLocation(int newOffset, int newFrame, int newFrameOffset) {\n offset = newOffset;\n frame = newFrame;\n frameOffset = newFrameOffset;\n }", "private void actualLocation() {\n addEventHandler(WindowEvent.WINDOW_SHOWN, (e) -> {\n actualLocation = new Point2D(getX(), getY());\n });\n }", "public void displayImage() {\n JLabel picLabel = new JLabel(new ImageIcon(this.bi));\n JPanel jp = new JPanel();\n jp.add(picLabel);\n\n JFrame f = new JFrame();\n f.setSize(this.width, this.height);\n f.add(jp);\n f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n f.setVisible(true);\n\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n f.setLocation(dim.width/2-f.getSize().width/2, dim.height/2-f.getSize().height/2);\n\n }", "private void setLocation(Location newLocation) {\n\t\tif (location != null) {\n\t\t\tfield.clear(location);\n\t\t}\n\t\tlocation = newLocation;\n\t\tfield.place(this, newLocation);\n\t}", "private void updateDisplay() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the name by _name.
public void setName(String name) { _name = name; }
[ "public void setName(String name) {\n NAME = name;\n }", "public void setName(Name v) {\n this.name = v;\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n this.gmName = name;\r\n }", "public void setName(String name) {//setName method\n\t\tthis.name = name;//save input data to name\n\t}", "public void setName(String name) {\n if(name == null || name.isEmpty()){\n throw new IllegalArgumentException(\"name cannot be empty!\");\n }\n else{\n this.name = name;\n }\n }", "@Override\n public void setName(java.lang.String name) {\n _person.setName(name);\n }", "public void setName(final String name) {// TODO trigger gui changes and so on need AgentModel\n\t\t\tthis.name = name;\n\t}", "public void setName(String name) {\n this.name = name;\n this.box.getElement().setAttribute(\"name\", name);\n }", "public void setName( String name ) {\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"name\", name ) );\n }", "public void setName(java.lang.String name) {\n\t\t_person.setName(name);\n\t}", "public void updateName(String name){\r\n\t\tsuper.name = name;\r\n\t}", "public void setName(String name) {\n if (name != this.name\n || (name != null && !name.equals(this.name))) {\n String oldName = this.name;\n this.name = name;\n this.propertyChangeSupport.firePropertyChange(Property.NAME.toString(), oldName, name);\n }\n }", "public void setName( String name ) {\n objectName = name;\n }", "public void setName(String rname) {\n name = rname;\n }", "public void setName(QName name)\r\n\t{\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t\tthis.observerList.notifyObservers(GNotification.GNODE_RENAME, this);\r\n\t}", "public abstract void setName(String name);", "public void setCustomName ( String name ) {\n\t\texecute ( handle -> handle.setCustomName ( name ) );\n\t}", "public void setName(String name){\n this.name = name + \"(Ice Cream)\";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the max age for the cookie, based on whether the cookie should be browser session only. If the cookie is only meant to last the same length the users browser is open, then the max age is set to 1. Otherwise the max age is set to expiry time.
private int getCookieMaxAge(Date now, Date exp) { if (!browserSessionOnly) { return new Long((exp.getTime() - now.getTime()) / 1000L).intValue(); } else { return -1; } }
[ "@Description(\"The configured session cookie max-age in milliseconds sent to the browser\")\n @Units(\"milliseconds\")\n public long getCookieMaxAge();", "public Integer getMaxAge() {\r\n\t\t\treturn maxAge;\r\n\t\t}", "public int getMaxAge()\n {\n return MAX_AGE;\n }", "public int getMaxAge()\r\n {\r\n return MAX_AGE;\r\n }", "public int getCookieKeepExpire() {\n return cookieKeepExpire;\n }", "public int getMaximumAge() {\n\t\treturn maximum_age;\n\t}", "Integer getMaxAgeCacheValue();", "public AssertionResult hasMaxAge(Cookie cookie, long maxAge) {\n\t\tlong actualMaxAge = cookie.getMaxAge();\n\t\treturn actualMaxAge == maxAge ? success() : failure(shouldHaveMaxAge(maxAge, actualMaxAge));\n\t}", "public long getMaxRequestAge() {\n\treturn getVerifier().getMaxRequestAge();\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public int getMaxChildAge() {\n\t\treturn this.maxChildAge;\n\t}", "public int getAgeLimit() {\n\t\treturn ageLimit;\n\t}", "String getCookieDefaultExpire();", "String getCookieEternalExpire();", "public ResultMatcher maxAge(String name, int maxAge) {\n\t\treturn result -> {\n\t\t\tCookie cookie = getCookie(result, name);\n\t\t\tassertEquals(\"Response cookie '\" + name + \"' maxAge\", maxAge, cookie.getMaxAge());\n\t\t};\n\t}", "long getExpiryAge() {\n return expiryAge;\n }", "public String getMaxage() {\n return getAttribute(ATTRIBUTE_MAXAGE);\n }", "public void setCookieKeepExpire(int value) {\n this.cookieKeepExpire = value;\n }", "@ApiModelProperty(value = \"Specifies the maximum time in seconds allowed before the password expires.\")\n public Integer getMaxPasswordAge() {\n return maxPasswordAge;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ moveToTrailer is called by Board's endDay method resets all player attributes except $, cr, rank, and ID
public void moveToTrailer(Room trailers){ this.myRoom = trailers; if (this.myRole != null){ this.myRole.actorLeaves(); } this.myRole = null; this.myScene = null; this.practiceCnt = 0; this.actionTaken = false; this.turnDone = false; this.roleOnCard = false; this.mode = 0; changed(); }
[ "public void resetForNextDay(){\n board.xml.set.generateSceneCards();\n int playerCount = board.getPlayerCount();\n Player[] players = board.getPlayers();\n for(int i = 0; i < playerCount; i++) {\n players[i].setPos(\"Trailer\");\n }\n\n board.incrementDay();\n board.resetTurn();\n if(board.getDay() > this.dayLimit){\n endGame(players);\n }\n }", "public void setTrailer(VideoObject trailer) {\n\t\tthis.trailer = trailer;\n\t}", "public void resetPlayers() {\n Player curPlayer;\n for(int i = 0; i < players.size(); i++){\n curPlayer = players.peek();\n curPlayer.resetRole();\n curPlayer.setLocation(board.getSet(\"trailer\"));\n curPlayer.setAreaData(curPlayer.getLocation().getArea());\n view.setDie(curPlayer);\n players.add(players.remove());\n }\n\n }", "public void removeLast()\n {\n \tif(hasTrailer())\n \t{\n \t\tif(trailer.hasTrailer())\n\t \t{\n\t \t\ttrailer.removeLast();\n\t \t\treturn;\n\t \t}\n\t \trandom = new Random();\n\t \ttrailer.setLocation(random.nextInt(GameFrame.FRAME_WIDTH - RailCar.TOTAL_WIDTH), \n\t \t\t\t\t\t\trandom.nextInt(GameFrame.FRAME_HEIGHT - RailCar.TOTAL_HEIGHT));\n\t \ttrailer.isTrailer = false;\n\t \thasTrailer = false;\n\t \ttrailer.deselect();\n\t \ttrailer = null;\n \t}\n }", "public void removeRecordsFromPlayer(){\n\t\tif (this.player.isAxlePinned()){\n\t\t\tthis.player.parkStylus();\n\t\t\tthis.player.stopTurntable();\n\t\t\twhile(!this.player.isAxleEmpty()){\t\t\n\t\t\t\tthis.player.dropRecordFromAxle();\n\t\t\t}\n\t\t\tthis.player.unpinAxle();\n\t\t\tIList<Record> removedRecords;\n\t\t\tremovedRecords=this.player.removeAllRecordsFromTurntable();\n\t\t\tfor (IListIterator<Record> iterator=removedRecords.createIterator();iterator.isValid()\n\t\t\t\t\t;iterator.moveNext()){\n\t\t\t\tplaceRecordInSlot(iterator.getCurrentElem());\n\t\t\t}\n\t\t}\n\t}", "public void removeFirst()\n {\n \tif(hasTrailer)\n \t{\n \t\tif(trailer.hasTrailer)\n \t\t{\n \t \tthis.trailer.isTrailer = false;\n \t \tthis.trailer.hasTrailer = false;\n \t \ttrailer = this.trailer.trailer;\n \t\t}\n \t\telse\n \t\t{\n \t\t\trandom = new Random();\n \t \ttrailer.isTrailer = false;\n \t \thasTrailer = false;\n \t \ttrailer.setLocation(random.nextInt(GameFrame.FRAME_WIDTH - RailCar.TOTAL_WIDTH), \n\t\t\t\t\t\t\t\t\trandom.nextInt(GameFrame.FRAME_HEIGHT - RailCar.TOTAL_HEIGHT));\n \t\t\ttrailer.deselect();\n \t\t\ttrailer = null;\n \t\t}\n \t}\n }", "@Override\n public IRecord procTrailer(IRecord r) {\n return r;\n }", "@Override\n public IRecord procTrailer(IRecord r)\n {\n return r;\n }", "private void resetPlayer() {\n SimpleIntegerProperty subjectID = new SimpleIntegerProperty(thePlayer.getSubjectID());\n Player.Gender subjectGender = thePlayer.getSubjectGender();\n SimpleIntegerProperty subjectAge = new SimpleIntegerProperty(thePlayer.getSubjectAge());\n thePlayer = new Player(subjectID, subjectGender, subjectAge);\n }", "public void endRace(){\n\t\tstartTime =-1;\n\t\tfor(Player p: playersFinished){\n\t\t\twhile(!setPlayerID(p.getID())){\n\t\t\t\ttempNumber++;\n\t\t\t\tsetPlayerID(tempNumber);\n\t\t\t}\n\t\t}\n\t}", "public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}", "private void endFreeze(Player player) {\r\n\t\tFrozenPlayerInfo info = frozenPlayers.remove(player.getUniqueId());\r\n\r\n\t\t// Again, two packets are sent, though we do not modify them this time.\r\n\t\tplayer.setAllowFlight(info.allowFlight);\r\n\t\tplayer.setFlying(info.isFlying);\r\n\t}", "public VideoObject getTrailer() {\n\t\treturn this.trailer;\n\t}", "void restore(Player player);", "@Override\n public void updateDetailTrailer(ArrayList<Trailer> trailerArray) {\n\n }", "public static void roads(){\n\t\t// Roads\n\t\ttry{\n\t\t\t// Storage roads\n\t\t\tString [][] dataRoads = new String[413][4];\n\t\t\t\n\t\t\tCsvReader roadsAux = new CsvReader(\"store/km/roadsAux.csv\");\n\t\t\t\n\t\t\troadsAux.readHeaders();\n\t\t\t\n\t\t\tint i = 0;\n\t\t\twhile(roadsAux.readRecord()){\n\t\t\t\tString name = roadsAux.get(\"name\");\n\t\t\t\tString start = roadsAux.get(\"start\");\n\t\t\t\tString end = roadsAux.get(\"end\");\n\t\t\t\t\n\t\t\t\tString auxType = name.substring(0, name.indexOf('-'));\n\t\t\t\t\n\t\t\t\tString type = \"\";\n\t\t\t\tswitch(auxType){\n\t\t\t\t\tcase \"A\":\n\t\t\t\t\t\ttype = \"highway\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\t\ttype = \"motorway\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"N\":\n\t\t\t\t\t\ttype = \"national\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttype = \"highway\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstart = start.substring(0, start.indexOf('+'));\n\t\t\t\tend = end.substring(0, end.indexOf('+'));\n\t\t\t\t\n\t\t\t\tdataRoads[i][0] = name;\n\t\t\t\tdataRoads[i][1] = type;\n\t\t\t\tdataRoads[i][2] = start;\n\t\t\t\tdataRoads[i][3] = end;\n\t\t\t\t\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\troadsAux.close();\n\t\t\t\n\t\t\t// Create a csv road\n\t\t\tCsvWriter roads = new CsvWriter(\"store/km/roads.csv\");\n\t\t\t\n\t\t\t// Header\n\t\t\troads.write(\"name\");\n\t\t\troads.write(\"type\");\n\t\t\troads.write(\"start\");\n\t\t\troads.write(\"end\");\n\t\t\t\n\t\t\troads.endRecord();\n\t\t\t\n\t\t\t// Record\n\t\t\tfor(i = 0; i < dataRoads.length - 1; i++){\n\t\t\t\tfor(int j = 0; j < dataRoads[i].length; j++){\n\t\t\t\t\troads.write(dataRoads[i][j]);\n\t\t\t\t}\n\t\t\t\troads.endRecord();\n\t\t\t}\n\t\t\t\n\t\t\troads.close();\n\t\t}catch(FileNotFoundException e1){\n\t\t\te1.printStackTrace();\n\t\t}catch(IOException e2){\n\t\t\te2.printStackTrace();\n\t\t}\n\t}", "protected void setWinner(AbstractPlayer player) throws java.rmi.RemoteException\n\t{\n\t\tRoom room = rooms.get(player.roomId);\n\t\t// find another player\n\t\tAbstractPlayer first = room.players.get(0);\n\t\tAbstractPlayer second = room.players.get(1);\n\n\t\tif(first.getDeployLength() == 0)\n\t\t{\n\t\t\troom.state = \"end\";\n\t\t\troom.winner = String.valueOf(second.id);\n\t\t}\n\t\tif(second.getDeployLength() == 0)\n\t\t{\n\t\t\troom.state = \"end\";\n\t\t\troom.winner = String.valueOf(first.id);\n\t\t}\n }", "@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the d left.
public float getdLeft() { return dLeft; }
[ "int getLeft();", "public L getLeft() {\n return left;\n }", "public Node getLeft() \n\t{\n\treturn left;\n\t}", "float getLeft();", "public Node getLeft() \n\t{\n\t\treturn left;\n\t}", "protected long getLeftPosition() {\n return leftPosition;\n }", "public Node getLeft () {\r\n\t\treturn left;\r\n\t}", "public Node getLeft(){\r\n\t\treturn left;\r\n\t}", "public List getLeft() {\n return m_Diff[SIDEBYSIDE_FIRST];\n }", "public int getXLeft() {\n\t\treturn xLeft;\n\t}", "public Pixel downLeft() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.left;\n }\n }", "public long getLeftNS() {\n return leftNS;\n }", "public int getXLeft() {\n return xLeft;\n }", "@Override\n\tpublic function left() {\t\n\t\treturn this.left;\n\t}", "public Node getLeft() {\n\t\treturn this.left;\n\t}", "public Counter getLeft() {\n \n if(this.left == null)\n {\n return null; \n }\n \n else\n {\n return this.left;\n }\n }", "public int getLeftIndex() {\n return mLeftIndex;\n }", "public Data getLeftData() {\n\t\treturn data[LEFT];\n\t}", "boolean getLeft();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if this context node is the root context node.
public boolean isRootContextNode();
[ "public boolean isContextRoot()\r\n {\r\n return this.contextRoot;\r\n }", "public boolean isRoot()\r\n\t{\r\n\t\treturn (m_parent == null);\r\n\t}", "public boolean isRoot() {\r\n\t\tif (root != null) {\r\n\t\t\treturn root.booleanValue();\r\n\t\t}\r\n\t\treturn UserManager.ROOT_ID.equals(getId());\r\n\t}", "final boolean isRoot() {\n return this.parent == BPlusTreeParams.RootParent;\n }", "private boolean isUnderRoot(Node node) {\n while (node != null) {\n if (node.equals(rootContext)) {\n return true;\n }\n\n node = node.getParentNode();\n }\n\n return false;\n }", "public boolean isRoot() {\n return term.isRoot();\n }", "public final boolean isRootSpan() {\n return BigInteger.ZERO.equals(context.getParentId());\n }", "public boolean isRootElement() {\n\t\treturn (parent == ROOT_NODE_ROOT_POINTER);\n\t}", "boolean isRoot();", "public boolean isRoot()\n // -end- 327A877801CC get_head4551A5A200BB \"isRoot\"\n {\n // -beg- preserve=no 327A877801CC get_body4551A5A200BB \"isRoot\"\n return isRoot;\n // -end- 327A877801CC get_body4551A5A200BB \"isRoot\"\n }", "protected boolean isRootTag()\n {\n // If a new stack was created by this tag instance, then it's the top level tag\n return mNewStackCreated;\n }", "public boolean isRootCat() {\n return cat.equals(Rule.rootCat);\n }", "public boolean isRoot() {\n\t\treturn method == null;\n\t}", "boolean hasRoot();", "public boolean isRootLevel(\n )\n {return parentLevel == null;}", "final boolean hasContext()\r\n {\r\n return StringUtils.isNotEmpty(this.context);\r\n }", "public boolean isRoot() {\n return isIndex() && parts.length == 0;\n }", "public boolean isRoot() {\n return getName().getPath().equals(SEPARATOR);\n }", "protected static boolean isRoot(EObject eObj) {\r\n\t\tif (eObj instanceof InternalEObject) {\r\n\t\t\treturn ((InternalEObject)eObj).eDirectResource() != null;\r\n\t\t}\r\n\r\n\t\tboolean isRoot = false;\r\n\t\tif (eObj != null) {\r\n\t\t\tfinal Resource res = eObj.eResource();\r\n\t\t\tfinal EObject container = eObj.eContainer();\r\n\t\t\t// <root of containment tree> || <root of fragment>\r\n\t\t\tisRoot = (container == null && res != null)\r\n\t\t\t\t\t|| (container != null && container.eResource() != res);\r\n\t\t}\r\n\t\treturn isRoot;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deprecated; instead use: AcUspsInternationalCandidateRouteTmpLegTools.OperatorCodeComparator
public static JwComparator<AcUspsInternationalCandidateRouteTmpLeg> getOperatorCodeComparator() { return AcUspsInternationalCandidateRouteTmpLegTools.instance.getOperatorCodeComparator(); }
[ "public static JwComparator<AcUspsInternationalCgrDeleteLeg> getOperatorCarrierCodeComparator()\n {\n return AcUspsInternationalCgrDeleteLegTools.instance.getOperatorCarrierCodeComparator();\n }", "public static JwComparator<AcUspsInternationalCandidateRouteTmpLeg> getOperatorFlightNumberComparator()\n {\n return AcUspsInternationalCandidateRouteTmpLegTools.instance.getOperatorFlightNumberComparator();\n }", "public static JwComparator<AcUspsInternationalCgrDeleteLeg> getOperatorFlightNumberComparator()\n {\n return AcUspsInternationalCgrDeleteLegTools.instance.getOperatorFlightNumberComparator();\n }", "public void setOperatorCode(String operatorCode) {\n this.operatorCode = operatorCode;\n }", "public String getOperatorCode() {\n return operatorCode;\n }", "public static JwComparator<AcPost> getCodeComparator()\n {\n return AcPostTools.instance.getCodeComparator();\n }", "public static JwComparator<AcUspsInternationalCgrDeleteLeg> getDestinationAirportCodeComparator()\n {\n return AcUspsInternationalCgrDeleteLegTools.instance.getDestinationAirportCodeComparator();\n }", "public static JwComparator<AcDomesticCandidateRouteLeg> getDestinationAirportCodeComparator()\n {\n return AcDomesticCandidateRouteLegTools.instance.getDestinationAirportCodeComparator();\n }", "public static JwComparator<AcInputChannel> getAirportCodeComparator()\n {\n return AcInputChannelTools.instance.getAirportCodeComparator();\n }", "public static JwComparator<AcUspsInternationalCandidateRouteTmpLeg> getDestinationAirportCodeComparator()\n {\n return AcUspsInternationalCandidateRouteTmpLegTools.instance.getDestinationAirportCodeComparator();\n }", "public Map getOperatorMap()// TODO tighten protection?\n\t{\n\t\treturn mComparisonOperatorMap; // TODO make unmodifiable?\n\t}", "public static JwComparator<AcGlobalCoTerminusAirport> getAirportCodeComparator()\n {\n return AcGlobalCoTerminusAirportTools.instance.getAirportCodeComparator();\n }", "public static JwComparator<AcDomesticCandidateRouteLeg> getCarrierCodeComparator()\n {\n return AcDomesticCandidateRouteLegTools.instance.getCarrierCodeComparator();\n }", "public static JwComparator<AcUspsInternationalCandidateRouteTmpLeg> getCarrierCodeComparator()\n {\n return AcUspsInternationalCandidateRouteTmpLegTools.instance.getCarrierCodeComparator();\n }", "public Code visitOperatorNode(ExpNode.OperatorNode node) {\n beginGen(\"Operator\");\n Code code;\n ExpNode args = node.getArg();\n switch (node.getOp()) {\n case ADD_OP:\n code = args.genCode(this);\n code.generateOp(Operation.ADD);\n break;\n case SUB_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n code.generateOp(Operation.ADD);\n break;\n case MUL_OP:\n code = args.genCode(this);\n code.generateOp(Operation.MPY);\n break;\n case DIV_OP:\n code = args.genCode(this);\n code.generateOp(Operation.DIV);\n break;\n case EQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n break;\n case LESS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESS);\n break;\n case NEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n code.genBoolNot();\n break;\n case LEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESSEQ);\n break;\n case GREATER_OP:\n /* Generate argument values in reverse order and use LESS */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESS);\n break;\n case GEQUALS_OP:\n /* Generate argument values in reverse order and use LESSEQ */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESSEQ);\n break;\n case NEG_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n break;\n default:\n errors.fatal(\"PL0 Internal error: Unknown operator\",\n node.getLocation());\n code = null;\n }\n endGen(\"Operator\");\n return code;\n }", "public static JwComparator<AcUspsInternationalCgrDeleteLeg> getOriginAirportCodeComparator()\n {\n return AcUspsInternationalCgrDeleteLegTools.instance.getOriginAirportCodeComparator();\n }", "public static JwComparator<AcDomesticCandidateRouteLeg> getOriginAirportCodeComparator()\n {\n return AcDomesticCandidateRouteLegTools.instance.getOriginAirportCodeComparator();\n }", "public static JwComparator<AcUspsDomesticRouteStatusFlight> getDestinationAirportCodeComparator()\n {\n return AcUspsDomesticRouteStatusFlightTools.instance.getDestinationAirportCodeComparator();\n }", "public static void comparatorTest() {\n\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns true if field is hw accessible (either read or write)
public boolean isHwAccessible() { return isHwReadable() || isHwWriteable(); }
[ "boolean isFieldManagementAvailable();", "public static boolean canAccessFieldsDirectly(){\n return false; //TODO codavaj!!\n }", "public boolean isAccessible() {\n return accessible;\n }", "public Boolean isAccessible() {\n return this.isAccessible;\n }", "boolean isReadAccess();", "boolean isWriteAccess();", "boolean isPerunReadOnly();", "boolean canRead();", "private boolean isAccess() {\n\t\treturn (getAccount().getAccess().isAtLeast(Account.Access.PRIVILEGED)\n \t\t\t\t&& !context.getServer().isLanMode());\n \t}", "boolean getAccess();", "public boolean isReadable() {\n\t\treturn isHwReadable || isSwReadable;\n\t}", "public boolean hasHwWriteControl() {\n\t\treturn hasWriteEnableL() || hasWriteEnableH() || hasHwSet() || hasHwClr() || hasHwLoadValues();\n\t}", "public boolean isForceRawFieldAccess();", "public boolean isWrite() {\n\t\treturn (initProt & SegmentConstants.PROTECTION_W) != 0;\n\t}", "public boolean hasReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_READONLY_ANY) != 0;\n }", "boolean isPeripheralAccess();", "public boolean isReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_READONLY_ANY) == ATTR_READONLY;\n }", "public boolean hasPermission() {\n return fieldSetFlags()[1];\n }", "boolean isReadonly();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on Submit button of level
public void clickLevelSubmitBtn(){ SeleniumUtilModified.sleep(2); SeleniumUtilModified.waitForElementToBeVisible(levelSubmitBtn, driver); SeleniumUtilModified.element(levelSubmitBtn, driver).click(); Reporter.log("Clicked on Submit button for submitting the activity..."); }
[ "public void hit_SubmitBtn() {\n\t element(\"Submit_Btn\").click();\n }", "public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }", "public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }", "public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}", "public void submitForm(){\n this.click(submitButton);\n }", "public void submit() {\n driver.findElement(SUBMIT_SELECTOR).click();\n }", "public void clickOnSubmitButtonOfPowerUpActivity(){\n\t\tdriver.manage().timeouts().pageLoadTimeout(20,TimeUnit.SECONDS);\n\t\tSeleniumUtil.waitForElementToBeVisible(activityPowerUpSubmitBtn, driver);\n\t\tSeleniumUtil.element(activityPowerUpSubmitBtn, driver).click();\n\t\tReporter.log(\"Clicked on Submit button of 'Power Up!' activity of Get Moving game plan...\");\n\t}", "public boolean clickOnSubmit(){\n\t\t\treturn utils.clickAnelemnt(this.btnSubmit, \"ResolveOneDayGrievanceAndAppeals\", \"Submit button\");\n\t}", "public void clickSubmitOfOvercomeVeggieHurdleActivity(){\n\t\tSeleniumUtil.sleep(2);\n\t\tSeleniumUtil.waitForElementToBeVisible(level2OvercomeVeggieSubmitBtn, driver);\n\t\tSeleniumUtil.element(level2OvercomeVeggieSubmitBtn, driver).click();\n\t\tReporter.log(\"Clicked on Next and Submit button of Overcome Veggie Hurdle activity\");\n\t}", "public void clickSubmitOfOvercomeVeggieHurdleActivity(){\n\t\t\t\tSeleniumUtilModified.sleep(2);\n\t\t\t\tSeleniumUtilModified.waitForElementToBeVisible(level2OvercomeVeggieSubmitBtn, driver);\n\t\t\t\tSeleniumUtilModified.element(level2OvercomeVeggieSubmitBtn, driver).click();\n\t\t\t\tReporter.log(\"Clicked on Next and Submit button of Overcome Veggie Hurdle activity\");\n\t\t\t}", "public void clickOnSubmitButtonOfMetabolismBasicsActivity(){\n\t\tSeleniumUtil.waitForElementToBeVisible(activityMetabolismBasicsSumitBtn, driver);\n\t\tSeleniumUtil.element(activityMetabolismBasicsSumitBtn, driver).click();\n\t\tReporter.log(\"Clicked on Submit button of 'Metabolism Basics' activity of Manage Your Weight game plan...\");\n\t}", "public void clickOnChooseWeightGoalsActivitySubmitBtn(){\n\t\tSeleniumUtil.waitForElementToBeVisible(chooseWeightGoalsSubmitBtn, driver);\n\t\tSeleniumUtil.element(chooseWeightGoalsSubmitBtn, driver).click();\n\t}", "public void clickSubmitAssignmentForGradingBtn() {\r\n\t\tswitchToDefaultContent();\r\n\t\telement(\"btn_submitAssignmentForGrading\").click();\r\n\t}", "public void selectSubmitForGradingBtnOnPopup() {\r\n\t\telement(\"btn_submitForGrading\").click();\r\n\t\tlogMessage(\"Submit for Grading button clicked on the Warning popup\");\r\n\t}", "public void ClickMyAccountSubmitbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountSubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountSubmit\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@WebElementLocator(webDesktop = \"//input[@type='submit']\",webPhone = \"//input[@type='submit']\")\n private static WebElement buttonSubmit() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"buttonSubmit\")));\n }", "public void clickOnSubmitButtonOfHowIntenseActivity(){\n\t\tSeleniumUtil.sleep(3);\n\t\tSeleniumUtil.waitForElementToBeVisible(activityHowIntenseIsItSubmitBtn, driver);\n\t\tSeleniumUtil.element(activityHowIntenseIsItSubmitBtn, driver).click();\n\t\tReporter.log(\"Clicked on Submit button of 'How Intense Is it?' activity of Get Moving game plan...\");\n\t}", "public void clickSubmit() throws Throwable {\n \t\twaitForVisibilityOfElement(RSOWebLoginPage.submit, \"signIn\");\n \t\tclick(RSOWebLoginPage.submit, \"click on signIn\");\n \t\n \t\t\n }", "public void ClickChecoutSubmitbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btncheckoutregistrationsubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get Module Artifact diff with paging
public List<ModuleArtifact> getModuleArtifactsForDiffWithPaging(BuildParams buildParams, String offset, String limit) { ResultSet rs = null; List<ModuleArtifact> artifacts = new ArrayList<>(); Map<String, ModuleArtifact> artifactMap = new HashMap<>(); ResultSet rsArtCurr = null; ResultSet rsArtPrev = null; try { Object[] diffParams = getArtifatBuildQueryParam(buildParams); String buildQuery = getArtifactBuildDiffQuery(buildParams); rs = jdbcHelper.executeSelect(buildQuery, diffParams); while (rs.next()) { ModuleArtifact artifact = new ModuleArtifact(null, null, rs.getString(1), rs.getString(2), rs.getString(3)); artifact.setStatus(rs.getString(4)); if (buildParams.isAllArtifact()) { artifact.setModule(rs.getString(5)); } artifacts.add(artifact); } // update artifact repo path data if (!artifacts.isEmpty()) { rsArtCurr = getArtifactNodes(buildParams.getBuildName(), buildParams.getCurrBuildNum(), artifactMap); if (buildParams.isAllArtifact()) { rsArtPrev = getArtifactNodes(buildParams.getBuildName(), buildParams.getComperedBuildNum(), artifactMap); } for (ModuleArtifact artifact : artifacts) { ModuleArtifact moduleArtifact = artifactMap.get(artifact.getSha1()); if (moduleArtifact != null) { artifact.setRepoKey(moduleArtifact.getRepoKey()); artifact.setPath(moduleArtifact.getPath()); } } } } catch (SQLException e) { log.error(e.toString()); } finally { DbUtils.close(rsArtCurr); DbUtils.close(rsArtPrev); DbUtils.close(rs); } return artifacts; }
[ "public List<ModuleDependency> getModuleDependencyForDiffWithPaging(BuildParams buildParams, String offset, String limit) {\n ResultSet rs = null;\n ResultSet rsDep = null;\n ResultSet rsDepCompared = null;\n List<ModuleDependency> dependencies = new ArrayList<>();\n Map<String, ModuleDependency> moduleDependencyMap = new HashMap<>();\n try {\n StringBuilder builder = new StringBuilder(getBaseDependencyQuery(buildParams));\n Object[] diffParams = getBuildDependencyParams(buildParams);\n /// update query with specific conditions\n updateQueryWithSpecificConditions(buildParams, builder);\n String buildQuery = builder.toString();\n rs = jdbcHelper.executeSelect(buildQuery, diffParams);\n Map<String, String> tempDependencyMap = new HashMap<>();\n StringBuilder inClauseBuilder = new StringBuilder();\n inClauseBuilder.append(\"(\");\n while (rs.next()) {\n String sha1 = rs.getString(3);\n if (tempDependencyMap.get(sha1) == null) {\n tempDependencyMap.put(sha1, sha1);\n ModuleDependency dependency = new ModuleDependency(null, null, rs.getString(1),\n rs.getString(2), rs.getString(4), sha1);\n dependency.setStatus(rs.getString(5));\n if (buildParams.isAllArtifact()) {\n dependency.setModule(rs.getString(6));\n }\n dependencies.add(dependency);\n }\n inClauseBuilder.append(\"'\" + sha1 + \"'\").append(\",\");\n }\n String inClause = inClauseBuilder.toString();\n inClause = inClause.substring(0, inClause.length() - 1);\n inClause = inClause + \")\";\n // update dependencies repo path data\n if (!dependencies.isEmpty()) {\n rsDep = getModuleDependencyNodes(moduleDependencyMap, inClause);\n if (buildParams.isAllArtifact()) {\n rsDepCompared = getModuleDependencyNodes(moduleDependencyMap, inClause);\n }\n dependencies.forEach(dependency -> {\n ModuleDependency moduleDependency = moduleDependencyMap.get(dependency.getSha1());\n if (moduleDependency != null) {\n dependency.setRepoKey(moduleDependency.getRepoKey());\n String path = moduleDependency.getPath();\n String name = moduleDependency.getName();\n if (path != null) {\n dependency.setPath(path.equals(\".\") ? name : path + \"/\" + name);\n }\n }\n });\n }\n } catch (SQLException e) {\n log.error(e.toString());\n } finally {\n DbUtils.close(rsDep);\n DbUtils.close(rsDepCompared);\n DbUtils.close(rs);\n }\n return dependencies;\n }", "public Paged<GitLabCommitDiff> getCommitDiffs(Serializable projectId, String commitHash, Pagination pagination) throws IOException {\n Query query;\n if (pagination != null) {\n query = pagination.asQuery();\n } else {\n query = Query.newQuery();\n }\n String tailUrl = String.format(\"/projects/%s/repository/commits/%s/diff%s\", gitLabAPI.sanitize(projectId), commitHash, query.build());\n return gitLabAPI.retrieve().toPaged(tailUrl, GitLabCommitDiff[].class);\n }", "public LinkedList<Diff> getDiff(){\t\n\t\tString modifiedString = \"\";\n\t\ttry {\n\t\t\tmodifiedString = openReadFile(modDoc);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Print to the console\n\t\t\t// \"Could not open the file: '\" + modDoc + \".\" \n\t\t\te.printStackTrace();\n\t\t}\n\t\tLinkedList<Diff> list = dmp.diff_main(baseString, modifiedString, true);\n\t\tbaseString = modifiedString;\n\t\t\n\t\treturn list;\n\t}", "public interface Diff {\n \n /**\n * Retrieve the project revision information for the first\n * (before) revision of this diff.\n *\n * @return Revision The source revision\n */\n Revision getSourceRevision();\n\n /**\n * Retrieve the project revision information for the last\n * revision for this diff. This may be the same as first()\n * for 1-entry diffs (although the difference between R and R\n * is empty).\n *\n * @return Revision The comparison revision\n */\n Revision getTargetRevision();\n\n /**\n * Get the actual diff data in a multiline string format.\n *\n */\n String getDiffData();\n\n /**\n * Retrieve the list of file names (relative to the root\n * under which this diff was taken) modified by this diff.\n *\n * @return Set set of files changed in this diff\n */\n Set<String> getChangedPaths();\n \n /**\n * Get all the chunks indexed by the file they apply to.\n */\n Map<String, List<DiffChunk>> getDiffChunks();\n}", "List<BinaryArtifact> getArtifacts(String instanceUrl, String repoName, long lastUpdated);", "public List<Diff> getDiffs();", "private Object[] getArtifactDiffCountParam(BuildParams buildParams) {\n if (!buildParams.isAllArtifact()) {\n return new Object[]{buildParams.getCurrBuildNum(), buildParams.getCurrBuildDate(), buildParams.getBuildModuleId(),\n buildParams.getCurrBuildNum(), buildParams.getCurrBuildDate(), buildParams.getBuildModuleId(),\n buildParams.getComperedBuildNum(), buildParams.getComperedBuildDate(), buildParams.getBuildModuleId()};\n\n } else {\n return new Object[]{buildParams.getCurrBuildNum(), buildParams.getCurrBuildDate(),\n buildParams.getCurrBuildNum(), buildParams.getCurrBuildDate(),\n buildParams.getComperedBuildNum(), buildParams.getComperedBuildDate()};\n }\n }", "private String getArtifactDiffCount(BuildParams buildParams) {\n String baseQuery;\n if (!buildParams.isAllArtifact()) {\n baseQuery = BuildQueries.MODULE_ARTIFACT_DIFF_COUNT;\n } else {\n baseQuery = BuildQueries.BUILD_ARTIFACT_DIFF_COUNT;\n }\n return baseQuery;\n }", "@Test\n public void getPage() {\n\n PageHelper.startPage(2,2);\n List<Blog> blogList = blogMapper.getAll();\n PageInfo pageInfo = new PageInfo(blogList);\n Assert.assertEquals(2,blogList.size());\n for (Blog blog : blogList) {\n System.out.println(blog);\n }\n }", "DTData<Resource> findResourceList(Specification specification, DTPager pager);", "public HttpResponse getAllPaginatedPublishedAPIs(String tenant, int start, int end)\n throws APIManagerIntegrationTestException{\n try {\n checkAuthentication();\n\n return HTTPSClientUtils.doGet(backendURL + \"store-old/site/blocks/api/listing/ajax/list.jag?\" +\n \"action=getAllPaginatedPublishedAPIs&tenant=\" + tenant +\n \"&start=\" + start + \"&end=\" + end, requestHeaders);\n } catch (Exception e) {\n throw new APIManagerIntegrationTestException(\"Unable to retrieve paginated published \" +\n \"APIs for tenant - \" + tenant + \". Error: \" + e.getMessage(), e);\n }\n }", "@DisplayName(\"GET all height from all pages then find average GET /api/people/\")\n @Test\n public void testGetALLPagesAverageHeight() {\n\n List<Integer> allHeights = new ArrayList<>();\n\n //send initial request, find total count and decide how many pages\n JsonPath jp = get(\"/people\").jsonPath();\n int peopleCount = jp.get(\"count\"); // 82\n // if there is remainder we want to +1, if tehre is no keep it\n int pageCount = (peopleCount % 10 ==0) ? peopleCount / 10 : (peopleCount/10)+1;\n List<Integer> firstPageHeghts = jp.getList(\"results.height\");\n allHeights.addAll(firstPageHeghts);\n\n // now its time loop and the rest of the pages\n for (int pageNum = 2; pageNum <= pageCount; pageNum++) {\n // GET /pepople?page=yourPageNumberGoesHEre\n List<Integer> heightsOnThisPage = get(\"/people?page=\"+pageNum)\n .jsonPath().getList(\"results.height\");\n allHeights.addAll(heightsOnThisPage);\n\n }\n System.out.println(\"allHeights = \" + allHeights);\n\n }", "Collection getOWLAllDifferents();", "@Path(\"/{groupId}/artifacts/{artifactId}/versions\")\n @GET\n @Produces(\"application/json\")\n VersionSearchResults listArtifactVersions(@PathParam(\"groupId\") String groupId,\n @PathParam(\"artifactId\") String artifactId, @QueryParam(\"offset\") Integer offset,\n @QueryParam(\"limit\") Integer limit);", "@Path(\"/{groupId}/artifacts\")\n @GET\n @Produces(\"application/json\")\n ArtifactSearchResults listArtifactsInGroup(@PathParam(\"groupId\") String groupId,\n @QueryParam(\"limit\") Integer limit, @QueryParam(\"offset\") Integer offset,\n @QueryParam(\"order\") SortOrder order, @QueryParam(\"orderby\") SortBy orderby);", "Page<Audit> getAuditByPage(int pageNumber, String sortBy, boolean ascending);", "public List<PublishedModule> getBuildModule(String buildName, String date, String orderBy, String direction, String offset, String limit) throws SQLException {\n ResultSet rs = null;\n String buildQuery = \"SELECT build_modules.module_name_id,\\n\" +\n \"(select count(*) from build_artifacts where build_artifacts.module_id = build_modules.module_id ) as num_of_art ,\\n\" +\n \"(select count(*) from build_dependencies where build_dependencies.module_id = build_modules.module_id ) as num_of_dep FROM build_modules\\n\" +\n \"left join builds on builds.build_id=build_modules.build_id \\n\" +\n \"where builds.build_number=? and builds.build_date=?\";\n\n List<PublishedModule> modules = new ArrayList<>();\n try {\n rs = jdbcHelper.executeSelect(buildQuery, buildName, Long.parseLong(date));\n while (rs.next()) {\n PublishedModule module = new PublishedModule();\n module.setId(rs.getString(1));\n module.setNumOfArtifact(rs.getString(2));\n module.setNumOfDependencies(rs.getString(3));\n modules.add(module);\n }\n } finally {\n DbUtils.close(rs);\n }\n return modules;\n }", "@SuppressWarnings(\"unused\") \n\tprivate void extractChanges(Node commit_node, RevCommit m) throws Exception\n\t{\n\n\t\tList<String> commitIds = new ArrayList<String>(); \n\n\t\tcommitIds.add(m.toObjectId().getName());\n\t\t\n\t\tCommitInfoExtractor cie = new CommitInfoExtractor();\n\t\tcie.extractFeatureChanges(commitIds);\n\t\tList<EvolutionStep>steps = cie.getSteps();\n\t\t\n\t\ttry(Transaction tx = DBConnection.getService().beginTx())\n\t\t{\n\t\t\tfor(EvolutionStep step : steps)\n\t\t\t{\n\t\t\t\tFileChangeExtractor file_changes = new FileChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> file_nodes = file_changes.addFileChangesToCommit(step.files, commit_node);\n\t\t\t\t\n\t\t\t\tVMChangeExtractor vm_changes = new VMChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> vm_nodes = vm_changes.addVMChangesToCommit(step.fm_changes, commit_node);\n\t\t\t\t\n\t\t\t\tBuildChangeExtractor build_changes = new BuildChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> build_nodes = build_changes.addBuildChangesToCommit(step.build_changes, commit_node);\n\t\t\t\t\n\t\t\t\tCodeChangeExtractor code_changes = new CodeChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> code_nodes = code_changes.addCodeChangesToCommit(step.impl_changes, commit_node);\n\n//\t\t\t\tList<EvolutionStep> local = new ArrayList<EvolutionStep>(); local.add(step);\n//\t\t\t\tFeatureOrientedChangeExtractor dataextractor = new FeatureOrientedChangeExtractor(local);\n//\t\t\t\tdataextractor.buildFeatureChanges();\n//\t\t\t\t\n//\t\t\t\tList<FeatureOrientedChange> changes = dataextractor.getFeatureChanges();\n//\t\n//\t\t\t\tList<Node> focs = new ArrayList<Node>();\n//\t\t\t\tfor(FeatureOrientedChange c : changes)\n//\t\t\t\t{\n//\t\t\t\t\tNode foc_node = createFeatureOrientedChangeForCommit(c);\n//\t\t\t\t\tfocs.add(foc_node);\n//\t\t\t\t\tlink_file_and_vm_changes(c,foc_node,file_nodes, vm_nodes,build_nodes,code_nodes); \n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tMap<String,Node> known_focs = buildFOCMap(focs);\n//\t\t\t\tlink_mapping_artefacts(known_focs,build_nodes);\n//\t\t\t\tlink_code_artefacts(known_focs,code_nodes);\n\t\t\t}\n\t\t\ttx.success();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new Exception(\"Failed to create Neo4j nodes - \", e);\n\t\t}\n\t}", "@Test\n\tpublic void shouldReturnSecondPageSortedByOriginalAmountAsc()\n\t{\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(1, 2, \"byOriginalAmountAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(StringUtils.EMPTY, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(2, result.getResults().size());\n\n\t\tTestCase.assertEquals(AMOUNT_75_31, result.getResults().get(0).getAmount().toString());\n\t\tTestCase.assertEquals(AMOUNT_85_20, result.getResults().get(1).getAmount().toString());\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the SNMP_EVENTS_PROCESS table that match the criteria 'WARNMESSAGE = :warnmessage'.
@Transactional public List<SnmpEventsProcess> findWhereWarnmessageEquals(String warnmessage) throws SnmpEventsProcessDaoException { try { return jdbcTemplate.query("SELECT MARK, MANUFACTURE, RESULTLIST, WARNMESSAGE, SUMMARY FROM " + getTableName() + " WHERE WARNMESSAGE = ? ORDER BY WARNMESSAGE", this,warnmessage); } catch (Exception e) { throw new SnmpEventsProcessDaoException("Query failed", e); } }
[ "SQLWarning getWarnings() throws SQLException;", "public String get_warn_messages() {\n if (warning_codes.size() == 0)\n return \"\";\n StringBuffer warn_msgs = new StringBuffer();\n for (int i = 0; i < this.warning_codes.size(); i++) {\n if (i > 0)\n warn_msgs.append(\"\\r\\n\");\n warn_msgs.append(\"Line:\").append(this.warning_line_nos.get(i))\n .append(\", Col:\").append(this.warning_col_nos.get(i))\n .append(\": \")\n .append(msgs.get(lang)[this.warning_codes.get(i)]);\n }\n return warn_msgs.toString();\n }", "gov.nih.nlm.ncbi.www.soap.eutils.esearch.WarningListType getWarningList();", "public SQLWarning getWarnings() throws SQLException {\n return currentPreparedStatement.getWarnings();\n }", "public SQLWarning getWarnings() throws SQLException\n\t{\n\t\treturn firstWarning;\n\t}", "public final List<String> getWarnings() {\n\n if ( itemValueObj_ == null ) {\n return new ArrayList<>();\n }\n\n return itemValueObj_.getWarnings();\n\n }", "private void onWarning(int warn) {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.onWarning(warn);\r\n\t\t}\r\n\t}", "public com.cdiscount.www.ArrayOfError getWarnings()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.cdiscount.www.ArrayOfError target = null;\n target = (com.cdiscount.www.ArrayOfError)get_store().find_element_user(WARNINGS$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public static String[] getStandbyServerstatMsgItems() {\n\t\treturn (String[]) (STANDBY_SERVERSTAT_MSG_ITEMS.clone());\n\t}", "public String warnMessage();", "@Override\n\tpublic List<Map<String, String>> queryMessageInfo(String appId) {\n\t\treturn getSqlMap().queryForList(NAMESPACES + \"queryMessageInfo\", appId);\n\t}", "private int warn(String message) {\n \t\tDisplay display = Display.getCurrent();\n \t\tShell shell = new Shell(display);\n \t\tMessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);\n \t\tdialog.setText(\"Warning\");\n \t\tdialog.setMessage(message);\n \t\treturn dialog.open();\n \t}", "public Map<String,List<String>> getFieldWarnings ()\n\t{\n\t\treturn fFieldWarnings.getValues ();\n\t}", "AlDyWarningByAlarmName selectByPrimaryKey(Integer id);", "public static synchronized ResultSet getAllCurrentSuppressions () throws ClassNotFoundException, SQLException, IOException\n {\n checkSuppressionDatabaseConnection();\n\n Timestamp timestamp = new java.sql.Timestamp ( System.currentTimeMillis() );\n System.out.println ( \"getAllCurrentSuppressions() - timestamp: \" + timestamp.getTime() );\n ps_get_all_current.setTimestamp ( 1, timestamp );\n \n return ps_get_all_current.executeQuery();\n }", "public List<Condition> getWarningConditions() {\n return warningConditions;\n }", "public Map<String, Set<Long>> getPSMSetSettingsWarnings() {\n return psmSetSettingsWarnings;\n }", "public static void w(Object message) { // Log warn message\n\t\tLogKitten.logMessage(message, KittenLevel.WARN, false);\n\t}", "List<Alert> getAlerts_TEMP() throws SQLException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Cache'.
Cache createCache();
[ "<K, V> CrossBuildInMemoryCache<K, V> newCache();", "@Override\r\n protected Cache createCache(URL url) {\r\n return new JCache(url);\r\n }", "@SuppressWarnings(\"unchecked\")\n public static synchronized <T extends Cache> T createCache(String name) {\n T cache = (T) caches.get(name);\n if (cache != null) {\n return cache;\n }\n cache = (T) cacheFactoryStrategy.createCache(name);\n\n log.info(\"Created cache [\" + cacheFactoryStrategy.getClass().getName() + \"] for \" + name);\n\n return wrapCache(cache, name);\n }", "<V> CrossBuildInMemoryCache<Class<?>, V> newClassCache();", "public static ByteArrayCache instance() {\n if (_instance == null) try {\n _instance = (ByteArrayCache) ImmortalMemory.instance().newInstance( ByteArrayCache.class);\n ZenProperties.logger.log(Logger.INFO, ByteArrayCache.class, \"instance\", \"ByteArrayCache created\");\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.FATAL, ByteArrayCache.class, \"instance\", e);\n System.exit(-1);\n }\n return _instance;\n }", "CacheWrapper create(Context context, CacheType type, String shareName);", "public Cache() {\n data = new HashMap<T, S>();\n }", "static <K, V> Cache<K, V> getInstance(EvictionPolicy policy) {\r\n\t\treturn constructCache(10000, policy);\r\n\t}", "public AbstractCache() {\n }", "public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }", "public static Cache getCacheImpl() {\n\t\tlogger.info(\"******Cache is :\"+cache);\n\t\tif (cache == null) {\n\t\t\tlong initialMemory = Runtime.getRuntime().freeMemory();\n\t\t\tsynchronized(Cache.class){\n\t\t\tif (cache == null) {\n\t\t\t\t//logger.info(\"*******New Instance\");\n\t\t\t\tcache = new CacheImpl();\n\t\t\t\t//logger.info(\"Cache Service initialized for first time usage \");\n\t\t\t logger.info(\"Approx memory used by cache is \"\n\t\t\t\t\t+ (initialMemory - Runtime.getRuntime().freeMemory())\n\t\t\t\t\t/ 1000 + \" KiloBytes\");\n\n\t\t\t} else {//logger.info(\"*******No Instance\");\n\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t}else {//logger.info(\"*******No Instance buddy\");\n\t\t\t}\n\t\t\n\t\treturn cache;\n\t}", "Goliath.ObjectCache getObjectCache();", "public CacheDao() {\n super(Cache.CACHE, com.scratch.database.mysql.jv.tables.pojos.Cache.class);\n }", "public RedisCache createRedisCache(){\n if (AppContextUtil.applicationContext != null){\n StringRedisTemplate redisTemplate = AppContextUtil.getBean(\"stringRedisTemplate\");\n return new RedisCache(redisTemplate);\n }\n throw new RuntimeException(\"获取bean失败!\");\n }", "CacheProperties createCacheProperties();", "Cache mountNewCache();", "public CacheData toCacheData() {\r\n return new CacheData(getName(), getMimetype(), getContent());\r\n }", "public CacheRecord() {\n super(Cache.CACHE);\n }", "public SearchCache() {\n this(CAPACITY, new Ticker());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get http proxy port to be used for signaling.
public int getHttpProxyPort();
[ "int getHttpProxyPort();", "public Integer getProxyPort();", "public int HTTPproxyPort();", "int getRemoteProxyPort();", "public final String getProxyPort() {\n return properties.get(PROXY_PORT_PROPERTY);\n }", "public int getPort() {\n\t\treturn StringUtil.getInt(proxyPort, 0);\n\t}", "public String getProxyPort()\r\n {\r\n return proxyPort;\r\n }", "public int getProxyPort() {\n return proxyPort;\n }", "public int getProxyPort() {\n return this.proxyPort;\n }", "public String getProxyPort() {\n\t\treturn proxyPort;\n\t}", "public int getHttpPort() {\n return httpServer.getPort();\n }", "public void HTTPproxyPort(int HTTPproxyPort);", "public int getHttpPort() {\r\n return httpPort;\r\n }", "public int getPort()\n {\n\t\treturn url.getPort();\n }", "public Integer getHttpPort() {\n return httpPort;\n }", "default int getPort() {\n return getServer().getPort();\n }", "public void setHttpProxyPort(int port);", "public int getHttpsProxyPort() {\n return httpsProxyPort;\n }", "public Optional<Integer> getGraphQLHttpPort() {\n return graphQLHttp.map(service -> service.socketAddress().getPort());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the mouse is inside the sprite
public void checkMouse() { boolean bool = false; //variable to show if the mouse is inside the sprite if (mx > x) { if (my > y) { if (mx < x2) { if (my < y2) { bool = true; //The mouse is in the sprite, so change bool to true } } } } if (bool == true) { //If the mouse is in the sprite... if (master.getInPlacement() == master.blankDraggable) { //...And Good1's inplacement isn't some other sprite... mousein = true; master.changeInPlacement(this); //...Change Good1's inplacement to this sprite } } }
[ "@Override\r\n\tpublic final boolean isMouseOver() {\r\n\t\tfinal float x = getMouseWorldX();\r\n\t\tfinal float y = getMouseWorldY();\r\n\r\n\t\tfinal boolean ans = x >= getState().position.x - getWidth()/2 && x <= getState().position.x + getWidth()/2 && y >= getState().position.y && y <= getState().position.y + getHeight();\r\n\t\treturn ans;\r\n\t}", "public boolean mouseInBounds()\r\n {\r\n return Draw.LAYER_MANAGER.contains(Mode.getFloatMouseX(), \r\n Mode.getFloatMouseY());\r\n }", "public boolean isMouseOver(){\n\t\treturn this.contains(Main.camera.getMousePos());\n\t}", "public abstract boolean isMouseInBounds(int mouseX, int mouseY);", "boolean insideSprite(Sprite s){\n if (s._hitbox.length == 1) {\n if (_hitbox.length == 1) {\n return PVector.dist(s._getCenter(),this._getCenter()) <\n s._hitbox[0].x - this._hitbox[0].x;\n }\n return _insideCirc(_getPoints(), s._getCenter(), s._hitbox[0].x);\n }\n if (s._hitbox.length == 1) {\n // TODO: check if center is in middle but NOT touching any side\n // (will want to adapt existing _circPoly to separate side-touching\n // code into individual method)\n return false;\n }\n return _insidePts(this._getPoints(), s._getPoints());\n }", "private boolean checkMouseInsidePlayer(Point2D.Float mouse, GameEntity e) {\n PositionComponent pos = pm.get(e);\n return Math.abs(pos.x + pos.originX - mouse.x) <= 5 && Math.abs(pos.y + pos.originY - mouse.y) <= 5;\n }", "private void checkMouseOver() {\n if (mouseX > xpos && mouseX < xpos+swidth &&\n mouseY > ypos && mouseY < ypos+sheight) {\n if(!over) {\n onMouseEnter();\n }\n }\n else {\n if (over) {\n onMouseExit();\n }\n }\n }", "public boolean isWithin(Vec2i mouse) {\n\t\treturn shape.isWithin(mouse);\n\t}", "public boolean mouseWithinBox() {\n return (mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + h);\r\n }", "public boolean mouseIsInside(Vector vect);", "public abstract boolean pointerInside(int iPosX, int iPosY);", "public boolean isUnderMouse(int x, int y) {\n\t\tif (x >= getX() && x <= getX() + getWidth() && y >= getY() && y <= getY() + getHeight())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public static boolean isMouseOver(Card card) {\n card.getImage();\n float maxY = (float) ((card.getHeight() / 2.0) + card.getY());\n float minY = (float) (card.getY() - (card.getHeight() / 2.0));\n float maxX = (float) ((card.getWidth() / 2.0) + card.getX());\n float minX = (float) (card.getX() - (card.getWidth() / 2.0));\n if (processing.mouseX <= maxX && processing.mouseX >= minX) {\n if ((processing.mouseY <= maxY && processing.mouseY >= minY)) {\n return true;\n }\n }\n return false;\n }", "private boolean isHovering() {\n return newGameButton.contains(handler.getMouseManager().getMouseX(), handler.getMouseManager().getMouseY());\n }", "public abstract boolean isInside(int x, int y);", "@Override\n public void checkMousePressOnSprites(MiniGame game, int x, int y)\n {\n // FIGURE OUT THE CELL IN THE GRID\n int col = calculateGridCellColumn(x);\n int row = calculateGridCellRow(y);\n \n // DISABLE THE STATS DIALOG IF IT IS OPEN\n if (game.getGUIDialogs().get(STATS_DIALOG_TYPE).getState().equals(VISIBLE_STATE))\n {\n game.getGUIDialogs().get(STATS_DIALOG_TYPE).setState(INVISIBLE_STATE);\n return;\n }\n \n // CHECK THE TOP OF THE STACK AT col, row\n ArrayList<MahjongSolitaireTile> tileStack = tileGrid[col][row];\n if (tileStack.size() > 0)\n {\n // GET AND TRY TO SELECT THE TOP TILE IN THAT CELL, IF THERE IS ONE\n MahjongSolitaireTile testTile = tileStack.get(tileStack.size()-1);\n if (testTile.containsPoint(x, y))\n selectTile(testTile);\n }\n }", "public void checkMouse(){\n if(Greenfoot.mouseMoved(null)){\n mouseOver = Greenfoot.mouseMoved(this);\n }\n //Si esta encima se volvera transparente el boton en el que se encuentra\n if(mouseOver){\n adjTrans(MAX_TRANS/2);\n }\n else{\n adjTrans(MAX_TRANS);\n }\n \n }", "public boolean isHovered();", "public boolean isOver(int x, int y) {\n\n // calculates distance of mouse pointer from center of circle\n double distanceFromCenter = Math.sqrt(Math.pow((x - getX()), 2) + Math.pow((y - getY()), 2));\n // returns true when the position x, y is within the circle drawn to visualize this point,\n // otherwise returns false\n return distanceFromCenter < (POINT_DIAMETER / 2.0);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get credentials list from database Send credentials list packet to client
private void credentialsList(boolean broadcast) { List<Credential> credentials = clientDatabase.getCredentials(); Packet credentialsConfirmationPacket = new PacketBuilder() .ofType(PacketType.CREDENTIALS.getConfirmation()) .addArgument("credentials", credentials) .build(); if(!broadcast) clientRepository.sendPacketIO(channel, credentialsConfirmationPacket); else clientRepository.broadcast(credentialsConfirmationPacket); }
[ "String getAuthlist();", "public static List<String> getCredentials() {\n String fileContent = \"\";\n BufferedInputStream bis = (BufferedInputStream) FileClient.class.getClassLoader().getResourceAsStream(\"Files/authdb.txt\");\n if (bis != null) {\n try {\n while (bis.available() > 0) {\n fileContent += ((char) bis.read());\n }\n } catch (IOException ex) {\n Logger.getLogger(FileClient.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n if (bis != null) {\n bis.close();\n } else if (bis == null) {\n System.err.println(\"BufferedInputStream was NULL!\");\n }\n } catch (IOException ex) {\n Logger.getLogger(FileClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n List<String> creds = Arrays.asList(fileContent.split(\"\\\\s*,\\\\s*\"));\n return creds;\n }", "public List<UserCredential> getAllCredentials() {\n\t\t List<UserCredential> userCredentials = new ArrayList<>();\n\t\t \n\t\t credentialRepo.findAll().forEach(userCredential -> userCredentials.add(userCredential));\n\t\t \n\t\treturn userCredentials;\n\t}", "@GetMapping(\"/credentials\")\n @Timed\n public List<CredentialDTO> getAllCredentials() {\n log.debug(\"REST request to get all Credentials\");\n return credentialService.findAll();\n }", "java.util.List<yandex.cloud.api.iot.devices.v1.DeviceOuterClass.DevicePassword> \n getPasswordsList();", "public String[] getSecureContainerList() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createStringArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }", "public List<DwsLogin> findeAllDwsLogins();", "List<ExposedOAuthCredentialModel> readExposedOAuthCredentials();", "DatabaseCredentials getCredentials();", "java.util.List<ch.epfl.dedis.proto.ServerIdentityProto.ServerIdentity> \n getListList();", "public String[] getSecureContainerList() throws RemoteException;", "List<SessionPassword> getSessionPasswordForHost(int hostId) throws EdgeServiceFault;", "public String LIST(){\n String nameList = \"\";\n Enumeration keys = this.clientData.keys();\n while(keys.hasMoreElements()){\n nameList += keys.nextElement() + \" \";\n }\n return \"OK \" + nameList;\n }", "Set<SecurityCredential> getCredentials();", "public AuthInfo[] getAuthInfoList();", "public abstract String getCredentials();", "public List<AdServerCredentialsDTO> loadAdserverCredentialsForDropDown(List<CompanyObj> companyObjList) throws Exception;", "ch.epfl.dedis.proto.ServerIdentityProto.ServerIdentity getList(int index);", "public CredentialsModel[] getAll() {\n Connection connection = null; \n ArrayList<CredentialsModel> categories =\n new ArrayList<CredentialsModel>();\n Statement stmt = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.createStatement();\n ResultSet result = stmt.executeQuery(\n \"SELECT * FROM Credentials ORDER BY EmpNum\");\n while (result.next()) {\n categories.add(new CredentialsModel(\n employeeManager.find(result.\n getString(\"EmpUsername\")), \n result.getString(\"EmpUsername\"),\n result.getString(\"EmpPassword\")));\n }\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in getAll\");\n ex.printStackTrace();\n return null;\n }\n\n CredentialsModel[] catarray = new CredentialsModel[categories.size()];\n return categories.toArray(catarray);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The interface Solr service.
public interface SolrService { /** * Save index start. * * @param userId the user id */ @Transactional void saveIndexStart(Long userId); /** * Queue index. * * @param personTotaraId the person totara id */ @Transactional void queueIndex(Long personTotaraId); /** * Reindex search database future. * * @return the future */ @Timed @Async Future<Integer> reindexSearchDatabase(); /** * Find last index data index data. * * @return the index data */ @Transactional(readOnly = true) IndexData findLastIndexData(); /** * Fin last queued data index data. * * @return the index data */ IndexData finLastQueuedData(); /** * Update index. * * @param indexData the index data */ @Transactional void updateIndex(IndexData indexData); }
[ "private SolrProxy() {\r\n\r\n\t\t/*\r\n\t\t * Connect to Apache Solr\r\n\t\t */\r\n\t\ttry {\r\n\r\n\t\t\tString endpoint = bundle.getString(GlobalConstants.SEARCH_ENDPOINT);\r\n\t\t\tserver = new CommonsHttpSolrServer(endpoint);\r\n\t\t\t\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public abstract void startSolr(Path solrHome);", "public void startSolr() {\n startSolr(LuceneTestCase.createTempDir(\"solrhome\"));\n }", "QueryResponse query(SolrParams solrParams) throws SolrServerException;", "SolrServer getSolrServer();", "protected abstract SolrClient getSolrQueryClient();", "public Object getCore()\r\n {\r\n return solrCore;\r\n }", "protected abstract SolrClient getSolrIndexClient();", "public SolrIndexerService getSolrIndexerService() {\n\t\tif (solrIndexerService == null) {\n\t\t\tsolrIndexerService = Registry.getCoreApplicationContext().getBean(\"solrIndexerService\", SolrIndexerService.class);\n\t\t}\n\t\treturn solrIndexerService;\n\t}", "public abstract SolrClient getSolrClient(String collection);", "public SolrClient getSolrClient() {\n return getSolrClient(\"collection1\");\n }", "public SolrClient getSolr(String url) {\r\n\t\tsolr.setBaseURL(url);\r\n\t\tsolr.setParser(new XMLResponseParser());\r\n\t\tsolr.setMaxTotalConnections(4);\r\n\t\treturn solr;\r\n\t}", "public SolrContentQueryBuilderServiceImpl(final SolrClient client) {\n\t\t// this.solrClient = client;\n\t\tthis.solrClient = new HttpSolrClient.Builder(SolrConstants.SOLR_URL + SolrConstants.CORE_NAME).build();\n\t}", "@Bean\n\tpublic SolrClient solrClient() throws Exception {\n\t\t\n\t\tfinal String solrUrl = \"http://192.168.182.132:8983/solr\";\n\t\treturn new HttpSolrClient.Builder(solrUrl).withConnectionTimeout(10000).withSocketTimeout(60000).build();\n\t}", "public interface SPARQLService {\n // TODO: Create methods for at least CRUD \n}", "public String getSolrQueryString() {\n return solrQueryString;\n }", "protected abstract String getSolrServerURI();", "public interface IDocumentSearchService {\n\n /**\n * Searching docs against the keyword\n *\n * @param param doc search param\n * @return docId list against the param\n */\n DocSearchResponse keywordSearch(KeywordSearchParam param);\n\n /**\n * Searching docs against the keyword list\n *\n * @param param doc search param\n * @return docId list against the param\n */\n DocSearchResponse keywordListSearch(KeywordListSearchParam param);\n\n /**\n * Searching docs against the query, the differences from keyword search is:\n * system will try to analyze the query and find out all the target keywords\n *\n * @param param doc search param\n * @return docId list against the param\n */\n DocSearchResponse search(KeywordSearchParam param);\n\n /**\n * Retrieve the doc against the docId\n *\n * @param docId target docId\n * @return doc info for id\n */\n DocUnit retrieveSingleDoc(String docId);\n\n /**\n * Retrieve the docs against the id list\n *\n * @param param doc retrieve param\n * @return doc info for id list\n */\n List<DocUnit> retrieveMultiDocs(DocRetrieveParam param);\n}", "public interface FullTextService {\n\n\t//Start service\n\tpublic int beginService(String serverName);\n\t\n\tpublic int beginService(String serverName,String url);\n\t\n\t//flag: 0:IndexWriter 1:IndexSearcher\n\tpublic int beginService(String serverName,String flag,String indexPath);\n\t\n\tpublic void setServerName(String serverName);\n\t\n\t//Close service\n\tpublic int endService(String serverName);\n\t\n\t//index\n\tpublic void doIndex(FullTextIndexParams fullTextIndexParams);\n\t\n\t//Things to do before indexing\n\tpublic void preIndexMethod();\n\t\n\t//Things to do after indexing\n\tpublic void afterIndexMethod();\n\t\n\t//Modify index\n\tpublic void updateIndex(FullTextIndexParams fullTextIndexParams);\n\t\n\t//Modify what to do before\n\tpublic void preUpdateIndexMethod();\n\t\n\t//Things to do after modification\n\tpublic void afterUpdateIndexMethod();\n\t\n\t//Delete index\n\tpublic void deleteIndex(FullTextIndexParams fullTextIndexParams);\n\t\n\t//Delete what you have to do before\n\tpublic void preDeleteIndexMethod();\n\t\n\t//Things to do after deletion\n\tpublic void afterDeleteIndexMethod();\n\t\n\t//Search\n\tpublic FullTextResult doQuery(FullTextSearchParams fullTextSearchParams);\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the client by using the information in the connection to make a request that will ensure the client is valid.
public abstract void validateConnection() throws InvalidCredentialsException, IOException;
[ "private void checkValid()\n {\n synchronized (lock)\n {\n if (!valid)\n {\n throw new RuntimeException(\"MessageClient has been invalidated.\"); // TODO - localize\n }\n }\n }", "public abstract boolean validateConnection();", "void validateClientInfo(Client client) throws InternalException {\n\t\tif (client.getFirstName() == null || client.getFirstName().isEmpty()\n\t\t\t\t|| client.getLastName() == null\n\t\t\t\t|| client.getLastName().isEmpty()\n\t\t\t\t|| client.getBirthDate() == null)\n\n\t\t\tthrow new InternalException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\"Incorrect Parameters\");\n\t\tInteger count = clientRepository.validateUserByNameAndBirthDate(\n\t\t\t\tclient.getFirstName(), client.getLastName(),\n\t\t\t\tclient.getBirthDate());\n\t\tif (count>0)\n\t\t\tthrow new InternalException(HttpStatus.CONFLICT,\n\t\t\t\t\t\"Client already exists\");\n\t}", "ValidatesClient getValidates();", "public interface InvalidationClient {\n\n /**\n * Starts the client. This method MUST be called before any other method is invoked. The client is\n * considered to be started after {@link InvalidationListener#ready} has received by the\n * application.\n * <p>\n * REQUIRES: {@link #start} has not already been called.\n * Also, the resources given to the client must have been started by the caller.\n */\n void start();\n\n /**\n * Stops the client. After this method has been called, it is an error to call any other method.\n * Does not stop the resources bound to this client.\n * <p>\n * REQUIRES: {@link #start} has already been called.\n */\n void stop();\n\n /**\n * Registers to receive invalidations for the object with id {@code objectId}.\n * <p>\n * The library guarantees that the caller will be informed of the results of this call either via\n * {@link InvalidationListener#informRegistrationStatus} or\n * {@link InvalidationListener#informRegistrationFailure}.\n * <p>\n * The caller should consider the registration to have succeeded only if it gets a call\n * {@link InvalidationListener#informRegistrationStatus} for {@code objectId} with\n * {@code InvalidationListener.RegistrationState.REGISTERED}. Note that if the network is\n * disconnected, the listener events will probably show up after the network connection is\n * repaired.\n * <p>\n * REQUIRES: {@link #start} has been called and {@link InvalidationListener#ready} has been\n * received by the application's listener.\n */\n void register(ObjectId objectId);\n\n /**\n * Registers to receive invalidations for multiple objects. See the specs on\n * {@link #register(ObjectId)} for more details. If the caller needs to register for a number of\n * object ids, this method is more efficient than calling {@code register} in a loop.\n */\n void register(Collection<ObjectId> objectIds);\n\n /**\n * Unregisters for invalidations for the object with id {@code objectId}.\n * <p>\n * The library guarantees that the caller will be informed of the results of this call either via\n * {@link InvalidationListener#informRegistrationStatus} or\n * {@link InvalidationListener#informRegistrationFailure} unless the library informs the caller of\n * a connection failure via {@link InvalidationListener#informError}.\n * <p>\n * The caller should consider the unregistration to have succeeded only if it gets a call\n * {@link InvalidationListener#informRegistrationStatus} for {@code objectId} with\n * {@link InvalidationListener.RegistrationState#UNREGISTERED}.\n * Note that if the network is disconnected, the listener events will probably show up when the\n * network connection is repaired.\n * <p>\n * REQUIRES: {@link #start} has been called and and {@link InvalidationListener#ready} has been\n * receiveed by the application's listener.\n */\n void unregister(ObjectId objectId);\n\n /**\n * Unregisters for multiple objects. See the specs on {@link #unregister(ObjectId)} for more\n * details. If the caller needs to unregister for a number of object ids, this method is more\n * efficient than calling {@code unregister} in a loop.\n */\n void unregister(Collection<ObjectId> objectIds);\n\n /**\n * Acknowledges the {@link InvalidationListener} event that was delivered with the provided\n * acknowledgement handle. This indicates that the client has accepted responsibility for\n * processing the event and it does not need to be redelivered later.\n * <p>\n * REQUIRES: {@link #start} has been called and and {@link InvalidationListener#ready} has been\n * received by the application's listener.\n */\n void acknowledge(AckHandle ackHandle);\n}", "private void validate(RequestDto request) throws Exception {\r\n\t\tString error = null;\r\n\t\t\r\n\t\tif(null == request.getRoomSize() \r\n\t\t\t\t|| request.getRoomSize().size() != 2\r\n\t\t\t\t|| null == request.getCoords()\r\n\t\t\t\t|| request.getCoords().size() != 2){\r\n\t\t\terror = \"Invalid room size and/or coordinates\";\r\n\t\t}else if(StringUtils.isEmpty(request.getInstructions())\r\n\t\t\t\t|| !request.getInstructions().matches(\"^[NEWS]+$\")){\r\n\t\t\terror = \"Invalid Instructions\";\r\n\t\t}\r\n\t\t\r\n\t\tif(null != error){\r\n\t\t\tthrow new InvalidRequestException(error);\r\n\t\t}\r\n\t}", "Server validate( Server server ) throws Exception;", "boolean checkConnection() throws WebServiceClientException;", "public void checkConnection() {\n connection.check();\n }", "public void checkAndAcceptClientConnections() {\r\n\t\tserver.checkAndAcceptClientConnections();\r\n\t}", "@RequestMapping(\"/getclientdata\")\r\n\t\t\t\tpublic Client validClient(@RequestBody String id){\r\n\t\t\t\t\tlogger.info(\"validate client while login\");\r\n\t\t\t\t\treturn clientService.getClientValid(id);\r\n\t\t\t\t\t}", "boolean isConnectionContextValid();", "public boolean isRequestFromClient()\n {\n return _client;\n }", "@Test\n\tpublic void performRequestValidation() throws Exception {\n\n\t\tString responseBody = TestUtils.getValidResponse();\n\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tResponseEntity<ResponseWrapper> responseEntity = prepareReponseEntity(responseBody);\n\n\t\t\tthis.mockServer.verify();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private boolean validateClient(final User user, final Map<String, BeValue> parameters) {\n if (!parameters.containsKey(Constant.PEER_ID)) {\n LOG.info(\"User [{}] does not have peer_id [{}]\", user.getUid());\n return false;\n }\n try {\n final Optional<String> peerId = this.extractPeerId(user,\n parameters.get(Constant.PEER_ID)\n .getString());\n if (peerId.isEmpty()) {\n return false;\n }\n return this.clientService.findByPeerId(peerId.get()).getEnable();\n } catch (final InvalidBEncodingException ex) {\n LOG.info(\"User [{}] has invalid peer_id encoding\", user.getUid());\n return false;\n }\n }", "@Test\n public void testMismatchedClient() {\n ApplicationContext testContext = context.getBuilder()\n .bearerToken()\n .refreshToken()\n .build();\n\n // Build the entity.\n Form f = new Form();\n f.param(\"client_id\",\n IdUtil.toString(testContext.getClient().getId()));\n f.param(\"refresh_token\",\n IdUtil.toString(testContext.getToken().getId()));\n f.param(\"grant_type\", \"refresh_token\");\n\n Entity postEntity = Entity.entity(f,\n MediaType.APPLICATION_FORM_URLENCODED_TYPE);\n Response r = target(\"/oauth2/token\").request()\n .header(\"Authorization\", authHeader)\n .post(postEntity);\n\n // Assert various response-specific parameters.\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n assertEquals(MediaType.APPLICATION_JSON_TYPE, r.getMediaType());\n\n // Validate the query parameters received.\n ErrorResponse entity = r.readEntity(ErrorResponse.class);\n assertEquals(\"access_denied\", entity.getError());\n assertNotNull(entity.getErrorDescription());\n }", "public void verifyConnectivity() {\n\n // Attempt to make a valid request to the VPLEX management server.\n URI requestURI = _baseURI.resolve(VPlexApiConstants.URI_CLUSTERS);\n ClientResponse response = null;\n try {\n response = get(requestURI);\n String responseStr = response.getEntity(String.class);\n s_logger.info(\"Verify connectivity response is {}\", responseStr);\n if (responseStr == null || responseStr.equals(\"\")) {\n s_logger.error(\"Response from VPLEX was empty.\");\n throw VPlexApiException.exceptions.connectionFailure(_baseURI.toString());\n }\n int responseStatus = response.getStatus();\n if (responseStatus != VPlexApiConstants.SUCCESS_STATUS) {\n s_logger.info(\"Verify connectivity response status is {}\", responseStatus);\n if (responseStatus == VPlexApiConstants.AUTHENTICATION_STATUS) {\n // Bad user name and/or password.\n throw VPlexApiException.exceptions.authenticationFailure(_baseURI.toString());\n } else {\n // Could be a 404 because the IP was not that for a VPLEX.\n throw VPlexApiException.exceptions.connectionFailure(_baseURI.toString());\n }\n }\n } catch (VPlexApiException vae) {\n throw vae;\n } catch (Exception e) {\n // Could be a java.net.ConnectException for an invalid IP address\n // or a java.net.SocketTimeoutException for a bad port.\n throw VPlexApiException.exceptions.connectionFailure(_baseURI.toString());\n } finally {\n if (response != null) {\n response.close();\n }\n }\n }", "public boolean validateFormalization_RequirementClient(Formalization formalization, DiagnosticChain diagnostics, Map<Object, Object> context) {\n\t\treturn formalization.RequirementClient(diagnostics, context);\n\t}", "public void validateRequestIntent() {\n\n if (mRequest == null) {\n Logger.v(TAG, \"Request item is null, so it returns to caller\");\n throw new IllegalArgumentException(\"Request is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getAuthority())) {\n throw new IllegalArgumentException(\"Authority is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getResource())) {\n throw new IllegalArgumentException(\"Resource is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getClientId())) {\n throw new IllegalArgumentException(\"ClientId is null\");\n }\n\n if (TextUtils.isEmpty(mRequest.getRedirectUri())) {\n throw new IllegalArgumentException(\"RedirectUri is null\");\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is an interface of Command. Every Command should have the excute, getDoc and getOutput method.
public interface Command { /** * every command will excute and do not return anything. * @param input is the input of the user */ public void excute(String input); /** * every command should getdoc, should return the document of the command * @return the doc of each command as a String */ public String getDoc(); /** * people should be able to get the output of every command * @return the output of the command */ public String getOutput(); /** * people should be able to get the output of every command * @return the output of the command */ public String geterror(); }
[ "public interface Command {\n \n public void ejecutar();\n public void configureContext(Contenedor container);\n public Command parser(String comando);\n public String help();\n \n}", "public interface Command {\n\n /**\n * This method is used to initialize the command.\n */\n void start();\n\n /**\n * This method writes message to the appendable provided as argument.\n * @param appendable - This is the appendable for output.\n * @param message - This is a message to be displayed.\n */\n void showMessage(Appendable appendable, String message);\n}", "public interface Command {\r\n\t\t/**\r\n\t\t * <h1>doCommand</h1>\r\n\t\t * this method performs the inserted command\r\n\t\t * @param args is the String array that represents the command with the parameters\r\n\t\t */\r\n\t\tvoid doCommand(String[] args);\r\n\t}", "public interface ICommand {\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return long description of the command\r\n\t */\r\n\tString description();\r\n\r\n\t/**\r\n\t * \r\n\t * @return name of the command\r\n\t */\r\n\tString name();\r\n\r\n\t/**\r\n\t * Get called when the comma\r\n\t * @param console callback for output\r\n\t * @param options of the command invocation\r\n\t */\r\n\tvoid exec(ICommandConsole console, List<String> options);\r\n\r\n\t/**\r\n\t * \r\n\t * @return usage of the command\r\n\t */\r\n\tString usage();\r\n}", "public abstract String commandDocumentation();", "public interface Command {\n\n\n}", "public interface iCommand {\r\n \r\n /**\r\n * An execute method for the invoker to call on the command.\r\n */\r\n public void execute();\r\n \r\n}", "public interface Command {\n \n /**\n * Méthode utilisée pour réaliser l'action voulue.\n */\n public void execute();\n \n /**\n * Méthode utilisée pour annuler la dernière action.\n */\n public void undo();\n}", "interface Command {\n\t\n\t/**\n\t * Voert een commando uit.\n\t */\n\tpublic void execute();\n\n\t/**\n\t * Maakt een eerder uitgevoerd commando ongedaan. De methode execute() moet\n\t * dus opgeroepen zijn geweest alvorens dat deze methode opgeroepen mag\n\t * worden.\n\t */\n\tpublic void undo();\n\t\n\t/**\n\t * Voert een commando opnieuw uit.\n\t */\n\tpublic void redo();\n}", "public interface Command {\n\n /**\n * Executes this command.\n *\n * @param console Console that invoked the command.\n * @param args Arguments.\n * @throws Exception on error.\n */\n void execute(TestConsole console, Object args[]) throws Exception;\n\n\n /**\n * Returns the name of this command.\n *\n * @return String\n */\n String getName();\n\n\n /**\n * Returns a description of this command suitable for display in the\n * test console help.\n *\n * @return String\n */\n String getDescription();\n}", "public interface Command<Ttarget,Tcontext,Tresult>\n{ \n \n /**\n * Execute the Command\n */\n void execute();\n\n /**\n * Undo the command, if undo is supported.\n */\n void undo();\n \n /**\n * Specify the target of this command\n * \n * @param target\n */\n void setTarget(Ttarget target); \n\n /**\n * \n * @return The target of this command\n */\n Ttarget getTarget();\n \n /**\n * \n * @return A copy of this Command which references the same target(s) and\n * parameters as this Command but is in a pre-execution state.\n */\n Command<Ttarget,Tcontext,Tresult> clone()\n throws CloneNotSupportedException;\n \n /**\n * \n * @return Whether this Command has started execution\n */\n boolean isStarted();\n \n /**\n * \n * @return Whether this Command has completed execution\n */\n boolean isCompleted();\n \n /**\n * \n * @return The Exception, if any, which caused this command to terminate \n */\n Exception getException();\n \n \n /**\n * @return The result of this command execution, if any \n */\n Tresult getResult();\n \n /**\n * \n * @return The context (input) for this command, if any\n */\n Tcontext getContext();\n \n /**\n * Specify the context (input) for this command, if any\n * \n * @param context\n */\n void setContext(Tcontext context);\n \n \n /**\n * \n * @return Whether the Command is reversable. This may depend on the state\n * of the Command target.\n */\n boolean isUndoable();\n \n \n \n}", "public interface CommandIO {\n /**\n * handle cvr message command\n * @param command message command\n * @param data message payload data\n * @param datalen message payload data len\n * */\n void handleCommand(Command command, byte[] data, int datalen);\n }", "@Override\n public String commandDocumentation() {\n return (\"Displays the documentation of various commands.\");\n }", "public interface ICommand {\n\t/**\n\t * @return the name of this command\n\t */\n\tString getName();\n\n\t/**\n\t * Performs this command\n\t * @return true if the command was performed successfully\n\t */\n\tboolean perform();\n\n\t/**\n\t * Called to undo the changes of the command that have been done through\n\t * perform\n\t */\n\tvoid undo();\n\n\t/**\n\t * Checks if this command is mergeable (in the undo list) with the passed\n\t * command\n\t * @param newCommand the command to check mergability\n\t * @return true if this command can be merged with the passed\n\t */\n\tboolean isMergeable(ICommand newCommand);\n\n\t/**\n\t * Merges this command with the passed command so that this command\n\t * represents both\n\t * @param newCommand the command to merge into this\n\t */\n\tvoid merge(ICommand newCommand);\n}", "public interface Commandable {\n\n /**\n * All commands will implement this method to run.\n *\n * @param argument\n * input from repl\n */\n void execute(List<String> argument);\n}", "public interface Command extends Plugin {\n\n /**\n * Execute specific action.\n *\n * @param action to realize\n * @param args action arguments\n * @param option of console\n */\n void execute(String action, String[] args, String option);\n\n /**\n * Display Bundle commands summary.\n */\n void summary();\n\n /**\n * Check availability of command.\n *\n * @param command to check\n * @return true if found\n */\n boolean isAvailableCommand(String command);\n\n /**\n * Register a parser to the global parser.\n * @param parser The parser to register.\n */\n void registerParser(BaseParser parser);\n\n /**\n * Register platform adapter to generate.\n * @param adapters\n */\n void registerAdapters(ArrayList<IAdapter> adapters);\n}", "public abstract Command getCommand();", "interface CommandNode extends SoyNode {\n\n /** Returns the Soy command name. */\n String getCommandName();\n\n /** Returns the command text (may be the empty string). */\n String getCommandText();\n }", "public interface Operation {\n\n /**\n * This method will return the type of the operation.\n *\n * @return the operation type\n */\n public String getOperationType();\n\n /**\n * This method will provide the usage of the operation. This usage will be provided\n * to the user when the format of the command is invalid\n *\n * @return the usage of the operation\n */\n public String getUsage();\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the SynonymMapsImpl object to access its operations.
public SynonymMapsImpl synonymMaps() { return this.synonymMaps; }
[ "public List<SynonymMap> getSynonymMaps() {\n return this.synonymMaps;\n }", "public IDiskoMapManager getMapManager();", "public Map<Concept, List<Obs>> getObsMap() {\n \treturn obsMap;\n }", "public MapDAO getMapDAO() {\r\n \t\treturn mapDAO;\r\n \t}", "public FSLNSResolver getNamespaceMap() {\n\t\treturn this._nsmap;\n\t}", "public abstract Map<String, Station> getWbanStationMap() throws DataAccessException;", "public final native MapJSO getMap() /*-{\n\t\treturn this.getMap();\n\t}-*/;", "public interface StarSystemAPI extends API {\n List<String> HOME_MAPS = ArrayUtils.asImmutableList(\"1-1\", \"2-1\", \"3-1\");\n List<String> OUTPOST_HOME_MAPS = ArrayUtils.asImmutableList(\"1-8\", \"2-8\", \"3-8\");\n List<String> PIRATE_MAPS = ArrayUtils.asImmutableList(\"5-1\", \"5-2\", \"5-3\");\n List<String> BLACK_LIGHT_MAPS = ArrayUtils.asImmutableList(\"1BL\", \"2BL\", \"3BL\");\n\n /**\n * @return current {@link Map}\n */\n Map getCurrentMap();\n\n /**\n * @return bounds of the current map\n */\n Area.Rectangle getCurrentMapBounds();\n\n /**\n * @return {@link Collection} of all known maps\n */\n Collection<Map> getMaps();\n\n /**\n * Find {@link Map} by given {@code mapId}.\n *\n * @param mapId to find\n * @return {@link Map} with given {@code mapId}\n * @throws MapNotFoundException if map was not found\n */\n Map getById(int mapId) throws MapNotFoundException;\n\n /**\n * Find {@link Map} by given {@code mapId} otherwise will create a new one with given mapId.\n *\n * @param mapId to find\n * @return {@link Map} with given {@code mapId}\n */\n Map getOrCreateMapById(int mapId);\n\n /**\n * Find {@link Map} by given {@code mapName}.\n * {@code mapName} must equals searched {@link Map#getName()}\n *\n * @param mapName to find\n * @return {@link Map} with given {@code mapName}\n * @throws MapNotFoundException if map was not found\n */\n Map getByName(String mapName) throws MapNotFoundException;\n\n /**\n * Given {@link Listener} will be executed on each map change.\n * <p>\n * Every {@link Listener} need to have strong reference.\n *\n * @param onMapChange to be added\n * @return given {@link Listener} reference\n * @see Listener\n */\n Listener<Map> addMapChangeListener(Listener<Map> onMapChange);\n\n /**\n * @return best {@link Portal} which leads to {@code targetMap}\n */\n Portal findNext(Map targetMap);\n\n class MapNotFoundException extends Exception {\n public MapNotFoundException(int mapId) {\n super(\"Map with id \" + mapId + \" was not found\");\n }\n\n public MapNotFoundException(String mapName) {\n super(\"Map \" + mapName + \" was not found\");\n }\n }\n}", "public MapManager getMapManager() { return mapManager; }", "public static Map getMap() {\n return map;\n }", "ReadOnlyUniqueAliasMap getAliasMap();", "private static Map<String, String> createSynonyms()\r\n {\r\n Map<String, String> syns = new HashMap<String, String>();\r\n syns.put(\"s1\", \"syn1\");\r\n syns.put(\"s2\", \"syn2\");\r\n syns.put(\"s3\", \"another Synonym\");\r\n return syns;\r\n }", "public abstract Map<Integer, Station> getStationsCurrentlyWithSmSt() throws DataAccessException;", "public Vector getSynonyms() {\n return getSynonyms(false);\n }", "public static TutorialMap getInstance() {\n\treturn INSTANCE;\n }", "public static Map getInstance() {\n\t\tif (map == null) {\n\t\t\tmap = new Map();\n\t\t}\n\t\treturn map;\n\t}", "WorkspacesOperations getWorkspacesOperations();", "public static Map getInstance() {\n if(instance == null) {\n instance = new Map();\n }\n return instance;\n }", "public abstract Map<Integer, Station> getStations() throws DataAccessException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for asynchronous reporting state enabled
public boolean isAsyncReportingEnabled() { return mAsyncReportingEnabled; }
[ "boolean getCallReportingEnabled();", "public java.lang.Boolean getAwaiting_inspection() {\n return awaiting_inspection;\n }", "public boolean isPolledReportingEnabled() { return mPolledReportingEnabled; }", "public boolean setAsyncReportingEnabled(boolean isEnabled)\n\t{\n\t\tboolean succeeded = false;\n\t\t// Configure the switch actions\n\t\tSwitchActionCommand saCommand = SwitchActionCommand.synchronousCommand();\n\n\t\tif( isEnabled ) {\n\n\t\t\t/// Enable asynchronous switch state reporting\n\t\t\tsaCommand.setAsynchronousReportingEnabled(TriState.YES);\n\t\t\t// Disable the default switch actions\n\t\t\tsaCommand.setSinglePressAction(SwitchAction.OFF);\n\t\t\tsaCommand.setDoublePressAction(SwitchAction.OFF);\n\n\t\t} else {\n\n\t\t\tif( !mPolledReportingEnabled ) {\n\n\t\t\t\t// Reset default switch actions\n\t\t\t\tsaCommand.setResetParameters(TriState.YES);\n\n\t\t\t\tresetReaderAlert();\n\n\t\t\t} else {\n\n\t\t\t\t// Just turn the asynchronous reporting off\n\t\t\t\tsaCommand.setAsynchronousReportingEnabled(TriState.NO);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tgetCommander().executeCommand(saCommand);\n\n\t\t\tmAsyncReportingEnabled = isEnabled;\n\t\t\tsucceeded = true;\n\n\t\t} catch (Exception e) {\n\t\t\t// Unable to change the state\n\t\t}\n\t\treturn succeeded;\n\t}", "boolean hasCallReportingEnabled();", "boolean getCallConversionReportingEnabled();", "public String isSuspendedGetValue(){\r\n\t\t\r\n\t\treturn isSuspended;\r\n\t}", "public Boolean logProgress() {\n return this.logProgress;\n }", "boolean getIsSuspended();", "boolean getSynchronous();", "public int getSyncState();", "public int getSyncStatus();", "boolean getPendingOnly();", "public boolean isAsynchronous() {\n\t\treturn asynchronous;\n\t}", "boolean hasIsPending();", "boolean isMonitoringEnabled();", "public String getAssessmentandReportingInstanceStatus() {\n return assessmentandReportingInstanceStatus;\n }", "public boolean getAtmStatus();", "@Override\n\tpublic java.lang.String getReportStatus() {\n\t\treturn _pathologyData.getReportStatus();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all projects in the repository that have a release recorded.
public Set<IProject> getProjectsWithRelease() throws SimalRepositoryException;
[ "public Set<IProject> getProjectsWithoutRelease() throws SimalRepositoryException;", "public List<ProjectModel> getProjectForRelease()\r\n\t{\r\n\t\treturn projectForRelease;\r\n\t}", "public Set<Release> getReleasesForProject(String projectId) throws IllegalArgumentException, IOException {\n HashSet<Release> releases = new HashSet<Release>();\n AuthenticatedWebClient.WebResponse response = webClient.get(\"api/projects/\" + projectId + \"/releases\");\n if (response.isErrorCode()) {\n throw new IOException(String.format(\"Code %s - %n%s\", response.getCode(), response.getContent()));\n }\n JSONObject json = (JSONObject)JSONSerializer.toJSON(response.getContent());\n for (Object obj : json.getJSONArray(\"Items\")) {\n JSONObject jsonObj = (JSONObject)obj;\n String id = jsonObj.getString(\"Id\");\n String version = jsonObj.getString(\"Version\");\n String ReleaseNotes = jsonObj.getString(\"ReleaseNotes\");\n releases.add(new Release(id, projectId, ReleaseNotes, version));\n }\n return releases;\n }", "public SortedSet<ReleaseJira> retriveReleases() throws IOException, ParseException{\n\t\t\n\t\tString url = basicUrl + \"project/\" + this.projectName + \"/version\";\n\t\tTreeSet<ReleaseJira> releases = new TreeSet<>((o1,o2) -> o1.getReleaseDate().compareTo(o2.getReleaseDate()));\n\t\t\n\t\tJSONObject json = JSONTools.readJsonFromUrl(url);\n JSONArray versions = json.getJSONArray(\"values\");\n \n for (Integer i = 0; i < versions.length(); i++ ) {\n JSONObject version = versions.getJSONObject(i);\n \t\n if (version.has(\"releaseDate\") && version.has(\"name\") && version.has(\"id\")) {\n \treleases.add(new ReleaseJira(version.getInt(\"id\"), version.getString(\"name\"), new SimpleDateFormat(\"yyyy-MM-dd\").parse(version.getString(\"releaseDate\"))));\t\n }\n }\n return releases;\n\t}", "List<ReleaseResponseDto> getReleasesProject(Integer id);", "@RequestMapping(value = \"/projectreleasesprints\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Projectreleasesprint> getAllProjectreleasesprints() {\n log.debug(\"REST request to get all Projectreleasesprints\");\n List<Projectreleasesprint> projectreleasesprints = projectreleasesprintRepository.findAll();\n return projectreleasesprints;\n }", "public Set<IProject> getProjectsWithoutBugDatabase() throws SimalRepositoryException;", "public Set<IProject> getProjectsWithBugDatabase() throws SimalRepositoryException;", "public Set<IProject> getProjectsWithRCS() throws SimalRepositoryException;", "public Set<IProject> getProjectsWithoutRCS() throws SimalRepositoryException;", "public Set<IProject> getProjectsWithReview() throws SimalRepositoryException;", "public Set<IProject> getProjectsWithoutReview() throws SimalRepositoryException;", "List<Project> getAllProjects(final Repository repo);", "Collection<? extends ICpItem> getReleases();", "List<Project> getProjectList();", "public List<Project> getAllProjects();", "public Set<IProject> getProjectsWithoutMaintainer() throws SimalRepositoryException;", "public static List<Release> getReleaseInfo() throws IOException, JSONException {\r\n\t\t\t\r\n\t\t\tMap<LocalDateTime, String> releaseNames;\r\n\t\t\tMap<LocalDateTime, String> releaseID;\r\n\t\t\tList<LocalDateTime> releases;\r\n\t\t\t\r\n\t\t\tList<Release> myReleases = new ArrayList<>();\r\n\t\t\tint j;\r\n\t\t\tint i;\r\n\t\t\t\r\n\t\t\t//Fills the arraylist with releases dates and orders them\r\n\t\t\t//Ignores releases with missing dates\r\n\t\t\treleases = new ArrayList<>();\r\n\t String url = \"https://issues.apache.org/jira/rest/api/2/project/\" + PROJECTNAME;\r\n\t JSONObject json = readJsonFromUrl(url);\r\n\t JSONArray versions = json.getJSONArray(\"versions\");\r\n\t releaseNames = new HashMap<>();\r\n\t releaseID = new HashMap<> ();\r\n\t for (i = 0; i < versions.length(); i++ ) {\r\n\t String name = \"\";\r\n\t String id = \"\";\r\n\t if(versions.getJSONObject(i).has(\"releaseDate\")) {\r\n\t if (versions.getJSONObject(i).has(\"name\"))\r\n\t name = versions.getJSONObject(i).get(\"name\").toString();\r\n\t if (versions.getJSONObject(i).has(\"id\"))\r\n\t id = versions.getJSONObject(i).get(\"id\").toString();\r\n\t addRelease(releases, releaseID, releaseNames, versions.getJSONObject(i).get(\"releaseDate\").toString(),\r\n\t name,id);\r\n\t }\r\n\t }\r\n\t \r\n\t // order releases by date \r\n\t \r\n\t Collections.sort(releases, (o1, o2) -> o1.compareTo(o2));\r\n\t \r\n\t \r\n\t if (releases.size() < 6) {\r\n\t return Collections.emptyList();\r\n\t }\r\n\t \r\n\t for (j=0;j<releases.size();j++) {\r\n\t \t \r\n\t \t myReleases.add(new Release(j+1,releaseNames.get((releases).get(j)),releases.get(j)));\r\n\t \t \r\n\t }\r\n\t \r\n\t \r\n\t return myReleases;\r\n\t\t}", "Set<Project> getProjects(Long testplanID);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(epoch); calendar.getTime().toGMTString(); calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
public static String notificationepochToDate(long epoch) { try { if(epoch==0){ return ""; } String Date1 = ""; String Time1 = ""; SimpleDateFormat dateFormatGmt = new SimpleDateFormat("hh:mm a"); SimpleDateFormat dateFormatGmt1 = new SimpleDateFormat("dd-MMM-yyyy"); dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT")); Date1 = dateFormatGmt1.format(epoch); Time1 = dateFormatGmt.format(epoch); return Date1 + " " + Time1;/*new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss a",Locale.getDefault()).format(calendar.getTime())*/ } catch (Exception e){ return ""; } /* SimpleDateFormat dateFormatGmt = new SimpleDateFormat("hh:mm a"); dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT")); return dateFormatGmt.format(epoch);*/ }
[ "private static String getGMT(Date aDate)\n{\n if(_fmt==null) {\n _fmt = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm:ss z\");\n _fmt.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n }\n\n return _fmt.format(aDate);\n}", "public static String epochToDateTime(long epoch)\n\t{\n\n\t\treturn new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\").format(new Date(epoch));\n\t}", "long getCurrentEpoch();", "private static long toUtc(long t) {\n \t\treturn t + TimeZone.getDefault().getOffset(t);\n \t}", "java.lang.String getTimeInGMT();", "public String getTimeStringFromEpoch(long epoch){\n \t\tDate date = new Date(epoch);\n \t\t\n \t\treturn (DateFormat.getTimeInstance(DateFormat.SHORT).format(date));\n \n \t}", "public static long calendarToGMTMillis(final Calendar cal) {\n // get Date object representing this Calendar's time value, millisecond\n // offset from the Epoch, January 1, 1970 00:00:00.000 GMT (Gregorian)\n final Date date = cal.getTime();\n // Returns the number of milliseconds since January 1, 1970, 00:00:00\n // GMT represented by this Date object.\n final long time = date.getTime();\n return time;\n }", "public Date getDate(long epoch){\r\n\t\tDate date = new Date(epoch);\r\n\t\treturn date;\r\n\t}", "public String getDateStringFromEpoch(long epoch){\n \t\tFormat formatter;\n \t\tDate date = new Date(epoch);\n \t\t\n \t\tformatter = new SimpleDateFormat(\"MM/dd/yy\");\n \t\t\n \t\treturn(formatter.format(date));\n \t}", "@Override\r\n\tpublic long getUTC() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\r\n\t\tlong time;\r\n\t\ttry {\r\n\t\t\tFirstSeen.replace('/', '-');\r\n\t\t\tSimpleDateFormat utc = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\");\r\n\t\t\tDate d=(Date) utc.parse(FirstSeen);\r\n\t\t\ttime = d.getTime();\r\n\t\t}catch (Exception e) {\r\n\t\t time = System.currentTimeMillis();\t\r\n\t\t}\r\n\t\treturn time;\r\n\t}", "public String getEpochDate() {\n return mEpochDate;\n }", "public static String fetchGraphDate11(int epoch)\n\t{\n\n\t\treturn new SimpleDateFormat(\"MMM yy\", Locale.US).format(new Date(epoch));\n\t}", "private static long timestamp() {\r\n\t\treturn Instant.now().toEpochMilli() - CUSTOM_EPOCH;\r\n\t}", "private static long timestamp() {\n\t\treturn Instant.now().toEpochMilli() - CUSTOM_EPOCH;\n\t}", "public Calendar getGMTBaseTime() {\n\n Calendar gmtTime = (Calendar) baseTime.clone();\n // hopefully this DST offset adjusts to DST automatically\n int dstOffset = gmtTime.get(Calendar.DST_OFFSET) / 3600000;\n int gmtOffset = gmtTime.get(Calendar.ZONE_OFFSET) / 3600000;//ms to hours\n Logger.println(\"offset is \" + gmtOffset, Logger.DEBUG);\n Logger.println(\"dst offset is \" + dstOffset, Logger.DEBUG);\n //put offset back\n gmtTime.set(Calendar.HOUR, gmtTime.get(Calendar.HOUR) - gmtOffset - dstOffset);\n Logger.println(\"new time is \" + gmtTime.getTime(), Logger.DEBUG);\n return gmtTime;\n }", "public static Date getGmtDate() {\n\n\t\tCalendar c = Calendar.getInstance();\n\n\t\tTimeZone z = c.getTimeZone();\n\t\tint offset = z.getRawOffset();\n\t\tint offsetHrs = offset / 1000 / 60 / 60;\n\t\tint offsetMins = offset / 1000 / 60 % 60;\n\n\t\tLogUtil.debug(\"Timezone offset (hours) = \" + offsetHrs);\n\t\tLogUtil.debug(\"Timezone offset (mins) = \" + offsetMins);\n\n\t\tc.add(Calendar.HOUR_OF_DAY, (-offsetHrs));\n\t\tc.add(Calendar.MINUTE, (-offsetMins));\n\n\t\treturn c.getTime();\n\t}", "public static Calendar getCurrentTime(String argGMT) {\r\n\t\treturn DateToCalendar(getTime(argGMT));\r\n\t}", "private String getTimestamp() {\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat is08601 = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\n is08601.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return is08601.format(calendar.getTime());\n }", "com.google.protobuf.Timestamp getCurrentEpochStartTime();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
View view = LayoutInflater.from(getContext()).inflate(R.layout.fab_morph_layout, this, true);
private void inflate() { View view = LayoutInflater.from(getContext()).inflate(resourceId, this, true); fab = (FloatingActionButton) view.findViewById(R.id.fab); // your fab needs to have this id vTarget = view.findViewById(R.id.morphTarget); // your target view needs to have this id vTarget.setVisibility(INVISIBLE); vTarget.post(new Runnable() { // this runnable will be run after views has been set allowing us to properly calculate animations @Override public void run() { init(); // method initializing paths for animations } }); }
[ "protected LayoutInflater getInflater(){\n return getActivity().getLayoutInflater();\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tif (view != null) {\n\t\t\tLog.i(\"222222\", \"11111111\");\n\t\t\tViewGroup parent = (ViewGroup) view.getParent();\n\t\t\tif (parent != null)\n\t\t\t\tparent.removeView(view);\n\t\t}\n\t\ttry {\n\t\t\tview = inflater.inflate(R.layout.f_mine, container, false);\n\t\t\tinitView();\n\t\t} catch (InflateException e) {\n\n\t\t}\n\n\t\treturn view;\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_check_box, container, false);\r\n\r\n\r\n return view;\r\n }", "@Override\n public void setContentView(int layoutResID) {\n RelativeLayout rlparentView = (RelativeLayout) getLayoutInflater().inflate(R.layout.layout_fab_button, null);\n initViews(rlparentView);\n getLayoutInflater().inflate(layoutResID, activityContainer, true);\n super.setContentView(rlparentView);\n }", "@Override\r\n\tprotected View onCreateView(ViewGroup parent) {\r\n\t\tLayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\t\treturn inflater.inflate(R.layout.toggle_preference_layout, parent, false);\r\n\t}", "@Override\n public View initView() {\n if (view == null) {\n view = LayoutInflater.from(mContext).inflate(R.layout.deviceinfragment1, null);\n initData();\n }\n// view = inflater.inflate(R.layout.deviceinfragment0, container, false);\n ViewGroup parent = (ViewGroup) view.getParent();\n if (parent != null) {\n parent.removeView(view);\n initData();\n }\n return view;\n }", "private void inflateViews(Context context) {\n\t\t// instantiate the LayoutInfalter:\n\t\tLayoutInflater inflater = LayoutInflater.from(context);\n\t\t// inflating the xml layouts:\n\t\tftLayout = inflater.inflate(R.layout.small_flip_tile_template, this);\n\t\t\n\t\t//this.addView(ftLayout);\n\t}", "public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {View view = new View(getContext());\n //view.setBackgroundColor(0x0000FF00);\n //return view;\n //\n\n return inflater.inflate(R.layout.fragment_weather, container, false);\n\n\n }", "private void initView() {\n BlurMaskFilterView view=new BlurMaskFilterView(this);\n root.addView(view, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));\n }", "@Override\n\tprotected void initView() {\n\t\tView.inflate(getContext(), R.layout.life_log, this);\n\t}", "public View onCreateView(LayoutInflater layoutinflater, ViewGroup viewgroup, Bundle bundle)\n {\n \treturn layoutinflater.inflate(R.layout.netmusic, viewgroup, false);\n }", "public LayoutInflater getInflater() {\n\t\treturn inflater;\n\t}", "private void createFAB() {\r\n fab = findViewById(R.id.fabEditTask);\r\n fab.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n goIntoEditMode();\r\n }\r\n });\r\n }", "protected abstract void onInflated(View view);", "public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState){\n return inflater.inflate(R.layout.tab1_fragment, container, false);\n// btnTest=(Button) view.findViewById(R.id.btnTest);\n//\n// btnTest.setOnClickListener(new View.OnClickListener() {\n// });\n// return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_quadratic_calculator_, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_hi_route, container, false);\n\n// faqFragmentNoConImage = (ImageView) v.findViewById(R.id.faqNoConImage);\n// faqFragmentNoConText = (TextView) v.findViewById(R.id.faqUsNoConText);\n// progressBarCircularIndeterminate = (ProgressBarCircularIndeterminate) v.findViewById(R.id.progressBarCircularIndeterminate1_faq);\n//\n// faqCatagoriesList = (AnimatedExpandableListView) v.findViewById(R.id.faqs_catagories_list);\n// faqLayout = (RelativeLayout) v.findViewById(R.id.linear_faq);\n//\n// faqCatagoriesList.setOnGroupClickListener(this);\n// faqCatagoriesList.setOnChildClickListener(this);\n// faqCatagoriesList.setOnGroupExpandListener(this);\n// faqCatagoriesList.setVisibility(View.GONE);\n// showHideComponents(View.GONE, null);\n// faqFragmentNoConImage.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// if (UtilityManager.isConnected(getContext())) {\n//\n// showHideComponents(View.GONE, null);\n// isShowProgressBar(View.VISIBLE);\n// getFAQDetails();\n// } else {\n// showHideComponents(View.VISIBLE, getString(R.string.no_internet_connection));\n// isShowProgressBar(View.GONE);\n// }\n// }\n// });\n return v;\n }", "@Override\n\t\tpublic View createView(LayoutInflater inflater) {\n\t\t\treturn bv.createView(inflater, position, viewType);\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_friend, container, false);\n initView(view);\n initData();\n initThread();\n\n return view;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Print data processing Parses output data for escape sequences and valid control characters CR and LF. See UPOS specification for POSPrinter, chapter Data Characters and Escape Sequences. Returns list of objects that describe all parts of the output string. These objects can be used by validate and print functions to check print data and to generate generic output data. Possible objects in list have one of the following types: PrintData Class containing character strings with printable characters only. See PrintData for details. ControlChar Class containing control character CR or LF. While LF should be always valid, CR can be invalid, depending on printer capabilities. EscCut Class containing information about details of a cut command. See EscCut for details. EscRuledLine Class containing information about details of a ruled line command. See EscRuledLine for details. EscNormalize Class containing information about details of a normalize command. See EscNormalize for details. EscLogo Class containing information about details of a logo command. See EscLogo for details. EscStamp Class containing information about details of a stamp command. See EscStamp for details. EscBitmap Class containing information about details of a bitmap command. See EscBitmap for details. EscFeed Class containing information about details of a feed command. See EscFeed for details. EscEmbedded Class containing information about details of a embedded data command. See EscEmbedded for details. EscBarcode Class containing information about details of a barcode command. See EscBarcode for details. EscFontTypeface Class containing information about details of a font typeface command. See EscFontTypeface for details. EscAlignment Class containing information about details of an alignment command. See EscAlignment for details. EscScale Class containing information about details of a scale command. See EscScale for details. EscSimple Class containing information about details of a simple attribute command. See EscSimple for details. EscLine Class containing information about details of an added line command. See EscLine for details. EscColor Class containing information about details of a color setting command. See EscColor for details. EscShade Class containing information about details of a shading command. See EscShade for details. EscUnknown Class containing information about details of an unknown escape sequence.
public List<PrintDataPart> outputDataParts(String data) { List<PrintDataPart> out = new ArrayList<PrintDataPart>(); int index; try { while ((index = data.indexOf("\33|")) >= 0) { outputPrintableParts(data.substring(0, index), out); data = data.substring(index + 2); int value = 0; int temp; boolean negated = data.charAt(0) == '!'; boolean valueisdatalength = data.charAt(0) == '*'; boolean valueispresent = false; for (index = (negated || valueisdatalength) ? 1 : 0; (temp = data.charAt(index) - '0') >= 0 && temp <= 9; index++) { value = value * 10 + temp; valueispresent = true; } data = data.substring(index); int subtype = 0; for (index = 0; (temp = data.charAt(index)) >= 'a' && temp <= 'z'; index++) { subtype = subtype * 1000 + temp; } String escdata = getEscData(data, index, value, temp, valueisdatalength); data = data.substring(index + escdata.length() + 1); out.add(getEscObj(temp, subtype, value, valueisdatalength ? escdata : (String) null, negated, valueispresent)); } if (data.length() > 0) outputPrintableParts(data, out); PrintDataPart o = out.get(out.size() - 1); if (o instanceof ControlChar && '\15' == ((ControlChar) o).getControlCharacter()) { out.add(new PrintData("", Data.MapCharacterSet, Data.CharacterSet)); } } catch (IndexOutOfBoundsException e) { out.add(new EscUnknown(0, 0, 0, null, false, false)); } return out; }
[ "private void printData(String data) {\n\t\tSystem.out.println(data);\n\t}", "public void print( String data ) {\n\t\tSystem.out.print(data);\n\t}", "public void printToConsole(Object data){\r\n\t\tSystem.out.println(data);\r\n\t}", "void validateData(PointCardRWService.EscUnknown printData) throws JposException;", "public static void printCompositeDataObject(CompositeData cData) {\n\n // Get lists of data items & their types from composite data object\n List<Object> items = cData.getItems();\n List<DataType> types = cData.getTypes();\n\n // Use these list to print out data of unknown format\n DataType type;\n int len = items.size();\n for (int i=0; i < len; i++) {\n type = types.get(i);\n System.out.print(String.format(\"type = %9s, val = \", type));\n switch (type) {\n case NVALUE:\n case INT32:\n case UINT32:\n case UNKNOWN32:\n int j = (Integer)items.get(i);\n System.out.println(\"0x\"+Integer.toHexString(j));\n break;\n case LONG64:\n case ULONG64:\n long l = (Long)items.get(i);\n System.out.println(\"0x\"+Long.toHexString(l));\n break;\n case SHORT16:\n case USHORT16:\n short s = (Short)items.get(i);\n System.out.println(\"0x\"+Integer.toHexString(s));\n break;\n case CHAR8:\n case UCHAR8:\n byte b = (Byte)items.get(i);\n System.out.println(\"0x\"+Integer.toHexString(b));\n break;\n case FLOAT32:\n float ff = (Float)items.get(i);\n System.out.println(\"\"+ff);\n break;\n case DOUBLE64:\n double dd = (Double)items.get(i);\n System.out.println(\"\"+dd);\n break;\n case CHARSTAR8:\n String[] strs = (String[])items.get(i);\n for (String ss : strs) {\n System.out.print(ss + \", \");\n }\n System.out.println();\n break;\n default:\n }\n }\n\n }", "T print(char[] data) throws PrintingException;", "public void outputToConsole() {\r\n for (String line : data) {\r\n System.out.println(line);\r\n }\r\n }", "public void println( String data ) {\n\t\tSystem.out.println(data);\n\t}", "public void printData() {\n System.out.println(\"rank: \" + myRank);\n System.out.println(\"crossings: \" + myCrossingNumber);\n System.out.println(\"shadow:\");\n myShadow.print();\n System.out.println();\n printYamanouchi();\n System.out.println();\n printTableau();\n }", "public DerPrintableString(ByteBuffer inputData)\n {\n super(inputData, DerNodeType.PrintableString);\n }", "private void printData() {\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tlog(\" *** data index \" + i + \" = \" + data.elementAt(i));\n\t\t}\n\t}", "public String getEscData() {\r\n return EscData;\r\n }", "private void printToOutputList() {\r\n\r\n int indexOfDeclare;\r\n int indexOfEvents;\r\n int indexOfStates;\r\n int indexOfInitialisations;\r\n int indexOfEvolutions;\r\n int indexOfConstraints;\r\n\r\n listOutput.add(\"declare(\");\r\n listOutput.add(\"events: [\");\r\n listOutput.add(\"states: [\");\r\n listOutput.add(\"initialisations: [\");\r\n listOutput.add(\"evolutions: [\");\r\n listOutput.add(\"constraints: [\");\r\n\r\n indexOfDeclare = listOutput.indexOf(\"declare(\");\r\n indexOfEvents = listOutput.indexOf(\"events: [\");\r\n indexOfStates = listOutput.indexOf(\"states: [\");\r\n indexOfInitialisations = listOutput.indexOf(\"initialisations: [\");\r\n indexOfEvolutions = listOutput.indexOf(\"evolutions: [\");\r\n indexOfConstraints = listOutput.indexOf(\"constraints: [\");\r\n\r\n inputVar.values().forEach((s) -> {\r\n listOutput.set(indexOfDeclare, listOutput.get(indexOfDeclare) + \"\\n\\t\" + s + \", \");\r\n listOutput.set(indexOfEvents, listOutput.get(indexOfEvents) + \"\\n\\t\" + s + \", \");\r\n });\r\n\r\n //adding states or memory location for output variables...\r\n for (String s : statesVar.values()) {\r\n listOutput.set(indexOfStates, listOutput.get(indexOfStates) + \"\\n\\t\" + s + \", \");\r\n listOutput.set(indexOfDeclare, listOutput.get(indexOfDeclare) + \"\\n\\t\" + s + \", \");\r\n }\r\n\r\n //adding initialisation values to states...\r\n for (String s : initialisationVar.values()) {\r\n listOutput.set(indexOfInitialisations, listOutput.get(indexOfInitialisations) + \"\\n\\t\" + s + \", \");\r\n }\r\n\r\n for (String s : evolutions.values()) {\r\n listOutput.set(indexOfEvolutions, listOutput.get(indexOfEvolutions) + \"\\n\\t\" + s + \", \");\r\n }\r\n\r\n for (String s : constraints.values()) {\r\n listOutput.set(indexOfConstraints, listOutput.get(indexOfConstraints) + \"\\n\\t\" + s + \", \");\r\n }\r\n\r\n String declare = listOutput.get(indexOfDeclare);\r\n listOutput.set(indexOfDeclare, declare.substring(0, declare.lastIndexOf(',')) + \");\");\r\n String events = listOutput.get(indexOfEvents);\r\n listOutput.set(indexOfEvents, events.substring(0, events.lastIndexOf(\",\")) + \"];\");\r\n String states = listOutput.get(indexOfStates);\r\n listOutput.set(indexOfStates, states.substring(0, states.lastIndexOf(\",\")) + \"];\");\r\n String initialisations = listOutput.get(indexOfInitialisations);\r\n listOutput.set(indexOfInitialisations, initialisations.substring(0, initialisations.lastIndexOf(\",\")) + \"];\");\r\n\r\n //finalizing evolotions statement and adding to the output list...\r\n String evolution = listOutput.get(indexOfEvolutions);\r\n listOutput.set(indexOfEvolutions, evolution.substring(0, evolution.lastIndexOf(\", \")) + \"];\");\r\n //adding the last constraints to the output list...\r\n String constraint = listOutput.get(indexOfConstraints);\r\n if(constraint.contains(\", \"))\r\n listOutput.set(indexOfConstraints, constraint.substring(0, constraint.lastIndexOf(\", \")) + \"];\");\r\n else\r\n \tlistOutput.set(indexOfConstraints, constraint + \" ];\");\r\n }", "public void printOutput() {\n\t\t// Override\n\t}", "public String getDataToParse(){\n\t\treturn dataToPArse;\n\t}", "public Object getPrintData() throws IOException\n\t{\n\t\treturn getStreamForBytes();\n\t}", "public void PrintDS();", "public void print() {\n\tString completeInput = byteStream.toString();\n\n\tif (input.isEmpty()) {\n\t originalSystemOut.print(completeInput);\n\t} else {\n\t if (input.length() <= completeInput.length()) {\n\t\toriginalSystemOut.print(completeInput.substring(input.length()));\n\t } else {\n\t\tlogger.error(\"An error occurred while printing the input.\");\n\t }\n\t}\n\n\tinput = completeInput;\n }", "protected void setOutput(String data) {\r\n\t\tthis.output.setText(data);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to get updated cart order and calculate amount and save into order cart table cartId
@Override public Optional<OrderResponseDto> updateCart(Long cartId) { OrderCart orderCart = checkAndGetOrderCartIfExist(cartId); orderCart.setAmount(new BigDecimal(CalculationUtility.sum(orderCart.getOrderProducts())) .setScale(2, RoundingMode.DOWN)); return Optional.ofNullable(orderMapper.entityToResponseDto(orderRepository.save(orderCart))); }
[ "public void updateCartByPurchaseOrder(Cart cart,PurchaseOrder purchaseOrder) throws UserApplicationException;", "@Override\n public Cart update(Cart cart) throws DaoException {\n PreparedStatement statement = null;\n try {\n statement = connection.prepareStatement(UPDATE_CART);\n statement.setLong(4, cart.getCartId());\n statement.setLong(1, cart.getUserId());\n statement.setLong(2, cart.getItemId());\n statement.setLong(3, cart.getOrderId());\n statement.setBigDecimal(4, cart.getCount());\n int result = statement.executeUpdate();\n if (result != 1) {\n throw new DaoException(\"Error with update cart\");\n }\n } catch (SQLException exception) {\n throw new DaoException(\"Error with update cart\", exception);\n } finally {\n close(statement);\n }\n return cart;\n }", "CartItems updateCartItemDetails(int cartItemsId, CartItems c1);", "void updateCart(Context context,int action,String username,int goodsId,int count,int cartId,OnCompleteListener<MessageBean> listener);", "@RequestMapping(value = \"/carts\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Cart> updateCart(@Valid @RequestBody Cart cart) throws URISyntaxException {\n log.debug(\"REST request to update Cart : {}\", cart);\n if (cart.getId() == null) {\n return createCart(cart);\n }\n Cart result = cartRepository.save(cart);\n return ResponseEntity.ok()\n .headers(HeaderUtil.createEntityUpdateAlert(\"cart\", cart.getId().toString()))\n .body(result);\n }", "@RequestMapping(value = { \"/shoppingCart\" }, method = RequestMethod.POST)\n public String shoppingCartUpdateQty(HttpServletRequest request,\n Model model, \n @ModelAttribute(\"cartForm\") CartInfo cartForm) {\n \n CartInfo cartInfo = Utils.getCartInSession(request);\n cartInfo.updateQuantity(cartForm);\n \n // Redirect to shoppingCart page.\n return \"redirect:/shoppingCart\";\n }", "public void updateItemQuantity(ArrayList<Product> cartItems) throws IOException{\n \n getOrderItemsFullDetails(cartItems);\n ArrayList<Product> allProducts = productModel.getProducts(); // gets all Products in the product file for a view of all the details. cart items products did not have all the fields set.only the fields needed by the table were available\n for (Product product : productsToOrder) {\n int availableQuantity = product.getQuantity();\n for (Product cartItem : cartItems) {\n if (cartItem.getName().equals(product.getName())) {\n int requestedQuantity = cartItem.getOrderQuantity();\n int remainingQuantity = availableQuantity - requestedQuantity; \n updatedProduct = product.copyOfProduct();\n updatedProduct.setQuantity(remainingQuantity);\n product.updateProduct(product, updatedProduct); \n }\n \n }\n \n }\n placeOrder(cartItems);\n\n }", "public boolean placeOrder(ShoppingCart cart) {\n \n // get itesm from cart\n List<ShoppingCartItem> items = cart.getItems();\n Query query = null;\n boolean r = false;\n\n \n // for each product chechk its current quantity\n for (ShoppingCartItem scItem : items) {\n int productId = scItem.getProduct().getId();\n short quantity = scItem.getQuantity();\n System.out.println(\"QUANITTY\" + quantity);\n \n // \n query = em.createNativeQuery(\"SELECT AMOUNT FROM PRODUCT WHERE ID = ?1\");\n query.setParameter(1, productId);\n\n int result = (int) query.getSingleResult();\n \n // test to see if there is enought there\n System.out.print(result);\n int test = result - (quantity + 1);\n System.out.println(\"TEST \" + test);\n // log it\n aManager.checkoutProductlog(productId); \n if (test > 0) { \n // remove them if enough stock\n query = em.createQuery(\"UPDATE Product p SET p.amount = p.amount - :quantity WHERE p.id = :productId\");\n query.setParameter(\"quantity\",quantity);\n query.setParameter(\"productId\",productId);\n query.executeUpdate();\n System.out.println(\"herererere\");\n r = true;\n } else {\n // otherwsie return false\n System.out.println(\"Not enough Stock\");\n r = false;\n }\n\n }\n return r;\n }", "List<CartModificationData> addDealToCart(AddDealToCartData addDealToCartData);", "@Override\n\tpublic Cart addCart(Cart cart) {\n\t\tlogger.info(\"Adding cart in the database\");\n\t\treturn cartRepo.save(cart);\n }", "@Override\n public boolean setOrderId(long cartId, long orderId) throws DaoException {\n boolean result = false;\n PreparedStatement statement = null;\n try {\n statement = connection.prepareStatement(UPDATE_CART_SET_ORDER_ID);\n statement.setLong(2, cartId);\n statement.setLong(1, orderId);\n int rows = statement.executeUpdate();\n if (rows == 1) {\n result = true;\n }\n } catch (SQLException exception) {\n throw new DaoException(\"Error with update cart - set order id\", exception);\n } finally {\n close(statement);\n }\n return result;\n }", "void onCartUpdate() {\n EcomUtil.printLog(\"onHomeUpdate\");\n CompositeDisposable compositeDisposable = new CompositeDisposable();\n compositeDisposable.add(\n mUserInfoHandler\n .getCartDataObservable()\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(cartData -> {\n EcomUtil.printLog(\"onHomeUpdate\" + cartData.getAction());\n if (cartData.getAction() == TEN) {\n callGetOrdersCountApi();\n }\n if (cartData.getAction() == ZERO || cartData.getAction() == ONE\n || cartData.getAction() == THREE || cartData.getAction() == FOUR\n || cartData.getAction() == FIVE || cartData.getAction() == SIX) {\n mCartCountData.setValue(cartData.getAction());\n }\n }));\n }", "public static Order buildCart(Cart cart) {\n\n cart.getAddress().saveInBackground();\n\n final Order order = new Order();\n order.setSchedule(cart.getSchedule());\n order.setAddress(cart.getAddress());\n order.setPickUp(cart.getPickup());\n order.setEvent(cart.getEvent());\n order.setProductGroup(cart.getProducts());\n try {\n order.save();\n System.out.println(order.getObjectId());\n } catch (ParseException e) {\n Log.e(Order.DEFAULT_PIN, \"CartHelper unable to save Order \", e);\n }\n for (Promotion promotion : cart.promotions) {\n promotion.promotionUtilized();\n if (promotion instanceof InvitationPromotion) {\n cart.getUser().setNewUserPromotionUsed();\n }\n }\n\n\n for (ProductPriceRow productPriceRow : cart.productPrice) {\n\n addVendorPayment(productPriceRow.getProduct().getGyftyProduct(), order.getObjectId(), productPriceRow);\n addVendorNotes(productPriceRow.getProduct(), order);\n\n }\n\n/* try {\n cart.delete();\n } catch (ParseException e) {\n Log.e(\"CartHelper\", \"CartHelper unable to delete cart\", e);\n }*/\n return order;\n\n }", "@POST\n\t@Path(\"/cart/save/customer\")\n\tpublic long[] saveCart(@Context HttpServletRequest req, long[] cart) throws CouponSystemException{\n\t\ttry{\n\t\t//creates a new shopping cart object and sets its content to the \n\t\t//list of coupon id's \"cart\"\n\t\tShoppingCart sc = new ShoppingCart();\n\t\tsc.setCoupons(cart);\n\t\t\n\t\t//saves the shopping cart inside the session with the attribute \"cart\"\n\t\treq.getSession().setAttribute(\"cart\", sc);\n\t\t\n\t\treturn cart;\n\t\t}catch(Exception e){\n\t\t\tthrow new CouponSystemException(\"Problem Updating Cart\");\n\t\t}\n\t}", "public void setCartId(int cartId) {\n this.cartId = cartId;\n }", "public void AddToFinalOrder(Order_Detail_Object order_detail_object) {\n\n g = (Globals) getApplication();\n // get product id of particular product from product hashmap\n String ProductId = g.getProductsHashMap().get(order_detail_object.getItem()).getID();\n if(addToCart_flag) {\n // check condition that contains ProductId\n if (g.getFinal_order().containsKey(ProductId)) {\n\n // get quantity from g.getFinal_order() into int variable\n int qty = Integer.parseInt(g.getFinal_order().get(ProductId).getQuantity());\n // increment qty\n qty = qty + 1;\n // set quantity into final_order of hashmap\n g.getFinal_order().get(ProductId).setQuantity(String.valueOf(qty));\n } else {\n // put id and order_detail_object from globals\n g.getFinal_order().put(ProductId, order_detail_object);\n }\n } else{\n product_ids_for_list.add(ProductId);\n }\n }", "public int getCartId() {\n return cartId;\n }", "@Override\n\n\tpublic Optional<OrderResponseDto> confirmOrder(Long id) {\n\t\tOptional<OrderCart> orderCartOptional = orderRepository.findById(id);\n\t\tif (orderCartOptional.isPresent()) {\n\t\t\tOrderCart orderCart = orderCartOptional.get();\n\t\t\tList<OrderProduct> orderProducts = orderCart.getOrderProducts();\n\t\t\torderCart.setAmount(new BigDecimal(CalculationUtility.sum(orderProducts))\n\t\t\t\t\t.setScale(2, RoundingMode.DOWN));\n\t\t\torderCart.setDiscount(new BigDecimal(CalculationUtility.discount(orderProducts))\n\t\t\t\t\t.setScale(2, RoundingMode.DOWN));\n\t\t\tOrderCart savedOrder = orderRepository.save(orderCart);\n\t\t\treturn Optional.ofNullable(orderMapper.entityToResponseDto(savedOrder));\n\t\t}\n\t\treturn Optional.empty();\n\t}", "@PutMapping(\"/shoppingcarts/{id}\")\n public @ResponseBody\n @ResponseStatus(HttpStatus.OK)\n Shoppingcart updateShoppingcart(@PathVariable Integer id, @RequestBody Shoppingcart newShoppingcart) {\n return shoppingcartRepository.findById(id)\n .map(shoppingcart -> {\n shoppingcart.setItems(newShoppingcart.getItems());\n shoppingcart.calcTotal();\n return shoppingcartRepository.save(shoppingcart);\n })\n .orElseGet(() -> {\n newShoppingcart.setId(id);\n return shoppingcartRepository.save(newShoppingcart);\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares this node to another node. If they are exactly the same, we return true. Otherwise we return false. If whitespace is true, we insist whitespace matches; Otherwise we disregard differences in line breaks and spaces (reducing all white space to a single space before the compare).
public MATCH compareToNode(Node n, boolean whitespace){ if(!type.equals(n.getType())){ // If not the same type, it makes no sense to return MATCH.differentType; // compare further... } boolean attribs = compareAttributes(this.attributes,n.getAttributes()) && compareAttributes(n.attributes ,this.getAttributes()); boolean body = fix(this.body,whitespace).equals(fix(n.getBody(),whitespace)); if(attribs && body ) { return MATCH.match; } if(!body && !attribs ){ return MATCH.differentBodyAttributes; } if(!body){ return MATCH.differentBody; } return MATCH.differentAttributes; // Only case that remains... }
[ "boolean identicalTrees(Node a, Node b) {\n\t\t/* 1. both empty */\n\t\tif (a == null && b == null)\n\t\t\treturn true;\n\n\t\t/* 2. both non-empty -> compare them */\n\t\tif (a != null && b != null)\n\t\t\treturn (a.key == b.key && identicalTrees(a.left, b.left) && identicalTrees(a.right, b.right));\n\n\t\t/* 3. one empty, one not -> false */\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object other) {\n\t\tif (this == null || other == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!(other instanceof TextNode)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!(this.toString().equals(other.toString()))) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean equals(FCNSTreeNode another){\n if (another==null)\n return false;\n \n if (!this.element.equals(another.element))\n return false;\n \n if (this.firstChild==null){\n if (another.firstChild!=null)\n return false;\n }\n else if (!this.firstChild.equals(another.firstChild))\n return false;\n \n if (this.nextSibling==null){\n if (another.nextSibling!=null)\n return false;\n }\n else if (!this.nextSibling.equals(another.nextSibling))\n return false;\n \n return true;\n \n }", "private static boolean isSameTree(Node currentT1Node, Node currentT2Node) {\n\t\tif (currentT1Node != null && currentT2Node != null) {\n\t\t\tboolean isLeftSame = isSameTree(currentT1Node.leftChild, currentT2Node.leftChild);\n\t\t\tboolean isRightSame = isSameTree(currentT1Node.rightChild, currentT2Node.rightChild);\n\n\t\t\t// If either is false it means that the trees differ so we return immediately\n\t\t\tif (!isLeftSame || !isRightSame) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise we compare the nodes in the current value.\n\t\t\tif (currentT1Node.value == currentT2Node.value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t// If one current Tn node is null and the other isn't then the trees are not the same.\n\t\tif ((currentT1Node == null && currentT2Node != null) || (currentT1Node != null && currentT2Node == null)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // We have hit the bottom of both trees, both T1 and T2 are null therefore it still matches.\n\t}", "public boolean isEqualNode(Node arg) {\n return super.isEqualNode(arg);\n }", "private boolean rec_equals(Tree otherTree) {\n\t\tif (this.getCurrentNode() == null ^ otherTree.getCurrentNode() == null)\n\t\t\treturn false;\n\t\telse if (this.getCurrentNode() == null && otherTree.getCurrentNode() == null)\n\t\t\treturn true;\n\t\telse{\n\t\t// test current node\n\t\tif(!this.getCurrentNode().equals(otherTree.getCurrentNode()))\n\t\t\treturn false;\n\n\t\t// test left node\n\t\tif(this.hasLeftNode() && otherTree.hasLeftNode()) {\n\n\t\t\tthis.moveToLeftNode();\n\t\t\totherTree.moveToLeftNode();\n\n\t\t\tif(!rec_equals(otherTree))\n\t\t\t\treturn false;\n\n\t\t\tthis.moveToParentNode();\n\t\t\totherTree.moveToParentNode();\n\n\t\t} else if(this.hasLeftNode() || otherTree.hasLeftNode()){\n\t\t\treturn false;\n\t\t}\n\n\t\t// test right node\n\t\tif(this.hasRightNode() && otherTree.hasRightNode()) {\n\n\t\t\tthis.moveToRightNode();\n\t\t\totherTree.moveToRightNode();\n\n\t\t\tif(!rec_equals(otherTree))\n\t\t\t\treturn false;\n\n\t\t\tthis.moveToParentNode();\n\t\t\totherTree.moveToParentNode();\n\n\t\t} else if(this.hasRightNode() || otherTree.hasRightNode()){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t\t}\n\t}", "protected abstract boolean matchNode(CyNode n1, CyNode n2);", "private Comparison compareChildren(SimpleNode first, SimpleNode second) {\n List<SimpleNode> firstChildren = getChildren(first);\n List<SimpleNode> secondChildren = getChildren(second);\n\n // Compare the sizes.\n if (firstChildren.size() != secondChildren.size()) {\n return Comparison.notEqual(\"Num children differ: \" + firstChildren + \" vs \" + secondChildren);\n }\n\n // Look for an equivalent of each child, visiting each child recursively when needed.\n Comparison currentComparison = null;\n for (SimpleNode firstChild : firstChildren) {\n for (int i = 0; i < secondChildren.size(); i++) {\n SimpleNode secondChild = secondChildren.get(i);\n currentComparison = (Comparison) firstChild.jjtAccept(this, secondChild);\n if (currentComparison.isEqual()) {\n secondChildren.remove(i);\n break;\n }\n }\n\n if (!currentComparison.isEqual()) {\n return Comparison.notEqual(\"Did not find a matching child for \" + firstChild + \" in \" + secondChildren + \": \" + currentComparison.getReason());\n }\n }\n\n return Comparison.IS_EQUAL;\n }", "public boolean isIdentical(IdentityComparable other) {\n return other instanceof NodeName &&\n this.equals(other) &&\n this.getPrefix().equals(((NodeName) other).getPrefix());\n }", "public boolean areIdentical(BinaryNode<T> n1, BinaryNode<T> n2){\r\n if(n1 == null && n2 == null){ // If we reach the end of the trees at the same time, return true\r\n return true;\r\n }\r\n if(n1 == null || n2 == null){ // If we reach the end of the trees at different times, return false\r\n return false;\r\n }\r\n\r\n // Returns true if the nodes are equal and their left/right recursive calls on the subtrees are equal. Otherwise, returns false\r\n return n1.equals(n2) &&\r\n areIdentical(n1.getLeft(), n2.getLeft()) &&\r\n areIdentical(n1.getRight(), n2.getRight());\r\n }", "private static boolean isEqual(XmlComment lhsXMLComment, XmlValue rhsXml) {\n if (!(rhsXml instanceof XmlComment)) {\n return false;\n }\n XmlComment rhXMLComment = (XmlComment) rhsXml;\n return lhsXMLComment.getTextValue().equals(rhXMLComment.getTextValue());\n }", "public boolean isSameAs( PlanNode other ) {\n if (other == null) return false;\n if (this.getType() != other.getType()) return false;\n if (!ObjectUtil.isEqualWithNulls(this.nodeProperties, other.nodeProperties)) return false;\n if (!this.getSelectors().equals(other.getSelectors())) return false;\n if (this.getChildCount() != other.getChildCount()) return false;\n Iterator<PlanNode> thisChildren = this.getChildren().iterator();\n Iterator<PlanNode> thatChildren = other.getChildren().iterator();\n while (thisChildren.hasNext() && thatChildren.hasNext()) {\n if (!thisChildren.next().isSameAs(thatChildren.next())) return false;\n }\n return true;\n }", "public DCMComparisonResultType compare() {\n if (null == mSourceVersion || mSourceVersion.isEmpty()) {\n return DCMComparisonResultType.LOWER;\n }\n if (null == mDestinationVersion || mDestinationVersion.isEmpty()) {\n return DCMComparisonResultType.GREATER;\n }\n tokenize();\n for (int tokenIndex = 0; tokenIndex < mSourceTokens.length; ++tokenIndex) {\n if (!mSourceTokens[tokenIndex].equals(mDestinationTokens[tokenIndex])) {\n if (mSourceTokens[tokenIndex].compareTo(mDestinationTokens[tokenIndex]) > 0) {\n return DCMComparisonResultType.GREATER;\n } else {\n return DCMComparisonResultType.LOWER;\n }\n }\n }\n return DCMComparisonResultType.EQUAL;\n }", "public void testSameNode()\n {\n Node node = new Node(1,0);\n Node same = new Node(1,0);\n assertTrue(node.isSameNode(same));\n }", "protected boolean _isSameObject() {\n\t\t// try-catch for the \n\t\ttry {\n\t\t\t// the old line is null => parsing a new Gene has just started\n\t\t\tif ( _oldLine == null ) {\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\t\n\t\t\t// the two lines have different numbers of fields\n\t\t\telse if ( _oldLine.length != _line.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\telse if ( _oldLine.toString() == _line.toString() ) {\n\t\t\t\tEnvironment.debugMessage(\"Found duplicate line.\");\n\t\t\t\treturn true ;\n\t\t\t}\n\t\t\t\n\t\t\t// compare by HGNC Symbol\n\t\t\telse if ( _oldLine[ _hgncSymbolField ].equals(_line[ _hgncSymbolField ]) ) {\n\t\t\t\treturn true ;\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\treturn false ;\t\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEnvironment.errorMessage(\"Error with the input line !\");\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }", "boolean areMirror(Node a, Node b)\n{\n/* Base case : Both empty */\nif (a == null && b == null)\nreturn true;\n\n// If only one is empty\nif (a == null || b == null)\nreturn false;\n\n/* Both non-empty, compare them recursively\nNote that in recursive calls, we pass left\nof one tree and right of other tree */\nreturn a.data == b.data\n&& areMirror(a.left, b.right)\n&& areMirror(a.right, b.left);\n}", "protected boolean equalFileContents(FileObject file1, FileObject file2) throws HopFileException {\n // Really read the contents and do comparisons\n DataInputStream in1 = null;\n DataInputStream in2 = null;\n try {\n // Really read the contents and do comparisons\n\n in1 =\n new DataInputStream(\n new BufferedInputStream(HopVfs.getInputStream(HopVfs.getFilename(file1))));\n in2 =\n new DataInputStream(\n new BufferedInputStream(HopVfs.getInputStream(HopVfs.getFilename(file2))));\n\n char ch1;\n char ch2;\n while (in1.available() != 0 && in2.available() != 0) {\n ch1 = (char) in1.readByte();\n ch2 = (char) in2.readByte();\n if (ch1 != ch2) {\n return false;\n }\n }\n if (in1.available() != in2.available()) {\n return false;\n } else {\n return true;\n }\n } catch (IOException e) {\n throw new HopFileException(e);\n } finally {\n if (in1 != null) {\n try {\n in1.close();\n } catch (IOException ignored) {\n // Nothing to see here...\n }\n }\n if (in2 != null) {\n try {\n in2.close();\n } catch (Exception ignored) {\n // We can't do anything else here...\n }\n }\n }\n }", "public Boolean compare(Highlight theOtherHighlight){\n return myText.equals(theOtherHighlight.getText());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Post a price map to the exchange.
@ShellMethod("Post a price map to the exchange.") public void priceMapRegister() { FacilityPriceMap priceMap = promptForPriceMapFromList(); if (priceMap == null) { return; } if (shell.confirm( messageSource.getMessage("priceMap.register.confirm.ask", null, Locale.getDefault()))) { characteristicsService.registerPriceMap(priceMap); shell.printSuccess( messageSource.getMessage("priceMap.register.registered", null, Locale.getDefault())); } }
[ "@RequestMapping(\"/addprice\")\n\tpublic HashMap<String, Object> addPrice(@RequestBody Price p) {\n\t\tHashMap<String, Object> result = new HashMap<String, Object>();\n\t\tSystem.out.println(\"Got a request to add price: \" + p);\n\t\ttry {\n\t\t\tp.isValid();\n\t\t} catch (Exception ex) {\n\t\t\tresult.put(\"success\", \"0\");\n\t\t\tresult.put(\"message\", ex.getMessage());\n\t\t}\n\t\ttry {\n\t\t\tpriceService.addPrice(p);\n\t\t\tresult.put(\"success\", \"1\");\n\t\t\tresult.put(\"priceId\", p.getIdPrice());\n\t\t} catch (Exception e) {\n\t\t\tresult.put(\"success\", \"0\");\n\t\t\tresult.put(\"message\", e.getMessage());\n\t\t}\n\t\treturn result;\n\t}", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }", "public void setPrice(BigDecimal price);", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void storeGenericPrice() {\n\n String genericTotalPriceString = genericSearchResponse.path(\"data[0].category.rate.price\").toString();\n genericTotalPrice = Double.parseDouble(genericTotalPriceString);\n logger.info(\"Total Price in Generic Search is: \" + genericTotalPrice);\n }", "public void setPrice(double price)\n {\n setPriceOrder(price);\n }", "void priceUpdateBank(String symbol, double price);", "void priceUpdateThirdParty(String symbol, double price);", "public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }", "void updateParcelPrice(ParcelPrice parcelPrice);", "public Map publishTrade(TTradesPublishEntity tTradesPublishEntity);", "@Override\r\n public void storePrices() {\n \tDataStoreGP2 data = (DataStoreGP2) ds;\r\n \tdata.Rprice = data.temp_b;\r\n \tdata.Pprice = data.temp_c;\r\n \tdata.Sprice = data.temp_a;\r\n System.out.println(\"Gas Pump #2 activated successfully!!!\");\r\n }", "public void setPricePO(BigDecimal PricePO);", "public void setPrice(double price);", "public void setCustomPrices(final Map<Ware, Integer> customPrices)\n {\n this.customPrices.clear();\n this.customPrices.putAll(customPrices);\n }", "@Override\n\tpublic void StorePrice() {\n\t\t// TODO Auto-generated method stub\n\t\tint price = ds.getIntTemp_p();\n\t\tds.setPrice(price);\n\t\tSystem.out.println(\"Price of item \" + ds.getIntPrice());\n\t}", "public void setPriceList (BigDecimal PriceList);", "public void submitOrder() {\n int price = calculatePrice();\n String priceMessage = \"total is \" + price + \"\\n Thank you\";\n displayPrice(priceMessage);\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__S_Action__Group__2__Impl" $ANTLR start "rule__S_Action__Group__3" InternalGaml.g:7872:1: rule__S_Action__Group__3 : rule__S_Action__Group__3__Impl rule__S_Action__Group__4 ;
public final void rule__S_Action__Group__3() throws RecognitionException { int rule__S_Action__Group__3_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 434) ) { return ; } // InternalGaml.g:7876:1: ( rule__S_Action__Group__3__Impl rule__S_Action__Group__4 ) // InternalGaml.g:7877:2: rule__S_Action__Group__3__Impl rule__S_Action__Group__4 { pushFollow(FollowSets000.FOLLOW_27); rule__S_Action__Group__3__Impl(); state._fsp--; if (state.failed) return ; pushFollow(FollowSets000.FOLLOW_2); rule__S_Action__Group__4(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { if ( state.backtracking>0 ) { memoize(input, 434, rule__S_Action__Group__3_StartIndex); } restoreStackSize(stackSize); } return ; }
[ "public final void rule__Action__Group__3() 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:10061:1: ( rule__Action__Group__3__Impl rule__Action__Group__4 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10062:2: rule__Action__Group__3__Impl rule__Action__Group__4\r\n {\r\n pushFollow(FOLLOW_rule__Action__Group__3__Impl_in_rule__Action__Group__320862);\r\n rule__Action__Group__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Action__Group__4_in_rule__Action__Group__320865);\r\n rule__Action__Group__4();\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__Action__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:2124:1: ( rule__Action__Group__3__Impl rule__Action__Group__4 )\n // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:2125:2: rule__Action__Group__3__Impl rule__Action__Group__4\n {\n pushFollow(FOLLOW_rule__Action__Group__3__Impl_in_rule__Action__Group__34332);\n rule__Action__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Action__Group__4_in_rule__Action__Group__34335);\n rule__Action__Group__4();\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__Action__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1242:1: ( rule__Action__Group__3__Impl rule__Action__Group__4 )\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1243:2: rule__Action__Group__3__Impl rule__Action__Group__4\n {\n pushFollow(FOLLOW_rule__Action__Group__3__Impl_in_rule__Action__Group__32410);\n rule__Action__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Action__Group__4_in_rule__Action__Group__32413);\n rule__Action__Group__4();\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__Action__Group__3() 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:3049:1: ( rule__Action__Group__3__Impl rule__Action__Group__4 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3050:2: rule__Action__Group__3__Impl rule__Action__Group__4\n {\n pushFollow(FOLLOW_rule__Action__Group__3__Impl_in_rule__Action__Group__36010);\n rule__Action__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Action__Group__4_in_rule__Action__Group__36013);\n rule__Action__Group__4();\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__Action__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:11214:1: ( rule__Action__Group__3__Impl rule__Action__Group__4 )\n // InternalMyDsl.g:11215:2: rule__Action__Group__3__Impl rule__Action__Group__4\n {\n pushFollow(FOLLOW_107);\n rule__Action__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Action__Group__4();\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__Action__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:11226:1: ( ( ( rule__Action__Group_3__0 )* ) )\n // InternalMyDsl.g:11227:1: ( ( rule__Action__Group_3__0 )* )\n {\n // InternalMyDsl.g:11227:1: ( ( rule__Action__Group_3__0 )* )\n // InternalMyDsl.g:11228:2: ( rule__Action__Group_3__0 )*\n {\n before(grammarAccess.getActionAccess().getGroup_3()); \n // InternalMyDsl.g:11229:2: ( rule__Action__Group_3__0 )*\n loop73:\n do {\n int alt73=2;\n int LA73_0 = input.LA(1);\n\n if ( (LA73_0==120) ) {\n alt73=1;\n }\n\n\n switch (alt73) {\n \tcase 1 :\n \t // InternalMyDsl.g:11229:3: rule__Action__Group_3__0\n \t {\n \t pushFollow(FOLLOW_108);\n \t rule__Action__Group_3__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop73;\n }\n } while (true);\n\n after(grammarAccess.getActionAccess().getGroup_3()); \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__Action__Group_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:11349:1: ( rule__Action__Group_3__0__Impl rule__Action__Group_3__1 )\n // InternalMyDsl.g:11350:2: rule__Action__Group_3__0__Impl rule__Action__Group_3__1\n {\n pushFollow(FOLLOW_13);\n rule__Action__Group_3__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Action__Group_3__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__Action__Group_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:11376:1: ( rule__Action__Group_3__1__Impl )\n // InternalMyDsl.g:11377:2: rule__Action__Group_3__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Action__Group_3__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__AstAction__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:12417:1: ( rule__AstAction__Group__3__Impl rule__AstAction__Group__4 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:12418:2: rule__AstAction__Group__3__Impl rule__AstAction__Group__4\n {\n pushFollow(FOLLOW_rule__AstAction__Group__3__Impl_in_rule__AstAction__Group__325198);\n rule__AstAction__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstAction__Group__4_in_rule__AstAction__Group__325201);\n rule__AstAction__Group__4();\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__ActionType__Group__3() 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:15289:1: ( rule__ActionType__Group__3__Impl rule__ActionType__Group__4 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:15290:2: rule__ActionType__Group__3__Impl rule__ActionType__Group__4\r\n {\r\n pushFollow(FOLLOW_rule__ActionType__Group__3__Impl_in_rule__ActionType__Group__331159);\r\n rule__ActionType__Group__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__ActionType__Group__4_in_rule__ActionType__Group__331162);\r\n rule__ActionType__Group__4();\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__Action__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10030:1: ( rule__Action__Group__2__Impl rule__Action__Group__3 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10031:2: rule__Action__Group__2__Impl rule__Action__Group__3\r\n {\r\n pushFollow(FOLLOW_rule__Action__Group__2__Impl_in_rule__Action__Group__220800);\r\n rule__Action__Group__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Action__Group__3_in_rule__Action__Group__220803);\r\n rule__Action__Group__3();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Action__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:2093:1: ( rule__Action__Group__2__Impl rule__Action__Group__3 )\n // ../br.com.levysiqueira.dsl.textualusecase.ui/src-gen/br/com/levysiqueira/dsl/textualusecase/ui/contentassist/antlr/internal/InternalTextualUseCase.g:2094:2: rule__Action__Group__2__Impl rule__Action__Group__3\n {\n pushFollow(FOLLOW_rule__Action__Group__2__Impl_in_rule__Action__Group__24270);\n rule__Action__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Action__Group__3_in_rule__Action__Group__24273);\n rule__Action__Group__3();\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__S_Action__Group__2() throws RecognitionException {\n int rule__S_Action__Group__2_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 432) ) { return ; }\n // InternalGaml.g:7847:1: ( rule__S_Action__Group__2__Impl rule__S_Action__Group__3 )\n // InternalGaml.g:7848:2: rule__S_Action__Group__2__Impl rule__S_Action__Group__3\n {\n pushFollow(FollowSets000.FOLLOW_30);\n rule__S_Action__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Action__Group__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 432, rule__S_Action__Group__2_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Action__Group_6__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:9864:1: ( rule__Action__Group_6__3__Impl )\n // InternalMyDsl.g:9865:2: rule__Action__Group_6__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Action__Group_6__3__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__Action__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1213:1: ( rule__Action__Group__2__Impl rule__Action__Group__3 )\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1214:2: rule__Action__Group__2__Impl rule__Action__Group__3\n {\n pushFollow(FOLLOW_rule__Action__Group__2__Impl_in_rule__Action__Group__22350);\n rule__Action__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Action__Group__3_in_rule__Action__Group__22353);\n rule__Action__Group__3();\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__Action__Group_4__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1398:1: ( rule__Action__Group_4__3__Impl )\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1399:2: rule__Action__Group_4__3__Impl\n {\n pushFollow(FOLLOW_rule__Action__Group_4__3__Impl_in_rule__Action__Group_4__32721);\n rule__Action__Group_4__3__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__S_Definition__Group__3__Impl() throws RecognitionException {\n int rule__S_Definition__Group__3__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 417) ) { return ; }\n // InternalGaml.g:7605:1: ( ( ( rule__S_Definition__Group_3__0 )? ) )\n // InternalGaml.g:7606:1: ( ( rule__S_Definition__Group_3__0 )? )\n {\n // InternalGaml.g:7606:1: ( ( rule__S_Definition__Group_3__0 )? )\n // InternalGaml.g:7607:1: ( rule__S_Definition__Group_3__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_DefinitionAccess().getGroup_3()); \n }\n // InternalGaml.g:7608:1: ( rule__S_Definition__Group_3__0 )?\n int alt96=2;\n int LA96_0 = input.LA(1);\n\n if ( (LA96_0==123) ) {\n alt96=1;\n }\n switch (alt96) {\n case 1 :\n // InternalGaml.g:7608:2: rule__S_Definition__Group_3__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Definition__Group_3__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_DefinitionAccess().getGroup_3()); \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, 417, rule__S_Definition__Group__3__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Action__Group__2() 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:3020:1: ( rule__Action__Group__2__Impl rule__Action__Group__3 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:3021:2: rule__Action__Group__2__Impl rule__Action__Group__3\n {\n pushFollow(FOLLOW_rule__Action__Group__2__Impl_in_rule__Action__Group__25950);\n rule__Action__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Action__Group__3_in_rule__Action__Group__25953);\n rule__Action__Group__3();\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__Rules__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:8592:1: ( rule__Rules__Group__3__Impl rule__Rules__Group__4 )\n // InternalDsl.g:8593:2: rule__Rules__Group__3__Impl rule__Rules__Group__4\n {\n pushFollow(FOLLOW_16);\n rule__Rules__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Rules__Group__4();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Binds list, navigation and simple direct properties.
@SuppressWarnings("unchecked") private void bindBasics() { // bind the list JListBinding listBinding = SwingBindings.createJListBinding(UpdateStrategy.READ_WRITE, beanList, list); listBinding.setDetailBinding(BeanProperty.create("value")); listBinding.bind(); // bind the properties Validator notEmpty = new NotEmptyValidator(); BindingGroupBean context = new BindingGroupBean(); // bind the navigation to list selection context.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ, list, BeanProperty.create("selectedElement"), navigation, BeanProperty.create("selectedElement"))); Binding valueBinding = Bindings.createAutoBinding(UpdateStrategy.READ_WRITE, navigation, BeanProperty.create("selectedElement.value"), valueField, BeanProperty.create("text")); valueBinding.setSourceUnreadableValue(null); context.addBinding(valueBinding); valueBinding.setValidator(notEmpty); Binding activityBinding = Bindings.createAutoBinding(UpdateStrategy.READ_WRITE, navigation, BeanProperty.create("selectedElement.active"), activityBox, BeanProperty.create("selected")); activityBinding.setSourceUnreadableValue(Boolean.FALSE); context.addBinding(activityBinding); context.bind(); BindingGroup bufferingContext = new BindingGroup(); bufferingContext.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ, context, BeanProperty.create("dirty"), uncommittedBox, BeanProperty.create("selected"))); bufferingContext.bind(); }
[ "@Test\r\n public void testListPropertyBindingToListProperty() {\r\n ObservableList<String> list = createObservableList(true);\r\n ListProperty<String> p1 = new SimpleListProperty<>(list);\r\n ListProperty<String> p2 = new SimpleListProperty<>(list);\r\n p2.bind(p1);\r\n assertSame(\"sanity, same list bidi-bound\", list, p2.get());\r\n ObservableList<String> other = createObservableList(true);\r\n ChangeReport report = new ChangeReport(p2);\r\n p1.set(other);\r\n assertEquals(\"RT-38770 - bind 2 ListProperties\", 1, report.getEventCount());\r\n }", "public void bind(PropertyList pList) throws FOPException {\n }", "@Test\r\n public void testListValuedObjectPropertyBoundTo() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> property = new SimpleObjectProperty<>(list);\r\n ListProperty listProperty = new SimpleListProperty();\r\n listProperty.bind(property);\r\n \r\n ChangeReport report = new ChangeReport(listProperty);\r\n property.set(createObservableList(true));\r\n assertEquals(\"supported: listProperty bound to listValued property fires change event\", \r\n 1, report.getEventCount());\r\n ListChangeReport lr = new ListChangeReport(listProperty);\r\n property.get().remove(0);\r\n assertEquals(1, lr.getEventCount());\r\n }", "PropertyList createPropertyList();", "public static MemberListBinding listBind(Member member, Iterable<ElementInit> elementInits) { throw Extensions.todo(); }", "public PropertyRegister() {\r\n this.properyList = new ArrayList<>();\r\n }", "public static MemberListBinding listBind(Member member, ElementInit[] elementInits) { throw Extensions.todo(); }", "protected abstract List<Property> getInputAdaptorProperties();", "public String prepareList() {\n recreateModel();\n return \"List\";\n }", "public MPropertyDescriptorList()\n\t{\n//\t\tthis.setUseByName(true);\n\t\tinitialize();\n\t}", "@Test\r\n public void testListPropertyAdapterSetEqualListOnObjectProperty() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> objectProperty = new SimpleObjectProperty<>(list);\r\n ListProperty<String> listProperty = listProperty(objectProperty);\r\n ObservableList<String> otherList = createObservableList(true);\r\n ChangeReport report = new ChangeReport(listProperty);\r\n objectProperty.set(otherList);\r\n assertEquals(\"must fire change on setting list to objectProperty\", 1, report.getEventCount());\r\n }", "private void embedBindingProperties() {\n SourceInfo sourceInfo = SourceOrigin.UNKNOWN;\n\n // Generates a list of lists of pairs: [[[\"key\", \"value\"], ...], ...]\n // The outermost list is indexed by soft permutation id. Each item represents\n // a map from binding properties to their values, but is stored as a list of pairs\n // for easy iteration.\n JsArrayLiteral permutationProperties = new JsArrayLiteral(sourceInfo);\n for (Map<String, String> propertyValueByPropertyName :\n properties.findEmbeddedProperties(TreeLogger.NULL)) {\n JsArrayLiteral entryList = new JsArrayLiteral(sourceInfo);\n for (Entry<String, String> entry : propertyValueByPropertyName.entrySet()) {\n JsArrayLiteral pair = new JsArrayLiteral(sourceInfo,\n new JsStringLiteral(sourceInfo, entry.getKey()),\n new JsStringLiteral(sourceInfo, entry.getValue()));\n entryList.getExpressions().add(pair);\n }\n permutationProperties.getExpressions().add(entryList);\n }\n\n getGlobalStatements().add(\n constructInvocation(sourceInfo, \"ModuleUtils.setGwtProperty\",\n new JsStringLiteral(sourceInfo, \"permProps\"), permutationProperties).makeStmt());\n }", "public SimpleListValueModel(List<E> list) {\r\n\t\tsuper();\r\n\t\tif (list == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tthis.list = list;\r\n\t}", "public SimpleListValueModel() {\r\n\t\tthis(new ArrayList<E>());\r\n\t}", "Map<String, Object> listBindings();", "private Callable createListToObjectBinding(ListProperty<P> listProperty) {\n return () -> {\n if (!isListChange() && listProperty.get() != null && listProperty.get().size() != 0) {\n return listProperty.get().get(0);\n }\n return null;\n };\n }", "public LiveData<List<Model>> getItemAndPersonList() {\n return itemAndPersonList;\n }", "public ListViewModel(Application application) {\n super(application);\n\n appDatabase = AppDatabase.getDatabase(this.getApplication());\n\n itemAndPersonList = appDatabase.itemAndPersonModel().getAllItems();\n }", "@Test\r\n public void testListProperty() {\r\n ObservableList<String> list = createObservableList(true);\r\n ListProperty<String> property = new SimpleListProperty<>(list);\r\n ChangeReport report = new ChangeReport(property);\r\n property.set(createObservableList(true));\r\n assertEquals(\"listProperty must fire on not-same list\", 1, report.getEventCount());\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
========================================================================== == Methods ========================================================================== Constructor to create a new multidef object. This version takes its information from a symbol that it will be replacing. This is just a convenience form of the real constructor that takes a Definition as the base for the new MultiDef
MultiDef(String name, // the name of the definition Definition oldDef) { // a standing def with its name this(name, oldDef.getOccurrence(), oldDef.getParentScope()); }
[ "MultiDef(String name, // the name of the definition\n Occurrence occ, // where it was defined\n ScopedDef parentScope) { // the overall symbol table\n super(name, occ, parentScope);\n \n // Create the list to store the definitions\n defs = new JavaVector();\n }", "@Override\n public void define(Symbol symbol) {\n }", "Definition createDefinition();", "MConstructorDefinition createMConstructorDefinition();", "public DefinitionsImpl() {\n baseDefinitions = new HashMap<String, Definition>();\n localeSpecificDefinitions =\n new HashMap<Locale, Map<String, Definition>>();\n }", "public void createNewSymbol(String name);", "public StructuralSymbol (String n) {\n\t \t\n\t \tsuper (n);\n\t \tkind = 0;\n\t \t\n\t}", "@Override\n public Component getInstance(ComponentDef def, Map<String, Object> attributes) throws QuickFixException {\n return new ComponentImpl(def.getDescriptor(), attributes);\n }", "public Prefix(String symbol)\n {\n \tthis(symbol, PrefixUsageTypes.DefaultUsage);\n }", "public Symbol(String _name) {\n\t\tsetName(_name);\n\t}", "private Symbol() {}", "private Symbol(String label, int numArgs)\n {\n this.label = label;\n this.numArgs = numArgs;\n }", "@Override\n public void add(Symbol symbol) {\n\n super.add(symbol);\n\n Symbol_MultiPart multiPartSymbol = (Symbol_MultiPart) symbol;\n\n multiPart_Index_ByID.put(new Integer(multiPartSymbol.ID), multiPartSymbol);\n\n multiPart_Index_ByMultiPartName.put(multiPartSymbol.name_MultiPart, multiPartSymbol);\n multiPart_Index_ByName.put(multiPartSymbol.name, multiPartSymbol);\n multiPart_Index_ByName_IdentFormat.put(multiPartSymbol.name_IdentFormat, multiPartSymbol);\n\n multiPart_List.add(multiPartSymbol);\n\n singleAndMultiPart_SymbolIndex_ByID.put(new Integer(symbol.ID), symbol);\n\n\n }", "static void initialize(SymbolControl symbol_Control) throws Exception_InvalidArgumentPassed_Null, Exception_InvalidArgumentPassed {\n\n symbolControl = symbol_Control;\n multiLevelSymbol_Factory = symbolControl.multiLevelSymbol_Factory;\n\n\n\t\tboolean creation_Has_StaticVersion = true;\n\n\n\n\t\t// Descriptor Tag, Multi-Level Symbols _________________________________________________________________________\n // Schema For SchemaForSchema\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA$_CC_$SCHEMA = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.SCHEMA, creation_Has_StaticVersion);\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA$_CC_$DESCRIPTOR = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.DESCRIPTOR, creation_Has_StaticVersion);\n\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA$_CC_$FIELD$__$NAMES = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.FIELD$__$NAMES, creation_Has_StaticVersion);\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA$_CC_$FIELD$__$TYPES = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$$95$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.FIELD$__$TYPES, creation_Has_StaticVersion);\n\n\n // SchemaForSchema\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$SCHEMA = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.SCHEMA, creation_Has_StaticVersion);\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$DESCRIPTOR = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.DESCRIPTOR, creation_Has_StaticVersion);\n\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$ITEM = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.ITEM, creation_Has_StaticVersion);\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$MATRIX = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.MATRIX, creation_Has_StaticVersion);;\n\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$FIELD$__$NAMES = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.FIELD$__$NAMES, creation_Has_StaticVersion);\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$FIELD$__$TYPES = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.FIELD$__$TYPES, creation_Has_StaticVersion);\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$FIELD$__$DESC = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.FIELD$__$DESC, creation_Has_StaticVersion);\n net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_CC_$FIELD$__$DEFAULTS = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA, MPSymbols_DescTagName.FIELD$__$DEFAULTS, creation_Has_StaticVersion);\n\n \n\n\n net$__$unconventionalthinking$__$matrix$_CC_$MATRIX$__$BASE$_CC_$MATRIX = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$MATRIX$__$BASE, MPSymbols_DescTagName.MATRIX, creation_Has_StaticVersion);\n\n net$__$unconventionalthinking$__$matrix$_CC_$MATRIX$__$STANDARD$_CC_$ITEM = multiLevelSymbol_Factory.createNew_DescriptorTag(\n MPSymbols_SchemaName.net$__$unconventionalthinking$__$matrix$_CC_$MATRIX$__$STANDARD, MPSymbols_DescTagName.ITEM, creation_Has_StaticVersion);\n\n \n have_Intialized = true;\n\n\t}", "private Symbol(String label)\n {\n this.label = label;\n this.numArgs = 0;\n }", "CompositeDefinition createCompositeDefinition();", "definitions createdefinitions();", "BuiltinDefinition createBuiltinDefinition();", "Var_Def createVar_Def();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public String max() Returns the info of the item with the largest key in the tree, or null if the tree is empty
public String max()// return the value of the maximum key in the tree { if(empty()) { return null; } WAVLNode x = root; while(x.right!=EXT_NODE) { x=x.right; } return x.info; }
[ "public String max() {\n\t\tif (this.empty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn treeMax(this.root).getValue();\n\t}", "public String getHighestChromKey(){\n if(childItems.size() > 0)\n return highestChromKey;\n else\n return null;\n }", "public int findMax() {\n if (root == null) {\n return -1;\n }\n\n TreeNode temp = FindMax(root);\n\n return (temp.deleted == false) ? temp.key : -1;\n }", "public Comparable findMax()\n\t{\n\t\tif( isEmpty() )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tRedBlackTreeNode itr = header.right;\n\n\t\twhile( itr.right != nullNode )\n\t\t{\n\t\t\titr = itr.right;\n\t\t}\n\n\t\treturn itr.data;\n\t}", "public DataItem largest() {\n\t\tif(largestNode(root) != null) {\n\t\t\treturn largestNode(root).getDataItem();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public KeyValuePair<T,U> maximum() {\n KeyValuePair<T,U> temp = root;\n while(temp.right != null) \n temp = temp.left;\n return temp;\n }", "public Comparable findMax() throws ItemNotFoundException {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new ItemNotFoundException(\"RedBlackTree findMax\");\r\n\r\n\t\tBinaryNode itr = header.right;\r\n\r\n\t\twhile (itr.right != nullNode)\r\n\t\t\titr = itr.right;\r\n\r\n\t\treturn itr.element;\r\n\t}", "public E findMax() {\n Node<E> temp = root;\n // while loop will run until there is no longer a node that has a right child.\n // temp is then assigned to the next node in the right child and will return\n // the node with the maximum value in the BST. The node that does not have a right\n // child will be the maximum value.\n while(temp.right != null){\n temp = temp.right;\n }\n return temp.getInfo();\n }", "public String getMaxKey() {\n if (list.isEmpty()) {\n return \"\";\n }\n return v.get(list.getFirst()).iterator().next();\n }", "public E max(){\n \t \n \t \n \t \n \t BSTNode<E> temp = root; \t \n \t while(temp.getRight() != null)\n \t\t temp = temp.getRight();\n \t \n \t return temp.getValue();\n }", "public Key max() {\n if (isEmpty()) throw new NoSuchElementException(\"calls max() with empty symbol table\");\n return max(root).key;\n }", "public Key max() {\n if (isEmpty()) throw new NoSuchElementException(\"called max() with empty symbol table\");\n return max(root).key;\n }", "private AnyType findMax(Node<AnyType> root)\n\t{\n\n\t\t// Loop until we find the right-most node, which will contain the high value object\n\t\twhile (root.right != null)\n\t\t{\n\t\t\troot = root.right;\n\t\t}\n\n\t\treturn root.data;\n\t}", "public String getMaxKey();", "public T findMax() throws EmptyCollectionException \n {\n T result = null;\n\n if (isEmpty())\n throw new EmptyCollectionException (\"binary tree\");\n else {\n int currentIndex = 0;\n while ((currentIndex*2+2 <= maxIndex) && (tree[currentIndex*2+2] != null))\n currentIndex = currentIndex*2+2;\n result = tree[currentIndex] ;\n }\n return result;\n }", "private T getItemWithLargestSearchKey(BinaryNode<T> node) {\r\n\t// if no right child, then this node contains the largest item\r\n\t\t if (node.getRightChild() == null) {\r\n\t\t\t return node.getData();\r\n\t\t }\r\n\t\t // if not, keep looking on the right\r\n\t\t else {\r\n\t\t\t return this.getItemWithLargestSearchKey(node.getRightChild());\r\n\t\t }\r\n\t}", "public Key max ()\n\t{\n\t\tif (isEmpty())\n\t\t\tthrow new NoSuchElementException(\"Priority queue underflow\");\n\t\treturn pq[1];\n\t}", "public String extractMax(){\n\t\tString maxValue = queueArray[1][1];\n\t\t\n\t\tremove();\n\t\tmove();\n\t\t\n\t\treturn maxValue;\n\t}", "public long getHighestChildNumber() {\n\t\treturn children.keySet().stream().mapToLong(l -> l).max().orElse(0);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find all trainingssession of a corresponding plan_interClassCommunication
List<TrainingsSession> searchByPlanID(int ID_plan) throws PersistenceException;
[ "public List<TrainingPlanning> obtainPlannedAttendenceTrainingSession(Long trainingsessionId);", "List<Training> obtainAllTrainings();", "ai.visma.asgt.v2.type.Training getTrainings(int index);", "java.util.List<ai.visma.asgt.v2.type.Training> \n getTrainingsList();", "public List<Training> getAllTrainings();", "public void printTrainersPerCourse() {\n Map<Course, List<Trainer>> trainersPerCourse = new HashMap<>();\n if (con != null){\n try (Statement stm = con.createStatement();\n ResultSet rs = stm.executeQuery(\"SELECT c.course_id as courseId, c.title as course,\\n\" +\n \"t.trainer_id as trainerId, t.first_name as fname, t.last_name as lname\\n\" +\n \"FROM trainers_per_course tp\\n\" +\n \"INNER JOIN trainers t \\n\" +\n \"ON t.trainer_id = tp.trainer_id\\n\" +\n \"INNER JOIN courses c \\n\" +\n \"ON c.course_id = tp.course_id\\n\" +\n \"order by c.course_id;\")) {\n while(rs.next()){\n Trainer trainer = new Trainer(rs.getInt(\"trainerId\"), rs.getString(\"fname\"), rs.getString(\"lname\"));\n Course course = new Course(rs.getInt(\"courseId\"), rs.getString(\"course\"));\n List<Trainer> trainers = new ArrayList<>();\n if (trainersPerCourse.containsKey(course)) {\n trainers = trainersPerCourse.get(course);\n trainers.add(trainer);\n } else {\n trainers.add(trainer);\n }\n trainersPerCourse.put(course, trainers);\n } for (Map.Entry<Course,List<Trainer>> entry : trainersPerCourse.entrySet())\n System.out.println(\"COURSE: \\nId: \" + entry.getKey().getId() + \", \" + \"Title: \" + entry.getKey().getTitle() + \n \"\\nTRAINERS ASSIGNED TO COURSE:\\n\" + entry.getValue().toString() + \"\\n\");\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n } \n }", "List<Train> getTrains(String station);", "List<TrainingsSession> searchByUser(User user) throws PersistenceException;", "TrainingSession obtainTrainingSessionById(Long trainingsessionId);", "public void selectTrainInstances(){\r\n if (existsTrainSet())\r\n m_Instances = m_TrainInstances;\r\n }", "public List<Training> getAllToStartOfInstitution(Institution institution);", "Sm.Session getSessions(int index);", "List<Trainer> getAllTrainers();", "java.util.List<? extends ai.visma.asgt.v2.type.TrainingOrBuilder> \n getTrainingsOrBuilderList();", "Set<Testcase> getAllTestCases(Long testplanID);", "List<TrainingsCategory> getAllTrainingstype() throws PersistenceException;", "@Override\n public List<Training> getUserTrainings(String userLogin) {\n log.info(\"User trainings were send\");\n List<Training> trainings = new ArrayList<>();\n for (UUID id : userRepository.findByEmail(userLogin).get().getPurchasedTrainings()) {\n trainings.add(trainingRepository.findById(id).get());\n }\n return trainings;\n }", "public void printTrainers() {\n List<Trainer> trainers = new ArrayList<>();\n if (con != null){\n try (Statement stm = con.createStatement();\n ResultSet rs = stm.executeQuery(\"SELECT * FROM trainers\")) {\n while (rs.next()){\n String trSubject = (rs.getString(4)!= null) ? rs.getString(4) : null;\n Trainer tr = new Trainer(rs.getInt(1), rs.getString(2), rs.getString(3), trSubject);\n trainers.add(tr);\n }\n System.out.println(trainers);\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n }", "List<Turn> findActiveTurnsByRoundId(int roundId);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if the GetAllToDoItemsEmailContent method returns correct results when there are selected items in the database, and the report is printed for one list only
public void testGetAllToDoItemsEmailContentWithSelectedItems_activityIdSet() { // arrange Uri listUri = helper.insertNewList("testlist"); int listId = Integer.parseInt(listUri.getPathSegments().get(1)); Uri categoryUri = helper.insertNewCategory(listId, "dudus", 1); int categoryId = Integer.parseInt(categoryUri.getPathSegments().get(1)); helper.insertNewItem(categoryId, "item1", true, 0); helper.insertNewItem(categoryId, "item2", true, 1); helper.insertNewItem(categoryId, "item3", false, 2); // Act & Assert Spanned reportText = service.getAllToDoItemsEmailContent(new Long(listId)); assertEquals(33, reportText.length()); }
[ "public void testGetAllToDoItemsEmailContentWithSelectedItems()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tint categoryId = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\thelper.insertNewItem(categoryId, \"item1\", true, 0);\n\t\thelper.insertNewItem(categoryId, \"item2\", true, 1);\n\t\thelper.insertNewItem(categoryId, \"item3\", false, 2);\n\n\t\t// Act & Assert\n\t\tSpanned reportText = service.getAllToDoItemsEmailContent(null);\n\n\t\tassertEquals(33, reportText.length());\n\t}", "public void testGetAllToDoItemsEmailContentWithNoSelectedItems()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tint categoryId = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\thelper.insertNewItem(categoryId, \"item1\", false, 0);\n\t\thelper.insertNewItem(categoryId, \"item2\", false, 1);\n\t\thelper.insertNewItem(categoryId, \"item3\", false, 2);\n\n\t\t// Act & Assert\n\t\tSpanned reportText = service.getAllToDoItemsEmailContent(null);\n\n\t\tassertEquals(0, reportText.length());\n\t}", "public void testGetAllToDoItemsEmailContentWithSelectedItems_activityIdSet_NothingPrinted()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tint categoryId = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\thelper.insertNewItem(categoryId, \"item1\", false, 1);\n\t\thelper.insertNewItem(categoryId, \"item2\", false, 2);\n\t\thelper.insertNewItem(categoryId, \"item3\", false, 3);\n\n\t\t// Act & Assert\n\t\tSpanned reportText = service.getAllToDoItemsEmailContent(new Long(listId));\n\n\t\tassertEquals(0, reportText.length());\n\t}", "@Override\n public ArrayList<String> getToDoItems() {\n return toDoItems;\n }", "@Override\r\n\t public List<Item> getItems(String userEmail) throws ToDoListDAOException {\n \t \r\n\t\t\tSession session = factory.openSession();\r\n\t\t\ttry {\r\n\t\t\t\tQuery query = session.createQuery(\"from Item i WHERE i.email = '\"+ userEmail +\"'\");\r\n\t\t\t\tList queryList = query.list();\r\n\t\t\t\tSystem.out.println(\"from dao\" + queryList);\r\n\t\t\t\tif(queryList != null && queryList.isEmpty())\r\n\t\t\t\t\treturn (List<Item>)queryList;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn (List<Item>)queryList;\r\n\t\t\t}\r\n\t\t\tcatch ( HibernateException e ) {\r\n\t\t\t\tthrow new ToDoListDAOException(\"Unable to get task list from the database\");\r\n\t\t\t} finally {\r\n\t\t\t\tif (session != null)\r\n\t\t\t\t\tsession.close(); \r\n\t\t\t} \r\n\t\t}", "public void testMarkAllItemsSelected()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelected(2l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item6\").getIsSelected());\t\t\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelected(2l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\t\n\t}", "@Test (description = \"Testing if all receipts can be selected\")\n public void selectAllReceipts() {\n\n extentLogger = report.createTest(\"Testing if all receipts can be selected\");\n commonSteps(extentLogger);\n\n extentLogger.info(\"Checking if select all References is clickable\");\n Assert.assertTrue(BrowserUtilities.isClickable(pages.receiptsMyCompanyChicago().referencesButton));\n }", "private List<ToDoItem> refreshItemsFromMobileServiceTable() throws ExecutionException, InterruptedException {\n return mToDoTable.where().field(\"complete\").\n eq(val(false)).execute().get();\n }", "public void test_findItems() throws Exception {\r\n Date now = new Date();\r\n addMessage(\"1\", \"first category\", \"first content type\", now, \"first message\");\r\n addMessage(\"2\", \"second category\", \"second content type\", now, \"second message\");\r\n\r\n final Filter filter = new EqualToFilter(\"guid\", \"1\");\r\n\r\n RSSItem[] items = store.findItems(new SearchCriteria() {\r\n public Filter getSearchFilter() {\r\n return filter;\r\n }\r\n });\r\n\r\n assertEquals(\"there should be 1 item\", 1, items.length);\r\n\r\n // GUID\r\n assertEquals(\"ID should be guid\", \"1\", items[0].getId());\r\n\r\n // category\r\n RSSCategory[] categories = items[0].getCategories();\r\n assertEquals(\"there should be 1 category\", 1, categories.length);\r\n assertEquals(\"the category name should be category\", \"first category\", categories[0].getName());\r\n\r\n // content type\r\n assertEquals(\"the link should be type content type\", \"first content type\",\r\n items[0].getSelfLink().getMimeType());\r\n\r\n // content\r\n assertEquals(\"the description should equal content\", \"first message\",\r\n items[0].getDescription().getElementText());\r\n }", "private void displayUrgent(ToDoList toDoList) {\n int i = 1;\n\n System.out.println(\"Urgent Items:\");\n\n for (Item item : toDoList.getItems()) {\n if (Integer.parseInt(item.getDaysBeforeDue()) <= 1) {\n Categories c = item.getCategory();\n System.out.println(i + \". \" + item.getTitle() + \" due in \" + item.getDaysBeforeDue() + \" days, \" + c);\n i++;\n }\n }\n }", "public void verifyTodoCompleteFrontend(String toDoName, String status) {\n try {\n Thread.sleep(smallTimeOut);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //TODO move xpath to properties file\n WebElement toDoRow = getDriver()\n .findElement(By.xpath(\"//input[@class='newTodoInput'][@value='\" + toDoName + \"']/ancestor::tr[contains(@class,'newRow')]\"));\n WebElement toDoCategory = getDriver().findElement(By.xpath(\n \"//input[@class='newTodoInput'][@value='\" + toDoName + \"']/ancestor::tr[contains(@class,'newRow')]//div[contains(@class,'ui dropdown category')]\"));\n WebElement toDoClient = getDriver().findElement(By.xpath(\n \"//input[@class='newTodoInput'][@value='\" + toDoName + \"']/ancestor::tr[contains(@class,'newRow')]//div[contains(@class,'ui dropdown client')]\"));\n WebElement toDoAuditor = getDriver().findElement(By.xpath(\n \"//input[@class='newTodoInput'][@value='\" + toDoName + \"']/ancestor::tr[contains(@class,'newRow')]//div[contains(@class,'ui dropdown auditor')]\"));\n\n if (status.equals(\"true\")) {\n getLogger().info(\"Verify Completed To-Do front-end\");\n if ((toDoRow.getAttribute(\"class\").endsWith(\"todoCompleted\")) && (toDoCategory.getAttribute(\"class\").endsWith(\"disabled\")) && (toDoClient\n .getAttribute(\"class\").endsWith(\"disabled\")) && (toDoAuditor.getAttribute(\"class\").endsWith(\"disabled\"))) {\n NXGReports.addStep(\"Verify Completed To-Do front-end\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify Completed To-Do front-end\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } else {\n getLogger().info(\"Verify not Completed To-Do front-end\");\n if ((!toDoRow.getAttribute(\"class\").endsWith(\"todoCompleted\")) && (!toDoCategory.getAttribute(\"class\")\n .endsWith(\"disabled\")) && (!toDoClient.getAttribute(\"class\").endsWith(\"disabled\")) && (!toDoAuditor.getAttribute(\"class\")\n .endsWith(\"disabled\"))) {\n NXGReports.addStep(\"Verify not Completed To-Do front-end\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify not Completed To-Do front-end\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }\n }", "public void sendMailReport() {\n mailService.sendMail(\"users@example.org\", \"ToDo report\",\n String.format(\"There are '%s' todo entries!\", todoListService.getAllEntries().size()));\n }", "@Test\n public void testGetItems() {\n ArrayList<ToDoItem> ar = model.getItems();\n assertEquals(\"testGetItems length of ArrayList\", 5, ar.size());\n }", "public void selectItemsAndContinueToSubmitPage() {\n orderItems = orderItemDetails();\n selectedLineItem = (Map<String, Object>) ((List) orderItems.get(\"orderLineItemList\")).get(new Random().nextInt(((List) orderItems.get(\"orderLineItemList\")).size()));\n if (selectedLineItem.get(\"reasonForReturnDescription\").getClass() == ArrayList.class) {\n ((List) selectedLineItem.get(\"reasonForReturnDescription\")).remove(0);\n }\n if (Elements.elementPresent(\"return_selection.scheduled_date\")) {\n orderItems.put(\"PickUpDate\", DropDowns.getSelectedValue(By.id(\"rmPickupDate\")));\n orderItems.put(\"PickUpTime\", DropDowns.getSelectedValue(By.id(\"rmPickupTime\")));\n }\n productName = selectedLineItem.get(\"itemDescription\");\n Map<String, Object> item = new HashMap<>();\n item.put(\"upcId\", selectedLineItem.get(\"upcId\"));\n item.put(\"quantity\", \"1\");\n if (selectedLineItem.get(\"reasonForReturnDescription\").getClass() == ArrayList.class) {\n item.put(\"reasonForReturn\", ((List) selectedLineItem.get(\"reasonForReturnDescription\")).get(new Random().nextInt(((List) selectedLineItem.get(\"reasonForReturnDescription\")).size())));\n } else {\n item.put(\"reasonForReturn\", selectedLineItem.get(\"reasonForReturnDescription\"));\n }\n itemsSelected = new ArrayList<>();\n itemsSelected.add(item);\n logger.info(\"Select items to return\");\n selectItemsAndContinue(itemsSelected, returnOrderDetails);\n if (safari()) {\n Wait.secondsUntilElementPresent(\"return_submit.submit_return\", 15);\n }\n Wait.forPageReady();\n logger.info(\"Verify user is on returns submit page\");\n if (!onPage(\"return_submit\")) {\n Assert.fail(\"User is not navigated to return submission page!!\");\n }\n }", "public void verifyEmptyToDoList() {\n getLogger().info(\"Verify empty todo list\");\n if (verifyEmptyToDoImage()) {\n NXGReports.addStep(\"All ToDo deleted, Image Empty exist\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"Fail: Delete all fail, Image Empty not exist\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public TodoItem processResults() {\n String shortDescription;\n String itemDetails;\n LocalDate itemDeadline;\n\n // trim to remove any extra white spaces\n if(shortDescriptionField.getText().isEmpty()) {\n shortDescription = \"Nothing Entered By User\";\n } else {\n shortDescription = shortDescriptionField.getText().trim();\n }\n\n if(itemDetailsText.getText().isEmpty()) {\n itemDetails = \"Nothing Entered By User\";\n } else {\n itemDetails = itemDetailsText.getText().trim();\n }\n\n if(itemDeadlineDate.getValue() == null) {\n itemDeadline = LocalDate.now();\n } else {\n itemDeadline = itemDeadlineDate.getValue();\n }\n\n // create the new item\n TodoItem newTodoItem = new TodoItem(shortDescription, itemDetails, itemDeadline);\n\n // add the new item\n TodoData.getInstance().addTodoItem(newTodoItem);\n // return the new item\n return newTodoItem;\n }", "void displayNoItemsSelectedErrorMessage();", "@Override\n public void printThingsToDo() {\n for (int i = 0; i < toDoItems.size(); i++) {\n System.out.println(toDoItems.get(i));\n }\n }", "public boolean checkAllToDoIsDelete() {\n if (!checkListIsEmpty(eleToDoRowList) || !checkListIsEmpty(eleToDoCompleteRowList)) {\n return false;\n }\n return true;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the specified animation facet is allowed on the specified component.
public static boolean isAnimationAllowed(RadianceThemingSlices.AnimationFacet animationFacet) { return AnimationConfigurationManager.getInstance().isAnimationAllowed(animationFacet, null); }
[ "public static boolean isAnimationAllowed(Component comp, RadianceThemingSlices.AnimationFacet animationFacet) {\n if (comp == null) {\n throw new IllegalArgumentException(\"Component scope APIs do not accept null components\");\n }\n return AnimationConfigurationManager.getInstance().isAnimationAllowed(animationFacet,\n comp);\n }", "public static void allowAnimations(Component comp, RadianceThemingSlices.AnimationFacet animationFacet) {\n if (comp == null) {\n throw new IllegalArgumentException(\"Component scope APIs do not accept null components\");\n }\n AnimationConfigurationManager.getInstance().allowAnimations(animationFacet, comp);\n }", "public static boolean shouldRenderFacet(UIComponent facet) {\n return shouldRenderFacet(facet, false);\n }", "public boolean checkComponents(final IEntity entity);", "public static void allowAnimations(RadianceThemingSlices.AnimationFacet animationFacet) {\n AnimationConfigurationManager.getInstance().allowAnimations(animationFacet);\n }", "boolean hasTriggeredAnimation();", "boolean isVisibleTo(IComponent comp);", "public static void disallowAnimations(Component comp, RadianceThemingSlices.AnimationFacet animationFacet) {\n if (comp == null) {\n throw new IllegalArgumentException(\"Component scope APIs do not accept null components\");\n }\n AnimationConfigurationManager.getInstance().disallowAnimations(animationFacet, comp);\n }", "public static boolean shouldRenderFacet(UIComponent facet, boolean alwaysRender) {\n // no facet declared at all or facet without any content\n if (facet == null) {\n return false;\n }\n\n // user wants to always render this facet so it can be updated\n if (alwaysRender) {\n return true;\n }\n\n // the facet contains multiple childs, so its wrapped inside a UIPanel\n // NOTE: we need a equals check as instanceof would also catch e.g. p:dialog\n if (facet.getClass().equals(UIPanel.class)) {\n // For any future version of JSF where the f:facet gets a rendered attribute\n if (!facet.isRendered()) {\n return false;\n }\n\n // check all childs - if all of them are rendered=false, we skip rendering the whole facet\n return shouldRenderChildren(facet);\n }\n\n // the facet contains only one child now, which means that the facet is the child component\n // we dont want to check children, just if the component is rendered=true\n return facet.isRendered();\n }", "public abstract boolean canAnimate();", "public boolean hasChildComponent(Widget component) {\n return locationToWidget.containsValue(component);\n }", "public boolean hasComponentChange(IComponentChange componentChangeToCheck);", "@Override\n public boolean hasComponent(LightingItem item) {\n String errorContext = \"Group.hasComponent() error\";\n return postInvalidArgIfNull(errorContext, item) ? hasLampID(item.getId()) || hasGroupID(item.getId()) : false;\n }", "public boolean isAssetValid(T asset);", "private boolean hasChildren(UIComponent component) {\r\n return (component.getChildCount() != 0);\r\n }", "private boolean hasAnimation() {\n return (mFeatureAnimationMode == FEATURE_ANIMATION_START ||\n mFeatureAnimationMode == FEATURE_ANIMATION_END);\n }", "public static boolean shouldRenderChildren(UIComponent component) {\n for (int i = 0; i < component.getChildCount(); i++) {\n if (component.getChildren().get(i).isRendered()) {\n return true;\n }\n }\n\n return false;\n }", "public boolean canPerform(Phase arg0) throws PhaseHandlingException {\r\n return false;\r\n }", "public boolean checkIfSubJobHasTransformOrUnionAllComponent(Component component) {\n\t\tboolean containsTransformOrUnionAllComponent=false;\n\t\tContainer container=(Container)component.getSubJobContainer().get(Constants.SUBJOB_CONTAINER);\n\t\t\n\t\tif(container!=null)\n\t\t{\n\t\tfor(Object object:container.getChildren())\n\t\t{\n\t\t\tif(object instanceof Component)\n\t\t\t{\n\t\t\tComponent component1=(Component)object;\t\n\t\t\tif((StringUtils.equalsIgnoreCase(component1.getCategory(), Constants.TRANSFORM)\n\t\t\t\t\t&&!StringUtils.equalsIgnoreCase(component1.getComponentName(), Constants.FILTER)\n\t\t\t\t\t&&!StringUtils.equalsIgnoreCase(component1.getComponentName(), Constants.UNIQUE_SEQUENCE)\n\t\t\t\t\t&&!StringUtils.equalsIgnoreCase(component1.getComponentName(),Constants.PARTITION_BY_EXPRESSION))\n\t\t\t\t\t&& component1.isContinuousSchemaPropogationAllow()\n\t\t\t\t\t )\n\t\t\t{\n\t\t\t\tcontainsTransformOrUnionAllComponent=true;\n\t\t\t break;\n\t\t\t}\n\t\t\telse if((StringUtils.equalsIgnoreCase( Constants.UNION_ALL, component1.getComponentName())))\n\t\t\t{\n\t\t\t\tif(!isUnionAllInputSchemaInSync(component1))\n\t\t\t\t{\n\t\t\t\t\tcontainsTransformOrUnionAllComponent=true;\n\t\t\t\t break;\n\t\t\t\t}\t\n\t\t\t}\t\t\n\t\t\telse if(component1 instanceof SubjobComponent)\n\t\t\t{\n\t\t\t\tcontainsTransformOrUnionAllComponent=checkIfSubJobHasTransformOrUnionAllComponent(component1);\n\t\t\t\tif(containsTransformOrUnionAllComponent)\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}\n\t\treturn containsTransformOrUnionAllComponent;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to return if an object is enlisted in the current transaction. This is only of use when running "persistencebyreachability" at commit.
public boolean isEnlistedInTransaction(Object id) { if (pbrAtCommitHandler == null || !tx.isActive()) { return false; } if (id == null) { return false; } return pbrAtCommitHandler.isObjectEnlisted(id); }
[ "default boolean isInTransaction() {\n return TransactionalContext.isInTransaction();\n }", "public boolean isInTransaction() {\r\n return this.inTransaction;\r\n }", "public boolean isStoredInObject() {\r\n return lockValueStored == IN_OBJECT;\r\n }", "@Override\n public boolean isTransActionAlive() {\n Transaction transaction = getTransaction();\n return transaction != null && transaction.isActive();\n }", "public boolean containsEntity();", "public boolean isStored(final StoredObject object) {\n \n return eDAO.getObjectByUuid(object.getUuid()) != null;\n }", "private boolean canEnlist() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "Boolean isConsumeLockEntity();", "public boolean isLocalResourceInTransaction(ResourceHandle h) {\n boolean result = true;\n try {\n JavaEETransaction txn = (JavaEETransaction) ConnectorRuntime.getRuntime().getTransaction();\n if (txn != null)\n result = isNonXAResourceInTransaction(txn, h);\n } catch (SystemException e) {\n if (_logger.isLoggable(Level.FINE)) {\n _logger.log(Level.FINE, \"Exception while checking whether the resource [ of pool : \" + poolInfo + \" ] \"\n + \"is nonxa and is enlisted in transaction : \", e);\n }\n }\n return result;\n }", "public boolean inUse()\n\t\t{\n\t\t\tboolean retVal = false;\n\t\t\tAssignment assignment = null;\n\t\t\tList allAssignments = getAssignments(m_context);\n\t\t\tfor (int x = 0; x < allAssignments.size(); x++)\n\t\t\t{\n\t\t\t\tassignment = (Assignment) allAssignments.get(x);\n\t\t\t\tif (assignment.getContentReference().equals(getReference())) return true;\n\t\t\t}\n\n\t\t\treturn retVal;\n\t\t}", "boolean hasTransactionLimit();", "public boolean isTransactionRunning();", "boolean hasTransaction(Transaction editedTransaction);", "private boolean isTransactionAlreadySeen(Transaction tx){\n return allTransactions.contains(tx);\n }", "public boolean supportsTransactions();", "protected boolean containsClientTransaction() {\n return clientTransaction != null;\n }", "public boolean isTransactionForUpdate() {\r\n return localTransactionScope().isForUpdate();\r\n }", "public boolean isItemLocal ();", "Boolean isPersisted(Object object);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle an individual byte from the byte encoded request object.
public abstract void handle(byte b) throws Exception;
[ "void accept(String fieldName, byte[] utf8Data, int offset, int length);", "byte readByte();", "public byte readByte();", "@Override\n public byte[] handleBinaryRequest(byte[] request) throws IOException, AutomationException {\n serverLog.addMessage(3, 200,\n \"Request received in Sample Object Interceptor for handleBinaryRequest\");\n\n /*\n * Add code to manipulate Binary requests from desktop here\n */\n\n IRequestHandler requestHandler = soiHelper.findRequestHandlerDelegate(so);\n if (requestHandler != null) {\n return requestHandler.handleBinaryRequest(request);\n }\n\n return null;\n }", "byte decodeByte();", "private void handleCharacterByte(int ch) throws IOException {\n\t\tif (parsingHex) {\n\t\t\tint b = HexUtils.parseHexDigit(ch) << 4;\n\t\t\tch = source.read();\n\t\t\tif (ch == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Unexpected end of file\");\n\t\t\t}\n\t\t\tb += HexUtils.parseHexDigit(ch);\n\t\t\tbuffer.add(b);\n\t\t\tparsingHex = false;\n\t\t} else {\n\t\t\tbuffer.add(ch);\n\t\t}\n\t}", "byte readByte() throws IOException;", "@Override\n\tpublic byte[] handleBinaryRequest(byte[] request) throws IOException,\n\t\t\tAutomationException {\n\t\tserverLog\n\t\t\t\t.addMessage(3, 200,\n\t\t\t\t\t\t\"Request received in Sample Object Interceptor for handleBinaryRequest\");\n\n\t\t/*\n\t\t * Add code to manipulate Binary requests from desktop here\n\t\t */\n\n\t\tIRequestHandler requestHandler = soiHelper\n\t\t\t\t.findRequestHandlerDelegate(so);\n\t\tif (requestHandler != null) {\n\t\t\treturn requestHandler.handleBinaryRequest(request);\n\t\t}\n\n\t\treturn null;\n\t}", "public ResponsePacket handleRequest(RequestPacket request) throws RequestHandlerException;", "Object handle(Object request);", "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "public native byte __byteMethod( long __swiftObject, byte arg );", "void receivedAckRequest(byte b);", "public void sendByte(int datum);", "public abstract byte read_octet();", "private byte nextByte(ByteBuffer inputBuffer) throws IOException {\n getAtLeastBytes(inputBuffer, 1);\n return inputBuffer.get();\n }", "void responseReceived(byte[] response);", "public ByteBuffer postParse(ByteBuffer byteBuffer);", "public T casePrimitiveTypeByte(PrimitiveTypeByte object) {\n\t\treturn null;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getSGEName method, of class GATKAnnotateVariantsJob.
@Test public void testGatkAnnotateSNP() { File referenceFile = new File(getClass().getResource("Rnor_chr1_10000000_11000000.fa").getFile()); File expectedRawSNPCalls = new File(getClass().getResource("expectedSNPCalls_raw.vcf").getFile()); File expectedRawSNPCallsIdx = new File(getClass().getResource("expectedSNPCalls_raw.vcf.idx").getFile()); File expectedAnnotatedSNPCalls = new File(getClass().getResource("expectedSNPCalls_annotated.vcf").getFile()); File tmpRawVCFFile = new File(outputDir, expectedRawSNPCalls.getName()); File tmpRawVCFIdxFile = new File(outputDir, expectedRawSNPCallsIdx.getName()); try { FileUtils.copyFile(expectedRawSNPCalls, tmpRawVCFFile); FileUtils.copyFile(expectedRawSNPCallsIdx, tmpRawVCFIdxFile); } catch (IOException ex) { Logger.getLogger(BwaSolidMappingJobTest.class.getName()).log(Level.SEVERE, null, ex); } GlobalConfiguration gc = new GlobalConfiguration(); File gatk = new File("/home/wim/GenomeAnalysisTK-2.4-7-g5e89f01/GenomeAnalysisTK.jar"); if(!gatk.canExecute()) { fail("Cannot execute GATK on location "+ gatk.getAbsolutePath()); } gc.setReferenceFile(referenceFile); gc.setGatk(gatk); gc.setOffline(true); gc.setTmpDir(outputDir); gc.setGatkSGEMemory(1); gc.setGatkSGEThreads(1); gc.setGatkCallReference(true); File foundAnnotatedSNPCalls = new File(outputDir, "foundSNPCalls_annotated.vcf"); try { GATKAnnotateVariantsJob gATKAnnotateVariantsJob = new GATKAnnotateVariantsJob(expectedRawSNPCalls, foundAnnotatedSNPCalls, gc); gATKAnnotateVariantsJob.executeOffline(); gATKAnnotateVariantsJob.waitForOfflineExecution(); } catch (IOException ex) { Logger.getLogger(GATKAnnotateVariantsJobTest.class.getName()).log(Level.SEVERE, null, ex); } catch (InterruptedException ex) { Logger.getLogger(GATKAnnotateVariantsJobTest.class.getName()).log(Level.SEVERE, null, ex); } try { Assert.assertEquals(FileUtils.readLines(expectedAnnotatedSNPCalls), FileUtils.readLines(foundAnnotatedSNPCalls)); } catch (IOException ex) { Logger.getLogger(GATKCallRawVariantsJobTest.class.getName()).log(Level.SEVERE, null, ex); } }
[ "public java.lang.CharSequence getVariantName() {\n return variantName;\n }", "public java.lang.CharSequence getVariantName() {\n return variantName;\n }", "private String getGeneName () {\n try {\n return getValueOfQualifier (\"gene\");\n } catch (InvalidRelationException e) {\n return null;\n }\n }", "public String getSgsnName() {\r\n return sgsnName;\r\n }", "public List<String> getNames(VariantContext variantContext);", "public String getGeneName() {\n return geneName;\n }", "String getGenus();", "java.lang.String getNormalSampleName();", "public void setVariantName(java.lang.CharSequence value) {\n this.variantName = value;\n }", "@NonNull\n Collection<String> getVariantNames();", "java.lang.String getGameName();", "public String getGeneName() {\n\t\t// Try 'gene'...\n\t\tString geneName = get(\"gene\");\n\t\tif (geneName != null) return geneName;\n\n\t\t// Try 'gene'...\n\t\tgeneName = get(\"gene_synonym\");\n\t\tif (geneName != null) return geneName;\n\n\t\treturn getGeneId();\n\t}", "String getJobName();", "public void setGname(String gname) {\n this.gname = gname;\n }", "public GSSName getGssName() {\n\t\treturn gssName;\n\t}", "java.lang.String getVariantClassification();", "public String getGeneName(int row);", "String getSupName();", "String getGymName();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uses default deserialization to turn a byte array into an object. Decrypts the value first. All exceptions are converted into IOExceptions.
@Override public <T> T deSerialize( final byte[] data, final ClassLoader loader ) throws IOException, ClassNotFoundException { if ( data == null ) { return null; } final byte[] deccrypted = decrypt(data); return serializer.deSerialize(deccrypted, loader); }
[ "public Object deserialize(byte[] value) throws Exception;", "Object deserialize(byte[] bytes) throws Exception;", "T deserialize(byte[] bytes);", "T decode(byte[] bytes) throws IOException;", "public Object decryptObject(byte[] o){\n\t\tif (o==null) {\n\t\t\treturn null;\n\t\t}\n try {\n\t\t\tObject obj = toObject(dcipher.doFinal(o));\t\n\t\t\treturn obj;\n } catch (javax.crypto.BadPaddingException e) {\n \t//e.printStackTrace();\n\t\t\tSystem.out.println(\"Bad padding Exception. Probably bad IV\");\n\t\t\treturn null;\n } catch (IllegalBlockSizeException e) {\n \te.printStackTrace();\n } catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n return null;\n\t}", "@Override\n public Object deserialize(byte[] bytes, Class<?> type) throws IOException {\n final Input input = new Input(bytes);\n try {\n return deserialize(input, type);\n }\n finally {\n input.close();\n }\n }", "Optional<T> deserialize(byte[] input);", "public static Object bytesToObject( byte[] bytes ) throws IOException, ClassNotFoundException\n {\n if( bytes == null ){\n return null;\n }\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);\n ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);\n return objectInputStream.readObject();\n }", "Object deserialize(Writable blob) throws SerDeException;", "T decode() throws IOException;", "@Override\n public <T> T deserializeValue(byte[] value,Class<T> toClass,RedisSerializer bySerializer)\n {\n if(value==null) return null;\n return (T)bySerializer.deserialize(value);\n }", "public static <T> T deserialize(byte[] bytes, Class<T> claz) {\n Kryo kryo = kryos.get();\n Input input = new Input(bytes);\n T obj = kryo.readObjectOrNull(input, claz);\n return obj;\n }", "Object deserialize(ByteBuf input);", "T deserialize(ByteBuffer byteBuffer);", "private static NumberKeyPair deserializeKey(byte[] blob, int offset, int len)\n {\n ByteArrayInputStream b = new ByteArrayInputStream(blob, offset, len);\n ObjectInput in = null;\n try\n {\n in = new ObjectInputStream(b);\n }\n catch(java.io.StreamCorruptedException e)\n {Log.e(KeyShare.TAG, \"exception\", e); }\n catch(IOException e) {Log.e(KeyShare.TAG, \"exception\", e); }\n\n try\n {\n return (NumberKeyPair) in.readObject();\n }\n catch(ClassNotFoundException e) {Log.e(KeyShare.TAG, \"exception\", e); }\n catch(IOException e) {Log.e(KeyShare.TAG, \"exception\", e); }\n finally\n {\n try\n {\n b.close();\n in.close();\n }\n catch(IOException e) {Log.e(KeyShare.TAG, \"exception\", e); }\n }\n return null; //if an exception is thrown\n }", "public static Object byteToObject(final byte[] bytes) {\n\t\tObject object = null;\n\n\t\ttry {\n\t\t\tByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(\n\t\t\t\t\tbytes);\n\t\t\tObjectInputStream objectInputStream = new ObjectInputStream(\n\t\t\t\t\tbyteArrayInputStream);\n\t\t\tobject = objectInputStream.readObject();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn object;\n\t}", "T deserialize(InputStream stream) throws IOException;", "public User byteToObject(byte[] data) throws IOException, ClassNotFoundException {\n ByteArrayInputStream in = null;\n ObjectInputStream is = null;\n Object o = null;\n try {\n in = new ByteArrayInputStream(data);\n is = new ObjectInputStream(in);\n Log.e(\"ObjectInputStream\", is.toString());\n while((o = is.readObject()) != null) {\n if(o instanceof User) {\n return (User) o;\n }\n }\n\n } catch (EOFException ex) {\n ex.printStackTrace();\n } catch (NullPointerException e) {\n e.printStackTrace();\n } catch (OptionalDataException e) {\n e.printStackTrace();\n\n }finally {\n //Checks to make sure stream is closed properly. Might not be needed.\n if(is != null) {\n try {\n is.close();\n }catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return null;\n }", "public Object readObject() throws IOException, ClassNotFoundException {\n if (objectInputStream == null) {\n objectInputStream = new ObjectInputStream(byteArrayInputStream);\n }\n return objectInputStream.readObject();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the id contact.
public void setIdContact(final Integer idContactt) { this.idContact = idContactt; }
[ "public void setContactId(int tmp) {\n this.contactId = tmp;\n }", "public void setIdContacto(String idContacto) {\r\n\t\tthis.idContacto = idContacto;\r\n\t}", "public void setIdContacto(int aIdContacto) {\r\n idContacto = aIdContacto;\r\n }", "public void setContact(int value) {\n this.contact = value;\n }", "public ContactResponse updateContactBasedOnId(int id);", "public void setContactId(java.lang.String contactId) {\r\n this.contactId = contactId;\r\n }", "public int getContactId() {\n return contactId;\n }", "public Integer getIdContact() {\n \t\treturn idContact;\n \t}", "public void setId() {\n this.id = id;\r\n }", "@ApiModelProperty(value = \"Xero Identifier of contact\")\n /**\n * Xero Identifier of contact\n *\n * @return contactId UUID\n */\n public UUID getContactId() {\n return contactId;\n }", "public void setContactsId(String contactsId) {\n this.contactsId = contactsId == null ? null : contactsId.trim();\n }", "public java.lang.String getContactId() {\r\n return contactId;\r\n }", "public Long getContactId() {\n return contactId;\n }", "public int getContactId() {\n return contactId;\n }", "public void setContact(Contact contact) {\n this.contact = contact;\n }", "public java.lang.String getContactId() {\n return contactId;\n }", "public void asigneIDColabolador (int id)\n {\n identificadorColaborador = id;\n }", "public void setIdTipoContacto(String idTipoContacto) {\r\n\t\tthis.idTipoContacto = idTipoContacto;\r\n\t}", "public void setIdPerson(int value) {\n this.idPerson = value;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Container's getter for PenaltyPaymentVO1.
public ViewObjectImpl getPenaltyPaymentVO1() { return (ViewObjectImpl)findViewObject("PenaltyPaymentVO1"); }
[ "public ViewObjectImpl getLoanCashPenaltyVO1() {\n return (ViewObjectImpl)findViewObject(\"LoanCashPenaltyVO1\");\n }", "public ViewObjectImpl getPublicNonCashPenaltyVO1() {\n return (ViewObjectImpl)findViewObject(\"PublicNonCashPenaltyVO1\");\n }", "public DsPVOImpl getDsPVO1() {\n return (DsPVOImpl)findViewObject(\"DsPVO1\");\n }", "public RowIterator getPenaltyPaymentVO() {\n return (RowIterator)getAttributeInternal(PENALTYPAYMENTVO);\n }", "public PP_LoanVOImpl getPP_LoanVO1() {\n return (PP_LoanVOImpl)findViewObject(\"PP_LoanVO1\");\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "public PP_CashierVoImpl getPP_CashierVo1() {\n return (PP_CashierVoImpl)findViewObject(\"PP_CashierVo1\");\n }", "public LoanVOImpl getLoanVO1() {\n return (LoanVOImpl)findViewObject(\"LoanVO1\");\n }", "public ViewObjectImpl getVbookProviderVO1() {\n return (ViewObjectImpl)findViewObject(\"VbookProviderVO1\");\n }", "public ViewObjectImpl getExtraChargeVO1() {\n return (ViewObjectImpl)findViewObject(\"ExtraChargeVO1\");\n }", "public BigDecimal getPayment() {\r\n return payment;\r\n }", "public BigDecimal getPayment() {\n return payment;\n }", "public PaymentType getPaymentType(){\n return PAYMENT_TYPE;\n }", "public ViewObjectImpl getAveSalaryDeptVO1() {\n return (ViewObjectImpl) findViewObject(\"AveSalaryDeptVO1\");\n }", "public ViewObjectImpl getVbookOtherProviderVO1() {\n return (ViewObjectImpl)findViewObject(\"VbookOtherProviderVO1\");\n }", "public org.sen.schemas.data.TPayment getPayment() {\r\n return payment;\r\n }", "public ViewObjectImpl getVwPenaltyHistoryVO1() {\n return (ViewObjectImpl)findViewObject(\"VwPenaltyHistoryVO1\");\n }", "public java.lang.Integer getPayment() {\n return payment;\n }", "public ViewObjectImpl getReserveVO1() {\n return (ViewObjectImpl)findViewObject(\"ReserveVO1\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the base offset (nonmodifiable part of the offset).
public void setBaseOffset(PuertoOffset baseOffset) { positionViewer.setBaseOffset(baseOffset); }
[ "public void setBaseOffset (@Nonnegative long baseOffset);", "protected abstract void setBase(int position, int value);", "public void setSTLBase(double offset) {\n\tif (offset <= 0.0) {\n\t throw new IllegalArgumentException\n\t\t(errorMsg(\"setSTLBaseErr\", offset));\n\t} else {\n\t computeBoundingBoxIfNeeded();\n\t useSTLBase = true;\n\t needSTLBase = false;\n\t xSTLBase = offset - minx;\n\t ySTLBase = offset - miny;\n\t zSTLBase = offset - minz;\n\t}\n }", "void setRawOffset(int rawOffset);", "public void setBase(LocatorIF base_address) {\n this.base_address = base_address;\n }", "void setOffset(double offset);", "private void setOffset(int offset) {\n\t\tif(offset < 0) {\n\t\t\toffset *= -1;\n\t\t}\n\t\tthis.offset = (offset > 120) ? 120 : offset;\n\t}", "public void setOffset(int startOffset, int endOffset);", "public void setOffset(int num) {\n offset = num;\n }", "public void setByteoffset(long value) {\n this.byteoffset = value;\n }", "public final void setRawOffset(int rawOffset) {\n// if (rawOffset < -1) { // -1 is default value\n// throw new IllegalArgumentException(\"Invalid rawOffset=\" + rawOffset);\n// }\n this.rawOffset = rawOffset;\n }", "public void setBase(double base)\n\t{\n\t\tthis.base = base;\n\t}", "void xsetRawOffset(org.apache.xmlbeans.XmlInt rawOffset);", "void setOrigin (double offset);", "void setOrigin (int offset);", "public void setOffset(int offset) {\r\n currOffset = offset;\r\n try {\r\n file.seek(offset);\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void setBase(double base) {\n\t\tgetConfiguration().getElements().getBar().setBase(base);\n\t}", "public final void setBase(String base) {\r\n this.base = base;\r\n }", "public net.acilab.stream.processor.wikilinks.serialization.Token.Builder setByteoffset(long value) {\n validate(fields()[1], value);\n this.byteoffset = value;\n fieldSetFlags()[1] = true;\n return this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Image from cache
public Bitmap getCacheImage(String tag) { return getCacheImage(0, 0, tag); }
[ "public Bitmap getImageCache(Integer cacheKey)\n {\n synchronized (mLinkedHashMap)\n {\n Bitmap bitmap;\n // Get file from cache\n String file = mLinkedHashMap.get(cacheKey);\n if (file != null)\n {\n bitmap = BitmapFactory.decodeFile(file);\n Log.i(\"DiskLruCache\", \"DiskCacheHit for Image with CacheKey: \"+cacheKey.toString());\n return bitmap;\n }\n else\n {\n // Construct existing file path\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFile = createFilePath(cacheDirectory, cacheKeyStr);\n // Get the file using the constructed file path\n assert existingFile != null;\n File existFile = new File(existingFile);\n if (existFile.exists())\n {\n // If the file exists, we will store the the key in reference list\n referenceAdd(cacheKey, existingFile);\n return BitmapFactory.decodeFile(existingFile);\n }\n }\n return null;\n }//synchronized (mLinkedHashMap)\n }", "@Override\n public Bitmap getBitmap(String url) {\n return mCache.get(url);\n }", "private String cacheResource(String url) {\n if (url == null || PHCache.hasNotBeenInstalled()) return url;\n\n\n // check to see if we have a cached version\n String local_url = PHCache.getSharedCache().getCachedFile(url);\n\n PHStringUtil.log(\"Checking for image url in cache: \" + url + \" and finding local URL: \" + local_url);\n\n // we have a cached version! (yay)\n if (local_url != null) return local_url;\n\n\n // since we don't have a cached version, kick off a new cache\n // request and return the original url\n\n // kick off a new pre-cache request\n PHStringUtil.log(\"Starting new cache request for image: \" + url);\n\n PHPrefetchTask task = new PHPrefetchTask();\n task.setURL(url);\n task.execute();\n\n return url;\n }", "public Bitmap loadImageCache( String url ){\n\t\tString path = createPath(url, context);\n\t\tLog.i( TAG, \"loadImageCache: \" + path );\n\n\t\tBitmap bitmap = null;\n\t\tFile file = new File( path );\n\n \tif( file.exists() ) {\n \t\tLog.i( TAG, \"loadImageCache - Arquivo existe\" );\n\n\t\t\ttry {\n\t\t\t\tFileInputStream infile = new FileInputStream(file);\n\t\t\t\tbitmap = BitmapFactory.decodeStream(infile);\n\t\t\t\tinfile.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tLog.i( TAG, \"ERROR: loadImageCache: \" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.i( TAG, \"ERROR: loadImageCache: \" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n \treturn bitmap;\n\t}", "public ImageLruCache getCache() {\n return imageCache;\n }", "Bitmap get(String key) {\n return memoryCache.get(key);\n }", "public Bitmap getBitmapFromCache(String key)\n {\n return lruCache.get(key);\n }", "private ImageRecord getCachedImage(Image image)\n {\n ImageRecord record = null;\n SoftReference ref = (SoftReference) imageMap.get(image);\n if (ref != null)\n record = (ImageRecord) ref.get();\n if (record == null)\n {\n // Grab the pixels from the image and cache them.\n\n try\n {\n record = new ImageRecord(image);\n imageMap.put(image, new SoftReference<ImageRecord>(record));\n }\n catch (InterruptedException ex)\n {\n ex.printStackTrace();\n return null;\n }\n }\n return record;\n }", "private Bitmap downloadImage(String url) {\n Bitmap image = mRepository.fetchImage(url);\n \n if (image != null) {\n mLruCache.put(url, image);\n }\n\n return image;\n }", "public ImageIcon get(String imageId) {\n ImageIcon ret = cache.get(imageId);\n if(ret==null) {\n URL url = this.getClass().getResource(PACKAGE_BASE+imageId);\n if(url!=null) {\n ret = new ImageIcon(url);\n cache.put(imageId, ret);\n }\n }\n return ret;\n }", "private Bitmap getBitmapFromMemCache(String key) {\n return mLruCache.get(key);\n }", "protected Resource getResourceFromCache(final String path) {\n return cache.get(path);\n }", "private void loadCache(Context ctx, ImageLoader img) {\r\n RequestOptions options = getCommonOptions(img);\r\n options.diskCacheStrategy(DiskCacheStrategy.ALL);\r\n\r\n Glide.with(ctx).load(img.getUrl()).apply(options).into(img.getImgView());\r\n }", "public void cache(){\n try(FileOutputStream fos = new FileOutputStream(\"cache.txt\");\n ObjectOutputStream oos = new ObjectOutputStream(fos)){\n\n oos.writeObject(image);\n\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public Bitmap getCacheImage(int width,\n int height, String tag) {\n\n String diskCachekey = MD5.Md5(tag);\n String memoryCachekey = tag;\n if (width != 0 && height != 0) {\n diskCachekey = MD5.Md5(tag + width + height);\n memoryCachekey = tag + width + height;\n }\n\n Bitmap bitmap = null;\n synchronized (mMemoryCache) {\n bitmap = mMemoryCache.get(memoryCachekey);\n }\n\n if (bitmap == null) {\n if (sDiskCacheEnable && mDiskCache != null) {\n synchronized (mDiskCache) {\n bitmap = mDiskCache.get(diskCachekey);\n }\n }\n }\n \n return bitmap;\n }", "public ImageCache() {}", "public Image check(File file) {\r\n\t\tImage image = memoryCache.get(file);\r\n \tif (image == null) {\r\n \t\tFile imageFile = externalCache.get(file);\r\n \t\tif (imageFile != null && imageFile.exists()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\timage = loadImage(new FileInputStream(imageFile));\r\n\t\t\t\t}\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t\t\t// The file exists but its content is now\r\n \t\t\t// obsolete, means we have to render it again.\r\n \t\t\t// The external cache thus doesn't have to\r\n \t\t\t// link to it anymore.\r\n\t\t\t\t\te.printStackTrace();\r\n \t\t\t\texternalCache.remove(file);\r\n\t\t\t\t}\r\n \t\t}\r\n \t}\r\n \t// Check if the cache is expired?\r\n \tif (image != null) {\r\n\t\t\tLong modifiedDate = new Long(file.lastModified());\r\n\t\t\tLong lastModifiedDate = cacheModifiedDate.get(file);\r\n\t\t\tif (modifiedDate.compareTo(lastModifiedDate) != 0) {\r\n\t\t\t\t// Out of date, removing...\r\n\t\t\t\tmemoryCache.remove(file);\r\n\t\t\t\texternalCache.remove(file);\r\n\t\t\t\timage = null;\r\n\t\t\t}\r\n \t}\r\n \t\treturn image;\r\n\t}", "static public void readRepository(){\n File cache_file = getCacheFile();\n if (cache_file.exists()) {\n try {\n // Read the cache acutally\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document document = builder.parse(cache_file);\n NodeList images_nodes = document.getElementsByTagName(\"image\");\n for (int i = 0; i < images_nodes.getLength(); i++) {\n Node item = images_nodes.item(i);\n String image_path = item.getTextContent();\n File image_file = new File(image_path);\n if (image_file.exists()){\n AppImage image = Resources.loadAppImage(image_path);\n images.add(image);\n }\n }\n }\n catch (Exception e) {\n throw new RuntimeException(e);\n }\n }\n }", "public Bitmap get(String id) {\r\n Log.v(TAG, \"get() id = \" + id);\r\n if (!cache.containsKey(id)) return null;\r\n SoftReference<Bitmap> ref = cache.get(id);\r\n Bitmap bitmap = ref.get();\r\n if (bitmap != null && bitmap.isRecycled()) {\r\n bitmap = null;\r\n }\r\n return bitmap;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns all the legal moves for a Rook on a p's location on the Board.
public int[][] getMovesRook(Piece p) { x = p.getX(); y = p.getY(); int legalMoves[][] = new int[8][8]; for (int i = x + 1; i < 8; i++) {//Traversing from piece coords, right till end of board. if (b.getPieceAt(y, i) != null) { if (p.isWhite() == b.getPieceAt(y, i).isWhite()) { break; } else { legalMoves[y][i] = 1; break; } } else { legalMoves[y][i] = 1; } } for (int i = x - 1; i > -1; i--) {//Traversing from piece coords, left till end of board. if (b.getPieceAt((y), i) != null) { if (p.isWhite() == b.getPieceAt((y), i).isWhite()) { break; } else { legalMoves[(y)][i] = 1; break; } } else { legalMoves[y][i] = 1; } } for (int i = y - 1; i > -1; i--) { //Traversing from piece coords, downwards till end of board. if (b.getPieceAt((i), x) != null) { if (p.isWhite() == b.getPieceAt(i, x).isWhite()) { break; } else { legalMoves[i][x] = 1; break; } } else { legalMoves[i][x] = 1; } } for (int i = y + 1; i < 8; i++) { //Traversing from piece coords, upwards till end of board. if (b.getPieceAt((i), x) != null) { if (p.isWhite() == b.getPieceAt(i, x).isWhite()) { break; } else { legalMoves[i][x] = 1; break; } } else { legalMoves[i][x] = 1; } } return legalMoves; }
[ "public ArrayList<Location> getMoveLocations(Piece p)\n {\n Location loc = getLocation(p);\n ArrayList<Location> locs = getCandidateLocations(loc);\n if (p==null)\n return null;\n for (int i = 0; i < locs.size(); i++)\n {\n if (canMoveTo(p,locs.get(i))==ILLEGAL_MOVE)\n {\n locs.remove(i);\n i--;\n }\n else\n {\n Board b = new Board(this);\n b.movePiece(loc,locs.get(i));\n if (b.findKing(p.getColor())!=null&&b.inCheck(p.getColor()))\n {\n locs.remove(i);\n i--;\n }\n }\n }\n return locs;\n }", "public List<IntPair> createRookMoves(ChessPiece piece) {\n List<IntPair> movesList = new ArrayList<>();\n IntPair currentPosition = piece.getPosition();\n // Values to determine if path is blocked\n int blockedEast = Integer.MAX_VALUE;\n int blockedWest = Integer.MAX_VALUE;\n int blockedNorth = Integer.MAX_VALUE;\n int blockedSouth = Integer.MAX_VALUE;\n // Check if ChessLibrary.Pieces.Rook can move horizontally / vertically from 1 block to 7 blocks.\n for(int count = 1; count <= 7; count++) {\n if(currentPosition.left() + count < BOARD_COLUMNS) { // East\n if(count < blockedEast) {\n blockedEast = getBlockedEast(piece, movesList, currentPosition, blockedEast, count);\n }\n }\n if(currentPosition.left() - count >= 0) { // West\n if(count < blockedWest) {\n blockedWest = getBlockedWest(piece, movesList, currentPosition, blockedWest, count);\n }\n }\n if(currentPosition.right() + count < BOARD_ROWS) { // South\n if(count < blockedSouth) {\n blockedSouth = getBlockedSouth(piece, movesList, currentPosition, blockedSouth, count);\n }\n }\n if(currentPosition.right() - count >= 0) { // North\n if(count < blockedNorth) {\n blockedNorth = getBlockedNorth(piece, movesList, currentPosition, blockedNorth, count);\n }\n }\n }\n return movesList;\n }", "public Set<Point> getValidMoves(Point p){\n return getValidMoves(p.x, p.y);\n }", "public int[][] getMovesQueen(Piece p) {\n x = p.getX();\n y = p.getY();\n int temp[][] = getMovesBishop(p);\n int legalMoves[][] = getMovesRook(p);\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n if (temp[i][j] == 1) {\n legalMoves[i][j] = 1;\n }\n }\n }\n return legalMoves;\n }", "public List<String> legalMoves() {\n List<String> result = new ArrayList<>();\n for (int col = 1; col < _board.length + 1; col += 1) {\n for (int row = 1; row < _board.length + 1; row += 1) {\n String move = row + \",\" + col;\n if (isLegal(move)) {\n result.add(move);\n }\n }\n }\n return result;\n }", "public List<Move> getMovesWithPiece(Piece p) {\r\n return filter(new PiecePredicate(p));\r\n }", "private static Set<Move> generateRookMoves(Color rookColor, Board targetBoard) {\n Piece rook = Piece.from(rookColor, Role.ROOK);\n Set<Move> possibleMoves = new HashSet<>();\n // for each rook of a color...\n for (Square square : targetBoard.getPieceLocations(rook)) {\n // ...and for each of the directions that a rook can move, continue adding squares as possible\n // destinations until the path is blocked\n for (Direction direction : CARDINAL_DIRECTIONS) {\n int file = square.file + direction.file;\n int rank = square.rank + direction.rank;\n while (file >= 0 && file < 8 && rank >= 0 && rank < 8) {\n Square possibleDestination = Square.of(file, rank);\n Piece pieceAtDestination = targetBoard.getPieceOn(possibleDestination);\n if (pieceAtDestination == null || pieceAtDestination.getColor() != rookColor) {\n possibleMoves.add(new NormalMove(rook, square, possibleDestination, pieceAtDestination, false\n , false));\n }\n if (pieceAtDestination != null) {\n // path is blocked, so stop searching\n break;\n }\n\n file += direction.file;\n rank += direction.rank;\n\n }\n }\n }\n return possibleMoves;\n }", "List<Move> legalMoves(Piece side) {\n\n ArrayList<Move> allmoves = new ArrayList<Move>();\n\n for (Square piece: pieceLocations(side)) {\n for (Square sq : SQUARE_LIST) {\n\n if (isUnblockedMove(piece, sq)) {\n if (!allmoves.contains(mv(piece, sq))) {\n allmoves.add(mv(piece, sq));\n }\n }\n }\n\n }\n return allmoves;\n\n }", "List<Move> legalMoves(Piece side) {\r\n legalMovesArr = new ArrayList<Move>();\r\n HashSet<Square> pieceSide = pieceLocations(side);\r\n for (Square pieces : pieceSide) {\r\n for (int i = 0; i <= 8; i++) {\r\n Move x = mv(pieces, sq(pieces.col(), i));\r\n legalMovesArr.add(x);\r\n }\r\n for (int j = 0; j <= 8; j++) {\r\n Move y = mv(pieces, sq(j, pieces.row()));\r\n legalMovesArr.add(y);\r\n }\r\n while (legalMovesArr.remove(null));\r\n }\r\n return legalMovesArr;\r\n }", "@Override\n\tpublic Collection<Move> calculateLegalMoves(final Board board) {\n\t\t\n\t\t//Array that will hold of the legal moves for the Pawn\n\t\tfinal List<Move> legalMoves = new ArrayList<>();\n\t\t\n\t\t//Loop through all possible moves by applying of the offsets to the Pawn's current position\n\t\tfor(final int currentCandidateOffset: CANDIDATE_MOVE_COORDINATES){\n\t\t\t\n\t\t\t//Apply the offset to the Pawn's current position\n\t\t\tfinal int candidateDestinationCoordinate = this.piecePosition + (this.getPieceTeam().getDirection() * currentCandidateOffset);\n\t\t\t\n\t\t\t//Checks if the Destination Coordinate is valid\n\t\t\tif(!BoardUtils.isValidTileCoordinate(candidateDestinationCoordinate)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Checks if this tile is occupied\n\t\t\tif(currentCandidateOffset == 8 && !board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnMove(board, this, candidateDestinationCoordinate)));\n\t\t\t\telse\n\t\t\t\t\tlegalMoves.add(new Move.PawnMove(board, this, candidateDestinationCoordinate));\t\n\t\t\t}\n\t\t\t//Checks if the Pawn is on it's first move\n\t\t\telse if(currentCandidateOffset == 16 && this.isFirstMove() && ((BoardUtils.SEVENTH_RANK[this.piecePosition] && \n\t\t\t\t\tthis.getPieceTeam().isBlack()) || (BoardUtils.SECOND_RANK[this.piecePosition] && this.getPieceTeam().isWhite()))) {\n\t\t\t\t\n\t\t\t\t//Calculate coordinate of the tile behind candidate coordinate\n\t\t\t\tfinal int behindCandidateDestinationCoordinate = this.piecePosition + (this.pieceTeam.getDirection() * 8);\n\t\t\t\t\n\t\t\t\t//Checks if the tile behind the candidate destination is NOT occupied & if the Tile at the Candidate Destination is NOT occupied\n\t\t\t\tif(!board.getTile(behindCandidateDestinationCoordinate).isTileOccupied() && \n\t\t\t !board.getTile(candidateDestinationCoordinate).isTileOccupied())\n\t\t\t\t\t\tlegalMoves.add(new Move.PawnJump(board, this, candidateDestinationCoordinate));\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t//Checks for edge cases in the 7 direction\t\n\t\t\t} else if(currentCandidateOffset == 7 &&\n\t\t\t\t\t!((BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t\n\t\t\t\t//This basically checks if En Passant Pawn is next to Player's pawn\t\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition + (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//Checks for edge cases in the 9 direction\t\n\t\t\t} else if(currentCandidateOffset == 9 && \n\t\t\t\t\t!((BoardUtils.FILE_A[this.piecePosition] && this.getPieceTeam().isWhite() ||\n\t\t\t\t\t(BoardUtils.FILE_H[this.piecePosition] && this.getPieceTeam().isBlack())))){\n\t\t\t\t\n\t\t\t\tif(board.getTile(candidateDestinationCoordinate).isTileOccupied()){\n\t\t\t\t\tfinal Piece pieceOnCandidate = board.getTile(candidateDestinationCoordinate).getPiece();\n\t\t\t\t\t//If the pieces are not on the same team an Attack move is added to legal moves.\n\t\t\t\t\tif(this.getPieceTeam() != pieceOnCandidate.getPieceTeam())\n\t\t\t\t\t\tif(this.pieceTeam.isPawnPromotionSquare(candidateDestinationCoordinate))\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnPromotion(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t} else if(board.getEnPassantPawn() != null){\n\t\t\t\t\tif(board.getEnPassantPawn().getPiecePosition() == (this.piecePosition - (this.pieceTeam.getOppositeDirection()))){\n\t\t\t\t\t\tfinal Piece pieceOnCandidate = board.getEnPassantPawn();\n\t\t\t\t\t\tif(this.pieceTeam != pieceOnCandidate.getPieceTeam()){\n\t\t\t\t\t\t\tlegalMoves.add(new Move.PawnEnPassantAttackMove(board, this, candidateDestinationCoordinate, pieceOnCandidate));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn ImmutableList.copyOf(legalMoves);\n\t}", "public static void getMoves(Player p, GameSquare[][] board) {\n\t\t// keep track of the number of possible moves\n\t\t// and number of unique pieces you could move\n\t\tint moveCount = 0;\n\t\tint uniquePieceCount = 0;\n\n\t\tArrayList<GameSquare> playerSpotsWithPieces = p.places;\n\t\tArrayList<GameSquare> validMoves;\n\n\t\t// for each square with a piece on it\n\t\t// find out where you can move that piece\n\t\tfor (GameSquare currentSquare : playerSpotsWithPieces) {\n\t\t\tvalidMoves = new ArrayList<GameSquare>();\n\n\t\t\t// grab all valid moves from\n\t\t\tvalidMoves.addAll(currentSquare.getValidMoves(board));\n\t\t\tif (validMoves.size() > 0)\n\t\t\t\tuniquePieceCount++;\n\t\t\tfor (GameSquare move : validMoves) {\n\t\t\t\tSystem.out.printf(\"%s at <%d:%d> can move to <%d:%d>\\n\", currentSquare.pieceType(), currentSquare.x,\n\t\t\t\t\t\tcurrentSquare.y, move.x, move.y);\n\t\t\t\tmoveCount++;\n\t\t\t}\n\t\t}\n\n\t\t// print the number of possible moves and number of unique pieces that\n\t\t// can be moved\n\t\tSystem.out.printf(\"%d legal moves (%d unique pieces) for %s player\", moveCount, uniquePieceCount,\n\t\t\t\tp.color.toString().toLowerCase());\n\n\t}", "List<Move> legalMoves(Piece side) {\r\n List<Move> moves = new ArrayList<>();\r\n List<Square> squares = new ArrayList<>();\r\n for (int row = 0; row < SIZE; row++) {\r\n for (int col = 0; col < SIZE; col++) {\r\n if (get(col, row) == side) {\r\n squares.add(sq(col, row));\r\n }\r\n }\r\n }\r\n for (Square sq : squares) {\r\n moves.addAll(legalMoves(sq));\r\n }\r\n return moves;\r\n }", "Stack<Move> getRookMoves(int x, int y, String piece) {\n Square startingSquare = new Square(x, y, piece);\n Stack<Move> moves = new Stack<>();\n Move validM, validM2, validM3, validM4;\n /*\n There are four possible directions that the Rook can move to:\n - the x value is increasing\n - the x value is decreasing\n - the y value is increasing\n - the y value is decreasing\n\n Each of these movements should be catered for. The loop guard is set to incriment up to the maximun number of squares.\n On each iteration of the first loop we are adding the value of i to the current x coordinate.\n We make sure that the new potential square is going to be on the board and if it is we create a new square and a new potential\n move (originating square, new square).If there are no chessSquare present on the potential square we simply add it to the Stack\n of potential moves.\n If there is a piece on the square we need to check if its an opponent piece. If it is an opponent piece its a valid move, but we\n must break out of the loop using the Java break keyword as we can't jump over the piece and search for squares. If its not\n an opponent piece we simply break out of the loop.\n\n This cycle needs to happen four times for each of the possible directions of the Rook.\n */\n for (int i = 1; i < 8; i++) {\n int tempX1 = x + i;\n int tempY1 = y;\n if (!(tempX1 > 7 || tempX1 < 0)) {\n Square tmp = new Square(tempX1, tempY1, piece);\n validM = new Move(startingSquare, tmp);\n if (!piecePresent(((tmp.getPosX() * 75) + 20), (((tmp.getPosY() * 75) + 20)))) {\n moves.push(validM);\n } else {\n if (checkWhiteOpponent(((tmp.getPosX() * 75) + 20), ((tmp.getPosY() * 75) + 20))) {\n moves.push(validM);\n break;\n } else {\n break;\n }\n }\n }\n }//end of the loop with x increasing and Y doing nothing...\n for (int j = 1; j < 8; j++) {\n int tempX2 = x - j;\n int tempY2 = y;\n if (!(tempX2 > 7 || tempX2 < 0)) {\n Square tmp2 = new Square(tempX2, tempY2, piece);\n validM2 = new Move(startingSquare, tmp2);\n if (!piecePresent(((tmp2.getPosX() * 75) + 20), (((tmp2.getPosY() * 75) + 20)))) {\n moves.push(validM2);\n } else {\n if (checkWhiteOpponent(((tmp2.getPosX() * 75) + 20), ((tmp2.getPosY() * 75) + 20))) {\n moves.push(validM2);\n break;\n } else {\n break;\n }\n }\n }\n }//end of the loop with x increasing and Y doing nothing...\n for (int k = 1; k < 8; k++) {\n int tempX3 = x;\n int tempY3 = y + k;\n if (!(tempY3 > 7 || tempY3 < 0)) {\n Square tmp3 = new Square(tempX3, tempY3, piece);\n validM3 = new Move(startingSquare, tmp3);\n if (!piecePresent(((tmp3.getPosX() * 75) + 20), (((tmp3.getPosY() * 75) + 20)))) {\n moves.push(validM3);\n } else {\n if (checkWhiteOpponent(((tmp3.getPosX() * 75) + 20), ((tmp3.getPosY() * 75) + 20))) {\n moves.push(validM3);\n break;\n } else {\n break;\n }\n }\n }\n }//end of the loop with x increasing and Y doing nothing...\n for (int l = 1; l < 8; l++) {\n int tempX4 = x;\n int tempY4 = y - l;\n if (!(tempY4 > 7 || tempY4 < 0)) {\n Square tmp4 = new Square(tempX4, tempY4, piece);\n validM4 = new Move(startingSquare, tmp4);\n if (!piecePresent(((tmp4.getPosX() * 75) + 20), (((tmp4.getPosY() * 75) + 20)))) {\n moves.push(validM4);\n } else {\n if (checkWhiteOpponent(((tmp4.getPosX() * 75) + 20), ((tmp4.getPosY() * 75) + 20))) {\n moves.push(validM4);\n break;\n } else {\n break;\n }\n }\n }\n }//end of the loop with x increasing and Y doing nothing...\n return moves;\n }", "public ArrayList<Position> successor(Pawn p) {\n\n // Array to hold the moves of each pawn\n ArrayList<Position> valid_moves = new ArrayList();\n\n // Array to hold the kills of each pawn\n ArrayList<Position> valid_kills = new ArrayList();\n\n // SIMPLE MOVES\n //----------------------------------------------------------------------\n // Initialise the Simple Pawn moves\n Position m1 = new Position((p.getCurrent_position().getX() + 1),\n (p.getCurrent_position().getY() + (1 * p.getDir())));\n Position m2 = new Position((p.getCurrent_position().getX() - 1),\n (p.getCurrent_position().getY() + (1 * p.getDir())));\n Position m3 = new Position((p.getCurrent_position().getX() + 1),\n (p.getCurrent_position().getY() + (1 * (-1) * p.getDir())));\n Position m4 = new Position((p.getCurrent_position().getX() - 1),\n (p.getCurrent_position().getY() + (1 * (-1) * p.getDir())));\n\n if (p.isKing() == true) {\n\n try {\n if (main_board[m3.getX()][m3.getY()].hasPawn() == false) {\n valid_moves.add(m3);\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n\n try {\n if (main_board[m4.getX()][m4.getY()].hasPawn() == false) {\n valid_moves.add(m4);\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n }\n\n try {\n if (main_board[m2.getX()][m2.getY()].hasPawn() == false) {\n valid_moves.add(m2);\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n\n try {\n if (main_board[m1.getX()][m1.getY()].hasPawn() == false) {\n valid_moves.add(m1);\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n\n // KILL MOVES\n //----------------------------------------------------------------------\n if (p.isKing() == true) {\n try {\n if (main_board[m3.getX()][m3.getY()].hasPawn() == true\n && !(p.getColor().equals(main_board[m3.getX()][m3.getY()].getPawn().getColor()))\n && main_board[m3.getX() + 1][m3.getY() - (1 * p.getDir())].hasPawn() == false) {\n Position kill = new Position(m3.getX() + 1, m3.getY() - (1 * p.getDir()));\n valid_kills.add(kill);\n p.set_kill(true);\n kill_found = true;\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n\n try {\n if (main_board[m4.getX()][m4.getY()].hasPawn() == true\n && !(p.getColor().equals(main_board[m4.getX()][m4.getY()].getPawn().getColor()))\n && main_board[m4.getX() - 1][m4.getY() - (1 * p.getDir())].hasPawn() == false) {\n\n Position kill = new Position(m4.getX() - 1, m4.getY() - (1 * p.getDir()));\n valid_kills.add(kill);\n p.set_kill(true);\n kill_found = true;\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n }\n\n try {\n if (main_board[m1.getX()][m1.getY()].hasPawn() == true\n && !(p.getColor().equals(main_board[m1.getX()][m1.getY()].getPawn().getColor()))\n && main_board[m1.getX() + 1][m1.getY() + (1 * p.getDir())].hasPawn() == false) {\n Position kill = new Position(m1.getX() + 1, m1.getY() + (1 * p.getDir()));\n valid_kills.add(kill);\n p.set_kill(true);\n kill_found = true;\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n\n try {\n if (main_board[m2.getX()][m2.getY()].hasPawn() == true\n && !(p.getColor().equals(main_board[m2.getX()][m2.getY()].getPawn().getColor()))\n && main_board[m2.getX() - 1][m2.getY() + (1 * p.getDir())].hasPawn() == false) {\n Position kill = new Position(m2.getX() - 1, m2.getY() + (1 * p.getDir()));\n valid_kills.add(kill);\n p.set_kill(true);\n kill_found = true;\n\n }\n } catch (ArrayIndexOutOfBoundsException exception) {\n }\n \n // SET THE MOVES TO EACH PAWN AND RETURN THEM\n //---------------------------------------------\n if (valid_kills.size() > 0) {\n p.set_moves(valid_kills);\n return valid_kills;\n } else if (valid_moves.size() > 0) {\n p.set_moves(valid_moves);\n return valid_moves;\n } else {\n return null;\n }\n }", "public int[][] getMovesWhitePawn(Pawn p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n if (!p.isDrawn()) { //Sjekker om brikken er brukt før.\n for (int i = (y - 1); i > (y - 3); i--) { //Brikken er brukt før, og sjekker om den kan plasseres\n if (b.getPieceAt(i, x) != null) {//på plassen ovenfor, for så å sjekke om 2 plasser ovenfor.\n break;//Setter plassene som lovlig trekk om den er trekt og om ingen står der fra før.\n } else {\n legalMoves[i][x] = 1;\n }\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y - 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y - 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y - 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y - 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y - 1), (x + 1)).isWhite()) {\n legalMoves[(y - 1)][(x + 1)] = 1;\n }\n }\n }\n } else {//Om brikken har blitt flyttet før. Da kan den bare gå et skritt rett fram, eller diagonalt en vei.\n if ((y - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n\n if (b.getPieceAt((y - 1), x) == null) { //Sjekker om plassen framfor er ledig.\n legalMoves[(y - 1)][x] = 1; //Setter plassen som lovlig trekk. Rett fram.\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y - 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y - 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y - 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y - 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y - 1), (x + 1)).isWhite()) {\n legalMoves[(y - 1)][(x + 1)] = 1;\n }\n }\n }\n }\n\n }\n return legalMoves;\n }", "public abstract List<Move> getLegalMoves(MachineState state, Role role) throws MoveDefinitionException, StateMachineException;", "public int[][] getMovesBlackPawn(Pawn p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n if (!p.isDrawn()) { //Sjekker om brikken er brukt før.\n for (int i = (y + 1); i < (y + 3); i++) { //Brikken er brukt før, og sjekker om den kan plasseres\n if (b.getPieceAt(i, x) != null) {//på plassen ovenfor, for så å sjekke om 2 plasser ovenfor.\n break;//Setter plassene som lovlig trekk om den er trekt og om ingen står der fra før.\n } else {\n legalMoves[i][x] = 1;\n }\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y + 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y + 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y + 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y + 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y + 1), (x + 1)).isWhite()) {\n legalMoves[(y + 1)][(x + 1)] = 1;\n }\n }\n }\n } else {//Om brikken har blitt flyttet før. Da kan den bare gå et skritt rett fram, eller diagonalt en vei.\n if ((y + 1) < 8) { //Sjekker at brikken ikke går utenfor brettet.\n\n if (b.getPieceAt((y + 1), x) == null) { //Sjekker om plassen framfor er ledig.\n legalMoves[(y + 1)][x] = 1; //Setter plassen som lovlig trekk. Rett fram.\n }\n if ((x - 1) > -1) { //Sjekker at brikken ikke går utenfor brettet.\n if (b.getPieceAt((y + 1), (x - 1)) != null) {//Sjekker at plassen diagonalt fram ikke er ledig.\n if (p.isWhite() != b.getPieceAt((y + 1), (x - 1)).isWhite()) {//Sjekker at det er en fiende.\n legalMoves[(y + 1)][(x - 1)] = 1;//Setter plassen som lovlig trekk.\n }\n }\n }\n if ((x + 1) < 8) {//Det samme som if setningen over, bare motsatt diagonal.\n if (b.getPieceAt((y + 1), (x + 1)) != null) {\n if (p.isWhite() != b.getPieceAt((y + 1), (x + 1)).isWhite()) {\n legalMoves[(y + 1)][(x + 1)] = 1;\n }\n }\n }\n }\n\n }\n return legalMoves;\n }", "private Set<Move> getLegalJumps() {\n Set<Move> result = new HashSet<>();\n\n // loop over all pieces\n int max = getNumOfPlaces();\n for (int i = 1; i <= max; i++) {\n Piece p = getPiece(i);\n\n // only look at pieces whose turn it is\n if (p != null && p.color == this.turn) {\n int type = (i - 1) % WIDTH;\n // black pieces (or kings) that are not on Red's last two rows\n if ( (p.color == Color.BLACK || p.isKing) && i <= max - WIDTH) {\n\n // no left edge pieces\n if (type != 0 && type != H_WIDTH) {\n // +7\n if (!hasPieceAt(i + WIDTH - 1)) {\n\n // check that theres a piece to jump\n if (type < H_WIDTH) { // right shifted row\n if (hasPieceAt(i + H_WIDTH) && getColor(i + H_WIDTH) != this.turn)\n result.add(new Move(i, i + WIDTH - 1, i + H_WIDTH));\n } else { // left shifted row\n if (hasPieceAt(i + H_WIDTH - 1) && getColor(i + H_WIDTH - 1) != this.turn)\n result.add(new Move(i, i + WIDTH - 1, i + H_WIDTH - 1));\n }\n }\n }\n\n\n // no right edge pieces\n if (type != H_WIDTH - 1 && type != WIDTH - 1) {\n // +9\n if (!hasPieceAt(i + WIDTH + 1)) {\n\n // check that there's a piece to jump\n if (type < H_WIDTH) {\n if (hasPieceAt(i + H_WIDTH + 1) && getColor(i + H_WIDTH + 1) != this.turn)\n result.add(new Move(i, i + WIDTH + 1, i + H_WIDTH + 1));\n } else {\n if (hasPieceAt(i + H_WIDTH) && getColor(i + H_WIDTH) != this.turn)\n result.add(new Move(i, i + WIDTH + 1, i + H_WIDTH));\n }\n }\n }\n }\n\n // red pieces (or kings) that are not on Black's last two rows\n if ( (p.color == Color.RED || p.isKing) && i > WIDTH) {\n\n // no right edge pieces\n if (type != H_WIDTH - 1 && type != WIDTH - 1) {\n // -7\n if (!hasPieceAt(i - WIDTH + 1)) {\n\n if (type < H_WIDTH) { // right shifted row\n if (hasPieceAt(i - H_WIDTH + 1) && getColor(i - H_WIDTH + 1) != this.turn)\n result.add(new Move(i, i - WIDTH + 1, i - H_WIDTH + 1));\n } else { // left shifted row\n if (hasPieceAt(i - H_WIDTH) && getColor(i - H_WIDTH) != this.turn)\n result.add(new Move(i, i - WIDTH + 1, i - H_WIDTH));\n }\n }\n }\n\n\n // no left edge pieces\n if (type != 0 && type != H_WIDTH) {\n // -9\n if (!hasPieceAt(i - WIDTH - 1)) {\n if (type < H_WIDTH) { // right shifted row\n if (hasPieceAt(i - H_WIDTH) && getColor(i - H_WIDTH) != this.turn)\n result.add(new Move(i, i - WIDTH - 1, i - H_WIDTH));\n } else { // left shifted row\n if (hasPieceAt(i - H_WIDTH - 1) && getColor(i - H_WIDTH - 1) != this.turn)\n result.add(new Move(i, i - WIDTH - 1, i - H_WIDTH - 1));\n }\n }\n }\n }\n }\n }\n\n return result;\n }", "Vector<Point> getPossibleMoves(GameState gameState, Owner symbol);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will show any regular tickets in the input tickets ArrayList.
private static void showAllRegularTickets(ArrayList<Ticket> tickets) { //TODO showAllRegularTickets Code required }
[ "private static void showSummary(ArrayList<Ticket> tickets) {\n //TODO showSummary Code required\n }", "private static void showAllPremiumTickets(ArrayList<Ticket> tickets) {\n //TODO showAllPremiumTickets Code required\n }", "@Override\n\tpublic void allTickets() {\n\t//\tmanyTickets.removeAllElements();\n\t\ttry { // no query needed since it is too simple\n\t\t\tmyRs = myStmt.executeQuery(\"SELECT * FROM schulichairline.bookedtickets\");//For Jonathan\n\t\t\t//myRs = myStmt.executeQuery(\"SELECT * FROM finalproject.bookedtickets\");//For Jacob\n\t\t\twhile(myRs.next()){\n\t\t\t\t// build a single ticket\n\t\t\t\taTicket = new Ticket(myRs.getInt(\"id\"), myRs.getString(\"firstName\"), myRs.getString(\"lastName\"), \n\t\t\t\t\t\tmyRs.getInt(\"flightID\"), myRs.getString(\"dest\"), myRs.getString(\"depart\"),myRs.getString(\"time\"), \n\t\t\t\t\t\tmyRs.getInt(\"duration\"), myRs.getString(\"date\"));\n\t\t\t\t//Add it to the ticket vector\n\t\t\t\tmanyTickets.addElement(aTicket);\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tobjout.writeObject(manyTickets);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error sending data to client\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public void setTickets(String tickets) {\n this.tickets = tickets;\n }", "private TicketList() {\n initTicketList();\n }", "private void loadTickets() {\n\t\topenTickets.clear();\n\t\tclosedTickets.clear();\n\t\tArrayList<Ticket> tickets = jdbc.getTickets();\n\t\t\n\t\tfor (Ticket t : tickets) {\n\t\t\tUser u = jdbc.get_user(t.submittedBy);\n\t\t\tString submittedBy = \"Submitted By: \"+u.get_lastname()+\", \"+u.get_firstname();\n\t\t\tString id = \"Ticket ID: \"+t.ticketID;\n\t\t\tString title = \"Title: \"+t.title;\n\t\t\tif (t.isDone) {\n\t\t\t\tString status = \"Status: Closed\";\n\t\t\t\tString s = String.format(\"%-40s%-40s%-40s%-40s\", id, title, submittedBy, status);\n\t\t\t\tclosedTickets.addElement(s);\n\t\t\t} else {\n\t\t\t\tString status = \"Status: Open\";\n\t\t\t\tString s = String.format(\"%-30s%-30s%-30s%-30s\", id, title, submittedBy, status);\n\t\t\t\topenTickets.addElement(s);\n\t\t\t}\n\t\t}\n\t}", "public Vector getTickets();", "public void ticketsViewer() {\n int pageNumber = 1; //expects that at least 1 with 1 ticket is returned\n String chosenResponse;\n\n while (true) {\n ZendeskPojo response = getTickets(pageNumber);\n if (response != null) {\n\n\n response.getTickets().forEach(ticket -> displayTicket(ticket));\n System.out.println(\"\\nPage Number: \" + pageNumber + \"/\"\n + (response.getCount() / maxPageSize + (response.getCount() % maxPageSize == 0 ? 0 : 1))); //displays current page and the total number of pages.\n\n boolean paginationNeeded = response.getCount() > maxPageSize; //if the count is greater than 25 pages, it's set to true.\n displayTicketsMenuAndGetResponse(paginationNeeded, response, pageNumber);\n while (true) {\n System.out.print(\"ENTER THE CHOICE: \");\n chosenResponse = getInput();\n List<String> validResponses = getTicketsMenuValidResponses(paginationNeeded, response, pageNumber); //valid response for this will change according to the presence of more pages or not.\n if (validResponses.contains(chosenResponse))\n break;\n else\n System.out.println(\"Invalid Input. Please Try again.\");\n }\n\n\n switch (chosenResponse) {\n case \"N\":\n pageNumber++;\n break;\n case \"P\":\n pageNumber--;\n break;\n case \"Q\":\n return;\n case \"V\":\n showTicketByID();\n break;\n default:\n System.out.println(\"Please select from the above options.\");\n break;\n }\n } else\n return;\n }\n }", "public List<Ticket> getTickets() {return tickets;}", "void printTickets(List<Ticket> tickets) throws FileNotFoundException,\n\t\t\tUnsupportedEncodingException, FailedDatabaseOperationException;", "private static void findTicketByName(ArrayList<Ticket> tickets) {\n //TODO findTicketByName Code required\n }", "public String getTickets() {\n return tickets;\n }", "private void displayOneTicket(String id){\n clrscr();\n System.out.println(\"Viewing Ticket Details\\n\");\n try{\n String response = getTickets(\"https://alston.zendesk.com/api/v2/tickets/\" + id +\".json\");\n if(response == null){\n System.out.println(\"Sorry! Failed to find a ticket with ID: \" + id + \" This ticket might not exist.\");\n System.out.println(\"Enter anything to continue...\");\n return;\n }\n JsonParser parser = new JsonParser();\n try{\n JsonObject ticket = parser.parse(response).getAsJsonObject().getAsJsonObject(\"ticket\");\n System.out.printf(\"%-25s%s\\n\", \"ID: \", ticket.get(\"id\").toString());\n System.out.printf(\"%-25s%s\\n\", \"Subject: \", ticket.get(\"subject\").toString());\n\n Date date = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\").parse(ticket.getAsJsonPrimitive(\"created_at\").getAsString());\n System.out.printf(\"%-25s%s\\n\", \"Date Created: \", date);\n\n date = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\").parse(ticket.getAsJsonPrimitive(\"updated_at\").getAsString());\n System.out.printf(\"%-25s%s\\n\", \"Last Updated: \", date);\n\n System.out.printf(\"%-25s%s\\n\", \"Description: \", ticket.getAsJsonPrimitive(\"description\").getAsString().replace(\"\\n\", \"\\n \"));\n System.out.printf(\"%-25s%s\\n\", \"Requester ID: \", ticket.get(\"requester_id\").toString());\n System.out.printf(\"%-25s%s\\n\", \"Submitter ID: \", ticket.get(\"submitter_id\").toString());\n System.out.printf(\"%-25s%s\\n\", \"Organization ID: \", ticket.get(\"organization_id\").toString());\n System.out.printf(\"%-25s%s\\n\", \"Priority: \", ticket.get(\"priority\").toString());\n System.out.printf(\"%-25s%s\\n\", \"Allow Channelback: \", ticket.get(\"allow_channelback\").toString());\n System.out.printf(\"%-25s%s\\n\", \"Allow Attachments: \", ticket.get(\"allow_attachments\").toString());\n System.out.printf(\"%-25s%s\\n\", \"Status: \", ticket.get(\"status\").toString());\n\n String tagString = \"\";\n JsonArray tags = ticket.get(\"tags\").getAsJsonArray();\n for (JsonElement t: tags) {\n tagString += t + \", \";\n }\n if(tagString.length()>2){\n tagString = tagString.substring(0, tagString.length()-2);\n } else {\n tagString = null;\n }\n System.out.printf(\"%-25s%s\\n\", \"Tags: \", tagString);\n\n System.out.println(\"\\nPlease Press \\\"Enter\\\" to go Back\");\n }\n catch(JsonSyntaxException jse){\n System.out.println(\"Not a valid Json String:\"+jse.getMessage());\n } catch (ParseException e) {\n System.out.println(\"Error parsing date while fetching ticket details\");\n e.printStackTrace();\n }\n } catch (IOException e){\n System.out.println(\"Error with HTTP connection while displaying ticket\");\n }\n\n }", "public static void displayEvents(){\r\n\t\tfor(int i=0; i<current_id; i++){\r\n\t\t\tif(event_map.containsKey(i)){\r\n\t\t\t\tEvent event = event_map.get(i);\r\n\t\t\t\tSystem.out.print(\"ID: \" +event.getId() + \", Co-ordanate: (\" + event.getX() + \", \"+event.getY() + \")\\n \");\r\n\t\t\t\tList<Float> tkts = event.getTkts_price_list();\r\n\t\t\t\tif(tkts != null){\r\n\t\t\t\t\tSystem.out.print(\"Price List: \");\r\n\t\t\t\t\tfor(Float price: tkts){\r\n\t\t\t\t\t\tSystem.out.print(\"$\" + price + \"; \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"No tickets left.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t}", "private void updateCurrentTickets(){\n cbTicket.removeAllItems();\n currentTicket = new Ticket(currentFlight, TicketType.ECONOMY);\n cbTicket.addItem(currentTicket);\n cbTicket.addItem(new Ticket(currentFlight, TicketType.BUSINESS));\n cbTicket.addItem(new Ticket(currentFlight, TicketType.FIRST_CLASS));\n }", "List<Ticket>getTickets(){\n \treturn tickets;\n }", "public String navigateTicketList() {\n Tipoticket selected = this.getSelected();\n if (selected != null) {\n TipoticketFacade ejbFacade = (TipoticketFacade) this.getFacade();\n List<Ticket> selectedTicketList = ejbFacade.findTicketList(selected);\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Ticket_items\", selectedTicketList);\n }\n return \"/app/ticket/index\";\n }", "@Override\n\tpublic List<Ticket> showTickets(String username)\n\t{\n\t\tif(custRepository.existsById(username)) {\n//\t\t\tlogger.info(\"Tickets retrieved\");\n\t\treturn custRepository.getOne(username).getMyTickets();\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t}", "public ArrayList<Ticket> getTickets() {\n\t\treturn tickets;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Creates a webtransportconnection if one does not already exist for the given RequestElement
public void openWebTransportConnection() throws IOException{ if(mCurrentRequestElement.webtransportconnection == null){ try{ mCurrentRequestElement.webtransportconnection = new WebTransport("https://" + mCurrentRequestElement.mHostText + ":" + Integer.toString(mCurrentRequestElement.mPortInt) + "/").getConnection(); mCurrentRequestElement.webtransportconnection.open(); } catch(MalformedURLException e){ Log.e(LOG_TAG,e.toString()); } catch (WebTransportException e){ Log.e(LOG_TAG,e.toString()); } catch (KeyManagementException e){ Log.e(LOG_TAG,e.toString()); } catch (IOException e){ mCurrentRequestElement.webtransportconnection = null; throw new IOException(); } } }
[ "private Connection createNewConnection(Endpoint e) {\n\t\tConnection temp;\n\t\ttry {\n\t\t\tConnectionManager.logger.log(Level.FINEST, \"acquiring write lock\");\n\t\t\tconnectionsLock.writeLock().lock();\n\t\t\tConnectionManager.logger.log(Level.FINEST, \"acquired write lock\");\n\t\t\ttemp = connections.get(e);\n\t\t\tif (temp == null) {\n\t\t\t\tConnectionManager.logger.log(Level.FINE, \"Connecting to: \" + e);\n\t\t\t\tConnectionFactory connectionFactory = new ConnectionFactory(this, e);\n\t\t\t\tclientBootstrap.setPipelineFactory(connectionFactory);\n\t\t\t\tChannelFuture future = clientBootstrap.connect(e.getInetAddress());\n\t\t\t\tclientBootstrap.setPipelineFactory(ConnectionFactory.getDummyPipeline());\n\t\t\t\tConnectionManager.logger.log(Level.FINEST, \"started connection\");\n\t\t\t\tconnectionFactory.handleConnectionFuture(future);\n\n\t\t\t\ttemp = connectionFactory.getConnection();\n\t\t\t\tconnections.put(e, temp);\n\t\t\t}\n\t\t} finally {\n\t\t\tconnectionsLock.writeLock().unlock();\n\t\t}\n\t\tConnectionManager.logger.log(Level.FINE, selfEndpoint\n\t\t\t\t+ \" estabilished outgoing connection with \"\n\t\t\t\t+ temp.otherEndpoint);\n\t\treturn temp;\n\t}", "public Request<Connection> create(Connection connection) {\n Asserts.assertNotNull(connection, \"connection\");\n\n String url = baseUrl\n .newBuilder()\n .addPathSegments(\"api/v2/connections\")\n .build()\n .toString();\n BaseRequest<Connection> request = new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.POST, new TypeReference<Connection>() {\n });\n request.setBody(connection);\n return request;\n }", "private void createAndStartConnectionThread() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n boolean success = webSocketConnection.createAndConnectTCPSocket();\n if (success) {\n webSocketConnection.startConnection();\n }\n } catch (Exception e) {\n synchronized (globalLock) {\n if (isRunning) {\n webSocketConnection.closeInternal();\n\n onException(e);\n\n if (e instanceof IOException && automaticReconnection) {\n createAndStartReconnectionThread();\n }\n }\n }\n }\n }\n }).start();\n }", "public WebSocket doWebSocketConnect(HttpServletRequest request, String protocol)\n {\n if (\"chat\".equals(protocol))\n return new ChatWebSocket();\n return null;\n }", "public T caseTransportConnection(TransportConnection object) {\r\n\t\treturn null;\r\n\t}", "abstract WebRequest createGetRequest(String url);", "private void createAndStartReconnectionThread() {\n reconnectionThread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(waitTimeBeforeReconnection);\n\n synchronized (globalLock) {\n if (isRunning) {\n webSocketConnection = new WebSocketConnection();\n createAndStartConnectionThread();\n }\n }\n } catch (InterruptedException e) {\n // Expected behavior when the WebSocket connection is closed\n }\n }\n });\n reconnectionThread.start();\n }", "public static URLConnection createURLConnection(String url) throws Exception {\n\t\tURLConnection myURL = new URL(url).openConnection();\n\t\tmyURL.setRequestProperty(REQUEST_PROPERTY[0], REQUEST_PROPERTY[1]);\n\t\t\n\t\treturn myURL;\n\t}", "private HttpURLConnection buildConnection(String urlString){\n try {\n URL url = new URL(urlString);\n\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n return connection;\n } catch (Exception e){\n Log.e(TAG, \"Unable to build a connection!\");\n }\n\n return null;\n }", "private ApplicableElement createAndAddApplicableElement(Element element) {\n\t\tApplicableElement newApplicableElement = cacheManager\n\t\t\t\t.createApplicableElement(element);\n\t\treturn newApplicableElement;\n\t}", "public void addConnection( Connection connection ){ connections.add(connection); }", "public Connection getConnection(Endpoint e) {\n\t\tConnection temp;\n\t\ttry {\n\t\t\tconnectionsLock.readLock().lock();\n\t\t\tif (!running)\n\t\t\t\treturn null;\n\t\t\ttemp = connections.get(e);\n\t\t} finally {\n\t\t\tconnectionsLock.readLock().unlock();\n\t\t}\n\t\tif (temp == null) {\n\t\t\tConnectionManager.logger.log(Level.FINE, \"connection to: \" + e\n\t\t\t\t\t+ \" not found, creating new connection.\");\n\t\t\ttemp = createNewConnection(e);\n\t\t}\n\t\treturn temp;\n\t}", "public abstract WSDLComponent create(WSDLComponent container, Element element);", "private HttpURLConnection getUrlConnection(GenericRequest request){\n URL url;\n HttpURLConnection connection = null;\n try {\n //Create connection\n url = new URL(request.getUri().toString());\n connection = (HttpURLConnection) url.openConnection();\n connection.setConnectTimeout(CONNECT_TIMEOUT);\n connection.setReadTimeout(READ_DATA_TIMEOUT);\n\n //For api < 2.3.3 needs to be told to allow redirects\n connection.setInstanceFollowRedirects(true);\n// connection.getInstanceFollowRedirects();\n\n connection.setRequestProperty(UrlHeaders.HEADER_CONTENT_LANGUAGE, \"en-US\");\n\n connection.setUseCaches(false);\n connection.setDoInput(true);\n\n connection.setRequestMethod(request.getHttpMethod());\n\n connection = setConnectionCookies(connection);\n\n if(request.isWritableCall()){\n connection.setRequestProperty(UrlHeaders.HEADER_CONTENT_TYPE,\n request.getContentType());\n connection.setDoOutput(true);\n }\n }catch(Exception e) {\n\n e.printStackTrace();\n return null;\n }\n\n return connection;\n }", "@Override\n protected URLConnection openConnection(URL u) throws IOException {\n if (cacheURL != null && u == cacheURL) {\n if (\"jar\".equals(cacheURL.getProtocol())) {\n return new CachedResourceJarURLConnection(resourceURL, root, webAppPath, usesClassLoaderResources);\n } else {\n return new CachedResourceURLConnection(resourceURL, root, webAppPath, usesClassLoaderResources);\n }\n } else {\n // This stream handler has been inherited by a URL that was constructed from a cache URL.\n // We need to break that link.\n URI constructedURI;\n try {\n constructedURI = new URI(u.toExternalForm());\n } catch (URISyntaxException e) {\n // Not ideal but consistent with API\n throw new IOException(e);\n }\n URL constructedURL = constructedURI.toURL();\n return constructedURL.openConnection();\n }\n }", "Object create(Element element) throws IOException, SAXException, ParserConfigurationException;", "public Websocket prepareWithId(String url,String id) {\n\t\tWebsocket ws = new Websocket(url);\n\t\tsockets.put(id,ws);\n\t\tws.open();\n\t\treturn ws;\n\t}", "public static RvConnection fromXML(Element element) {\n checkArgument(XML_ELEMENT.equals(element.getLocalName()), \"The element’s localname must be %s.\", XML_ELEMENT);\n checkArgument(XMLBuilder.NS_RENDEZVOUS.equals(element.getNamespaceURI()), \"The element must be in the namespace %s.\", XMLBuilder.NS_RENDEZVOUS);\n final String service = element.getAttributeValue(KEY_SERVICE);\n final String network = element.getAttributeValue(KEY_NETWORK);\n final String daemon = element.getAttributeValue(KEY_DAEMON);\n final RvConnection conn = new RvConnection(service, network, daemon);\n conn.setDescription(element.getAttributeValue(KEY_DESCRIPTION));\n final Elements subjects = element.getChildElements(XML_SUBJECT, XMLBuilder.NS_RENDEZVOUS);\n for (int i = 0, imax = subjects.size(); i < imax; ++i) {\n conn.addSubject(subjects.get(i).getValue());\n }\n return conn;\n }", "public static synchronized ProxyServer getInstance(Element element) {\n\t\tif (proxyServer == null) {\n\t\t\tif (!element.getTagName().equals(\"ProxyServer\")) {\n\t\t\t\telement = XmlUtil.getFirstNamedChild(element, \"ProxyServer\");\n\t\t\t}\n\t\t\tif (element != null) {\n\t\t\t\treturn getInstance(\n\t\t\t\t\t\t\telement.getAttribute(\"proxyIPAddress\"),\n\t\t\t\t\t\t\telement.getAttribute(\"proxyPort\"),\n\t\t\t\t\t\t\telement.getAttribute(\"proxyUsername\"),\n\t\t\t\t\t\t\telement.getAttribute(\"proxyPassword\") );\n\t\t\t}\n\t\t\telse return getInstance(\"\", \"\", \"\", \"\");\n\t\t}\n\t\treturn proxyServer;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Are NULL values sorted at the start regardless of sort order?
public boolean nullsAreSortedAtStart() throws SQLException { return false; }
[ "public boolean nullsAreSortedAtStart()\n throws SQLException\n {\n return false;\n }", "public boolean nullsAreSortedLow()\n throws SQLException\n {\n return true;\n }", "public boolean nullsAreSortedLow()\n throws SQLException\n {\n // The SimpleText driver does not support nulls (or sorting, for\n // that matter)\n\n return false;\n }", "public boolean nullsAreSortedHigh()\n throws SQLException\n {\n return false;\n }", "public boolean nullsAreSortedLow() throws SQLException {\n return true;\n }", "boolean getSortNoNull();", "public boolean nullsAreSortedAtStart()\n throws SQLException\n {\n // The SimpleText driver does not support nulls (or sorting, for\n // that matter)\n\n return false;\n }", "public boolean nullsAreSortedHigh() throws SQLException {\n return false;\n }", "public boolean nullsAreSortedHigh()\n throws SQLException\n {\n // The SimpleText driver does not support nulls (or sorting, for\n // that matter)\n\n return false;\n }", "boolean getOrderByNull();", "public boolean nullsAreSortedAtEnd()\n throws SQLException\n {\n // The SimpleText driver does not support nulls (or sorting, for\n // that matter)\n\n return false;\n }", "boolean getMoveSortNoNull();", "public boolean isNotNullSortOrder() {\n return genClient.cacheValueIsNotNull(CacheKey.sortOrder);\n }", "public boolean getSortNoNull() {\n return sortNoNull_;\n }", "public JwComparator<AcActionAutoCorrectedLog> getCorrectedDataComparatorNullsLower()\n {\n return CorrectedDataComparatorNullsLower;\n }", "@Test\r\n public void testNull() {\n \tdouble[] input = null;\r\n \tdouble[] output = null;\r\n \t\r\n \t//test every sort method\r\n \tSortComparison.insertionSort(input);\r\n \tassertTrue(Arrays.equals(input, output));\r\n \tSortComparison.selectionSort(input);\r\n \tassertTrue(Arrays.equals(input, output));\r\n \tSortComparison.quickSort(input);\r\n \tassertTrue(Arrays.equals(input, output));\r\n \tSortComparison.mergeSortRecursive(input);\r\n \tassertTrue(Arrays.equals(input, output));\r\n \tSortComparison.mergeSort(input);\r\n \tassertTrue(Arrays.equals(input, output));\r\n }", "public JwComparator<AcItem> getScanTagComparatorNullsLower()\n {\n return ScanTagComparatorNullsLower;\n }", "@Test\n public void testNullElements() {\n ArrayList<Flight> nullFlights = new ArrayList<>();\n nullFlights.add(null);\n nullFlights.add(null);\n sortFlights.sortFlightsBy(nullFlights, SortFlights.SortParameter.TIME);\n for (Flight f : nullFlights) {\n // All elements should still just be null\n assertNull(f);\n }\n }", "public JwComparator<AcItem> getTagComparatorNullsLower()\n {\n return TagComparatorNullsLower;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }