query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
and csmi_certify_type <= ? | public M csmiCertifyTypeMax(Object max){this.put("csmiCertifyTypeMax", max);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean testCategory(EIfcmaterialconstituent type) throws SdaiException;",
"private static String segOnsetCtype(Item seg, String ctype) {\n\t\tItem daughter = seg.getItemAs(Relation.SYLLABLE_STRUCTURE).getParent().getDaughter();\n\n\t\twhile (daughter != null) {\n\t\t\tif (\"+\".equals(getPhoneFeature(daughter, \"vc\"))) {\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t\tif (ctype.equals(getPhoneFeature(daughter, \"ctype\"))) {\n\t\t\t\treturn \"1\";\n\t\t\t}\n\n\t\t\tdaughter = daughter.getNext();\n\t\t}\n\t\treturn \"0\";\n\t}",
"public boolean testConstructiontype(EIfcdoorstyle type) throws SdaiException;",
"public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}",
"public boolean testParametertakesprecedence(EIfcdoorstyle type) throws SdaiException;",
"public M csmiCertifyTypeMin(Object min){this.put(\"csmiCertifyTypeMin\", min);return this;}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public boolean estSurLaCase(ICase c) ;",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.ComplianceCheckResult getComplianceCheckResult();",
"@Override\r\n\tpublic String getType() {\n\t\treturn \"Concert\";\r\n\t}",
"int insertSelective(TdxNoticeCertificate record);",
"protected boolean mo4002a(C2007e c2007e) {\n return ((float) c2007e.getData().m15597k()) < ((float) c2007e.getMaxVisibleCount()) * this.o.m15882q();\n }",
"private boolean checkCustomerID(int CusIDPty, int CusID) {\n\t\tint getCusIDPtyValue = 0 ; \t\t\r\n\t\ttry {\r\n\t\t\tgetCusIDPtyValue = SDKSession.getCameraPropertyClint().getCurrentPropertyValue(CusIDPty);\r\n\t\t} catch (IchInvalidSessionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchSocketException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchCameraModeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchDevicePropException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\tif ((getCusIDPtyValue & 0xffff) == (CusID & 0xffff) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}",
"boolean hasC3();",
"private void periodCertification() {\n if (((st0 & MASK) == 0) && (st1 == 0) && (st2 == 0) && (st3 == 0)) {\n st0 = 'T';\n st1 = 'I';\n st2 = 'N';\n st3 = 'Y';\n }\n }",
"private static String segCodaCtype(Item seg, String ctype) {\n\t\tItem daughter = seg.getItemAs(Relation.SYLLABLE_STRUCTURE).getParent().getLastDaughter();\n\n\t\twhile (daughter != null) {\n\t\t\tif (\"+\".equals(getPhoneFeature(daughter, \"vc\"))) {\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t\tif (ctype.equals(getPhoneFeature(daughter, \"ctype\"))) {\n\t\t\t\treturn \"1\";\n\t\t\t}\n\n\t\t\tdaughter = daughter.getPrevious();\n\t\t}\n\t\treturn \"0\";\n\t}",
"boolean isSetCit();",
"public void setCertiType(java.lang.String certiType) {\n this.certiType = certiType;\n }",
"private boolean canPrintContratEngagement(ContratDTO c)\r\n\t{\n\t\tif (new EditionSpeService().needEngagement(c.modeleContratId)==false)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tswitch (peMesContrats.canPrintContratEngagement)\r\n\t\t{\r\n\t\tcase TOUJOURS:\r\n\t\t\treturn true;\r\n\t\t\t\r\n\t\tcase JAMAIS:\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\tcase APRES_DATE_FIN_DES_INSCRIPTIONS:\r\n\t\t\tDate dateRef = DateUtils.getDateWithNoTime();\r\n\t\t\treturn dateRef.after(c.dateFinInscription);\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new AmapjRuntimeException();\r\n\t\t}\r\n\t}",
"if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }",
"boolean isSetCryptProviderTypeExt();",
"boolean mo6498O(C41531v c41531v);",
"public void setIsCert(Integer isCert) {\n\t\tthis.isCert = isCert;\n\t}",
"boolean isSetCapitalPayed();",
"private boolean checkVisualCondition(final String[] condArray) throws Exception {\r\n\t\t//boolean isDisplay = true ; // remarked by Leo YEUNG for testing\r\n\t\tboolean isDisplay = false ;\r\n\t\tint CondPassCount = 0; //Use to count the number of Boolean expressions passed\t\t\t\t\t\t \r\n\t\tint CondAmount = condArray.length;//Total number of Boolean expressions in this Node\r\n\t\t//Loop for all Boolean expressions in one conditon\t\t\t \r\n\t\tfor (int k=0; k<CondAmount; k++) {\t\t \t\t\t\t\t\r\n\t\t\tif (CondPassCount<k) break;\t //Exit the following condition check while one of the Boolean expresssion is failure which save the loop time\r\n\t\t\t//Loop for sort out different Attribute\r\n\t\t\tfor (int m=0; m<conAttName.length; m++) {\r\n\t\t\t\tint previousCondPassCount = CondPassCount;//a value use to check the Boolean expresssion is failure\r\n\t\t\t\tif (condArray[k].toUpperCase().startsWith(conAttName[m].toUpperCase())){ \r\n\t\t\t\t\tfinal String tempConAttType = conAttType[m]; // ldap attribute type\r\n\t\t\t\t\tfinal String tempValue = condArray[k].substring(conAttName[m].length());\r\n\t\t\t\t\tfinal int tempColonIndex = condArray[k].indexOf(\"\\\"\");\r\n\t\t\t\t\tfinal String attName = condArray[k].substring(0,conAttName[m].length()); \t \t\t\t \t\t \t\t\t\t //Attribute Name\r\n\t\t\t\t\tfinal String attCond = condArray[k].substring(conAttName[m].length(),tempColonIndex); //Attribute condition syntax\r\n\t\t\t\t\tfinal String attVal = condArray[k].substring(tempColonIndex+1,condArray[k].lastIndexOf(\"\\\"\"));//Attribute Value\r\n\t\t\t\t\tint k2 = k+1;\r\n\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" checking for \" + condArray[k]+\" Start\");\r\n\t\t\t\t\t//Condition Greater Than\r\n\t\t\t\t\tif (attCond.equalsIgnoreCase(Constant.gt)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null){\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) > 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater Than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo > intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Less Than\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.lt)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) < 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo < intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Greater and Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.ge)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) >= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t} catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo >= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Less and Equal\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.le)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) <= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition::\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo <= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.equal)){ //Equal\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\t\tif (strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo == intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not Equal to\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_equal)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (!strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Not equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo != intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)!=-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Start with\t \t \r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.start_with)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition\tNot contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)==-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not start with\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_start_with)){\r\n\t\t\t\t\t\tif (!((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Finally, Syntax Error\t \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlogger.error(\"checkVisualCondition:Invalid condition syntax found: \" + attCond);\r\n\t\t\t\t\t} \r\n\t\t\t\t}\t\r\n\t\t\t\tif (previousCondPassCount<CondPassCount) break; // condition passed. Exit the for loop\r\n\t\t\t}\r\n\t\t\tif (CondPassCount == CondAmount) isDisplay = true;\r\n\t\t}\r\n\t\t//logger.debug(\"checkVistualCondition: isDisplay = \" + isDisplay);\r\n\t\t//logger.debug(\"checkVistualCondition: CondPassCount = \" + CondPassCount);\r\n\t\t//logger.debug(\"checkVistualCondition: CondAmount = \" + CondAmount);\r\n\t\treturn isDisplay;\r\n\t}",
"public String getCollectCondition()\n\t{\n\t\tStringBuffer stbf = new StringBuffer(256) ;\n\t\tboolean existFlg = false ;\n\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableCollect() != null)\n\t\t\t{\n\n\t\t\t\t//#CM708969\n\t\t\t\t// Edit acquisition Condition + acquisition column when acquisition Condition is described clearly. \n\t\t\t\tif (!ky.getTableCollect().trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableCollect()) ;\n\t\t\t\t\tstbf.append(\"(\") ;\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\") \") ;\n\t\t\t\t\tint wPnt = ky.getTableColumn().indexOf(\".\") ;\n\n\t\t\t\t\tif (wPnt >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn().substring((wPnt + 1))) ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\t}\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstbf.append(ky.getTableColumn()) ;\n\t\t\t\t\tstbf.append(\", \") ;\n\t\t\t\t}\n\n\t\t\t\tif (existFlg == false)\n\t\t\t\t\texistFlg = true ;\n\t\t\t}\n\t\t}\n\t\t//#CM708970\n\t\t// Return '*' as all item acquisition when data is not set in the key value. \n\t\tif (existFlg == false)\n\t\t\treturn null ;\n\n\t\t//#CM708971\n\t\t// The last \"\"is removed because it is extra. \n\t\tint ep = stbf.toString().lastIndexOf(\",\") ;\n\t\treturn stbf.toString().substring(0, ep) ;\n\t}",
"protected boolean isConsistentWith(BasisCondition uc)\n{\n if (uc instanceof BasisConditionDuration) {\n BasisConditionDuration bct = (BasisConditionDuration) uc;\n if (bct.base_condition == bct.base_condition) {\n\t if (max_time <= bct.min_time || min_time >= bct.max_time) return false;\n\t return true;\n }\n }\n\n return base_condition.isConsistentWith(uc);\n}",
"public boolean testDescription(EIfcmaterialconstituent type) throws SdaiException;",
"public boolean testPredefinedtype(EIfccablecarrierfitting type) throws SdaiException;",
"switch (buffer[ISO7816.OFFSET_CDATA + 4]) {\r\n\t\tcase BASIC:\r\n\t\t\tsetSignatureType(BASIC);\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATION: // use authentication private key\r\n\t\t\tsetSignatureType(AUTHENTICATION);\r\n\t\t\tbreak;\r\n\t\tcase NON_REPUDIATION: // use non repudiation private key\r\n\t\t\tsetSignatureType(NON_REPUDIATION);\r\n\t\t\tbreak;\r\n\t\tcase CA_ROLE:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_DATA);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\tdefault:\r\n\t\t\tsetSignatureType(NO_SIGNATURE);\r\n\t\t\tISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);\r\n\t\t\tbreak; //~allow_dead_code\r\n\t\t}",
"public void setGBInterval_iscomp(gov.nih.nlm.ncbi.www.soap.eutils.efetch_seq.GBInterval_iscomp_type0 param){\n localGBInterval_iscompTracker = param != null;\n \n this.localGBInterval_iscomp=param;\n \n\n }",
"boolean hasC();",
"public boolean testOperationtype(EIfcdoorstyle type) throws SdaiException;",
"FilterCondition createFilterCondition(int clueNum);",
"static int type_of_cpe(String passed){\n\t\treturn 1;\n\t}",
"boolean isSetNcbi8Aa();",
"public int getCpscCase() { return cpscCase; }",
"boolean hasHas_certainty();",
"public void setCpscCase(int cpscCase) { this.cpscCase = cpscCase; }",
"public boolean isCompletelyGeneralized(HashGroupifyEntry entry) {\n if (entry.hashcode != this.suppressedHashCode) {\n return false;\n }\n int column = 0;\n entry.read();\n while (entry.hasNext()) {\n if (suppressedCodes[column++] != (entry.next() & Data.REMOVE_OUTLIER_MASK)) {\n return false;\n }\n }\n return true;\n }",
"static int type_of_cz(String passed){\n\t\treturn 1;\n\t}",
"Datatype internalize(Datatype arg) throws CCAException;",
"int insertSelective(PcQualificationInfo record);",
"public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}",
"private void convertReqsInCriterions(){\n\t\tArrayList<Criterion> criteria = this.data.getCriteria();\n\t\t\n\t\tfor(Requirement req : this.data.getRequirements()){\n\t\t\tif(req.isCriterion()){\n\t\t\t\t//create new criterion\n\t\t\t\tCriterion crit = new Criterion();\n\t\t\t\tif(req.getQuantType() != null)\n\t\t\t\t\tcrit.setName(req.getQuantType().getValue());\n\t\t\t\telse if(req.getQualType() != null)\n\t\t\t\t\tcrit.setName(req.getQualType().getValue());\n\t\t\t\telse\n\t\t\t\t\t//this is a price requirement\n\t\t\t\t\tcrit.setName(\"price\");\n\t\t\t\t\n\t\t\t\tString[] msg = {crit.getName(), \"General\"};\n\t\t\t\tif(this.methodID == CloudAid.SAW){\n\t\t\t\t\tFloat weight = Float.parseFloat(CloudAid.askData(CloudAid.GET_WEIGHT, msg, null));\n\t\t\t\t\tcrit.setWeight(weight);\n\t\t\t\t}\n\t\t\t\t//get the criterion preference direction\n\t\t\t\tString res = CloudAid.askData(CloudAid.GET_PREFERENCE_DIRECTION, msg, null);\n\t\t\t\tif(res.equalsIgnoreCase(\"y\")){\n\t\t\t\t\tcrit.setPreferenceDirection(\"max\");\n\t\t\t\t}else if(res.equalsIgnoreCase(\"n\")){\n\t\t\t\t\tcrit.setPreferenceDirection(\"min\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcriteria.add(crit);\n\t\t\t}\n\t\t}\n\t\tthis.data.setCriteria(criteria);\n\t\t\n\t\t//convert each serpiceTemplate requirements\n\t\tfor(ServiceTemplate template : this.data.getServiceTemplates()){\n\t\t\tArrayList<Criterion> templateCriteria = template.getCriteria();\n\t\t\tfor(Requirement req: template.getRequirements()){\n\t\t\t\tif(req.isCriterion()){\n\t\t\t\t\t//create new criterion\n\t\t\t\t\tCriterion crit = new Criterion();\n\t\t\t\t\tif(req.getQuantType() != null)\n\t\t\t\t\t\tcrit.setName(req.getQuantType().getValue());\n\t\t\t\t\telse if(req.getQualType() != null)\n\t\t\t\t\t\tcrit.setName(req.getQualType().getValue());\n\t\t\t\t\telse\n\t\t\t\t\t\t//this is a price requirement\n\t\t\t\t\t\tcrit.setName(\"price\");\n\t\t\t\t\t\n\t\t\t\t\tString[] msg = {crit.getName(), template.getType()};\n\t\t\t\t\tif(this.methodID == CloudAid.SAW){\n\t\t\t\t\t\tFloat weight = Float.parseFloat(CloudAid.askData(CloudAid.GET_WEIGHT, msg, null));\n\t\t\t\t\t\tcrit.setWeight(weight);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//get the criterion preference direction\n\t\t\t\t\tString res = CloudAid.askData(CloudAid.GET_PREFERENCE_DIRECTION, msg, null);\n\t\t\t\t\tif(res.equalsIgnoreCase(\"y\")){\n\t\t\t\t\t\tcrit.setPreferenceDirection(\"max\");\n\t\t\t\t\t}else if(res.equalsIgnoreCase(\"n\")){\n\t\t\t\t\t\tcrit.setPreferenceDirection(\"min\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttemplateCriteria.add(crit);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemplate.setCriteria(templateCriteria);\n\t\t}\n\t}",
"boolean canCrit();",
"boolean isSatisfiableFor(AResourceType type, int amount) ;",
"private void checkConditionsToInteroperate(AID client) {\r\n\t\tif (!client.equals(TRUSTED_AID_1))\r\n\t\t\tISOException.throwIt(SW_CLIENT_UNAUTHORISED);\r\n\t\tif (image.isActive())\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t}",
"public void setAttVCA(int att){\n\t\t\n\t\tsuper.setAttVCA((att == 0)? 1 : att );\n\t}",
"boolean hasSecIdType();",
"void xsetCapitalInKind(ch.crif_online.www.webservices.crifsoapservice.v1_00.NullableBoolean capitalInKind);",
"if(true==adhocTicket.isPaid()){\n System.out.println(\"isPaid() is passed\");\n }",
"boolean mo6499P(C41531v c41531v);",
"public boolean testMaterial(EIfcmaterialconstituent type) throws SdaiException;",
"static int type_of_cnz(String passed){\n\t\treturn 1;\n\t}",
"public boolean isAllCap() throws PDFNetException {\n/* 605 */ return IsAllCap(this.a);\n/* */ }",
"boolean hasGcj02();",
"org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv xgetCryptProviderType();",
"int updateByPrimaryKeySelective(TdxNoticeCertificate record);",
"protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}",
"protected abstract boolean approvedForClass(Course c);",
"public boolean isCertificadoActivo(ComunidadQueryBean query){\r\n\t\tif(query.getHashCertificado()!=null){\r\n\t\t\tJugComunidadCertificado entity= comunidadRepository.getCertificadoByHashComunidad(query);\r\n\t\t\tif(entity.getIndActivo()==1) \r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"static int type_of_cpo(String passed){\n\t\treturn 1;\n\t}",
"@Override\r\n public boolean isCompatible(QosLiveliness requested) {\r\n if ((kind >= requested.kind) && (lease_duration.asMillis() <= requested.lease_duration.asMillis())) {\r\n return true;\r\n }\r\n return false;\r\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.ComplianceCheckResult addNewComplianceCheckResult();",
"final void checkForComodification() {\n\t}",
"org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv.Enum getCryptProviderType();",
"boolean hasI11();",
"int isProduitFormateUniteValide(ProduitFormate produitFormate, Uniteproduit uniteproduit);",
"private void CustomerPaidCheck() {\n\t\tfloat CompanyDemand = Float.parseFloat(label_7.getText());\n\t\tif (CompanyDemand > 0) {\n\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t\t.prepareStatement(\"update customer_list set `Check` = 0 where Name = '\"\n\t\t\t\t\t\t\t\t+ name + \"'And Last_Name = '\" + lastName + \"' \");\n\t\t\t\tstatement.execute();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t\t.prepareStatement(\"update customer_list set `Check` = 1 where Name = '\"\n\t\t\t\t\t\t\t\t+ name + \"'And Last_Name = '\" + lastName + \"' \");\n\t\t\t\tstatement.execute();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"boolean hasReqardTypeThree();",
"public static boolean isCourseCancellable(Connection conn,String kix,String user) throws SQLException {\n\n\t\t//Logger logger = Logger.getLogger(\"test\");\n\n\t\tboolean cancellable = false;\n\t\tString proposer = \"\";\n\t\tString progress = \"\";\n\n\t\ttry {\n\t\t\tString[] info = getKixInfo(conn,kix);\n\t\t\tString alpha = info[0];\n\t\t\tString num = info[1];\n\t\t\tString campus = info[4];\n\n\t\t\tString sql = \"SELECT edit,proposer,progress FROM tblfnd WHERE historyid=?\";\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\n\t\t\tps.setString(1,kix);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tcancellable = rs.getBoolean(1);\n\t\t\t\tproposer = rs.getString(2);\n\t\t\t\tprogress = rs.getString(3);\n\t\t\t}\n\n\t\t\t// only the proposer may cancel a pending course\n\t\t\tif (cancellable && user.equals(proposer) &&\n\t\t\t\t(\tprogress.equals(Constant.FND_MODIFY_TEXT) ||\n\t\t\t\t\tprogress.equals(Constant.FND_DELETE_TEXT) ||\n\t\t\t\t\tprogress.equals(Constant.FND_REVISE_TEXT)\n\t\t\t\t)){\n\t\t\t\tcancellable = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcancellable = false;\n\t\t\t}\n\n\t\t\trs.close();\n\t\t\tps.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.fatal(\"FndDB.isCourseCancellable - \" + e.toString());\n\t\t\tcancellable = false;\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"FndDB.isCourseCancellable - \" + e.toString());\n\t\t\tcancellable = false;\n\t\t}\n\n\t\treturn cancellable;\n\t}",
"private boolean verifyDocType() {\n if (getC_DocType_ID() == 0) {\n return false;\n }\n //\n Boolean invoiceSO = null;\n //\tCheck Invoice First\n if (getC_Invoice_ID() > 0) {\n String sql = \"SELECT idt.IsSOTrx \"\n + \"FROM C_Invoice i\"\n + \" INNER JOIN C_DocType idt ON (i.C_DocType_ID=idt.C_DocType_ID) \"\n + \"WHERE i.C_Invoice_ID=?\";\n PreparedStatement pstmt = null;\n try {\n pstmt = DB.prepareStatement(sql, get_TrxName());\n pstmt.setInt(1, getC_Invoice_ID());\n ResultSet rs = pstmt.executeQuery();\n if (rs.next()) {\n invoiceSO = new Boolean(\"Y\".equals(rs.getString(1)));\n }\n rs.close();\n pstmt.close();\n pstmt = null;\n } catch (Exception e) {\n log.log(Level.SEVERE, sql, e);\n }\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n pstmt = null;\n } catch (Exception e) {\n pstmt = null;\n }\n }\t//\tInvoice\n\n //\tDocumentType\n Boolean paymentSO = null;\n PreparedStatement pstmt = null;\n String sql = \"SELECT IsSOTrx \"\n + \"FROM C_DocType \"\n + \"WHERE C_DocType_ID=?\";\n try {\n pstmt = DB.prepareStatement(sql, get_TrxName());\n pstmt.setInt(1, getC_DocType_ID());\n ResultSet rs = pstmt.executeQuery();\n if (rs.next()) {\n paymentSO = new Boolean(\"Y\".equals(rs.getString(1)));\n }\n rs.close();\n pstmt.close();\n pstmt = null;\n } catch (Exception e) {\n log.log(Level.SEVERE, sql, e);\n }\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n pstmt = null;\n } catch (Exception e) {\n pstmt = null;\n }\n //\tNo Payment info\n if (paymentSO == null) {\n return false;\n }\n setIsReceipt(paymentSO.booleanValue());\n\n //\tWe have an Invoice .. and it does not match\n if (invoiceSO != null\n && invoiceSO.booleanValue() != paymentSO.booleanValue()) {\n return false;\n }\n //\tOK\n return true;\n }",
"boolean hasExternalAttributionCredit();",
"private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }",
"private boolean getCashStatus(String type) {\n boolean flag = false;\n if (type.equalsIgnoreCase(PdfConstants.PROMO_CREDIT) || type.equalsIgnoreCase(PdfConstants.BLACKHAWK)\n || type.equalsIgnoreCase(PdfConstants.PRECASH) || type.equalsIgnoreCase(PdfConstants.INCOMM)) {\n flag = true;\n }\n return flag;\n }",
"boolean hasCurrencyConstant();",
"public void evel_thresholdcross_type_set(String type)\r\n\t{\r\n\t EVEL_ENTER();\r\n\r\n\t /***************************************************************************/\r\n\t /* Check preconditions and call evel_header_type_set. */\r\n\t /***************************************************************************/\r\n\t assert(type!=null);\r\n\t assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING);\r\n\t evel_header_type_set(type);\r\n\r\n\t EVEL_EXIT();\r\n\t}",
"@Test\n public void test02ConfRespSignedByDefaultCA() throws Exception {\n log.trace(\">test02ConfRespSignedByDefaultCA\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, this.testx509ca.getSubjectDN());\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n // the parameter 'null' is to generate a confirm request for a recipient that does not exist\n PKIMessage confirm = genCertConfirm(userDN, null, nonce, transid, hash, 0, PKCSObjectIdentifiers.sha1WithRSAEncryption);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha1WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test02ConfRespSignedByDefaultCA\");\n }",
"int updateByPrimaryKeySelective(PcQualificationInfo record);",
"private boolean isContractionTag(int ce)\n {\n return RuleBasedCollator.isSpecial(ce) &&\n RuleBasedCollator.getTag(ce) == CE_CONTRACTION_TAG_;\n }",
"@Test\n public void testBoundsAsCompositesWithSingleEqAndMultiEqRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC, Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n ByteBuffer value4 = ByteBufferUtil.bytes(4);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) = (2, 3)\n Restriction singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction multiEq = newMultiEq(cfMetaData, 1, value2, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiEq);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n // clustering_0 = 1 AND clustering_1 = 2 AND (clustering_2, clustering_3) = (3, 4)\n singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction singleEq2 = newSingleEq(cfMetaData, 1, value2);\n multiEq = newMultiEq(cfMetaData, 2, value3, value4);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(singleEq2).mergeWith(multiEq);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.END);\n\n // (clustering_0, clustering_1) = (1, 2) AND clustering_2 = 3\n singleEq = newSingleEq(cfMetaData, 2, value3);\n multiEq = newMultiEq(cfMetaData, 0, value1, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiEq);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) = (2, 3) AND clustering_3 = 4\n singleEq = newSingleEq(cfMetaData, 0, value1);\n singleEq2 = newSingleEq(cfMetaData, 3, value4);\n multiEq = newMultiEq(cfMetaData, 1, value2, value3);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiEq).mergeWith(singleEq2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.END);\n }",
"boolean contemProfessor(String cpf);",
"public void creditCardHandler(Applicant aplcnt) {\n\ndouble grossIncome=aplcnt.getGrossIncome();\n\t\tif(grossIncome>50000 && grossIncome<100000)\n\t\t{\n\t\t\taplcnt.setCreditlimit(2000);\n\t\t\taplcnt.setCreditCardStatus(true);\n\t\t}\n\t\telse if(grossIncome>100000)\n\t\t{\n\t\t\taplcnt.setCreditlimit(5000);\n\t\t\taplcnt.setCreditCardStatus(true);\n\t\t}\n\t\t\n\t\telse{\n\t\t\taplcnt.setCreditlimit(0);\n\t\t\taplcnt.setCreditCardStatus(false);\n\t\t\t\n\t\t}\n\t\tCreditCardDao ccd=new CreditCardDao();\n\t\tccd.display(aplcnt);\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void setAccidentCircumstance(typekey.AccidentCircumstancePEL value);",
"@Generated\n @Selector(\"isConstrained\")\n public native boolean isConstrained();",
"@Test\n @Tag(\"bm1000\")\n public void testCAPRI() {\n CuteNetlibCase.doTest(\"CAPRI.SIF\", \"2690.0129137681624\", null, NumberContext.of(7, 4));\n }",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"int compareValue(Card c);",
"boolean isSetCryptProviderTypeExtSource();",
"boolean hasReqardTypeThirty();",
"private boolean checkCpscConstr(Schedule sched)\n\t{\n\t\tif(!checkEvenings(sched))\n\t\t\treturn false;\n\t\telse if(!checkFifthYear(sched))\n\t\t\treturn false;\n\t\telse if(!checkTuesdayEleven(sched))\n\t\t\treturn false;\n\t\telse if(!check813_913(sched))\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"protected String comprobarConsumoEnergetico(Letra letra){\r\n if(getConsumoEnergetico() == Letra.A | getConsumoEnergetico() == Letra.B | getConsumoEnergetico() == Letra.C \r\n | getConsumoEnergetico() == Letra.D | getConsumoEnergetico() == Letra.E | getConsumoEnergetico() == Letra.F){\r\n return \"Consumo energetico correcto; letra correcta\";\r\n }\r\n else{\r\n return \"Consumo energetico incorrecto; letra erronea\";\r\n }\r\n}",
"public boolean isSetContructionType()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(CONTRUCTIONTYPE$24) != null;\r\n }\r\n }",
"boolean hasCertificate();",
"@Test\n public void testBoundsAsCompositesWithSingleEqAndSliceRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n ByteBuffer value4 = ByteBufferUtil.bytes(4);\n ByteBuffer value5 = ByteBufferUtil.bytes(5);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) > (2, 3)\n Restriction singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction multiSlice = newMultiSlice(cfMetaData, 1, Bound.START, false, value2, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiSlice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) > (2, 3) AND (clustering_1) < (4)\n singleEq = newSingleEq(cfMetaData, 0, value1);\n multiSlice = newMultiSlice(cfMetaData, 1, Bound.START, false, value2, value3);\n Restriction multiSlice2 = newMultiSlice(cfMetaData, 1, Bound.END, false, value4);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(multiSlice2).mergeWith(singleEq).mergeWith(multiSlice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value4, EOC.START);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) => (2, 3) AND (clustering_1, clustering_2) <= (4, 5)\n singleEq = newSingleEq(cfMetaData, 0, value1);\n multiSlice = newMultiSlice(cfMetaData, 1, Bound.START, true, value2, value3);\n multiSlice2 = newMultiSlice(cfMetaData, 1, Bound.END, true, value4, value5);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(multiSlice2).mergeWith(singleEq).mergeWith(multiSlice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value4, value5, EOC.END);\n }",
"protected abstract boolean evaluateTrust(Credential untrustedCredential, TrustBasisType trustBasis)\n throws SecurityException;",
"int insertSelective(CmIndustryConfig record);",
"int countByExample(TdxNoticeCertificateExample example);"
] | [
"0.52674407",
"0.5198389",
"0.5164424",
"0.5118719",
"0.51112384",
"0.5094231",
"0.49005187",
"0.4867023",
"0.4825076",
"0.4814076",
"0.47715104",
"0.47701234",
"0.4755792",
"0.47534558",
"0.4748579",
"0.47455364",
"0.47205755",
"0.46991375",
"0.46886498",
"0.4676039",
"0.46674085",
"0.46507075",
"0.46416444",
"0.4638279",
"0.46370664",
"0.46282747",
"0.46082684",
"0.45819908",
"0.4579375",
"0.4577336",
"0.4570024",
"0.4560282",
"0.45560637",
"0.45498267",
"0.45482486",
"0.4547846",
"0.45464832",
"0.45463264",
"0.45401528",
"0.45369476",
"0.45342255",
"0.45275453",
"0.45249882",
"0.45101827",
"0.45084488",
"0.4507311",
"0.44988668",
"0.44938132",
"0.44828975",
"0.44733483",
"0.4468825",
"0.44592816",
"0.4456504",
"0.4455517",
"0.44487843",
"0.4446831",
"0.4442312",
"0.44310927",
"0.4431032",
"0.44287565",
"0.4426821",
"0.44255927",
"0.44251132",
"0.44176322",
"0.4414515",
"0.44125295",
"0.44108367",
"0.4407689",
"0.44047707",
"0.44039744",
"0.44024742",
"0.43974558",
"0.43964997",
"0.43932402",
"0.4392146",
"0.43865585",
"0.4382109",
"0.43813777",
"0.4370793",
"0.43587023",
"0.43553337",
"0.43534702",
"0.43503252",
"0.43422008",
"0.4341948",
"0.43406194",
"0.43396044",
"0.43353978",
"0.433221",
"0.43246138",
"0.4317256",
"0.43163812",
"0.43089947",
"0.4308731",
"0.43074462",
"0.43070924",
"0.43027377",
"0.43026653",
"0.43002927",
"0.4293758"
] | 0.4635423 | 25 |
and csmi_certify_num is null | public M csmiCertifyNumNull(){if(this.get("csmiCertifyNumNot")==null)this.put("csmiCertifyNumNot", "");this.put("csmiCertifyNum", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public M csmiCertifyImageNull(){if(this.get(\"csmiCertifyImageNot\")==null)this.put(\"csmiCertifyImageNot\", \"\");this.put(\"csmiCertifyImage\", null);return this;}",
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"boolean getXAxisCharacteristicIdNull();",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"public void setCertiNo(java.lang.String certiNo) {\n this.certiNo = certiNo;\n }",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"boolean getValueCharacteristicIdNull();",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"private void checkCertAndChainNum() {\n if (certnum != null) {\n try {\n certIndex = (Integer.valueOf(certnum)).intValue();\n if (certIndex <= 0) {\n usageError(\"-certnum must be a positive number\");\n }\n } catch (NumberFormatException nfe) {\n usageError(\"-certnum must be a positive number\");\n }\n } \n\n if (chainNum != null) {\n try {\n chainIndex = (Integer.valueOf(chainNum)).intValue();\n if (chainIndex <= 0) {\n usageError(\"-chainnum must be a positive number\");\n }\n } catch (NumberFormatException nfe) {\n usageError(\"-chainnum must be a positive number\");\n }\n }\n }",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public void setSupEntCertification(String supEntCertification) {\n this.supEntCertification = supEntCertification == null ? null : supEntCertification.trim();\n }",
"boolean hasCertificate();",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"boolean hasC3();",
"public M csmiDriverNumNull(){if(this.get(\"csmiDriverNumNot\")==null)this.put(\"csmiDriverNumNot\", \"\");this.put(\"csmiDriverNum\", null);return this;}",
"public boolean isNotNullSupportsNakedCredit() {\n return genClient.cacheValueIsNotNull(CacheKey.supportsNakedCredit);\n }",
"public boolean hasCNCRNCYVRSN() {\n return fieldSetFlags()[3];\n }",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public boolean hasC() {\n return c_ != null;\n }",
"@Override\n\tpublic boolean checkCNP() {\n\t\treturn false;\n\t}",
"public M csseSubjectNull(){if(this.get(\"csseSubjectNot\")==null)this.put(\"csseSubjectNot\", \"\");this.put(\"csseSubject\", null);return this;}",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"public boolean hasReqCustid() {\n return fieldSetFlags()[0];\n }",
"boolean hasExternalAttributionCredit();",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"boolean hasSecId();",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"public boolean hasSRCCDCOPERNM() {\n return fieldSetFlags()[13];\n }",
"private void periodCertification() {\n if (((st0 & MASK) == 0) && (st1 == 0) && (st2 == 0) && (st3 == 0)) {\n st0 = 'T';\n st1 = 'I';\n st2 = 'N';\n st3 = 'Y';\n }\n }",
"public boolean isSetCostrate() {\n return __isset_bit_vector.get(__COSTRATE_ISSET_ID);\n }",
"public void setCCN(int ccn0){\n\t\tccn = ccn0;\n\t}",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"boolean getYAxisCharacteristicIdNull();",
"boolean getNodeCharacteristicIdNull();",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"final void checkForComodification() {\n\t}",
"public void setNOICAP_CCHN( String NOICAP_CCHN )\n {\n this.NOICAP_CCHN = NOICAP_CCHN;\n }",
"public void verifyServerCertificates(boolean yesno);",
"public void verifyServerCn(boolean yesno);",
"public void setS_c_n(String s_c_n) {\n this.s_c_n = s_c_n == null ? null : s_c_n.trim();\n }",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"boolean isSetNcbi8Aa();",
"int insertSelective(TdxNoticeCertificate record);",
"public void notifyNoAcctReport (COPSPdpOSReqStateMan man);",
"public boolean isCFF() throws PDFNetException {\n/* 922 */ return IsCFF(this.a);\n/* */ }",
"boolean isSetCit();",
"public void setAgcProCertiNum(String agcProCertiNum) {\n\t\tthis.agcProCertiNum = agcProCertiNum == null ? null : agcProCertiNum.trim();\n\t}",
"public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}",
"public boolean isCompletelyGeneralized(HashGroupifyEntry entry) {\n if (entry.hashcode != this.suppressedHashCode) {\n return false;\n }\n int column = 0;\n entry.read();\n while (entry.hasNext()) {\n if (suppressedCodes[column++] != (entry.next() & Data.REMOVE_OUTLIER_MASK)) {\n return false;\n }\n }\n return true;\n }",
"@Test\n public void test02ConfRespSignedByDefaultCA() throws Exception {\n log.trace(\">test02ConfRespSignedByDefaultCA\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, this.testx509ca.getSubjectDN());\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n // the parameter 'null' is to generate a confirm request for a recipient that does not exist\n PKIMessage confirm = genCertConfirm(userDN, null, nonce, transid, hash, 0, PKCSObjectIdentifiers.sha1WithRSAEncryption);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha1WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test02ConfRespSignedByDefaultCA\");\n }",
"public boolean hasSRCCDCOPERNM() {\n return fieldSetFlags()[11];\n }",
"boolean hasSecIdType();",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"private boolean checkCustomerID(int CusIDPty, int CusID) {\n\t\tint getCusIDPtyValue = 0 ; \t\t\r\n\t\ttry {\r\n\t\t\tgetCusIDPtyValue = SDKSession.getCameraPropertyClint().getCurrentPropertyValue(CusIDPty);\r\n\t\t} catch (IchInvalidSessionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchSocketException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchCameraModeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IchDevicePropException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\tif ((getCusIDPtyValue & 0xffff) == (CusID & 0xffff) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void setCertCardNo(String certCardNo) {\n\t\tthis.certCardNo = certCardNo == null ? null : certCardNo.trim();\n\t}",
"@Override\r\n\tpublic Integer[] getCertificate() {\n\t\treturn null;\r\n\t}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"boolean hasCdkey();",
"@Override\n\tpublic String toCLPInfo() {\n\t\treturn null;\n\t}",
"public boolean isSetCnsCidadao() {\n return this.cnsCidadao != null;\n }",
"public boolean hasCertificate() {\n return certificate_ != null;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Clpns)) {\n return false;\n }\n Clpns other = (Clpns) object;\n if ((this.cLPNSConsInteb == null && other.cLPNSConsInteb != null) || (this.cLPNSConsInteb != null && !this.cLPNSConsInteb.equals(other.cLPNSConsInteb))) {\n return false;\n }\n return true;\n }",
"boolean isNilIsManaged();",
"public boolean hasSRCCDCOPERNM() {\n return fieldSetFlags()[16];\n }",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"boolean getPersonCharacteristicIdsNull();",
"boolean mo6499P(C41531v c41531v);",
"boolean mo6498O(C41531v c41531v);",
"boolean hasC();",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Certificat)) {\r\n return false;\r\n }\r\n Certificat other = (Certificat) object;\r\n if ((this.idCertificat == null && other.idCertificat != null) || (this.idCertificat != null && !this.idCertificat.equals(other.idCertificat))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"private static int isSparseNumber(int num){\n int c= 0;\n while(num >0){\n if((num & 1) == 0){\n if(c >= 2){\n return 0;\n }\n c=0;\n }else {\n c += (num & 1);\n }\n num >>=1;\n\n }\n if(c >= 2){\n return 0;\n }\n return 1;\n }",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"public boolean isNotNullAltMid() {\n return genClient.cacheValueIsNotNull(CacheKey.altMid);\n }",
"public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}",
"public boolean isNotNullSredCode() {\n return genClient.cacheValueIsNotNull(CacheKey.sredCode);\n }",
"private boolean m25425c() {\n return this.f19110l.m6581e().m6512j() != null;\n }",
"boolean hasHas_consequence();",
"public boolean existOtrotCertificadoActivoComunidad(ComunidadQueryBean query){\r\n \tif(query.getIndActivo()!=null && query.getIndActivo().equals(1)){\r\n \t\tString hash=null;\r\n \t\tif(query.getHashCertificado()!=null)\r\n \t\t\thash=query.getHashCertificado();\r\n \t\telse hash=UtilidadCertificados.calcularHashCertificado(query.getCertificado()) ;\r\n \t\t\r\n \t\tJugComunidadCertificado entity= comunidadRepository.getCertificadoActivoComunidad(query);\r\n \t\tif(entity!=null && !entity.getHashCertificado().equals(hash)) return true; \r\n \t}\r\n \treturn false;\r\n \t\t\r\n\t}",
"public static String incluirZerosCNPJ(Number numeroCNPJ) {\n return incluirZeros(numeroCNPJ, 0, Constantes.TAMANHO_CNPJ);\n }",
"@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}",
"public boolean isCertificadoActivo(ComunidadQueryBean query){\r\n\t\tif(query.getHashCertificado()!=null){\r\n\t\t\tJugComunidadCertificado entity= comunidadRepository.getCertificadoByHashComunidad(query);\r\n\t\t\tif(entity.getIndActivo()==1) \r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean existCertificadoComunidad(ComunidadQueryBean query){\r\n \t\tString hash=null;\r\n \t\tif(query.getHashCertificado()!=null)\r\n \t\t\thash=query.getHashCertificado();\r\n \t\telse hash=UtilidadCertificados.calcularHashCertificado(query.getCertificado()) ;\r\n \t\tquery.setHashCertificado(hash);\r\n \t\t\r\n \t\tJugComunidadCertificado entity= comunidadRepository.getCertificadoByHashComunidad(query);\r\n \t\tif(entity!=null) return true; \r\n \treturn false;\r\n \t\t\r\n}",
"public boolean isSetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(COMPARESOURCE$2) != 0;\r\n }\r\n }",
"boolean getSearchNodeCharacteristicIdsNull();",
"public void userToCertMap(String userid, Certificate c) {\n try {\n String b = null;\n b = java.util.Base64.getEncoder().encodeToString(c.getEncoded());\n PreparedStatement pstmt = null;\n String filename = \"UserToCertMap\";\n /*PreparedStatement stmt = conn.prepareStatement(\" select * from \" + filename);\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n if(!(rs.getString(\"userId\").equals(userid))) {*/\n String sql = \"INSERT INTO \" + filename + \" (userId,Certificate) VALUES(?,?)\";\n pstmt = conn.prepareStatement(sql);\n pstmt.setString(1, userid);\n pstmt.setString(2, b);\n pstmt.executeUpdate();\n pstmt.close();\n System.out.println(\"UserId to Certificate Mapping done\");\n /* }\n else{\n System.out.println(\"in else\");\n System.out.println(\"User Id exists\");\n }*/\n\n }\n //stmt.close();\n //rs.close();\n\n catch (SQLException e) {\n e.printStackTrace();\n } catch (CertificateEncodingException e) {\n e.printStackTrace();\n }\n }",
"public org.LNDCDC_ADS_PRPSL.DEAL_PNT_FEAT_LN.apache.nifi.LNDCDC_ADS_PRPSL_DEAL_PNT_FEAT_LN.Builder clearCNCRNCYVRSN() {\n CNCRNCY_VRSN = null;\n fieldSetFlags()[3] = false;\n return this;\n }",
"public void setIccid(String iccid) {\r\n this.iccid = iccid == null ? null : iccid.trim();\r\n }",
"boolean isSetSOID();",
"public void setCOVERING_ACC_CIF(BigDecimal COVERING_ACC_CIF) {\r\n this.COVERING_ACC_CIF = COVERING_ACC_CIF;\r\n }",
"boolean hasPkpfe1000();",
"private void chkPRMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from co_prmst\";\n\t\t\tM_strSQLQRY += \" where pr_prdcd = '\"+strPRDCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdPRMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in CO_PRMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t\t//System.out.println(M_strSQLQRY);\n\t}catch(Exception L_EX){\n\t\t\tsetMSG(L_EX,\"chkPRMST\");\n\t\t}\n\t}",
"boolean isSetNcbistdaa();"
] | [
"0.63493466",
"0.60519886",
"0.5918506",
"0.5470407",
"0.5373883",
"0.5310366",
"0.53007835",
"0.51733804",
"0.51441103",
"0.5138178",
"0.5115746",
"0.50945157",
"0.50642043",
"0.50463265",
"0.50410926",
"0.5025529",
"0.50253814",
"0.50172246",
"0.5009913",
"0.50041693",
"0.4987992",
"0.4975449",
"0.49529624",
"0.49061313",
"0.49014938",
"0.4893508",
"0.48349863",
"0.48318323",
"0.48240027",
"0.48208466",
"0.482049",
"0.48143297",
"0.48096815",
"0.4807685",
"0.4803061",
"0.47960958",
"0.47938797",
"0.4791905",
"0.4780502",
"0.47767216",
"0.47724718",
"0.47648132",
"0.476377",
"0.4763002",
"0.47562954",
"0.47492817",
"0.47422945",
"0.4729516",
"0.47267476",
"0.4716698",
"0.47057274",
"0.47018713",
"0.4701215",
"0.46989334",
"0.4685051",
"0.46838596",
"0.4669389",
"0.4667434",
"0.4660027",
"0.46600094",
"0.46583772",
"0.46571139",
"0.46550363",
"0.46548226",
"0.4640954",
"0.46385416",
"0.46335062",
"0.46239424",
"0.46181786",
"0.46151394",
"0.46111596",
"0.4610516",
"0.46100482",
"0.4606445",
"0.46017265",
"0.45984986",
"0.4597303",
"0.45860896",
"0.4585121",
"0.45806715",
"0.45760456",
"0.45757937",
"0.4573674",
"0.45686203",
"0.45686123",
"0.4565049",
"0.4560347",
"0.45599526",
"0.45589668",
"0.45571798",
"0.45506307",
"0.45484757",
"0.45365432",
"0.45158434",
"0.4513843",
"0.4513549",
"0.4512546",
"0.45050183",
"0.4503764",
"0.45020893"
] | 0.7320018 | 0 |
and csmi_certify_image is null | public M csmiCertifyImageNull(){if(this.get("csmiCertifyImageNot")==null)this.put("csmiCertifyImageNot", "");this.put("csmiCertifyImage", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"public M csmiDriverImageNull(){if(this.get(\"csmiDriverImageNot\")==null)this.put(\"csmiDriverImageNot\", \"\");this.put(\"csmiDriverImage\", null);return this;}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }",
"public boolean hasProductPicture(){\r\n\t\t\t\t\r\n\t\treturn\tMcsElement.isElementPresent(driver, PRODUCT_PIC_CONTAINER+\"//img\");\r\n\t\t\t\r\n\t\t}",
"boolean hasImageByTransform();",
"public void isImagePresent() {\r\n\t\t\t\r\n\t\t}",
"public boolean isSetImg() {\n return this.img != null;\n }",
"public boolean hasImage() { return ImageResource != NO_IMAGE_PROVIDED; }",
"boolean hasPicture();",
"public boolean hasImage() {\n return !getImageResourceIds().equals(\"\");\n }",
"@Test\n public void getPicture_NoPictureExist(){\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }",
"public boolean verifyEmptyToDoImage() {\n if (validateAttributeContain(imageEmptyToDo, \"src\", \"images/icons/clipboard.png\", \"Image Empty ToDo\")) {\n return true;\n }\n return false;\n }",
"boolean hasImageByHandler();",
"public boolean hasImage() {\n return mAttractionImageResourceID != NO_IMAGE_AVAILABLE;\n }",
"public boolean isSetWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(WEATHERIMAGE$2) != 0;\n }\n }",
"public boolean hasImage() {\n\t\treturn false;\n\t}",
"public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"private boolean properExtensionalImage(CompoundTerm term) {\n\t\tif (term.con().equals(Connector.ExtImage())) {\n\t\t\tIterator<AtomicTerm> i = term.comps().iterator();\n\t\t\ti.next(); // xxx (relation)\n\t\t\treturn i.next().equals(AtomicTerm.Placeholder());\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasImage(){\n //return true or false\n return mImageResource != NO_IMAGE_PROVIDED;\n }",
"public boolean isContractImageExist(String sContract){\n\t\treturn hmContractImage.containsKey(sContract);\n\t}",
"@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }",
"boolean hasImagePath();",
"public boolean isImageNotPresent() {\n if (addingItem) {\n if (picturePath == null) {\n if (makeImageMandatory) {\n return true;\n //true creates toast\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }",
"private boolean validateEventMainImage(){\n if(imageUri == null){\n Toasty.error(CreateEventActivity.this, \"Please set the main image for the event\", Toast.LENGTH_SHORT, true).show();\n return false;\n }\n else{\n return true;\n }\n }",
"public boolean shouldImageProcess() {\r\n\t\treturn table.getBoolean(SHOULD_IMAGE_PROCESS_KEY, false);\r\n\t}",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"@Then(\"Universal Images Record should be updated and should be displayed in the listing\")\n\tpublic void ccc() throws FileNotFoundException, IOException, InterruptedException {\n\t}",
"@Override\n\tpublic boolean checkCNP() {\n\t\treturn false;\n\t}",
"@Test\n public void testNotRegenerateImage() throws Exception {\n assertFalse(\n \"This flag should not be committed as true\", ImageSimilarity.REGENERATE_EXPECTED_IMAGES);\n }",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"public boolean hasImage() {\n return mImageResourceID != NO_IMAGE_PROVIDED;\n }",
"public boolean isEmptyImage() {\n if (mbarrayImg == null || mbarrayImg.length == 0 || mbarrayImg[0].length == 0 || mnWidth == 0 || mnHeight == 0) {\n return true;\n }\n return false;\n }",
"public native boolean signatureImage() throws MagickException;",
"boolean mo60903a(AvatarImageWithVerify avatarImageWithVerify, UserVerify userVerify);",
"protected Boolean hasImageName(Object value) {\n\t return true;\n }",
"@Test\n\tpublic void equalsNull() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(null);\n\t\tAssert.assertFalse(equals);\n\t}",
"private boolean getClassificationResult(String imgPath) {\n return false;\n }",
"@Test\n public void testImageFiltering()\n { \n String html = header + \"<img src=\\\"file://path/to/local/image.png\\\"/>\" + footer;\n Document doc = wysiwygHTMLCleaner.clean(new StringReader(html));\n NodeList nodes = doc.getElementsByTagName(\"img\");\n Assert.assertEquals(1, nodes.getLength());\n Element image = (Element) nodes.item(0);\n Node startComment = image.getPreviousSibling();\n Node stopComment = image.getNextSibling();\n Assert.assertEquals(Node.COMMENT_NODE, startComment.getNodeType());\n Assert.assertEquals(\"startimage:false|-|attach|-|Missing.png\", startComment.getNodeValue());\n Assert.assertEquals(\"Missing.png\", image.getAttribute(\"src\"));\n Assert.assertEquals(Node.COMMENT_NODE, stopComment.getNodeType());\n Assert.assertTrue(stopComment.getNodeValue().equals(\"stopimage\"));\n }",
"@Test\n public void getPicture_Exists(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(image, appContext);\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"private void checkDrawable(){\n boolean hasDrawable = (imageView.getDrawable() != null);\n\n if(imageView.getDrawable() != null){\n imageAnalyze.setVisibility(VISIBLE);\n instruction.setText(\"Click the the button in the center of the screen to analyze the image.\");\n }\n else{\n imageAnalyze.setVisibility(View.INVISIBLE);\n instruction.setText(\"Import a fundus image from your gallery.\");\n }\n }",
"boolean hasC3();",
"void mo60904b(AvatarImageWithVerify avatarImageWithVerify);",
"public final boolean mo60903a(AvatarImageWithVerify avatarImageWithVerify, UserVerify userVerify) {\n if (!TextUtils.isEmpty(userVerify.getEnterpriseVerifyReason())) {\n return true;\n }\n return false;\n }",
"public boolean hasNoImages() {\n return noImages;\n }",
"void mo60902a(AvatarImageWithVerify avatarImageWithVerify);",
"public static WebElement img_clickToExpendCompCertSection() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='trigger_filter_comCert']/img\"));\r\n \t\tAdd_Log.info(\"User is click on '+' icon to expend the Company Certification section.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"'+' icon to expend the Company Certification section is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"@Override\n public Image getImage(Photo photo) {\n return null;\n }",
"@Override\n\tpublic boolean isMyImage() {\n\t\treturn false;\n\t}",
"boolean hasExternalAttributionCredit();",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-219\" })\n\tpublic void dmcaRestrictedChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Logo MOBANDEVER-219\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplLogo();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"public CollisionImage getCImg() { return cimg; }",
"private void verifyImageResponse(String imageProcessResult) {\n\t\ttry {\n\t\t\tif (imageProcessResult != null) {\n\t\t\t\tJSONObject imageResponseJson = new JSONObject(imageProcessResult);\n\t\t\t\tif ((imageResponseJson.has(SmartConstants.CAMERA_OPERATION_SUCCESSFUL_TAG)) & (imageResponseJson.getBoolean(SmartConstants.CAMERA_OPERATION_SUCCESSFUL_TAG))) {\n\t\t\t\t\tthis.smartCameraListener.onSuccessCameraOperation(imageProcessResult);\n\t\t\t\t} else {\n\t\t\t\t\t// this means there has been some error in the\n\t\t\t\t\t// camera service operation. Need to throw the error\n\t\t\t\t\tthis.smartCameraListener.onErrorCameraOperation(imageResponseJson.getInt(SmartConstants.CAMERA_OPERATION_EXCEPTION_TYPE_TAG),\n\t\t\t\t\t\t\timageResponseJson.getString(SmartConstants.CAMERA_OPERATION_EXCEPTION_MESSAGE_TAG));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.smartCameraListener.onErrorCameraOperation(ExceptionTypes.PROBLEM_CAPTURING_IMAGE_EXCEPTION, ExceptionTypes.PROBLEM_CAPTURING_IMAGE_EXCEPTION_MESSAGE);\n\t\t\t}\n\t\t} catch (JSONException je) {\n\t\t\t// TODO handle this exception\n\t\t}\n\t}",
"boolean hasGcpFilestoreCsiDriverConfig();",
"public IMAGE_OPTIONAL_HEADER64 getOptionalHeader64() { return null; }",
"public native boolean isMonochromeImage() throws MagickException;",
"public boolean isMediaEncryptionMandatory();",
"boolean hasPictureUri();",
"org.apache.xmlbeans.XmlBase64Binary xgetSignatureImage();",
"@Test\n public void testNoImageTypesRGBWithCMYKProfile() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/no-image-types-rgb-us-web-coated-v2-ms-photogallery-exif.jpg\")));\n\n assertEquals(1743, reader.getWidth(0));\n assertEquals(2551, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(0, 0, 1743, 16)); // Save some memory\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(1743, image.getWidth());\n assertEquals(16, image.getHeight());\n\n // TODO: Need to test colors!\n\n assertTrue(reader.hasThumbnails(0)); // Should not blow up!\n }",
"public void setCertImgId(String certImgId) {\n\t\tthis.certImgId = certImgId == null ? null : certImgId.trim();\n\t}",
"public boolean checkImageComponent(String filename) {\n if (componentMap.containsKey(filename))\n return true;\n else\n return false;\n }",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"public boolean mo12928a(Model model) {\n return model.toString().startsWith(\"data:image\");\n }",
"boolean isImageDisplayed();",
"@Override\n\tpublic String getImagePath64X64() {\n\t\treturn null;\n\t}",
"public String getProductPictureDetails(){\r\n\t\t\t\r\n\t\t\treturn (hasProductPicture())?McsElement.getElementByXpath(driver, PRODUCT_PIC_CONTAINER+\"//img\").getAttribute(\"src\"): \"\";\r\n\t\t}",
"private boolean resolveFakeImageURL(XDIMEContextInternal context,\n MapAttributes attributes)\n throws XDIMEException{\n \n boolean written = false;\n\n MarinerRequestContext requestContext =\n context.getInitialRequestContext();\n \n \n ImageAttributes imageAttributes = attributes.getImageAttributes();\n if(imageAttributes == null){\n // widget is not supported therefore image attributes were not set. \n written = false;\n } else {\n String url = imageAttributes.getSrc();\n // transcode the image.\n try {\n url = ContextInternals.constructImageURL(\n requestContext, url);\n } catch (RepositoryException e) {\n throw new XDIMEException(e);\n }\n \n createFakeAssetURLMapEntry(requestContext, url);\n \n // Rewrite the URL with PageURLRewriter.\n url = getPageContext(context)\n .getAssetResolver()\n .rewriteURLWithPageURLRewriter(url, PageURLType.IMAGE);\n \n imageAttributes.setSrc(url);\n written = true;\n }\n return written;\n }",
"boolean isNilIsManaged();",
"boolean deleteImage(Image img) {\r\n\t\treturn true;\r\n\t}",
"protected void setCertificateCameraImage(Intent intent, int resultCode) {\n\n mImagePicker = new ImagePicker();\n certificateBitmap = (Bitmap) intent.getExtras().get(\"data\");\n mCertificateImage = (ImageView) findViewById(R.id.certificateImage);\n\n //Uri mCapturedImageUri = intent.getData();\n\n try {\n String[] ids = mCameraManager.getCameraIdList();\n //Log.e(TAG, \"Ids of Camera \" + Arrays.toString(ids));\n\n for (String id : ids) {\n CameraCharacteristics props = mCameraManager.getCameraCharacteristics(id);\n assertNotNull(\"Can't get camera characteristics for camera \" + id, props);\n\n Integer lensFacing = props.get(CameraCharacteristics.LENS_FACING);\n assertNotNull(\"Can't get lens facing info\", lensFacing);\n\n //Camera device faces the opposite direction as the device's screen\n if (lensFacing == CameraCharacteristics.LENS_FACING_BACK) {\n assertTrue(\"System doesn't have back camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp != null;\n mCertificateImage.setImageBitmap(bp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //Camera device faces the same direction as the device's screen\n } else if (lensFacing == CameraCharacteristics.LENS_FACING_FRONT) {\n assertTrue(\"System doesn't have front camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp !=null;\n mCertificateImage.setImageBitmap(bp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }else {\n fail(\"Unknown camera lens facing \" + lensFacing.toString());\n }\n }\n }catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}",
"@Override\n\t\tpublic ImageDescriptor getImageDescriptor() {\n\t\t\treturn null;\n\t\t}",
"private static void ensureImage(final Image image) throws NotImageException\r\n\t{\r\n\t\tnew ImageIcon(image);\r\n\t\tif (image.getWidth(null) < 0)\r\n\t\t{\r\n\t\t\tthrow new NotImageException(image);\r\n\t\t}\r\n\t}",
"public boolean isComputeLiveConfigured() {\n return\n identity != null && credential != null && image != null && location != null\n && !identity.isEmpty() && !credential.isEmpty() && !image.isEmpty() && !location.isEmpty();\n }",
"private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);",
"@Override\r\n public Object createImage(Object data) {\r\n\t // N/A in JS\r\n\t return null;\r\n\t}",
"@Override\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\n\t}",
"public String getImage() {\n\t\treturn null;\n\t}",
"@Override\n public boolean apply(Image input) {\n return !(input.deprecated() != null && input.deprecated().state() != null);\n }",
"public boolean mo18891a(Model model) {\n return model.toString().startsWith(\"data:image\");\n }",
"public void setcImgUrl(String cImgUrl) {\n this.cImgUrl = cImgUrl == null ? null : cImgUrl.trim();\n }",
"public boolean isSetCiphertext() {\n return this.ciphertext != null;\n }",
"public boolean validImageContent() {\n\t\treturn input.validFile(list);\n\t}",
"public boolean hasBrandLogoImageUrl() {\n return fieldSetFlags()[7];\n }",
"public Image getBassClef();",
"private static void checkNotAlreadyBuilt(ImageModule image,\n\t\t\tString cloudServiceName) throws ValidationException {\n\t\tif (image.getCloudImageIdentifier(cloudServiceName) != null) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"This image was already built for cloud: \"\n\t\t\t\t\t\t\t+ cloudServiceName);\n\t\t}\n\t}",
"@Override\n\tpublic String getImagePath32X32() {\n\t\treturn null;\n\t}",
"boolean hasCertificate();",
"@Override\n\tprotected String getImage(int row, int col) {\n\t\treturn null;\n\t}",
"public boolean isNotNullSupportsNakedCredit() {\n return genClient.cacheValueIsNotNull(CacheKey.supportsNakedCredit);\n }",
"public static WebElement img_clickToExpendPdtCertSection() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='trigger_filter_prodCert']/img\"));\r\n \t\tAdd_Log.info(\"User is click on '+' icon to expend the Product Certificates section.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"'+' icon to expend the Product Certificates section is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public Image getImage() {\n return null;\r\n }",
"public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }"
] | [
"0.7741284",
"0.61949533",
"0.6144462",
"0.56603926",
"0.5645092",
"0.55907345",
"0.55318195",
"0.5525155",
"0.546482",
"0.5432426",
"0.5414486",
"0.5394944",
"0.5392325",
"0.53366935",
"0.5336327",
"0.5322554",
"0.52995014",
"0.5262994",
"0.5260414",
"0.5247006",
"0.521429",
"0.520025",
"0.5194842",
"0.5162309",
"0.51312417",
"0.5117283",
"0.5092314",
"0.5070694",
"0.5058483",
"0.5024346",
"0.50220704",
"0.5002103",
"0.49778226",
"0.49658164",
"0.49656072",
"0.49656072",
"0.49586603",
"0.49499315",
"0.4934573",
"0.4926613",
"0.49240333",
"0.4920438",
"0.49072483",
"0.4904003",
"0.49030542",
"0.48983854",
"0.48938486",
"0.48774046",
"0.4850939",
"0.4839235",
"0.48318055",
"0.4816494",
"0.4800288",
"0.4797672",
"0.47927865",
"0.4787061",
"0.47814897",
"0.47794193",
"0.476912",
"0.47670025",
"0.47656116",
"0.47654903",
"0.47497034",
"0.47426865",
"0.47425705",
"0.47421485",
"0.47417355",
"0.47280684",
"0.47142792",
"0.47113368",
"0.47102827",
"0.47059074",
"0.46987006",
"0.4697969",
"0.46952462",
"0.4689052",
"0.46780944",
"0.46716648",
"0.46600682",
"0.46503016",
"0.4647145",
"0.46465278",
"0.46444163",
"0.4644171",
"0.46405017",
"0.4637085",
"0.46331373",
"0.46241838",
"0.46226966",
"0.46206892",
"0.4614092",
"0.46107802",
"0.4607879",
"0.4594403",
"0.45943776",
"0.45940647",
"0.45928288",
"0.45915976",
"0.4589566",
"0.45889074"
] | 0.7853751 | 0 |
and csmi_driver_num is null | public M csmiDriverNumNull(){if(this.get("csmiDriverNumNot")==null)this.put("csmiDriverNumNot", "");this.put("csmiDriverNum", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiDriverImageNull(){if(this.get(\"csmiDriverImageNot\")==null)this.put(\"csmiDriverImageNot\", \"\");this.put(\"csmiDriverImage\", null);return this;}",
"boolean getXAxisCharacteristicIdNull();",
"boolean getValueCharacteristicIdNull();",
"public boolean hasDriverid() {\n return fieldSetFlags()[2];\n }",
"@Test\n\tpublic void searchForDriversByClientNo_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, customerAccount, null, null, null, null, false, null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, customerAccount, null, null, null, null, false, null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}",
"boolean getNodeCharacteristicIdNull();",
"boolean getActiveNull();",
"public boolean isSetDriver() {\n\t\treturn this.driver != null;\n\t}",
"public boolean hasDriver() {\n return fieldSetFlags()[6];\n }",
"@Test\n\tpublic void testGetDriverExcludeAllocations(){ \n\t\tassertNotNull(driverService.getDriverExcludeAllocations(239537L)); \n\t}",
"public boolean hasDriverId() {\n return fieldSetFlags()[1];\n }",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"public void setCardSerNo(java.lang.String param) {\r\n localCardSerNoTracker = param != null;\r\n\r\n this.localCardSerNo = param;\r\n }",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"@Test\n\tpublic void testActiveDriver() throws MalBusinessException{\n\t \n\t\tsetUpDriverForAdd();\n\t\tdriver.setActiveInd(MalConstants.FLAG_N);\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\t\t\n\t\tassertEquals(\"Active driver should null but it got data\", null, driverService.getActiveDriver(driver.getDrvId())); \n\t \n\t}",
"public void testExistingDriverHasGradeGroup() throws MalBusinessException{\n\t\tunallocatedDriverId = ((BigDecimal)em.createNativeQuery(TestQueryConstants.READ_DRIVER_ID_UNALLOCATED).getSingleResult()).longValue();\t\t\n\t\tdriver = driverService.getDriver(unallocatedDriverId);\n\t\tassertNotNull(\"Grade Group does not exist for driver Id \" +unallocatedDriverId, driver.getDgdGradeCode() );\n\t}",
"boolean getSearchNodeCharacteristicIdsNull();",
"public boolean hasSRCCDCOPERNM() {\n return fieldSetFlags()[11];\n }",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"public boolean hasSRCCDCOPERNM() {\n return fieldSetFlags()[13];\n }",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"public static void setEmptyDriver() {\n\t\tdriver = null;\n\t}",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"public boolean hasSRCCDCOPERNM() {\n return fieldSetFlags()[16];\n }",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"public void notifyNoAcctReport (COPSPdpOSReqStateMan man);",
"public boolean isSetGPSAntennaDetailsID()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(GPSANTENNADETAILSID$14) != null;\r\n }\r\n }",
"@Override\n public Map<String, Object> getModemSearchCondition() {\n return null;\n }",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"@Test\n public void testFindProviderEntryByID() throws ConnectionException {\n ProviderEntry result = MariaDbConnectorTest.instance.findProviderEntryByID(1);\n assertTrue((result != null)&& (result.getName() != null) && !(result.getName().equals(\"\")) && (result.getName().length() != 0));\n }",
"boolean getYAxisCharacteristicIdNull();",
"public boolean isSingleDriver() {\n return true;\n }",
"public static String selectDef1003900005_3(ConnectionProvider connectionProvider, String C_BPartner_IDR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table2.Name), ''))), '') ) as C_BPartner_ID FROM C_BPartner left join (select C_BPartner_ID, Name from C_BPartner) table2 on (C_BPartner.C_BPartner_ID = table2.C_BPartner_ID) WHERE C_BPartner.isActive='Y' AND C_BPartner.C_BPartner_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, C_BPartner_IDR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"c_bpartner_id\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"null\", stringBuilder0.toString());\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Driver)) {\r\n return false;\r\n }\r\n Driver other = (Driver) object;\r\n if ((this.driverid == null && other.driverid != null) || (this.driverid != null && !this.driverid.equals(other.driverid))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"private void chkPRMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from co_prmst\";\n\t\t\tM_strSQLQRY += \" where pr_prdcd = '\"+strPRDCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdPRMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in CO_PRMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t\t//System.out.println(M_strSQLQRY);\n\t}catch(Exception L_EX){\n\t\t\tsetMSG(L_EX,\"chkPRMST\");\n\t\t}\n\t}",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public boolean isSetSeatnummin() {\n return __isset_bit_vector.get(__SEATNUMMIN_ISSET_ID);\n }",
"@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void searchForUnallocatedDriversByName_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(unallocatedDriver, null, null, null, null, null, null, null, false, null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(unallocatedDriver, null, null, null, null, null, null, null, false, null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"boolean getPersonCharacteristicIdsNull();",
"boolean hasGcsFuseCsiDriverConfig();",
"boolean isSetNcbi8Aa();",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog(\"c56KWC#%&((\");\n DBSchema dBSchema0 = new DBSchema((String) null, dBCatalog0);\n String string0 = SQLUtil.ownerDotComponent(dBSchema0);\n assertEquals(\"c56KWC#%&((.null\", string0);\n }",
"boolean getUnitIdNull();",
"synchronized void askForCritical() {\n\nSC=true;\n\nwhile(!Jeton){\n\ttry{\nthis.wait();\n\t}catch( InterruptedException ie ){\n\t\t\n\t}\n}\n}",
"@Test\n\tpublic void searchForActiveInActiveDrivers_FuncTest() throws MalBusinessException { \n\t\n\t\t\t//add a driver with active ind fald as Y and perform search\n\t\t\tsetUpDriverForAdd();\n\t\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\n\t\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, driver.getDrvId(), null, null, null, null, null, null, false, MalConstants.FLAG_Y, null, null);\t\n\t\t\tlong driversCnt = driverService.searchDriverCount(null, driver.getDrvId(), null, null, null, null, null, null, false, MalConstants.FLAG_Y);\n\t\t\t\n\t\t\tassertTrue(\"Driver has not active indicator flag as Y\", driver.getActiveInd().equals(MalConstants.FLAG_Y));\n\t\t\tassertTrue(\"Driver search didn't pulled driver with active indicator flag as Y\",driversCnt == 1);\t\n\t\t\tassertTrue(\"Driver search didn't pulled driver with active indicator flag as Y\",drivers.size() == 1);\t\n\t\t\t\n\t\t\t//add a driver with active ind fald as N and perform search\n\t\t\tsetUpDriverForAdd();\n\t\t\tdriver.setActiveInd(MalConstants.FLAG_N);\t\n\t\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\n\t\t\tdrivers = driverService.searchDriver(null, driver.getDrvId(), null, null, null, null, null, null, false, MalConstants.FLAG_N, null, null);\t\n\t\t\tdriversCnt = driverService.searchDriverCount(null, driver.getDrvId(), null, null, null, null, null, null, false, MalConstants.FLAG_N);\n\t\t\t\n\t\t\tassertTrue(\"Driver has not active indicator flag as N\", driver.getActiveInd().equals(MalConstants.FLAG_N));\n\t\t\tassertTrue(\"Driver search didn't pulled driver with active indicator flag as N\",driversCnt == 1);\t\n\t\t\tassertTrue(\"Driver search didn't pulled driver with active indicator flag as N\",drivers.size() == 1);\n\t\t\t\n\t\t\t// Driver search should fetch active inactive both if we will passed active ind flag as null\n\t\t\tdrivers = driverService.searchDriver(null, driver.getDrvId(), null, null, null, null, null, null, false, null, null, null);\t\n\t\t\tdriversCnt = driverService.searchDriverCount(null, driver.getDrvId(), null, null, null, null, null, null, false, null);\n\t\t\tassertTrue(\"Driver search didn't pulled driver with active indicator flag as null\",driversCnt == 1);\t\n\t\t\tassertTrue(\"Driver search didn't pulled driver with active indicator flag as null\",drivers.size() == 1);\n\t\t\t\n\t\t\t\n\t}",
"public int checkNIC(String NIC) {\n try {\n con = (Connection) DriverManager.getConnection(url, this.usernamel, this.passwordl);\n String query = \"SELECT NIC FROM user\";\n pst = (com.mysql.jdbc.PreparedStatement) con.prepareStatement(query);\n rs = pst.executeQuery();\n while (rs.next()) {\n if (NIC.equals(rs.getString(1))) {\n return 0;\n\n }\n }\n return 1;\n\n } catch (Exception e) {\n //System.out.print(e);\n return 2;\n } finally {\n try {\n if (pst != null) {\n pst.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception e) {\n }\n\n }\n }",
"public boolean isSetUcarserialnumber() {\n return this.ucarserialnumber != null;\n }",
"private String m29111g() {\n PersistentConfiguration cVar = this.f22554b;\n if (cVar != null) {\n String string = cVar.getString(\"UTDID2\");\n if (!C6804i.m29033a(string) && this.f22552a.mo32716a(string) != null) {\n return string;\n }\n }\n return null;\n }",
"@Test\n public void getNullCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.NULL_QUOTE_SYMBOL);\n assertTrue(comps.isEmpty());\n }",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public void setIDCardNo(java.lang.String param) {\r\n localIDCardNoTracker = param != null;\r\n\r\n this.localIDCardNo = param;\r\n }",
"public void setIDCardNo(java.lang.String param) {\r\n localIDCardNoTracker = param != null;\r\n\r\n this.localIDCardNo = param;\r\n }",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public boolean isNotNullSredCode() {\n return genClient.cacheValueIsNotNull(CacheKey.sredCode);\n }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n stringBuilder0.append(\"alter materialized viewjcsh%4%|@v9\");\n SQLUtil.addOptionalCondition((String) null, stringBuilder0);\n assertEquals(\"alter materialized viewjcsh%4%|@v9 or null\", stringBuilder0.toString());\n }",
"public boolean isSetIsjdvendor() {\n return __isset_bit_vector.get(__ISJDVENDOR_ISSET_ID);\n }",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"private void checkIfCarrierIsLost (int c) {\n\t\tif (noCarrier[noCarrierIndex] == c)\n\t\t\t++noCarrierIndex;\n\t\telse\n\t\t\tnoCarrierIndex = 0;\n\t\t\n\t\tif (noCarrierIndex >= noCarrier.length) {\n\t\t\tstate = STATE_DISCONNECTED;\n\t\t}\n\t}",
"@Test\n public void testDontDieFromNulls() throws Exception {\n mWifiCandidates.add(null, mConfig1, 1, 0.0, false, 100);\n mWifiCandidates.add(mScanDetail1, null, 2, 0.0, false, 100);\n doReturn(null).when(mScanDetail2).getScanResult();\n mWifiCandidates.add(mScanDetail2, mConfig2, 3, 1.0, true, 100);\n assertFalse(mWifiCandidates.remove(null));\n\n assertEquals(0, mWifiCandidates.size());\n }",
"public boolean isSetIsowncar() {\n return __isset_bit_vector.get(__ISOWNCAR_ISSET_ID);\n }",
"boolean isSetSOID();",
"public boolean isSetVSWR() {\n return ((this.vswr != null) && (!this.vswr.isEmpty()));\n }",
"public void setSecrityNo(java.lang.String param) {\r\n localSecrityNoTracker = param != null;\r\n\r\n this.localSecrityNo = param;\r\n }",
"public boolean mo5366c() {\n throw null;\n }",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"@Override UpodCondition getConditionTest(UpodProgram pgm) {\n return null;\n }",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"boolean hasGcePersistentDiskCsiDriverConfig();",
"@Override\n\tpublic String getcond() {\n\t\treturn null;\n\t}",
"public boolean isSetCarprovincename() {\n return this.carprovincename != null;\n }",
"boolean getCharacteristicDescriptionNull();",
"boolean isNilPoolId();",
"private final synchronized boolean m60360c() {\n return this.f49750a.getAll().isEmpty();\n }",
"public void setCardNo(java.lang.String param) {\r\n localCardNoTracker = param != null;\r\n\r\n this.localCardNo = param;\r\n }",
"public void setCardNo(java.lang.String param) {\r\n localCardNoTracker = param != null;\r\n\r\n this.localCardNo = param;\r\n }",
"private void parseSQLDIAGCN() {\n if (readFdocaOneByte() == CodePoint.NULLDATA) {\n return;\n }\n\n // The server should send NULLDATA\n throw new UnsupportedOperationException(\"SQLState.DRDA_COMMAND_NOT_IMPLEMENTED parseSQLDIAGCN\");\n// netAgent_.accumulateChainBreakingReadExceptionAndThrow(\n// new DisconnectException(netAgent_,\n// new ClientMessageId(SQLState.DRDA_COMMAND_NOT_IMPLEMENTED),\n// \"parseSQLDIAGCN\"));\n }",
"@Override\n public boolean isNull(){\n return (this.nativeHandle == 0L); \n }",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"boolean isSetNcbistdaa();",
"public boolean isGlobalCustomerNumberIDEmpty()\n\t{\n\t\treturn globalCustomerNumberID.equals(\"\");\n\t}",
"private void assertJackNoAccountNoSwashbuckler() throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException {\n\t\tDummyGroup dummyGroup = getDummyResource().getGroupByName(GROUP_DUMMY_SWASHBUCKLERS_NAME);\n assertNotNull(\"No group on dummy resource\", dummyGroup);\n display(\"Group\", dummyGroup);\n assertEquals(\"Wrong group description\", GROUP_DUMMY_SWASHBUCKLERS_DESCRIPTION,\n \t\tdummyGroup.getAttributeValue(DummyResourceContoller.DUMMY_GROUP_ATTRIBUTE_DESCRIPTION));\n assertNoGroupMember(dummyGroup, ACCOUNT_JACK_DUMMY_USERNAME);\n\n assertNoDummyAccount(ACCOUNT_JACK_DUMMY_USERNAME);\n\t}",
"public boolean isNotNullPaymentProcessorName() {\n return genClient.cacheValueIsNotNull(CacheKey.paymentProcessorName);\n }",
"public boolean isNullInstance()\n {\n return code == null;\n }",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"final void checkForComodification() {\n\t}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"private boolean m25425c() {\n return this.f19110l.m6581e().m6512j() != null;\n }",
"public boolean mo42410i() {\n return this.f12824g != null;\n }",
"public boolean method_210() {\r\n return false;\r\n }",
"@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }",
"protected abstract void initHardwareCriteria();",
"boolean getPersonOutputCharacteristicsNull();"
] | [
"0.56280935",
"0.5304547",
"0.5288763",
"0.51997083",
"0.5174391",
"0.5110902",
"0.5091118",
"0.49890274",
"0.4988905",
"0.49784958",
"0.49532208",
"0.4939737",
"0.49186262",
"0.49102044",
"0.4874061",
"0.48716202",
"0.48660251",
"0.48652604",
"0.48637477",
"0.48532054",
"0.48519233",
"0.480411",
"0.47759697",
"0.4760276",
"0.47568226",
"0.47362477",
"0.47280845",
"0.47211406",
"0.47091165",
"0.47085464",
"0.47074553",
"0.47063947",
"0.47038114",
"0.4695937",
"0.4694561",
"0.46915007",
"0.46804667",
"0.46754614",
"0.4672461",
"0.46714687",
"0.4663824",
"0.46452597",
"0.46417302",
"0.46386167",
"0.46337417",
"0.46309856",
"0.46288833",
"0.46258497",
"0.4619179",
"0.4613373",
"0.4606761",
"0.46030617",
"0.45979577",
"0.45784754",
"0.4578306",
"0.45731995",
"0.45676458",
"0.45620516",
"0.45604405",
"0.45604405",
"0.45592344",
"0.4555474",
"0.4551106",
"0.45481583",
"0.45457363",
"0.45427",
"0.45406565",
"0.45366746",
"0.4534631",
"0.45322365",
"0.4529383",
"0.45282263",
"0.45115083",
"0.45101643",
"0.45092446",
"0.45048082",
"0.45023596",
"0.45009694",
"0.44990817",
"0.44951373",
"0.44941023",
"0.4493305",
"0.4493305",
"0.44922534",
"0.4491565",
"0.4488103",
"0.44794405",
"0.44770235",
"0.44762376",
"0.44708958",
"0.44700292",
"0.4469032",
"0.4461844",
"0.44616267",
"0.44599047",
"0.4454192",
"0.4453612",
"0.44510695",
"0.4447624",
"0.4442796"
] | 0.6739088 | 0 |
and csmi_driver_image is null | public M csmiDriverImageNull(){if(this.get("csmiDriverImageNot")==null)this.put("csmiDriverImageNot", "");this.put("csmiDriverImage", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"public M csmiCertifyImageNull(){if(this.get(\"csmiCertifyImageNot\")==null)this.put(\"csmiCertifyImageNot\", \"\");this.put(\"csmiCertifyImage\", null);return this;}",
"public void isImagePresent() {\r\n\t\t\t\r\n\t\t}",
"public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}",
"public boolean isSetImg() {\n return this.img != null;\n }",
"private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }",
"public boolean hasImage() { return ImageResource != NO_IMAGE_PROVIDED; }",
"@Test\n public void getPicture_NoPictureExist(){\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"public boolean hasImage() {\n return !getImageResourceIds().equals(\"\");\n }",
"public boolean hasImage() {\n\t\treturn false;\n\t}",
"boolean isImageDisplayed();",
"public boolean hasImage(){\n //return true or false\n return mImageResource != NO_IMAGE_PROVIDED;\n }",
"public boolean isSetWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(WEATHERIMAGE$2) != 0;\n }\n }",
"public boolean hasProductPicture(){\r\n\t\t\t\t\r\n\t\treturn\tMcsElement.isElementPresent(driver, PRODUCT_PIC_CONTAINER+\"//img\");\r\n\t\t\t\r\n\t\t}",
"protected Boolean hasImageName(Object value) {\n\t return true;\n }",
"boolean hasImageByHandler();",
"@Override\r\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}",
"@Override\n\t\tpublic ImageDescriptor getImageDescriptor() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\n\t}",
"boolean hasImagePath();",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"public M csmiDriverNumNull(){if(this.get(\"csmiDriverNumNot\")==null)this.put(\"csmiDriverNumNot\", \"\");this.put(\"csmiDriverNum\", null);return this;}",
"public boolean hasBrandLogoImageUrl() {\n return fieldSetFlags()[7];\n }",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }",
"@Override\n\tpublic boolean isMyImage() {\n\t\treturn false;\n\t}",
"public boolean hasImage() {\n return mImageResourceID != NO_IMAGE_PROVIDED;\n }",
"public boolean hasImage() {\n return mAttractionImageResourceID != NO_IMAGE_AVAILABLE;\n }",
"public String getImage() {\n\t\treturn null;\n\t}",
"public boolean isEmptyImage() {\n if (mbarrayImg == null || mbarrayImg.length == 0 || mbarrayImg[0].length == 0 || mnWidth == 0 || mnHeight == 0) {\n return true;\n }\n return false;\n }",
"public Image getImage() {\n return null;\r\n }",
"@Override\n\tpublic String getImagePath32X32() {\n\t\treturn null;\n\t}",
"@Override\n\tprotected String getImage(int row, int col) {\n\t\treturn null;\n\t}",
"public boolean isImageNotPresent() {\n if (addingItem) {\n if (picturePath == null) {\n if (makeImageMandatory) {\n return true;\n //true creates toast\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }",
"@Test\n public void getPicture_Exists(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(image, appContext);\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"public ImageDescriptor getImageDescriptor()\n\t{\n\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getImagePath16X16() {\n\t\treturn null;\n\t}",
"public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"public boolean imageIsSelected() {\n return getBikeImagePath() != null;\n }",
"public Image getImage()\n {\n return null;\n }",
"@Test\n\tpublic void equalsNull() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(null);\n\t\tAssert.assertFalse(equals);\n\t}",
"private boolean validateEventMainImage(){\n if(imageUri == null){\n Toasty.error(CreateEventActivity.this, \"Please set the main image for the event\", Toast.LENGTH_SHORT, true).show();\n return false;\n }\n else{\n return true;\n }\n }",
"@Test\n public void testNotRegenerateImage() throws Exception {\n assertFalse(\n \"This flag should not be committed as true\", ImageSimilarity.REGENERATE_EXPECTED_IMAGES);\n }",
"public boolean hasNoImages() {\n return noImages;\n }",
"boolean hasPicture();",
"public boolean hasImageCaptureBug() {\n // list of known devices that have the bug\n ArrayList<String> devices = new ArrayList<String>();\n devices.add(\"android-devphone1/dream_devphone/dream\");\n devices.add(\"generic/sdk/generic\");\n devices.add(\"vodafone/vfpioneer/sapphire\");\n devices.add(\"tmobile/kila/dream\");\n devices.add(\"verizon/voles/sholes\");\n devices.add(\"google_ion/google_ion/sapphire\");\n\n return devices.contains(android.os.Build.BRAND + \"/\" + android.os.Build.PRODUCT + \"/\"\n + android.os.Build.DEVICE);\n }",
"@Override\n\tpublic Image getImage(Object element) {\n\t\treturn null;\n\t}",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}",
"Picture identifyComponentImage() throws Exception;",
"boolean hasGcePersistentDiskCsiDriverConfig();",
"public boolean shouldImageProcess() {\r\n\t\treturn table.getBoolean(SHOULD_IMAGE_PROCESS_KEY, false);\r\n\t}",
"public Image getHotImage () {\r\n\tcheckWidget();\r\n\treturn hotImage;\r\n}",
"public IMAGE_OPTIONAL_HEADER64 getOptionalHeader64() { return null; }",
"private boolean properExtensionalImage(CompoundTerm term) {\n\t\tif (term.con().equals(Connector.ExtImage())) {\n\t\t\tIterator<AtomicTerm> i = term.comps().iterator();\n\t\t\ti.next(); // xxx (relation)\n\t\t\treturn i.next().equals(AtomicTerm.Placeholder());\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }",
"@Override\n\tpublic String getImagePathBig() {\n\t\treturn null;\n\t}",
"public boolean hasRoboticon(){\r\n\t\treturn roboticon != null;\r\n\t}",
"public boolean checkImageComponent(String filename) {\n if (componentMap.containsKey(filename))\n return true;\n else\n return false;\n }",
"@Override\n public Image getImage(Photo photo) {\n return null;\n }",
"private void checkIfThereIsStudentPhoto() {\n if (studentHasPhoto) {\n mAddPhotoImageView.setVisibility(View.GONE);\n mAddPhotoLabelTextView.setVisibility(View.GONE);\n }\n }",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Image getDisabledImage () {\r\n\tcheckWidget();\r\n\treturn disabledImage;\r\n}",
"public boolean isContractImageExist(String sContract){\n\t\treturn hmContractImage.containsKey(sContract);\n\t}",
"public boolean isMarkerImageLabelPresent() {\r\n\t\treturn isElementPresent(vehicleName.replace(\"Vehicle Name\", \"Marker Image\"), SHORTWAIT);\r\n\t}",
"private void checkDrawable(){\n boolean hasDrawable = (imageView.getDrawable() != null);\n\n if(imageView.getDrawable() != null){\n imageAnalyze.setVisibility(VISIBLE);\n instruction.setText(\"Click the the button in the center of the screen to analyze the image.\");\n }\n else{\n imageAnalyze.setVisibility(View.INVISIBLE);\n instruction.setText(\"Import a fundus image from your gallery.\");\n }\n }",
"public String getImagePlatformString() {\n\t\tMap<Short, List<DevicePropertyAttrOptionObj>> optionMap = DevicePropertyManage.getInstance().getDeviceModelOptionsMapping(DeviceInfo.SPT_IMAGE_INTERNAL_NAME);\r\n\t\tString imageVerNum = getImageVersionNum();\r\n\t\t\r\n//\t\t//version map\r\n//\t\tIterator<Entry<Short, String>> latestVerItem = latestVerMap.entrySet().iterator();\r\n//\t\twhile(latestVerItem.hasNext()){\r\n//\t\t\tEntry<Short, String> latestVerEntry = latestVerItem.next();\r\n//\t\t\tif(NmsUtil.compareSoftwareVersion(imageVerNum, latestVerEntry.getValue()) < 0){\r\n//\t\t\t\tlatestVerItem.remove();\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\t\t//filter platform\r\n\t\tIterator<Entry<Short, List<DevicePropertyAttrOptionObj>>> optionIterator = optionMap.entrySet().iterator();\r\n\t\twhile(optionIterator.hasNext()){\r\n\t\t\tEntry<Short, List<DevicePropertyAttrOptionObj>> optionEntry = optionIterator.next();\r\n//\t\t\tif(!latestVerMap.containsKey(optionEntry.getKey())){\r\n//\t\t\t\toptionIterator.remove();\r\n//\t\t\t\tcontinue;\r\n//\t\t\t}\r\n\t\t\tif(optionEntry.getValue() == null || optionEntry.getValue().isEmpty()){\r\n\t\t\t\toptionIterator.remove();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tboolean pFound = false;\r\n\t\t\tfor(DevicePropertyAttrOptionObj optObj : optionEntry.getValue()){\r\n\t\t\t\tif(optObj.getValue().equals(this.productName)){\r\n\t\t\t\t\tpFound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!pFound){\r\n\t\t\t\toptionIterator.remove();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString[] supportVersions = (String[])AhConstantUtil.getEnumValues(Device.SUPPORTED_HIVEOS_VERSIONS, optionEntry.getKey());\r\n\t\t\tif(supportVersions == null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tpFound = false;\r\n\t\t\tfor(String versionNum : supportVersions){\r\n\t\t\t\tif(NmsUtil.compareSoftwareVersion(versionNum, imageVerNum) == 0){\r\n\t\t\t\t\tpFound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!pFound){\r\n\t\t\t\toptionIterator.remove();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tString pName = null;\r\n\t\tfor (Short apModel : optionMap.keySet()) {\r\n\t\t\tpName = AhConstantUtil.getString(Device.NAME, apModel);\r\n\t\t\tif(StringUtils.isEmpty(pName) || \"null\".equalsIgnoreCase(pName)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}else if (sb.length() == 0) {\r\n\t\t\t\tsb.append(pName);\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(\", \").append(pName);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn sb.toString();\r\n\t}",
"boolean hasGcsFuseCsiDriverConfig();",
"public void setDisabledImage (Image image) {\r\n\tcheckWidget();\r\n\tif (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);\r\n\tif ((style & SWT.SEPARATOR) != 0) return;\r\n\tdisabledImage = image;\r\n}",
"boolean hasImageByTransform();",
"public boolean getUnselectedImageVisible() {\n checkWidget();\n return showUnselectedImage;\n }",
"@Override\n\tpublic String getImagePath64X64() {\n\t\treturn null;\n\t}",
"public boolean imageExists(String imageString) throws ClassNotFoundException, SQLException {\n\t\tString query = \"SELECT * FROM minute WHERE `image-path`='\" + imageString+\"'\";\n\t\tStatement st = this.connection.createStatement();\n\t\t// execute the query, and get a java resultset\n\t\tResultSet rs = st.executeQuery(query);\n\t\tif(rs.getRow()==0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"boolean hasGcpFilestoreCsiDriverConfig();",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-219\" })\n\tpublic void dmcaRestrictedChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Logo MOBANDEVER-219\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplLogo();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"public boolean hasImagePath() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"private static void ensureImage(final Image image) throws NotImageException\r\n\t{\r\n\t\tnew ImageIcon(image);\r\n\t\tif (image.getWidth(null) < 0)\r\n\t\t{\r\n\t\t\tthrow new NotImageException(image);\r\n\t\t}\r\n\t}",
"public void setImg_0(String img_0) {\n this.img_0 = img_0;\n }",
"public Image getImage(Object element) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}",
"public Image getImage(Object element) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}",
"public Image getImage(Object element) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Unrestricted - Channel Logo\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-206\" })\n\tpublic void validateHowardChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickOnTalk();\n\t\t\tgetPageFactory().getHoward().clickOnHowardStern();\n\t\t\tgetPageFactory().getHoward().verifyHowardChannelLogo();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"private boolean checkImage(int row, int col, String imageName) {\n\t\tDirectionalPanel[] room = rooms[row][col];\n\t\tfor (int i = 0; i < room.length; i++) {\n\t\t\tString roomImageName = room[i].getImageName();\n\t\t\tif (roomImageName != null && roomImageName.equals(imageName)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean isAutomaticHeaderImageEnabled();",
"public boolean isRandomStartImage() {\n return randomStatImage;\n }",
"public boolean isSetCompany_logo() {\n return this.company_logo != null;\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testImageWhenNull() {\n int[][][] test = null;\n Image img = new ImageImpl(test);\n }",
"public void isLiveChatSuperCasinoLogoPresent(){\n\t\t WebElement Frame = d.findElement(By.cssSelector(\"iframe.noFrame\"));\n\t \td.switchTo().frame(Frame);\n\t\t WebElement Logo= d.findElement(By.cssSelector(Constant.LiveChat_SupercasinoLogo));\n\t\t WebDriverWait wait= new WebDriverWait(d, 30);\n\t\t wait.until(ExpectedConditions.visibilityOf(Logo));\n\t\t Logo.isDisplayed();\n\t\t Assert.assertTrue(Logo.isDisplayed());\n\t\t d.navigate().back();\n\t\t \n\t\t \n\t }",
"public boolean hasImagePath() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean isSetDriver() {\n\t\treturn this.driver != null;\n\t}",
"private static void checkNotAlreadyBuilt(ImageModule image,\n\t\t\tString cloudServiceName) throws ValidationException {\n\t\tif (image.getCloudImageIdentifier(cloudServiceName) != null) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"This image was already built for cloud: \"\n\t\t\t\t\t\t\t+ cloudServiceName);\n\t\t}\n\t}",
"@Override\n\tpublic String getImageURL() {\n\t\treturn \"\";\n\t}",
"public static boolean isImageBuildPushRequired(ServiceSpec serviceSpec) {\n if (serviceSpec == null) {\n return false;\n }\n Image image = null;\n try {\n image = serviceSpec.get(HyscaleSpecFields.image, Image.class);\n } catch (HyscaleException e) {\n logger.info(\"Error while fetching buildSpec and registryUrl from serviceSpec \");\n }\n\n if (image == null) {\n return false;\n }\n\n return image instanceof BuildSpecImage || image instanceof DockerBuildImage;\n }",
"@Override\r\n public Object createImage(Object data) {\r\n\t // N/A in JS\r\n\t return null;\r\n\t}",
"private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);",
"@Test\n public void testNoImageTypesRGBWithCMYKProfile() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/no-image-types-rgb-us-web-coated-v2-ms-photogallery-exif.jpg\")));\n\n assertEquals(1743, reader.getWidth(0));\n assertEquals(2551, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(0, 0, 1743, 16)); // Save some memory\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(1743, image.getWidth());\n assertEquals(16, image.getHeight());\n\n // TODO: Need to test colors!\n\n assertTrue(reader.hasThumbnails(0)); // Should not blow up!\n }",
"public boolean isSetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(NULLFLAVOR$28) != null;\n }\n }"
] | [
"0.64242506",
"0.62653863",
"0.5986788",
"0.5890659",
"0.57878333",
"0.57532465",
"0.56990665",
"0.5662607",
"0.56607324",
"0.56485003",
"0.55993044",
"0.558762",
"0.55866647",
"0.54918617",
"0.54912174",
"0.54732746",
"0.5447379",
"0.5436658",
"0.5333646",
"0.5307728",
"0.52927405",
"0.5285241",
"0.52642477",
"0.52642477",
"0.5263903",
"0.5261055",
"0.52328265",
"0.5224313",
"0.5220375",
"0.5213536",
"0.52116865",
"0.5181438",
"0.51801544",
"0.51580435",
"0.51510954",
"0.5145794",
"0.5141489",
"0.5117248",
"0.5103362",
"0.50982064",
"0.5095517",
"0.5093044",
"0.5091248",
"0.5090704",
"0.5084006",
"0.5072863",
"0.5062116",
"0.5056985",
"0.5052929",
"0.50492185",
"0.5033128",
"0.5029265",
"0.5015597",
"0.50119007",
"0.50033665",
"0.4984976",
"0.4979699",
"0.49787545",
"0.49615157",
"0.4960692",
"0.49563915",
"0.49341977",
"0.49326465",
"0.4919364",
"0.4917545",
"0.49087763",
"0.4902623",
"0.4890211",
"0.48874903",
"0.48814875",
"0.4863472",
"0.48564577",
"0.48537844",
"0.4852874",
"0.48312682",
"0.48247227",
"0.48203975",
"0.4791337",
"0.47792172",
"0.47741213",
"0.47723928",
"0.47687504",
"0.47687504",
"0.47687504",
"0.4761812",
"0.47579825",
"0.47534975",
"0.47489077",
"0.47301626",
"0.47294194",
"0.47278067",
"0.47201487",
"0.47087306",
"0.47051",
"0.4703247",
"0.46968445",
"0.46911964",
"0.4688339",
"0.46874002",
"0.46864155"
] | 0.7473594 | 0 |
and csmi_sex is null | public M csmiSexNull(){if(this.get("csmiSexNot")==null)this.put("csmiSexNot", "");this.put("csmiSex", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSex(String sex) {\r\n this.sex = sex == null ? null : sex.trim();\r\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n\t\tthis.sex = sex == null ? null : sex.trim();\n\t}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public boolean isSetSex() {\n\t\treturn this.sex != null;\n\t}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public Boolean getSex() {\r\n return sex;\r\n }",
"public Boolean getSex();",
"public void setSex(String sex)\n {\n this.sex = sex;\n }",
"boolean getValueCharacteristicIdNull();",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public void setSex(String sex) {\n this.sex = sex;\n }",
"public void setSex(Boolean sex) {\r\n this.sex = sex;\r\n }",
"static SexType checkSex(String data){\n if(data.contains(\"M\"))\n return SexType.MALE;\n else\n return SexType.FEMALE;\n }",
"boolean hasGender();",
"boolean hasGender();",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"private boolean testSexSecol() {\n switch (S) {\n case \"1\":\n // 1,2 1900-1999\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"2\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"3\":\n // 3,4 1800-1899\n secol = \"18\";\n Sex = \"M\";\n break;\n case \"4\":\n secol = \"18\";\n Sex = \"F\";\n break;\n case \"5\":\n // 5,6 2000-2099\n secol = \"20\";\n Sex = \"M\";\n break;\n case \"6\":\n secol = \"20\";\n Sex = \"F\";\n break;\n case \"7\":\n // 7,8 straini rezidenti 1900+\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"8\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"9\":\n // 9 straini 1900+\n secol = \"19\";\n break;\n default:\n // Sexul nu poate fi \"0\"\n return false;\n }\n return true;\n }",
"public String sex() {\n return this.sex;\n }",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(Short sex) {\n this.sex = sex;\n }",
"public void setSex(Boolean sex);",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"public void setSex(Integer sex) {\r\n this.sex = sex;\r\n }",
"boolean hasHasGender();",
"boolean isNullOmittable();",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"@Override\n\tpublic Gender convertToEntityAttribute(String sex) {\n\t\tif (sex == null) {\n return null;\n }\n\n return Stream.of(Gender.values())\n .filter(g -> g.getSex().equals(sex))\n .findFirst()\n .orElseThrow(IllegalArgumentException::new);\n\t}",
"boolean getSearchValueNull();",
"public void setSex(String sex);",
"public void setSex(java.lang.String param) {\r\n localSexTracker = param != null;\r\n\r\n this.localSex = param;\r\n }",
"public M csmiSexMin(Object min){this.put(\"csmiSexMin\", min);return this;}",
"public java.lang.String getStudent_sex() {\n\t\treturn _primarySchoolStudent.getStudent_sex();\n\t}",
"public String gender_check(String name) {\n\t\treturn dao.seat_genderselect(name);\r\n\t}",
"public static boolean validaSexo(String sexo) {\r\n\t\treturn ((sexo.equals(\"MASCULINO\") || sexo.equals(\"FEMININO\")) ? true : false);\r\n\t}",
"public void setSex(Byte sex) {\n this.sex = sex;\n }",
"@Override\n\tpublic String getSex() {\n\t\treturn null;\n\t}",
"public void setPatientSex(String patientSex){\n\t\tthis.patientSex = patientSex;\n\t}",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"boolean getValueLanguageIdNull();",
"public M csmiBirthdayNull(){if(this.get(\"csmiBirthdayNot\")==null)this.put(\"csmiBirthdayNot\", \"\");this.put(\"csmiBirthday\", null);return this;}",
"public void setSex(Sex sex) {\n this.sex = sex;\n }",
"boolean getXAxisCharacteristicIdNull();",
"boolean getActiveNull();",
"public void setStudent_sex(java.lang.String student_sex) {\n\t\t_primarySchoolStudent.setStudent_sex(student_sex);\n\t}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }",
"@Override\n\tpublic String getcond() {\n\t\treturn null;\n\t}",
"boolean getPersonCharacteristicIdsNull();",
"public String getSex()\n {\n return sex;\n }",
"boolean isNull();",
"public String getSex() {\r\n return sex;\r\n }",
"public void setAccountSex(Integer accountSex) {\n this.accountSex = accountSex;\n }",
"boolean contemProfessor(String cpf);",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"public String getPatientSex(){\n\t\treturn patientSex;\n\t}",
"boolean hasGenderView();",
"public M csseSubjectNull(){if(this.get(\"csseSubjectNot\")==null)this.put(\"csseSubjectNot\", \"\");this.put(\"csseSubject\", null);return this;}",
"public Short getSex() {\n return sex;\n }",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}",
"boolean isNullValue(int colIndex);",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public void setSexo(String sexo) {\r\n this.sexo = sexo;\r\n }",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"public Integer getSex() {\r\n return sex;\r\n }",
"boolean getPersonOutputCharacteristicsNull();",
"boolean isSetNcbieaa();",
"@Override\n\tpublic void setSex(String sex) throws RemoteException {\n\t\tthis.sex = sex;\n\t}",
"public void setSexo(String sexo) {\r\n\t\tthis.sexo = sexo;\r\n\t}",
"public Sex getSex() {\n return sex;\n }",
"boolean getSearchPersonTypeIdNull();",
"boolean isSetNcbistdaa();",
"public String getSex() {\n\t\treturn sex;\n\t}",
"public String getSex() {\n\t\treturn sex;\n\t}",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }"
] | [
"0.59209454",
"0.5859561",
"0.5859561",
"0.5859561",
"0.5859561",
"0.5859561",
"0.5859561",
"0.5782563",
"0.56537056",
"0.5619081",
"0.55458426",
"0.5512605",
"0.55123544",
"0.54531467",
"0.54414886",
"0.5440245",
"0.543803",
"0.54170185",
"0.54165494",
"0.53959435",
"0.53959435",
"0.5373185",
"0.5359474",
"0.53422105",
"0.53400517",
"0.53400517",
"0.53286225",
"0.5296355",
"0.5277544",
"0.5237575",
"0.5230055",
"0.5222674",
"0.5217193",
"0.5207204",
"0.5207204",
"0.5207204",
"0.5207204",
"0.5207204",
"0.5179803",
"0.5179496",
"0.51752627",
"0.51743305",
"0.5173977",
"0.5173382",
"0.5170889",
"0.51667875",
"0.5163377",
"0.5160829",
"0.51569134",
"0.51539254",
"0.51114",
"0.51108545",
"0.51063234",
"0.5099604",
"0.50870377",
"0.5081736",
"0.50485235",
"0.5040941",
"0.50333256",
"0.5028914",
"0.5022923",
"0.5000537",
"0.498906",
"0.4979084",
"0.49779835",
"0.4972926",
"0.49618667",
"0.4957867",
"0.4946128",
"0.49377072",
"0.49118438",
"0.49073014",
"0.49010596",
"0.48972273",
"0.48951775",
"0.48895746",
"0.48836514",
"0.48836514",
"0.48836514",
"0.48836514",
"0.48836514",
"0.48836514",
"0.48836514",
"0.48836514",
"0.48737252",
"0.48705274",
"0.48687863",
"0.4858935",
"0.48522732",
"0.48436376",
"0.4835247",
"0.48302945",
"0.48229322",
"0.48196507",
"0.48179385",
"0.48179385",
"0.48135874",
"0.4807484",
"0.4807484",
"0.4807484"
] | 0.7159112 | 0 |
and csmi_sex >= ? | public M csmiSexMin(Object min){this.put("csmiSexMin", min);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSex(String sex)\n {\n this.sex = sex;\n }",
"public void setSex(String sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\r\n this.sex = sex;\r\n }",
"public void setSex(Short sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(Byte sex) {\n this.sex = sex;\n }",
"public void setSex(String sex);",
"public void setSex(Boolean sex) {\r\n this.sex = sex;\r\n }",
"public void setAccountSex(Integer accountSex) {\n this.accountSex = accountSex;\n }",
"public void setSex(Sex sex) {\n this.sex = sex;\n }",
"public String gender_check(String name) {\n\t\treturn dao.seat_genderselect(name);\r\n\t}",
"public void setSex(Boolean sex);",
"public void setaSex(Integer aSex) {\n this.aSex = aSex;\n }",
"boolean hasGender();",
"boolean hasGender();",
"public void setPatientSex(String patientSex){\n\t\tthis.patientSex = patientSex;\n\t}",
"public static void main(String[] args) {\nint age=21 ;char gender='f';\nif(age>=21 && gender=='m')\n{\n\tSystem.out.println(\"eligble for marriage\");\n}\n\n else if (age>=18 && gender=='f') {\nSystem.out.println(\"eligble for marriage\");\n}\nelse {\n\t{System.out.println(\"not eligble for marrage\");\n}\n\t\t\n\t}\n\n\n}",
"static SexType checkSex(String data){\n if(data.contains(\"M\"))\n return SexType.MALE;\n else\n return SexType.FEMALE;\n }",
"private boolean testSexSecol() {\n switch (S) {\n case \"1\":\n // 1,2 1900-1999\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"2\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"3\":\n // 3,4 1800-1899\n secol = \"18\";\n Sex = \"M\";\n break;\n case \"4\":\n secol = \"18\";\n Sex = \"F\";\n break;\n case \"5\":\n // 5,6 2000-2099\n secol = \"20\";\n Sex = \"M\";\n break;\n case \"6\":\n secol = \"20\";\n Sex = \"F\";\n break;\n case \"7\":\n // 7,8 straini rezidenti 1900+\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"8\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"9\":\n // 9 straini 1900+\n secol = \"19\";\n break;\n default:\n // Sexul nu poate fi \"0\"\n return false;\n }\n return true;\n }",
"public void setSex(java.lang.String param) {\r\n localSexTracker = param != null;\r\n\r\n this.localSex = param;\r\n }",
"public void setStudent_sex(java.lang.String student_sex) {\n\t\t_primarySchoolStudent.setStudent_sex(student_sex);\n\t}",
"public String sex() {\n return this.sex;\n }",
"public void setSex(String sex) {\n\t\tthis.sex = sex == null ? null : sex.trim();\n\t}",
"boolean hasHasGender();",
"public void setMale(int value) {\n this.male = value;\n }",
"public void setSex(String sex) {\r\n this.sex = sex == null ? null : sex.trim();\r\n }",
"public void setUserSex(String userSex) {\n this.userSex = userSex;\n }",
"int getGenderValue();",
"@Override\n\tpublic void setSex(String sex) throws RemoteException {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public Boolean getSex() {\r\n return sex;\r\n }",
"public Integer getaSex() {\n return aSex;\n }",
"private final static void checkTualatin(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Primary Male\";\n String mtype2 = \"Spouse Male\";\n String mtype3 = \"Primary Female\";\n String mtype4 = \"Spouse Female\";\n\n int birth = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // date to determine if < 18 yrs old\n\n int date1 = (year * 10000) + (month * 100) + day;\n\n year = year - 6; // date to determine if < 24 yrs old\n\n int date2 = (year * 10000) + (month * 100) + day;\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, m_type, birth FROM member2b \" +\n \"WHERE m_type != ? AND m_type != ? AND m_type != ? AND m_type != ? AND birth != 0\");\n\n pstmt.clearParameters();\n pstmt.setString(1, mtype1);\n pstmt.setString(2, mtype2);\n pstmt.setString(3, mtype3);\n pstmt.setString(4, mtype4);\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n mtype = rs.getString(2);\n birth = rs.getInt(3);\n\n mtypeNew = \"\";\n\n if (birth > date1) { // if < 17 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 17 Female\";\n\n } else {\n\n mtypeNew = \"Junior 17 Male\";\n }\n\n } else {\n\n if (birth > date2) { // if < 24 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 18-23 Female\";\n\n } else {\n\n mtypeNew = \"Junior 18-23 Male\";\n }\n }\n }\n\n //\n // Update the mtype if it has changed\n //\n if (!mtypeNew.equals(mtype)) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setString(2, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"public void setAdminSex(Integer adminSex) {\n this.adminSex = adminSex;\n }",
"public void setUserSex(Byte userSex) {\r\n this.userSex = userSex;\r\n }",
"int getGender();",
"@Override\n\tpublic Gender convertToEntityAttribute(String sex) {\n\t\tif (sex == null) {\n return null;\n }\n\n return Stream.of(Gender.values())\n .filter(g -> g.getSex().equals(sex))\n .findFirst()\n .orElseThrow(IllegalArgumentException::new);\n\t}",
"public void setGender(Gender_Tp gender) { this.gender = gender; }",
"public java.lang.String getStudent_sex() {\n\t\treturn _primarySchoolStudent.getStudent_sex();\n\t}",
"public String getPatientSex(){\n\t\treturn patientSex;\n\t}",
"public Integer getAccountSex() {\n return accountSex;\n }",
"public void setGender(char gender) { this.gender = gender; }",
"public Integer getSex() {\r\n return sex;\r\n }",
"boolean contemProfessor(String cpf);",
"public Short getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public String getSex()\n {\n return sex;\n }",
"public M csmiSexMax(Object max){this.put(\"csmiSexMax\", max);return this;}",
"public String getSex() {\r\n return sex;\r\n }",
"public String gender();",
"boolean hasGenderView();",
"public void setSexo(char sexo) {\r\n\t\tcomprobarSexo(sexo);\r\n\t}",
"public boolean getGender() { return gender; }",
"public void setGender(String gender){\n if(gender == \"laki\"){\r\n isMale = true;\r\n }else if(gender == \"perempuan\"){\r\n isMale = false;\r\n }\r\n }",
"public boolean search_intake_reference(String gender, int age){\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\"SELECT * FROM intake_reference where gender = ? AND min_age <= ? AND max_age >= ?\" );\n\t\t\tstmt.setString(1, gender);\n\t\t\tstmt.setInt(2, age);\n\t\t\tstmt.setInt(3, age);\n\n\t\t\tResultSet res = stmt.executeQuery();\n\t\t\tif (res.next() ) {\n\t\t\t\tres.close();\n\t\t\t\tstmt.close();\n\t\t\t\tconnection.close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean UpdateGender(String gender, String username) {\n\t\tDataAccess dBManager = new DataAccess();\r\n \tboolean update6 = dBManager.updateGender(gender, username);\r\n \tdBManager.close();\r\n \t//updateCurrentUser();\r\n \treturn update6;\r\n\t}",
"public void setFemale(int value) {\n this.female = value;\n }",
"public String getUserSex() {\n return userSex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"public void setAdmSexual(Integer admSexual) {\n this.admSexual = admSexual;\n }",
"public Sex getSex() {\n return sex;\n }",
"public void setSexo(String sexo) {\r\n this.sexo = sexo;\r\n }",
"public String getSex(){ //\"public\" access allows other classes to retrieve the value of \"sex\", but since there\n // is no setter it cannot be changed from outside the class = Encapsulation/Inkapsling\n return this.sex;\n }",
"public void setSexo(String sexo) {\r\n\t\tthis.sexo = sexo;\r\n\t}",
"public Byte getUserSex() {\r\n return userSex;\r\n }",
"public Gender_Tp getGender() { return gender; }",
"public int gender()\r\n\t{\r\n\t\tif(male)\r\n\t\t\treturn 0;\r\n\t\treturn 1;\r\n\t}",
"public void setGender(String gender);",
"public void setGender(String gender);",
"public void setGender(String gender);",
"public static List<Student> filterMaleValues(){\n\n\t\tList<Student> filterMaleExe = StudentDataBase.getAllStudents().stream()\n\t\t\t\t.filter(k->k.getGradeLevel()>=3.9)\n\t\t\t\t.filter(j->j.getGender().equals(\"male\")).collect(Collectors.toList());\n\t\treturn filterMaleExe;\n\t}",
"public Boolean getSex();",
"public void setGender (boolean g) {\n gender = g;\n }",
"public static int checkValidGender(String gender) throws IOException {\n \t\t\n\t\tif(!gender.equals(\"M\") && !gender.equals(\"m\") && !gender.equals(\"f\") && !gender.equals(\"F\")) {\n\t\t\tSystem.out.println(\"Please enter a valid gender, M or F\");\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\treturn 0;\n\t}",
"public static void isValidSex(String str) \n\t throws IllegalArgumentException {\n\tisValid(str);\n\t//validate that the input is \"male\" or \"female\"\n\tif(!str.toLowerCase().equals(\"male\") && !str.toLowerCase().equals(\"female\"))\n\t throw new IllegalArgumentException();\n }",
"public void setGender(String value) {\n this.gender = value;\n }",
"public void setGender(Integer gender) {\r\n this.gender = gender;\r\n }"
] | [
"0.604873",
"0.6018003",
"0.60009205",
"0.59980816",
"0.5984692",
"0.5984692",
"0.5984692",
"0.5984692",
"0.5984692",
"0.5948093",
"0.5948093",
"0.58544755",
"0.585006",
"0.5762653",
"0.5761603",
"0.5734716",
"0.5710042",
"0.56609696",
"0.5631951",
"0.5591591",
"0.5591591",
"0.5573274",
"0.5538097",
"0.55322903",
"0.5516357",
"0.5504917",
"0.54623425",
"0.5456885",
"0.5423247",
"0.54043007",
"0.53954506",
"0.5359469",
"0.53581315",
"0.5354167",
"0.5348649",
"0.53328854",
"0.53328854",
"0.53328854",
"0.53328854",
"0.53328854",
"0.53328854",
"0.5319563",
"0.53044987",
"0.529246",
"0.5288012",
"0.52803725",
"0.5268772",
"0.52444166",
"0.5189554",
"0.5175342",
"0.517128",
"0.5155297",
"0.515078",
"0.5149897",
"0.51491386",
"0.5135385",
"0.5092314",
"0.5092314",
"0.5092314",
"0.5092314",
"0.5092314",
"0.50687826",
"0.50523233",
"0.50391716",
"0.50246114",
"0.50196433",
"0.5015341",
"0.5011072",
"0.5006685",
"0.49887323",
"0.49717414",
"0.49581388",
"0.49450794",
"0.4936582",
"0.4936582",
"0.4936582",
"0.4936582",
"0.4936582",
"0.4936582",
"0.4936582",
"0.4936582",
"0.49222726",
"0.492172",
"0.4911079",
"0.49045298",
"0.48969308",
"0.48895636",
"0.48783115",
"0.48764068",
"0.487367",
"0.48671588",
"0.48671588",
"0.48671588",
"0.48533782",
"0.4833615",
"0.48314834",
"0.48299932",
"0.48241657",
"0.48088282",
"0.48069045"
] | 0.57779926 | 13 |
and csmi_sex <= ? | public M csmiSexMax(Object max){this.put("csmiSexMax", max);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSex(String sex)\n {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\r\n this.sex = sex;\r\n }",
"public void setSex(String sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Short sex) {\n this.sex = sex;\n }",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(Byte sex) {\n this.sex = sex;\n }",
"public void setSex(String sex);",
"public void setSex(Boolean sex) {\r\n this.sex = sex;\r\n }",
"private boolean testSexSecol() {\n switch (S) {\n case \"1\":\n // 1,2 1900-1999\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"2\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"3\":\n // 3,4 1800-1899\n secol = \"18\";\n Sex = \"M\";\n break;\n case \"4\":\n secol = \"18\";\n Sex = \"F\";\n break;\n case \"5\":\n // 5,6 2000-2099\n secol = \"20\";\n Sex = \"M\";\n break;\n case \"6\":\n secol = \"20\";\n Sex = \"F\";\n break;\n case \"7\":\n // 7,8 straini rezidenti 1900+\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"8\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"9\":\n // 9 straini 1900+\n secol = \"19\";\n break;\n default:\n // Sexul nu poate fi \"0\"\n return false;\n }\n return true;\n }",
"public void setSex(Boolean sex);",
"public void setAccountSex(Integer accountSex) {\n this.accountSex = accountSex;\n }",
"public void setSex(Sex sex) {\n this.sex = sex;\n }",
"public M csmiSexMin(Object min){this.put(\"csmiSexMin\", min);return this;}",
"public void setaSex(Integer aSex) {\n this.aSex = aSex;\n }",
"public static void main(String[] args) {\nint age=21 ;char gender='f';\nif(age>=21 && gender=='m')\n{\n\tSystem.out.println(\"eligble for marriage\");\n}\n\n else if (age>=18 && gender=='f') {\nSystem.out.println(\"eligble for marriage\");\n}\nelse {\n\t{System.out.println(\"not eligble for marrage\");\n}\n\t\t\n\t}\n\n\n}",
"public String gender_check(String name) {\n\t\treturn dao.seat_genderselect(name);\r\n\t}",
"boolean hasGender();",
"boolean hasGender();",
"public void setPatientSex(String patientSex){\n\t\tthis.patientSex = patientSex;\n\t}",
"public String sex() {\n return this.sex;\n }",
"static SexType checkSex(String data){\n if(data.contains(\"M\"))\n return SexType.MALE;\n else\n return SexType.FEMALE;\n }",
"public void setSex(java.lang.String param) {\r\n localSexTracker = param != null;\r\n\r\n this.localSex = param;\r\n }",
"public void setStudent_sex(java.lang.String student_sex) {\n\t\t_primarySchoolStudent.setStudent_sex(student_sex);\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex == null ? null : sex.trim();\n\t}",
"public Boolean getSex() {\r\n return sex;\r\n }",
"public void setMale(int value) {\n this.male = value;\n }",
"public void setSex(String sex) {\r\n this.sex = sex == null ? null : sex.trim();\r\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"int getGenderValue();",
"boolean hasHasGender();",
"public Integer getaSex() {\n return aSex;\n }",
"public void setAdminSex(Integer adminSex) {\n this.adminSex = adminSex;\n }",
"public void setUserSex(String userSex) {\n this.userSex = userSex;\n }",
"@Override\n\tpublic void setSex(String sex) throws RemoteException {\n\t\tthis.sex = sex;\n\t}",
"boolean contemProfessor(String cpf);",
"public void setUserSex(Byte userSex) {\r\n this.userSex = userSex;\r\n }",
"private final static void checkTualatin(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Primary Male\";\n String mtype2 = \"Spouse Male\";\n String mtype3 = \"Primary Female\";\n String mtype4 = \"Spouse Female\";\n\n int birth = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // date to determine if < 18 yrs old\n\n int date1 = (year * 10000) + (month * 100) + day;\n\n year = year - 6; // date to determine if < 24 yrs old\n\n int date2 = (year * 10000) + (month * 100) + day;\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, m_type, birth FROM member2b \" +\n \"WHERE m_type != ? AND m_type != ? AND m_type != ? AND m_type != ? AND birth != 0\");\n\n pstmt.clearParameters();\n pstmt.setString(1, mtype1);\n pstmt.setString(2, mtype2);\n pstmt.setString(3, mtype3);\n pstmt.setString(4, mtype4);\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n mtype = rs.getString(2);\n birth = rs.getInt(3);\n\n mtypeNew = \"\";\n\n if (birth > date1) { // if < 17 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 17 Female\";\n\n } else {\n\n mtypeNew = \"Junior 17 Male\";\n }\n\n } else {\n\n if (birth > date2) { // if < 24 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 18-23 Female\";\n\n } else {\n\n mtypeNew = \"Junior 18-23 Male\";\n }\n }\n }\n\n //\n // Update the mtype if it has changed\n //\n if (!mtypeNew.equals(mtype)) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setString(2, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"int getGender();",
"public java.lang.String getStudent_sex() {\n\t\treturn _primarySchoolStudent.getStudent_sex();\n\t}",
"public Integer getSex() {\r\n return sex;\r\n }",
"public void setGender(Gender_Tp gender) { this.gender = gender; }",
"public Integer getAccountSex() {\n return accountSex;\n }",
"public String getPatientSex(){\n\t\treturn patientSex;\n\t}",
"@Override\n\tpublic Gender convertToEntityAttribute(String sex) {\n\t\tif (sex == null) {\n return null;\n }\n\n return Stream.of(Gender.values())\n .filter(g -> g.getSex().equals(sex))\n .findFirst()\n .orElseThrow(IllegalArgumentException::new);\n\t}",
"public void setGender(char gender) { this.gender = gender; }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Integer getSex() {\n return sex;\n }",
"public Short getSex() {\n return sex;\n }",
"public String getSex()\n {\n return sex;\n }",
"public String getSex() {\r\n return sex;\r\n }",
"public void setSexo(char sexo) {\r\n\t\tcomprobarSexo(sexo);\r\n\t}",
"public boolean getGender() { return gender; }",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"public void setAdmSexual(Integer admSexual) {\n this.admSexual = admSexual;\n }",
"public void setFemale(int value) {\n this.female = value;\n }",
"public void setGender(String gender){\n if(gender == \"laki\"){\r\n isMale = true;\r\n }else if(gender == \"perempuan\"){\r\n isMale = false;\r\n }\r\n }",
"public int gender()\r\n\t{\r\n\t\tif(male)\r\n\t\t\treturn 0;\r\n\t\treturn 1;\r\n\t}",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public String getSex() {\n return sex;\n }",
"public Sex getSex() {\n return sex;\n }",
"public String getUserSex() {\n return userSex;\n }",
"public boolean estSurLaCase(ICase c) ;",
"public String getSex(){ //\"public\" access allows other classes to retrieve the value of \"sex\", but since there\n // is no setter it cannot be changed from outside the class = Encapsulation/Inkapsling\n return this.sex;\n }",
"@Override\r\n\tpublic boolean UpdateGender(String gender, String username) {\n\t\tDataAccess dBManager = new DataAccess();\r\n \tboolean update6 = dBManager.updateGender(gender, username);\r\n \tdBManager.close();\r\n \t//updateCurrentUser();\r\n \treturn update6;\r\n\t}",
"public String gender();",
"boolean hasGenderView();",
"public void setSexo(String sexo) {\r\n this.sexo = sexo;\r\n }",
"public void setSexo(String sexo) {\r\n\t\tthis.sexo = sexo;\r\n\t}",
"public Byte getUserSex() {\r\n return userSex;\r\n }",
"public static void isValidSex(String str) \n\t throws IllegalArgumentException {\n\tisValid(str);\n\t//validate that the input is \"male\" or \"female\"\n\tif(!str.toLowerCase().equals(\"male\") && !str.toLowerCase().equals(\"female\"))\n\t throw new IllegalArgumentException();\n }",
"public static int checkValidGender(String gender) throws IOException {\n \t\t\n\t\tif(!gender.equals(\"M\") && !gender.equals(\"m\") && !gender.equals(\"f\") && !gender.equals(\"F\")) {\n\t\t\tSystem.out.println(\"Please enter a valid gender, M or F\");\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\treturn 0;\n\t}",
"public Boolean getSex();",
"public void setGender (boolean g) {\n gender = g;\n }",
"public String getSex() {\n\t\treturn sex;\n\t}",
"public String getSex() {\n\t\treturn sex;\n\t}",
"public Gender_Tp getGender() { return gender; }",
"public Sim.Sex chooseSex() {\n if(RND.nextInt() > 0.5) {\n return Sim.Sex.M;\n } else {\n return Sim.Sex.F;\n }\n }",
"public static boolean validaSexo(String sexo) {\r\n\t\treturn ((sexo.equals(\"MASCULINO\") || sexo.equals(\"FEMININO\")) ? true : false);\r\n\t}",
"boolean contemProfessor(Professor p);",
"public static List<Student> filterMaleValues(){\n\n\t\tList<Student> filterMaleExe = StudentDataBase.getAllStudents().stream()\n\t\t\t\t.filter(k->k.getGradeLevel()>=3.9)\n\t\t\t\t.filter(j->j.getGender().equals(\"male\")).collect(Collectors.toList());\n\t\treturn filterMaleExe;\n\t}"
] | [
"0.60552454",
"0.6033184",
"0.60081226",
"0.600528",
"0.600528",
"0.600528",
"0.600528",
"0.600528",
"0.5976399",
"0.59390694",
"0.59390694",
"0.58883727",
"0.587812",
"0.58434373",
"0.5836223",
"0.5802679",
"0.5782268",
"0.5780956",
"0.5676918",
"0.5676071",
"0.56632984",
"0.5598281",
"0.55864197",
"0.55864197",
"0.558443",
"0.5553491",
"0.5524273",
"0.5523759",
"0.55037266",
"0.5502092",
"0.5486403",
"0.54669404",
"0.54488206",
"0.541381",
"0.541381",
"0.541381",
"0.541381",
"0.541381",
"0.541381",
"0.5402004",
"0.5376086",
"0.5376029",
"0.536674",
"0.5354059",
"0.53413385",
"0.53281367",
"0.5300064",
"0.52999693",
"0.5286192",
"0.52647257",
"0.52507335",
"0.52496576",
"0.5243999",
"0.5237892",
"0.5204509",
"0.5198353",
"0.5178261",
"0.5178261",
"0.5178261",
"0.5178261",
"0.5178261",
"0.5162108",
"0.5150737",
"0.514138",
"0.51330996",
"0.51281935",
"0.5094144",
"0.50734144",
"0.5071742",
"0.506167",
"0.50352114",
"0.5025128",
"0.5025128",
"0.5025128",
"0.5025128",
"0.5025128",
"0.5025128",
"0.5025128",
"0.5025128",
"0.5007943",
"0.4996467",
"0.49904457",
"0.49866596",
"0.4976865",
"0.49709436",
"0.49590886",
"0.49522027",
"0.4943666",
"0.4940663",
"0.49364603",
"0.49255863",
"0.4919874",
"0.49142557",
"0.49010682",
"0.49010682",
"0.48968977",
"0.48833436",
"0.4865893",
"0.48524264",
"0.48518327"
] | 0.5316106 | 46 |
and csmi_birthday is null | public M csmiBirthdayNull(){if(this.get("csmiBirthdayNot")==null)this.put("csmiBirthdayNot", "");this.put("csmiBirthday", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"static-access\")\r\n\tpublic boolean isBirthday()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tboolean isBirthday = false;\r\n\t\tif (now.MONTH == bDate.MONTH && now.DATE == bDate.DATE)\r\n\t\t{\r\n\t\t\tisBirthday = true;\r\n\t\t}\r\n\t\treturn isBirthday;\r\n\t}",
"private void passengerDoesNotHaveDOB(final Passenger eachPassenger)\r\n {\r\n if (adultPassengers(eachPassenger) && !StringUtils.isEmpty(eachPassenger.getDateOfBirth()))\r\n {\r\n eachPassenger.setDateOfBirth(null);\r\n }\r\n }",
"abstract void birthDateValidity();",
"boolean getFromDayNull();",
"public void setBirthday() { this.birthday = birthday; }",
"public void setBirthday(java.lang.String param) {\r\n localBirthdayTracker = param != null;\r\n\r\n this.localBirthday = param;\r\n }",
"public void setBirthday(String birthday) {\n this.birthday = birthday == null ? null : birthday.trim();\n }",
"Optional<Date> getBirthdate();",
"public boolean isSetBirthTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BIRTHTIME$12) != 0;\n }\n }",
"boolean getDayNull();",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }",
"public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }",
"void birthDateValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setBirthdate(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"public final Date getBirthTime() {\n\t\treturn null;\n\t}",
"@Test\n public void testMissingBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, null);\n assertNotNull(userService.getUser(username));\n }",
"public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }",
"public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }",
"public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }",
"@Test\n public void testInvalidBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, \"01011990\");\n assertNull(userService.getUser(username));\n }",
"public boolean isSetBirth() {\n\t\treturn this.birth != null;\n\t}",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthdate(String birthdate) {\r\n this.birthdate = birthdate;\r\n }",
"public Date getBirthday();",
"public Date getBirthday() { return birthday; }",
"public void setBirthday(Date birthday);",
"@Override\r\n\tpublic void setBirthDay(Calendar bday) {\n\t\tif (bday == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (bday.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.birthday = bday;\r\n\t}",
"public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }",
"public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }",
"public void setBirthday(String birthday) {\n\t\tthis.birthday = birthday;\n\t}",
"public boolean validarFechaNac() {\n\t\treturn fecha_nac != null;\n\t}",
"public void setBirthdate(Date birthdate) {\n this.birthdate = birthdate;\n }",
"public void setBirthDate(Date inBirthDate)\n {\n birthdate = inBirthDate;\n }",
"boolean getToDayNull();",
"public void seteBirthday(Date eBirthday) {\n this.eBirthday = eBirthday;\n }",
"public final void testNoDate() {\n testTransaction1.setDate(null);\n assertFalse(testTransaction1.isValidTransaction());\n }",
"public void setBirth_date(java.lang.String birth_date) {\n this.birth_date = birth_date;\n }",
"public void setBirthDate(String birthday) {\n\t\tbirthDate = birthday;\n\t}",
"Date getBirthDate();",
"public void setBirthday(String birthday) {\n if(birthday.length()==10)\n this.birthday = birthday;\n else this.birthday =\"undefined\";\n\n }",
"@Override\r\n\tpublic Student[] getNearBirthDate(Date date, int days) {\n\t\treturn null;\r\n\t}",
"public Date getBirthday() {\r\n return birthday;\r\n }",
"public Date getBirthday() {\r\n return birthday;\r\n }",
"public M csmiBirthdayStart(Object start){this.put(\"csmiBirthdayStart\", start);return this;}",
"LocalDate getDateOfBirth();",
"public BirthInfo() {}",
"public boolean getFromDayNull() {\n return fromDayNull_;\n }",
"public void setBirthdate(java.util.Calendar birthdate) {\n this.birthdate = birthdate;\n }",
"public Date getBirthdate()\n {\n return birthdate;\n }",
"private void validationEmptyFieldsInWeatherCalender(WeatherCalender weatherCalender) {\n\t\tLocalDate dt = weatherCalender.getCalenderdate();\n\t\tString typCd = weatherCalender.getWeather().getWeatherTypeCd();\n\t\t\n\t\tif(dt == null || typCd == null) {\n\t\t\tthrow new EmptyFieldWeatherCalenderException(dt, typCd);\n\t\t}\n\t}",
"public boolean isSetBirthplace()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BIRTHPLACE$24) != 0;\n }\n }",
"public Date getBirthDate();",
"public Date getBirthdate()\n {\n return birthdate;\n }",
"public Date geteBirthday() {\n return eBirthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthdate() {\r\n return birthdate;\r\n }",
"public Date getBirth_date() {\n return birth_date;\n }",
"public void setDate_of_birth(String date_of_birth) {\n this.date_of_birth = date_of_birth;\n }",
"public void setBirthDate(Date birthDate);",
"public boolean getFromDayNull() {\n return fromDayNull_;\n }",
"public void setBirth(Date birth) {\r\n this.birth = birth;\r\n }",
"public Date getBirthdate() {\n return birthdate;\n }",
"@Override\r\n\tpublic Calendar getBirthDay() {\n\t\treturn birthday;\r\n\t}",
"public boolean isBornInSummer() {\n return this.birthdate.getMonthValue() == 6 || this.birthdate.getMonthValue() == 7 || this.birthdate.getMonthValue() == 8;\n }",
"public void setBirthDay(Date birthDay) {\n\t\tthis.birthDay = birthDay;\n\t}",
"@Override\n\tpublic java.util.Date getDateOfBirth() {\n\t\treturn _candidate.getDateOfBirth();\n\t}",
"private boolean employeeDobValid(EmployeeDto newEmpDto) {\n\t\treturn (newEmpDto.getDob().compareTo(Calendar.getInstance()) < 0) ? true : false ;\n\t}",
"public void setBirth(Date birth) {\n this.birth = birth;\n }",
"public void setBirth(Date birth) {\n this.birth = birth;\n }",
"@Test\n public void testBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, \"01/01/1990\");\n assertNotNull(userService.getUser(username));\n }",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public String getBirthDate() {\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tif (jPanelFormClient.birthdayDateChooser.getDate() != null)\r\n\t\t\treturn sdf.format(jPanelFormClient.birthdayDateChooser.getDate());\r\n\t\treturn null;\r\n\t}",
"public M csmiBirthdayEnd(Object end){this.put(\"csmiBirthdayEnd\", end);return this;}",
"void setBirthDate(Date birthDate);",
"public String getBirthday(){\n return birthday;\n\t}",
"@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }",
"@Override\r\n public boolean checkNull() {\r\n // Check if the two textfields are null or default \r\n return newIng_ingName.getText().equals(\"\") || newIng_ingCal.getText().equals(\"\");\r\n }",
"public void setBirthDate(java.util.Calendar birthDate) {\r\n this.birthDate = birthDate;\r\n }",
"public static void birthdateValidation(Date birthdate) throws Exception {\n if (birthdate.after(new Date())) {\n throw new Exception(\"Your birth date cannot be in the future\");\n }\n }",
"public CpFldValidDate() { super(10018, 1); }",
"@Override\n public String getDateofBirth() {\n return this.DateofBirth;\n\n }",
"boolean isNullOmittable();",
"public T dob(LocalDate birthday) {\n dccObject.set(\"dob\", jsonNodeFactory.textNode(toIsoDate(birthday)));\n requiredNotSet.remove(RequiredFieldsBase.dob);\n return getThis();\n }",
"public Timestamp getBirthdate() {\n return birthdate;\n }",
"public void date_not_before_createdAt_date(FacesContext context, UIComponent comp, Object value) {\n if (charge.getCreatedAt() != null) {\n Date paidAt = (Date) value;\n\n if (paidAt != null) {\n if (paidAt.before(charge.getCreatedAt())) {\n FacesMessage FMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, message.translate(\"msg.error\"), message.translate(\"msg.validation.notBeforeCreatedAt\"));\n throw new ValidatorException(FMessage);\n }\n }\n }\n }",
"boolean isSetFoundingDate();",
"public void setBirth(Date birth) {\n\t\tthis.birth = birth;\n\t}",
"public void setDateOfBirth(LocalDate dateOfBirth) {\n this.dateOfBirth = dateOfBirth;\n }",
"boolean isSetDate();",
"public void setDateOfBirth(Date dateOfBirth) {\n\t\tthis.dateOfBirth = dateOfBirth;\n\t}",
"@Test\n @Ignore\n public void testFindByBirthDateBetweenDatesWithNullPageable() {\n Sort sort = new Sort(\n new Sort.Order(Sort.Direction.ASC, \"name\")\n );\n PageRequest pageRequest = new PageRequest(0, 100, sort);\n Page<Author> authors = authorRepository.findByBirthDateBetweenDates(\n new LocalDate().minusYears(25),\n new LocalDate(),\n pageRequest\n );\n assertThat(authors).isNotNull();\n assertThat(authors.getContent()).isNotNull();\n assertThat(authors.getContent().size()).isEqualTo(4);\n assertThat(authors.getContent().get(0).getName()).isEqualTo(fozzie.getName());\n }",
"public void validate_the_Date_of_Birth_of_Security_in_Customer_Tab(String DateofBirth)throws Exception {\n\t\tVerifyElementPresent(Desktop_XPATH_Verify_Customer_Page_Security.replaceAll(\"M_Header\", \"Security\").replaceAll(\"M_Category\", \"Date of Birth\").replaceAll(\"M_InnerText\", DateofBirth), \"Date of Birth - \"+DateofBirth, false);\n\t}"
] | [
"0.60502785",
"0.5904625",
"0.58600545",
"0.58498573",
"0.5781185",
"0.5759027",
"0.5709281",
"0.5682379",
"0.566483",
"0.56446695",
"0.5639864",
"0.55704284",
"0.556361",
"0.5534019",
"0.5534019",
"0.5526928",
"0.55194926",
"0.55171275",
"0.5510867",
"0.54759866",
"0.5470081",
"0.5470081",
"0.54691",
"0.54684603",
"0.54622877",
"0.54622877",
"0.54622877",
"0.5437041",
"0.5422645",
"0.54103243",
"0.5401925",
"0.5398822",
"0.5393064",
"0.5391745",
"0.5336245",
"0.5334949",
"0.5316098",
"0.53058654",
"0.530339",
"0.5297429",
"0.5283769",
"0.52818006",
"0.5268184",
"0.526603",
"0.52441144",
"0.5240328",
"0.5208109",
"0.5208109",
"0.5207406",
"0.5205555",
"0.5202762",
"0.51772827",
"0.5176353",
"0.51541215",
"0.5150166",
"0.51477754",
"0.5142368",
"0.51213735",
"0.5120492",
"0.51204044",
"0.51204044",
"0.51204044",
"0.51204044",
"0.51148814",
"0.51073104",
"0.5096814",
"0.50803024",
"0.5051764",
"0.5044958",
"0.5027906",
"0.5005983",
"0.5001941",
"0.49994892",
"0.4999084",
"0.49964422",
"0.4989909",
"0.4989909",
"0.49667794",
"0.49521288",
"0.49513584",
"0.49502635",
"0.4947059",
"0.4932129",
"0.49265444",
"0.49248028",
"0.49211058",
"0.49147776",
"0.49077827",
"0.48928133",
"0.48888597",
"0.48858348",
"0.4883946",
"0.48831362",
"0.4882013",
"0.48805335",
"0.4879396",
"0.48786977",
"0.48780933",
"0.48768803",
"0.48622292"
] | 0.7561747 | 0 |
and csmi_birthday >= ? | public M csmiBirthdayStart(Object start){this.put("csmiBirthdayStart", start);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract void birthDateValidity();",
"public void setBirthday(Date birthday);",
"public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }",
"public Date getBirthday();",
"Date getBirthDate();",
"public void setBirthday() { this.birthday = birthday; }",
"@SuppressWarnings(\"static-access\")\r\n\tpublic boolean isBirthday()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tboolean isBirthday = false;\r\n\t\tif (now.MONTH == bDate.MONTH && now.DATE == bDate.DATE)\r\n\t\t{\r\n\t\t\tisBirthday = true;\r\n\t\t}\r\n\t\treturn isBirthday;\r\n\t}",
"public void setBirthday(java.lang.String param) {\r\n localBirthdayTracker = param != null;\r\n\r\n this.localBirthday = param;\r\n }",
"public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }",
"public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }",
"public Date getBirthDate();",
"public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthDate(Date inBirthDate)\n {\n birthdate = inBirthDate;\n }",
"public void setBirthdate(String birthdate) {\r\n this.birthdate = birthdate;\r\n }",
"public Date getBirthday() { return birthday; }",
"public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }",
"public M csmiBirthdayNull(){if(this.get(\"csmiBirthdayNot\")==null)this.put(\"csmiBirthdayNot\", \"\");this.put(\"csmiBirthday\", null);return this;}",
"public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }",
"public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }",
"public List<Employees> getByBirthDateGreater (Date birthDate);",
"public void setBirthdate(Date birthdate) {\n this.birthdate = birthdate;\n }",
"LocalDate getDateOfBirth();",
"public void setBirthDate(Date birthDate);",
"public void setBirthday(String birthday) {\n\t\tthis.birthday = birthday;\n\t}",
"private final static void checkTualatin(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Primary Male\";\n String mtype2 = \"Spouse Male\";\n String mtype3 = \"Primary Female\";\n String mtype4 = \"Spouse Female\";\n\n int birth = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // date to determine if < 18 yrs old\n\n int date1 = (year * 10000) + (month * 100) + day;\n\n year = year - 6; // date to determine if < 24 yrs old\n\n int date2 = (year * 10000) + (month * 100) + day;\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, m_type, birth FROM member2b \" +\n \"WHERE m_type != ? AND m_type != ? AND m_type != ? AND m_type != ? AND birth != 0\");\n\n pstmt.clearParameters();\n pstmt.setString(1, mtype1);\n pstmt.setString(2, mtype2);\n pstmt.setString(3, mtype3);\n pstmt.setString(4, mtype4);\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n mtype = rs.getString(2);\n birth = rs.getInt(3);\n\n mtypeNew = \"\";\n\n if (birth > date1) { // if < 17 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 17 Female\";\n\n } else {\n\n mtypeNew = \"Junior 17 Male\";\n }\n\n } else {\n\n if (birth > date2) { // if < 24 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 18-23 Female\";\n\n } else {\n\n mtypeNew = \"Junior 18-23 Male\";\n }\n }\n }\n\n //\n // Update the mtype if it has changed\n //\n if (!mtypeNew.equals(mtype)) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setString(2, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"void setBirthDate(Date birthDate);",
"public void setBirthdate(java.util.Calendar birthdate) {\n this.birthdate = birthdate;\n }",
"public void seteBirthday(Date eBirthday) {\n this.eBirthday = eBirthday;\n }",
"public void setBirthDate(String birthday) {\n\t\tbirthDate = birthday;\n\t}",
"public Date getBirthdate()\n {\n return birthdate;\n }",
"public Date getBirthdate()\n {\n return birthdate;\n }",
"@Override\n public void onDateSet(DatePicker view, int year1, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year1);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n /* date=dayOfMonth;\n month=monthOfYear;\n year=year1;*/\n if(getAge(year1,monthOfYear,dayOfMonth) >= 18){\n updateLabel();\n }else{\n Utility.showToastMessage(GetUserInfoActivity.this,\"Age should be 18+\");\n }\n\n }",
"public void setBirth_date(java.lang.String birth_date) {\n this.birth_date = birth_date;\n }",
"public Date getBirthday() {\r\n return birthday;\r\n }",
"public Date getBirthday() {\r\n return birthday;\r\n }",
"@Test\n public void testBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, \"01/01/1990\");\n assertNotNull(userService.getUser(username));\n }",
"public Date getBirthdate() {\r\n return birthdate;\r\n }",
"public void test_DATE_HHmmss_conditionBean() { // *Important!\r\n // ## Arrange ##\r\n Calendar cal = Calendar.getInstance();\r\n cal.set(2008, 5, 15, 12, 34, 56);\r\n cal.set(Calendar.MILLISECOND, 123);\r\n Member member = new Member();\r\n member.setMemberId(3);\r\n LocalDate targetDate = toLocalDate(cal);\r\n member.setBirthdate(targetDate);\r\n memberBhv.updateNonstrict(member);\r\n\r\n // ## Act ##\r\n cal.set(2008, 5, 15, 12, 34, 57); // plus one second\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because Oracle Date type have time parts. \r\n //}\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because java.sql.Date is converted to java.util.Date in ConditionBean. \r\n //}\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because Oracle Date type have time parts. \r\n //}\r\n }\r\n cal.set(2008, 5, 15, 12, 34, 56); // just time\r\n cal.set(Calendar.MILLISECOND, 0); // Don't format!\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = DfTypeUtil.toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n }",
"private final static void checkInterlachen(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Jr Ages 6 - 11\";\n String mtype2 = \"Jr Ages 12 - 15\";\n String mtype3 = \"Jr Ages 16 - 24\";\n\n int birth = 0;\n int inact = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 12; // date to determine if < 12 yrs old\n\n int date12 = (year * 10000) + (month * 100) + day;\n\n year = year - 4; // date to determine if < 16 yrs old\n\n int date16 = (year * 10000) + (month * 100) + day;\n\n year = year - 9; // date to determine if < 25 yrs old\n\n int date25 = (year * 10000) + (month * 100) + day;\n\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, m-type, birth, inact FROM member2b \" +\n \"WHERE m_type = ? OR m_type = ? OR m_type = ? AND birth != 0 AND inact = 0\");\n\n pstmt.clearParameters();\n pstmt.setString(1, mtype1);\n pstmt.setString(2, mtype2);\n pstmt.setString(3, mtype3);\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n mtype = rs.getString(2);\n birth = rs.getInt(3);\n inact = rs.getInt(4);\n\n mtypeNew = mtype;\n\n if (birth > date12) { // if < 12 yrs old\n\n mtypeNew = mtype1; // 6 - 11\n\n } else {\n\n if (birth > date16) { // if < 16 yrs old\n\n mtypeNew = mtype2; // 12 - 15\n\n } else {\n\n if (birth > date25) { // if < 25 yrs old\n\n mtypeNew = mtype3; // 16 - 24\n\n } else {\n\n inact = 1; // older than 24, set inactive\n }\n }\n }\n\n //\n // Update the record if mtype has changed or we are setting member inactive\n //\n if (!mtypeNew.equals(mtype) || inact == 1) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ?, inact = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setInt(2, inact);\n pstmt.setString(3, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public void setBirth(Date birth) {\r\n this.birth = birth;\r\n }",
"public void setBirth(Date birth) {\n this.birth = birth;\n }",
"public void setBirth(Date birth) {\n this.birth = birth;\n }",
"public Date getBirthdate() {\n return birthdate;\n }",
"public Date getBirth_date() {\n return birth_date;\n }",
"@Override\r\n\tpublic Student[] getNearBirthDate(Date date, int days) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic void setBirthDay(Calendar bday) {\n\t\tif (bday == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (bday.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.birthday = bday;\r\n\t}",
"public void setBirthdate(LocalDate birthdate) throws IllegalArgumentException {\n LocalDate todayDate = LocalDate.now();\n\n if(birthdate.isAfter(todayDate) || birthdate.isEqual(todayDate)) {\n throw new IllegalArgumentException(\"Birthdate cannot be later than today's date\");\n } else {\n this.birthdate = birthdate;\n this.age = birthdate.until(todayDate).getYears(); // we set the age, if the birthdate is correct\n }\n }",
"List<AccountDetail> findAllByAgeLessThanEqual(Integer age);",
"Employee setBirthdate(Date birthdate);",
"public Date geteBirthday() {\n return eBirthday;\n }",
"@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n dateOfBirthText.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n try {\n dateOfBirth = formatter.parse(dateOfBirthText.getText().toString());\n LocalDate l1 = LocalDate.of(year, monthOfYear+1, dayOfMonth);\n LocalDate now1 = LocalDate.now();\n Period diff1 = Period.between(l1, now1);\n age = diff1.getYears();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }",
"public Boolean comprovaAge(Date date) {\n\t\treturn (rv.validateAge(date));\n\t}",
"public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}",
"List<Account> findAllByAgeBetween(Integer age1, Integer age2);",
"public void setDate_of_birth(String date_of_birth) {\n this.date_of_birth = date_of_birth;\n }",
"List<AccountDetail> findAllByAgeBetween(Integer minAge,Integer maxAge);",
"public Date getBirth() {\r\n return birth;\r\n }",
"public Boolean validarFecha(LocalDate fechaIngresada);",
"public static void birthdateValidation(Date birthdate) throws Exception {\n if (birthdate.after(new Date())) {\n throw new Exception(\"Your birth date cannot be in the future\");\n }\n }",
"public static boolean isValidDOB(String userInput) {\n \n return Pattern.matches(Constants.DATE_VALIDATION, userInput);\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n int age = yearNow - year;\n if (monthNow <= (monthOfYear + 1)) {\n if (monthNow == (monthOfYear + 1)) {\n // monthNow==monthBirth\n if (dayOfMonthNow < dayOfMonth) {\n age--;\n }\n } else {\n // monthNow>monthBirth\n age--;\n }\n }\n if (age <= 0) {\n ToastUtils.showToastInUIThread(UIUtils.getContext(), \"请输入合法的年龄\");\n tv_realEdit_ageTwo.setText(String.valueOf(18));\n return;\n } else {\n tv_realEdit_ageTwo.setText(String.valueOf(age));\n }\n }",
"protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }",
"public void setBirthday(String birthday) {\n if(birthday.length()==10)\n this.birthday = birthday;\n else this.birthday =\"undefined\";\n\n }",
"public Date getBirth() {\n return birth;\n }",
"public Date getBirth() {\n return birth;\n }",
"@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }",
"List<Account> findAllByAgeLessThanEqual(Integer age);",
"@SuppressWarnings(\"static-access\")\r\n\tprivate int calculateAge()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tnow = new GregorianCalendar(now.YEAR, now.MONTH, now.DATE);//simplifys the date so there is no problem with times\r\n\t\tGregorianCalendar birthDay = new GregorianCalendar(now.YEAR, bDate.MONTH, bDate.DATE);\r\n\t\tint age = 0;\r\n\t\tif(now.before(birthDay) || now.equals(birthDay))\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t\tage--;\r\n\t\t}\r\n\t\treturn age;\r\n\t}",
"public String getBirthday(){\n return birthday;\n\t}",
"void setDateOfBirth(LocalDate dateOfBirth);",
"@And(\"^Complete user data birthday and gender$\")\t\t\t\t\t\n public void Complete_user_data_birthday_and_gender() throws Throwable \t\t\t\t\t\t\t\n { \n \tdriver.findElement(By.id(\"day\")).sendKeys(\"19\");\n driver.findElement(By.xpath(\"//*[@id='month']/option[9]\")).click();\n driver.findElement(By.id(\"year\")).sendKeys(\"1994\");\n driver.findElement(By.xpath(\"//*[@id='gender']/option[2]\")).click();\n driver.findElement(By.xpath(\"//*[@id='personalDetailsNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\n }",
"public boolean isBabyBoomer() {\n // Unnecessary allocation of expensive object\n Calendar gmtCal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n gmtCal.set(1946, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomStart = gmtCal.getTime();\n gmtCal.set(1965, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomEnd = gmtCal.getTime();\n return birthDate.compareTo(boomStart) >= 0 && birthDate.compareTo(boomEnd) < 0;\n }",
"public void setBirth(Date birth) {\n\t\tthis.birth = birth;\n\t}",
"public void setBirthDate(java.util.Calendar birthDate) {\r\n this.birthDate = birthDate;\r\n }",
"public void setBirthDay(Date birthDay) {\n\t\tthis.birthDay = birthDay;\n\t}",
"public void setBirthdate(Timestamp aBirthdate) {\n birthdate = aBirthdate;\n }",
"void birthDateValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setBirthdate(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }",
"public Boolean validateDate(String date_of_birth) {\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n format.parse(date_of_birth);\n } catch (ParseException exception) {\n System.out.println(\"Invalid Input!\");\n return true;\n }\n return false;\n }",
"public Date getBirthday() {\n\t\treturn birthday;\n\t}",
"public Timestamp getBirthdate() {\n return birthdate;\n }",
"void findAllWithBirthday(@NonNull OnDataLoadCallback<List<Contact>> callback);",
"private void sendCustomerNotificationsBirthday_MinCompare(Customer customer){\n LocalDate curDateTime = LocalDate.now();\n int nextYear = curDateTime.getYear();\n int maxDay = Integer.MAX_VALUE;\n if (curDateTime.getDayOfYear() > customer.birthDate.getDayOfYear()) {\n nextYear ++;\n }\n\n LocalDate nextBirthDate = LocalDate.of(nextYear, customer.birthDate.getMonthValue(), customer.birthDate.getDayOfMonth());\n Event nearestEvent = null;\n for (Event event : events){\n if (event.eventDate.isAfter(nextBirthDate) || event.eventDate.isEqual(nextBirthDate)) {\n int day = event.eventDate.getDayOfYear();\n if (day < maxDay) {\n nearestEvent = event;\n maxDay = day;\n }\n }\n }\n\n if (nearestEvent != null) {\n System.out.println(String.format(\"sendCustomerNotificationsBirthday_MinCompare : nearest event is %s, event date is %s\", nearestEvent.id, nearestEvent.eventDate));\n } else {\n System.out.println(\"no matched event\");\n }\n }",
"private final static void checkHyperion(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Jr 6 to 7\";\n String mtype2 = \"Jr 8 to 11\";\n String mtype3 = \"Jr 12 to 15\";\n String mtype4 = \"Jr 16 to 22\";\n\n int birth = 0;\n int inact = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 8; // date to determine if < 8 yrs old\n\n int date8 = (year * 10000) + (month * 100) + day;\n\n year = year - 4; // date to determine if < 12 yrs old\n\n int date12 = (year * 10000) + (month * 100) + day;\n\n year = year - 4; // date to determine if < 16 yrs old\n\n int date16 = (year * 10000) + (month * 100) + day;\n\n year = year - 7; // date to determine if < 23 yrs old\n\n int date23 = (year * 10000) + (month * 100) + day;\n\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, birth FROM member2b \" +\n \"WHERE birth != 0 AND inact = 0\");\n\n pstmt.clearParameters();\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n birth = rs.getInt(2);\n\n mtypeNew = \"\";\n\n if (birth > date8) { // if < 8 yrs old\n\n mtypeNew = mtype1; // Under 8\n\n } else if (birth > date12) { // if < 12 yrs old\n\n mtypeNew = mtype2; // 8 - 11\n\n } else if (birth > date16) { // if < 16 yrs old\n\n mtypeNew = mtype3; // 12 - 15\n\n } else if (birth > date23) { // if < 23 yrs old\n\n mtypeNew = mtype4; // 16 - 22\n }\n\n //\n // Update the record if mtype has changed\n //\n if (!mtypeNew.equals( \"\" )) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setString(2, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"public String getBirthdate() {\n return birthdate;\n }",
"List<Account> findAccountByAgeBetween(int age1, int age2);",
"public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"public RecepcionBHC getRecepcionBhcById(Integer codigo, Date dfechabhc, Date enDate)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n Query query = session.createQuery(\"from RecepcionBHC r where r.recBhcId.fechaRecBHC BETWEEN :dfechabhc and :enDate and r.recBhcId.codigo= :codigo \");\n query.setParameter(\"codigo\", codigo);\n query.setParameter(\"dfechabhc\", dfechabhc);\n query.setParameter(\"enDate\",enDate);\n return (RecepcionBHC) query.uniqueResult();\n }",
"@Test\n public void testInvalidBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, \"01011990\");\n assertNull(userService.getUser(username));\n }",
"private static void getByMonth(Date birthday, EntityManager em) {\n TypedQuery<Person> query = em.createQuery(\"SELECT p FROM Person p WHERE EXTRACT(MONTH FROM p.birthday) = EXTRACT(MONTH FROM birthday) \", Person.class);\n\n List<Person> result = query.getResultList();\n if (result.isEmpty()){\n System.out.println(\"no result with Month :'\" + Integer.parseInt(String.valueOf(birthday.getMonth() + 1)) + \"'\");\n return;\n }\n System.out.println(\"result for Month '\"+ Integer.parseInt(String.valueOf(birthday.getMonth() + 1)) + \"' \");\n printList(result);\n }",
"Optional<Date> getBirthdate();",
"public void setBirthDate(GregorianCalendar newBirthDate)\r\n\t{\r\n\t\tbDate = newBirthDate;\r\n\t}",
"public static void main(String[] args) {\n \n int myAge = 16;\n int myBirthday = 901; // input date as 901 or 1021 putting a 0 infront results in an error.\n int todaysDate = 923;\n\n if (todaysDate == myBirthday) {\n myAge++; // adds 1\n System.out.println(\"I am \" + myAge + \" years old now.\");\n } else {\n System.out.println(\"I am still \" + myAge + \" years old.\");\n }\n }",
"@Query(value = \"SELECT * FROM account_details WHERE age < :age\", nativeQuery = true)\n List<Account> getAccountByAgeLowerThen(Integer age);"
] | [
"0.6139802",
"0.5852102",
"0.58484507",
"0.5799023",
"0.5746661",
"0.57075155",
"0.5690608",
"0.568016",
"0.56343436",
"0.56343436",
"0.55952674",
"0.5568168",
"0.5566256",
"0.5566256",
"0.5566256",
"0.55600446",
"0.55434585",
"0.55359495",
"0.5504085",
"0.5469494",
"0.54675585",
"0.54675585",
"0.5455088",
"0.5445301",
"0.5436795",
"0.5436387",
"0.5407241",
"0.5393129",
"0.5346741",
"0.5332006",
"0.53250766",
"0.5316561",
"0.5302862",
"0.530166",
"0.5299191",
"0.52906257",
"0.52713454",
"0.52713454",
"0.52356887",
"0.5219187",
"0.52183115",
"0.52117676",
"0.52074987",
"0.52074987",
"0.52074987",
"0.52074987",
"0.5200984",
"0.5162482",
"0.5162482",
"0.5161596",
"0.5159706",
"0.51494443",
"0.51426744",
"0.5140936",
"0.5133861",
"0.5126093",
"0.5099445",
"0.50986874",
"0.50928706",
"0.50818926",
"0.50750333",
"0.5071355",
"0.50684446",
"0.5062478",
"0.5056539",
"0.50475943",
"0.5046551",
"0.504642",
"0.50421536",
"0.50345784",
"0.50217193",
"0.50217193",
"0.5007458",
"0.5003183",
"0.4967332",
"0.4965648",
"0.49623576",
"0.4956131",
"0.49488285",
"0.49361962",
"0.49340525",
"0.49250558",
"0.49221614",
"0.49172124",
"0.49142033",
"0.49008858",
"0.48951504",
"0.48947307",
"0.48834166",
"0.48729706",
"0.48671353",
"0.48606345",
"0.48569545",
"0.48569027",
"0.48566487",
"0.4854759",
"0.48506942",
"0.4847096",
"0.48452073",
"0.484477"
] | 0.5289079 | 36 |
and csmi_birthday <= ? | public M csmiBirthdayEnd(Object end){this.put("csmiBirthdayEnd", end);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract void birthDateValidity();",
"public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }",
"public void setBirthday(Date birthday);",
"@SuppressWarnings(\"static-access\")\r\n\tpublic boolean isBirthday()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tboolean isBirthday = false;\r\n\t\tif (now.MONTH == bDate.MONTH && now.DATE == bDate.DATE)\r\n\t\t{\r\n\t\t\tisBirthday = true;\r\n\t\t}\r\n\t\treturn isBirthday;\r\n\t}",
"public void setBirthday() { this.birthday = birthday; }",
"public Date getBirthday();",
"Date getBirthDate();",
"public void setBirthday(java.lang.String param) {\r\n localBirthdayTracker = param != null;\r\n\r\n this.localBirthday = param;\r\n }",
"public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }",
"public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }",
"public void setBirthDate(Date inBirthDate)\n {\n birthdate = inBirthDate;\n }",
"public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }",
"public Date getBirthDate();",
"public Date getBirthday() { return birthday; }",
"public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }",
"public void setBirthdate(String birthdate) {\r\n this.birthdate = birthdate;\r\n }",
"public M csmiBirthdayNull(){if(this.get(\"csmiBirthdayNot\")==null)this.put(\"csmiBirthdayNot\", \"\");this.put(\"csmiBirthday\", null);return this;}",
"public void setBirthDate(Date birthDate);",
"private final static void checkTualatin(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Primary Male\";\n String mtype2 = \"Spouse Male\";\n String mtype3 = \"Primary Female\";\n String mtype4 = \"Spouse Female\";\n\n int birth = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // date to determine if < 18 yrs old\n\n int date1 = (year * 10000) + (month * 100) + day;\n\n year = year - 6; // date to determine if < 24 yrs old\n\n int date2 = (year * 10000) + (month * 100) + day;\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, m_type, birth FROM member2b \" +\n \"WHERE m_type != ? AND m_type != ? AND m_type != ? AND m_type != ? AND birth != 0\");\n\n pstmt.clearParameters();\n pstmt.setString(1, mtype1);\n pstmt.setString(2, mtype2);\n pstmt.setString(3, mtype3);\n pstmt.setString(4, mtype4);\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n mtype = rs.getString(2);\n birth = rs.getInt(3);\n\n mtypeNew = \"\";\n\n if (birth > date1) { // if < 17 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 17 Female\";\n\n } else {\n\n mtypeNew = \"Junior 17 Male\";\n }\n\n } else {\n\n if (birth > date2) { // if < 24 yrs old\n\n if (mtype.endsWith(\"Female\")) {\n\n mtypeNew = \"Junior 18-23 Female\";\n\n } else {\n\n mtypeNew = \"Junior 18-23 Male\";\n }\n }\n }\n\n //\n // Update the mtype if it has changed\n //\n if (!mtypeNew.equals(mtype)) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setString(2, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"public void setBirthdate(Date birthdate) {\n this.birthdate = birthdate;\n }",
"public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }",
"public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }",
"public List<Employees> getByBirthDateGreater (Date birthDate);",
"LocalDate getDateOfBirth();",
"void setBirthDate(Date birthDate);",
"public void setBirthday(String birthday) {\n\t\tthis.birthday = birthday;\n\t}",
"public void seteBirthday(Date eBirthday) {\n this.eBirthday = eBirthday;\n }",
"@Override\n public void onDateSet(DatePicker view, int year1, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year1);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n /* date=dayOfMonth;\n month=monthOfYear;\n year=year1;*/\n if(getAge(year1,monthOfYear,dayOfMonth) >= 18){\n updateLabel();\n }else{\n Utility.showToastMessage(GetUserInfoActivity.this,\"Age should be 18+\");\n }\n\n }",
"public Boolean comprovaAge(Date date) {\n\t\treturn (rv.validateAge(date));\n\t}",
"private final static void checkInterlachen(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Jr Ages 6 - 11\";\n String mtype2 = \"Jr Ages 12 - 15\";\n String mtype3 = \"Jr Ages 16 - 24\";\n\n int birth = 0;\n int inact = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 12; // date to determine if < 12 yrs old\n\n int date12 = (year * 10000) + (month * 100) + day;\n\n year = year - 4; // date to determine if < 16 yrs old\n\n int date16 = (year * 10000) + (month * 100) + day;\n\n year = year - 9; // date to determine if < 25 yrs old\n\n int date25 = (year * 10000) + (month * 100) + day;\n\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, m-type, birth, inact FROM member2b \" +\n \"WHERE m_type = ? OR m_type = ? OR m_type = ? AND birth != 0 AND inact = 0\");\n\n pstmt.clearParameters();\n pstmt.setString(1, mtype1);\n pstmt.setString(2, mtype2);\n pstmt.setString(3, mtype3);\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n mtype = rs.getString(2);\n birth = rs.getInt(3);\n inact = rs.getInt(4);\n\n mtypeNew = mtype;\n\n if (birth > date12) { // if < 12 yrs old\n\n mtypeNew = mtype1; // 6 - 11\n\n } else {\n\n if (birth > date16) { // if < 16 yrs old\n\n mtypeNew = mtype2; // 12 - 15\n\n } else {\n\n if (birth > date25) { // if < 25 yrs old\n\n mtypeNew = mtype3; // 16 - 24\n\n } else {\n\n inact = 1; // older than 24, set inactive\n }\n }\n }\n\n //\n // Update the record if mtype has changed or we are setting member inactive\n //\n if (!mtypeNew.equals(mtype) || inact == 1) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ?, inact = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setInt(2, inact);\n pstmt.setString(3, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"public void setBirthdate(java.util.Calendar birthdate) {\n this.birthdate = birthdate;\n }",
"public Date getBirthdate()\n {\n return birthdate;\n }",
"public Date getBirthdate()\n {\n return birthdate;\n }",
"public void setBirthDate(String birthday) {\n\t\tbirthDate = birthday;\n\t}",
"public void setBirthdate(LocalDate birthdate) throws IllegalArgumentException {\n LocalDate todayDate = LocalDate.now();\n\n if(birthdate.isAfter(todayDate) || birthdate.isEqual(todayDate)) {\n throw new IllegalArgumentException(\"Birthdate cannot be later than today's date\");\n } else {\n this.birthdate = birthdate;\n this.age = birthdate.until(todayDate).getYears(); // we set the age, if the birthdate is correct\n }\n }",
"public Date getBirthday() {\r\n return birthday;\r\n }",
"public Date getBirthday() {\r\n return birthday;\r\n }",
"public void setBirth(Date birth) {\r\n this.birth = birth;\r\n }",
"protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }",
"@Override\r\n\tpublic void setBirthDay(Calendar bday) {\n\t\tif (bday == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (bday.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.birthday = bday;\r\n\t}",
"public void setBirth_date(java.lang.String birth_date) {\n this.birth_date = birth_date;\n }",
"@Test\n public void testBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, \"01/01/1990\");\n assertNotNull(userService.getUser(username));\n }",
"public Date getBirthdate() {\r\n return birthdate;\r\n }",
"@SuppressWarnings(\"static-access\")\r\n\tprivate int calculateAge()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tnow = new GregorianCalendar(now.YEAR, now.MONTH, now.DATE);//simplifys the date so there is no problem with times\r\n\t\tGregorianCalendar birthDay = new GregorianCalendar(now.YEAR, bDate.MONTH, bDate.DATE);\r\n\t\tint age = 0;\r\n\t\tif(now.before(birthDay) || now.equals(birthDay))\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t\tage--;\r\n\t\t}\r\n\t\treturn age;\r\n\t}",
"public void setBirth(Date birth) {\n this.birth = birth;\n }",
"public void setBirth(Date birth) {\n this.birth = birth;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Date getBirthday() {\n return birthday;\n }",
"public Boolean validarFecha(LocalDate fechaIngresada);",
"public void test_DATE_HHmmss_conditionBean() { // *Important!\r\n // ## Arrange ##\r\n Calendar cal = Calendar.getInstance();\r\n cal.set(2008, 5, 15, 12, 34, 56);\r\n cal.set(Calendar.MILLISECOND, 123);\r\n Member member = new Member();\r\n member.setMemberId(3);\r\n LocalDate targetDate = toLocalDate(cal);\r\n member.setBirthdate(targetDate);\r\n memberBhv.updateNonstrict(member);\r\n\r\n // ## Act ##\r\n cal.set(2008, 5, 15, 12, 34, 57); // plus one second\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because Oracle Date type have time parts. \r\n //}\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because java.sql.Date is converted to java.util.Date in ConditionBean. \r\n //}\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because Oracle Date type have time parts. \r\n //}\r\n }\r\n cal.set(2008, 5, 15, 12, 34, 56); // just time\r\n cal.set(Calendar.MILLISECOND, 0); // Don't format!\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = DfTypeUtil.toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n }",
"public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}",
"public Date getBirthdate() {\n return birthdate;\n }",
"Employee setBirthdate(Date birthdate);",
"public void setBirthday(String birthday) {\n if(birthday.length()==10)\n this.birthday = birthday;\n else this.birthday =\"undefined\";\n\n }",
"public Date getBirth_date() {\n return birth_date;\n }",
"public M csmiBirthdayStart(Object start){this.put(\"csmiBirthdayStart\", start);return this;}",
"public static boolean isValidDOB(String userInput) {\n \n return Pattern.matches(Constants.DATE_VALIDATION, userInput);\n }",
"@Override\r\n\tpublic Student[] getNearBirthDate(Date date, int days) {\n\t\treturn null;\r\n\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n int age = yearNow - year;\n if (monthNow <= (monthOfYear + 1)) {\n if (monthNow == (monthOfYear + 1)) {\n // monthNow==monthBirth\n if (dayOfMonthNow < dayOfMonth) {\n age--;\n }\n } else {\n // monthNow>monthBirth\n age--;\n }\n }\n if (age <= 0) {\n ToastUtils.showToastInUIThread(UIUtils.getContext(), \"请输入合法的年龄\");\n tv_realEdit_ageTwo.setText(String.valueOf(18));\n return;\n } else {\n tv_realEdit_ageTwo.setText(String.valueOf(age));\n }\n }",
"public Date geteBirthday() {\n return eBirthday;\n }",
"@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }",
"public static void birthdateValidation(Date birthdate) throws Exception {\n if (birthdate.after(new Date())) {\n throw new Exception(\"Your birth date cannot be in the future\");\n }\n }",
"void birthDateValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setBirthdate(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }",
"private boolean acceptDayG(DayG day) {\r\n if(day.getYear() != endDate.get(Calendar.YEAR))\r\n return false;\r\n \r\n int dayOfYear = day.getCalendar().get(Calendar.DAY_OF_YEAR);\r\n if(dayOfYear == acceptedDatesRange[0] || dayOfYear == \r\n acceptedDatesRange[1] || (dayOfYear < acceptedDatesRange[1] &&\r\n dayOfYear > acceptedDatesRange[0])) {\r\n \r\n //MiscStuff.writeToLog(\"\" + dayOfYear + \" \" + acceptedDatesRange[0] +\r\n // \" \" + acceptedDatesRange[1]); //print year.....................................................................................\r\n return true;\r\n }\r\n return false;\r\n }",
"@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n dateOfBirthText.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n try {\n dateOfBirth = formatter.parse(dateOfBirthText.getText().toString());\n LocalDate l1 = LocalDate.of(year, monthOfYear+1, dayOfMonth);\n LocalDate now1 = LocalDate.now();\n Period diff1 = Period.between(l1, now1);\n age = diff1.getYears();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }",
"public Date getBirth() {\r\n return birth;\r\n }",
"List<AccountDetail> findAllByAgeLessThanEqual(Integer age);",
"void setDateOfBirth(LocalDate dateOfBirth);",
"List<AccountDetail> findAllByAgeBetween(Integer minAge,Integer maxAge);",
"public Boolean validateDate(String date_of_birth) {\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n format.parse(date_of_birth);\n } catch (ParseException exception) {\n System.out.println(\"Invalid Input!\");\n return true;\n }\n return false;\n }",
"public void setDate_of_birth(String date_of_birth) {\n this.date_of_birth = date_of_birth;\n }",
"public Date getBirth() {\n return birth;\n }",
"public Date getBirth() {\n return birth;\n }",
"public static void main(String[] args) {\n \n int myAge = 16;\n int myBirthday = 901; // input date as 901 or 1021 putting a 0 infront results in an error.\n int todaysDate = 923;\n\n if (todaysDate == myBirthday) {\n myAge++; // adds 1\n System.out.println(\"I am \" + myAge + \" years old now.\");\n } else {\n System.out.println(\"I am still \" + myAge + \" years old.\");\n }\n }",
"private final static void checkHyperion(Connection con) {\n\n PreparedStatement pstmt = null;\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n String user = \"\";\n String mtype= \"\";\n String mtypeNew = \"\";\n String mtype1 = \"Jr 6 to 7\";\n String mtype2 = \"Jr 8 to 11\";\n String mtype3 = \"Jr 12 to 15\";\n String mtype4 = \"Jr 16 to 22\";\n\n int birth = 0;\n int inact = 0;\n\n //\n // Get current date\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH)+1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 8; // date to determine if < 8 yrs old\n\n int date8 = (year * 10000) + (month * 100) + day;\n\n year = year - 4; // date to determine if < 12 yrs old\n\n int date12 = (year * 10000) + (month * 100) + day;\n\n year = year - 4; // date to determine if < 16 yrs old\n\n int date16 = (year * 10000) + (month * 100) + day;\n\n year = year - 7; // date to determine if < 23 yrs old\n\n int date23 = (year * 10000) + (month * 100) + day;\n\n\n\n //\n // Check each Junior to see if the mtype should be changed\n //\n try {\n\n pstmt = con.prepareStatement (\n \"SELECT username, birth FROM member2b \" +\n \"WHERE birth != 0 AND inact = 0\");\n\n pstmt.clearParameters();\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n\n user = rs.getString(1);\n birth = rs.getInt(2);\n\n mtypeNew = \"\";\n\n if (birth > date8) { // if < 8 yrs old\n\n mtypeNew = mtype1; // Under 8\n\n } else if (birth > date12) { // if < 12 yrs old\n\n mtypeNew = mtype2; // 8 - 11\n\n } else if (birth > date16) { // if < 16 yrs old\n\n mtypeNew = mtype3; // 12 - 15\n\n } else if (birth > date23) { // if < 23 yrs old\n\n mtypeNew = mtype4; // 16 - 22\n }\n\n //\n // Update the record if mtype has changed\n //\n if (!mtypeNew.equals( \"\" )) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET m_type = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt.setString(1, mtypeNew);\n pstmt.setString(2, user);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n }\n }\n\n pstmt.close();\n\n }\n catch (Exception exc) {\n }\n\n }",
"boolean hasAgeRange();",
"public void setBirth(Date birth) {\n\t\tthis.birth = birth;\n\t}",
"List<Account> findAllByAgeBetween(Integer age1, Integer age2);",
"private boolean employeeDobValid(EmployeeDto newEmpDto) {\n\t\treturn (newEmpDto.getDob().compareTo(Calendar.getInstance()) < 0) ? true : false ;\n\t}",
"public boolean isBabyBoomer() {\n // Unnecessary allocation of expensive object\n Calendar gmtCal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n gmtCal.set(1946, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomStart = gmtCal.getTime();\n gmtCal.set(1965, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomEnd = gmtCal.getTime();\n return birthDate.compareTo(boomStart) >= 0 && birthDate.compareTo(boomEnd) < 0;\n }",
"public void setBirthDay(Date birthDay) {\n\t\tthis.birthDay = birthDay;\n\t}",
"public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"private static boolean isValid(int m, int d, int y) {\r\n\t\tif (m < 1 || m > 12)\r\n\t\t\treturn false;\r\n\t\tif (d < 1 || d > DAYS[m])\r\n\t\t\treturn false;\r\n\t\tif (m == 2 && d == 29 && !isLeapYear(y))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"private static boolean validateAge(String age) {\n return true;\n\n }",
"@And(\"^Complete user data birthday and gender$\")\t\t\t\t\t\n public void Complete_user_data_birthday_and_gender() throws Throwable \t\t\t\t\t\t\t\n { \n \tdriver.findElement(By.id(\"day\")).sendKeys(\"19\");\n driver.findElement(By.xpath(\"//*[@id='month']/option[9]\")).click();\n driver.findElement(By.id(\"year\")).sendKeys(\"1994\");\n driver.findElement(By.xpath(\"//*[@id='gender']/option[2]\")).click();\n driver.findElement(By.xpath(\"//*[@id='personalDetailsNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\n }",
"@Test\n public void testconvertDateYearsLongueurPasValide() {\n FieldVerifier projet = new FieldVerifier();\n boolean longueurInvalideTest = projet.isValidDate(\"01/05/102\");\n assertEquals(false, longueurInvalideTest);\n }",
"private void sendCustomerNotificationsBirthday_MinCompare(Customer customer){\n LocalDate curDateTime = LocalDate.now();\n int nextYear = curDateTime.getYear();\n int maxDay = Integer.MAX_VALUE;\n if (curDateTime.getDayOfYear() > customer.birthDate.getDayOfYear()) {\n nextYear ++;\n }\n\n LocalDate nextBirthDate = LocalDate.of(nextYear, customer.birthDate.getMonthValue(), customer.birthDate.getDayOfMonth());\n Event nearestEvent = null;\n for (Event event : events){\n if (event.eventDate.isAfter(nextBirthDate) || event.eventDate.isEqual(nextBirthDate)) {\n int day = event.eventDate.getDayOfYear();\n if (day < maxDay) {\n nearestEvent = event;\n maxDay = day;\n }\n }\n }\n\n if (nearestEvent != null) {\n System.out.println(String.format(\"sendCustomerNotificationsBirthday_MinCompare : nearest event is %s, event date is %s\", nearestEvent.id, nearestEvent.eventDate));\n } else {\n System.out.println(\"no matched event\");\n }\n }",
"List<Account> findAllByAgeLessThanEqual(Integer age);",
"public static boolean isValidBirthdate (String test) {\n try {\n LocalDate.parse(test);\n return isValidBirthdate(LocalDate.parse(test));\n } catch (DateTimeParseException e) {\n return false;\n }\n }",
"public boolean isBornInSummer() {\n return this.birthdate.getMonthValue() == 6 || this.birthdate.getMonthValue() == 7 || this.birthdate.getMonthValue() == 8;\n }",
"public String getBirthday(){\n return birthday;\n\t}",
"public void setBirthDate(java.util.Calendar birthDate) {\r\n this.birthDate = birthDate;\r\n }",
"public boolean checkAge(Dating t);",
"public void setBirthDate(GregorianCalendar newBirthDate)\r\n\t{\r\n\t\tbDate = newBirthDate;\r\n\t}",
"private static boolean isValid(int m, int d, int y) {\n\t\t\tif (m < 1 || m > 12) return false;\n\t\t\tif (d < 1 || d > DAYS[m]) return false;\n\t\t\tif (m == 2 && d == 29 && !isLeapYear(y)) return false;\n\t\t\treturn true;\n\t\t}"
] | [
"0.63621616",
"0.6017685",
"0.59143823",
"0.58457434",
"0.5813887",
"0.57660174",
"0.57214564",
"0.5687269",
"0.5674944",
"0.5674944",
"0.5618387",
"0.56039983",
"0.5597964",
"0.5597964",
"0.5597964",
"0.5562711",
"0.5552026",
"0.55295694",
"0.5520394",
"0.551899",
"0.5510287",
"0.54940194",
"0.54622406",
"0.5461705",
"0.5461705",
"0.5442585",
"0.5441038",
"0.5426846",
"0.54041433",
"0.53788435",
"0.5371924",
"0.536443",
"0.53407633",
"0.5322712",
"0.53222156",
"0.53165966",
"0.5304957",
"0.5304573",
"0.5286554",
"0.5286554",
"0.52686614",
"0.5266884",
"0.5240358",
"0.5238792",
"0.5236152",
"0.5232978",
"0.5222801",
"0.5221118",
"0.5221118",
"0.521355",
"0.521355",
"0.521355",
"0.521355",
"0.5213173",
"0.52061754",
"0.5204074",
"0.5168824",
"0.5166299",
"0.51632065",
"0.51624155",
"0.5160401",
"0.51585567",
"0.51517886",
"0.51494133",
"0.5142873",
"0.51414764",
"0.51338977",
"0.51246923",
"0.5103933",
"0.51025563",
"0.5099825",
"0.509339",
"0.50800234",
"0.5071893",
"0.5062469",
"0.50596446",
"0.5049604",
"0.5049604",
"0.5022854",
"0.5021322",
"0.50106543",
"0.50089806",
"0.50062394",
"0.5003248",
"0.5002495",
"0.49950203",
"0.49938977",
"0.49887004",
"0.49845666",
"0.49782836",
"0.49702498",
"0.49694407",
"0.4962182",
"0.49618277",
"0.49565303",
"0.49520615",
"0.49507093",
"0.49459547",
"0.49413893",
"0.49326336"
] | 0.50478613 | 78 |
and csmi_qq is null | public M csmiQqNull(){if(this.get("csmiQqNot")==null)this.put("csmiQqNot", "");this.put("csmiQq", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean m2255q() {\n return this.f2952a == ValueType.nullValue;\n }",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"public void setQq(String qq) {\r\n this.qq = qq == null ? null : qq.trim();\r\n }",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"null\", stringBuilder0.toString());\n }",
"private boolean m18354q() {\n return this.f16621o != null;\n }",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n stringBuilder0.append((-1.0));\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"-1.0 and null\", stringBuilder0.toString());\n }",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n String[] stringArray0 = new String[3];\n String string0 = SQLUtil.renderWhereClause(stringArray0, stringArray0);\n assertEquals(\"null = null AND null = null AND null = null\", string0);\n }",
"public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}",
"public boolean isSetQ() {\n return this.q != null;\n }",
"private void m81853q() {\n String c = m81844c(C6969H.m41409d(\"G738BEA09AB31BF3CF5319249E0DAD0C3708FD0\"));\n if (!TextUtils.isEmpty(c)) {\n if (C6969H.m41409d(\"G6D82C711\").equals(c)) {\n this.f58079k = true;\n } else if (C6969H.m41409d(\"G658AD212AB\").equals(c)) {\n this.f58079k = false;\n }\n }\n }",
"public void setQq(String qq) {\r\n this.qq = qq;\r\n }",
"@Test(timeout = 4000)\n public void test113() throws Throwable {\n String[] stringArray0 = new String[20];\n String string0 = SQLUtil.renderWhereClause(stringArray0, stringArray0);\n assertEquals(\"null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null\", string0);\n }",
"public void setQq(String qq) {\n this.qq = qq;\n }",
"public int Isq() {\n return iSq;\n }",
"public boolean q_()\r\n/* 178: */ {\r\n/* 179:203 */ return false;\r\n/* 180: */ }",
"boolean getXAxisCharacteristicIdNull();",
"public void setQq(String qq) {\r\n\t\tthis.qq = qq;\r\n\t}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"@Test(timeout = 4000)\n public void test110() throws Throwable {\n String[] stringArray0 = new String[7];\n stringArray0[2] = \"\";\n String string0 = SQLUtil.renderWhereClause(stringArray0, stringArray0);\n assertEquals(\"null = null AND null = null AND = '' AND null = null AND null = null AND null = null AND null = null\", string0);\n }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n stringBuilder0.append(\"alter materialized viewjcsh%4%|@v9\");\n SQLUtil.addOptionalCondition((String) null, stringBuilder0);\n assertEquals(\"alter materialized viewjcsh%4%|@v9 or null\", stringBuilder0.toString());\n }",
"public M csseSubjectNull(){if(this.get(\"csseSubjectNot\")==null)this.put(\"csseSubjectNot\", \"\");this.put(\"csseSubject\", null);return this;}",
"public void setSsqy(String ssqy) {\n this.ssqy = ssqy == null ? null : ssqy.trim();\n }",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"boolean getYAxisCharacteristicIdNull();",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"@Test(timeout = 4000)\n public void test103() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"SELECT * FROM null WHERE null = null AND null = null AND null = 'oeQdkmCG0DtW' AND null = null AND null = java.lang.Object@1593efe2\");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }",
"boolean getConditionListNull();",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"boolean getActiveNull();",
"@Override\n\tpublic String getcond() {\n\t\treturn null;\n\t}",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public M csseFinishNull(){if(this.get(\"csseFinishNot\")==null)this.put(\"csseFinishNot\", \"\");this.put(\"csseFinish\", null);return this;}",
"public boolean isSetQe() {\n return this.qe != null;\n }",
"public boolean hasC() {\n return c_ != null;\n }",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"private boolean checkColoumnForQuadPair(int j1) {\n for(int i=0;i<4;i++)\r\n {\r\n if(Kmap[i][j1]==0 || Kmap[i][j1]==-1)\r\n return false;\r\n }\r\n for(int i=0;i<4;i++)\r\n {\r\n Kmap[i][j1]=-1;\r\n }\r\n return true; \r\n }",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"@Override\n public void visitNullCheck(Quad q) {\n for (RegisterOperand target : q.getUsedRegisters()) {\n String reg = target.getRegister().toString();\n // has been checked\n val.checkVar(reg);\n }\n }",
"boolean getSearchValueNull();",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"public boolean hasQ() {\n return fieldSetFlags()[5];\n }",
"public M csseStartNull(){if(this.get(\"csseStartNot\")==null)this.put(\"csseStartNot\", \"\");this.put(\"csseStart\", null);return this;}",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public boolean isNull(){\n return false;\n }",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"public boolean isNotNullMid() {\n return genClient.cacheValueIsNotNull(CacheKey.mid);\n }",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public M csrtSubjectNull(){if(this.get(\"csrtSubjectNot\")==null)this.put(\"csrtSubjectNot\", \"\");this.put(\"csrtSubject\", null);return this;}",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"@Test\r\n\tpublic void calculQualityAxisWithNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 4f), new Float(0));\r\n\t}",
"public boolean mo7630q() {\n return !this.f4373c.isEmpty() && !this.f4372b.isEmpty();\n }",
"public M csolTitleNull(){if(this.get(\"csolTitleNot\")==null)this.put(\"csolTitleNot\", \"\");this.put(\"csolTitle\", null);return this;}",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"public boolean isNotNullSredCode() {\n return genClient.cacheValueIsNotNull(CacheKey.sredCode);\n }",
"boolean getValueCharacteristicIdNull();",
"public M csolOrderNull(){if(this.get(\"csolOrderNot\")==null)this.put(\"csolOrderNot\", \"\");this.put(\"csolOrder\", null);return this;}",
"public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}",
"public final synchronized boolean zzaq() {\n return zzar() != null;\n }",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"boolean hasQuatValue();",
"boolean isNullOmittable();",
"public boolean isStripExistingQ3()\r\n {\r\n return stripExistingQ3;\r\n }",
"private boolean m125729x() {\n return (mo69217g() == null || !mo69217g().isSuperTopic || this.f90224q == this.f90228u) ? false : true;\n }",
"private static boolean casSlotNull(Runnable[] q, int i,\n Runnable t) {\n return UNSAFE.compareAndSwapObject(q, slotOffset(i), t, null);\n }",
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"public boolean isNullRecord () {\n if ((latitude == FLOATNULL) &&\n (longitude == FLOATNULL) &&\n (depth == FLOATNULL) &&\n (temperatureMin == FLOATNULL) &&\n (temperatureMax == FLOATNULL) &&\n (salinityMin == FLOATNULL) &&\n (salinityMax == FLOATNULL) &&\n (oxygenMin == FLOATNULL) &&\n (oxygenMax == FLOATNULL) &&\n (nitrateMin == FLOATNULL) &&\n (nitrateMax == FLOATNULL) &&\n (phosphateMin == FLOATNULL) &&\n (phosphateMax == FLOATNULL) &&\n (silicateMin == FLOATNULL) &&\n (silicateMax == FLOATNULL) &&\n (chlorophyllMin == FLOATNULL) &&\n (chlorophyllMax == FLOATNULL)) {\n return true;\n } else {\n return false;\n } // if ...\n }",
"public boolean b(alq paramalq)\r\n/* 259: */ {\r\n/* 260:278 */ int i = c(paramalq);\r\n/* 261:279 */ if (i < 0) {\r\n/* 262:280 */ return false;\r\n/* 263: */ }\r\n/* 264:283 */ return true;\r\n/* 265: */ }",
"@Override\n\tpublic boolean getIncludesNull() {\n\t\treturn false;\n\t}",
"boolean hasC3();",
"boolean getUnitIdNull();",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder(90);\n StringBuilder stringBuilder1 = stringBuilder0.appendCodePoint(90);\n SQLUtil.addOptionalCondition(\" NOT NULL\", stringBuilder1);\n assertEquals(\"Z or NOT NULL\", stringBuilder1.toString());\n assertEquals(\"Z or NOT NULL\", stringBuilder0.toString());\n }",
"private void chkSTMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from fg_stmst\";\n\t\t\tM_strSQLQRY += \" where st_CMPCD = '\"+cl_dat.M_strCMPCD_pbst+\"' and st_wrhtp = '\"+strWRHTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_prdtp = '\"+strPRDTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_lotno = '\"+strLOTNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_rclno = '\"+strRCLNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_pkgtp = '\"+strPKGTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_mnlcd = '\"+strMNLCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdSTMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in FG_STMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"chkSTMST\");\n\t\t}\n\t}",
"private boolean isEmpty( int r, int c ) {\n\treturn matrix[r][c] == null;\n }",
"@Test(timeout = 4000)\n public void test094() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n StringBuilder stringBuilder1 = SQLUtil.addOptionalCondition(\"\", stringBuilder0);\n assertEquals(\"\", stringBuilder1.toString());\n }",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"@Test(timeout = 4000)\n public void test100() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.addOptionalCondition((String) null, stringBuilder0);\n assertEquals(\"null\", stringBuilder0.toString());\n }",
"public boolean failedQC(){\n\t\treturn testBitwiseFlag(512);\n\t}",
"@Test(timeout = 4000)\n public void test083() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addOptionalCondition(\"A*RX\", (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test052() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.substituteMarkers(\"Kp3\\\"j=TorK/,xrf\", (String) null, (Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"boolean isSetNcbistdaa();",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n String string0 = SQLUtil.normalize(\"selectfwx.wrsyj>:+f-&9\", false);\n assertEquals(\"selectfwx.wrsyj > : + f - & 9\", string0);\n \n Random.setNextRandom(818);\n Random.setNextRandom(818);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBDataType dBDataType0 = DBDataType.getInstance(818, \" NULL\");\n Integer integer0 = RawTransaction.LOCK_ESCALATE;\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"}qis;\", defaultDBTable0, dBDataType0, integer0, integer0);\n String string1 = SQLUtil.renderColumn(defaultDBColumn0);\n assertEquals(\"}qis; NULL(3,3) NULL\", string1);\n }",
"@Test(timeout = 4000)\n public void test103() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder(41);\n SQLUtil.addRequiredCondition(\"K6kxVa6gh&)z\", stringBuilder0);\n assertEquals(\"K6kxVa6gh&)z\", stringBuilder0.toString());\n }",
"@Test(timeout = 4000)\n public void test104() throws Throwable {\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"trncateh@?wbt5lee]x[]=]/?\");\n assertNull(boolean0);\n }"
] | [
"0.58529717",
"0.57106304",
"0.56316715",
"0.5602585",
"0.5545319",
"0.5537229",
"0.5487891",
"0.5485953",
"0.5476282",
"0.54738826",
"0.54713166",
"0.5437724",
"0.5418649",
"0.5392496",
"0.5378179",
"0.537352",
"0.53134906",
"0.5312932",
"0.5299401",
"0.5295532",
"0.5292063",
"0.52735144",
"0.5263838",
"0.5257691",
"0.5257065",
"0.52469707",
"0.52308726",
"0.5214445",
"0.5213092",
"0.5205057",
"0.5198199",
"0.5196139",
"0.5185409",
"0.51694",
"0.51575744",
"0.51335007",
"0.5109012",
"0.5090588",
"0.5069229",
"0.50669783",
"0.5064636",
"0.50611526",
"0.5059125",
"0.5052859",
"0.5051258",
"0.5043944",
"0.5024591",
"0.501998",
"0.50161004",
"0.50127614",
"0.50025666",
"0.5002411",
"0.49969262",
"0.49944136",
"0.49914315",
"0.49834853",
"0.49824038",
"0.4981221",
"0.4975459",
"0.4971695",
"0.49614793",
"0.49484012",
"0.49482852",
"0.49477056",
"0.494546",
"0.49453947",
"0.49310437",
"0.49303293",
"0.49300262",
"0.49278957",
"0.49222258",
"0.49168593",
"0.4916818",
"0.4913149",
"0.4905047",
"0.48987916",
"0.48969144",
"0.48957396",
"0.4892961",
"0.4891933",
"0.48874822",
"0.48869488",
"0.48721284",
"0.4869472",
"0.4867908",
"0.48668972",
"0.4864611",
"0.48589358",
"0.48539904",
"0.48514995",
"0.48470876",
"0.4846711",
"0.48461947",
"0.48386282",
"0.4836408",
"0.4822703",
"0.48196867",
"0.48173612",
"0.48173282",
"0.48166838"
] | 0.66712517 | 0 |
and csmi_nation is null | public M csmiNationNull(){if(this.get("csmiNationNot")==null)this.put("csmiNationNot", "");this.put("csmiNation", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isNullOmittable();",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"public void setNation(String nation) {\n this.nation = nation;\n }",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"boolean isNull();",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}",
"boolean getSearchValueNull();",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"boolean getUnitIdNull();",
"boolean getActiveNull();",
"boolean getConditionListNull();",
"public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}",
"public boolean isNull(){\n return false;\n }",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"public boolean isSetCnsCidadao() {\n return this.cnsCidadao != null;\n }",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"boolean getCampaignIdNull();",
"public boolean hasMunicipality() {\n\t\tif (this.settlement == null && this.city == null) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean isMissing() {\n return ((slat == GempakConstants.IMISSD) || (slon == GempakConstants.IMISSD));\n }",
"public void setNationCode(String nationCode) {\n this.nationCode = nationCode == null ? null : nationCode.trim();\n }",
"public boolean isSetCardistrictname() {\n return this.cardistrictname != null;\n }",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"boolean getSearchNodeCharacteristicIdsNull();",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public boolean isNull()\n\t{\n\t\treturn cp.isNull();\n\t}",
"public boolean isNotNullSredCode() {\n return genClient.cacheValueIsNotNull(CacheKey.sredCode);\n }",
"boolean getCampaignNameNull();",
"boolean getValueCharacteristicIdNull();",
"public boolean isIdubicacionfiscalNull()\r\n\t{\r\n\t\treturn idubicacionfiscalNull;\r\n\t}",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"public boolean isNullRecord () {\n if ((latitude == FLOATNULL) &&\n (longitude == FLOATNULL) &&\n (depth == FLOATNULL) &&\n (temperatureMin == FLOATNULL) &&\n (temperatureMax == FLOATNULL) &&\n (salinityMin == FLOATNULL) &&\n (salinityMax == FLOATNULL) &&\n (oxygenMin == FLOATNULL) &&\n (oxygenMax == FLOATNULL) &&\n (nitrateMin == FLOATNULL) &&\n (nitrateMax == FLOATNULL) &&\n (phosphateMin == FLOATNULL) &&\n (phosphateMax == FLOATNULL) &&\n (silicateMin == FLOATNULL) &&\n (silicateMax == FLOATNULL) &&\n (chlorophyllMin == FLOATNULL) &&\n (chlorophyllMax == FLOATNULL)) {\n return true;\n } else {\n return false;\n } // if ...\n }",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"@Override\n public boolean isSet() {\n return loci != null;\n }",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"@java.lang.Override\n public boolean hasDistrict() {\n return district_ != null;\n }",
"@Override\n\tpublic boolean getIncludesNull() {\n\t\treturn false;\n\t}",
"public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}",
"public boolean anyNull () ;",
"public M csmiBirthdayNull(){if(this.get(\"csmiBirthdayNot\")==null)this.put(\"csmiBirthdayNot\", \"\");this.put(\"csmiBirthday\", null);return this;}",
"boolean getOrderPersonIdNull();",
"private Optional<Squadron> getSelected(final Nation nation) {\n Squadron selectedSquadron = null;\n\n if (selectedAvailableSquadron.get(nation) != null) {\n selectedSquadron = selectedAvailableSquadron.get(nation);\n } else if (selectedAirfieldSquadron.get(nation) != null) {\n selectedSquadron = selectedAirfieldSquadron.get(nation);\n }\n\n return Optional.ofNullable(selectedSquadron);\n }",
"boolean getValueLanguageIdNull();",
"boolean isNullValue(int colIndex);",
"private void fetchUnknownNUTSRegions(Session session) {\n QAQCMain.log.info(\"Getting sites with unknown NUTS regions\");\n DefaultTableModel model = (DefaultTableModel) tabDisplaySites.getModel();\n String refnutsTable = SDF_ManagerApp.isEmeraldMode() ? \"RefNutsEmerald\" : \"RefNuts\";\n String hql = \"select region.regionCode, region.site.siteCode from Region as region \"\n + \"where not exists (from \" + refnutsTable + \" as ref where ref.refNutsCode like region.regionCode) \"\n + \"order by region.regionCode ASC\";\n Query q = session.createQuery(hql);\n Iterator itr = q.iterate();\n int i = 0;\n while (itr.hasNext()) {\n Object[] tabRes = (Object[]) itr.next();\n Object[] tuple = {tabRes[1], tabRes[0]};\n model.insertRow(i, tuple);\n i++;\n }\n Object[] columnNames = {\"Site\", \"Regions\"};\n model.setColumnIdentifiers(columnNames);\n updateNumResults(i);\n }",
"boolean getXAxisCharacteristicIdNull();",
"boolean getPersonCharacteristicIdsNull();",
"public boolean isNullInstance()\n {\n return code == null;\n }",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"public boolean isNull() {\n return false;\n }",
"@Override\r\n\tpublic Empresa consulta(String cnpj) {\n\t\treturn null;\r\n\t}",
"@Override\r\n public boolean checkNull() {\r\n // Check if the two textfields are null or default \r\n return newIng_ingName.getText().equals(\"\") || newIng_ingCal.getText().equals(\"\");\r\n }",
"boolean getSearchPersonTypeIdNull();",
"public int checkforNull() {\r\n\t\t int notNull=0;\r\n\t\t for(int a=0; a<populationSize();a++) {\r\n\t\t\t if(getTour(a)!=null) {\r\n\t\t\t\t notNull++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t return notNull;\r\n\t }",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"boolean getYAxisCharacteristicIdNull();",
"private boolean allCardsAreNull(ArrayList<Card> set) {\r\n\t\tfor (Card c : set) {\r\n\t\t\tif (c != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public boolean hasC() {\n return c_ != null;\n }",
"boolean hasHasCity();",
"public boolean is_Empty(){\n \treturn this.ship==null;\n }",
"private boolean isEmptySouth()\r\n\t{\r\n\t\treturn (southElem == 0);\r\n\t}",
"boolean isNilSites();",
"private boolean isSpotBlank(int row, int column){\n\t\t\n\t\tif (getDisc(row, column) == null) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"public boolean isNull() {\n\t\treturn false;\n\t}",
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"boolean isSetNcbieaa();",
"boolean isSetCit();",
"public String getNation() {\n return nation;\n }",
"protected boolean skipNullValues() {\n return true;\n }",
"@Test\n public void getOutsideCityInvalid()\n {\n String str = _city.getOutsideCity(\"21 jump st\");\n assertNull(str);\n }",
"public boolean isNotNullFrontendMid() {\n return genClient.cacheValueIsNotNull(CacheKey.frontendMid);\n }",
"boolean getCampaignDescriptionNull();",
"protected boolean islSubsWithTranslationsNull() {\n List<List<NetSubtitle>> swt = lSubsWithTranslations;\n return (swt == null || swt.size() < 2 ||\n swt.get(0) == null || swt.get(0).isEmpty() ||\n swt.get(1) == null || swt.get(1).isEmpty());\n }",
"public boolean isNotNullProduction() {\n return genClient.cacheValueIsNotNull(CacheKey.production);\n }",
"public void setIdubicacionfiscalNull(boolean idubicacionfiscalNull)\r\n\t{\r\n\t\tthis.idubicacionfiscalNull = idubicacionfiscalNull;\r\n\t}",
"@Override\n\tpublic HisSegMatchResponse queryStationInfo(HisSegMatchRequest request) {\n\t\treturn null;\n\t}",
"private boolean checkForNull(IfStmt ifStmt) {\n boolean isNull = false;\n BinaryExpr ifAsBinary = ifStmt.getCondition().asBinaryExpr();\n isNull |= ifAsBinary.getLeft().isNullLiteralExpr();\n isNull |= ifAsBinary.getRight().isNullLiteralExpr();\n return isNull;\n }",
"public void setS_c_n(String s_c_n) {\n this.s_c_n = s_c_n == null ? null : s_c_n.trim();\n }",
"private Map<String, String> solutionForCNAEIsNotFull() {\r\n Map<String, String> map = new HashMap<>();\r\n map.put(this.students[0].getName(), this.schools[2].getName());\r\n map.put(this.students[1].getName(), this.schools[2].getName());\r\n map.put(this.students[2].getName(), null);\r\n map.put(this.students[3].getName(), this.schools[2].getName());\r\n return map;\r\n }",
"public boolean isNotNullAltMid() {\n return genClient.cacheValueIsNotNull(CacheKey.altMid);\n }",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"@Test\n public void cityNotNull()\n {\n assertNotNull(_city);\n }",
"public boolean isSetCity_ename() {\n return this.city_ename != null;\n }",
"@Override\n\tpublic List<Cours> listOfNonAssignedCours() {\n\t\tQuery q = em.createQuery(\"FROM Cours c where c.enseignant IS EMPTY\");\n\t\treturn q.getResultList();\n\t}",
"boolean getGroupByCategoryNull();"
] | [
"0.5842833",
"0.5755651",
"0.5689222",
"0.566482",
"0.55161196",
"0.54711926",
"0.54558164",
"0.5449199",
"0.54299766",
"0.53951716",
"0.53891236",
"0.5386107",
"0.53835475",
"0.5378335",
"0.5378178",
"0.53201574",
"0.53150135",
"0.5307351",
"0.5288765",
"0.5257997",
"0.525554",
"0.5248285",
"0.52325565",
"0.5225813",
"0.5224627",
"0.5222354",
"0.520959",
"0.5174737",
"0.5170609",
"0.51451224",
"0.5144994",
"0.51371455",
"0.5128991",
"0.5121478",
"0.51123446",
"0.5111",
"0.5094382",
"0.5065888",
"0.50550926",
"0.5054148",
"0.5050231",
"0.5041021",
"0.5000764",
"0.4973531",
"0.49718753",
"0.49617955",
"0.49601814",
"0.49600896",
"0.49593824",
"0.49474272",
"0.49426228",
"0.4942041",
"0.49225",
"0.49197632",
"0.4912572",
"0.49034327",
"0.48951212",
"0.48951146",
"0.48881704",
"0.48613936",
"0.48490432",
"0.484088",
"0.4840247",
"0.4830531",
"0.48047155",
"0.4804361",
"0.4803786",
"0.4791325",
"0.47850275",
"0.47775373",
"0.47769606",
"0.47649834",
"0.47640136",
"0.47635642",
"0.4752092",
"0.47507572",
"0.47412103",
"0.47389665",
"0.47355926",
"0.47264522",
"0.47214347",
"0.47196227",
"0.47153762",
"0.47092298",
"0.47052962",
"0.47052798",
"0.47038385",
"0.4699156",
"0.46925238",
"0.46921235",
"0.46887496",
"0.46856886",
"0.46811",
"0.46810472",
"0.4679798",
"0.46791956",
"0.46710727",
"0.46708748",
"0.46660322",
"0.4665981"
] | 0.6237671 | 0 |
and csmi_address is null | public M csmiAddressNull(){if(this.get("csmiAddressNot")==null)this.put("csmiAddressNot", "");this.put("csmiAddress", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"@java.lang.Override\n public boolean hasAddress() {\n return address_ != null;\n }",
"public boolean isSetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMADDRESS$6) != 0;\n }\n }",
"public boolean isSetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ADDRESS$2) != null;\n }\n }",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"boolean hasAddress();",
"boolean hasAddress();",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"public boolean hasAddress() {\n return addressBuilder_ != null || address_ != null;\n }",
"public boolean isSetAddress() {\n\t\treturn this.address != null;\n\t}",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"boolean hasHasAddress();",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"boolean getNodeCharacteristicIdNull();",
"boolean getXAxisCharacteristicIdNull();",
"boolean getValueCharacteristicIdNull();",
"public boolean isSetContractAddress() {\n return this.contractAddress != null;\n }",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"boolean hasQueryAddress();",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}",
"private static boolean validateAddress(String address) {\n return !address.isEmpty();\n }",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"public M csmiDriverNumNull(){if(this.get(\"csmiDriverNumNot\")==null)this.put(\"csmiDriverNumNot\", \"\");this.put(\"csmiDriverNum\", null);return this;}",
"boolean getSearchNodeCharacteristicIdsNull();",
"public void setCaddress(String caddress) {\n this.caddress = caddress;\n }",
"public boolean hasADDRESSIND() {\n return fieldSetFlags()[8];\n }",
"@Override\n\tpublic List<CustomerAddressDto> queryConsignee(String mobilePhone) {\n\t\treturn null;\n\t}",
"boolean hasAddressList();",
"private boolean validateAddress() {\n if (address==null) {\n tvAddress.setText(String.format(\"%s*\", getString(R.string.address_activity)));\n showToast(getString(R.string.error_address_required));\n return false;\n }\n return true;\n }",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"private void checkAddress() {\n\t\t// if \"Set Address\" has not been performed then give the message to set\n\t\t// it first\n\t\tif (null == oscPort) {\n\t\t\tshowError(\"Please set an address first\");\n\t\t}\n\t}",
"void clearAddress() {\n mAddress = HdmiCec.ADDR_UNREGISTERED;\n }",
"public static Boolean isBlank(PersonAddress address) {\r\n\t\treturn StringUtils.isBlank(address.getAddress1()) && StringUtils.isBlank(address.getAddress2()) && StringUtils.isBlank(address.getCityVillage())\r\n\t\t\t\t&& StringUtils.isBlank(address.getStateProvince()) && StringUtils.isBlank(address.getCountry()) && StringUtils.isBlank(address.getCountyDistrict())\r\n\t\t\t\t&& StringUtils.isBlank(address.getNeighborhoodCell()) && StringUtils.isBlank(address.getPostalCode()) && StringUtils.isBlank(address.getTownshipDivision()) \r\n\t\t\t\t&& StringUtils.isBlank(address.getLatitude()) && StringUtils.isBlank(address.getLongitude()) && StringUtils.isBlank(address.getRegion()) && StringUtils.isBlank(address.getSubregion()) \r\n\t\t\t\t&& StringUtils.isBlank(address.getPostalCode());\r\n\t}",
"private boolean isConnectedToPrimary(SRVRecord[] recs)\n\t{\n\t\tString primaryAddress = getPrimaryServerRecord(recs).getTarget();\n\t\tif (primaryAddress != null && primaryAddress.equals(currentAddress))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"boolean getActiveNull();",
"public boolean hasAddress() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"protected boolean checkSelfInclusion(Vector mbrs) {\n Object mbr;\n if(mbrs == null)\n return false;\n for(int i=0; i < mbrs.size(); i++) {\n mbr=mbrs.elementAt(i);\n if(mbr != null && local_addr.equals(mbr))\n return true;\n }\n return false;\n }",
"public boolean isNullInstance()\n {\n return code == null;\n }",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public boolean hasAddress() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public String getCAdxWebServiceXmlCCAddress() {\n\t\treturn null;\n\t}",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"@Test\n\tpublic void displayAddressTest() {\n\t\tassertNotNull(\"Address is not null\", instance.displayAddress());\n\t}",
"public boolean isGlobalCustomerNumberIDEmpty()\n\t{\n\t\treturn globalCustomerNumberID.equals(\"\");\n\t}",
"boolean hasBitcoinAddress();",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"@Override\n\tpublic boolean isEmpty() throws RemoteException {\n\t\treturn bnetMap.size() == 0;\n\t}",
"boolean getPersonCharacteristicIdsNull();",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"public boolean hasC() {\n return c_ != null;\n }",
"public boolean isUndefined(Address start, Address end);",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"boolean known() {\n\t\t\treturn !varAddress && !varMask;\n\t\t}",
"public SocketAddress method_4128() {\n return null;\n }",
"@Override\n public boolean isCommunicte(String addr) {\n return mCommunciation.isCommunicte(addr);\n }",
"@Override\n public boolean isNull(){\n return (this.nativeHandle == 0L); \n }",
"void onAddressFound(@Nullable Address address);",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}",
"boolean getCharacteristicDescriptionNull();",
"private boolean isRelevant(Address address){\n\n return Math.abs(ride.getStartLatitude() - address.getLatitude()) < 2 &&\n Math.abs(ride.getStartLongitude() - address.getLongitude()) < 2;\n }",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public boolean hasQueryAddress() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public M csseStartNull(){if(this.get(\"csseStartNot\")==null)this.put(\"csseStartNot\", \"\");this.put(\"csseStart\", null);return this;}",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public SocketAddress method_4118() {\n return null;\n }",
"public boolean isNotNullSredCode() {\n return genClient.cacheValueIsNotNull(CacheKey.sredCode);\n }",
"public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }",
"public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }",
"public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"abstract void addressValidity();",
"public boolean hasSRCCDCOPERNM() {\n return fieldSetFlags()[13];\n }",
"boolean isSetNcbi8Aa();",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}",
"public boolean hasQueryAddress() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"protected boolean containsAddress(InetAddress address) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = this.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\tthis.agent.getDatabaseManager().selectByAddress);\n\t\t\tif (address==null) pstmt.setString(1, \"localhost\");\n\t\t\telse pstmt.setString(1, NetworkManager.addressToString(address));\n\t ResultSet rs = pstmt.executeQuery();\n\t return !(rs.isClosed());\n\t\t} catch (SQLException e) {\n \tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to check if address %s is in the database\\n\",address), e);\n\t\t}\n\t\treturn true; // Pas accessible\n\t}",
"public boolean isEmpty()\n {\n return !(((this.gatewayIPAddress != null && this.gatewayPort != null)\n || (this.serialParameters != null)) && (this.address >= 0)\n && (this.slaveId > 0) && (this.xlator != null));\n }",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"@Test\n public void testDontDieFromNulls() throws Exception {\n mWifiCandidates.add(null, mConfig1, 1, 0.0, false, 100);\n mWifiCandidates.add(mScanDetail1, null, 2, 0.0, false, 100);\n doReturn(null).when(mScanDetail2).getScanResult();\n mWifiCandidates.add(mScanDetail2, mConfig2, 3, 1.0, true, 100);\n assertFalse(mWifiCandidates.remove(null));\n\n assertEquals(0, mWifiCandidates.size());\n }",
"public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }",
"public boolean isNotNullFrontendMid() {\n return genClient.cacheValueIsNotNull(CacheKey.frontendMid);\n }",
"private boolean isAddressValid(String s) {\n for (Property prt : propertyList) { //(String t : propertyAddrLine1s)\n if (prt.getAddrline1().matches(s)) {\n createdProperty = prt;\n return true;\n }\n }\n return false;\n }",
"public boolean isSetClient_ip() {\n return this.client_ip != null;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Clpns)) {\n return false;\n }\n Clpns other = (Clpns) object;\n if ((this.cLPNSConsInteb == null && other.cLPNSConsInteb != null) || (this.cLPNSConsInteb != null && !this.cLPNSConsInteb.equals(other.cLPNSConsInteb))) {\n return false;\n }\n return true;\n }",
"public boolean isSetStrIP() {\n return this.strIP != null;\n }",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"@Test\n public void getNullCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.NULL_QUOTE_SYMBOL);\n assertTrue(comps.isEmpty());\n }",
"boolean isNullOmittable();",
"public static boolean checkAddressSQL(Connection conn, String address, String address2) {\r\n \r\n //SQL select statment to check for existing address\r\n String selectAllAddress = \"SELECT * FROM address WHERE address=? AND address2=?\";\r\n boolean flag = false;\r\n try{\r\n //create prepared statement object\r\n setPreparedStatement(conn, selectAllAddress);\r\n //get prepared statement reference\r\n PreparedStatement ps = getPreparedStatement();\r\n \r\n ps.setString(1, address);\r\n ps.setString(2, address2);\r\n //execute prepared statements\r\n ps.execute(); \r\n //create result set\r\n ResultSet rs = ps.getResultSet();\r\n \r\n if(rs.next()) {\r\n \r\n addressId = rs.getInt(\"addressId\");\r\n flag = true;\r\n \r\n }\r\n else{\r\n \r\n addressId = maxAddressId(conn);\r\n }\r\n \r\n \r\n }catch(SQLException e) {\r\n \r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return flag;\r\n }",
"public boolean hasC() {\n return cBuilder_ != null || c_ != null;\n }"
] | [
"0.7186783",
"0.6026315",
"0.5997643",
"0.5922992",
"0.58758587",
"0.58526754",
"0.5760387",
"0.57559586",
"0.57559586",
"0.5716082",
"0.5604287",
"0.5578117",
"0.55661196",
"0.5565997",
"0.55591595",
"0.55018085",
"0.54649925",
"0.5447877",
"0.5373507",
"0.535125",
"0.53467596",
"0.5335646",
"0.5315447",
"0.5306033",
"0.52870184",
"0.5283797",
"0.52802694",
"0.5276847",
"0.52557516",
"0.5220859",
"0.5201924",
"0.516822",
"0.51627666",
"0.5145474",
"0.5123266",
"0.5115943",
"0.5101265",
"0.5093767",
"0.5071777",
"0.5061224",
"0.50563264",
"0.5049536",
"0.5039528",
"0.5034438",
"0.5031317",
"0.5000235",
"0.49994323",
"0.49917185",
"0.49899065",
"0.4976197",
"0.4967635",
"0.49663305",
"0.4961883",
"0.493326",
"0.49262643",
"0.4916541",
"0.49050245",
"0.48914889",
"0.4891295",
"0.48877245",
"0.48811626",
"0.48749653",
"0.4868832",
"0.48680577",
"0.48676354",
"0.48644236",
"0.4859854",
"0.48448473",
"0.48437142",
"0.4838723",
"0.48261222",
"0.4820232",
"0.4819512",
"0.4813146",
"0.4813146",
"0.4813146",
"0.48112714",
"0.48060545",
"0.4804491",
"0.4802328",
"0.47980645",
"0.4798027",
"0.47959065",
"0.47911656",
"0.47890675",
"0.47864586",
"0.47814476",
"0.47781938",
"0.4776568",
"0.47715366",
"0.4770595",
"0.47663978",
"0.4762723",
"0.47623965",
"0.47485837",
"0.4743071",
"0.47403812",
"0.47392538",
"0.47348252",
"0.4732279"
] | 0.75067204 | 0 |
and csmi_company is null | public M csmiCompanyNull(){if(this.get("csmiCompanyNot")==null)this.put("csmiCompanyNot", "");this.put("csmiCompany", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getNullCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.NULL_QUOTE_SYMBOL);\n assertTrue(comps.isEmpty());\n }",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"@Override\n\tpublic List<CompanyVO> getCompanyInfo(String c_name) {\n\t\treturn null;\n\t}",
"boolean hasCompany();",
"boolean isSetAuditingCompany();",
"@Test\n\tvoid findAllUnknowFilteredCompany() {\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(\"any\", null, null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(0, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(0, tableItem.getRecordsFiltered());\n\t}",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"boolean isSetCompanyBaseData();",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public boolean isSetCompany_name() {\n return this.company_name != null;\n }",
"public boolean isSetProduction_companies() {\n return this.production_companies != null;\n }",
"boolean getConditionListNull();",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"@Override\r\n\tpublic Company updateCompany(Company company) {\n\t\treturn null;\r\n\t}",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.AuditingCompanyStatus xgetHasAuditingCompany();",
"boolean isSetHasAuditingCompany();",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public boolean isSetCompanyId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public void setCompany(String company) {\n this.company = company;\n }",
"public M csseSubjectNull(){if(this.get(\"csseSubjectNot\")==null)this.put(\"csseSubjectNot\", \"\");this.put(\"csseSubject\", null);return this;}",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"public com.hps.july.persistence.Company getCompany() throws Exception {\n\tif (getDivision() == null) {\n\t\tCompanyAccessBean bean = constructCompanies();\n\t\tif (bean != null)\n\t\t return (Company)bean.getEJBRef();\n\t\telse\n\t\t return null;\n\t}\n\telse\n\t\treturn null;\n\t\t\n}",
"public void setCompanyno(String companyno) {\n this.companyno = companyno == null ? null : companyno.trim();\n }",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public void setCompany(String company) {\r\n\t\tthis.company = company;\r\n\t}",
"public void searchCompanies() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\ttry {\r\n\t\t\tbusiness = businessDao.searchBusinessForNameOrNit(searchCompany);\r\n\t\t\tif (business == null || business.size() <= 0) {\r\n\t\t\t\tControladorContexto.mensajeInformacion(\r\n\t\t\t\t\t\t\"frmAsociarPermisos:empresas\",\r\n\t\t\t\t\t\tbundle.getString(\"message_no_existen_registros\"));\r\n\t\t\t} else {\r\n\t\t\t\tBusinessAction businessAction = ControladorContexto\r\n\t\t\t\t\t\t.getContextBean(BusinessAction.class);\r\n\t\t\t\tbusinessAction.setListBusiness(new ArrayList<Business>());\r\n\t\t\t\tbusinessAction.setListBusiness(business);\r\n\t\t\t\tbusinessAction.loadDetailsBusiness();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"public boolean isSetCompany_logo() {\n return this.company_logo != null;\n }",
"void unsetHasAuditingCompany();",
"public boolean isSetCnsCidadao() {\n return this.cnsCidadao != null;\n }",
"public boolean isSetCompany_abbr() {\n return this.company_abbr != null;\n }",
"public T caseCompany(Company object) {\n\t\treturn null;\n\t}",
"public M csolTitleNull(){if(this.get(\"csolTitleNot\")==null)this.put(\"csolTitleNot\", \"\");this.put(\"csolTitle\", null);return this;}",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"public void setCompany(String company) {\n\t\tthis.company = company;\n\t}",
"void xsetHasAuditingCompany(ch.crif_online.www.webservices.crifsoapservice.v1_00.AuditingCompanyStatus hasAuditingCompany);",
"public Company findCompany(IncomingReport incoming_report) throws IllegalArgumentException, DAOException;",
"public boolean isSetCompanyId() {\n return EncodingUtils.testBit(__isset_bitfield, __COMPANYID_ISSET_ID);\n }",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"boolean getCampaignIdNull();",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof VatCodeCompany)) {\n return false;\n }\n VatCodeCompany other = (VatCodeCompany) object;\n return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));\n }",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"public ResultSet Recomp1() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.comp_id,c.compname from company c,login l where l.login_id=c.login_id and l.status='not approved'\");\r\n\treturn rs;\r\n\t\r\n}",
"public M csolOrderNull(){if(this.get(\"csolOrderNot\")==null)this.put(\"csolOrderNot\", \"\");this.put(\"csolOrder\", null);return this;}",
"public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}",
"boolean getOrderPersonIdNull();",
"public boolean isSetCompanyNamePartical() {\n return this.companyNamePartical != null;\n }",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"@Test\r\n public void testGetCompanyInfo() throws MovieDbException {\r\n LOG.info(\"getCompanyInfo\");\r\n Company company = tmdb.getCompanyInfo(ID_COMPANY_LUCASFILM);\r\n assertTrue(\"No company information found\", company.getCompanyId() > 0);\r\n }",
"public void setContactCompany(String contactCompany) {\n this.contactCompany = contactCompany;\n }",
"boolean isNullOmittable();",
"public void setCompanyCd(String companyCd) {\r\n this.companyCd = companyCd;\r\n }",
"public void setCompanyCd(String companyCd) {\r\n this.companyCd = companyCd;\r\n }",
"public void setCompanyCode(String companyCode) {\r\n this.companyCode = companyCode == null ? null : companyCode.trim();\r\n }",
"public void setCompanyCode(String companyCode) {\r\n this.companyCode = companyCode == null ? null : companyCode.trim();\r\n }",
"protected Company getCompany(HttpServletRequest req) {\n\t\t\n\t\tEmployee user = getUser(req);\n\n return (user == null?null:user.getContact().getCompany());\n\t}",
"public String getCompanyCd() {\r\n return companyCd;\r\n }",
"public String getCompanyCd() {\r\n return companyCd;\r\n }",
"public Criteria andCompanyIdNotEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"company_id <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public EmsCompany getCompany(String uid)\n\t{\n\t\tEmsCompany company = new EmsCompany().findFirst(\"select * from ems_company where UID = '\"+uid+\"'\");\n\t\tif (company != null)\n\t\t{\n\t\t\treturn company;\n\t\t}\n\t\treturn null;\n\t}",
"public ResultSet appcomp(Long comp_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company where comp_id=\"+comp_id+\"\");\r\n\treturn rs;\r\n}",
"public M csrtSubjectNull(){if(this.get(\"csrtSubjectNot\")==null)this.put(\"csrtSubjectNot\", \"\");this.put(\"csrtSubject\", null);return this;}",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"@Override\n\tpublic Money costToCompany() {\n\t\treturn null;\n\t}",
"public boolean isSetCompanyUserNamePartical() {\n return this.companyUserNamePartical != null;\n }",
"public void setCompanyname(String companyname) {\n this.companyname = companyname == null ? null : companyname.trim();\n }",
"@Nonnull\n public Optional<List<CustomerCompany>> getCustomerCompanyIfPresent() {\n return Optional.ofNullable(toCustomerCompany);\n }",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"@Override\n\tpublic List<String> findDistinctConditionValues(String comditionKey) {\n\t\treturn null;\n\t}",
"public void setCompanyCode(String companyCode) {\n this.companyCode = companyCode == null ? null : companyCode.trim();\n }",
"public boolean hasC() {\n return c_ != null;\n }",
"public boolean isIdubicacionfiscalNull()\r\n\t{\r\n\t\treturn idubicacionfiscalNull;\r\n\t}"
] | [
"0.6337402",
"0.5871728",
"0.5843956",
"0.5800422",
"0.577887",
"0.5683951",
"0.56673825",
"0.5665159",
"0.5637064",
"0.5625414",
"0.5606872",
"0.55798477",
"0.55700934",
"0.54558694",
"0.544949",
"0.54391396",
"0.5412696",
"0.53897005",
"0.53731245",
"0.53583354",
"0.53541833",
"0.535325",
"0.53333133",
"0.5308536",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5308095",
"0.5306153",
"0.53057516",
"0.5302577",
"0.5259072",
"0.5246119",
"0.5239394",
"0.52378994",
"0.52243567",
"0.5219309",
"0.5206383",
"0.52043647",
"0.5199441",
"0.5192179",
"0.5187559",
"0.51843643",
"0.51816595",
"0.51802325",
"0.5169032",
"0.5168331",
"0.5165101",
"0.5151375",
"0.5147808",
"0.5128117",
"0.51263225",
"0.51222265",
"0.51166093",
"0.5113297",
"0.51120496",
"0.51099247",
"0.5109438",
"0.5092855",
"0.5085888",
"0.5085813",
"0.5077711",
"0.5076177",
"0.50666016",
"0.50642276",
"0.50393385",
"0.502787",
"0.5025097",
"0.5025097",
"0.5021882",
"0.5021882",
"0.50215775",
"0.5014036",
"0.5014036",
"0.5013431",
"0.50105536",
"0.5009928",
"0.5008791",
"0.5004399",
"0.4984222",
"0.498153",
"0.49793798",
"0.49663806",
"0.49551415",
"0.4942365",
"0.4939868",
"0.49388504",
"0.4936438"
] | 0.71598476 | 0 |
and csmi_place is null | public M csmiPlaceNull(){if(this.get("csmiPlaceNot")==null)this.put("csmiPlaceNot", "");this.put("csmiPlace", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public Place getPlace() {\n\t\treturn null;\r\n\t}",
"public boolean isEmpty(int place) {\n T item = a[place];\n return item == null;\n }",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"@Override\n\tpublic String getPlaceCode() {\n\t\treturn null;\n\t}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"@Override\n\tpublic Place find(Place obj) {\n\t\treturn null;\n\t}",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public void setPlace(String place) {\n this.place = place == null ? null : place.trim();\n }",
"public void setPlace(String place) {\n this.place = place == null ? null : place.trim();\n }",
"public void setPlace(String place) {\n this.place = place == null ? null : place.trim();\n }",
"private boolean isSpotBlank(int row, int column){\n\t\t\n\t\tif (getDisc(row, column) == null) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Placedetails)) {\n return false;\n }\n Placedetails other = (Placedetails) object;\n if ((this.place == null && other.place != null) || (this.place != null && !this.place.equals(other.place))) {\n return false;\n }\n return true;\n }",
"@Override\r\n\tpublic DiaryEventEditPlace getPlace() {\n\t\treturn null;\r\n\t}",
"public boolean mapsToPlace(Place where) {\n\t\treturn false;\r\n\t}",
"private boolean nothingAround(Coord c) {\n\t\tboolean bool = true;\n\t\tfor(Movement m : Movement.values()) {\n\t\t\tbool = bool && getAt(c.plus(m)) == null;\n\t\t}\n\t\treturn bool;\n\t}",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"public void setPlace(String place) {\n\t\tthis.place = place == null ? null : place.trim();\n\t}",
"public boolean hasUiPlace() {\n return ((bitField0_ & 0x00000010) != 0);\n }",
"List<Place> findUnboundLocationPlaceholders();",
"public final boolean checkIfInZone(L2Object obj) { return (getSiege(obj) != null); }",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public boolean hasUiPlace() {\n return ((bitField0_ & 0x00000010) != 0);\n }",
"private boolean isValidLocationFound() {\n return latitudeValue != null && longitudeValue != null;\n }",
"public boolean hasC() {\n return c_ != null;\n }",
"public void setPlace(String place){\n this.place = place;\n }",
"@Override\n public boolean isLocationEmpty(Unit unit, int x, int y)\n {\n Unit resident = master.getLocation(x, y).getResident();\n // if there's nothing there, yeah...\n if (resident == null)\n return true;\n // say it's not there if we dunno it's there\n if (resident.model.hidden && !confirmedVisibles.contains(resident)) \n return true;\n // otherwise, consult the fog map and master map\n return isLocationFogged(x, y) || master.isLocationEmpty(unit, x, y);\n }",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"public static boolean isPlaceHolder(BinaryTreeNode node) {\n\n\t\tif (node == null){\n\t\t return true;}\n\n\t\telse {\n\t\t return false;\n\t\t}\n\n\n\n}",
"@Test\n public void testNullPositionEquals(){\n assertFalse(Maze.position(0,0).equals(null));\n }",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"@Test\n public void fillMapIdAndCoordinateWithAttributeNull() {\n //Given\n \n String pathnameCityPlanXml = \"./ressources/fichiersTestXml/petitPlanMissingAttribute.xml\";\n Reseau resNoTronconValid = parser.parseCityPlan(pathnameCityPlanXml);\n Map map = new Map();\n \n // When\n \n map.fillMapIdAndCoordinate(resNoTronconValid);\n \n // Then\n \n assertNotNull(map);\n assertNull(map.getMapId());\n assertNull(map.getCoordinates());\n \n }",
"public boolean isValidPlacementSpot() {\n return isEmpty() && ! getNeighbours().stream().allMatch(Spot::isEmpty);\n }",
"public M csolTitleNull(){if(this.get(\"csolTitleNot\")==null)this.put(\"csolTitleNot\", \"\");this.put(\"csolTitle\", null);return this;}",
"@Override\n public boolean isSet() {\n return loci != null;\n }",
"@Test public void nullCoorinate(){\n body.setBodyCoordinate(null);\n assertEquals(\"testing to see if its empty\", body.getBodyCoordinate(), null);\n }",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Places)) {\n return false;\n }\n Places other = (Places) object;\n if ((this.idplaces == null && other.idplaces != null) || (this.idplaces != null && !this.idplaces.equals(other.idplaces))) {\n return false;\n }\n return true;\n }",
"private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }",
"@Test\n public void getStreetNameNull()\n {\n Location loc = Mockito.mock(Location.class);\n String str = _city.getStreetName(loc, 1);\n assertNull(str);\n }",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"@Test\n public void cityNotNull()\n {\n assertNotNull(_city);\n }",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"boolean canPlaceCity(VertexLocation vertLoc);",
"private boolean getCenterGps() {\n return this.mapState != MapState.FREE && this.mapState != MapState.WP;\n }",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"public boolean isNull()\n\t{\n\t\treturn cp.isNull();\n\t}",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"boolean getSearchValueNull();",
"@Override\n public void onClick(View v) {\n String location = etPlace.getText().toString();\n \n if(location==null || location.equals(\"\")){\n Toast.makeText(getBaseContext(), \"No Place is entered\", Toast.LENGTH_SHORT).show();\n return;\n }\n else if(location!=null && !location.equals(\"\")){\n new GeocoderTask().execute(location);\n }\n \n \n }",
"boolean isNullOmittable();",
"public String Get_place() \n {\n\n return place;\n }",
"public boolean isNull(){\n return false;\n }",
"public boolean isNullRecord () {\n if ((latitude == FLOATNULL) &&\n (longitude == FLOATNULL) &&\n (depth == FLOATNULL) &&\n (temperatureMin == FLOATNULL) &&\n (temperatureMax == FLOATNULL) &&\n (salinityMin == FLOATNULL) &&\n (salinityMax == FLOATNULL) &&\n (oxygenMin == FLOATNULL) &&\n (oxygenMax == FLOATNULL) &&\n (nitrateMin == FLOATNULL) &&\n (nitrateMax == FLOATNULL) &&\n (phosphateMin == FLOATNULL) &&\n (phosphateMax == FLOATNULL) &&\n (silicateMin == FLOATNULL) &&\n (silicateMax == FLOATNULL) &&\n (chlorophyllMin == FLOATNULL) &&\n (chlorophyllMax == FLOATNULL)) {\n return true;\n } else {\n return false;\n } // if ...\n }",
"@Override\n public void onPlaceSelected(Place place) {\n Log.i(\"Place: \", place.getAddress().toString());\n if (mybound != null) {\n if (mybound.contains(place.getLatLng())) {\n zoomToSearchedLocation(place);\n }\n }\n// zoomToSearchedLocation(place);\n bolFlag = true;\n }",
"@Test\n public void fillMapIdAndCoordinateWithBaliseMissing() {\n //Given\n String pathnameXml = \"./ressources/fichiersTestXml/petitPlanMissingBalise.xml\";\n Reseau resAttributeNull = parser.parseCityPlan(pathnameXml);\n assertNotNull(resAttributeNull);\n assertNull(resAttributeNull.getNoeud());\n Map map = new Map();\n \n // When\n \n map.fillMapIdAndCoordinate(resAttributeNull);\n \n // Then\n \n assertNotNull(map);\n assertNull(map.getMapId());\n assertNull(map.getCoordinates());\n }",
"boolean isPlaced();",
"public boolean locatedElsewhere(Card card) {\n\t\treturn (x != card.getX() || y != card.getY());\n\t}",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}",
"public M csolOrderNull(){if(this.get(\"csolOrderNot\")==null)this.put(\"csolOrderNot\", \"\");this.put(\"csolOrder\", null);return this;}",
"public M csolEditorNull(){if(this.get(\"csolEditorNot\")==null)this.put(\"csolEditorNot\", \"\");this.put(\"csolEditor\", null);return this;}",
"public M csseStartNull(){if(this.get(\"csseStartNot\")==null)this.put(\"csseStartNot\", \"\");this.put(\"csseStart\", null);return this;}",
"public boolean checkAllNull() {\n return (locationFilterCriteria == null || locationFilterCriteria.checkAllNull()) &&\n minPricePerM2 == null && maxPricePerM2 == null &&\n sizeInM2LowerBound == null &&\n sizeInM2UpperBound == null && roofed == null &&\n leasingTimeFrom == null && leasingTimeTo == null &&\n keywords == null && electricity == null && water == null &&\n high == null && glassHouse == null;\n }",
"private static boolean checkCellsNotNull(\n \t\t\tde.fhhannover.inform.hnefatafl.vorgaben.Move currentMove){\n \t\t\t\tif (currentMove.getFromCell() == null ||\n \t\t\t\t\tcurrentMove.getToCell() == null){\n \t\t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t\treturn true;\t\t\n \t}",
"boolean isNull();",
"Place getNextPlace(Place next)\n{\n if (!visited.contains(next.goNorth()) && !(next.goNorth()).isWall()){\n soln.append(\"N\");\n visited.add(next.goNorth());\n //nearby.clear();\n return next.goNorth();\n }\n else if (!visited.contains(next.goEast()) && !next.goEast().isWall()){\n soln.append(\"E\");\n visited.add(next.goEast());\n //nearby.clear();\n return next.goEast();\n }\n else if (!visited.contains(next.goNorth()) && !next.goNorth().isWall()){\n soln.append(\"N\");\n visited.add(next.goNorth());\n //nearby.clear();\n return next.goNorth();\n }\n else if (!visited.contains(next.goNorth()) && !next.goNorth().isWall()){\n soln.append(\"N\");\n visited.add(next.goNorth());\n //nearby.clear();\n return next.goNorth();\n \n //nearby.clear();\n return null;\n} \n}",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"public boolean isMissing() {\n return ((slat == GempakConstants.IMISSD) || (slon == GempakConstants.IMISSD));\n }",
"boolean getActiveNull();",
"public boolean esPared(CoordCasilla cc)\n {\n //Gdx.app.log(\"ES PARED\", \"ANalizando (\"+cc.x+\",\"+cc.y+\")\");\n \n TiledMapTileLayer.Cell casilla=( (TiledMapTileLayer)mapaActual.getLayers().get(\"PAREDES\")).getCell(cc.x,cc.y);\n if(casilla==null)\n return false;\n int idTile=casilla.getTile().getId();\n return idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_1 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_2 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_3;\n }",
"private boolean isEmptySouth()\r\n\t{\r\n\t\treturn (southElem == 0);\r\n\t}",
"@Override\n\tpublic void flagNull() {\n\t\t\n\t}",
"public boolean isNull(int x, int y){\r\n\t\tif (_squares[(int)x/20][(int)y/20] == null){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void testSetCity_NullString() {\r\n try {\r\n address.setCity(null);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }",
"public M csseFinishNull(){if(this.get(\"csseFinishNot\")==null)this.put(\"csseFinishNot\", \"\");this.put(\"csseFinish\", null);return this;}",
"Place getPlace();",
"boolean containsCreature(Creature creature) {\n/* 1585 */ return (this.creatures != null && this.creatures.contains(creature));\n/* */ }",
"public final boolean checkIfInZone(int x, int y) { return (getSiege(x, y) != null); }",
"private boolean isEmpty(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.BLACK_FLOOR);\r\n }",
"public void setPlacecode(String placecode) {\n this.placecode = placecode == null ? null : placecode.trim();\n }",
"private boolean allCardsAreNull(ArrayList<Card> set) {\r\n\t\tfor (Card c : set) {\r\n\t\t\tif (c != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Test\n public void getOutsideCityInvalid()\n {\n String str = _city.getOutsideCity(\"21 jump st\");\n assertNull(str);\n }",
"private Cell searchEmptySurrounding(){\n List <Cell> blocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n for (Cell block : blocks){\n if(!isCellOccupied(block)) return block;\n }\n return null;\n }",
"public boolean isSetBirthplace()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BIRTHPLACE$24) != 0;\n }\n }",
"boolean hasHasCity();",
"public void setActplace(String actplace) {\r\n this.actplace = actplace;\r\n }"
] | [
"0.6049616",
"0.59766656",
"0.5948979",
"0.57605547",
"0.5744947",
"0.57179934",
"0.5629474",
"0.56148565",
"0.5614753",
"0.55916464",
"0.5520746",
"0.55030805",
"0.5498114",
"0.5492558",
"0.5481714",
"0.5481714",
"0.5481714",
"0.5481562",
"0.5462254",
"0.5460396",
"0.545612",
"0.54399616",
"0.5437581",
"0.54339033",
"0.54246193",
"0.53947884",
"0.5381918",
"0.5347083",
"0.53444946",
"0.53244704",
"0.5320619",
"0.530692",
"0.5305619",
"0.53050065",
"0.5296026",
"0.52889806",
"0.52785826",
"0.52425754",
"0.5242535",
"0.524084",
"0.5238078",
"0.52342975",
"0.5220807",
"0.5193062",
"0.51849353",
"0.51745886",
"0.5170684",
"0.5169251",
"0.5166343",
"0.516248",
"0.51606256",
"0.5155467",
"0.51243824",
"0.51121676",
"0.51079494",
"0.5099824",
"0.5096999",
"0.50928897",
"0.5090306",
"0.50892246",
"0.50888306",
"0.5077033",
"0.5076033",
"0.5067759",
"0.5062471",
"0.50538176",
"0.505137",
"0.50474215",
"0.50457156",
"0.5041552",
"0.5040535",
"0.5039284",
"0.5038605",
"0.5034031",
"0.50308776",
"0.5029375",
"0.5015287",
"0.5013763",
"0.50068915",
"0.4998488",
"0.49855578",
"0.49739242",
"0.4971597",
"0.49632013",
"0.49630964",
"0.49606782",
"0.49568832",
"0.49535418",
"0.49488118",
"0.49432996",
"0.49388376",
"0.4933776",
"0.4932971",
"0.4922483",
"0.49152565",
"0.49146414",
"0.49120888",
"0.49075294",
"0.4905233",
"0.48965028"
] | 0.7676981 | 0 |
and csmi_place >= ? | public M csmiPlaceMin(Object min){this.put("csmiPlaceMin", min);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onPlaceSelected(Place place) {\n Log.i(\"Place: \", place.getAddress().toString());\n if (mybound != null) {\n if (mybound.contains(place.getLatLng())) {\n zoomToSearchedLocation(place);\n }\n }\n// zoomToSearchedLocation(place);\n bolFlag = true;\n }",
"public void searchPlace(String value)\n\t\t{ \n\t\t Geocoder geoCoder = new Geocoder(getBaseContext(), Locale.getDefault()); \n\t\t try {\n\t\t List<Address> addresses = geoCoder.getFromLocationName(\n\t\t value, 5);\t\t \n\t\t if (addresses.size() > 0) {\n\t\t \t\n\t\t \tdouble latitude= 0.0, longtitude= 0.0;\n\t\t \tGeoPoint p = new GeoPoint(\n\t\t (int) (addresses.get(0).getLatitude() * 1E6), \n\t\t (int) (addresses.get(0).getLongitude() * 1E6));\n\t\t \tlatitude=p.getLatitudeE6()/1E6;\n\t\t\t\t\t\tlongtitude=p.getLongitudeE6()/1E6;\t \n\t\t\t\t\t\tlat = String.valueOf(latitude);\n\t\t\t\t\t\tlongi = String.valueOf(longtitude);\n\t\t\t\t\t\torigin = new LatLng(latitude,longtitude);\n\t\t \tmap.moveCamera( CameraUpdateFactory.newLatLngZoom(origin, (float) 14.0) ); \n\t\t } \n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\n\n\n\t\t \n\n\t\t}",
"public abstract boolean actualPlace(int row, int col);",
"boolean isPlaced();",
"boolean czaCompare(PARAM_ZONE pZone, CObject pHo)\r\n {\r\n if (pHo.hoX < pZone.x1 || pHo.hoX >= pZone.x2)\r\n {\r\n return false;\r\n }\r\n if (pHo.hoY < pZone.y1 || pHo.hoY >= pZone.y2)\r\n {\r\n return false;\r\n }\r\n return true;\r\n }",
"boolean EsHemisferioSur()\r\n {\r\n if (getLat() < 29.46)\r\n return true;\r\n else\r\n return false;\r\n }",
"public static int placeOnBoard(Troop placed, int cp) {\n\t\tif (cp < placed.getCpCost() || Game.game.getEntityAt(placed.getPosX(), placed.getPosY()) != null)\n\t\t\treturn cp;\n\t\tGame.game.placeEntity(placed);\n\t\tGame.game.getHand().remove(placed);\n\t\treturn cp - placed.getCpCost();\n\t}",
"public boolean mapsToPlace(Place where) {\n\t\treturn false;\r\n\t}",
"public boolean cond(int i, double curLat, double curLon, double foundLat, double foundLon){\r\n boolean condResult = true;\r\n switch (i){\r\n case 0:\r\n condResult = curLon < foundLon;\r\n break;\r\n case 1:\r\n condResult = curLon > foundLon;\r\n break;\r\n case 2:\r\n condResult = curLat > foundLat;\r\n break;\r\n case 3:\r\n condResult = curLat < foundLat;\r\n break;\r\n case 4:\r\n condResult = false;\r\n break;\r\n }\r\n return condResult;\r\n }",
"public boolean isPlaceable() {\n\t\tlong now = Calendar.getInstance().getTimeInMillis();\t\t\n\t\treturn now - createTime >= placeableThreshold && \n\t\t\t\tnow - focusTime >= placeableThreshold;\n\t}",
"public void setQueryplace(Integer queryplace) {\n\t\tthis.queryplace = queryplace;\n\t}",
"private boolean isRelevant(Address address){\n\n return Math.abs(ride.getStartLatitude() - address.getLatitude()) < 2 &&\n Math.abs(ride.getStartLongitude() - address.getLongitude()) < 2;\n }",
"public boolean esPared(CoordCasilla cc)\n {\n //Gdx.app.log(\"ES PARED\", \"ANalizando (\"+cc.x+\",\"+cc.y+\")\");\n \n TiledMapTileLayer.Cell casilla=( (TiledMapTileLayer)mapaActual.getLayers().get(\"PAREDES\")).getCell(cc.x,cc.y);\n if(casilla==null)\n return false;\n int idTile=casilla.getTile().getId();\n return idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_1 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_2 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_3;\n }",
"public void search(Creature c, Area area){\r\n LinkedList<Point> ary = new LinkedList<>();\r\n boolean searchSuccessful = false;\r\n for(int yPlus=-1;yPlus<2;yPlus++){\r\n for(int xPlus=-1;xPlus<2;xPlus++){\r\n if(yPlus!=0&&xPlus!=0){\r\n ary.add(new Point(c.x+xPlus, c.y+yPlus));\r\n if(area.map[c.y+yPlus][c.x+xPlus] instanceof HiddenTile && ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).hidden){\r\n ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).find(c);\r\n searchSuccessful = true;\r\n }\r\n }\r\n }\r\n }\r\n Main.animator.searchAnimation(ary, searchSuccessful);\r\n }",
"public Integer getQueryplace() {\n\t\treturn queryplace;\n\t}",
"public void setPlace(String place){\n this.place = place;\n }",
"Place getPlace();",
"boolean canPlaceCity(VertexLocation vertLoc);",
"public String Get_place() \n {\n\n return place;\n }",
"public boolean contains2(DecimalPosition position) { // TODO rename: ???\n return position != null && position.getX() >= start.getX() && position.getY() >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }",
"@Test\n public void testCheckPlaceValideHorizontale() throws BateauxMembreInvalide, BateauxStartPointInvalide {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(15, 15, j, p);\n\n Place[] pl = j.checkPlace(\"A6\", g, 5, true);\n Place[] att = new Place[]{new Place(\"A6\"), new Place(\"B6\"), new Place(\"C6\"), new Place(\"D6\"), new Place(\"E6\")};\n\n assertArrayEquals(\"Les places ne sont pas bonne\", att, pl);\n }",
"public void getNearbyPlaces(double Lat, double Long)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n final DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n final GeoFire geoFire= new GeoFire(placeRef);\n\n double R=0.05;\n placesQuery = geoFire.queryAtLocation(new GeoLocation(Lat,Long),R);\n placesQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n double R=1.0;\n int count=0;\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n try {\n Toast.makeText(getContext(), key+\"added\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n count++;\n }\n\n @Override\n public void onKeyExited(String key) {\n\n try {\n Toast.makeText(getContext(), key+\"removed\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n\n count--;\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n placesQuery.removeAllListeners();\n\n /* if (count < 2 && R < 25) {\n R += 1;\n placesQuery.setRadius(R);\n try {\n Toast.makeText(getContext(),Double.toString(R),Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n } else if (count > 20) {\n\n R-=1;\n placesQuery.setRadius(R);\n\n }\n */\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n\n }",
"public void setPlaces(int places) {\r\n this.places = places;\r\n }",
"private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }",
"private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }",
"public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}",
"private boolean estSurPlateau(Coordonnees emplacement) {\n return emplacement.getLigne() >= 0 && emplacement.getColonne() >= 0 && emplacement.getLigne() < Plateau.NOMBRE_COLONNE && emplacement.getColonne() < Plateau.NOMBRE_LIGNE;\n }",
"@Test\n public void testCheckPlaceValideVerticale() throws BateauxMembreInvalide, BateauxStartPointInvalide {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(15, 15, j, p);\n\n Place[] pl = j.checkPlace(\"A6\", g, 5, false);\n Place[] att = new Place[]{new Place(\"A6\"), new Place(\"A7\"), new Place(\"A8\"), new Place(\"A9\"), new Place(\"A10\")};\n\n assertArrayEquals(\"Les places ne sont pas bonne\", att, pl);\n }",
"public static boolean isNearChunk(org.bukkit.entity.Entity entity, final int cx, final int cz, final int chunkview) {\n\t\tfinal int x = MathUtil.toChunk(getLocX(entity)) - cx;\n\t\tfinal int z = MathUtil.toChunk(getLocZ(entity)) - cz;\n\t\treturn Math.abs(x) <= chunkview && Math.abs(z) <= chunkview;\n\t}",
"private boolean m29992a(double d) {\n if (this.southwest.longitude <= this.northeast.longitude) {\n return this.southwest.longitude <= d && d <= this.northeast.longitude;\n } else {\n if (this.southwest.longitude > d) {\n if (d > this.northeast.longitude) {\n return false;\n }\n }\n return true;\n }\n }",
"@Override\n public boolean lowCh(String Place,int x1, int y1, int x2,int y2, Board board)\n {\n switch(Place.toLowerCase())\n { \n //experiment to check to see if there is a piece in the way\n case \"uright\": \n for(; x1<=x2 && y1<=y2; x1++,y1++)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2-1 && y1==y2-1)\n {\n return true;\n }\n }else{\n return false;\n }\n }\n case \"uleft\":\n for(; x1>=x2 && y1<=y2; x1--,y1++)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2+1 && y1==y2-1)\n {\n return true;\n }\n }else{\n return false;\n }\n }\n case \"dright\":\n for(; x1<=x2 && y1>=y2; x1++,y1--)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2-1 && y1==y2+1)\n {\n return true;\n }\n }else{\n return false;\n }\n }\n case \"dleft\":\n for(; x1>=x2 && y1>=y2; x1--,y1--)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2+1 && y1==y2+2)\n {\n return true;\n }\n }else{ \n return false;\n }\n } \n default:\n return false;\n }\n }",
"@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName() + \", \" + place.getId());\n\n move=place.getLatLng();\n moveCamera(move,15f);\n }",
"public PlaceMonsterMove getPlace(GameState state, Monster mon) {\n if (Tony == null) assignPlayers(state);\n if (castle1 == null) assignCastles(state);\n /*\n if (mon == Monster.SLAYER) {\n if (state.getMonsters(castle1, notTony).contains(Monster.DRAGON))\n return new PlaceMonsterMove(Tony, castle1, mon);\n else\n return new PlaceMonsterMove(Tony, castle2, mon);\n }\n\n CastleID castleChoice = castle1;\n if (mon.value > avgStr) {\n //try to place at castle2\n castleChoice = findValidPlacement(castle2, castle1, castle3, state);\n } else {\n //try to place at castle1\n castleChoice = findValidPlacement(castle1, castle2, castle3, state);\n }\n */\n\n CastleID castleChoice = findValidPlacement(castle2, castle1, castle3, state);\n System.out.println(Tony + \" is placing \" + mon + \" at \" + castleChoice);\n\n return new PlaceMonsterMove(Tony, castleChoice, mon);\n }",
"boolean isSet(Coordinates coord, double horizon, long time)throws AstrometryException;",
"public boolean isValidPlaceCommand(String cmd) {\r\n\t\tboolean isValidPlaceCmd = true;\r\n\t\tString[] splitedSpaceArr = cmd.split(\"\\\\s+\");\r\n\r\n\t\tif (splitedSpaceArr.length == 2) {\r\n\t\t\tif (!splitedSpaceArr[0].equalsIgnoreCase(\"PLACE\")) {\r\n\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPlaceCmd) {\r\n\t\t\t\tString[] splitedCommaArr = splitedSpaceArr[1].split(\"\\\\s*,\\\\s*\");\r\n\r\n\t\t\t\tif (splitedCommaArr.length == 3) {\r\n\t\t\t\t\tint row = RobotSimulator.isInteger(splitedCommaArr[0]) ? Integer.parseInt(splitedCommaArr[0]) : -1;\r\n\t\t\t\t\tint col = RobotSimulator.isInteger(splitedCommaArr[1]) ? Integer.parseInt(splitedCommaArr[1]) : -1;\r\n\t\t\t\t\tString faceStr = splitedCommaArr[2];\r\n\r\n\t\t\t\t\t// check is position value out of bounds\r\n\t\t\t\t\tif (row > 4 || row < 0 || col > 4 || col < 0) {\r\n\t\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// check is valid face value\r\n\t\t\t\t\tList validFaceArr = Arrays.asList(\"WEST\", \"NORTH\", \"EAST\", \"SOUTH\");\r\n\t\t\t\t\tif (!validFaceArr.contains(faceStr.toUpperCase())) {\r\n\t\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tisValidPlaceCmd = false;\r\n\t\t}\r\n\t\treturn isValidPlaceCmd;\r\n\t}",
"public boolean isEqual(Move m){\r\n\t\treturn m.getStartSquare()==start_sq&&m.getEndSquare()==end_sq&&(m.getModifier()==modifiers % 10);\r\n\t}",
"public void checkCameraLimits()\n {\n //Daca camera ar vrea sa mearga prea in stanga sau prea in dreapta (Analog si pe verticala) ea e oprita (practic cand se intampla acest lucru Itemul asupra caruia se incearca centrarea nu mai e in centrul camerei )\n\n if(xOffset < 0 )\n xOffset = 0;\n else if( xOffset > refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth())\n xOffset =refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth();\n if(yOffset<0)\n yOffset = 0;\n if(yOffset > refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight())\n {\n yOffset = refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight();\n }\n }",
"private static boolean isInBounds(Location location, Vector3i min, Vector3i max) {\n return location.getX() >= min.x && location.getX() < max.x && location.getY() >= min.y\n && location.getY() < max.y && location.getZ() >= min.z && location.getZ() < max.z;\n }",
"private boolean pointOnSegment(Waypoint w1, Waypoint w3, Waypoint w2){\n\t\tdouble w1x = w1.getX();\n\t\tdouble w1y = w1.getY();\n\t\tdouble w2x = w2.getX();\n\t\tdouble w2y = w2.getY();\n\t\tdouble w3x = w3.getX();\n\t\tdouble w3y = w3.getY();\n\t\t\n\t\tif (w3x <= Math.max(w1x, w2x) && w3x >= Math.min(w1x, w2x) && \n\t\t\tw3y <= Math.max(w1y, w2y) && w3y >= Math.min(w1y, w2y))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"private boolean check_vicinity(FishTankItem TankItem) {\r\n if (getDirection()) {\r\n return 0 <= (TankItem.firstCoordinate - this.firstCoordinate)\r\n && (TankItem.firstCoordinate - this.firstCoordinate) <= 7;\r\n } else {\r\n return 0 <= (this.firstCoordinate - TankItem.firstCoordinate)\r\n && (this.firstCoordinate - TankItem.firstCoordinate) <= 5;\r\n }\r\n }",
"Place resolveLocation( Place place );",
"@Test\n public void testFind_West_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = -170.0;\n double lat2 = 0.0;\n double lon2 = 170.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }",
"@Override\n\tpublic void IsAtCentre(boolean b, Time time) {\n\t\t\n\t}",
"interface Place {\n\n\t// Return the adjacent Place in the given direction\n\tpublic Place goNorth();\n\tpublic Place goSouth();\n\tpublic Place goEast();\n\tpublic Place goWest();\n\n\t// Returns true only for the special \"Wall\" place\n\tpublic boolean isWall();\n\n\t// Returns true only for the special \"Cheese\" place\n\tpublic boolean isCheese();\n}",
"@Test\n public void testCheckPlaceVerticaleTeteDehors() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n try {\n j.checkPlace(\"A50\", g, 5, false);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxStartPointInvalide);\n }\n }",
"public boolean isValuePlaced(int value)\n {\n return (getPositionForValue(value)!=null);\n }",
"boolean canPlaceRobber(HexLocation hexLoc);",
"@Override\n\t\t\t\tpublic List<KinderGarten> chercherParZone(Double longi, Double lat,Double rayon) {\n\t\t\t\t\tList<KinderGarten> list = new ArrayList<>();\n\t\t\t\t\tList<KinderGarten> list2 =(List<KinderGarten>) kindergartenRepo.findAll();\n\t\t\t\t\tfor(int i=0;i<list2.size();i++)\n\t\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(calculDis(longi,lat,list2.get(i).getLongi(),list2.get(i).getLatitude()));\n\t\t\t\t\t\tif(calculDis(longi,lat,list2.get(i).getLongi(),list2.get(i).getLatitude()) <= rayon)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist.add(list2.get(i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// long/lat/r\n\t\t\t\t\t//coord bd Ariana long:10.182733 lat: 36.900635 // long:10.804493 lat2 :36.460875\n\t\t\t\t\t\n\t\t\t\t\t//test 1 Ariana 10.1852049/36.8989212/1 \n\t\t\t\t\t\n\t\t\t\t\t//test 2 A GHANA 10.181863/36.806459/1 // long2:10.182039 lat2: 36.806021 \n\t\t\t\t\t//\n\t\t\t\t\treturn list;\n\t\t\t\t}",
"static Place getPlaceByID ( int key)\r\n\t{\r\n\t\treturn tm.get(key);\r\n\t}",
"@Override\r\n\tpublic int compareTo(TouringPlace another) {\n\t\treturn 0;\r\n\t}",
"@Override\n public void onPlaceSelected(Place place) {\n String name = place.getName();\n double lat, lng;\n lat = 0;\n lng = 0;\n if (place.getLatLng() != null) {\n lat = place.getLatLng().latitude;\n lng = place.getLatLng().longitude;\n }\n fromPosition = new LatLng(place.getLatLng().latitude, place.getLatLng().longitude);\n //do something\n moveCamera(new LatLng(lat, lng), DEFAULT_ZOOM,\n \"Start Location\");\n }",
"public int getPlace() {\n\t\treturn place;\n\t}",
"public void setPlace(int num) {\n\t\tplace = num;\n\t}",
"private boolean ptoStaDentroCuadra(float posx, float posy, int x, int y, int ancho,\n\t\t\tint alto) {\n\t\treturn (x < posx && posx < x + ancho && y < posy && posy < y + alto);\n\t}",
"private Place getPlaceWithOpeningHours() {\n\n // finds nearby place according the slot value\n List<Place> places = PlaceFinder.findNearbyPlace(GeoCoder.getLatLng(deviceAddress), slotBankNameValue);\n\n // check the list of places for one with opening hours\n return PlaceFinder.findOpeningHoursPlace(places, slotBankNameValue);\n }",
"private boolean placeFlag(Location m) {\r\n\r\n // if the game is finished then nothing to do\r\n if (gameState > STARTED) {\r\n return false;\r\n } \r\n \r\n // if the location is already revealed then nothing more to do\r\n if (query(m) != GameStateModel.HIDDEN && query(m) != GameStateModel.FLAG) {\r\n return false;\r\n }\r\n \r\n // otherwise toggle the flag\r\n flag[m.x][m.y] = !flag[m.x][m.y];\r\n \r\n if (flag[m.x][m.y]) {\r\n \r\n //if (board[m.x][m.y] != GameState.MINE) {\r\n // System.out.println(\"DEBUG (\" + m.x + \",\" + m.y + \") is not a mine!\");\r\n //}\r\n flagsPlaced++;\r\n } else {\r\n flagsPlaced--;\r\n }\r\n\r\n // call this handle to allow extra logic to be added by the extending class\r\n placeFlagHandle(m);\r\n \r\n return true;\r\n \r\n }",
"@Override\n public void onPlaceSelected(Place place) {\n initiateSearch(place.getLatLng());\n }",
"public boolean contains(Coord c) {\n\t\treturn getAWTRectangle().contains(c.getAWTPoint());\n\t}",
"public boolean smallerThan(PositionRadians p) {\n\t\tif (value < p.value) \n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"private void zoomToLocationSearchResult(List<Place> places) {\n\n if(places.size()>1)\n {\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for(Place place:places)\n {\n LatLng latLng = new LatLng(Double.parseDouble(place.getLat()), Double.parseDouble(place.getLng()));\n builder.include(latLng);\n }\n LatLngBounds bounds = builder.build();\n\n // note need to set device screen size if not the application will crash before google map is layed out\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngBounds(bounds,deviceWidth,deviceHeight,0);\n googleMap.animateCamera(cameraUpdate);\n }\n else if (places.size()==1)\n {\n LatLng latLng = new LatLng(Double.parseDouble(places.get(0).getLat()),Double.parseDouble(places.get(0).getLng()));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 18);\n googleMap.animateCamera(cameraUpdate);\n }\n }",
"@Test\n public void testCheckPlaceHorizontaleTeteDehors() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n try {\n j.checkPlace(\"Z6\", g, 5, true);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxStartPointInvalide);\n }\n }",
"public void setActplace(String actplace) {\r\n this.actplace = actplace;\r\n }",
"boolean canSet(Coordinates coord, double horizon, long time) throws AstrometryException;",
"public final native PlaceResult getPlace() /*-{\n return this.getPlace();\n }-*/;",
"public boolean canPlace(int r, int c, int n)\n\t{\n\t\tif(board[r][c] != 0) //don't want to replace a spot at the board that isn't 0\n\t\t\treturn false;\n\t\tfor(int row = 0; row < board.length; row++) //checks rows\n\t\t{\n\t\t\tif(board[row][c] == n)\n\t\t\t\treturn false;\n\t\t}\n\t\tfor(int col = 0; col < board.length; col++) //checks columns\n\t\t{\n\t\t\tif(board[r][col] == n)\n\t\t\t\treturn false;\n\t\t}\n\t\t//finds starts of the 3x3 box of n\n\t\tint row = 0;\n\t\tint col = 0;\n\t\tif(r > 2)\n\t\t\trow += 3;\n\t\tif(r > 5)\n\t\t\trow += 3;\n\t\tif(c > 2)\n\t\t\tcol += 3;\n\t\tif(c > 5)\n\t\t\tcol += 3;\n\t\tfor(int i = row; i < row + 3; i++)\n\t\t{\n\t\t\tfor(int j = col; j < col + 3; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j] == n)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void putCellInGoodPlace(JmtCell cell, int x, int y, boolean flag) {\n \t\tif (sp > 9) {\r\n \t\t\tsp = 0;\r\n \t\t}\r\n \t\tint oldPointX = 0;\r\n \t\tint oldPointY = 0;\r\n \t\tboolean inGroup = false;\r\n \t\t// Il flag stato creato per capire sapere se e' una block regione e\r\n \t\t// quindi utilizzare\r\n \t\t// il vecchio metodo oppure se e' una cella quindi flag=true allora uso\r\n \t\t// il nuovo\r\n \t\t// System.out.println(\"------------PUT CELL IN GOOD PLACE\r\n \t\t// ----------------------\");\r\n \r\n \t\tif (flag) {\r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tRectangle bounds2 = new Rectangle((int) bounds.getX() - 20, (int) bounds.getY(), (int) bounds.getWidth() + 38, (int) bounds.getHeight());\r\n \r\n \t\t\toldPointX = x;\r\n \t\t\toldPointY = y;\r\n \t\t\t// ---------inzio\r\n \t\t\t// Object[] cells=(graph).getDescendants(graph.getRoots());\r\n \t\t\t// for(int j=0;j<cells.length;j++){\r\n \t\t\t// if((cells[j] instanceof JmtCell) &&(cells[j]!=cell)){\r\n \t\t\t// Rectangle\r\n \t\t\t// boundcell=GraphConstants.getBounds(((JmtCell)cells[j]).getAttributes()).getBounds();\r\n \t\t\t// if(boundcell.intersects(bounds2)){\r\n \t\t\t// System.out.println(\"true\");\r\n \t\t\t// }\r\n \t\t\t// }\r\n \t\t\t// }\r\n \r\n \t\t\t// ---------------fine\r\n \t\t\t// check if a cell isInGroup\r\n \t\t\tif (isInGroup(cell)) {\r\n \r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \r\n \t\t\t// Qua ho le celle e archi che intersecano la mia cella\r\n \t\t\t// selezionata..bounds (molto efficente dal punto di vista della\r\n \t\t\t// pesantezza)\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds2));\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\tresetOverLapping = 0;\r\n \t\t\twhile (overlapping.length > 0) {\r\n \r\n \t\t\t\t// Moves bounds until it doesn't overlap with anything\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (int j = 0; j < overlapping.length; j++) {\r\n \r\n \t\t\t\t\tresetOverLapping++;\r\n \t\t\t\t\t// resetOverLapping is inserted for an anormall behavior of\r\n \t\t\t\t\t// Tool\r\n \t\t\t\t\t// in fact, if you disable this variable you can see that\r\n \t\t\t\t\t// the tools\r\n \t\t\t\t\t// stop and \"for cycle\" will be repeated infinite times\r\n \t\t\t\t\tif (resetOverLapping > 50) {\r\n \t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// System.out.println(\"---flag in for---\");\r\n \t\t\t\t\t// if(overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t// &&((JmtEdge)overlapping[j]).intersects((EdgeView)(graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t// false),\r\n \t\t\t\t\t// GraphConstants.getBounds(((JmtCell)cell).getAttributes())))\r\n \t\t\t\t\t// System.out.println(\"Intersect TRUE\");\r\n \r\n \t\t\t\t\t// Puts last to last corner of overlapping cells\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtCell && overlapping[j] != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \r\n \t\t\t\t\tif (!inGroup && overlapping[j] instanceof JmtCell && overlapping[j] != cell) {\r\n \r\n \t\t\t\t\t\tRectangle2D b = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\t// Consider only rectangles that intersects with given\r\n \t\t\t\t\t\t// bound\r\n \t\t\t\t\t\tif (b.intersects(bounds2)) {\r\n \t\t\t\t\t\t\tlast.setLocation(new Point(oldPointX, oldPointY));\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// inizio a controllare se l intersezione e' un lato\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t\t\t&& overlapping[j] != cell\r\n \t\t\t\t\t\t\t&& !isInGroup(overlapping[j])\r\n \t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\tGraphConstants.getBounds(cell.getAttributes())) && ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\tboolean access = false;\r\n \t\t\t\t\t\tboolean access2 = false;\r\n \r\n \t\t\t\t\t\t// Nonostatne SourceCell e SinkCell estendano JMTCell\r\n \t\t\t\t\t\t// avevo problemi di nullPointerException per questo\r\n \t\t\t\t\t\t// verifico di che\r\n \t\t\t\t\t\t// tipo sono\r\n \r\n \t\t\t\t\t\tif (cell instanceof SourceCell\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SourceCell) cell).getAttributes()))) {\r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\t\t\t// _______INIZIO_____\r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SourceCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\tsp = sp + 2;\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\taccess = true;\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (cell instanceof SinkCell) {\r\n \r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)) {\r\n \r\n \t\t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SinkCell) cell).getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SinkCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\taccess2 = true;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!isInGroup(overlapping[j]) && !access && !access2 && overlapping[j] instanceof JmtEdge) {\r\n \t\t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t\t\t\t\t\t\tfalse), GraphConstants.getBounds(cell.getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\taccess = access2 = false;\r\n \r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tif ((intersectionPoints == null) || intersectionPoints.size() <= 0) {\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\t\t\t\treturn;\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(cell.getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\t;\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} // end if of edge\r\n \t\t\t\t}\r\n \r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \r\n \t\t\t// Puts this cell in found position\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t} else {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tif (isInGroup(cell)) {\r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \r\n \t\t\tif (overlapping == null) {\r\n \r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\twhile (overlapping.length > 0) {\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (Object element : overlapping) {\r\n \t\t\t\t\tif (element instanceof JmtCell && element != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (!inGroup && element instanceof JmtCell && element != cell) {\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \t\t\t\t\tif (isInGroup(element) && element instanceof JmtEdge) {\r\n \t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(element, false), GraphConstants\r\n \t\t\t\t\t\t\t\t\t\t.getBounds(cell.getAttributes()))) {\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtEdge) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\t// ___\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t}\r\n \r\n \t}",
"public void Print_place()\n {\n\n System.out.println(\"Place: \" + place);\n }",
"public String playerRealNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-50 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+100 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}",
"boolean contains(ShortPoint2D position);",
"private Boolean pointOnGrid(int d,int r, int c, Maze3D myMaze) {\n return (d >= 0 && r >= 0 && c >= 0) && (d<myMaze.depths && c < myMaze.columns && r < myMaze.rows);\n }",
"public String getPlace(){\n return place;\n }",
"boolean hasHasLatitude();",
"@Test\r\n\tpublic void ST_ClosestCoordinate() {\n\r\n\t}",
"public abstract boolean isRetained(Coordinate c);",
"void searchConstraintHit (Search search);",
"@Override\n public boolean isMayorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()<this.getValue();\n }",
"public interface Placeable {\n}",
"public boolean c(World paramaqu, BlockPosition paramdt)\r\n/* 37: */ {\r\n/* 38: 57 */ return false;\r\n/* 39: */ }",
"public static boolean isValidPlace(int[] setPos){\n if(setPos[0]<=4 && setPos[0]>=0)\n return (setPos[1]<=4 && setPos[1]>=0);\n return false;\n }",
"private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}",
"private void setMin(int min) { this.min = new SimplePosition(false,false,min); }",
"private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }",
"boolean hasLatitude();",
"boolean hasLatitude();",
"@Override\r\n\t\tpublic int compareTo(OutOfPlaceMetric o) {\r\n\t\t\treturn Integer.compare(this.getAbsoluteDistance(), o.getAbsoluteDistance());\r\n\t\t}",
"@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }",
"public boolean insert(T t, int place) {\n if (place >= a.length-1 || place<0) {\n System.out.println(\"Error, there is no such place.\");\n return false;\n }\n if (a[place]==null) {\n a[place]=t;\n return true;\n } else {\n System.out.println(\"There is no place on this bookshelf.\");\n return false;\n }\n }",
"public boolean getLocationsFrom(double curLat, double curLon, Double num) {\r\n boolean locationsFromDB = true;\r\n String previousCurLat, previousCurLon;\r\n Log.d(\"Detailed analysis\",\"getting data from db, calling getdata function\");\r\n Cursor rs1 = myDB.getData(curLat, curLon, num);\r\n //In this condition if data not found locationsFromDB is set to false and then returned\r\n if (rs1.getCount() <= 0){\r\n System.out.println(rs1.getCount());\r\n locationsFromDB = false;\r\n Log.d(\"Detailed analysis\",\"Data not found\");\r\n }\r\n //In this condition if data is found need to do the further action of finding the user has moved or not and calculating the direction and distance if user has moved\r\n else {\r\n Log.d(\"Detailed analysis\", \"data found\");\r\n Double[] latArray = new Double[rs1.getCount()];\r\n Double[] lonArray = new Double[rs1.getCount()];\r\n int z = 0;\r\n double distanceBtwLocations = 0;\r\n double finalLat = 0.0;\r\n double finalLon = 0.0;\r\n while (rs1.moveToNext()) {\r\n latArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lat)));\r\n lonArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lon)));\r\n Log.d(\"Detailed Analysis\", latArray[z] +\", \" + lonArray[z] );\r\n double tempDistance = findDistanceBetweenPoints(latArray[z], lonArray[z], Math.round(curLat * 10000.0) / 10000.0, Math.round(curLon * 10000.0) / 10000.0);\r\n System.out.println(tempDistance + \" : tempDistance\");\r\n if (distanceBtwLocations < tempDistance) {\r\n finalLat = latArray[z];\r\n finalLon = lonArray[z];\r\n distanceBtwLocations = tempDistance;\r\n System.out.println(distanceBtwLocations + \" : distanceBtwLocations\");\r\n }\r\n z++;\r\n }\r\n if (distanceBtwLocations < 100 * 1606.34) {\r\n Log.d(\"Detailed Analysis\", \"Distance is not greater than 100 miles\");\r\n previousCurLat = String.valueOf(finalLat);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lat));\r\n previousCurLon = String.valueOf(finalLon);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lon));\r\n Cursor rs = myDB.getData(finalLat, finalLon, num);\r\n rs.moveToFirst();\r\n// condChoice = Integer.parseInt(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_condChoice)));\r\n number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num)));\r\n Log.d(\"Detailed Analysis\", \"number while data found: \" + number);\r\n Log.d(\"Detailed Analysis\", \"Recent number value from getLocationsFrom: \" + number);\r\n Log.d(\"Detailed analysis\", \"Lattittude and Longitude points\" + \" \" + Double.parseDouble(previousCurLat) + \",\" + Double.parseDouble(previousCurLon) + \":\" + Math.round(curLat * 10000.0) / 10000.0 + \",\" + Math.round(curLon * 10000.0) / 10000.0);\r\n //if user has not moved then locationsFromDB is set to true and then returned\r\n if (Double.parseDouble(previousCurLat) == Math.round(curLat * 10000.0) / 10000.0 && Double.parseDouble(previousCurLon) == Math.round(curLon * 10000.0) / 10000.0) {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are same\");\r\n rs.moveToFirst();\r\n locationValues = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n locationsFromDB = true;\r\n } else {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are not same\");\r\n float distance = 0;\r\n LatLng movedPoints;\r\n Log.d(\"Detailed analysis\", \"finding distance between lattitudes and longitudes\");\r\n distance = findDistanceBetweenPoints(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon), curLat, curLon);\r\n Log.d(\"Detailed Analysis\", \"distance in meters\" + \" \" + distance);\r\n direction = SphericalUtil.computeHeading(new LatLng(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon)), new LatLng(curLat, curLon));\r\n Log.d(\"Detailed Analysis\", \"direction in degrees\" + \" \" + direction);\r\n String values = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n String valuesArray[] = values.split(\":\");\r\n Log.d(\"Detailed analysis\", \"finding random locations after moving a bit\");\r\n for (int i = 0; i < valuesArray.length; i++) {\r\n String pointsArray[] = valuesArray[i].split(\",\");\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes points\" + pointsArray[0] + \" \" + pointsArray[1]);\r\n movedPoints = findMovedPoints(Double.parseDouble(pointsArray[0]), Double.parseDouble(pointsArray[1]), distance, direction);\r\n Log.d(\"Detailed Analysis\", \"latitude and longitude points after moving\" + \" \" + movedPoints);\r\n locationValues = findRandomLocations(movedPoints.latitude, movedPoints.longitude, 1, distance + 1);\r\n }\r\n }\r\n }\r\n else{\r\n locationValues = findRandomLocations(curLat, curLon, num, 30);\r\n }\r\n locationsFromDB = true;\r\n }\r\n return locationsFromDB;\r\n }",
"public boolean canPlace(Card o, String c)\r\n {\r\n if (this.color == c)\r\n return true;\r\n else if (this.value == o.value)\r\n return true;\r\n else if (this.color == \"none\") // Wild cards\r\n return true;\r\n return false;\r\n }",
"private boolean esCoordenadaValida(Coordenada c) {\n assert c != null : \"Error: la coordenada introducida no puede ser null\";\n int fila = c.getFila();\n int columna = c.getColumna();\n\n return (fila>=0 && fila<=casillas.length-1) &&\n (columna>=0 && columna<=casillas[0].length-1);\n }",
"protected boolean getSomething(int par1, int par2, int par3, int par4, int x, int y)\r\n {\r\n int var7 = this.guiLeft;\r\n int var8 = this.guiTop;\r\n x -= var7;\r\n y -= var8;\r\n return x >= par1 - 1 && x < par1 + par3 + 1 && y >= par2 - 1 && y < par2 + par4 + 1;\r\n }",
"public Place(int x, int y){\n this.x=x;\n this.y=y;\n isFull=false;\n }",
"private boolean isOutOfBounds(int row, int col) {\n if (row < 0 || row >= this.getRows()) {\n return true;\n }\n else if (col < 0 || col >= this.getColumns()) {\n return true;\n }\n else {\n return false; // the placement is valid\n }\n }",
"@Test\n public void testFind_West() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = -10.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }",
"public boolean placeAvailableById(String placeId)\n\t\tthrows RnsServiceException{\n\t\tPlace place = getPlaceById(placeId);\n\t\tif(place == null)\n\t\t\treturn false;\n\t\tlong nOfVehiclesInPlace = \n\t\t\tthis.getVehiclesInPlace(placeId,null,null,null).size();\n\t\tlong maxVehiclesInPlace = place.getCapacity().longValue();\n\t\treturn nOfVehiclesInPlace < maxVehiclesInPlace;\n\t}",
"private static boolean dangerZone(int closestGuess)\n {\n return (closestGuess < guessRange);\n }",
"public M csmiPlaceMax(Object max){this.put(\"csmiPlaceMax\", max);return this;}",
"public boolean isCoordOnStreet(Coordinate coord) {\n double dxc = coord.getX() - begin.getX();\n double dyc = coord.getY() - begin.getY();\n\n double dxl = end.getX() - begin.getX();\n double dyl = end.getY() - begin.getY();\n\n if (Math.abs(dxc * dyl - dyc * dxl) > 1) {\n\n return false;\n\n } else {\n\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0 ? begin.getX() <= coord.getX() && coord.getX() <= end.getX()\n : end.getX() <= coord.getX() && coord.getX() <= begin.getX();\n } else {\n return dyl > 0 ? begin.getY() <= coord.getY() && coord.getY() <= end.getY()\n : end.getY() <= coord.getY() && coord.getY() <= begin.getY();\n }\n }\n }",
"private static boolean validateLatitude(String latitude) {\n try {\n BigDecimal bd = new BigDecimal(latitude);\n\n if ((bd.compareTo(maxLatitude) <= 0) && (bd.compareTo(minLatitude) >= 0)) {\n return true;\n }\n } catch (Exception ignored) {\n }\n\n return false;\n }",
"public boolean a(ItemStack paramamj, ajk paramajk)\r\n/* 69: */ {\r\n/* 70:131 */ return paramajk.g > 90;\r\n/* 71: */ }"
] | [
"0.5760927",
"0.5416674",
"0.5373211",
"0.5327745",
"0.52887917",
"0.5252924",
"0.5215773",
"0.52123404",
"0.5199483",
"0.5190582",
"0.517259",
"0.51405525",
"0.51247114",
"0.50951004",
"0.50645036",
"0.5040106",
"0.5020831",
"0.5001626",
"0.49890494",
"0.49766046",
"0.4972621",
"0.49341768",
"0.49224055",
"0.49130216",
"0.4895624",
"0.48893297",
"0.48767766",
"0.48588282",
"0.48540267",
"0.48333982",
"0.4830646",
"0.4799336",
"0.47983187",
"0.4794934",
"0.47918555",
"0.47739485",
"0.47634175",
"0.47390485",
"0.47357148",
"0.47337204",
"0.4723714",
"0.47036624",
"0.47031507",
"0.46967018",
"0.46838245",
"0.46809417",
"0.46604288",
"0.46481785",
"0.46429056",
"0.4632522",
"0.46320483",
"0.46247685",
"0.46242052",
"0.4614777",
"0.4614162",
"0.4605951",
"0.46023116",
"0.46003667",
"0.45943275",
"0.45867032",
"0.45828232",
"0.4580959",
"0.45731336",
"0.45680836",
"0.45609945",
"0.4559949",
"0.45583144",
"0.45465076",
"0.45441318",
"0.4538312",
"0.45338064",
"0.4533744",
"0.4526573",
"0.4525171",
"0.45232087",
"0.45193577",
"0.45191067",
"0.45120552",
"0.4509672",
"0.4509322",
"0.45082918",
"0.4505458",
"0.45025277",
"0.45025277",
"0.44985119",
"0.44958887",
"0.44949752",
"0.44938165",
"0.44919685",
"0.44909388",
"0.44906574",
"0.44897866",
"0.4485612",
"0.44832367",
"0.44822118",
"0.44811493",
"0.4480395",
"0.44784367",
"0.44772136",
"0.44740164"
] | 0.5719878 | 1 |
and csmi_place <= ? | public M csmiPlaceMax(Object max){this.put("csmiPlaceMax", max);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onPlaceSelected(Place place) {\n Log.i(\"Place: \", place.getAddress().toString());\n if (mybound != null) {\n if (mybound.contains(place.getLatLng())) {\n zoomToSearchedLocation(place);\n }\n }\n// zoomToSearchedLocation(place);\n bolFlag = true;\n }",
"public abstract boolean actualPlace(int row, int col);",
"public M csmiPlaceMin(Object min){this.put(\"csmiPlaceMin\", min);return this;}",
"boolean EsHemisferioSur()\r\n {\r\n if (getLat() < 29.46)\r\n return true;\r\n else\r\n return false;\r\n }",
"public boolean cond(int i, double curLat, double curLon, double foundLat, double foundLon){\r\n boolean condResult = true;\r\n switch (i){\r\n case 0:\r\n condResult = curLon < foundLon;\r\n break;\r\n case 1:\r\n condResult = curLon > foundLon;\r\n break;\r\n case 2:\r\n condResult = curLat > foundLat;\r\n break;\r\n case 3:\r\n condResult = curLat < foundLat;\r\n break;\r\n case 4:\r\n condResult = false;\r\n break;\r\n }\r\n return condResult;\r\n }",
"boolean czaCompare(PARAM_ZONE pZone, CObject pHo)\r\n {\r\n if (pHo.hoX < pZone.x1 || pHo.hoX >= pZone.x2)\r\n {\r\n return false;\r\n }\r\n if (pHo.hoY < pZone.y1 || pHo.hoY >= pZone.y2)\r\n {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean esPared(CoordCasilla cc)\n {\n //Gdx.app.log(\"ES PARED\", \"ANalizando (\"+cc.x+\",\"+cc.y+\")\");\n \n TiledMapTileLayer.Cell casilla=( (TiledMapTileLayer)mapaActual.getLayers().get(\"PAREDES\")).getCell(cc.x,cc.y);\n if(casilla==null)\n return false;\n int idTile=casilla.getTile().getId();\n return idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_1 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_2 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_3;\n }",
"private boolean isRelevant(Address address){\n\n return Math.abs(ride.getStartLatitude() - address.getLatitude()) < 2 &&\n Math.abs(ride.getStartLongitude() - address.getLongitude()) < 2;\n }",
"public boolean mapsToPlace(Place where) {\n\t\treturn false;\r\n\t}",
"public void searchPlace(String value)\n\t\t{ \n\t\t Geocoder geoCoder = new Geocoder(getBaseContext(), Locale.getDefault()); \n\t\t try {\n\t\t List<Address> addresses = geoCoder.getFromLocationName(\n\t\t value, 5);\t\t \n\t\t if (addresses.size() > 0) {\n\t\t \t\n\t\t \tdouble latitude= 0.0, longtitude= 0.0;\n\t\t \tGeoPoint p = new GeoPoint(\n\t\t (int) (addresses.get(0).getLatitude() * 1E6), \n\t\t (int) (addresses.get(0).getLongitude() * 1E6));\n\t\t \tlatitude=p.getLatitudeE6()/1E6;\n\t\t\t\t\t\tlongtitude=p.getLongitudeE6()/1E6;\t \n\t\t\t\t\t\tlat = String.valueOf(latitude);\n\t\t\t\t\t\tlongi = String.valueOf(longtitude);\n\t\t\t\t\t\torigin = new LatLng(latitude,longtitude);\n\t\t \tmap.moveCamera( CameraUpdateFactory.newLatLngZoom(origin, (float) 14.0) ); \n\t\t } \n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\n\n\n\t\t \n\n\t\t}",
"boolean isPlaced();",
"private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }",
"private boolean m29992a(double d) {\n if (this.southwest.longitude <= this.northeast.longitude) {\n return this.southwest.longitude <= d && d <= this.northeast.longitude;\n } else {\n if (this.southwest.longitude > d) {\n if (d > this.northeast.longitude) {\n return false;\n }\n }\n return true;\n }\n }",
"private boolean estSurPlateau(Coordonnees emplacement) {\n return emplacement.getLigne() >= 0 && emplacement.getColonne() >= 0 && emplacement.getLigne() < Plateau.NOMBRE_COLONNE && emplacement.getColonne() < Plateau.NOMBRE_LIGNE;\n }",
"boolean canPlaceCity(VertexLocation vertLoc);",
"public static int placeOnBoard(Troop placed, int cp) {\n\t\tif (cp < placed.getCpCost() || Game.game.getEntityAt(placed.getPosX(), placed.getPosY()) != null)\n\t\t\treturn cp;\n\t\tGame.game.placeEntity(placed);\n\t\tGame.game.getHand().remove(placed);\n\t\treturn cp - placed.getCpCost();\n\t}",
"public boolean isEqual(Move m){\r\n\t\treturn m.getStartSquare()==start_sq&&m.getEndSquare()==end_sq&&(m.getModifier()==modifiers % 10);\r\n\t}",
"@Test\n public void testCheckPlaceValideHorizontale() throws BateauxMembreInvalide, BateauxStartPointInvalide {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(15, 15, j, p);\n\n Place[] pl = j.checkPlace(\"A6\", g, 5, true);\n Place[] att = new Place[]{new Place(\"A6\"), new Place(\"B6\"), new Place(\"C6\"), new Place(\"D6\"), new Place(\"E6\")};\n\n assertArrayEquals(\"Les places ne sont pas bonne\", att, pl);\n }",
"@Test\n public void testCheckPlaceValideVerticale() throws BateauxMembreInvalide, BateauxStartPointInvalide {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(15, 15, j, p);\n\n Place[] pl = j.checkPlace(\"A6\", g, 5, false);\n Place[] att = new Place[]{new Place(\"A6\"), new Place(\"A7\"), new Place(\"A8\"), new Place(\"A9\"), new Place(\"A10\")};\n\n assertArrayEquals(\"Les places ne sont pas bonne\", att, pl);\n }",
"public void search(Creature c, Area area){\r\n LinkedList<Point> ary = new LinkedList<>();\r\n boolean searchSuccessful = false;\r\n for(int yPlus=-1;yPlus<2;yPlus++){\r\n for(int xPlus=-1;xPlus<2;xPlus++){\r\n if(yPlus!=0&&xPlus!=0){\r\n ary.add(new Point(c.x+xPlus, c.y+yPlus));\r\n if(area.map[c.y+yPlus][c.x+xPlus] instanceof HiddenTile && ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).hidden){\r\n ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).find(c);\r\n searchSuccessful = true;\r\n }\r\n }\r\n }\r\n }\r\n Main.animator.searchAnimation(ary, searchSuccessful);\r\n }",
"@Override\n public boolean lowCh(String Place,int x1, int y1, int x2,int y2, Board board)\n {\n switch(Place.toLowerCase())\n { \n //experiment to check to see if there is a piece in the way\n case \"uright\": \n for(; x1<=x2 && y1<=y2; x1++,y1++)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2-1 && y1==y2-1)\n {\n return true;\n }\n }else{\n return false;\n }\n }\n case \"uleft\":\n for(; x1>=x2 && y1<=y2; x1--,y1++)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2+1 && y1==y2-1)\n {\n return true;\n }\n }else{\n return false;\n }\n }\n case \"dright\":\n for(; x1<=x2 && y1>=y2; x1++,y1--)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2-1 && y1==y2+1)\n {\n return true;\n }\n }else{\n return false;\n }\n }\n case \"dleft\":\n for(; x1>=x2 && y1>=y2; x1--,y1--)\n {\n if (board.getSquare(x1,y1).getPiece()==null)\n {\n if (x1==x2+1 && y1==y2+2)\n {\n return true;\n }\n }else{ \n return false;\n }\n } \n default:\n return false;\n }\n }",
"public boolean contains2(DecimalPosition position) { // TODO rename: ???\n return position != null && position.getX() >= start.getX() && position.getY() >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }",
"public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}",
"private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }",
"public boolean isPlaceable() {\n\t\tlong now = Calendar.getInstance().getTimeInMillis();\t\t\n\t\treturn now - createTime >= placeableThreshold && \n\t\t\t\tnow - focusTime >= placeableThreshold;\n\t}",
"public void setPlace(String place){\n this.place = place;\n }",
"public void setQueryplace(Integer queryplace) {\n\t\tthis.queryplace = queryplace;\n\t}",
"public void checkCameraLimits()\n {\n //Daca camera ar vrea sa mearga prea in stanga sau prea in dreapta (Analog si pe verticala) ea e oprita (practic cand se intampla acest lucru Itemul asupra caruia se incearca centrarea nu mai e in centrul camerei )\n\n if(xOffset < 0 )\n xOffset = 0;\n else if( xOffset > refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth())\n xOffset =refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth();\n if(yOffset<0)\n yOffset = 0;\n if(yOffset > refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight())\n {\n yOffset = refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight();\n }\n }",
"Place getPlace();",
"public String Get_place() \n {\n\n return place;\n }",
"private boolean check_vicinity(FishTankItem TankItem) {\r\n if (getDirection()) {\r\n return 0 <= (TankItem.firstCoordinate - this.firstCoordinate)\r\n && (TankItem.firstCoordinate - this.firstCoordinate) <= 7;\r\n } else {\r\n return 0 <= (this.firstCoordinate - TankItem.firstCoordinate)\r\n && (this.firstCoordinate - TankItem.firstCoordinate) <= 5;\r\n }\r\n }",
"public static boolean isAllowedToCollied(Marker marker, Marker m2){\n\t\tif( m2.letter.getX() < marker.letter.getX()){\n\t\t\tif(m2.rightValue != 0 && marker.leftValue !=0 && m2.rightValue + marker.leftValue == 0){\n\t\t\t\tm2.rightValue =0;\n\t\t\t\tmarker.leftValue=0;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t//if collied on right \n\t\telse if( m2.letter.getX() > marker.letter.getX()){\n\t\t\tif(m2.leftValue != 0 && marker.rightValue != 0 && m2.leftValue+ marker.rightValue == 0){\n\t\t\t\tm2.leftValue = 0;\n\t\t\t\tmarker.rightValue = 0; \n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic void IsAtCentre(boolean b, Time time) {\n\t\t\n\t}",
"public boolean canPlace(int r, int c, int n)\n\t{\n\t\tif(board[r][c] != 0) //don't want to replace a spot at the board that isn't 0\n\t\t\treturn false;\n\t\tfor(int row = 0; row < board.length; row++) //checks rows\n\t\t{\n\t\t\tif(board[row][c] == n)\n\t\t\t\treturn false;\n\t\t}\n\t\tfor(int col = 0; col < board.length; col++) //checks columns\n\t\t{\n\t\t\tif(board[r][col] == n)\n\t\t\t\treturn false;\n\t\t}\n\t\t//finds starts of the 3x3 box of n\n\t\tint row = 0;\n\t\tint col = 0;\n\t\tif(r > 2)\n\t\t\trow += 3;\n\t\tif(r > 5)\n\t\t\trow += 3;\n\t\tif(c > 2)\n\t\t\tcol += 3;\n\t\tif(c > 5)\n\t\t\tcol += 3;\n\t\tfor(int i = row; i < row + 3; i++)\n\t\t{\n\t\t\tfor(int j = col; j < col + 3; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j] == n)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean isSet(Coordinates coord, double horizon, long time)throws AstrometryException;",
"public Integer getQueryplace() {\n\t\treturn queryplace;\n\t}",
"private boolean esCoordenadaValida(Coordenada c) {\n assert c != null : \"Error: la coordenada introducida no puede ser null\";\n int fila = c.getFila();\n int columna = c.getColumna();\n\n return (fila>=0 && fila<=casillas.length-1) &&\n (columna>=0 && columna<=casillas[0].length-1);\n }",
"public PlaceMonsterMove getPlace(GameState state, Monster mon) {\n if (Tony == null) assignPlayers(state);\n if (castle1 == null) assignCastles(state);\n /*\n if (mon == Monster.SLAYER) {\n if (state.getMonsters(castle1, notTony).contains(Monster.DRAGON))\n return new PlaceMonsterMove(Tony, castle1, mon);\n else\n return new PlaceMonsterMove(Tony, castle2, mon);\n }\n\n CastleID castleChoice = castle1;\n if (mon.value > avgStr) {\n //try to place at castle2\n castleChoice = findValidPlacement(castle2, castle1, castle3, state);\n } else {\n //try to place at castle1\n castleChoice = findValidPlacement(castle1, castle2, castle3, state);\n }\n */\n\n CastleID castleChoice = findValidPlacement(castle2, castle1, castle3, state);\n System.out.println(Tony + \" is placing \" + mon + \" at \" + castleChoice);\n\n return new PlaceMonsterMove(Tony, castleChoice, mon);\n }",
"private boolean pointOnSegment(Waypoint w1, Waypoint w3, Waypoint w2){\n\t\tdouble w1x = w1.getX();\n\t\tdouble w1y = w1.getY();\n\t\tdouble w2x = w2.getX();\n\t\tdouble w2y = w2.getY();\n\t\tdouble w3x = w3.getX();\n\t\tdouble w3y = w3.getY();\n\t\t\n\t\tif (w3x <= Math.max(w1x, w2x) && w3x >= Math.min(w1x, w2x) && \n\t\t\tw3y <= Math.max(w1y, w2y) && w3y >= Math.min(w1y, w2y))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }",
"public boolean isValidPlaceCommand(String cmd) {\r\n\t\tboolean isValidPlaceCmd = true;\r\n\t\tString[] splitedSpaceArr = cmd.split(\"\\\\s+\");\r\n\r\n\t\tif (splitedSpaceArr.length == 2) {\r\n\t\t\tif (!splitedSpaceArr[0].equalsIgnoreCase(\"PLACE\")) {\r\n\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPlaceCmd) {\r\n\t\t\t\tString[] splitedCommaArr = splitedSpaceArr[1].split(\"\\\\s*,\\\\s*\");\r\n\r\n\t\t\t\tif (splitedCommaArr.length == 3) {\r\n\t\t\t\t\tint row = RobotSimulator.isInteger(splitedCommaArr[0]) ? Integer.parseInt(splitedCommaArr[0]) : -1;\r\n\t\t\t\t\tint col = RobotSimulator.isInteger(splitedCommaArr[1]) ? Integer.parseInt(splitedCommaArr[1]) : -1;\r\n\t\t\t\t\tString faceStr = splitedCommaArr[2];\r\n\r\n\t\t\t\t\t// check is position value out of bounds\r\n\t\t\t\t\tif (row > 4 || row < 0 || col > 4 || col < 0) {\r\n\t\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// check is valid face value\r\n\t\t\t\t\tList validFaceArr = Arrays.asList(\"WEST\", \"NORTH\", \"EAST\", \"SOUTH\");\r\n\t\t\t\t\tif (!validFaceArr.contains(faceStr.toUpperCase())) {\r\n\t\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tisValidPlaceCmd = false;\r\n\t\t}\r\n\t\treturn isValidPlaceCmd;\r\n\t}",
"private boolean isOutOfBounds(int row, int col) {\n if (row < 0 || row >= this.getRows()) {\n return true;\n }\n else if (col < 0 || col >= this.getColumns()) {\n return true;\n }\n else {\n return false; // the placement is valid\n }\n }",
"interface Place {\n\n\t// Return the adjacent Place in the given direction\n\tpublic Place goNorth();\n\tpublic Place goSouth();\n\tpublic Place goEast();\n\tpublic Place goWest();\n\n\t// Returns true only for the special \"Wall\" place\n\tpublic boolean isWall();\n\n\t// Returns true only for the special \"Cheese\" place\n\tpublic boolean isCheese();\n}",
"public void setPlaces(int places) {\r\n this.places = places;\r\n }",
"private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }",
"private static boolean isInBounds(Location location, Vector3i min, Vector3i max) {\n return location.getX() >= min.x && location.getX() < max.x && location.getY() >= min.y\n && location.getY() < max.y && location.getZ() >= min.z && location.getZ() < max.z;\n }",
"boolean canSet(Coordinates coord, double horizon, long time) throws AstrometryException;",
"boolean updatePolicy() {\n double maxUtilityVal = -Double.MAX_VALUE;\n //if(x==19&&y==0)\n // System.out.println(\"minVal: \"+maxUtilityVal);\n for (int i = 0; i < AbsoluteDirection.values().length; i++) {\n double proposedValue = calculateUtility(AbsoluteDirection.values()[i]);\n // if(x==19&&y==0) {\n // System.out.println(\"Proposed value at cell \" + x + \", \" + y + \" is\" + proposedValue);\n\n // }\n if (proposedValue > maxUtilityVal) {\n policyDirection = AbsoluteDirection.values()[i];\n nextUtilityValue = proposedValue; // update curValues to nextValues at the end of iteration\n maxUtilityVal = proposedValue;\n }\n }\n\n return true;\n }",
"public abstract boolean checkCage(int cellValue, int row, int col);",
"@Override\n\t\t\t\tpublic List<KinderGarten> chercherParZone(Double longi, Double lat,Double rayon) {\n\t\t\t\t\tList<KinderGarten> list = new ArrayList<>();\n\t\t\t\t\tList<KinderGarten> list2 =(List<KinderGarten>) kindergartenRepo.findAll();\n\t\t\t\t\tfor(int i=0;i<list2.size();i++)\n\t\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(calculDis(longi,lat,list2.get(i).getLongi(),list2.get(i).getLatitude()));\n\t\t\t\t\t\tif(calculDis(longi,lat,list2.get(i).getLongi(),list2.get(i).getLatitude()) <= rayon)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist.add(list2.get(i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// long/lat/r\n\t\t\t\t\t//coord bd Ariana long:10.182733 lat: 36.900635 // long:10.804493 lat2 :36.460875\n\t\t\t\t\t\n\t\t\t\t\t//test 1 Ariana 10.1852049/36.8989212/1 \n\t\t\t\t\t\n\t\t\t\t\t//test 2 A GHANA 10.181863/36.806459/1 // long2:10.182039 lat2: 36.806021 \n\t\t\t\t\t//\n\t\t\t\t\treturn list;\n\t\t\t\t}",
"private boolean ptoStaDentroCuadra(float posx, float posy, int x, int y, int ancho,\n\t\t\tint alto) {\n\t\treturn (x < posx && posx < x + ancho && y < posy && posy < y + alto);\n\t}",
"public abstract boolean isRetained(Coordinate c);",
"@Test\n public void testFind_West_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = -170.0;\n double lat2 = 0.0;\n double lon2 = 170.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }",
"boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n else {\n ret = false;\n // System.out.println(\" no match cell: x: \"+x+\" y: \"+y);\n }\n curUtilityValue = nextUtilityValue;\n return ret;\n\n }",
"private boolean isInRange(int c) {\n switch (border) {\n case between:\n return min <= c && c <= max;\n case min:\n return min <= c;\n case max:\n return c <= max;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + border);\n }\n }",
"public int compare2(Way in) {\n if (in.isEnterd() && isEnterd() && in.distance > distance) {\n return -1;\n } else if (in.isEnterd() && isEnterd() && in.distance < distance) {\n return 1;\n }\n return 0;\n }",
"@Test\n public void testCheckPlaceVerticaleTeteDehors() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n try {\n j.checkPlace(\"A50\", g, 5, false);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxStartPointInvalide);\n }\n }",
"public boolean isCoordOnStreet(Coordinate coord) {\n double dxc = coord.getX() - begin.getX();\n double dyc = coord.getY() - begin.getY();\n\n double dxl = end.getX() - begin.getX();\n double dyl = end.getY() - begin.getY();\n\n if (Math.abs(dxc * dyl - dyc * dxl) > 1) {\n\n return false;\n\n } else {\n\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0 ? begin.getX() <= coord.getX() && coord.getX() <= end.getX()\n : end.getX() <= coord.getX() && coord.getX() <= begin.getX();\n } else {\n return dyl > 0 ? begin.getY() <= coord.getY() && coord.getY() <= end.getY()\n : end.getY() <= coord.getY() && coord.getY() <= begin.getY();\n }\n }\n }",
"private void updateRange(CDS _cds)\n\t{\n\t\t// the boundary is out of the protein's CDS\n\t\tif((this.m_end < _cds.m_start) || (this.m_start > _cds.m_end))\n\t\t{\n\t\t\tthis.m_start = -1;\n\t\t\tthis.m_end = -1;\n\t\t\tthis.m_length = -1;\n\t\t\tthis.startPhase = ExonPhase.OUT_OF_CDS;\n\t\t\tthis.endPhase = ExonPhase.OUT_OF_CDS;\n\t\t}\n\t\telse\n\t\t{ \n\t\t\tthis.startPhase = determinePhase((this.m_start - _cds.m_start));\n\t\t\tthis.endPhase = determinePhase((this.m_end - _cds.m_start));\n\t\t\t\n\t\t\t// the start of the boundary is out of the protein's CDS.\n\t\t\tif(this.m_start < _cds.m_start)\n\t\t\t{\n\t\t\t\tthis.m_start = _cds.m_start;\n\t\t\t\tthis.startPhase = ExonPhase.OUT_OF_CDS;\n\t\t\t}\n\t\t\t// the end of the boundary is out of the protein's CDS.\n\t\t\tif(this.m_end > _cds.m_end)\n\t\t\t{\n\t\t\t\tthis.m_end = _cds.m_end;\n\t\t\t\tthis.endPhase = ExonPhase.OUT_OF_CDS;\n\t\t\t}\n\t\t\t\n\t\t\t// the boundaries are in the rang of the protein's CDS\n\t\t\tthis.m_start = (int) (Math.floor(((this.m_start - _cds.m_start) / 3)) + 1);\n\t\t\tthis.m_end = (int) (Math.floor(((this.m_end - _cds.m_start) / 3)) + 1);\n\t\t\tthis.m_length = this.m_end - this.m_start;\n\t\t}\t\n\t}",
"@Override\r\n\tpublic int compareTo(TouringPlace another) {\n\t\treturn 0;\r\n\t}",
"private double checkBounds(double param, int i) {\n if (param < low[i]) {\n return low[i];\n } else if (param > high[i]) {\n return high[i];\n } else {\n return param;\n }\n }",
"public void setPlace(int num) {\n\t\tplace = num;\n\t}",
"static boolean ifSafe(int[] placement, int row) {\n\t\tfor(int j = 0; j < row; j++) {\n\t\t\tif(placement[j] == placement[row]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tint columnDiff = placement[row] - placement[j];\n\t\t\tint rowDiff = row - j;\n\t\t\tif(columnDiff == rowDiff) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\t\n\t}",
"private boolean columnIsFree(int column){\n return this.tiles[0][column - 1] == 'O';\n }",
"public void putCellInGoodPlace(JmtCell cell, int x, int y, boolean flag) {\n \t\tif (sp > 9) {\r\n \t\t\tsp = 0;\r\n \t\t}\r\n \t\tint oldPointX = 0;\r\n \t\tint oldPointY = 0;\r\n \t\tboolean inGroup = false;\r\n \t\t// Il flag stato creato per capire sapere se e' una block regione e\r\n \t\t// quindi utilizzare\r\n \t\t// il vecchio metodo oppure se e' una cella quindi flag=true allora uso\r\n \t\t// il nuovo\r\n \t\t// System.out.println(\"------------PUT CELL IN GOOD PLACE\r\n \t\t// ----------------------\");\r\n \r\n \t\tif (flag) {\r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tRectangle bounds2 = new Rectangle((int) bounds.getX() - 20, (int) bounds.getY(), (int) bounds.getWidth() + 38, (int) bounds.getHeight());\r\n \r\n \t\t\toldPointX = x;\r\n \t\t\toldPointY = y;\r\n \t\t\t// ---------inzio\r\n \t\t\t// Object[] cells=(graph).getDescendants(graph.getRoots());\r\n \t\t\t// for(int j=0;j<cells.length;j++){\r\n \t\t\t// if((cells[j] instanceof JmtCell) &&(cells[j]!=cell)){\r\n \t\t\t// Rectangle\r\n \t\t\t// boundcell=GraphConstants.getBounds(((JmtCell)cells[j]).getAttributes()).getBounds();\r\n \t\t\t// if(boundcell.intersects(bounds2)){\r\n \t\t\t// System.out.println(\"true\");\r\n \t\t\t// }\r\n \t\t\t// }\r\n \t\t\t// }\r\n \r\n \t\t\t// ---------------fine\r\n \t\t\t// check if a cell isInGroup\r\n \t\t\tif (isInGroup(cell)) {\r\n \r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \r\n \t\t\t// Qua ho le celle e archi che intersecano la mia cella\r\n \t\t\t// selezionata..bounds (molto efficente dal punto di vista della\r\n \t\t\t// pesantezza)\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds2));\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\tresetOverLapping = 0;\r\n \t\t\twhile (overlapping.length > 0) {\r\n \r\n \t\t\t\t// Moves bounds until it doesn't overlap with anything\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (int j = 0; j < overlapping.length; j++) {\r\n \r\n \t\t\t\t\tresetOverLapping++;\r\n \t\t\t\t\t// resetOverLapping is inserted for an anormall behavior of\r\n \t\t\t\t\t// Tool\r\n \t\t\t\t\t// in fact, if you disable this variable you can see that\r\n \t\t\t\t\t// the tools\r\n \t\t\t\t\t// stop and \"for cycle\" will be repeated infinite times\r\n \t\t\t\t\tif (resetOverLapping > 50) {\r\n \t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// System.out.println(\"---flag in for---\");\r\n \t\t\t\t\t// if(overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t// &&((JmtEdge)overlapping[j]).intersects((EdgeView)(graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t// false),\r\n \t\t\t\t\t// GraphConstants.getBounds(((JmtCell)cell).getAttributes())))\r\n \t\t\t\t\t// System.out.println(\"Intersect TRUE\");\r\n \r\n \t\t\t\t\t// Puts last to last corner of overlapping cells\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtCell && overlapping[j] != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \r\n \t\t\t\t\tif (!inGroup && overlapping[j] instanceof JmtCell && overlapping[j] != cell) {\r\n \r\n \t\t\t\t\t\tRectangle2D b = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\t// Consider only rectangles that intersects with given\r\n \t\t\t\t\t\t// bound\r\n \t\t\t\t\t\tif (b.intersects(bounds2)) {\r\n \t\t\t\t\t\t\tlast.setLocation(new Point(oldPointX, oldPointY));\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// inizio a controllare se l intersezione e' un lato\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t\t\t&& overlapping[j] != cell\r\n \t\t\t\t\t\t\t&& !isInGroup(overlapping[j])\r\n \t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\tGraphConstants.getBounds(cell.getAttributes())) && ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\tboolean access = false;\r\n \t\t\t\t\t\tboolean access2 = false;\r\n \r\n \t\t\t\t\t\t// Nonostatne SourceCell e SinkCell estendano JMTCell\r\n \t\t\t\t\t\t// avevo problemi di nullPointerException per questo\r\n \t\t\t\t\t\t// verifico di che\r\n \t\t\t\t\t\t// tipo sono\r\n \r\n \t\t\t\t\t\tif (cell instanceof SourceCell\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SourceCell) cell).getAttributes()))) {\r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\t\t\t// _______INIZIO_____\r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SourceCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\tsp = sp + 2;\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\taccess = true;\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (cell instanceof SinkCell) {\r\n \r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)) {\r\n \r\n \t\t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SinkCell) cell).getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SinkCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\taccess2 = true;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!isInGroup(overlapping[j]) && !access && !access2 && overlapping[j] instanceof JmtEdge) {\r\n \t\t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t\t\t\t\t\t\tfalse), GraphConstants.getBounds(cell.getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\taccess = access2 = false;\r\n \r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tif ((intersectionPoints == null) || intersectionPoints.size() <= 0) {\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\t\t\t\treturn;\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(cell.getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\t;\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} // end if of edge\r\n \t\t\t\t}\r\n \r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \r\n \t\t\t// Puts this cell in found position\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t} else {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tif (isInGroup(cell)) {\r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \r\n \t\t\tif (overlapping == null) {\r\n \r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\twhile (overlapping.length > 0) {\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (Object element : overlapping) {\r\n \t\t\t\t\tif (element instanceof JmtCell && element != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (!inGroup && element instanceof JmtCell && element != cell) {\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \t\t\t\t\tif (isInGroup(element) && element instanceof JmtEdge) {\r\n \t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(element, false), GraphConstants\r\n \t\t\t\t\t\t\t\t\t\t.getBounds(cell.getAttributes()))) {\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtEdge) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\t// ___\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t}\r\n \r\n \t}",
"boolean canPlaceRobber(HexLocation hexLoc);",
"boolean judgeValid()\r\n\t{\r\n\t\tif(loc.i>=0 && loc.i<80 && loc.j>=0 && loc.j<80 && des.i>=0 && des.i<80 && des.j>=0 && des.j<80)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}",
"private static boolean dangerZone(int closestGuess)\n {\n return (closestGuess < guessRange);\n }",
"public static boolean isNearChunk(org.bukkit.entity.Entity entity, final int cx, final int cz, final int chunkview) {\n\t\tfinal int x = MathUtil.toChunk(getLocX(entity)) - cx;\n\t\tfinal int z = MathUtil.toChunk(getLocZ(entity)) - cz;\n\t\treturn Math.abs(x) <= chunkview && Math.abs(z) <= chunkview;\n\t}",
"public boolean inValidSpot(Path p1){\n\t\t// Checks to see it the path piece placed expects an entrance or exit piece out of bounds\n\t\t\n\t\tint largestRow = (height*width-1)/width;\n\t\t\n\t\t// if entrance or exit pos expected is negative, know it is expecting a path outside the top bound\n\t\tif(p1.getEntry()<0 || p1.getExit()<0){\n\t\t\treturn false;\n\t\t}\n\t\t// if entrance or exit's row greater than the maximum row, know it is expecting a path outside bottom bound\n\t\tif(p1.getEntryRow()>largestRow || p1.getExitRow()>largestRow){\n\t\t\treturn false;\n\t\t}\n\t\tint currentRow = p1.getRow();\n\t\tint nextRow=0;\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==1){\n\t\t\t// If the absolute value of the difference between the current position and its entrance is 1 ...\n\t\t\t// Checking to see if the entrance is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the entrance expected is not to the left or to the right\n\t\t\t\t// In other words, the entrance is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==1){\n\t\t\t// If the absolute value of the difference between the current position and its exit is 1 ...\n\t\t\t// Checking to see if the exit is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the exit expected is not to the left or to the right\n\t\t\t\t// In other words, the exit is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==width){\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\t//Less than zero would make it on top of the top edge\n\t\t\t\t//First term calculated in this manner because any negative entrance between -1 and \n\t\t\t\t// -width+1 will have an integer rounded to zero. The double casting will give an \n\t\t\t\t// accurate number without losing the sign\n\t\t\t\t\n\t\t\t\t//Greater than height*width-1 would make in lower than the bottom edge\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==width){\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn true;\n\t\t\n\t}",
"private Boolean pointOnGrid(int d,int r, int c, Maze3D myMaze) {\n return (d >= 0 && r >= 0 && c >= 0) && (d<myMaze.depths && c < myMaze.columns && r < myMaze.rows);\n }",
"public boolean canPlace(Card o, String c)\r\n {\r\n if (this.color == c)\r\n return true;\r\n else if (this.value == o.value)\r\n return true;\r\n else if (this.color == \"none\") // Wild cards\r\n return true;\r\n return false;\r\n }",
"abstract boolean estValideDirection(Coup c);",
"boolean test() {\n int comp = this._col1.value().compareTo(this._col2.value());\n if (comp < 0 && (this.compRep & LT) != 0\n || comp > 0 && (this.compRep & GT) != 0\n || comp == 0 && (this.compRep & EQ) != 0) {\n return true;\n }\n return false;\n }",
"public boolean isValuePlaced(int value)\n {\n return (getPositionForValue(value)!=null);\n }",
"private boolean checkRowCol(int c1, int c2, int c3) \r\n {\r\n return ((c1 != -1) && (c1 == c2) && (c2 == c3)); //eida ekhon porjonto kaaj e lage nai\r\n }",
"@Override\r\n\t\tpublic int compareTo(OutOfPlaceMetric o) {\r\n\t\t\treturn Integer.compare(this.getAbsoluteDistance(), o.getAbsoluteDistance());\r\n\t\t}",
"public boolean estSurLaCase(ICase c) ;",
"public static boolean isValidPlace(int[] setPos){\n if(setPos[0]<=4 && setPos[0]>=0)\n return (setPos[1]<=4 && setPos[1]>=0);\n return false;\n }",
"@Override\n protected void doAlgorithmA1() {\n int xP = 0;\n int yP = 0;\n\n\n //Taking the variable out of the list that are in the bounds\n //Testing that the bound has variables\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n xP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX().getPosition();\n }\n int xU = 0;\n int xL = 0;\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n yP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY().getPosition();\n }\n int yU = 0;\n int yL = 0;\n int cright = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCright();\n int cleft = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCleft();\n\n\n\n for (Variable variable : csp.getVars()) {\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n if (variable.getPosition() == xP) {\n xU = variable.getUpperDomainBound();\n xL = variable.getLowerDomainBound();\n }\n }\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n if (variable.getPosition() == yP) {\n yU = variable.getUpperDomainBound();\n yL = variable.getLowerDomainBound();\n }\n }\n }\n\n boolean first = false;\n boolean second = false;\n\n //Testing if the bound is true, false or inconclusive\n\n if (xL + cleft >= yU + cright) {\n first = true;\n }\n if (xU + cleft < yL + cright) {\n second = true;\n }\n\n //are first and second not equal is the bound not inconclusive\n if (first != second) {\n if (first) { //a true Simple Bound was found\n //checks if it was the last constraint in a csp\n //If so the csp is true\n //else check the next constraint and do this method again\n if (csp.getSimpleConstraints().size() - 1 == cIndex) {\n System.out.println(\"P is satisfiable\");\n System.out.println(System.nanoTime()-startTime);\n return;\n } else {\n bIndex = 0;\n cIndex++;\n unit=false;\n doAlgorithmA1();\n }\n } else if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) { //a false Simple Bound was found\n //\n bIndex = 0;\n cIndex = 0;\n if (isInconclusive) {\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n doAlgorithmA2();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n } else {//an inconclusive Simple Bound was found\n //checks if the bound wasn't already inconclusive\n if(!isInconclusive){\n unit=true;\n unitSB = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex);\n }else {\n unit=false;\n }\n isInconclusive = true;\n\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) {\n cIndex = 0;\n bIndex = 0;\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n }\n }",
"public int compareTo(Coordinate c) {\n if (this.equals(c)) return 0;\n\t\tif (row< c.getRow()) return -1;\n\t\telse \n\t\t\tif (row == c.getRow()){\n if (this.column>c.getColumn()) return 1;\n else return -1; \n } \n\t\t\telse return 1;\n\t}",
"private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}",
"boolean isValidMove(int col);",
"public boolean bordoOpposto(Casella c, int col)\n {\n switch (col)\n {\n case NERO: return ( c.riga==(DIM_LATO-1) );\n case BIANCO: return ( c.riga==0 );\n }\n return false;\n }",
"int contains(int pgNum, int clock, char act)\r\n {\r\n for(int i = 0; i <size; i++)\r\n if(pm[i][0]==pgNum)\r\n {\r\n pm[i][1] = clock;\r\n pm[i][2] = act=='W' ? 1 : 0;\r\n return i;\r\n }\r\n\r\n return -1;\r\n }",
"private boolean isQueen(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.BLACK_QUEEN || aux == Cells.RED_QUEEN);\r\n }",
"public void getNearbyPlaces(double Lat, double Long)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n final DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n final GeoFire geoFire= new GeoFire(placeRef);\n\n double R=0.05;\n placesQuery = geoFire.queryAtLocation(new GeoLocation(Lat,Long),R);\n placesQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n double R=1.0;\n int count=0;\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n try {\n Toast.makeText(getContext(), key+\"added\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n count++;\n }\n\n @Override\n public void onKeyExited(String key) {\n\n try {\n Toast.makeText(getContext(), key+\"removed\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n\n count--;\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n placesQuery.removeAllListeners();\n\n /* if (count < 2 && R < 25) {\n R += 1;\n placesQuery.setRadius(R);\n try {\n Toast.makeText(getContext(),Double.toString(R),Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n } else if (count > 20) {\n\n R-=1;\n placesQuery.setRadius(R);\n\n }\n */\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n\n }",
"public void checkwarp(){\n\t\tif(pacman.ypos > (colours[0].length*interval)-2){\r\n\t\t\tpacman.ypos = interval+2;\r\n\t\t}\r\n\t\telse if(pacman.xpos > (colours.length*interval)-2){\r\n\t\t\tpacman.xpos = interval+2;\r\n\t\t}\r\n\t\telse if(pacman.ypos < interval+2){\r\n\t\t\tpacman.ypos = (colours[0].length*interval)-2;\r\n\t\t}\r\n\t\telse if(pacman.xpos < interval+2){\r\n\t\t\tpacman.xpos = (colours.length*interval)-2;\r\n\t\t}\r\n\t\t\r\n\t}",
"private boolean isValuePlacementValid(int row, int column, int value) {\n\t\tfor(int i=0;i<9;i++) {\n\t\t\tif(value == sudokuMatrix[row][i])\n\t\t\t\treturn false;\n\t\t}\n\t\tfor(int i=0;i<9;i++) {\n\t\t\tif(value == sudokuMatrix[i][column])\n\t\t\t\treturn false;\n\t\t}\n\t\tint cornerX = 0;\n\t\tint cornerY = 0;\n\t\tif(row > 2)\n\t\t\tif(row > 5)\n\t\t\t\tcornerX = 6;\n\t\t\telse\n\t\t\t\tcornerX = 3;\n\t\tif(column > 2)\n\t\t\tif(column > 5)\n\t\t\t\tcornerY = 6;\n\t\t\telse\n\t\t\t\tcornerY = 3;\n\t\tfor(int i=cornerX;i<10 && i<cornerX+3;i++) //check if the value is not present in the same grid already\n\t\t\tfor(int j=cornerY;j<10 && j<cornerY+3;j++)\n\t\t\t\tif(value == sudokuMatrix[i][j])\n\t\t\t\t\treturn false;\n\t\treturn true;\n\t}",
"private static boolean isOnSegment(Coord p, Coord q, Coord r) \n {\n if(r.x <= Math.max(p.x, q.x) && r.x >= Math.min(p.x, q.x) && \n r.y <= Math.max(p.y, q.y) && r.y >= Math.min(p.y, q.y)) \n return true; \n return false; \n }",
"public CellPosition isInside(Vector2i coord){\n\t\tCellPosition pos;\n\t\tpos = display.gridDisplay.isInside(coord);\n\t\tif(pos.isFound)\n\t\t\treturn pos;\n\t\t\n\t\tpos = canva.isInside(coord);\n\t\treturn pos;\n\t}",
"private boolean checkifCollinear(Point[] ptArr, Comparator<Point> cmp, int start){\n\t\tif(start +2 >= ptArr.length) return false;\t\n\t\tif(cmp.compare(ptArr[start],ptArr[start+1]) == cmp.compare(ptArr[start+1],ptArr[start+2]) && cmp.compare(ptArr[start],ptArr[start+1]) == 0){\n\t\t\treturn true;\n\t\t}\t\t\n\t\treturn false;\t\n\t}",
"public boolean canMoveTo (Coordinate c)\n\t{\n\t\tif (c.x < 0 || c.x >= GRID_SIZE){\n\t\t\treturn false;\n\t\t}\n\t\tif (c.y < 0 || c.y >= GRID_SIZE) {\n\t\t\treturn false;\n\t\t}\n\t\tif (grid[c.x][c.y] == GridChar.AVAILABLE || grid[c.x][c.y] == GridChar.END){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected boolean getSomething(int par1, int par2, int par3, int par4, int x, int y)\r\n {\r\n int var7 = this.guiLeft;\r\n int var8 = this.guiTop;\r\n x -= var7;\r\n y -= var8;\r\n return x >= par1 - 1 && x < par1 + par3 + 1 && y >= par2 - 1 && y < par2 + par4 + 1;\r\n }",
"public int getPlace() {\n\t\treturn place;\n\t}",
"Place resolveLocation( Place place );",
"private boolean isValid( int r, int c )\n {\n return r >= 0 && r < rows && c >= 0 && c < cols ; \n }",
"private boolean placeFlag(Location m) {\r\n\r\n // if the game is finished then nothing to do\r\n if (gameState > STARTED) {\r\n return false;\r\n } \r\n \r\n // if the location is already revealed then nothing more to do\r\n if (query(m) != GameStateModel.HIDDEN && query(m) != GameStateModel.FLAG) {\r\n return false;\r\n }\r\n \r\n // otherwise toggle the flag\r\n flag[m.x][m.y] = !flag[m.x][m.y];\r\n \r\n if (flag[m.x][m.y]) {\r\n \r\n //if (board[m.x][m.y] != GameState.MINE) {\r\n // System.out.println(\"DEBUG (\" + m.x + \",\" + m.y + \") is not a mine!\");\r\n //}\r\n flagsPlaced++;\r\n } else {\r\n flagsPlaced--;\r\n }\r\n\r\n // call this handle to allow extra logic to be added by the extending class\r\n placeFlagHandle(m);\r\n \r\n return true;\r\n \r\n }",
"private int getCrs(TrackPoint p) {\r\n\t\tint crsindex = 0;\r\n\t\tif (coordinateReferenceSystem.length > 1) {\r\n\t\t\tint ls = TransformCoordinates.getLocalProjectionSystem(coordinateReferenceSystem[0]);\r\n\t\t\tProjectedPoint gkbl = TransformCoordinates.wgs84ToLocalsystem(p, ls); // TODO: think / read about what to do if bottom left and top right are not in the same Gau?-Kr?ger stripe?\r\n\t\t\tint wantepsg = gkbl.getEpsgCode();\r\n\t\t\tfor (crsindex = 0; crsindex < coordinateReferenceSystem.length; crsindex++) {\r\n\t\t\t\tif (coordinateReferenceSystem[crsindex] == wantepsg)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (crsindex >= coordinateReferenceSystem.length) { // not match\r\n\t\t\t\tfor (crsindex = 0; crsindex < coordinateReferenceSystem.length; crsindex++) {\r\n\t\t\t\t\tif (Math.abs(coordinateReferenceSystem[crsindex] - wantepsg) == 1)\r\n\t\t\t\t\t\tbreak; // accept 1 zone deviation\r\n\t\t\t\t}\r\n\t\t\t\tif (crsindex >= coordinateReferenceSystem.length)\r\n\t\t\t\t\tcrsindex = -1;\r\n\r\n\t\t\t}\r\n\t\t\tif (crsindex < 0)\r\n\t\t\t\tthrow new IllegalArgumentException(MyLocale.getMsg(4829, \"getUrlForBoundingBox: Point:\") + \" \" + gkbl.toString() + MyLocale.getMsg(4830, \"no matching Gau?-Kr?ger-Stripe in the EPSG-code list in the .wms\"));\r\n\t\t}\r\n\t\treturn crsindex;\r\n\t}",
"@Test\r\n\tpublic void ST_ClosestCoordinate() {\n\r\n\t}"
] | [
"0.5550429",
"0.5543913",
"0.55199015",
"0.5460684",
"0.5385466",
"0.53719264",
"0.53568625",
"0.53329396",
"0.5316086",
"0.5303552",
"0.5242828",
"0.5172906",
"0.51728696",
"0.51628566",
"0.51622415",
"0.5146736",
"0.5117458",
"0.51066905",
"0.510082",
"0.50738",
"0.5059875",
"0.5058104",
"0.5028734",
"0.5007328",
"0.49857938",
"0.49702102",
"0.49592924",
"0.49588123",
"0.4952364",
"0.49478605",
"0.49393183",
"0.48997086",
"0.4895235",
"0.4894001",
"0.48700404",
"0.4860074",
"0.4849998",
"0.4844226",
"0.48420218",
"0.48371968",
"0.48205626",
"0.4817858",
"0.48147506",
"0.48094577",
"0.47897863",
"0.4780044",
"0.47750548",
"0.4771906",
"0.47707948",
"0.4759532",
"0.47546002",
"0.4750985",
"0.47487026",
"0.4727513",
"0.47165105",
"0.4714639",
"0.47128433",
"0.47083807",
"0.4704653",
"0.47031796",
"0.46990728",
"0.469509",
"0.46944833",
"0.46915957",
"0.46818507",
"0.46817473",
"0.46763688",
"0.4674969",
"0.46728623",
"0.46720198",
"0.4669056",
"0.46654117",
"0.46644318",
"0.46614286",
"0.4658945",
"0.46580952",
"0.4653709",
"0.46535435",
"0.46521428",
"0.46484712",
"0.46455312",
"0.46417886",
"0.46405914",
"0.46393028",
"0.46371174",
"0.4633023",
"0.46327963",
"0.46327874",
"0.46309078",
"0.46304625",
"0.46198946",
"0.4618715",
"0.46168727",
"0.46167842",
"0.4613253",
"0.4610493",
"0.460747",
"0.46025822",
"0.4600541",
"0.45987365"
] | 0.47758678 | 46 |
and csmi_person is null | public M csmiPersonNull(){if(this.get("csmiPersonNot")==null)this.put("csmiPersonNot", "");this.put("csmiPerson", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"boolean getOrderPersonIdNull();",
"boolean getPersonCharacteristicIdsNull();",
"boolean getSearchPersonTypeIdNull();",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public boolean getPersonCharacteristicIdsNull() {\n return personCharacteristicIdsNull_;\n }",
"@Override\n\tpublic CrPsnDetailVo queryPersonDetail(String psnid) throws BusinessException {\n\t\treturn null;\n\t}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"boolean getPersonOutputCharacteristicsNull();",
"public boolean getPersonCharacteristicIdsNull() {\n return personCharacteristicIdsNull_;\n }",
"public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}",
"boolean getValueCharacteristicIdNull();",
"boolean CheckIfRealPerson(Customer customer);",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"@Test\r\n public void lookProfileByNull() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // A not connected user looked at member profile\r\n member.lookedBy(null);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }",
"public boolean isEmpty(Person person) {\n\t\tif(person.getName().equals(\"\")){\n\t\t\treturn true;\n\t\t}\n\t\tif(person.getSirName().equals(\"\")){\n\t\t\treturn true;\n\t\t}\n\t\tif(person.getCnp().equals(\"\")){\n\t\t\treturn true;\n\t\t}\n\t\tif(person.getCategory().equals(\"\")){\n\t\t\treturn true;\n\t\t}\n\t\tif(person.getPhoneNumber().equals(\"\")){\n\t\t\treturn true;\n\t\t}\n\t\tif(person.getEmail().equals(\"\")){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"boolean getActiveNull();",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"boolean getXAxisCharacteristicIdNull();",
"public boolean hasPerson() {\n return dataBodyCase_ == 2;\n }",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"public boolean hasPerson() {\n return dataBodyCase_ == 2;\n }",
"public M csmiBirthdayNull(){if(this.get(\"csmiBirthdayNot\")==null)this.put(\"csmiBirthdayNot\", \"\");this.put(\"csmiBirthday\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"boolean getNodeCharacteristicIdNull();",
"@Override\n\tpublic boolean isRealPerson(Customer customer) {\n\t\treturn true;\n\t}",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"boolean getSearchNodeCharacteristicIdsNull();",
"boolean isNullOmittable();",
"public boolean getSearchPersonTypeIdNull() {\n return searchPersonTypeIdNull_;\n }",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public boolean getSearchPersonTypeIdNull() {\n return searchPersonTypeIdNull_;\n }",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"boolean containsCreature(Creature creature) {\n/* 1585 */ return (this.creatures != null && this.creatures.contains(creature));\n/* */ }",
"public Builder setPersonCharacteristicIdsNull(boolean value) {\n \n personCharacteristicIdsNull_ = value;\n onChanged();\n return this;\n }",
"boolean getCampaignIdNull();",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public boolean hasPersonCharacteristicIds() {\n return personCharacteristicIds_ != null;\n }",
"public boolean hasPersonCharacteristicIds() {\n return personCharacteristicIdsBuilder_ != null || personCharacteristicIds_ != null;\n }",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public boolean getOrderPersonIdNull() {\n return orderPersonIdNull_;\n }",
"boolean hasPerson();",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public boolean getOrderPersonIdNull() {\n return orderPersonIdNull_;\n }",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"public boolean isNull(){\n return false;\n }",
"boolean getSearchValueNull();",
"boolean getCampaignNameNull();",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"public boolean anyNull () ;",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}",
"boolean isNilID();",
"public Builder clearPersonCharacteristicIdsNull() {\n \n personCharacteristicIdsNull_ = false;\n onChanged();\n return this;\n }",
"boolean getUnitIdNull();",
"public M csseSubjectNull(){if(this.get(\"csseSubjectNot\")==null)this.put(\"csseSubjectNot\", \"\");this.put(\"csseSubject\", null);return this;}",
"public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}",
"boolean hasOrderPersonId();",
"boolean hasPersonCharacteristicIds();",
"public boolean isEmpty() {\n\t\treturn person.isEmpty();\n\t}",
"boolean isNull();",
"public boolean getPersonOutputCharacteristicsNull() {\n return personOutputCharacteristicsNull_;\n }",
"public Criteria andCreatePersonNotEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"create_person <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csrtSubjectNull(){if(this.get(\"csrtSubjectNot\")==null)this.put(\"csrtSubjectNot\", \"\");this.put(\"csrtSubject\", null);return this;}",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"public boolean isNull()\n\t{\n\t\treturn cp.isNull();\n\t}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"boolean hasBusinessCircleId();",
"public boolean hasOrderPersonId() {\n return orderPersonId_ != null;\n }",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"boolean getYAxisCharacteristicIdNull();",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"boolean isIsNotNull();",
"public boolean getPersonOutputCharacteristicsNull() {\n return personOutputCharacteristicsNull_;\n }",
"@XmlTransient\n\tpublic boolean isCandidateContactsEmpty() {\n\t\treturn (candidateContacts.isEmpty());\n\t}",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"boolean isSetSOID();",
"public boolean isIdPermisosNull()\r\n\t{\r\n\t\treturn idPermisosNull;\r\n\t}",
"public void verifyNotNull(PersonDto person) {\n if (person.getFirstname() == null || person.getFirstname().isEmpty()\n || person.getLastname() == null || person.getLastname().isEmpty()) {\n throw new VerificationException(\"No first and lastname given\");\n }\n }",
"public boolean inGroup(Person p){\n\t return false;\n }",
"List<Book> findByStudentIsNull();",
"@Test\r\n public void lookProfileByOwner() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // Our member looked at his own profile\r\n member.lookedBy(member);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }",
"public boolean hasC() {\n return c_ != null;\n }",
"public boolean uniqueCheck(Person person){\r\n\t\treturn (housePosition!=person.housePosition) && (color!=person.color) && (nationality!=person.nationality) \r\n\t\t\t\t && (beverage!=person.beverage) && (cigar!=person.cigar) && (pet!=person.pet);\r\n\t}",
"@Override\n\tpublic String checkAccount(int idc) {\n\t\treturn null;\n\t}",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"@Override\n\t\tpublic boolean CheckIfRealPerson(Customer customer) {\n\t\t\tRandom r=new Random();\n\t\t\tint sayi=r.nextInt(3);\n\t\t\tif(sayi==1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}",
"public boolean getValueCharacteristicIdNull() {\n return valueCharacteristicIdNull_;\n }",
"public Builder setPersonOutputCharacteristicsNull(boolean value) {\n \n personOutputCharacteristicsNull_ = value;\n onChanged();\n return this;\n }",
"boolean isNilIsManaged();",
"@Test\n\tpublic void testFindCustomerByGuidWithNullReturn() {\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Collections.emptyList()));\n\t\t\t}\n\t\t});\n\t\tassertNull(this.importGuidHelper.findCustomerByGuid(NON_EXIST_GUID));\n\t}",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}"
] | [
"0.72321504",
"0.6384318",
"0.6351286",
"0.60660684",
"0.5986338",
"0.588432",
"0.5810015",
"0.5798614",
"0.5794907",
"0.5768049",
"0.5753497",
"0.5709785",
"0.5691556",
"0.5658759",
"0.56513524",
"0.56272763",
"0.5624841",
"0.56142414",
"0.5613868",
"0.5591286",
"0.5579476",
"0.55684483",
"0.55572796",
"0.5544462",
"0.5498428",
"0.5461211",
"0.54518044",
"0.54508626",
"0.5445752",
"0.5423955",
"0.54100955",
"0.539757",
"0.5375258",
"0.5374784",
"0.5368911",
"0.5344327",
"0.5337433",
"0.5312638",
"0.52956307",
"0.5290918",
"0.5284757",
"0.52837855",
"0.5273091",
"0.5269853",
"0.52523553",
"0.5232122",
"0.52263486",
"0.5175937",
"0.51715106",
"0.5157167",
"0.51508135",
"0.51243025",
"0.51175773",
"0.5105731",
"0.510223",
"0.5093745",
"0.50916517",
"0.5091136",
"0.50882447",
"0.50748503",
"0.5070025",
"0.5056056",
"0.5051454",
"0.5050307",
"0.5037432",
"0.5023055",
"0.50098246",
"0.49929973",
"0.49924994",
"0.49698237",
"0.4968909",
"0.49669936",
"0.49664155",
"0.49660873",
"0.49596342",
"0.49567774",
"0.49418852",
"0.49326167",
"0.4929964",
"0.49246913",
"0.491632",
"0.491159",
"0.49071917",
"0.4902675",
"0.48941675",
"0.48762408",
"0.48685864",
"0.48636812",
"0.4861891",
"0.4858371",
"0.4855701",
"0.48471206",
"0.48370734",
"0.48334453",
"0.48324475",
"0.4830136",
"0.48280755",
"0.48219883",
"0.48106042",
"0.48075888"
] | 0.72177416 | 1 |
and csmi_contact is null | public M csmiContactNull(){if(this.get("csmiContactNot")==null)this.put("csmiContactNot", "");this.put("csmiContact", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isContactValid(Contact contact) {\n return contact != null && contact.getmContactID() != null;\n }",
"public boolean isSetContact() {\n return this.contact != null;\n }",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"boolean hasContact();",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public boolean hasContact() {\n return typeCase_ == 1;\n }",
"public boolean containsContact(Contact c);",
"public boolean isSetContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(CONTACT$6) != 0;\n }\n }",
"public boolean hasContact() {\n return typeCase_ == 1;\n }",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"@Override\r\n\tpublic List<Contacto> getContactosInatec() {\r\n\t\treturn null;\r\n\t}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"@XmlTransient\n\tpublic boolean isCandidateContactsEmpty() {\n\t\treturn (candidateContacts.isEmpty());\n\t}",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"boolean getCampaignIdNull();",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public boolean removeContact(Contact c);",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"public boolean hasNeverContacted() {\r\n\t\treturn lastContactTimestamp.get() == 0;\r\n\t}",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"public void setContact(String contact) {\n this.contact = contact == null ? null : contact.trim();\n }",
"@Override\n\tpublic List<CustomerAddressDto> queryConsignee(String mobilePhone) {\n\t\treturn null;\n\t}",
"public abstract boolean ContainsContactObjects();",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"@Override\n\tpublic String addContact(Contact contact) {\n\t\treturn null;\n\t}",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}",
"public boolean checkContacts() \n\t{\n\t\tif (this.contacts.size() < 1) \n\t\t{\n\t\t\tSystem.out.printf(\"%nNo Contacts Stored%n\");\n\t\t\treturn false;\n\t\t} else \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}",
"private static boolean addContact (String name){\n\t\t//If the contact is found, we donīt add it\n\t\tif (findContact(name)!=-1) return false;\n\t\t//Looking where to store the contact \n\t\tboolean added = false;\n\t\tfor (int ii=0; ii<contacts.length && !added; ii++){\n\t\t\t//We look for the first element that is null (empty position)\n\t\t\tif (contacts[ii]==null) {\n\t\t\t\tcontacts[ii]= new Contact(name);\n\t\t\t\tadded = true;\n\t\t\t}\n\t\t}\n\t\t//If added is still false it is because there are no empty positions\n\t\treturn added;\n\t}",
"public boolean isContactSelected() {\n\t\treturn (currentContact != null);\n\t}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"public void setContact(String contact) {\n this.contact = contact;\n }",
"public String getContact() {\r\n return this.contact;\r\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Contact)) {\r\n return false;\r\n }\r\n Contact other = (Contact) object;\r\n if ((this.contactId == null && other.contactId != null) || (this.contactId != null && !this.contactId.equals(other.contactId))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }",
"public M csseSubjectNull(){if(this.get(\"csseSubjectNot\")==null)this.put(\"csseSubjectNot\", \"\");this.put(\"csseSubject\", null);return this;}",
"void isArrayEmpty(ArrayList<UserContactInfo> contactDeatailsList);",
"com.polytech.spik.protocol.SpikMessages.Contact getContact();",
"@NoProxy\n @NoDump\n public BwContact getContact() {\n Set<BwContact> c = getContacts();\n if ((c == null) || (c.isEmpty())) {\n return null;\n }\n\n return c.iterator().next();\n }",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"public void setContacts(String contacts) {\n this.contacts = contacts == null ? null : contacts.trim();\n }",
"public boolean hasC() {\n return c_ != null;\n }",
"boolean getCampaignNameNull();",
"public void setContact(String contact) {\n\t\tthis.contact = contact;\n\t}",
"com.polytech.spik.protocol.SpikMessages.ContactOrBuilder getContactOrBuilder();",
"public void setContact(Contact contact) {\n this.contact = contact;\n }",
"public void setContact(Contact contact) {\n this.contact = contact;\n }",
"public void findContact(){\n EtecsaDB database = new EtecsaDB(this.getContext());\n if (!database.hasDatabase()){\n Toast.makeText(this.getContext(), R.string.no_database, Toast.LENGTH_SHORT).show();\n }\n else //buscar contacto\n new Search(this.getActivity()).execute(advancedSearch);\n }",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"public M csrtSubjectNull(){if(this.get(\"csrtSubjectNot\")==null)this.put(\"csrtSubjectNot\", \"\");this.put(\"csrtSubject\", null);return this;}",
"boolean getOrderPersonIdNull();",
"public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public void setContact(String contact) {\r\n this.contact = contact.trim();\r\n }",
"@Test\n\tpublic void shoudRemoveContact(){\n\t\tContact contact = new Contact().setFirstName(\"tester\").setLastName(\"test\");\n\t\tapp.getContactHelper().createContact(contact);\n\t\t//Removing the contact\n\t\tapp.getContactHelper().removeFirstContact();\n\t\tapp.getContactHelper().checkContactRemoved();\n\n\t}",
"public boolean existeContacto(String usuario,String contacto){\n query=\"select count(*) as cantidad from contactos where nombre='%s' and contacto='%s';\";\n query= String.format(query,usuario,contacto);\n try{\n if(miBaseDatos.executeQuery(query,\"respuesta\")){\n miBaseDatos.next(\"respuesta\");\n String aparece = miBaseDatos.getString(\"cantidad\",\"respuesta\");\n if(aparece.equals(\"1\")){\n return true;\n }else{\n return false;\n }\n }else{\n System.out.println(\"No se pudo hacer la consulta\");\n return false;\n }\n }catch(Exception e){\n System.out.println(e.getClass());\n System.out.println(e.getMessage());\n e.printStackTrace();\n return false;\n }\n }",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public boolean isContactExist(int position) {\n\t\tif (position>=0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean getActiveNull();",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"private boolean selectContactInRowSet() {\r\n int index = getContactSelection().getMinSelectionIndex();\r\n if (index != -1) {\r\n try {\r\n rowSet.absolute(index+1);\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n }\r\n return (index != -1);\r\n }",
"public void setContactNo(java.lang.String contactNo) {\r\n this.contactNo = contactNo;\r\n }",
"private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }",
"@Override\n\tpublic List<Contact> allContacts() {\n\t\treturn null;\n\t}",
"public void setPrimaryContact(String contact);",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Contact)) {\r\n return false;\r\n }\r\n Contact other = (Contact) object;\r\n if ((this.contactPK == null && other.contactPK != null) || (this.contactPK != null && !this.contactPK.equals(other.contactPK))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"private boolean isContactExist(String name) {\n boolean existance;\n existance = contactList.stream()\n .anyMatch(personElement ->\n personElement.getFirstName().equals(name) ||\n personElement.getLastName().equals(name));\n return existance;\n }",
"public void setContactPhone(String contactPhone) {\n this.contactPhone = contactPhone == null ? null : contactPhone.trim();\n }",
"@Override\n public List<Long> findContactsWithoutUser() {\n\tList<Long> ids = from(USER).where(USER.contact.isNotNull()).list(USER.contact.id);\n\n\t// id of contacts that hasn't user\n\tList<Long> result = from(CONTACT).where(CONTACT.id.notIn(ids)).list(CONTACT.id);\n\n\treturn result;\n }",
"public boolean hasC() {\n return cBuilder_ != null || c_ != null;\n }",
"public void removeContact(Contact c)\n {\n if(invitedPeople.contains(c))\n invitedPeople.remove(c);\n }",
"private int findContact(Contact contact) {\n return this.myContacts.indexOf(contact); //If exists in the ArrayList, will return 0 or greater. If not, will return a number less than 0.\n }",
"public void setContactFacsimile(String contactFacsimile) {\n this.contactFacsimile = contactFacsimile;\n }",
"private void getContactList() {\r\n\r\n\t\tgroupData.clear();\r\n\t\tchildData.clear();\r\n\t\tDataHelper dataHelper = new DataHelper(ContactsActivity.this);\r\n\t\tdataHelper.openDatabase();\r\n\t\tgroupData = dataHelper.queryZoneAndCorpInfo(childData);\r\n\t\tdataHelper.closeDatabase();\r\n\t\thandler.sendEmptyMessage(1);\r\n\r\n\t\tif (groupData == null || groupData.size() == 0) {\r\n\t\t\tDataTask task = new DataTask(ContactsActivity.this);\r\n\t\t\ttask.execute(Constants.KServerurl + \"GetAllOrgList\", \"\");\r\n\t\t}\r\n\t}",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"public SourceContact getContact()\n {\n return contact;\n }",
"boolean getValueCharacteristicIdNull();",
"public String getPrimaryContact();",
"public void checkIfNoConversations(Cursor cursor)\n\t{\n\t\tif(!cursor.moveToFirst())\n\t\t{\n\t\t\tnoConversations.setVisibility(TextView.VISIBLE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnoConversations.setVisibility(TextView.GONE);\n\t\t}\n\t}",
"public void unsetContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CONTACT$6, 0);\n }\n }",
"boolean getPersonCharacteristicIdsNull();",
"public M csmiPlaceNull(){if(this.get(\"csmiPlaceNot\")==null)this.put(\"csmiPlaceNot\", \"\");this.put(\"csmiPlace\", null);return this;}",
"public org.hl7.fhir.Contact getContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Contact target = null;\n target = (org.hl7.fhir.Contact)get_store().find_element_user(CONTACT$6, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"Optional<Contact> getContact(long id);"
] | [
"0.6367012",
"0.6351177",
"0.62138563",
"0.6191449",
"0.6167763",
"0.60672545",
"0.60185814",
"0.6001458",
"0.5999986",
"0.5988163",
"0.59439117",
"0.5942386",
"0.5899449",
"0.5889321",
"0.5846598",
"0.5808514",
"0.5798601",
"0.57310075",
"0.573068",
"0.5664362",
"0.56539005",
"0.56252784",
"0.5614095",
"0.55660516",
"0.5559335",
"0.5515805",
"0.55001664",
"0.5472973",
"0.54653317",
"0.54623115",
"0.54556084",
"0.54502726",
"0.5447271",
"0.54410493",
"0.5440419",
"0.5437766",
"0.5414876",
"0.5410766",
"0.5392761",
"0.5385595",
"0.53768146",
"0.53768146",
"0.53768146",
"0.53768146",
"0.5342585",
"0.5328043",
"0.53208756",
"0.53198",
"0.53114855",
"0.53070134",
"0.5305579",
"0.5281816",
"0.52802104",
"0.527435",
"0.52718127",
"0.5267373",
"0.52581036",
"0.52538586",
"0.52538586",
"0.5253816",
"0.5246262",
"0.52448946",
"0.52446276",
"0.521248",
"0.51961046",
"0.518731",
"0.5175756",
"0.5168254",
"0.5162691",
"0.51591265",
"0.51575345",
"0.5154267",
"0.5144593",
"0.5135838",
"0.5126621",
"0.512312",
"0.5118425",
"0.5113507",
"0.5107153",
"0.51063406",
"0.5092728",
"0.50853693",
"0.50852835",
"0.5079622",
"0.507329",
"0.5071303",
"0.50636613",
"0.50564206",
"0.5056317",
"0.5056049",
"0.5054681",
"0.5048962",
"0.5046265",
"0.5040876",
"0.5038897",
"0.50329113",
"0.503175",
"0.5031207",
"0.502868",
"0.5026926"
] | 0.75570893 | 0 |
and csmi_relation is null | public M csmiRelationNull(){if(this.get("csmiRelationNot")==null)this.put("csmiRelationNot", "");this.put("csmiRelation", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"boolean isSetFurtherRelations();",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"boolean getSearchNodeCharacteristicIdsNull();",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"boolean getXAxisCharacteristicIdNull();",
"boolean getConditionListNull();",
"boolean hasRelation();",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"boolean getActiveNull();",
"boolean getOrderPersonIdNull();",
"boolean getPersonCharacteristicIdsNull();",
"@Test\r\n public void lookProfileByNull() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // A not connected user looked at member profile\r\n member.lookedBy(null);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }",
"boolean getRecursiveNull();",
"boolean getNodeCharacteristicIdNull();",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"boolean isNullOmittable();",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"boolean getGroupByCategoryNull();",
"@Test\n \tpublic void whereClauseForNodeDirectDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \t\t);\n \t}",
"boolean getPageCategoryIdNull();",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"public void filter11Relations() {\n this.relations.removeIf(relationship -> !relationship.isOneToOne());\n }",
"public void set_relation(String relation){\n\t\tthis.relation = relation;\n\t}",
"@Override\n\tpublic Instances relationalValue(final Attribute att) {\n\t\treturn null;\n\t}",
"public boolean getSearchNodeCharacteristicIdsNull() {\n return searchNodeCharacteristicIdsNull_;\n }",
"@Override\n\tpublic boolean getIncludesNull() {\n\t\treturn false;\n\t}",
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"public boolean isNull(){\n return false;\n }",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"boolean getYAxisCharacteristicIdNull();",
"public boolean hasC() {\n return c_ != null;\n }",
"boolean isNilIsManaged();",
"public boolean testRelation(Caisse c){\n boolean bool =false;\n\tfor(Caisse c1 : this.lesCaisses){\n\tif (c.equals(c1)){\n\t bool =true;\n }\n bool =false;\n\t }\n\treturn bool ;\n}",
"@Test\n \tpublic void whereClauseForNodeIndirectDominance() {\n \t\tnode23.addJoin(new Dominance(node42));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\")\n \t\t);\n \t}",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }",
"@Override\n \tpublic void removeIsCitedBy(Reference reference) {\n \t\tList<Reference> isCitedBy = getIsCitedBy();\n \t\t// check for no existing relationship\n \t\tif (reference == null || !isCitedBy.contains(reference))\n \t\t\treturn;\n \t\t// remove both sides of relationship\n \t\treference.getCitationList().remove(this);\n \t\tisCitedBy.remove(reference);\n \n \t}",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"boolean getValueCharacteristicIdNull();",
"boolean getCampaignIdNull();",
"boolean getTreeNodeIdNull();",
"@Test\n \tpublic void whereClauseIndirectPointingRelation() {\n \t\tnode23.addJoin(new PointingRelation(node42, NAME));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'p'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\")\n \t\t);\n \t}",
"public T caseRelNotEq(RelNotEq object)\n {\n return null;\n }",
"public boolean isNull()\n\t{\n\t\treturn cp.isNull();\n\t}",
"public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}",
"public void setNoRelation( Value inValue )\n throws Exception\n {\n if (getVariable() == inValue.getVariable())\n return;\n\n try {\n RelationMatrix mat = _var.getMatrixForVariable( inValue._var );\n mat.setNoRelation( this, inValue );\n }\n catch (Exception ex) {\n throw ex;\n }\n }",
"private static void process_relation(GraphDatabaseService db, CSVRecord record){\n\t\tString item_dwid_str = record.get(\"ITEM_DWID\").trim();\n\t\tString rxcui_norm_str = record.get(\"RXCUI_NORM\").trim();\n\t\tif(item_dwid_str.isEmpty()) return;\n\t\tif(rxcui_norm_str.isEmpty()) return;\n\t\tint item_dwid = Integer.parseInt(item_dwid_str);\n\t\tint rxcui_norm = Integer.parseInt(rxcui_norm_str);\n\t\tNode n1 = db.findNode(Labels.ITEM, \"dwid\", item_dwid);\n\t\t//if(n1==null) throw new AssertionError(\"Item missing: \"+item_dwid_str);\n\t\tif(n1==null) return;\n\t\tNode n2 = db.findNode(Labels.Concept, \"cui\", rxcui_norm);\n\t\t//if(n2==null) throw new AssertionError(\"Concept missing: \"+rxcui_norm_str);\n\t\tif(n2==null) return;\n\t\tn1.createRelationshipTo(n2, RelTypes.is_a);\n\t}",
"private boolean isRelationship(Predicate p) throws MediatorException {\n\t// check if properties represented by the column names exist\n\tif (p.getName().startsWith(\"XW_\"))\n\t return true;\n\treturn false;\n\n }",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"@Override\n public Map<PhysicalObject, Double> getRelationBetweenCentralAndObject() {\n assert false : \"shouldn't call this method\";\n return null;\n }",
"@Test\n \tpublic void whereClauseDirectPointingRelation() {\n \t\tnode23.addJoin(new PointingRelation(node42, NAME, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'p'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \n \t\t);\n \t}",
"public boolean hasNoParents()\r\n\t{\treturn (this.strongParents.isEmpty()) && (this.weakParents.isEmpty());\t}",
"public boolean containsIncomingRelations();",
"public void filter1NRelations() {\n this.relations.removeIf(Relationship::isOneToOne);\n }",
"public M csmiCertifyImageNull(){if(this.get(\"csmiCertifyImageNot\")==null)this.put(\"csmiCertifyImageNot\", \"\");this.put(\"csmiCertifyImage\", null);return this;}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"@Override\n\t\tpublic boolean hasRelationship() {\n\t\t\treturn false;\n\t\t}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"void unsetFurtherRelations();",
"public boolean getPersonCharacteristicIdsNull() {\n return personCharacteristicIdsNull_;\n }",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public T caseRelationRemoved(RelationRemoved object) {\n\t\treturn null;\n\t}",
"public boolean getPersonCharacteristicIdsNull() {\n return personCharacteristicIdsNull_;\n }",
"public M csolOrderNull(){if(this.get(\"csolOrderNot\")==null)this.put(\"csolOrderNot\", \"\");this.put(\"csolOrder\", null);return this;}",
"public boolean isNull() {\r\n\t\treturn target == null;\r\n\t}",
"public boolean canProcessNull() {\n return false;\n }",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}",
"void setNilIsManaged();",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"public boolean isNotNullFKColumn() {\n for (Entry<ColumnInfo, ColumnInfo> entry : getLocalForeignColumnInfoMap().entrySet()) {\n final ColumnInfo localColumnInfo = entry.getKey();\n if (!localColumnInfo.isNotNull()) {\n return false;\n }\n }\n return true;\n }",
"public boolean isReferenceToPrimaryKey() {\n\t\treturn referencedColumns.isEmpty();\n\t}",
"public boolean getXAxisCharacteristicIdNull() {\n return xAxisCharacteristicIdNull_;\n }",
"boolean getForumIdNull();",
"public boolean isIdubicacionfiscalNull()\r\n\t{\r\n\t\treturn idubicacionfiscalNull;\r\n\t}",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"private String bindNull() {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IS\";\n } else if (operator.equals(\"!=\")) {\n op = \"IS NOT\";\n } else {\n op = operator;\n }\n if (column != null && skipNulls) {\n return \"1 = 1\";\n } else {\n return cond(column, op, \"NULL\");\n }\n }",
"boolean hasNode()\n/* */ {\n/* 473 */ if ((this.bn == null) && (this.mn == null)) return false;\n/* 474 */ if (this.jt == null) return false;\n/* 475 */ return true;\n/* */ }",
"public M csseSubjectNull(){if(this.get(\"csseSubjectNot\")==null)this.put(\"csseSubjectNot\", \"\");this.put(\"csseSubject\", null);return this;}",
"boolean getPersonOutputCharacteristicsNull();",
"public boolean getGroupByCategoryNull() {\n return groupByCategoryNull_;\n }",
"protected boolean islSubsWithTranslationsNull() {\n List<List<NetSubtitle>> swt = lSubsWithTranslations;\n return (swt == null || swt.size() < 2 ||\n swt.get(0) == null || swt.get(0).isEmpty() ||\n swt.get(1) == null || swt.get(1).isEmpty());\n }",
"@Test\n public void testNotIsNullCriteria() throws Exception {\n String sql = \"Select a From db.g Where Not a IS NULL\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node notCriteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, NotCriteria.ID);\n \n Node isNullCriteriaNode = verify(notCriteriaNode, NotCriteria.CRITERIA_REF_NAME, IsNullCriteria.ID);\n verifyElementSymbol(isNullCriteriaNode, IsNullCriteria.EXPRESSION_REF_NAME, \"a\");\n \n verifySql(\"SELECT a FROM db.g WHERE NOT (a IS NULL)\", fileNode);\n }",
"public boolean hasC() {\n return cBuilder_ != null || c_ != null;\n }",
"public boolean anyNull () ;"
] | [
"0.5808273",
"0.58000726",
"0.56971437",
"0.5617287",
"0.55577695",
"0.55145806",
"0.55101466",
"0.54012924",
"0.5378894",
"0.53774685",
"0.53647345",
"0.53401864",
"0.52791387",
"0.5267218",
"0.5263665",
"0.523699",
"0.52310455",
"0.5227807",
"0.51976454",
"0.5182715",
"0.5177348",
"0.51719284",
"0.5165665",
"0.51548874",
"0.51538444",
"0.51426464",
"0.5135129",
"0.51315534",
"0.5110077",
"0.51000834",
"0.5068449",
"0.50642407",
"0.5062129",
"0.50601107",
"0.5045987",
"0.5039105",
"0.5036899",
"0.5035095",
"0.5034457",
"0.5024612",
"0.50241625",
"0.50171655",
"0.50017875",
"0.49936706",
"0.49838114",
"0.49834263",
"0.49784768",
"0.4977547",
"0.49581653",
"0.49538094",
"0.49501675",
"0.4944651",
"0.4943781",
"0.49424037",
"0.49409306",
"0.49317726",
"0.49258322",
"0.48992926",
"0.48981342",
"0.4894438",
"0.48785728",
"0.48711586",
"0.48488835",
"0.48467493",
"0.48452014",
"0.4844052",
"0.48359874",
"0.48323607",
"0.48274973",
"0.4813914",
"0.48106635",
"0.4808374",
"0.47950128",
"0.47918743",
"0.47805914",
"0.47702274",
"0.47695804",
"0.47607198",
"0.47550166",
"0.4747327",
"0.47427738",
"0.47417414",
"0.47290447",
"0.47289953",
"0.47232416",
"0.47189492",
"0.47185746",
"0.47158682",
"0.4715389",
"0.47122172",
"0.47093993",
"0.4709169",
"0.47067726",
"0.47063363",
"0.47047412",
"0.4699808",
"0.46831673",
"0.46755627",
"0.4673302",
"0.4671997"
] | 0.7564388 | 0 |
and csmi_update_time is null | public M csmiUpdateTimeNull(){if(this.get("csmiUpdateTimeNot")==null)this.put("csmiUpdateTimeNot", "");this.put("csmiUpdateTime", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csseUpdateTimeNull(){if(this.get(\"csseUpdateTimeNot\")==null)this.put(\"csseUpdateTimeNot\", \"\");this.put(\"csseUpdateTime\", null);return this;}",
"public boolean isSetUpdate_time() {\n return this.update_time != null;\n }",
"@java.lang.Override\n public boolean hasUpdateTime() {\n return updateTime_ != null;\n }",
"public M csolAddTimeNull(){if(this.get(\"csolAddTimeNot\")==null)this.put(\"csolAddTimeNot\", \"\");this.put(\"csolAddTime\", null);return this;}",
"public M csseAddTimeNull(){if(this.get(\"csseAddTimeNot\")==null)this.put(\"csseAddTimeNot\", \"\");this.put(\"csseAddTime\", null);return this;}",
"boolean hasUpdateTriggerTime();",
"public M csmiAddTimeNull(){if(this.get(\"csmiAddTimeNot\")==null)this.put(\"csmiAddTimeNot\", \"\");this.put(\"csmiAddTime\", null);return this;}",
"public boolean isSetUpdateTime() {\n return this.updateTime != null;\n }",
"boolean hasTsUpdate();",
"public boolean isSetUpdateTime() {\n\t\treturn this.updateTime != null;\n\t}",
"public boolean isSetUpdateTime() {\n return this.updateTime != null;\n }",
"public boolean isSetUpdateTime() {\n return __isset_bit_vector.get(__UPDATETIME_ISSET_ID);\n }",
"@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Date getUpdateTime() {\n\t\treturn null;\n\t}",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"public Criteria andUpdateTimeNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"public boolean hasUpdateTime() {\n return ((bitField0_ & 0x00000400) != 0);\n }",
"public boolean isSetUpdateDate() {\n return this.updateDate != null;\n }",
"public boolean isSetUpdateDate() {\n return this.updateDate != null;\n }",
"public Criteria andUpdateTimeNotEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private boolean adjustedTimeIsSet() {\n return (adjustedTimeStamp != null);\n }",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"public void setUpdateSuppressTime(int updateSuppressTime) {\n this.updateSuppressTime = updateSuppressTime;\n }",
"public M csrtStatusNull(){if(this.get(\"csrtStatusNot\")==null)this.put(\"csrtStatusNot\", \"\");this.put(\"csrtStatus\", null);return this;}",
"public Criteria andUpdateTimeNotEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasTimeBoltBBoltC();",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public boolean hasUpdateTriggerTime() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasTsUpdate() {\n return fieldSetFlags()[11];\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }",
"public boolean isSetStatusmodifytime() {\n return this.statusmodifytime != null;\n }",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"boolean hasUpdate();",
"boolean hasUpdate();",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"public void setUpdatetime(String updatetime) {\n\t\tthis.updatetime = updatetime == null ? null : updatetime.trim();\n\t}",
"public void setUpdatetime(String updatetime) {\n\t\tthis.updatetime = updatetime == null ? null : updatetime.trim();\n\t}",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"public M csseFinishNull(){if(this.get(\"csseFinishNot\")==null)this.put(\"csseFinishNot\", \"\");this.put(\"csseFinish\", null);return this;}",
"public boolean isNotNullClosingTime() {\n return genClient.cacheValueIsNotNull(CacheKey.closingTime);\n }",
"protected void checkUpdate() {\n \t\t// only update from remote server every so often.\n \t\tif ( ( System.currentTimeMillis() - lastUpdated ) > refreshInterval ) return;\n \t\t\n \t\tClusterTask task = getSessionUpdateTask();\n \t\tObject o = CacheFactory.doSynchronousClusterTask( task, this.nodeId );\n \t\tthis.copy( (Session) o );\n \t\t\n \t\tlastUpdated = System.currentTimeMillis();\n \t}",
"public boolean isSetUpdatedAt() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEDAT_ISSET_ID);\n }",
"public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }",
"private void checkOcspResponseFresh(SingleResp resp) throws OCSPException\n {\n\n Date curDate = Calendar.getInstance().getTime();\n\n Date thisUpdate = resp.getThisUpdate();\n if (thisUpdate == null)\n {\n throw new OCSPException(\"OCSP: thisUpdate field is missing in response (RFC 5019 2.2.4.)\");\n }\n Date nextUpdate = resp.getNextUpdate();\n if (nextUpdate == null)\n {\n throw new OCSPException(\"OCSP: nextUpdate field is missing in response (RFC 5019 2.2.4.)\");\n }\n if (curDate.compareTo(thisUpdate) < 0)\n {\n LOG.error(curDate + \" < \" + thisUpdate);\n throw new OCSPException(\"OCSP: current date < thisUpdate field (RFC 5019 2.2.4.)\");\n }\n if (curDate.compareTo(nextUpdate) > 0)\n {\n LOG.error(curDate + \" > \" + nextUpdate);\n throw new OCSPException(\"OCSP: current date > nextUpdate field (RFC 5019 2.2.4.)\");\n }\n LOG.info(\"OCSP response is fresh\");\n }",
"private FullCityItemInfo removeTime(FullCityItemInfo s) {\n s.getItemInfo().setUpdateTime(null);\n s.getItemInfo().setCreateTime(null);\n for (CitySkuInfo skuInfo : s.getSkuInfoList()) {\n skuInfo.setUpdateTime(null);\n skuInfo.setCreateTime(null);\n }\n return s;\n }",
"public boolean isSetCarpublishtime() {\n return this.carpublishtime != null;\n }",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"private void updateTimeEntryData()\n throws RedmineException\n {\n if (System.currentTimeMillis() > (timeEntriesUpdateTimeStamp+Settings.cacheExpireTime*1000))\n {\n synchronized(timeEntries)\n {\n // get total number of time entries\n int timeEntryCount = getDataLength(\"/time_entries\",\"time_entry\");\n for (int i = timeEntries.size(); i < timeEntryCount; i++)\n {\n timeEntries.add(TIME_ENTRY_NULL);\n }\n\n // get date of first time entry (Note: always sorted descending and cannot be changed)\n timeEntryStartDate = new Date();\n getData(\"/time_entries\",\"time_entry\",timeEntryCount-1,1,new ParseElementHandler<TimeEntry>()\n {\n public void data(Element element)\n {\n timeEntryStartDate = getDateValue(element,\"spent_on\");\n//Dprintf.dprintf(\"timeEntryStartDate=%s\",timeEntryStartDate);\n }\n });\n\n timeEntriesUpdateTimeStamp = System.currentTimeMillis();\n }\n }\n }",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"public boolean isSetLastUpdateTimestampMs() {\n return EncodingUtils.testBit(__isset_bitfield, __LASTUPDATETIMESTAMPMS_ISSET_ID);\n }",
"long getTsUpdate();",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"boolean hasTimeBoltCBoltD();",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"public boolean isUpdateRequired(int maximumUpdateTime)\n\t{\n\t\t\n\t\tboolean needToUpdate = false;\n\t\t\n\t\tfor (Journey j : journeyManager.journeys())\n\t\t{\n\t\t\tneedToUpdate |= (j.remainingTime() == 0);\n\t\t}\n\t\t\n\t\tDuration diff = new Duration(lastUpdated, new DateTime());\n\t\tLog.i(\"Updater\", Long.toString(diff.getStandardMinutes()));\n\t\t\n\t\tneedToUpdate |= (diff.getStandardMinutes() > maximumUpdateTime);\n\t\t\n\t\treturn needToUpdate;\n\t}",
"public boolean hasTimeBoltBBoltC() {\n return ((bitField0_ & 0x00800000) == 0x00800000);\n }",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public boolean hasTimeBoltBBoltC() {\n return ((bitField0_ & 0x00800000) == 0x00800000);\n }",
"private boolean isSeedsInfoUpdated(String tDate){\n \treturn mSharedPref.getBoolean(tDate,false); \t\n }",
"public boolean hasUpdatedAt() {\n return updatedAt_ != null;\n }",
"public final boolean hasChangeDateTime() {\n \treturn m_changeDate != 0L ? true : false;\n }",
"public boolean hasUpdateTriggerTime() {\n return instance.hasUpdateTriggerTime();\n }",
"private static boolean updateRequired(Context context) {\r\n\t\tSharedPreferences pref = context.getSharedPreferences(\r\n\t\t\t\tUSER_ID_SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);\r\n\r\n\t\tif (pref.contains(LAST_UPDATE)) {\r\n\r\n\t\t\tLong lastUpdate = pref.getLong(LAST_UPDATE, -1);\r\n\t\t\tLong now = new Date().getTime();\r\n\r\n\t\t\treturn (now - lastUpdate) > TIME_IN_MILLIS;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"private boolean checkTimeStamp(File file) {\n // uses sharedpreferences\n return (lastUpdate < file.getModifiedDate().getValue());\n }",
"public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }",
"public M csseStartNull(){if(this.get(\"csseStartNot\")==null)this.put(\"csseStartNot\", \"\");this.put(\"csseStart\", null);return this;}",
"public Timestamp getStatusTime() {\n\t\treturn null;\n\t}",
"boolean hasSubmitTime();",
"public void setClUpdateTime(Date clUpdateTime) {\r\n this.clUpdateTime = clUpdateTime;\r\n }",
"@Test(priority = 4)\n\tpublic void uploadDataWithNullEpochTimesInTimeField() throws InterruptedException {\n\t\tlog.info(line);\n\t\tAssert.assertTrue(clickAllActionButton.uploadDataWithNullEpochTime(),\n\t\t\t\t\"error message null values in time field is displayed\");\n\t}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"public boolean isSetUpdateId() {\n return this.updateId != null;\n }",
"private void clearUpdateTriggerTime() {\n bitField0_ = (bitField0_ & ~0x00000002);\n updateTriggerTime_ = 0;\n }",
"public Criteria andUpdateTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@java.lang.Override\n public boolean hasCreateTime() {\n return createTime_ != null;\n }",
"@java.lang.Override\n public boolean hasCreateTime() {\n return createTime_ != null;\n }",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public boolean hasQueryTimeSec() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"boolean hasTimeBoltDBoltH();",
"@java.lang.Override\n public boolean hasLastRefreshTime() {\n return lastRefreshTime_ != null;\n }",
"public boolean hasQueryTimeSec() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"Date getDateUpdated();",
"public M csmiBirthdayNull(){if(this.get(\"csmiBirthdayNot\")==null)this.put(\"csmiBirthdayNot\", \"\");this.put(\"csmiBirthday\", null);return this;}",
"public boolean hasUpdatedAt() {\n return updatedAtBuilder_ != null || updatedAt_ != null;\n }",
"boolean hasUpdatedAt();"
] | [
"0.71327174",
"0.6416404",
"0.60744584",
"0.6067152",
"0.6051916",
"0.60442954",
"0.603241",
"0.6002553",
"0.595464",
"0.57962394",
"0.5792305",
"0.570034",
"0.5665686",
"0.56567615",
"0.5646808",
"0.5592443",
"0.5556912",
"0.55201805",
"0.5509349",
"0.5509349",
"0.5508758",
"0.5505935",
"0.5504367",
"0.54936975",
"0.54936975",
"0.54936975",
"0.5480867",
"0.54608417",
"0.5443728",
"0.5441603",
"0.5412198",
"0.5392136",
"0.53918403",
"0.5373658",
"0.5373658",
"0.5341896",
"0.53281474",
"0.5309846",
"0.5288979",
"0.5288979",
"0.52881634",
"0.52791923",
"0.52791923",
"0.5276676",
"0.5251673",
"0.52468884",
"0.52401686",
"0.52165127",
"0.5209116",
"0.5205468",
"0.52045286",
"0.5196332",
"0.5188762",
"0.5186958",
"0.51783556",
"0.5174111",
"0.5151558",
"0.5150461",
"0.5129806",
"0.51270866",
"0.51203114",
"0.51203114",
"0.51203114",
"0.51203114",
"0.51203114",
"0.51203114",
"0.51196474",
"0.5111713",
"0.5108476",
"0.5097756",
"0.50972176",
"0.5093945",
"0.5076808",
"0.5075004",
"0.5059148",
"0.5047673",
"0.50458115",
"0.50458115",
"0.5042799",
"0.5034571",
"0.5032104",
"0.5028653",
"0.50253075",
"0.50201577",
"0.5013252",
"0.5011836",
"0.50079304",
"0.49999383",
"0.4985018",
"0.4983085",
"0.4983085",
"0.4968341",
"0.4963012",
"0.49568725",
"0.49468872",
"0.49213177",
"0.49202076",
"0.49201882",
"0.491476",
"0.49096206"
] | 0.7178875 | 0 |
and csmi_update_time >= ? | public M csmiUpdateTimeStart(Object start){this.put("csmiUpdateTimeStart", start);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasUpdateTriggerTime();",
"boolean hasTsUpdate();",
"public Criteria andUpdateTimeLessThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"public Criteria andUpdateTimeLessThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeLessThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"long getTsUpdate();",
"public Criteria andUpdateTimeGreaterThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean isSetUpdate_time() {\n return this.update_time != null;\n }",
"public Criteria andUpdateTimeEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeLessThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeLessThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeGreaterThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean isSetUpdateTime() {\n return __isset_bit_vector.get(__UPDATETIME_ISSET_ID);\n }",
"public Criteria andUpdateTimeLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"int getUpdateTriggerTime();",
"boolean hasUpdate();",
"boolean hasUpdate();",
"public Criteria andUpdateTimeGreaterThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@java.lang.Override\n public boolean hasUpdateTime() {\n return updateTime_ != null;\n }",
"public void checkForUpdate();",
"public Criteria andUpdateTimeNotEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeGreaterThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasTimeBoltBBoltC();",
"public Criteria andUpdateTimeGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"Date getDateUpdated();",
"public boolean isUpdateRequired(int maximumUpdateTime)\n\t{\n\t\t\n\t\tboolean needToUpdate = false;\n\t\t\n\t\tfor (Journey j : journeyManager.journeys())\n\t\t{\n\t\t\tneedToUpdate |= (j.remainingTime() == 0);\n\t\t}\n\t\t\n\t\tDuration diff = new Duration(lastUpdated, new DateTime());\n\t\tLog.i(\"Updater\", Long.toString(diff.getStandardMinutes()));\n\t\t\n\t\tneedToUpdate |= (diff.getStandardMinutes() > maximumUpdateTime);\n\t\t\n\t\treturn needToUpdate;\n\t}",
"public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }",
"public boolean isSetUpdateTime() {\n return this.updateTime != null;\n }",
"public void checkInTime() {\n Date recentDate = new Date();\n PreparedStatement stmt;\n\n SimpleDateFormat dateStamp = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat timeStamp = new SimpleDateFormat(\"h:mm:ss a\");\n String dateuser = dateStamp.format(recentDate);\n String timeuser = timeStamp.format(recentDate);\n\n String id = txtUsername.getText();\n\n try {\n String querysql = \"update employee set time_in='\" + timeuser + \"',date='\" + dateuser + \"'\" + \", parking_spot = '\" + parking + \"' where id_no='\" + id + \"' \";\n stmt = conn.prepareStatement(querysql);\n stmt.execute();\n\n conn.close();\n\n } catch (SQLException e) {\n\n System.out.println(\"Failed to update\");\n\n }\n\n }",
"public Criteria andUpdateTimeNotEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasQueryTimeSec();",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"public M csmiUpdateTimeNull(){if(this.get(\"csmiUpdateTimeNot\")==null)this.put(\"csmiUpdateTimeNot\", \"\");this.put(\"csmiUpdateTime\", null);return this;}",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }",
"public Criteria andModifyTimeEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csseUpdateTimeNull(){if(this.get(\"csseUpdateTimeNot\")==null)this.put(\"csseUpdateTimeNot\", \"\");this.put(\"csseUpdateTime\", null);return this;}",
"protected void checkUpdate() {\n \t\t// only update from remote server every so often.\n \t\tif ( ( System.currentTimeMillis() - lastUpdated ) > refreshInterval ) return;\n \t\t\n \t\tClusterTask task = getSessionUpdateTask();\n \t\tObject o = CacheFactory.doSynchronousClusterTask( task, this.nodeId );\n \t\tthis.copy( (Session) o );\n \t\t\n \t\tlastUpdated = System.currentTimeMillis();\n \t}",
"boolean needUpdate();",
"public boolean isSetUpdateTime() {\n\t\treturn this.updateTime != null;\n\t}",
"public boolean isSetUpdateTime() {\n return this.updateTime != null;\n }",
"boolean hasQueryTimeNsec();",
"private boolean checkTimeStamp(File file) {\n // uses sharedpreferences\n return (lastUpdate < file.getModifiedDate().getValue());\n }",
"boolean hasTimeBoltCBoltD();",
"public boolean hasUpdateTime() {\n return ((bitField0_ & 0x00000400) != 0);\n }",
"protected boolean isConsistentWith(BasisCondition uc)\n{\n if (uc instanceof BasisConditionDuration) {\n BasisConditionDuration bct = (BasisConditionDuration) uc;\n if (bct.base_condition == bct.base_condition) {\n\t if (max_time <= bct.min_time || min_time >= bct.max_time) return false;\n\t return true;\n }\n }\n\n return base_condition.isConsistentWith(uc);\n}",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }",
"@SuppressLint({\"CommitPrefEdits\"})\n public void checkForUpdates() {\n synchronized (this.preferenceStore) {\n if (this.preferenceStore.get().contains(\"last_update_check\")) {\n this.preferenceStore.save(this.preferenceStore.edit().remove(\"last_update_check\"));\n }\n }\n long currentTimeMillis = this.currentTimeProvider.getCurrentTimeMillis();\n long j = ((long) this.betaSettings.updateSuspendDurationSeconds) * 1000;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Check for updates delay: \");\n sb.append(j);\n Fabric.getLogger().d(\"Beta\", sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Check for updates last check time: \");\n sb2.append(getLastCheckTimeMillis());\n Fabric.getLogger().d(\"Beta\", sb2.toString());\n long lastCheckTimeMillis2 = getLastCheckTimeMillis() + j;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Check for updates current time: \");\n sb3.append(currentTimeMillis);\n sb3.append(\", next check time: \");\n sb3.append(lastCheckTimeMillis2);\n Fabric.getLogger().d(\"Beta\", sb3.toString());\n if (currentTimeMillis >= lastCheckTimeMillis2) {\n try {\n performUpdateCheck();\n } finally {\n setLastCheckTimeMillis(currentTimeMillis);\n }\n } else {\n Fabric.getLogger().d(\"Beta\", \"Check for updates next check time was not passed\");\n }\n }",
"public Criteria andModifyTimeLessThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean hasUpdateTriggerTime() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"boolean hasExchangeTime();",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"boolean hasSubmitTime();",
"public boolean hasTsUpdate() {\n return fieldSetFlags()[11];\n }",
"@WorkerThread\n boolean querySince(long sinceTime) {\n final String[] projection = new String[] {\n Contacts._ID, Contacts.LOOKUP_KEY, Contacts.STARRED, Contacts.HAS_PHONE_NUMBER,\n Contacts.CONTACT_LAST_UPDATED_TIMESTAMP };\n String selection = Contacts.CONTACT_LAST_UPDATED_TIMESTAMP + \" > ?\";\n String[] selectionArgs = new String[] {Long.toString(sinceTime)};\n return queryContact(Contacts.CONTENT_URI, projection, selection, selectionArgs);\n }",
"boolean doUpdate(int index) {\n return (index >= updateStart) && (index <= updateEnd);\n }",
"@Override\r\n\tpublic void agree(Integer id,Timestamp createtime) {\n\t\tString sql=\"update message set isread=1,result=1,createtime=? where id=?\";\r\n\t\tObject[] args=new Object[] {createtime,id};\r\n\t\ttry {\r\n\t\t\tupdate(conn, sql, args);\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}",
"private static boolean updateRequired(Context context) {\r\n\t\tSharedPreferences pref = context.getSharedPreferences(\r\n\t\t\t\tUSER_ID_SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);\r\n\r\n\t\tif (pref.contains(LAST_UPDATE)) {\r\n\r\n\t\t\tLong lastUpdate = pref.getLong(LAST_UPDATE, -1);\r\n\t\t\tLong now = new Date().getTime();\r\n\r\n\t\t\treturn (now - lastUpdate) > TIME_IN_MILLIS;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"boolean getIsUpdate();",
"private boolean isSeedsInfoUpdated(String tDate){\n \treturn mSharedPref.getBoolean(tDate,false); \t\n }",
"long getUpdated();",
"boolean hasDesiredTime();",
"public void checkUpdates(int timePerStep){\r\n\t\tif(updateStatistics_ || statisticsCountdown_ == -1){\r\n\t\t\tstatisticsCountdown_ -= timePerStep;\r\n\t\t\tif(statisticsCountdown_ < 1){\r\n\t\t\t\tstatisticsCountdown_ += STATISTICS_ACTUALIZATION_INTERVAL;\r\n\t\t\t\tupdateStatistics();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(updateBeaconInfo_){\r\n\t\t\tbeaconInfoCountdown_ -= timePerStep;\r\n\t\t\tif(beaconInfoCountdown_ < 1){\r\n\t\t\t\tbeaconInfoCountdown_ += BEACONINFO_ACTUALIZATION_INTERVAL;\r\n\t\t\t\tupdateBeaconInfo();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"Long getUserUpdated();",
"public M csseUpdateTimeStart(Object start){this.put(\"csseUpdateTimeStart\", start);return this;}",
"public void setClUpdateTime(Date clUpdateTime) {\r\n this.clUpdateTime = clUpdateTime;\r\n }",
"Date getLastServerUpdate();",
"public Criteria andModifyTimeGreaterThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void requestUpdate(){\n shouldUpdate = true;\n }",
"@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"Date getUpdateTime();",
"boolean hasTimeBoltDBoltH();",
"public boolean hasQueryTimeSec() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"public void checkLavaTileUpdates() {\n // 1 second (1 bn nanoseconds) between each tick\n long timeBetweenTicks = 1000;\n long newTime = System.currentTimeMillis();\n\n // if it has been 1 second: decrement ticks, set a new time and return true\n if (newTime - timeLastTick >= timeBetweenTicks) {\n timeLastTick = newTime;\n updateLavaTiles();\n }\n }",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"List<Update> getUpdates(String page, long minTime);",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();",
"public Timestamp getUpdated();"
] | [
"0.6035675",
"0.5929011",
"0.58522886",
"0.5831827",
"0.58270955",
"0.58270955",
"0.58270955",
"0.57541007",
"0.5694403",
"0.5687346",
"0.56742215",
"0.56284726",
"0.56130385",
"0.5594003",
"0.55799365",
"0.5568948",
"0.550644",
"0.54921573",
"0.54899913",
"0.5473936",
"0.544441",
"0.5442153",
"0.54392534",
"0.54392534",
"0.54379976",
"0.54354185",
"0.5430714",
"0.54251087",
"0.54068696",
"0.5398897",
"0.5346296",
"0.5335142",
"0.5325324",
"0.53212214",
"0.5310418",
"0.5309668",
"0.53008586",
"0.5274696",
"0.5247823",
"0.52214175",
"0.52193344",
"0.52193344",
"0.51934254",
"0.5187917",
"0.51832354",
"0.5177307",
"0.5173328",
"0.51410234",
"0.5140821",
"0.5104468",
"0.5095554",
"0.50947326",
"0.5088724",
"0.5073947",
"0.5061117",
"0.5037071",
"0.50228137",
"0.5021382",
"0.5005639",
"0.4990905",
"0.4974537",
"0.49709195",
"0.49687323",
"0.49597827",
"0.49544182",
"0.49366662",
"0.4935793",
"0.49342543",
"0.49309266",
"0.49302852",
"0.4930206",
"0.49256247",
"0.49051365",
"0.49051365",
"0.49034464",
"0.48996198",
"0.48910722",
"0.48833025",
"0.48749247",
"0.48611635",
"0.48551056",
"0.48549694",
"0.48529553",
"0.48435465",
"0.4838481",
"0.48349008",
"0.48270357",
"0.48270357",
"0.48270357",
"0.48270357",
"0.48259735",
"0.48221803",
"0.48221803",
"0.48221803",
"0.48221803",
"0.48221803",
"0.48221803",
"0.48221803",
"0.48221803",
"0.48221803"
] | 0.49408033 | 65 |
and csmi_update_time <= ? | public M csmiUpdateTimeEnd(Object end){this.put("csmiUpdateTimeEnd", end);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasUpdateTriggerTime();",
"boolean hasTsUpdate();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"boolean hasUpdateTime();",
"public Criteria andUpdateTimeLessThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean isSetUpdate_time() {\n return this.update_time != null;\n }",
"public Criteria andUpdateTimeLessThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"long getTsUpdate();",
"public boolean isSetUpdateTime() {\n return __isset_bit_vector.get(__UPDATETIME_ISSET_ID);\n }",
"public Criteria andUpdateTimeLessThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@java.lang.Override\n public boolean hasUpdateTime() {\n return updateTime_ != null;\n }",
"public boolean isUpdateRequired(int maximumUpdateTime)\n\t{\n\t\t\n\t\tboolean needToUpdate = false;\n\t\t\n\t\tfor (Journey j : journeyManager.journeys())\n\t\t{\n\t\t\tneedToUpdate |= (j.remainingTime() == 0);\n\t\t}\n\t\t\n\t\tDuration diff = new Duration(lastUpdated, new DateTime());\n\t\tLog.i(\"Updater\", Long.toString(diff.getStandardMinutes()));\n\t\t\n\t\tneedToUpdate |= (diff.getStandardMinutes() > maximumUpdateTime);\n\t\t\n\t\treturn needToUpdate;\n\t}",
"public Criteria andUpdateTimeNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeGreaterThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeLessThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeLessThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeNotEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean isSetUpdateTime() {\n return this.updateTime != null;\n }",
"boolean hasUpdate();",
"boolean hasUpdate();",
"boolean hasTimeBoltBBoltC();",
"public void checkForUpdate();",
"public Criteria andUpdateTimeGreaterThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"public M csmiUpdateTimeNull(){if(this.get(\"csmiUpdateTimeNot\")==null)this.put(\"csmiUpdateTimeNot\", \"\");this.put(\"csmiUpdateTime\", null);return this;}",
"int getUpdateTriggerTime();",
"public Criteria andUpdateTimeGreaterThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csseUpdateTimeNull(){if(this.get(\"csseUpdateTimeNot\")==null)this.put(\"csseUpdateTimeNot\", \"\");this.put(\"csseUpdateTime\", null);return this;}",
"public Criteria andUpdateTimeGreaterThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeNotEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andUpdateTimeGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"protected boolean isConsistentWith(BasisCondition uc)\n{\n if (uc instanceof BasisConditionDuration) {\n BasisConditionDuration bct = (BasisConditionDuration) uc;\n if (bct.base_condition == bct.base_condition) {\n\t if (max_time <= bct.min_time || min_time >= bct.max_time) return false;\n\t return true;\n }\n }\n\n return base_condition.isConsistentWith(uc);\n}",
"protected void checkUpdate() {\n \t\t// only update from remote server every so often.\n \t\tif ( ( System.currentTimeMillis() - lastUpdated ) > refreshInterval ) return;\n \t\t\n \t\tClusterTask task = getSessionUpdateTask();\n \t\tObject o = CacheFactory.doSynchronousClusterTask( task, this.nodeId );\n \t\tthis.copy( (Session) o );\n \t\t\n \t\tlastUpdated = System.currentTimeMillis();\n \t}",
"public boolean isSetUpdateTime() {\n\t\treturn this.updateTime != null;\n\t}",
"public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }",
"public Criteria andUpdateTimeGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"update_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean isSetUpdateTime() {\n return this.updateTime != null;\n }",
"Date getDateUpdated();",
"boolean hasQueryTimeSec();",
"public void checkInTime() {\n Date recentDate = new Date();\n PreparedStatement stmt;\n\n SimpleDateFormat dateStamp = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat timeStamp = new SimpleDateFormat(\"h:mm:ss a\");\n String dateuser = dateStamp.format(recentDate);\n String timeuser = timeStamp.format(recentDate);\n\n String id = txtUsername.getText();\n\n try {\n String querysql = \"update employee set time_in='\" + timeuser + \"',date='\" + dateuser + \"'\" + \", parking_spot = '\" + parking + \"' where id_no='\" + id + \"' \";\n stmt = conn.prepareStatement(querysql);\n stmt.execute();\n\n conn.close();\n\n } catch (SQLException e) {\n\n System.out.println(\"Failed to update\");\n\n }\n\n }",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"boolean needUpdate();",
"public Criteria andModifyTimeEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@SuppressLint({\"CommitPrefEdits\"})\n public void checkForUpdates() {\n synchronized (this.preferenceStore) {\n if (this.preferenceStore.get().contains(\"last_update_check\")) {\n this.preferenceStore.save(this.preferenceStore.edit().remove(\"last_update_check\"));\n }\n }\n long currentTimeMillis = this.currentTimeProvider.getCurrentTimeMillis();\n long j = ((long) this.betaSettings.updateSuspendDurationSeconds) * 1000;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Check for updates delay: \");\n sb.append(j);\n Fabric.getLogger().d(\"Beta\", sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Check for updates last check time: \");\n sb2.append(getLastCheckTimeMillis());\n Fabric.getLogger().d(\"Beta\", sb2.toString());\n long lastCheckTimeMillis2 = getLastCheckTimeMillis() + j;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Check for updates current time: \");\n sb3.append(currentTimeMillis);\n sb3.append(\", next check time: \");\n sb3.append(lastCheckTimeMillis2);\n Fabric.getLogger().d(\"Beta\", sb3.toString());\n if (currentTimeMillis >= lastCheckTimeMillis2) {\n try {\n performUpdateCheck();\n } finally {\n setLastCheckTimeMillis(currentTimeMillis);\n }\n } else {\n Fabric.getLogger().d(\"Beta\", \"Check for updates next check time was not passed\");\n }\n }",
"public boolean hasUpdateTime() {\n return ((bitField0_ & 0x00000400) != 0);\n }",
"public void checkUpdates(int timePerStep){\r\n\t\tif(updateStatistics_ || statisticsCountdown_ == -1){\r\n\t\t\tstatisticsCountdown_ -= timePerStep;\r\n\t\t\tif(statisticsCountdown_ < 1){\r\n\t\t\t\tstatisticsCountdown_ += STATISTICS_ACTUALIZATION_INTERVAL;\r\n\t\t\t\tupdateStatistics();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(updateBeaconInfo_){\r\n\t\t\tbeaconInfoCountdown_ -= timePerStep;\r\n\t\t\tif(beaconInfoCountdown_ < 1){\r\n\t\t\t\tbeaconInfoCountdown_ += BEACONINFO_ACTUALIZATION_INTERVAL;\r\n\t\t\t\tupdateBeaconInfo();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"boolean hasTimeBoltCBoltD();",
"private boolean checkTimeStamp(File file) {\n // uses sharedpreferences\n return (lastUpdate < file.getModifiedDate().getValue());\n }",
"boolean hasQueryTimeNsec();",
"boolean hasDesiredTime();",
"boolean doUpdate(int index) {\n return (index >= updateStart) && (index <= updateEnd);\n }",
"public void setClUpdateTime(Date clUpdateTime) {\r\n this.clUpdateTime = clUpdateTime;\r\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"boolean hasExchangeTime();",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }",
"boolean hasSubmitTime();",
"public Criteria andModifyTimeLessThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private static boolean updateRequired(Context context) {\r\n\t\tSharedPreferences pref = context.getSharedPreferences(\r\n\t\t\t\tUSER_ID_SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);\r\n\r\n\t\tif (pref.contains(LAST_UPDATE)) {\r\n\r\n\t\t\tLong lastUpdate = pref.getLong(LAST_UPDATE, -1);\r\n\t\t\tLong now = new Date().getTime();\r\n\r\n\t\t\treturn (now - lastUpdate) > TIME_IN_MILLIS;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"boolean getIsUpdate();",
"public boolean hasTsUpdate() {\n return fieldSetFlags()[11];\n }",
"public boolean hasUpdateTriggerTime() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public void checkLavaTileUpdates() {\n // 1 second (1 bn nanoseconds) between each tick\n long timeBetweenTicks = 1000;\n long newTime = System.currentTimeMillis();\n\n // if it has been 1 second: decrement ticks, set a new time and return true\n if (newTime - timeLastTick >= timeBetweenTicks) {\n timeLastTick = newTime;\n updateLavaTiles();\n }\n }",
"@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}",
"public void requestUpdate(){\n shouldUpdate = true;\n }",
"private boolean adjustedTimeIsSet() {\n return (adjustedTimeStamp != null);\n }",
"@Override\r\n\tpublic void agree(Integer id,Timestamp createtime) {\n\t\tString sql=\"update message set isread=1,result=1,createtime=? where id=?\";\r\n\t\tObject[] args=new Object[] {createtime,id};\r\n\t\ttry {\r\n\t\t\tupdate(conn, sql, args);\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}",
"private boolean isSeedsInfoUpdated(String tDate){\n \treturn mSharedPref.getBoolean(tDate,false); \t\n }",
"public M csmiUpdateTimeStart(Object start){this.put(\"csmiUpdateTimeStart\", start);return this;}",
"@PreUpdate\n\tprotected void onUpdate() {\n\t\tupdated = new Date();\n\t\trcaCase.updated = updated;\n\t}",
"public boolean isSetStatusmodifytime() {\n return this.statusmodifytime != null;\n }",
"public M csseUpdateTimeStart(Object start){this.put(\"csseUpdateTimeStart\", start);return this;}",
"long getUpdated();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"boolean hasUpdateMask();",
"@Then(\"^the matches should update every (\\\\d+) seconds$\")\n\tpublic void the_matches_should_update_every_seconds(int secs) throws Throwable {\n\t\tThread.sleep(secs * 1000);\n\t // matches container should now have a last-updated data attribute\n\t\twebDriver.waitForElement(By.cssSelector(\".matches-container[data-last-updated]\"));\n\t}",
"public void setCateUpdated(Date cateUpdated) {\n this.cateUpdated = cateUpdated;\n }",
"public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }",
"boolean hasCurrentStateTime();",
"Long getUserUpdated();",
"public boolean timeToRefresh() {\n if (tozAdCampaignRetrievalCounter == null) {\n return (true);\n }\n else if (tozAdCampaignRetrievalInterval != 0) {\n tozAdCampaignRetrievalCounter += getSleepInterval();\n\n AppyAdService.getInstance().debugOut(TAG,\"Ad Campaign refresh counter=\"+tozAdCampaignRetrievalCounter);\n if (tozAdCampaignRetrievalCounter >= tozAdCampaignRetrievalInterval) {\n tozAdCampaignRetrievalCounter = 0;\n return (true);\n }\n }\n return (false);\n }",
"public boolean isTimeToSelect();",
"public void timeChanged();",
"public void testCmdUpdate_time_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 3: Testing time field (all ID are valid)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 3a: start time and end time are both null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 3b: valid start time without end time\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, VALID_START_TIME + \"\", null, null);\n\t\texpectedCA = new CommandAction(MSG_INVALIDTIME, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 3c: start time after end time\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, INVALID_START_TIME + \"\", VALID_END_TIME + \"\", null);\n\t\texpectedCA = new CommandAction(MSG_INVALIDTIME, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 3d: start time before end time\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, VALID_START_TIME + \"\", VALID_END_TIME + \"\", null);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, VALID_START_TIME, VALID_END_TIME, PRIORITY_TYPE.NORMAL);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}",
"public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);",
"private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }",
"private boolean updateCPUTime(long[] data){\n\t\tif(data == null || data.length < 7)\n\t\t\treturn false;\n\n\t\tlong usr = data[0] + data[1];\n\t\tlong sys = data[2] + data[5] + data[6];\n\t\t\n\t\tmRelCPUTime = (usr - mBaseUserTime) + (sys - mBaseSysTime);\n\t\tmBaseUserTime = usr;\n\t\tmBaseSysTime = sys;\t\t\t\t\n\t\t\n\t\tdouble activeTime = 1.0 * mRelCPUTime / coreNumber;\n\t\tcpuUtilization = 100.0 * activeTime / Math.max(getSpeedStepTotalTime(), activeTime);\n\t\tlastData = java.util.Arrays.copyOf(data, data.length);\n\t\t\n\t\treturn true;\n\t}",
"public boolean canUpdate();",
"public Criteria andModifyTimeGreaterThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }"
] | [
"0.60224736",
"0.58845544",
"0.5842898",
"0.5842898",
"0.5842898",
"0.57471126",
"0.5720882",
"0.57005477",
"0.5663601",
"0.56026924",
"0.56023836",
"0.5595165",
"0.55878097",
"0.55080587",
"0.55078155",
"0.55017054",
"0.5494913",
"0.5492254",
"0.54792994",
"0.5471201",
"0.54499626",
"0.54306304",
"0.5414578",
"0.5414578",
"0.5412352",
"0.5408143",
"0.5393269",
"0.536809",
"0.53642094",
"0.53584796",
"0.5350203",
"0.53350157",
"0.5330811",
"0.5323585",
"0.5322117",
"0.5318218",
"0.5315284",
"0.5292083",
"0.5292083",
"0.52908367",
"0.5271614",
"0.52608603",
"0.5255652",
"0.52455825",
"0.52270734",
"0.5218661",
"0.51918936",
"0.5187381",
"0.5141258",
"0.51396453",
"0.51385313",
"0.5086542",
"0.50855565",
"0.5070577",
"0.5068231",
"0.50634277",
"0.50520045",
"0.5047252",
"0.5040256",
"0.50311786",
"0.50168127",
"0.49951693",
"0.49951693",
"0.49844906",
"0.49838307",
"0.49823532",
"0.49815366",
"0.49728546",
"0.4972405",
"0.49704346",
"0.49687418",
"0.4946295",
"0.49367654",
"0.49270213",
"0.49252552",
"0.49248576",
"0.49072656",
"0.49020374",
"0.48939258",
"0.4892854",
"0.48749563",
"0.48726138",
"0.48663723",
"0.48636705",
"0.48636705",
"0.48636705",
"0.48636705",
"0.48588145",
"0.48413348",
"0.48408455",
"0.48397443",
"0.48299",
"0.48272222",
"0.48264876",
"0.4824428",
"0.48234558",
"0.4822159",
"0.4813079",
"0.48124287",
"0.48114297",
"0.4809095"
] | 0.0 | -1 |
and csmi_add_time is null | public M csmiAddTimeNull(){if(this.get("csmiAddTimeNot")==null)this.put("csmiAddTimeNot", "");this.put("csmiAddTime", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csolAddTimeNull(){if(this.get(\"csolAddTimeNot\")==null)this.put(\"csolAddTimeNot\", \"\");this.put(\"csolAddTime\", null);return this;}",
"public M csseAddTimeNull(){if(this.get(\"csseAddTimeNot\")==null)this.put(\"csseAddTimeNot\", \"\");this.put(\"csseAddTime\", null);return this;}",
"public M csmiUpdateTimeNull(){if(this.get(\"csmiUpdateTimeNot\")==null)this.put(\"csmiUpdateTimeNot\", \"\");this.put(\"csmiUpdateTime\", null);return this;}",
"public M csseUpdateTimeNull(){if(this.get(\"csseUpdateTimeNot\")==null)this.put(\"csseUpdateTimeNot\", \"\");this.put(\"csseUpdateTime\", null);return this;}",
"@Override\n\tpublic Date getAddTime() {\n\t\treturn null;\n\t}",
"public M csolAddTimeStart(Object start){this.put(\"csolAddTimeStart\", start);return this;}",
"public M csmiAddTimeStart(Object start){this.put(\"csmiAddTimeStart\", start);return this;}",
"public M csseAddTimeStart(Object start){this.put(\"csseAddTimeStart\", start);return this;}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public M csseStartNull(){if(this.get(\"csseStartNot\")==null)this.put(\"csseStartNot\", \"\");this.put(\"csseStart\", null);return this;}",
"public void setAddtime(Date addtime) {\r\n this.addtime = addtime;\r\n }",
"public void setAddtime(Date addtime) {\n this.addtime = addtime;\n }",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"boolean hasTimeBoltBBoltC();",
"private boolean adjustedTimeIsSet() {\n return (adjustedTimeStamp != null);\n }",
"boolean hasDesiredTime();",
"public M csseFinishNull(){if(this.get(\"csseFinishNot\")==null)this.put(\"csseFinishNot\", \"\");this.put(\"csseFinish\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"boolean hasStartTime();",
"public void setAddTime(Integer addTime) {\n this.addTime = addTime;\n }",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n stringBuilder0.append((-1.0));\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"-1.0 and null\", stringBuilder0.toString());\n }",
"@Override\r\n\tpublic Course_timeVO getCourseTimeByCT_NO(String crs_no) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void setAddTime(Date addTime) {\n\t\t\n\t}",
"public Criteria andAddTimeNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasCollectEndTime();",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"boolean hasSubmitTime();",
"public Criteria andAddTimeNotEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }",
"@java.lang.Override\n public boolean hasAdTimeOffset() {\n return adTimeOffset_ != null;\n }",
"@Test(priority = 4)\n\tpublic void uploadDataWithNullEpochTimesInTimeField() throws InterruptedException {\n\t\tlog.info(line);\n\t\tAssert.assertTrue(clickAllActionButton.uploadDataWithNullEpochTime(),\n\t\t\t\t\"error message null values in time field is displayed\");\n\t}",
"boolean hasExchangeTime();",
"public Criteria andAddTimeNotEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}",
"@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}",
"boolean hasTime();",
"boolean hasTime();",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }",
"public boolean hasDesiredTime() {\n return desiredTimeBuilder_ != null || desiredTime_ != null;\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"null\", stringBuilder0.toString());\n }",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"boolean hasQueryTimeSec();",
"private AbsTime(boolean t)\n {\n if (!t) {\n itsValue = ASAP_CODE;\n } else {\n itsValue = NEVER_CODE;\n }\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"private void checkCombinationWhenHrNotEqual(TimeBean obj, List<String> listTimeComb ) {\r\n\t\tif(obj.getStartHr() !=0 && obj.getStartMin()==0 && obj.getStartSec()==0) {\r\n\t\t\tlistTimeComb.add(obj.getStartHr()+\":00:\"+obj.getStartHr());\r\n\t\t}\r\n\t\t\r\n\t\tif(obj.getStartHr() >= obj.getStartMin() && obj.getStartSec()>=0) {\r\n\t\t\tlistTimeComb.add(obj.getStartHr()+\":\"+obj.getStartHr()+\":00\");\r\n\t\t}\r\n\t\t\r\n\t\tif(obj.getStartHr() >= obj.getStartMin() && obj.getStartHr() >= obj.getStartSec()) {\r\n\t\t\tlistTimeComb.add(obj.getStartHr()+\":\"+obj.getStartHr()+\":\"+obj.getStartHr());\r\n\t\t}\r\n\t\tTimeUtil.incrementHr(obj);\r\n\t}",
"boolean hasTimeRecord();",
"boolean hasTimeBoltCBoltD();",
"public void testGetStartTime() {\n assertTrue(mb.getStartTime() > -1);\n }",
"public Date getAddtime() {\r\n return addtime;\r\n }",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"public boolean addTime(double time) {\n this.time += time;\n if(time > 0)\n return true;\n else \n return false;\n }",
"boolean hasUseTime();",
"boolean hasUseTime();",
"public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"boolean hasTimeBoltHBoltE();",
"@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}",
"public void checkAddTrackDay() {\n int hour = this.timeTrankiManager.getHour();\n int minute = this.timeTrankiManager.getMinute();\n\n if (hour == 9 && minute == 00) {\n this.trackListFinal.addTrackDay(1);\n }\n }",
"public M csrtMoneyTypeNull(){if(this.get(\"csrtMoneyTypeNot\")==null)this.put(\"csrtMoneyTypeNot\", \"\");this.put(\"csrtMoneyType\", null);return this;}",
"net.opengis.gml.x32.TimeInstantPropertyType addNewBegin();",
"@Override\n public Long getRunningTimeInHours() {\n return null;\n }",
"public Date getAddtime() {\n return addtime;\n }",
"public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}",
"public Integer getAddTime() {\n return addTime;\n }",
"boolean hasSendTime();",
"private boolean verify_AdjustedTimeIsSet() {\n \n boolean res = adjustedTimeIsSet();\n \n try {\n\n if (!res) {\n throw new Exception(\"Cannot provide data related to 'adjusted timestamp'\"\n + \" until it has been generated by a successful call to\"\n + \" `adjust(Shift)`. Data passed may be incorrect.\");\n }\n \n } catch(Exception e) {\n System.err.println(e.toString());\n }\n \n return res;\n \n }",
"boolean hasInstant();",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"public boolean isSetCarpublishtime() {\n return this.carpublishtime != null;\n }",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n stringBuilder0.append(\"alter materialized viewjcsh%4%|@v9\");\n SQLUtil.addOptionalCondition((String) null, stringBuilder0);\n assertEquals(\"alter materialized viewjcsh%4%|@v9 or null\", stringBuilder0.toString());\n }",
"boolean isClockNotSynchronized();",
"public M csmiUpdateTimeStart(Object start){this.put(\"csmiUpdateTimeStart\", start);return this;}",
"Builder addTimeRequired(String value);",
"public void setRowAddTime(Date rowAddTime) {\n this.rowAddTime = rowAddTime;\n }",
"boolean hasDepositEndTime();",
"public boolean hasStartTime() {\n return fieldSetFlags()[0];\n }",
"public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }",
"public boolean hasUseTime() {\n return useTimeBuilder_ != null || useTime_ != null;\n }",
"public boolean hasUseTime() {\n return useTimeBuilder_ != null || useTime_ != null;\n }",
"boolean hasExpiryTimeSecs();",
"boolean addHardTimePlayed(long time);",
"public abstract TimeObject add(long time, int val);",
"public M csrtStatusNull(){if(this.get(\"csrtStatusNot\")==null)this.put(\"csrtStatusNot\", \"\");this.put(\"csrtStatus\", null);return this;}",
"public M csmiDriverNumNull(){if(this.get(\"csmiDriverNumNot\")==null)this.put(\"csmiDriverNumNot\", \"\");this.put(\"csmiDriverNum\", null);return this;}",
"boolean hasErrorTime();",
"public boolean isSetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(STARTTIME$22) != null;\r\n }\r\n }",
"public Criteria andAddTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csmiQqNull(){if(this.get(\"csmiQqNot\")==null)this.put(\"csmiQqNot\", \"\");this.put(\"csmiQq\", null);return this;}"
] | [
"0.74869573",
"0.74575776",
"0.62267554",
"0.61066383",
"0.5970348",
"0.58765554",
"0.56273603",
"0.5536178",
"0.544603",
"0.54226816",
"0.5402759",
"0.53952634",
"0.53649753",
"0.53325415",
"0.5327485",
"0.5320414",
"0.5317739",
"0.52913934",
"0.52620816",
"0.5253631",
"0.5227025",
"0.52106184",
"0.5205118",
"0.5204894",
"0.5199306",
"0.5189404",
"0.5182927",
"0.51378065",
"0.5129683",
"0.5127492",
"0.5126655",
"0.5123957",
"0.51147854",
"0.50934565",
"0.5080577",
"0.5074767",
"0.5061676",
"0.5048562",
"0.5048562",
"0.5039516",
"0.5028601",
"0.5018748",
"0.49931663",
"0.4974329",
"0.49607608",
"0.49538645",
"0.49419972",
"0.49354762",
"0.49354762",
"0.49354762",
"0.49338174",
"0.4931883",
"0.49280262",
"0.49203843",
"0.49180573",
"0.4913117",
"0.4913117",
"0.4913117",
"0.4913117",
"0.4913117",
"0.4913117",
"0.49048132",
"0.4902708",
"0.4902708",
"0.4898134",
"0.48926297",
"0.48914814",
"0.4888785",
"0.48786357",
"0.4871382",
"0.48706245",
"0.4846811",
"0.48453304",
"0.48425385",
"0.4831159",
"0.48288354",
"0.48266205",
"0.48172635",
"0.4816792",
"0.4799965",
"0.47987396",
"0.47982535",
"0.47890806",
"0.47871515",
"0.4784436",
"0.47816926",
"0.47781017",
"0.47744834",
"0.47532967",
"0.4752622",
"0.4752622",
"0.47512102",
"0.47510758",
"0.47469652",
"0.47466356",
"0.47425416",
"0.4740142",
"0.47398517",
"0.47347835",
"0.47321486"
] | 0.7558737 | 0 |
and csmi_add_time >= ? | public M csmiAddTimeStart(Object start){this.put("csmiAddTimeStart", start);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csolAddTimeStart(Object start){this.put(\"csolAddTimeStart\", start);return this;}",
"public Criteria andAddTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeLessThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csseAddTimeStart(Object start){this.put(\"csseAddTimeStart\", start);return this;}",
"boolean addEasyTimePlayed(long time);",
"public Criteria andAddTimeEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csmiAddTimeNull(){if(this.get(\"csmiAddTimeNot\")==null)this.put(\"csmiAddTimeNot\", \"\");this.put(\"csmiAddTime\", null);return this;}",
"public Criteria andAddTimeLessThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public boolean addTime(double time) {\n this.time += time;\n if(time > 0)\n return true;\n else \n return false;\n }",
"public Criteria andAddTimeLessThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasDesiredTime();",
"public M csolAddTimeNull(){if(this.get(\"csolAddTimeNot\")==null)this.put(\"csolAddTimeNot\", \"\");this.put(\"csolAddTime\", null);return this;}",
"boolean addHardTimePlayed(long time);",
"public void setAddTime(Integer addTime) {\n this.addTime = addTime;\n }",
"public M csseAddTimeNull(){if(this.get(\"csseAddTimeNot\")==null)this.put(\"csseAddTimeNot\", \"\");this.put(\"csseAddTime\", null);return this;}",
"public abstract TimeObject add(long time, int val);",
"public void setAddtime(Date addtime) {\r\n this.addtime = addtime;\r\n }",
"boolean hasQueryTimeSec();",
"public void setAddtime(Date addtime) {\n this.addtime = addtime;\n }",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }",
"public Criteria andAddTimeLessThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasExchangeTime();",
"public Criteria andAddTimeLessThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public long addSleepTime(String from,String to,String date){\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues cv = new ContentValues();\n cv.put(COL_SLEEP_FROM,from);\n cv.put(COL_SLEEP_TO,to);\n cv.put(COL_SLEEP_DATE,date);\n cv.put(COL_SLEEP_ACTIVE,\"y\");\n\n return db.insert(TABLE_SLEEP,null,cv);\n }",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"boolean hasTimeBoltBBoltC();",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private void updateClock(String timeToAdd) {\n\t\tint TTA = Integer.parseInt(timeToAdd);\n\t\thours += TTA / 60;\n\t\tminutes += TTA % 60;\n\t\tif (minutes > 60) {\n\t\t\thours++;\n\t\t\tminutes -= 60;\n\t\t}\n\t}",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }",
"@Override\n\tpublic void setAddTime(Date addTime) {\n\t\t\n\t}",
"boolean hasSubmitTime();",
"boolean hasNextCollectTimestampMs();",
"public Criteria andAddTimeGreaterThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasTime();",
"boolean hasTime();",
"public Criteria andAddTimeNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasCollectEndTime();",
"@Override\n\tpublic synchronized boolean add(TracesMessage obj) {\n\t\tTracesMessage log = obj;\n\t\tlong ts =log.getTime();\n\t\tif (ts < startTime || startTime < 0)\n\t\t\tstartTime = ts;\n\t\treturn super.add(obj);\n\t}",
"void add(String question, long time, boolean correct);",
"public Criteria andAddTimeGreaterThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private boolean addBufferToTimeRange(double extraTime, int i){\n if(timeRanges[i][0] - extraTime/2 < 0) { // Checking if the annotation is at the start of the file\n if(timeRanges[i][1] + extraTime < endTimeOfFileInSeconds){ // Seeing if the recording is long enough to add the time buffer to the end time\n timeRanges[i][1] += extraTime;\n } else{ //Failure\n System.out.println(\"Failed to extend annotation \" + i + \" to 1.1s\");\n return false;\n }\n } else if(timeRanges[i][1] + extraTime/2 > endTimeOfFileInSeconds){ // Checking if the annotation is at the end of the file\n if(timeRanges[i][0] - extraTime > 0){ // Seeing if we can add the buffer to the LHS.\n timeRanges[i][0] -= extraTime;\n } else{ //Failure\n System.out.println(\"Failed to extend annotation \" + i + \" to 1.1s\");\n return false;\n }\n } else{\n // Adding buffer to either side\n timeRanges[i][0] -= extraTime/2;\n timeRanges[i][1] += extraTime/2;\n }\n return true;\n }",
"public Criteria andAddTimeGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasStartTime();",
"public void timePasses(){\n crtClock++;\n if(crtClock==25)crtClock=1; // If end of day, reset to 1\n if(crtClock<=opHours)tellMeterToConsumeUnits(unitsPerHr);\n }",
"public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}",
"public Criteria andAddTimeNotEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }",
"boolean hasQueryTimeNsec();",
"private boolean addNewReport(HttpServletRequest request){\n\t\ttry {\n\t\t\tint totalTime = 0;\n\t\t\tString[] act_sub_values = new String[ReportGenerator.act_sub_names.length];\n\t\t\tString[] lower_activity_values = new String[ReportGenerator.lower_activities.length];\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.act_sub_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tact_sub_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t}else {\n\t\t\t\t\tact_sub_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.lower_activities_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tlower_activity_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t} else {\n\t\t\t\t\tlower_activity_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tDate date = new Date(cal.getTimeInMillis()); \n\t\t\tString week = request.getParameter(\"week\");\n\t\t\tint userGroupID = (int) session.getAttribute(\"userGroupID\");\n\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"INSERT INTO reports (user_group_id, date, week, total_time, signed) VALUES (\"+userGroupID+\",'\"+date.toString()+\"',\"+week+\",\"+totalTime+\",\"+0+\")\");\n\n\t\t\tStatement stmt1 = conn.createStatement();\n\t\t\tResultSet rs = stmt1.executeQuery(\"select * from reports where user_group_id = \"+userGroupID+\" and week = \"+week); \n\t\t\tint reportID = -1;\n\t\t\tif (rs.first()) {\n\t\t\t\treportID = rs.getInt(\"id\");\n\t\t\t}\n\t\t\tstmt.close();\n\n\t\t\tString q = \"INSERT INTO report_times (report_id, \";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = ReportGenerator.act_sub_names[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = ReportGenerator.lower_activities[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += ReportGenerator.lower_activities[ReportGenerator.lower_activities.length-1];\n\n\t\t\tq += \") VALUES (\"+reportID+\",\";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = act_sub_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = lower_activity_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += lower_activity_values[lower_activity_values.length-1]+\");\";\n\t\t\tStatement stmt2 = conn.createStatement();\n\t\t\tstmt2.executeUpdate(q);\n\t\t\tstmt2.close();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t\treturn true;\n\t}",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }",
"public Criteria andAddTimeNotEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasTimeRecord();",
"public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }",
"public Criteria andModifyTimeEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setRowAddTime(Date rowAddTime) {\n this.rowAddTime = rowAddTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"boolean hasSolverTimeLimitSeconds();",
"public Criteria andCreateTimeEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"create_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@Test public void shouldGive180MinFor650cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 3 * 60 /*minutes*/ , rs.calculateTime(650) ); \r\n }",
"public Criteria andCreateTimeLessThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"create_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasExpiryTimeSecs();",
"boolean hasSendTime();",
"boolean hasTimeBoltCBoltD();",
"public Date getAddtime() {\r\n return addtime;\r\n }",
"public Criteria andModifyTimeLessThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setRowAddTime(Date rowAddTime) {\n\t\tthis.rowAddTime = rowAddTime;\n\t}",
"boolean hasTimeBoltHBoltE();",
"public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }",
"TemporalService accountingForTransmissionTime();",
"boolean isValidExpTime();",
"public boolean isTimeToSelect();",
"public void addItem(String name, String desc, String cate, java.sql.Date aucE,String priceS) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t java.util.Date utilDate = new java.util.Date();\n\t //java.sql.Date cur = new java.sql.Date(utilDate.getTime());\n\t if(aucE.before(utilDate)){\n\t\t System.out.println(aucE.before(utilDate));\n\t\t throw new IllegalStateException(\"Auction ending time should be later than starting time\");\n\t }\n\t \n\tcallStmt = con.prepareCall(\" {call team5.item_add_Proc(?,?,?,?,?,?)}\");\n callStmt.setString(1,name);\n callStmt.setString(2,desc);\n callStmt.setString(3,cate);\n callStmt.setDate(4, aucE);\n callStmt.setInt(5,this.id);\n callStmt.setInt(6,Integer.parseInt(priceS));\n callStmt.execute();\n callStmt.close();\n }",
"@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }",
"boolean hasUseTime();",
"boolean hasUseTime();",
"public Date getAddtime() {\n return addtime;\n }",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"boolean hasCreateTime();",
"public M csmiUpdateTimeStart(Object start){this.put(\"csmiUpdateTimeStart\", start);return this;}",
"net.opengis.gml.x32.TimeInstantPropertyType addNewBegin();",
"void insertSelective(HrHBscCpuQos record);",
"public void addRequestTimer() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"request-timer\",\n null,\n childrenNames());\n }",
"public static String addTime(String time, int increase)\r\n/* 96: */ {\r\n/* 97:129 */ SimpleDateFormat format = new SimpleDateFormat(\"HH:mm\");\r\n/* 98:130 */ String retTime = \"\";\r\n/* 99: */ try\r\n/* 100: */ {\r\n/* 101:133 */ Date date = format.parse(time);\r\n/* 102:134 */ long Time = date.getTime() / 1000L + increase * 60;\r\n/* 103:135 */ date.setTime(Time * 1000L);\r\n/* 104:136 */ retTime = format.format(date);\r\n/* 105: */ }\r\n/* 106: */ catch (Exception localException) {}\r\n/* 107:141 */ return retTime;\r\n/* 108: */ }",
"boolean hasInstant();",
"public M csmiAddTimeEnd(Object end){this.put(\"csmiAddTimeEnd\", end);return this;}",
"private static boolean interestAlreadyAddedThisMonth() {\n\t\tStatement stmt = null;\n \tConnection conn = null;\n \tString sql = \"\";\n \n\t try {\n\t \tClass.forName(JDBCdriver.JDBC_DRIVER);\n\t \t\n\t \tconn = DriverManager.getConnection(JDBCdriver.DB_URL, JDBCdriver.USERNAME, JDBCdriver.PASSWORD);\n\t \t\n\t stmt = conn.createStatement();\n\t \t \n\t sql = \"SELECT *\" +\n\t \" FROM TRANSACTIONS T\" +\n\t \t \" WHERE T.TYPE = 'A'\";\t \n\t \n ResultSet rs = stmt.executeQuery(sql);\n \t \n \t while(rs.next()){\n \t return true;\n \t }\n \t \n \t rs.close();\n \t \n \t return false;\n\t \n\t }catch(SQLException se){\n\t //Handle errors for JDBC\n\t se.printStackTrace();\n\t }catch(Exception e){\n\t //Handle errors for Class.forName\n\t e.printStackTrace();\n\t }finally{\n\t try{\n\t if(conn!=null)\n\t conn.close();\n\t }catch(SQLException se){\n\t se.printStackTrace();\n\t }//end finally try\n\t }//end try\n\t\treturn false;\n\t}",
"@Test public void shouldGive60MinFor150cent() {\r\n // First hour: $1.5\r\n assertEquals( 60 /*minutes*/, rs.calculateTime(150) ); \r\n }",
"Builder addTimeRequired(String value);",
"private Boolean TimeInRange(String time){\n \n String[] t = time.split(\":\");\n \n int hours = Integer.parseInt(t[0]);\n int minutes = Integer.parseInt(t[1]);\n int seconds = Integer.parseInt(t[2]);\n \n if(hours == 11 && minutes == 59 && (seconds >= 55)){\n return true;\n }\n \n return false;\n \n }"
] | [
"0.5900705",
"0.5681835",
"0.560649",
"0.5565467",
"0.5542467",
"0.55120057",
"0.5492525",
"0.54827964",
"0.5465348",
"0.5463979",
"0.5453049",
"0.5431834",
"0.54220647",
"0.53665173",
"0.53447",
"0.53372335",
"0.53307724",
"0.5298463",
"0.5282218",
"0.52754325",
"0.5219331",
"0.52189267",
"0.5212448",
"0.5180244",
"0.51794565",
"0.51406175",
"0.51236117",
"0.5105018",
"0.51012325",
"0.5069876",
"0.5055403",
"0.5034607",
"0.5018742",
"0.49984193",
"0.49931943",
"0.4987568",
"0.498698",
"0.49822557",
"0.49822557",
"0.49574384",
"0.4934641",
"0.4929454",
"0.4921934",
"0.4918051",
"0.49155042",
"0.49146384",
"0.49097726",
"0.4902564",
"0.48976165",
"0.4895466",
"0.48911998",
"0.4852707",
"0.48514023",
"0.48324764",
"0.4831769",
"0.4830705",
"0.48270434",
"0.48265556",
"0.48020434",
"0.47916782",
"0.4791366",
"0.4791366",
"0.4791366",
"0.47863585",
"0.47858745",
"0.47845274",
"0.47843924",
"0.47686026",
"0.47395784",
"0.47394943",
"0.47242808",
"0.47165495",
"0.47086626",
"0.46855968",
"0.46854106",
"0.4681052",
"0.46801165",
"0.46776706",
"0.46755064",
"0.467171",
"0.4668257",
"0.4668257",
"0.46583104",
"0.46442372",
"0.46442372",
"0.46442372",
"0.46442372",
"0.46442372",
"0.46442372",
"0.46438095",
"0.4638922",
"0.46329832",
"0.46321782",
"0.46314037",
"0.46273267",
"0.46242118",
"0.46229553",
"0.46191657",
"0.46116593",
"0.46112546"
] | 0.55940354 | 3 |
and csmi_add_time <= ? | public M csmiAddTimeEnd(Object end){this.put("csmiAddTimeEnd", end);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csolAddTimeStart(Object start){this.put(\"csolAddTimeStart\", start);return this;}",
"public boolean addTime(double time) {\n this.time += time;\n if(time > 0)\n return true;\n else \n return false;\n }",
"public Criteria andAddTimeEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public M csmiAddTimeNull(){if(this.get(\"csmiAddTimeNot\")==null)this.put(\"csmiAddTimeNot\", \"\");this.put(\"csmiAddTime\", null);return this;}",
"public M csolAddTimeNull(){if(this.get(\"csolAddTimeNot\")==null)this.put(\"csolAddTimeNot\", \"\");this.put(\"csolAddTime\", null);return this;}",
"public M csmiAddTimeStart(Object start){this.put(\"csmiAddTimeStart\", start);return this;}",
"public Criteria andAddTimeEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeLessThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean addEasyTimePlayed(long time);",
"public M csseAddTimeStart(Object start){this.put(\"csseAddTimeStart\", start);return this;}",
"public M csseAddTimeNull(){if(this.get(\"csseAddTimeNot\")==null)this.put(\"csseAddTimeNot\", \"\");this.put(\"csseAddTime\", null);return this;}",
"public void setAddTime(Integer addTime) {\n this.addTime = addTime;\n }",
"boolean hasDesiredTime();",
"public Criteria andAddTimeEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setAddtime(Date addtime) {\r\n this.addtime = addtime;\r\n }",
"public Criteria andAddTimeLessThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeLessThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean addHardTimePlayed(long time);",
"public abstract TimeObject add(long time, int val);",
"public void setAddtime(Date addtime) {\n this.addtime = addtime;\n }",
"public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }",
"if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }",
"private void updateClock(String timeToAdd) {\n\t\tint TTA = Integer.parseInt(timeToAdd);\n\t\thours += TTA / 60;\n\t\tminutes += TTA % 60;\n\t\tif (minutes > 60) {\n\t\t\thours++;\n\t\t\tminutes -= 60;\n\t\t}\n\t}",
"public Criteria andAddTimeLessThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@Override\n\tpublic void setAddTime(Date addTime) {\n\t\t\n\t}",
"public M csolAddTimeEnd(Object end){this.put(\"csolAddTimeEnd\", end);return this;}",
"boolean hasQueryTimeSec();",
"public Criteria andAddTimeLessThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasExchangeTime();",
"public Criteria andAddTimeLessThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time < \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void timePasses(){\n crtClock++;\n if(crtClock==25)crtClock=1; // If end of day, reset to 1\n if(crtClock<=opHours)tellMeterToConsumeUnits(unitsPerHr);\n }",
"public long addSleepTime(String from,String to,String date){\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues cv = new ContentValues();\n cv.put(COL_SLEEP_FROM,from);\n cv.put(COL_SLEEP_TO,to);\n cv.put(COL_SLEEP_DATE,date);\n cv.put(COL_SLEEP_ACTIVE,\"y\");\n\n return db.insert(TABLE_SLEEP,null,cv);\n }",
"public Criteria andAddTimeNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"boolean hasTimeBoltBBoltC();",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"private boolean addBufferToTimeRange(double extraTime, int i){\n if(timeRanges[i][0] - extraTime/2 < 0) { // Checking if the annotation is at the start of the file\n if(timeRanges[i][1] + extraTime < endTimeOfFileInSeconds){ // Seeing if the recording is long enough to add the time buffer to the end time\n timeRanges[i][1] += extraTime;\n } else{ //Failure\n System.out.println(\"Failed to extend annotation \" + i + \" to 1.1s\");\n return false;\n }\n } else if(timeRanges[i][1] + extraTime/2 > endTimeOfFileInSeconds){ // Checking if the annotation is at the end of the file\n if(timeRanges[i][0] - extraTime > 0){ // Seeing if we can add the buffer to the LHS.\n timeRanges[i][0] -= extraTime;\n } else{ //Failure\n System.out.println(\"Failed to extend annotation \" + i + \" to 1.1s\");\n return false;\n }\n } else{\n // Adding buffer to either side\n timeRanges[i][0] -= extraTime/2;\n timeRanges[i][1] += extraTime/2;\n }\n return true;\n }",
"private boolean addNewReport(HttpServletRequest request){\n\t\ttry {\n\t\t\tint totalTime = 0;\n\t\t\tString[] act_sub_values = new String[ReportGenerator.act_sub_names.length];\n\t\t\tString[] lower_activity_values = new String[ReportGenerator.lower_activities.length];\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.act_sub_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tact_sub_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t}else {\n\t\t\t\t\tact_sub_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.lower_activities_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tlower_activity_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t} else {\n\t\t\t\t\tlower_activity_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tDate date = new Date(cal.getTimeInMillis()); \n\t\t\tString week = request.getParameter(\"week\");\n\t\t\tint userGroupID = (int) session.getAttribute(\"userGroupID\");\n\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"INSERT INTO reports (user_group_id, date, week, total_time, signed) VALUES (\"+userGroupID+\",'\"+date.toString()+\"',\"+week+\",\"+totalTime+\",\"+0+\")\");\n\n\t\t\tStatement stmt1 = conn.createStatement();\n\t\t\tResultSet rs = stmt1.executeQuery(\"select * from reports where user_group_id = \"+userGroupID+\" and week = \"+week); \n\t\t\tint reportID = -1;\n\t\t\tif (rs.first()) {\n\t\t\t\treportID = rs.getInt(\"id\");\n\t\t\t}\n\t\t\tstmt.close();\n\n\t\t\tString q = \"INSERT INTO report_times (report_id, \";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = ReportGenerator.act_sub_names[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = ReportGenerator.lower_activities[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += ReportGenerator.lower_activities[ReportGenerator.lower_activities.length-1];\n\n\t\t\tq += \") VALUES (\"+reportID+\",\";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = act_sub_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = lower_activity_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += lower_activity_values[lower_activity_values.length-1]+\");\";\n\t\t\tStatement stmt2 = conn.createStatement();\n\t\t\tstmt2.executeUpdate(q);\n\t\t\tstmt2.close();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasSubmitTime();",
"public Criteria andAddTimeGreaterThanOrEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time >= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public Criteria andAddTimeNotEqualToColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@Override\n\tpublic synchronized boolean add(TracesMessage obj) {\n\t\tTracesMessage log = obj;\n\t\tlong ts =log.getTime();\n\t\tif (ts < startTime || startTime < 0)\n\t\t\tstartTime = ts;\n\t\treturn super.add(obj);\n\t}",
"void add(String question, long time, boolean correct);",
"boolean hasTime();",
"boolean hasTime();",
"boolean hasSolverTimeLimitSeconds();",
"public Criteria andAddTimeGreaterThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }",
"public Criteria andAddTimeNotEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"public void setAddTime(LocalDateTime addTime) {\n this.addTime = addTime;\n }",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"boolean hasCollectEndTime();",
"boolean hasNextCollectTimestampMs();",
"public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }",
"public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }",
"public Criteria andAddTimeGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@Test public void shouldGive180MinFor650cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 3 * 60 /*minutes*/ , rs.calculateTime(650) ); \r\n }",
"public Criteria andAddTimeGreaterThanColumn(SaleClassifyGood.Column column) {\n addCriterion(new StringBuilder(\"add_time > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void setRowAddTime(Date rowAddTime) {\n this.rowAddTime = rowAddTime;\n }",
"boolean hasExpiryTimeSecs();",
"public Date getAddtime() {\r\n return addtime;\r\n }",
"boolean hasStartTime();",
"public void setRowAddTime(Date rowAddTime) {\n\t\tthis.rowAddTime = rowAddTime;\n\t}",
"public M csseAddTimeEnd(Object end){this.put(\"csseAddTimeEnd\", end);return this;}",
"boolean hasTimeRecord();",
"TemporalService accountingForTransmissionTime();",
"private boolean canInsertLast(Plan plan,POI poi,Trip trip,Time currentTime,Plan mPlan,boolean skip){\n // if poi cost and time addtion to plan full cost and time satisify the constrains: \n // 1- full cost <= budget\n // 2- fulltime-poiTime >=poi.startTime if skip is false only\n // 3- fulltime <= trip.endTime\n // 4- fulltime <= poi.colseTime\n // insert and make Calculations and change last\n\n // Check 1\n if((plan.getFullCost()+poi.getCost())<=trip.getBudget()){\n // Check 2\n POI last=plan.getLastPOI();\n \n if(hfun(currentTime, last, poi, mPlan, skip)){\n // Check3\n // cal poi duration\n int fullduration=poi.getDuration();\n //cal waste time\n if(skip){\n Time currTime = new Time(currentTime.hour,currentTime.min);\n if(last!=null)\n currTime.add(last.getShortestPath(poi.getId()));\n else if(mPlan!=null&&mPlan.getLastPOI()!=null)\n currTime.add(mPlan.getLastPOI().getShortestPath(poi.getId()));\n int x = Time.substract(currTime, poi.getOpenTime());\n fullduration+=(x==-1)?0:x;\n }\n //cal travel time\n if(last!=null)\n fullduration+=last.getShortestPath(poi.getId());\n else if(mPlan!=null){\n POI mLast=mPlan.getLastPOI();\n if(mLast!=null)\n fullduration+= mLast.getShortestPath(poi.getId());\n }\n if(Time.isIn(currentTime, fullduration, trip.getEndTime())){\n // Check4\n if(Time.isIn(currentTime, fullduration, poi.getCloseTime())){\n return true;\n }\n }\n }\n }\n return false;\n }",
"public void addDelayTime(int add)\r\n\t{\r\n\t\tString[] parts = departureTime.split(\":\");\r\n\t\tString[] parts1 = arrivalTime.split(\":\");\r\n\t\tString departureHour = parts[0];\r\n\t\tString departureMin = parts[1];\r\n\t\tString arrivalHour = parts1[0];\r\n\t\tString arrivalMin = parts1[1];\r\n\t\t// converting string to integer\r\n\t\tint departureHour1 = Integer.parseInt(departureHour);\r\n\t\tint arrivalHour1 = Integer.parseInt(arrivalHour);\r\n\t\t// adding delay time and start form 0 if it is 24\r\n\t\tint departHour = (departureHour1 + add)%24;\r\n\t\tint arriveHour = (arrivalHour1+add)%24;\r\n\t\tString dHour = String.format(\"%02d\",departHour);\r\n\t\tString aHour = String.format(\"%02d\",arriveHour);\r\n\t\t// combining hour and minute.\r\n\t\tthis.departureTime = dHour + \":\" + departureMin;\r\n\t\tthis.arrivalTime = aHour + \":\" + arrivalMin;\r\n\t\t\r\n\t}",
"public String check_loged_time(Operator op){\n String positive = \"соблюдено\";\n String negative = \"не соблюдено\";\n int loged_time_seconds = (int) get_seconds(op.getLoged_time());\n int loged_time_value = (int) get_seconds(loged_time_9);\n int delay_seconds;\n if(op.getShift()==Shift.nine){\n delay_seconds = 32400-loged_time_seconds;\n if(delay_seconds<=loged_time_value)\n return positive;\n else {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n\n if(op.getShift()==Shift.twelve){\n delay_seconds = 43200-loged_time_seconds;\n if(delay_seconds<=loged_time_value)\n return positive;\n else\n {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n\n return positive;\n }",
"boolean isValidExpTime();",
"@Test\n public void testAdd(){\n \tCountDownTimer s1 = new CountDownTimer(1, 0, 0);\n \ts1.add(1800);\n \tassertEquals(s1.toString(), \"1:30:00\");\n \t\n \tCountDownTimer s2 = new CountDownTimer(0, 30, 0);\n \ts1.add(s2);\n \tassertEquals(s1.toString(), \"2:00:00\");\n }",
"IDateTimeValueType add( ITimeDurationValueType duration );",
"public Date getAddtime() {\n return addtime;\n }",
"@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }",
"public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }",
"public Criteria andModifyTimeEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public void addBonusTime(int time) {\n if (time == 0) {\n System.out.println(\"No bonus time was added to the timer.\");\n printTimeRemaining();\n } else {\n System.out.println(time + \" seconds were added to the timer!\");\n time = time * 1000; //convert to milliseconds\n bonusTime += time;\n printTimeRemaining();\n }\n }",
"public boolean canReserve(int time,int nodeId)\n {\n\n Pair<Integer,Agent> pair = this.goals.get(nodeId);\n //It is a goal\n if(pair!=null)\n {\n Integer time2 = pair.getKey();\n if(time2 != null) {\n if (time2 <= time) {\n return false;\n }\n }\n }\n\n\n Map<Integer,Agent> times = this.ocuupied_times.get(nodeId);\n //first time\n if(times ==null)\n {\n //First time\n Map<Integer,Agent> map = new HashMap<>();\n this.ocuupied_times.put(nodeId,map);\n return true;\n }\n\n boolean b = !times.containsKey(time);;\n return b;\n\n\n\n }",
"public void addItem(String name, String desc, String cate, java.sql.Date aucE,String priceS) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t java.util.Date utilDate = new java.util.Date();\n\t //java.sql.Date cur = new java.sql.Date(utilDate.getTime());\n\t if(aucE.before(utilDate)){\n\t\t System.out.println(aucE.before(utilDate));\n\t\t throw new IllegalStateException(\"Auction ending time should be later than starting time\");\n\t }\n\t \n\tcallStmt = con.prepareCall(\" {call team5.item_add_Proc(?,?,?,?,?,?)}\");\n callStmt.setString(1,name);\n callStmt.setString(2,desc);\n callStmt.setString(3,cate);\n callStmt.setDate(4, aucE);\n callStmt.setInt(5,this.id);\n callStmt.setInt(6,Integer.parseInt(priceS));\n callStmt.execute();\n callStmt.close();\n }",
"boolean hasQueryTimeNsec();",
"public static String addTime(String time, int increase)\r\n/* 96: */ {\r\n/* 97:129 */ SimpleDateFormat format = new SimpleDateFormat(\"HH:mm\");\r\n/* 98:130 */ String retTime = \"\";\r\n/* 99: */ try\r\n/* 100: */ {\r\n/* 101:133 */ Date date = format.parse(time);\r\n/* 102:134 */ long Time = date.getTime() / 1000L + increase * 60;\r\n/* 103:135 */ date.setTime(Time * 1000L);\r\n/* 104:136 */ retTime = format.format(date);\r\n/* 105: */ }\r\n/* 106: */ catch (Exception localException) {}\r\n/* 107:141 */ return retTime;\r\n/* 108: */ }",
"boolean hasUseTime();",
"boolean hasUseTime();",
"public void addRequestTimer() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"request-timer\",\n null,\n childrenNames());\n }",
"@Override\n\tboolean allow() {\n\t\tlong curTime = System.currentTimeMillis()/1000 * 1000;\n\t\tlong boundary = curTime - 1000;\n\t\tsynchronized (log) {\n\t\t\t//1. Remove old ones before the lower boundary\n\t\t\twhile (!log.isEmpty() && log.element() <= boundary) {\n\t\t\t\tlog.poll();\n\t\t\t}\n\t\t\t//2. Add / log the new time\n\t\t\tlog.add(curTime);\n\t\t\tboolean allow = log.size() <= maxReqPerUnitTime;\n\t\t\tSystem.out.println(curTime + \", log size = \" + log.size()+\", allow=\"+allow);\n\t\t\treturn allow;\n\t\t}\n\t}",
"public boolean isTimeToSelect();",
"public Integer getAddTime() {\n return addTime;\n }",
"@Test public void shouldGive240MinFor950cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 4 * 60 /*minutes*/ , rs.calculateTime(950) ); \r\n }",
"protected boolean isConsistentWith(BasisCondition uc)\n{\n if (uc instanceof BasisConditionDuration) {\n BasisConditionDuration bct = (BasisConditionDuration) uc;\n if (bct.base_condition == bct.base_condition) {\n\t if (max_time <= bct.min_time || min_time >= bct.max_time) return false;\n\t return true;\n }\n }\n\n return base_condition.isConsistentWith(uc);\n}",
"@Test public void shouldGive60MinFor150cent() {\r\n // First hour: $1.5\r\n assertEquals( 60 /*minutes*/, rs.calculateTime(150) ); \r\n }",
"private boolean validateArrivingTime(StopPoint currentSP) {\n\t\ttry {\n\t\t\tint time = Integer.valueOf(hourComboBox.getValue()) * 60;\n\t\t\ttime += Integer.valueOf(minuteComboBox.getValue());\n\t\t\ttime += timeIndicatorComboBox.getValue().equals(\"PM\") ? 12 * 60 : 0;\n\t\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\t\tif (stopPoint.getTime() != null && !stopPoint.getTime().equals(\"\") && stopPoint != currentSP) {\n\t\t\t\t\tString[] spTimeString = stopPoint.getTime().split(\"[ :]+\");\n\t\t\t\t\tint spTime = Integer.valueOf(spTimeString[0]) * 60;\n\t\t\t\t\tspTime += Integer.valueOf(spTimeString[1]);\n\t\t\t\t\tspTime += spTimeString[2].equals(\"PM\") ? 12 * 60 : 0;\n\n\t\t\t\t\tif (time <= spTime + 5 && time >= spTime - 5) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasSendTime();",
"public Criteria andModifyTimeLessThanOrEqualToColumn(TCpyBankCredit.Column column) {\n addCriterion(new StringBuilder(\"modify_time <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"public static void add_cost(boolean is_total, int seq, long cost){\n\t\tif(cost > 25 * 60 * 1000){//points cross two days, dump it\n\t\t\t//cost -= 25 * 60 * 1000;\n\t\t\treturn;\n\t\t}\n\t\tif(is_total){\n\t\t\tsynchronized(cost_all[seq]){\n\t\t\t\tcost_all[seq].add(cost);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tsynchronized(cost_matching[seq]){\n\t\t\t\tcost_matching[seq].add(cost);\n\t\t\t}\n\t\t}\t\n\t}",
"private static boolean interestAlreadyAddedThisMonth() {\n\t\tStatement stmt = null;\n \tConnection conn = null;\n \tString sql = \"\";\n \n\t try {\n\t \tClass.forName(JDBCdriver.JDBC_DRIVER);\n\t \t\n\t \tconn = DriverManager.getConnection(JDBCdriver.DB_URL, JDBCdriver.USERNAME, JDBCdriver.PASSWORD);\n\t \t\n\t stmt = conn.createStatement();\n\t \t \n\t sql = \"SELECT *\" +\n\t \" FROM TRANSACTIONS T\" +\n\t \t \" WHERE T.TYPE = 'A'\";\t \n\t \n ResultSet rs = stmt.executeQuery(sql);\n \t \n \t while(rs.next()){\n \t return true;\n \t }\n \t \n \t rs.close();\n \t \n \t return false;\n\t \n\t }catch(SQLException se){\n\t //Handle errors for JDBC\n\t se.printStackTrace();\n\t }catch(Exception e){\n\t //Handle errors for Class.forName\n\t e.printStackTrace();\n\t }finally{\n\t try{\n\t if(conn!=null)\n\t conn.close();\n\t }catch(SQLException se){\n\t se.printStackTrace();\n\t }//end finally try\n\t }//end try\n\t\treturn false;\n\t}",
"private Boolean TimeInRange(String time){\n \n String[] t = time.split(\":\");\n \n int hours = Integer.parseInt(t[0]);\n int minutes = Integer.parseInt(t[1]);\n int seconds = Integer.parseInt(t[2]);\n \n if(hours == 11 && minutes == 59 && (seconds >= 55)){\n return true;\n }\n \n return false;\n \n }",
"public void grantTickets(){\n //45mins\n if (tempTime >= 10){\n addTicket();\n }\n tempTime = 0;\n }"
] | [
"0.592843",
"0.5672957",
"0.5637055",
"0.56273013",
"0.5620731",
"0.55521727",
"0.55490154",
"0.5531373",
"0.5525492",
"0.55204785",
"0.55008847",
"0.5489991",
"0.5470167",
"0.5455024",
"0.5440172",
"0.5427011",
"0.5417243",
"0.5417087",
"0.5413697",
"0.5412553",
"0.528716",
"0.5195644",
"0.51566577",
"0.51549673",
"0.5148085",
"0.51434296",
"0.51397234",
"0.51369095",
"0.511915",
"0.5113456",
"0.5092389",
"0.5088872",
"0.50339526",
"0.503176",
"0.50246274",
"0.5012656",
"0.49904123",
"0.49885535",
"0.49835524",
"0.497347",
"0.4969401",
"0.4959071",
"0.49565646",
"0.49333775",
"0.49331486",
"0.49331486",
"0.49285334",
"0.4926031",
"0.49100846",
"0.49079472",
"0.49017736",
"0.49017736",
"0.49017736",
"0.4900214",
"0.48957306",
"0.48718464",
"0.48603782",
"0.4859309",
"0.48584715",
"0.48543164",
"0.48536998",
"0.4842639",
"0.4800154",
"0.47997338",
"0.4774663",
"0.47654578",
"0.47612444",
"0.4761001",
"0.47549522",
"0.47538087",
"0.47460458",
"0.4742703",
"0.47390604",
"0.47357082",
"0.47336584",
"0.47331536",
"0.4727943",
"0.47274652",
"0.4710921",
"0.47025785",
"0.47021222",
"0.46967235",
"0.4691971",
"0.4682647",
"0.46774194",
"0.46774194",
"0.46678528",
"0.46645474",
"0.4662423",
"0.4661758",
"0.46576142",
"0.46540603",
"0.46464643",
"0.46419767",
"0.4641211",
"0.46337733",
"0.46320072",
"0.46241882",
"0.4619241",
"0.4617866"
] | 0.48202908 | 62 |
and csmi_status is null | public M csmiStatusNull(){if(this.get("csmiStatusNot")==null)this.put("csmiStatusNot", "");this.put("csmiStatus", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"public M csrtStatusNull(){if(this.get(\"csrtStatusNot\")==null)this.put(\"csrtStatusNot\", \"\");this.put(\"csrtStatus\", null);return this;}",
"public M csrtIsIncomeNull(){if(this.get(\"csrtIsIncomeNot\")==null)this.put(\"csrtIsIncomeNot\", \"\");this.put(\"csrtIsIncome\", null);return this;}",
"boolean getActiveNull();",
"public M csmiIdNull(){if(this.get(\"csmiIdNot\")==null)this.put(\"csmiIdNot\", \"\");this.put(\"csmiId\", null);return this;}",
"public M csseIdNull(){if(this.get(\"csseIdNot\")==null)this.put(\"csseIdNot\", \"\");this.put(\"csseId\", null);return this;}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"boolean getValueCharacteristicIdNull();",
"boolean getConditionListNull();",
"boolean getXAxisCharacteristicIdNull();",
"public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"public boolean is_set_status() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public M csmiContactNull(){if(this.get(\"csmiContactNot\")==null)this.put(\"csmiContactNot\", \"\");this.put(\"csmiContact\", null);return this;}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public M csolFromNull(){if(this.get(\"csolFromNot\")==null)this.put(\"csolFromNot\", \"\");this.put(\"csolFrom\", null);return this;}",
"public M csrtCanInvoiceNull(){if(this.get(\"csrtCanInvoiceNot\")==null)this.put(\"csrtCanInvoiceNot\", \"\");this.put(\"csrtCanInvoice\", null);return this;}",
"public M csrtIdNull(){if(this.get(\"csrtIdNot\")==null)this.put(\"csrtIdNot\", \"\");this.put(\"csrtId\", null);return this;}",
"@Override\n\tpublic String getcond() {\n\t\treturn null;\n\t}",
"public M csmiAddressNull(){if(this.get(\"csmiAddressNot\")==null)this.put(\"csmiAddressNot\", \"\");this.put(\"csmiAddress\", null);return this;}",
"@Override\n public List<Object> getMiniChartCommStatusByModemType2(\n Map<String, Object> condition) {\n return null;\n }",
"public M csmiHostNull(){if(this.get(\"csmiHostNot\")==null)this.put(\"csmiHostNot\", \"\");this.put(\"csmiHost\", null);return this;}",
"@Override\n public List<Object> getMiniChartCommStatusByModemType(\n Map<String, Object> condition) {\n return null;\n }",
"public M csseFinishNull(){if(this.get(\"csseFinishNot\")==null)this.put(\"csseFinishNot\", \"\");this.put(\"csseFinish\", null);return this;}",
"boolean isSetStatus();",
"public M csseStartNull(){if(this.get(\"csseStartNot\")==null)this.put(\"csseStartNot\", \"\");this.put(\"csseStart\", null);return this;}",
"public M csmiNameNull(){if(this.get(\"csmiNameNot\")==null)this.put(\"csmiNameNot\", \"\");this.put(\"csmiName\", null);return this;}",
"boolean getSearchNodeCharacteristicIdsNull();",
"public void updatePICstatus2() {\n try {\n Connection connection = connectionClass.CONN();\n String query = \"UPDATE stationdashboard SET Status=2, PIC=NULL where Station='\" + Station + \"' and Line ='\" + Line + \"'\";\n PreparedStatement stmt = connection.prepareStatement(query);\n stmt.execute();\n } catch (SQLException ex) {\n }\n }",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public M csmiDriverImageNull(){if(this.get(\"csmiDriverImageNot\")==null)this.put(\"csmiDriverImageNot\", \"\");this.put(\"csmiDriverImage\", null);return this;}",
"public boolean checkControlStringStatus(String userId, String branchCode, String functionId, String operation, String txnStatus, String authStatus, String interfaceStatus) throws SQLException {\n boolean status = false;\n String finalControlString=null;\n PreparedStatement psmnt1=null;\n PreparedStatement psmnt2=null;\n PreparedStatement psmnt3=null;\n PreparedStatement psmnt4=null;\n PreparedStatement psmnt5=null;\n PreparedStatement psmnt6=null;\n PreparedStatement psmnt7=null;\n PreparedStatement psmnt8=null;\n ResultSet rs1=null;\n ResultSet rs2=null;\n ResultSet rs3=null;\n ResultSet rs4=null;\n ResultSet rs5=null;\n ResultSet rs6=null;\n ResultSet rs7=null;\n \n try {\n psmnt1 =conn.prepareStatement(\"select role_id , role_function , control_string from smtbs_role_detail where role_id in (select role_id from smtbs_user_role where user_id = ? and branch_code= ?) and role_function = ? \");\n psmnt1.setString(1, userId);\n psmnt1.setString(2, branchCode);\n psmnt1.setString(3, functionId);\n psmnt2 = conn.prepareStatement(\" select control_string from smtbs_users_functions where user_id = ? and function_id = ? and branch_code= ?\");\n psmnt2.setString(1, userId);\n psmnt2.setString(2, functionId);\n psmnt2.setString(3, branchCode);\n psmnt3 = conn.prepareStatement(\" select control_string from SMTBS_TXN_STATUS where txn_status = ? and auth_status = ? and interface_status = nvl(?,'XXXXX')\");\n psmnt3.setString(1, txnStatus);\n psmnt3.setString(2, authStatus);\n psmnt3.setString(3, interfaceStatus);\n psmnt4 =conn.prepareStatement(\" select control_string from SMTBS_MENU where function_id = ?\");\n psmnt4.setString(1, functionId);\n psmnt5 = conn.prepareStatement(\"select lpad(?,16,'0') from dual\");\n psmnt6 = conn.prepareStatement(\"select to_char(to_number(?) + to_number(?) + to_number(?) ) from dual\");\n psmnt7 = conn.prepareStatement(\"select translate(?,'3210','1000') from dual\");\n \n \n finalControlString = \"0000000000000000\";\n String tempControlString = \"0000000000000000\";\n String userControlString = \"0000000000000000\";\n String funcControlString = \"0000000000000000\";\n String tranControlString = \"1111111111111111\";\n String interControlString=null;\n \n rs1 = psmnt1.executeQuery();\n rs2 = psmnt2.executeQuery();\n if (rs2.next()){\n userControlString = rs2.getString(1);\n }\n rs3 = psmnt3.executeQuery();\n if (rs3.next())\n tranControlString = rs3.getString(1);\n rs4 = psmnt4.executeQuery();\n if (rs4.next())\n funcControlString = rs4.getString(1);\n if (userControlString.equals(\"0000000000000000\")) {\n while (rs1.next()) {\n interControlString = rs1.getString(\"control_string\");\n userControlString = fn_and_controlstrings(userControlString, \n interControlString);\n \n }\n \n }\n if (tranControlString == null)\n tranControlString = \"1111111111111111\";\n if (funcControlString == null)\n funcControlString = null;\n psmnt5.setString(1, userControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n userControlString = rs5.getString(1);\n psmnt5.setString(1, tranControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n tranControlString = rs5.getString(1);\n psmnt5.setString(1, funcControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n funcControlString = rs5.getString(1);\n psmnt6.setString(1, userControlString);\n psmnt6.setString(2, tranControlString);\n psmnt6.setString(3, funcControlString);\n rs6 = psmnt6.executeQuery();\n if (rs6.next())\n tempControlString = rs6.getString(1);\n psmnt7.setString(1, tempControlString);\n rs7 = psmnt7.executeQuery();\n if (rs7.next())\n finalControlString = rs7.getString(1);\n List funcList = FCSMSUtility.getActionNames(finalControlString);\n for (int i=0; i<funcList.size(); i++) {\n String lAction = (String) funcList.get(i);\n if (lAction.equalsIgnoreCase(operation)) {\n status = true;\n break;\n }\n }\n }catch (Exception e) {\n dbg(\"checkControlStringStatus-->Exception = \"+ e.getMessage());\n e.printStackTrace();\n }finally{\n if(psmnt1!=null&&rs1!=null){\n psmnt1.close();\n rs1.close();\n }\n if(psmnt2!=null&&rs2!=null){\n psmnt2.close();\n rs2.close();\n }\n if(psmnt3!=null&&rs3!=null){\n psmnt3.close();\n rs3.close();\n }\n if(psmnt4!=null&&rs4!=null){\n psmnt4.close();\n rs4.close();\n }\n if(psmnt5!=null&&rs5!=null){\n psmnt5.close();\n rs5.close();\n }\n if(psmnt6!=null&&rs6!=null){\n psmnt6.close();\n rs6.close();\n }\n if(psmnt7!=null&&rs7!=null){\n psmnt7.close();\n rs7.close();\n }\n \n }\n dbg(\"getControlString-->ControlString : \" + finalControlString+\" Status: \"+status);\n return status;\n }",
"public M csseBattleNull(){if(this.get(\"csseBattleNot\")==null)this.put(\"csseBattleNot\", \"\");this.put(\"csseBattle\", null);return this;}",
"public M csmiCompanyNull(){if(this.get(\"csmiCompanyNot\")==null)this.put(\"csmiCompanyNot\", \"\");this.put(\"csmiCompany\", null);return this;}",
"public M csmiDriverNumNull(){if(this.get(\"csmiDriverNumNot\")==null)this.put(\"csmiDriverNumNot\", \"\");this.put(\"csmiDriverNum\", null);return this;}",
"boolean getNodeCharacteristicIdNull();",
"public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}",
"public boolean isSetStatusCard() {\n\t\treturn org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUSCARD_ISSET_ID);\n\t}",
"public boolean isSetStatusPsw() {\n\t\treturn org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUSPSW_ISSET_ID);\n\t}",
"public M csmiMemberIdNull(){if(this.get(\"csmiMemberIdNot\")==null)this.put(\"csmiMemberIdNot\", \"\");this.put(\"csmiMemberId\", null);return this;}",
"public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}",
"boolean isStatusSuspensao();",
"public boolean hasC() {\n return c_ != null;\n }",
"@Override\n public List<Object> getMiniChartCommStatusByLocation(\n Map<String, Object> condition) {\n return null;\n }",
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"public M csseAddressNull(){if(this.get(\"csseAddressNot\")==null)this.put(\"csseAddressNot\", \"\");this.put(\"csseAddress\", null);return this;}",
"boolean isSetStaEnd();",
"public M csseHostNull(){if(this.get(\"csseHostNot\")==null)this.put(\"csseHostNot\", \"\");this.put(\"csseHost\", null);return this;}",
"public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}",
"boolean isSetCit();",
"public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}",
"boolean isSetNcbistdaa();",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public boolean isNull()\n\t{\n\t\treturn cp.isNull();\n\t}",
"public boolean isSetStatusname() {\n return this.statusname != null;\n }",
"@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }",
"@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }",
"boolean isNull();",
"public M csmiNationNull(){if(this.get(\"csmiNationNot\")==null)this.put(\"csmiNationNot\", \"\");this.put(\"csmiNation\", null);return this;}",
"public M csmiUpdateTimeNull(){if(this.get(\"csmiUpdateTimeNot\")==null)this.put(\"csmiUpdateTimeNot\", \"\");this.put(\"csmiUpdateTime\", null);return this;}",
"boolean isSetStaStart();",
"private boolean isEmpty( int r, int c ) {\n\treturn matrix[r][c] == null;\n }",
"@Test\n public void testMatchesStatusNullStatus() {\n BgpSessionCompatibilityQuestion q = new BgpSessionCompatibilityQuestion(null, null, null, null);\n\n for (ConfiguredSessionStatus status : ConfiguredSessionStatus.values()) {\n assertTrue(status.toString(), q.matchesStatus(status));\n }\n }",
"public boolean isEmptyStatus() {\r\n if(status == null){\r\n return true;\r\n }\r\n if(status.isEmpty()){\r\n return true;\r\n }\r\n return status.length() == 0;\r\n }",
"private void chkPRMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from co_prmst\";\n\t\t\tM_strSQLQRY += \" where pr_prdcd = '\"+strPRDCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdPRMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in CO_PRMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t\t//System.out.println(M_strSQLQRY);\n\t}catch(Exception L_EX){\n\t\t\tsetMSG(L_EX,\"chkPRMST\");\n\t\t}\n\t}",
"boolean isNullOmittable();",
"boolean getCampaignIdNull();",
"boolean getYAxisCharacteristicIdNull();",
"private void chkSTMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from fg_stmst\";\n\t\t\tM_strSQLQRY += \" where st_CMPCD = '\"+cl_dat.M_strCMPCD_pbst+\"' and st_wrhtp = '\"+strWRHTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_prdtp = '\"+strPRDTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_lotno = '\"+strLOTNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_rclno = '\"+strRCLNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_pkgtp = '\"+strPKGTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_mnlcd = '\"+strMNLCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdSTMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in FG_STMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"chkSTMST\");\n\t\t}\n\t}",
"public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}",
"@Override\n public List<Object> getMiniChartModemTypeByCommStatus(\n Map<String, Object> condition) {\n return null;\n }",
"public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}",
"boolean isSetIsManaged();",
"@Override\n public String localStatus(DeviceId deviceId) {\n return null;\n }",
"private boolean checkNotCanceledReservation(int id) throws SQLException {\n\t\tcheckNotCanceledReservationStatement.clearParameters();\n\t\tcheckNotCanceledReservationStatement.setInt(1, id);\n\t\tcheckNotCanceledReservationStatement.setString(2, this.username);\n\t\tResultSet result = checkNotCanceledReservationStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkNotCanceledReservation: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}",
"public boolean isNull(){\n return false;\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"null\", stringBuilder0.toString());\n }",
"public void notifyNoAcctReport (COPSPdpOSReqStateMan man);",
"public boolean isNotNullSredCode() {\n return genClient.cacheValueIsNotNull(CacheKey.sredCode);\n }",
"public M csseUpdateTimeNull(){if(this.get(\"csseUpdateTimeNot\")==null)this.put(\"csseUpdateTimeNot\", \"\");this.put(\"csseUpdateTime\", null);return this;}",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();"
] | [
"0.7032041",
"0.6803773",
"0.58359027",
"0.58275485",
"0.5734485",
"0.5567491",
"0.5561771",
"0.5474577",
"0.54726905",
"0.543057",
"0.5381779",
"0.5331051",
"0.53047705",
"0.5299771",
"0.5298906",
"0.5298906",
"0.5298906",
"0.5298906",
"0.5298906",
"0.5268107",
"0.52680415",
"0.52616274",
"0.5256157",
"0.5245298",
"0.5214744",
"0.5212331",
"0.520158",
"0.5198957",
"0.5183036",
"0.5169008",
"0.5159931",
"0.5139222",
"0.51199025",
"0.51182675",
"0.5117238",
"0.51153946",
"0.5087206",
"0.50842804",
"0.5081397",
"0.50715524",
"0.5066407",
"0.5063844",
"0.5012336",
"0.49980244",
"0.4996409",
"0.49952382",
"0.49777895",
"0.49775377",
"0.49513832",
"0.49496022",
"0.4948769",
"0.49452677",
"0.49348548",
"0.49325818",
"0.49192786",
"0.49167135",
"0.4914664",
"0.49094468",
"0.490751",
"0.4896644",
"0.48829272",
"0.48763782",
"0.48763782",
"0.48759022",
"0.4872945",
"0.4868771",
"0.4864284",
"0.48593464",
"0.48568094",
"0.48566392",
"0.48565045",
"0.48526382",
"0.48499626",
"0.4844548",
"0.48435313",
"0.4830148",
"0.4824461",
"0.48223454",
"0.481972",
"0.48179197",
"0.48015565",
"0.48004693",
"0.47892854",
"0.47847146",
"0.47826102",
"0.47813192",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084",
"0.47808084"
] | 0.72864586 | 0 |
and csmi_status >= ? | public M csmiStatusMin(Object min){this.put("csmiStatusMin", min);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getStatusQuery() {\n return \"where \" + IBOUB_OPX_NettingScheduler.SCHEDULERSTATUS + \" = ? \";\n }",
"Computer findFirstByActiveTrueAndStatusOrderByPriorityAsc(EnumComputerStatus status);",
"Computer findFirstByActiveTrueAndStatusOrderByPriorityDesc(EnumComputerStatus status);",
"public int getCBRStatus();",
"public boolean checkControlStringStatus(String userId, String branchCode, String functionId, String operation, String txnStatus, String authStatus, String interfaceStatus) throws SQLException {\n boolean status = false;\n String finalControlString=null;\n PreparedStatement psmnt1=null;\n PreparedStatement psmnt2=null;\n PreparedStatement psmnt3=null;\n PreparedStatement psmnt4=null;\n PreparedStatement psmnt5=null;\n PreparedStatement psmnt6=null;\n PreparedStatement psmnt7=null;\n PreparedStatement psmnt8=null;\n ResultSet rs1=null;\n ResultSet rs2=null;\n ResultSet rs3=null;\n ResultSet rs4=null;\n ResultSet rs5=null;\n ResultSet rs6=null;\n ResultSet rs7=null;\n \n try {\n psmnt1 =conn.prepareStatement(\"select role_id , role_function , control_string from smtbs_role_detail where role_id in (select role_id from smtbs_user_role where user_id = ? and branch_code= ?) and role_function = ? \");\n psmnt1.setString(1, userId);\n psmnt1.setString(2, branchCode);\n psmnt1.setString(3, functionId);\n psmnt2 = conn.prepareStatement(\" select control_string from smtbs_users_functions where user_id = ? and function_id = ? and branch_code= ?\");\n psmnt2.setString(1, userId);\n psmnt2.setString(2, functionId);\n psmnt2.setString(3, branchCode);\n psmnt3 = conn.prepareStatement(\" select control_string from SMTBS_TXN_STATUS where txn_status = ? and auth_status = ? and interface_status = nvl(?,'XXXXX')\");\n psmnt3.setString(1, txnStatus);\n psmnt3.setString(2, authStatus);\n psmnt3.setString(3, interfaceStatus);\n psmnt4 =conn.prepareStatement(\" select control_string from SMTBS_MENU where function_id = ?\");\n psmnt4.setString(1, functionId);\n psmnt5 = conn.prepareStatement(\"select lpad(?,16,'0') from dual\");\n psmnt6 = conn.prepareStatement(\"select to_char(to_number(?) + to_number(?) + to_number(?) ) from dual\");\n psmnt7 = conn.prepareStatement(\"select translate(?,'3210','1000') from dual\");\n \n \n finalControlString = \"0000000000000000\";\n String tempControlString = \"0000000000000000\";\n String userControlString = \"0000000000000000\";\n String funcControlString = \"0000000000000000\";\n String tranControlString = \"1111111111111111\";\n String interControlString=null;\n \n rs1 = psmnt1.executeQuery();\n rs2 = psmnt2.executeQuery();\n if (rs2.next()){\n userControlString = rs2.getString(1);\n }\n rs3 = psmnt3.executeQuery();\n if (rs3.next())\n tranControlString = rs3.getString(1);\n rs4 = psmnt4.executeQuery();\n if (rs4.next())\n funcControlString = rs4.getString(1);\n if (userControlString.equals(\"0000000000000000\")) {\n while (rs1.next()) {\n interControlString = rs1.getString(\"control_string\");\n userControlString = fn_and_controlstrings(userControlString, \n interControlString);\n \n }\n \n }\n if (tranControlString == null)\n tranControlString = \"1111111111111111\";\n if (funcControlString == null)\n funcControlString = null;\n psmnt5.setString(1, userControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n userControlString = rs5.getString(1);\n psmnt5.setString(1, tranControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n tranControlString = rs5.getString(1);\n psmnt5.setString(1, funcControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n funcControlString = rs5.getString(1);\n psmnt6.setString(1, userControlString);\n psmnt6.setString(2, tranControlString);\n psmnt6.setString(3, funcControlString);\n rs6 = psmnt6.executeQuery();\n if (rs6.next())\n tempControlString = rs6.getString(1);\n psmnt7.setString(1, tempControlString);\n rs7 = psmnt7.executeQuery();\n if (rs7.next())\n finalControlString = rs7.getString(1);\n List funcList = FCSMSUtility.getActionNames(finalControlString);\n for (int i=0; i<funcList.size(); i++) {\n String lAction = (String) funcList.get(i);\n if (lAction.equalsIgnoreCase(operation)) {\n status = true;\n break;\n }\n }\n }catch (Exception e) {\n dbg(\"checkControlStringStatus-->Exception = \"+ e.getMessage());\n e.printStackTrace();\n }finally{\n if(psmnt1!=null&&rs1!=null){\n psmnt1.close();\n rs1.close();\n }\n if(psmnt2!=null&&rs2!=null){\n psmnt2.close();\n rs2.close();\n }\n if(psmnt3!=null&&rs3!=null){\n psmnt3.close();\n rs3.close();\n }\n if(psmnt4!=null&&rs4!=null){\n psmnt4.close();\n rs4.close();\n }\n if(psmnt5!=null&&rs5!=null){\n psmnt5.close();\n rs5.close();\n }\n if(psmnt6!=null&&rs6!=null){\n psmnt6.close();\n rs6.close();\n }\n if(psmnt7!=null&&rs7!=null){\n psmnt7.close();\n rs7.close();\n }\n \n }\n dbg(\"getControlString-->ControlString : \" + finalControlString+\" Status: \"+status);\n return status;\n }",
"Computer findFirstByActiveTrueAndPriorityGreaterThanAndStatusOrderByPriorityAsc(int priority, EnumComputerStatus status);",
"cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();",
"public void setStatus(Condition con) {\n\t\t\n\t}",
"public void updateStatusVisible (DataSource pool,String status) throws SQLException {\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set status = ?, visible = 1\"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatusVisible. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getStatus());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n }catch(SQLException e){\r\n \r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}",
"public void UpCheck_status1(MajorChange mc) ;",
"private String getServiceCurrentStatus(String csStatChng) {\r\n\t\t\t\t\r\n\t\tchar serviceStatus;\r\n\t\tString serviceStatusStr = \"\";\t\t\t\t\r\n\t\t\r\n\t\tif (csStatChng != null) {\r\n\t\t\tserviceStatus = csStatChng.charAt(csStatChng.length()-1);\r\n\t\t\tif (serviceStatus == ACTIVATE_STATE){\r\n\t\t\t\tserviceStatusStr = \"Ativado\";\r\n\t\t\t} else if (serviceStatus == SUSPENSE_STATE) {\r\n\t\t\t\tserviceStatusStr = \"Suspenso\";\r\n\t\t\t} else {\r\n\t\t\t\tserviceStatusStr = \"Desativado\";\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\treturn serviceStatusStr;\r\n\t}",
"@Override\n public List<Object> getMiniChartCommStatusByLocation(\n Map<String, Object> condition) {\n return null;\n }",
"public void setrowStatus(Integer value){\n\t}",
"@Override\n public CerereDePrietenie update(CerereDePrietenie c ){\n String SQL = \"UPDATE cerereDePrietenie \"\n + \"SET status = ? \"\n + \"WHERE id = ?\";\n\n int affectedrows = 0;\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL)) {\n\n\n pstmt.setString(1, c.getStatus());\n pstmt.setInt(2, Math.toIntExact(c.getId()));\n\n affectedrows = pstmt.executeUpdate();\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n return c;\n\n }",
"private static boolean runStateLessThan(int c, int s) {\n return c < s;\n }",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"@Override\n\tpublic void chechStatus(int idu) {\n\t\t\n\t}",
"int getConditionValue();",
"boolean isStatusSuspensao();",
"int getWinCondition();",
"Condition between(QueryParameter parameter, Object x, Object y);",
"private boolean querySmsParameter() { \n ContentResolver cr = mContext.getContentResolver();\n //String []proj = new String[]{\"CreationMode\", \"CNumber\", \"mcc_mnc_timestamp\"};\n\t\tString []proj = new String[]{RegionalPhone.MMS_SMS.MMS_CREATION_MODE, RegionalPhone.MMS_SMS.SMS_C_NUMBER, RegionalPhone.MMS_SMS.MCC_MNC_TIMESTAMP};\n Cursor cursor = null;\n cursor = cr.query(mUri, proj, null, null, null);\n if (cursor != null && cursor.moveToFirst()) {\n //mCreateMode = cursor.getString(cursor.getColumnIndex(\"CreationMode\"));\n //mSmsCenter = cursor.getString(cursor.getColumnIndex(\"CNumber\"));\n //mTimeStamp = cursor.getString(cursor.getColumnIndex(\"mcc_mnc_timestamp\"));\n\t\t\tmCreateMode = cursor.getString(cursor.getColumnIndex(RegionalPhone.MMS_SMS.MMS_CREATION_MODE));\n mSmsCenter = cursor.getString(cursor.getColumnIndex(RegionalPhone.MMS_SMS.SMS_C_NUMBER));\n mTimeStamp = cursor.getString(cursor.getColumnIndex(RegionalPhone.MMS_SMS.MCC_MNC_TIMESTAMP));\n mCreateMode = mCreateMode.toUpperCase();\n if (!mCreateMode.equals(\"FREE\") && !mCreateMode.equals(\"RESTRICTED\") && !mCreateMode.equals(\"WARNING\")) {\n \tmCreateMode = \"FREE\";\n }\n mValues.put(\"creationmode\", mCreateMode);\n mValues.put(\"servicecenter\", mSmsCenter);\n cursor.close();\n \n return true;\n }\n \n Log.i(TAG, \"Query sms parameter data from regionalphonemanager failed. \\n\");\n\n return false; \n }",
"public Boolean isActive(){return status;}",
"Integer getStatus();",
"@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}",
"public void filterRequestStatus(String _status) {\n\t\tsleep(3);\n\t\tclickByJavaScript(By.xpath(\".//*[@id='projection-management']/div[1]/div[6]/span[1]/span[1]/span[2]/span[1]\"));\n\t\tsleep(1);\n\t\tclickOnElement(driver.findElement(By.xpath(\".//li[@data-offset-index = '\"+_status+\"']\")));\t\t\n\t}",
"condition getConditionAllocution();",
"public boolean getStatus(){\n return activestatus;\n }",
"public ResultSet Retcomp() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company c,login l where l.login_id=c.login_id and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}",
"public int askPermitToGetBetweenVisible();",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"private void getStatus() {\n\t\t\n\t}",
"Condition greaterThan(QueryParameter parameter, Object x);",
"@Override\n public List<Object> getMiniChartCommStatusByModemType2(\n Map<String, Object> condition) {\n return null;\n }",
"@Override\r\n\tpublic String getCondition(String[] sql) {\n\t\treturn sql[4];\r\n\t}",
"int getStatus(int index);",
"public boolean inAValidSequenceRange(PBFTServerMessage m){\n\n long seqn = m.getSequenceNumber();\n long low = getLCWM();\n long high = getHCWM();\n\n return seqn > low && seqn <= high;\n\n }",
"int setCanStatus(int canRegno, int action);",
"public void setActiveStatus(Boolean active){ this.status = active; }",
"boolean isValidStatus();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"@Override\n public List<Object> getMiniChartLocationByCommStatus(\n Map<String, Object> condition) {\n return null;\n }",
"public int Approvedbroker(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set userstatus='approved'where loginid=\"+id+\"\");\r\n\treturn i;\r\n}",
"String getCondition();",
"public String validateStatusBeforeFutureStatus(MaintenanceRequest mrq, String status){\n\t\tMaintenanceRequestStatus currentStatus = convertPOStatus(mrq.getMaintReqStatus());\n\t\tMaintenanceRequestStatus futureStatus = convertPOStatus(status);\n\t\tString message = \"\";\n\t\t\n\t\tif(currentStatus != null && futureStatus != null){\n\t\t\tif(currentStatus.getSortOrder() >= futureStatus.getSortOrder()){\n\t\t\t\tmessage = \"This PO has already reached \" + futureStatus.getDescription() + \" status\";\n\t\t\t}\n\t\t}\n\t\treturn message;\n\t}",
"public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }",
"boolean isSetStatus();",
"boolean hasStatusChanged();",
"private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }",
"int isActive();",
"Condition lessThan(QueryParameter parameter, Object x);",
"public CmShainCQ queryCmShain() {\n return xdfgetConditionQueryCmShain();\n }",
"public void setStatusCVs(CandidateValue statusCVs) {\n this.statusCVs = statusCVs;\n }",
"private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}",
"private boolean checkNotCanceledReservation(int id) throws SQLException {\n\t\tcheckNotCanceledReservationStatement.clearParameters();\n\t\tcheckNotCanceledReservationStatement.setInt(1, id);\n\t\tcheckNotCanceledReservationStatement.setString(2, this.username);\n\t\tResultSet result = checkNotCanceledReservationStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkNotCanceledReservation: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic HeadUnit updateACControlStatus(long headUnitId, String ACfeatureType, String ACStatus, String ACTemp,\n\t\t\tString ACFanTemp, String rearACTemp) {\n\t\t\n\t\t// check if given headUnitId is registered with any userID\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t\n\t\tlogger.info(\"IN updateACControlStatus \");\n\t\t\n\t\tHeadUnit hdunit = new HeadUnit();\n\t\t\n\t\tString check_query = \"select count(1) from user where \"\n\t\t\t\t+ \"user_id = (SELECT user_id from headunit where headunit_id = ?)\";\n\t\t\n\t\tint result = jdbcTemplate.queryForObject(check_query, new Object[] { headUnitId }, Integer.class);\n\t\tif (result > 0) {\n\t\t\t// if userID is available, send the status\n\t\t\t// if userID is available, send the status\n\t\t\t// get GCM key\n\t\t\tString gcm_key_query = \"select gcmregistartionkey from user where \"\n\t\t\t\t\t+ \"user_id = (SELECT user_id from headunit where headunit_id = ?)\";\n\t\t\t\n\t\t\tString query_result = (String) jdbcTemplate.queryForObject(gcm_key_query, new Object[] { headUnitId },\n\t\t\t\t\tString.class);\n\t\t\t\n\t\t\tSystem.out.println(\"GCM KEY ============================= \" + query_result);\n\t\t\t\n\t\t\t// if GCM key not null or empty\n\t\t\t// prepare message\n\t\t\tif (query_result != null && !query_result.isEmpty()) {\n\t\t\t\tSender sender = new Sender(utilityObj.getGcmApiKeyVehiclelocatorapp());\n\t\t\t\t// build message based on featureType and featurestatus\n\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\tobj.put(\"featuretype\", ACfeatureType);\n\t\t\t\tobj.put(\"featurestatus\", ACStatus);\n\t\t\t\tobj.put(\"actemp\", ACTemp);\n\t\t\t\tobj.put(\"acfanspeed\", ACFanTemp);\n\t\t\t\tobj.put(\"rearactemp\", rearACTemp);\n\t\t\t\tString prepare_msg = obj.toJSONString();\n\t\t\t\tgcm_message = new Message.Builder().timeToLive(30).delayWhileIdle(true)\n\t\t\t\t\t\t.addData(MESSAGE_KEY, prepare_msg).build();\n\t\t\t\tResult gcm_result = null;\n\t\t\t\ttry {\n\t\t\t\t\t// get gcm_message and gcm_register key\n\t\t\t\t\t// send message to that gcm_register_key\n\t\t\t\t\t// set message and status\n\t\t\t\t\tgcm_result = sender.send(gcm_message, query_result, 1);\n\t\t\t\t\tlogger.info(\"IN Update AC CONTROL STATUS : \" + gcm_result.toString());\n\t\t\t\t\thdunit.setStatus(true);\n\t\t\t\t\thdunit.setMessage(prepare_msg);\n\t\t\t\t\thdunit.setFeaturetype(ACfeatureType);\n\t\t\t\t\thdunit.setFeaturestatus(ACStatus);\n\t\t\t\t\thdunit.setActemp(ACTemp);\n\t\t\t\t\thdunit.setAcfanspeed(ACFanTemp);\n\t\t\t\t\thdunit.setRearactemp(rearACTemp);\n\t\t\t\t\thdunit.setGcmregistartionkey(query_result);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thdunit.setMessage(\"NO GCM KEY FOUND\");\n\t\t\t}\n\n\t\t} else {\n\t\t\t// no userID data found for given headUnitID\n\t\t\t// set message and status\n\t\t\thdunit.setStatus(false);\n\t\t\thdunit.setMessage(\"NO USER DATA FOUND FOR HEAD UNIT ID : \" + headUnitId);\n\t\t\tlogger.info(\"NO USER DATA FOUND FOR HEAD UNIT ID : \" + headUnitId);\n\t\t}\n\n\t\treturn hdunit;\n\t}",
"public int getStatus(String name){\n Log.d(TAG, \"get Status : gettng status - \" + name);\n SQLiteDatabase db =new DBHelper(context).getReadableDatabase();\n\n Cursor cursor = db.query(DBContract.Switch.TABLE_NAME,\n null,DBContract.Switch.COLUMN_NAME_NAME+\" = ?\",\n new String[]{String.valueOf(name)},\n null, //groupby\n null, //having\n null //orderby\n );\n if(cursor.moveToFirst()){\n int status = cursor.getInt(cursor.getColumnIndex(DBContract.Switch.COLUMN_NAME_STATUS));\n cursor.close();\n db.close();\n\n Log.d(TAG, \"have switch so return status : switch - \" + name + \" status - \" + status);\n return status;\n }\n else {\n this.createSwitch(name);\n int status=this.getStatus(name);\n Log.d(TAG, \"havent switch : so create - \" + name+ \" status - \"+status);\n return status;\n }\n }",
"List<Computer> findAllByActiveTrueAndStatusAndPriorityLessThanOrderByPriorityDesc(EnumComputerStatus status, int priority);",
"public ResultSet Recomp1() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.comp_id,c.compname from company c,login l where l.login_id=c.login_id and l.status='not approved'\");\r\n\treturn rs;\r\n\t\r\n}",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n boolean boolean0 = DBUtil.available(\"Y'\", \"org.databene.commons.condition.CompositeCondition\", \"relative\", \" connection(s)\");\n assertFalse(boolean0);\n }",
"public Object getCondition();",
"private boolean cond2(Data C) {\n return (C.getLeft() > this.xR);\n }",
"boolean incLowValue() { return true; }",
"FilterCondition createFilterCondition(int clueNum);",
"private boolean solicitarAutorizacionCxC(int intCodEmp, int intCodLoc, int intCodCot){\n boolean blnRes=false;\n try{\n java.sql.Connection conLoc;\n conLoc=DriverManager.getConnection(objParSis.getStringConexion(),objParSis.getUsuarioBaseDatos(),objParSis.getClaveBaseDatos());\n if(conLoc!=null){\n int EstAut = 1;\n EstAut = objAutPrg.checkCtlsCot(\"tbm_cabautcotven\", \"tbm_detautcotven\",intCodEmp,intCodLoc, intCodCot, conLoc,true);\n switch (EstAut) {\n case 1: // Todo Correcto\n //System.out.println(\"No necesita autorizaciones....\");\n blnRes=true;\n break;\n case 2:\n //System.out.println(\"Autorizacion....\");\n conLoc.setAutoCommit(false);\n \n if (objAutPrg.insertarCabDetAut(conLoc, intCodEmp, intCodLoc, intCodCot, 3)) {\n if(colocarCotizacionComoNecesitaAutorizacion(conLoc, intCodEmp, intCodLoc, intCodCot)){\n conLoc.commit();\n blnRes=true;\n }else{conLoc.rollback();}\n } else { conLoc.rollback();}\n \n break; \n };\n }\n \n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(this, Evt);\n } \n return blnRes;\n }",
"public ResultSet appcomp(Long comp_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company where comp_id=\"+comp_id+\"\");\r\n\treturn rs;\r\n}",
"private boolean moverInvBodReservado(java.sql.Connection conExt,int intCodEmp,int intCodLoc,int intCodCot){\n boolean blnRes=false, blnIns=true;\n java.sql.Statement stmLoc;\n java.sql.ResultSet rstLoc;\n double dblCanDis=0.00, dblCanSolRes=0.00;\n String strIns=\"\";\n try{\n if(conExt!=null){\n stmLoc = conExt.createStatement();\n strSql=\"\";\n strSql+=\" SELECT a1.co_emp,a1.co_loc,a1.co_cot,a1.co_reg,a1.nd_canAut, a2.co_emp as co_empInvBod,a2.co_bod as co_bodInvBod,a2.co_itm,a2.nd_stkAct, \\n\";\n strSql+=\" CASE WHEN a2.nd_canDis IS NULL THEN 0 ELSE a2.nd_canDis END as nd_canDis \\n\";\n strSql+=\" FROM tbm_pedOtrBodCotVen as a1 \\n\";\n strSql+=\" INNER JOIN tbm_invBod as a2 ON (a1.co_empRel=a2.co_emp AND a1.co_bodRel=a2.co_bod AND a1.co_itmRel=a2.co_itm) \\n\";\n strSql+=\" WHERE a1.co_emp=\"+intCodEmp+\" AND a1.co_loc=\"+intCodLoc+\" AND a1.co_cot=\"+intCodCot+\" \\n\";\n System.out.println(\"moverInvBodReservado: \\n\" + strSql);\n rstLoc = stmLoc.executeQuery(strSql);\n while(rstLoc.next()){\n dblCanDis = rstLoc.getDouble(\"nd_canDis\");\n dblCanSolRes = rstLoc.getDouble(\"nd_canAut\");\n if(dblCanSolRes<=dblCanDis){\n strSql=\"\";\n strSql+=\" UPDATE tbm_invBod SET nd_canDis=(nd_canDis-\"+dblCanSolRes+\"), nd_canRes=((CASE WHEN nd_canRes IS NULL THEN 0 ELSE nd_canRes END) + \" + dblCanSolRes+\") \";\n strSql+=\" WHERE co_emp=\"+rstLoc.getInt(\"co_empInvBod\")+\" AND co_bod=\"+rstLoc.getInt(\"co_bodInvBod\");\n strSql+=\" AND co_itm=\"+rstLoc.getInt(\"co_itm\")+\";\\n\";\n strIns+=strSql;\n }else{\n blnIns=false;\n System.out.println(\"NO DISPONIBLE \" + rstLoc.getInt(\"co_itm\"));\n //return false; CONTENEDOR PARA MOSTRAR ITEMS DE PROBLEMAS\n }\n }\n rstLoc.close();\n rstLoc=null;\n \n if(blnIns){\n System.out.println(\"moverInvBodReservado: \" + strIns);\n stmLoc.executeUpdate(strIns);\n blnRes=true;\n }\n else{\n blnRes=false;\n }\n stmLoc.close();\n stmLoc=null;\n\t\n \n }\n }\n catch (java.sql.SQLException e) { \n objUti.mostrarMsgErr_F1(this, e); \n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(this, Evt);\n } \n return blnRes;\n }",
"@Override\n public List<Object> getMiniChartCommStatusByModemType(\n Map<String, Object> condition) {\n return null;\n }",
"private boolean cond1(Data C) {\n return (C.getRight() < this.xL);\n }",
"private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}",
"void statusUpdate(boolean invalid);",
"HrHBscCpuQos selectByPrimaryKey(String bscid, Date day, Integer hour);",
"public void select(Condition condition) {\n int i;\n boolean z = DEBUG;\n if (z) {\n String str = this.mTag;\n Log.d(str, \"select \" + condition);\n }\n int i2 = this.mSessionZen;\n if (i2 != -1 && i2 != 0) {\n final Uri realConditionId = getRealConditionId(condition);\n if (this.mController != null) {\n AsyncTask.execute(new Runnable() { // from class: com.android.systemui.volume.ZenModePanel.5\n @Override // java.lang.Runnable\n public void run() {\n ZenModePanel.this.mController.setZen(ZenModePanel.this.mSessionZen, realConditionId, \"ZenModePanel.selectCondition\");\n }\n });\n }\n setExitCondition(condition);\n if (realConditionId == null) {\n this.mPrefs.setMinuteIndex(-1);\n } else if ((isAlarm(condition) || isCountdown(condition)) && (i = this.mBucketIndex) != -1) {\n this.mPrefs.setMinuteIndex(i);\n }\n setSessionExitCondition(copy(condition));\n } else if (z) {\n Log.d(this.mTag, \"Ignoring condition selection outside of manual zen\");\n }\n }",
"com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();",
"@Select(\"select perf_submit_flag from fm_perf_submit_info where year =#{year} and month=#{month} and plat_id =#{platId}\")\n Boolean getPerfSubmitFlag(@Param(\"platId\") Long platId, @Param(\"year\") int year, @Param(\"month\") int month);",
"public int Approvecomp(Long id) throws SQLException {\n\tLong idd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+id+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tidd=rs.getLong(1);\r\n\t}\r\n\tSystem.out.println(idd);\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+idd+\"\");\r\n\treturn i;\r\n\t\r\n}",
"com.polytech.spik.protocol.SpikMessages.Status getStatus();",
"com.polytech.spik.protocol.SpikMessages.Status getStatus();",
"void mo9948a(Status cVar);",
"public Vector listICPUserRegBasedOnStatus(String status) throws SQLException {\n Debug.print(\"Inside the getUserAndMemberId\");\n Vector vObj = new Vector();\n try {\n makeConnection();\n String slelctStr = \"SELECT A.icp_meeting_id,A.user_id,B.first_name, B.last_name, A.membership_status,A.member_id,A.add_date,A.active_status,A.request_status,A.release_id FROM \"+\n DBHelper.USEA_ICP_USER_DETAIL+\" A, \"+DBHelper.USEA_MMS_USERMASTER+\" B WHERE A.user_id = B.user_id AND A.request_status = ? \";\n PreparedStatement prepStmt = con.prepareStatement(slelctStr);\n prepStmt.setString(1, status);\n rs = prepStmt.executeQuery();\n System.out.println(\"Inside the listICPUserReg status : \"+userId);\n while (rs.next()) {\n this.icpMeetingId = rs.getString(1);\n this.userId = rs.getString(2);\n this.firstName = rs.getString(3);\n this.lastName = rs.getString(4);\n this.membershipStatus = rs.getString(5);\n this.memberId = rs.getString(6);\n Date addDate1 = rs.getDate(7);\n this.activeStatus = rs.getString(8);\n this.requestStatus = rs.getString(9);\n this.releaseId = rs.getString(10);\n \n this.addDate = DBHelper.dateToString(addDate1);\n \n String [] userList = {icpMeetingId,userId,firstName,lastName,membershipStatus,memberId,addDate,activeStatus,requestStatus,releaseId};\n vObj.add(userList);\n }\n releaseConnection();\n }catch (SQLException e){\n e.printStackTrace();\n }finally {\n releaseConnection();\n }\n return vObj;\n }"
] | [
"0.5347507",
"0.5258977",
"0.5163549",
"0.5139085",
"0.5130371",
"0.51289535",
"0.5078012",
"0.5051868",
"0.503444",
"0.5030847",
"0.4995561",
"0.48859322",
"0.48750418",
"0.4869869",
"0.48468485",
"0.47746676",
"0.47711518",
"0.47607985",
"0.47498795",
"0.4743821",
"0.4743281",
"0.47287452",
"0.47252867",
"0.47076082",
"0.46819204",
"0.46782342",
"0.4670216",
"0.4653391",
"0.4645777",
"0.46293578",
"0.46170115",
"0.46113694",
"0.46107003",
"0.46088284",
"0.46079937",
"0.45969728",
"0.45940474",
"0.45926926",
"0.4582044",
"0.4576453",
"0.45756757",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.45752007",
"0.4567395",
"0.45663986",
"0.45552132",
"0.4552587",
"0.45519304",
"0.4547057",
"0.4544511",
"0.4535953",
"0.45306763",
"0.45306027",
"0.45157546",
"0.4514526",
"0.45130008",
"0.45097426",
"0.45068854",
"0.45040643",
"0.45017207",
"0.44993153",
"0.44983065",
"0.4497416",
"0.4496166",
"0.44938743",
"0.4492655",
"0.44881362",
"0.4485311",
"0.44849747",
"0.4481072",
"0.44762263",
"0.44724938",
"0.44660902",
"0.44608122",
"0.44577727",
"0.44530565",
"0.44519606",
"0.4447422",
"0.4446644",
"0.4446644",
"0.44447207",
"0.44393042"
] | 0.5565044 | 0 |
and csmi_status <= ? | public M csmiStatusMax(Object max){this.put("csmiStatusMax", max);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiStatusMin(Object min){this.put(\"csmiStatusMin\", min);return this;}",
"public int getCBRStatus();",
"Computer findFirstByActiveTrueAndStatusOrderByPriorityDesc(EnumComputerStatus status);",
"public boolean checkControlStringStatus(String userId, String branchCode, String functionId, String operation, String txnStatus, String authStatus, String interfaceStatus) throws SQLException {\n boolean status = false;\n String finalControlString=null;\n PreparedStatement psmnt1=null;\n PreparedStatement psmnt2=null;\n PreparedStatement psmnt3=null;\n PreparedStatement psmnt4=null;\n PreparedStatement psmnt5=null;\n PreparedStatement psmnt6=null;\n PreparedStatement psmnt7=null;\n PreparedStatement psmnt8=null;\n ResultSet rs1=null;\n ResultSet rs2=null;\n ResultSet rs3=null;\n ResultSet rs4=null;\n ResultSet rs5=null;\n ResultSet rs6=null;\n ResultSet rs7=null;\n \n try {\n psmnt1 =conn.prepareStatement(\"select role_id , role_function , control_string from smtbs_role_detail where role_id in (select role_id from smtbs_user_role where user_id = ? and branch_code= ?) and role_function = ? \");\n psmnt1.setString(1, userId);\n psmnt1.setString(2, branchCode);\n psmnt1.setString(3, functionId);\n psmnt2 = conn.prepareStatement(\" select control_string from smtbs_users_functions where user_id = ? and function_id = ? and branch_code= ?\");\n psmnt2.setString(1, userId);\n psmnt2.setString(2, functionId);\n psmnt2.setString(3, branchCode);\n psmnt3 = conn.prepareStatement(\" select control_string from SMTBS_TXN_STATUS where txn_status = ? and auth_status = ? and interface_status = nvl(?,'XXXXX')\");\n psmnt3.setString(1, txnStatus);\n psmnt3.setString(2, authStatus);\n psmnt3.setString(3, interfaceStatus);\n psmnt4 =conn.prepareStatement(\" select control_string from SMTBS_MENU where function_id = ?\");\n psmnt4.setString(1, functionId);\n psmnt5 = conn.prepareStatement(\"select lpad(?,16,'0') from dual\");\n psmnt6 = conn.prepareStatement(\"select to_char(to_number(?) + to_number(?) + to_number(?) ) from dual\");\n psmnt7 = conn.prepareStatement(\"select translate(?,'3210','1000') from dual\");\n \n \n finalControlString = \"0000000000000000\";\n String tempControlString = \"0000000000000000\";\n String userControlString = \"0000000000000000\";\n String funcControlString = \"0000000000000000\";\n String tranControlString = \"1111111111111111\";\n String interControlString=null;\n \n rs1 = psmnt1.executeQuery();\n rs2 = psmnt2.executeQuery();\n if (rs2.next()){\n userControlString = rs2.getString(1);\n }\n rs3 = psmnt3.executeQuery();\n if (rs3.next())\n tranControlString = rs3.getString(1);\n rs4 = psmnt4.executeQuery();\n if (rs4.next())\n funcControlString = rs4.getString(1);\n if (userControlString.equals(\"0000000000000000\")) {\n while (rs1.next()) {\n interControlString = rs1.getString(\"control_string\");\n userControlString = fn_and_controlstrings(userControlString, \n interControlString);\n \n }\n \n }\n if (tranControlString == null)\n tranControlString = \"1111111111111111\";\n if (funcControlString == null)\n funcControlString = null;\n psmnt5.setString(1, userControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n userControlString = rs5.getString(1);\n psmnt5.setString(1, tranControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n tranControlString = rs5.getString(1);\n psmnt5.setString(1, funcControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n funcControlString = rs5.getString(1);\n psmnt6.setString(1, userControlString);\n psmnt6.setString(2, tranControlString);\n psmnt6.setString(3, funcControlString);\n rs6 = psmnt6.executeQuery();\n if (rs6.next())\n tempControlString = rs6.getString(1);\n psmnt7.setString(1, tempControlString);\n rs7 = psmnt7.executeQuery();\n if (rs7.next())\n finalControlString = rs7.getString(1);\n List funcList = FCSMSUtility.getActionNames(finalControlString);\n for (int i=0; i<funcList.size(); i++) {\n String lAction = (String) funcList.get(i);\n if (lAction.equalsIgnoreCase(operation)) {\n status = true;\n break;\n }\n }\n }catch (Exception e) {\n dbg(\"checkControlStringStatus-->Exception = \"+ e.getMessage());\n e.printStackTrace();\n }finally{\n if(psmnt1!=null&&rs1!=null){\n psmnt1.close();\n rs1.close();\n }\n if(psmnt2!=null&&rs2!=null){\n psmnt2.close();\n rs2.close();\n }\n if(psmnt3!=null&&rs3!=null){\n psmnt3.close();\n rs3.close();\n }\n if(psmnt4!=null&&rs4!=null){\n psmnt4.close();\n rs4.close();\n }\n if(psmnt5!=null&&rs5!=null){\n psmnt5.close();\n rs5.close();\n }\n if(psmnt6!=null&&rs6!=null){\n psmnt6.close();\n rs6.close();\n }\n if(psmnt7!=null&&rs7!=null){\n psmnt7.close();\n rs7.close();\n }\n \n }\n dbg(\"getControlString-->ControlString : \" + finalControlString+\" Status: \"+status);\n return status;\n }",
"Computer findFirstByActiveTrueAndStatusOrderByPriorityAsc(EnumComputerStatus status);",
"cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();",
"public String getStatusQuery() {\n return \"where \" + IBOUB_OPX_NettingScheduler.SCHEDULERSTATUS + \" = ? \";\n }",
"public void setStatus(Condition con) {\n\t\t\n\t}",
"public M csmiStatusNull(){if(this.get(\"csmiStatusNot\")==null)this.put(\"csmiStatusNot\", \"\");this.put(\"csmiStatus\", null);return this;}",
"private String getServiceCurrentStatus(String csStatChng) {\r\n\t\t\t\t\r\n\t\tchar serviceStatus;\r\n\t\tString serviceStatusStr = \"\";\t\t\t\t\r\n\t\t\r\n\t\tif (csStatChng != null) {\r\n\t\t\tserviceStatus = csStatChng.charAt(csStatChng.length()-1);\r\n\t\t\tif (serviceStatus == ACTIVATE_STATE){\r\n\t\t\t\tserviceStatusStr = \"Ativado\";\r\n\t\t\t} else if (serviceStatus == SUSPENSE_STATE) {\r\n\t\t\t\tserviceStatusStr = \"Suspenso\";\r\n\t\t\t} else {\r\n\t\t\t\tserviceStatusStr = \"Desativado\";\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\treturn serviceStatusStr;\r\n\t}",
"public void UpCheck_status1(MajorChange mc) ;",
"public void updateStatusVisible (DataSource pool,String status) throws SQLException {\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set status = ?, visible = 1\"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatusVisible. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getStatus());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n }catch(SQLException e){\r\n \r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}",
"Computer findFirstByActiveTrueAndPriorityGreaterThanAndStatusOrderByPriorityAsc(int priority, EnumComputerStatus status);",
"int getConditionValue();",
"public void setrowStatus(Integer value){\n\t}",
"int getWinCondition();",
"private static boolean runStateLessThan(int c, int s) {\n return c < s;\n }",
"private boolean cond2(Data C) {\n return (C.getLeft() > this.xR);\n }",
"@Override\n public CerereDePrietenie update(CerereDePrietenie c ){\n String SQL = \"UPDATE cerereDePrietenie \"\n + \"SET status = ? \"\n + \"WHERE id = ?\";\n\n int affectedrows = 0;\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL)) {\n\n\n pstmt.setString(1, c.getStatus());\n pstmt.setInt(2, Math.toIntExact(c.getId()));\n\n affectedrows = pstmt.executeUpdate();\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n return c;\n\n }",
"public M csseStatusNull(){if(this.get(\"csseStatusNot\")==null)this.put(\"csseStatusNot\", \"\");this.put(\"csseStatus\", null);return this;}",
"public boolean inAValidSequenceRange(PBFTServerMessage m){\n\n long seqn = m.getSequenceNumber();\n long low = getLCWM();\n long high = getHCWM();\n\n return seqn > low && seqn <= high;\n\n }",
"@Override\n\tpublic void chechStatus(int idu) {\n\t\t\n\t}",
"public Boolean isActive(){return status;}",
"boolean incLowValue() { return true; }",
"condition getConditionAllocution();",
"private boolean cond1(Data C) {\n return (C.getRight() < this.xL);\n }",
"@Override\n public List<Object> getMiniChartCommStatusByLocation(\n Map<String, Object> condition) {\n return null;\n }",
"public static void updateStatus(Logger logger, Statement s, Validator tester, int compone, int comptwo, int test) { \n synchronized (countMutex) { // protects against two threads doing update status at the same time \n confirmTableExistence(logger,s);\n int x = compone; int y = comptwo;\n if (comptwo < compone) { x = comptwo; y = compone; }\n\n int failureLevel = tester.getTestFailureLevel(test);\n int status;\n if (compone == comptwo) {\n\tstatus = tester.getTestResult(logger,s,x,test);\n } else {\n\tstatus = ((Contrastor)tester).getDiffResult(logger,s,x,y,test);\n }\n \n // A whole comparison needs to be marked as different\n if (compone != comptwo && status == Contrastor.RESULT_DIFF) {\n\ttry {\n\t ResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t\t\" runtwo = '\"+y+\"' and test = '0'\");\n\t if (!rs.next()) {\n\t s.executeQuery(\"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t\t\t \" values ('\"+(counter++)+\"','\"+x+\"','\"+y+\"','0',\"+\n\t\t\t \"'\"+status+\"',\" +\n\t\t\t \"'\"+failureLevel+\"'\"+\n\t\t\t \")\");\n\t } else {\n\t s.executeQuery(\"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t\t\t \"' and runtwo = '\"+y+\"' and test = '0'\");\n\t }\n\t} catch (SQLException e){\n\t logger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering comparison state info in status table\",e);\n\t}\n }\n \n String sql = null;\n try {\n\tResultSet rs = s.executeQuery(\"select * from \"+DGPSPConstants.STATUS_TABLE+\" where runone = '\"+x+\"' and\"+\n\t\t\t\t \" runtwo = '\"+y+\"' and test = '\"+test+\"'\");\n\tif (!rs.next()) {\n\t sql = \n\t \"insert into \"+DGPSPConstants.STATUS_TABLE+\n\t \" values \"+\n\t \"(\"+\n\t \"'\"+(counter++)+\"',\"+\n\t \"'\"+x+\"',\"+\n\t \"'\"+y+\"',\"+\n\t \"'\"+test+\"',\" +\n\t \"'\"+status+\"',\" +\n\t \"'\"+failureLevel+\"'\"+\n\t \")\";\n\t} else {\n\t sql =\n\t \"update \"+DGPSPConstants.STATUS_TABLE+\" set status = '\"+status+\"' where runone = '\"+x+\n\t \"' and runtwo = '\"+y+\"' and test = '\"+test+\"'\";\n\t}\n\n\ts.executeQuery(sql);\n } catch (SQLException e){\n\tlogger.logMessage(Logger.ERROR,Logger.DB_WRITE,\n\t\t\t \"Problem altering test info in status table. Sql was :\\n\"+sql,e);\n\te.printStackTrace();\n }\n }\n }",
"@Override\n public List<Object> getMiniChartCommStatusByModemType2(\n Map<String, Object> condition) {\n return null;\n }",
"int setCanStatus(int canRegno, int action);",
"Integer getStatus();",
"boolean isStatusSuspensao();",
"public boolean getStatus(){\n return activestatus;\n }",
"public void setStatusCVs(CandidateValue statusCVs) {\n this.statusCVs = statusCVs;\n }",
"boolean isValidStatus();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"int getStatusValue();",
"public M csrtStatusNull(){if(this.get(\"csrtStatusNot\")==null)this.put(\"csrtStatusNot\", \"\");this.put(\"csrtStatus\", null);return this;}",
"public void setActiveStatus(Boolean active){ this.status = active; }",
"private boolean moverInvBodReservado(java.sql.Connection conExt,int intCodEmp,int intCodLoc,int intCodCot){\n boolean blnRes=false, blnIns=true;\n java.sql.Statement stmLoc;\n java.sql.ResultSet rstLoc;\n double dblCanDis=0.00, dblCanSolRes=0.00;\n String strIns=\"\";\n try{\n if(conExt!=null){\n stmLoc = conExt.createStatement();\n strSql=\"\";\n strSql+=\" SELECT a1.co_emp,a1.co_loc,a1.co_cot,a1.co_reg,a1.nd_canAut, a2.co_emp as co_empInvBod,a2.co_bod as co_bodInvBod,a2.co_itm,a2.nd_stkAct, \\n\";\n strSql+=\" CASE WHEN a2.nd_canDis IS NULL THEN 0 ELSE a2.nd_canDis END as nd_canDis \\n\";\n strSql+=\" FROM tbm_pedOtrBodCotVen as a1 \\n\";\n strSql+=\" INNER JOIN tbm_invBod as a2 ON (a1.co_empRel=a2.co_emp AND a1.co_bodRel=a2.co_bod AND a1.co_itmRel=a2.co_itm) \\n\";\n strSql+=\" WHERE a1.co_emp=\"+intCodEmp+\" AND a1.co_loc=\"+intCodLoc+\" AND a1.co_cot=\"+intCodCot+\" \\n\";\n System.out.println(\"moverInvBodReservado: \\n\" + strSql);\n rstLoc = stmLoc.executeQuery(strSql);\n while(rstLoc.next()){\n dblCanDis = rstLoc.getDouble(\"nd_canDis\");\n dblCanSolRes = rstLoc.getDouble(\"nd_canAut\");\n if(dblCanSolRes<=dblCanDis){\n strSql=\"\";\n strSql+=\" UPDATE tbm_invBod SET nd_canDis=(nd_canDis-\"+dblCanSolRes+\"), nd_canRes=((CASE WHEN nd_canRes IS NULL THEN 0 ELSE nd_canRes END) + \" + dblCanSolRes+\") \";\n strSql+=\" WHERE co_emp=\"+rstLoc.getInt(\"co_empInvBod\")+\" AND co_bod=\"+rstLoc.getInt(\"co_bodInvBod\");\n strSql+=\" AND co_itm=\"+rstLoc.getInt(\"co_itm\")+\";\\n\";\n strIns+=strSql;\n }else{\n blnIns=false;\n System.out.println(\"NO DISPONIBLE \" + rstLoc.getInt(\"co_itm\"));\n //return false; CONTENEDOR PARA MOSTRAR ITEMS DE PROBLEMAS\n }\n }\n rstLoc.close();\n rstLoc=null;\n \n if(blnIns){\n System.out.println(\"moverInvBodReservado: \" + strIns);\n stmLoc.executeUpdate(strIns);\n blnRes=true;\n }\n else{\n blnRes=false;\n }\n stmLoc.close();\n stmLoc=null;\n\t\n \n }\n }\n catch (java.sql.SQLException e) { \n objUti.mostrarMsgErr_F1(this, e); \n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(this, Evt);\n } \n return blnRes;\n }",
"private void getStatus() {\n\t\t\n\t}",
"public ResultSet Retcomp() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company c,login l where l.login_id=c.login_id and l.status='approved'\");\r\n\treturn rs;\r\n}",
"String getCondition();",
"protected boolean isConsistentWith(BasisCondition uc)\n{\n if (uc instanceof BasisConditionDuration) {\n BasisConditionDuration bct = (BasisConditionDuration) uc;\n if (bct.base_condition == bct.base_condition) {\n\t if (max_time <= bct.min_time || min_time >= bct.max_time) return false;\n\t return true;\n }\n }\n\n return base_condition.isConsistentWith(uc);\n}",
"boolean isInactive() {\n/* 4818 */ return this.inactive;\n/* */ }",
"public void setStatus(boolean newstatus){activestatus = newstatus;}",
"private void updateNegativeFlagOnComp(int register, int address){\r\n\t\tif(sim40.memory[register] <= sim40.memory[address]){\r\n\t\t\tswitchOnFlag(1);\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tswitchOffFlag(1);\r\n\t\t}\r\n\t}",
"private boolean querySmsParameter() { \n ContentResolver cr = mContext.getContentResolver();\n //String []proj = new String[]{\"CreationMode\", \"CNumber\", \"mcc_mnc_timestamp\"};\n\t\tString []proj = new String[]{RegionalPhone.MMS_SMS.MMS_CREATION_MODE, RegionalPhone.MMS_SMS.SMS_C_NUMBER, RegionalPhone.MMS_SMS.MCC_MNC_TIMESTAMP};\n Cursor cursor = null;\n cursor = cr.query(mUri, proj, null, null, null);\n if (cursor != null && cursor.moveToFirst()) {\n //mCreateMode = cursor.getString(cursor.getColumnIndex(\"CreationMode\"));\n //mSmsCenter = cursor.getString(cursor.getColumnIndex(\"CNumber\"));\n //mTimeStamp = cursor.getString(cursor.getColumnIndex(\"mcc_mnc_timestamp\"));\n\t\t\tmCreateMode = cursor.getString(cursor.getColumnIndex(RegionalPhone.MMS_SMS.MMS_CREATION_MODE));\n mSmsCenter = cursor.getString(cursor.getColumnIndex(RegionalPhone.MMS_SMS.SMS_C_NUMBER));\n mTimeStamp = cursor.getString(cursor.getColumnIndex(RegionalPhone.MMS_SMS.MCC_MNC_TIMESTAMP));\n mCreateMode = mCreateMode.toUpperCase();\n if (!mCreateMode.equals(\"FREE\") && !mCreateMode.equals(\"RESTRICTED\") && !mCreateMode.equals(\"WARNING\")) {\n \tmCreateMode = \"FREE\";\n }\n mValues.put(\"creationmode\", mCreateMode);\n mValues.put(\"servicecenter\", mSmsCenter);\n cursor.close();\n \n return true;\n }\n \n Log.i(TAG, \"Query sms parameter data from regionalphonemanager failed. \\n\");\n\n return false; \n }",
"public void setStatus(int mCode, int newStatus)\r\n\t {\r\n\t\t if(newStatus >= 0 && newStatus <= 18)\r\n\t\t {\r\n\t\t\t if(mCode < maxMRs && mCode >= 0)\r\n\t\t\t {\r\n\t\t\t\t if(newStatus != 6)\r\n\t\t\t\t {\r\n\t\t\t\t\t MRs[mCode].setStatus(newStatus);\r\n\t\t\t\t\t setChanged();\r\n\t\t\t\t\t notifyObservers(); // Note: notifies ALL Observing views\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"private boolean getEstadoProceso(int indiceProceso ,int CodEmp, int CodLoc, int CodCot){\n boolean blnRes=false;\n java.sql.Connection conLoc;\n java.sql.ResultSet rstLoc;\n java.sql.Statement stmLoc;\n try{ //null=No tiene;P=Pendiente;C=Completa\n conLoc=DriverManager.getConnection(objParSis.getStringConexion(),objParSis.getUsuarioBaseDatos(),objParSis.getClaveBaseDatos());\n if(conLoc!=null){\n stmLoc = conLoc.createStatement();\n strSql=\"\";\n strSql+=\" SELECT a1.co_emp,a1.co_loc,a1.co_cot, \\n\";\n strSql+=\" CASE WHEN a1.st_solResInv IS NULL THEN 'N' ELSE a1.st_solResInv END as st_solResInv \\n\";\n strSql+=\" FROM tbm_cabCotVen as a1 \\n\";\n strSql+=\" WHERE a1.co_emp=\"+CodEmp+\" AND a1.co_loc=\"+CodLoc+\" AND a1.co_cot=\"+CodCot+\" \\n\";\n rstLoc = stmLoc.executeQuery(strSql);\n if(rstLoc.next()){\n switch(indiceProceso){\n case 1: \n if(rstLoc.getString(\"st_solResInv\").equals(\"N\")) \n blnRes=true; \n break;\n case 2: \n if(rstLoc.getString(\"st_solResInv\").equals(\"P\"))\n blnRes=true;\n break;\n case 3: \n if(rstLoc.getString(\"st_solResInv\").equals(\"C\"))\n blnRes=true;\n break;\n } \n }\n rstLoc.close();\n rstLoc=null;\n stmLoc.close();\n stmLoc=null;\n conLoc.close();\n conLoc=null;\n }\n \n }\n catch (java.sql.SQLException e){\n blnRes=false;\n objUti.mostrarMsgErr_F1(this, e);\n }\n catch (Exception e){\n blnRes=false;\n objUti.mostrarMsgErr_F1(this, e);\n }\n return blnRes;\n }",
"public int askPermitToGetBetweenVisible();",
"private boolean isInRange(int c) {\n switch (border) {\n case between:\n return min <= c && c <= max;\n case min:\n return min <= c;\n case max:\n return c <= max;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + border);\n }\n }",
"void statusUpdate(boolean invalid);",
"@Override\r\n\tpublic boolean stopCondition(State<CarRpmState, CarControl> state) {\n\t\treturn (state.num>start.num && state.state.getSpeed()<0.5);\r\n\t}",
"protected void setTableCondtion(int pcond)\n\t\t{\n\t\t\tCondtion = pcond ;\n\t\t}",
"int isActive();",
"boolean isSetStatus();",
"public Object getCondition();",
"public boolean checkIn()\r\n\t{\r\n\t\tif(this.status == 'B')\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"@Override\n public boolean isUpperLimitSwitchActive()\n {\n final String funcName = \"isUpperLimitSwitchActive\";\n boolean isActive = limitSwitchesSwapped ? revLimitSwitch.get() : fwdLimitSwitch.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%s\", isActive);\n }\n\n return isActive;\n }",
"public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}",
"public void updatePICstatus2() {\n try {\n Connection connection = connectionClass.CONN();\n String query = \"UPDATE stationdashboard SET Status=2, PIC=NULL where Station='\" + Station + \"' and Line ='\" + Line + \"'\";\n PreparedStatement stmt = connection.prepareStatement(query);\n stmt.execute();\n } catch (SQLException ex) {\n }\n }",
"Condition between(QueryParameter parameter, Object x, Object y);",
"@Test\n public void testThreshold() {\n final ThresholdCircuitBreaker circuit = new ThresholdCircuitBreaker(threshold);\n circuit.incrementAndCheckState(9L);\n assertFalse(\"Circuit opened before reaching the threshold\", circuit.incrementAndCheckState(1L));\n }",
"public void updateStatus() {\n\n //loading the driver\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //database variables\n final String db = \"jdbc:mysql://mis-sql.uhcl.edu/dingorkarj2620\";\n Connection con = null;\n Statement st = null;\n ResultSet rs = null;\n\n try {\n //connecting database\n con = DriverManager.getConnection(db, \"dingorkarj2620\", \"1289968\");\n st = con.createStatement();\n rs = st.executeQuery(\"select * from account where a_id = \" + super.id);\n\n //updating the status\n if (rs.next()) {\n //premium seller\n if (rs.getString(3).equalsIgnoreCase(\"premium\")) {\n //update the item status\n i.setI_status(\"Valid\");\n\n } else {\n //regular seller\n if (rs.getString(3).equalsIgnoreCase(\"regular\")) {\n //checking price lower or higher than 100\n if (i.getI_price() <= 100) {\n //update status valid\n i.setI_status(\"Valid\");\n } else {\n //update status pending\n i.setI_status(\"Invalid\");\n }\n }\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n con.close();\n st.close();\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n }",
"public void setgetStatus()\r\n\t{\r\n\t\tthis.status = 'S';\r\n\t}",
"public String validateStatusBeforeFutureStatus(MaintenanceRequest mrq, String status){\n\t\tMaintenanceRequestStatus currentStatus = convertPOStatus(mrq.getMaintReqStatus());\n\t\tMaintenanceRequestStatus futureStatus = convertPOStatus(status);\n\t\tString message = \"\";\n\t\t\n\t\tif(currentStatus != null && futureStatus != null){\n\t\t\tif(currentStatus.getSortOrder() >= futureStatus.getSortOrder()){\n\t\t\t\tmessage = \"This PO has already reached \" + futureStatus.getDescription() + \" status\";\n\t\t\t}\n\t\t}\n\t\treturn message;\n\t}",
"public int Approvedbroker(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set userstatus='approved'where loginid=\"+id+\"\");\r\n\treturn i;\r\n}",
"private String changestatus(String string) {\n\t\tString changestatustemp;\r\n\t\tif (string.equals(\"0\")) {\r\n\t\t\tchangestatustemp = \"1\";\r\n\t\t} else {\r\n\t\t\tchangestatustemp = \"0\";\r\n\t\t}\r\n\t\treturn changestatustemp;\r\n\t}",
"private String changestatus(String string) {\n\t\tString changestatustemp;\r\n\t\tif (string.equals(\"0\")) {\r\n\t\t\tchangestatustemp = \"1\";\r\n\t\t} else {\r\n\t\t\tchangestatustemp = \"0\";\r\n\t\t}\r\n\t\treturn changestatustemp;\r\n\t}",
"com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();",
"int compareValue(Card c);",
"protected boolean statusIs(String state)\n { return call_state.equals(state); \n }",
"String getSwstatus();",
"private boolean CompareValues(int oldValue, int value)\n {\n if (playerType == PlayerType.White)\n {\n if (turn == 1)\n return oldValue > value;\n else\n return oldValue < value;\n }\n else\n if (turn == 1)\n return oldValue < value;\n else\n return oldValue > value;\n }",
"private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }",
"int getStatus(int index);",
"@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}",
"private boolean solicitarAutorizacionCxC(int intCodEmp, int intCodLoc, int intCodCot){\n boolean blnRes=false;\n try{\n java.sql.Connection conLoc;\n conLoc=DriverManager.getConnection(objParSis.getStringConexion(),objParSis.getUsuarioBaseDatos(),objParSis.getClaveBaseDatos());\n if(conLoc!=null){\n int EstAut = 1;\n EstAut = objAutPrg.checkCtlsCot(\"tbm_cabautcotven\", \"tbm_detautcotven\",intCodEmp,intCodLoc, intCodCot, conLoc,true);\n switch (EstAut) {\n case 1: // Todo Correcto\n //System.out.println(\"No necesita autorizaciones....\");\n blnRes=true;\n break;\n case 2:\n //System.out.println(\"Autorizacion....\");\n conLoc.setAutoCommit(false);\n \n if (objAutPrg.insertarCabDetAut(conLoc, intCodEmp, intCodLoc, intCodCot, 3)) {\n if(colocarCotizacionComoNecesitaAutorizacion(conLoc, intCodEmp, intCodLoc, intCodCot)){\n conLoc.commit();\n blnRes=true;\n }else{conLoc.rollback();}\n } else { conLoc.rollback();}\n \n break; \n };\n }\n \n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(this, Evt);\n } \n return blnRes;\n }",
"public boolean isActiveValue() {\n\n\t\tint tmp = getValue();\n\t\tif (tmp == 25)\n\t\t\tdetectStatus = true;\n\t\telse // Getting 24 here\n\t\t\tdetectStatus = false;\n\n\t\treturn detectStatus;\n\t}",
"public ResultSet Recomp1() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.comp_id,c.compname from company c,login l where l.login_id=c.login_id and l.status='not approved'\");\r\n\treturn rs;\r\n\t\r\n}",
"public void filterRequestStatus(String _status) {\n\t\tsleep(3);\n\t\tclickByJavaScript(By.xpath(\".//*[@id='projection-management']/div[1]/div[6]/span[1]/span[1]/span[2]/span[1]\"));\n\t\tsleep(1);\n\t\tclickOnElement(driver.findElement(By.xpath(\".//li[@data-offset-index = '\"+_status+\"']\")));\t\t\n\t}"
] | [
"0.54115355",
"0.5226844",
"0.51518905",
"0.51403797",
"0.50887626",
"0.5084836",
"0.5043272",
"0.50205195",
"0.5017487",
"0.50141996",
"0.49952075",
"0.49710837",
"0.49589816",
"0.49574584",
"0.49573725",
"0.4913837",
"0.48780423",
"0.4813696",
"0.48088634",
"0.4801773",
"0.47503793",
"0.4728058",
"0.4725746",
"0.47156167",
"0.47151446",
"0.4714994",
"0.47065067",
"0.4702111",
"0.4699491",
"0.4680399",
"0.4678493",
"0.46618578",
"0.4658443",
"0.46556488",
"0.46434885",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.46253464",
"0.4614102",
"0.46091822",
"0.46031737",
"0.45877573",
"0.45848796",
"0.45812938",
"0.45742142",
"0.45727888",
"0.45666942",
"0.45565432",
"0.45547128",
"0.45544553",
"0.4542947",
"0.45394418",
"0.45386904",
"0.45382798",
"0.45381537",
"0.45311227",
"0.45279187",
"0.45243752",
"0.452412",
"0.4523254",
"0.45222172",
"0.45218778",
"0.45157343",
"0.45145622",
"0.4511",
"0.4510837",
"0.44998845",
"0.44983795",
"0.44941857",
"0.44933727",
"0.44933727",
"0.44933164",
"0.44927716",
"0.44907305",
"0.4483949",
"0.44761473",
"0.447556",
"0.44731376",
"0.4468202",
"0.44660625",
"0.4462994",
"0.44624555",
"0.44593593"
] | 0.47584295 | 20 |
and csmi_on_certify_image is null | public M csmiOnCertifyImageNull(){if(this.get("csmiOnCertifyImageNot")==null)this.put("csmiOnCertifyImageNot", "");this.put("csmiOnCertifyImage", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiCertifyImageNull(){if(this.get(\"csmiCertifyImageNot\")==null)this.put(\"csmiCertifyImageNot\", \"\");this.put(\"csmiCertifyImage\", null);return this;}",
"public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}",
"public M csmiDriverImageNull(){if(this.get(\"csmiDriverImageNot\")==null)this.put(\"csmiDriverImageNot\", \"\");this.put(\"csmiDriverImage\", null);return this;}",
"boolean hasImageByTransform();",
"public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }",
"public void isImagePresent() {\r\n\t\t\t\r\n\t\t}",
"public boolean isSetImg() {\n return this.img != null;\n }",
"public boolean hasProductPicture(){\r\n\t\t\t\t\r\n\t\treturn\tMcsElement.isElementPresent(driver, PRODUCT_PIC_CONTAINER+\"//img\");\r\n\t\t\t\r\n\t\t}",
"boolean hasPicture();",
"public boolean hasImage() { return ImageResource != NO_IMAGE_PROVIDED; }",
"private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}",
"private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }",
"boolean hasImageByHandler();",
"public boolean isSetWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(WEATHERIMAGE$2) != 0;\n }\n }",
"public boolean hasImage() {\n return !getImageResourceIds().equals(\"\");\n }",
"public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}",
"public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"public boolean hasImage() {\n return mAttractionImageResourceID != NO_IMAGE_AVAILABLE;\n }",
"@Test\n public void getPicture_NoPictureExist(){\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"public boolean hasImage() {\n\t\treturn false;\n\t}",
"private boolean properExtensionalImage(CompoundTerm term) {\n\t\tif (term.con().equals(Connector.ExtImage())) {\n\t\t\tIterator<AtomicTerm> i = term.comps().iterator();\n\t\t\ti.next(); // xxx (relation)\n\t\t\treturn i.next().equals(AtomicTerm.Placeholder());\n\t\t}\n\t\treturn false;\n\t}",
"public boolean verifyEmptyToDoImage() {\n if (validateAttributeContain(imageEmptyToDo, \"src\", \"images/icons/clipboard.png\", \"Image Empty ToDo\")) {\n return true;\n }\n return false;\n }",
"public boolean shouldImageProcess() {\r\n\t\treturn table.getBoolean(SHOULD_IMAGE_PROCESS_KEY, false);\r\n\t}",
"public boolean hasImage(){\n //return true or false\n return mImageResource != NO_IMAGE_PROVIDED;\n }",
"public boolean isContractImageExist(String sContract){\n\t\treturn hmContractImage.containsKey(sContract);\n\t}",
"public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"public boolean isImageNotPresent() {\n if (addingItem) {\n if (picturePath == null) {\n if (makeImageMandatory) {\n return true;\n //true creates toast\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }",
"@Test\n public void testNotRegenerateImage() throws Exception {\n assertFalse(\n \"This flag should not be committed as true\", ImageSimilarity.REGENERATE_EXPECTED_IMAGES);\n }",
"private boolean validateEventMainImage(){\n if(imageUri == null){\n Toasty.error(CreateEventActivity.this, \"Please set the main image for the event\", Toast.LENGTH_SHORT, true).show();\n return false;\n }\n else{\n return true;\n }\n }",
"boolean hasImagePath();",
"private void checkDrawable(){\n boolean hasDrawable = (imageView.getDrawable() != null);\n\n if(imageView.getDrawable() != null){\n imageAnalyze.setVisibility(VISIBLE);\n instruction.setText(\"Click the the button in the center of the screen to analyze the image.\");\n }\n else{\n imageAnalyze.setVisibility(View.INVISIBLE);\n instruction.setText(\"Import a fundus image from your gallery.\");\n }\n }",
"public M csmiCertifyNumNull(){if(this.get(\"csmiCertifyNumNot\")==null)this.put(\"csmiCertifyNumNot\", \"\");this.put(\"csmiCertifyNum\", null);return this;}",
"@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"boolean hasC3();",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"protected Boolean hasImageName(Object value) {\n\t return true;\n }",
"@Then(\"Universal Images Record should be updated and should be displayed in the listing\")\n\tpublic void ccc() throws FileNotFoundException, IOException, InterruptedException {\n\t}",
"boolean isImageDisplayed();",
"public boolean hasImage() {\n return mImageResourceID != NO_IMAGE_PROVIDED;\n }",
"@Test\n public void testImageFiltering()\n { \n String html = header + \"<img src=\\\"file://path/to/local/image.png\\\"/>\" + footer;\n Document doc = wysiwygHTMLCleaner.clean(new StringReader(html));\n NodeList nodes = doc.getElementsByTagName(\"img\");\n Assert.assertEquals(1, nodes.getLength());\n Element image = (Element) nodes.item(0);\n Node startComment = image.getPreviousSibling();\n Node stopComment = image.getNextSibling();\n Assert.assertEquals(Node.COMMENT_NODE, startComment.getNodeType());\n Assert.assertEquals(\"startimage:false|-|attach|-|Missing.png\", startComment.getNodeValue());\n Assert.assertEquals(\"Missing.png\", image.getAttribute(\"src\"));\n Assert.assertEquals(Node.COMMENT_NODE, stopComment.getNodeType());\n Assert.assertTrue(stopComment.getNodeValue().equals(\"stopimage\"));\n }",
"@Override\n\tpublic boolean checkCNP() {\n\t\treturn false;\n\t}",
"public boolean isEmptyImage() {\n if (mbarrayImg == null || mbarrayImg.length == 0 || mbarrayImg[0].length == 0 || mnWidth == 0 || mnHeight == 0) {\n return true;\n }\n return false;\n }",
"boolean hasExternalAttributionCredit();",
"private boolean getClassificationResult(String imgPath) {\n return false;\n }",
"@Override\n\tpublic boolean isMyImage() {\n\t\treturn false;\n\t}",
"@Override\n public boolean apply(Image input) {\n return !(input.deprecated() != null && input.deprecated().state() != null);\n }",
"public native boolean signatureImage() throws MagickException;",
"boolean mo60903a(AvatarImageWithVerify avatarImageWithVerify, UserVerify userVerify);",
"public boolean mo12928a(Model model) {\n return model.toString().startsWith(\"data:image\");\n }",
"public boolean isNotNullMcc() {\n return genClient.cacheValueIsNotNull(CacheKey.mcc);\n }",
"@Test\n public void getPicture_Exists(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(image, appContext);\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"public CollisionImage getCImg() { return cimg; }",
"public native boolean isMonochromeImage() throws MagickException;",
"public boolean hasNoImages() {\n return noImages;\n }",
"void mo60904b(AvatarImageWithVerify avatarImageWithVerify);",
"public final boolean mo60903a(AvatarImageWithVerify avatarImageWithVerify, UserVerify userVerify) {\n if (!TextUtils.isEmpty(userVerify.getEnterpriseVerifyReason())) {\n return true;\n }\n return false;\n }",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-219\" })\n\tpublic void dmcaRestrictedChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Logo MOBANDEVER-219\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplLogo();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"@Override\n public Image getImage(Photo photo) {\n return null;\n }",
"private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);",
"boolean hasPictureUri();",
"void mo60902a(AvatarImageWithVerify avatarImageWithVerify);",
"private void verifyImageResponse(String imageProcessResult) {\n\t\ttry {\n\t\t\tif (imageProcessResult != null) {\n\t\t\t\tJSONObject imageResponseJson = new JSONObject(imageProcessResult);\n\t\t\t\tif ((imageResponseJson.has(SmartConstants.CAMERA_OPERATION_SUCCESSFUL_TAG)) & (imageResponseJson.getBoolean(SmartConstants.CAMERA_OPERATION_SUCCESSFUL_TAG))) {\n\t\t\t\t\tthis.smartCameraListener.onSuccessCameraOperation(imageProcessResult);\n\t\t\t\t} else {\n\t\t\t\t\t// this means there has been some error in the\n\t\t\t\t\t// camera service operation. Need to throw the error\n\t\t\t\t\tthis.smartCameraListener.onErrorCameraOperation(imageResponseJson.getInt(SmartConstants.CAMERA_OPERATION_EXCEPTION_TYPE_TAG),\n\t\t\t\t\t\t\timageResponseJson.getString(SmartConstants.CAMERA_OPERATION_EXCEPTION_MESSAGE_TAG));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.smartCameraListener.onErrorCameraOperation(ExceptionTypes.PROBLEM_CAPTURING_IMAGE_EXCEPTION, ExceptionTypes.PROBLEM_CAPTURING_IMAGE_EXCEPTION_MESSAGE);\n\t\t\t}\n\t\t} catch (JSONException je) {\n\t\t\t// TODO handle this exception\n\t\t}\n\t}",
"public boolean checkImageComponent(String filename) {\n if (componentMap.containsKey(filename))\n return true;\n else\n return false;\n }",
"boolean deleteImage(Image img) {\r\n\t\treturn true;\r\n\t}",
"public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"public boolean hasBrandLogoImageUrl() {\n return fieldSetFlags()[7];\n }",
"@Test\n\tpublic void equalsNull() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(null);\n\t\tAssert.assertFalse(equals);\n\t}",
"@Test\n public void testNoImageTypesRGBWithCMYKProfile() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/no-image-types-rgb-us-web-coated-v2-ms-photogallery-exif.jpg\")));\n\n assertEquals(1743, reader.getWidth(0));\n assertEquals(2551, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(0, 0, 1743, 16)); // Save some memory\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(1743, image.getWidth());\n assertEquals(16, image.getHeight());\n\n // TODO: Need to test colors!\n\n assertTrue(reader.hasThumbnails(0)); // Should not blow up!\n }",
"public boolean mo18891a(Model model) {\n return model.toString().startsWith(\"data:image\");\n }",
"public boolean isComputeLiveConfigured() {\n return\n identity != null && credential != null && image != null && location != null\n && !identity.isEmpty() && !credential.isEmpty() && !image.isEmpty() && !location.isEmpty();\n }",
"boolean hasGcpFilestoreCsiDriverConfig();",
"private boolean resolveFakeImageURL(XDIMEContextInternal context,\n MapAttributes attributes)\n throws XDIMEException{\n \n boolean written = false;\n\n MarinerRequestContext requestContext =\n context.getInitialRequestContext();\n \n \n ImageAttributes imageAttributes = attributes.getImageAttributes();\n if(imageAttributes == null){\n // widget is not supported therefore image attributes were not set. \n written = false;\n } else {\n String url = imageAttributes.getSrc();\n // transcode the image.\n try {\n url = ContextInternals.constructImageURL(\n requestContext, url);\n } catch (RepositoryException e) {\n throw new XDIMEException(e);\n }\n \n createFakeAssetURLMapEntry(requestContext, url);\n \n // Rewrite the URL with PageURLRewriter.\n url = getPageContext(context)\n .getAssetResolver()\n .rewriteURLWithPageURLRewriter(url, PageURLType.IMAGE);\n \n imageAttributes.setSrc(url);\n written = true;\n }\n return written;\n }",
"boolean getXAxisCharacteristicIdNull();",
"private static native boolean detect_0(long nativeObj, long img_nativeObj, long points_nativeObj);",
"public boolean isMediaEncryptionMandatory();",
"public IMAGE_OPTIONAL_HEADER64 getOptionalHeader64() { return null; }",
"@Override\r\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\r\n\t}",
"@Override\n\t\tpublic ImageDescriptor getImageDescriptor() {\n\t\t\treturn null;\n\t\t}",
"boolean isNilIsManaged();",
"public boolean imageIsSelected() {\n return getBikeImagePath() != null;\n }",
"@Override\n\tpublic ImageDescriptor getImageDescriptor() {\n\t\treturn null;\n\t}",
"public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }",
"public void processImage(BufferedImage currentCameraImage) {\n isCatDetected = imageService.imageContainsCat(currentCameraImage, 50.0f);\n catDetected(isCatDetected);\n System.out.println(\"=> Debug: processImage: \");\n System.out.println(securityRepository.getAlarmStatus());\n System.out.println(securityRepository.getArmingStatus());\n }",
"public native boolean getMatte() throws MagickException;",
"public boolean isCrossIconPresent() {\r\n\t\treturn isElementPresent(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\".anticon.anticon-close.ant-modal-close-icon\"), SHORTWAIT);\r\n\t}",
"@Override\n\tprotected String getImage(int row, int col) {\n\t\treturn null;\n\t}",
"@Override\n public String GetImagePart() {\n return \"coal\";\n }",
"private static void ensureImage(final Image image) throws NotImageException\r\n\t{\r\n\t\tnew ImageIcon(image);\r\n\t\tif (image.getWidth(null) < 0)\r\n\t\t{\r\n\t\t\tthrow new NotImageException(image);\r\n\t\t}\r\n\t}",
"abstract protected boolean mustApplyTexture(DrawContext dc);",
"Picture identifyComponentImage() throws Exception;",
"protected void setCertificateCameraImage(Intent intent, int resultCode) {\n\n mImagePicker = new ImagePicker();\n certificateBitmap = (Bitmap) intent.getExtras().get(\"data\");\n mCertificateImage = (ImageView) findViewById(R.id.certificateImage);\n\n //Uri mCapturedImageUri = intent.getData();\n\n try {\n String[] ids = mCameraManager.getCameraIdList();\n //Log.e(TAG, \"Ids of Camera \" + Arrays.toString(ids));\n\n for (String id : ids) {\n CameraCharacteristics props = mCameraManager.getCameraCharacteristics(id);\n assertNotNull(\"Can't get camera characteristics for camera \" + id, props);\n\n Integer lensFacing = props.get(CameraCharacteristics.LENS_FACING);\n assertNotNull(\"Can't get lens facing info\", lensFacing);\n\n //Camera device faces the opposite direction as the device's screen\n if (lensFacing == CameraCharacteristics.LENS_FACING_BACK) {\n assertTrue(\"System doesn't have back camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp != null;\n mCertificateImage.setImageBitmap(bp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //Camera device faces the same direction as the device's screen\n } else if (lensFacing == CameraCharacteristics.LENS_FACING_FRONT) {\n assertTrue(\"System doesn't have front camera feature\",\n mPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT));\n try {\n //Bitmap bp = MediaStore.Images.Media.getBitmap(this.getContentResolver(), mCapturedImageUri);\n Bitmap bp = ImagePicker.getImageFromResult(this, resultCode, intent);\n assert bp !=null;\n mCertificateImage.setImageBitmap(bp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }else {\n fail(\"Unknown camera lens facing \" + lensFacing.toString());\n }\n }\n }catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"private static void checkNotAlreadyBuilt(ImageModule image,\n\t\t\tString cloudServiceName) throws ValidationException {\n\t\tif (image.getCloudImageIdentifier(cloudServiceName) != null) {\n\t\t\tthrow new ValidationException(\n\t\t\t\t\t\"This image was already built for cloud: \"\n\t\t\t\t\t\t\t+ cloudServiceName);\n\t\t}\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof ComplaintImageDTO)) {\n return false;\n }\n ComplaintImageDTO other = (ComplaintImageDTO) object;\n if ((this.complaintImageID == null && other.complaintImageID != null) || (this.complaintImageID != null && !this.complaintImageID.equals(other.complaintImageID))) {\n return false;\n }\n return true;\n }",
"public static WebElement img_clickToExpendCompCertSection() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[@id='trigger_filter_comCert']/img\"));\r\n \t\tAdd_Log.info(\"User is click on '+' icon to expend the Company Certification section.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"'+' icon to expend the Company Certification section is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public void setcImgUrl(String cImgUrl) {\n this.cImgUrl = cImgUrl == null ? null : cImgUrl.trim();\n }",
"boolean hasIcon();",
"boolean hasIcon();"
] | [
"0.75470245",
"0.62189466",
"0.6135257",
"0.5742753",
"0.57268316",
"0.5712929",
"0.55990726",
"0.5538126",
"0.5504424",
"0.5490772",
"0.5489087",
"0.54795235",
"0.5474239",
"0.54669553",
"0.5441724",
"0.5396414",
"0.536159",
"0.53468674",
"0.53356737",
"0.5278339",
"0.52634424",
"0.5260874",
"0.52459955",
"0.5226124",
"0.51435786",
"0.5140547",
"0.51370883",
"0.51367074",
"0.5129063",
"0.51214826",
"0.50844204",
"0.50514036",
"0.5045886",
"0.5045518",
"0.5045518",
"0.50232613",
"0.5022976",
"0.5021935",
"0.5007371",
"0.50012916",
"0.49965185",
"0.49811512",
"0.49764115",
"0.49664584",
"0.49304312",
"0.49282098",
"0.49264276",
"0.49243578",
"0.49093843",
"0.4901123",
"0.48931587",
"0.48889866",
"0.48881784",
"0.4882357",
"0.4873851",
"0.48479563",
"0.48444134",
"0.4840818",
"0.48206088",
"0.4820383",
"0.48135877",
"0.48081422",
"0.48062918",
"0.4804862",
"0.48019344",
"0.48000333",
"0.4783014",
"0.47762465",
"0.4769928",
"0.47685474",
"0.47661093",
"0.47631603",
"0.47375673",
"0.47064272",
"0.4697594",
"0.46922418",
"0.46914017",
"0.46902058",
"0.468957",
"0.4678647",
"0.46586514",
"0.46581545",
"0.46556985",
"0.4645997",
"0.46436659",
"0.4640826",
"0.4625833",
"0.46249023",
"0.46219948",
"0.46155962",
"0.4613027",
"0.46105522",
"0.4607185",
"0.46040052",
"0.46003672",
"0.45994747",
"0.45990756",
"0.45961174",
"0.45928982",
"0.45928982"
] | 0.75898975 | 0 |
and csmi_check_photo is null | public M csmiCheckPhotoNull(){if(this.get("csmiCheckPhotoNot")==null)this.put("csmiCheckPhotoNot", "");this.put("csmiCheckPhoto", null);return this;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}",
"public M csmiCertifyImageNull(){if(this.get(\"csmiCertifyImageNot\")==null)this.put(\"csmiCertifyImageNot\", \"\");this.put(\"csmiCertifyImage\", null);return this;}",
"private void checkIfThereIsStudentPhoto() {\n if (studentHasPhoto) {\n mAddPhotoImageView.setVisibility(View.GONE);\n mAddPhotoLabelTextView.setVisibility(View.GONE);\n }\n }",
"boolean hasPicture();",
"@Test\n public void getPicture_NoPictureExist(){\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"boolean hasImageByHandler();",
"@Override\n public Image getImage(Photo photo) {\n return null;\n }",
"public M csmiDriverImageNull(){if(this.get(\"csmiDriverImageNot\")==null)this.put(\"csmiDriverImageNot\", \"\");this.put(\"csmiDriverImage\", null);return this;}",
"public boolean isSetImg() {\n return this.img != null;\n }",
"public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }",
"public void isImagePresent() {\r\n\t\t\t\r\n\t\t}",
"boolean hasPictureUri();",
"public boolean isImageNotPresent() {\n if (addingItem) {\n if (picturePath == null) {\n if (makeImageMandatory) {\n return true;\n //true creates toast\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }",
"private boolean validateEventMainImage(){\n if(imageUri == null){\n Toasty.error(CreateEventActivity.this, \"Please set the main image for the event\", Toast.LENGTH_SHORT, true).show();\n return false;\n }\n else{\n return true;\n }\n }",
"private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }",
"private void checkDrawable(){\n boolean hasDrawable = (imageView.getDrawable() != null);\n\n if(imageView.getDrawable() != null){\n imageAnalyze.setVisibility(VISIBLE);\n instruction.setText(\"Click the the button in the center of the screen to analyze the image.\");\n }\n else{\n imageAnalyze.setVisibility(View.INVISIBLE);\n instruction.setText(\"Import a fundus image from your gallery.\");\n }\n }",
"@Test\n public void getPicture_Exists(){\n Bitmap image = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(image, appContext);\n Bitmap retrieved = testRecipe.getImage(appContext);\n assertNotEquals(\"getPicture - Not Null\", null, retrieved);\n }",
"public boolean hasProductPicture(){\r\n\t\t\t\t\r\n\t\treturn\tMcsElement.isElementPresent(driver, PRODUCT_PIC_CONTAINER+\"//img\");\r\n\t\t\t\r\n\t\t}",
"public void tryaAainPhoto() {\n\t\tthis.photo_attache_capture = false;\n\t}",
"public boolean hasPhoto(Photo obj)\n {\n int s = this.photo.size();\n if(this.photo == null || s == 0)\n {\n return false;\n }\n for(int i=0;i<s;i++)\n {\n if(obj.compareTo(this.photo.get(i))==0)\n {\n return true;\n }\n }\n return false;\n }",
"private void change_im_check(boolean boo){\r\n if(boo){ //IMAGEN SI EL MEASURE ES CORRECTO\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN MEASURE\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img34.png\")));\r\n }\r\n }",
"private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}",
"public boolean hasImage() { return ImageResource != NO_IMAGE_PROVIDED; }",
"public boolean verifyEmptyToDoImage() {\n if (validateAttributeContain(imageEmptyToDo, \"src\", \"images/icons/clipboard.png\", \"Image Empty ToDo\")) {\n return true;\n }\n return false;\n }",
"boolean canTakeNewPhoto();",
"public boolean hasImage(){\n //return true or false\n return mImageResource != NO_IMAGE_PROVIDED;\n }",
"public boolean hasPhoto() {\n if (getIsNatural() == 1) {\n return getMedia() != null && getMedia().size() > 0;\n }\n return true;\n }",
"public boolean isEmptyImage() {\n if (mbarrayImg == null || mbarrayImg.length == 0 || mbarrayImg[0].length == 0 || mnWidth == 0 || mnHeight == 0) {\n return true;\n }\n return false;\n }",
"boolean mo60903a(AvatarImageWithVerify avatarImageWithVerify, UserVerify userVerify);",
"public boolean hasImage() {\n return !getImageResourceIds().equals(\"\");\n }",
"@Test\n public void editPicture_NotNull(){\n Bitmap originalImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(originalImage, appContext);\n Bitmap newImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_cart);\n testRecipe.setImage(newImage, appContext);\n assertNotEquals(\"editPicture - New Image Not Null\", null, testRecipe.getImage(appContext));\n }",
"private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);",
"public int setPhotoChecked(int r8, org.telegram.messenger.VideoEditedInfo r9) {\n /*\n r7 = this;\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r0 = r0.maxSelectedPhotos;\n r1 = -1;\n if (r0 < 0) goto L_0x0020;\n L_0x0009:\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.selectedPhotos;\n r0 = r0.size();\n r2 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r2 = r2.maxSelectedPhotos;\n if (r0 < r2) goto L_0x0020;\n L_0x0019:\n r0 = r7.isPhotoChecked(r8);\n if (r0 != 0) goto L_0x0020;\n L_0x001f:\n return r1;\n L_0x0020:\n r0 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r0 = r0.getPhotoEntryAtPosition(r8);\n if (r0 != 0) goto L_0x0029;\n L_0x0028:\n return r1;\n L_0x0029:\n r2 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r2 = r2.addToSelectedPhotos(r0, r1);\n r3 = 0;\n if (r2 != r1) goto L_0x0042;\n L_0x0032:\n r2 = org.telegram.p004ui.Components.ChatAttachAlert.selectedPhotosOrder;\n r4 = r0.imageId;\n r4 = java.lang.Integer.valueOf(r4);\n r2 = r2.indexOf(r4);\n r4 = 1;\n goto L_0x0046;\n L_0x0042:\n r4 = 0;\n r0.editedInfo = r4;\n r4 = 0;\n L_0x0046:\n r0.editedInfo = r9;\n r9 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r9 = r9.attachPhotoRecyclerView;\n r9 = r9.getChildCount();\n r0 = 0;\n L_0x0053:\n if (r0 >= r9) goto L_0x0090;\n L_0x0055:\n r5 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r5 = r5.attachPhotoRecyclerView;\n r5 = r5.getChildAt(r0);\n r6 = r5 instanceof org.telegram.p004ui.Cells.PhotoAttachPhotoCell;\n if (r6 == 0) goto L_0x008d;\n L_0x0063:\n r6 = r5.getTag();\n r6 = (java.lang.Integer) r6;\n r6 = r6.intValue();\n if (r6 != r8) goto L_0x008d;\n L_0x006f:\n r9 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r9 = r9.baseFragment;\n r9 = r9 instanceof org.telegram.p004ui.ChatActivity;\n if (r9 == 0) goto L_0x0087;\n L_0x0079:\n r9 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r9 = r9.maxSelectedPhotos;\n if (r9 >= 0) goto L_0x0087;\n L_0x0081:\n r5 = (org.telegram.p004ui.Cells.PhotoAttachPhotoCell) r5;\n r5.setChecked(r2, r4, r3);\n goto L_0x0090;\n L_0x0087:\n r5 = (org.telegram.p004ui.Cells.PhotoAttachPhotoCell) r5;\n r5.setChecked(r1, r4, r3);\n goto L_0x0090;\n L_0x008d:\n r0 = r0 + 1;\n goto L_0x0053;\n L_0x0090:\n r9 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r9 = r9.cameraPhotoRecyclerView;\n r9 = r9.getChildCount();\n r0 = 0;\n L_0x009b:\n if (r0 >= r9) goto L_0x00d8;\n L_0x009d:\n r5 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r5 = r5.cameraPhotoRecyclerView;\n r5 = r5.getChildAt(r0);\n r6 = r5 instanceof org.telegram.p004ui.Cells.PhotoAttachPhotoCell;\n if (r6 == 0) goto L_0x00d5;\n L_0x00ab:\n r6 = r5.getTag();\n r6 = (java.lang.Integer) r6;\n r6 = r6.intValue();\n if (r6 != r8) goto L_0x00d5;\n L_0x00b7:\n r8 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r8 = r8.baseFragment;\n r8 = r8 instanceof org.telegram.p004ui.ChatActivity;\n if (r8 == 0) goto L_0x00cf;\n L_0x00c1:\n r8 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r8 = r8.maxSelectedPhotos;\n if (r8 >= 0) goto L_0x00cf;\n L_0x00c9:\n r5 = (org.telegram.p004ui.Cells.PhotoAttachPhotoCell) r5;\n r5.setChecked(r2, r4, r3);\n goto L_0x00d8;\n L_0x00cf:\n r5 = (org.telegram.p004ui.Cells.PhotoAttachPhotoCell) r5;\n r5.setChecked(r1, r4, r3);\n goto L_0x00d8;\n L_0x00d5:\n r0 = r0 + 1;\n goto L_0x009b;\n L_0x00d8:\n r8 = org.telegram.p004ui.Components.ChatAttachAlert.this;\n r8.updatePhotosButton();\n return r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.p004ui.Components.ChatAttachAlert$BasePhotoProvider.setPhotoChecked(int, org.telegram.messenger.VideoEditedInfo):int\");\n }",
"private void setPhotoAttcher() {\n\n }",
"boolean hasImagePath();",
"public boolean isSetWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(WEATHERIMAGE$2) != 0;\n }\n }",
"public boolean isPhotoPresent(Album album) throws Exception\n {\n return false;\n }",
"public boolean hasImage() {\n\t\treturn false;\n\t}",
"boolean hasAvatar();",
"boolean hasAvatar();",
"public boolean hasPicture() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"public boolean hasPicture() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasNoImages() {\n return noImages;\n }",
"boolean hasImageByTransform();",
"private void checkForOrphanFiles() {\n List<String> dbFileNames = getPhotoFilesInDatabase();\n List<String> dirFileNames = getPhotoFilesInDirectory();\n\n // Find files that are not in the db.\n dirFileNames.removeAll(dbFileNames);\n\n // Create a new photo shoot for the orphaned photos.\n if (dirFileNames.size() > 0) {\n long shootId = createOrphanShoot(dirFileNames);\n\n GhostPhotoPreferences.setHasOrphanPhotoShootBeenCreated(getApplicationContext(), true);\n Log.d(LOG_TAG, \"checkForOrphanFiles: Created orphan photo shoot: \" + shootId);\n }\n }",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"public boolean hasImage() {\n return mImageResourceId != NO_IMAGE_PROVIDED;\n }",
"private static native boolean detect_0(long nativeObj, long img_nativeObj, long points_nativeObj);",
"private void getUserPhotoChoice() {\n int checkedChipId = mBinding.chipGroupPhoto.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_photo) {\n mChipPhotoInput = 1;\n } else if (checkedChipId == R.id.chip_3_photo) {\n mChipPhotoInput = 3;\n } else if (checkedChipId == R.id.chip_5_photo) {\n mChipPhotoInput = 5;\n } else {\n mChipPhotoInput = 0;\n }\n }",
"public boolean imageIsSelected() {\n return getBikeImagePath() != null;\n }",
"@Test\n\tpublic void testGetCorrectParamMatchingNoPii() {\n\t\tfinal String owner = \"1\";\n\t\twhen(mPiiService.getPiiFile((long) 123456789, owner)).thenReturn(null);\n\t\t\n\t\tResponse response = piiController.getPii((long) 123456789, owner);\n\t\t\n\t\tverify(mPiiService).getPiiFile((long) 123456789, owner);\n\t\tverifyZeroInteractions(mPuidDao);\n\t\t\n\t\tassertEquals(204, response.getStatus());\n\t\tassertNull(response.getEntity());\n\t}",
"void mo60904b(AvatarImageWithVerify avatarImageWithVerify);",
"public void mo10685a() {\n if (MultiPhotoFrameMainActivity.this.f14954b != null && !MultiPhotoFrameMainActivity.this.f14954b.mo10844k()) {\n MultiPhotoFrameMainActivity.this.f14954b.mo6022d().putBoolean(\"GalleryUpdateKey\", true);\n }\n }",
"public boolean isSetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(NULLFLAVOR$28) != null;\n }\n }",
"public final boolean mo60903a(AvatarImageWithVerify avatarImageWithVerify, UserVerify userVerify) {\n if (!TextUtils.isEmpty(userVerify.getEnterpriseVerifyReason())) {\n return true;\n }\n return false;\n }",
"public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }",
"private boolean hasImages(Vector images)\n {\n if(images != null)\n return ! images.isEmpty();\n else\n return false;\n }",
"Boolean hasTitlePicture(Long galleryId);",
"public boolean fileNotNullCheck(final MultipartFile file) {\n\t\treturn !(file.equals(null) || file.isEmpty());\n\t}",
"public boolean hasImage() {\n return mImageResourceID != NO_IMAGE_PROVIDED;\n }",
"private boolean putInExifLoadingQueue(final Photo photo) {\r\n\r\n\t\tfinal PhotoImageMetadata photoImageMetadata = ExifCache.get(photo.imageFilePathName);\r\n\r\n\t\tif (photoImageMetadata != null) {\r\n\r\n\t\t\tphoto.updateImageMetadata(photoImageMetadata);\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tPhotoLoadManager.putImageInLoadingQueueExif(photo, new LoadCallbackExif(photo, _currentExifRunId));\r\n\r\n\t\treturn false;\r\n\t}",
"public void parseContactPhotoPresence(Stanza packet)\n {\n // Retrieves the contact ID and its avatar that Jitsi currently\n // managed concerning the peer that has send this presence packet.\n EntityBareJid userID = packet.getFrom().asEntityBareJidOrThrow();\n ContactJabberImpl sourceContact\n = ssContactList.findContactById(userID);\n\n // If this contact is not yet in our contact list, then there is no need\n // to manage this photo update.\n if(sourceContact == null)\n {\n return;\n }\n\n byte[] currentAvatar = sourceContact.getImage(false);\n\n // Get the packet extension which contains the photo tag.\n StandardExtensionElement defaultPacketExtension =\n packet.getExtension(\n VCardTempXUpdatePresenceExtension.ELEMENT_NAME,\n VCardTempXUpdatePresenceExtension.NAMESPACE);\n if(defaultPacketExtension == null)\n {\n return;\n }\n try\n {\n StandardExtensionElement photoElement\n = defaultPacketExtension.getFirstElement(\"photo\");\n if (photoElement == null)\n {\n return;\n }\n\n // If this presence packet has a photo tag with a SHA-1 hash\n // which differs from the current avatar SHA-1 hash, then Jitsi\n // retrieves the new avatar image and updates this contact image\n // in the contact list.\n String packetPhotoSHA1 = photoElement.getText();\n if(packetPhotoSHA1 != null\n && !packetPhotoSHA1.equals(\n VCardTempXUpdatePresenceExtension.getImageSha1(\n currentAvatar))\n )\n {\n byte[] newAvatar = null;\n\n // If there is an avatar image, retrieves it.\n if(packetPhotoSHA1.length() != 0)\n {\n // Retrieves the new contact avatar image.\n VCardManager manager = VCardManager.getInstanceFor(\n parentProvider.getConnection());\n VCard vCard = manager.loadVCard(userID);\n newAvatar = vCard.getAvatar();\n }\n // Else removes the current avatar image, since the contact\n // has removed it from the server.\n else\n {\n newAvatar = new byte[0];\n }\n\n // Sets the new avatar image to the Jitsi contact.\n sourceContact.setImage(newAvatar);\n // Fires a property change event to update the contact list.\n this.fireContactPropertyChangeEvent(\n ContactPropertyChangeEvent.PROPERTY_IMAGE,\n sourceContact,\n currentAvatar,\n newAvatar);\n }\n }\n catch(XMPPException\n | InterruptedException\n | NotConnectedException\n | NoResponseException ex)\n {\n logger.info(\"Cannot retrieve vCard from: \" + packet.getFrom());\n if(logger.isTraceEnabled())\n logger.trace(\"vCard retrieval exception was: \", ex);\n }\n }",
"private void queryAndSetPicture() {\n StorageReference storageRef = mStorage.getReference().child(user.getId());\n final long ONE_MEGABYTE = 1024 * 1024;\n storageRef.getBytes(ONE_MEGABYTE).addOnSuccessListener(new OnSuccessListener<byte[]>() {\n @Override\n public void onSuccess(byte[] bytes) {\n // Data for \"images/island.jpg\" is returns, use this as needed\n mImageByteArray = bytes;\n mImageBitmap = BitmapFactory.decodeByteArray(mImageByteArray, 0, mImageByteArray.length);\n mUserimage.setImageBitmap(mImageBitmap);\n mUserimage.setBackgroundColor(80000000);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle any errors\n// mUserimage.setBackgroundColor(80000000);\n }\n });\n\n }",
"public boolean isPictPTFound(){\n \tif (!isPictFetche) {\t// Si l'image n'a jamais �t� fetch�e, le faire now !\r\n \t\tisPictFound = fetchPict();\r\n \t\tisPictFetche = true;\r\n \t}\r\n \treturn isPictFound;\r\n }",
"@Test\n public void testNotRegenerateImage() throws Exception {\n assertFalse(\n \"This flag should not be committed as true\", ImageSimilarity.REGENERATE_EXPECTED_IMAGES);\n }",
"boolean isImageDisplayed();",
"boolean isNotAllMedia();",
"public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"void mo60902a(AvatarImageWithVerify avatarImageWithVerify);",
"@Override\n public boolean isNull(){\n return (this.nativeHandle == 0L); \n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }",
"protected void checkForThumbnail(PM_Picture picture, int ind) {\n\t\tif (picture.hasImageThumbnail() == false) {\n\t\t\tthumbsToRead.add(picture);\n\t\t}\n\t}",
"public PictureData searchPicture(String pictureId) {\n\t\treturn null;\n\t}",
"public void onResume() {\n super.onResume();\n if (this.f12125b != null) {\n if (this.f12126c != null) {\n this.f12126c.mo8947b();\n }\n if (this.f12125b.mo6024f()) {\n this.f12125b.mo6021b(false);\n if (this.f12129f.equalsIgnoreCase(\"check\")) {\n this.f12125b.mo8864c(this._isPictureRecMode);\n return;\n }\n return;\n }\n this.f12125b.mo8864c(this._isPictureRecMode);\n }\n }",
"public boolean hasPictureUri() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"protected Boolean hasImageName(Object value) {\n\t return true;\n }",
"public M csolSrcNull(){if(this.get(\"csolSrcNot\")==null)this.put(\"csolSrcNot\", \"\");this.put(\"csolSrc\", null);return this;}",
"public boolean hasMediaAssetFileHolder() {\n return mediaAssetFileHolder_ != null;\n }",
"private static native boolean detectMulti_0(long nativeObj, long img_nativeObj, long points_nativeObj);",
"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 }",
"public boolean hasPictureUri() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"private void find_user_sendimage_notifaction() {\r\n FirebaseDatabase.getInstance().getReference().child(DataManager.NotifactionUserRoot).child(FirebaseAuth.getInstance().getCurrentUser().getUid())\r\n .addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n if (dataSnapshot.exists()) {\r\n if (dataSnapshot.hasChild(DataManager.UserFullname)) {\r\n String name = dataSnapshot.child(DataManager.UserFullname).getValue().toString();\r\n if (!name.isEmpty()) {\r\n send_image_notfaction(name);\r\n }\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n }",
"private static native boolean read_0(long nativeObj, long image_nativeObj);",
"public boolean hasImage() {\n return mAttractionImageResourceID != NO_IMAGE_AVAILABLE;\n }",
"public Boolean getHasPhoto() {\n\t\treturn hasPhoto;\n\t}",
"public boolean isPic(){\n return this.isPic;\n }",
"public boolean mo12928a(Model model) {\n return model.toString().startsWith(\"data:image\");\n }",
"@Test\n\tpublic void equalsNull() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(null);\n\t\tAssert.assertFalse(equals);\n\t}",
"private void checkCameraBeforeOpen() {\n // First get the back up camera\n List<String> backUpPreviewCamera = mCameraIdManager.getBackUpPreviewCameraId();\n // Second,get the remote camera and filter is connect camera\n LinkedHashMap<String, IRemoteDevice> remoteConnectedCamera = mIMultiCameraDeviceAdapter\n .queryRemoteDevices();\n // key-value is cameraId-deviceId\n LinkedHashMap<String, String> deviceId = mCameraIdManager.getDeviceId();\n List<String> deleteItem = new ArrayList<String>();\n int status = IMultiCameraDeviceAdapter.REMOTE_CAEMRA_STATUS_UNKNOWN;\n LogHelper.d(TAG, \"[checkCameraBeforeOpen],before check camera, the camera id :\"\n + backUpPreviewCamera);\n // back up camera maybe not equals remote camera,such as pause camera\n // and disconnect remote camera from cross mount setting.\n for (String needOpenCamera : mCameraIdManager.getDeviceId().keySet()) {\n if (!MultiCameraModuleUtil.isLocalCamera(needOpenCamera)) {\n if (remoteConnectedCamera.size() == 0) {\n deleteItem.add(needOpenCamera);\n } else {\n // get the device id according camera id from mDeviceId\n String needCheckdeviceId = deviceId.get(needOpenCamera);\n IRemoteDevice device = remoteConnectedCamera.get(needCheckdeviceId);\n if (device != null) {\n status = device.get(IRemoteDevice.KEY_REMOTE_SERVICE_STATUS);\n }\n // If the remote camera status is not connected,need remove it.\n if (IMultiCameraDeviceAdapter.REMOTE_CAEMRA_STATUS_CONNECTED != status) {\n deleteItem.add(needOpenCamera);\n }\n }\n }\n }\n // Update the back up preview camera id and update the camera id.\n for (String cameraId : deleteItem) {\n backUpPreviewCamera.remove(cameraId);\n updateCameraBeforeOpened(false, cameraId, null);\n }\n // if the camera id is null,need add the local camera into the preview list\n if (backUpPreviewCamera.size() == 0) {\n backUpPreviewCamera.add(mCameraId);\n updateCameraBeforeOpened(true, mCameraId, mLocalDeviceIdKeyPref + mCameraId);\n }\n\n LogHelper.d(TAG, \"[checkCameraBeforeOpen],after check camera, the camera id :\"\n + backUpPreviewCamera);\n }",
"void onPhotoError();",
"public final boolean mo99836a() {\n if (C40173d.f104443a.mo99939a(MvChoosePhotoActivity.this.f104225o)) {\n if (MvChoosePhotoActivity.this.f104230t == null || C23477d.m77081a((Collection<T>) MvChoosePhotoActivity.this.f104230t.mo99933a()) || MvChoosePhotoActivity.this.f104230t.mo99933a().size() < MvChoosePhotoActivity.this.f104214d) {\n return false;\n }\n return true;\n } else if (MvChoosePhotoActivity.this.f104229s >= MvChoosePhotoActivity.this.f104214d) {\n return true;\n } else {\n return false;\n }\n }",
"public byte[] doInBackground(byte[]... data) {\n byte[] originalJpegData;\n byte[] originalJpegData2 = data[0];\n if (PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() > 0.0f && PhotoModule.this.isSupportBeauty() && (PhotoModule.this.mCameraId == 0 || PhotoModule.this.mCameraId == 1)) {\n Size size = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n float seek = PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() / 20.0f;\n int angle = PhotoModule.this.mCameraId == 1 ? MediaProviderUtils.ROTATION_270 : 90;\n if (originalJpegData2 != null) {\n originalJpegData2 = BeautifyHandler.processImageNV21(PhotoModule.this.mActivity, originalJpegData2, size.width(), size.height(), seek, angle);\n }\n }\n PhotoModule.this.mActivity.getButtonManager().mBeautyEnable = true;\n Size size2 = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n PhotoModule.this.mIsAddWaterMark = PhotoModule.this.mCameraSettings.isAddWaterMarkEnabled();\n if (PhotoModule.this.mFinalDrCheckResult.size() <= 1) {\n Log.d(PhotoModule.TAG, \"start to jpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(originalJpegData2, size2.width(), size2.height());\n Log.d(PhotoModule.TAG, \"end to jpeg\");\n } else {\n int result = PhotoModule.this.mImageRefiner.processImage();\n Tag access$500 = PhotoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"processImage result = \");\n stringBuilder.append(result);\n Log.d(access$500, stringBuilder.toString());\n byte[] output = new byte[originalJpegData2.length];\n if (result < 0) {\n output = (byte[]) PhotoModule.this.mAddedImages.get(0);\n } else {\n int getOutputResult = PhotoModule.this.mImageRefiner.getOutputImageRaw(output);\n Tag access$5002 = PhotoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"getOutputResult = \");\n stringBuilder2.append(getOutputResult);\n Log.d(access$5002, stringBuilder2.toString());\n }\n PhotoModule.this.mImageRefiner.finish();\n PhotoModule.this.mImageRefiner = null;\n Log.d(PhotoModule.TAG, \"mImageRefiner = null\");\n Log.d(PhotoModule.TAG, \"compressToJpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(output, size2.width(), size2.height());\n }\n if (cameraProxy.getCharacteristics().isFacingFront() && PhotoModule.this.isNeedMirrorSelfie()) {\n originalJpegData = PhotoModule.this.aftMirrorJpeg(originalJpegData);\n }\n if (!Keys.isAlgorithmsOn(PhotoModule.this.mActivity.getSettingsManager()) || PhotoModule.this.isDepthEnabled() || PhotoModule.this.mBurstResultQueue.isEmpty()) {\n return originalJpegData;\n }\n TotalCaptureResult totalCaptureResult = (TotalCaptureResult) PhotoModule.this.mBurstResultQueue.removeFirst();\n if (PhotoModule.this.mInHdrProcess) {\n PhotoModule.this.mBurstResultQueue.clear();\n }\n return PhotoModule.this.addExifTags(originalJpegData, totalCaptureResult, cameraProxy.getCharacteristics().isFacingFront(), PhotoModule.this.mJpegRotation);\n }",
"public boolean isSetPicturecount() {\n return __isset_bit_vector.get(__PICTURECOUNT_ISSET_ID);\n }",
"public boolean isSetPicturenumber() {\n return __isset_bit_vector.get(__PICTURENUMBER_ISSET_ID);\n }",
"@Override\n public boolean hasUploadedFiles(Item item) throws SQLException\n {\n List<Bundle> bundles = getBundles(item, \"ORIGINAL\");\n for (Bundle bundle : bundles) {\n if (CollectionUtils.isNotEmpty(bundle.getBitstreams())) {\n return true;\n }\n }\n return false;\n }",
"public final boolean mo99836a() {\n if (C40173d.f104443a.mo99939a(MvChoosePhotoActivity.this.f104225o)) {\n if (MvChoosePhotoActivity.this.f104230t == null || C23477d.m77081a((Collection<T>) MvChoosePhotoActivity.this.f104230t.mo99933a()) || MvChoosePhotoActivity.this.f104230t.mo99933a().size() < MvChoosePhotoActivity.this.f104213c) {\n return false;\n }\n return true;\n } else if (MvChoosePhotoActivity.this.f104228r >= MvChoosePhotoActivity.this.f104213c) {\n return true;\n } else {\n return false;\n }\n }",
"private static byte[] getStatusImage(MetaContact metaContact)\n {\n PresenceStatus status = null;\n Iterator<Contact> contactsIter = metaContact.getContacts();\n while (contactsIter.hasNext()) {\n Contact protoContact = contactsIter.next();\n PresenceStatus contactStatus = protoContact.getPresenceStatus();\n if (status == null)\n status = contactStatus;\n else\n status = (contactStatus.compareTo(status) > 0) ? contactStatus : status;\n }\n return StatusUtil.getContactStatusIcon(status);\n }",
"private void disablePhotoEditing() {\r\n isEditingPhotos = false;\r\n }",
"public boolean mo18891a(Model model) {\n return model.toString().startsWith(\"data:image\");\n }"
] | [
"0.6587036",
"0.6337808",
"0.6041507",
"0.60312027",
"0.58817905",
"0.5814252",
"0.5746399",
"0.5733028",
"0.5680292",
"0.5644557",
"0.5639464",
"0.5632104",
"0.55318725",
"0.5531196",
"0.543138",
"0.5423481",
"0.5402612",
"0.5401937",
"0.5393527",
"0.53726107",
"0.5367296",
"0.5346083",
"0.5339523",
"0.5328984",
"0.5322101",
"0.5310862",
"0.52685875",
"0.5253867",
"0.52374375",
"0.5225558",
"0.5218995",
"0.51985264",
"0.5196482",
"0.5196273",
"0.51907563",
"0.51765203",
"0.5170581",
"0.51669854",
"0.5147823",
"0.5147823",
"0.51462495",
"0.5139365",
"0.5108534",
"0.5089339",
"0.5074536",
"0.5039532",
"0.5015888",
"0.5015888",
"0.50019944",
"0.49909714",
"0.497557",
"0.49561107",
"0.49468565",
"0.49465102",
"0.49403533",
"0.49361962",
"0.4932117",
"0.49097118",
"0.49089766",
"0.49076995",
"0.49045876",
"0.49029738",
"0.49004745",
"0.48981172",
"0.48957536",
"0.48925778",
"0.48881072",
"0.48864287",
"0.48822716",
"0.4875334",
"0.48750442",
"0.48641282",
"0.48632613",
"0.48623535",
"0.48588142",
"0.4857483",
"0.4854772",
"0.48515552",
"0.48501247",
"0.48490003",
"0.4844372",
"0.48427975",
"0.48415354",
"0.48410282",
"0.4836432",
"0.4835651",
"0.4832731",
"0.4830802",
"0.48209655",
"0.4811037",
"0.48066458",
"0.48063034",
"0.4802689",
"0.4800361",
"0.47992605",
"0.4788815",
"0.47866875",
"0.47749808",
"0.4769018",
"0.47564355"
] | 0.77603865 | 0 |
get size of items in snapshot. | public int getSnapshotSize()throws DataSnapshotException{
int backedupCount=0;
try {
// Enumeration names = ss.names();
for (Enumeration names = ss.names(); names.hasMoreElements();) {
names.nextElement();
backedupCount++;
}
}catch (SettingsStorageException e) {
// TODO Auto-generated catch block
throw new DataSnapshotException("settings store failure", e);
}
return backedupCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int get_size();",
"public int get_size();",
"public int size() {\n return numItems;\n }",
"int getItemsCount();",
"int getItemsCount();",
"public int getSize() {\r\n return list.getItemCount();\r\n }",
"public int size(){\n return numItems;\n }",
"@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}",
"public int size() {\n \treturn numItems;\n }",
"public int size() {\n // TODO: YOUR CODE HERE\n return size;\n }",
"public int size()\r\n {\r\n return nItems;\r\n }",
"public int size() {\n return nItems;\n }",
"@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}",
"public long size();",
"@Nonnegative\n public int getSize()\n {\n return items.size();\n }",
"public int getTotalSize();",
"public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }",
"@Override\n public int getSize() {\n return this.numItems;\n }",
"public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}",
"public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}",
"@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}",
"@Override\n public int getSize() {\n return numItems;\n }",
"public int size() {\n return items.size();\n }",
"public int size() {\r\n return items.size();\r\n }",
"public int size() {\r\n return items.size();\r\n }",
"public int size(){\n return items.size();\n }",
"public int getSize() {\n\t\treturn collection.size();\n\t\t\n\t}",
"public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }",
"public Integer size() { return this.entries.length(); }",
"int getTotalSize();",
"public int size() {\n if (hasKeys) {\n return keys.size();\n } else {\n return objects.size();\n }\n }",
"public int getItemsCount() {\n if (itemsBuilder_ == null) {\n return items_.size();\n } else {\n return itemsBuilder_.getCount();\n }\n }",
"public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }",
"public int getSize() {\n return v.size();\n }",
"public int size() {\n return doSize();\n }",
"public int length() {\n return numberOfItems;\n }",
"@Override\n\t\tpublic long size() {\n\t\t\t\n\t\t\treturn super.size();\n\t\t}",
"public int getListSize() {\n return getRootNode().getItems().size();\n }",
"public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}",
"int getItemSize();",
"public int getItemsCount() {\n return items_.size();\n }",
"public int getItemsCount() {\n return items_.size();\n }",
"public int size() {\n return this.collection.size();\n }",
"public int size() {\n maintain();\n return collection.size();\n }",
"public int size() {\n\t\tif (baos == null || baos.toByteArray() == null) return 0;\n\t\telse return baos.toByteArray().length;\n\t}",
"public int getSize () {\n return this.list.size();\n }",
"public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }",
"public int size() {\n // DO NOT MODIFY!\n return size;\n }",
"public int getLength() {\n return collection.size();\n }",
"public int getSize() {\n\t\treturn size();\n\t}",
"long size();",
"long size();",
"long size();",
"long size();",
"public int size()\n {\n return size;\n }",
"int getNumItems();",
"@Override\n public int getSize() {\n return items.size();\n }",
"@Override\n public int size() {\n return (totalSize - offset);\n }",
"public int getSize() {\n return list.size();\n }",
"public int getItemsCount() {\n return items_.size();\n }",
"public int size()\n {\n return size;\n }",
"public int size()\n {\n return size;\n }",
"public int size()\n {\n return size;\n }",
"public int size()\n {\n return size;\n }",
"public int size() {\r\n return size;\r\n }",
"public int size()\n {\n return size;\n }",
"public int size() {\n return size;\n }",
"public int size() {\n return size;\n }",
"public int size() {\n return size;\n }",
"public int size() {\n return size;\n }",
"public int size() {\n return size;\n }",
"public int size() {\n return size;\n }",
"public int size() {\n return size;\n }",
"public int size(){ return itemCount;}",
"public int length() {\n\n\t\treturn numItems;\n\n\t}",
"public int get_size()\r\n\t{\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\n return getSize(0);\n }",
"public int size() {\n return size;\r\n }",
"public int size() {\n return collection.size();\n }",
"public int size() {\n return size;\n }",
"Integer size();",
"Integer size();",
"public int size()\r\n {\r\n return size;\r\n }",
"public int size()\r\n {\r\n return size;\r\n }",
"public int size()\r\n {\r\n return size;\r\n }",
"public int size() {\r\n return size; \r\n }",
"public int size() {\n synchronized (this.base) {\n return this.base.size();\n }\n }",
"@Override\n\tpublic int size() {\n\t\treturn getSize();\n\t}",
"public int size() {\r\n return size;\r\n }",
"public int size() {\r\n \r\n return size;\r\n }",
"public int size() {\n // TODO: Implement this method\n return size;\n }",
"public int size(){\n return size;\n }",
"public int size(){\n return size;\n }",
"public int size(){\n return size;\n }",
"public int size(){\n return size;\n }",
"public int size(){\n return size;\n }",
"public int size(){\n return size;\n }",
"public int size() {\n return _size;\n }",
"public int getCount() {\n \t Log.i(TAG, \"getCount() called\");\n return provide.getItemCache().getCount();\n }",
"public int size() {\n return size;\n }"
] | [
"0.73478156",
"0.73478156",
"0.71892715",
"0.71602905",
"0.71602905",
"0.7151676",
"0.7141157",
"0.7130672",
"0.7122219",
"0.7119826",
"0.7114723",
"0.7099056",
"0.70950013",
"0.70401406",
"0.703192",
"0.70305485",
"0.7028359",
"0.70256555",
"0.7025638",
"0.7013625",
"0.6986624",
"0.6965742",
"0.6964387",
"0.6942782",
"0.6942782",
"0.69251496",
"0.6911222",
"0.6879949",
"0.6875748",
"0.6856334",
"0.68271065",
"0.68260497",
"0.6824038",
"0.6812943",
"0.6803846",
"0.68023026",
"0.68010324",
"0.6794504",
"0.6792429",
"0.6788805",
"0.6775296",
"0.6775296",
"0.67723477",
"0.6749661",
"0.67404103",
"0.67397445",
"0.6733146",
"0.6728388",
"0.6725149",
"0.6722125",
"0.6718743",
"0.6718743",
"0.6718743",
"0.6718743",
"0.67144054",
"0.6713617",
"0.6712784",
"0.67103153",
"0.67068076",
"0.67045116",
"0.67044467",
"0.67044467",
"0.67044467",
"0.67044467",
"0.6701756",
"0.6701439",
"0.6695242",
"0.6695242",
"0.6695242",
"0.6695242",
"0.6695242",
"0.6695242",
"0.6695242",
"0.66906834",
"0.66901314",
"0.6689303",
"0.66876924",
"0.6687603",
"0.6685454",
"0.66853446",
"0.66805106",
"0.66805106",
"0.66802794",
"0.66802794",
"0.66802794",
"0.6677579",
"0.66774106",
"0.66765803",
"0.6676281",
"0.66745526",
"0.66735303",
"0.66692704",
"0.66692704",
"0.66692704",
"0.66692704",
"0.66692704",
"0.66692704",
"0.6667316",
"0.66651213",
"0.6657268"
] | 0.73464745 | 2 |
TODO Autogenerated method stub | public void photoDelete(String id) throws DataSnapshotException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public int changedPhoto(DatabaseItem item) throws DataSnapshotException {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66713095",
"0.6567948",
"0.652319",
"0.648097",
"0.64770466",
"0.64586824",
"0.64132667",
"0.6376419",
"0.62759",
"0.62545097",
"0.62371093",
"0.62237984",
"0.6201738",
"0.619477",
"0.619477",
"0.61924416",
"0.61872935",
"0.6173417",
"0.613289",
"0.6127952",
"0.6080854",
"0.6076905",
"0.6041205",
"0.6024897",
"0.60200036",
"0.59985113",
"0.5967729",
"0.5967729",
"0.5965808",
"0.5949083",
"0.5941002",
"0.59236866",
"0.5909713",
"0.59030116",
"0.589475",
"0.58857024",
"0.58837134",
"0.586915",
"0.58575684",
"0.5850424",
"0.5847001",
"0.5824116",
"0.5810248",
"0.5809659",
"0.58069366",
"0.58069366",
"0.5800507",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.57900196",
"0.5790005",
"0.578691",
"0.578416",
"0.578416",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5761079",
"0.57592577",
"0.57592577",
"0.5749888",
"0.5749888",
"0.5749888",
"0.5748457",
"0.5733414",
"0.5733414",
"0.5733414",
"0.57209575",
"0.57154554",
"0.57149583",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.571194",
"0.57043016",
"0.56993437",
"0.5696782",
"0.5687825",
"0.5677794",
"0.5673577",
"0.5672046",
"0.5669512",
"0.5661156",
"0.56579345",
"0.5655569",
"0.5655569",
"0.5655569",
"0.56546396",
"0.56543446",
"0.5653163",
"0.56502634"
] | 0.0 | -1 |
// TODO Autogenerated method stub btDrinksDemandAdd = (Button) findViewById(R.id.base_activity_no_drink_demand_add); tvAddClent = (TextView) findViewById(R.id.base_activity_no_client_add); viewNoClient = findViewById(R.id.base_activity_no_client); tvSalonMySee = (TextView) findViewById(R.id.base_activity_no_salon_see); viewNoSalonMy = findViewById(R.id.base_activity_no_salon_my); viewNoSalon = findViewById(R.id.base_activity_no_salon); viewNoGroupBuy = findViewById(R.id.base_activity_group_buy_nodata); viewNoAddress = findViewById(R.id.base_activity_address_nodata); searchNodataView = findViewById(R.id.base_activity_search_nodata); businesscardNodataView = findViewById(R.id.base_activity_no_businesscard); busAddCard = (TextView) findViewById(R.id.base_activity_no_business_add); loadFialView = findViewById(R.id.base_activity_loadfail); noDataView = findViewById(R.id.base_activity_no_data); noNetWorkView = findViewById(R.id.base_activity_no_network); | private void initParentView() {
//
base_activity_title_notice = (TextView) findViewById(R.id.base_activity_title_left);
ivBack = (ImageView) findViewById(R.id.base_activity_title_backicon);
// ivBack_close = (ImageView) findViewById(R.id.base_activity_title_close);
rlTitlePrent = (RelativeLayout) findViewById(R.id.base_activity_title_parent);
// tvTitleName_linear = (LinearLayout) findViewById(R.id.linear_titlename);
// tvTitleName = (TextView) findViewById(R.id.base_activity_title_titlename);
ivTitleLeft = (ImageView) findViewById(R.id.base_activity_title_right_lefticon);
// ivTitledownIcon = (ImageView) findViewById(R.id.base_activity_title_downicon);
ivTitleMiddle = (ImageView) findViewById(R.id.base_activity_title_right_middleicon);
// ivTitleArrow = (ImageView) findViewById(R.id.base_activity_title_titleIcon);
ivTitleRight = (ImageView) findViewById(R.id.base_activity_title_right_righticon);
tvRight = (TextView) findViewById(R.id.base_activity_title_right_righttv);
// rlReload = (RelativeLayout) findViewById(R.id.base_activity_load_fail_reload);
// linear_back = (LinearLayout) findViewById(R.id.linear_back);
// base_menu = (RelativeLayout) findViewById(R.id.base_menu);
// tvNoDataContent = (TextView) findViewById(R.id.base_activity_no_data_content);
// base_tel_main = (ImageView) findViewById(R.id.base_tal_main);
// button_hidded = (ImageView) findViewById(R.id.button_hidded);
// iv_order = (ImageView) findViewById(R.id.iv_order);
// imageView_one = (ImageView) findViewById(R.id.imageView_one);
// base_shopping_mian = (ImageView) findViewById(R.id.base_shopping_mian);
// menu_shoppingnum = (TextView)findViewById(R.id.menu_shoppingNum);
// linear_menu = (LinearLayout) findViewById(R.id.linear_menu);
// button_hidded_linear = (LinearLayout) findViewById(R.id.button_hidded_linear);
//
// // 添加地址
// tvAddAddress = (TextView) findViewById(R.id.base_activity_no_address_add);
// viewNoDrinksDemand = findViewById(R.id.base_activity_no_drink_demand);
// NoMenu();
// NoTelMenu();
//
//// objectAnimator = ObjectAnimator.ofFloat(base_tel_main,"rotation",-30,0,30);
//// objectAnimator.setInterpolator(new LinearInterpolator());
//// objectAnimator.setRepeatMode(ValueAnimator.REVERSE);
//// objectAnimator.setDuration(1000);
//// objectAnimator.setRepeatCount(ValueAnimator.INFINITE);
//// objectAnimator.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.ful);\r\n\t\t\r\n\t\tfrA = (Button) findViewById(R.id.bFRAdd1);\r\n\t\tfrS = (Button) findViewById(R.id.bFRSub1);\r\n\t\tsscA = (Button) findViewById(R.id.bSSCAdd2);\r\n\t\tsscS = (Button) findViewById(R.id.bSSCSub2);\r\n\t\tbcA = (Button) findViewById(R.id.bCBBAdd2);\r\n\t\tbcS = (Button) findViewById(R.id.bCBBSub2);\r\n\t\tofrA = (Button) findViewById(R.id.bOFRBAdd2);\r\n\t\tofrS = (Button) findViewById(R.id.bOFRBSub2);\r\n\t\tsspA = (Button) findViewById(R.id.bSSPBAdd2);\r\n\t\tsspS = (Button) findViewById(R.id.bSSPBSub2);\r\n\t\tmvA = (Button) findViewById(R.id.bVBAdd2);\r\n\t\tmvS = (Button) findViewById(R.id.bVBSub2);\r\n\t\tod = (Button) findViewById(R.id.bDOrd);\r\n\t\t\r\n\t\tdtAdd1 = (TextView) findViewById(R.id.tvDAmm);\r\n\t\tdtAdd2 = (TextView) findViewById(R.id.tvDAmm2);\r\n\t\tdtAdd3 = (TextView) findViewById(R.id.tvDAmm3);\r\n\t\tdtAdd4 = (TextView) findViewById(R.id.tvDAmm4);\r\n\t\tdtAdd5 = (TextView) findViewById(R.id.tvDAmm5);\r\n\t\tdtAdd6 = (TextView) findViewById(R.id.tvDAmm6);\r\n\t\tdtotal = (TextView) findViewById(R.id.tvDTotal);\r\n\t\t\r\n\t\tfrA.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct1++;\r\n\t\t\t\tdtAdd1.setText(\"\" + dct1);\r\n\t\t\t\tdttotal = dttotal + 120;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfrS.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct1--;\r\n\t\t\t\tif(dct1<0){\r\n\t\t\t\t\tdct1 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct1 = dct1;\r\n\t\t\t\t\tdttotal = dttotal - 120;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd1.setText(\"\" + dct1);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tsscA.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct2++;\r\n\t\t\t\tdtAdd2.setText(\"\" + dct2);\r\n\t\t\t\tdttotal = dttotal + 180;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tsscS.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct2--;\r\n\t\t\t\tif(dct2<0){\r\n\t\t\t\t\tdct2 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct2 = dct2;\r\n\t\t\t\t\tdttotal = dttotal - 180;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd2.setText(\"\" + dct2);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\tbcA.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct3++;\r\n\t\t\t\tdtAdd3.setText(\"\" + dct3);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbcS.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct3--;\r\n\t\t\t\tif(dct3<0){\r\n\t\t\t\t\tdct3 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct3 = dct3;\r\n\t\t\t\t\tdttotal = dttotal - 200;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd3.setText(\"\" + dct3);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tofrA.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct6++;\r\n\t\t\t\tdtAdd6.setText(\"\" + dct6);\r\n\t\t\t\tdttotal = dttotal + 130;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tofrS.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct6--;\r\n\t\t\t\tif(dct6<0){\r\n\t\t\t\t\tdct6 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct6 = dct6;\r\n\t\t\t\t\tdttotal = dttotal - 130;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd6.setText(\"\" + dct6);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tsspA.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct5++;\r\n\t\t\t\tdtAdd5.setText(\"\" + dct5);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tsspS.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct5--;\r\n\t\t\t\tif(dct5<0){\r\n\t\t\t\t\tdct5 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct5 = dct5;\r\n\t\t\t\t\tdttotal = dttotal - 200;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd5.setText(\"\" + dct5);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmvA.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct4++;\r\n\t\t\t\tdtAdd4.setText(\"\" + dct4);\r\n\t\t\t\tdttotal = dttotal + 120;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmvS.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tdct4--;\r\n\t\t\t\tif(dct4<0){\r\n\t\t\t\t\tdct4 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct4 = dct4;\r\n\t\t\t\t\tdttotal = dttotal - 120;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd4.setText(\"\" + dct4);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t\r\n\t\tod.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent doopn = new Intent(Dish.this, Done.class);\r\n\t\t\t\tstartActivity(doopn);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}",
"private void bindAllViewElements() {\n\t\tseatingInfoList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_seating_info_list);\n\t\tqrCodeButton = (Button) findViewById(R.id.ticket_detail_view_view_qr_code_btn);\n\t\tpdfButton = (Button) findViewById(R.id.ticket_detail_view_view_pdf_btn);\n\n\t\tdnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_reference_number_value);\n\t\tpnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_resevation_code_value);\n\t\t//paymentMethod = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_TextView);\n\t\t//paymentMethodValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_value);\n\t\ttotalPriceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_total_price_value);\n\t\tinsurance = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_TextView);\n\t\tinsuranceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_value);\n\t\ttariffValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_tariff_value);\n\n\t\ttariffDetail = (TextView) findViewById(R.id.ticket_detail_view_tariff_details_TextView);\n\n\t\tdeliveryMethodValue = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_value);\n\t\tdeliveryMethodInfo = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_TextView);\n\t\tdeliveryMethodInfoDetail1 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail1_TextView);\n\t\tdeliveryMethodInfoDetail2 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail2_TextView);\n\n\t\texchangeButton = (Button) findViewById(R.id.ticket_detail_view_view_exchange_btn);\n\t\tcancelButton = (Button) findViewById(R.id.ticket_detail_view_view_cancel_btn);\n\n\t\ttitle = (TextView) findViewById(R.id.ticket_detail_view_title);\n\n\t\tstationList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_station_list);\n\t\trooView = findViewById(R.id.ticket_detail_root_view);\n\t\trooView.setVisibility(View.VISIBLE);\n\t\tprogressBar = (LinearLayout)findViewById(R.id.tickets_detail_view_progressBarLayout);\n\t\terrorLayout = (LinearLayout) findViewById(R.id.tickets_detail_view_service_error_Layout);\n\t\t\n\t\terrorTextview = (TextView) findViewById(R.id.tickets_detail_view_retrieving_real_time_service_error_textview);\n\t\t\n\t\trunProgressBar();\n\t\t\n\t\tbindAllListeners();\n\t}",
"private void IntializeViewVariables() {\r\n tvDate = (TextView) findViewById(R.id.tvBillDateValue);\r\n tvBillNumber = (EditText) findViewById(R.id.tvBillNumberValue);\r\n\r\n boxDept = (RelativeLayout) findViewById(R.id.boxDept);\r\n boxCat = (RelativeLayout) findViewById(R.id.boxCat);\r\n boxItem = (RelativeLayout) findViewById(R.id.boxItem);\r\n\r\n mItemNameTextView = (TextView) findViewById(R.id.tvColItemName);\r\n mHSNTextView = (TextView) findViewById(R.id.tvColHSN);\r\n mQuantityTextView = (TextView) findViewById(R.id.tvColItemQty);\r\n mRateTextView = (TextView) findViewById(R.id.tvColRate);\r\n mAmountTextView = (TextView) findViewById(R.id.tvColAmount);\r\n mDeleteTextView = (TextView) findViewById(R.id.tvColDelete);\r\n\r\n etCustGSTIN = (EditText) findViewById(R.id.etCustGSTIN);\r\n aTViewSearchItem = (AutoCompleteTextView) findViewById(R.id.aCTVSearchItem);\r\n aTViewSearchMenuCode = (AutoCompleteTextView) findViewById(R.id.aCTVSearchMenuCode);\r\n /*txtSearchItemBarcode = (EditText) findViewById(R.id.etSearchItemBarcode);\r\n txtSearchItemBarcode.setOnKeyListener(Item_Search_Barcode_KeyPressEvent);*/\r\n\r\n spnr_pos = (Spinner) findViewById(R.id.spnr_pos);\r\n\r\n btndepart = (Button) findViewById(R.id.btn_depart);\r\n btncateg = (Button) findViewById(R.id.btn_categ);\r\n btnitem = (Button) findViewById(R.id.btn_item);\r\n btndepart.setOnClickListener(this);\r\n btncateg.setOnClickListener(this);\r\n btnitem.setOnClickListener(this);\r\n\r\n //tvdeptline = (TextView) findViewById(R.id.tvdeptline);\r\n //tvcategline = (TextView) findViewById(R.id.tvcategline);\r\n listViewDept = (ListView) findViewById(R.id.lstDepartmentNames);\r\n listViewDept.setOnItemClickListener(deptClick);\r\n listViewCateg = (ListView) findViewById(R.id.lstCategoryNames);\r\n listViewCateg.setOnItemClickListener(catClick);\r\n\r\n // gridViewItems = (GridView) findViewById(R.id.gridItems);\r\n // gridViewItems.setOnItemClickListener(itemsClick);\r\n\r\n mRecyclerGridView = (RecyclerView) findViewById(R.id.gridItems);\r\n mRecyclerGridView.setHasFixedSize(true);\r\n\r\n edtCustId = (EditText) findViewById(R.id.edtCustId);\r\n edtCustName = (EditText) findViewById(R.id.edtCustName);\r\n edtCustPhoneNo = (EditText) findViewById(R.id.edtCustPhoneNo);\r\n edtCustAddress = (EditText) findViewById(R.id.edtCustAddress);\r\n btnAddCustomer = (Button) findViewById(R.id.btn_DineInAddCustomer);\r\n idd_date = (LinearLayout) findViewById(R.id.idd_date);\r\n tblOrderItems = (TableLayout) findViewById(R.id.tblOrderItems);\r\n\r\n tvSubUdfValue = (EditText) findViewById(R.id.tvSubUdfValue);\r\n tvSubTotal = (TextView) findViewById(R.id.tvSubTotalValue);\r\n tvCGSTValue = (TextView) findViewById(R.id.tvTaxTotalValue);\r\n tvSGSTValue = (TextView) findViewById(R.id.tvServiceTaxValue);\r\n tvBillAmount = (TextView) findViewById(R.id.tvBillTotalValue);\r\n tvcessValue = (TextView) findViewById(R.id.tvcessValue);\r\n tvOthercharges = (TextView) findViewById(R.id.txtOthercharges);\r\n tvDiscountPercentage = (TextView) findViewById(R.id.tvDiscountPercentage);\r\n tvDiscountAmount = (TextView) findViewById(R.id.tvDiscountAmount);\r\n\r\n tvServiceTax_text = (TextView) findViewById(R.id.tvServiceTax);\r\n\r\n btnDeleteBill = (WepButton) findViewById(R.id.btn_DeleteBill);\r\n btnPayBill = (WepButton) findViewById(R.id.btn_PayBill);\r\n btnSaveKOT = (WepButton) findViewById(R.id.btn_SaveKOT);\r\n btnPrintKOT = (WepButton) findViewById(R.id.btn_PrintKOT);\r\n btnPrintBill = (WepButton) findViewById(R.id.btn_PrintBill);\r\n btnClear = (WepButton) findViewById(R.id.btn_Clear);\r\n btnReprint = (WepButton) findViewById(R.id.btn_Reprint);\r\n btn_ViewBill = (WepButton) findViewById(R.id.btn_ViewBill);\r\n btnDeliveryStatus = (WepButton) findViewById(R.id.btn_DeliveryStatus);\r\n\r\n btnAddCustomer.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n AddCustomer(v);\r\n }\r\n });\r\n btnSaveKOT.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n SaveKOT(v);\r\n }\r\n });\r\n btnPrintKOT.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n printKOT(v);\r\n }\r\n });\r\n btnPrintBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n printBILL(v);\r\n }\r\n });\r\n btnPayBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n PayBill(v);\r\n }\r\n });\r\n btnClear.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n Clear(v);\r\n }\r\n });\r\n btnDeleteBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n DeleteBill(v);\r\n }\r\n });\r\n btnReprint.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n ReprintBill(v);\r\n }\r\n });\r\n btn_ViewBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n viewBill();\r\n }\r\n });\r\n btnDeliveryStatus.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n KOTStatus(v);\r\n }\r\n });\r\n\r\n\r\n // GST implementation\r\n\r\n tvHSNCode_out = (TextView) findViewById(R.id.tvColHSN);\r\n relative_Interstate = (LinearLayout) findViewById(R.id.relative_interstate);\r\n relative_pos = (LinearLayout) findViewById(R.id.relative_pos);\r\n tvIGSTValue = (TextView) findViewById(R.id.tvIGSTValue);\r\n chk_interstate = (CheckBox) findViewById(R.id.checkbox_interstate);\r\n autoCompleteTextViewSearchItemBarcode = (AutoCompleteTextView) findViewById(R.id.aCTVSearchItemBarcode);\r\n\r\n etCustGSTIN.addTextChangedListener(this);\r\n edtCustName.addTextChangedListener(this);\r\n edtCustPhoneNo.addTextChangedListener(this);\r\n edtCustAddress.addTextChangedListener(this);\r\n aTViewSearchItem.addTextChangedListener(this);\r\n aTViewSearchMenuCode.addTextChangedListener(this);\r\n autoCompleteTextViewSearchItemBarcode.addTextChangedListener(this);\r\n\r\n autoCompleteTextViewSearchItemBarcode.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n try {\r\n /*Toast.makeText(BillingScreenActivity.this, aTViewSearchMenuCode.getText().toString(),\r\n Toast.LENGTH_SHORT).show();*/\r\n if ((autoCompleteTextViewSearchItemBarcode.getText().toString().equals(\"\"))) {\r\n MsgBox.Show(\"Warning\", \"Scan BarCode\");\r\n } else {\r\n Cursor BarcodeItem = db\r\n .getItemssbyBarCode((autoCompleteTextViewSearchItemBarcode.getText().toString().trim()));\r\n int i =0, added =0;\r\n while (BarcodeItem.moveToNext()) {\r\n if(i!=position)\r\n {\r\n i++;\r\n continue;\r\n }\r\n added =1;\r\n btnClear.setEnabled(true);\r\n AddItemToOrderTable(BarcodeItem);\r\n autoCompleteTextViewSearchItemBarcode.setText(\"\");\r\n // ((EditText)v).setText(\"\");\r\n } if(added==0) {\r\n MsgBox.Show(\"Warning\", \"Item not found for Selected BarCode\");\r\n }\r\n }\r\n } catch (Exception ex) {\r\n Toast.makeText(getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n });\r\n\r\n etOnlineOrderNo = (EditText) findViewById(R.id.et_order_page_content_home_delivery_online_order_no);\r\n tvOnlineOrderNo = (TextView) findViewById(R.id.tv_order_page_content_home_delivery_online_order_no);\r\n etOnlineOrderNo.setVisibility(View.INVISIBLE);\r\n tvOnlineOrderNo.setVisibility(View.INVISIBLE);\r\n }",
"public void onClick(View v) {\n\t\tswitch (v.getId()) \n\t\t{\n\t\t\n\t\t\tcase R.id.dailyactivity_details_IMG_inc:\n\t\t\t\t\t\n\t\t\t\t\tif (mMilkQty <= 1000) {\n\t\t\t\t\t\tmMilkQty = mMilkQty + 1;\n\t\t\t\t\t\tmMilk_Qty_Txt.setText(\"\"+mMilkQty+\" ml\");\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\n\t\t\tcase R.id.dailyactivity_details_IMG_dec:\n\t\t\t\t\n\t\t\t\t\tif (mMilkQty != 0) {\n\t\t\t\t\t\tmMilkQty = mMilkQty - 1;\n\t\t\t\t\t\tmMilk_Qty_Txt.setText(\"\"+mMilkQty+\" ml\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\tcase R.id.dailyactivity_details_IMG_inc_sleepingHours:\n\t\t\t\t\n\t\t\t\tif (mSleepinghours < 24) {\n\t\t\t\t\tmSleepinghours = mSleepinghours + 1;\n\t\t\t\t\tmSl_Txt.setText(\"\"+mSleepinghours+\" Hours\");\n\t\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\n\t\tcase R.id.dailyactivity_details_IMG_dec_sleepingHours:\n\t\t\t\n\t\t\t\tif (mSleepinghours != 0) {\n\t\t\t\t\tmSleepinghours = mSleepinghours - 1;\n\t\t\t\t\tmSl_Txt.setText(\"\"+mSleepinghours+\" Hours\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\t\n\t\t\tcase R.id.dailyactivity_details_BTN_add:\n\t\t\t\t\n\t\t\t\tlong insertStatus = 0;\n\t\t\t\tString dailyacvity_date = \"\";\n\t\t\t\t\n\t\t\t\t\tif (mDiperchange_Yes_Radio.isChecked() || mDiperchange_No_Radio.isChecked()) {\n\t\t\t\t\t\tif (mDiperchange_Yes_Radio.isChecked()) {\n\t\t\t\t\t\t\tmDiperStatus = 1;\n\t\t\t\t\t\t}else if (mDiperchange_No_Radio.isChecked()) {\n\t\t\t\t\t\t\tmDiperStatus = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Please select Diper status \", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCalendar calender = Calendar.getInstance();\n\t\t\t\t\tDate current_date = calender.getTime();\n\t\t\t\t\t\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tmBabyTrackerDataBaseHelper.createDataBase();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSimpleDateFormat mDateFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n\t\t\t\t\tdailyacvity_date =mDateFormat.format(current_date);\n\t\t\t\t\t\n\t\t\t\t\tinsertStatus = mBabyTrackerDataBaseHelper.insertDailyActivitydetails(baby_id, current_date.toString(), mDiperStatus, mMilkQty, mSleepinghours,dailyacvity_date);\n\t\t\t\t\t\n\t\t\t\t\tif (insertStatus > 0) {\n\t\t\t\t\t\talertDialogWithMessage(\"Baby Tracker\", \"Daily activity details are saved succefully\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tToast.makeText(this, \"Daily activity details Insertion Failed \", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase R.id.dailyactivity_details_BTN_dailyActivities:\n\t\t\t\tstartActivity(new Intent(this, DailyActivityList.class).putExtra(\"baby_id\", baby_id).setAction(\"fromDetails\"));\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public void onClick(View v) {\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSpannable spn = food.getText();\r\n\t\t\t\t\tSpannable spn1 = shopping.getText();\r\n\t\t\t\t\tSpannable spn2 = travel.getText();\r\n\t\t\t\t\tSpannable spn3 = rent.getText();\r\n\t\t\t\t\tSpannable spn4 = unknown.getText();\r\n\t\t\t\t\tSpannable spn5 = others.getText();\r\n\t\t\t\t\tString Name = ConstanVarables.Username.toString();\r\n\r\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd\");\r\n\t\t\t\t\tString day = sdf.format(new Date());\r\n\t\t\t\t\tint Day = Integer.valueOf(day);\r\n\t\t\t\t\tSimpleDateFormat sdf1 = new SimpleDateFormat(\"MM\");\r\n\t\t\t\t\tString month = sdf1.format(new Date());\r\n\t\t\t\t\tint Month = Integer.valueOf(month);\r\n\t\t\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"yyyy\");\r\n\t\t\t\t\tString year = sdf2.format(new Date());\r\n\t\t\t\t\tint Year = Integer.valueOf(year);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint Food = Integer.valueOf(spn.toString());\r\n\t\t\t\t\tint Shopping = Integer.valueOf(spn1.toString());\r\n\t\t\t\t\tint Travel = Integer.valueOf(spn2.toString());\r\n\t\t\t\t\tint Rent = Integer.valueOf(spn3.toString());\r\n\t\t\t\t\tint Unknown = Integer.valueOf(spn4.toString());\r\n\t\t\t\t\tint Others = Integer.valueOf(spn5.toString());\r\n\t\t\t\t\tint Expenditure = Food + Shopping + Travel + Rent + Unknown\r\n\t\t\t\t\t\t\t+ Others;\r\n\t\t\t\t\tConstanVarables.expnew = Expenditure;\r\n\t\t\t\t\tConstanVarables.food = Food;\r\n\t\t\t\t\tConstanVarables.shopping = Shopping;\r\n\t\t\t\t\tConstanVarables.travel = Travel;\r\n\t\t\t\t\tConstanVarables.rent = Rent;\r\n\t\t\t\t\tConstanVarables.unknown = Unknown;\r\n\t\t\t\t\tConstanVarables.others = Others;\r\n\r\n\t\t\t\t\tspending_data spd = new spending_data(Name, Expenditure,\r\n\t\t\t\t\t\t\tDay, Month, Year, Food, Shopping, Travel, Rent,\r\n\t\t\t\t\t\t\tUnknown, Others);\r\n\r\n\t\t\t\t\tint a = ccHelper.Updatespending(spd);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint gt=ccHelper.check_verymain();\r\n\t\t\t\t\tLog.d(\"Message\", \"value of count is\" + gt);\r\n\t\t\t\t\tif (gt == 1) {\r\n\t\t\t\t\t\tccHelper.extra_update();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tccHelper.Update_saving();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (a != 0) {\r\n\t\t\t\t\t\tToast\r\n\t\t\t\t\t\t\t\t.makeText(\r\n\t\t\t\t\t\t\t\t\t\tSpending_setting.this,\r\n\t\t\t\t\t\t\t\t\t\t\"Hello \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ Name\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" you have sucessfully updated your Spendings\",\r\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t\t\t\tIntent goToNextActivity = new Intent(\r\n\t\t\t\t\t\t\t\tgetApplicationContext(), home_view.class);\r\n\t\t\t\t\t\tstartActivity(goToNextActivity);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (Exception ex) {\r\n\r\n\t\t\t\t\tex.getStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState, R.layout.goodscheck_view);\n\n\t\tLog.i(TAG, \"onCreate()\");\n\t\tIntent intent = getIntent();\n\n\t\tgj = intent.getStringExtra(\"gj\");\n\t\tzw = intent.getStringExtra(\"zw\");\n\t\tbirthday_s = intent.getStringExtra(\"birthday_s\");\n\t\tssdw = intent.getStringExtra(\"ssdw\");\n\t\tzjzl = intent.getStringExtra(\"zjzl\");\n\t\txb = intent.getStringExtra(\"xb\");\n\t\tzjhm = intent.getStringExtra(\"zjhm\");\n\n\t\tryid = intent.getStringExtra(\"ryid\");\n\t\tcsrq = intent.getStringExtra(\"csrq\");\n\t\tname = intent.getStringExtra(\"name\");\n\t\ttime = intent.getStringExtra(\"time\");\n\t\tfx = intent.getStringExtra(\"fx\");\n\t\tsfcy = intent.getStringExtra(\"sfcy\");\n\t\tfrom = intent.getStringExtra(\"from\");\n\t\tvoyageNumber = intent.getStringExtra(\"voyageNumber\");\n\t\tsubmitBtn = (Button) findViewById(R.id.record_submit);\n\t\tif (\"01\".equals(from)) {// 卡口记录上下轮物品提供选择卡口内监护船舶功能\n\t\t\tsetMyActiveTitle(getText(R.string.kakoumanager) + \">\"\n\t\t\t\t\t+ getText(R.string.record_goods));\n\t\t\tfindViewById(R.id.send_good_info_layout_select_ship).setVisibility(\n\t\t\t\t\tView.VISIBLE);\n\t\t\tfindViewById(R.id.send_good_info_ship_czsm).setVisibility(\n\t\t\t\t\tView.VISIBLE);\n\t\t\tsubmitBtn.setEnabled(false);\n\t\t} else {\n\t\t\tsetMyActiveTitle(getText(R.string.tikoumanager) + \">\"\n\t\t\t\t\t+ getText(R.string.record_goods));\n\t\t\tfindViewById(R.id.send_good_info_layout_select_ship).setVisibility(\n\t\t\t\t\tView.GONE);\n\t\t\tfindViewById(R.id.send_good_info_ship_czsm)\n\t\t\t\t\t.setVisibility(View.GONE);\n\t\t}\n\n\t\t((TextView) findViewById(R.id.goods_record_name)).setText(Html\n\t\t\t\t.fromHtml(getString(R.string.name_s)\n\t\t\t\t\t\t+ \"<font color=\\\"#acacac\\\">\" + name + \"</font>\"));\n\t\t((TextView) findViewById(R.id.goods_record_time)).setText(Html\n\t\t\t\t.fromHtml(getString(R.string.goods_downup_time_tag)\n\t\t\t\t\t\t+ \"<font color=\\\"#acacac\\\">\" + time + \"</font>\"));\n\n\t\tcharSequences = DataDictionary.getDataDictionaryNameList(\n\t\t\t\tDataDictionary.DATADICTIONARY_TYPE_GOODS_TYPE).toArray(\n\t\t\t\tnew CharSequence[DataDictionary.getDataDictionaryNameList(\n\t\t\t\t\t\tDataDictionary.DATADICTIONARY_TYPE_GOODS_TYPE).size()]);\n\n\t\tstates = new boolean[charSequences.length];\n\n\t\tgoodsRes = (TextView) findViewById(R.id.goods);\n\t\tgoodsRes.setText(\"\");\n\t\tgoodsRes.setVisibility(View.GONE);\n\n\t\tsubmitBtn.setOnClickListener(new OnClickListener() {\n\t\t\t/** 向后台提交数据 */\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (progressDialog != null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tStringBuffer buffer = new StringBuffer();\n\t\t\t\tif (states != null && states.length > 0) {\n\n\t\t\t\t\tfor (int i = 0; i < states.length; i++) {\n\t\t\t\t\t\tif (states[i]) {\n\t\t\t\t\t\t\tif (buffer != null && buffer.length() > 0) {\n\t\t\t\t\t\t\t\tbuffer.append(\"|\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbuffer.append(DataDictionary\n\t\t\t\t\t\t\t\t\t.getDataDictionaryCodeByIndex(\n\t\t\t\t\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\t\t\t\t\tDataDictionary.DATADICTIONARY_TYPE_GOODS_TYPE));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (buffer == null || buffer.length() == 0) {\n\t\t\t\t\tHgqwToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tR.string.plase_choose_good).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tprogressDialog = new ProgressDialog(GoodsCheckView.this);\n\t\t\t\tprogressDialog.setTitle(getString(R.string.waiting));\n\t\t\t\tprogressDialog.setMessage(getString(R.string.waiting));\n\t\t\t\tprogressDialog.setCancelable(false);\n\t\t\t\tprogressDialog.setIndeterminate(false);\n\t\t\t\tprogressDialog.show();\n\t\t\t\tString url = \"sendGoodsInfo\";\n\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\t\t\tparams.add(new BasicNameValuePair(\"userID\", LoginUser\n\t\t\t\t\t\t.getCurrentLoginUser().getUserID()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"pdacode\", DeviceUtils\n\t\t\t\t\t\t.getIMEI()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"PDACode\", DeviceUtils\n\t\t\t\t\t\t.getIMEI()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"voyageNumber\", voyageNumber));\n\t\t\t\tparams.add(new BasicNameValuePair(\"time\", time));\n\t\t\t\tparams.add(new BasicNameValuePair(\"type\", buffer.toString()));\n\t\t\t\tparams.add(new BasicNameValuePair(\"fx\", fx));\n\t\t\t\tparams.add(new BasicNameValuePair(\"sfcy\", sfcy));\n\t\t\t\tparams.add(new BasicNameValuePair(\"ryid\", ryid));\n\n\t\t\t\tparams.add(new BasicNameValuePair(\"zjhm\", zjhm));\n\t\t\t\tparams.add(new BasicNameValuePair(\"xm\", name));\n\t\t\t\tparams.add(new BasicNameValuePair(\"xb\", xb));\n\t\t\t\tparams.add(new BasicNameValuePair(\"zjlx\", zjzl));\n\t\t\t\tparams.add(new BasicNameValuePair(\"csrq\", csrq));\n\t\t\t\tparams.add(new BasicNameValuePair(\"ssdw\", ssdw));\n\t\t\t\tparams.add(new BasicNameValuePair(\"zw\", zw));\n\t\t\t\tparams.add(new BasicNameValuePair(\"gj\", gj));\n\n\t\t\t\t// 开启离线开关后统一保存到本地,否则传送到服务器\n\t\t\t\t// if (!BaseApplication.instent.getWebState()) {\n\t\t\t\tif (getState(FunctionSetting.kqlx, false)) {\n\t\t\t\t\tOffLineManager.request(GoodsCheckView.this,\n\t\t\t\t\t\t\tnew GoodsCheckAction(), url,\n\t\t\t\t\t\t\tNVPairTOMap.nameValuePairTOMap(params), 0);\n\t\t\t\t} else {\n\t\t\t\t\tNetWorkManager.request(GoodsCheckView.this, url, params, 0);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_testing_parent_transaction_pre_order_individual);\n\n\n\n tvTID = findViewById(R.id.tvIndividualTID);\n tvFoodName = findViewById(R.id.tvIndividualFoodName);\n tvFoodPrice = findViewById(R.id.tvIndividualFoodPrice);\n tvStallName = findViewById(R.id.tvIndividualFoodStallName);\n tvFoodStallOperation = findViewById(R.id.tvIndividualFoodStallDuration);\n tvQuantity = findViewById(R.id.IndividualQuantityDisplay);\n tvAddOn = findViewById(R.id.tvIndividualAddOn);\n tvAdditionalNotes = findViewById(R.id.tvIndividualAddtionalNotes);\n ivimage = findViewById(R.id.IndividualFoodImage);\n tvSchool = findViewById(R.id.tvIndividualSchool);\n\n// item = (Collection) getIntent().getSerializableExtra(\"item\");\n\n tvTID.setText(item.gettId());\n tvFoodName.setText(item.getName());\n tvFoodPrice.setText(String.format(\"$%.2f\",item.getPrice()));\n tvStallName.setText(\"Stall: \"+item.getStallName());\n tvFoodStallOperation.setText(String.format(\"Working from %s to %s\", MainpageActivity.convertDateToString(MainpageActivity.convertStringToDate(item.getStartTime(),\"HHmm\"), \"hh:mm a\"),MainpageActivity.convertDateToString(MainpageActivity.convertStringToDate(item.getEndTime(),\"HHmm\"), \"hh:mm a\") ));\n tvQuantity.setText(\"x\"+item.getQuantity());\n String allAddOn =\"\";\n if (item.getAddOn().size()==0){\n tvAddOn.setText(\"No Add On\");\n }\n else{\n for (AddOn i : item.getAddOn()){\n allAddOn+= String.format(\"%-60s +$%.2f\\n\", i.getName(), i.getPrice());\n }\n tvAddOn.setText(allAddOn);\n }\n\n if (item.getAdditionalNote().isEmpty()){\n tvAdditionalNotes.setText(\"No Additional Notes\");\n }\n else{\n tvAdditionalNotes.setText(item.getAdditionalNote());\n }\n Glide.with(TestingParentTransactionPreOrderIndividual.this).load(item.getImage()).centerCrop().into(ivimage);\n tvSchool.setText(item.getSchool());\n\n\n\n\n// findViewById(R.id.IndividualDenyStallBtn).setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n//\n//\n// DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n// switch (which){\n// case DialogInterface.BUTTON_POSITIVE:\n// setDeny();\n// break;\n//\n// case DialogInterface.BUTTON_NEGATIVE:\n// //No button clicked\n// break;\n// }\n// }\n// };\n//\n// AlertDialog.Builder builder = new AlertDialog.Builder(TestingParentTransactionPreOrderIndividual.this);\n// builder.setMessage(\"Are you sure to deny kid to purchase any item from this stall?\").setPositiveButton(\"Yes\", dialogClickListener)\n// .setNegativeButton(\"No\", dialogClickListener).show();\n//\n//\n//\n//\n//\n// }\n// });\n\n\n\n\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.macronutrient_list);\n //TextView input = (TextView) findViewById(R.id.textView1);\n getSupportActionBar().setBackgroundDrawable(ResourcesCompat.getDrawable(getResources(),R.drawable.background_color, null));\n Intent i = getIntent();\n Bundle b = i.getExtras();\n\n\n\n item = b.getString(\"item_id\");\n sendItemRequest(item);\n\n drinkName = (TextView) findViewById(R.id.drink);\n brandName = (TextView) findViewById(R.id.brandName);\n // TextView numServings = (TextView) findViewById(R.id.numServings);\n cal = (TextView) findViewById((R.id.calories));\n drinkName.setText(getIntent().getStringExtra(\"item_name\"));\n cal.setText(getIntent().getStringExtra(\"nf_calories\"));\n cal.append(\"\\n\" + \"calories\");\n\n brandName.setText(getIntent().getStringExtra(\"brand_name\"));\n // numServings.setText(getIntent().getStringExtra(\"nf_serving_size_qty\"));\n\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tthis.setContentView(R.layout.advance);\r\n\t\t\r\n\t\tButton cbtn = (Button) this.findViewById(R.id.cbtn);\r\n\t\t\r\n\t\tcbtn.setOnClickListener(new OnClickListener()\r\n\t\t{\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tDataHelper dataHelper = DataBaseContext.getInstance(getApplicationContext());\r\n\t\t\t\tdataHelper.initDB();\r\n\t\t\t\t\r\n\t\t\t\t//showDialog(TIME_ALERT_DIALOG_1);\r\n\t\t\t\t//Log.d(\"AdvancedInfoActivity\", \"clear button:\"+i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tButton qbtn = (Button) this.findViewById(R.id.qbtn);\r\n\t\t\r\n\t\tqbtn.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\r\n/*\t\t\t\tDataHelper dataHelper = DataBaseContext.getInstance(getApplicationContext());\r\n\t\t\t\tdataHelper.testExists();\r\n\t\t\t\tList<ASDataObject> ObjList = dataHelper.getConfigList();\r\n\t\t\t\tfor(ASDataObject object : ObjList)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.d(\"AdvancedInfoActivity\", object.getEmpCode());\r\n\t\t\t\t\tLog.d(\"AdvancedInfoActivity\", object.getWorkDate());\r\n\t\t\t\t\tLog.d(\"AdvancedInfoActivity\", object.getAP());\r\n\t\t\t\t\tLog.d(\"AdvancedInfoActivity\", \"--------\");\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\tshowDialog(TIME_ALERT_DIALOG_2);\r\n\t\t\t\t\r\n\t\t\t\tLog.d(\"AdvancedInfoActivity\", \"query data\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t/*Builder dialog = new AlertDialog.Builder(AdvancedInfoActivity.this);\r\n\t\t\r\n\t\tdialog.setIcon(android.R.drawable.btn_star);\r\n\t\tdialog.setSingleChoiceItems(items, checkedItem, listener)*/\r\n\t\t\r\n\t\tspinner = (Spinner) findViewById(R.id.Spinner01);\r\n\t\t\r\n\t\tadapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,m);\r\n\t\t\r\n\t\tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\t\t\r\n\t\tspinner.setAdapter(adapter);\r\n\t\tspinner.setVisibility(View.VISIBLE);\r\n\t}",
"private void bindData() {\n\n// txtOrderComment.setVisibility(View.VISIBLE);\n// txtOrderComment.setText(\"Hello\\nHi\");\n\n orderDetail = (OrderDetail) getIntent().getSerializableExtra(ConstantValue.ITEMS);\n btn_store_name.setText(getStoreName(orderDetail.getStoreName()));\n if (orderDetail != null) {\n\n showLoading();\n\n fetchExchangeRate();\n getOrderServiceFee(orderDetail.getId());\n getOrderDetailLatLng(orderDetail.getId());\n getDeliveryDate(orderDetail.getId());\n getOrderComment(orderDetail.getId());\n fetchOrderItems(orderDetail.getId());\n\n loadListStore(prepareForGetStore(orderDetail.getStoreId()), true);\n\n bindOrderStatusHistoryComment();\n\n if (isCanReorder()) {\n// if (orderDetail.getStatus().equalsIgnoreCase(OrderStatusType.COMPLETE.name())) {\n btn_reorder.setText(String.format(\"Reorder ($%s)\", strMoney(orderDetail.getTotalDue().floatValue())));\n// }\n// else {\n// btn_reorder.setVisibility(View.GONE);\n// }\n }\n else {\n btn_reorder.setText(R.string.btn_title_done);\n }\n\n txt_order_status.setText(orderDetail.getStatus());\n if (OrderStatusType.PENDING.toString().equalsIgnoreCase(orderDetail.getStatus()) ||\n OrderStatusType.HOLDED.toString().equalsIgnoreCase(orderDetail.getStatus())) {\n txt_order_status.setTextColor(this.getResources().getColor(R.color.colorDeliverPrimary));\n } else if (OrderStatusType.PROCESSING.toString().equalsIgnoreCase(orderDetail.getStatus())) {\n txt_order_status.setTextColor(this.getResources().getColor(R.color.gray));\n } else if (OrderStatusType.COMPLETE.toString().equalsIgnoreCase(orderDetail.getStatus())) {\n txt_order_status.setTextColor(this.getResources().getColor(R.color.green));\n } else if (OrderStatusType.CANCELED.toString().equalsIgnoreCase(orderDetail.getStatus())) {\n txt_order_status.setTextColor(this.getResources().getColor(R.color.red));\n }\n\n txt_order_id.setText(orderDetail.getIncrementId());\n txt_order_address.setText(orderDetail.getBillingAddress().getStreet().get(0));\n\n txt_order_date.setText(String.format(\" %s\", orderDetail.getUpdatedAt()));\n\n txt_number_product.setText(String.format(\"%s\", orderDetail.getTotalItemCount()));\n txt_sub_total.setText(String.format(\"%s%s\", CurrencyConfiguration.getDollarSign(), strMoney(orderDetail.getSubtotal().floatValue())));\n txt_delivery_fee.setText(String.format(\"%s%s\", CurrencyConfiguration.getDollarSign(), strMoney(orderDetail.getShippingAmount().floatValue())));\n txt_total_price_in_riel_title.setText(R.string.total_price_in_riel);\n// txt_shipping_method.setText(orderDetail.getShippingDescription());\n txt_payment_method.setText(orderDetail.getPayment().getAdditionalInformation().get(0));\n txtTax.setText(String.format(\"%s%s\", CurrencyConfiguration.getDollarSign(), strMoney(orderDetail.getTaxAmount().floatValue())));\n\n String billingName = orderDetail.getBillingAddress().getFirstname() + \" \" + orderDetail.getBillingAddress().getLastname();\n String billingAddress = orderDetail.getBillingAddress().getAddressLine();\n String billingPhone = orderDetail.getBillingAddress().getTelephone();\n String billingEmail = orderDetail.getBillingAddress().getEmail();\n txt_billing_name.setText(billingName);\n txt_billing_address.setText(billingAddress);\n txt_billing_phone.setText(billingPhone);\n txt_billing_email.setText(billingEmail);\n\n Address shippingAddress = orderDetail.getExtensionAttributes().getShippingAssignments().get(0).getShipping().getAddress();\n\n if (shippingAddress != null) {\n String shippingName = shippingAddress.getFirstname() + \" \" + shippingAddress.getLastname();\n String shippingAddressLine = shippingAddress.getAddressLine();\n if (shippingAddressLine == null) {\n shippingAddressLine = shippingAddress.getStreet().get(0);\n }\n String shippingPhone = shippingAddress.getTelephone();\n String shippingEmail = shippingAddress.getEmail();\n txt_shipping_name.setText(shippingName);\n txt_shipping_address.setText(StringUtils.join(shippingAddress.getStreet(), \" / \"));\n txt_shipping_phone.setText(shippingPhone);\n txt_shipping_email.setText(shippingEmail);\n }\n }\n }",
"@Override\n public void onClick(View v) {\n int baseId = service1Btn.getId();\n switch (v.getId() - baseId){\n case 0:\n serviceName = service1.getServiceName();\n servicePrice = service1.getServicePrice();\n break;\n case 1:\n serviceName = service2.getServiceName();\n servicePrice = service2.getServicePrice();\n break;\n case 2:\n serviceName = service3.getServiceName();\n servicePrice = service3.getServicePrice();\n break;\n case 3:\n serviceName = service4.getServiceName();\n servicePrice = service4.getServicePrice();\n break;\n case 4:\n serviceName = service5.getServiceName();\n servicePrice = service5.getServicePrice();\n break;\n case 5:\n serviceName = service6.getServiceName();\n servicePrice = service6.getServicePrice();\n break;\n }\n\n // Send data (service number, professional name, price) to MainActivity\n TransferDataToMainActivity();\n\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\tif(new ConnectionDetector(context).isConnectingToInternet()){\n\t\t\t\t\t\t\t\t\t\tMyspinner sp1 = (Myspinner)districtlist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp2 = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp3 = (Myspinner)retailerslist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp4 = (Myspinner)activitieslist.getSelectedItem();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t&& mandilist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& retailerslist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& activitieslist.getSelectedItemPosition()!=0){\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd\").format(dt);\n\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> id = new GetData(context, db).getVillageId(villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tif(id.size()>0 && id.get(0).length()>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), id.get(0), villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), \"0\", villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\talert.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select District\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mandilist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Mandi\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(retailerslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Retailer\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(activitieslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Activity\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"No Network Found\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_station_info);\n db = new DbOperator(this);\n db1 = db.getReadableDatabase();\n\n\n Intent intent = getIntent();\n String stationId = intent.getStringExtra(\"stationId\");\n userId = intent.getStringExtra(\"UserId\");\n permissionId = intent.getStringExtra(\"PermissionId\");\n Log.d(\"HEREEXTRA\", userId);\n Button bookButton = (Button) findViewById(R.id.book_button);\n\n Log.d(\"HEREINTENT\",stationId);\n\n if(!stationId.equals(null)) {\n //stationsList =(ArrayList<Station>)intent.getSerializableExtra(\"stationsList\");\n Cursor st = db1.rawQuery(\"select* from Station where StationId = ?\", new String[]{stationId});\n\n Station station = null;\n for (int i = 0; i < st.getCount(); i++) {\n if (st.moveToNext()) {\n station = new Station(st.getInt(0), st.getString(1), st.getInt(2), st.getString(3), st.getString(4), st.getString(5), st.getDouble(6), st.getDouble(7));\n\n }\n }\n\n\n //Station station = stationsList.get(stationId);\n\n TextView stationName = (TextView) findViewById(R.id.station_name);\n stationName.setText(station.getStationName());\n\n TextView street = (TextView) findViewById(R.id.street);\n street.setText(station.getStreet());\n\n TextView city = (TextView) findViewById(R.id.city);\n city.setText(station.getCity());\n\n TextView bikeAvail = (TextView) findViewById(R.id.bikeAvail);\n\n\n\n // Cursor stations = db1.rawQuery(\"select * from Station where StationId = ?\", new String[]{Integer.toString(station.getStationId())});\n\n bikes = db1.rawQuery(\"select* from Bike where StationId = ?\", new String[]{Integer.toString(station.getStationId())});\n\n int total = bikes.getCount();\n\n\n if (total == 0) {\n bikeAvail.setText(R.string.bike_not_avaail);\n bookButton.setEnabled(false);\n } else {\n bikeAvail.setText(R.string.bike_avail);\n }\n\n\n\n }\n\n\n\n Button backButton = (Button) findViewById(R.id.back_button);\n // ImageButton report = (ImageButton) findViewById(R.id.btn_report_1);\n Intent startIntent;\n\n bookButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Toast.makeText(getApplicationContext(),getResources().getString(R.string.bike_booked_msg),Toast.LENGTH_SHORT).show();\n\n\n\n for (int i = 0; i < bikes.getCount(); i++) {\n if (bikes.moveToNext()) {\n Bike bike = new Bike(bikes.getInt(0), bikes.getInt(1), bikes.getInt(2));\n\n if (bike.getBikeStatusId() == 1) {\n //put the object into list\n\n ContentValues cv = new ContentValues();\n cv.put(\"StationId\", bike.getStationId()); //These Fields should be your String values of actual column names\n cv.put(\"BikeStatusId\",\"3\");\n db1.update(\"Bike\", cv, \"BikeId=\"+bike.getBikeId(), null);\n /*db.insertJourney( int bikeId,\n int userId,\n SimpleDateFormat startTime);*/\n SimpleDateFormat formatter= new SimpleDateFormat(\"yyyy.MM.dd HH:mm:ss\");\n Date date = new Date(System.currentTimeMillis());\n String finalDate = formatter.format(date);\n db.insertJourney(bike.getBikeId(),Integer.parseInt(userId),finalDate);\n\n\n Toast.makeText(getApplicationContext(),getResources().getString(R.string.bike_booked_msg),Toast.LENGTH_SHORT).show();\n\n break;\n\n }\n\n }\n }\n Intent intent = new Intent(StationInfo.this,Home.class);\n intent.putExtra(\"DisableBook\", \"true\");\n intent.putExtra(\"DisableReturn\", \"false\");\n intent.putExtra(\"UserId\", userId);\n intent.putExtra(\"PermissionId\", permissionId);\n startActivity(intent);\n\n }\n });\n\n\n backButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Toast.makeText(getApplicationContext(),getResources().getString(R.string.back_to_map_msg),Toast.LENGTH_SHORT).show();\n\n finish();\n }});\n\n\n\n\n\n // db.close();\n\n\n }",
"@Override\n public void onClick(View v) {\n if (TextUtils.isEmpty(et_baobei_title.getText().toString())) {\n MessageUtils.showShortToast(TransferActivity.this, \"标题为空\");\n return;\n }\n if (TextUtils.isEmpty(et_baobei_detail.getText().toString())) {\n MessageUtils.showShortToast(TransferActivity.this, \"描述为空\");\n return;\n }\n if (TextUtils.isEmpty(et_baobei_transferprice.getText().toString())) {\n MessageUtils.showShortToast(TransferActivity.this, \"价格为空\");\n return;\n }\n if (kind.getId() == null || kind.getId().equals(\"\")) {\n MessageUtils.showShortToast(TransferActivity.this, \"请选择分类\");\n return;\n }\n if (TextUtils.isEmpty(et_contact.getText().toString())) {\n MessageUtils.showShortToast(TransferActivity.this, \"联系人为空\");\n return;\n }\n if (TextUtils.isEmpty(et_contact_telephone.getText().toString())) {\n MessageUtils.showShortToast(TransferActivity.this, \"联系电话为空\");\n return;\n }\n if (listImageUrl.size() == 1) {\n dao.requestGoodsAdd(AppHolder.getInstance().getCommunity().getId(),\n AppHolder.getInstance().getMemberInfo().getMemberId(),\n AppHolder.getInstance().getProprietor().getProprietorId(),\n et_baobei_title.getText().toString(),\n et_baobei_detail.getText().toString(),\n et_contact.getText().toString(),\n et_contact_telephone.getText().toString(),\n et_baobei_transferprice.getText().toString(),\n kind.getId(),\n et_baobei_originalprice.getText().toString(),\n listImageUrl.get(0) + \",\" +listZipImageUrl.get(0), \"\", \"\",\n StrConstant.WANT_TRANSFER_TRANSACTION_TYPE,\n StrConstant.VISIBLE_TYPE\n );\n }\n if (listImageUrl.size() == 2) {\n dao.requestGoodsAdd(AppHolder.getInstance().getCommunity().getId(),\n AppHolder.getInstance().getMemberInfo().getMemberId(),\n AppHolder.getInstance().getProprietor().getProprietorId(),\n et_baobei_title.getText().toString(),\n et_baobei_detail.getText().toString(),\n et_contact.getText().toString(),\n et_contact_telephone.getText().toString(),\n et_baobei_transferprice.getText().toString(),\n kind.getId(),\n et_baobei_originalprice.getText().toString(),\n listImageUrl.get(0) + \",\" + listZipImageUrl.get(0),\n listImageUrl.get(1) + \",\" + listZipImageUrl.get(1), \"\",\n StrConstant.WANT_TRANSFER_TRANSACTION_TYPE,\n StrConstant.VISIBLE_TYPE\n );\n }\n if (listImageUrl.size() == 3) {\n dao.requestGoodsAdd(AppHolder.getInstance().getCommunity().getId(),\n AppHolder.getInstance().getMemberInfo().getMemberId(),\n AppHolder.getInstance().getProprietor().getProprietorId(),\n et_baobei_title.getText().toString(),\n et_baobei_detail.getText().toString(),\n et_contact.getText().toString(),\n et_contact_telephone.getText().toString(),\n et_baobei_transferprice.getText().toString(),\n kind.getId(),\n et_baobei_originalprice.getText().toString(),\n listImageUrl.get(0) + \",\" + listZipImageUrl.get(0),\n listImageUrl.get(1) + \",\" + listZipImageUrl.get(1),\n listImageUrl.get(2) + \",\" + listZipImageUrl.get(2),\n StrConstant.WANT_TRANSFER_TRANSACTION_TYPE,\n StrConstant.VISIBLE_TYPE\n );\n }\n if (listZipImageUrl.size() == 0) {\n dao.requestGoodsAdd(AppHolder.getInstance().getCommunity().getId(),\n AppHolder.getInstance().getMemberInfo().getMemberId(),\n AppHolder.getInstance().getProprietor().getProprietorId(),\n et_baobei_title.getText().toString(),\n et_baobei_detail.getText().toString(),\n et_contact.getText().toString(),\n et_contact_telephone.getText().toString(),\n et_baobei_transferprice.getText().toString(),\n kind.getId(),\n et_baobei_originalprice.getText().toString(),\n \"\", \"\", \"\",\n StrConstant.WANT_TRANSFER_TRANSACTION_TYPE,\n StrConstant.VISIBLE_TYPE\n );\n }\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n createAcctActivity_btn = (Button) findViewById(R.id.createAccAct_btn);\n reserveSeatActivity_btn = (Button) findViewById(R.id.reserveSeatAct_btn);\n cancelResActivity_btn = (Button) findViewById(R.id.cancelReservationAct_btn);\n manageSystem_btn = (Button) findViewById(R.id.manageSystemAct_btn);\n createAcctActivity_btn.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n openCreateAccount();\n }\n });\n\n reserveSeatActivity_btn.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n openReserveSeat();\n }\n });\n\n cancelResActivity_btn.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n openCancelReservation();\n }\n });\n\n manageSystem_btn.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n openManageSystem();\n }\n });\n\n }",
"public static String _btnfrasco_click() throws Exception{\nmostCurrent._activity.RemoveAllViews();\n //BA.debugLineNum = 126;BA.debugLine=\"Activity.LoadLayout(\\\"lay_mosquito_Ciclo\\\")\";\nmostCurrent._activity.LoadLayout(\"lay_mosquito_Ciclo\",mostCurrent.activityBA);\n //BA.debugLineNum = 128;BA.debugLine=\"utilidades.CreateHaloEffect(Activity, butPaso1, C\";\nmostCurrent._vvvvvvvvvvvvvvvvvvvvv7._vvvvvvvvv3 /*void*/ (mostCurrent.activityBA,(anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(mostCurrent._activity.getObject())),mostCurrent._butpaso1,anywheresoftware.b4a.keywords.Common.Colors.Red);\n //BA.debugLineNum = 130;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public static String _butpatas_click() throws Exception{\nmostCurrent._butpatas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 85;BA.debugLine=\"butColor.Visible = False\";\nmostCurrent._butcolor.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 87;BA.debugLine=\"lblFondo.Initialize(\\\"\\\")\";\nmostCurrent._lblfondo.Initialize(mostCurrent.activityBA,\"\");\n //BA.debugLineNum = 88;BA.debugLine=\"lblFondo.Color = Colors.ARGB(30,255,94,94)\";\nmostCurrent._lblfondo.setColor(anywheresoftware.b4a.keywords.Common.Colors.ARGB((int) (30),(int) (255),(int) (94),(int) (94)));\n //BA.debugLineNum = 89;BA.debugLine=\"Activity.AddView(lblFondo,0,0,100%x,100%y)\";\nmostCurrent._activity.AddView((android.view.View)(mostCurrent._lblfondo.getObject()),(int) (0),(int) (0),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (100),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (100),mostCurrent.activityBA));\n //BA.debugLineNum = 91;BA.debugLine=\"panelPopUps_1.Initialize(\\\"\\\")\";\nmostCurrent._panelpopups_1.Initialize(mostCurrent.activityBA,\"\");\n //BA.debugLineNum = 92;BA.debugLine=\"panelPopUps_1.LoadLayout(\\\"lay_Mosquito_PopUps\\\")\";\nmostCurrent._panelpopups_1.LoadLayout(\"lay_Mosquito_PopUps\",mostCurrent.activityBA);\n //BA.debugLineNum = 94;BA.debugLine=\"lblPopUp_Descripcion.Text = \\\"Se pueden ver rayas\";\nmostCurrent._lblpopup_descripcion.setText(BA.ObjectToCharSequence(\"Se pueden ver rayas blancas en sus patas\"));\n //BA.debugLineNum = 95;BA.debugLine=\"imgPopUp.Bitmap = LoadBitmap(File.DirAssets,\\\"mosq\";\nmostCurrent._imgpopup.setBitmap((android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.LoadBitmap(anywheresoftware.b4a.keywords.Common.File.getDirAssets(),\"mosquito_Grande.png\").getObject()));\n //BA.debugLineNum = 96;BA.debugLine=\"imgPopUp.Visible = True\";\nmostCurrent._imgpopup.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 97;BA.debugLine=\"Activity.AddView(panelPopUps_1, 15%x, 15%y, 70%x,\";\nmostCurrent._activity.AddView((android.view.View)(mostCurrent._panelpopups_1.getObject()),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (15),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (15),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (70),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (70),mostCurrent.activityBA));\n //BA.debugLineNum = 98;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"void getId(){\n\n btnRelationship = (Button) findViewById(R.id.getRelationship);\n btnRelationship2 = (ImageButton) findViewById(R.id.getRelationship2);\n\n btnSexuality = (Button) findViewById(R.id.getSexuality);\n btnSexuality2 = (ImageButton) findViewById(R.id.getSexuality2);\n\n btnHeight = (Button) findViewById(R.id.getHeight);\n btnHeight2 = (ImageButton) findViewById(R.id.getHeight2);\n\n btnWeight = (Button) findViewById(R.id.getWeight);\n btnWeight2 = (ImageButton) findViewById(R.id.getWeight2);\n\n btnBodyType = (Button) findViewById(R.id.getBodyImage);\n btnBodyType2 = (ImageButton) findViewById(R.id.getBodyImage2);\n\n btnEyeColor = (Button) findViewById(R.id.getEyeColor);\n btnEyeColor2 = (ImageButton) findViewById(R.id.getEyeColor2);\n\n btnHairColor = (Button) findViewById(R.id.getHairColor);\n btnHairColor2 = (ImageButton) findViewById(R.id.getHairColor2);\n\n btnLiving = (Button) findViewById(R.id.getLiving);\n btnLiving2 = (ImageButton) findViewById(R.id.getLiving2);\n\n btnKid = (Button) findViewById(R.id.getKid);\n btnKid2 = (ImageButton) findViewById(R.id.getKid2);\n\n btnSmoking = (Button) findViewById(R.id.getSmoking);\n btnSmoking2 = (ImageButton) findViewById(R.id.getSmoking2);\n\n\n btnDrinking = (Button) findViewById(R.id.getDrinking);\n btnDrinking2 = (ImageButton) findViewById(R.id.getDrinking2);\n\n }",
"public void onClick(View v) {\n if(!vehicle.getText().toString().isEmpty()\n && Double.parseDouble(vehicle.getText().toString()) != 0.0){\n if(mEDB.getBudgets()[0] == 0.00 ){\n //if budget is empty, insert a new budget\n budgetInsertTask task = new budgetInsertTask(main, mEDB);\n task.execute(mEDB.username,\n \"Vehicle\",\n Integer.toString(Calendar.getInstance().get(Calendar.YEAR)),\n Integer.toString(Calendar.getInstance().get(Calendar.MONTH) + 1),\n Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)),\n \"1\",\n vehicle.getText().toString());\n }else{\n //otherwise delete the old budget\n budgetDeleteTask task = new budgetDeleteTask(main, mEDB);\n task.execute(mEDB.username,\n \"Vehicle\",\n vehicle.getText().toString(),\n \"1\");\n }\n }\n\n //for pets\n if(!pets.getText().toString().isEmpty()\n && Double.parseDouble(pets.getText().toString()) != 0.0) {\n if(mEDB.getBudgets()[1] == 0.00 ) {\n //if budget is empty, insert a new budget\n budgetInsertTask task = new budgetInsertTask(main, mEDB);\n task.execute(mEDB.username,\n \"Pets\",\n Integer.toString(Calendar.getInstance().get(Calendar.YEAR)),\n Integer.toString(Calendar.getInstance().get(Calendar.MONTH) + 1),\n Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)),\n \"1\",\n pets.getText().toString());\n }else{\n //otherwise delete the old budget\n budgetDeleteTask task = new budgetDeleteTask(main, mEDB);\n task.execute(mEDB.username,\n \"Pets\",\n pets.getText().toString(),\n \"1\");\n }\n }\n\n //for home\n if(!home.getText().toString().isEmpty()\n && Double.parseDouble(home.getText().toString()) != 0.0 ){\n if(mEDB.getBudgets()[2] == 0.00 ) {\n //if budget is empty, insert a new budget\n budgetInsertTask task = new budgetInsertTask(main, mEDB);\n task.execute(mEDB.username,\n \"Home\",\n Integer.toString(Calendar.getInstance().get(Calendar.YEAR)),\n Integer.toString(Calendar.getInstance().get(Calendar.MONTH) + 1),\n Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)),\n \"1\",\n home.getText().toString());\n }else{\n //otherwise delete the old budget\n budgetDeleteTask task = new budgetDeleteTask(main, mEDB);\n task.execute(mEDB.username,\n \"Home\",\n home.getText().toString(),\n \"1\");\n }\n }\n\n //for food\n if(!food.getText().toString().isEmpty()\n && Double.parseDouble(food.getText().toString()) != 0.0){\n if(mEDB.getBudgets()[3] == 0.00 ) {\n //if budget is empty, insert a new budget\n budgetInsertTask task = new budgetInsertTask(main, mEDB);\n task.execute(mEDB.username,\n \"Food\",\n Integer.toString(Calendar.getInstance().get(Calendar.YEAR)),\n Integer.toString(Calendar.getInstance().get(Calendar.MONTH) + 1),\n Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)),\n \"1\",\n food.getText().toString());\n }else{\n //otherwise delete the old budget\n budgetDeleteTask task = new budgetDeleteTask(main, mEDB);\n task.execute(mEDB.username,\n \"Food\",\n food.getText().toString(),\n \"1\");\n }\n }\n\n\n //for entertainment\n if(!entertainment.getText().toString().isEmpty()\n && Double.parseDouble(entertainment.getText().toString()) != 0.0) {\n if (mEDB.getBudgets()[4] == 0.00) {\n //if budget is empty, insert a new budget\n budgetInsertTask task = new budgetInsertTask(main, mEDB);\n task.execute(mEDB.username,\n \"Entertainment\",\n Integer.toString(Calendar.getInstance().get(Calendar.YEAR)),\n Integer.toString(Calendar.getInstance().get(Calendar.MONTH) + 1),\n Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)),\n \"1\",\n entertainment.getText().toString());\n }\n else{\n //otherwise delete the old budget\n budgetDeleteTask task = new budgetDeleteTask(main, mEDB);\n task.execute(mEDB.username,\n \"Entertainment\",\n entertainment.getText().toString(),\n \"1\");\n }\n }\n\n //for other\n if(!other.getText().toString().isEmpty()\n && Double.parseDouble(other.getText().toString()) != 0.0){\n if( mEDB.getBudgets()[5] == 0.00) {\n //if budget is empty, insert a new budget\n budgetInsertTask task = new budgetInsertTask(main, mEDB);\n task.execute(mEDB.username,\n \"Other\",\n Integer.toString(Calendar.getInstance().get(Calendar.YEAR)),\n Integer.toString(Calendar.getInstance().get(Calendar.MONTH) + 1),\n Integer.toString(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)),\n \"1\",\n other.getText().toString());\n }else{\n //otherwise delete the old budget\n budgetDeleteTask task = new budgetDeleteTask(main, mEDB);\n task.execute(mEDB.username,\n \"Other\",\n other.getText().toString(),\n \"1\");\n }\n }\n dismiss();\n }",
"public void init()\n {\n tv_title =(TextView)findViewById(R.id.tv_title);\n tv_money =(TextView)findViewById(R.id.tv_money);\n tv_location =(TextView)findViewById(R.id.tv_location);\n// tv_type =(TextView)findViewById(R.id.tv_type);\n// tv_content =(TextView)findViewById(R.id.tv_content);\n tb_back = (TextView)findViewById(R.id.tb_back);\n tb_action = (TextView)findViewById(R.id.tb_action);\n tb_title = (TextView)findViewById(R.id.tb_title);\n tv_time = (TextView)findViewById(R.id.tv_time);\n tv_status = (TextView)findViewById(R.id.tv_status);\n// tv_require = (TextView)findViewById(R.id.tv_require);\n tv_paymethod = (TextView)findViewById(R.id.tv_paymethod);\n// tv_deadline = (TextView)findViewById(R.id.tv_deadline);\n// tv_name = (TextView)findViewById(R.id.tv_name);\n lv_ordercomment = (ListView)findViewById(R.id.lv_ordercomment);\n rl_center = (RelativeLayout)findViewById(R.id.rl_center);\n rl_refund = (RelativeLayout)findViewById(R.id.rl_refund);\n rl_reject = (RelativeLayout)findViewById(R.id.rl_reject);\n tv_refundreason = (TextView)findViewById(R.id.tv_refundreason);\n tv_rejectreason = (TextView)findViewById(R.id.tv_rejectreason);\n// tv_comment = (TextView)findViewById(R.id.tv_comment);\n// tv_moneyunit = (TextView)findViewById(R.id.tv_moneyunit);\n// tv_range = (TextView)findViewById(R.id.tv_range);\n iv_avatar = (com.android.volley.toolbox.NetworkImageView)findViewById(R.id.iv_avatar);\n tv_serverprovider = (TextView)findViewById(R.id.tv_serverprovider);\n tv_serverreceiver = (TextView)findViewById(R.id.tv_serverreceiver);\n tv_finish = (TextView)findViewById(R.id.tv_finish);\n tv_estimate = (TextView)findViewById(R.id.tv_estimate);\n// rb_totalvalue = (RatingBar)findViewById(R.id.rb_totalvalue);\n// btn_finish = (Button)findViewById(R.id.btn_finish);\n// btn_estimate = (Button)findViewById(R.id.btn_estimate);\n ll_button = (LinearLayout)findViewById(R.id.ll_button);\n tv_confirmorderid = (TextView)findViewById(R.id.tv_confirmorderid);\n\n iv_phone = (ImageView)findViewById(R.id.iv_phone);\n iv_message = (ImageView)findViewById(R.id.iv_message);\n\n iv_avatar.setOnClickListener(this);\n tv_finish.setOnClickListener(this);\n tv_estimate.setOnClickListener(this);\n iv_message.setOnClickListener(this);\n iv_phone.setOnClickListener(this);\n rl_center.setOnClickListener(this);\n// imgbtn_conversation.setOnClickListener(this);\n// imgbtn_call.setOnClickListener(this);\n// btn_finish.setOnClickListener(this);\n// btn_estimate.setOnClickListener(this);\n\n if(this.getIntent().getStringExtra(\"ConfirmOrderIdFromPushDemoReceiver\") != null)\n {\n //orderDetails之前赋值过了\n }\n else {\n Intent intent = this.getIntent();\n confirmedOrderDetail = (ConfirmedOrderDetail) intent.getSerializableExtra(\"ConfirmOrderDetails\");\n }\n From = this.getIntent().getStringExtra(\"From\");\n if(From == null)\n {\n if(confirmedOrderDetail.getStatus() == 3 || confirmedOrderDetail.getStatus() == 11) {\n From = AppConfig.ORDERSTATUS_APPLY;\n }\n else if(confirmedOrderDetail.getStatus() == 1 || confirmedOrderDetail.getStatus() == 5 || confirmedOrderDetail.getStatus() == 7 || confirmedOrderDetail.getStatus() == 8)\n {\n From = AppConfig.ORDERSTATUS_PROGRESS;\n }\n else if(confirmedOrderDetail.getStatus() == 2)\n {\n From = AppConfig.ORDERSTATUS_DONE;\n }\n else if (confirmedOrderDetail.getStatus() == 0 || confirmedOrderDetail.getStatus() == 6 || confirmedOrderDetail.getStatus() == 4 )\n {\n From = AppConfig.ORDERSTATUS_CLOSE;\n }\n else\n {\n\n }\n }\n updateOrderStatus(confirmedOrderDetail, From);\n\n if(confirmedOrderDetail.getServiceProvider().getId() == Auth.getCurrentUserId()) {\n tv_serverprovider.setText(confirmedOrderDetail.getServiceProvider().getName() +\"(我)\");\n }\n else {\n if(confirmedOrderDetail.getOrder().getNameAnonymity() ==1)\n {\n tv_serverprovider.setText(\"匿名\");\n MessageUserID = confirmedOrderDetail.getServiceProvider().getId();\n Tel = confirmedOrderDetail.getServiceProvider().getMobile() == null ? \"\" : confirmedOrderDetail.getServiceProvider().getMobile().toString();\n }\n else {\n tv_serverprovider.setText(confirmedOrderDetail.getServiceProvider().getName());\n MessageUserID = confirmedOrderDetail.getServiceProvider().getId();\n Tel = confirmedOrderDetail.getServiceProvider().getMobile() == null ? \"\" : confirmedOrderDetail.getServiceProvider().getMobile().toString();\n }\n }\n if(confirmedOrderDetail.getServiceReceiver().getId() == Auth.getCurrentUserId())\n {\n tv_serverreceiver.setText(confirmedOrderDetail.getServiceReceiver().getName() +\"(我)\");\n }\n else {\n if(confirmedOrderDetail.getOrder().getNameAnonymity() ==1)\n {\n tv_serverreceiver.setText(\"匿名\");\n MessageUserID = confirmedOrderDetail.getServiceReceiver().getId();\n Tel = confirmedOrderDetail.getServiceReceiver().getMobile() == null ? \"\" : confirmedOrderDetail.getServiceReceiver().getMobile().toString();\n } else {\n tv_serverreceiver.setText(confirmedOrderDetail.getServiceReceiver().getName());\n MessageUserID = confirmedOrderDetail.getServiceReceiver().getId();\n Tel = confirmedOrderDetail.getServiceReceiver().getMobile() == null ? \"\" : confirmedOrderDetail.getServiceReceiver().getMobile().toString();\n }\n }\n// if( confirmedOrderDetail.getOrder().getType() == 1 )\n// {\n// tv_moneyunit.setText(\"索 ¥\");\n// }\n// else\n// {\n// tv_moneyunit.setText(\"赏 ¥\");\n// }\n\n tv_title.setText(confirmedOrderDetail.getOrder().getTitle().toString());\n tv_money.setText(\"¥\" + String.valueOf(confirmedOrderDetail.getOrder().getBounty()));\n if(confirmedOrderDetail.getOrder().getLocationAnonymity() == 1) {\n tv_location.setText(\"\");\n }\n else\n {\n tv_location.setText(confirmedOrderDetail.getOrder().getAddress().toString());\n }\n// tv_type.setText(confirmedOrderDetail.getOrder().getCategory().toString());\n// tv_content.setText(confirmedOrderDetail.getOrder().getContent().toString());\n tv_time.setText(confirmedOrderDetail.getOrder().getCreatedAt().toString());\n tv_status.setText(setComfirmOrderStatus(confirmedOrderDetail));\n tv_confirmorderid.setText(confirmedOrderDetail.getConfirmedOrderNumber());\n// tv_require.setText(confirmedOrderDetail.getOrder().getRequest() == null ? \"\" : confirmedOrderDetail.getOrder().getRequest().toString());\n tv_paymethod.setText(confirmedOrderDetail.getOrder().getPaymentMethod().toString());\n// tv_deadline.setText(confirmedOrderDetail.getOrder().getDeadline().toString());\n// if(confirmedOrderDetail.getOrder().getOrderer().getFNickName() != null && !confirmedOrderDetail.getOrder().getOrderer().getFNickName().equals(\"\"))\n// {\n// tv_name.setText(confirmedOrderDetail.getOrder().getOrderer().getFNickName());\n// }\n// else {\n// tv_name.setText(confirmedOrderDetail.getOrder().getOrderer().getName().toString());\n// }\n// if(confirmedOrderDetail.getOrder().getType() == 1) {\n// rb_totalvalue.setRating((float) confirmedOrderDetail.getOrder().getOrderer().getTotalWorkerPoint());\n// }\n// if(confirmedOrderDetail.getOrder().getType() == 2) {\n// rb_totalvalue.setRating((float) confirmedOrderDetail.getOrder().getOrderer().getTotalBossPoint());\n// }\n// if(confirmedOrderDetail.getOrder().getOrderer().getAvatar() != null) {\n// ImageUtils.setImageUrl(iv_avatar, confirmedOrderDetail.getOrder().getOrderer().getAvatar().toString());\n// }\n if(confirmedOrderDetail.getOrder().getPhotos() != null && !confirmedOrderDetail.getOrder().getPhotos().equals(\"\"))\n {\n ImageUtils.setImageUrl(iv_avatar, confirmedOrderDetail.getOrder().getPhotos().split(\",\")[0]);\n }\n else\n {\n iv_avatar.setDefaultImageResId(R.drawable.defaultphoto);\n }\n if(confirmedOrderDetail.getRefundReason() != null)\n {\n rl_refund.setVisibility(View.VISIBLE);\n tv_refundreason.setText(confirmedOrderDetail.getRefundReason());\n }\n if(confirmedOrderDetail.getRejectRefundReason() != null)\n {\n rl_reject.setVisibility(View.VISIBLE);\n tv_rejectreason.setText(confirmedOrderDetail.getRejectRefundReason());\n }\n\n// if(confirmedOrderDetail.getOrder().getPhotos() != null && confirmedOrderDetail.getOrder().getPhotos() != \"\") {\n// List<String> photoPath = new ArrayList<String>();\n// for (String photsCount : confirmedOrderDetail.getOrder().getPhotos().toString().split(\",\")) {\n// photoPath.add(photsCount);\n// }\n// gridView.setAdapter(new OrderDetailsGridViewAdapater(ConfirmOrderDetailsActivity.this,photoPath));\n// gridView.setVisibility(View.VISIBLE);\n// gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n// @Override\n// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n// Intent intent = new Intent();\n// intent.setClass(ConfirmOrderDetailsActivity.this, AvatarZoomActivity.class);\n// intent.putExtra(\"Avatar\", (String)parent.getAdapter().getItem(position));\n// startActivity(intent);\n// }\n// });\n// }\n// Tel = confirmedOrderDetail.getOrder().getOrderer().getMobile() == null ? \"\" : confirmedOrderDetail.getOrder().getOrderer().getMobile().toString();\n OrderID = String.valueOf(confirmedOrderDetail.getOrder().getId());\n// tv_range.setText(setRange(confirmedOrderDetail.getOrder().getVisibility()));\n //Log.i(\"OrderDetailsID--\",String.valueOf(orderDetails.getId()));\n tb_title.setText(\"订单详情\");\n tb_back.setText(\"订单\");\n// Drawable drawable = getResources().getDrawable(R.drawable.ic_moreoverflow_normal_holo_light);\n// drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());\n// tb_action.setCompoundDrawables(drawable, null, null, null);\n// tb_action.setOnClickListener(this);\n tb_action.setVisibility(View.GONE);\n tb_back.setOnClickListener(this);\n\n// Http.request(ConfirmOrderDetailsActivity.this, API.ORDER_GETCOOMENT, new Object[]{OrderID},\n// new Http.RequestListener<List<OrderComment>>() {\n// @Override\n// public void onSuccess(List<OrderComment> result) {\n// super.onSuccess(result);\n// if (Auth.getCurrentUserId() == confirmedOrderDetail.getOrder().getOrderer().getId()) {\n// lv_ordercomment.setAdapter(new SwipeRefreshXOrderComment(ConfirmOrderDetailsActivity.this, result, String.valueOf(Auth.getCurrentUserId()), true));\n// } else {\n// lv_ordercomment.setAdapter(new SwipeRefreshXOrderComment(ConfirmOrderDetailsActivity.this, result, String.valueOf(Auth.getCurrentUserId()), false));\n// }\n// setListViewHeightBasedOnChildren(lv_ordercomment);\n// tv_comment.setText(String.format(\"留言(%d条)\",result != null ? result.size() : 0));\n// }\n// });\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n //getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n\n hours = (EditText) findViewById(R.id.HoursET);\n tipBonus = (EditText) findViewById(R.id.TipForsSalET);\n travelers = (EditText) findViewById(R.id.HowManyTravelersET);\n distance = (EditText) findViewById(R.id.DistanceET);\n parking = (EditText) findViewById(R.id.ParkingET);\n privateTip = (EditText) findViewById(R.id.PrivateTipET);\n waitersTip = (EditText) findViewById(R.id.WaitersTipET);\n locationET = (EditText) findViewById(R.id.locationET);\n manualSalaryTV = (TextView) findViewById(R.id.ManuallySalC);\n\n dateTV = (TextView) findViewById(R.id.DateTV);\n timeStartTV = (TextView) findViewById(R.id.timeStartTV);\n timeEndTV = (TextView) findViewById(R.id.timeEndTV);\n sumTv = (TextView) findViewById(R.id.sumTV);\n sumCashTV = (TextView) findViewById(R.id.sumCash);\n drivesP = (TextView) findViewById(R.id.drivesTV);\n tipP = (TextView) findViewById(R.id.TipTv);\n manualSalaryET = (EditText) findViewById(R.id.ManualSalET);\n idForRes=(TextView)findViewById(R.id.IdForRes);\n\n\n commentsET = (EditText) findViewById(R.id.CommentsET);\n\n drivesP.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (!flagDrive) {\n distance.setVisibility(View.VISIBLE);\n parking.setVisibility(View.VISIBLE);\n flagDrive = true;\n } else {\n distance.setVisibility(View.GONE);\n parking.setVisibility(View.GONE);\n flagDrive = false;\n }\n\n }\n });\n\n tipP.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (!flagTip) {\n privateTip.setVisibility(View.VISIBLE);\n waitersTip.setVisibility(View.VISIBLE);\n tipBonus.setVisibility(View.VISIBLE);\n flagTip = true;\n } else {\n privateTip.setVisibility(View.GONE);\n waitersTip.setVisibility(View.GONE);\n tipBonus.setVisibility(View.GONE);\n flagTip = false;\n }\n\n }\n });\n final Intent intentA = new Intent(this, SetWorksActivity.class);\n\n if (db.getAllWorks().size() == 0) {\n startActivity(intentA);\n }\n else {\n spinner = (Spinner) findViewById(R.id.spinnerTE);\n\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, getWorksName());\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n spinner.setAdapter(adapter);\n spinner.setOnItemSelectedListener(this);\n\n if (db.getAllWorks().get(workIdPosition).getTypeOfDrive() < 2)\n distance.setHint(R.string.MainDriveManually);\n\n\n\n Intent intent = getIntent();\n id = intent.getIntExtra(\"id\", 9999);\n if (id != 9999)\n flagIsUpdate = true;\n\n if(!flagIsUpdate) {\n if (db.getAllWorks().get(workIdPosition).getTypeOfDrive() == 1)\n distance.setText(String.valueOf(db.getAllWorks().get(workIdPosition).getPerKilometer()));\n if(intent.getStringExtra(\"date\")!=null) {\n dateCalender = intent.getStringExtra(\"date\");\n dateTV.setText(dateCalender);\n date=dateCalender;\n }\n }\n\n\n if (flagIsUpdate)\n updateShift();\n\n }\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.conn_more_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"bt connection click\");\n\t\t\tbtSearch.findViewById(R.id.conn_more_img).setBackground(baseRes.getDrawable(R.drawable.arrow_r_gray)); \t\t\t\t\t\n//\t\t\tif( mBtStat != BluetoothService.STATE_CONNECTED ){\n//\t\t\t\tif (!bt_s.mBtAdapter.isEnabled()) {\n//\t\t\t\t\tbt_s.mBtAdapter.enable();\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tif (baseAct.setting_s.bt_s != null) {\n//\t\t\t\t\tnew Thread(baseAct.setting_s.bt_s).start();\n//\t\t\t\t\tLog.d(TAG, \"BTConnect auto connect\");\n//\t\t\t\t}\n//\t\t\t}\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.drive_record_i:\n\t\t\tif(baseAct.monitor == null)\n\t\t\t\treturn;\n\t\t\tif(!baseAct.monitoring) {\n\t\t\t\tbaseAct.monitor.config(6, 10);\n\t\t\t\tbaseAct.monitor.start();\n\t\t\t\tbaseAct.monitoring = true;\n\t\t\t\tdriveRecord.setImageResource(R.drawable.icon_radio_enable);\n\t\t\t\tToast.makeText(baseAct, \"Start recording ...\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbaseAct.monitor.stop();\n\t\t\t\tbaseAct.monitoring = false;\n\t\t\t\tdriveRecord.setImageResource(R.drawable.icon_radio_disable);\n\t\t\t\tToast.makeText(baseAct, \"Stop recording ...\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.clear_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"clear DTC click\");\n\t\t\tif(baseAct.localbinder != null){\n\t\t\t\tbaseAct.localbinder.clearDTCs();\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tbaseAct.clear_dtc();\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.account_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"account click\");\n\t\t\tif(Preference.getInstance(baseAct.getApplicationContext()).getLoginStat()){\t\t\t\t\t\n\t\t\t\thelpDialog = new CustomDialog(baseAct, 320, 320, R.layout.account_info, R.style.Theme_dialog3);\n\t\t\t\tListView list_v = (ListView) helpDialog.findViewById(R.id.account_info);\n\t\t\t\tlist_v.setDivider(baseAct.gray_line_draw);\n\t\t\t\tSimpleAdapter adapter;\n\t\t\t\tArrayList<Map<String, Object>> listItem = new ArrayList<Map<String, Object>>();\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.user_account));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getUser());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.car_plate));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getLicence());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.car_maker));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getCarMaker());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.car_type));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getCarType());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.purchase_date));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getPurchaseDate());\t\t\t\t\t\n\t\t\t\tlistItem.add(map);\n\t\t\t\t\n\t\t\t\tadapter = new SimpleAdapter(baseAct,listItem,// \n\t\t\t R.layout.account_item,\n\t\t\t new String[] {\"type\", \"cont\"}, \n\t\t\t new int[] {R.id.account_type,R.id.account_content} \n\t\t\t ); \n\t\t\t\tlist_v.setAdapter(adapter); \n\t\t\t\t\n\t\t\t\tView editView = helpDialog.findViewById(R.id.account_edit);\n\t\t\t\teditView.setOnClickListener(this);\n\t\t\t\thelpDialog.show();\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbaseAct.loginDlg = new Login(baseAct, Base.mWidth, Base.mHeight, R.layout.login, R.style.Theme_dialog);\n\t\t\t\tbaseAct.loginDlg.show();\n\t\t\t}\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.help_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"help click\");\n\t\t\thelpDialog = new CustomDialog(baseAct, 320, 320, R.layout.help_content, R.style.Theme_dialog3);\n\t\t\thelpDialog.show();\n\t\t\tbreak;\t\t\t\t\t\n\t\tcase R.id.setting_back:\n//\t\t\tSetting.this.hide();\n\t\t\tbreak;\n\t\tcase R.id.logout:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"login out click\");\n \t\tif(Preference.getInstance(baseAct.getApplicationContext()).getLoginStat()){\n \t\t\tCarDataService.saveFenceData();\n \t\t\tlogOut();\n \t\t\tBase.baidu_v.loginStateChange(false);\n \t\t}\n \t\telse{\n \t\t\tbaseAct.loginDlg = new Login(baseAct, baseAct.mWidth, baseAct.mHeight, R.layout.login, R.style.Theme_dialog);\n \t\t\tbaseAct.loginDlg.show();\n \t\t}\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.account_edit:\n\t\t\tbaseAct.editAccountDlg = new EditAccount(baseAct, Base.mWidth, Base.mHeight, R.layout.edit_account_info, R.style.Theme_dialog);\t\t\t\n\t\t\tbaseAct.editAccountDlg.show();\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_send);\n\n txtMoney = findViewById(R.id.txtMoney);\n txtOrderType = findViewById(R.id.txtOrderType);\n firstInfo = findViewById(R.id.txtFirst);\n secondInfo = findViewById(R.id.txtSecond);\n txtTableSauce = findViewById(R.id.txtTableSauce);\n list = findViewById(R.id.listing);\n btnSendOK = findViewById(R.id.btnSendOK);\n\n btnSendOK.setOnClickListener(this);\n\n helpTitle = new String[25];\n helpInfo = new String[25];\n\n receiveOrder();\n }",
"@Override\n public void onClick(View v) {\n fuel = new Fuel();\n fuel.setForeignVehicleID(foreignVehicleID); // foreign key is available in all cases\n if (!addingNewFuel) {\n fuel.setFuelID(fuelID); // fuel id is only set if we are editing current fuel data with already available fuel id\n }\n\n // if all fields are not filled\n if (checkForEmptyList()) { // if empty list available, we need to display error message\n\n Log.d(TAG, \"onClick: any of the parameters is empty\");\n AppUtils.showMessage(getActivity(), \"Please fill all the details!\");\n\n } else { //If no field is left empty and everything is filled\n\n Double perLitrePrice = Double.valueOf(tin_perLitrePrice.getText().toString());\n Double fuelQuantityLitres = Double.valueOf(tin_fuelQuantityLitres.getText().toString());\n Double totalFuelPrice = Double.valueOf(tin_totalFuelPrice.getText().toString());\n Double startingKm = Double.valueOf(tin_startingKm.getText().toString());\n Double currentKm = Double.valueOf(tin_currentKm.getText().toString());\n Double distanceCovered = Double.valueOf(tin_distanceCovered.getText().toString());\n\n // means no default date is set\n if (fuelDate == null) {\n if (!addingNewFuel) { // if we are in editing mode, we don't want current date to be set instead\n fuelDate = AppUtils.getCurrentDateTime();\n tv_input_fuel_date.setText(AppUtils.getFormattedDateString(fuelDate));\n }\n }\n\n\n if (!tankFull) { // if tankFull != true, need to zero coverableDistance and nextFuelFill\n coverableDistance = 0.0;\n nextFuelFill = 0.0;\n }\n\n\n fuel.setFuelDate(fuelDate);\n fuel.setPerLitrePrice(perLitrePrice);\n fuel.setFuelQuantityLitres(fuelQuantityLitres);\n fuel.setTotalFuelPrice(totalFuelPrice);\n fuel.setStartingKm(startingKm);\n fuel.setCurrentKm(currentKm);\n fuel.setDistanceCovered(distanceCovered);\n\n fuel.setTankFull(tankFull); // true or false\n fuel.setTotalFuelCapacity(vehicleFuelCapacity);\n fuel.setCalculatedAverage(calculatedAverage);\n fuel.setCoverableDistance(coverableDistance);\n fuel.setNextFuelFill(nextFuelFill);\n\n\n if (addingNewFuel) {\n fuelViewModel.insertFuel(fuel); // if we are adding new record\n } else {\n fuelViewModel.updateVehicle(fuel); // if we are editing existing vehicle record\n }\n\n\n getDialog().dismiss();\n getParentFragmentManager().popBackStack(); // close detail fragment when editing is complete\n }\n\n\n }",
"private void setListeners() {\n try {\n\n viewButtonChennai = findViewById(R.id.viewButtonChennai);\n viewButtonMumbai = findViewById(R.id.viewButtonMumbai);\n viewButtonBangalore = findViewById(R.id.viewButtonBangalore);\n viewButtonNewDelhi = findViewById(R.id.viewButtonNewDelhi);\n\n viewButtonChennai.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n homeController.startFRGetDailyForecast(getString(R.string.city_chennai));\n\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n }\n }\n });\n viewButtonMumbai.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n homeController.startFRGetDailyForecast(getString(R.string.city_mumbai));\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n }\n }\n });\n viewButtonBangalore.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n homeController.startFRGetDailyForecast(getString(R.string.city_bangalore));\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n }\n }\n });\n viewButtonNewDelhi.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n homeController.startFRGetDailyForecast(getString(R.string.city_newdelhi));\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n }\n }\n });\n\n viewCardToday.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n HomeModel homeModel = (HomeModel) ObjectStore.I().Get(AppConstants.OBJ_HOME_MODEL, true);\n if (null != homeModel.dailyForecasts) {\n showToastOfTodayWeatherDetails(homeModel.dailyForecasts.getList().get(0));\n } else {\n Toast.makeText(HomeActivity.this, \"No Data to show\", Toast.LENGTH_SHORT).show();\n }\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n }\n }\n });\n\n\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n }\n }",
"@Override\n public void onClick(View v) {\n\n new DrinkDatabase(getBaseContext()).DrinkaddToCart(new DrinkOrder(\n// new Database(getBaseContext()).addToCart(new Order(\n drinkId,\n currentDrink.getDrinkName(),\n drink_numberButton.getNumber(), //null,//use null to check or to run the program\n currentDrink.getDrinkPrice(),\n currentDrink.getDrinkDiscount()\n\n\n ));\n\n Toast.makeText(DrinkDetail.this, \"Added to chart\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//Code to set layout\n\t\tsetContentView(R.layout.activity_delete_delivery_list_view);\n\n\t\t//Code to create instance of classes\n\t\tdb = new DatabaseAdapter(this);\n\t\tcommon = new Common(this);\n\t\tsession = new UserSessionManager(getApplicationContext());\n\t\tActionBar ab = getActionBar();\n\t\tab.setDisplayHomeAsUpEnabled(true);\n\t\tfinal HashMap<String, String> user = session.getLoginUserDetails();\n\t\tuserId = user.get(UserSessionManager.KEY_ID);\n\n\t\tlang= session.getDefaultLang();\n\t\tLocale myLocale = new Locale(lang);\n\t\tResources res = getResources();\n\t\tDisplayMetrics dm = res.getDisplayMetrics();\n\t\tConfiguration conf = res.getConfiguration();\n\t\tconf.locale = myLocale;\n\t\tres.updateConfiguration(conf, dm);\n\n\t\t//Start of code to find Controls\n\t\tlistViewMain = (ListView) findViewById(R.id.listViewMain);\n\t\ttvNoRecord = (TextView) findViewById(R.id.tvNoRecord);\n\t\tif(common.isConnected())\n\t\t{\n\t\t\tAsyncDeliveryDetailWSCall task = new AsyncDeliveryDetailWSCall();\n\t\t\ttask.execute();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tIntent intent = new Intent(mContext, ActivityAdminHomeScreen.class);\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t}\n\t\tlistViewMain.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t\tpublic void onItemClick(AdapterView<?> lv, View item, int position, long id) {\n\t\t\t\tIntent intent = new Intent(ActivityDeleteDeliveryList.this, ActivityDeleteDeliveryView.class);\n\t\t\t\tintent.putExtra(\"DeliveryId\", String.valueOf(((TextView) item.findViewById(R.id.tvId)).getText().toString()));\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}",
"public void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.btnXMLSerializer:\r\n\r\n\t\t\tManuscripts manuscript = new Manuscripts();\r\n\t\t\tAccessories accessories = new Accessories();\r\n\t\t\ttry {\r\n\t\t\t\tXMLDataHandle.Serializer(Build(manuscript), Build(accessories),\r\n\t\t\t\t\t\t\"TestXMLData\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLogger.e(e);\r\n\t\t\t}\r\n\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnOperationLog:\r\n\t\t\tLogger.o(Logger.OperationMessage.CreateM);\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnSystemLog:\r\n\t\t\tint a = 5;\r\n\t\t\tint b = 0;\r\n\t\t\tint c;\r\n\t\t\ttry {\r\n\t\t\t\tc = a / b;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLogger.e(e);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\r\n\t\tcase R.id.btnAddPic:\r\n\t\t\tIntent intent = new Intent(this, ManagePicAccessoryActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnAddVideo:\r\n\t\t\tTimeZone zone = TimeZone.getDefault();\r\n\t\t\tString timeString = TimeFormatHelper.getGMTTime(new Date());\r\n\t\t\t//Toast.makeText(this, timeString, Toast.LENGTH_LONG).show();\r\n\t\t\tToastHelper.showToast(timeString,Toast.LENGTH_SHORT);\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnAddVoice:\r\n\t\t\tManuscriptsService service = new ManuscriptsService(this);\r\n\t\t\tservice.deleteAllManuscripts();\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnAddMC:\r\n\t\t\tIntent editIntent = new Intent(this, AddManuscriptsActivity.class);\r\n\t\t\teditIntent.putExtra(\"id\", \"\");\r\n\t\t\tstartActivity(editIntent);\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnEditingList_wyj:\r\n\t\t\tIntent editingIntent = new Intent(this, EditingManuscriptsActivity.class);\r\n\t\t\tstartActivity(editingIntent);\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnEliList_wyj:\r\n\t\t\tIntent edliIntent = new Intent(this, EliminationManuscriptsActivity.class);\r\n\t\t\tstartActivity(edliIntent);\r\n\t\t\tbreak;\r\n\t\tcase R.id.btnSendToList_wyj:\r\n//\t\t\tIntent sendIntent = new Intent(this, FileManagerActivity.class);\r\n//\t\t\tstartActivity(sendIntent);\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main2);\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n final ListView lv= (ListView) findViewById(R.id.lv);\n final Downloader d=new Downloader(this,url,lv);\n\n FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //EXECUTE DOWNLOAD\n d.execute();\n }\n });\n/*\n //program the choose telephone editText and button10 here to connect to database\n //using the send money buttons loginc, carrying the same arguments but different buttons\n Intent intent=getIntent();\n final String telephone=intent.getStringExtra(\"telephone\");\n //intent carried on from the android intent system as string telephone\n final Button button=(Button)findViewById(R.id.button10);\n final EditText telephone1=(EditText) findViewById(R.id.editText);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final String mytelephone=telephone1.getText().toString();\n //final String myamount=amount.getText().toString();\n final String telephone2=telephone;\n\n Response.Listener<String> responselistener=new Response.Listener<String>()\n {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonResponse=new JSONObject(response);\n boolean successfulRegistration=jsonResponse.getBoolean(\"success\");\n if(successfulRegistration){\n AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity2.this);\n builder.setMessage(\"Investment Successful\")\n .setNegativeButton(\"Okay\",null)\n .create()\n .show();\n\n }\n else {\n AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity2.this);\n builder.setMessage(\"Transaction Failed\")\n .setNegativeButton(\"Retry\",null)\n .create()\n .show();\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n };\n\n //class deduction should now receive the same parameters:-[\n MainActivityRequest mainActivityRequest=new MainActivityRequest(mytelephone,telephone2,responselistener);\n RequestQueue queue= Volley.newRequestQueue(MainActivity2.this);\n queue.add(mainActivityRequest);\n\n\n\n\n }\n });\n*/\n\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);// For removing the default title bar\n // Set the view for the main activity screen\n // it must come before any call to findViewById method\n //setContentView(R.layout.activity_main);\n\n setContentView(R.layout.main_view);\n final DinnerModel dinnerModel = ((DinnerPlannerApplication) this.getApplication()).getDinnerModel();\n ProgressDialog progress = new ProgressDialog(this);\n progress.setMessage(\"Loading...\");\n\n ((DinnerPlannerApplication) this.getApplication()).getBigOvenDataFetch(progress, this).execute(\"\"+numOfItemstoLoad);//sakel\n // Creating the view class instance\n MainView mainView = new MainView(findViewById(R.id.view_activity_main), dinnerModel);\n\n //findViewById(R.id.header).setOnClickListener(this);\n findViewById(R.id.btnCreate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (v.getId() == R.id.btnCreate) {\n if (!dinnerModel.getDishes().isEmpty()) {\n startActivity(new Intent(MainActivity.this, IngredientsActivity.class));\n } else {\n Toast warningToast = Toast.makeText(v.getContext(), \"Select some dishes\", Toast.LENGTH_LONG);\n warningToast.setGravity(Gravity.CENTER, 0, 0);\n warningToast.show();\n }\n }\n }\n });\n\n findViewById(R.id.imgbtnRefresh).setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n numOfItemstoLoad += 20;\n ProgressDialog progress = new ProgressDialog(MainActivity.this);\n progress.setMessage(\"Loading...\");\n ((DinnerPlannerApplication) MainActivity.this.getApplication()).getBigOvenDataFetch(progress, MainActivity.this).execute(\"\"+numOfItemstoLoad);//sakel\n }\n });\n }",
"public static String _butcolor_click() throws Exception{\nmostCurrent._butpatas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 101;BA.debugLine=\"butColor.Visible = False\";\nmostCurrent._butcolor.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 103;BA.debugLine=\"lblFondo.Initialize(\\\"\\\")\";\nmostCurrent._lblfondo.Initialize(mostCurrent.activityBA,\"\");\n //BA.debugLineNum = 104;BA.debugLine=\"lblFondo.Color = Colors.ARGB(30,255,94,94)\";\nmostCurrent._lblfondo.setColor(anywheresoftware.b4a.keywords.Common.Colors.ARGB((int) (30),(int) (255),(int) (94),(int) (94)));\n //BA.debugLineNum = 105;BA.debugLine=\"Activity.AddView(lblFondo,0,0,100%x,100%y)\";\nmostCurrent._activity.AddView((android.view.View)(mostCurrent._lblfondo.getObject()),(int) (0),(int) (0),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (100),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (100),mostCurrent.activityBA));\n //BA.debugLineNum = 107;BA.debugLine=\"panelPopUps_1.Initialize(\\\"\\\")\";\nmostCurrent._panelpopups_1.Initialize(mostCurrent.activityBA,\"\");\n //BA.debugLineNum = 108;BA.debugLine=\"panelPopUps_1.LoadLayout(\\\"lay_Mosquito_PopUps\\\")\";\nmostCurrent._panelpopups_1.LoadLayout(\"lay_Mosquito_PopUps\",mostCurrent.activityBA);\n //BA.debugLineNum = 110;BA.debugLine=\"lblPopUp_Descripcion.Text = \\\"A simple vista se ve\";\nmostCurrent._lblpopup_descripcion.setText(BA.ObjectToCharSequence(\"A simple vista se ve\"+anywheresoftware.b4a.keywords.Common.CRLF+\"de color negro intenso\"));\n //BA.debugLineNum = 111;BA.debugLine=\"imgPopUp.Bitmap = LoadBitmap(File.DirAssets,\\\"mosq\";\nmostCurrent._imgpopup.setBitmap((android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.LoadBitmap(anywheresoftware.b4a.keywords.Common.File.getDirAssets(),\"mosquito_Color.png\").getObject()));\n //BA.debugLineNum = 112;BA.debugLine=\"imgPopUp.Visible = True\";\nmostCurrent._imgpopup.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 113;BA.debugLine=\"Activity.AddView(panelPopUps_1, 15%x, 15%y, 70%x,\";\nmostCurrent._activity.AddView((android.view.View)(mostCurrent._panelpopups_1.getObject()),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (15),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (15),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (70),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (70),mostCurrent.activityBA));\n //BA.debugLineNum = 114;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_feeding_dashboard);\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n mListener = this;\n mContext = this;\n\n TextView schoolname = (TextView) findViewById(R.id.cookdashboard_schoolname);\n //schoolname.setText(mSharedPreferences.getString(\"school\", \"\"));\n TextView profilename = (TextView) findViewById(R.id.profile_name);\n //profilename.setText(mSharedPreferences.getString(\"username\", \"\"));\n\n CardView mLunchCard = (CardView) findViewById(R.id.lunch_card);\n mLunchCard.setOnClickListener(this);\n\n CardView mBreakfastCard = (CardView) findViewById(R.id.breakfast_card);\n mBreakfastCard.setOnClickListener(this);\n\n TextView mDate = (TextView) findViewById(R.id.dashboard_date);\n mDate.setText(setDate());\n HttpGetRequests task = new HttpGetRequests(GET_TOTAL_ATTENDANCE, this, this);\n task.execute(REQUEST_COOK_DASHBOARD);\n }",
"public void onClick(View v) {\n switch (v.getId()) {\n case R.id.tb:\n\n String data = toggle.getText().toString();\n if (data.equals(\"On\")) {\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"A1 \" + passw);\n\n boolean b = db.insertOrUpdate_Activation_status(\"1\");\n if (b) {\n\n Toast.makeText(getApplicationContext(), \"1\", Toast.LENGTH_LONG).show();\n }\n }\n } else {\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"A0 \" + passw);\n boolean b = db.insertOrUpdate_Activation_status(\"0\");\n if (b) {\n Toast.makeText(getApplicationContext(), \"0\", Toast.LENGTH_LONG).show();\n }\n }\n\n }\n // Toast.makeText(getApplicationContext(),data,Toast.LENGTH_LONG).show();\n\n break;\n case R.id.deactivate:\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"D \" + passw);\n }\n\n break;\n case R.id.sn:\n dailog();\n\n break;\n case R.id.son:\n\n dailog_son();\n break;\n case R.id.cn:\n dailog_remove();\n\n break;\n case R.id.cp:\n\n\n break;\n case R.id.msts:\n\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"MSTS \" + passw);\n }\n\n break;\n case R.id.rst:\n db.opendb();\n String stt=db.get_De_status();\n if(stt!=null && stt.length()>0) {\n int st = Integer.parseInt(stt);\n if (st == 0) {\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"RST \" + passw);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Deactivate 1st and try Again\", Toast.LENGTH_LONG).show();\n }\n }\n\n break;\n\n case R.id.dab:\n dailod_dab();\n\n break;\n case R.id.sts:\n db.opendb();\n mobno = db.get_Mobileno();\n\n if (mobno != null && mobno.length() > 0) {\n sendSMS(mobno, \"STS\");\n }\n\n break;\n case R.id.ss:\n db.opendb();\n mobno = db.get_Mobileno();\n\n if (mobno != null && mobno.length() > 0) {\n sendSMS(mobno, \"SIG\");\n }\n\n break;\n case R.id.ver:\n db.opendb();\n mobno = db.get_Mobileno();\n\n if (mobno != null && mobno.length() > 0) {\n sendSMS(mobno, \"VER\");\n }\n\n break;\n case R.id.save:\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"SAVE \" + passw);\n }\n\n break;\n }\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.jcy_ldl_main_detail);\n\t\tdal = new ManpowerDetailDAL(this, new Handler());\n\t\tback = (Button) findViewById(R.id.back);\n\t\tsave = (Button) findViewById(R.id.save);\n\t\tsfz = (EditText) findViewById(R.id.sfz);\n\t\tif(getIntent().getStringExtra(\"sfz\")!=null){\n\t\t\tsfz.setText(getIntent().getStringExtra(\"sfz\"));\n\t\t}\n\t\tl_jyzt=(LinearLayout) findViewById(R.id.l_jyzt);\n\t\tl_jyzt.setVisibility(View.GONE);\n\t\tname = (EditText) findViewById(R.id.name);\n\t\txb = (EditText) findViewById(R.id.xb);\n\t\tcsrq = (EditText) findViewById(R.id.csrq);\n\t\tlxdh = (EditText) findViewById(R.id.lxdh);\n\t\twhcd = (EditText) findViewById(R.id.whcd);\n\t\thkxz = (EditText) findViewById(R.id.hkxz);\n\t\tmz = (EditText) findViewById(R.id.mz);\n\t\tzzmm = (EditText) findViewById(R.id.zzmm);\n\t\tjtzz = (EditText) findViewById(R.id.jtzz);\n\t\tjyzt = (EditText) findViewById(R.id.jyzt);\n\t\tback.requestFocus();\n\t\tback.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCreateLdlDetail.this.finish();\n\t\t\t}\n\t\t});\n\t\tinitAllEdittext();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_scheduled_trip_details);\n\n down = findViewById(R.id.abcs);\n\n status = findViewById(R.id.status);\n pickupDetails = findViewById(R.id.pick_up_details);\n droplist = findViewById(R.id.drop_contacts_list);\n dateTime = findViewById(R.id.date_time);\n\n// fare = findViewById(R.id.price);\n// v_details = findViewById(R.id.view_details);\n item_list = findViewById(R.id.itemlsit);\n// expens_amt_whizyycharge = findViewById(R.id.fare_sexp_whizzycharge);\n pickupAddress = findViewById(R.id.pic_up_address);\n dropAddress = findViewById(R.id.drop_off_address);\n mFirebaseInstance = FirebaseDatabase.getInstance();\n mFirbaseCancelOptions = mFirebaseInstance.getReference(\"schedule_trip_cancellation_reasons_customer\");\n item_delive = findViewById(R.id.item_del);\n if (!Utils.isNetConnected(ScheduleTripDetailsActivity.this))\n Utils.showDialog(ScheduleTripDetailsActivity.this);\n findViewById(R.id.cancel_req).setOnClickListener(view -> {\n// if (started) {\n// youCannotCancelTripPopup();\n// } else {\n if (!Utils.isNetConnected(ScheduleTripDetailsActivity.this))\n Utils.showDialog(ScheduleTripDetailsActivity.this);\n else\n getCancelOptionsFireBase();\n// }\n });\n\n item_delive.setOnClickListener(view -> {\n if (item_list.getVisibility() == View.VISIBLE) {\n item_list.setVisibility(View.GONE);\n down.setImageResource(R.drawable.down_icon);\n } else {\n item_list.setVisibility(View.VISIBLE);\n down.setImageResource(R.drawable.up_icon);\n\n\n }\n });\n findViewById(R.id.edit).setOnClickListener(view -> {\n if (!Utils.isNetConnected(ScheduleTripDetailsActivity.this))\n Utils.showDialog(ScheduleTripDetailsActivity.this);\n else\n callScheduleFun();\n });\n\n\n orderid = getIntent().getStringExtra(Constants.IntentKey.KEY_ORDER_ID);\n System.out.println(\"orderidddd\" + orderid);\n\n\n (findViewById(R.id.back)).setOnClickListener(v -> finish());\n\n\n new GetTripSummaryTask(ScheduleTripDetailsActivity.this).execute();\n }",
"@Override\n\tpublic void onClick(View v) {\n \tint Id=v.getId();\n\t\tif(Id == R.id.btnSh)\n\t\t{\n\t\t\tQueryHolidaysInfo(1);\n\t\t\tbaHolidays.notifyDataSetChanged();\n\t\t\tbtnSh.setBackgroundResource(R.drawable.btn_sd_sed);\n\t\t\tbtnLh.setBackgroundResource(R.drawable.btn_ld);\n\t\t\tbtnWh.setBackgroundResource(R.drawable.btn_wd);\n\t\t\tbtnSt.setBackgroundResource(R.drawable.btn_td);\n\t\t\treturn;\n\t\t}\n\t\tif(Id == R.id.btnLh)\n\t\t{\n\t\t\tQueryHolidaysInfo(2);\n\t\t\tbaHolidays.notifyDataSetChanged();\n\t\t\tbtnSh.setBackgroundResource(R.drawable.btn_sd);\n\t\t\tbtnLh.setBackgroundResource(R.drawable.btn_ld_sed);\n\t\t\tbtnWh.setBackgroundResource(R.drawable.btn_wd);\n\t\t\tbtnSt.setBackgroundResource(R.drawable.btn_td);\n\t\t}\n\t\tif(Id == R.id.btnWh)\n\t\t{\n\t\t\tQueryHolidaysInfo(4);\n\t\t\tbaHolidays.notifyDataSetChanged();\n\t\t\tbtnSh.setBackgroundResource(R.drawable.btn_sd);\n\t\t\tbtnLh.setBackgroundResource(R.drawable.btn_ld);\n\t\t\tbtnWh.setBackgroundResource(R.drawable.btn_wd_sed);\n\t\t\tbtnSt.setBackgroundResource(R.drawable.btn_td);\n\t\t}\n\t\t\n\t\tif(Id == R.id.btnSt)\n\t\t{\n\t\t\tQueryHolidaysInfo(5);\n\t\t\tbaHolidays.notifyDataSetChanged();\n\t\t\tbtnSh.setBackgroundResource(R.drawable.btn_sd);\n\t\t\tbtnLh.setBackgroundResource(R.drawable.btn_ld);\n\t\t\tbtnWh.setBackgroundResource(R.drawable.btn_wd);\n\t\t\tbtnSt.setBackgroundResource(R.drawable.btn_td_sed);\n\t\t}\n\t\tif(Id == R.id.btnOK)\n\t\t{\n\t\t\tif(SaveDrInfo())\n\t\t\t{\n\t\t\t\tIntent intented =getIntent();\n\t\t\t\tsetResult(RESULT_OK, intented);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t\tif(Id == R.id.btnCancel)\n\t\t{\n\t\t\tfinish();\n\t\t}\n\t}",
"private void m50426u() {\n this.f30722U = ((Activity) this.f30720S).getLayoutInflater().inflate(C10232R.layout.bottom_sheet_add_card_1, null);\n this.f30726Y = (CardView) this.f30722U.findViewById(C10232R.C10236id.cvPay);\n this.f30735f0 = (TextView) this.f30722U.findViewById(C10232R.C10236id.tvButtonText);\n this.f30742m0 = (LinearLayout) this.f30722U.findViewById(C10232R.C10236id.llBack);\n this.f30743n0 = (ImageView) this.f30722U.findViewById(C10232R.C10236id.ivCardType);\n this.f30729a0 = (CardEditText) this.f30722U.findViewById(C10232R.C10236id.edCardNumber);\n this.f30743n0 = (ImageView) this.f30722U.findViewById(C10232R.C10236id.ivCardType);\n this.f30727Z = (ProgressBar) this.f30722U.findViewById(C10232R.C10236id.pgCall);\n this.f30729a0 = (CardEditText) this.f30722U.findViewById(C10232R.C10236id.edCardNumber);\n this.f30729a0.setImeOptions(5);\n this.f30737h0 = (EditText) this.f30722U.findViewById(C10232R.C10236id.edCardCvv);\n this.f30736g0 = (EditText) this.f30722U.findViewById(C10232R.C10236id.edCardExpiryDate);\n this.f30738i0 = (EditText) this.f30722U.findViewById(C10232R.C10236id.edNameOnCard);\n this.f30740k0 = (LinearLayout) this.f30722U.findViewById(C10232R.C10236id.llQuestionExpiry);\n this.f30741l0 = (LinearLayout) this.f30722U.findViewById(C10232R.C10236id.llQuestionCvv);\n this.f30731b0 = (TextView) this.f30722U.findViewById(C10232R.C10236id.tvCardError);\n this.f30732c0 = (TextView) this.f30722U.findViewById(C10232R.C10236id.tvDateError);\n this.f30733d0 = (TextView) this.f30722U.findViewById(C10232R.C10236id.tvCvvError);\n this.f30734e0 = (TextView) this.f30722U.findViewById(C10232R.C10236id.tvNameError);\n this.f30725X = (ScrollView) this.f30722U.findViewById(C10232R.C10236id.svMain);\n this.f30751v0 = this.f30722U.findViewById(C10232R.C10236id.flBg2);\n this.f30745p0 = this.f30722U.findViewById(C10232R.C10236id.vBg1);\n this.f30746q0 = this.f30722U.findViewById(C10232R.C10236id.viewEmpty);\n this.f30747r0 = this.f30722U.findViewById(C10232R.C10236id.toolTipCvv);\n this.f30748s0 = this.f30722U.findViewById(C10232R.C10236id.toolTipExpiry);\n this.f30749t0 = this.f30722U.findViewById(C10232R.C10236id.ivCloseExpiry);\n this.f30750u0 = this.f30722U.findViewById(C10232R.C10236id.ivCloseCvv);\n this.f30739j0 = (AppCompatCheckBox) this.f30722U.findViewById(C10232R.C10236id.cbStoreForFuture);\n this.f30742m0.setOnClickListener(this);\n this.f30726Y.setOnClickListener(this);\n this.f30740k0.setOnClickListener(this);\n this.f30741l0.setOnClickListener(this);\n this.f30745p0.setOnClickListener(this);\n this.f30746q0.setOnClickListener(this);\n this.f30749t0.setOnClickListener(this);\n this.f30750u0.setOnClickListener(this);\n this.f30729a0.setOnFocusChangeListener(this);\n this.f30737h0.setOnFocusChangeListener(this);\n this.f30736g0.setOnFocusChangeListener(this);\n this.f30738i0.setOnFocusChangeListener(this);\n this.f30735f0.setText(m50415o());\n m50366E();\n m50369H();\n this.f30728a.mo23608d(this.f30738i0);\n this.f30723V = new C5665a(this.f30720S, C10232R.style.DialogStyle);\n this.f30723V.setOnShowListener(new C11096a());\n AppCompatCheckBox appCompatCheckBox = this.f30739j0;\n int i = this.f30717P;\n appCompatCheckBox.setVisibility((i == 2 || i == 3) ? 8 : 0);\n this.f30723V.setCancelable(false);\n this.f30723V.setContentView(this.f30722U);\n this.f30723V.getWindow().setSoftInputMode(19);\n this.f30728a.mo23540a(this.f30713I0, C11644i.f33174Q4);\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tsetContentView(R.layout.usb_test_ex);\n\n\t\tmBtn1Start = (Button) findViewById(R.id.USB_EX_ITEM1_Start_ID);\n\t\tmBtn1Stop = (Button) findViewById(R.id.USB_EX_ITEM1_Stop_ID);\n\t\tmBtn2Start = (Button) findViewById(R.id.USB_EX_ITEM2_Start_ID);\n\t\tmBtn2Stop = (Button) findViewById(R.id.USB_EX_ITEM2_Stop_ID);\n\t\tmBtn3Start = (Button) findViewById(R.id.USB_EX_ITEM3_Start_ID);\n\t\tmBtn3Stop = (Button) findViewById(R.id.USB_EX_ITEM3_Stop_ID);\n\t\tmBtn4Start = (Button) findViewById(R.id.USB_EX_ITEM4_Start_ID);\n\t\tmBtn4Stop = (Button) findViewById(R.id.USB_EX_ITEM4_Stop_ID);\n\t\tmBtn5Start = (Button) findViewById(R.id.USB_EX_ITEM5_Start_ID);\n\t\tmBtn5Stop = (Button) findViewById(R.id.USB_EX_ITEM5_Stop_ID);\n\t\tmBtn6Start = (Button) findViewById(R.id.USB_EX_ITEM6_Start_ID);\n\t\tmBtn6Stop = (Button) findViewById(R.id.USB_EX_ITEM6_Stop_ID);\n\t\tmBtn7Start = (Button) findViewById(R.id.USB_EX_ITEM7_Start_ID);\n\t\tmBtn7Stop = (Button) findViewById(R.id.USB_EX_ITEM7_Stop_ID);\n\t\t\n\t\tif(mBtn1Start == null\n \t\t|| mBtn1Stop == null\n \t\t|| mBtn2Start == null\n \t\t|| mBtn2Stop == null\n \t\t|| mBtn3Start == null\n \t\t|| mBtn3Stop == null\n \t\t|| mBtn4Start == null\n \t\t|| mBtn4Stop == null\n \t\t|| mBtn5Start == null\n \t\t|| mBtn5Stop == null\n \t\t|| mBtn6Start == null\n \t\t|| mBtn6Stop == null\n \t\t|| mBtn7Start == null\n \t\t|| mBtn7Stop == null\n \t\t)\n {\n \tLog.e(TAG, \"clocwork worked...\");\t\n \t\t//not return and let exception happened.\n }\n\t\tbtnList.add(mBtn1Start);\n\t\tbtnList.add(mBtn1Stop);\n\t\tbtnList.add(mBtn2Start);\n\t\tbtnList.add(mBtn2Stop);\n\t\tbtnList.add(mBtn3Start);\n\t\tbtnList.add(mBtn3Stop);\n\t\tbtnList.add(mBtn4Start);\n\t\tbtnList.add(mBtn4Stop);\n\t\tbtnList.add(mBtn5Start);\n\t\tbtnList.add(mBtn5Stop);\n\t\tbtnList.add(mBtn6Start);\n\t\tbtnList.add(mBtn6Stop);\n\t\tbtnList.add(mBtn7Start);\n\t\tbtnList.add(mBtn7Stop);\n\n\t\tfor(Button btn : btnList)\n\t\t{\n\t\t\tbtn.setOnClickListener(this);\n\t\t}\t\n\t\t\n\t\tmainHandler = new Handler() {\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase OP_IN_PROCESS: {\t\t\t\t\t\n\t\t\t\t\tif (null == mDialogSearchProgress) {\n\t\t\t\t\t\tmDialogSearchProgress = new ProgressDialog(\n\t\t\t\t\t\t\t\tUsbEx.this);\n\t\t\t\t\t\tif (null != mDialogSearchProgress) {\n\t\t\t\t\t\t\tmDialogSearchProgress\n\t\t\t\t\t\t\t\t\t.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\t\t\t\t\t\t\tString text = \"Stopping, please wait ...\";\n\t\t\t\t\t\t\tmDialogSearchProgress.setMessage(text);\n\t\t\t\t\t\t\tmDialogSearchProgress.setTitle(\"USB Ex Test\");\n\t\t\t\t\t\t\tmDialogSearchProgress.setCancelable(false);\n\t\t\t\t\t\t\tmDialogSearchProgress.show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLog.e(TAG, \"new mDialogSearchProgress failed\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase OP_FINISH:\t\t\t\t\t\n\t\t\t\t\tif (null != mDialogSearchProgress) {\n\t\t\t\t\t\tmDialogSearchProgress.dismiss();\n\t\t\t\t\t\tmDialogSearchProgress = null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase UPDATAT_MSG:\n\t\t\t\t\tif(mMsg >= UsbIF.MSG_LEN ||mMsg < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tShowDialog(\"Message\", \"Ghost Msg = \"+mMsg);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tShowDialog(\"Message\", UsbIF.MSG[mMsg]);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase ERROR_MSG:\n\t\t\t\t ShowDialog(\"Error\", \"Execute Command Error.\");\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\tif(!UsbIF.NativeInit()) {\n\t\t Toast.makeText(this, \"Phone not support this module\", Toast.LENGTH_SHORT).show();\n\t\t finish();\n\t\t}\n\t}",
"@SuppressLint({\"ResourceAsColor\", \"SetTextI18n\"})\n private void setUi()\n {\n totalTextView.setText(String.valueOf(orederObj.getTotal()));\n paymentStatusTextView.setText(orederObj.getPaymentStatus());\n paymentMethodTextView.setText(orederObj.getPaymentMode());\n\n String title=orederObj.getOrderId();\n orderIdTextView.setText(title);\n\n\n //Toast.makeText(getContext(),orederObj.getStatus(),Toast.LENGTH_LONG).show();\n String status=orederObj.getStatus();\n Toast.makeText(getContext(),status,Toast.LENGTH_LONG).show();\n if(status.equals(\"Preparing\"))\n {\n //setting button color\n readyButton.setBackground(getResources().getDrawable(buttonstyle2));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n preparingButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.button_blue);\n doneButton.setTextColor(R.color.button_blue);\n\n\n }\n else if(status.equals(\"Ready\"))\n {\n //ui change part\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.button_blue);\n\n //db part\n\n\n }\n else if(status.equals(\"Done\"))\n {\n //ui change part\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle1));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.white);\n\n\n\n }\n\n if(orederObj.getPaymentStatus().equals(\"Paid\"))\n {\n paymetButton.setText(\"Paid\"); //this check and update\n }\n\n\n //this is to butoon\n paymetButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //paymetButton.setText(\"Paid\");\n if(orederObj.getPaymentStatus().equals(\"Paid\"))\n {\n Toast.makeText(getActivity(),\"Already Paid\",Toast.LENGTH_LONG).show();\n\n }\n else\n {\n updatePayment(orederObj.getOrderId(),\"Paid\");\n paymetButton.setText(\"Paid\"); //this check and update\n }\n\n\n }\n });\n\n\n //button to handle cancel part\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n cancelOrder(orederObj.getOrderId(),\"Cancel\");\n }\n });\n\n\n ///oder handling part\n\n preparingButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n readyButton.setBackground(getResources().getDrawable(buttonstyle2));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n preparingButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.button_blue);\n doneButton.setTextColor(R.color.button_blue);\n\n updateStatus(orederObj.getOrderId(),\"Preparing\");\n\n\n }\n });\n\n\n readyButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.button_blue);\n\n updateStatus(orederObj.getOrderId(),\"Ready\");\n\n\n }\n });\n\n\n doneButton.setOnClickListener(new View.OnClickListener() {\n @RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onClick(View view) {\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle1));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.white);\n\n updateStatus(orederObj.getOrderId(),\"Done\");\n orederObj.setStatus(\"Done\"); //setting to object\n storeHistory(orederObj); //this is calling the function\n\n }\n });\n\n\n //this is to set the food list of order\n List<String> fName=orederObj.convertFoodName();\n List<String> fQty=orederObj.convertFoodQty();\n\n String name=\"Order List:\\n\";\n int i;\n for (i=0;i<fName.size();i++)\n {\n name=name+\"\\t\"+fName.get(i)+\"\\t:\"+fQty.get(i)+\"\\n\";\n }\n\n foodName.setText(name);\n\n\n String note=\"Note:\";\n //this part is to set the note\n if(orederObj.getNotes()!=null)\n {\n note=note+orederObj.getNotes();\n noteTextView.setText(note);\n }\n else\n {\n note=note+\"Empty\";\n noteTextView.setText(note);\n }\n\n\n\n\n }",
"public void call()\n\t{\n\n\t\t\n\t\t\n\t\twadds=(EditText)findViewById(R.id.wadd);\n\t\tcomadd=(EditText)findViewById(R.id.compadd);\n\t\tepah=(EditText)findViewById(R.id.epah);\n\t\tnn=(EditText)findViewById(R.id.nname);\n\t\tbir=(EditText)findViewById(R.id.birth);\n\t\taniv=(EditText)findViewById(R.id.ani);\n\t\teorgwc=(EditText)findViewById(R.id.eorgcw);\n\t\teorgoc=(EditText)findViewById(R.id.eorgco);\n\t\teorgwp=(EditText)findViewById(R.id.eorgpw);\n\t\teorgop=(EditText)findViewById(R.id.eorgpo);\n\t\tepaw=(EditText)findViewById(R.id.epaw);\n\t\tepao=(EditText)findViewById(R.id.epao);\n\t\taddmoreorg=(Button)findViewById(R.id.borg);\n\t\taddmorepa=(Button)findViewById(R.id.bpa);\n\t\trempah=(Button)findViewById(R.id.bpah);\n\t\tremorgw=(Button)findViewById(R.id.borgw);\n\t\tremorgo=(Button)findViewById(R.id.borgo);\n\t\trempaw=(Button)findViewById(R.id.bpaw);\n\t\trempao=(Button)findViewById(R.id.bpao);\n\t\tspah=(Spinner)findViewById(R.id.spah);\n\t\tsorgw=(Spinner)findViewById(R.id.sorgw);\n\t\tsorgo=(Spinner)findViewById(R.id.sorgo);\n\t\tspaw=(Spinner)findViewById(R.id.spaw);\n\t\tspao=(Spinner)findViewById(R.id.spao);\n\t\t\n\t\t\t\n\t\t//Organization spinner for work\n\t\t\n\t\tadapterorgw = new ArrayAdapter(this,android.R.layout.simple_spinner_item);\n\t\tadapterorgw.add(\"Work\");\n\t\tadapterorgw.add(\"Home\");\n\t\tadapterorgw.add(\"Other\");\n\t\tadapterorgw.add(\"Custom\");\n\t\tsorgw.setAdapter(adapterorgw);\n\t\t\n\t\t//Organization spinner for other\n\t\t\n\t\tadapterorgo = new ArrayAdapter(this,android.R.layout.simple_spinner_item);\n\t\tadapterorgo.add(\"Other\");\n\t\tadapterorgo.add(\"Work\");\n\t\tadapterorgo.add(\"Home\");\n\t\tadapterorgo.add(\"Custom\");\n\t\tsorgo.setAdapter(adapterorgo);\n\t\t\n\t\t//Postal address spinner for home\n\t\t\n\t\tadapterpah = new ArrayAdapter(this,android.R.layout.simple_spinner_item);\n\t\tadapterpah.add(\"Home\");\n\t\tadapterpah.add(\"Work\");\n\t\tadapterpah.add(\"Other\");\n\t\tadapterpah.add(\"Custom\");\n\t\tspah.setAdapter(adapterpah);\n\t\t\n\t\t//Postal Address spinner for work\n\t\t\n\t\tadapterpaw = new ArrayAdapter(this,android.R.layout.simple_spinner_item);\n\t\tadapterpaw.add(\"Work\");\n\t\tadapterpaw.add(\"Other\");\n\t\tadapterpaw.add(\"Custom\");\n\t\tspaw.setAdapter(adapterpaw);\n\t\t\n\t\t//Postal Address spinner for other\n\t\t\n\t\tadapterpao = new ArrayAdapter(this,android.R.layout.simple_spinner_item);\n\t\tadapterpao.add(\"Other\");\n\t\tadapterpao.add(\"Work\");\n\t\tadapterpao.add(\"Custom\");\n\t\tspao.setAdapter(adapterpao);\n\t\t\n\t\tflag2=1;\t\n\t\t//Add More fields button for org\n\t\t\n\t\taddmoreorg.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t if(flag2==1)\n\t\t\t\t{\n\t\t\t\t\teorgoc.setVisibility(0);\n\t\t\t\t eorgop.setVisibility(0);\n\t\t\t\t sorgo.setVisibility(0);\n\t\t\t\t remorgo.setVisibility(0);\n\t\t\t \n\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\t\n\t\t//remove org field for work\n\t\t\n\t\tremorgw.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t\n\t\t\t\teorgwc.setVisibility(View.GONE);\n\t\t\t eorgwp.setVisibility(View.GONE);\n\t\t\t sorgw.setVisibility(View.GONE);\n\t\t\t remorgw.setVisibility(View.GONE);\n\t\t\t flag2=0;\n\t\t\t flag2=1;\n\t\t\t flag2=2;\n\t\t\t \t\t\t \t\t\t\t\n\t\t\t}\n\t\t});\t\n\t\t\n\t\t//remove org field for other\n\t\t\n\t\tremorgo.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t\n\t\t\t\teorgoc.setVisibility(View.GONE);\n\t\t\t eorgop.setVisibility(View.GONE);\n\t\t\t sorgo.setVisibility(View.GONE);\n\t\t\t remorgo.setVisibility(View.GONE);\n\t\t\t flag2=0;\n\t\t\t flag2=1;\n\t\t\t flag2=2;\n\t\t\t \t\t\t \t\t\t\t\n\t\t\t}\n\t\t});\t\n\t\t\n\t\tflag3=1;\t\n\t\t//Add More fields button for org\n\t\t\n\t\taddmorepa.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t if(flag3==1)\n\t\t\t\t{\n\t\t\t epaw.setVisibility(0);\n\t\t\t spaw.setVisibility(0);\n\t\t\t rempaw.setVisibility(0);\n\t\t\t \n\t\t\t flag3=2;\n\t\t\t\t}\n\t\t\t\telse if(flag3==2)\n\t\t\t\t{\n\t\t\t epao.setVisibility(0);\n\t\t\t spao.setVisibility(0);\n\t\t\t rempao.setVisibility(0);\n\t\t\t flag3=1;\n\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t\t});\n\t\t//remove postal add field for home\n\t\t\n\t\trempah.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tepah.setVisibility(View.GONE);\n\t\t\t spah.setVisibility(View.GONE);\n\t\t\t rempah.setVisibility(View.GONE);\n\t\t\t flag3=0;\n\t\t\t flag3=1;\n\t\t\t flag3=2;\n\t\t\t \t\t\t \t\t\t\t\n\t\t\t}\n\t\t});\t\n\t\t//remove postal address field for work\n\t\t\n\t\trempaw.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tepaw.setVisibility(View.GONE);\n\t\t\t spaw.setVisibility(View.GONE);\n\t\t\t spaw.setVisibility(View.GONE);\n\t\t\t rempaw.setVisibility(View.GONE);\n\t\t\t flag3=0;\n\t\t\t flag3=1;\n\t\t\t flag3=2;\n\t\t\t \t\t\t \t\t\t \t\t\t\t\n\t\t\t}\n\t\t});\t\n\t\t\n\t\t//remove postal address field for other\n\t\t\n\t\trempao.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t\n\t\t\t\tepao.setVisibility(View.GONE);\n\t\t\t spao.setVisibility(View.GONE);\n\t\t\t rempao.setVisibility(View.GONE);\n\t\t\t flag3=0;\n\t\t\t flag3=1;\n\t\t\t flag3=2;\n\t\t\t \t\t\t \t\t\t \t\t\t\t\n\t\t\t}\n\t\t});\t\n\t\t\n\t\t\n\t\t\n\t\tsorgw.setOnItemSelectedListener(\n\t\t\t\tnew AdapterView.OnItemSelectedListener() {\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> a,View view,int position,long id)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(position==3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t final Dialog dialog5 = new Dialog(AddContact.this);\n\n\t\t dialog5.setContentView(R.layout.dialog);\n\t\t dialog5.setTitle(\"Custom Label Name\");\n\n\n\t\t dialog5.setCancelable(true);\n\t\t //set up button\n\t\t Button button = (Button) dialog5.findViewById(R.id.ok);\n\t\t ecust=(EditText)dialog5.findViewById(R.id.ecustom);\n\n\t\t button.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) \n\t {\n\t\t \t addNewSpinnerItem5();\n\t dialog5.dismiss();\n\t \n\t }\n\n\t\t });\n\t\t Button button1 = (Button) dialog5.findViewById(R.id.cancel);\n\n\t\t button1.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) {\n\n\t\t finish();\n\n\t\t }\n\n\t\t });\n\n\t\t //now that the dialog is set up, it's time to show it \n\n\t\t dialog5.show();\n\n\t\t }\n\n\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t });\n\t\t\n\t\tsorgo.setOnItemSelectedListener(\n\t\t\t\tnew AdapterView.OnItemSelectedListener() {\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> a,View view,int position,long id)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(position==3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t final Dialog dialog6 = new Dialog(AddContact.this);\n\n\t\t dialog6.setContentView(R.layout.dialog);\n\t\t dialog6.setTitle(\"Custom Label Name\");\n\n\n\t\t dialog6.setCancelable(true);\n\t\t //set up button\n\t\t Button button = (Button) dialog6.findViewById(R.id.ok);\n\t\t ecust=(EditText)dialog6.findViewById(R.id.ecustom);\n\n\t\t button.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) \n\t\t {\n\t\t \t addNewSpinnerItem6();\n\t dialog6.dismiss();\n\t \n\t }\n\n\t\t });\n\t\t Button button1 = (Button) dialog6.findViewById(R.id.cancel);\n\n\t\t button1.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) {\n\n\t\t finish();\n\n\t\t }\n\n\t\t });\n\n\t\t //now that the dialog is set up, it's time to show it \n\n\t\t dialog6.show();\n\n\t\t }\n\n\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t });\n\t\tspah.setOnItemSelectedListener(\n\t\t\t\tnew AdapterView.OnItemSelectedListener() {\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> a,View view,int position,long id)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(position==3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t final Dialog dialog4 = new Dialog(AddContact.this);\n\n\t\t dialog4.setContentView(R.layout.dialog);\n\t\t dialog4.setTitle(\"Custom Label Name\");\n\n\n\t\t dialog4.setCancelable(true);\n\t\t //set up button\n\t\t Button button = (Button) dialog4.findViewById(R.id.ok);\n\t\t ecust=(EditText)dialog4.findViewById(R.id.ecustom);\n\n\t\t button.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) \n\t\t {\n\t\t \t addNewSpinnerItem4();\n\t dialog4.dismiss();\n\t \n\t }\n\n\t\t });\n\t\t Button button1 = (Button) dialog4.findViewById(R.id.cancel);\n\n\t\t button1.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) {\n\n\t\t finish();\n\n\t\t }\n\n\t\t });\n\n\t\t //now that the dialog is set up, it's time to show it \n\n\t\t dialog4.show();\n\n\t\t }\n\n\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t });\n\t\tspaw.setOnItemSelectedListener(\n\t\t\t\tnew AdapterView.OnItemSelectedListener() {\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> a,View view,int position,long id)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(position==2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t final Dialog dialog7 = new Dialog(AddContact.this);\n\n\t\t dialog7.setContentView(R.layout.dialog);\n\t\t dialog7.setTitle(\"Custom Label Name\");\n\n\n\t\t dialog7.setCancelable(true);\n\t\t //set up button\n\t\t Button button = (Button) dialog7.findViewById(R.id.ok);\n\t\t ecust=(EditText)dialog7.findViewById(R.id.ecustom);\n\n\t\t button.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) \n\t\t {\n\t\t \t addNewSpinnerItem7();\n\t dialog7.dismiss();\n\t \n\t }\n\n\t\t });\n\t\t Button button1 = (Button) dialog7.findViewById(R.id.cancel);\n\n\t\t button1.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) {\n\n\t\t finish();\n\n\t\t }\n\n\t\t });\n\n\t\t //now that the dialog is set up, it's time to show it \n\n\t\t dialog7.show();\n\n\t\t }\n\n\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t });\n\t\tspao.setOnItemSelectedListener(\n\t\t\t\tnew AdapterView.OnItemSelectedListener() {\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> a,View view,int position,long id)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(position==2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t final Dialog dialog8 = new Dialog(AddContact.this);\n\n\t\t dialog8.setContentView(R.layout.dialog);\n\t\t dialog8.setTitle(\"Custom Label Name\");\n\n\n\t\t dialog8.setCancelable(true);\n\t\t //set up button\n\t\t Button button = (Button) dialog8.findViewById(R.id.ok);\n\t\t ecust=(EditText)dialog8.findViewById(R.id.ecustom);\n\n\t\t button.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) \n\t\t {\n\t\t \t addNewSpinnerItem8();\n\t dialog8.dismiss();\n\t \n\t }\n\n\t\t });\n\t\t Button button1 = (Button) dialog8.findViewById(R.id.cancel);\n\n\t\t button1.setOnClickListener(new OnClickListener() {\n\n\t\t public void onClick(View v) {\n\n\t\t finish();\n\n\t\t }\n\n\t\t });\n\n\t\t //now that the dialog is set up, it's time to show it \n\n\t\t dialog8.show();\n\n\t\t }\n\n\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t });\n\t\t\n data= new DataBaseHelper(this);\n\t\tCursor c1=data.getDataLastName(name);\n\t\tSystem.out.println(\"MYyyyyyyyyyyyyy\"+name);\n\t\twhile(c1.moveToNext())\n\t\t{\n\t\t\tid=c1.getInt(0);\n\t\t\tlname=c1.getString(1);\n\t\t\tSystem.out.println(\"IDDDDDD.....\"+id);\n\t\t\tSystem.out.println(\"LNAme.....\"+lname);\n\t\t}\n\t\tc1.close();\n\t\tbir.setOnTouchListener(new OnTouchListener()\n\t {\n\t \n\t\t\tpublic boolean onTouch(View arg0, MotionEvent arg1)\n\t\t\t{\n\n\t showDialog(DATE_DIALOG_ID);\n\t\t\t\treturn false;\n\t\t\t}\n\t });\n\n\t\taniv.setOnTouchListener(new OnTouchListener()\n\t {\n\t \n\t\t\tpublic boolean onTouch(View arg0, MotionEvent arg1)\n\t\t\t{\n\n\t showDialog(DATE_DIALOG_ID);\n\t\t\t\treturn false;\n\t\t\t}\n\t });\n\n\t\t// get the current date and time\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\tupdateDisplay();\n\t\t\n\t}",
"@Override\r\n\tpublic void onClick(View v) {\n\r\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.first:\r\n\t\t\tcurrent = SHOW;\r\n\t\t\tbreak;\r\n\t\tcase R.id.sencond:\r\n\t\t\tcurrent = ADD;\r\n\t\t\tbreak;\r\n\t\tcase R.id.third:\r\n\t\t\tcurrent = CHART;\r\n\t\t\tbreak;\r\n\t\tcase R.id.ll1:\r\n\t\t\tDialogUtil dialogUtil=DialogUtil.newInstance(R.string.restore_software, R.string.restore_software_msg, new onEventOkAfter() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onOkAfter() {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tSharedUtil.putArrayString(MainActivity.this, \"list\", new TreeSet<String>());\r\n\t\t\t\t\tSharedUtil.putBoolean(MainActivity.this, AppGlobal.ALL_FLAG, false);\r\n\t\t\t\t\tSharedUtil.putBoolean(MainActivity.this, AppGlobal.WEEK_FLAG, false);\r\n\t\t\t\t\tSharedUtil.putBoolean(MainActivity.this, AppGlobal.MONTH_FLAG, false);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.ALL_AVAILABLE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.ALL_BUDGET, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.ALL_EXPENDITURE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.ALL_INCOME, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.ALL_USED, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.WEEK_AVAILABLE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.WEEK_BALANCE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.WEEK_BUDGET, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.WEEK_EXPENDITURE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.WEEK_INCOME, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.WEEK_USED, 0);\r\n\t\t\t\t\tSharedUtil.putLong(MainActivity.this, AppGlobal.WEEK_TIME, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.MONTH_AVAILABLE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.MONTH_BALANCE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.MONTH_BUDGET, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.MONTH_EXPENDITURE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.MONTH_INCOME, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.MONTH_USED, 0);\r\n\t\t\t\t\tSharedUtil.putLong(MainActivity.this, AppGlobal.MONTH_TIME, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.TODAY_EXPENDITURE, 0);\r\n\t\t\t\t\tSharedUtil.putDouble(MainActivity.this, AppGlobal.TODAY_INCOME, 0);\r\n\t\t\t\t\tSharedUtil.putLong(MainActivity.this, AppGlobal.TODAY_TIME, 0);\r\n\t\t\t\tDayDB dayDB=new DayDB(MainActivity.this);\r\n\t\t\t\tdayDB.deleteAllRows();\r\n\t\t\t\tif (dayDB!=null) {\r\n\t\t\t\t\tdayDB.close();\r\n\t\t\t\t}\r\n\t\t\t\tdl.close();\r\n\t\t\t\thost.setCurrentTab(ADD);\r\n\t\t\t\thost.setCurrentTab(SHOW);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\tdialogUtil.show(getSupportFragmentManager(), \"dialog\");\r\n\t\t\tbreak;\r\n\t\tcase R.id.ll2:\r\n\t\t\tIntent intent1 = new Intent(MainActivity.this,\r\n\t\t\t\t\tMipcaActivityCapture.class);\r\n\t\t\tintent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\tstartActivityForResult(intent1, SCAN_CODE);\r\n\t\t\tbreak;\r\n\t\tcase R.id.ll3:\r\n\t\t\tIntent intent2=new Intent(MainActivity.this,AboutActivity.class);\r\n\t\t\tstartActivity(intent2);\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tprotected void onCreate(@Nullable Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.lo_doctor_frgmnt_myeqpmnt_details);\r\n\r\n\t\tActionBar actionBar = getSupportActionBar();\r\n\t\tactionBar.setDisplayHomeAsUpEnabled(true);\r\n\t\tactionBar.setElevation(0);\r\n\t\t\r\n\t\ttvTitle = (TextView) findViewById(R.id.tv_dctr_frgmnt_eqpmnt_dtls_title);\r\n\t\ttvAmnt = (TextView) findViewById(R.id.tv_dctr_frgmnt_eqpmnt_dtls_amount);\r\n\t\ttvDate = (TextView) findViewById(R.id.tv_dctr_frgmnt_eqpmnt_dtls_date);\r\n\t\ttvQty = (TextView) findViewById(R.id.tv_dctr_frgmnt_eqpmnt_dtls_quantity);\r\n\t\ttvRate = (TextView) findViewById(R.id.tv_dctr_frgmnt_eqpmnt_dtls_rate);\r\n\t\ttvDscrptn = (TextView) findViewById(R.id.tv_dctr_frgmnt_eqpmnt_dtls_dscrptn);\r\n\r\n\t\t// Check Internet check service is running or not, If not then Start Service\r\n\t\tif(!General_Fnctns.isServiceRunning(InternetService.class, this))\r\n\t\t\tstartService(new Intent(this, InternetService.class));\r\n\t\t\r\n\t\ttvTitle.setText(getIntent().getStringExtra(TITLE_SML));\r\n\t\ttvAmnt.setText(getResources().getString(R.string.symbl_rupee) + \" \" + getIntent().getStringExtra(AMOUNT_SML));\r\n\t\ttvDate.setText(getIntent().getStringExtra(ADD_DATE_SML));\r\n\t\ttvQty.setText(getIntent().getStringExtra(QTY_SML));\r\n\t\ttvRate.setText(getResources().getString(R.string.symbl_rupee) + \" \" + getIntent().getStringExtra(RATE_SML));\r\n\t\tString strHtmlPrtclr = Html.fromHtml(getIntent().getStringExtra(DESCRIPTION_SML)).toString();\r\n\t\ttvDscrptn.setText(Html.fromHtml(strHtmlPrtclr).toString().trim());\r\n\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\t\t/** check Internet Connectivity */\n\t\t\t\t\t\t\t\t\tif (cd.isConnectingToInternet()) {\n\t\t\t\t\t\t\t\t\t\tif (SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t.getuser_id(getApplicationContext()) != \"\") {\n\t\t\t\t\t\t\t\t\t\t\tif (SharedPreference.getuser_id(\n\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext())\n\t\t\t\t\t\t\t\t\t\t\t\t\t.length() != 0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (rf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText().toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"0\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t|| rf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew GetValidOrderDateTime()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.execute();\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()) != \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!Shikha2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Pattern\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.matches(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"^[0-9 ]*$\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()))\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.numeric_validation_error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_.setError(Html.fromHtml(\"<font color='#ff0000'>\"+getString(R.string.numeric_validation_error)+</font> \"));\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_.requestFocus();\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setError(getString(R.string.numeric_validation_error));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint points = Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(rf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!Global_variable.min_lp_to_redeem\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.min_lp_to_redeem);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!Global_variable.max_lp_to_redeem\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.max_lp_to_redeem);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext())) >= Global_variable.min_lp_to_redeem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& points <= Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()))) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!one\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (points <= Global_variable.max_lp_to_redeem) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!two\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (points <= Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()))) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!three\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew GetValidOrderDateTime()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.execute();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!four\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_You_dont),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!five\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_Your_Loyalty)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.max_lp_to_redeem,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!six\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_less_than)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.min_lp_to_redeem,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!seven\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_You_dont),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\t\t\t\t\t//\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.please_login,\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method\n\t\t\t\t\t\t\t\t\t\t\t\t// stub\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}",
"private void SetupButtonCLick1() {\n _btn_PingSetup= (Button) findViewById(R.id.btn_PingSetup);\n _btn_PingSetup.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n\n /* Log.d(\"Priyanka\", \"Click is used\");\n Toast.makeText(PingTestMain.this,\"clicked\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getApplicationContext(),PingTestSetup.class);\n intent.putExtra(\"ACT\", \"Going to set Ping Test\");\n startActivity(intent);\n */\n\n Intent Main_Save_Intent = new Intent(getApplicationContext(),PingTestSetup.class);\n Bundle Main_Save_Bundle = new Bundle();\n Main_Save_Bundle.putSerializable(\"Play_TC_List\",Play_TC_List);\n Main_Save_Intent.putExtras(Main_Save_Bundle);\n startActivity(Main_Save_Intent);\n\n\n }\n });\n\n }",
"public void intialiseControls()\n\t{\n\t\t//getting ids add_stock_inventory\n\t\tllOrderListView \t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llordersheet);\n\t\tllItemHeader\t \t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llItemHeader);\n\t\tllApproved\t \t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llApproved);\n\t\tllCollectedQty\t \t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llCollectedQty);\n\t\tivCollectedSep\t \t\t=\t(ImageView)llOrderSheet.findViewById(R.id.ivCollectedSep);\n\t\tivApprovedSep\t \t\t=\t(ImageView)llOrderSheet.findViewById(R.id.ivApprovedSep);\n\t\trlWareHouse\t\t\t\t=\t(RelativeLayout) llOrderSheet.findViewById(R.id.rlWareHouse);\n\t\tbtnOrdersheetVerify\t\t=\t(Button)llOrderSheet.findViewById(R.id.btnOrdersheetVerify);\n\t\tbtnPrint_stock_details\t\t=\t(Button)llOrderSheet.findViewById(R.id.btnPrint_stock_details);\n\t\tllOrdersheetVerify\t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llOrdersheetVerify);\n\t\tllPrintStockDetail\t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llPrintStockDetail);\n\t\tlvItems\t\t\t\t\t=\t(ListView)llOrderSheet.findViewById(R.id.lvItems);\n\t\t\n\t\ttvOrdersheetHeader\t\t=\t(TextView)llOrderSheet.findViewById(R.id.tvOrdersheetHeader);\n\t\ttvNoItemFoundBase\t\t=\t(TextView)llOrderSheet.findViewById(R.id.tvNoItemFound);\n\t\t\n\t\tllTopLayout\t\t\t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llTopLayout);\n\t\t\n\t\tetSearch\t\t\t=\t(EditText)llOrderSheet.findViewById(R.id.etSearch);\n\t\tetSearch.setHintTextColor(Color.WHITE);\n\t\tivSearchCross\t\t\t=\t(ImageView)llOrderSheet.findViewById(R.id.ivSearchCross);\n\t\t\n\t\tllHeader \t\t=\t(LinearLayout)llOrderSheet.findViewById(R.id.llHeader);\n\t\t\n\t\ttvTotalQtUN\t\t=\t(TextView)llOrderSheet.findViewById(R.id.tvTotalQtUN);\n\t\ttvVanQty\t\t=\t(TextView)llOrderSheet.findViewById(R.id.tvVanQty);\n\t\tivSeprator\t\t=\t(ImageView)llOrderSheet.findViewById(R.id.ivSeprator);\n\t\tivSepUN\t\t\t=\t(ImageView)llOrderSheet.findViewById(R.id.ivSepUN);\n\t\t\n\t\tllTopLayout.setVisibility(View.VISIBLE);\n\t\t\n\t\ttvOrdersheetHeader.setVisibility(View.VISIBLE);\n\t\tllPrintStockDetail.setVisibility(View.VISIBLE);\n\t\ttvOrdersheetHeader.setTypeface(AppConstants.Roboto_Condensed_Bold);\n\t\ttvDescription=(TextView) llOrderSheet.findViewById(R.id.tvDescription);\n\t\ttvQty= (TextView) llOrderSheet.findViewById(R.id.tvQty);\n\t\ttvApprovedQty=(TextView) llOrderSheet.findViewById(R.id.tvApprovedQty);\n\t\ttvCollectedQty=(TextView) llOrderSheet.findViewById(R.id.tvCollectedQty);\n\t\t\n refreshLoad();\n\t}",
"public void DataPackPurchaseCommonActivity(AndroidDriver<AndroidElement> driver, String methodName, String platformVersion, String ActualSMS, int i) throws NoSuchElementException, MalformedURLException, InterruptedException, Exception, IOException {\n\t\t \n\t\t AllPackCommonActivity Activity= new AllPackCommonActivity();\n \n\t\t //Integer GPPointsBP = Integer.valueOf((driver.findElementById(\"com.portonics.mygp:id/txtGpPoint\").getText()).replaceAll(\"\\\\D+\",\"\"));\n\t\t\n\t\t String PhoneNumber = driver.findElementById(\"com.portonics.mygp:id/UserPhoneNumber\").getText();\n\t\n\t\t boolean RatePlanPrepaid = Arrays.asList(Prepaid).contains(PhoneNumber);\n\t\t boolean RatePlanPostpaid = Arrays.asList(Postpaid).contains(PhoneNumber);\n\t\t boolean RatePlanXplore = Arrays.asList(Xplore).contains(PhoneNumber);\n\t\t \n\t\t if(RatePlanPrepaid==true) {\n\t\t\t ServiceClass = \"prepaid\";\n\t\t\t System.out.println(ServiceClass);\n\t\t }\n\t\t \n\t\t if(RatePlanPostpaid==true) {\n\t\t\t ServiceClass = \"postpaid\";\n\t\t\t System.out.println(ServiceClass);\n\t\t }\n\t\t \n\t\t if(RatePlanXplore==true) {\n\t\t\t ServiceClass = \"Xplore\";\n\t\t\t System.out.println(ServiceClass);\n\t\t }\n\t \n\t\t if (ServiceClass.equals(\"prepaid\")) {\n\n\t\t\t driver.findElementById(\"com.portonics.mygp:id/UserValidTill\").click();\n\t\t\t Thread.sleep(6000);\n\t\t\t \n\t\t\t Float AccountBalanceBP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t Float AccountBalanceBPF = Float.valueOf(AccountBalanceBP)/100;\n\t\t\t \n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Internet']\").click();\n\t\t\t Integer InternetVolumeBP = Integer.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t \n\t\t\t if (platformVersion.equals(\"6\")) {\n\t \t driver.findElementByAccessibilityId(\"Navigate up\").click();\n\t }\n\t else {\n\t \t driver.navigate().back();\n\t }\t \n\t\t\t \n\t\t\t Map<String, Object> command = ImmutableMap.of(\"command\", \"am start -a android.intent.action.VIEW -d \\\"mygp://pack/internet/\"+ InternetPacks[i][1] +\"\\\" com.portonics.mygp\");\n\t\t\t driver.executeScript(\"mobile:shell\", command);\n\t\t\n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Confirm Purchase']\").click();\n\t\t\t Activity.takeGeneralScreenshot(driver, Location, 0);\n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Go to Home']\").click();\n\t\t\t Activity.takeReportedScreenshot(driver, methodName);\n\t\t\t \n\t\t\t driver.findElementById(\"com.portonics.mygp:id/UserInternetBalanceDetails\").click();\n\t\t\t Thread.sleep(4000);\n\t\t\t Integer InternetVolumeAP = Integer.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t int InternetVolume_With_Bonus_MB= InternetVolumeAP-InternetVolumeBP;\n\t\t\t \n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Emergency']\").click();\n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Main Account']\").click();\n\t\t\t Thread.sleep(6000);\n\t\t\t \n\t\t\t Float AccountBalanceAP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t Float AccountBalanceAPF = Float.valueOf(AccountBalanceAP)/100;\n\t \n\t\t\t Float BalanceDeducted= AccountBalanceBPF-AccountBalanceAPF;\n\t\t\t Double BalanceDeductedF = Math.round(BalanceDeducted * 100.0) / 100.0;\n\t\t\t \n\t\t\t String csv = \"Prepaid.csv\";\n\t\t CSVWriter writer = new CSVWriter(new FileWriter(csv,true));\n\t\t \n\t\t String [] Reportheader = \"Service class,Product Nanme,MSISDN,Product ID,Date,MA Before Purchase,MA After Purchase,Charged,DA value before purchase,DA value after purchase,DA value changed,Expected volume,Activation SMS,Bonus SMS\".split(\",\");\n\t\t String [] Purchaserecord = {ServiceClass, InternetPacks[i][0], PhoneNumber, \"\", PurchaseTime.toString(), String.valueOf(AccountBalanceBPF), String.valueOf(AccountBalanceAPF), String.valueOf(BalanceDeductedF), String.valueOf(InternetVolumeBP), String.valueOf(InternetVolumeAP), String.valueOf(InternetVolume_With_Bonus_MB)};\n\t\t \n\t\t List<String[]> entries = new ArrayList<>();\n\t\t \n\t\t entries.add(Purchaserecord);\n\t\t writer.writeAll(entries); \n\t\t writer.flush();\n\t\t writer.close();\n\t\t } \n\t\t \n\t\t else {\n\t\t\t \n\t\t\t driver.findElementById(\"com.portonics.mygp:id/UserValidTill\").click();\n\t\t\t Thread.sleep(8000);\n\t\t\t \n\t\t\t Float AccountBalanceBP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/tvPostPaidAvailable\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t Float AccountBalanceBPF = Float.valueOf(AccountBalanceBP)/100;\n\t\t\t \n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Internet']\").click();\n\t\t\t Integer InternetVolumeBP = Integer.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t \n\t\t\t if (platformVersion.equals(\"6\")) {\n\t \t driver.findElementByAccessibilityId(\"Navigate up\").click();\n\t }\n\t else {\n\t \t driver.navigate().back();\n\t }\t \n\t\t\t \n\t\t\t Map<String, Object> command = ImmutableMap.of(\"command\", \"am start -a android.intent.action.VIEW -d \\\"mygp://pack/internet/\"+ InternetPacks[i][1] +\"\\\" com.portonics.mygp\");\n\t\t\t driver.executeScript(\"mobile:shell\", command);\n\t\t\n\t\t\t Thread.sleep(2000);\n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Confirm Purchase']\").click();\n\t\t\t Activity.takeGeneralScreenshot(driver, Location, 0);\n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Go to Home']\").click();\n\t\t\t Activity.takeReportedScreenshot(driver, methodName);\n\t\t\t \n\t\t\t driver.findElementById(\"com.portonics.mygp:id/UserInternetBalanceDetails\").click();\n\t\t\t Thread.sleep(4000);\n\t\t\t Integer InternetVolumeAP = Integer.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t int InternetVolume_With_Bonus_MB= InternetVolumeAP-InternetVolumeBP;\n\t\t\t \n\t\t\t driver.findElementByXPath(\"//android.widget.TextView[@text='Main Account']\").click();\n\t\t\t Thread.sleep(8000);\n\t\t\t \n\t\t\t Float AccountBalanceAP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/tvPostPaidAvailable\").getText().replaceAll(\"\\\\D+\",\"\"));\n\t\t\t Float AccountBalanceAPF = Float.valueOf(AccountBalanceAP)/100;\n\t \n\t\t\t Float BalanceDeducted= AccountBalanceBPF-AccountBalanceAPF;\n\t\t\t Double BalanceDeductedF = Math.round(BalanceDeducted * 100.0) / 100.0;\n\t\t\t \n\t\t\t String csv = \"Postpaid.csv\";\n\t\t CSVWriter writer = new CSVWriter(new FileWriter(csv,true));\n\t\t \n\t\t String [] Reportheader = \"Service class,Product Nanme,MSISDN,Product ID,Date,MA Before Purchase,MA After Purchase,Charged,DA value before purchase,DA value after purchase,DA value changed,Expected volume,Activation SMS,Bonus SMS\".split(\",\");\n\t\t String [] Purchaserecord = {ServiceClass, InternetPacks[i][0], PhoneNumber, \"\", PurchaseTime.toString(), String.valueOf(AccountBalanceBPF), String.valueOf(AccountBalanceAPF), String.valueOf(BalanceDeductedF), String.valueOf(InternetVolumeBP), String.valueOf(InternetVolumeAP), String.valueOf(InternetVolume_With_Bonus_MB)};\n\t\t \n\t\t List<String[]> entries = new ArrayList<>();\n\t\t \n\t\t entries.add(Purchaserecord);\n\t\t writer.writeAll(entries); \n\t\t writer.flush();\n\t\t writer.close();\n\t\t }\n\n\t\t \n\t \n//\t\t driver.findElementById(\"com.portonics.mygp:id/UserValidTill\").click();\n//\t\t \n//\t\t Float AccountBalanceBP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/tvPostPaidAvailable\").getText().replaceAll(\"\\\\D+\",\"\"));\n//\t\t Thread.sleep(4000);\n//\t\t Float AccountBalanceBPF = Float.valueOf(AccountBalanceBP)/100;\n\t\t \n\t\t \n\t\t \n\t\t //driver.findElementById(\"com.portonics.mygp:id/UserValidTill\").click();\n\t\t \n\t\t //Thread.sleep(3000);\n\t\t \n//\t\t Float AccountBalanceBP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n//\t\t Float AccountBalanceBPF = Float.valueOf(AccountBalanceBP)/100;\n\n\t\n\t\t \n\t\t //Activity.scrollDownForData(driver, InternetPacks, i,0);\n\t\n\t\t \n\n//\t\t Activity.LogOutActivity(driver);\n//\t\t Activity.Login(driver,MSISDN, 1);\n\t\t \n//\t\t Integer GPPointsAP = Integer.valueOf((driver.findElementById(\"com.portonics.mygp:id/txtGpPoint\").getText()).replaceAll(\"\\\\D+\",\"\"));\n//\t\t int GPPoints = GPPointsAP-GPPointsBP;\n\t\t \n\t\t \n\t\t \n\t\t // \n\t\t \n\t\t \n//\t\t Float AccountBalanceAP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/tvPostPaidAvailable\").getText().replaceAll(\"\\\\D+\",\"\"));\n//\t\t Thread.sleep(4000);\n//\t\t Float AccountBalanceAPF = Float.valueOf(AccountBalanceAP)/100;\n//\t\t \n//\t\t System.out.println(AccountBalanceAPF);\n\t\t \n//\t\t Float AccountBalanceAP = Float.valueOf(driver.findElementById(\"com.portonics.mygp:id/UserBalance\").getText().replaceAll(\"\\\\D+\",\"\"));\n//\t\t Float AccountBalanceAPF = Float.valueOf(AccountBalanceAP)/100;\n\t\t \n//\t\t Float BalanceDeducted= AccountBalanceBPF-AccountBalanceAPF;\n//\t\t Double BalanceDeductedF = Math.round(BalanceDeducted * 100.0) / 100.0;\n\t\t \n\t\t \n\t\t //System.out.println(BalanceDeductedF);\n\t\t \n\t\t // String SMS= new AllPackCommonActivity().ReadSMS(driver, platformVersion);\n\t\t\n // String SMS= \"1GB Internet started successfully with 10% bonus. Total fee 88.99Tk, valid 7 days (Activation + 6 days). To Check Internet balance & validity click mygp.li/check or dial *121*1*4#. To Cancel, dial *121*3041#.\";\n\t\t\n\t\t // Assert.assertEquals(SMS, driver.findElementByXPath(\"(//android.widget.FrameLayout[@content-desc=\\\"Message from GP Internet\\\"])[4]/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\").getText());\n\t\t // Assert.assertEquals(ActualSMS, SMS);\n\t\t \n//\t\t Pattern Data_Volume = Pattern.compile(InternetPacks[i][1]);\n//\t Pattern Price = Pattern.compile(InternetPacks[i][4]);\n//\t Pattern Validity = Pattern.compile(InternetPacks[i][5]);\n//\t //Pattern GP_Points = Pattern.compile(InternetPacks[i][6]);\n//\t Pattern Bonus_Percent = Pattern.compile(InternetPacks[i][3]);\n//\t Pattern DynamicLink = Pattern.compile(\"mygp.li/check\");\n\t \n//\t Matcher Data_VolumeMatcher = Data_Volume.matcher(SMS);\n//\t Matcher PriceMatcher = Price.matcher(SMS);\n//\t Matcher ValidityMatcher = Validity.matcher(SMS);\n//\t //Matcher GP_PointsMatcher = GP_Points.matcher(String.valueOf(GPPoints));\n//\t Matcher Bonus_PercentMatcher = Bonus_Percent.matcher(SMS);\n//\t Matcher DynamicLinkMatcher = DynamicLink.matcher(SMS);\n\t \n\t \n \n//\t while (Data_VolumeMatcher.find()) \n//\t {\n//\t System.out.println(\"Data Volume: \"+Data_VolumeMatcher.group()); \n//\t }\n//\t \n//\t while (PriceMatcher.find()) \n//\t {\n//\t System.out.println(\"Price: \"+PriceMatcher.group());\n//\t }\n//\t \n//\t while (ValidityMatcher.find()) \n//\t {\n//\t System.out.println(\"Validity: \"+ValidityMatcher.group());\n//\t }\n//\t \n//\t while (Bonus_PercentMatcher.find()) \n//\t {\n//\t System.out.println(\"Bonus_%: \"+Bonus_PercentMatcher.group());\n//\t }\n\t \n//\t while (GP_PointsMatcher.find()) \n//\t {\n//\t System.out.println(\"GP_Points: \"+GP_PointsMatcher.group());\n//\t }\n\t \n//\t while (DynamicLinkMatcher.find()) \n//\t {\n//\t System.out.println(\"MyGP Dynamic Link: \"+DynamicLinkMatcher.group());\n//\t }\n\t \n\t //System.out.println(\"InternetVolume With Bonus MB: \" + InternetVolume_With_Bonus_MB); \n\t \n\t //System.out.println(\"SMS Text: \" + SMS); \n\t \n\t \n\t //System.out.println(Data_VolumeMatcher);\n\t \n\t\n \n //System.out.println(\"Pack Name: \" + InternetPacks[i][0]);\n \n//\t \tcsvWriter.flush();\n//\t \tcsvWriter.close();\n\n\t\t // System.out.println(driver.findElementByXPath(\"(//android.widget.FrameLayout[@content-desc=\\\"Message from GP Internet\\\"])[4]/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\").getText()); \t \n\t }",
"@SuppressLint({\"MissingPermission\", \"SetTextI18n\"})\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.user_area_activity);\n\n\n\n //-----------------Toolbar act as the action bar--------------------------------------------\n toolbar = findViewById(R.id.toolbar);\n // Sets the Toolbar to act as the ActionBar for this Activity window.\n // Make sure the toolbar exists in the activity and is not null\n setSupportActionBar(toolbar);\n\n\n //----------------Device Serial Number------------------------------------------------------\n btCameraDeviceSerial = findViewById(R.id.btCameraDeviceSerial);\n btDeviceSerialGallery = findViewById(R.id.btGallerySelect);\n ivDeviceSerialNumber = findViewById(R.id.IvDevice_serial_number);\n etDeviceSerialNumber = findViewById(R.id.etDeviceSerialNumber);\n tfDeviceSerialNumber = findViewById(R.id.tfDeviceSerialNumber);\n btBarCode = findViewById(R.id.btBarCode);\n\n\n //---------------Vehicle Plate Number-------------------------------------------------------\n etVehiclePlateNumber = findViewById(R.id.etVehiclePlateNumber);\n tfVehiclePlateNumber = findViewById(R.id.tfVehiclePlateNumber);\n\n //---------------Spinner Device Model-------------------------------------------------------\n spDeviceModel = findViewById(R.id.spDeviceModel);\n arrayDeviceType = new ArrayList<>();\n getDeviceSpinner(); // To get all elements to spinner from database\n spDeviceModel.setOnItemSelectedListener(this);\n\n\n //--------------Vehicle Make and Model------------------------------------------------------\n etVehicleMake = findViewById(R.id.etVehicleMake);\n etVehicleModel = findViewById(R.id.etVehicleModel);\n tfVehicleMake = findViewById(R.id.tfVehicleMake);\n tfVehicleModel = findViewById(R.id.tfVehicleModel);\n\n\n\n\n //--------Date and time---------------------------------------------------------------------\n ivCustomDate = findViewById(R.id.ivCustomDate);\n tvSelectedDate = findViewById(R.id.tvSelectedDate);\n tvSelectedTime = findViewById(R.id.tvSelectedTime);\n cbDateTime = findViewById(R.id.cbDateTime);\n\n\n\n //--------Odometer number-------------------------------------------------------------------\n etOdometer = findViewById(R.id.etOdometer);\n tfOdometer = findViewById(R.id.tfOdometer);\n\n\n\n //---------Task type spinner----------------------------------------------------------------\n spTaskType = findViewById(R.id.spTaskType);\n arrayTask = new ArrayList<>();\n getTaskSpinner(); // To get all elements to spinner from database\n spTaskType.setOnItemSelectedListener(this);\n\n\n //--------Fleet ID--------------------------------------------------------------------------\n etFleet = findViewById(R.id.etFleet);\n tfFleet = findViewById(R.id.tfFleet);\n\n\n //--------Company Name----------------------------------------------------------------------\n spCustomer = findViewById(R.id.spCustomer);\n arrayCustomer = new ArrayList<>();\n getCustomerSpinner(); // To get all elements to spinner from database\n spCustomer.setOnItemSelectedListener(this);\n\n\n\n //--------GPS Location----------------------------------------------------------------------\n ivGPS = findViewById(R.id.ivGPS);\n\n\n\n //------To get technical id & name from login page while login------------------------------\n Intent getIntent = getIntent();\n id = getIntent.getIntExtra(\"tec ID\", -1);\n name = getIntent.getStringExtra(\"name\");\n ActionBar actionBar = getSupportActionBar(); // To getActionBar();\n if (actionBar != null)\n {\n actionBar.setTitle(name);\n }\n\n //----------Send Data Floating Action Button -----------------------------------------------\n FABsend = findViewById(R.id.FABsend);\n\n\n\n //---------This thread to get time and date from system every sound-------------------------\n Thread t = new Thread() {\n @Override\n public void run() {\n try {\n while (!isInterrupted()) {\n Thread.sleep(1000);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n long dateAndTime = System.currentTimeMillis(); // Get date and time in millis sound\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\"); // Set date format how it well display in text view\n\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"kk:mm:ss\"); // Set time format how it well display in text view\n\n String dateString = dateFormat.format(dateAndTime); // Set date format in string\n String timeString = timeFormat.format(dateAndTime); // Set time format in string\n\n appDate = dateString;\n appTime = timeString;\n\n //tvCurrentDate.setText(dateString); // Set date string in text view\n //tvCurrentTime.setText(timeString); // Set time string in text view\n\n\n //----------------------To refresh GPS every one sound--------------\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n locationListener = new LocationListener() {\n @SuppressLint({\"SetTextI18n\"})\n @Override // To get latitude and longitude from GPS\n public void onLocationChanged(Location location) {\n if(location != null)\n {\n ivGPS.setImageResource(R.drawable.ic_gps_on);\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n }\n else\n {\n ivGPS.setImageResource(R.drawable.ic_gps_off);\n }\n }\n\n @Override\n public void onStatusChanged(String provider, int status, Bundle extras) {\n\n }\n\n @Override\n public void onProviderEnabled(String provider) {\n\n }\n\n @Override // To open GPS setting when GPS in close in phone\n public void onProviderDisabled(String provider) {\n ivGPS.setImageResource(R.drawable.ic_gps_off);\n }\n };\n\n if(locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER))\n {\n // To update GPS location ever 1000 millisecond when it move 0 distance\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000, 0, locationListener);\n }\n else\n {\n // To update GPS location ever 1000 millisecond when it move 0 distance\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0, locationListener);\n }\n\n }\n });\n }\n } catch (InterruptedException e) {\n Toast.makeText(UserAreaActivity.this, \"Error get time\", Toast.LENGTH_LONG).show(); // If something waring happened\n }\n }\n };\n t.start();\n\n Day = 24*60*60*1000; // To count one day\n OneYears = (Day * 365); // To count one yeas => 365 is number of days in one year\n\n\n\n\n //-------------------Custom Date Button-----------------------------------------------------\n ivCustomDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Calendar date = Calendar.getInstance();\n\n year = date.get(Calendar.YEAR);\n month = date.get(Calendar.MONTH);\n day = date.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(UserAreaActivity.this, UserAreaActivity.this, year, month, day);\n datePickerDialog.getDatePicker().setMinDate(date.getTimeInMillis() - OneYears);\n datePickerDialog.getDatePicker().setMaxDate(date.getTimeInMillis());\n datePickerDialog.show();\n\n\n }\n });\n\n\n //----------To hide and show current date or custom date------------------------------------\n cbDateTime.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n if(cbDateTime.isChecked())\n {\n Toast.makeText(UserAreaActivity.this, \"Current Date & Time\", Toast.LENGTH_SHORT).show();\n\n // To hide custom date button with selected date and time text view\n ivCustomDate.setVisibility(View.GONE);\n tvSelectedDate.setVisibility(View.GONE);\n tvSelectedTime.setVisibility(View.GONE);\n\n\n }\n else\n {\n Toast.makeText(UserAreaActivity.this, \"Custom Date & Time\", Toast.LENGTH_SHORT).show();\n\n // To show custom date button with selected date and time text view\n ivCustomDate.setVisibility(View.VISIBLE);\n tvSelectedDate.setVisibility(View.VISIBLE);\n tvSelectedTime.setVisibility(View.VISIBLE);\n\n }\n }\n });\n\n\n\n\n //-------------Camera button in device serial number----------------------------------------\n btCameraDeviceSerial.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n invokeCameraSerialNumber();\n }\n });\n\n //---------------Gallery button in device serial number-------------------------------------\n btDeviceSerialGallery.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selectImagesDeviceSerialNubmer();\n }\n });\n\n //-------------Barcode button in device serial number---------------------------------------\n btBarCode.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(UserAreaActivity.this, ScanActivity.class);\n startActivity(intent);\n }\n });\n\n FABsend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n progressDialog = new ProgressDialog(UserAreaActivity.this);\n progressDialog.setMessage(\"Loading...\");\n progressDialog.show();\n hideKeyboard(UserAreaActivity.this);\n\n if(checkEmptyEditText(etDeviceSerialNumber, tfDeviceSerialNumber, \"Empty Serial number !\") &&\n checkLengthDeviceSerialEditText(etDeviceSerialNumber, tfDeviceSerialNumber, \"10 Digit only !\") &&\n\n checkEmptyEditText(etVehiclePlateNumber, tfVehiclePlateNumber, \"Empty Vehicle plate !\") &&\n checkLengthPlateNumber(etVehiclePlateNumber, tfVehiclePlateNumber, \"No more then 10 digit !\") &&\n\n\n checkEmptyEditText(etOdometer, tfOdometer, \"Empty Odometer number !\") &&\n checkOdometerNumber(etOdometer,tfOdometer, \"No more then 8 digit !\") &&\n\n checkEmptyEditText(etVehicleMake, tfVehicleMake, \"Empty Vehicle make !\") &&\n checkEmptyEditText(etVehicleModel, tfVehicleModel, \"Empty Vehicle model !\") &&\n checkVehicleModel(etVehicleModel, tfVehicleModel, \"4 digit only !\") &&\n\n checkSpinner(TaskTypePostion, spTaskType,\"Select Task Type !\") &&\n checkSpinner(DeviceModelPostion, spDeviceModel,\"Select Device Model !\") &&\n checkSpinner(CustomerPostion, spCustomer, \"Select Customer Name !\") &&\n\n checkGPS(latitude, longitude, \"Refresh to get GPS location\"))\n {\n\n\n\n\n String deviceSerialNumber = etDeviceSerialNumber.getText().toString();\n String vehiclePlateNumber = etVehiclePlateNumber.getText().toString();\n String odoMeter = etOdometer.getText().toString();\n String vehicleMake = etVehicleMake.getText().toString();\n int vehicleModel = Integer.parseInt(etVehicleModel.getText().toString());\n String timeInSend, dataInSend, fleetId;\n\n if(etFleet.getText().toString().isEmpty()) // To check fleet id\n {\n fleetId = \"null\";\n }\n else\n {\n fleetId = etFleet.getText().toString();\n }\n\n if(cbDateTime.isChecked()) // To check current date or select date\n {\n Toast.makeText(UserAreaActivity.this, appDate + \"--------\" + appTime, Toast.LENGTH_LONG).show();\n timeInSend = appTime;\n dataInSend = appDate;\n }\n else\n {\n Toast.makeText(UserAreaActivity.this, appSelectDate + \"--------\" + appSelectTime, Toast.LENGTH_LONG).show();\n timeInSend = appSelectTime;\n dataInSend = appSelectDate;\n }\n\n\n Response.Listener<String> responseListener = new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonResponse = new JSONObject(response);\n boolean success = jsonResponse.getBoolean(\"success\");\n if (success)\n {\n etDeviceSerialNumber.setText(\"\"); // Empty\n spDeviceModel.setSelection(0); // set default selection\n etVehiclePlateNumber.setText(\"\"); // Empty\n etOdometer.setText(\"\"); // Empty\n etVehicleMake.setText(\"\"); // Empty\n etVehicleModel.setText(\"\"); // Empty\n etFleet.setText(\"\"); // Empty\n\n Toast.makeText(UserAreaActivity.this, \"OK !\", Toast.LENGTH_LONG).show();\n progressDialog.dismiss();\n }\n else\n {\n Toast.makeText(UserAreaActivity.this, \"Cannot Send \", Toast.LENGTH_LONG).show();\n progressDialog.dismiss();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n };\n\n\n UserAreaRequest userAreaRequest = new UserAreaRequest(id, deviceSerialNumber,vehiclePlateNumber,CustomerPostion, odoMeter, fleetId, TaskTypePostion, DeviceModelPostion,vehicleMake,vehicleModel, latitude, longitude, dataInSend, timeInSend, responseListener);\n RequestQueue queue = Volley.newRequestQueue(UserAreaActivity.this);\n queue.add(userAreaRequest);\n Toast.makeText(UserAreaActivity.this, \"Send\", Toast.LENGTH_LONG).show();\n }\n else\n {\n progressDialog.dismiss();\n }\n\n\n }\n });\n\n\n }",
"public void init_bottom_view() {\n\n username_txt = view.findViewById(R.id.username_txt);\n username_txt.setText(data_item.getName());\n\n\n bottom_age = view.findViewById(R.id.bottom_age);\n\n\n if(!data_item.getBirthday().equals(\"\"))\n bottom_age.setText(\", \"+data_item.getBirthday());\n\n\n bottom_job_txt=view.findViewById(R.id.bottom_job_txt);\n if(data_item.getJob_title().equals(\"\") & !data_item.getCompany().equals(\"\")){\n\n bottom_job_txt.setText(data_item.getJob_title());\n\n }else if(data_item.getCompany().equals(\"\") && !data_item.getJob_title().equals(\"\") ){\n\n bottom_job_txt.setText(data_item.getJob_title());\n\n }\n else if(data_item.getCompany().equals(\"\") && data_item.getJob_title().equals(\"\") ){\n view.findViewById(R.id.job_layout).setVisibility(View.GONE);\n }\n else {\n bottom_job_txt.setText(data_item.getJob_title()+\" at \"+data_item.getSchool());\n\n }\n\n\n bottom_location_text=view.findViewById(R.id.bottom_location_txt);\n bottom_location_text.setText(data_item.getLocation());\n\n bottom_about_txt=view.findViewById(R.id.bottom_about_txt);\n if(data_item.getAbout().equals(\"\")){\n bottom_about_txt.setVisibility(View.GONE);\n }\n bottom_about_txt.setText(data_item.getAbout());\n\n\n bottom_report_txt=view.findViewById(R.id.bottom_report_txt);\n bottom_report_txt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Report_User_alert();\n }\n });\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsuper.setContentView(R.layout.activity_addps_xqyz);\r\n\t\tbtnBack = (Button) findViewById(R.id.btnBack);\r\n\t\tbtnBack.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tAddPsXqyzActivity.this.finish();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.btnSendPs = (MyTextButton) findViewById(R.id.btnSendPs);\r\n\t\t// this.btnSendPs.setFocusable(true);\r\n\t\t// this.btnSendPs.setFocusableInTouchMode(true);\r\n\t\t// this.btnSendPs.requestFocus();\r\n\t\t// this.btnSendPs.requestFocusFromTouch();\r\n\t\tthis.btnSendPs.setEnabled(false);\r\n\t\tthis.btnSendPs.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tAddPsXqyzActivity.this.btnSendPs.setEnabled(false);\r\n\t\t\t\tAddPsXqyzActivity.this.uploadPsIndustry();\r\n\t\t\t}\r\n\t\t});\r\n\t\tqymcEditText = (EditText) findViewById(R.id.qymcEt);\r\n\t\tfzrEditText = (EditText) findViewById(R.id.fzrEt);\r\n\t\tlxfsEditText = (EditText) findViewById(R.id.lxfsEt);\r\n\t\tmRegionSpinner = (Spinner) findViewById(R.id.regionSpin);\r\n\t\tnczEditText = (EditText) findViewById(R.id.nczEt);\r\n\t\tzhuEditText = (EditText) findViewById(R.id.zhuEt);\r\n\t\tniuEditText = (EditText) findViewById(R.id.niuEt);\r\n\t\tyangEditText = (EditText) findViewById(R.id.yangEt);\r\n\t\ttuEditText = (EditText) findViewById(R.id.tuEt);\r\n\t\tyslEditText = (EditText) findViewById(R.id.yslEt);\r\n\t\tfspflEditText = (EditText) findViewById(R.id.fspflEt);\r\n\t\tcodEditText = (EditText) findViewById(R.id.codEt);\r\n\t\tadEditText = (EditText) findViewById(R.id.adEt);\r\n\t\ttpEditText = (EditText) findViewById(R.id.tpEt);\r\n\t\ttnEditText = (EditText) findViewById(R.id.tnEt);\r\n\t\tthis.xTv = (TextView) findViewById(R.id.xTv);\r\n\t\tthis.yTv = (TextView) findViewById(R.id.yTv);\r\n\t\tthis.btnLocation = (Button) findViewById(R.id.btnAddLocation);\r\n\t\tthis.btnLocation.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent it = new Intent(AddPsXqyzActivity.this,\r\n\t\t\t\t\t\tLocationActivity.class);\r\n\t\t\t\tAddPsXqyzActivity.this.startActivityForResult(it, 2);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// 图片\r\n\t\tthis.imageGridView = (GridView) findViewById(R.id.imageGridView);\r\n\t\tthis.projectImages = new ArrayList<ProjectImage>();\r\n\t\tthis.imageAdapter = new AddImageAdapter(this, projectImages);\r\n\t\tthis.imageGridView.setAdapter(imageAdapter);\r\n\t\tpopView = LayoutInflater.from(AddPsXqyzActivity.this).inflate(\r\n\t\t\t\tR.layout.popupwindow_camera, null);\r\n\t\tthis.imageGridView.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\tif (AddPsXqyzActivity.this.imageAdapter.getItem(position) == null) {\r\n\t\t\t\t\tif (mPopupWindow == null) {\r\n\t\t\t\t\t\tmPopupWindow = new PopupWindow(popView, DpTransform\r\n\t\t\t\t\t\t\t\t.dip2px(AddPsXqyzActivity.this, 180),\r\n\t\t\t\t\t\t\t\tDpTransform.dip2px(AddPsXqyzActivity.this, 100));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mPopupWindow.isShowing()) {\r\n\t\t\t\t\t\tmPopupWindow.dismiss();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmPopupWindow.showAsDropDown(view,\r\n\t\t\t\t\t\t\t\t-DpTransform.dip2px(AddPsXqyzActivity.this, 0),\r\n\t\t\t\t\t\t\t\tDpTransform.dip2px(AddPsXqyzActivity.this, 0));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t// 相机按钮\r\n\t\tButton btnCamera = (Button) popView.findViewById(R.id.btnCamera);\r\n\t\tbtnCamera.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tFile fileCache = ImageOptions.getCache(AddPsXqyzActivity.this);\r\n\t\t\t\tIntent intent = new Intent();\r\n\t\t\t\tintent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);\r\n\t\t\t\t// intent.addCategory(Intent.CATEGORY_DEFAULT);\r\n\t\t\t\tcurrentfile = new File(fileCache.getPath() + \"/\"\r\n\t\t\t\t\t\t+ UUID.randomUUID().toString() + \".jpg\");\r\n\t\t\t\tif (currentfile.exists()) {\r\n\t\t\t\t\tcurrentfile.delete();\r\n\t\t\t\t}\r\n\t\t\t\tUri uri = Uri.fromFile(currentfile);\r\n\t\t\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, uri);\r\n\t\t\t\tstartActivityForResult(intent, 3);\r\n\t\t\t\tmPopupWindow.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\t// 相册按钮\r\n\t\tButton btnPhoto = (Button) popView.findViewById(R.id.btnPhoto);\r\n\t\tbtnPhoto.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent it = new Intent(\r\n\t\t\t\t\t\tIntent.ACTION_PICK,\r\n\t\t\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\r\n\t\t\t\tstartActivityForResult(it, 2);\r\n\t\t\t\tmPopupWindow.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\tsetTextWatcher();\r\n\t\tlistRegions = WaterDectionary.getRegions();\r\n\t\tArrayList<String> arrayList = new ArrayList<String>();\r\n\t\tfor (Region region : listRegions) {\r\n\t\t\tif (region.getStatus()==1) {\r\n\t\t\t\tarrayList.add(\" \"+region.getName());\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (region.getStatus()==0) {\r\n\t\t\t\t\tarrayList.add(\" \"+region.getName());\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tarrayList.add(region.getName());\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(\r\n\t\t\t\tAddPsXqyzActivity.this, R.layout.simple_spinner_item, arrayList);\r\n\t\tAddPsXqyzActivity.this.mRegionSpinner.setAdapter(adapter);\r\n\t\tsetContent();\r\n\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n final Button btn_cal = (Button)findViewById(R.id.btn_get_calculator);\n final Button btn_blk = (Button)findViewById(R.id.btn_get_blank);\n final Button btn_cont = (Button)findViewById(R.id.btn_get_contacts);\n\n //Calculator Button Navigation Function\n btn_cal.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent inCal = new Intent(getApplicationContext(), GetCalculator.class);\n startActivity(inCal);\n }\n }\n );\n\n //Blank Button Navigation Function\n btn_blk.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent inCal = new Intent(getApplicationContext(), GetBlank.class);\n startActivity(inCal);\n }\n }\n );\n\n //Contacts Button Navigation Function\n btn_cont.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent inCal = new Intent(getApplicationContext(), GetContacts.class);\n startActivity(inCal);\n }\n }\n );\n\n }",
"@Override\n public void onClick(View v) {\n System.out.println(societyName + \"!!!!!!!!!!!!!!!!!!!!!!\");\n if (societyName == \"\" || societyName.equals(\"\")\n || societyName == \"null\" || societyName == null || sociList.isEmpty() || sociList.size() == 0) {\n Constants.showSnack(v,\n \"Select society!\",\n \"OK\");\n } else if (financialYr == \"\" || financialYr.equals(\"\")\n || financialYr == null || financialYr == \"null\") {\n Constants.showSnack(v,\n \"Select financial year!\",\n \"OK\");\n } else if (monthName == \"\" || monthName.equals(\"\")\n || monthName == null || monthName == \"null\") {\n Constants.showSnack(v,\n \"Select month!\",\n \"OK\");\n } else if (actionType == \"\" || actionType.equals(\"\")\n || actionType == null || actionType == \"null\") {\n Constants.showSnack(v,\n \"Select View/Upload!\",\n \"OK\");\n } else {\n\n if (actionType == \"Upload\" || actionType.equals(\"Upload\")) {\n if (selectedFile == null || selectedFile.toString() == \"null\") {\n Constants.showSnack(v,\n \"Select a file to upload!\",\n \"OK\");\n } else {\n new PostSocietyBill().execute();\n }\n\n\n } else if (actionType == \"View\"\n || actionType.equals(\"View\")) {\n System.out.println(actionType\n + \" ^^^^^^^^^^^^^^^^^^^^^^^^\");\n new ViewBill().execute();\n\n }\n }\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.buyer_main_page);\n LinearLayout l = (LinearLayout) findViewById(R.id.linearScroll);\n\n goBack = (Button) findViewById(R.id.buyerGoBackButton);\n goToCart = (Button) findViewById(R.id.goToCartButton);\n cartPrice = (TextView) findViewById(R.id.price);\n\n db = new MyDBHandler(this, null, null, 4);\n rows = db.numRows();\n\n for (int i = 0; i <= rows - 1; i++) {\n Product productToAdd;\n productToAdd = db.getRowProductData(i);\n products.add(productToAdd);\n }\n\n\n for (int i = 0; i < products.size(); i++) {\n\n TextView tv = new TextView(this);\n Button newButton = new Button(this);\n newButton.setId(i);\n\n tv.setText(products.get(i).getName());\n tv.setPadding(0, 35, 0, 0);\n tv.setTextSize(25);\n newButton.setText(\"Price: \" + Double.toString(products.get(i).getSellPrice()) + \" $\");\n newButton.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n newButton.setOnClickListener(btnclick);\n newButton.setGravity(Gravity.CENTER);\n\n l.addView(tv);\n l.addView(newButton);\n\n }\n\n //set the price of the shopping cart\n cartPrice.setText(\"$ \" + Double.toString(Math.round(instance.computeCartPrice()*100.0)/100.0));\n\n goBack.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n instance.setUserName(\"\");\n instance.getCart().clear();\n instance.getQuantityMap().clear();\n Intent k = new Intent(BuyerMainPage.this, MainActivity.class);\n startActivity(k);\n }\n });\n\n goToCart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent k = new Intent(BuyerMainPage.this, ShoppingCart.class);\n startActivity(k);\n }\n });\n\n\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tString V =\tValidate();\n\t\t\t\t\n\t\t\t\tif(V.equals(\"\"))\n\t\t\t\t\tToast.makeText(getBaseContext(), \"Data Ok\", Toast.LENGTH_LONG).show();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tAlertDialog ad = new AlertDialog.Builder(ADD2Activity.this).create();\n\t\t\t\t\tad.setTitle(\"Syntax Errorr\");\n\t\t\t\t\tad.setMessage(V);\t\t\t\t\t\n\t\t\t\t\tad.show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmydb.openDatabase();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tdata = new String[rs.getColumnCount()];\n\t\t\t\t\t\t\t\t\n\t\t\t\tfor(int i =0; i < editRow.getChildCount() ; i++)\n\t\t\t\t{\n\t\t\t\tdata[i] =((EditText)editRow.getChildAt(i)).getText().toString();\n\t\t\t\t\n\t\t\t\tif(data[i].equals(\"\"))\n\t\t\t\t\tdata[i]=\"null\";\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t data[i] = \"'\" + data[i] + \"'\";\n\t\t\t\n\t\t\t\t}//else\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}//for\n\t\t\t\t\n\t//______________________________________________________________________________\t\t\t\n\t\t\t\t\n\t\t\t\tString query= \"insert into \"+id+\" values(\";\n\t\t\t\t\n\t\t\t\tquery+=data[0];\n\t\t\t\tfor(int i =1;i<data.length;i++)\n\t\t\t\t{\n\t\t\t\t\tquery += \",\" + data[i];\n\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tquery+=\");\";\n\t\t\t\t\n\t\t\t\tSystem.out.println(query);\n\t\t\t\t\n mydb.sqldb.execSQL(query); \n\t\t\t\tmydb.sqldb.execSQL(\"create table fee\"+id.substring(3)+\"_\"+((EditText)editRow.getChildAt(0)).getText().toString().trim()+\"(\\n\" +\n \"sno integer primary key autoincrement,\\n\" +\n \"Submitted_On date,\\n\" +\n \"Amount float ); \");\n\n Toast.makeText(ADD2Activity.this, \"Record added successfully\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t\tTL.removeAllViews();\n\t\t\t\t\n\t\t\t\trs= mydb.sqldb.rawQuery(\"select * from \"+id+\";\", null);\n\t\t\t\tcreateDB();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i =0; i < editRow.getChildCount() ; i++)\n\t\t\t\t{\n\t\t\t\t((EditText)editRow.getChildAt(i)).setText(\"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsetId();\n\t\t\t\taddListen();\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View v) {\n\n int day = dp.getDayOfMonth();\n int month = dp.getMonth() + 1;\n int year = dp.getYear();\n\n int mobile = Integer.parseInt(edMobile.getText().toString());\n int size = Integer.parseInt(edSize.getText().toString());\n String name = edName.getText().toString();\n String date = \"Date is \" + day + \"/\" + month + \"/\" + year;\n String time = \"Time is \" + tp.getCurrentHour() + \":\" + tp.getCurrentMinute();\n\n String displayS = \"Hi \" + name+ \", You have reserved a \" + size + \" person(s) smoking table on \" + date + \" at \" + time + \". Your phone number is \" + mobile + \" .\";\n String displayNonS = \"Hi \" + name + \", You have reserved a \" + size + \" person(s) non-smoking table on \" + date + \" at \" + time + \". Your phone number is \" + mobile + \" .\";\n\n //Toast.makeText(MainActivity.this, \"Button Click\", Toast.LENGTH_LONG).show();\n if (!name.isEmpty() && mobile != 0 && size != 0) {\n if (cbEnabled.isChecked()) {\n Toast.makeText(MainActivity.this, displayS, Toast.LENGTH_LONG).show();\n }\n else{\n Toast.makeText(MainActivity.this, displayNonS, Toast.LENGTH_LONG).show();\n }\n tvMessage.setText(\"You have successfully booked a table.\");\n }\n else {\n tvMessage.setText(\"Your name / mobile number / size of group is/are missing. Please fill in the required fields.\");\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.category_place_holder, container, false);\n\n\n mobilel = view.findViewById(R.id.MobileButtonID);\n vehicles = view.findViewById(R.id.vehiclesID);\n propartysale = view.findViewById(R.id.PropartySale);\n propartyrent = view.findViewById(R.id.PropartyRent);\n electronichomeappliances = view.findViewById(R.id.ElectronicHomeAppliances);\n bikes = view.findViewById(R.id.BikesID);\n bugnessindag = view.findViewById(R.id.BugnessIndAg);\n more = view.findViewById(R.id.MoreID);\n\n vehicles.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goto_veichelslist(new CategoryListUpdate());\n }\n });\n\n mobilel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n\n goto_categorylist(new CategoryListUpdate());\n }\n });\n\n propartysale.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goto_propartysale(new CategoryListUpdate());\n }\n });\n\n propartyrent.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goto_rentpage(new CategoryListUpdate());\n }\n });\n\n electronichomeappliances.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goto_electronic_homeapplicants(new CategoryListUpdate());\n }\n });\n\n bikes.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goto_bikes_pages(new CategoryListUpdate());\n }\n });\n\n bugnessindag.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goto_bugness_indrestree(new CategoryListUpdate());\n }\n });\n\n more.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goto_more_page(new AllList_MainCategory());\n }\n });\n\n return view;\n }",
"private void initViews() {\n animalImageNIV = (NetworkImageView)findViewById(R.id.animal_image_niv);\n\n animalIdTV = (TextView)findViewById(R.id.animal_id_tv);\n rfidTV = (TextView)findViewById(R.id.rfid_tv);\n otherIdTV = (TextView)findViewById(R.id.other_id_tv);\n statusTV = (TextView)findViewById(R.id.status_tv);\n\n speciesTV = (TextView)findViewById(R.id.species_tv);\n sexTV = (TextView)findViewById(R.id.sex_tv);\n breedsTV = (TextView)findViewById(R.id.breeds_tv);\n dobTV = (TextView)findViewById(R.id.dob_tv);\n\n ownerTV = (TextView)findViewById(R.id.owner_tv);\n experimentTV = (TextView)findViewById(R.id.experiment_tv);\n locationCanvasLL = (LinearLayout)findViewById(R.id.location_canvas_ll);\n locLayer1TV = (TextView)findViewById(R.id.loc_layer_1_tv);\n locLayer2TV = (TextView)findViewById(R.id.loc_layer_2_tv);\n locCommentTV = (TextView)findViewById(R.id.loc_comment_tv);\n\n damCanvasLL = (LinearLayout)findViewById(R.id.dam_canvas_ll);\n damCanvasLL.setOnClickListener(this);\n damIdTV = (TextView)findViewById(R.id.dam_id_tv);\n damBreedsTV = (TextView)findViewById(R.id.dam_breeds_tv);\n damStatusTV = (TextView)findViewById(R.id.dam_status_tv);\n\n sireCanvasLL = (LinearLayout)findViewById(R.id.sire_canvas_ll);\n sireCanvasLL.setOnClickListener(this);\n sireIdTV = (TextView)findViewById(R.id.sire_id_tv);\n sireBreedsTV = (TextView)findViewById(R.id.sire_breeds_tv);\n sireStatusTV = (TextView)findViewById(R.id.sire_status_tv);\n\n recordFAB = (FloatingActionButton)findViewById(R.id.record_fab);\n recordFAB.setOnClickListener(this);\n }",
"private void initializeViews() {\n titleTV = (TextView) findViewById(R.id.displayTitle);\n typeTV = (TextView) findViewById(R.id.displayType);\n categoryTV = (TextView) findViewById(R.id.displayCategory);\n amountTV = (TextView) findViewById(R.id.displayAmount);\n partyTV = (TextView) findViewById(R.id.displayParty);\n modeTV = (TextView) findViewById(R.id.displayMode);\n dateTV = (TextView) findViewById(R.id.displayDate);\n descriptionTV = (TextView) findViewById(R.id.displayDescription);\n currencyTV = (TextView)findViewById(R.id.displayCurrency);\n\n //find all buttons\n editButton = (FloatingActionButton) findViewById(R.id.editButton);\n deleteButton = (FloatingActionButton) findViewById(R.id.deleteButton);\n\n\n }",
"protected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\t\t\n\t\tsetContentView(R.layout.track);\n\t\t\n\t\tTlist=new ArrayList<TrackReport>();\n\t\t\n\t\t\n\t\tButton btn = (Button) findViewById(R.id.GetOTP);\n\t td = (EditText) findViewById(R.id.EtRid);\n\t lv=(ListView)findViewById(R.id.listView1);\n\t \n\t adap=new ArrayAdapter<TrackReport>(this, android.R.layout.simple_list_item_1, Tlist);\n\t\t\n\t\t\n\t\tbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(TrackReportActivity.this, \"Track Report\", 2).show();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tTrackReport tr = (TrackReport)getIntent().getSerializableExtra(\"TrackReport\");\n//\t\t\t\tNGO ngo=(NGO)getIntent().getSerializableExtra(\"NGO\");\n\t\t\t\t\n\t\t\t\tString trid = td.getText().toString();\n\t\t\t\tLog.v(\"Referance ID : \", trid);\n\t\t\t\t//rid.setText(\"rid : \"+tr.getRid());\n\t\t\t\t\n\t\t\t\tif (trid.equals(\"\")) {\n\t\t\t\t\ttd.setError(\"Fill out this Field\");\n\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\tString url=WebResources.TrackReport;\n\t\t\t\tString data =\"rid=\"+trid; \n\t\t\t\tLog.v(\"Base URL : \",url+\"?\"+data);\n\t\t\t\tGetTrackCaseid getTrack= new GetTrackCaseid();\n\t\t\t\tgetTrack.execute(url+\"?\"+data);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tcid.setText(\"cid : \"+ngo.getName());\n//\t\t\t\teddesc.setText(\"About : \"+ngo.getDesc());\n//\t\t\t\tedadd.setText(\"Address : \"+ngo.getAddress());\n//\t\t\t\tedlink.setText(\"Knew More : \"+ngo.getLink());\n\t\t\t}\n\t\t});\n\t}",
"private void findViews() {\n\n serverText = (TextView) findViewById(R.id.txt_server_ip);\n portText = (TextView) findViewById(R.id.txt_port);\n startServerButton = (Button) findViewById(R.id.btnStartServer);\n stopServerButton = (Button) findViewById(R.id.btnStopSerer);\n messageButton = (Button) findViewById(R.id.btnMessage);\n clientList = (TextView) findViewById(R.id.textClientList);\n getListButton = (Button) findViewById(R.id.btnGetList);\n messageText = (TextView) findViewById(R.id.textClientMessage);\n startScreenShareButton = (Button) findViewById(R.id.btnStartScreenShare);\n stopScreenShareButton = (Button) findViewById(R.id.btnStopScreenShare);\n\n\n /*** disable some startUp Button **/\n disableSomeButton();\n\n\n /** Get Client List From The Service **/\n getListButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n\n String clientListString = MainActivity.this.serverService.getClientList().toString();\n if (clientListString != null) {\n clientList.setText(clientListString);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n });\n\n messageButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n MainActivity.this.serverService.sendMessage(\" A Sample Text To Send .....\");\n }\n });\n\n\n /** Listen onclick event of StartScreenShare Button **/\n startScreenShareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n startScreenShare();\n }\n\n\n });\n\n /** Listen onclick event of stop Screen Share Button **/\n stopScreenShareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n stopScreenShare();\n }\n });\n\n\n }",
"public void setIDsforViews(){\n\n chequingAccountTV = findViewById(R.id.chequingAccountTV);\n savingsAndTaxesTV = findViewById(R.id.savingsAndTaxesTV);\n rainyDayFunTV = findViewById(R.id.rainyDayFunTV);\n travelSavingsTv = findViewById(R.id.travelSavingsTv);\n personalDevelopmentSavingsTV = findViewById(R.id.personalDevelopmentSavingsTV);\n investmentsTV = findViewById(R.id.investmentsTV);\n primaryHomeAmountTV = findViewById(R.id.primaryHomeAmountTV);\n secondaryHomeAmountTV = findViewById(R.id.secondaryHomeAmountTV);\n\n chequingAccount = findViewById(R.id.chequingAccount);\n savingsAndTaxesAmount = findViewById(R.id.savingsAndTaxesAmount);\n rainyDayFund = findViewById(R.id.rainyDayFund);\n travelSavings = findViewById(R.id.travelSavings);\n personalDevelopmentSavings = findViewById(R.id.personalDevelopmentSavings);\n investments = findViewById(R.id.investments);\n primaryHomeAmount = findViewById(R.id.primaryHomeAmount);\n secondaryHomeAmount = findViewById(R.id.secondaryHomeAmount);\n //assetsTable = findViewById(R.id.selectedAssetOrLiabilityTable);\n\n }",
"@Override\n public void onClick(View view) {\n if(progressBar.getVisibility() == View.VISIBLE) return;\n try {\n new MySharedPreference(WidgetNewOrder.this).setFloatShared(\"total_dis_before\", (float) 0.0);\n new MySharedPreference(WidgetNewOrder.this).setIntShared(\"total_time_normal_before\", 0);\n new MySharedPreference(WidgetNewOrder.this).setIntShared(\"total_time_slow_before\", 0);\n\n new MySharedPreference(WidgetNewOrder.this).setFloatShared(\"total_dis_after\", (float) 0.0);\n new MySharedPreference(WidgetNewOrder.this).setIntShared(\"total_time_normal_after\", 0);\n new MySharedPreference(WidgetNewOrder.this).setIntShared(\"total_time_slow_after\", 0);\n\n new MySharedPreference(WidgetNewOrder.this).setIntShared(\"counter_tripTime_sec\", 0);\n new MySharedPreference(WidgetNewOrder.this).setIntShared(\"counter_tripTime_min\", 0);\n new MySharedPreference(WidgetNewOrder.this).setIntShared(\"counter_tripTime_hour\", 0);\n\n DBHelper2 db = new DBHelper2(WidgetNewOrder.this);\n db.deleteCoordsTable();\n db.deleteTimesTable();\n db.deleteSecTable();\n\n Paper.book().write(\"lastAccept\", order_id);\n } catch (Exception ex) {\n }\n Map<String, String> params = new Hashtable<String, String>();\n params.put(\"access_token\", new MySharedPreference(getApplicationContext()).getStringShared(\"access_token\"));\n params.put(\"local\", \"ara\");\n params.put(\"driver_id\", new MySharedPreference(getApplicationContext()).getStringShared(\"user_id\"));\n params.put(\"order_id\", String.valueOf(order_id));\n\n VolleyService voly_ser = new VolleyService(new IResult() {\n @Override\n public void notifySuccessPost(String response) {\n progressBar.setVisibility(View.VISIBLE);\n Gson gson = new Gson();\n usual_result res = gson.fromJson(response, usual_result.class);\n if (res.getHandle().equals(\"02\")) {\n Toast.makeText(getApplicationContext(), res.getMsg(), Toast.LENGTH_LONG).show();\n } else if (res.getHandle().equals(\"10\")) {\n //Toast.makeText(ViewDetailsOrder.this, res.getMsg(), Toast.LENGTH_LONG).show();\n new MySharedPreference(getApplicationContext()).setStringShared(\"cur_order_id\", String.valueOf(order_id));\n Intent i = new Intent(WidgetNewOrder.this, ViewDetailsOrder.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n i.putExtra(\"order_id\", String.valueOf(order_id));\n i.putExtra(\"from_act\", \"activity\");\n i.putExtra(\"initialBtnType\", \"wosoul\");\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n }\n else if (res.getHandle().equals(\"03\")) { // لم يتم وجود الطلب --\n Toast.makeText(getApplicationContext(), res.getMsg(), Toast.LENGTH_LONG).show();\n }\n else {\n Toast.makeText(getApplicationContext(), res.getMsg(), Toast.LENGTH_LONG).show();\n }\n try {\n if (!res.getHandle().equals(\"10\")) {\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n JsonObject errorDetails = new JsonObject();\n errorDetails.addProperty(\"request\", params.toString());\n errorDetails.addProperty(\"response\", response);\n errorDetails.addProperty(\"access_token\", new MySharedPreference(getApplicationContext()).getStringShared(\"access_token\"));\n errorDetails.addProperty(\"local\", \"ara\");\n errorDetails.addProperty(\"driver_id\", new MySharedPreference(getApplicationContext()).getStringShared(\"user_id\"));\n errorDetails.addProperty(\"order_id\", String.valueOf(order_id));\n try {\n PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);\n errorDetails.addProperty(\"app_version_number\", pInfo.versionName);\n errorDetails.addProperty(\"app_version_code\", pInfo.versionCode);\n } catch (Exception e) {\n e.printStackTrace();\n }\n DatabaseReference newVal = mDatabase.child(\"errors\").child(new MySharedPreference(getApplicationContext()).\n getStringShared(\"user_id\")).child(\"errors\").push();\n newVal.setValue(errorDetails.toString());\n }\n } catch ( Exception ex ) {\n ex.printStackTrace();\n }\n stopSelf();\n }\n\n @Override\n public void notifyError(VolleyError error) {\n progressBar.setVisibility(View.GONE);\n Toast.makeText(getApplicationContext(), \" مشكلة بالاتصال بالانترنت!\", Toast.LENGTH_LONG).show();\n System.out.println(error.getMessage());\n try {\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n JsonObject errorDetails = new JsonObject();\n errorDetails.addProperty(\"request\", params.toString());\n errorDetails.addProperty(\"response\", error.getMessage());\n errorDetails.addProperty(\"access_token\", new MySharedPreference(getApplicationContext()).getStringShared(\"access_token\"));\n errorDetails.addProperty(\"local\", \"ara\");\n errorDetails.addProperty(\"driver_id\", new MySharedPreference(getApplicationContext()).getStringShared(\"user_id\"));\n errorDetails.addProperty(\"order_id\", String.valueOf(order_id));\n try {\n PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);\n errorDetails.addProperty(\"app_version_number\", pInfo.versionName);\n errorDetails.addProperty(\"app_version_code\", pInfo.versionCode);\n } catch (Exception e) {\n e.printStackTrace();\n }\n DatabaseReference newVal = mDatabase.child(\"errors\").child(new MySharedPreference(getApplicationContext()).\n getStringShared(\"user_id\")).child(\"errors\").push();\n newVal.setValue(errorDetails);\n } catch ( Exception er) {\n er.printStackTrace();\n }\n }\n }, getApplicationContext());\n progressBar.setVisibility(View.VISIBLE);\n voly_ser.postDataVolley(new MySharedPreference(getApplicationContext())\n .getStringShared(\"base_url\") + PathUrl.AcceptOrder, params);\n }",
"@SuppressWarnings(\"deprecation\")\n private void LoadItemsForReprintBill(Cursor crsrBillItems) {\n EditTextInputHandler etInputValidate = new EditTextInputHandler();\n TableRow rowItem;\n TextView tvHSn, tvName, tvAmount, tvTaxPercent, tvTaxAmt, tvDiscPercent, tvDiscAmt, // tvQty,\n // tvRate,\n tvDeptCode, tvCategCode, tvKitchenCode, tvTaxType, tvModifierCharge, tvServiceTaxPercent,\n tvServiceTaxAmt , tvUOM;\n EditText etQty, etRate;\n CheckBox Number;\n ImageButton ImgDelete;\n\n if (crsrBillItems.moveToFirst()) {\n\n if (crsrBillItems.getString(crsrBillItems.getColumnIndex(\"IsReverseTaxEnable\")).equalsIgnoreCase(\"YES\")) { // reverse tax\n REVERSETAX = true;\n }else\n {\n REVERSETAX = false;\n }\n\n // Display items in table\n do {\n rowItem = new TableRow(BillingCounterSalesActivity.this);\n rowItem.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n\n // Item Number\n Number = new CheckBox(BillingCounterSalesActivity.this);\n Number.setWidth(40);\n Number.setTextSize(0);\n Number.setTextColor(Color.TRANSPARENT);\n Number.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ItemNumber\")));\n\n // Item Name\n tvName = new TextView(BillingCounterSalesActivity.this);\n /*tvName.setWidth(135);\n tvName.setTextSize(11);*/\n tvName.setWidth(mItemNameWidth); // 154px ~= 230dp\n tvName.setTextSize(mDataMiniDeviceTextsize);\n tvName.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ItemName\")));\n\n //hsn code\n tvHSn = new TextView(BillingCounterSalesActivity.this);\n // tvHSn.setWidth(67); // 154px ~= 230dp\n // tvHSn.setTextSize(11);\n\n\n tvHSn.setWidth(mHSNWidth); // 154px ~= 230dp\n tvHSn.setTextSize(mDataMiniDeviceTextsize);\n\n if (GSTEnable.equalsIgnoreCase(\"1\") && (HSNEnable_out != null) && HSNEnable_out.equals(\"1\")) {\n tvHSn.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"HSNCode\")));\n }\n\n // Quantity\n etQty = new EditText(BillingCounterSalesActivity.this);\n // etQty.setWidth(55); // 57px ~= 85dp\n // etQty.setTextSize(11);\n\n\n etQty.setWidth(mQuantityWidth); // 57px ~= 85dp\n etQty.setTextSize(mDataMiniDeviceTextsize);\n\n etQty.setText(String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(\"Quantity\"))));\n //etQty.setOnClickListener(Qty_Rate_Click);\n etInputValidate.ValidateDecimalInput(etQty);\n\n // Rate\n etRate = new EditText(BillingCounterSalesActivity.this);\n etRate.setEnabled(false);\n\n // etRate.setWidth(70); // 74px ~= 110dp\n // etRate.setTextSize(11);\n\n\n etRate.setWidth(mRateWidth); // 74px ~= 110dp\n etRate.setTextSize(mDataMiniDeviceTextsize);\n\n\n etRate.setText(String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(\"Value\"))));\n\n // Amount\n tvAmount = new TextView(BillingCounterSalesActivity.this);\n /*tvAmount.setWidth(105);\n tvAmount.setTextSize(11);*/\n tvAmount.setWidth(mAmountWidth); // 97px ~= 145dp\n tvAmount.setTextSize(mDataMiniDeviceTextsize);\n tvAmount.setText(\n String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(\"Amount\"))));\n\n // Sales Tax%\n tvTaxPercent = new TextView(BillingCounterSalesActivity.this);\n tvTaxPercent.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"CGSTRate\")));\n\n // Sales Tax Amount\n tvTaxAmt = new TextView(BillingCounterSalesActivity.this);\n tvTaxAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"CGSTAmount\")));\n\n // Discount %\n tvDiscPercent = new TextView(BillingCounterSalesActivity.this);\n tvDiscPercent.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"DiscountPercent\")));\n\n // Discount Amount\n tvDiscAmt = new TextView(BillingCounterSalesActivity.this);\n tvDiscAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"DiscountAmount\")));\n\n // Dept Code\n tvDeptCode = new TextView(BillingCounterSalesActivity.this);\n tvDeptCode.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"DeptCode\")));\n\n // Categ Code\n tvCategCode = new TextView(BillingCounterSalesActivity.this);\n tvCategCode.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"CategCode\")));\n\n // Kitchen Code\n tvKitchenCode = new TextView(BillingCounterSalesActivity.this);\n tvKitchenCode.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"KitchenCode\")));\n\n // Tax Type\n tvTaxType = new TextView(BillingCounterSalesActivity.this);\n tvTaxType.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"TaxType\")));\n\n // Modifier Amount\n tvModifierCharge = new TextView(BillingCounterSalesActivity.this);\n tvModifierCharge.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ModifierAmount\")));\n\n // Service Tax %\n tvServiceTaxPercent = new TextView(BillingCounterSalesActivity.this);\n tvServiceTaxPercent.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"SGSTRate\")));\n\n // Service Tax Amount\n tvServiceTaxAmt = new TextView(BillingCounterSalesActivity.this);\n tvServiceTaxAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"SGSTAmount\")));\n\n // UOM\n tvUOM = new TextView(BillingCounterSalesActivity.this);\n tvUOM.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"UOM\")));\n\n // space\n TextView tvSpace = new TextView(BillingCounterSalesActivity.this);\n TextView tvSpace1 = new TextView(BillingCounterSalesActivity.this);\n TextView tvPrintKOTStatus = new TextView(BillingCounterSalesActivity.this);\n\n // SupplyType\n TextView SupplyType = new TextView(BillingCounterSalesActivity.this);\n SupplyType.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"SupplyType\")));\n\n // IGSTRate\n TextView tvIGSTRate = new TextView(BillingCounterSalesActivity.this);\n tvIGSTRate.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"IGSTRate\")));\n\n // IGSTAmount\n TextView tvIGSTAmt = new TextView(BillingCounterSalesActivity.this);\n tvIGSTAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"IGSTAmount\")));\n\n // cessRate\n TextView tvcess = new TextView(BillingCounterSalesActivity.this);\n tvcess.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"cessRate\")));\n\n // IGSTAmount\n TextView tvcessAmt = new TextView(BillingCounterSalesActivity.this);\n tvcessAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"cessAmount\")));\n\n // Delete\n int res = getResources().getIdentifier(\"delete\", \"drawable\", this.getPackageName());\n ImgDelete = new ImageButton(BillingCounterSalesActivity.this);\n ImgDelete.setImageResource(res);\n ImgDelete.setVisibility(View.INVISIBLE);\n\n TextView originalRate = new TextView(this);\n originalRate.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"OriginalRate\")));\n TextView taxableValue = new TextView(this);\n taxableValue.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"TaxableValue\")));\n\n // Add all text views and edit text to Item Row\n // rowItem.addView(tvNumber);\n rowItem.addView(Number); //0\n rowItem.addView(tvName);//1\n rowItem.addView(tvHSn);//2\n rowItem.addView(etQty);//3\n rowItem.addView(etRate);//4\n rowItem.addView(tvAmount);//5\n rowItem.addView(tvTaxPercent);//6\n rowItem.addView(tvTaxAmt);//7\n rowItem.addView(tvDiscPercent);//8\n rowItem.addView(tvDiscAmt);//9\n rowItem.addView(tvDeptCode);//10\n rowItem.addView(tvCategCode);//11\n rowItem.addView(tvKitchenCode);//12\n rowItem.addView(tvTaxType);//13\n rowItem.addView(tvModifierCharge);//14\n rowItem.addView(tvServiceTaxPercent);//15\n rowItem.addView(tvServiceTaxAmt);//16\n rowItem.addView(SupplyType);//17\n rowItem.addView(tvSpace);//18\n rowItem.addView(ImgDelete);//19\n rowItem.addView(tvSpace1);//20\n rowItem.addView(tvPrintKOTStatus);//21\n rowItem.addView(tvUOM);//22\n rowItem.addView(tvIGSTRate);//23\n rowItem.addView(tvIGSTAmt);//24\n rowItem.addView(tvcess);//25\n rowItem.addView(tvcessAmt);//26\n rowItem.addView(originalRate);//27\n rowItem.addView(taxableValue);//28\n // Add row to table\n tblOrderItems.addView(rowItem, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n\n } while (crsrBillItems.moveToNext());\n\n //CalculateTotalAmountforRePrint();\n\n } else {\n Log.d(\"LoadKOTItems\", \"No rows in cursor\");\n }\n }",
"@Override\n public void onClick(View v) {\n\n if (!isInternetPresent) {\n // Internet connection is not present\n // Ask user to connect to Internet\n showAlertDialog(MainActivity.this, \"You don't have internet connection.\",\n \"Data Not Loaded\", false);\n\n }\n\nelse if(sp1.getSelectedItem().toString().equals(\"Select Type\") || sp2.getSelectedItem().toString().equals(\"Select Size\")) {\n Toast.makeText(getApplicationContext(), \"Select value\", Toast.LENGTH_SHORT).show();\n\n }\n\nelse if (TextViewKGFEET.getText().toString().equals(\"Select Meter\")){\n Toast.makeText(getApplicationContext(), \"Select value\", Toast.LENGTH_SHORT).show();\n }\n//sp1.getSelectedItem().toString();\n else {\n Intent intent = new Intent(MainActivity.this, FinalAmount.class);\n String tp = intent.putExtra(\"type\", t).toString();\n\n\n intent.putExtra(\"size\", s);\n intent.putExtra(\"kg_mtr\", arrayListmtr.get(sp2.getSelectedItemPosition()).toString());\n intent.putExtra(\"kg_feet\", arrayListfeet.get(sp2.getSelectedItemPosition()).toString());\n intent.putExtra(\"guage\", arrayListguage.get(sp2.getSelectedItemPosition()).toString());\n\n intent.putExtra(\"type\", t);\n Log.e(\"weightpermtr ::::::\", \"\" + arrayListmtr.get(sp2.getSelectedItemPosition()).toString());\n Log.e(\"weightperfeet ::::::\", \"\" + arrayListfeet.get(sp2.getSelectedItemPosition()).toString());\n Log.e(\"guage ::::::\", \"\" + arrayListguage.get(sp2.getSelectedItemPosition()).toString());\n startActivity(intent);\n }\n if (iad.isLoaded()) {\n iad.show();\n }\n\n }",
"@Override\n protected void onCreate (Bundle savedInstanceState) {\n super.onCreate (savedInstanceState);\n setContentView (R.layout.info_main_activity);\n\n Button btnUrls = findViewById (R.id.btn_info_urls);\n Button btnBooks = findViewById (R.id.btn_info_books);\n Button btnCenters = findViewById (R.id.btn_info_centers);\n Button btnVideos = findViewById (R.id.btn_info_videos);\n\n btnUrls.setOnClickListener (new View.OnClickListener () {\n @Override\n public void onClick (View view) {\n\n setUsefulURLsInfo ();\n }\n });\n\n btnBooks.setOnClickListener (new View.OnClickListener () {\n @Override\n public void onClick (View view) {\n\n setBooksInfo ();\n }\n });\n\n btnCenters.setOnClickListener (new View.OnClickListener () {\n @Override\n public void onClick (View view) {\n\n setCentersInfo ();\n }\n });\n\n btnVideos.setOnClickListener (new View.OnClickListener () {\n @Override\n public void onClick (View view) {\n\n setVideosInfo ();\n }\n });\n\n\n }",
"@android.annotation.SuppressLint({\"SetTextI18n\"})\n private final void n(com.iqoption.core.microservices.billing.response.deposit.cashboxitem.a r10) {\n /*\n r9 = this;\n r9.cxs = r10;\n if (r10 == 0) goto L_0x0014;\n L_0x0004:\n r1 = com.iqoption.core.ext.a.q(r9);\n r2 = 1;\n r3 = 0;\n r4 = 4;\n r5 = 0;\n r0 = r10;\n r0 = com.iqoption.deposit.c.b.c.a(r0, r1, r2, r3, r4, r5);\n if (r0 == 0) goto L_0x0014;\n L_0x0013:\n goto L_0x0021;\n L_0x0014:\n r0 = com.iqoption.deposit.o.g.deposit1;\n r0 = r9.getString(r0);\n r1 = \"getString(R.string.deposit1)\";\n kotlin.jvm.internal.i.e(r0, r1);\n r0 = (java.lang.CharSequence) r0;\n L_0x0021:\n r1 = r9.asp();\n r1 = r1.cCv;\n r1 = r1.cDG;\n r2 = \"binding.toolbarTitleLayo….depositPerformLightTitle\";\n kotlin.jvm.internal.i.e(r1, r2);\n r1.setText(r0);\n r0 = com.iqoption.deposit.light.c.a.cEV;\n r0 = r0.aqV();\n r1 = com.iqoption.core.ext.a.u(r9);\n r2 = r0.getName();\n r2 = r1.findFragmentByTag(r2);\n r2 = (com.iqoption.deposit.light.c.a) r2;\n r3 = r10 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.b;\n r4 = \"binding.depositButtonBinding.root\";\n r5 = \"binding.depositButtonBinding\";\n r6 = \"binding.depositPerformLightScroll\";\n r7 = \"binding.depositPerformHoldContainer\";\n if (r3 == 0) goto L_0x00bd;\n L_0x0051:\n r3 = r9.asp();\n r3 = r3.cCv;\n r3 = r3.cDH;\n r8 = \"binding.toolbarTitleLayout.depositToolbarSecure\";\n kotlin.jvm.internal.i.e(r3, r8);\n r3 = (android.view.View) r3;\n com.iqoption.core.ext.a.ak(r3);\n r3 = r9.asp();\n r3 = r3.cCp;\n kotlin.jvm.internal.i.e(r3, r7);\n r3 = (android.view.View) r3;\n com.iqoption.core.ext.a.ak(r3);\n r3 = r9.asp();\n r3 = r3.cCq;\n kotlin.jvm.internal.i.e(r3, r6);\n r3 = (android.view.View) r3;\n com.iqoption.core.ext.a.al(r3);\n r3 = r9.asp();\n r3 = r3.cCj;\n kotlin.jvm.internal.i.e(r3, r5);\n r3 = r3.getRoot();\n kotlin.jvm.internal.i.e(r3, r4);\n com.iqoption.core.ext.a.al(r3);\n if (r2 != 0) goto L_0x0147;\n L_0x0094:\n r2 = com.iqoption.core.ext.a.q(r9);\n r2 = r0.bh(r2);\n if (r2 == 0) goto L_0x00b5;\n L_0x009e:\n r2 = (com.iqoption.deposit.light.c.a) r2;\n r1 = r1.beginTransaction();\n r3 = com.iqoption.deposit.o.e.depositPerformHoldContainer;\n r2 = (androidx.fragment.app.Fragment) r2;\n r0 = r0.getName();\n r0 = r1.add(r3, r2, r0);\n r0.commitAllowingStateLoss();\n goto L_0x0147;\n L_0x00b5:\n r10 = new kotlin.TypeCastException;\n r0 = \"null cannot be cast to non-null type com.iqoption.deposit.light.hold.DepositHoldLightFragment\";\n r10.<init>(r0);\n throw r10;\n L_0x00bd:\n r0 = r9.asp();\n r0 = r0.cCp;\n kotlin.jvm.internal.i.e(r0, r7);\n r0 = (android.view.View) r0;\n com.iqoption.core.ext.a.al(r0);\n r0 = r9.asp();\n r0 = r0.cCq;\n kotlin.jvm.internal.i.e(r0, r6);\n r0 = (android.view.View) r0;\n com.iqoption.core.ext.a.ak(r0);\n r0 = r9.asp();\n r0 = r0.cCj;\n kotlin.jvm.internal.i.e(r0, r5);\n r0 = r0.getRoot();\n kotlin.jvm.internal.i.e(r0, r4);\n com.iqoption.core.ext.a.ak(r0);\n if (r2 == 0) goto L_0x00fb;\n L_0x00ee:\n r0 = r1.beginTransaction();\n r2 = (androidx.fragment.app.Fragment) r2;\n r0 = r0.remove(r2);\n r0.commitAllowingStateLoss();\n L_0x00fb:\n r9.asv();\n if (r10 == 0) goto L_0x0135;\n L_0x0100:\n r0 = com.iqoption.core.microservices.billing.response.deposit.c.e(r10);\n if (r0 == 0) goto L_0x010d;\n L_0x0106:\n r0 = com.iqoption.deposit.crypto.a.b.czV;\n r0 = r0.aqV();\n goto L_0x0125;\n L_0x010d:\n r0 = r10 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.e;\n if (r0 != 0) goto L_0x011f;\n L_0x0111:\n r0 = com.iqoption.core.microservices.billing.response.deposit.c.b(r10);\n if (r0 == 0) goto L_0x0118;\n L_0x0117:\n goto L_0x011f;\n L_0x0118:\n r0 = com.iqoption.deposit.light.constructor.a.cEF;\n r0 = r0.apA();\n goto L_0x0125;\n L_0x011f:\n r0 = com.iqoption.deposit.light.a.a.cEA;\n r0 = r0.apA();\n L_0x0125:\n r1 = r9.alD();\n r1.a(r0);\n r0 = r9.asp();\n r0 = r0.cCw;\n r0.requestFocus();\n L_0x0135:\n r9.asI();\n r9.asB();\n r9.asx();\n r9.asF();\n r9.asG();\n r9.asH();\n L_0x0147:\n r0 = new kotlin.jvm.internal.Ref$ObjectRef;\n r0.<init>();\n r1 = 0;\n r1 = (java.lang.Long) r1;\n r0.element = r1;\n r1 = r10 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.c;\n if (r1 == 0) goto L_0x016b;\n L_0x0155:\n r10 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.c) r10;\n r1 = r10.aaD();\n r10 = r9.ast();\n r10 = kotlin.collections.i.a(r10, r1);\n if (r10 == 0) goto L_0x016b;\n L_0x0165:\n r10 = java.lang.Long.valueOf(r1);\n r0.element = r10;\n L_0x016b:\n r10 = r0.element;\n r10 = (java.lang.Long) r10;\n r1 = \"binding.depositInfoHint\";\n if (r10 == 0) goto L_0x01bc;\n L_0x0173:\n r10 = r9.asp();\n r10 = r10.cCl;\n kotlin.jvm.internal.i.e(r10, r1);\n r10 = (android.view.View) r10;\n com.iqoption.core.ext.a.ak(r10);\n r10 = r9.asp();\n r10 = r10.cCv;\n r10 = r10.cDI;\n if (r10 == 0) goto L_0x0190;\n L_0x018b:\n r10 = (android.view.View) r10;\n com.iqoption.core.ext.a.ak(r10);\n L_0x0190:\n r10 = r9.asp();\n r10 = r10.cCl;\n kotlin.jvm.internal.i.e(r10, r1);\n r10 = (android.view.View) r10;\n r1 = new com.iqoption.deposit.light.perform.c$h;\n r1.<init>(r9, r0);\n r1 = (android.view.View.OnClickListener) r1;\n r10.setOnClickListener(r1);\n r10 = r9.asp();\n r10 = r10.cCv;\n r10 = r10.cDI;\n if (r10 == 0) goto L_0x01d9;\n L_0x01af:\n r10 = (android.view.View) r10;\n r1 = new com.iqoption.deposit.light.perform.c$i;\n r1.<init>(r9, r0);\n r1 = (android.view.View.OnClickListener) r1;\n r10.setOnClickListener(r1);\n goto L_0x01d9;\n L_0x01bc:\n r10 = r9.asp();\n r10 = r10.cCl;\n kotlin.jvm.internal.i.e(r10, r1);\n r10 = (android.view.View) r10;\n com.iqoption.core.ext.a.al(r10);\n r10 = r9.asp();\n r10 = r10.cCv;\n r10 = r10.cDI;\n if (r10 == 0) goto L_0x01d9;\n L_0x01d4:\n r10 = (android.view.View) r10;\n com.iqoption.core.ext.a.al(r10);\n L_0x01d9:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.n(com.iqoption.core.microservices.billing.response.deposit.cashboxitem.a):void\");\n }",
"@SuppressWarnings(\"deprecation\")\r\n private void LoadKOTItems(Cursor crsrBillItems) {\r\n EditTextInputHandler etInputValidate = new EditTextInputHandler();\r\n TableRow rowItem;\r\n TextView tvName, tvHSn, tvAmount, tvTaxPercent, tvTaxAmt, tvDiscPercent, tvDiscAmt, // tvQty,\r\n // tvRate,\r\n tvDeptCode, tvCategCode, tvKitchenCode, tvTaxType, tvModifierCharge, tvServiceTaxPercent,\r\n tvServiceTaxAmt;\r\n EditText etQty, etRate;\r\n CheckBox Number;\r\n ImageButton ImgDelete;\r\n\r\n try{\r\n if (crsrBillItems.moveToFirst()) {\r\n\r\n // Get Token number\r\n iTokenNumber = crsrBillItems.getInt(crsrBillItems.getColumnIndex(\"TokenNumber\"));\r\n\r\n /* et_pos.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"POS\")));\r\n if (et_pos.getText().toString().equals(\"\"))\r\n {\r\n chk_interstate.setChecked(false);\r\n }\r\n else\r\n {\r\n chk_interstate.setChecked(true);\r\n }\r\n */// Get waiter Id\r\n //tvWaiterNumber.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"EmployeeId\")));\r\n\r\n // Get Table number\r\n //tvTableNumber.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"TableNumber\")));\r\n\r\n // Get Table Split No\r\n //tvTableSplitNo.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"TableSplitNo\")));\r\n\r\n // Get Sub Udf number\r\n tvSubUdfValue.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"SubUdfNumber\")));\r\n\r\n // Get Cust Id\r\n edtCustId.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"CustId\")));\r\n Cursor crsrCustomer = db.getCustomerById(crsrBillItems.getInt(crsrBillItems.getColumnIndex(\"CustId\")));\r\n if (crsrCustomer.moveToFirst()) {\r\n edtCustPhoneNo.setText(crsrCustomer.getString(crsrCustomer.getColumnIndex(\"CustContactNumber\")));\r\n edtCustName.setText(crsrCustomer.getString(crsrCustomer.getColumnIndex(\"CustName\")));\r\n edtCustAddress.setText(crsrCustomer.getString(crsrCustomer.getColumnIndex(\"CustAddress\")));\r\n }\r\n\r\n // Display items in table\r\n do {\r\n rowItem = new TableRow(myContext);\r\n rowItem.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\r\n\r\n // Item Number\r\n Number = new CheckBox(myContext);\r\n Number.setWidth(40);\r\n Number.setTextSize(0);\r\n Number.setTextColor(Color.TRANSPARENT);\r\n Number.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ItemNumber\")));\r\n\r\n // Item Name\r\n tvName = new TextView(myContext);\r\n tvName.setWidth(135);\r\n tvName.setTextSize(11);\r\n tvName.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ItemName\")));\r\n\r\n //hsn code\r\n tvHSn = new TextView(myContext);\r\n tvHSn.setWidth(67); // 154px ~= 230dp\r\n tvHSn.setTextSize(11);\r\n if (GSTEnable.equalsIgnoreCase(\"1\") && (HSNEnable_out != null) && HSNEnable_out.equals(\"1\")) {\r\n tvHSn.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"HSNCode\")));\r\n }\r\n // Quantity\r\n etQty = new EditText(myContext);\r\n etQty.setWidth(55);\r\n etQty.setTextSize(11);\r\n if (crsrBillItems.getString(crsrBillItems.getColumnIndex(\"PrintKOTStatus\")).equalsIgnoreCase(\"1\")) {\r\n etQty.setEnabled(true);\r\n } else {\r\n etQty.setEnabled(false);\r\n }\r\n etQty.setText(String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(\"Quantity\"))));\r\n etQty.setSelectAllOnFocus(true);\r\n etQty.setTag(\"QTY_RATE\");\r\n etQty.setFilters(new InputFilter[] {new DecimalDigitsInputFilter(4,1)});\r\n if( jBillingMode ==3 || jBillingMode ==4)\r\n {\r\n //etQty.setOnClickListener(Qty_Rate_Click);\r\n etQty.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);\r\n etQty.setOnKeyListener(Qty_Rate_KeyPressEvent);\r\n etInputValidate.ValidateDecimalInput(etQty);\r\n etQty.addTextChangedListener(new TextWatcher() {\r\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\r\n\r\n }\r\n\r\n public void onTextChanged(CharSequence s, int start, int before, int count) {\r\n\r\n }\r\n\r\n public void afterTextChanged(Editable s) {\r\n Qty_Rate_Edit();\r\n }\r\n });\r\n }\r\n\r\n\r\n // Rate\r\n etRate = new EditText(myContext);\r\n etRate.setWidth(70);\r\n etRate.setEnabled(false);\r\n etRate.setTextSize(11);\r\n etRate.setFilters(new InputFilter[] {new DecimalDigitsInputFilter(4,1)});\r\n etRate.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);\r\n etRate.setText(String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(\"Rate\"))));\r\n if(crsrSettings!=null && crsrSettings.getInt(crsrSettings.getColumnIndex(\"Tax\")) !=1) // reverse TAx\r\n {\r\n etRate.setEnabled(false);\r\n etRate.setTextColor(getResources().getColor(R.color.black));\r\n }\r\n\r\n // Amount\r\n tvAmount = new TextView(myContext);\r\n tvAmount.setWidth(60);\r\n tvAmount.setTextSize(11);\r\n tvAmount.setGravity(Gravity.RIGHT | Gravity.END);\r\n tvAmount.setText(\r\n String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(\"Amount\"))));\r\n tvAmount.setTextColor(getResources().getColor(R.color.black));\r\n\r\n // Sales Tax%\r\n tvTaxPercent = new TextView(myContext);\r\n tvTaxPercent.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"TaxPercent\")));\r\n\r\n // Sales Tax Amount\r\n tvTaxAmt = new TextView(myContext);\r\n tvTaxAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"TaxAmount\")));\r\n\r\n // Discount %\r\n tvDiscPercent = new TextView(myContext);\r\n tvDiscPercent.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"DiscountPercent\")));\r\n\r\n // Discount Amount\r\n tvDiscAmt = new TextView(myContext);\r\n tvDiscAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"DiscountAmount\")));\r\n\r\n // Dept Code\r\n tvDeptCode = new TextView(myContext);\r\n tvDeptCode.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(DatabaseHandler.KEY_DepartmentCode)));\r\n\r\n // Categ Code\r\n tvCategCode = new TextView(myContext);\r\n tvCategCode.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(DatabaseHandler.KEY_CategoryCode)));\r\n\r\n // Kitchen Code\r\n tvKitchenCode = new TextView(myContext);\r\n tvKitchenCode.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(DatabaseHandler.KEY_KitchenCode)));\r\n\r\n // Tax Type\r\n tvTaxType = new TextView(myContext);\r\n tvTaxType.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"TaxType\")));\r\n\r\n // Modifier Amount\r\n tvModifierCharge = new TextView(myContext);\r\n tvModifierCharge.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ModifierAmount\")));\r\n\r\n // Service Tax %\r\n tvServiceTaxPercent = new TextView(myContext);\r\n tvServiceTaxPercent.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ServiceTaxPercent\")));\r\n\r\n // Service Tax Amount\r\n tvServiceTaxAmt = new TextView(myContext);\r\n tvServiceTaxAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"ServiceTaxAmount\")));\r\n\r\n // Service Tax Amount\r\n TextView tvSupplyType = new TextView(myContext);\r\n tvSupplyType.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(DatabaseHandler.KEY_SupplyType)));\r\n\r\n //Original Rate\r\n TextView tvOriginalRate = new TextView(myContext);\r\n tvOriginalRate.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"OriginalRate\")));\r\n\r\n\r\n TextView tvUOM = new TextView(myContext);\r\n tvUOM.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"UOM\")));\r\n\r\n TextView tvIGSTRate = new TextView(myContext);\r\n tvIGSTRate.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"IGSTRate\")));\r\n\r\n\r\n TextView tvIGSTAmt = new TextView(myContext);\r\n tvIGSTAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"IGSTAmount\")));\r\n\r\n\r\n TextView tvcess = new TextView(myContext);\r\n tvcess.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"cessRate\")));\r\n\r\n// TextView tvcessAmt = new TextView(myContext);\r\n// tvcessAmt.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"cessAmount\")));\r\n\r\n TextView tvcessAmtPerUnit = new TextView(myContext);\r\n tvcessAmtPerUnit.setText(String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(DatabaseHandler.KEY_cessAmountPerUnit))));\r\n\r\n TextView tvcessAmtAdditional = new TextView(myContext);\r\n tvcessAmtAdditional.setText(String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(DatabaseHandler.KEY_TotalAdditionalCessAmount))));\r\n\r\n // Delete\r\n int res = getResources().getIdentifier(\"delete\", \"drawable\", this.getPackageName());\r\n ImgDelete = new ImageButton(myContext);\r\n ImgDelete.setImageResource(res);\r\n ImgDelete.setVisibility(View.INVISIBLE);\r\n\r\n TextView tvSpace = new TextView(myContext);\r\n tvSpace.setText(\" \");\r\n\r\n TextView tvSpace1 = new TextView(myContext);\r\n tvSpace1.setText(\" \");\r\n\r\n TextView tvPrintKOTStatus = new TextView(myContext);\r\n if(REPRINT_KOT == 1)\r\n tvPrintKOTStatus.setText(\"1\");\r\n else\r\n tvPrintKOTStatus.setText(crsrBillItems.getString(crsrBillItems.getColumnIndex(\"PrintKOTStatus\")));\r\n\r\n TextView tvTaxableValue = new TextView(this);\r\n tvTaxableValue.setText(String.format(\"%.2f\",crsrBillItems.getDouble(crsrBillItems.getColumnIndex(\"TaxableValue\"))));\r\n\r\n TextView tvTotalCessAmount = new TextView(this);\r\n tvTotalCessAmount.setText(String.format(\"%.2f\", crsrBillItems.getDouble(crsrBillItems.getColumnIndex(DatabaseHandler.KEY_cessAmount))));\r\n\r\n\r\n // Add all text views and edit text to Item Row\r\n // rowItem.addView(tvNumber);\r\n rowItem.addView(Number);//0\r\n rowItem.addView(tvName);//1\r\n rowItem.addView(tvHSn);//2\r\n rowItem.addView(etQty);//3\r\n rowItem.addView(etRate);//4\r\n rowItem.addView(tvAmount);//5\r\n rowItem.addView(tvTaxPercent);//6\r\n rowItem.addView(tvTaxAmt);//7\r\n rowItem.addView(tvDiscPercent);//8\r\n rowItem.addView(tvDiscAmt);//9\r\n rowItem.addView(tvDeptCode);//10\r\n rowItem.addView(tvCategCode);//11\r\n rowItem.addView(tvKitchenCode);//12\r\n rowItem.addView(tvTaxType);//13\r\n rowItem.addView(tvModifierCharge);//14\r\n rowItem.addView(tvServiceTaxPercent);//15\r\n rowItem.addView(tvServiceTaxAmt);//16\r\n rowItem.addView(tvSupplyType);//17\r\n rowItem.addView(tvSpace);//18\r\n rowItem.addView(ImgDelete);//19\r\n rowItem.addView(tvSpace1);//20\r\n rowItem.addView(tvPrintKOTStatus);//21\r\n rowItem.addView(tvUOM);//22\r\n rowItem.addView(tvIGSTRate);//23\r\n rowItem.addView(tvIGSTAmt);//24\r\n rowItem.addView(tvcess);//25\r\n rowItem.addView(tvcessAmtPerUnit);//26\r\n rowItem.addView(tvOriginalRate);//27\r\n rowItem.addView(tvTaxableValue);//28\r\n rowItem.addView(tvcessAmtAdditional);//29\r\n rowItem.addView(tvTotalCessAmount);//30\r\n\r\n // Add row to table\r\n tblOrderItems.addView(rowItem, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\r\n\r\n } while (crsrBillItems.moveToNext());\r\n\r\n REPRINT_KOT =0;\r\n\r\n CalculateTotalAmount();\r\n Log.d(\"LoadKOTItems\", \"Items loaded successfully\");\r\n } else {\r\n Log.d(\"LoadKOTItems\", \"No rows in cursor\");\r\n }\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n MsgBox.Show(\"Oops\",\"Some error occured while loading KOT\");\r\n }\r\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.plans);\n \n dbHelper = new PlanDbAdapter(this);\n dbHelper.open();\n \n // event handlers\n View add_btn = findViewById(R.id.add_btn);\n add_btn.setOnClickListener(this);\n \n fillData();\n }",
"@Override\n public void onClick(View view) {\n if(odometerReading.getText().toString().equals(\"\") || fuelInLiters.getText().toString().equals(\"\") || TotalCost.getText().toString().equals(\"\")){\n Toast.makeText(MainActivity.this, \"Please fill in all the details.\", Toast.LENGTH_SHORT).show();\n return;\n }\n try{\n //Create a database if it not exists or open an existing database.\n dataBase = openOrCreateDatabase(\"dataBase\",MODE_PRIVATE,null);\n //Create a table if not exists.\n dataBase.execSQL(\"CREATE TABLE IF NOT EXISTS FUEL_DATA(ID INTEGER PRIMARY KEY AUTOINCREMENT, ODOMETER INTEGER, FUEL_FILLED REAL, FUEL_COST REAL )\");\n }catch (Exception ex){\n Toast.makeText(MainActivity.this, \"Error: \"+ ex.getMessage(), Toast.LENGTH_SHORT).show();\n }\n\n try{\n long odometerValue = Long.parseLong(odometerReading.getText().toString());\n double fuelLiters = Double.parseDouble(fuelInLiters.getText().toString());\n double totalCost = Double.parseDouble(TotalCost.getText().toString());\n\n if(odometerValue == 0 || fuelLiters == 0 || totalCost == 0)\n {\n Toast.makeText(MainActivity.this, \"Please enter valid data\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //Insert valid data to the database.\n dataBase.execSQL(\n \"INSERT INTO FUEL_DATA(ODOMETER, FUEL_FILLED, FUEL_COST) VALUES (\"+odometerValue+\",\"+fuelLiters+\",\"+totalCost+\");\"\n );\n Toast.makeText(MainActivity.this, \"Insertion Successful!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception ex){\n Toast.makeText(MainActivity.this, \"Error: \"+ ex.getMessage(), Toast.LENGTH_SHORT).show();\n }\n\n //Clear all the fields after Inserting into database.\n odometerReading.setText(\"\");\n TotalCost.setText(\"\");\n fuelInLiters.setText(\"\");\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.addbusstop);\n\t\tmlist=(ListView)findViewById(R.id.mlist_bstopss);\n\t\teadbstop=(EditText)findViewById(R.id.et_bstopps);\n\t\teadbtime=(EditText)findViewById(R.id.et_bstimeee);\n\t\tbadstop=(Button)findViewById(R.id.mbt_upbstop);\n\t\tsp_busno=(Spinner)findViewById(R.id.mspin_bn);\n\t\t\n\t\tbadstop.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ts_bstop=eadbstop.getText().toString();\n\t\t\t\ts_btime=eadbtime.getText().toString();\n\t\t\t\t\n\t\t\t\tnew BusStopUpdateApi().execute();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tnew Busno_fetch().execute();\n\t\t\t\n\t}",
"@Override\n public void onResetClick() {\n billNo = \"\";\n delivPlaceName = \"\";\n rtnPlaceName = \"\";\n consigneeCName = \"\";\n forwarderName = \"\";\n flowStatus = \"\";\n\n getDataList(false);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.member_center);\n\t\tinfo = (VariableInfo) getApplication();\n\t\ttextview = (TextView) findViewById(R.id.store_name);\n\t\ttextview1 = (TextView) findViewById(R.id.store_vip);\n\t\ttextview2 = (TextView) findViewById(R.id.store_point);\n\t\tbodytextview = (TextView) findViewById(R.id.buy_body);\n\t\tunLogin_member = (LinearLayout) findViewById(R.id.unlogin_member);\n\t\tLogin_member = (LinearLayout) findViewById(R.id.member_layout);\n\t\t// sellbodytextview=(TextView)findViewById(R.id.sell_bodys);\n\t\tcollectiontextview = (TextView) findViewById(R.id.collection_bodys);\n\t\tif (info.getLogin_status() == 1) {\n\t\t\tLogin_member.setVisibility(View.VISIBLE);\n\t\t\tunLogin_member.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tLogin_member.setVisibility(View.GONE);\n\t\t\tunLogin_member.setVisibility(View.VISIBLE);\n\t\t}\n\t\tbodytextview.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(MenberCenterApp.this, BuyBadyApp.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\t/*\n\t\t * sellbodytextview.setOnClickListener(new OnClickListener() {\n\t\t * \n\t\t * @Override public void onClick(View v) { // TODO Auto-generated method\n\t\t * stub Intent intent=new Intent();\n\t\t * intent.setClass(MenberCenterApp.this, SellBodyApp.class);\n\t\t * startActivity(intent); } });\n\t\t */\n\t\tcollectiontextview.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(MenberCenterApp.this, CollectionBodyApp.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\n\t\t// 获取用户信息线程\n\t\tThread thread = new Thread(new Runnable() {\n\t\t\tString url =\"http://192.168.1.108:7000/userStatesWebService.asmx/findShops_memberInfoById\";\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// 设置参数\n\t\t\t\t// List<NameValuePair> list = new ArrayList<NameValuePair>();\n\n\t\t\t\t// list.add(new BasicNameValuePair(\"userId\", \"1\"));\n\t\t\t\t// list.add(new BasicNameValuePair(\"param\",param.toString() ));\n\t\t\t\t// post方法请求及其返回的数据\n\t\t\t\t// String member = NetWorkHelper.doPost(url, list);\n\t\t\t\tString member = NetWorkHelper.getDataDoGet(url + \"?userId=1\");\n\t\t\t\tSystem.out.println(\"member=====================???>>>>>>>>>>>\"\n\t\t\t\t\t\t+ member);\n\t\t\t\tint max = member.lastIndexOf(\"</string>\");\n\n\t\t\t\tint min = member.substring(0, max).lastIndexOf(\">\");\n\n\t\t\t\tString result = member.substring(min + 1, max);\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"resultsssssssssssssssssssssssssssssssssssss==>\"\n\t\t\t\t\t\t\t\t+ result);\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tMemberinfo memberinfo = gson.fromJson(result, Memberinfo.class);\n\n\t\t\t\tSystem.out.println(\"member==>\" + memberinfo.getUsername());\n\t\t\t\tSystem.out.println(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");\n\t\t\t\tMessage mess = mhandler.obtainMessage();\n\t\t\t\tmess.what = 1;\n\t\t\t\tmess.obj = memberinfo;\n\t\t\t\tmhandler.sendMessage(mess);\n\n\t\t\t}\n\t\t});\n\t\tthread.start();\n\t}",
"private void intviews() {\n\t\tyanzhengmall=(LinearLayout) findViewById(R.id.yanzhengma);\r\n\t\tphonell=(LinearLayout) findViewById(R.id.phone);\r\n\t\tzhucell=(LinearLayout) findViewById(R.id.zhuce);\r\n\t\tbtn=(Button) findViewById(R.id.button1);\r\n\t\tbtn1=(Button) findViewById(R.id.yanzhengmabutton);\r\n\t\tgetcodebtn=(Button) findViewById(R.id.getcodebtn);\r\n\t\tphoneet=(EditText) findViewById(R.id.phoneet);\r\n\t\tphonetv=(TextView) findViewById(R.id.phonetv);\r\n\t\tyanzhengmatv=(TextView) findViewById(R.id.yanzhengmatv);\r\n\t\tpasswordtv=(TextView) findViewById(R.id.passwordtv);\r\n\t\tbackimageview=(ImageView) findViewById(R.id.backimageview);\r\n\t\tcodeedittext=(EditText) findViewById(R.id.yanzhengmaEditText);\r\n\t\tpasswordet=(EditText) findViewById(R.id.passwordEditText);\r\n\t\tquerenpasswordet=(EditText) findViewById(R.id.passwordquerenEditText);\r\n\t\tregisterbtn=(Button) findViewById(R.id.zhucebutton);\r\n\t}",
"private void init() {\n\t\tactivity_title_name = (TextView) findViewById(R.id.activity_title_name);\r\n\t\tactivity_title_name.setText(\"教育表单\");\r\n\t\tactivity_title_ok = (TextView) findViewById(R.id.activity_title_ok);\r\n\t\tactivity_title_ok.setText(\"提交\");\r\n\t\tactivity_title_back = (Button) findViewById(R.id.activity_title_back);\r\n\t\tactivity_title_back.setOnClickListener(this);\r\n\t\tbq_tv = (TextView) findViewById(R.id.patient_dept);\r\n\t\tbc_tv = (TextView) findViewById(R.id.patient_bed);\r\n\t\tzhuyi_tv = (TextView) findViewById(R.id.zhuyi_tv);\r\n\t\tpatient_name = (TextView) findViewById(R.id.patient_name);\r\n\t\tpatient_gender = (TextView) findViewById(R.id.patient_gender);\r\n\t\tpatient_age = (TextView) findViewById(R.id.patient_age);\r\n\t\tpatient_feibie = (TextView) findViewById(R.id.side_feibie);\r\n\t\tpatient_yue = (TextView) findViewById(R.id.side_yue);\r\n\t\tpatient_zhenduan = (TextView) findViewById(R.id.side_zhenduan);\r\n\t\tpatient_hldj = (TextView) findViewById(R.id.patient_hldj);\r\n\t\tpatient_bh = (TextView) findViewById(R.id.patient_ID);\r\n\r\n\t\tlistview = (ListView) findViewById(R.id.listview);\r\n\t\tif (Statics.patientdesc != null) {\r\n\t\t\tbq_tv.setText(Statics.patientdesc.getQuhao());\r\n\t\t\tbc_tv.setText(Statics.patientdesc.getChuanghao());\r\n\t\t\thldj_tv.setText(Statics.patientdesc.getHulidengji());\r\n\t\t\tzhuyi_tv.setText(Statics.patientdesc.getZhuyi());\r\n\t\t\tpatient_name.setText(Statics.patientdesc.getName());\r\n\t\t\tpatient_gender.setText(Statics.patientdesc.getGender());\r\n\t\t\tpatient_age.setText(Statics.patientdesc.getAge());\r\n\t\t\tpatient_feibie.setText(Statics.patientdesc.getFEIBIE());\r\n\t\t\tpatient_yue.setText(Statics.patientdesc.getFEIYUE());\r\n\t\t\tpatient_zhenduan.setText(Statics.patientdesc.getZHENDUAN());\r\n\t\t\tpatient_hldj.setText(Statics.patientdesc.getHulidengji());\r\n\t\t\tpatient_bh.setText(Statics.patientdesc.getPatient_id());// 编号\r\n\r\n\t\t}\r\n\r\n\t\tdata = new ArrayList<Yizhu>();\r\n\t\tmhandler = new Handler() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handleMessage(Message msg) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.handleMessage(msg);\r\n\t\t\t\tswitch (msg.what) {\r\n\t\t\t\tcase 101:\r\n\t\t\t\t\tMyUntils.cancleProgress();\r\n\t\t\t\t\tif (data == null) {\r\n\t\t\t\t\t\tif (Statics.internetcode != -1) {\r\n\t\t\t\t\t\t\tMyUntils.myToast(AddjiaoyvActivity.this,\r\n\t\t\t\t\t\t\t\t\tStatics.internetstate[Statics.internetcode]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\t\t\tadapter = new YizhuAdapter(data,\r\n\t\t\t\t\t\t\t\tAddjiaoyvActivity.this);\r\n\t\t\t\t\t\tlistview.setAdapter(adapter);\r\n\t\t\t\t\t} \r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t};\r\n\t\t// downlaoddata();\r\n\t}",
"public void onClick(View v) {\n EditText editText_ItemDesrc = (EditText) findViewById(R.id.editText_ItemDesrc);\n EditText curr_amount = (EditText) findViewById(R.id.curr_amount);\n\n db = new DatabaseHandler(getApplicationContext());\n\n TourItem tourItem = new TourItem();\n tourItem.setTour_descr(editText_ItemDesrc.getText().toString());\n tourItem.setTour_id(tour_id);\n Long article_id = spinner_article.getSelectedItemId();\n Log.e(LOG, \"article_id=\" + article_id);\n tourItem.setArticle_id(article_id.intValue());\n Long curr_id = spinner_curr.getSelectedItemId();\n Log.e(LOG, \"curr_id=\" + curr_id);\n tourItem.setCurr_id(curr_id.intValue());\n tourItem.setCurr_amount(Float.parseFloat(curr_amount.getText().toString()));\n tourItem.setItem_type(tourItemsTypes.getSelectedItemPosition());\n Long tourist_id = spinTourist.getSelectedItemId();\n tourItem.setTourist_id(tourist_id.intValue());\n db.createTourItem(tourItem);\n db.closeDB();\n\n finish();\n startActivity(getIntent());\n }",
"private void UpdateCentralUI() {\n LinearLayout parentLayout = (LinearLayout)findViewById(R.id.Main_CentralLayout);\n LayoutInflater layoutInflater = getLayoutInflater();\n View view;\n int intprice;\n double dprice;\n parentLayout.removeAllViews();\n for(int i=0;i<f.getNumComp();i++){\n view = layoutInflater.inflate(R.layout.main_share, parentLayout, false);\n LinearLayout shareData = (LinearLayout)view.findViewById(R.id.shareData);\n\n TextView shareInfo = (TextView)shareData.findViewById(R.id.shareInfo);\n shareInfo.setId(200000 + i);\n shareInfo.setText(f.getName(i));\n intprice = f.getShareCurrPrince(i);\n dprice = (double)intprice/100;\n String zerodigit = \"\";\n if(intprice%10==0){zerodigit=\"0\";}\n TextView sharePrices = (TextView)shareData.findViewById(R.id.sharePrice);\n sharePrices.setId(100000 + i);\n sharePrices.setText(Double.toString(dprice) + zerodigit);\n\n Button Buy = (Button)shareData.findViewById(R.id.BuyButton);\n Buy.setId(300000 + i);\n Buy.setText(getString(R.string.Buy_Button));\n if(dayOpen & (p.getMoney()>0)) {\n Buy.setEnabled(true);\n Buy.setTextColor(0xffffffff);\n } else if(dayOpen & (p.getLevel()>=4)){\n Buy.setEnabled(true);\n Buy.setTextColor(0xffff0000);\n } else {\n Buy.setEnabled(false);\n Buy.setTextColor(0xff000000);\n }\n Button Sell = (Button)shareData.findViewById(R.id.SellButton);\n Sell.setId(400000 + i);\n Sell.setText(getString(R.string.Sell_Button));\n if((f.getSharesOwned(i)>0) & dayOpen) {\n Sell.setEnabled(true);\n Sell.setTextColor(0xffffffff);\n } else if(p.getLevel()>=4 & !f.isShorted(i) & dayOpen){\n Sell.setEnabled(true);\n Sell.setTextColor(0xffff0000); //Red Color for short positions\n } else {\n Sell.setEnabled(false);\n Sell.setTextColor(0xff000000);\n }\n\n parentLayout.addView(shareData);\n }\n //centermain.addView(parentLayout);\n //setContentView(R.layout.activity_main);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tif (select_date.equals(\"\")) {\r\n\r\n\t\t\t\t\tToast.makeText(getActivity(), \"Please Enter Order Date\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse if (select_time.equals(\"\")) {\r\n\r\n\t\t\t\t\tToast.makeText(getActivity(), \"Please Enter Order time\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tdb = new DBAdapter(getActivity());\r\n\t\t\t\t\tdb.open();\r\n\r\n\t\t\t\t\tmenuItems = db.getRecords();\r\n\r\n\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\tJSONArray jobService = new JSONArray();\r\n\r\n\t\t\t\t\t\tString service[] = new String[menuItems.size()];\r\n\t\t\t\t\t\tString present_flag = \"0\";\r\n\t\t\t\t\t\tint j = 0;\r\n\r\n\t\t\t\t\t\tfor (int val = 0; val < menuItems.size(); val++) {\r\n\r\n\t\t\t\t\t\t\tservice[val] = \" \";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < menuItems.size(); i++) {\r\n\r\n\t\t\t\t\t\t\tJSONObject orderjsonObject = new JSONObject();\r\n\t\t\t\t\t\t\torderjsonObject.put(\"service_id\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_SERVICE_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_1\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR1_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_1\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR1));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_2\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR2_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_2\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR2));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_3\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR3_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_3\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR3));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"var_4\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_VAR4_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"customvar_4\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CUST_VAR4));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"activity_id\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_ACTIVITY_ID));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"activity_count\", menuItems\r\n\t\t\t\t\t\t\t\t\t.get(i).get(KEY_ACTIVITY_COUNT));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"price\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_SERVICE_PRICE));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"status\",\r\n\t\t\t\t\t\t\t\t\tmenuItems.get(i).get(KEY_SERVICE_STATUS));\r\n\t\t\t\t\t\t\torderjsonObject.put(\"couponCode\", menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_COUPON_CODE));\r\n\r\n\t\t\t\t\t\t\tjobService.put(orderjsonObject);\r\n\r\n\t\t\t\t\t\t\tfor (int k = 0; k <= j; k++) {\r\n\r\n\t\t\t\t\t\t\t\tif (service[k].equals(menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_ID))) {\r\n\r\n\t\t\t\t\t\t\t\t\tpresent_flag = \"1\";\r\n\t\t\t\t\t\t\t\t\tk = j + 1;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (present_flag.equals(\"0\")) {\r\n\r\n\t\t\t\t\t\t\t\tservice[j] = menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_ID);\r\n\t\t\t\t\t\t\t\tservice_details.append(menuItems.get(i).get(\r\n\t\t\t\t\t\t\t\t\t\tKEY_SERVICE_NAME)\r\n\t\t\t\t\t\t\t\t\t\t+ \",\");\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tservice_details.replace(service_details.length() - 1,\r\n\t\t\t\t\t\t\t\tservice_details.length(), \"\");\r\n\r\n\t\t\t\t\t\tJSONObject userjsonObject = new JSONObject();\r\n\t\t\t\t\t\tuserjsonObject.put(\"userEmail\", email);\r\n\t\t\t\t\t\tuserjsonObject.put(\"scheduleDate\", select_date);\r\n\t\t\t\t\t\tuserjsonObject.put(\"scheduleTime\", select_time);\r\n\t\t\t\t\t\tuserjsonObject.put(\"first_name\", firstname);\r\n\t\t\t\t\t\tuserjsonObject.put(\"last_name\", lastname);\r\n\t\t\t\t\t\tuserjsonObject.put(\"phone_no\", phone);\r\n\t\t\t\t\t\tuserjsonObject.put(\"addressId\", \"\");\r\n\t\t\t\t\t\tuserjsonObject.put(\"state\", state_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"city\", city_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"location\", location_id);\r\n\t\t\t\t\t\tuserjsonObject.put(\"land_mark\", landmark);\r\n\t\t\t\t\t\tuserjsonObject.put(\"street\", street);\r\n\t\t\t\t\t\tuserjsonObject.put(\"flat_no\", flatno);\r\n\t\t\t\t\t\tuserjsonObject.put(\"address\", address);\r\n\t\t\t\t\t\tuserjsonObject.put(\"pincode\", pincode);\r\n\t\t\t\t\t\tuserjsonObject.put(\"totalCost\", total_cost);\r\n\t\t\t\t\t\tuserjsonObject.put(\"paymentType\", payment_type);\r\n\t\t\t\t\t\tuserjsonObject.put(\"paymentStatus\", payment_status);\r\n\r\n\t\t\t\t\t\tJSONArray checkOutService = new JSONArray();\r\n\t\t\t\t\t\tcheckOutService.put(userjsonObject);\r\n\r\n\t\t\t\t\t\tJSONObject jsonObject = new JSONObject();\r\n\t\t\t\t\t\tjsonObject.put(\"checkOutService\", checkOutService);\r\n\t\t\t\t\t\tjsonObject.put(\"jobService\", jobService);\r\n\r\n\t\t\t\t\t\tJSONArray checkoutArray = new JSONArray();\r\n\t\t\t\t\t\tcheckoutArray.put(jsonObject);\r\n\r\n\t\t\t\t\t\tJSONObject checkout = new JSONObject();\r\n\t\t\t\t\t\tcheckout.put(\"checkout\", checkoutArray);\r\n\r\n\t\t\t\t\t\tcheckout_data = checkout.toString();\r\n\t\t\t\t\t\tLog.d(\"checkout\", checkout_data);\r\n\r\n\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (Utils.checkConnectivity(getActivity())) {\r\n\r\n\t\t\t\t\t\tCheckoutAsynctask get_checkout = new CheckoutAsynctask(\r\n\t\t\t\t\t\t\t\tgetActivity());\r\n\t\t\t\t\t\tget_checkout.checkoutintf = CheckoutProcessFragment.this;\r\n\t\t\t\t\t\tget_checkout.execute(checkout_data);\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < menuItems.size(); i++) {\r\n\r\n\t\t\t\t\t\t\tString checklist_id = menuItems.get(i)\r\n\t\t\t\t\t\t\t\t\t.get(KEY_CHECKOUTLIST_ID).toString();\r\n\r\n\t\t\t\t\t\t\tremove = db.deleteRecord(checklist_id);\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\tshowNetworkDialog(\"internet\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdb.close();\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Override\n @SuppressWarnings(\"ConstantConditions\")\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bank2, container, false);\n ListView collectedListDOLR = view.findViewById(R.id.coinboxDOLR);\n ListView collectedListPENY = view.findViewById(R.id.coinboxPENY);\n ListView collectedListSHIL = view.findViewById(R.id.coinboxSHIL);\n ListView collectedListQUID = view.findViewById(R.id.coinboxQUID);\n\n TextView textDate = view.findViewById(R.id.textDate);\n TextView textMoney = view.findViewById(R.id.textMoney);\n TextView textDOLR = view.findViewById(R.id.textDOLRrate);\n TextView textPENY = view.findViewById(R.id.textPENYrate);\n TextView textSHIL = view.findViewById(R.id.textSHILrate);\n TextView textQUID = view.findViewById(R.id.textQUIDrate);\n\n textDate.setText(getDate(jsonString));\n textDOLR.setText(\"DOLR: \" + Double.toString(dolrRate).substring(0, Math.min(Double.toString(dolrRate).length(), 8)));\n textPENY.setText(\"PENY: \" + Double.toString(penyRate).substring(0, Math.min(Double.toString(penyRate).length(), 8)));\n textSHIL.setText(\"SHIL: \" + Double.toString(shilRate).substring(0, Math.min(Double.toString(shilRate).length(), 8)));\n textQUID.setText(\"QUID: \" + Double.toString(quidRate).substring(0, Math.min(Double.toString(quidRate).length(), 8)));\n\n loadCollectData();\n\n collectedListDOLR.setOnItemClickListener((parent, view1, position, id) -> {\n List<List<String>> temp = getCollected();\n dolrCollected = temp.get(0);\n penyCollected = temp.get(1);\n shilCollected = temp.get(2);\n quidCollected = temp.get(3);\n String selected = parent.getItemAtPosition(position).toString().trim();\n if (selected.equals(\"\") || selected.equals(\"None\") || !(isNumeric(selected))){\n Toast.makeText(getContext(), \"No coin of this currency exists\", Toast.LENGTH_SHORT).show();\n } else {\n money += Double.valueOf(selected) * dolrRate;\n dolrCollected.remove(position);\n if (dolrCollected.isEmpty()){\n dolrCollected = Arrays.asList(\"None\");\n }\n ArrayAdapter<String> arrayAdapterDOLR = new ArrayAdapter<>(getContext(), R.layout.simplerow, dolrCollected);\n collectedListDOLR.setAdapter(arrayAdapterDOLR);\n arrayAdapterDOLR.notifyDataSetChanged();\n textMoney.setText(String.valueOf(money));\n Toast.makeText(getContext(), \"Coin has been cashed out\", Toast.LENGTH_SHORT).show();\n updateCollectedCoins();\n }\n });\n\n collectedListPENY.setOnItemClickListener((parent, view12, position, id) -> {\n List<List<String>> temp = getCollected();\n dolrCollected = temp.get(0);\n penyCollected = temp.get(1);\n shilCollected = temp.get(2);\n quidCollected = temp.get(3);\n String selected = parent.getItemAtPosition(position).toString().trim();\n if (selected.equals(\"\") || selected.equals(\"None\") || !(isNumeric(selected))){\n Toast.makeText(getContext(), \"No coin of this currency exists\", Toast.LENGTH_SHORT).show();\n } else {\n money += Double.valueOf(selected) * penyRate;\n penyCollected.remove(position);\n if (penyCollected.isEmpty()){\n penyCollected = Arrays.asList(\"None\");\n }\n ArrayAdapter<String> arrayAdapterPENY = new ArrayAdapter<>(getContext(), R.layout.simplerow, penyCollected);\n collectedListPENY.setAdapter(arrayAdapterPENY);\n arrayAdapterPENY.notifyDataSetChanged();\n textMoney.setText(String.valueOf(money));\n Toast.makeText(getContext(), \"Coin has been cashed out\", Toast.LENGTH_SHORT).show();\n updateCollectedCoins();\n }\n });\n\n collectedListSHIL.setOnItemClickListener((parent, view13, position, id) -> {\n\n List<List<String>> temp = getCollected();\n dolrCollected = temp.get(0);\n penyCollected = temp.get(1);\n shilCollected = temp.get(2);\n quidCollected = temp.get(3);\n\n String selected = parent.getItemAtPosition(position).toString().trim();\n if (selected.equals(\"\") || selected.equals(\"None\") || !(isNumeric(selected))){\n Toast.makeText(getContext(), \"No coin of this currency exists\", Toast.LENGTH_SHORT).show();\n } else{\n money += Double.valueOf(selected) * shilRate;\n shilCollected.remove(position);\n if (shilCollected.isEmpty()){\n shilCollected = Arrays.asList(\"None\");\n }\n ArrayAdapter<String> arrayAdapterSHIL = new ArrayAdapter<>(getContext(), R.layout.simplerow, shilCollected);\n collectedListSHIL.setAdapter(arrayAdapterSHIL);\n arrayAdapterSHIL.notifyDataSetChanged();\n textMoney.setText(String.valueOf(money));\n Toast.makeText(getContext(), \"Coin has been cashed out\", Toast.LENGTH_SHORT).show();\n updateCollectedCoins();\n }\n });\n\n collectedListQUID.setOnItemClickListener((parent, view14, position, id) -> {\n List<List<String>> temp = getCollected();\n dolrCollected = temp.get(0);\n penyCollected = temp.get(1);\n shilCollected = temp.get(2);\n quidCollected = temp.get(3);\n String selected = parent.getItemAtPosition(position).toString().trim();\n if (selected.equals(\"\") || selected.equals(\"None\") || !(isNumeric(selected))){\n Toast.makeText(getContext(), \"No coin of this currency exists\", Toast.LENGTH_SHORT).show();\n } else{\n money += Double.valueOf(selected) * quidRate;\n quidCollected.remove(position);\n if (quidCollected.isEmpty()){\n quidCollected = Arrays.asList(\"None\");\n }\n ArrayAdapter<String> arrayAdapterQUID = new ArrayAdapter<>(getContext(), R.layout.simplerow, quidCollected);\n collectedListQUID.setAdapter(arrayAdapterQUID);\n arrayAdapterQUID.notifyDataSetChanged();\n textMoney.setText(String.valueOf(money));\n Toast.makeText(getContext(), \"Coin has been cashed out\", Toast.LENGTH_SHORT).show();\n updateCollectedCoins();\n }\n });\n\n textMoney.setText(\"Your Money: \" + Double.toString(money).substring(0, Math.min(Double.toString(money).length(), 8)));\n\n Button switchbtn = view.findViewById(R.id.switchtype);\n switchbtn.setVisibility(View.INVISIBLE);\n\n return view;\n }",
"@Override\n\t\t\t\t\t\tpublic void onShow(DialogInterface dialog) {\n\t\t\t\t\t\t\tButton b = alert.getButton(AlertDialog.BUTTON_POSITIVE);\n\t\t\t\t\t\t\tb.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t//dist,date,empId,spmandi,spretailer,spactivity,rem\n\t\t\t\t\t\t\t\t\tif(new ConnectionDetector(context).isConnectingToInternet()){\n\t\t\t\t\t\t\t\t\t\tMyspinner sp1 = (Myspinner)districtlist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp2 = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp3 = (Myspinner)retailerslist.getSelectedItem();\n\t\t\t\t\t\t\t\t\t\tMyspinner sp4 = (Myspinner)activitieslist.getSelectedItem();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t&& mandilist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& retailerslist.getSelectedItemPosition()!=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& activitieslist.getSelectedItemPosition()!=0){\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd\").format(dt);\n\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> id = new GetData(context, db).getVillageId(villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tif(id.size()>0 && id.get(0).length()>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), id.get(0), villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew CreateActivity().execute(sp1.getValue(),date,get.getAllLogin().get(0).get(\"empid\"),sp2.getValue(),sp3.getValue(),sp4.getValue(),remarks.getText().toString(), \"0\", villages.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\talert.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tif(districtlist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select District\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mandilist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Mandi\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(retailerslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Retailer\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(activitieslist.getSelectedItemPosition()==0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"Please Select Activity\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tToast.makeText(context, \"No Network Found\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tlineid = this.getIntent().getStringExtra(\"lineid\");\r\n\t\t\r\n\t\tsetTitleText(\"\");\r\n\t\tsetRightButtonText(\"订购>>\");\r\n\t\t\r\n\t\ttvFullName = (TextView) findViewById(R.id.tv_fullname);\r\n\t\ttvFullName.setTextSize(DisplayUtil.textGetSizeSp(this, 33));\r\n\t\ttvFullName.setTypeface(Typeface.MONOSPACE,Typeface.ITALIC);\r\n\t\tRelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) tvFullName.getLayoutParams();\r\n\t\tlp.height = DisplayUtil.getSize(this, 60);\r\n\t\tlp.leftMargin = DisplayUtil.getSize(this, 24);\r\n\t\ttvFullName.setLayoutParams(lp);\r\n\t\t\r\n\t\trlPriceInfo = (RelativeLayout)findViewById(R.id.rl_price_info);\r\n\t\tlp = (RelativeLayout.LayoutParams) rlPriceInfo.getLayoutParams();\r\n\t\tlp.height = DisplayUtil.getSize(this, 106);\r\n\t\trlPriceInfo.setLayoutParams(lp);\r\n\t\t\r\n\t\ttvAdultPrice = (TextView) findViewById(R.id.tv_adult_price);\r\n\t\ttvAdultPrice.setPadding(0, 0, DisplayUtil.getSize(this, 35), DisplayUtil.getSize(this, 12));\r\n\t\ttvAdultPrice.setTextSize(DisplayUtil.textGetSizeSp(this, 27));\r\n\t\t\r\n\t\ttvKidPrice = (TextView) findViewById(R.id.tv_kid_price);\r\n\t\t\r\n\t\ttvKidPrice.setTextSize(DisplayUtil.textGetSizeSp(this, 27));\r\n\t\t\r\n\t\ttvStart = (TextView) findViewById(R.id.tv_start);\r\n\t\ttvStart.setPadding(DisplayUtil.getSize(this, 24), 0, 0, 0);\r\n\t\ttvStart.setTextSize(DisplayUtil.textGetSizeSp(this, 27));\r\n\t\t\r\n\t\tivLine = (ImageView) findViewById(R.id.iv_line);\r\n\t\tlp = (RelativeLayout.LayoutParams) ivLine.getLayoutParams();\r\n\t\tlp.rightMargin = DisplayUtil.getSize(this, 12);\r\n\t\tlp.leftMargin = lp.rightMargin;\r\n\t\tivLine.setLayoutParams(lp);\r\n\t\t\r\n\t\trlTopInfo = (RelativeLayout)findViewById(R.id.rl_top_info);\r\n\t\tLinearLayout.LayoutParams llp = (LinearLayout.LayoutParams) rlTopInfo.getLayoutParams();\r\n\t\tllp.topMargin = DisplayUtil.getSize(this, 12);\r\n\t\tllp.bottomMargin = DisplayUtil.getSize(this, 21);\r\n\t\trlTopInfo.setLayoutParams(llp);\r\n\t\t\r\n\t\tllDetail = (LinearLayout) findViewById(R.id.ll_details);\r\n\t\t//llDetail.setPadding(DisplayUtil.getSize(this, 12), 0, DisplayUtil.getSize(this, 12), DisplayUtil.getSize(this, 12));\r\n\t\t\r\n\t\tllCheckTab = (LinearLayout) findViewById(R.id.ll_check_tab);\r\n\t\tllCheckTab.setPadding(DisplayUtil.getSize(this, 12), 0, DisplayUtil.getSize(this, 12), 0);\r\n\t\t\r\n\t\tbtnCheckOne = (Button) findViewById(R.id.btn_check_one);\r\n\t\tbtnCheckOne.setOnClickListener(this);\r\n\t\tbtnCheckTwo = (Button) findViewById(R.id.btn_check_two);\r\n\t\tbtnCheckTwo.setOnClickListener(this);\r\n\t\tbtnCheckThree = (Button) findViewById(R.id.btn_check_three);\r\n\t\tbtnCheckThree.setOnClickListener(this);\r\n\t\t\r\n\t\tbtnCheckOne.setTextSize(DisplayUtil.textGetSizeSp(this, 30));\r\n\t\tbtnCheckTwo.setTextSize(DisplayUtil.textGetSizeSp(this, 30));\r\n\t\tbtnCheckThree.setTextSize(DisplayUtil.textGetSizeSp(this, 30));\r\n\t\t\r\n\t\tif(!TextUtils.isEmpty(lineid)){\r\n\t\t\tRequester.requestTravelLineInfo(handler, lineid);\r\n\t\t}\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.trafficmainpage);\n\t\tmCon = new DataBaseConnection(this);\n\n\t\txEdtSource = (EditText) findViewById(R.id.fEdtTrafficSource);\n\t\txEdtDestination = (EditText) findViewById(R.id.fEdtTrafficDestination);\n\t\txEdtTollGate = (EditText) findViewById(R.id.fEdtTollGate);\n\t\txEdtDetails = (EditText) findViewById(R.id.fEdtTrafficDetails);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.reader);\n uid_final=\"tes\";\n Log.d(\"uidFinal\",\" \"+uid_final);\n\n final Intent intent = getIntent();\n mDeviceName = intent.getStringExtra(EXTRAS_DEVICE_NAME);\n mDeviceAddress = intent.getStringExtra(EXTRAS_DEVICE_ADDRESS);\n no_WTR=intent.getStringExtra(\"no_WTR\");\n epoch = intent.getStringExtra(\"epoch\");\n id_wtr=intent.getStringExtra(\"id_wtr\");\n wh_desc_id=intent.getStringExtra(\"wh_desc_id\");\n cat_selected = intent.getStringExtra(\"cat_selected\");\n\n Log.d(\"URL_re\", \"onCreate: \"+no_WTR);\n txt_wtr=findViewById(R.id.wtr_display);\n txt_wtr.setText(no_WTR);\n\n // final View target = findViewById(R.id.circle_collapsed_target);\n //final CircleImageView circleImageView = (CircleImageView) findViewById(R.id.circle_image_view);\n\n\n //Harus satu jaringan waktu develope krn hosting lokal\n requestJsonObjectA(new VolleyCallback() {\n @Override\n public void onSuccess(JSONArray result) {\n// dataParent.add(new ParentModel(\"Judul ke-\"));\n// Log.d(\"data_parent_i\",dataParent.toString());\n for(int i = 0; i < result.length(); i++) {\n try {\n JSONObject jsonObject = result.getJSONObject(i);\n String no_WTR2= no_WTR;\n String kode_barang = jsonObject.getString(\"kode_barang\");\n String nama_barang = jsonObject.getString(\"nama_barang\");\n String qty = jsonObject.getString(\"qty\");\n String picked_qty = jsonObject.getString(\"picked_qty\");\n String sisa_qty = jsonObject.getString(\"sisa_qty\");\n //Log.d(\"no_WTR\", judul);\n dataParent.add(new ChildItem(no_WTR2,kode_barang,nama_barang,qty,picked_qty,sisa_qty));\n // dataChild.add(new ChildItem(judul));\n }\n catch(JSONException e) {\n dataParent.add(new ChildItem(\"Error: \" + e.getLocalizedMessage(),\"err\",\"err\",\"err\",\"err\",\"err\"));\n }\n }\n recyclerViewParent = (RecyclerView) findViewById(R.id.recycler_view);\n setUpView();\n }\n },no_WTR);\n recyclerViewParent = (RecyclerView) findViewById(R.id.recycler_view);\n\n\n setUpView();\n\n\n\n /* Update UI. */\n findUiViews();\n updateUi(null);\n //buttonSave\n\n /* Set the onClick() event handlers. */\n setOnClickListener();\n\n /* Initialize BluetoothReaderGattCallback. */\n mGattCallback = new BluetoothReaderGattCallback();\n\n /* Register BluetoothReaderGattCallback's listeners */\n mGattCallback\n .setOnConnectionStateChangeListener(new OnConnectionStateChangeListener() {\n\n @Override\n public void onConnectionStateChange(\n final BluetoothGatt gatt, final int state,\n final int newState) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (state != BluetoothGatt.GATT_SUCCESS) {\n /*\n * Show the message on fail to\n * connect/disconnect.\n */\n mConnectState = BluetoothReader.STATE_DISCONNECTED;\n\n if (newState == BluetoothReader.STATE_CONNECTED) {\n mTxtConnectionState\n .setText(R.string.connect_fail);\n } else if (newState == BluetoothReader.STATE_DISCONNECTED) {\n mTxtConnectionState\n .setText(R.string.disconnect_fail);\n }\n clearAllUi();\n updateUi(null);\n invalidateOptionsMenu();\n return;\n }\n\n updateConnectionState(newState);\n\n if (newState == BluetoothProfile.STATE_CONNECTED) {\n /* Detect the connected reader. */\n if (mBluetoothReaderManager != null) {\n mBluetoothReaderManager.detectReader(\n gatt, mGattCallback);\n }\n } else if (newState == BluetoothProfile.STATE_DISCONNECTED) {\n mBluetoothReader = null;\n mBluetoothReader2=null;\n /*\n * Release resources occupied by Bluetooth\n * GATT client.\n */\n if (mBluetoothGatt != null) {\n mBluetoothGatt.close();\n mBluetoothGatt = null;\n }\n }\n }\n });\n }\n });\n\n /* Initialize mBluetoothReaderManager. */\n mBluetoothReaderManager = new BluetoothReaderManager();\n\n /* Register BluetoothReaderManager's listeners */\n mBluetoothReaderManager\n .setOnReaderDetectionListener(new OnReaderDetectionListener() {\n\n @Override\n public void onReaderDetection(BluetoothReader reader) {\n updateUi(reader);\n\n if (reader instanceof Acr3901us1Reader) {\n /* The connected reader is ACR3901U-S1 reader. */\n Log.v(TAG, \"On Acr3901us1Reader Detected.\");\n } else if (reader instanceof Acr1255uj1Reader) {\n /* The connected reader is ACR1255U-J1 reader. */\n Log.v(TAG, \"On Acr1255uj1Reader Detected.\");\n } else {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(ReaderActivity.this,\n \"The device is not supported!\",\n Toast.LENGTH_SHORT).show();\n\n /* Disconnect Bluetooth reader */\n Log.v(TAG, \"Disconnect reader!!!\");\n disconnectReader();\n updateConnectionState(BluetoothReader.STATE_DISCONNECTED);\n }\n });\n return;\n }\n\n mBluetoothReader = reader;\n mBluetoothReader2= reader;\n setListener(reader);\n setListener2(reader);\n\n activateReader(reader);\n }\n });\n\n /* Connect the reader. */\n connectReader();\n\n getWindow().setSoftInputMode(\n WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n// getSupportActionBar().setTitle(mDeviceName);\n// getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }",
"public void viewActivity(View view){\n\n Button button = (Button)view;\n String title = button.getText().toString();\n\n\n int id = view.getId();\n switch (id){\n case R.id.btn1:\n Intent intent1 = new Intent(this,MakeList.class);\n startActivity(intent1);\n break;\n case R.id.btn2:\n Intent intent2 = new Intent(this,ButtonList.class);\n// intent2.putExtra(\"listNum\",listNum);\n// intent2.putStringArrayListExtra(\"arrayList\",arrayList);\n startActivity(intent2);\n break;\n case R.id.btn3:\n Intent intent3 = new Intent(this,TableVIew.class);\n startActivity(intent3);\n break;\n case R.id.btn4:\n Intent intent4 = new Intent(this,BarView.class);\n startActivity(intent4);\n break;\n case R.id.btn5:\n Intent intent5 = new Intent(this,PieView.class);\n startActivity(intent5);\n break;\n case R.id.btn6:\n Intent intent6 = new Intent(this,LineView.class);\n startActivity(intent6);\n break;\n case R.id.btn7:\n Intent intent7 = new Intent(this,Synchronization.class);\n startActivity(intent7);\n break;\n case R.id.btn8:\n Intent intent8 = new Intent(this,DbActivity.class);\n startActivity(intent8);\n break;\n }\n\n }",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n overridePendingTransition(C0373R.anim.fadein, C0373R.anim.fadeout);\n setContentView((int) C0373R.layout.activity_theory);\n setSupportActionBar((Toolbar) findViewById(C0373R.C0375id.toolbar));\n this.mAdView = (AdView) findViewById(C0373R.C0375id.t_adview);\n this.mAdView.loadAd(new Builder().build());\n this.t_ca1 = (EditText) findViewById(C0373R.C0375id.t_ca1);\n this.t_ca2 = (EditText) findViewById(C0373R.C0375id.t_ca2);\n this.t_midTerm = (EditText) findViewById(C0373R.C0375id.t_midTerm);\n this.t_tt_midTerm = (TextView) findViewById(C0373R.C0375id.t_tt_midTerm);\n this.t_attendance = (EditText) findViewById(C0373R.C0375id.t_attendance);\n this.t_report = (RelativeLayout) findViewById(C0373R.C0375id.t_report);\n this.t_cook = (Button) findViewById(C0373R.C0375id.t_cook);\n this.t_tt_target = (TextView) findViewById(C0373R.C0375id.t_tt_target);\n this.t_tt_targetMax = (TextView) findViewById(C0373R.C0375id.t_tt_targetMax);\n this.t_tt_reportFooter = (TextView) findViewById(C0373R.C0375id.t_tt_reportFooter);\n this.t_cse101 = (Button) findViewById(C0373R.C0375id.t_cse101);\n this.t_mec103 = (Button) findViewById(C0373R.C0375id.t_mec103);\n this.t_examSpinner = (Spinner) findViewById(C0373R.C0375id.t_examSpinner);\n this.t_scroll = (ScrollView) findViewById(C0373R.C0375id.t_scroll);\n this.t_cook.setOnClickListener(this.cook);\n this.t_cse101.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n Intent intent = new Intent(activity_theory.this, activity_special.class);\n intent.putExtra(\"carry\", 1);\n activity_theory.this.startActivity(intent);\n }\n });\n this.t_mec103.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n Intent intent = new Intent(activity_theory.this, activity_practical_n.class);\n intent.putExtra(\"carry\", 1);\n activity_theory.this.startActivity(intent);\n }\n });\n List<String> types = new ArrayList<>();\n types.add(\"End Term\");\n types.add(\"Reappear - 70M\");\n types.add(\"Reappear - 100M\");\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this, 17367048, types);\n dataAdapter.setDropDownViewResource(17367049);\n this.t_examSpinner.setAdapter(dataAdapter);\n this.t_examSpinner.setOnItemSelectedListener(this.examListener);\n this.t_examSpinner.requestFocus();\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }",
"public void onAddPaymentClickListner(){\n AddPayment = (Button)findViewById(R.id.btnAdd);\n\n AddPayment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addPayment(StudentIDPos, ClassIDPos);\n }\n });\n\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\tMachineSiteMain result = new MachineSiteMain();\n\t\t\t\t\t\t\t\tresult.setMachineMarksAvail(dropMarksAvails.getText().toString());\n\t\t\t\t\t\t\t\tresult.setMachineVisualInspection(dropVisualInspect.getText().toString());\n\t\t\t\t\t\t\t\tresult.setMachineWorkOrder(dropWorkingOrder.getText().toString());\n\t\t\t\t\t\t\t\tresult.setMachineManuYear(dropManufacturerYear.getText().toString());\n\t\t\t\t\t\t\t\tif (voltage_yes.isChecked()) {\n\t\t\t\t\t\t\t\t\tresult.setMachineVoltage(\"5\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult.setMachineVoltage(\"1\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (suction_yes.isChecked()) {\n\t\t\t\t\t\t\t\t\tresult.setMachineSuction(\"5\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult.setMachineSuction(\"1\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (traction_yes.isChecked()) {\n\t\t\t\t\t\t\t\t\tresult.setMachineTraction(\"5\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult.setMachineTraction(\"1\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (water_yes.isChecked()) {\n\t\t\t\t\t\t\t\t\tresult.setMachineWater(\"5\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult.setMachineWater(\"1\t\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (spare_yes.isChecked()) {\n\t\t\t\t\t\t\t\t\tresult.setMachineSpareParts(\"5\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult.setMachineSpareParts(\"1\");\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tint imachine = db.updateMachineBySI(result, machineSNo);\n\t\t\t\t\t\t\t\tint jmachine = db.updateMachineDetailsBySI(result, machineSNo);\n\n\t\t\t\t\t\t\t\tif (imachine > 0 || jmachine > 0) {\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Machine Updated Successfully\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t * if (machineDetails.getVisibility() ==\n\t\t\t\t\t\t\t\t * View.GONE) {\n\t\t\t\t\t\t\t\t * machineDetails.setVisibility(View.VISIBLE); }\n\t\t\t\t\t\t\t\t * else {\n\t\t\t\t\t\t\t\t * machineDetails.setVisibility(View.GONE); }\n\t\t\t\t\t\t\t\t */\n\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tstartActivity(getIntent());\n\n\t\t\t\t\t\t\t}",
"public void onClickOrder(View view) {\n\n //The Functions bellow are converting intiger values into strings which can then be written to the arduino via a Serial Connection\n String VodkaOrder = Integer.toString(Vodka_Measure);\n String RumOrder = Integer.toString(Rum_Measure);\n String GinOrder = Integer.toString(Gin_Measure);\n String WhiskeyOrder = Integer.toString(Whiskey_Measure);\n String TonicWaterOrder = Integer.toString(TonicWater_Measure);\n String CranberryJuiceOrder = Integer.toString(CranberryJuice_Measure);\n String OrangeJuiceOrder = Integer.toString(OrangeJuice_Measure);\n String PineappleJuiceOrder = Integer.toString(Pineapple_Measure);\n String MintOrder = Integer.toString(Mint_Measure);\n String SugarOrder = Integer.toString(Sugar_Measure);\n String LimeJuiceOrder = Integer.toString(Lime_Measure);\n String LimeSliceOrder = Integer.toString(Lime_Slice);\n String StirOrder = Integer.toString(Stir);\n String MashOrder = Integer.toString(Mash);\n String ShakeOrder = Integer.toString(Shake);\n String IceOrder = Integer.toString(Ice_Measure);\n String KaluaOrder = Integer.toString(Kalua);\n String CointreauOrder = Integer.toString(Cointreau);\n String VermouthOrder = Integer.toString(Vermouth);\n String PeachSchnappsOrder = Integer.toString(Peach_Schnapps);\n String CreamDeCacoOrder = Integer.toString(Cream_De_Cacao);\n String DrinkSizeOrder = Integer.toString(DrinkSize);\n\n //Actually writing the data to the arduino using the new strings created above\n serialPort.write(VodkaOrder.getBytes());\n serialPort.write(RumOrder.getBytes());\n serialPort.write(GinOrder.getBytes());\n serialPort.write(WhiskeyOrder.getBytes());\n serialPort.write(TonicWaterOrder.getBytes());\n serialPort.write(CranberryJuiceOrder.getBytes());\n serialPort.write(OrangeJuiceOrder.getBytes());\n serialPort.write(PineappleJuiceOrder.getBytes());\n serialPort.write(MintOrder.getBytes());\n serialPort.write(SugarOrder.getBytes());\n serialPort.write(LimeJuiceOrder.getBytes());\n serialPort.write(LimeSliceOrder.getBytes());\n serialPort.write(StirOrder.getBytes());\n serialPort.write(MashOrder.getBytes());\n serialPort.write(ShakeOrder.getBytes());\n serialPort.write(IceOrder.getBytes());\n serialPort.write(KaluaOrder.getBytes());\n serialPort.write(CointreauOrder.getBytes());\n serialPort.write(VermouthOrder.getBytes());\n serialPort.write(PeachSchnappsOrder.getBytes());\n serialPort.write(CreamDeCacoOrder.getBytes());\n serialPort.write(DrinkSizeOrder.getBytes());\n\n //A small text so the user knows what he/she ordered!\n\n tvAppend(textView, \"\\nYour Drink Order is one \" + DrinkSizeText + \" \" + DrinkName + \" (\" + DrinkType + \")\" + \"\\n\");\n\n\n\n\n myDialog.dismiss(); //Closes the popup after the order button is pressed, and order data is sent\n\n\n\n }",
"public void onClick(View v) {\n\t\t\t\textractedsample1=extractedsample.getText().toString().trim();\r\n\t\t\t\tprimerpair1=primerpair.getText().toString().trim();\r\n\t\t\t\tsuccessfull1=successfull.getText().toString().trim();\r\n\t\t\t\tdateofinput=date1.getText().toString().trim();\r\n\t\t\t\tdateofsendtosequence=date2.getText().toString().trim();\r\n\t\t\t\tif(!extractedsample1.isEmpty()){\r\n\t\t\t\t\tif(!primerpair1.isEmpty()){\r\n\t\t\t\t\t\tif(!successfull1.isEmpty()){\r\n\t\t\t\t\t\t\tif((!dateofinput.isEmpty())&&(!dateofinput.equalsIgnoreCase(\"DD/MM/YY\"))){\r\n\t\t\t\t\t\t\t\tif((!dateofsendtosequence.isEmpty())&&(!dateofsendtosequence.equalsIgnoreCase(\"DD/MM/YY\"))){\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\tboolean answer;\r\n\t\t\t\t\t\t\t\t\tanswer=isOnline();\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(answer);\r\n\r\n\t\t\t\t\t\t\t\t\tif(answer)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable(){\r\n\t\t\t\t\t\t\t\t \tpublic void run(){\r\n\t\t\t\t\t\t\t\t \t\tnew MyTask().execute(null);\r\n\t\t\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t\t\t });\r\n\t\t\t\t\t\t\t\t\t}else\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tmySQLiteAdapter = new SQLiteAdapter2(Data4.this);\r\n\t\t\t\t\t\t\t\t\tmySQLiteAdapter.openToWrite();\r\n\t\t\t\t\t\t\t\t\tmySQLiteAdapter.insert(extractedsample1, primerpair1, dateofinput, successfull1, dateofsendtosequence);\r\n//\t\t\t\t\t\t\t\t\tmySQLiteAdapter.insert(specimencode1, extractioncode1, notes1, date11, user1, boxno1, boxrow1, boxcolumn1);\r\n//\t\t\t\t\t\t\t\t\tmySQLiteAdapter.insert(generate1, genus1, specimenname1, authority1, boxno1, boxrow1, boxcolumn1, hostgenus1, hostspecimen1, locality1, latitude1, longitude1, district1, province1, country1, determinedby1, collectedby1, datacollected1, collectionnotes1, notes1, stagesex1, abundance1, comment1);\r\n\t\t\t\t\t\t\t\t\tmySQLiteAdapter.close();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"No Internet Connection Store In Offline\",Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tToast.makeText(Data4.this.getApplicationContext(), \"Select Date\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tToast.makeText(Data4.this.getApplicationContext(), \"Select Date\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tToast.makeText(Data4.this.getApplicationContext(), \"Enter The Required Field\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tToast.makeText(Data4.this.getApplicationContext(), \"Enter The Required Field\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(Data4.this.getApplicationContext(), \"Enter The Required Field\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"private void setupUI() {\n bankInput = (EditText) findViewById(R.id.bank_Input);\n startDateInput = (EditText) findViewById(R.id.start_Date_Input);\n endDateInput = (EditText) findViewById(R.id.end_Date_Input);\n amountInput = (EditText) findViewById(R.id.amount_Input);\n annualizedYieldInput = (EditText) findViewById(R.id.annualized_Yield_Input);\n expectedInterestInput = (EditText) findViewById(R.id.expected_Interest_Input);\n\n //Set Text Watcher to update interest\n bankInput.addTextChangedListener(mInterestTextWatcher);\n amountInput.addTextChangedListener(mInterestTextWatcher);\n annualizedYieldInput.addTextChangedListener(mInterestTextWatcher);\n amountInput.setOnFocusChangeListener(mOnFocusChangeListener);\n annualizedYieldInput.setOnFocusChangeListener(mOnFocusChangeListener);\n\n //set date field listener\n startDateInput.setOnFocusChangeListener(new View.OnFocusChangeListener(){\n @Override\n public void onFocusChange (View v, boolean hasFocus){\n Toast.makeText(getApplicationContext(),\"onFocusChange\",Toast.LENGTH_SHORT).show();\n if (hasFocus){\n Toast.makeText(getApplicationContext(),\"onFocusChange\",Toast.LENGTH_SHORT).show();\n showDatePicker((EditText) v, true);\n }\n }\n } );\n startDateInput.setInputType(InputType.TYPE_NULL);\n startDateInput.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n if (v.hasFocus()){\n showDatePicker((EditText)v, true);\n }\n }\n });\n endDateInput.setOnFocusChangeListener(new View.OnFocusChangeListener(){\n @Override\n public void onFocusChange (View v, boolean hasFocus){\n if (hasFocus){\n showDatePicker((EditText) v, false);\n }\n }\n } );\n endDateInput.setInputType(InputType.TYPE_NULL);\n endDateInput.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n if (v.hasFocus()){\n showDatePicker((EditText)v, false);\n }\n }\n });\n\n mSavingsBean = getIntent().getParcelableExtra(Constants.INTENT_EXTRA_SAVINGS_ITEM_PARCEL);\n if (mSavingsBean != null) {\n // set data to UI\n bankInput.setText(mSavingsBean.getBankName());\n startDateInput.setText(Utils.formatDate(mSavingsBean.getStartDate()));\n endDateInput.setText(Utils.formatDate(mSavingsBean.getEndDate()));\n amountInput.setText(Utils.formatFloat(mSavingsBean.getAmount()));\n annualizedYieldInput.setText(Utils.formatFloat(mSavingsBean.getYield()));\n expectedInterestInput.setText(Utils.formatFloat(mSavingsBean.getInterest()));\n\n // update the buttons\n ((Button) findViewById(R.id.save_Button)).setText(R.string.update);\n ((Button) findViewById(R.id.cancel_Button)).setText(R.string.delete);\n\n mEditMode = true;\n // update the data in this screen\n mStartDate = new Date(mSavingsBean.getStartDate());\n mEndDate = new Date(mSavingsBean.getEndDate());\n mAmount = mSavingsBean.getAmount();\n mYield = mSavingsBean.getYield();\n mInterest = mSavingsBean.getInterest();\n Log.d(Constants.LOG_TAG, \"Edit mode, displayed existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n\n }\n }",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\r\n\t\t\r\n\t\tcase R.id.bSQLUpdate:\r\n\t\t\tboolean did=true;\r\n\t\t\ttry{\r\n\t\t\t\tString name=sqlName.getText().toString();\r\n\t\t\t\tString detail=sqlDetail.getText().toString();\r\n\t\t\t\tString date=sqlDate.getText().toString();\r\n\t\t\t\tString location=sqlLocation.getText().toString();\r\n\t\t\t\tString year=sqlYear.getText().toString();\r\n\t\t\t\tString year1=sqlYear1.getText().toString();\r\n\t\t\t\tint a=name.length();\r\n\t\t\t\tint b=5/a;\r\n\t\t\t\ta=detail.length();\r\n\t\t\t\tb=5/a;\r\n\t\t\t\ta=date.length();\r\n\t\t\t\tb=5/a;\r\n\t\t\t\ta=location.length();\r\n\t\t\t\tb=5/a;\r\n\t\t\t\ta=year.length();\r\n\t\t\t\tb=5/a;\r\n\t\t\t\ta=year1.length();\r\n\t\t\t\tb=5/a;\r\n\t\t\t\t\r\n\t\t\t\tData entry=new Data(SQLexample.this);\r\n\t\t\tentry.open();\r\n\t\t\tentry.createEntry(name,detail,date,location,year,year1);\r\n\t\t\tentry.close();\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tdid=false;\r\n\t\t\t\t/*String error=e.toString();\r\n\t\t\t\tDialog d=new Dialog(this);\r\n\t\t\t\td.setTitle(\"Error\");\r\n\t\t\t\tTextView tv=new TextView(this);\r\n\t\t\t\ttv.setText(error);\r\n\t\t\t\td.setContentView(tv);\r\n\t\t\t\td.show();*/\r\n\t\t\t\t\r\n\t\t\t}finally{\r\n\t\t\t\tif(did){\r\n\t\t\t\tDialog d=new Dialog(this);\r\n\t\t\t\td.setTitle(\"ok\");\r\n\t\t\t\tTextView tv=new TextView(this);\r\n\t\t\t\ttv.setText(\"Data Entered Successfully\");\r\n\t\t\t\td.setContentView(tv);\r\n\t\t\t\td.show();}\r\n\t\t\telse{\r\n\t\t\t\tDialog d=new Dialog(this);\r\n\t\t\t\td.setTitle(\"alert\");\r\n\t\t\t\tTextView tv=new TextView(this);\r\n\t\t\t\ttv.setText(\"Fill all the fields**\");\r\n\t\t\t\td.setContentView(tv);\r\n\t\t\t\td.show();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase R.id.bSQLopenView:\r\n\t\t\tIntent i=new Intent(SQLexample.this,SQLView.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n\n\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_link_dog_to_owner);\n\n Button submitLinkInfo = (Button)findViewById(R.id.submitLinkInfo);\n Button goBackButton = (Button)findViewById(R.id.goBackButton);\n\n updateSpinners();\n\n\n submitLinkInfo.setOnClickListener(new View.OnClickListener()\n {\n\n public void onClick(View view)\n {\n submit();\n updateSpinners();\n finish();\n }\n\n }); // end of the submitLinkInfo callback\n\n\n goBackButton.setOnClickListener(new View.OnClickListener()\n {\n\n public void onClick(View view)\n {\n finish();\n }\n\n }); // end of the goBackButton callback\n\n\n }",
"@SuppressLint(\"DefaultLocale\")\n @Override\n protected void onPostExecute(SoapObject result) {\n\n if (pd != null && pd.isShowing() && !OutletActivity.this.isFinishing()) {\n pd.dismiss();\n }\n\n if (Flag.equalsIgnoreCase(\"0\")) {\n\n Toast.makeText(\n getApplicationContext(),\n \"Connectivity Error, Please check Internet connection!!\",\n Toast.LENGTH_SHORT).show();\n\n } else if (Flag.equalsIgnoreCase(\"1\")) {\n\n try {\n outletDetailsArraylist = new ArrayList<OutletModel>();\n Cursor cursor;\n db.open();\n cursor = db.getdata_outlet(flotername);\n\n if (cursor != null && cursor.getCount() > 0) {\n cursor.moveToFirst();\n do {\n\n outletModel = new OutletModel();\n outletModel.setBACodeOutlet(cursor.getString(cursor.getColumnIndex(\"baCodeOutlet\")));\n outletModel.setBAnameOutlet(cursor.getString(cursor.getColumnIndex(\"banameOutlet\")));\n outletModel.setOutletname(cursor.getString(cursor.getColumnIndex(\"outletname\")));\n outletModel.setFlotername(cursor.getString(cursor.getColumnIndex(\"flotername\")));\n\n outletDetailsArraylist.add(outletModel);\n } while (cursor.moveToNext());\n cursor.close();\n }\n db.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (role.equalsIgnoreCase(\"FLR\")||\n role.equalsIgnoreCase(\"ADR\")||\n role.equalsIgnoreCase(\"BP\")) {\n if (outletDetailsArraylist.size() > 0) {\n strOutletArray = new String[outletDetailsArraylist.size() + 1];\n strOutletArray[0] = \"Office\";\n for (int i = 0; i < outletDetailsArraylist.size(); i++) {\n\n strOutletArray[i + 1] = outletDetailsArraylist.get(i).getOutletname() + \"(\" +\n outletDetailsArraylist.get(i).getBAnameOutlet() + \"-\" +\n outletDetailsArraylist.get(i).getBACodeOutlet() + \")\";\n }\n }\n } else {\n if (outletDetailsArraylist.size() > 0) {\n strOutletArray = new String[outletDetailsArraylist.size()];\n\n for (int i = 0; i < outletDetailsArraylist.size(); i++) {\n\n strOutletArray[i] = outletDetailsArraylist.get(i).getOutletname();\n\n }\n }\n }\n if (outletDetailsArraylist != null && outletDetailsArraylist.size() > 0) {\n ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(OutletActivity.this, android.R.layout.simple_list_item_1, strOutletArray) {\n @Override\n public View getDropDownView(int position, View convertView, ViewGroup parent) {\n View v = null;\n // If this is the initial dummy entry, make it hidden\n if (position == 0) {\n TextView tv = new TextView(getContext());\n tv.setHeight(0);\n tv.setVisibility(View.GONE);\n v = tv;\n } else {\n // Pass convertView as null to prevent reuse of special case views\n v = super.getDropDownView(position, null, parent);\n }\n // Hide scroll bar because it appears sometimes unnecessarily, this does not prevent scrolling\n parent.setVerticalScrollBarEnabled(false);\n return v;\n }\n };\n\n adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n outlet.setAdapter(adapter1);\n }\n }\n\n\n }",
"private void clickAddAndSave(boolean visit, final boolean isCensor, String censorId, String censorName) {\n callLoading(2);\n\n String _date = ((TextView) findViewById(R.id.Date)).getText().toString(); //拜访日期\n String _place = ((TextView) findViewById(R.id.Place)).getText().toString(); //地点\n// String companyData = ((TextView) findViewById(R.id.Company)).getText().toString(); //客户\n// String targetData = ((TextView) findViewById(R.id.Target)).getText().toString(); //对象\n String _todo = ((EditText) findViewById(R.id.Todo)).getText().toString(); //目的\n int _type = ((Spinner) findViewById(R.id.Type)).getSelectedItemPosition(); //类型\n String _record = ((EditText) findViewById(R.id.Record)).getText().toString(); //记录\n int _result = ((Spinner) findViewById(R.id.Result)).getSelectedItemPosition(); //结果\n String _remark = ((EditText) findViewById(R.id.Remark)).getText().toString(); //备注\n String _tape = visitContentFragment.getTapeList().toString(); //录音\n Log.e(\"tapeList.toString() = \", _tape);\n _tape = _tape.substring(1, _tape.length() - 1);\n\n\n if (isAdding) {\n isAdding = false;\n ++MaxId;\n if (tmpTargetId == null) {\n tmpTargetId = new int[0];\n }\n if (tmpTarget == null) {\n tmpTarget = new String[0];\n }\n if (tmpCompany == null) {\n tmpCompany = \"\";\n }\n VisitData AddVisitData = new VisitData(MaxId, UID, UID, UNAME, _date, _place,\n tmpCompanyId, tmpCompany, tmpTargetId, tmpTarget, _todo,\n _type, _record, _result, _remark, _tape);\n String dataStr = AddVisitData.getAddSQLString();\n visitJsonList.add(\n new VisitJSONOperate()\n .setAct(this)\n .setFragment(visitOverviewFragment)\n .setUID(UID)\n .addJson(AddVisitData));\n\n } else {\n final VisitContentFragment v = visitContentFragment;\n if (tmpTargetId == null) {\n tmpTargetId = v.getTargetId();\n }\n if (tmpTarget == null) {\n tmpTarget = v.getTarget();\n }\n if (tmpCompanyId == -1) {\n tmpCompanyId = v.getCompanyId();\n }\n if (tmpCompany == null) {\n tmpCompany = v.getCompany();\n }\n VisitData updateVisitData = new VisitData(v.getVisitId(), UID, v.getSubmitId(), v.getSubmitName(),\n _date, v.getDateInt(), _place, tmpCompanyId, tmpCompany, tmpTargetId, tmpTarget,\n _todo, _type, _record, _result, _remark, _tape, v.getCondition(),\n v.getPartnerId(), v.getPartnerName(), v.getPidL(), v.getPidC(), v.getIsTemp(), null, null);\n\n if (visit) {\n// NotificationManager notifiManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n// notifiManager.cancel(0);\n// isVisiting = false;\n updateVisitData.setCondition(2);\n }\n\n if (isCensor) {\n updateVisitData.setCensor(censorId, censorName).setCondition(4);\n approvalJsonList.add(new ApprovalJSONOperate(UID).setAct(this).submit(updateVisitData));\n visitJsonList.add(\n new VisitJSONOperate()\n .setAct(this)\n .setFragment(visitOverviewFragment)\n .setUID(UID)\n .updateJson(updateVisitData));\n } else {\n visitJsonList.add(\n new VisitJSONOperate()\n .setAct(this)\n .setFragment(visitOverviewFragment)\n .setUID(UID)\n .updateJson(updateVisitData));\n }\n }\n setLoadingText(\"正在保存至远程服务器...\");\n// Toast.makeText(this, \"正在保存至远程服务器...\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(View v) {\n if (isEmptyEditText(budget_max) || isEmptyEditText(base)) {\n Toast.makeText(AddModule.this, R.string.error_msg_all_fields, Toast.LENGTH_SHORT).show();\n return;\n }\n\n else {\n\n JSONObject json = new JSONObject();\n JSONObject moduleJson = new JSONObject();\n try {\n moduleJson.put(\"max_budget\",Float.parseFloat(budget_max.getText().toString()));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n try {\n moduleJson.put(\"base\",Float.parseFloat(base.getText().toString()));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n try {\n json.put(\"budgetmodule_form\",moduleJson);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n TypedInput in = new TypedByteArray(\"application/json\", json.toString().getBytes());\n\n BudgetModuleService service = BudgetModuleAPI.getInstance();\n service.addBudgetModule(event.getId(), in, new Callback<Response>() {\n @Override\n public void success(Response s, Response response) {\n Toast.makeText(AddModule.this, \"Le module a bien été ajouté!\", Toast.LENGTH_SHORT).show();\n finish();\n }\n\n @Override\n public void failure(RetrofitError error) {\n error.printStackTrace();\n finish();\n }\n });\n }\n dialog.dismiss();\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView=inflater.inflate(R.layout.fragment_serv_frag1, container, false);\n Button btn1= (Button) rootView.findViewById(R.id.btnP1);\n Button btn2= (Button) rootView.findViewById(R.id.btnP2);\n Button btn3= (Button) rootView.findViewById(R.id.btnP3);\n Button btnm1= (Button) rootView.findViewById(R.id.btnM1);\n Button btnm2= (Button) rootView.findViewById(R.id.btnM2);\n Button btnm3= (Button) rootView.findViewById(R.id.btnM3);\n Button btn_cart=(Button) rootView.findViewById(R.id.btn_cart);\n ArrayList<String> orders= new ArrayList<>();\n final int quant1,quant2,quant3;\n quant1=quant2=quant3=0;\n\n\n if (getArguments().getString(\"flag\")==\"OilChange\") {\n btn1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n cart_data.OilChange = \"Gold\";\n //cart_data.costOil=cart_data.OilGold;\n int cost= cart_data.OilGold;\n add_to_cart(\"Oil\",\"Oil Change: Gold Package, \"+cost+\" Rs\", cost);\n }\n });\n btn2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n cart_data.OilChange = \"Silver\";\n int cost=cart_data.OilSilver;\n add_to_cart(\"Oil\",\"Oil Change: Silver Package, \"+cost+\" Rs\", cost);\n }\n });\n btn3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n cart_data.OilChange = \"Bronze\";\n int cost=cart_data.OilBronze;\n add_to_cart(\"Oil\",\"Oil Change: Bronze Package, \"+cost+\" Rs\", cost);\n }\n });\n btnm1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n remove_from_cart(\"Oil\",\"Gold\"); }\n });\n btnm2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n remove_from_cart(\"Oil\",\"Silver\"); }\n });\n btnm3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n remove_from_cart(\"Oil\",\"Bronze\"); }\n });\n }\n else{\n btn1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n int cost=cart_data.CarGold;\n add_to_cart(\"Wash\",\"Car Wash: Gold Package,\"+cost+ \" Rs\",cost);\n\n }\n });\n btn2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n int cost=cart_data.CarSilver;\n add_to_cart(\"Wash\",\"Car Wash: Silver Package, \"+cost+\" Rs\", cost);\n }\n });\n btn3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n int cost=cart_data.CarBronze;\n add_to_cart(\"Wash\", \"Car Wash: Bronze Package, \"+cost+\" Rs\", cost);\n }\n });\n btnm1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n remove_from_cart(\"Wash\",\"Gold\"); }\n });\n btnm2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n remove_from_cart(\"Wash\",\"Silver\");}\n });\n btnm3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n remove_from_cart(\"Wash\",\"Bronze\");}\n });\n\n }\n\n btn_cart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n for (Map.Entry mapElement : cart_data.dict.entrySet()) {\n String key = (String) mapElement.getKey();\n\n String value = (String) mapElement.getValue();\n int colon= value.indexOf(\":\")+2;\n int comma = value.indexOf(\",\");\n value = value.substring(colon, comma).replaceAll(\" Package\",\"\");\n if (key==\"Oil\"){cart_data.OilChange=value;}\n else{cart_data.CarWash=value;}\n\n }\n if(cart_data.CarWash.equals(\"\") && cart_data.OilChange.equals(\"\")){\n Toast.makeText(getActivity(),\"Your cart is empty!\", Toast.LENGTH_LONG).show();\n }\n else {\n Intent Cart = new Intent(getActivity(), Cart.class);\n startActivity(Cart);\n }\n }\n });\n\n\n\n /////////////////////////////////////////////////////////\n final TextView p_info= (TextView) rootView.findViewById(R.id.p_info);\n final TextView p_info2= (TextView) rootView.findViewById(R.id.p_info2);\n final TextView p_info3= (TextView) rootView.findViewById(R.id.p_info3);\n final TextView p_cost= (TextView) rootView.findViewById(R.id.p_cost);\n final TextView p_cost2= (TextView) rootView.findViewById(R.id.p_cost2);\n final TextView p_cost3= (TextView) rootView.findViewById(R.id.p_cost3);\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n\n final ArrayList<String> gold_list= new ArrayList<>();\n final ArrayList<String> silver_list= new ArrayList<>();\n final ArrayList<String> bronze_list= new ArrayList<>();\n final DatabaseReference ref= database.getReference(\"Packages\");\n\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (getArguments().getString(\"flag\")==\"CarWash\") {\n\n\n for (DataSnapshot servSnapshot : dataSnapshot.child(\"CarWash\").child(\"Gold\").child(\"Services\").getChildren()) {\n String txt = servSnapshot.getValue(String.class);\n gold_list.add(txt);\n }\n String to_disp=prepare_string(gold_list);\n\n\n\n for (DataSnapshot servSnapshot : dataSnapshot.child(\"CarWash\").child(\"Silver\").child(\"Services\").getChildren()) {\n String txt = servSnapshot.getValue(String.class);\n silver_list.add(txt);\n }\n String to_disp2=prepare_string(silver_list);\n\n for (DataSnapshot servSnapshot : dataSnapshot.child(\"CarWash\").child(\"Bronze\").child(\"Services\").getChildren()) {\n String txt = servSnapshot.getValue(String.class);\n bronze_list.add(txt);\n }\n String to_disp3=prepare_string(bronze_list);\n\n p_info.setText(Html.fromHtml(to_disp));\n p_info2.setText(Html.fromHtml(to_disp2));\n p_info3.setText(Html.fromHtml(to_disp3));\n\n cart_data.CarGold=Integer.parseInt(dataSnapshot.child(\"CarWash\").child(\"Gold\").child(\"Cost\").getValue(String.class));\n cart_data.CarSilver=Integer.parseInt(dataSnapshot.child(\"CarWash\").child(\"Silver\").child(\"Cost\").getValue(String.class));\n cart_data.CarBronze = Integer.parseInt(dataSnapshot.child(\"CarWash\").child(\"Bronze\").child(\"Cost\").getValue(String.class));\n\n p_cost.setText(cart_data.CarGold+\"\");\n p_cost2.setText(cart_data.CarSilver+\"\");\n p_cost3.setText(cart_data.CarBronze+\"\");\n }\n else {\n for (DataSnapshot servSnapshot : dataSnapshot.child(\"OilChange\").child(\"Gold\").child(\"Services\").getChildren()) {\n String txt = servSnapshot.getValue(String.class);\n gold_list.add(txt);\n }\n\n String to_disp= prepare_string(gold_list);\n for (DataSnapshot servSnapshot : dataSnapshot.child(\"OilChange\").child(\"Silver\").child(\"Services\").getChildren()) {\n String txt = servSnapshot.getValue(String.class);\n silver_list.add(txt);\n }\n String to_disp2= prepare_string(silver_list);\n for (DataSnapshot servSnapshot : dataSnapshot.child(\"OilChange\").child(\"Bronze\").child(\"Services\").getChildren()) {\n String txt = servSnapshot.getValue(String.class);\n bronze_list.add(txt);\n }\n String to_disp3= prepare_string(bronze_list);\n\n p_info.setText(Html.fromHtml(to_disp));\n p_info2.setText(Html.fromHtml(to_disp2));\n p_info3.setText(Html.fromHtml(to_disp3));\n\n cart_data.OilGold= Integer.parseInt(dataSnapshot.child(\"OilChange\").child(\"Gold\").child(\"Cost\").getValue(String.class));\n cart_data.OilSilver=Integer.parseInt(dataSnapshot.child(\"OilChange\").child(\"Silver\").child(\"Cost\").getValue(String.class));\n cart_data.OilBronze= Integer.parseInt(dataSnapshot.child(\"OilChange\").child(\"Bronze\").child(\"Cost\").getValue(String.class));\n\n p_cost.setText(cart_data.OilGold+\"\");\n p_cost2.setText(cart_data.OilSilver+\"\");\n p_cost3.setText(cart_data.OilBronze+\"\");\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(getActivity(),\"Error Fetching From DataBase\", Toast.LENGTH_LONG).show();\n\n }\n });\n\n return rootView;\n //return inflater.inflate(R.layout.fragment_serv_frag1, container, false);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.update_package);\n session = new Session(this);\n retrofit = Singleton.getRetrofit();\n package_name = (EditText) findViewById(R.id.packageName);\n Places = (EditText) findViewById(R.id.packagePlaces);\n guide = (Spinner) findViewById(R.id.tour_Guide);\n fromDateEtxt = (EditText) findViewById(R.id.etxt_fromdate);\n toDateEtxt = (EditText) findViewById(R.id.etxt_todate);\n description = (EditText) findViewById(R.id.packageDescription);\n Button Update = (Button) findViewById(R.id.updatePackage);\n Button delete = (Button) findViewById(R.id.deletePackage);\n Toolbar mToolbar = (Toolbar) findViewById(R.id.nav_actionbar);\n fromDateEtxt.setInputType(InputType.TYPE_NULL);\n fromDateEtxt.requestFocus();\n toDateEtxt = (EditText) findViewById(R.id.etxt_todate);\n toDateEtxt.setInputType(InputType.TYPE_NULL);\n setGuideSpinner();\n dateFormatter = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.ENGLISH);\n setDateTimeField();\n Intent i = getIntent();\n mode = i.getExtras().getInt(\"Mode\");\n if (mode == 1) {\n Places.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ToEgyptAPI api = retrofit.create(ToEgyptAPI.class);\n api.getPlaces().enqueue(new Callback<ResultPlaceSet>() {\n @Override\n public void onResponse(Call<ResultPlaceSet> call, Response<ResultPlaceSet> response) {\n places = response.body().getValue();\n checkedItem = new boolean[places.size()];\n }\n\n @Override\n public void onFailure(Call<ResultPlaceSet> call, Throwable t) {\n Toast.makeText(UpdatePackage.this, \"Error ,Please Check your internet connection\", Toast.LENGTH_SHORT).show();\n //progressDialog.dismiss();\n }\n });\n }\n });\n package_id = i.getExtras().getInt(\"package_id\");\n setForms(package_id);\n mToolbar.setTitle(\"Update Package\");\n Update.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Toast.makeText(UpdatePackage.this, \"Package updated\", Toast.LENGTH_SHORT).show();\n }\n });\n delete.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(UpdatePackage.this);\n alertDialog.setTitle(\"Confirm Delete ..\");\n alertDialog.setMessage(\"Are you sure you want delete this Package?\");\n alertDialog.setIcon(R.drawable.delete);\n alertDialog.setPositiveButton(\"YES\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n ToEgyptAPI api = retrofit.create(ToEgyptAPI.class);\n api.deletePackage(package_id).enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n if (response.isSuccess()) {\n Toast.makeText(UpdatePackage.this, \"Deleted sucssfully\", Toast.LENGTH_SHORT).show();\n Intent i_to_admin = new Intent(UpdatePackage.this, Admin.class);\n startActivity(i_to_admin);\n finish();\n }\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n\n }\n });\n // Write your code here to execute after dialog\n }\n });\n alertDialog.setNegativeButton(\"NO\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Write your code here to execute after dialog\n\n dialog.cancel();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n }\n });\n\n\n } else if (mode == 2) {\n mToolbar.setTitle(\"Create Package\");\n Update.setVisibility(View.GONE);\n delete.setText(\"Create\");\n delete.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n DateFormat format = new SimpleDateFormat(\"MMMM d, yyyy\", Locale.ENGLISH);\n packag packag1 = new packag();\n packag1.setName(package_name.getText().toString());\n packag1.setGuide_id(((user) guide.getSelectedItem()).getId());\n packag1.setDescription(description.getText().toString());\n Date date;\n try {\n date = format.parse(fromDateEtxt.getText().toString());\n packag1.setStart_date(date);\n packag1.setEnd_date(format.parse(toDateEtxt.getText().toString()));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n \n\n\n Toast.makeText(UpdatePackage.this, \"Package created\", Toast.LENGTH_SHORT).show();\n }\n });\n } else if (mode == 3) { // pckg details\n package_id = i.getExtras().getInt(\"package_id\");\n setForms(package_id);\n mToolbar.setTitle(\"Package Details\");\n package_name.setCursorVisible(false);\n package_name.setFocusable(false);\n description.setCursorVisible(false);\n description.setFocusable(false);\n Update.setVisibility(View.GONE);\n delete.setText(\"Join\");\n delete.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(UpdatePackage.this);\n alertDialog.setTitle(\"Confirm Join ..\");\n alertDialog.setMessage(\"Are you sure you want Join to this Package?\");\n alertDialog.setIcon(R.drawable.success);\n alertDialog.setPositiveButton(\"YES\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Write your code here to execute after dialog\n\n reserved_package reservedPackage = new reserved_package();\n reservedPackage.setPackage_id(package_id);\n reservedPackage.setTourist_id(session.getUserId());\n ToEgyptAPI api = retrofit.create(ToEgyptAPI.class);\n api.reserve(reservedPackage).enqueue(new Callback<reserved_package>() {\n @Override\n public void onResponse(Call<reserved_package> call, Response<reserved_package> response) {\n Toast.makeText(UpdatePackage.this, \"added to your package\", Toast.LENGTH_SHORT).show();\n finish();\n }\n\n @Override\n public void onFailure(Call<reserved_package> call, Throwable t) {\n Toast.makeText(UpdatePackage.this, \"Error ,Please Check your internet connection\", Toast.LENGTH_SHORT).show();\n //progressDialog.dismiss();\n }\n });\n\n\n }\n });\n alertDialog.setNegativeButton(\"NO\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // Write your code here to execute after dialog\n\n dialog.cancel();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n }\n });\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n LoadingDialogManager.getInstance().DismissLoading();\n View retView = inflater.inflate(R.layout.mbta_reliability, container, false);\n TextView commuterReli = (TextView) retView.findViewById(R.id.commuter_reliability);\n TextView trainReli = (TextView) retView.findViewById(R.id.rail_reliability);\n TextView busReli = (TextView) retView.findViewById(R.id.bus_reliability);\n\n try {\n //Get the data\n HashMap<String, String> reliData = BackOnTrackData.getInstance().getReliabilityForTransType();\n HashMap<String, String> targetData = BackOnTrackData.getInstance().getTargetForTransType();\n\n //Get commuter rail data as int\n int comReli = getIntPercentage(reliData, BackOnTrackData.TransitTypes.COMMUTER);\n int comTar = getIntPercentage(targetData, BackOnTrackData.TransitTypes.COMMUTER);\n\n //Subway data\n int trainReliPer = getIntPercentage(reliData, BackOnTrackData.TransitTypes.RAIL);\n int trainTarPer = getIntPercentage(targetData, BackOnTrackData.TransitTypes.RAIL);\n\n //Bus data\n int busReliPer = getIntPercentage(reliData, BackOnTrackData.TransitTypes.BUS);\n int busTarPer = getIntPercentage(targetData, BackOnTrackData.TransitTypes.BUS);\n\n //Set the text fields\n commuterReli.setText(comReli + \"%\"\n + \"/\" + comTar + \"%\");\n trainReli\n .setText(trainReliPer + \"%\"\n + \"/\" + trainTarPer + \"%\");\n busReli\n .setText(busReliPer + \"%\"\n + \"/\" + busTarPer + \"%\");\n }\n catch (Exception e)\n {\n Log.e(\"ReliabilityFragment\", \"Error: \" + e.getMessage());\n }\n\n //Set up button for seeing additional statistics (Open Back on track site)\n Button openMBTASiteBtn = (Button) retView.findViewById(R.id.mbta_site_open_btn);\n openMBTASiteBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Give the extra for the URL and create intent for opening webViewAct\n Intent opnWebIntent = new Intent(getActivity(), WebViewActivity.class);\n opnWebIntent.putExtra(\"url\", \"http://www.mbtabackontrack.com/performance/index.html#/home\");\n startActivity(opnWebIntent);\n }\n });\n\n return retView;\n }",
"public void onClick(View v) {\r\n\t\t//Retorno para mensagem ao usuário\r\n\t\tString sLigaDesliga = \"\";\r\n\t\t\r\n\t\tswitch (v.getId()) {\r\n\r\n\t\tcase R.id.tgbGeral:\r\n\t\t\ttgbGeral.setChecked(ws.sensorDigital(\"ONOFF\"));\r\n\t\t\tif (tgbGeral.isChecked())\r\n\t\t\t\tsLigaDesliga =\"Ligado!\";\r\n\t\t\telse\r\n\t\t\t\tsLigaDesliga=\"Desligado!\";\r\n\t\t\t\t\t\t\r\n\t\t\tms.showToast(\"Alarme \" + sLigaDesliga ,this) ;\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase R.id.btnTemperatura:\r\n\t\t\tString sretorno = ws.DHT();\r\n\t\t\tString [] DHT = sretorno.split(Pattern.quote(\";\"));\r\n\t\t\tbtnTemperatura.setText(\"Umidade: \" + DHT[0] + \"% \\n\" + \"Temperatura: \" + DHT[1] + \" ºC\");\r\n\t\t\tms.showToast(\"Umidade: \" + DHT[0] + \"% \\n\" + \"Temperatura: \" + DHT[1] + \" ºC\",this) ;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase R.id.tgbMovimento:\r\n\t\t\ttgbMovimento.setChecked(ws.sensorDigital(\"MOVIMENTO\"));\r\n\t\t\tif (tgbMovimento.isChecked())\r\n\t\t\t\tsLigaDesliga =\" Ligado!\";\r\n\t\t\telse\r\n\t\t\t\tsLigaDesliga=\" Desligado!\";\r\n\t\t\t\r\n\t\t\tms.showToast(txtLegenda.getText() + \"\" + tgbMovimento.getText() + \"\\n\" + sLigaDesliga ,this) ;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase R.id.tgbFogo:\r\n\t\t\ttgbfogo.setChecked(ws.sensorDigital(\"FOGO\"));\r\n\t\t\tif (tgbfogo.isChecked())\r\n\t\t\t\tsLigaDesliga =\" Ligado!\";\r\n\t\t\telse\r\n\t\t\t\tsLigaDesliga=\" Desligado!\";\r\n\t\t\tms.showToast(txtLegenda.getText() + \" \" + tgbfogo.getText() + \"\\n\" +sLigaDesliga ,this) ;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void addButtonClicked() {\n //region Description\n String name = person_name.getText().toString().trim();\n if (name.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Name\", Toast.LENGTH_LONG).show();\n return;\n }\n String no = contact_no.getText().toString().trim();\n if (no.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Contact No.\", Toast.LENGTH_LONG).show();\n return;\n }\n String nName = nickName.getText().toString().trim();\n if (nName.equals(\"\")) {\n nName = \"N/A\";\n }\n String Custno = rootNo.getText().toString().trim();\n if (Custno.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Customer No.\", Toast.LENGTH_LONG).show();\n return;\n }\n float custNo = Float.parseFloat(Custno);\n\n String Fees = monthly_fees.getText().toString().trim();\n if (Fees.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the monthly fees\", Toast.LENGTH_LONG).show();\n return;\n }\n int fees = Integer.parseInt(Fees);\n\n String Balance = balance_.getText().toString().trim();\n if (Balance.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the balance\", Toast.LENGTH_LONG).show();\n return;\n }\n int balance = Integer.parseInt(Balance);\n String date = startdate.getText().toString().trim();\n if (startdate.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Start Date\", Toast.LENGTH_LONG).show();\n return;\n }\n //endregion\n dbHendler.addPerson(new PersonInfo(name, no, custNo, fees, balance, areaId, date, nName), this);\n person_name.setText(\"\");\n contact_no.setText(\"\");\n rootNo.setText(\"\");\n monthly_fees.setText(\"\");\n balance_.setText(\"\");\n nickName.setText(\"\");\n // Toast.makeText(getApplicationContext(), name + \" Saved\", Toast.LENGTH_LONG).show();\n\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n\n HOSTEL_NAME = \"NULL\";\n ONE_PREFERENCE = \"NULL\";\n TWO_PREFERENCE = \"NULL\";\n THREE_PREFERENCE = \"NULL\";\n\n settingUpVariables();\n settingUpSpinners();\n buttonClickListeners();\n editTextClickListeners();\n spinnerClickListeners();\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n toolbar.setTitle(\"NSS Recruitment\");\n toolbar.setLogo(getResources().getDrawable(R.drawable.nss_bits));\n setSupportActionBar(toolbar);\n\n\n\n db = openOrCreateDatabase(\"StudentDB\", Context.MODE_PRIVATE, null);\n db.execSQL(\"CREATE TABLE IF NOT EXISTS student(rollno VARCHAR,\" +\n \"name VARCHAR,\" +\n \"marks VARCHAR,\" +\n \"hostel VARCHAR,\" +\n \"room VARCHAR,\" +\n \"first_pref VARCHAR,\" +\n \"second_pref VARCHAR,\" +\n \"third_pref VARCHAR);\");\n db.execSQL(\"CREATE TABLE IF NOT EXISTS addedBy(name VARCHAR);\");\n\n\n db.execSQL(\"INSERT INTO addedBy VALUES('NULL');\");\n\n }",
"private void initInstances(View rootView) {\n editText_CompanyAddress = (EditText) rootView.findViewById(R.id.editText_CompanyAddress);\n editText_CompanyName = (EditText) rootView.findViewById(R.id.editText_CompanyName);\n editText_Telephone = (EditText) rootView.findViewById(R.id.editText_Telephone);\n editText_Name_TAXID = (EditText)rootView.findViewById(R.id.editText_Name_TAXID);\n editText_Name_Division = (EditText)rootView.findViewById(R.id.editText_Name_Division);\n editText_Name_RegisterID = (EditText)rootView.findViewById(R.id.editText_Name_RegisterID);\n editText_Name_ENDbillText = (EditText)rootView.findViewById(R.id.editText_Name_ENDbillText);\n editText_Name_VATRate = (EditText)rootView.findViewById(R.id.editText_Name_VATRate);\n btn_UpdateCompany = (ButtonRectangle) rootView.findViewById(R.id.btn_UpdateCompany);\n btn_back = (ImageButton)rootView.findViewById(R.id.btn_back);\n btn_back.setOnClickListener(this);\n btn_UpdateCompany.setOnClickListener(this);\n btn_UpdateCompany.setRippleSpeed(25);\n\n\n }",
"private void initControls() {\n Log.e(\"sha1\",sHA1(this));\n\n// back.setOnClickListener(this);\n load_view.setOnRetryListener(new LoadingView.OnRetryListener() {\n @Override\n public void OnRetry() {\n requestCarBrandData();\n }\n });\n }"
] | [
"0.6706787",
"0.6606369",
"0.6577346",
"0.65203726",
"0.64532197",
"0.63536835",
"0.6344221",
"0.63375473",
"0.6336057",
"0.6315664",
"0.6288017",
"0.62165",
"0.6205851",
"0.6193124",
"0.61864614",
"0.6161641",
"0.61613667",
"0.61575615",
"0.6148313",
"0.6131906",
"0.6110925",
"0.6065569",
"0.6056777",
"0.60381097",
"0.6033213",
"0.60080403",
"0.5990716",
"0.59896666",
"0.59733635",
"0.5965411",
"0.5963977",
"0.59554195",
"0.59429187",
"0.59387213",
"0.59306103",
"0.5924462",
"0.59228253",
"0.590748",
"0.59062135",
"0.5902007",
"0.5890645",
"0.5883632",
"0.5882387",
"0.58788145",
"0.5874144",
"0.5869596",
"0.58673483",
"0.5866425",
"0.58615094",
"0.5859493",
"0.5854584",
"0.5847168",
"0.5842522",
"0.58401394",
"0.5835441",
"0.583315",
"0.58305645",
"0.58292097",
"0.58275664",
"0.58258665",
"0.5824408",
"0.58180106",
"0.58135873",
"0.5809845",
"0.5807068",
"0.580387",
"0.57962966",
"0.5795531",
"0.57891685",
"0.57815766",
"0.5777172",
"0.5775839",
"0.5772173",
"0.577023",
"0.5768279",
"0.5767168",
"0.5764781",
"0.576142",
"0.575868",
"0.57547975",
"0.5750783",
"0.5748091",
"0.5745031",
"0.5741174",
"0.5740242",
"0.5737784",
"0.57330215",
"0.5726197",
"0.57242846",
"0.57230264",
"0.5717807",
"0.5714643",
"0.57104206",
"0.5701328",
"0.5697668",
"0.5693472",
"0.5691855",
"0.56906694",
"0.56847",
"0.5680132",
"0.5680023"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
switch (v.getId()) {
// case R.id.linear_back:
// // 返回键处理
// onBackPressed();
// break;
// case R.id.base_activity_title_backicon:
// // 返回键处理
// onBackPressed();
// break;
//
// case R.id.base_activity_load_fail_reload:
//
// * 数据加载失败重新加载数据
//
// showReloadView();
// reloadCallback();
// break;
//
// case R.id.base_activity_no_data:
//
// * 网络异常页面事件
//
// showReloadView();
// reloadCallback();
// break;
//
// case R.id.base_activity_no_network:
//
// * 网络不给力,点击屏幕刷新
//
// showReloadView();
// reloadCallback();
// break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onBackPressed() {
InputMethodManager imm0 = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm0.hideSoftInputFromWindow(ivBack.getWindowToken(), 0);
super.onBackPressed();
// ActivityManagerUtil.getActivityManager().finishActivity(this);
// this.overridePendingTransition(R.anim.back_left_into,
// R.anim.back_right_out);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onDestroy() {
super.onDestroy();
// 结束Activity从堆栈中移除
// ActivityManagerUtil.getActivityManager().finishActivity(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66713095",
"0.6567948",
"0.652319",
"0.648097",
"0.64770466",
"0.64586824",
"0.64132667",
"0.6376419",
"0.62759",
"0.62545097",
"0.62371093",
"0.62237984",
"0.6201738",
"0.619477",
"0.619477",
"0.61924416",
"0.61872935",
"0.6173417",
"0.613289",
"0.6127952",
"0.6080854",
"0.6076905",
"0.6041205",
"0.6024897",
"0.60200036",
"0.59985113",
"0.5967729",
"0.5967729",
"0.5965808",
"0.5949083",
"0.5941002",
"0.59236866",
"0.5909713",
"0.59030116",
"0.589475",
"0.58857024",
"0.58837134",
"0.586915",
"0.58575684",
"0.5850424",
"0.5847001",
"0.5824116",
"0.5810248",
"0.5809659",
"0.58069366",
"0.58069366",
"0.5800507",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.57900196",
"0.5790005",
"0.578691",
"0.578416",
"0.578416",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5761079",
"0.57592577",
"0.57592577",
"0.5749888",
"0.5749888",
"0.5749888",
"0.5748457",
"0.5733414",
"0.5733414",
"0.5733414",
"0.57209575",
"0.57154554",
"0.57149583",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.571194",
"0.57043016",
"0.56993437",
"0.5696782",
"0.5687825",
"0.5677794",
"0.5673577",
"0.5672046",
"0.5669512",
"0.5661156",
"0.56579345",
"0.5655569",
"0.5655569",
"0.5655569",
"0.56546396",
"0.56543446",
"0.5653163",
"0.56502634"
] | 0.0 | -1 |
Constructor with all parameters | public Address(int number, String street, String city, String country) {
this.number = number;
this.street = street;
this.city = city;
this.country = country;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Constructor(){\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"public Parameters() {\n\t}",
"public BaseParameters(){\r\n\t}",
"private Params()\n {\n }",
"private Instantiation(){}",
"public ModuleParams()\n\t{\n\t}",
"public Curso() {\r\n }",
"defaultConstructor(){}",
"public Pasien() {\r\n }",
"private void __sep__Constructors__() {}",
"public void init(Object[] parameters) {\n\n\t}",
"protected abstract void construct();",
"public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"public ModuleParams() {\n }",
"public PSRelation()\n {\n }",
"Reproducible newInstance();",
"public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }",
"void DefaultConstructor(){}",
"public Generic(){\n\t\tthis(null);\n\t}",
"public CyanSus() {\n\n }",
"private LocalParameters() {\n\n\t}",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"public SocketParams() {\n init();\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public Bicycle() {\n // You can also call another constructor:\n // this(1, 50, 5, \"Bontrager\");\n System.out.println(\"Bicycle.Bicycle- no arguments\");\n gear = 1;\n cadence = 50;\n speed = 5;\n name = \"Bontrager\";\n }",
"public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }",
"public Card() { this(12, 3); }",
"public Pitonyak_09_02() {\r\n }",
"protected ParameterList(){\n //title = t;\n //cellWorld = cw;\n }",
"public CMN() {\n\t}",
"public Basic() {}",
"public MLetter(Parameters parametersObj) {\r\n\t\tsuper(parametersObj);\r\n\t}",
"public CSSTidier() {\n\t}",
"public Cohete() {\n\n\t}",
"public Phl() {\n }",
"public CalccustoRequest()\r\n\t{\r\n\t}",
"public Clade() {}",
"public Chauffeur() {\r\n\t}",
"public Odontologo() {\n }",
"public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}",
"public Achterbahn() {\n }",
"public Tbdtokhaihq3() {\n super();\n }",
"public ObjectFactory() {\n\t}",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"public Aanbieder() {\r\n\t\t}",
"private Composite() {\n }",
"public Orbiter() {\n }",
"public ListParameter()\r\n\t{\r\n\t}",
"public mapper3c() { super(); }",
"public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public Postoj() {}",
"public CustomEntitiesTaskParameters() {}",
"public HandicapParameterSet() {\n }",
"public AntrianPasien() {\r\n\r\n }",
"public ObjectFactory() {\r\n\t}",
"public Libro() {\r\n }",
"public Chick() {\n\t}",
"public Mannschaft() {\n }",
"public LightParameter()\r\n\t{\r\n\t}",
"public TParametrosVOImpl() {\r\n }",
"public RngObject() {\n\t\t\n\t}",
"public Lanceur() {\n\t}",
"public GenEncryptionParams() {\n }",
"public ObjectFactory() {\n super(grammarInfo);\n }",
"public ParameterizedInstantiateFactory() {\r\n super();\r\n }",
"public Supercar() {\r\n\t\t\r\n\t}",
"public AllOne() {\n \n }",
"public Carrera(){\n }",
"public Livro() {\n\n\t}",
"public prueba()\r\n {\r\n }",
"public SlanjePoruke() {\n }",
"protected void initialize() { \n param1 = SmartDashboard.getNumber(\"param1\");\n param2 = SmartDashboard.getNumber(\"param2\");\n param3 = SmartDashboard.getNumber(\"param3\");\n param4 = SmartDashboard.getNumber(\"param4\");\n command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3);\n }",
"public Parser()\n {\n //nothing to do\n }",
"public Vector() {\n construct();\n }",
"public EnsembleLettre() {\n\t\t\n\t}",
"public Http()\n {\n numberOfParameters = -1;\n }",
"public Request(){\n\t\tthis(null, null, null);\n\t}",
"public Anschrift() {\r\n }",
"protected IRFunctional() {\n _name = null;\n _params = null;\n _args = null;\n _fds = null;\n _vds = null;\n _body = null;\n }",
"public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }",
"public Hello()\n {\n // initialise instance variables\n \n }",
"public Data() {\n \n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"private SingleObject()\r\n {\r\n }",
"public Alojamiento() {\r\n\t}",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }",
"public AirAndPollen() {\n\n\t}",
"public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }",
"private InstantiateTransformer(Class[] paramTypes, Object[] args) {\n super();\n if (((paramTypes == null) && (args != null))\n || ((paramTypes != null) && (args == null))\n || ((paramTypes != null) && (args != null) && (paramTypes.length != args.length))) {\n throw new IllegalArgumentException(\"InstantiateTransformer: The parameter types must match the arguments\");\n }\n if ((paramTypes == null) && (args == null)) {\n iParamTypes = null;\n iArgs = null;\n } else {\n iParamTypes = (Class[]) paramTypes.clone();\n iArgs = (Object[]) args.clone();\n }\n }",
"public Car(){\n\t\t\n\t}",
"@Test\n public void constructor(){\n /**Positive tests*/\n Road road = new Road(cityA, cityB, 4);\n assertEquals(road.getFrom(), cityA);\n assertEquals(road.getTo(), cityB);\n assertEquals(road.getLength(), 4);\n }",
"public GantBuilder ( ) { }",
"public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}",
"public Player()\n // POST: A default Player object is created with all class members set to 0\n\t{\n\t\tthis(2000, 0);\n\t}",
"public Demo3() {}",
"public InitialData(){}"
] | [
"0.76679134",
"0.7521805",
"0.7287491",
"0.72827816",
"0.7128269",
"0.69829214",
"0.6880795",
"0.68713707",
"0.6839173",
"0.6827854",
"0.68037605",
"0.67700124",
"0.6760543",
"0.6707877",
"0.6646646",
"0.6633068",
"0.66297567",
"0.66022944",
"0.659837",
"0.6569042",
"0.6566564",
"0.65664876",
"0.6565073",
"0.65645415",
"0.65632963",
"0.6546497",
"0.6524356",
"0.65193033",
"0.6485988",
"0.6468108",
"0.64651674",
"0.64643866",
"0.6463263",
"0.6432512",
"0.6417557",
"0.64150596",
"0.64049596",
"0.64021075",
"0.6401067",
"0.63946986",
"0.63942194",
"0.63883907",
"0.63849944",
"0.6372799",
"0.6367013",
"0.6366536",
"0.63511074",
"0.63505334",
"0.63447464",
"0.63394105",
"0.63335466",
"0.6333119",
"0.63274205",
"0.6322882",
"0.63195056",
"0.63148254",
"0.6314797",
"0.63097996",
"0.6309632",
"0.63037664",
"0.62972486",
"0.6293364",
"0.6289993",
"0.6284323",
"0.62839913",
"0.62810785",
"0.6277107",
"0.6272457",
"0.62718016",
"0.6267032",
"0.6266091",
"0.62600833",
"0.6260023",
"0.62589955",
"0.6258511",
"0.62534744",
"0.6251189",
"0.62498665",
"0.6239902",
"0.62363183",
"0.62316316",
"0.6230943",
"0.6227697",
"0.6222599",
"0.62209094",
"0.6215858",
"0.6212462",
"0.62113833",
"0.62080145",
"0.62044215",
"0.6202168",
"0.620066",
"0.61992484",
"0.6197271",
"0.61970013",
"0.6194936",
"0.6192664",
"0.6192556",
"0.6191651",
"0.61891973",
"0.61853945"
] | 0.0 | -1 |
Created by sandyr on 11/23/2017. | public interface SearchPresenter {
void onDestroy();
void loadNextPage();
void searchGithubRepos(String searchPhrase);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"private void m50366E() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n void init() {\n }",
"private void init() {\n\n\t}",
"public void mo12628c() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo21877s() {\n }",
"public final void mo91715d() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"public void m23075a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void method_4270() {}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void init() {\n\t}",
"private void m50367F() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public void mo12930a() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void mo6081a() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"public abstract void mo70713b();",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void mo21878t() {\n }",
"public void mo21779D() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}"
] | [
"0.57894444",
"0.57422996",
"0.57267344",
"0.5637298",
"0.55788755",
"0.55681777",
"0.5563274",
"0.5523855",
"0.55112845",
"0.5489314",
"0.5487401",
"0.5487401",
"0.5469185",
"0.54617494",
"0.54359615",
"0.54283273",
"0.5388722",
"0.5388722",
"0.5388722",
"0.5388722",
"0.5388722",
"0.53627294",
"0.53581935",
"0.5354278",
"0.53542197",
"0.5351608",
"0.5347701",
"0.5343195",
"0.5342079",
"0.5335104",
"0.5316731",
"0.5310974",
"0.5307794",
"0.5307794",
"0.53070843",
"0.5304133",
"0.53037405",
"0.52907795",
"0.5289934",
"0.5284638",
"0.5278626",
"0.52766895",
"0.5273323",
"0.5273323",
"0.5273323",
"0.5273323",
"0.5273323",
"0.5273323",
"0.52586365",
"0.52570415",
"0.5253954",
"0.52475697",
"0.52468044",
"0.5243245",
"0.523978",
"0.5230479",
"0.5230479",
"0.5230479",
"0.52226084",
"0.52226084",
"0.52226084",
"0.52226084",
"0.52226084",
"0.52226084",
"0.52226084",
"0.52162415",
"0.5214615",
"0.5211376",
"0.5210231",
"0.5210231",
"0.5210231",
"0.5206561",
"0.52062166",
"0.520569",
"0.5193584",
"0.51914227",
"0.51912105",
"0.5189128",
"0.51854527",
"0.51854527",
"0.51844275",
"0.51844275",
"0.51844275",
"0.51803",
"0.5169998",
"0.51687247",
"0.51673496",
"0.5166002",
"0.51657265",
"0.5164109",
"0.51563245",
"0.5155732",
"0.5144571",
"0.51419437",
"0.51360244",
"0.5135048",
"0.5134518",
"0.5130791",
"0.51292044",
"0.51280075",
"0.5125084"
] | 0.0 | -1 |
Class Methods =============== Constructor | public EscapeNonGroundDrive(Vector inputs){
super(inputs);
angrdl=(AvoidNonGroundDrive)inputs.elementAt(0);
angrdr=(AvoidNonGroundDrive)inputs.elementAt(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public CyanSus() {\n\n }",
"public PSRelation()\n {\n }",
"public Curso() {\r\n }",
"public Cohete() {\n\n\t}",
"public CSSTidier() {\n\t}",
"private TMCourse() {\n\t}",
"private Instantiation(){}",
"public Chauffeur() {\r\n\t}",
"public _355() {\n\n }",
"public Coche() {\n super();\n }",
"public Pitonyak_09_02() {\r\n }",
"public Odontologo() {\n }",
"public Chick() {\n\t}",
"public Pasien() {\r\n }",
"public Tbdtokhaihq3() {\n super();\n }",
"public Demo() {\n\t\t\n\t}",
"public Libro() {\r\n }",
"public Clade() {}",
"public Lanceur() {\n\t}",
"public Phl() {\n }",
"public Trening() {\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Carrera(){\n }",
"public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}",
"public Supercar() {\r\n\t\t\r\n\t}",
"public Excellon ()\n {}",
"private Rekenhulp()\n\t{\n\t}",
"public Magazzino() {\r\n }",
"public SlanjePoruke() {\n }",
"public RngObject() {\n\t\t\n\t}",
"public JSFOla() {\n }",
"public Carrinho() {\n\t\tsuper();\n\t}",
"public Orbiter() {\n }",
"public Aanbieder() {\r\n\t\t}",
"public Catelog() {\n super();\n }",
"public Basic() {}",
"public CMN() {\n\t}",
"public Livro() {\n\n\t}",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"public ExamMB() {\n }",
"public Alojamiento() {\r\n\t}",
"public Corso() {\n\n }",
"public OVChipkaart() {\n\n }",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public OOP_207(){\n\n }",
"public Anschrift() {\r\n }",
"public Achterbahn() {\n }",
"public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }",
"public Rol() {}",
"public TTau() {}",
"public SgaexpedbultoImpl()\n {\n }",
"public Mitarbeit() {\r\n }",
"public EnsembleLettre() {\n\t\t\n\t}",
"public Classe() {\r\n }",
"public AntrianPasien() {\r\n\r\n }",
"private SingleObject()\r\n {\r\n }",
"public Mannschaft() {\n }",
"public Soil()\n\t{\n\n\t}",
"public AirAndPollen() {\n\n\t}",
"public contrustor(){\r\n\t}",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"private Marinator() {\n }",
"private Marinator() {\n }",
"public Tbdcongvan36() {\n super();\n }",
"public HGDClient() {\n \n \t}",
"public Goodsinfo() {\n super();\n }",
"public Data() {\n \n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"private MApi() {}",
"public ChaCha()\n\t{\n\t\tsuper();\n\t}",
"public Tigre() {\r\n }",
"public Classroom() {\n\t}",
"private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}",
"public Connection() {\n\t\t\n\t}",
"public mapper3c() { super(); }",
"public Vaccine() {\n\t}",
"public Car(){\n\t\t\n\t}",
"private Main() {\n\n super();\n }",
"public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public Person() {\n\t\t\n\t}",
"public Demo3() {}",
"public Hello()\n {\n // initialise instance variables\n \n }",
"private CZ()\n {\n }",
"private void __sep__Constructors__() {}",
"public CircleCADTool() {\r\n }",
"public AllOne() {\n \n }",
"public AFMV() {\r\n }",
"public Self__1() {\n }",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"public Boop() {\n\t\tsuper();\n\t}",
"public Parameters() {\n\t}",
"public Webinar() {\n\t\t\n\t}",
"public prueba()\r\n {\r\n }",
"public Kullanici() {}",
"public Cgg_jur_anticipo(){}",
"public Ctacliente() {\n\t}",
"public Data() {\n }",
"public Data() {\n }"
] | [
"0.86958987",
"0.8336693",
"0.7762859",
"0.755287",
"0.7416975",
"0.7370456",
"0.73625547",
"0.7357104",
"0.73439693",
"0.7315097",
"0.7313117",
"0.7306537",
"0.7304771",
"0.7304696",
"0.7291519",
"0.72876334",
"0.72850275",
"0.7279538",
"0.7252023",
"0.7241158",
"0.71922624",
"0.71750337",
"0.7172089",
"0.7168349",
"0.7156952",
"0.71480775",
"0.7147669",
"0.71153367",
"0.7113385",
"0.71025276",
"0.7095545",
"0.70846283",
"0.7074334",
"0.7063647",
"0.7055092",
"0.7040258",
"0.7033254",
"0.703167",
"0.70289594",
"0.7028752",
"0.7025429",
"0.7015611",
"0.7013331",
"0.701329",
"0.70121026",
"0.7008875",
"0.70071185",
"0.69971204",
"0.6992371",
"0.6988357",
"0.6986769",
"0.69833857",
"0.69771224",
"0.69723105",
"0.6960433",
"0.69586414",
"0.6954415",
"0.694797",
"0.6947751",
"0.694256",
"0.6941256",
"0.6937036",
"0.69332695",
"0.6924252",
"0.6924252",
"0.6922843",
"0.69210565",
"0.69167334",
"0.6906537",
"0.68936443",
"0.68888867",
"0.6887813",
"0.68869334",
"0.6885473",
"0.68853796",
"0.68852717",
"0.68828636",
"0.6881425",
"0.6880538",
"0.6877619",
"0.6874698",
"0.68720806",
"0.6871881",
"0.68677783",
"0.6865332",
"0.68645203",
"0.6864288",
"0.68636906",
"0.68625325",
"0.68597203",
"0.68580854",
"0.6857528",
"0.684766",
"0.68475497",
"0.6842745",
"0.68303734",
"0.68292356",
"0.68230325",
"0.6813988",
"0.68127465",
"0.68127465"
] | 0.0 | -1 |
Ends Constructor Instance Methods ================== evaluateFromInteger | protected void evaluateFromInteger(){
int angrdlint=angrdl.getInteger();
int angrdrint=angrdr.getInteger();
double satl=angrdlint/(double)angrdl.MAX_FIRING_STRENGTH;
double satr=angrdrint/(double)angrdr.MAX_FIRING_STRENGTH;
dprintln("Saturation left/right "+satl+"/"+satr);
if(satl>ESCAPE_SATURATION_LEVEL && satr>ESCAPE_SATURATION_LEVEL){
f=FIRING;
fint+=ESCAPE_PROPULSION;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IntegerValidator() {\r\n }",
"public IntegerParserTest() {\n super(new IntegerParser());\n }",
"private XMLTreeIntExpressionEvaluator() {\n }",
"@Override\n\tpublic Integer evaluate() {\n\t\treturn Integer.parseInt(this.getValue());\n\t}",
"@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }",
"protected Int() {}",
"public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }",
"public Int() {\n super(Expression.X_IS_UNDEFINED);\n this.value = 0;\n }",
"public MyInteger( )\n {\n this( 0 );\n }",
"public Value(int i) {\n integer = i;\n itemClass = Integer.class;\n type = DataType.INT;\n }",
"IntegerValue createIntegerValue();",
"IntegerValue createIntegerValue();",
"public Int() {\n this(0);\n }",
"Int(int v){\n val = v;\n }",
"public Int(int value) { \n this.value = value; \n }",
"public MyInteger( int x )\n {\n value = x;\n }",
"public MyInteger(int value)\n\t{\n\t\tthis.value = value;\n\t}",
"private FinalIntegerNode() { }",
"public int evaluateAsInt();",
"public MyInteger(){\n //initialize to 0\n Integer myint = new Integer(0);\n }",
"public static void main(String[] args) { \r\n MyInteger n1 = new MyInteger(5); \r\n System.out.println(\"n1 is even? \" + n1.isEven());\r\n System.out.println(\"n1 is prime? \" + n1.isPrime());\r\n System.out.println(\"15 is prime? \" + MyInteger.isPrime(15));\r\n char[] chars = {'3', '5', '3', '9'};\r\n System.out.println(MyInteger.parseInt(chars));\r\n String s = \"3539\";\r\n System.out.println(MyInteger.parseInt(s));\r\n MyInteger n2 = new MyInteger(24); \r\n System.out.println(\"n2 is odd? \" + n2.isOdd());\r\n System.out.println(\"45 is odd? \" + MyInteger.isOdd(45));\r\n System.out.println(\"n1 is equal to n2? \" + n1.equals(n2));\r\n System.out.println(\"n1 is equal to 5? \" + n1.equals(5));\r\n }",
"IntegerLiteralExp createIntegerLiteralExp();",
"private\tNum(int num) { value = num; }",
"public NestedInteger() { }",
"public Int(int value) {\n super(Expression.X_IS_UNDEFINED);\n this.value = value;\n }",
"public NestedInteger(int value) { }",
"default int asInt() {\n\t\tthrow new EvaluatorException(\"Expecting an integer value\");\n\t}",
"public MutableInt() {}",
"IntValue createIntValue();",
"IntValue createIntValue();",
"<C> IntegerLiteralExp<C> createIntegerLiteralExp();",
"IntegerValue getValueObject();",
"public Number(int v)\n {\n val = v;\n }",
"public DataInt() {\n }",
"public IntPar(int val) { value = val; }",
"public DataInt(Integer b) {\n this.i = b;\n }",
"public Number(int n) \n {\n nn = n; // initailize with the inputed value\n }",
"public static void main(String[] args) {\n\t\tIntegerNumber A = new IntegerNumber();\n\t\t// And A contains the integer 0\n\t\t//System.out.println(A.integerNumber);\n\t\t// IntegerNumber object B is created\n\t\tIntegerNumber B = new IntegerNumber(\"-12345678954688709764347890\");\n\t\t// B contains the negative number shown within the quotes \"\"\n\t\t//System.out.println(B.integerNumber);\n\t\t// IntegerNumber object C is created\n\t\tIntegerNumber C = new IntegerNumber();\n\t\t// And C contains the positive number shown within the quotes \"\"\n\t\tC.integerNumber = \"5678954688709764347890\";\n\t\t//System.out.println(C.integerNumber);\n\t\t// IntegerNumber object D is created and D contains the number that B\n\t\t// contains\n\t\tIntegerNumber D = new IntegerNumber(B.integerNumber);\n\t\t//System.out.println(D.integerNumber);\n\t\t// IntegerNumber object E is created and E contains the number that B\n\t\t// contains\n\t\tIntegerNumber E = new IntegerNumber(B.integerNumber);\n\t\t//System.out.println(E.integerNumber);\n\t\t// Assigns the value of A to that of B\n\t\t((IntegerNumber) A).setIntegerNumber(B.integerNumber);\n\t\t// Cout << A << \" \" << B << endl; output to screen the integers in A and\n\t\t// B\n\t\tSystem.out.println(A.integerNumber + \" \" + B.integerNumber);\n\n\t\t// C = B + C; cout << C << endl; // output to screen the sum of the\n\t\t// numbers B and C\n\t\tC.integerNumber = addDigit(B.integerNumber, C.integerNumber);\n\t\tSystem.out.println(C.integerNumber);\n\n\t\t// D = B - C; cout << D << endl; // output to screen the number B - C\n\t\tD.integerNumber = subtractDigit(B.integerNumber, C.integerNumber);\n\t\tSystem.out.println(D.integerNumber);\n\n\t\t// If ( A < B ) { E += B; cout << E << endl; // output to screen the sum\n\t\t// of E and B }\n\t\t// A < 0, B >= 0\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')) {\n\t\t\tE.integerNumber = addDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.print(\"A < B 1:\");\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\t\t// A < 0, B < 0, |A| > |B|\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')\n\t\t\t\t&& !compareAbsolute(B.integerNumber, A.integerNumber)) {\n\t\t\tE.integerNumber = addDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.print(\"A < B 2:\");\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\t\t// A > 0, B > 0, |A| < |B|\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')\n\t\t\t\t&& !compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = addDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.print(\"A < B 3:\");\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\n\t\t// If ( A >= B ) { E -= B; cout << E << endl; // output to screen the\n\t\t// number E - B }\n\t\t// A >=0 , B < 0\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\n\t\t}\n\n\t\t// A > = 0 ,B >=0 úČ|A| > |B|\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')\n\t\t\t\t&& !compareAbsolute(B.integerNumber, A.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\t\t}\n\n\t\t// A > =0 ,B >=0 úČ|A| = |B|\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')\n\t\t\t\t&& compareAbsolute(B.integerNumber, A.integerNumber)\n\t\t\t\t&& compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\n\t\t}\n\n\t\t// A < 0, B < 0,|A| < |B|\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')\n\t\t\t\t&& !compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\t\t}\n\n\t\t// A < 0, B < 0,|A| = |B|\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')\n\t\t\t\t&& compareAbsolute(B.integerNumber, A.integerNumber)\n\t\t\t\t&& compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\n\t\t// If (A == B || C != D) { cout << A << E << D << endl; output to screen\n\t\t// the numbers A, E, and D}\n\t\tif ((A.integerNumber == B.integerNumber)\n\t\t\t\t|| (C.integerNumber != D.integerNumber)) {\n\t\t\t// TODO result\n\t\t\tSystem.out.println(A.integerNumber + E.integerNumber\n\t\t\t\t\t+ D.integerNumber);\n\t\t}\n\t}",
"public Int(int v) {\n value = v;\n }",
"public IntHolder() {\r\n\t}",
"public static void main(String[] args) {\r\n\t\t// instance of MyInteger class\r\n\t\tMyInteger m1 = new MyInteger(4);\r\n\t\t// method that tests if object of MyInteger class is even\r\n\t\tSystem.out.println(\"Object is even: \" + m1.isEven());\r\n\t\t// static method that tests if the number is even\r\n\t\tSystem.out.println(\"Number is even: \" + MyInteger.isEven(4));\r\n\t\t// method that tests if the object of MyInteger class is odd\r\n\t\tSystem.out.println(\"Object is odd: \" + m1.isOdd());\r\n\t\t// static method that tests if the number is odd\r\n\t\tSystem.out.println(\"Number is odd: \" + MyInteger.isOdd(4));\r\n\t\t// method that tests if the object of MyInteger class is prime\r\n\t\tSystem.out.println(\"Object is prime number: \" + m1.isPrime());\r\n\t\t// static method that tests if the number is prime\r\n\t\tSystem.out.println(\"Number is prime: \" + MyInteger.isPrime(7));\r\n\t\t// method that tests if object of MyInteger class is equal to passed\r\n\t\t// value\r\n\t\tSystem.out.println(\"Object is equal to number: \" + m1.equals(3));\r\n\t\t// method that compares m1 object with new object of the MyInteger class\r\n\t\tSystem.out.println(\"Object is equal to object: \"\r\n\t\t\t\t+ m1.equals(new MyInteger(4)));\r\n\t\tchar[] ch = { '2', '3', '4' };\r\n\t\t// method that converts char array into an integer\r\n\t\tSystem.out.println(MyInteger.parseInt(ch));\r\n\t\t// method that converts string into an integer\r\n\t\tSystem.out.println(MyInteger.parseInt(\"1234\"));\r\n\r\n\t}",
"public IntegerEditor() {\r\n\t super();\r\n\t}",
"public Java_Experiment_File(int integer) /* Declaration */ {\n\t// Begin definition\n\t// In this constructor, `this(1)' results in compile-time exception as it makes constructor recursive, which is *not* allowed!\n\tF = integer;\n\tSystem.out.println(\"Instance variable `F' is set to \" + F + \"!\");\n\t// NO `return' statements allowed in constructors!\n\t// End definiton\n }",
"public static int eval(NslInt0 a, int b) {\n return a.getint()*b;\n }",
"public void setEvaluate(Integer evaluate) {\n this.evaluate = evaluate;\n }",
"public ElasticInteger(int valueAtStart, long duration) {\n super(valueAtStart, duration);\n }",
"private int evaluate() {\n return (int) (Math.random() * 8);\n }",
"public Snippet visit(CoercionToIntExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t \n\t\t\t_ret.returnTemp = \"(\" + \"int\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Integer();\n\t return _ret;\n\t }",
"public IntegerLiteral(String number)\n {\n try\n {\n this.literal = Integer.parseInt(number);\n }\n catch(NumberFormatException e)\n {\n throw new IllegalArgumentException(e.getMessage());\n }\n }",
"public Numbers(int number) {\r\n\t\tthis.number = number;\r\n\t}",
"@Test\r\n public void anotherConstructorMinMax() throws Exception {\r\n assertEquals(5, (int) sIntRev.first());\r\n assertEquals(1, (int) sIntRev.last());\r\n }",
"protected abstract Value evaluate();",
"public InfiniteInteger(int anInteger)\n\t{\n\t\t// TO DO: Constructor\n\t\tString s = Integer.toString(anInteger);\n\t\t\n\t\tif(s.charAt(0) == '-')\n\t\t{\t\t\t\n\t\t\tthis.isNeg = true;\n\t\t\ts = s.substring(1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.isNeg = false;\n\t\t}\n\t\t\n\t\twhile(s.charAt(0) == '0')\n\t\t{\n\t\t\tif(s.length() == 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\t\t\n\t\t\ts = s.substring(1);\n\t\t}\n\t\t\n\t\tinfNumber = new int[s.length()];\t\t\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++)\n\t\t{\n\t\t\tinfNumber[i] = Character.getNumericValue(s.charAt(i));\n\t\t}\n\t}",
"public TumpukanInteger(){\r\n this(KAPASITAS_DEFAULT);\r\n }",
"private final int initializeInt() {\n\t\treturn 0;\r\n\t}",
"@Test\n public void testIsValidInteger() {\n System.out.println(\"isValidInteger\");\n String integer = \"6.8\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidInteger(integer);\n assertEquals(expResult, result);\n }",
"private Numbers() {\n\t}",
"public LeaseChargeRule_VO(Integer aLeaserule) {\n this.leaserule = aLeaserule;\n}",
"@Test\n\tvoid testNegativeInteger() {\n\t\tint result = calculator.negativeInteger(-4,-3);\n\t\tassertEquals(-1,result);\n\t}",
"@Test\n\tpublic void testInt2() {\n\t\tTextField intText = new TextField(\"-23\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}",
"javascriptInt(Context c) {\n this.c = c;\n }",
"public interface IEval {\n String Evaluate(Integer otherChoice);\n\n\n}",
"public IntegerField() {\r this(3, 0, 0, 0);\r }",
"@Override\r\n\tpublic Object visitIntegerLiteralExpression(\r\n\t\t\tIntegerLiteralExpression integerLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t\tmv.visitLdcInsn(integerLiteralExpression.integerLiteral.getIntVal());\r\n\t\tif(arg != null)\r\n\t\t{\r\n//\t\t mv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"valueOf\", \"(I)Ljava/lang/Integer;\");\r\n\t\t}\r\n\t\treturn \"I\";\r\n\t}",
"public static void main(String[] args) {\n\t\tint i = 100;\r\n\t\tInteger ii = new Integer(i);\r\n\t\tSystem.out.println(ii);\r\n\r\n\t\tString s = \"100\";\r\n\t\t// String s = \"abc\";//NumberFormatException\r\n\t\tInteger iii = new Integer(s);\r\n\t\tSystem.out.println(iii);\r\n\t}",
"public Number() {\n boolean flag = false;\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n while (!flag) {\n try {\n System.out.println(\"Введите число : \");\n number = Integer.valueOf(bufferedReader.readLine());\n flag = true;\n } catch (Exception e) {\n System.out.println(\"Не корректный ввод числа\");\n flag = false;\n }\n }\n }",
"Astro leafInteger(Number integralData, SourceSpan optSpan);",
"public LlvmValue visit(IntegerLiteral n) {\n return new LlvmIntegerLiteral(n.value);\n }",
"public Intervals() {\n }",
"public DigitsValidator(int integer, int fraction) {\n this.integer = integer;\n this.fraction = fraction;\n }",
"@Test\n\tpublic void test_TCM__int_getIntValue() {\n final Attribute attribute = new Attribute(\"test\", \"\");\n int summand = 3;\n for(int i = 0; i < 28; i++) {\n summand <<= 1;\n final int value = Integer.MIN_VALUE + summand;\n\n attribute.setValue(\"\" + value);\n try {\n assertEquals(\"incorrect int conversion\", attribute.getIntValue(), value);\n } catch (final DataConversionException e) {\n fail(\"couldn't convert to int\");\n }\n }\n\n\t\t//test an invalid int\n TCM__int_getIntValue_invalidInt(\"\" + Long.MIN_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Long.MAX_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Float.MIN_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Float.MAX_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Double.MIN_VALUE);\n TCM__int_getIntValue_invalidInt(\"\" + Double.MAX_VALUE);\n\t}",
"public IntArrays()\n\t{\n\t\tthis(10);\n\t}",
"static SibillaValue of(int v) {\n return new SibillaInteger(v);\n }",
"public SumNumbersTest() {\r\n\r\n super();\r\n this.sumNumbers = new SumNumbers();\r\n }",
"public IntPar() { }",
"public Node(Integer intdata) {\n\t\tdata = new IntData();\n\t\tsetData(intdata);\n\t\tnext=null;\n\t}",
"@Override\n\tpublic double evaluate() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"public IntegerSummary(final int value) {\n value_ = value;\n }",
"public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }",
"private void init() {\r\n\t\t// Convert the string Values from file to numerical values\r\n\t\tif ((field.getDecimalMinimum() != null)\r\n\t\t\t\t&& (field.getDecimalMaximum() != null)) {\r\n\t\t\ttry {\r\n\t\t\t\thasRange = true;\r\n\t\t\t\tminimum = Long.valueOf(Long.parseLong(field.getDecimalMinimum()));\r\n\t\t\t\tmaximum = Long.valueOf(Long.parseLong(field.getDecimalMaximum()));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\thasRange = false;\r\n\t\t\t\tminimum = Long.valueOf(Integer.MIN_VALUE);\r\n\t\t\t\tmaximum = Long.valueOf(Integer.MAX_VALUE);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\thasRange = false;\r\n\t\t\tminimum = Long.valueOf(Integer.MIN_VALUE);\r\n\t\t\tmaximum = Long.valueOf(Integer.MAX_VALUE);\r\n\t\t}\r\n\r\n\t\tisNumeric = field.getCharacterSet().matches(\"^[0-9\\\\-*\\\\[\\\\]]*$\");\r\n\t\tintBitLength = field.getBitLength() == null ? 0 : field.getBitLength()\r\n\t\t\t\t.intValue();\r\n\t\tString charSet = \"^\"\r\n\t\t\t\t+ (field.getCharacterSet().endsWith(\"*\") ? field\r\n\t\t\t\t\t\t.getCharacterSet() : field.getCharacterSet() + \"*\")\r\n\t\t\t\t+ \"$\";\r\n\t\tcharSetRegex = Pattern.compile(charSet);\r\n\t\tintLength = field.getLength() == null ? Integer.MAX_VALUE : field\r\n\t\t\t\t.getLength().intValue();\r\n\t}",
"public static void main(String[] args) {\n\t\tMyinteger int1=new Myinteger(5);\n\t\tSystem.out.println(\"这个值是:\"+int1.getValue()+\"\\t该值是否是偶数\"+int1.isEven()+\"\\t\\t该值是否是奇数\"+int1.isOdd()+\"\\t\\t是否是素数\"+int1.isPrime());\n\t\t\n\t\tSystem.out.println(\"这个值是:6\\t该值是否是偶数\"+int1.isEven(6)+\"\\t\\t该值是否是奇数\"+int1.isOdd(6)+\"\\t\\t是否是素数\"+int1.isPrime(6));\n\t}",
"public IntegerValidator(int minimalValue, int maximalValue) {\r\n this.minimalValue = minimalValue;\r\n this.maximalValue = maximalValue;\r\n }",
"public void setIntger(int integer) {\n this.integer = integer;\n }",
"Integer getValue();",
"Integer getValue();",
"public NestedInteger() {\n this.nestedIntegers = new ArrayList<>();\n }",
"public NestedInteger(int value) {\n\t\tthis.integer = value;\n\t}",
"public final void mINTEGER() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.INTEGER;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:771:9: ( ( '-' )? (\n\t\t\t// '0' .. '9' )+ )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:771:11: ( '-' )? (\n\t\t\t// '0' .. '9' )+\n\t\t\t{\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:771:11: ( '-' )?\n\t\t\t\tint alt1 = 2;\n\t\t\t\tfinal int LA1_0 = this.input.LA(1);\n\n\t\t\t\tif ((LA1_0 == '-'))\n\t\t\t\t{\n\t\t\t\t\talt1 = 1;\n\t\t\t\t}\n\t\t\t\tswitch (alt1)\n\t\t\t\t{\n\t\t\t\t\tcase 1:\n\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:771:12: '-'\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.match('-');\n\n\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:771:18: ( '0' ..\n\t\t\t\t// '9' )+\n\t\t\t\tint cnt2 = 0;\n\t\t\t\tloop2:\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tint alt2 = 2;\n\t\t\t\t\tfinal int LA2_0 = this.input.LA(1);\n\n\t\t\t\t\tif (((LA2_0 >= '0' && LA2_0 <= '9')))\n\t\t\t\t\t{\n\t\t\t\t\t\talt2 = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt2)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:771:19:\n\t\t\t\t\t\t// '0' .. '9'\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.matchRange('0', '9');\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif (cnt2 >= 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbreak loop2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfinal EarlyExitException eee = new EarlyExitException(2, this.input);\n\t\t\t\t\t\t\tthrow eee;\n\t\t\t\t\t}\n\t\t\t\t\tcnt2++;\n\t\t\t\t}\n\t\t\t\twhile (true);\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"protected abstract int getValue(int paramInt);",
"public static LiteralIntNode parse(Parser parser) {\r\n\t\tLocation location = parser.expect(token -> token instanceof LiteralIntToken, \"Int literal expected.\");\r\n\t\tLiteralIntToken current = (LiteralIntToken)parser.current();\r\n\t\treturn new LiteralIntNode(location, current.getValue(), current.getBase());\r\n\t}",
"public DataPrimitive(int value) {\n\t\tsuper();\n\t\tthis.value = Integer.toString(value);\n\t}",
"private ScoreCalculator() {}",
"public SequenceNumberTest() {}",
"@RepeatedTest(20)\n void transformtoIntTest() {\n assertEquals(bi.transformtoInt(), new Int(bi.toInt(binary)));\n assertEquals(i.transformtoInt(),i);\n\n //Nulls\n assertEquals(f.transformtoInt(),Null);\n assertEquals(st.transformtoInt(),Null);\n assertEquals(bot.transformtoInt(),Null);\n assertEquals(bof.transformtoInt(),Null);\n assertEquals(Null.transformtoInt(),Null);\n }",
"public int intValue();",
"public T caseIntegerCalculationExpression(IntegerCalculationExpression object) {\n\t\treturn null;\n\t}",
"public T caseExpression_Integer(Expression_Integer object)\r\n {\r\n return null;\r\n }",
"@Test\n\tpublic void testAndNegativeIntegers() throws BcException, IOException {\n\t\tString[] params = { \"-1 && -1\" };\n\t\tbcApp.run(params, inStream, outStream);\n\t\tassertEquals(\"1\", outStream.toString());\n\t}",
"private CasePreinstConditionValue(int value, String name, String literal) {\n\t\tsuper(value, name, literal);\n\t}",
"public LiteralIntNode(Location location, int value) {\r\n\t\tthis(location, value, LiteralIntTokenBase.DECIMAL);\r\n\t}"
] | [
"0.62713766",
"0.61668986",
"0.61085916",
"0.60529613",
"0.60506576",
"0.60014653",
"0.5925083",
"0.5922273",
"0.5905887",
"0.58947283",
"0.58405626",
"0.58405626",
"0.5816417",
"0.57755077",
"0.57754827",
"0.5774167",
"0.57368743",
"0.5710191",
"0.56881267",
"0.56525326",
"0.56405866",
"0.5611476",
"0.557392",
"0.5566395",
"0.5540432",
"0.55334353",
"0.5518429",
"0.55164176",
"0.5506103",
"0.5506103",
"0.5494897",
"0.5469163",
"0.5467805",
"0.545435",
"0.54134476",
"0.5364071",
"0.5362532",
"0.5312635",
"0.5309287",
"0.5279814",
"0.52444077",
"0.5228385",
"0.52278817",
"0.52211714",
"0.5204632",
"0.5200858",
"0.5190403",
"0.5177908",
"0.51492083",
"0.5136847",
"0.51185143",
"0.5114021",
"0.5111969",
"0.5098483",
"0.5078979",
"0.5073191",
"0.5067415",
"0.50538564",
"0.5039554",
"0.50322133",
"0.5024243",
"0.5022986",
"0.5008403",
"0.500681",
"0.50044143",
"0.49881905",
"0.49864268",
"0.49740884",
"0.4973093",
"0.4973003",
"0.49704045",
"0.4969115",
"0.49651086",
"0.49614874",
"0.49613485",
"0.49486017",
"0.49344313",
"0.49289593",
"0.49155563",
"0.48992696",
"0.4891075",
"0.48897702",
"0.4888208",
"0.48834383",
"0.48834383",
"0.4882705",
"0.48826432",
"0.48799825",
"0.48716986",
"0.48700738",
"0.48680982",
"0.4866749",
"0.48599476",
"0.48592165",
"0.4852871",
"0.4851135",
"0.4848231",
"0.4840608",
"0.4838868",
"0.48342294"
] | 0.5440279 | 34 |
Ends evaluateFromInteger toString overrides | public String toString(){
return("EscapeNonGroundDrive");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Integer evaluate() {\n\t\treturn Integer.parseInt(this.getValue());\n\t}",
"String toStringAsInt();",
"public String toString()\n {\n String string = new Integer(this.getValue()).toString();\n return string; \n }",
"@Override\n\tpublic String getValue() {\n\t\treturn integerLiteral;\n\t}",
"@Override\n\tpublic String result() {\n\t\tif (!stack.isEmpty())\n\t\t\treturn Integer.toString(stack.peek());\n\t\telse\n\t\t\treturn \"0\";\n\t}",
"public String\ttoString() { return Integer.toString(value); }",
"@Override\n public String toString(Integer value) {\n if (value == null) {\n return \"\";\n }\n return (Integer.toString(((Integer) value).intValue()));\n }",
"public String toString () {\n return Integer.toString (intVal);\n }",
"public String toString(){\r\n return \"(\" + num + \")\";\r\n }",
"@Override\n public String visit(IntegerLiteralExpr n, Object arg) {\n return null;\n }",
"public static void main(String[] args) {\n System.out.println(\"String: \" + Integer.toString(5));\n\n\n\n }",
"public String toEvalString() {\n String rank = \"\";\n if (this.rank != 10) {\n rank = rankToString().substring(0, 1).toUpperCase();\n } else {\n rank = \"T\";\n }\n\n String suit = suitToString().substring(0, 1).toLowerCase();\n\n return rank + suit;\n }",
"@Override\r\n public String toString(){\r\n return Integer.toString(node);\r\n }",
"String getInt_lit();",
"public Snippet visit(CoercionToIntExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t \n\t\t\t_ret.returnTemp = \"(\" + \"int\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Integer();\n\t return _ret;\n\t }",
"@Override\n public String toString() {\n StringBuilder buff = new StringBuilder();\n\n buff.append(this.getClass().getSimpleName()).append(\": \");\n buff.append(\" int: \");\n buff.append(this.intValue);\n buff.append(\" \");\n buff.append(super.toString());\n\n return buff.toString();\n }",
"String evaluate();",
"@Override\r\n\tpublic Object visitIntegerLiteralExpression(\r\n\t\t\tIntegerLiteralExpression integerLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t\tmv.visitLdcInsn(integerLiteralExpression.integerLiteral.getIntVal());\r\n\t\tif(arg != null)\r\n\t\t{\r\n//\t\t mv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"valueOf\", \"(I)Ljava/lang/Integer;\");\r\n\t\t}\r\n\t\treturn \"I\";\r\n\t}",
"public static void main(String[] args) { \r\n MyInteger n1 = new MyInteger(5); \r\n System.out.println(\"n1 is even? \" + n1.isEven());\r\n System.out.println(\"n1 is prime? \" + n1.isPrime());\r\n System.out.println(\"15 is prime? \" + MyInteger.isPrime(15));\r\n char[] chars = {'3', '5', '3', '9'};\r\n System.out.println(MyInteger.parseInt(chars));\r\n String s = \"3539\";\r\n System.out.println(MyInteger.parseInt(s));\r\n MyInteger n2 = new MyInteger(24); \r\n System.out.println(\"n2 is odd? \" + n2.isOdd());\r\n System.out.println(\"45 is odd? \" + MyInteger.isOdd(45));\r\n System.out.println(\"n1 is equal to n2? \" + n1.equals(n2));\r\n System.out.println(\"n1 is equal to 5? \" + n1.equals(5));\r\n }",
"protected void evaluateFromInteger(){\n\tint angrdlint=angrdl.getInteger();\n\tint angrdrint=angrdr.getInteger();\n\tdouble satl=angrdlint/(double)angrdl.MAX_FIRING_STRENGTH;\n\tdouble satr=angrdrint/(double)angrdr.MAX_FIRING_STRENGTH;\n\tdprintln(\"Saturation left/right \"+satl+\"/\"+satr);\n\tif(satl>ESCAPE_SATURATION_LEVEL && satr>ESCAPE_SATURATION_LEVEL){\n\t f=FIRING;\n\t fint+=ESCAPE_PROPULSION;\n\t}\n }",
"@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }",
"@Override\n public void visitIntLiteral(IntLiteral node){\n mPrintWriter.println(\"#Integer\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getIntValue()+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getIntValue()+\")\");\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }",
"public Integer eval() {\r\n Stack<String> operatorStack = new Stack<String>();\r\n Stack<Integer> valueStack = new Stack<Integer>();\r\n\r\n // ADD YOUR CODE BELOW HERE\r\n // ..\r\n for (int i = tokenList.size() - 1; i >= 0; i--) {\r\n if (isInteger(tokenList.get(i))) {\r\n valueStack.push(Integer.parseInt(tokenList.get(i)));\r\n } else {\r\n operatorStack.push(tokenList.get(i));\r\n }\r\n }\r\n \r\n \r\n \r\n help(operatorStack,valueStack);\r\n \r\n // ..\r\n // ADD YOUR CODE ABOVE HERE\r\n\r\n return valueStack.get(0); // DELETE THIS LINE\r\n }",
"public String NumberToString(int number){return \"\"+number;}",
"public String toString( )\n {\n return Integer.toString( value );\n }",
"java.lang.String getNum2();",
"public String toString() {\r\n return \"Type: Integer\";\r\n }",
"protected String parseIntToString(int value) {\n return String.valueOf(value);\n }",
"IntegerLiteralExp createIntegerLiteralExp();",
"public String valueAsText() {\n return \"\" + this.intValue;\n }",
"java.lang.String getNum1();",
"IntegerValue getValueObject();",
"public int evaluateAsInt();",
"public interface IEval {\n String Evaluate(Integer otherChoice);\n\n\n}",
"public void print(int someInt) {\r\n print(someInt + \"\");\r\n }",
"public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }",
"@Override\n\tpublic String toString() {\n\t\treturn Integer.toString(a);\n\t}",
"public static String IntToString(int IntValue){\n Integer integer = new Integer(IntValue);\n return integer.toString(); \n }",
"public static final SourceModel.Expr showInteger(SourceModel.Expr integerValue) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showInteger), integerValue});\n\t\t}",
"private String result(int i) {\r\n\t\tswitch(sim40.memory[i]){\r\n\r\n\t\tcase 1: /* print */\r\n\t\t\treturn (\"\"+sim40.memory[Simulator.ACCUMULATOR_ADDRESS]);\r\n\r\n\t\tcase 2: /* printch */\r\n\t\t\treturn (\"\"+(char)sim40.memory[Simulator.ACCUMULATOR_ADDRESS]);\r\n\r\n\t\tcase 3: /* printb */\r\n\t\t\treturn (Integer.toBinaryString(sim40.memory[Simulator.ACCUMULATOR_ADDRESS]));\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}",
"@Override\n public String toString() {\n return number.toString();\n }",
"default int asInt() {\n\t\tthrow new EvaluatorException(\"Expecting an integer value\");\n\t}",
"@Then(\"^RPN should display \\\"([^\\\"]*)\\\"$\")\n\tpublic void rpn_should_display(String arg1) throws Throwable {\n\t\tRPNCalculator calc = new RPNCalculator();\n\t\tint result = Integer.valueOf(arg1);\n\t\tassertEquals(result,calc.Calculate(expr)); \n\t}",
"public String eval()\r\n\t{\r\n\t\treturn eval(null, null);\r\n\t}",
"abstract String display(T value);",
"private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }",
"public static void main(String[] args) {\n\t\tIntegerNumber A = new IntegerNumber();\n\t\t// And A contains the integer 0\n\t\t//System.out.println(A.integerNumber);\n\t\t// IntegerNumber object B is created\n\t\tIntegerNumber B = new IntegerNumber(\"-12345678954688709764347890\");\n\t\t// B contains the negative number shown within the quotes \"\"\n\t\t//System.out.println(B.integerNumber);\n\t\t// IntegerNumber object C is created\n\t\tIntegerNumber C = new IntegerNumber();\n\t\t// And C contains the positive number shown within the quotes \"\"\n\t\tC.integerNumber = \"5678954688709764347890\";\n\t\t//System.out.println(C.integerNumber);\n\t\t// IntegerNumber object D is created and D contains the number that B\n\t\t// contains\n\t\tIntegerNumber D = new IntegerNumber(B.integerNumber);\n\t\t//System.out.println(D.integerNumber);\n\t\t// IntegerNumber object E is created and E contains the number that B\n\t\t// contains\n\t\tIntegerNumber E = new IntegerNumber(B.integerNumber);\n\t\t//System.out.println(E.integerNumber);\n\t\t// Assigns the value of A to that of B\n\t\t((IntegerNumber) A).setIntegerNumber(B.integerNumber);\n\t\t// Cout << A << \" \" << B << endl; output to screen the integers in A and\n\t\t// B\n\t\tSystem.out.println(A.integerNumber + \" \" + B.integerNumber);\n\n\t\t// C = B + C; cout << C << endl; // output to screen the sum of the\n\t\t// numbers B and C\n\t\tC.integerNumber = addDigit(B.integerNumber, C.integerNumber);\n\t\tSystem.out.println(C.integerNumber);\n\n\t\t// D = B - C; cout << D << endl; // output to screen the number B - C\n\t\tD.integerNumber = subtractDigit(B.integerNumber, C.integerNumber);\n\t\tSystem.out.println(D.integerNumber);\n\n\t\t// If ( A < B ) { E += B; cout << E << endl; // output to screen the sum\n\t\t// of E and B }\n\t\t// A < 0, B >= 0\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')) {\n\t\t\tE.integerNumber = addDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.print(\"A < B 1:\");\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\t\t// A < 0, B < 0, |A| > |B|\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')\n\t\t\t\t&& !compareAbsolute(B.integerNumber, A.integerNumber)) {\n\t\t\tE.integerNumber = addDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.print(\"A < B 2:\");\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\t\t// A > 0, B > 0, |A| < |B|\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')\n\t\t\t\t&& !compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = addDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.print(\"A < B 3:\");\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\n\t\t// If ( A >= B ) { E -= B; cout << E << endl; // output to screen the\n\t\t// number E - B }\n\t\t// A >=0 , B < 0\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\n\t\t}\n\n\t\t// A > = 0 ,B >=0 úČ|A| > |B|\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')\n\t\t\t\t&& !compareAbsolute(B.integerNumber, A.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\t\t}\n\n\t\t// A > =0 ,B >=0 úČ|A| = |B|\n\t\tif ((A.integerNumber.charAt(0) != '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) != '-')\n\t\t\t\t&& compareAbsolute(B.integerNumber, A.integerNumber)\n\t\t\t\t&& compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\n\t\t}\n\n\t\t// A < 0, B < 0,|A| < |B|\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')\n\t\t\t\t&& !compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\t\t}\n\n\t\t// A < 0, B < 0,|A| = |B|\n\t\tif ((A.integerNumber.charAt(0) == '-')\n\t\t\t\t&& (B.integerNumber.charAt(0) == '-')\n\t\t\t\t&& compareAbsolute(B.integerNumber, A.integerNumber)\n\t\t\t\t&& compareAbsolute(A.integerNumber, B.integerNumber)) {\n\t\t\tE.integerNumber = subtractDigit(E.integerNumber, B.integerNumber);\n\t\t\tSystem.out.println(E.integerNumber);\n\t\t}\n\n\t\t// If (A == B || C != D) { cout << A << E << D << endl; output to screen\n\t\t// the numbers A, E, and D}\n\t\tif ((A.integerNumber == B.integerNumber)\n\t\t\t\t|| (C.integerNumber != D.integerNumber)) {\n\t\t\t// TODO result\n\t\t\tSystem.out.println(A.integerNumber + E.integerNumber\n\t\t\t\t\t+ D.integerNumber);\n\t\t}\n\t}",
"public String get_integer_part();",
"public String visit(IntegerType n, LLVMRedux argu) {\n return \"i32\";\n }",
"void foo1(Integer p) {\n System.out.println(p.toString());\n }",
"@Test\n public void testReflectionInteger() {\n assertEquals(baseStr + \"[value=5]\", ToStringBuilder.reflectionToString(base));\n }",
"public String evalTerm() {\n\n // the value to return\n String value = \"\";\n\n if (this.selection == 1) {\n\n // evaluate option 1: <fac>\n value = this.fac.evalFac();\n\n } else if (this.selection == 2) {\n\n // evaluate option 2: <fac> * <term>\n value = this.fac.evalFac();\n String valueTerm = this.term.evalTerm();\n\n // perform integer multiplication\n int value1 = Integer.parseInt(value);\n int value2 = Integer.parseInt(valueTerm);\n int finalValue = value1 * value2;\n\n // convert back to string\n value = Integer.toString(finalValue);\n\n }\n\n // check for value greater than 99999999\n if (java.lang.Math.abs(Integer.parseInt(value)) > 99999999) {\n\n // error\n System.out.println(\"Error: Value exceeds 8 digits.\");\n System.exit(-1);\n\n }\n\n return value;\n\n }",
"public static String integerToString(Integer i) {\n String ret = \"\";\n if (i!=null)\n ret = i.toString();\n\n return ret;\n }",
"@Override\r\n\tpublic String getResult() {\n\t\tString res;\r\n\t\ttry {\r\n\t\t\tresult = c.calculate(o.getFirst(), o.getSecond(), o.getOperator());\r\n\t\t\t// System.out.println(\"00\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\r\n\t\tres = String.valueOf(result);\r\n\r\n\t\treturn res;\r\n\t}",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"private static void task44() {\n System.out.print(\"Enter value: \");\n int n = scanInt();\n\n String str = n + \" + \" + n + \"\" + n + \" + \" + n + \"\" + n + \"\" + n;\n System.out.println(\"\\n\" + str);\n System.out.printf(\"%d + %d%d + %d%d%d\", n, n, n, n, n, n);\n }",
"SEIntegerVariable getOperand1();",
"public String getOperand(int operandNumber);",
"public void testToString() {\n\t\tNumberConverter test = new NumberConverter(436);\n\t\tNumberConverter testH = new NumberConverter(95);\n\t\tNumberConverter testT = new NumberConverter(203);\n\t\tNumberConverter testO = new NumberConverter(870);\n\t\tNumberConverter testHT = new NumberConverter(2);\n\t\tNumberConverter testHO = new NumberConverter(40);\n\t\tNumberConverter testTO = new NumberConverter(900);\n\t\tNumberConverter testH2 = new NumberConverter(13);\n\t\tNumberConverter testHTO = new NumberConverter(0);\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttest.toString(), \"four hundred and thirty six\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestH.toString(), \"ninety five\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestT.toString(), \"two hundred and three\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestO.toString(), \"eight hundred and seventy\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestHT.toString(), \"two\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestHO.toString(), \"forty\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestTO.toString(), \"nine hundred\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestH2.toString(), \"thirteen\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestHTO.toString(), \"\");\n\n\t}",
"public String toString() {\n/* 67 */ return String.valueOf(this.val);\n/* */ }",
"private static String str(long i) {\n return String.valueOf(i);\n }",
"private static String str(long i) {\n return String.valueOf(i);\n }",
"public static void main(String[] args) {\n int integer = 6;\n String s = Integer.toString(integer);\n System.out.println(s);\n\n //integer to string (abc) -- ascii value\n //Character.toString();\n int a = 3;\n char character = (char) (a + '0' + 48);\n char c = 'c';\n s = Character.toString(character);\n System.out.println(s);\n int b = 13;\n c = (char) (b + 48 + '0');\n s = Character.toString(c);\n System.out.println(s);\n\n //parseInt String to Int...\n String str = \"0\";\n integer = Integer.parseInt(str);\n System.out.println(integer);\n str= \"00\";\n integer = Integer.parseInt(str);\n System.out.println(integer);\n str = \"-1\";\n integer = Integer.parseInt(str);\n System.out.println(integer);\n String inf = \"asdf\"; //any error produces -1\n integer = Integer.parseInt(str);\n System.out.println(integer);\n str = \"-2\";\n integer = Integer.parseInt(str);\n System.out.println(integer);\n str = \"-002\";\n integer = Integer.parseInt(str);\n System.out.println(integer); //handles all leading zeros... and negatives... edge case is when it is equal to -1 then error....\n //however good news is that my function has all negatives handled like no edge cases.... only 0000 edge case\n\n //- + 0000 123 0.000 */\n //handled all edge cases with integers... only edge cases with float 0.000 consider...\n //parseDouble\n str = \"0\";\n double d = Double.parseDouble(str);\n System.out.println(d);\n str = \"00.9\";\n d = Double.parseDouble(str);\n System.out.println(d);\n str = \"-00.9000\";\n d = Double.parseDouble(str);\n System.out.println(d);\n str = \"-1.987\";\n d = Double.parseDouble(str);\n System.out.println(d);\n str = \"asdf\"; //throws exception\n try {\n d = Double.parseDouble(str);\n } catch (NumberFormatException e) {\n System.out.println(\"error\");\n }\n System.out.println(d); //d remains same/old value;\n\n }",
"public final void mInt() throws RecognitionException {\r\n\t\ttry {\r\n\t\t\tint _type = Int;\r\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\r\n\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:165:6: ( ( '0' .. '9' )+ )\r\n\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:165:9: ( '0' .. '9' )+\r\n\t\t\t{\r\n\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:165:9: ( '0' .. '9' )+\r\n\t\t\tint cnt7=0;\r\n\t\t\tloop7:\r\n\t\t\twhile (true) {\r\n\t\t\t\tint alt7=2;\r\n\t\t\t\tint LA7_0 = input.LA(1);\r\n\t\t\t\tif ( ((LA7_0 >= '0' && LA7_0 <= '9')) ) {\r\n\t\t\t\t\talt7=1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tswitch (alt7) {\r\n\t\t\t\tcase 1 :\r\n\t\t\t\t\t// C:\\\\Users\\\\don\\\\workspace\\\\sea-of-ql-repo-3\\\\ckonig\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {\r\n\t\t\t\t\t\tinput.consume();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\r\n\t\t\t\t\t\trecover(mse);\r\n\t\t\t\t\t\tthrow mse;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault :\r\n\t\t\t\t\tif ( cnt7 >= 1 ) break loop7;\r\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(7, input);\r\n\t\t\t\t\tthrow eee;\r\n\t\t\t\t}\r\n\t\t\t\tcnt7++;\r\n\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tstate.type = _type;\r\n\t\t\tstate.channel = _channel;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\t// do for sure before leaving\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void outAIntegerExpr(AIntegerExpr node) {\n\t\til.append(new PUSH(cp, Integer.valueOf(node.getNumber().getText()))); \n\n\t}",
"public void testCompareIntegerStrings() {\n\t\tString one = 1+\"\";\n\t\tString two = 2+\"\";\n\t\t//1 ist kleiner 2\n\t\tassertTrue(comp.compareInteger(one, two) == -1);\n\t\tassertTrue(comp.compareInteger(one, one) == 0);\n\t\tassertTrue(comp.compareInteger(two, one) == 1);\n\t}",
"SEIntegerVariable getOperand2();",
"public static void main(String args[]){\nSystem.out.println(Integer.toOctalString(8)); \nSystem.out.println(Integer.toOctalString(19)); \nSystem.out.println(Integer.toOctalString(81)); \n}",
"@Override\n\tpublic String toString() {\n\t\tif (this.imag == 0) {\n\t\t\tif (this.reell == 0) {\n\t\t\t\treturn \"\" + 0;\n\t\t\t} else {\n\t\t\t\treturn \"\" + reell;\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.reell == 0) {\n\t\t\t\tif (this.imag > 0) {\n\t\t\t\t\treturn \"+\" + imag + \"i\";\n\t\t\t\t} else {\n\t\t\t\t\treturn \"-\" + imag * (-1) + \"i\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.imag > 0) {\n\t\t\treturn \"\" + reell + \" + i*\" + imag;\n\t\t} else {\n\t\t\treturn \"\" + reell + \" -\" + imag * (-1) + \"i\";\n\t\t}\n\t}",
"public int evaluate(String expression) {\n\t\tStack oPSt = new Stack();\n\t\tfor (int i = 0; i < expression.length(); i++) {\n\t\t\tString x = expression.substring(i, i + 1);\n\t\t\tStringBuilder longIntegers = new StringBuilder();\n\t\t\tif (x.equals(\" \"))\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tint counter = 0;\n\t\t\t\twhile (counter + i < expression.length()\n\t\t\t\t\t\t&& !expression.substring(i + counter, i + counter + 1).equals(\" \")) {\n\t\t\t\t\tlongIntegers.append(expression.substring(i + counter, i + 1 + counter));\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\ti = i + counter;\n\t\t\t}\n\t\t\tx = longIntegers.toString();\n\t\t\tif (isNum(x)) {\n\t\t\t\toPSt.push(Float.parseFloat(x));\n\t\t\t} else if (x.equals(\"*\") || x.equals(\"+\") || x.equals(\"/\") || x.equals(\"-\")) {\n\t\t\t\tFloat num1 = (Float) oPSt.pop(), num2 = (Float) oPSt.pop();\n\t\t\t\tif (x.equals(\"+\"))\n\t\t\t\t\toPSt.push(num1 + num2);\n\t\t\t\telse if (x.equals(\"*\"))\n\t\t\t\t\toPSt.push(num1 * num2);\n\t\t\t\telse if (x.equals(\"/\"))\n\t\t\t\t\toPSt.push(num2 / num1);\n\t\t\t\telse\n\t\t\t\t\toPSt.push(num2 - num1);\n\t\t\t} else\n\t\t\t\tthrow new RuntimeException(\"Invalid Input\");\n\n\t\t}\n\t\tif (oPSt.size() == 0)\n\t\t\treturn 0;\n\t\treturn (int)Math.round((Float) oPSt.pop());\n\t}",
"public String toStringEval() throws BwException {\n\t\tString str = \"(\";\n\t\tif (this.title != null)\n\t\t\tstr += this.title;\n\t\telse if (this.varName != null)\n\t\t\tstr += this.varName;\n\t\tif (this.minVal != null)\n\t\t\tstr += \",\" + this.minVal.toStringEval();\n\t\tif (this.curVal != null)\n\t\t\tstr += \",\" + this.curVal.toStringEval();\n\t\tif (this.maxVal != null)\n\t\t\tstr += \",\" + this.maxVal.toStringEval();\n\t\tstr += \")\";\n\t\treturn str;\n\t}",
"public static void main(String[] args)\r\n\t{\n\t\t\r\n\t\tInteger myint=3;\r\n\t\tDouble mydble=2.5;\r\n\t\tCharacter mychar='k';\r\n\t\t\r\n\t\tSystem.out.println(myint.intValue());\r\n\t\tSystem.out.println(mydble.doubleValue());\r\n\t\tSystem.out.println(mychar.charValue());\r\n\t\t\r\n\t\tString number=\"123\";\r\n\t\t\r\n\t\tint num=Integer.parseInt(number); //Parsing the string to int\r\n\t\t\r\n\t\tint num2=num+100; //Adding to check the parsed value\r\n\t\t\r\n\t\tSystem.out.println(num2); //Output\r\n\r\n\t}",
"@Test\n\tpublic void input_10_() throws ValueOutOfBoundsException, MalformedNumberException {\n\t assertEquals(10, new RomanArabicConverter(\"10\").toArabic());\n assertEquals(\"X\", new RomanArabicConverter(\"10\").toRoman());\n\t}",
"String intWrite();",
"@Test\n public void testDigits() {\n final String result = calc.type(\"1 + 2 - 3\")\n .press_equalBtn()\n .result();\n\n Assert.assertEquals(result, \"0\");\n }",
"protected abstract Value evaluate();",
"public String toString() {\n return Integer.toString(sum);\n }",
"Integer getValue();",
"Integer getValue();",
"public String getSubInt() {\n this.subInt();\n return this.subintegral;\n\n }",
"public String toString()\n {\n return storageInt+\"\";\n }",
"public String toString(){\r\n return (\"Display is showing number \" + numberToDisplay);\r\n }",
"<C> IntegerLiteralExp<C> createIntegerLiteralExp();",
"public static void main(String[] args)\n {\n //test ReverseInteger\n int x=1234;\n int y=Integer.MAX_VALUE;\n ReverseInteger ri=new ReverseInteger();\n System.out.println(\"Reverse x and y: \"+ri.reverse(x)+\" \"+ri.reverse(y));\n\n //test RomanToInteger\n String roman=\"DCMLLLXIV\";\n System.out.println(\"Roman to Integer: \"+new RomanToInteger().romanToInt(roman));\n\n //test IntegerToRoman\n int integer=3210;\n System.out.println(\"Integer to Roman: \"+new IntegerToRoman().intToRoman(integer));\n\n //test PalindromeNumber\n int z=1297887921;\n PalindromeNumber pi=new PalindromeNumber();\n System.out.println(\"Is Palindrome? \"+pi.isPalindrome(z));\n\n System.out.println(\"Is Palindrome? \"+pi.isPalidrome2(z));\n\n //test atoi\n String[] arr={\"-108afaf\", \"0\", \"21474836471\", \"2147483657\", \"-21474836481\"};\n StringToInteger sti=new StringToInteger();\n System.out.println(\"String to integer: \");\n for(String s : arr)\n {\n System.out.print(sti.atoi(s)+\" \");\n }\n }",
"@Override\n\tpublic String toString() {\n\t\tString out = \"\";\n\t\tfor (Literal s : literals) {\n\t\t\tout = out + \" (\"+ s.getLiteral()+\" \"+((s.getArithmetic_value()==null)?s.isLiteral_positivity():s.getArithmetic_value())+\") \";\n\t\t}\n\t\treturn out;\n\t}",
"Integer getDataStrt();",
"@Override\n public String apply(Integer i) {\n //kombinowałem długo ale nie udało mi sie wykminić jak zrobić to zadanie przy użuciu tego interfejsu funkcyjnego\n //i zrobiłem to iteracyjnie\n return null;\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(N_8_String_to_Integer.myAtoi(\"-2147483649\"));\r\n\t\t//System.out.println(Integer.valueOf(\"-2147483649\"));\r\n\t}",
"public String toString() {\n\t\tif(useNum < 10) {\n\t\t\treturn \"0\" + useNum + useStr + \" \" + idNum;\n\t\t} else {\n\t\t\treturn useNum + useStr + \" \" + idNum;\n\t\t}\n\t}",
"public static void main(String[] args) {int a=10;\n//\t\tint b=9;\n//\t\tString c =\"surya\";\n//\t\tString d=\"9\";\n//\t\t\n//\t\tint e=Integer.parseInt(d);\n//\t\t\n//\t\tSystem.out.println(a+b);\t\t\n//\t\tSystem.out.println(b+c);\n//\t\tSystem.out.println(b+d);\n//\t\tSystem.out.println(b+e);\n\t\t\n//\t\tString A=\"10\";\n//\t\tString B=\"30\";\n//\t\tSystem.out.println(A+B);//1020\n//\t\t\n//\t\tint c= Integer.parseInt(B);\n//\t\tint d= Integer.parseInt(A);\n//\t\tSystem.out.println(c+d);//30\n//\t\t\n\t\n\tint A = 10;\n\tint B = 20;\n\t\n\tSystem.out.println(A+B);//30\n\t\n\tString C = String.valueOf(A);\n\tString D = String.valueOf(B);\n\t\n\tSystem.out.println(C+D);//1020\n\t\n\t\n\t\n\t}",
"@Override\n public String toString() {\n String num = \"\";\n\n if (!isPositive) {\n // Add '-' if the number is negative\n num = num.concat(\"-\");\n }\n\n // Add all the digits in reverse order\n for (int i = number.size() - 1; i >= 0; --i) {\n num = num.concat(number.get(i).toString());\n }\n\n return num;\n }",
"public String toString() {\n return operator + \"(\" + argument + \")\";\n }",
"public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Test\n public void testShouldStringMinus123WhenInputIsIntegerMinus123() {\n int given = -123;\n\n // When: Call numberToString method\n String actual = Kata.numberToString(given);\n\n // Then:\n assertEquals(\"-123\", actual);\n }",
"private static String evaluate(ArrayList<String> operators, ArrayList<String> operands) {\n\n /* Check for valid input. There should be one more operand than operator. */\n if (operands.size() != operators.size()+1)\n return \"Invalid Input\";\n\n String current;\n int value;\n int numMultiply = 0;\n int numAdd = 0;\n int currentOperator = 0;\n\n /* Get the number of multiplications in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"*\"))\n numMultiply++;\n }\n\n /* Get the number of addition and subtraction in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"-\") || operators.get(i).equals(\"+\"))\n numAdd++;\n }\n\n /* Evaluate multiplications first, from left to right. */\n while (numMultiply > 0){\n\n current = operators.get(currentOperator);\n if (current.equals(\"*\")) {\n\n /* When multiplication is found in the operators, get the associative operands from the operands list.\n Associative operands are found in the operands list at indexes current operator and current operator + 1.\n */\n value = Integer.parseInt(operands.get(currentOperator)) * Integer.parseInt(operands.get(currentOperator+1));\n\n /* Remove the operands and the operator since they have been evaluated and add the evaluated answer back in the operands. */\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n\n numMultiply--;\n }\n else\n currentOperator++;\n }\n\n currentOperator = 0;\n\n /* Next evaluate the addition and subtraction, from left to right. */\n while (numAdd > 0){\n current = operators.get(currentOperator);\n if (current.equals(\"+\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) + Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n\n else if (current.equals(\"-\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) - Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n else\n currentOperator++;\n }\n\n /* When all the operations have been evaluated, the final answer will be in the first element of the operands list. */\n return operands.get(0);\n }",
"public String toString()\r\n\t{\r\n\t\tcheckInitialization();\r\n\t\treturn equationString + \" = \" + getResult();\r\n\t}",
"public String toString()\n\t{\n\t\t// TO DO\t\n\t\t\n\t\tString s = new String();\n\t\tfor(int i=0; i<infNumber.length; i++)\n\t\t{\n\t\t\ts = s +(Integer.toString(infNumber[i]));\n\t\t}\n\t\t\t\t\n\t\t\n\t\tif(isNeg)\n\t\t{\n\t\t\ts = \"-\" + s;\n\t\t}\n\t\t\n\t\treturn s;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn Integer.toUnsignedString(value);\n\t}",
"private String intString(int n){\r\n String s=\"\";\r\n if(n>9){\r\n s+=(char)(Math.min(n/10,9)+'0');\r\n }\r\n s+=(char)(n%10+'0');\r\n return s; \r\n }"
] | [
"0.6223804",
"0.6106825",
"0.5812525",
"0.58122003",
"0.58073634",
"0.57682353",
"0.57495904",
"0.56744206",
"0.56688225",
"0.5588288",
"0.5551301",
"0.5543335",
"0.5534964",
"0.55015874",
"0.5501558",
"0.5452302",
"0.5447228",
"0.5444639",
"0.5439687",
"0.5403034",
"0.5399206",
"0.5392706",
"0.5387407",
"0.53858185",
"0.536507",
"0.53593194",
"0.5356082",
"0.5288118",
"0.52758145",
"0.5272984",
"0.5271643",
"0.526918",
"0.52481186",
"0.52419674",
"0.52376777",
"0.5231366",
"0.5202704",
"0.51817167",
"0.5164314",
"0.516391",
"0.51579696",
"0.5146339",
"0.51227504",
"0.5101248",
"0.50977755",
"0.5096271",
"0.5096246",
"0.50866324",
"0.50798035",
"0.5071478",
"0.50665283",
"0.50482094",
"0.5046522",
"0.5043575",
"0.5029547",
"0.5029547",
"0.5029547",
"0.50292665",
"0.5017533",
"0.50108653",
"0.5000769",
"0.4998903",
"0.49952567",
"0.49952567",
"0.49891064",
"0.49791956",
"0.49787942",
"0.49730244",
"0.4956492",
"0.49548882",
"0.49473006",
"0.4945926",
"0.4940126",
"0.49332738",
"0.49321267",
"0.49303207",
"0.49251026",
"0.49236163",
"0.49188974",
"0.49103522",
"0.49103522",
"0.4908515",
"0.49041733",
"0.49041492",
"0.48976475",
"0.4896106",
"0.48956123",
"0.4895358",
"0.48946348",
"0.48930115",
"0.489115",
"0.4884553",
"0.4884464",
"0.4884115",
"0.48836565",
"0.48782623",
"0.4875862",
"0.48745975",
"0.48704764",
"0.48690715",
"0.48670343"
] | 0.0 | -1 |
TODO: Implement column level permissions | @Override
public void checkCanSelectFromColumns(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, AccessControlContext context, SchemaTableName tableName, Set<Subfield> columnOrSubfieldNames)
{
if (!checkTablePermission(identity, tableName, SELECT)) {
denySelectTable(tableName.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean canEditValueOfColumn(ModelColumnInfo<Item> column);",
"public abstract int getColumn();",
"public boolean supportsColumnCheck() {\n \t\treturn true;\n \t}",
"public interface Column extends Field {\n\n\t/**\n\t * Get the index of the column within the tabular data set. This is\n\t * always 1 based. If a value of 0 is returned that is interpreted as\n\t * this column does not a fixed position and will be assigned an index.\n\t * \n\t * @return The index.\n\t */\n\tpublic int getIndex();\n\t\n}",
"public boolean isReadOnly(int column) throws SQLException {\n\t\t\treturn false;\n\t\t}",
"@Override\n public void checkCanCreateViewWithSelectFromColumns(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, AccessControlContext context, SchemaTableName tableName, Set<String> columnNames)\n {\n if (!checkTablePermission(identity, tableName, SELECT)) {\n denySelectTable(tableName.toString());\n }\n if (!checkTablePermission(identity, tableName, GRANT_SELECT)) {\n denyCreateViewWithSelect(tableName.toString(), identity);\n }\n }",
"Column createColumn();",
"public abstract void newColumn();",
"boolean canInsert(int column);",
"@Override\n\tpublic boolean isReadOnly(int arg0) throws SQLException {\n\t\treturn false;\n\t}",
"@Override\r\n\t\tpublic boolean isReadOnly() throws SQLException {\n\t\t\treturn false;\r\n\t\t}",
"Permission selectByPrimaryKey(String id);",
"Permission selectByPrimaryKey(Integer id);",
"abstract public void getPermission();",
"public interface Columns {\r\n public static final String USERNAME = \"username\";\r\n public static final String EMAIL = \"email\";\r\n public static final String PW = \"password\";\r\n public static final String TIME = \"create_time\";\r\n public static final String AUTHORITY = \"authority_id\";\r\n }",
"public boolean canAddRow()\n {\n\t \treturn getAccessBit(0);\n }",
"public TableRole getTableRole();",
"boolean isNeedColumnInfo();",
"@Override\n\tpublic void visit(Column arg0) {\n\t\t\n\t}",
"Column baseColumn();",
"@Test\n\tvoid selectDbTableColumns() {\n\t\tList<CodeGenTableColumn> res = service.selectDbTableColumns(\"SYS_ROLE\");\n\t\tAssertions.assertNotNull(res);\n\t}",
"public ColumnContext context();",
"Column getCol();",
"private static ArrayList<Boolean> retrieveUserPermissionsFromDb(String username) throws IOException, SQLException {\n ArrayList<Boolean> userPermissions = new ArrayList<>();\n ArrayList<String> retrievedUser = retrieveUser(username);\n userPermissions.add(0, stringToBoolean(retrievedUser.get(3))); // Create billboard\n userPermissions.add(1, stringToBoolean(retrievedUser.get(4))); // Edit billboard\n userPermissions.add(2, stringToBoolean(retrievedUser.get(5))); // Edit schedule\n userPermissions.add(3, stringToBoolean(retrievedUser.get(6))); // Edit User\n return userPermissions;\n }",
"@Override\n\tpublic void visit(Column arg0) {\n\n\t}",
"int insertSelective(RolePermission record);",
"public abstract void addColumn(Column c);",
"public List<Column> getColumns();",
"protected void checkColumn(int column) {\n\tif (column < 0 || column >= columns) throw new IndexOutOfBoundsException(\"Attempted to access \"+toStringShort()+\" at column=\"+column);\n}",
"private bildeBaseColumns() {\n\n }",
"public int getColumn() {\n // YOUR CODE HERE\n return this.column;\n }",
"java.lang.String getColumn();",
"ColumnInfoFilter getColumnInfoFilter();",
"@Test\n public void test_level_behaviours_columns_01() {\n Assert.assertFalse(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.LOW));\n Assert.assertFalse(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.LOW));\n }",
"@Override\n\t\t\tpublic ColumnMetaData getColumnMetaData() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\t\"If you want to use val() to create a real\"\n\t\t\t\t\t\t\t\t+ \" column within a tuple, give it a name (i.e. use val(obj, name))!\");\n\t\t\t}",
"EpermissionDO selectByPrimaryKey(Long id);",
"public Permission[] getPermissionsField() {\n\treturn super.getPermissions(null);\n }",
"protected abstract String getFavoriteColumnName();",
"@Override\n public Boolean generateColumn() {\n presenter.appendColumn(editingWrapper().getActionCol52());\n\n return true;\n }",
"public interface Column{\n\t\tpublic abstract String asc();\n\t\tpublic abstract String desc();\n\t}",
"private interface Permit {\n\t\t/**\n\t\t * context id\n\t\t */\n\t\tpublic String id();\n\t\t\n\t\t/**\n\t\t * The context which we have a permit to\n\t\t */\n\t\tpublic ColumnContext context();\n\n\t\t/**\n\t\t * Must call release when done with context\n\t\t */\n\t\tpublic void revoke();\n\t}",
"@Test\n public void test_level_behaviours_columns_02() {\n Assert.assertTrue(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.MEDIUM));\n Assert.assertFalse(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.MEDIUM));\n \n // This also applies to DEFAULT level\n Assert.assertTrue(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.DEFAULT));\n Assert.assertFalse(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.DEFAULT));\n }",
"ColumnInfoTransformer getColumnInfoTransformer();",
"@Override\r\n\tprotected int[] getColumnModified(ColumnDefinition columnDefinition, DatabaseMetaData dbmd) {\n\t\treturn null;\r\n\t}",
"@Override\n public int getColumnCount()\n {\n if (!UserMain.self.is_user() && !UserMain.self.is_admin())\n return col_names.length - 2;\n\n // EDIT IST 2.LAST ROW!!!!\n if (!UserMain.self.is_admin())\n return col_names.length - 1;\n\n\n return col_names.length;\n }",
"Col createCol();",
"public interface ColumnMetaData {\n\n\t/**\n\t * The uniqueness level of a column data type.\n\t */\n\tenum Uniqueness {\n\t\t/**\n\t\t * No limitations. Multiple instances of a single column meta data type can be attached to a table or even a\n\t\t * single column.\n\t\t */\n\t\tNONE,\n\n\t\t/**\n\t\t * Multiple instances of a single column meta data type can be attached to a table but at most one per column.\n\t\t */\n\t\tCOLUMN,\n\n\t\t/**\n\t\t * At most one instance of the column meta data type can be attached to a table.\n\t\t */\n\t\tTABLE\n\t}\n\n\t/**\n\t * The unique type id of the column meta data.\n\t *\n\t * @return the type id\n\t */\n\tString type();\n\n\t/**\n\t * The uniqueness level of the meta data. Defaults to {@link Uniqueness#NONE} (no restrictions).\n\t *\n\t * @return the uniqueness level\n\t */\n\tdefault Uniqueness uniqueness() {\n\t\treturn Uniqueness.NONE;\n\t}\n\n}",
"public int getAD_Column_ID();",
"@Override\r\n\tpublic String getType() {\n\t\treturn \"column\";\r\n\t}",
"int getColumn();",
"@Override\n public ColumnInfo getColumnInfo() {\n return columnInfo;\n }",
"@Override\n protected List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> initBasicColumns() {\n List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> columns = new ArrayList<>();\n\n columns.add(new IconColumn<PrismContainerValueWrapper<AssignmentType>>(Model.of(\"\")) {\n\n private static final long serialVersionUID = 1L;\n\n @Override\n protected DisplayType getIconDisplayType(IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n return WebComponentUtil.createDisplayType(WebComponentUtil.createDefaultBlackIcon(\n AssignmentsUtil.getTargetType(rowModel.getObject().getRealValue())));\n }\n\n });\n\n columns.add(new AbstractColumn<PrismContainerValueWrapper<AssignmentType>, String>(createStringResource(\"PolicyRulesPanel.nameColumn\")){\n private static final long serialVersionUID = 1L;\n\n @Override\n public void populateItem(Item<ICellPopulator<PrismContainerValueWrapper<AssignmentType>>> cellItem,\n String componentId, final IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n String name = AssignmentsUtil.getName(rowModel.getObject(), getParentPage());\n if (StringUtils.isBlank(name)) {\n name = createStringResource(\"AssignmentPanel.noName\").getString();\n }\n cellItem.add(new Label(componentId, Model.of(name)));\n }\n });\n return columns;\n }",
"public interface Columns {\r\n public static final String LOGIN_ID = \"login_id\";\r\n public static final String PASSWORD = \"password\";\r\n public static final String ADDRESS = \"address\";\r\n public static final String FEE = \"fee\";\r\n public static final String GRACE_PERIOD = \"grace_period\";\r\n public static final String USEREMAIL = \"user_email\";\r\n }",
"ColumnFull createColumnFull();",
"private CellTable<CQLFunctionArgument> addColumnToTable(CellTable<CQLFunctionArgument> table,\n\t\t\tListHandler<CQLFunctionArgument> sortHandler) {\n\t\tif (table.getColumnCount() != TABLE_ROW_COUNT) {\n\t\t\tcom.google.gwt.user.client.ui.Label searchHeader = new com.google.gwt.user.client.ui.Label(\n\t\t\t\t\t\"Added Arguments List\");\n\t\t\tsearchHeader.getElement().setId(\"searchHeader_Label\");\n\t\t\tsearchHeader.setStyleName(\"measureGroupingTableHeader\");\n\t\t\tsearchHeader.getElement().setAttribute(\"tabIndex\", \"0\");\n\t\t\tcom.google.gwt.dom.client.TableElement elem = table.getElement().cast();\n\t\t\tTableCaptionElement caption = elem.createCaption();\n\t\t\tcaption.appendChild(searchHeader.getElement());\n\t\t\t\n\t\t\tMultiSelectionModel<CQLFunctionArgument> selectionModel = new MultiSelectionModel<CQLFunctionArgument>();\n\t\t\ttable.setSelectionModel(selectionModel);\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> nameColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentName());\n\t\t\t\t\t\n\t\t\t\t\ttitle = title.append(\"Name : \").append(value);\n\t\t\t\t\t/*\n\t\t\t\t\t * return\n\t\t\t\t\t * CellTableUtility.getColumnToolTip(value.toString(),\n\t\t\t\t\t * title.toString());\n\t\t\t\t\t */\n\t\t\t\t\treturn getDataTypeColumnToolTip(value.toString(), title, object.isValid());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t};\n\t\t\ttable.addColumn(nameColumn, SafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Name\\\">\" + \"Name\" + \"</span>\"));\n\t\t\t\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> dataTypeColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentType());\n\t\t\t\t\tif (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_MODEL_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getQdmDataType());\n\t\t\t\t\t\tif (object.getAttributeName() != null) {\n\t\t\t\t\t\t\tvalue = value.append(\".\").append(object.getAttributeName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_OTHER_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getOtherType());\n\t\t\t\t\t}\n\t\t\t\t\ttitle = title.append(\"Datatype : \").append(value);\n\t\t\t\t\treturn CellTableUtility.getColumnToolTip(value.toString(), title.toString());\n\t\t\t\t}\n\t\t\t};\n\t\t\ttable.addColumn(dataTypeColumn,\n\t\t\t\t\tSafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Datatype\\\">\" + \"Datatype\" + \"</span>\"));\n\t\t\t\n\t\t\tString colName = \"Modify\";\n\t\t\t\n\t\t\t// Modify by Delete Column\n\t\t\ttable.addColumn(\n\t\t\t\t\tnew Column<CQLFunctionArgument, CQLFunctionArgument>(getCompositeCellForQDMModifyAndDelete()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic CQLFunctionArgument getValue(CQLFunctionArgument object) {\n\t\t\t\t\t\t\treturn object;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, SafeHtmlUtils.fromSafeConstant(\"<span title='\" + colName + \"'> \" + colName + \"</span>\"));\n\t\t\t\n\t\t\ttable.setColumnWidth(0, 25.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(1, 35.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(2, 10.0, Unit.PCT);\n\t\t}\n\t\treturn table;\n\t}",
"public boolean isWritable(int column) throws SQLException {\n\t\t\treturn false;\n\t\t}",
"String getColumn();",
"@Test\n public void testColumnControlInvisibleColumns() {\n final JXTable table = new JXTable(sortableTableModel);\n // columns set to invisible before setting the columnControl\n // will not be inserted into the column control's list\n// table.getColumnExt(\"Last Name\").setVisible(false);\n table.setColumnControlVisible(true);\n int totalColumnCount = table.getColumnCount();\n final TableColumnExt priorityColumn = table.getColumnExt(\"First Name\");\n priorityColumn.setVisible(false);\n ColumnControlButton columnControl = (ColumnControlButton) table.getColumnControl();\n assertNotNull(\"popup menu not null\", columnControl.popup);\n int columnMenuItems = 0;\n Component[] items = ((DefaultColumnControlPopup) columnControl.getColumnControlPopup()).getPopupMenu().getComponents();\n for (int i = 0; i < items.length; i++) {\n if (!(items[i] instanceof JMenuItem)) {\n break;\n }\n columnMenuItems++;\n }\n // wrong assumption - has separator and actions!\n assertEquals(\"menu items must be equal to columns\", totalColumnCount, \n columnMenuItems);\n JCheckBoxMenuItem menuItem = (JCheckBoxMenuItem) ((DefaultColumnControlPopup) columnControl.getColumnControlPopup()).getPopupMenu()\n .getComponent(0);\n // sanit assert\n assertEquals(priorityColumn.getHeaderValue(), menuItem.getText());\n assertEquals(\"selection of menu must be equal to column visibility\", \n priorityColumn.isVisible(), menuItem.isSelected());\n }",
"public int getColumn();",
"@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}",
"@Override\n public boolean userCanAccess(int id) {\n return true;\n }",
"@Test\n public void test_level_behaviours_columns_03() {\n Assert.assertFalse(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.HIGH));\n Assert.assertTrue(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.HIGH));\n }",
"public int getColumn()\t \t\t{ return column; \t}",
"public GrantPermissionTableResponse grantPermissionTable(GrantPermissionTableRequest request) throws GPUdbException {\n GrantPermissionTableResponse actualResponse_ = new GrantPermissionTableResponse();\n submitRequest(\"/grant/permission/table\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public int getColumn(){\n return this.column;\n }",
"public UserPermission selectByPrimaryKey(String id) {\n\t\tUserPermission key = new UserPermission();\n\t\tkey.setId(id);\n\t\tUserPermission record = (UserPermission) getSqlMapClientTemplate()\n\t\t\t\t.queryForObject(\"userpermission.selectByPrimaryKey\", key);\n\t\treturn record;\n\t}",
"public Column getColumn(String columnName);",
"com.google.protobuf.ByteString getColumnBytes();",
"public int getAccessLevel() {\n return 0;\r\n }",
"@Override\n public boolean isCellEditable(int row, int col) {\n //Note that the data/cell address is constant,\n //no matter where the cell appears onscreen.\n if(!LoginForm.userRole.equals(\"sa\") && col == 2){\n return false;\n }\n else {\n return true;\n }\n \n }",
"public String getColumnName();",
"public int getCol() {\n return this.col; \n }",
"public int getCol() { return _col; }",
"int getPermissionWrite();",
"String getColumnName();",
"private EditableTableModel(Object[][] rowData, String[] columnName) { // constructor\n\t super(rowData, columnName);\n\t this.editable_columns = new boolean[columnName.length];\n\t Arrays.fill(editable_columns, Boolean.FALSE);\n\t }",
"List<TUserPermission> selectByExample(TUserPermissionExample example);",
"@Override\n public boolean isCellEditable(int row, int col) {\n if (col == 0) return false;\n String attribute = data[row][0].toString();\n return attribute.equals(\"Description\")||\n attribute.equals(\"Generated\")||\n attribute.equals(\"Scannum\")||\n attribute.equals(\"Patient ID\")||\n attribute.equals(\"Exp Date\")||\n attribute.equals(\"Exp Time\")||\n attribute.equals(\"db_name\") ||\n attribute.equals(\"Data type string\") ||\n attribute.equals(\"History\");\n }",
"int atColumn();",
"@Override\n public Class<?> getColumnClass(int aColumn) {\n return model.getColumnClass(aColumn); \n }",
"@Override\n public Set<String> getAllColumnIds() {\n return subFilter.getAllColumnIds();\n }",
"public int getColumn()\n {\n return col;\n }",
"Condition(Column col1, String relation, Column col2) {\n // YOUR CODE HERE\n }",
"SysRoleFunction selectByPrimaryKey(Integer id);",
"@Override\n\tpublic boolean isWritable(int arg0) throws SQLException {\n\n\t\treturn true;\n\t}",
"@Override\n\tpublic IColumns createColumns() {\n\t\treturn new WaybillforauditColumns();\n\t}",
"@Repository\npublic interface PermissionDao {\n Set<Permission> findPermissionsByRoleId(Integer roleId);\n}",
"SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}",
"public SystemColumn[] buildColumnList()\n throws StandardException\n {\n return new SystemColumn[] {\n SystemColumnImpl.getUUIDColumn(\"UUID\", false),\n SystemColumnImpl.getIdentifierColumn(\"ROLEID\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTEE\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTOR\", false),\n SystemColumnImpl.getIndicatorColumn(\"WITHADMINOPTION\"),\n SystemColumnImpl.getIndicatorColumn(\"ISDEF\"),\n };\n }",
"private void fillRoleTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n PreparedStatement ps = connection.prepareStatement(INIT.FILL_ROLES.toString())) {\n ResultSet rs = statement.executeQuery(INIT.GET_ALL_ROLES.toString());\n if(!rs.next()) {\n connection.setAutoCommit(false);\n ps.setString(1, \"user\");\n ps.setString(2, \"No permissions\");\n ps.addBatch();\n ps.setString(1, \"moderator\");\n ps.setString(2, \"Some permissions\");\n ps.addBatch();\n ps.setString(1, \"admin\");\n ps.setString(2, \"All permissions\");\n ps.addBatch();\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }",
"public java.lang.Long getColumnLong() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;",
"void onColumnClick(int column);",
"void check(Permission permission, DBObject dBObject) throws T2DBException;",
"User_Role selectByPrimaryKey(Integer id);",
"Column[] getColumns() { return columns; }",
"int insertSelective(Permission record);",
"Assist_table selectByPrimaryKey(Integer user);",
"@Override\n\tpublic IColumns createColumns() {\n\t\treturn new MaxissueactionColumns();\n\t}",
"List<Permission> selectAll();"
] | [
"0.59243876",
"0.5779024",
"0.57530284",
"0.57167387",
"0.56293327",
"0.5625535",
"0.5582158",
"0.55810285",
"0.55654943",
"0.55576897",
"0.55574477",
"0.5545978",
"0.5521817",
"0.55135936",
"0.55092525",
"0.5484852",
"0.5473195",
"0.5470441",
"0.54593825",
"0.544771",
"0.5446179",
"0.5441312",
"0.5413334",
"0.540021",
"0.5391978",
"0.5385478",
"0.53815705",
"0.5376839",
"0.5375322",
"0.5372827",
"0.5371759",
"0.537104",
"0.5354844",
"0.5348123",
"0.5346868",
"0.5342417",
"0.53360856",
"0.5317553",
"0.5307976",
"0.53071076",
"0.5306826",
"0.5283085",
"0.5280154",
"0.52772313",
"0.52757674",
"0.5272762",
"0.527232",
"0.5268647",
"0.52667457",
"0.52616805",
"0.525886",
"0.52533025",
"0.52508837",
"0.52487403",
"0.5246782",
"0.52369756",
"0.5236801",
"0.52345383",
"0.52329636",
"0.52327365",
"0.52310264",
"0.5209038",
"0.52069",
"0.52065206",
"0.5204912",
"0.52029663",
"0.51933557",
"0.5192483",
"0.5189331",
"0.5188967",
"0.516368",
"0.51636064",
"0.516154",
"0.51553875",
"0.5151247",
"0.5151072",
"0.5145283",
"0.5144209",
"0.5130685",
"0.5129613",
"0.5128383",
"0.51273173",
"0.51257706",
"0.5124807",
"0.5122414",
"0.51179236",
"0.51154846",
"0.5106865",
"0.51064545",
"0.5104363",
"0.5097648",
"0.508988",
"0.5085994",
"0.50823116",
"0.50769734",
"0.50745434",
"0.5067781",
"0.50651366",
"0.5062684",
"0.50517637"
] | 0.582226 | 1 |
TODO: implement column level permissions | @Override
public void checkCanCreateViewWithSelectFromColumns(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, AccessControlContext context, SchemaTableName tableName, Set<String> columnNames)
{
if (!checkTablePermission(identity, tableName, SELECT)) {
denySelectTable(tableName.toString());
}
if (!checkTablePermission(identity, tableName, GRANT_SELECT)) {
denyCreateViewWithSelect(tableName.toString(), identity);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean canEditValueOfColumn(ModelColumnInfo<Item> column);",
"@Override\n public void checkCanSelectFromColumns(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, AccessControlContext context, SchemaTableName tableName, Set<Subfield> columnOrSubfieldNames)\n {\n if (!checkTablePermission(identity, tableName, SELECT)) {\n denySelectTable(tableName.toString());\n }\n }",
"abstract public void getPermission();",
"public boolean supportsColumnCheck() {\n \t\treturn true;\n \t}",
"public abstract int getColumn();",
"Permission selectByPrimaryKey(String id);",
"public boolean isReadOnly(int column) throws SQLException {\n\t\t\treturn false;\n\t\t}",
"public interface Column extends Field {\n\n\t/**\n\t * Get the index of the column within the tabular data set. This is\n\t * always 1 based. If a value of 0 is returned that is interpreted as\n\t * this column does not a fixed position and will be assigned an index.\n\t * \n\t * @return The index.\n\t */\n\tpublic int getIndex();\n\t\n}",
"@Override\n\tpublic boolean isReadOnly(int arg0) throws SQLException {\n\t\treturn false;\n\t}",
"Permission selectByPrimaryKey(Integer id);",
"boolean canInsert(int column);",
"@Override\r\n\t\tpublic boolean isReadOnly() throws SQLException {\n\t\t\treturn false;\r\n\t\t}",
"private static ArrayList<Boolean> retrieveUserPermissionsFromDb(String username) throws IOException, SQLException {\n ArrayList<Boolean> userPermissions = new ArrayList<>();\n ArrayList<String> retrievedUser = retrieveUser(username);\n userPermissions.add(0, stringToBoolean(retrievedUser.get(3))); // Create billboard\n userPermissions.add(1, stringToBoolean(retrievedUser.get(4))); // Edit billboard\n userPermissions.add(2, stringToBoolean(retrievedUser.get(5))); // Edit schedule\n userPermissions.add(3, stringToBoolean(retrievedUser.get(6))); // Edit User\n return userPermissions;\n }",
"public boolean canAddRow()\n {\n\t \treturn getAccessBit(0);\n }",
"public TableRole getTableRole();",
"int insertSelective(RolePermission record);",
"public interface Columns {\r\n public static final String USERNAME = \"username\";\r\n public static final String EMAIL = \"email\";\r\n public static final String PW = \"password\";\r\n public static final String TIME = \"create_time\";\r\n public static final String AUTHORITY = \"authority_id\";\r\n }",
"public abstract void newColumn();",
"public Permission[] getPermissionsField() {\n\treturn super.getPermissions(null);\n }",
"Column createColumn();",
"@Test\n\tvoid selectDbTableColumns() {\n\t\tList<CodeGenTableColumn> res = service.selectDbTableColumns(\"SYS_ROLE\");\n\t\tAssertions.assertNotNull(res);\n\t}",
"private interface Permit {\n\t\t/**\n\t\t * context id\n\t\t */\n\t\tpublic String id();\n\t\t\n\t\t/**\n\t\t * The context which we have a permit to\n\t\t */\n\t\tpublic ColumnContext context();\n\n\t\t/**\n\t\t * Must call release when done with context\n\t\t */\n\t\tpublic void revoke();\n\t}",
"boolean isNeedColumnInfo();",
"EpermissionDO selectByPrimaryKey(Long id);",
"@Override\n public boolean userCanAccess(int id) {\n return true;\n }",
"protected void checkColumn(int column) {\n\tif (column < 0 || column >= columns) throw new IndexOutOfBoundsException(\"Attempted to access \"+toStringShort()+\" at column=\"+column);\n}",
"@Override\n\tpublic void visit(Column arg0) {\n\t\t\n\t}",
"public ColumnContext context();",
"int getPermissionWrite();",
"@Test\n public void test_level_behaviours_columns_01() {\n Assert.assertFalse(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.LOW));\n Assert.assertFalse(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.LOW));\n }",
"@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}",
"Column baseColumn();",
"public List<Column> getColumns();",
"@Override\n\tpublic void visit(Column arg0) {\n\n\t}",
"@Test\n public void test_level_behaviours_columns_02() {\n Assert.assertTrue(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.MEDIUM));\n Assert.assertFalse(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.MEDIUM));\n \n // This also applies to DEFAULT level\n Assert.assertTrue(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.DEFAULT));\n Assert.assertFalse(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.DEFAULT));\n }",
"public abstract void addColumn(Column c);",
"Column getCol();",
"void check(Permission permission, DBObject dBObject) throws T2DBException;",
"public GrantPermissionTableResponse grantPermissionTable(GrantPermissionTableRequest request) throws GPUdbException {\n GrantPermissionTableResponse actualResponse_ = new GrantPermissionTableResponse();\n submitRequest(\"/grant/permission/table\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public UserPermission selectByPrimaryKey(String id) {\n\t\tUserPermission key = new UserPermission();\n\t\tkey.setId(id);\n\t\tUserPermission record = (UserPermission) getSqlMapClientTemplate()\n\t\t\t\t.queryForObject(\"userpermission.selectByPrimaryKey\", key);\n\t\treturn record;\n\t}",
"ColumnInfoFilter getColumnInfoFilter();",
"public int getAccessLevel() {\n return 0;\r\n }",
"private bildeBaseColumns() {\n\n }",
"@Override\n public void checkPermission(Permission perm) {\n }",
"boolean check(Permission permission, Surrogate surrogate, boolean permissionRequired) throws T2DBException;",
"public boolean isWritable(int column) throws SQLException {\n\t\t\treturn false;\n\t\t}",
"List<TUserPermission> selectByExample(TUserPermissionExample example);",
"@Override\n public int getColumnCount()\n {\n if (!UserMain.self.is_user() && !UserMain.self.is_admin())\n return col_names.length - 2;\n\n // EDIT IST 2.LAST ROW!!!!\n if (!UserMain.self.is_admin())\n return col_names.length - 1;\n\n\n return col_names.length;\n }",
"protected abstract String getFavoriteColumnName();",
"@Override\n\t\t\tpublic ColumnMetaData getColumnMetaData() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\t\"If you want to use val() to create a real\"\n\t\t\t\t\t\t\t\t+ \" column within a tuple, give it a name (i.e. use val(obj, name))!\");\n\t\t\t}",
"java.lang.String getColumn();",
"public int getColumn() {\n // YOUR CODE HERE\n return this.column;\n }",
"@Test\n public void testColumnControlInvisibleColumns() {\n final JXTable table = new JXTable(sortableTableModel);\n // columns set to invisible before setting the columnControl\n // will not be inserted into the column control's list\n// table.getColumnExt(\"Last Name\").setVisible(false);\n table.setColumnControlVisible(true);\n int totalColumnCount = table.getColumnCount();\n final TableColumnExt priorityColumn = table.getColumnExt(\"First Name\");\n priorityColumn.setVisible(false);\n ColumnControlButton columnControl = (ColumnControlButton) table.getColumnControl();\n assertNotNull(\"popup menu not null\", columnControl.popup);\n int columnMenuItems = 0;\n Component[] items = ((DefaultColumnControlPopup) columnControl.getColumnControlPopup()).getPopupMenu().getComponents();\n for (int i = 0; i < items.length; i++) {\n if (!(items[i] instanceof JMenuItem)) {\n break;\n }\n columnMenuItems++;\n }\n // wrong assumption - has separator and actions!\n assertEquals(\"menu items must be equal to columns\", totalColumnCount, \n columnMenuItems);\n JCheckBoxMenuItem menuItem = (JCheckBoxMenuItem) ((DefaultColumnControlPopup) columnControl.getColumnControlPopup()).getPopupMenu()\n .getComponent(0);\n // sanit assert\n assertEquals(priorityColumn.getHeaderValue(), menuItem.getText());\n assertEquals(\"selection of menu must be equal to column visibility\", \n priorityColumn.isVisible(), menuItem.isSelected());\n }",
"public interface Columns {\r\n public static final String LOGIN_ID = \"login_id\";\r\n public static final String PASSWORD = \"password\";\r\n public static final String ADDRESS = \"address\";\r\n public static final String FEE = \"fee\";\r\n public static final String GRACE_PERIOD = \"grace_period\";\r\n public static final String USEREMAIL = \"user_email\";\r\n }",
"public interface ColumnMetaData {\n\n\t/**\n\t * The uniqueness level of a column data type.\n\t */\n\tenum Uniqueness {\n\t\t/**\n\t\t * No limitations. Multiple instances of a single column meta data type can be attached to a table or even a\n\t\t * single column.\n\t\t */\n\t\tNONE,\n\n\t\t/**\n\t\t * Multiple instances of a single column meta data type can be attached to a table but at most one per column.\n\t\t */\n\t\tCOLUMN,\n\n\t\t/**\n\t\t * At most one instance of the column meta data type can be attached to a table.\n\t\t */\n\t\tTABLE\n\t}\n\n\t/**\n\t * The unique type id of the column meta data.\n\t *\n\t * @return the type id\n\t */\n\tString type();\n\n\t/**\n\t * The uniqueness level of the meta data. Defaults to {@link Uniqueness#NONE} (no restrictions).\n\t *\n\t * @return the uniqueness level\n\t */\n\tdefault Uniqueness uniqueness() {\n\t\treturn Uniqueness.NONE;\n\t}\n\n}",
"@Override\r\n\tprotected int[] getColumnModified(ColumnDefinition columnDefinition, DatabaseMetaData dbmd) {\n\t\treturn null;\r\n\t}",
"@Repository\npublic interface PermissionDao {\n Set<Permission> findPermissionsByRoleId(Integer roleId);\n}",
"@Override\n public Boolean generateColumn() {\n presenter.appendColumn(editingWrapper().getActionCol52());\n\n return true;\n }",
"public interface Column{\n\t\tpublic abstract String asc();\n\t\tpublic abstract String desc();\n\t}",
"@Override\n public boolean isCellEditable(int row, int col) {\n //Note that the data/cell address is constant,\n //no matter where the cell appears onscreen.\n if(!LoginForm.userRole.equals(\"sa\") && col == 2){\n return false;\n }\n else {\n return true;\n }\n \n }",
"@Test\n public void test_level_behaviours_columns_03() {\n Assert.assertFalse(JdbcCompatibility.shouldTypeColumnsAsString(JdbcCompatibility.HIGH));\n Assert.assertTrue(JdbcCompatibility.shouldDetectColumnTypes(JdbcCompatibility.HIGH));\n }",
"private void fillRoleTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n PreparedStatement ps = connection.prepareStatement(INIT.FILL_ROLES.toString())) {\n ResultSet rs = statement.executeQuery(INIT.GET_ALL_ROLES.toString());\n if(!rs.next()) {\n connection.setAutoCommit(false);\n ps.setString(1, \"user\");\n ps.setString(2, \"No permissions\");\n ps.addBatch();\n ps.setString(1, \"moderator\");\n ps.setString(2, \"Some permissions\");\n ps.addBatch();\n ps.setString(1, \"admin\");\n ps.setString(2, \"All permissions\");\n ps.addBatch();\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }",
"int insertSelective(Permission record);",
"private static boolean hasPermission(String username, Permission requiredPermission) throws IOException, SQLException {\n ArrayList<Boolean> userPermissions = retrieveUserPermissionsFromDb(username);\n switch (requiredPermission) {\n case CreateBillboard:\n if (userPermissions.get(0)) return true;\n return false;\n case EditBillboard:\n if (userPermissions.get(1)) return true;\n return false;\n case ScheduleBillboard:\n if (userPermissions.get(2)) return true;\n return false;\n case EditUser:\n if (userPermissions.get(3)) return true;\n return false;\n default:\n return false; // Default to false if permission cannot be identified\n }\n }",
"@Override\n protected List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> initBasicColumns() {\n List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> columns = new ArrayList<>();\n\n columns.add(new IconColumn<PrismContainerValueWrapper<AssignmentType>>(Model.of(\"\")) {\n\n private static final long serialVersionUID = 1L;\n\n @Override\n protected DisplayType getIconDisplayType(IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n return WebComponentUtil.createDisplayType(WebComponentUtil.createDefaultBlackIcon(\n AssignmentsUtil.getTargetType(rowModel.getObject().getRealValue())));\n }\n\n });\n\n columns.add(new AbstractColumn<PrismContainerValueWrapper<AssignmentType>, String>(createStringResource(\"PolicyRulesPanel.nameColumn\")){\n private static final long serialVersionUID = 1L;\n\n @Override\n public void populateItem(Item<ICellPopulator<PrismContainerValueWrapper<AssignmentType>>> cellItem,\n String componentId, final IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n String name = AssignmentsUtil.getName(rowModel.getObject(), getParentPage());\n if (StringUtils.isBlank(name)) {\n name = createStringResource(\"AssignmentPanel.noName\").getString();\n }\n cellItem.add(new Label(componentId, Model.of(name)));\n }\n });\n return columns;\n }",
"public int getAD_Column_ID();",
"Col createCol();",
"@Override\n\tpublic boolean isWritable(int arg0) throws SQLException {\n\n\t\treturn true;\n\t}",
"SysRoleFunction selectByPrimaryKey(Integer id);",
"private CellTable<CQLFunctionArgument> addColumnToTable(CellTable<CQLFunctionArgument> table,\n\t\t\tListHandler<CQLFunctionArgument> sortHandler) {\n\t\tif (table.getColumnCount() != TABLE_ROW_COUNT) {\n\t\t\tcom.google.gwt.user.client.ui.Label searchHeader = new com.google.gwt.user.client.ui.Label(\n\t\t\t\t\t\"Added Arguments List\");\n\t\t\tsearchHeader.getElement().setId(\"searchHeader_Label\");\n\t\t\tsearchHeader.setStyleName(\"measureGroupingTableHeader\");\n\t\t\tsearchHeader.getElement().setAttribute(\"tabIndex\", \"0\");\n\t\t\tcom.google.gwt.dom.client.TableElement elem = table.getElement().cast();\n\t\t\tTableCaptionElement caption = elem.createCaption();\n\t\t\tcaption.appendChild(searchHeader.getElement());\n\t\t\t\n\t\t\tMultiSelectionModel<CQLFunctionArgument> selectionModel = new MultiSelectionModel<CQLFunctionArgument>();\n\t\t\ttable.setSelectionModel(selectionModel);\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> nameColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentName());\n\t\t\t\t\t\n\t\t\t\t\ttitle = title.append(\"Name : \").append(value);\n\t\t\t\t\t/*\n\t\t\t\t\t * return\n\t\t\t\t\t * CellTableUtility.getColumnToolTip(value.toString(),\n\t\t\t\t\t * title.toString());\n\t\t\t\t\t */\n\t\t\t\t\treturn getDataTypeColumnToolTip(value.toString(), title, object.isValid());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t};\n\t\t\ttable.addColumn(nameColumn, SafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Name\\\">\" + \"Name\" + \"</span>\"));\n\t\t\t\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> dataTypeColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentType());\n\t\t\t\t\tif (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_MODEL_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getQdmDataType());\n\t\t\t\t\t\tif (object.getAttributeName() != null) {\n\t\t\t\t\t\t\tvalue = value.append(\".\").append(object.getAttributeName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_OTHER_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getOtherType());\n\t\t\t\t\t}\n\t\t\t\t\ttitle = title.append(\"Datatype : \").append(value);\n\t\t\t\t\treturn CellTableUtility.getColumnToolTip(value.toString(), title.toString());\n\t\t\t\t}\n\t\t\t};\n\t\t\ttable.addColumn(dataTypeColumn,\n\t\t\t\t\tSafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Datatype\\\">\" + \"Datatype\" + \"</span>\"));\n\t\t\t\n\t\t\tString colName = \"Modify\";\n\t\t\t\n\t\t\t// Modify by Delete Column\n\t\t\ttable.addColumn(\n\t\t\t\t\tnew Column<CQLFunctionArgument, CQLFunctionArgument>(getCompositeCellForQDMModifyAndDelete()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic CQLFunctionArgument getValue(CQLFunctionArgument object) {\n\t\t\t\t\t\t\treturn object;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, SafeHtmlUtils.fromSafeConstant(\"<span title='\" + colName + \"'> \" + colName + \"</span>\"));\n\t\t\t\n\t\t\ttable.setColumnWidth(0, 25.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(1, 35.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(2, 10.0, Unit.PCT);\n\t\t}\n\t\treturn table;\n\t}",
"void check(Permission permission, Surrogate surrogate) throws T2DBException;",
"int getColumn();",
"ColumnInfoTransformer getColumnInfoTransformer();",
"List<Permission> selectAll();",
"int getPermissionRead();",
"public int getColumn();",
"@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }",
"String getColumn();",
"@Override\r\n\tpublic Permission queryRootPermission() {\n\t\treturn permissionDao.queryRootPermission();\r\n\t}",
"ColumnFull createColumnFull();",
"@Override\n public ColumnInfo getColumnInfo() {\n return columnInfo;\n }",
"@Override\r\n\tpublic String getType() {\n\t\treturn \"column\";\r\n\t}",
"public Column getColumn(String columnName);",
"int insert(RolePermission record);",
"int insertSelective(TUserPermission record);",
"User_Role selectByPrimaryKey(Integer id);",
"public SystemColumn[] buildColumnList()\n throws StandardException\n {\n return new SystemColumn[] {\n SystemColumnImpl.getUUIDColumn(\"UUID\", false),\n SystemColumnImpl.getIdentifierColumn(\"ROLEID\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTEE\", false),\n SystemColumnImpl.getIdentifierColumn(\"GRANTOR\", false),\n SystemColumnImpl.getIndicatorColumn(\"WITHADMINOPTION\"),\n SystemColumnImpl.getIndicatorColumn(\"ISDEF\"),\n };\n }",
"Condition(Column col1, String relation, Column col2) {\n // YOUR CODE HERE\n }",
"private EditableTableModel(Object[][] rowData, String[] columnName) { // constructor\n\t super(rowData, columnName);\n\t this.editable_columns = new boolean[columnName.length];\n\t Arrays.fill(editable_columns, Boolean.FALSE);\n\t }",
"String[] listGrantedTablePrivileges(HsqlName name) {\n return GranteeManager.getRightsArray(rightsMap.get(name, 0));\n }",
"@Override\n public boolean isCellEditable(int row, int col) {\n if (col == 0) return false;\n String attribute = data[row][0].toString();\n return attribute.equals(\"Description\")||\n attribute.equals(\"Generated\")||\n attribute.equals(\"Scannum\")||\n attribute.equals(\"Patient ID\")||\n attribute.equals(\"Exp Date\")||\n attribute.equals(\"Exp Time\")||\n attribute.equals(\"db_name\") ||\n attribute.equals(\"Data type string\") ||\n attribute.equals(\"History\");\n }",
"public int getColumn()\t \t\t{ return column; \t}",
"@Override\n public Set<String> getAllColumnIds() {\n return subFilter.getAllColumnIds();\n }",
"public int getColumn(){\n return this.column;\n }",
"@Override\n public boolean canEdit(Context context, Item item) throws java.sql.SQLException\n {\n // can this person write to the item?\n return authorizeService.authorizeActionBoolean(context, item, Constants.WRITE, true);\n }",
"String getPermission();",
"@Override\n public void checkPermission(Permission perm, Object context) {\n }",
"com.google.protobuf.ByteString getColumnBytes();",
"public Set<String> getRestrictingColumns() {\r\n\t\treturn Collections.unmodifiableSet(this.restrictingColumns.keySet());\r\n\t}",
"boolean isHasPermissions();"
] | [
"0.5919769",
"0.5892639",
"0.56753325",
"0.5657697",
"0.564399",
"0.5594579",
"0.55907816",
"0.558372",
"0.55689776",
"0.55623204",
"0.55399334",
"0.55241394",
"0.5512908",
"0.55027974",
"0.5475934",
"0.5464622",
"0.54601026",
"0.5439821",
"0.54228866",
"0.5403451",
"0.54019815",
"0.538964",
"0.5370964",
"0.53676474",
"0.5355251",
"0.5340975",
"0.5327849",
"0.53141165",
"0.531365",
"0.52938306",
"0.52887845",
"0.5271085",
"0.52676797",
"0.52604043",
"0.5259479",
"0.52590203",
"0.52499086",
"0.5247359",
"0.52463186",
"0.5245216",
"0.5243624",
"0.52342224",
"0.5229018",
"0.52258694",
"0.5223912",
"0.5218542",
"0.52095145",
"0.5203289",
"0.5203068",
"0.5202369",
"0.5202296",
"0.5198198",
"0.5194092",
"0.51928115",
"0.51891696",
"0.51765996",
"0.517492",
"0.51735055",
"0.5168547",
"0.51571375",
"0.51408917",
"0.5139908",
"0.51374406",
"0.5136326",
"0.51357704",
"0.5129154",
"0.5128342",
"0.5127983",
"0.5124082",
"0.51231796",
"0.5121367",
"0.5118827",
"0.5103766",
"0.51031184",
"0.51012945",
"0.50980276",
"0.50962144",
"0.5094641",
"0.5082336",
"0.50819576",
"0.50809085",
"0.50760937",
"0.5064244",
"0.50596756",
"0.5058917",
"0.5056968",
"0.5055628",
"0.5051501",
"0.5050076",
"0.5049445",
"0.50487715",
"0.50300336",
"0.50276816",
"0.5025178",
"0.5024797",
"0.5021065",
"0.5019709",
"0.5019013",
"0.50139785",
"0.50109875"
] | 0.56884784 | 2 |
Intiliaze Appium driver and capabilities for device | private void intializeAppiumDriver() {
File app = new File("src/main/resources", CommonUtils.getCentralData("App"));
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, CommonUtils.getCentralData("PlatformName"));
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, CommonUtils.getCentralData("PlatformVersion"));
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, CommonUtils.getCentralData("DeviceName"));
if (IS_ANDROID) {
capabilities.setCapability(APPLICATION_NAME, app.getAbsolutePath());
capabilities.setCapability(APP_PACKAGE, CommonUtils.getCentralData("AppPackage"));
capabilities.setCapability(APP_ACTIVITY, CommonUtils.getCentralData("AppActivity"));
}
if (IS_IOS) {
capabilities.setCapability(AUTOMATION_NAME, IOS_XCUI_TEST);
capabilities.setCapability("app", app.getAbsolutePath());
}
capabilities.setCapability(FULL_RESET, CommonUtils.getCentralData("FullReset"));
capabilities.setCapability(NO_RESET, CommonUtils.getCentralData("NoReset"));
capabilities.setCapability("udid", CommonUtils.getCentralData("UDID"));
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, CommonUtils.getCentralData("WaitTimeoutInSeconds"));
try {
driver = new AppiumDriver(new URL(CommonUtils.getCentralData("URL")), capabilities);
} catch (MalformedURLException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@BeforeClass\npublic void beforeClass() throws MalformedURLException {\n\tDesiredCapabilities caps = new DesiredCapabilities();\n\tcaps.setCapability(\"deviceName\", \"Xiaomi Redmi Note 5 Pro\");\n caps.setCapability(\"platformName\", \"android\");\n caps.setCapability(\"automationName\", \"UiAutomator2\");\n caps.setCapability(\"appPackage\", \"com.android.chrome\");\n caps.setCapability(\"appActivity\", \"com.google.android.apps.chrome.Main\");\n caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n}",
"@BeforeClass\n\tpublic void appLaunch() throws IOException\n\t{\n\n\t\t/*String Appium_Node_Path=\"C:/Program Files (x86)/Appium/node.exe\"; \n\t\tString Appium_JS_Path=\"C:/Program Files (x86)/Appium/node_modules/appium/bin/appium.js\"; \n\t\tappiumService = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingPort(4723).usingDriverExecutable(new File(Appium_Node_Path)).withAppiumJS(new File(Appium_JS_Path))); \n\t\tappiumService.start();\n\t\t */\t\t\t\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM,Platform.ANDROID);\n\t\tcapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT,3000);\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"PLATFORMNAME\"));\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"DeviceName\"));\n\t\tcapabilities.setCapability(MobileCapabilityType.VERSION,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"PLATFORMVERSION\"));\n//\t\tcapabilities.setCapability(\"appPackage\", Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"packageName\"));\n//\t\tcapabilities.setCapability(\"appActivity\",Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"activityName\"));\n\t\t\n\t\t// for testing\n\t\tcapabilities.setCapability(\"appPackage\", \"in.amazon.mShop.android.shopping\");\n\t\tcapabilities.setCapability(\"appActivity\", \"com.amazon.mShop.home.HomeActivity\");;\n\n\n\t\tURL url= new URL(\"http://0.0.0.0:4723/wd/hub\");\n\t\tdriver = new AndroidDriver<WebElement>(url, capabilities);\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t// testing purpose\n\t\tbackButton(driver);\n\t\tbackButton(driver);\n\t\t\n// in.amazon.mShop.android.shopping\n//\tcom.amazon.mShop.sso.SigninPromptActivity\n\n\t}",
"@BeforeClass\npublic void beforeClass() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"deviceName\", \"Xiaomi Redmi Note 5 Pro\");\n caps.setCapability(\"platformName\", \"android\");\n caps.setCapability(\"automationName\", \"UiAutomator2\");\n caps.setCapability(\"appPackage\", \"com.google.android.keep\");\n caps.setCapability(\"appActivity\", \".activities.BrowseActivity\");\n caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n}",
"public static AppiumDriver getDriver(String platformtype, AppiumDriverLocalService service) throws IOException, TimeoutException, URISyntaxException {\n AppiumDriver driver;\n /* List<InterceptedMessage> messages = new ArrayList<InterceptedMessage>();\n\n\n MitmproxyJava proxy = new MitmproxyJava(\"/usr/local/bin/mitmdump\", (InterceptedMessage m) -> {\n System.out.println(\"intercepted request for \" + m.requestURL.toString());\n messages.add(m);\n return m;\n });\n //System.out.println(\"Hello World\");\n proxy.start();*/\n if (platformtype== \"Android\") {\n DesiredCapabilities options = new DesiredCapabilities();\n options.setCapability(\"deviceName\", propertyManager.getInstance().getdevicename()); //Pixel_XL_API_29\n options.setCapability(\"udid\",propertyManager.getInstance().getdeviceUDID());\n //options.setCapability(\"avd\",\"Pixel_XL_API_29\");\n options.setCapability(\"platformName\", propertyManager.getInstance().getplatformName());\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getplatformVersion()); //emulator: 10.0.0\n options.setCapability(\"automationName\", \"UiAutomator2\");\n options.setCapability(\"autoGrantPermissions\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"app\",propertyManager.getInstance().getAndroidapp());\n options.setCapability(\"uiautomator2ServerInstallTimeout\", \"60000\");\n options.setCapability(\"abdExecTimeout\", \"60000\");\n options.setCapability(\"ACCEPT_SSL_CERTS\",true);\n options.setCapability(\"clearDeviceLogsOnStart\",\"true\");\n //options.setCapability(\"--set ssl_version_client\",\"all\");\n //options.setCapability(\"--proxy-server\",\"localhost:8080\");\n //options.setCapability(\"appWaitPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appWaitActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n //options.setCapability(\"appPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n\n\n driver = new AndroidDriver<MobileElement>(service, options);\n return driver;\n }\n else if(platformtype== \"iOS\"){\n DesiredCapabilities options = new DesiredCapabilities();\n\n options.setCapability(\"platformName\", \"iOS\");\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getiOSplatformVersion());\n options.setCapability(\"deviceName\", propertyManager.getInstance().getiOSdevicename());\n options.setCapability(\"udid\",propertyManager.getInstance().getiOSUDID());\n //options.setCapability(CapabilityType.BROWSER_NAME,\"safari\");\n //options.setCapability(\"automationName\", \"XCUITest\");\n options.setCapability(\"bundleId\",\"com.clearchannel.iheartradio.enterprise\");\n options.setCapability(\"startIWDP\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"useNewWDA\",\"false\");\n //options.setCapability(\"showIOSLog\",\"true\");\n //options.setCapability(\"app\",\"/Users/Shruti/Desktop/untitled folder/iHRiOSAppCenter/iHeartRadio.ipa\"); // /Users/Shruti/Downloads/iHeartRadio.ipa\n options.setCapability(\"xcodeOrgId\",\"BCN32U332R\");\n options.setCapability(\"xcodeSigningId\",\"iPhone Developer\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"SHOW_XCODE_LOG\",\"true\");\n //options.setCapability(\"updatedWDABundleId\",\"com.Shruti7505.WebDriverAgentRunner\");\n driver = new IOSDriver<MobileElement>(service,options);\n return driver;\n }\n return driver=null;\n\n }",
"@Before\n public void setUp() throws Exception {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(\"deviceName\", \"Google Nexus 5\");\n capabilities.setCapability(\"platformVersion\", \"4.4.4\");\n capabilities.setCapability(\"udid\", \"192.168.27.101:5555\");\n capabilities.setCapability(\"app\", \"D:\\\\Projects\\\\Zappy\\\\ZappyBuilds\\\\app-release.apk\");\n// capabilities.setCapability(\"appPackage\", \"com.example.android.contactmanager\");//packageName\n capabilities.setCapability(\"appActivity\", \"com.compareking.zappy.ui.activity.UnauthorizedActivity\"); //activi\n driver = new AndroidDriver<>(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n }",
"public static AppiumDriver<MobileElement> setUp() {\n\t\ttry {\t\t\n\t\t\t\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME,\"ANDROID\");\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"10 QKQ1.190915.002\");\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Redmi Note 7 Pro\");\n\t\tcap.setCapability(MobileCapabilityType.UDID, \"d9b3ca47\");\n//\t\tcap.setCapability(MobileCapabilityType.APP, \"\");\n\t\tcap.setCapability(\"appPackage\", \"com.swaglabsmobileapp\");\n\t\tcap.setCapability(\"appActivity\", \"com.swaglabsmobileapp.SplashActivity\");\n\t\t\n\t\tURL url=new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\tdriver =new AppiumDriver<MobileElement>(url, cap);\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n//\t\tlog.info(\"Launching the app\");\n//\t\tMobileElement loginbutton = driver.findElement(MobileBy.AccessibilityId(\"test-LOGIN\"));\n// loginbutton.click();\n\t\t\t\treturn driver;\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn driver;\n\t\t}\n\t}",
"@BeforeMethod\npublic void setUp() throws MalformedURLException, InterruptedException{\n\t\n\t File classpathRoot = new File(System.getProperty(\"user.dir\"));\n\t File appDir = new File(classpathRoot, \"/Apps/Pazo/\");\n\t File app = new File(appDir, \"app-ppz-debug.apk\");\n\t DesiredCapabilities capabilities = new DesiredCapabilities();\n\t capabilities.setCapability(CapabilityType.BROWSER_NAME, \"\");\n\t capabilities.setCapability(\"deviceName\", \"MI\");\n\t capabilities.setCapability(\"platformVersion\", \"7.0\");\n\t capabilities.setCapability(\"platformName\", \"Android\");\n\t capabilities.setCapability(\"app\", app.getAbsolutePath());\n\t capabilities.setCapability(\"appPackage\", \"com.pazo.ppz\");\n\t capabilities.setCapability(\"appPackage1\", \"com.google.android.packageinstaller\");\n\t capabilities.setCapability(\"appActivity\", \"com.tagtual.trackd.Activities.Splash\");\n\t capabilities.setCapability(\"appActivity1\", \"com.tagtual.trackd.Activities.LicenceLogin\");\n\t capabilities.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS,true);\n\t capabilities.setCapability(\"unicodeKeyboard\", true);\n\t capabilities.setCapability(\"resetKeyboard\", true);\n\t try{\n\t driver = new AppiumDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t }\n\t catch (ExceptionInInitializerError error){\n\t System.out.println(error.getCause());\n\t System.out.println(error.getMessage());\n\t System.out.println(error.getLocalizedMessage());\n\t System.out.println(error.getStackTrace().toString());\n\n\t }\n\t driver.manage().timeouts().pageLoadTimeout(80, TimeUnit.SECONDS);\n\t driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);\n\t// Thread.sleep(10000);\n\t\n}",
"@BeforeTest\n public void setUp() throws Exception {\n\t \n appiumStop();\n // Start appium server.\n appiumStart();\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(\"deviceName\", \"Android Emulator\");\n capabilities.setCapability(\"browserName\", \"Android\");\n capabilities.setCapability(\"platformVersion\", \"6.0\");\n capabilities.setCapability(\"platformName\", \"Android\");\n capabilities.setCapability(\"appPackage\", \"com.hmh.api\");\n capabilities.setCapability(\"appActivity\", \"com.hmh.api.ApiDemos\");\n driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n }",
"public static void main(String[] args) throws MalformedURLException {\n\r\n\t\tDesiredCapabilities cap= new DesiredCapabilities();\r\n\t\tcap.setCapability(\"deviceName\", \"redmi\");\r\n\t\tcap.setCapability(\"platformName\", \"Android\");\r\n\t\t\r\n\t\t //can get from appium server inspector \r\n\t\t cap.setCapability(\"appPackage\",\"org.khanacademy.android\"); \r\n\t\t //Use apkAnalyzer app to get activity\r\n\t\t cap.setCapability(\"appActivity\", \"org.khanacademy.android.ui.library.MainActivity\");\r\n\t\t \r\n\r\n\t\t/*\r\n\t\t * //can get from appium server inspector \r\n\t\t * cap.setCapability(\"appPackage\", \"com.aranah.healthkart.plus\"); //Use apkAnalyzer app to get activity\r\n\t\t * cap.setCapability(\"appActivity\", \"com.aranah.healthkart.home.HomeActivity\");\r\n\t\t */\r\n\t\t/*\r\n\t\t * cap.setCapability(\"appPackage\", \"com.aranah.healthkart.plus\"); //Use\r\n\t\t * apkAnalyzer app to get activity cap.setCapability(\"appActivity\",\r\n\t\t * \"com.aranah.healthkart.home.HomeActivity\");\r\n\t\t */\t//To stop reseting aap\r\n\t\tcap.setCapability(\"noReset\", true);\r\n\r\n\t\tAndroidDriver<WebElement> driver = new AndroidDriver<WebElement>(new URL(\"http://localhost:4723/wd/hub\"), cap);\r\n\r\n\t\tdriver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);\r\n\t\t/*\r\n\t\t * driver.findElementByXPath(\"//*[@text='Health Products']\").click();\r\n\t\t * \r\n\t\t * //UiScrollable class String visibleText = \"Arts and humani\";\r\n\t\t * driver.findElementByAndroidUIAutomator\r\n\t\t * (\"new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(\\\"\"\r\n\t\t * + visibleText + \"\\\").instance(0))\").click();\r\n\t\t * \r\n\t\t */\r\n\t}",
"@BeforeTest\n public void appiumBrowserTestSetup() throws Exception{\n DesiredCapabilities capabilities = DesiredCapabilities.android();\n\n // set the capability to execute test in chrome browser\n capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, BrowserType.CHROME);\n\n // set the capability to execute our test in Android Platform\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);\n\n // Set the device name as well (you can give any name)\n capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\n // set the android version as well\n capabilities.setCapability(MobileCapabilityType.VERSION, \"9\");\n\n // set the chromedriver\n capabilities.setCapability(\"chromedriverExecutable\",\"C:\\\\drivers\\\\chromedriver.exe\");\n\n // Create object of URL class and specify the appium server address\n URL url = new URL(\"http://127.0.0.1:4723/wd/hub\");\n\n // Create object of AndroidDriver class and pass the url and capability that we\n // created\n driver = new AppiumDriver(url, capabilities);\n\n driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n driver.get(\"https://www.amazon.co.uk/\");\n Thread.sleep(5000);\n }",
"@BeforeTest\n\tpublic void setUp() throws InterruptedException, IOException {\n\t\tAppiumServer appiumServer = new AppiumServer();\n\t\t\n\t\tint port = 4723;\n\t\tif(!appiumServer.checkIfServerIsRunnning(port)) {\n\t\t\tSystem.out.println(\"Port No.: \" + port + \" is available.\");\n\n\t\t\tappiumServer.startServer();\n\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\"Appium Server already running on Port - \" + port);\n\t\t}\n\t\t\n\t\tFile appPath = new File(\"./app/eBay.apk\");\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\n\n\t\tcap.setCapability(MobileCapabilityType.APP, appPath.getAbsolutePath());\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"MI\");\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n//\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION,\"9\");\n\t\t\n\t\tcap.setCapability(\"unicodeKeyboard\", \"true\"); \n\t\tcap.setCapability(\"resetKeyboard\", \"true\");\n\t\t\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION, DeviceVersionFinder.getDeviceVersion());\n\t\tcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"uiautomator2\");\n\t\tcap.setCapability(\"--session-override\", false);\n\t\t\n\t\tcap.setCapability(\"setWebContentsDebuggingEnabled\", true);\n\t\t\n\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"), cap);\n\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tPOM_LaunchHomeScreen homeScreen = new POM_LaunchHomeScreen(driver);\n\n\t\tif(homeScreen.btn_homeSignIn.isDisplayed()) {\n\t\t\t\n\t\t\tSystem.out.println(\"App has successfully loaded within the time provided!\");\n\t\t\t\n\t\t}\n\n\t\t\n//\t\tMobileElement element = driver.findElement(By.id(\"recycler_view_main\"));\n\t\t\n//\t\tTouchActions action = new TouchAction();\n//\t\taction.scroll(element, 10, 100);\n//\t\taction.perform();\n\t\t\n\t\t\n\n\t\tSystem.out.println(\"Setup successful!\");\n\n\n\t}",
"@BeforeClass\r\n\tpublic void setup() throws InterruptedException {\r\n\t test=extent.createTest(\"setup\");\r\n\t\tDesiredCapabilities caps = new DesiredCapabilities();\r\n\t\tcaps.setCapability(\"deviceName\", \"My Phone\");\r\n\t\tcaps.setCapability(\"udid\", \"emulator-5554\"); //Give Device ID of your mobile phone\r\n\t\tcaps.setCapability(\"platformName\", \"Android\");\r\n\t\tcaps.setCapability(\"platformVersion\", \"7.0\");\r\n\t\tcaps.setCapability(\"browser_name\", \"Chrome\");\r\n\t\t\r\n\t\tcaps.setCapability(\"appPackage\", \"pegasus.driver\");\r\n\t\tcaps.setCapability(\"appActivity\", \"pegasus.driver.mvvm.auth.AuthActivity\");\r\n\t\t\r\n\t\tcaps.setCapability(\"noReset\", \"false\");\r\n\t\tcaps.setCapability(\"automationName\", \"UiAutomator2\");\r\n\t\tcaps.setCapability(\"newCommandTimeout\", 10000);\r\n\t\tcaps.setCapability(\"autoGrantPermissions\", true);\r\n\t\tcaps.setCapability(\"autoDismissAlerts\", true);\r\n\t\r\n\t\ttry {\r\n\t\t\t String baseURL = \"http://0.0.0.0:\";\r\n\t\t\t String minorURL = \"/wd/hub\";\r\n\t\t\t String port = \"4723\";\r\n\t\t\t //driver = new AppiumDriver<MobileElement>(new URL(baseURL+port+minorURL), caps);\t\r\n\t\t\t driver = new AndroidDriver<MobileElement>(new URL(baseURL+port+minorURL), caps);\t\r\n\t\t\t //driver = new IOSDriver<MobileElement>(new URL(baseURL+port+minorURL), caps);\t\r\n\t\t\t\t \r\n\t\t\t System.out.print(\"passed!!!!!!\");\r\n\t\t} \r\n\t\t\r\n\t\tcatch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.print(\"failed!!!!!!\");\r\n\t\t}\r\n\t\t\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t driver.findElement(LoginPage.companyId).sendKeys(\"1111\");\r\n\t\t \r\n\t\t //Enter vehicle id\r\n\t\t driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t driver.findElement(LoginPage.vehicleId).sendKeys(\"11\");\r\n\t\t\t\r\n\t\t //enter pin number\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\tdriver.findElement(LoginPage.pinNum).sendKeys(\"1234\");\r\n\t\t\t\r\n\t\t\t//click on login button\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\tdriver.findElement(LoginPage.LoginBtn).click();\r\n\t\t\ttry {\r\n\t\t\t//allow the access location popup\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\t\tdriver.findElement(LoginPage.allowAccessLocation).click();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t//close the popup\r\n\t\t\ttry {\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\r\n\t\t\tActions action = new Actions(driver);\r\n\t\t WebElement element=driver.findElement(By.className(\"android.widget.Button\"));\r\n\t\t element.click();\r\n\t\t System.out.println(element);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}",
"@BeforeTest\n\t\tpublic void setUp() throws MalformedURLException {\n\t\t\t DesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t // Set android deviceName desired capability. Set your device name.\n\t\t\t capabilities.setCapability(\"deviceName\", \"Custom Phone - 4.2.2 API 17 - 768*1280\");\n\t\t\t // Set BROWSER_NAME desired capability. It's Android in our case here.\n\t\t\t capabilities.setCapability(\"browserName\", \"Android\");\n\n\t\t\t // Set android VERSION desired capability. Set your mobile device's OS version.\n\t\t\t capabilities.setCapability(\"platformVersion\", \"4.2.2\");\n\n\t\t\t // Set android platformName desired capability. It's Android in our case here.\n\t\t\t capabilities.setCapability(\"platformName\", \"Android\");\n\t\t\t // Created object of RemoteWebDriver will all set capabilities.\n\t\t\t // Set appium server address and port number in URL string.\n\t\t\t // It will launch calculator app in android device.\n\t\t\t // capabilities.setCapability(\"unicodeKeyboard\", true);\n\t\t\t // capabilities.setCapability(\"resetKeyboard\", true);\n\t\t\t driver = new RemoteWebDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\t driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\t\t }",
"@Before\n\t public void setUp() throws Exception {\n\t \n\t DesiredCapabilities capabilities = new DesiredCapabilities();\n\t capabilities.setCapability(\"platformName\", \"Android\");\n\t //capabilities.setCapability(\"deviceName\", \"192.168.249.101:5555\");\n\t capabilities.setCapability(\"deviceName\", \"192.168.249.101:5555\");\n\t //capabilities.setCapability(\"deviceName\", \"f97f0457d73\");\n\t //capabilities.setCapability(\"platformVersion\", \"4.3\");\n\t //capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\t capabilities.setCapability(\"noReset\", \"true\");\n\t capabilities.setCapability(\"unicodeKeyboard\",\"true\"); //输入中文\n\t capabilities.setCapability(\"resetKeyboard\",\"true\"); //输入中文\n\t capabilities.setCapability(\"appPackage\", \"com.worktile\"); //worktile的包\n\t capabilities.setCapability(\"appActivity\", \".ui.external.WelcomeActivity\"); //启动的activity .ui.external.WelcomeActivity\n\t try {\n\t\t\t\t//driver = new AndroidDriver<MobileElement>(new URL(\"http://192.168.31.225:4723/wd/hub\"), capabilities);\n\t\t\t\t//driver = new AndroidDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://192.168.1.104:4723/wd/hub\"), capabilities);\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); \n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tdriver.quit();\n\t\t\t\tSystem.err.println(\"launch Android driver fail!\"+e.toString());\n\t\t\t}\n\t }",
"@BeforeClass\npublic void setUp() throws MalformedURLException{\n\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t//capabilities.setCapability(\"BROWSER_NAME\", \"Android\");\n//\tcapabilities.setCapability(\"VERSION\", \"4.4.2\"); \n\tcapabilities.setCapability(\"deviceName\",\"NSM3Y18206000488\");\n\tcapabilities.setCapability(\"udid\",\"NSM3Y18206000488\");\n\tcapabilities.setCapability(\"platformName\",\"Android\");\n capabilities.setCapability(\"appPackage\", \"com.android.chrome\");\n// This package name of your app (you can get it from apk info app)\n\tcapabilities.setCapability(\"appActivity\",\"com.google.android.apps.chrome.Main\"); // This is Launcher activity of your app (you can get it from apk info app)\n//Create RemoteWebDriver instance and connect to the Appium server\n //It will launch the Calculator App in Android Device using the configurations specified in Desired Capabilities\n driver = new AndroidDriver<MobileElement>(new URL(\"http://localhost:4723/wd/hub\"), capabilities);\n \n // PageFactory.initElements(driver, this);\n}",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\r\n\t\t\t\t\t\t\r\n\t\t\t\t//device details\r\n\t\t\t\tcapabilities.setCapability(\"deviceName\",\"GT-I9300I\");\r\n\t\t\t\tcapabilities.setCapability(\"platformName\",\"Android\");\r\n\t\t\t\tcapabilities.setCapability(\"platformVersion\",\"4.4.4\");\t\t\r\n\t\t\t\t\r\n\t\t\t\t//app details\r\n\t\t\t\tcapabilities.setCapability(\"appPackage\",\"com.emn8.mobilem8.nativeapp.bk\");\r\n\t\t\t\tcapabilities.setCapability(\"appActivity\",\"com.emn8.mobilem8.nativeapp.bk.BKNativeMobileApp\");\r\n\t\t\t\t\r\n\t\t\t\t//Appium Server details\r\n\t\t\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\r\n\t\t\t\t\r\n\t\t\t\t//wait\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\t\r\n\t\t\t\tSet<String> contextHandles = driver.getContextHandles();\r\n\t\t\t\tint size = contextHandles.size();\r\n\t\t\t\tSystem.out.println(size);\r\n\t\t\t\t\r\n\t\t\t\t//****************************************************\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"First Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"NATIVE\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tWebDriverWait wait= new WebDriverWait(driver, 50);\r\n\t\t\t\tWebElement ele_voucher = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@index='9'][@content-desc='VOUCHERS'][@class='android.view.View']\")));\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Voucher is displayed \"+ele_voucher.isDisplayed());\r\n\t\t\t\t\r\n\t\t\t\tele_voucher.click();\r\n\t\t\t\t\r\n\t\t\t\t//**************************************************************\r\n\t\t\t\t//Second page\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Second Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"NATIVE\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tWebDriverWait wait2= new WebDriverWait(driver, 50);\r\n\t\t\t\tWebElement ele_redeem = wait2.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@index='17'][@content-desc='REDEEM'][@class='android.view.View']\")));\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Redeem is displayed \"+ele_redeem.isDisplayed());\r\n\t\t\t\t\r\n\t\t\t\tele_redeem.click();\r\n\t\t\t\t//**************************************************************\r\n\t\t\t\t//Third page\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Third Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"WEBVIEW\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tdriver.findElementByName(\"email\").sendKeys(\"nov@gmail.com\");\r\n\t\t\t\tWebElement ele_pwd = driver.findElementByName(\"password\");\r\n\t\t\t\tele_pwd.click();\r\n\t\t\t\t\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\tele_pwd.sendKeys(\"1234\");\r\n\t\t\t\t\r\n\t\t\t\t//********************************************************\r\n\t\t\t\t\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\t\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Third Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"NATIVE\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tWebDriverWait wait3= new WebDriverWait(driver, 50);\r\n\t\t\t\tWebElement ele_Signin = wait3.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@index='33'][@content-desc='SIGN IN'][@class='android.view.View']\")));\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Signin is displayed \"+ele_Signin.isDisplayed());\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithApplication() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setApp(\"com.covea.mobileapp\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"\");\r\n\t\tAssert.assertEquals(capa.getCapability(\"app\"), \"com.covea.mobileapp\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.AUTOMATION_NAME), \"Appium\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.PLATFORM_NAME), \"android\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.PLATFORM_VERSION), \"8.0\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.DEVICE_NAME), \"Samsung Galasy S8\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.FULL_RESET), true);\r\n\t\tAssert.assertEquals(capa.getCapability(AndroidMobileCapabilityType.APP_PACKAGE), \"appPackage\");\r\n\t\tAssert.assertEquals(capa.getCapability(AndroidMobileCapabilityType.APP_ACTIVITY), \"appActivity\");\r\n\t}",
"public static void main(String[] args) throws MalformedURLException {\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\r\n\t\tcap.setCapability(\"deviceName\",\"abc\");\r\n\t\tcap.setCapability(\"platformName\", \"Android\");\r\n\t\t//cap.setCapability(\"udid\",\"emulator-5554\");\r\n\t\tcap.setCapability(\"appPackage\",\"com.udemy.android\");\r\n\t\tcap.setCapability(\"appActivity\",\"com.udemy.android.SplashActivity\");\r\n\t\tcap.setCapability(\"uiautomator2ServerLaunchTimeout\", 600000);\r\n\t\tcap.setCapability(\"adbExecTimeout\", 600000);\r\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"),cap);\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/browse_button\")).click();\r\n\t\tdriver.findElement(MobileBy.AccessibilityId(\"Search tab\")).click();\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/search_bar_text\")).click();\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/search_bar_text\")).sendKeys(\"selenium\");\r\n\t\tdriver.hideKeyboard();\r\n\r\n\t}",
"@BeforeTest\n\tpublic static void loginFunctionality() throws Exception \n\t{\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\n\t\t\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME,\"Redmi\");\n\t\tcap.setCapability(\"udid\", \"6215b09b\");\n\t\tcap.setCapability(\"platformName\", \"Android\");\n\t\tcap.setCapability(\"platformVersion\", \"9 PKQ1.180904.001\");\n\t\tcap.setCapability(\"appPackage\", \"com.danamon.uatomnimicroapps\");\n\t\tcap.setCapability(\"appActivity\", \"com.danamon.uatomnimicroapps.MainActivity\");\n\t\tcap.setCapability(\"noReset\", true);\n\t\tcap.setCapability(\"fullReset\",false);\n\t\t\n\t\t\n\t\t\n\t\tURL url=new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\t\n\t\t\n\t\tdriver=new AndroidDriver<AndroidElement>(url,cap);\n\t\tSystem.out.println(\"application started..\");\n\t\t//Thread.sleep(50000);\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t\n\t\t/*\n\t\t MobileElement el1 = (MobileElement) driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[1]/android.view.View[1]/android.view.View[2]\");\n\t\t \n\t\tel1.click();\n\t\tMobileElement el2 = (MobileElement) driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.widget.EditText\");\n\t\tel2.sendKeys(\"perfomni1\");\n\t\t\n\t\tMobileElement el3=(MobileElement)driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.view.View[3]/android.widget.EditText\");\n\t\t\n\n\tel3.sendKeys(\"Reskin01\");\n\tdriver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.widget.Button[1]\").click();\n\t\tThread.sleep(220000);\n\t\t\n\n\t\t//MobileElement el4=(MobileElement)driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.view.View[3]/android.widget.EditText\");\n\t\t\n\n\t\t//el4.sendKeys(\"Reskin01\");\n\t\t \n\t\t */\n\t\t\n\t\tMobileElement el5 = (MobileElement) driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.view.View[2]/android.widget.EditText\");\n\t\tel5.sendKeys(\"Reskin01\");\n\n\t\tdriver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.widget.Button\").click();\n\t\n\t\t\t\t}",
"@BeforeTest\r\n\tpublic void setup() {\n\t\t\t\tDesiredCapabilities caps = new DesiredCapabilities();\r\n\t\t\t\tcaps.setCapability(\"deviceName\", \"Abhi Phone\");\r\n\t\t\t\tcaps.setCapability(\"udid\", \"FXYDU17916004799\"); //Give Device ID of your mobile phone\r\n\t\t\t\tcaps.setCapability(\"platformName\", \"Android\");\r\n\t\t\t\tcaps.setCapability(\"platformVersion\", \"9.0\");\r\n\t\t\t\tcaps.setCapability(\"appPackage\", \"com.wdc.ibi\");\r\n\t\t\t\tcaps.setCapability(\"appActivity\", \"com.kamino.wdt.MainActivity\");\r\n\t\t\t\tcaps.setCapability(\"noReset\", \"true\");\r\n\t\t\t\tcaps.setCapability(\"unicodeKeyboard\", true);\r\n\t\t\t\tcaps.setCapability(\"resetKeyboard\", true);\r\n\t\t\t\t\r\n\t\t\t\t//Instantiate Appium Driver\r\n\t\r\n\t\t\t\ttry {\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tURL url= new URL(\"http://0.0.0.0:4723/wd/hub\");\r\n\t\t\t\t\t\tdriver = new AndroidDriver<MobileElement>(url, caps);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//WebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n\t\t\t\t\t\t//driver.findElementByClassName(\"android.widget.TextView\").click();\r\n\t\t\t\t\t\t//wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@text ='I Agree']\"))).click();\r\n\t\t\t\t\t\t//driver.findElement(By.xpath(\"//*[@text ='I Agree']\")).click();\r\n\t\t\t\t\t\t//wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@text ='SIGN IN']\"))).click();\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='SIGN IN']\")).click();\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='Email address']\")).sendKeys(\"mobappw+abtest@gmail.com\");\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='Password']\")).sendKeys(\"Admin@555\");\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='CONTINUE']\")).click();\r\n\t\t\t\t\t\tSystem.out.println(\"Signed In Successfuly\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\t}\t\t\r\n\t\t\t\r\n\t}",
"@BeforeTest\n\t public void setup() throws MalformedURLException {\n\t DesiredCapabilities caps = new DesiredCapabilities();\n\t caps.setCapability(\"deviceName\", \"Pixel 4 API 28\");\n\t caps.setCapability(\"platformName\", \"Android\");\n\t caps.setCapability(\"appPackage\", \"com.google.android.apps.tasks\");\n\t caps.setCapability(\"appActivity\", \".ui.TaskListsActivity\");\n\t caps.setCapability(\"noReset\", true);\n\t \n\t // Instantiate Appium Driver\n\t driver = new AndroidDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), caps);\n\t wait = new WebDriverWait(driver, 10);\n\t }",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithUserDefined() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setBrowser(BrowserType.CHROME.toString());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setApp(\"\");\r\n\t\tcontext.setAppiumCapabilities(\"key1=value1;key2=value2\");\r\n\t\t\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(\"key1\"), \"value1\");\r\n\t\tAssert.assertEquals(capa.getCapability(\"key2\"), \"value2\");\r\n\r\n\t}",
"@BeforeClass\n public void beforeClass() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"deviceName\", \"bb9d156c\");\n caps.setCapability(\"platformName\", \"Android\");\n caps.setCapability(\"appPackage\", \"com.google.android.apps.tasks\");\n caps.setCapability(\"appActivity\", \".ui.TaskListsActivity\");\n // caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n }",
"@SuppressWarnings(\"rawtypes\")\r\n\t@BeforeMethod\r\n\t public void setUp() throws MalformedURLException {\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(\"deviceName\", \"ZX1D63SFXH\");\r\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\r\n\t\t//capabilities.setCapability(\"app\", targetApp.getAbsolutePath());\r\n\t\t//capabilities.setCapability(\"fastReset\", \"true\");\r\n\t\t//capabilities.setCapability(\"fullReset\", \"true\");\r\n\t\tcapabilities.setCapability(\"appPackage\", \"com.testleaf.leaforg\");\r\n\t\tcapabilities.setCapability(\"appActivity\", \"com.testleaf.leaforg.MainActivity\");\r\n\t\t\r\n\t\tdriver = new AndroidDriver(new URL(\"http://0.0.0.0:4723/wd/hub\"), capabilities);\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}",
"public AndroidDriver<AndroidElement> Capabilities() throws MalformedURLException {\n\t\t\n\t\t\n\t\t\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Andriod\");\n\t\t//cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"9\");\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Device\");\n\t\tcap.setCapability(MobileCapabilityType.BROWSER_NAME, \"chrome\");\n\t\tcap.setCapability(MobileCapabilityType.BROWSER_VERSION, \"76.0\");\n\t\tcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"uiautomator2\");\n\t\t\n\t\t//connection to server\n\t\t//AndroidDriver driver = new AndroidDriver(IPaddressOfserver,capabilities); // This will invokes android object. see below\n\t\t\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"),cap); // IP address of every local host in any machine is http://127.0.0.1\n\t\treturn driver;\n\t\t\n\t}",
"@BeforeMethod\n public void beforeTest() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"deviceId\", \"2fb5cf35\");\n caps.setCapability(\"deviceName\", \"OnePlus 6\");\n caps.setCapability(\"platformName\", \"Android\");\n caps.setCapability(\"appPackage\", \"com.oneplus.calculator\");\n caps.setCapability(\"appActivity\", \"Calculator\");\n caps.setCapability(\"noReset\", true);\n\n // Initialize driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n }",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\tString deviceName = \"VCan\";\r\n\t\tString platformVersion = \"4.4.2\";\r\n\t\tString apkName = \"微博.apk\";\r\n\t\tString appActivity = \"com.sina.weibo.SplashActivity\";\r\n\t\tString AppiumServerIP = \"http://127.0.0.1:4723/wd/hub\";\r\n\t\tAndroidDriver driver;\r\n\t\tFile apk = new File(System.getProperty(\"user.dir\")+File.separator+\"apps\"+File.separator+apkName);\r\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(\"deviceName\", deviceName);\r\n\t\tcapabilities.setCapability(\"platformVersion\", platformVersion);\r\n\t\tcapabilities.setCapability(\"app\", apk);\r\n\t\tcapabilities.setCapability(\"appActivity\", appActivity);\r\n\t\tcapabilities.setCapability(\"noSign\", true);\r\n\t\tcapabilities.setCapability(\"noReset\", true);\r\n\t\tdriver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),capabilities);\r\n\t\tThread.sleep(3000);\r\n\t\tSystem.out.println(\"App启动等待时间\");\r\n\t\tThread.sleep(4000);\r\n\t\tdriver.findElementById(\"com.sina.weibo:id/plus_icon\").click();\r\n\t\tdriver.findElementById(\"com.sina.weibo:id/pop_control_bar_front_close_img\").click();\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.close();\r\n\t\tdriver.quit();\r\n\t}",
"public void init() throws MalformedURLException {\n\n capabilities = new DesiredCapabilities();\n\n capabilities.setCapability(\"deviceName\", \"Nex5\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"8.0\");\n capabilities.setCapability(\"appPackage\", \"com.trello\");\n capabilities.setCapability(\"appActivity\", \".home.HomeActivity\");\n\n capabilities.setCapability(\"automationName\", \"Appium\");\n capabilities.setCapability(\"app\", \"C:/Users/Study/APK/trello_new.apk\");\n driver = new AppiumDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n welcomeActivity = new WelcomePage(driver);\n loginActivity = new LoginPage(driver);\n\n }",
"RemoteWebDriver getDriver(String appName, String appPackage, String appActivity, String deviceName,\n\t\t\tString fileName) {\n\t\tDesiredCapabilities androidDcap = new DesiredCapabilities();\n\t\tandroidDcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"UIAutomator2\");\n\t\tandroidDcap.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.NO_RESET, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.FULL_RESET, false);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.NO_SIGN, true);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.APP_WAIT_DURATION, 120);\n\t\tandroidDcap.setCapability(\"deviceName\", deviceName);\n\t\tandroidDcap.setCapability(\"browserName\", \"\");\n\t\tandroidDcap.setCapability(\"newCommandTimeout\", 1500);\n\t\tandroidDcap.setCapability(\"appPackage\", appPackage);\n\t\tandroidDcap.setCapability(\"appActivity\", appActivity);\n\t\tandroidDcap.setCapability(\"autoAcceptAlerts\", true);\n\t\tandroidDcap.setCapability(\"autoDismissAlerts\", true);\n\t\tandroidDcap.setCapability(\"app\", System.getProperty(\"user.dir\") + \"/src/main/resources\" + fileName);\n\t\ttry {\n\t\t\tif (System.getProperty(\"location\").equalsIgnoreCase(\"local\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(\"http://127.0.0.1:4651/wd/hub\"), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t} else if (System.getProperty(\"location\").equalsIgnoreCase(\"remote\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(PropertyHelper.getProperties(\"REMOTE_HUB_URL\")), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t}\n\t\t} catch (WebDriverException e) {\n\t\t\tlogger.error(\"Driver instantiating failed or app is not installed\", e);\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.error(e);\n\t\t}\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\tDriverFactory.getDriverPool().put(appName, driver);\n\t\treturn driver;\n\t}",
"@BeforeClass\n public void classLevelSetup() {\n\t\t \t\tcaps = new DesiredCapabilities();\n \t\t\tcaps.setCapability(\"deviceName\", \"My Phone\");\n \t\t\tcaps.setCapability(\"udid\", \"8f81d4e2\"); //Give Device ID of your mobile phone\n \t\t\tcaps.setCapability(\"platformName\", \"Android\");\n \t\t\tcaps.setCapability(\"platformVersion\", \"9\"); // The version of Android on your device\n \t\t\tcaps.setCapability(\"browserName\", \"Chrome\");\n \t\t\tcaps.setCapability(\"noReset\", true);\n \t\t\tcaps.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);\n \t\t\tcaps.setCapability(\"chromedriverExecutable\", \"C:\\\\SeleniumGecko\\\\chromedriver78.exe\"); // Set ChromeDriver location\n \t\t\t\n\n \t\t\t//Instantiate Appium Driver or AndroidDriver\n \t\t\ttry {\n \t\t\t\tdriver = new AppiumDriver<>(new URL(appium_node), caps);\n \t\t\t\t\n \t\t\t} catch (MalformedURLException e) {\n \t\t\t\tSystem.out.println(e.getMessage());\n \t\t\t}\n \t\t\t\t\t\n\n\t\t\n }",
"@Before\n public void setUp() throws MalformedURLException {\n DesiredCapabilities cap = new DesiredCapabilities();\n cap.setCapability(\"devicename\",\"MyTestDevice\");\n\n //It works with java-client-4.0.0.jar :)\n drive = new AndroidDriver<WebElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), cap);\n //Reset the cache!\n drive.resetApp();\n\n }",
"public void appiumStart() throws IOException, InterruptedException {\n // Execute command string to start appium server.\n p = Runtime.getRuntime().exec(cmd);\n // Provide wait time of 10 mins to start appium server properly.\n // If face any error(Could not start a new session...) then Increase\n // this time to 15 or 20 mins.\n Thread.sleep(10000);\n if (p != null) {\n System.out.println(\"Appium server Is started now.\");\n }\n }",
"public void Launch_app() {\n\t\tDesiredCapabilities caps = new DesiredCapabilities();\r\n\t\tcaps.setCapability(\"deviceName\", \"My Phone\");\r\n\t\tcaps.setCapability(\"udid\", \"LE66A06190140096\"); //Give Device ID of your mobile phone\r\n\t\t\r\n\t\t/* caps.setCapability(\"udid\", \"emulator-5556\"); //Give Device ID of your mobile phone\r\n\t\t caps.setCapability(\"app\", \"C:\\\\Users\\\\Blue Otter HP2\\\\Downloads\\\\xemoto_staging_v1.0.0.apk\"); \r\n\t\t caps.setCapability(\"appWaitActivity\", \"*\");\r\n\t\t caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"UiAutomator2\");*/\r\n\t\t\r\n\t\tcaps.setCapability(\"platformName\", \"Android\");\r\n\t\tcaps.setCapability(\"platformVersion\", \"6.0\");\r\n\t\r\n\t\tcaps.setCapability(\"appPackage\", \"org.blueotter.motone\");\r\n\t\tcaps.setCapability(\"appActivity\", \"org.blueotter.motone.feature.main.view.ActivityMain\"); \r\n\t\t\r\n\t\tcaps.setCapability(\"noReset\", \"true\");\r\n\t\t\r\n\t\t//Instantiate Appium Driver\r\n\t\ttry {\r\n\t\t\t\t driver = new AndroidDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), caps);\t\t\r\n\r\n\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS) ;\r\n\t\tSystem.out.println(\"Launch motone successful!\");\r\n\r\n \t}",
"RemoteWebDriver getDriver(String appName, String platformName) {\n\t\tDesiredCapabilities androidDcap = new DesiredCapabilities();\n\t\tandroidDcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"UIAutomator2\");\n\t\tandroidDcap.setCapability(MobileCapabilityType.PLATFORM_NAME, platformName);\n\t\t//androidDcap.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.NO_RESET, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.FULL_RESET, false);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.NO_SIGN, true);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.APP_WAIT_DURATION, 120);\n\t\tandroidDcap.setCapability(\"newCommandTimeout\", 1500);\n\t\tandroidDcap.setCapability(\"app\", System.getProperty(\"user.dir\") +\"\\\\apk\\\\\"+appName+\".apk\");\n\t\tandroidDcap.setCapability(\"autoGrantPermissions\", true);\n\t\tandroidDcap.setCapability(\"appPackage\", PropertyHelper.getProperties(appName+\"_PACKAGE\"));\n\t\tandroidDcap.setCapability(\"appActivity\", PropertyHelper.getProperties(appName+\"_ACTIVITY\"));\n\t\tandroidDcap.setCapability(\"deviceName\", \"Android\");\n\t\t\n\t\ttry {\n\t\t\tif (System.getProperty(\"location\").equalsIgnoreCase(\"local\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(\"http://127.0.0.1:4651/wd/hub\"), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t} else if (System.getProperty(\"location\").equalsIgnoreCase(\"remote\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(PropertyHelper.getProperties(\"REMOTE_HUB_URL\")), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t}\n\t\t} catch (WebDriverException e) {\n\t\t\tlogger.error(\"Driver instantiating failed or app is not installed\", e);\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.error(e);\n\t\t}\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\tDriverFactory.getDriverPool().put(appName, driver);\n\t\treturn driver;\n\t}",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithApplicationOldAndroid2() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"5.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S5\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setFullReset(true);\r\n\t\tcontext.setApp(\"com.covea.mobileapp\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.AUTOMATION_NAME), \"UiAutomator1\");\r\n\t}",
"@BeforeClass\r\n public void beforeClass() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\r\n caps.setCapability(\"deviceName\", \"PixelEmulator\");\r\n caps.setCapability(\"platformName\", \"Android\");\r\n caps.setCapability(\"appPackage\", \"com.google.android.keep\");\r\n caps.setCapability(\"appActivity\", \".activities.BrowseActivity\");\r\n caps.setCapability(\"noReset\", true);\r\n\r\n // Instantiate Appium Driver\r\n URL remoteURL = new URL(\"http://localhost:4723/wd/hub\");\r\n driver = new AndroidDriver<MobileElement>(remoteURL, caps);\r\n \r\n }",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithApplicationOldAndroid() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"2.3\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S1\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setFullReset(true);\r\n\t\tcontext.setApp(\"com.covea.mobileapp\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.AUTOMATION_NAME), \"Selendroid\");\r\n\t}",
"public static AppiumDriverLocalService AppiumServerStart(){\n System.out.println(\"Into driver setup\");\n AppiumDriverLocalService service;\n\n AppiumServiceBuilder serviceBuilder = new AppiumServiceBuilder();\n\n serviceBuilder.usingAnyFreePort();\n // /usr/local/bin/node\n serviceBuilder.usingDriverExecutable(new File(\"/usr/local/bin/node\"));\n // /usr/local/bin/appium\n serviceBuilder.withAppiumJS(new File(\"/usr/local/bin/appium\"));\n serviceBuilder.withArgument(GeneralServerFlag.RELAXED_SECURITY);\n serviceBuilder.withArgument(GeneralServerFlag.SHELL);\n HashMap<String, String> environment = new HashMap();\n environment.put(\"PATH\", \"/usr/local/bin:\" + System.getenv(\"PATH\"));\n\n\n service = AppiumDriverLocalService.buildService(serviceBuilder);\n service.start();\n return service;\n }",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\nDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\tcapabilities.setCapability(\"appPackage\", \"org.khanacademy.android\");\n\t\tcapabilities.setCapability(\"appActivity\", \"org.khanacademy.android.ui.library.MainActivity\");\n\t\t\n\t\tAndroidDriver driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\n\t\tThread.sleep(20000);\n\t\tSystem.out.println(driver.getContext());\n\t\t\n\t\tSet<String> contextNames = driver.getContextHandles();\n\t\tSystem.out.println(contextNames.size());\n\t\t //You can prints out something like NATIVE_APP , WEBVIEW_1 \n\t\t for (String contextName : contextNames) { \n\t\t System.out.println(contextName);\n//\t\t if (contextName.contains(\"WEBVIEW\")){\n//\t driver.context(contextName);\n//\t }\n\t\t }\n\n\t\t \n\n\t}",
"@BeforeClass\n public static void startApp() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"platformName\", \"Android\");\n caps.setCapability(\"platformVersion\", \"5.0.1\"); //Replace this with your Android version\n caps.setCapability(\"deviceName\", \"Samsung Galaxy\"); //Replace this with your simulator/device \n Path currentRelativePath = Paths.get(\"\");\n String path = currentRelativePath.toAbsolutePath().toString() + \"/src/main/resources/Evernote.apk\";\n caps.setCapability(\"app\", path); //Replace this with app path in your system\n \n// caps.setCapability(\"appActivity\", \"com.evernote.ui.HomeActivity\");\n// caps.setCapability(\"appPackage\", \"com.evernote\");\n// appInstalled = true;\n\n AppiumServer server = new AppiumServer(serverAddress,port);//setup Appium server \n server.startAppiumServer();//open Appium server automatically\n \n driver = new AndroidDriver(server.getService(),caps);\n driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);\n }",
"@BeforeMethod\r\n\tpublic void setUp() throws MalformedURLException {\r\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);\r\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Emulator\");\r\n\t\tcapabilities.setCapability(MobileCapabilityType.APP, new File(\"./src/test/resources/ApiDemos-debug.apk\"));\r\n\r\n\t\tcapabilities.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, \"io.appium.android.apis\");\r\n\t\tcapabilities.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, \".app.AlertDialogSamples\");\r\n\r\n\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"), capabilities);\r\n\t\tdriver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);\r\n\r\n\t}",
"@BeforeClass\n public void beforeClass() throws MalformedURLException {\n DesiredCapabilities desiredCapabilities = new DesiredCapabilities();\n desiredCapabilities.setCapability(\"deviceName\", \"Pixel_4_emulator\");\n desiredCapabilities.setCapability(\"platformName\", \"android\");\n desiredCapabilities.setCapability(\"automationName\", \"UiAutomator2\");\n desiredCapabilities.setCapability(\"noReset\", true);\n desiredCapabilities.setCapability(\"appPackage\", \"com.google.android.apps.messaging\");\n desiredCapabilities.setCapability(\"appActivity\", \".ui.ConversationListActivity\");\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, desiredCapabilities);\n wait = new WebDriverWait(driver, 5);\n }",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateDefaultCapabilitiesWithAutomationName() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setBrowser(BrowserType.CHROME.toString());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAutomationName(\"UiAutomator1\");\r\n\t\tcontext.setApp(\"\");\r\n\t\t\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), BrowserType.CHROME.toString().toLowerCase());\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.AUTOMATION_NAME), \"UiAutomator1\");\r\n\t\tAssert.assertNull(capa.getCapability(MobileCapabilityType.FULL_RESET));\r\n\t}",
"public void startAppiumServer(String os) throws ExecuteException, IOException, InterruptedException {\n if (os.contains(\"windows\")) {\n CommandLine command = new CommandLine(\"cmd\");\n command.addArgument(\"/c\");\n command.addArgument(\"C:/Program Files/nodejs/node.exe\");\n command.addArgument(\"C:/Appium/node_modules/appium/bin/appium.js\");\n command.addArgument(\"--address\", false);\n command.addArgument(\"127.0.0.1\");\n command.addArgument(\"--port\", false);\n command.addArgument(\"4723\");\n command.addArgument(\"--full-reset\", false);\n\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000);\n } else if (os.contains(\"mac\")) {\n CommandLine command = new CommandLine(\"/Applications/Appium.app/Contents/Resources/node/bin/node\");\n command.addArgument(\"/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js\", false);\n command.addArgument(\"--address\", false);\n command.addArgument(\"127.0.0.1\");\n command.addArgument(\"--port\", false);\n command.addArgument(\"4723\");\n command.addArgument(\"--full-reset\", false);\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000);\n } else if (os.contains(\"linux\")) {\n //Start the appium server\n System.out.println(\"ANDROID_HOME : \");\n System.getenv(\"ANDROID_HOME\");\n //\tSystem.out.println(\"PATH :\" +System.getenv(\"PATH\"));\n CommandLine command = new CommandLine(\"/bin/bash\");\n command.addArgument(\"-c\");\n command.addArgument(\"~/.linuxbrew/bin/node\");\n command.addArgument(\"~/.linuxbrew/lib/node_modules/appium/lib/appium.js\", true);\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000); //Wait for appium server to start\n\n } else {\n LOGGER.info(os + \"is not supported yet\");\n }\n }",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\t\t\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\t\t\t\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\t\t\t\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//app details\n\t\t\t\t\t\tcapabilities.setCapability(\"appPackage\", \"com.mobeta.android.demodslv\");\n\t\t\t\t\t\tcapabilities.setCapability(\"appActivity\", \"com.mobeta.android.demodslv.Launcher\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Appium details\n\t\t\t\t\t\t\n\t\t\t\t\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\n\t\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\t//click on the element\n\t\t\t\t\t//\tdriver.findElementById(\"com.mobeta.android.demodslv:id/activity_title\").click();\n\t\t\t\t\t\n\t\t\t\t\t\tWebElement ele1 = driver.findElementById(\"com.mobeta.android.demodslv:id/activity_title\");\n\t\t\t\t\t\tele1.click();\n\t\t\t\t//drag and drop\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<WebElement> drag_ele = driver.findElementsById(\"com.mobeta.android.demodslv:id/drag_handle\");\n\t\t\t\t\t\tSystem.out.println(drag_ele.size());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Touch action\n\t\t\t\t\t\t\n\t\t\t\t\t\tTouchAction action= new TouchAction(driver);\n\t\t\t\t\t\t//action.longPress(drag_ele.get(0)).moveTo(drag_ele.get(5)).release().perform();\n\t\t\t\t\t\t\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\taction.longPress(drag_ele.get(6)).moveTo(drag_ele.get(2)).release().perform();\n\t\t\t\t\t\t\n\n\n\t}",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"XT1033\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\t//app details\n\t\tcapabilities.setCapability(\"app\",app.getAbsolutePath());\n\t\t\n\t\t//Appium details\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\n\t\tThread.sleep(12000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"Successfully Installed\");\n\t\t\t\n\t\t\t//Remove thrugh code\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Removed sucessfully\");\n\t\t\t\n\t\t\t\n\t\t\tdriver.installApp(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Again Installed the app\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT Installed the app\");\n\t\t}\n\n\t\t\n\n\t}",
"public static void main(String args[]) throws MalformedURLException, InterruptedException {\n\n\tDesiredCapabilities caps = new DesiredCapabilities();\n\t//caps.setCapability(\"browserName\", \"\");\n\tcaps.setCapability(\"platform\", \"iOS\");\n\tcaps.setCapability(\"deviceName\", \"iPhone 6\");\n\tcaps.setCapability(\"platformVersion\", \"9.0\");\n\tcaps.setCapability(\"waitForAppScript\", \"$.delay(10000); $.acceptAlert();\");\n\t//caps.setCapability(\"autoWebview\", \"true\");\n\t//caps.setCapability(\"appPackage\", \"com.apptivateme.next.ct\");\n\t//caps.setCapability(\"appActivity\", \"com.tribune.universalnews.MainActivity\");\n\tcaps.setCapability(\"appiumVersion\", \"1.4.14\");\n\tcaps.setCapability(\"app\", \"sauce-storage:CT_iOS.zip\");\n\t\n\tURL sauceUrl = new URL(\"http://shnakeygarg:66c91399-8cfb-46ca-a2da-f09c2ce5f170@ondemand.saucelabs.com:80/wd/hub\");\n\n\tIOSDriver driver = new IOSDriver(sauceUrl, caps);\n\n\t// driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\tWebDriverWait waitvar = new WebDriverWait(driver,90);\n\n\tThread.sleep(5000);\n\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\n\tfinal Date date1 = new Date();\n System.out.println(\"findElementByIosUIAutomation\" );\n \n //UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]/UIACollectionCell[2]/UIATableView[1]/UIATableCell[2]\n waitvar.until(ExpectedConditions.elementToBeClickable(MobileBy.IosUIAutomation(\".collectionViews()[0].cells()[1].tableViews()[0].cells()[1].withPredicate(\\\"ALL staticTexts.isVisible == TRUE\\\")\")));\n //waitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".collectionViews()[0].cells()[1].tableViews()[0].cells()[1].withPredicate(\\\"ALL staticTexts.isVisible == TRUE\\\")\")));\n WebElement firstArtile = driver.findElementByIosUIAutomation(\".collectionViews()[0].cells()[1].tableViews()[0].cells()[1].withPredicate(\\\"ALL staticTexts.isVisible == TRUE\\\")\");\n firstArtile.click();\n System.out.println(\"clicked element1\");\n\n final Date date2 = new Date();\n\n //UIAApplication[1]/UIAWindow[1]/UIANavigationBar[1]/UIAButton[1]\n waitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".navigationBars()[0].buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".navigationBars()[0].buttons()[0]\").click();\n final Date date3 = new Date();\n/*\n System.out.println(\"\\n\\n\\n\\nxpath\\n\\n\\n\\n\");\n\n waitvar.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]/UIACollectionCell[2]/UIATableView[1]/UIATableCell[2]\")));\n driver.findElement(By.xpath(\"//UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]/UIACollectionCell[2]/UIATableView[1]/UIATableCell[2]\")).click();\n\n final Date date4 = new Date();\n\n waitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByName(\"header back\")));\n\n driver.findElement(By.name(\"header back\")).click();\n */\n final Date date5 = new Date();\n System.out.println(\"IOS Automator :\" + (date2.getTime() - date1.getTime()));\n System.out.println(\"Back :\" + (date3.getTime() - date2.getTime()));\n\n //System.out.println(\"XPath :\" + (date4.getTime() - date3.getTime()));\n //System.out.println(\"Back :\" + (date5.getTime() - date4.getTime()));\n\tThread.sleep(5000);\n\tdriver.quit();\n\tSystem.out.println(\"done\");\n }",
"@BeforeClass\n public void beforeClass() throws MalformedURLException {\n\t DesiredCapabilities caps = new DesiredCapabilities();\n\t caps.setCapability(\"devicename\", \"Pixel\");\n\t caps.setCapability(\"platform\", \"Android\");\n\t caps.setCapability(\"addActivity\", \".ui.TaskListsActivity\");\n\t caps.setCapability(\"addPackage\", \"com.google.android.apps.tasks\");\n\t caps.setCapability(\"noReset\", true);\n\t caps.setCapability(\"webviewDevtoolsPort\", 9543);\n\t \n\t //instantiate appium driver\n\t URL appserver = new URL(\"http://0.0.0.0:4723/wd/hub\");\n\t driver = new AndroidDriver<MobileElement>(appserver,caps);\n\t wait = new WebDriverWait(driver, 5);\n }",
"public void androidDriver(String buildPath, String appPkg, String appAct) throws MalformedURLException {\n if (buildPath != \"\") {\n File app = new File(buildPath);\n capabilities.setCapability(\"app\", app.getAbsolutePath());\n }\n\n capabilities.setCapability(\"deviceName\", \"Android-Test\");\n capabilities.setCapability(\"platformName\", \"Android\");\n capabilities.setCapability(\"appPackage\", appPkg);\n capabilities.setCapability(\"appActivity\", appAct);\n capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 10000);\n capabilities.setCapability(\"noReset\", NO_RESET);\n capabilities.setCapability(\"automationName\", \"UiAutomator2\");\n if (System.getProperty(\"device.udid\") != null) {\n capabilities.setCapability(\"udid\", System.getProperty(\"device.udid\"));\n }\n driver = new AndroidDriver(new URL(APPIUM_SERVER_URL), capabilities);\n driver.manage().timeouts().implicitlyWait(DEFAULT_IMPLICIT_WAIT, TimeUnit.SECONDS);\n\n }",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t//Launch app\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\t//device details\n\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\tcapabilities.setCapability(\"app\", app.getAbsolutePath());\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\n\t\t//wait\n\t\tThread.sleep(4000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"App installed Successfully\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tSystem.out.println(\"Removed the app\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.installApp(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\tSystem.out.println(\"App installed again\");\n\t\t\tThread.sleep(8000);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT installed the app\");\n\t\t}\n\t\n\t}",
"public static void main(String[] args) throws InterruptedException, IOException {\n\t\tAndroidDriver<AndroidElement> driver = capabilities();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tSystem.out.println(\"llegamos\");\n\t\tThread.sleep(3000);\n\t\tdriver.findElementByXPath(\"//android.widget.TextView[@text='Preference']\").click();\n\t\tdriver.findElementByXPath(\"//android.widget.TextView[@text='3. Preference dependencies']\").click();\n\t\tdriver.findElementById(\"android:id/checkbox\").click();\n\t\tsmile.screenShot(driver,\"appium.jpg\");\n\t\tdriver.findElementByXPath(\"(//android.widget.RelativeLayout)[2]\").click();\n\t\tdriver.findElementByClassName(\"android.widget.EditText\").sendKeys(\"hello\");\n\t\t\n\t}",
"public static void main(String[] args) throws Exception\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter contact name to call as it is you saved in ur contacts list\");\n\t\tString contactname=sc.nextLine();\n\t\tsc.close();\n\t\t//Start appium server\n\t\tRuntime.getRuntime().exec(\"cmd.exe /c start cmd.exe /k \\\"appium -a 127.0.0.1 -p 4723\\\"\");\n\t\t//Get address of appium Server\n\t\tURL u=new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\t//Details of app and device(AVD)\n\t\tDesiredCapabilities dc=new DesiredCapabilities();\n\t\tdc.setCapability(CapabilityType.BROWSER_NAME,\"\");\n\t\tdc.setCapability(\"deviceName\",\"ce081718334a5b0b05\");\n\t\tdc.setCapability(\"platformName\",\"android\");\n\t\tdc.setCapability(\"platformVersion\",\"8.0.0\");\n\t\tdc.setCapability(\"appPackage\",\"com.samsung.android.contacts\");\n\t\tdc.setCapability(\"appActivity\",\"com.android.contacts.activities.PeopleActivity\");\n\t\t//Create driver object\n\t\tAndroidDriver driver;\n\t\twhile(2>1)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdriver=new AndroidDriver(u,dc);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t//App Automation\n\t\ttry\n\t\t{\n\t\t\tWebDriverWait wait=new WebDriverWait(driver,5);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@content-desc='Create contact']\")));\n\t\t\twhile(2>1)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@text='\"+contactname+\"']\")));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch(Exception exe)\n\t\t\t\t{\n\t\t\t\t\t//Get device dimensions\n\t\t\t\t\tint width=driver.manage().window().getSize().getWidth();\n\t\t\t\t\tint height=driver.manage().window().getSize().getHeight();\n\t\t\t\t\t//Vertical Swipe Logic\n\t\t\t\t\tPointerInput finger=new PointerInput(PointerInput.Kind.TOUCH,\"finger\");\n\t\t\t\t\tSequence swipe=new Sequence(finger,1);\n\t\t\t\t\tInteraction i1=finger.createPointerMove(Duration.ofMillis(0),PointerInput.Origin.viewport(),width/2,(int) (height*0.8));\n\t\t\t\t\tswipe.addAction(i1);\n\t\t\t\t\tInteraction i2=finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg());\n\t\t\t\t\tswipe.addAction(i2);\n\t\t\t\t\tInteraction i3=finger.createPointerMove(Duration.ofMillis(200),PointerInput.Origin.viewport(),width/2,(int) (height*0.3));\n\t\t\t\t\tswipe.addAction(i3);\n\t\t\t\t\tInteraction i4=finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg());\n\t\t\t\t\tswipe.addAction(i4);\n\t\t\t\t\tdriver.perform(Arrays.asList(swipe));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Get element dimensions\n\t\t\tMobileElement ele=(MobileElement) driver.findElement(By.xpath(\"//*[@text='\"+contactname+\"']/parent::*/parent::*\"));\n\t\t\tPoint source=ele.getCenter();\n\t\t\tint w=ele.getSize().getWidth();\n\t\t\tint h=ele.getSize().getHeight();\n\t\t\tint x=source.x;\n\t\t\tint y=source.y;\n\t\t\t//Horizontal Swipe Logic\n\t\t\tPointerInput finger=new PointerInput(PointerInput.Kind.TOUCH,\"finger\");\n\t\t\tSequence swipe=new Sequence(finger,1);\n\t\t\tInteraction i1=finger.createPointerMove(Duration.ofMillis(0),PointerInput.Origin.viewport(),(int) (x-w/2*0.8),y);\n\t\t\tswipe.addAction(i1);\n\t\t\tInteraction i2=finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg());\n\t\t\tswipe.addAction(i2);\n\t\t\tInteraction i3=finger.createPointerMove(Duration.ofMillis(1000),PointerInput.Origin.viewport(),(int) (x+w/2*0.8),y);\n\t\t\tswipe.addAction(i3);\n\t\t\tInteraction i4=finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg());\n\t\t\tswipe.addAction(i4);\n\t\t\tdriver.perform(Arrays.asList(swipe));\n\t\t\tThread.sleep(15000);\n\t\t\tdriver.findElementByAndroidUIAutomator(\"new UiSelector().description(\\\"End call\\\")\").click();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\tThread.sleep(5000);\n\t\t//Close app\n\t\tdriver.closeApp();\n\t\t//Stop appium server\n\t\tRuntime.getRuntime().exec(\"taskkill /F /IM node.exe\");\n\t\tRuntime.getRuntime().exec(\"taskkill /F /IM cmd.exe\");\n\t}",
"public static void init(AppiumDriver webDriver) {\n driver = webDriver;\n int timeoutInSeconds = 60;\n // must wait at least 60 seconds for running on Sauce.\n // waiting for 30 seconds works locally however it fails on Sauce.\n driverWait = new WebDriverWait(webDriver, timeoutInSeconds);\n }",
"private void setSauceWebdriver() {\n\n switch (getBrowserId(browser)) {\n case 0:\n capabilities = DesiredCapabilities.internetExplorer();\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n break;\n case 1:\n capabilities = DesiredCapabilities.firefox();\n break;\n case 2:\n capabilities = DesiredCapabilities.safari();\n break;\n case 3:\n capabilities = DesiredCapabilities.chrome();\n break;\n case 4:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPhone Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 5:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPad Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 6:\n capabilities = DesiredCapabilities.android();\n capabilities.setCapability(\"deviceName\",\"Android Emulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n capabilities.merge(extraCapabilities);\n capabilities.setCapability(\"javascriptEnabled\", true);\n capabilities.setCapability(\"platform\", platform);\n capabilities.setCapability(\"version\", version);\n\n try {\n this.driver.set(new RemoteWebDriver(new URL(System\n .getProperty(\"SAUCE_KEY\")), capabilities));\n } catch (MalformedURLException e) {\n LOGGER.log(Level.INFO,\n \"MalformedURLException in setSauceWebdriver() method\", e);\n }\n }",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithUserDefinedOverride() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setBrowser(BrowserType.CHROME.toString());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setApp(\"\");\r\n\t\tcontext.setAppiumCapabilities(\"browserName=firefox;key2=value2\");\r\n\t\t\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"firefox\");\r\n\t\t\r\n\t}",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"XT1033\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\t//app details\n\t\tcapabilities.setCapability(\"appPackage\", \"flipboard.app\");\n\t\tcapabilities.setCapability(\"appActivity\", \"flipboard.activities.LaunchActivity\");\n\t\t\n\t\t//Appium details\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\n\t\t//Thread.sleep(5000);\n\t\t\n\t\tWebDriverWait wait= new WebDriverWait(driver, 60);\n\t\tWebElement until = wait.until(ExpectedConditions.presenceOfElementLocated(By.id(\"flipboard.app:id/main_activity_pager\")));\n\t\t\n\t\tSystem.out.println(until.isDisplayed());\n\t\t\t\n\t\tThread.sleep(5000);\n\t\t//swipe from right to left\n\t\t\n\t\tDimension size = driver.manage().window().getSize();\n\t\tSystem.out.println(size);\n\t\t\n\t\t\n\t\tint Startx=(int)(size.width*0.90);\n\t\tSystem.out.println(\"Startx is \"+Startx);\n\t\t\n\t\tint Endx=(int)(size.width*0.10);\n\t\tSystem.out.println(\"Endx is \"+Endx);\n\t\t\n\t\tint Starty=(int)(size.height*0.50);\n\t\tSystem.out.println(\"Starty is \"+Starty);\n\t\t\n\t\t\n\t\tdriver.swipe(Startx, Starty, Endx, Starty, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\tdriver.swipe(Startx, Starty, Endx, Starty, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\tdriver.swipe(Startx, Starty, Endx, Starty, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\tdriver.swipe(Startx, Starty, Endx, Starty, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\tSystem.out.println(\"Right to left swipe is completed\");\n\t\t\n\t\tThread.sleep(4000);\n\t\t\n\t\t//*****************************************************\n\t\t\n\t\t//Reverse from Left to Right\n\t\tThread.sleep(4000);\n\t\t\n\t\tint Startx1=(int)(size.width*0.10);\n\t\tSystem.out.println(\"Startx1 is \"+Startx1);\n\t\t\n\t\tint Endx1=(int)(size.width*0.90);\n\t\tSystem.out.println(\"Endx1 is \"+Endx1);\n\t\t\n\t\tint Starty1=(int)(size.height*0.50);\n\t\tSystem.out.println(\"Starty1 is \"+Starty1);\n\t\t\n\t\t\n\t\tdriver.swipe(Startx1, Starty1, Endx1, Starty1, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\tdriver.swipe(Startx1, Starty1, Endx1, Starty1, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\tdriver.swipe(Startx1, Starty1, Endx1, Starty1, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\tdriver.swipe(Startx1, Starty1, Endx1, Starty1, 1000);\n\t\tThread.sleep(4000);\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) throws MalformedURLException {\n\t\tFile appDir = new File(\"src/test/java\");\n\t\tFile app = new File(appDir, \"com.google.android-2.3.apk\");\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t//capabilities.setCapability(\"browserName\", \"Chrome\");\n\n\t\t//capabilities.setCapability(\"device\",\"Android\");\n\t\tcapabilities.setCapability(\"deveiceName\",\"SimulatorGalaxy\" );\t\t\n\t\tcapabilities.setCapability(\"platformVersion\", \"5.0.1\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"app\",app.getAbsolutePath());\n\t\tcapabilities.setCapability(\"appPackage\",\"com.android.chrome\");\n\t\tcapabilities.setCapability(\"appActivity\",\"com.google.android.apps.chrome.\");\n\t\tdriver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\t\n\n\t\t/*driver.get(\"Url\");\n\t\tdriver.findElement(By.id(\"menu_projects\")).click();\n\t\tdriver.findElement(By.id(\"menu_about\")).click();\n\t\tdriver.findElement(By.id(\"menu_support\")).click();\n\t\tdriver.findElement(By.id(\"menu_documentation\")).click();\n\t\tdriver.findElement(By.id(\"menu_download\")).click();\n\n\t\tdriver.quit();*/\n\t}",
"public AppiumDriver getDriver() {\n return appiumDriver;\n }",
"public void startAppium() throws ExecuteException, IOException{\n\t\t\t\tCommandLine command = new CommandLine(\"/bin/sh\");\n\t\t\t\tcommand.addArgument(\"/Applications/Appium.app/Contents/Resources/node/bin/node\");\n\t\t\t\tcommand.addArgument(\"/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js\");\n\t\t\t\tcommand.addArgument(\"--address\");\n\t\t\t\tcommand.addArgument(\"127.0.0.1\");\n\t\t\t\tcommand.addArgument(\"--port\");\n\t\t\t\tcommand.addArgument(\"4723\");\n\t\t\t\tcommand.addArgument(\"--no-reset\");\n\t\t\t\tcommand.addArgument(\"--log\");\n\t\t\t\t\n\t\t\t\tcommand.addArgument(\"argument\", false);\n\t\t\t\tDefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n\t\t\t\tDefaultExecutor executor = new DefaultExecutor();\n\t\t\t\texecutor.setExitValue(1);\n\t\t\t\texecutor.execute(command, resultHandler);\n\t\t\t\t\t\n\t\t\t}",
"public void setCapabilities(String capabilities) {\n this.capabilities = capabilities;\n }",
"@Test\n\tpublic void LaunchAppTest() throws MalformedURLException {\n\n\t\t// Appium Code to Launch the Calculator App without .apk File \n\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\t\tcapabilities.setCapability(\"appPackage\", \"com.android.calculator2\");\n\t\tcapabilities.setCapability(\"appActivity\", \"com.android.calculator2.Calculator\");\n\t\tcapabilities.setCapability(\"autoLaunch\", true);\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(\n\t\t\t\tnew URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\tdriver.quit();\n\t}",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithApplicationOverrideFullReset() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setFullReset(false);\r\n\t\tcontext.setApp(\"com.covea.mobileapp\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.FULL_RESET), false);\r\n\t}",
"@BeforeClass\n public void setUp() throws Exception {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(\"platformName\", \"Android\");\n capabilities.setCapability(\"deviceName\", \"Samsung Galaxy S4 Emulator\");\n capabilities.setCapability(\"platformVersion\", \"4.4\");\n capabilities.setCapability(\"browserName\", \"browser\");\n capabilities.setCapability(\"deviceOrientation\", \"portrait\");\n capabilities.setCapability(\"appiumVersion\", \"1.5.3\");\n driver = new AndroidDriver(new URL(URL), capabilities);\n\n }",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithRelativeApplicationPath() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setApp(\"data/core/app.apk\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"\");\r\n\t\tlogger.info(\"app path: \" + capa.getCapability(\"app\"));\r\n\t\tAssert.assertTrue(capa.getCapability(\"app\").toString().contains(\"/data/core/app.apk\"));\r\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\ttry {\n\t\t\tString driverPath = \"/Users/siddaharth.suman/Downloads/Selenium/chromedriver\";\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath);\n\t\t\tdriver = new ChromeDriver();\n\t\t\twait = new WebDriverWait(driver, WAIT_TIMEOUT);\n\t\t\t\n\t\t\t\n\n\t\t\tlogin();\n\n\t\t\topenFindIphone();\n\n\t\t\tString[] devices = { \"PwC IPhone i14\", \"PwC IPhone i9\", \"PwC IPhone i8\", \"PwC IPhone i7\" };\n\n\t\t\tfor (int i = 0; i < 1; i++) {\n\t\t\t\tSystem.out.println(\"===============Start of report #\" + (i + 1) + \"================\");\n\t\t\t\t// for (String device : devices) {\n\t\t\t\t\t// System.out.println(\"Checking status for device: \" + device);\n\n\t\t\t\t\twait.until(ExpectedConditions\n\t\t\t\t\t\t\t.elementToBeClickable(By.xpath(\"//div[contains(@title, \\\"Show devices using\\\")]\"))).click();\n\n\t\t\t\t\t// handle stale element exception here\n\t\t\t\t\tboolean handled = false;\n\t\t\t\t\tdo {\n\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\twait.until(ExpectedConditions\n//\t\t\t\t\t\t\t\t\t.elementToBeClickable(By.xpath(\"//div[@title=\\\"\" + device + \"\\\"]\"))).click();\n\t\t\t\t\t\t\twait.until(ExpectedConditions\n\t\t\t\t\t\t\t\t\t.elementToBeClickable(By.xpath(\"//div[@title=\\\"\" + \"PwC IPhone i9\" + \"\\\"]\"))).click();\n\t\t\t\t\t\t\thandled = true;\n\t\t\t\t\t\t} catch (StaleElementReferenceException e) {\n\t\t\t\t\t\t\tSystem.out.println(\"Handling stale element reference exception\");\n\t\t\t\t\t\t\thandled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (!handled);\n\t\t\t\t\t// Check maybe if device is offline and pending or pending lost mode or already\n\t\t\t\t\t// in lost mode\n\n\t\t\t\t\tif (!checkIfAlreadyInLostMode()) {\n\t\t\t\t\t\tSystem.out.println(\"Device not in lost mode\");\n\t\t\t\t\t\tif (!checkIfLostModePending()) {\n\t\t\t\t\t\t\tSystem.out.println(\"Device not in pending mode\");\n\t\t\t\t\t\t\t// Check if device is offline for a while\n\t\t\t\t\t\t\tif (checkIfDeviceOffline()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Device is offline\");\n\t\t\t\t\t\t\t\t// Report state of the device to server as Offline without Pending\n\t\t\t\t\t\t\t\t// Put device in lock state\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Device is online\");\n\t\t\t\t\t\t\t\t// Report state of the device to server as Online without Pending\n\t\t\t\t\t\t\t\t// Put device in lock state\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Device is in pending mode\");\n\t\t\t\t\t\t\tif (checkIfDeviceOffline()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Device is offline and pending\");\n\t\t\t\t\t\t\t\t// Report state of the device to server as Offline with Pending\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Device is online and pending\");\n\t\t\t\t\t\t\t\t// Report state of the device to server as Online with Pending\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Device is in lost mode\");\n\t\t\t\t\t\t// Report state of the device to server as in Lost Mode\n\t\t\t\t\t}\n\t\t\t\t// }\n\t\t\t}\n\t\t\t// Thread.sleep(5000);\n\t\t} catch (TimeoutException e) {\n\t\t\tSystem.out.println(\"Timeout exception\");\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (driver != null) {\n\t\t\t\tlogout();\n\t\t\t\tdriver.quit();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void startDriver(IOSCapabilities caps) {\n }",
"@Test\n\t\t\n\t\tpublic void signUp() throws InterruptedException\n\t\t{\n\t\t\t\t\tDesiredCapabilities caps = new DesiredCapabilities();\n\t\t\t\t\tcaps.setCapability(\"deviceName\", \"My\"); \n\t\t\t\t\tcaps.setCapability(\"udid\", \"bd40918\"); \n\t\t\t\t\tcaps.setCapability(\"platformName\", \"Android\"); \n\t\t\t\t\tcaps.setCapability(\"platformVersion\", \"9.0\");\t\n\t\t\t\t\tcaps.setCapability(\"noReset\", true);\t\t\t\t\n\t\t\t\t\tcaps.setCapability(\"appPackage\", \"com.android.vending\");\n\t\t\t\t\tcaps.setCapability(\"appActivity\", \"com.google.android.finsky.activities.MainActivity\");\n\t\t\t\t\tcaps.setCapability(\"adbExecTimeout\", \"50000\");\n\t\t\t\t\tcaps.setCapability(\"autoGrantPermissions\", \"true\");\n\t\t\t\t\tcaps.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS,true);\n\t\t\t\t\tcaps.setCapability(\"autoAcceptAlerts\",\"true\");\n\t\t\t\t\tcaps.setCapability(\"unicodeKeyboard\", true);\n\t\t\t\t caps.setCapability(\"resetKeybord\", true);\n\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"), caps);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t}",
"public static DesiredCapabilities setAppCapabilities() {\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\tString appID = PropertyFileHandler.getPropertyFromConfig(ConfigPropertyKeys.appID);\n\t\tcapabilities.setCapability(\"app\", appID + \"!App\");\n\t\treturn capabilities;\n\t}",
"public static AppiumDriver getDriver(){\n return appiumDriverList.get(0);\n }",
"public void invokeAppium() throws Exception {\n String OS = System.getProperty(\"os.name\").toLowerCase();\n try {\n startAppiumServer(OS);\n LOGGER.info(\"Appium server started successfully\");\n } catch (Exception e) {\n LOGGER.warn(\"Unable to start appium server\");\n throw new TapException(TapExceptionType.PROCESSING_FAILED, \"Unable to start appium server\");\n }\n }",
"Capabilities getCapabilities();",
"public static void main(String[] args) throws Exception {\n File app = new File(\"/Users/wanghb/AndroidStudioProjects/myapp/app/build/outputs/apk/debug/app-debug.apk\");\n DesiredCapabilities capabilities = new DesiredCapabilities();\n// capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Emulator\");\n// capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Emulator\");\n// capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());\n //安卓通过appPackage及appActivity\n capabilities.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, \"com.example.myapp\");\n capabilities.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, \".MainActivity\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);\n //you are free to set additional capabilities\n AppiumDriver<MobileElement> driver = new AppiumDriver<>(\n new URL(\"http://0.0.0.0:4723/wd/hub\"),\n //if it needs to use locally started server\n //then the target_ip is 127.0.0.1 or 0.0.0.0\n //the default port is 4723\n capabilities);\n MobileElement firstText = driver.findElement(By.id(\"textview_first\"));\n System.out.println(firstText.getText());\n System.out.println(firstText.getTagName());\n System.out.println(firstText.getSize());\n MobileElement firstButton = driver.findElement(By.id(\"button_first\"));\n firstButton.click();\n MobileElement secondtext = driver.findElement(By.id(\"textview_second\"));\n System.out.println(secondtext.getText());\n System.out.println(secondtext.getTagName());\n System.out.println(secondtext.getSize());\n MobileElement secondButton = driver.findElement(By.id(\"button_second\"));\n System.out.println(secondButton.getText());\n System.out.println(secondButton.getTagName());\n System.out.println(secondButton.getSize());\n System.out.println(\"success\");\n }",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithAbsoluteApplicationPath() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tString path = new File(\"data/core/app.apk\").getAbsolutePath();\r\n\t\tcontext.setApp(path);\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"\");\r\n\t\tAssert.assertEquals(capa.getCapability(\"app\"), path.replace(\"\\\\\", \"/\"));\r\n\t}",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,\"Rajesh Iphone\");\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,\"ios\");\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,\"9.3.5\");\n\t\t\n\t\tcapabilities.setCapability(\"udid\",\"499ae5ae6d066971991c5d27e8fbff07899a489d\");\n\t\tcapabilities.setCapability(\"bundleId\",\"TAmobiletest.safarlauncher\");\n\t\t\n\t\tAppiumDriver driver= new IOSDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\n\t\tSet<String> contextHandles = driver.getContextHandles();\n\t\tSystem.out.println(contextHandles.size());\n\t\t\n\t\tfor(String contextname:contextHandles)\n\t\t{\n\t\t\tSystem.out.println(contextname);\n\t\t\t\n\t\t\tif(contextname.contains(\"WEBVIEW\"))\n\t\t\t{\n\t\t\t\tdriver.context(contextname);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tdriver.get(\"http://www.google.com\");\n\t\t\n\t\tThread.sleep(5000);\n\t\t\n\t\tdriver.findElementById(\"lst-ib\").sendKeys(\"Sachin\");\n\t\tdriver.findElementById(\"tsbb\").click();\n\t\t\n\t\tThread.sleep(9000);\n\t\t\n\t\tString Actual_Result = driver.findElementByXPath(\"//span[contains(text(),'Cricketer')]\").getText();\n\t\tSystem.out.println(\"Actual Result is \"+Actual_Result);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"DeviceCapabilitiesProvider getDeviceCapabilitiesProvider();",
"public static void main(String[] args) throws MalformedURLException {\n\t\tFile src = new File(\"src\");\r\n\t\tFile appsrc = new File(src,\"ApiDemos-debug.apk\");\r\n\t\t\r\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\r\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Device\");\r\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);\r\n\t\tcap.setCapability(MobileCapabilityType.APP, appsrc.getAbsolutePath());\r\n\t\t\r\n\t\tAndroidDriver driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),cap);\r\n\t\t\r\n\t}",
"@Test\n public void testMobileAndroid() {\n try {\n\n System.out.println(\"Running test on Android mobile browser\");\n DeviceDescription description = new DeviceDescription();\n description.setOsType(\"Android\");\n description.setOsVersion(\">=6.0\");\n\n Device device = MobileLab.lockDevice(description);\n Browser browser2 = BrowserFactory.launch(BrowserType.CHROME, device);\n navigateBrowser(browser2);\n Reporter.reportEvent(\"Image of Mobile\", \"Using Chrome on Android\", Status.Passed, browser2.getSnapshot());\n windowsSync(1500);\n\n }\n catch (GeneralLeanFtException glftex) {System.out.println(\"GeneralLeanFtException: \" + glftex.getMessage());}\n catch (InterruptedException iex) {System.out.println(\"InterruptedException: \" + iex.getMessage());}\n catch (ReportException rex){System.out.println(\"ReportException: \" + rex.getMessage());}\n catch (StringIndexOutOfBoundsException soobEx) {System.out.println(\"StringIndexOutOfBoundsException: \" + soobEx.getMessage());}\n }",
"public static void startAppiumServer() throws IOException, InterruptedException {\n\n\tRuntime runtime = Runtime.getRuntime();\n\n\tprocess = runtime.exec(STARTSERVER);\n\n\tThread.sleep(7000);\n\n\tif (process != null) {\n\n\tSystem.out.println(\"Appium server started\");\n\n\t}\n\n\t}",
"@Before\n public void start(){\n DesiredCapabilities caps = new DesiredCapabilities();\n driver = new FirefoxDriver(new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Nightly\\\\firefox.exe\")), new FirefoxProfile(), caps);\n wait = new WebDriverWait(driver, 10);\n\n //IE\n// DesiredCapabilities caps = new DesiredCapabilities();\n// caps.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);\n// WebDriver driver = new InternetExplorerDriver(caps);\n\n\n }",
"RemoteWebDriver getDriver(String appName, String uuid, String bundleId, String xcodeOrgId, int timeout) {\n\t\tDesiredCapabilities ioscap = new DesiredCapabilities();\n\t\tioscap.setCapability(IOSMobileCapabilityType.WDA_LOCAL_PORT, 8100);\n\t\tioscap.setCapability(IOSMobileCapabilityType.BUNDLE_ID, bundleId);\n\t\tioscap.setCapability(IOSMobileCapabilityType.XCODE_ORG_ID, xcodeOrgId);\n\t\tioscap.setCapability(IOSMobileCapabilityType.XCODE_SIGNING_ID, \"iPhone Developer\");\n\t\tioscap.setCapability(\"automationName\", \"XCUITest\");\n\t\tioscap.setCapability(\"platformName\", \"iOS\");\n\t\tioscap.setAcceptInsecureCerts(true);\n\t\tioscap.acceptInsecureCerts();\n\t\tioscap.setCapability(IOSMobileCapabilityType.LAUNCH_TIMEOUT, 60000);\n\t\tioscap.setCapability(IOSMobileCapabilityType.COMMAND_TIMEOUTS, 60000);\n\t\tioscap.setCapability(IOSMobileCapabilityType.WDA_LAUNCH_TIMEOUT, 1200000);\n\t\tioscap.setCapability(IOSMobileCapabilityType.WDA_CONNECTION_TIMEOUT, 1200000);\n\t\ttry {\n\t\t\tif (System.getProperty(\"location\").equalsIgnoreCase(\"local\")) {\n\t\t\t\tdriver = new IOSDriver<>(new URL(\"http://127.0.0.1:4651/wd/hub\"), ioscap);\n\t\t\t} else {\n\t\t\t\tdriver = new IOSDriver<>(new URL(PropertyHelper.getProperties(\"REMOTE_HUB_URL\")), ioscap);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"IOSDriver Driver instantiating failed\", e);\n\t\t}\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\tDriverFactory.getDriverPool().put(appName, driver);\n\t\treturn driver;\n\t}",
"public interface DriverCapabilities {\r\n\r\n\t/**\r\n\t * Allows custom capabilities to be set.\r\n\t * \r\n\t * @param browser\r\n\t * The browser to set capabilities specific to browser being\r\n\t * used.\r\n\t * @param caps\r\n\t * The capabilities object to add additional capabilities to.\r\n\t */\r\n\tvoid getCapabilties(Browser browser, DesiredCapabilities caps);\r\n}",
"public static void main(String[] args) {\n\t\tstartAppium();\r\n\t\t//Draw.takeScreenShot();\r\n\r\n\t\t//方向接受参数:Right, Left, Up, Down\r\n\t\t\r\n\t\t//scrollToFind(\"890\");\r\n\t\twait(5);\r\n\t\t//clickByXpath(\"//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeNavigationBar[1]/XCUIElementTypeButton[1]\");\r\n\t\twait(5);\r\n\t\tiosdriver.findElement(By.name(\"我\")).click();\r\n\t\twait(2);\r\n\t\tiosdriver.findElement(By.name(\"发现\")).click();\r\n\t\twait(2);\r\n\t\tMobileElement s = (MobileElement) iosdriver.findElement(By.className(\"TabBar\"));\r\n\t\ts.findElement(By.name(\"相机\")).click();\r\n\t\twait(2);\r\n\t\tstopAppium();\r\n\t}",
"private static DesiredCapabilities setCommon(DesiredCapabilities capabilities, String deviceType) {\r\n if (deviceType == \"mobile\") {\r\n\r\n } else if (deviceType == \"pc\") {\r\n capabilities.setCapability(\"browserstack.debug\", \"true\");\r\n\r\n } else if (deviceType == \"tab\") {\r\n\r\n } else if (deviceType == \"mac\") {\r\n\r\n } else if (deviceType == \"android\") {\r\n\r\n } else if (deviceType == \"iphone\") {\r\n\r\n } else if (deviceType == \"ipad\") {\r\n\r\n }\r\n return capabilities;\r\n }",
"public static void main (String[] args){\n\n DesiredCapabilities cap = new DesiredCapabilities();\n cap.setCapability(MobileCapabilityType.DEVICE_NAME,\"ZY223RZBJ9\");\n cap.setCapability(\"appActivity\",\"com.android.calculator2.CalculatorGoogle\");\n cap.setCapability(\"appPackage\", \"com.android.calculator2\");\n AndroidDriver driver = null;\n try{\n driver = new AndroidDriver(new URL(\"http://localhost:4793/wd/hub\"), cap);\n /* driver.manage().timeouts().implicitlyWait(10L,\nTimeUnit.SECONDS);\n //click 5 -- locate the android element\n\ndriver.findElementById(\"com.android.calculator2:id/digit_5\").click();\n //click +\n\n//driver.findElementByXPath(\"//android.widget.ImageButton[contains@resource-\nid=plus]\").click();\n\ndriver.findElementByXPath(\"//android.widget.Button[contains(@resource-id,'op\n_add')]\").click();\n //click 3 -- locate the android element\n driver.findElementByAndroidUIAutomator(\"new\nUiSelector().resourceId(\\\"com.android.calculator2:id/digit_3\\\")\").click();\n //driver.findElementByAndroidUIAutomator(\"new\nUiSelector().resourceID(\\\"com.android.calculator2:id/digit3\").click();\n\n // click =\n\ndriver.findElement(By.id(\"com.android.calculator2:id/eq\")).click();\n //capture result and print\n String text =\ndriver.findElement(By.className(\"android.widget.EditText\")).getText();\n System.out.println(\"text= \"+ text);*/\n }catch(Throwable t){\n t.printStackTrace();\n }finally{\n driver.quit();\n }\n }",
"private void setRemoteWebdriver() {\n\n switch (getBrowserId(browser)) {\n case 0:\n capabilities = DesiredCapabilities.internetExplorer();\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n break;\n case 1:\n\t\tFirefoxProfile profile = new FirefoxProfile();\n \tprofile.setEnableNativeEvents(true);\n capabilities = DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(FirefoxDriver.PROFILE, profile);\n \tcapabilities.setJavascriptEnabled(true);\n \tcapabilities.setCapability(\"marionette\", false);\n \tcapabilities.setCapability(\"acceptInsecureCerts\", true);\n break;\n case 2:\n capabilities = DesiredCapabilities.safari();\n break;\n case 3:\n capabilities = DesiredCapabilities.chrome();\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n capabilities.setCapability(\"javascriptEnabled\", true);\n capabilities.setCapability(\"platform\", platform);\n capabilities.setCapability(\"version\", version);\n capabilities.merge(extraCapabilities);\n\n try {\n this.driver.set(new RemoteWebDriver(new URL(\"http://\"\n + System.getProperty(\"GRID_HOST\") + \":\"\n + System.getProperty(\"GRID_PORT\") + \"/wd/hub\"),\n capabilities));\n } catch (MalformedURLException e) {\n LOGGER.log(Level.INFO,\n \"MalformedURLException in setRemoteWebdriver() method\", e);\n }\n }",
"public static void Android_Meembahrain_Login(String username,String environment) {\n try {\n\n System.out.println(username);\n loginCredentials(username);\n\n System.out.println(loginCredentials(username)[0]);\n System.out.println(loginCredentials(username)[1]);\n\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n waitToElement(\"//android.widget.Button[@text='OK']\");\n MobileElement e1ement = driver.findElementByXPath(\"//android.widget.Button[@text='OK']\");\n e1ement.click();\n\n waitToElement(\"//android.widget.EditText[@text='Username']\");\n MobileElement el11 = driver.findElementByXPath(\"//android.widget.EditText[@text='Username']\");\n el11.sendKeys(loginCredentials(username)[0]);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"//android.view.ViewGroup[3]/android.widget.EditText\");\n //String password = getData(\"Password\");\n el2.sendKeys(loginCredentials(username)[1]);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n ReportHelper.logReportStatus(LogStatus.PASS, \"Login button clicked successfully\");\n\n String otp = FetchOTP.getOTP().replace(\"Your OTP is \", \"\").trim();\n\n\n waitToElement(\"//android.widget.EditText[@text='Confirmation Code']\");\n\n MobileElement ConfirmCode = driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\");\n ConfirmCode.sendKeys(otp);\n\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n waitToElement(\"//android.widget.Button[@text='S']\");\n ReportHelper.logReportStatus(LogStatus.PASS, \"Login Successfully\");\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"Unable to login into the application\" + e.getMessage());\n\n }\n }",
"@BeforeMethod\n\tpublic static void launchDriver() throws MalformedURLException\n\t{\n\t \t\t \n\t\tDesiredCapabilities caps = new DesiredCapabilities();\n\t/* caps.setCapability(\"browser\", \"Chrome\");\n\t caps.setCapability(\"browser_version\", \"60.0\");\n\t caps.setCapability(\"os\", \"Windows\");\n\t caps.setCapability(\"os_version\", \"7\");\n\t caps.setCapability(\"resolution\", \"1024x768\");\n\t caps.setCapability(\"name\", \"Bstack-[Java] Sample Test\");*/\n\t //set from capability generator \n\t caps.setCapability(\"os\", \"Windows\");\n\t caps.setCapability(\"os_version\", \"10\");\n\t caps.setCapability(\"browser\", \"Chrome\");\n\t caps.setCapability(\"browser_version\", \"62.0\");\n\t caps.setCapability(\"project\", \"TestingOnBrowserStack\");\n\t caps.setCapability(\"build\", \"1.0\");\n\t caps.setCapability(\"name\", \"TestBroserStackSel\");\n\t caps.setCapability(\"browserstack.local\", \"false\");\n\t caps.setCapability(\"browserstack.selenium_version\", \"3.5.2\");\n\t \n\t driver = new RemoteWebDriver(new URL(URL), caps);\n\t\tdriver.manage().deleteAllCookies();\n\t\twait = new WebDriverWait(driver, 220);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\t\n\t\t\n\t}",
"private void setIEDriver() throws Exception {\n\t\tcapabilities = DesiredCapabilities.internetExplorer();\n\t\t// capabilities.setCapability(\"ignoreProtectedModeSettings\", true);\n\t\t// capabilities.setCapability(\"ignoreZoomSetting\", true);\n\t\t// capabilities.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION,\n\t\t// true);\n\t\tcapabilities.setJavascriptEnabled(true);\n\n\t\tInternetExplorerOptions ieOptions = new InternetExplorerOptions();\n\t\tieOptions.destructivelyEnsureCleanSession();\n\t\tieOptions.ignoreZoomSettings();\n\t\tieOptions.setCapability(\"ignoreProtectedModeSettings\", true);\n\t\tieOptions.merge(capabilities);\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", ieDriverLocation);\n\t\t\tmyDriver = new InternetExplorerDriver(ieOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultIEVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultIEVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" IE-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", ieDriverLocation);\n\t\t\tmyDriver = new InternetExplorerDriver(ieOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}",
"public static KAppiumDriver getDriver(String driverType, String seleniuGridUrl) {\n WebDriver driver = null;\n AppiumDriver appiumDriver = null;\n KAppiumDriver kAppiumDriver = null;\n //for specify download folder\n //String downloadFilepath = ConfigHelper.getDownloadFolder();\n switch (driverType) {\n case \"android\": {\n String appPath = ConfigHelper.getAppPath();\n\n String url = ConfigHelper.getAppiumServerURL();\n DesiredCapabilities capabilities = new DesiredCapabilities();\n\n capabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, ConfigHelper.getAppiumVersion());\n //capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, ConfigHelper.getPlatformVersion());\n capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, ConfigHelper.getDeviceName());\n capabilities.setCapability(MobileCapabilityType.APP, appPath);\n if (!ConfigHelper.getAutomationName().isEmpty()) {\n capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, ConfigHelper.getAutomationName());\n }\n try {\n appiumDriver = new AndroidDriver(new URL(url), capabilities);\n kAppiumDriver = new KAppiumDriver(appiumDriver);\n logger.info(\"AndroidDriver is \" + driverType + \" driver, pointing \" + \" is generated on\" + url);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n break;\n }\n case \"ios\": {\n String appPath = ConfigHelper.getAppPath();\n\n String url = ConfigHelper.getAppiumServerURL();\n DesiredCapabilities capabilities = new DesiredCapabilities();\n //capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, ConfigHelper.getDriverType());\n capabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, ConfigHelper.getAppiumVersion());\n capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, ConfigHelper.getPlatformVersion());\n capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, ConfigHelper.getDeviceName());\n capabilities.setCapability(MobileCapabilityType.APP, appPath);\n if (!ConfigHelper.getAutomationName().isEmpty()) {\n capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, ConfigHelper.getAutomationName());\n }\n try {\n appiumDriver = new IOSDriver(new URL(url), capabilities);\n kAppiumDriver = new KAppiumDriver(appiumDriver);\n logger.info(\"IOSDriver is \" + driverType + \" driver, pointing \" + \" is generated on\" + url);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n break;\n }\n case \"browserstack\":\n String USERNAME = \"a user name\";\n String AUTOMATE_KEY = \"a password\";\n // final String URL = \"http://otis8:5ZpdSfAmCEpyvwrF8BTq@hub.browserstack.com:80/wd/hub\";\n String URL = \"http://\" + USERNAME + \":\" + AUTOMATE_KEY + \"@hub.browserstack.com:80/wd/hub\";\n if (!ConfigHelper.getString(\"browserstack.url\").isEmpty()) {\n URL = ConfigHelper.getString(\"browserstack.url\");\n logger.info(URL);\n }\n\n //browserstack.debug=true\n DesiredCapabilities caps = new DesiredCapabilities();\n if (!ConfigHelper.getString(\"browserstack.os\").isEmpty()) {\n caps.setCapability(\"os\", ConfigHelper.getString(\"browserstack.os\"));\n logger.info(\"browserstack.os\" + ConfigHelper.getString(\"browserstack.os\"));\n }\n if (!ConfigHelper.getString(\"browserstack.debug\").isEmpty()) {\n caps.setCapability(\"browserstack.debug\", ConfigHelper.getString(\"browserstack.debug\"));\n logger.info(\"browserstack.debug\" + ConfigHelper.getString(\"browserstack.debug\"));\n }\n if (!ConfigHelper.getString(\"browserstack.os_version\").isEmpty()) {\n caps.setCapability(\"os_version\", ConfigHelper.getString(\"browserstack.os_version\"));\n logger.info(\"browserstack.os_version\" + ConfigHelper.getString(\"browserstack.os_version\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserName\").isEmpty()) {\n caps.setCapability(\"browserName\", ConfigHelper.getString(\"browserstack.browserName\"));\n logger.info(\"browserstack.browserName\" + ConfigHelper.getString(\"browserstack.browserName\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browser_version\").isEmpty()) {\n caps.setCapability(\"browser_version\", ConfigHelper.getString(\"browserstack.browser_version\"));\n logger.info(\"browserstack.browser_version\" + ConfigHelper.getString(\"browserstack.browser_version\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserstack.local\").isEmpty()) {\n caps.setCapability(\"browserstack.local\", ConfigHelper.getString(\"browserstack.browserstack.local\"));\n logger.info(\"browserstack.local\" + ConfigHelper.getString(\"browserstack.browserstack.local\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserstack.debug\").isEmpty()) {\n caps.setCapability(\"browserstack.debug\", ConfigHelper.getString(\"browserstack.browserstack.debug\"));\n logger.info(\"browserstack.debug\" + ConfigHelper.getString(\"browserstack.browserstack.debug\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserstack.console\").isEmpty()) {\n caps.setCapability(\"browserstack.console\", ConfigHelper.getString(\"browserstack.browserstack.console\"));\n logger.info(\"browserstack.console\" + ConfigHelper.getString(\"browserstack.browserstack.console\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserstack.networkLogs\").isEmpty()) {\n caps.setCapability(\"browserstack.networkLogs\", ConfigHelper.getString(\"browserstack.browserstack.networkLogs\"));\n logger.info(\"browserstack.networkLogs\" + ConfigHelper.getString(\"browserstack.browserstack.networkLogs\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserstack.video\").isEmpty()) {\n caps.setCapability(\"browserstack.video\", ConfigHelper.getString(\"browserstack.browserstack.video\"));\n logger.info(\"browserstack.video\" + ConfigHelper.getString(\"browserstack.browserstack.video\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserstack.timezone\").isEmpty()) {\n caps.setCapability(\"browserstack.timezone\", ConfigHelper.getString(\"browserstack.browserstack.timezone\"));\n logger.info(\"browserstack.timezone\" + ConfigHelper.getString(\"browserstack.browserstack.timezone\"));\n }\n if (!ConfigHelper.getString(\"browserstack.resolution\").isEmpty()) {\n caps.setCapability(\"resolution\", ConfigHelper.getString(\"browserstack.resolution\"));\n\n logger.info(\"resolution\" + ConfigHelper.getString(\"browserstack.resolution\"));\n }\n if (!ConfigHelper.getString(\"browserstack.selenium_version\").isEmpty()) {\n caps.setCapability(\"selenium_version\", ConfigHelper.getString(\"browserstack.selenium_version\"));\n logger.info(\"selenium_version\" + ConfigHelper.getString(\"browserstack.selenium_version\"));\n }\n if (!ConfigHelper.getString(\"browserstack.device\").isEmpty()) {\n caps.setCapability(\"device\", ConfigHelper.getString(\"browserstack.device\"));\n logger.info(\"device\" + ConfigHelper.getString(\"browserstack.device\"));\n }\n if (!ConfigHelper.getString(\"browserstack.realMobile\").isEmpty()) {\n caps.setCapability(\"realMobile\", ConfigHelper.getString(\"browserstack.realMobile\"));\n logger.info(\"realMobile\" + ConfigHelper.getString(\"browserstack.realMobile\"));\n }\n if (!ConfigHelper.getString(\"browserstack.browserstack.appium_version\").isEmpty()) {\n caps.setCapability(\"browserstack.appium_version\", ConfigHelper.getString(\"browserstack.browserstack.appium_version\"));\n logger.info(\"browserstack.appium_version\" + ConfigHelper.getString(\"browserstack.browserstack.appium_version\"));\n }\n if (!ConfigHelper.getString(\"browserstack.deviceOrientation\").isEmpty()) {\n caps.setCapability(\"deviceOrientation\", ConfigHelper.getString(\"browserstack.deviceOrientation\"));\n logger.info(\"deviceOrientation\" + ConfigHelper.getString(\"browserstack.deviceOrientation\"));\n\n }\n // WebDriver driver = null;\n try {\n driver = new RemoteWebDriver(new URL(URL), caps);\n logger.info(\"browserStack is \" + driverType + \" driver, pointing \" + seleniuGridUrl, caps + \" is generated\");\n } catch (MalformedURLException malformedURLException) {\n logger.info(malformedURLException.toString());\n return null;\n }\n break;\n case \"chrome\":\n //final ChromeOptions chromeOptions = new ChromeOptions();\n HashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n chromePrefs.put(\"profile.default_content_settings.popups\", 0);\n chromePrefs.put(\"download.prompt_for_download\", \"false\");\n chromePrefs.put(\"download.directory_upgrade\", \"true\");\n chromePrefs.put(\"plugins.always_open_pdf_externally\", \"true\");\n chromePrefs.put(\"download.default_directory\", ConfigHelper.getDownloadFolder());\n chromePrefs.put(\"plugins.plugins_disabled\", new String[]{\n \"Adobe Flash Player\",\n \"Chrome PDF Viewer\"\n });\n chromePrefs.put(\"pdfjs.disabled\", true);\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n chromeOptions.addArguments(\"start-maximized\");\n chromeOptions.addArguments(\"disable-infobars\");\n chromeOptions.addArguments(\"--test-type\");\n DesiredCapabilities cap = DesiredCapabilities.chrome();\n cap.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);\n cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\n cap.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\n if (ConfigHelper.getString(\"chrome.headless\").toLowerCase().contains(\"t\") || ConfigHelper.getString(\"chrome.headless\").toLowerCase().contains(\"y\")) {\n chromeOptions.addArguments(\"--headless\");\n logger.info(\"chrome headless mode adopted\");\n }\n\n if ((null == seleniuGridUrl) || (seleniuGridUrl.equals(\"\") || seleniuGridUrl.equals(\"127.0.0.1\"))) {\n //remove later, should be a better way - Kris\n //System.setProperty(\"webdriver.chrome.driver\", \"c:/source/chromedriver.exe\");\n driver = new ChromeDriver(cap);\n\n logger.info(driverType + \" driver is generated locally\");\n } else {\n try {\n\n driver = new RemoteWebDriver(new URL(ConfigHelper.getString(\"selenium.grid.url\")), cap);\n logger.info(\"remoteWebdriver is \" + driverType + \" driver, pointing \" + seleniuGridUrl, cap + \" is generated\");\n } catch (MalformedURLException malformedURLException) {\n logger.info(malformedURLException.toString());\n return null;\n }\n }\n break;\n case \"firefox\":\n if ((null == seleniuGridUrl) || (seleniuGridUrl.equals(\"\"))) {\n FirefoxOptions options = new FirefoxOptions();\n driver = new FirefoxDriver(options);\n logger.info(driverType + \" driver is generated locally\");\n } else {\n try {\n DesiredCapabilities capability = DesiredCapabilities.firefox();\n driver = new RemoteWebDriver(new URL(ConfigHelper.getString(\"selenium.grid.url\")), capability);\n logger.info(\"remoteWebdriver is \" + driverType + \" driver, pointing \" + seleniuGridUrl, capability + \" is generated\");\n } catch (MalformedURLException malformedURLException) {\n logger.info(malformedURLException.toString());\n return null;\n }\n }\n break;\n case \"edge\":\n if ((null == seleniuGridUrl) || (seleniuGridUrl.equals(\"\"))) {\n EdgeOptions options = new EdgeOptions();\n driver = new EdgeDriver(options);\n logger.info(driverType + \" driver is generated locally\");\n } else {\n try {\n DesiredCapabilities capability = DesiredCapabilities.edge();\n driver = new RemoteWebDriver(new URL(ConfigHelper.getString(\"selenium.grid.url\")), capability);\n logger.info(\"remoteWebdriver is \" + driverType + \" driver, pointing \" + seleniuGridUrl, capability + \" is generated\");\n } catch (MalformedURLException malformedURLException) {\n logger.info(malformedURLException.toString());\n return null;\n }\n }\n break;\n case \"phantomjs\":\n if ((null == seleniuGridUrl) || (seleniuGridUrl.equals(\"\"))) {\n driver = new PhantomJSDriver();\n logger.info(driverType + \" driver is generated locally\");\n } else {\n try {\n DesiredCapabilities capability = DesiredCapabilities.edge();\n driver = new RemoteWebDriver(new URL(ConfigHelper.getString(\"selenium.grid.url\")), capability);\n logger.info(\"remoteWebdriver is \" + driverType + \" driver, pointing \" + seleniuGridUrl, capability + \" is generated\");\n } catch (MalformedURLException malformedURLException) {\n logger.info(malformedURLException.toString());\n return null;\n }\n }\n driver = new PhantomJSDriver();\n break;\n case \"ie\":\n if ((null == seleniuGridUrl) || (seleniuGridUrl.equals(\"\"))) {\n InternetExplorerOptions options = new InternetExplorerOptions();\n driver = new InternetExplorerDriver();\n logger.info(driverType + \" driver is generated locally\");\n } else {\n try {\n DesiredCapabilities capability = DesiredCapabilities.internetExplorer();\n driver = new RemoteWebDriver(new URL(ConfigHelper.getString(\"selenium.grid.url\")), capability);\n logger.info(\"remoteWebdriver is \" + driverType + \" driver, pointing \" + seleniuGridUrl, capability + \" is generated\");\n } catch (MalformedURLException malformedURLException) {\n logger.info(malformedURLException.toString());\n return null;\n }\n }\n\n break;\n case \"safari\":\n if ((null == seleniuGridUrl) || (seleniuGridUrl.equals(\"\"))) {\n SafariOptions options = new SafariOptions();\n driver = new SafariDriver(options);\n logger.info(driverType + \" driver is generated locally\");\n } else {\n try {\n DesiredCapabilities capability = DesiredCapabilities.safari();\n driver = new RemoteWebDriver(new URL(ConfigHelper.getString(\"selenium.grid.url\")), capability);\n logger.info(\"remoteWebdriver is \" + driverType + \" driver, pointing \" + seleniuGridUrl, capability + \" is generated\");\n } catch (MalformedURLException malformedURLException) {\n logger.info(malformedURLException.toString());\n return null;\n }\n }\n break;\n default:\n throw new IllegalArgumentException(\"the browser type is not defined\");\n }\n\n if (kAppiumDriver != null) {\n return kAppiumDriver;\n }\n return (KAppiumDriver) driver;\n }",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\t\t\n\t\t\t\t//device details\n\t\t\t\tcapabilities.setCapability(\"deviceName\", \"SM-G350E\");\n\t\t\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\t\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.2\");\n\t\t\t\t\n\t\t\t\t//app details\n\t\t\t\tcapabilities.setCapability(CapabilityType.BROWSER_NAME, \"Chrome\");\n\t\t\t\t\n\t\t\t\t//appium server details\n\t\t\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\t\t\n\t\t\t\tThread.sleep(4000);\n\t\t\t\t\n\t\t\t\tdriver.get(\"http://books.rediff.com/\");\n\t\t\t\tThread.sleep(3000);\n\t\t\t\t\n\t\t\t\tdriver.findElementById(\"srchword\").sendKeys(\"Modi\");\n\t\t\t\tdriver.findElementByXPath(\"//input[@type='submit'][@class='srchbtn_n']\").click();\n\t\t\t\t\n\t\t\t\tThread.sleep(6000);\n\t\t\t\t\n\t\t\t\tList<WebElement> ele_book = driver.findElementsByTagName(\"a\");\n\t\t\t\t\n\t\t\t\tfor(WebElement element:ele_book)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(element.getText());\n\t\t\t\t\t\n\t\t\t\t\tif((element.getText()).contains(\"Gamechanger\"))\n\t\t\t\t\t{\n\t\t\t\t\t\telement.click();\n\t\t\t\t\t\tbreak;\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\tThread.sleep(5000);\n\t\t\t\t\n\t\t\t\tdriver.findElementByXPath(\"//input[@class='buynowbtn'][@type='button'][@value='Buy Now']\").click();\n\t\t\t\t\n\t\t\t\tThread.sleep(4000);\n\t\t\t\t\n\t\t\t\tString Actual_Result = driver.findElementByCssSelector(\"#currentcartdiv > div.cart_prd_row > div.prddetail > span:nth-child(1)\").getText();\n\t\t\t\tSystem.out.println(Actual_Result);\n\t\t\t\tThread.sleep(3000);\n\t\t\t\t\n\t\t\t\tif(Actual_Result.contains(\"Gamechanger\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Pass\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Fail\");\n\t\t\t\t}\n\t\t\t\t\n\n\t}",
"public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\n\t\tAndroidDriver<AndroidElement> driver = capabilities();\n\t\t\n \t // driver.findElementByAndroidUIAutomator(\"attribute(\\\"value\\\")\");\n\t\n\n\t\tAndroidElement elementView = driver.findElementByAndroidUIAutomator(\"text(\\\"Views\\\")\"); \n\t\t\n\t\t\n\t\t\t\n\t\tSystem.out.println(driver.findElementsByAndroidUIAutomator(\"new UiSelector().clickable(true)\").size());\n\t\t\n\t\t//Click is more of press and hold \n\t\t//for Tap TouchActions is used. \n\t\t\n\t\tTouchAction t = new TouchAction(driver);\n\t\t\n\t\t// Touch actions should complete with perform\n\t\t\n\t\tt.tap(tapOptions().withElement(element(elementView))).perform();\n\t\t\n\t\t\n\t\tAndroidElement elementExpandableLists = driver.findElementByAndroidUIAutomator(\"text(\\\"Expandable Lists\\\")\"); \n\t\tt.tap(tapOptions().withElement(element(elementExpandableLists))).perform();\n\n\t\tAndroidElement elementCustomAdapter = driver.findElementByAndroidUIAutomator(\"text(\\\"1. Custom Adapter\\\")\");\n\t\tt.tap(tapOptions().withElement(element(elementCustomAdapter))).perform();\n\t\t\n\t\tAndroidElement elementPeopleNames = driver.findElementByAndroidUIAutomator(\"text(\\\"People Names\\\")\");\n\t\t\n\t\t// Long press and release \n\t\tt.longPress((longPressOptions().withElement(element(elementPeopleNames)).withDuration(ofSeconds(2)))).release().perform();\n\t\t\n\t\tThread.sleep(2000);\n\t\tSystem.out.println(driver.findElementById(\"android:id/title\").isDisplayed());\n\t\t\n\t\t\n\t}",
"public void allow_Me_To_App(){\n\ttry{\n\tdriver.findElement(clickonOkButton).click();\n\tdriver.findElement(clickOn1stAllowButton).click();\n\tdriver.findElement(clickon2ndAllowButton).click();\n\tdriver.findElement(clickon3rdAllowButton).click();\n\tReusableMethod.waitForPageToLoad(MobileBy.AndroidUIAutomator(\"text(\\\"Let me explore\\\")\"));\n\tdriver.findElement(clickOnLetmeExploreButton).click();\n\tdriver.findElement(clickonOkbutton).click();\n\tlogger.info(\"=====================App Launch sucessfully=====================\");\n\tReusableMethod.implicitWait(10);\n\t\n\t}catch(Exception e){\n\tlogger.error(\"Element Not found Exception ...\",e);\n\t}\n\t\t}",
"@BeforeMethod\n public void setUp() throws MalformedURLException {\n\n if (DRIVER.get() == null) {\n final String localAppiumServerURL = \"http://127.0.0.1:4723/wd/hub\";\n\n DRIVER.set(new AndroidDriver(new URL(localAppiumServerURL), CapabilitiesEmulator.TWITTER_CAPABILITIES()));\n\n WebDriverRunner.setWebDriver(getDriver());\n }\n\n //For google tests \"https://www.google.com\"\n // For twitter tests U should commit 'open' section\n\n// open(\"https://www.google.com\");\n\n// getDriver()\n// .get(\"https://www.google.com\");\n\n// getDriver()\n// .manage()\n// .timeouts()\n// .implicitlyWait(20, TimeUnit.SECONDS);\n }",
"@Before\n public void setUp() throws Exception {\n DesiredCapabilities capabillities = DesiredCapabilities.firefox();\n capabillities.setCapability(\"version\", \"17\");\n capabillities.setCapability(\"platform\", Platform.XP);\n this.driver = new RemoteWebDriver(\n new URL(\"http://mzazam07:ff0ecc19-2836-4fd7-aa99-42752d74aa10@ondemand.saucelabs.com:80/wd/hub\"),\n capabillities);\n }",
"@Before\n public void setUp() throws MalformedURLException {\n dc.setCapability(MobileCapabilityType.UDID, Main.devicesArrayList.get(Integer.parseInt(Thread.currentThread().getName())).getSerialNumber());\n\n if(Main.cloud){\n dc.setCapability(\"accessKey\", Main.accessKey);\n driver = new AndroidDriver<>(new URL(Main.ServerIP), dc);\n }\n else {\n driver = new AndroidDriver<>(new URL(\"http://localhost:4723/wd/hub\"), dc);\n }\n\n driver.setLogLevel(Level.INFO);\n client = new SeeTestClient(driver);\n }",
"protected DesiredCapabilities getCapabilitiesForChrome(ExtentTest currentTest, ExtentReportGenerator extentReportGenerator){ //local physical device support for android still pending\n\t\tDesiredCapabilities desCap = new DesiredCapabilities();\n\t\t//desired caps go here\n\t\treturn desCap;\n\t}",
"private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }",
"public static WindowsDriver<WebElement> createWindowsDriverSession(DesiredCapabilities capabilities) {\n\t\tWindowsDriver<WebElement> appSession = null;\n\t\ttry {\n\t\t\tString WinAppDriverURL = PropertyFileHandler.getPropertyFromConfig(ConfigPropertyKeys.WinAppDriverURL);\n\t\t\tappSession = new WindowsDriver<WebElement>(new URL(WinAppDriverURL), capabilities);\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn appSession;\n\t}",
"public abstract List<AbstractCapability> getCapabilities();",
"private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}"
] | [
"0.74650586",
"0.7463618",
"0.74583596",
"0.74362737",
"0.73840374",
"0.7318255",
"0.72862667",
"0.7278919",
"0.72463197",
"0.7210029",
"0.71914756",
"0.71200377",
"0.71071476",
"0.7091148",
"0.7083055",
"0.6943563",
"0.69361997",
"0.69329536",
"0.6916175",
"0.69115365",
"0.688197",
"0.6880777",
"0.6871606",
"0.6869737",
"0.6860104",
"0.6842948",
"0.6830933",
"0.68132806",
"0.67795825",
"0.67774975",
"0.6734911",
"0.6734822",
"0.67164093",
"0.670886",
"0.6698405",
"0.66728413",
"0.6584763",
"0.65812504",
"0.6571728",
"0.65713644",
"0.6562188",
"0.6551062",
"0.65461165",
"0.6474071",
"0.646509",
"0.64443547",
"0.6429318",
"0.64220846",
"0.6383304",
"0.63694966",
"0.63622564",
"0.6343289",
"0.63181716",
"0.62921673",
"0.6273947",
"0.6265527",
"0.61837494",
"0.6180291",
"0.6167867",
"0.6163544",
"0.6160978",
"0.6139411",
"0.61244893",
"0.6122981",
"0.61212134",
"0.61157656",
"0.61111265",
"0.61095923",
"0.6104076",
"0.6076504",
"0.60263324",
"0.6011456",
"0.59918225",
"0.5979414",
"0.5960898",
"0.5944993",
"0.5942541",
"0.593118",
"0.5882249",
"0.5846826",
"0.5824236",
"0.58094394",
"0.5785549",
"0.5774775",
"0.57497674",
"0.5749711",
"0.5744683",
"0.5726643",
"0.57171494",
"0.57051176",
"0.5697673",
"0.56948256",
"0.56835914",
"0.5680488",
"0.5670942",
"0.5642139",
"0.56365925",
"0.5626269",
"0.56166726",
"0.558404"
] | 0.7839665 | 0 |
void onFileSize(long size); void onFileName(String name); | void onUpgradeInfo(UpgradeEntity upgradeEntity); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void OnFileIncoming(int length);",
"public void OnFileComplete();",
"public void onFileOpened(File file);",
"public void OnFileDataReceived(byte[] data,int read, int length, int downloaded);",
"void onDownloadFileCreated(DownloadFileInfo downloadFileInfo);",
"public void onFileDownloadComplete(String filePath);",
"public interface IProgressListener {\n public void onDownloadSize(int type, int step, int doneFlag, int fileCount, int curFile,\n int total, int cur, int curFileSize, int status);\n}",
"public interface FilePostDownloadHandler {\n void onPostDownload();\n}",
"public interface UploadProgressListener {\r\n /**\r\n * This method updated how much data size uploaded to server\r\n *\r\n * @param num\r\n */\r\n void transferred(long num);\r\n}",
"@Override\n\t\t\t\t\t\t\tpublic void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public void onDownloadSuccess(String fileInfo);",
"@Override\n\t\tpublic void onFileNotFoundException(FileNotFoundException e,\n \t\t\tObject state) {\n \n \t}",
"protected void fireFileChangeEvent(FileChangeListener listener,\n String fileName) {\n \tlog.debug(\"File change event fired for file name \" + fileName);\n listener.fileChanged(fileName);\n }",
"@Override\r\n\t\tpublic void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\r\n\t\t}",
"public void onFileNotFoundException(FileNotFoundException e) {\n\t\t}",
"protected void onProgressUpdate(String fileName, Integer... progress) {\n }",
"@Override\n public void fileChanged(FileChangeEvent fileChangeEvent) throws Exception {\n\n }",
"void onBytesWritten(int bytesWritten);",
"public interface OnFileClickListener {\n\n void onFileClicked(File file);\n\n void onFileLongClicked(File file);\n}",
"@Override\n\t\t\t\t\t\tpublic void onProgress(String url, int downloadedSize, int totalSize)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t}",
"@Override\r\n public void fileSize(String[] arr) {\r\n\tFile f = new File(arr[arr.length - 1]);\r\n\tif (f.exists()) {\r\n\t long size = f.length();\r\n\t setChanged();\r\n\t notifyObservers(\"File \" + arr[arr.length - 1] + \" size is:\" + size);\r\n\t} else {\r\n\t setChanged();\r\n\t notifyObservers(\"Error, please try again\");\r\n\t}\r\n }",
"@Override\n\t\t\t\t\t\tpublic void onProgress(String url, int downloadedSize, int totalSize) {\n\n\t\t\t\t\t\t}",
"public void onFileDownloadComplete(String filePath, Object object);",
"public interface UploadProgressListener {\n void onPre();\n\n void onProgress(long total, long progress);\n\n void onSuccess(HttpResponse response);\n\n void onError(HttpResponse response, IOException e);\n\n void onFinish();\n}",
"public interface DownloadProgressListener\n{\n /**\n * 下载进度监听方法,获取和处理下载点数据的大小\n * @param size\n */\n public void onDownloadSize(int size);\n\n}",
"@Override\n\t\tpublic void onFileTranfering(long sizeTransfered) {//传输中\n\t\t\tDFUManager.log(TAG, \"onFileTransfering(): \" + sizeTransfered);\n\t\t\tmPercentage = (int) ((sizeTransfered * 100) / mDFUManager.getFileSize());\n//\t\t\tupdateProgressBar();\n\t\t\tdfucallback.DFUuploadcallback(DFUCallBack.DFU_DEV_TRANSFER_PRICENTAGE, mPercentage+\"\");\n\t\t}",
"public interface UploadListener {\n void onUploaded(String url);\n }",
"public interface UploadCallback {\n /**\n * send file content callback function, be called only once when the file uploaded\n *\n * @param out output stream for writing file content\n * @return 0 success, return none zero(errno) if fail\n */\n public int send(OutputStream out) throws IOException;\n}",
"protected void fireStarted(String filename, long contentLength) {\n for (UploadListener uploadListener : uploadListeners) {\n uploadListener.fileUploadStart(filename, contentLength);\n }\n }",
"public interface UpDateDownloadListener {\n void start();\n void onProgressChanged(int progress,String downloadUrl);\n void onFinished(long completeSize,String downloadUrl);\n void onFailure();\n}",
"public interface OnDownloadFileChangeListener {\n\n /**\n * an new DownloadFile created\n *\n * @param downloadFileInfo new DownloadFile created\n */\n void onDownloadFileCreated(DownloadFileInfo downloadFileInfo);\n\n /**\n * an DownloadFile updated\n *\n * @param downloadFileInfo DownloadFile updated\n * @param type the update type\n */\n void onDownloadFileUpdated(DownloadFileInfo downloadFileInfo, Type type);\n\n /**\n * an DownloadFile deleted\n *\n * @param downloadFileInfo DownloadFile deleted\n */\n void onDownloadFileDeleted(DownloadFileInfo downloadFileInfo);\n\n /**\n * DownloadFile Update Type\n */\n public static enum Type {\n /**\n * save dir changed\n */\n SAVE_DIR,\n /**\n * save file name changed\n */\n SAVE_FILE_NAME,\n /**\n * other,may be all\n */\n OTHER\n }\n}",
"public interface ProgressListener {\n\n void progress(long bytesRead, long contentLength, boolean done);\n\n}",
"@Override\n\tpublic void onProgress(String name, int statusCode, int totalSize,\n\t\t\tString response) {\n\n\t\tif (mFiles.size() > 0) {\n\t\t\tLog.i(TAG, \"progress content = \" + response);\n\t\t\tshowProgressDialog(\"上传图片\", response, null);\n\t\t}\n\n\t}",
"void onProgress(long bytesTransferred);",
"@Override\n public void onProgress(int bytesWritten , int totalSize)\n {\n }",
"public void onFileFolderOpenFailed(File file);",
"public interface DownloadListener {\n void onStart(String url,String savePath);\n void onProgress(String url, String savePath,long progress,long max);\n void onComplete(String url,String savePath);\n void onCancel(String url,String savePath);\n void onFail(String url,String savePath);\n\n // boolean isCanceled(String url,String savePath);\n String generalFileName(String url);\n long getMax(String url,String savePath);\n long getAvailable(String url,String savePath);\n}",
"public interface OkHttpDownFileCallBackListener {\r\n\r\n public void onError(Call call, Exception e, int errorCode);\r\n public void onResponse(File response, int successCode);\r\n public void inProgress(float progress, long total, int id);\r\n}",
"public void showFileSize(long size);",
"void fileOpened(File file, String consumer);",
"@Override\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype,\n long contentLength) {\n }",
"void whenServeFile(String fileName, HttpServletRequest request);",
"public void downloadCompleted(File f);",
"@Override\n public void onPick(FileInfo f) {\n }",
"interface DownloadDone {\n void onImageLoaded(String path);\n void onError(String message);\n}",
"public interface FileDownloadListener {\n\n\t/**\n\t * Listener for the progress of downloadFile\n\t * @param current current file data offset\n\t * @param total total length of file data\n\t */\n\tpublic void onDownloadProgress(int current, int total);\n\t\n\tpublic boolean cancelDownload();\n}",
"public interface OnDownloadListener {\n /**\n * 下载成功\n */\n void onDownloadSuccess();\n\n /**\n * @param progress\n * 下载进度\n */\n void onDownloading(int progress);\n\n /**\n * 下载失败\n */\n void onDownloadFailed();\n}",
"public interface IFileTransferListener {\n\n /** String that will be used in onComplete if transfer finished without error. */\n public static final String STATUS_PASS = \"pass\";\n /** String that will be used in onComplete if transfer finished due to an error. */\n public static final String STATUS_FAIL = \"fail\";\n\n /**\n * Called when the file has been transferred. Refer to <a\n * href=\"http://developers.box.net/w/page/12923951/ApiFunction_Upload-and-Download\">ApiFunction_Upload-and-Download</a> for details.\n * \n * @param status\n * status string indicating completion status(pass, fail...)\n */\n void onComplete(String status);\n\n /**\n * Called when the file transfer was canceled.\n */\n void onCanceled();\n\n /**\n * Called periodically during the download. You can use this to monitor transfer progress. Refer to <a\n * href=\"http://developers.box.net/w/page/12923951/ApiFunction_Upload-and-Download\">ApiFunction_Upload-and-Download</a> for details.\n * \n * @param bytesTransferred\n * bytes transferred for now\n */\n void onProgress(long bytesTransferred);\n\n /**\n * Called when IOException is thrown.\n * \n * @param e\n * exception\n */\n void onIOException(final IOException e);\n}",
"protected void fireFinished(String filename, long contentLength) {\n for (UploadListener uploadListener : uploadListeners) {\n uploadListener.fileUploaded(filename, contentLength);\n }\n }",
"public interface FileDownloadInterface {\n void onFileDownloadSuccess();\n void onFileDownloadFailed(Exception ex);\n}",
"public interface OnProgressListener {\n void onProgress(int progress);\n}",
"void fileUploaded(String path);",
"public abstract void sizeChanged(SizeChangedEvent event);",
"void fileReceived(IMSession session, String requestId, String fileId, String filePath);",
"public genericHandler(String fileName) \r\n {\r\n this.fileName = fileName;\r\n }",
"public interface OnLoadListener {\n void onSucess(String string);\n}",
"public interface DownloadTaskListener {\n\n void onStart(String taskId, long completeBytes, long totalBytes);\n\n\n void onProgress(String taskId, long currentBytes, long totalBytes);\n\n\n void onPause(String taskId, long currentBytes, long totalBytes);\n\n\n void onFinish(String taskId, File file);\n\n\n void onFailure(String taskId, String error_msg);\n}",
"void onProgress(float progress);",
"void receiveFile(String fileName, int port) throws IOException;",
"public void fileInfo(String info);",
"public interface OnProgressCallback {\n void onProgressCallback(long progress, long total);\n}",
"public void setFileSize(String fileSize) {\n this.fileSize = fileSize;\n }",
"public interface IOCallBack {\n\n void onDataReceived(final byte[] buffer, final int size);\n\n}",
"void onAddAttachments();",
"@Override\n\t\tprotected void onProgressUpdate(String... values) {\n\t\t\tlong total = Long.parseLong(values[0]);\n\t\t\tdialog.setProgress((int) ((total * 100) / lengthOfFile));\n\t\t\tdialog.setMessage((total / (1024 * 1014)) + \"MB/\"\n\t\t\t\t\t+ (lengthOfFile / (1024 * 1024)) + \"MB\");\n\t\t\tsuper.onProgressUpdate(values);\n\t\t}",
"public interface ProgressDelegate {\n\n /**\n * Will be called with number of lines processed so far, every 100 lines\n * @param progress number of lines read so far\n */\n void setProgress(int progress);\n\n /**\n * Will be called once per file with the number of lines processed in that file\n * @param numberLines number of lines in file\n */\n void addFile(int numberLines);\n\n /**\n * Will be called once when all files are loaded\n */\n void done();\n}",
"public void broadcastfile(int size, String file_name, byte[] file){\r\n Server.getUsers().forEach((user) -> {\r\n if(!user.getName().equals(this.name)){\r\n user.sendfile(size, file_name, file);\r\n }\r\n \r\n });\r\n \r\n }",
"public interface ImageUploadListener {\n void onSuccess (String url);\n void onFailed ();\n}",
"@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"void visitFile(StorageUnit unit, long off, long lim);",
"public void onNameChange(String newName) {\n\t\t\n\t}",
"protected void fireError(String filename, long contentLength, String message, UploadErrorType uploadErrorType) {\n for (UploadListener uploadListener : uploadListeners) {\n uploadListener.errorNotify(filename, message, uploadErrorType, contentLength);\n }\n }",
"@Override\n\t\tpublic void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\tLog.d(\"arvi\", \"arvi3333\");\n\t\t}",
"public abstract String getFileName();",
"public void setFilename( String name) {\n\tfilename = name;\n }",
"public interface MessageReceivedListener {\n\t\n\t/**\n\t * Called when new command/message received\n\t * @param msg Command/message as String\n\t */\n\tpublic void OnMessageReceived(String msg);\n\t\n\t/**\n\t * Called when new file is incoming.\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileIncoming(int length);\n\t\n\t/**\n\t * Called when more data of a file has been transfered\n\t * @param data Byte array of data received\n\t * @param read The lenght of the data received as int\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileDataReceived(byte[] data,int read, int length, int downloaded);\n\t\n\t/**\n\t * Called when file transfer is complete\n\t * @param got\n\t * @param expected\n\t */\n\tpublic void OnFileComplete();\n\t\n\t/**\n\t * Called when an error occur\n\t */\n\tpublic void OnConnectionError();\n\t\n\t/**\n\t * Called when socket has connected to the server\n\t */\n\tpublic void OnConnectSuccess();\n}",
"public void onDownloadProgress(int current, int total);",
"public interface ProgressListener {\n void update(String url, long bytesRead, long contentLength, boolean done);\n}",
"public interface ProgressRequestListener {\n void onRequestProgress(int pro, long contentLength, boolean done);\n}",
"public interface FileChangeAction\r\n{\r\n void setTarget(FileWatcher target);\r\n\r\n void changeHandle();\r\n\r\n void afterChange();\r\n}",
"public abstract void onProgress(short percentage, long downloadedSoFar);",
"@Override\n public void onProgress(int progress) {\n Log.i(\"bmob\", \"onProgress :\" + progress);\n uploadListener.onProgress(progress);\n }",
"public interface ProgressListener\n{\n\n public abstract void progressChanged(ProgressEvent progressevent);\n}",
"public void setFilename(String name){\n\t\tfilename = name;\n\t}",
"@Override\n\t\t\tpublic void onSubmit(FormSubmitEvent event) {\n\t\t\t\tontName = fileUpload.getFilename().substring(fileUpload.getFilename().lastIndexOf('\\\\') + 1);\n\n\t\t\t}",
"public void setFileName( String name ) {\n\tfilename = name;\n }",
"public void handleOpenFile (File inFile) {\n openFile (inFile);\n }",
"public interface ProgressListener {\n /**\n * @param current 已经读取的字节数\n * @param total 响应总长度\n * @param done 是否读取完毕\n */\n void onProgress(long current, long total, int progress, boolean done);\n}",
"@Override\n public void onWriteSuccess(String fileName, byte fileType) {\n MsgUtils.sendMsg(handler, fileType);\n }",
"public interface OnBaseProgressListener {\r\n void onDownloading(boolean done, long total, long current);\r\n}",
"@Override\r\n public void onProgress(long bytesUploaded, long totalBytes) {\n long progress = (bytesUploaded/totalBytes*100);\r\n chooseImageText.setText(String.valueOf(progress));\r\n chooseImageText.setOnClickListener(null);\r\n }",
"private void addFileOpenListener() {\n\t\tview.addFileOpenListener(new FileOpenListener());\n\t}",
"@Override\n\t\t\tpublic void onProgress(ProgressMessage msg) {\n\n\t\t\t}",
"public void setFileName(String name)\n\t{\n\t\tfileName = name;\n\t}",
"public void fileUploadListener(FileUploadEvent e) {\n \r\n this.file = e.getFile();\r\n System.out.println(\"Uploaded File Name Is: \" + file.getFileName());\r\n this.anexo.setEndereco(this.uploadFile(file));\r\n Calendar c = Calendar.getInstance();\r\n Date data = c.getTime();\r\n SimpleDateFormat f = new SimpleDateFormat(\"ddMMyyyyHHss\"); \r\n this.anexo.setNome(f.format(data) + file.getFileName() );\r\n this.anexo.setTipo(file.getContentType());\r\n this.anexos.add(anexo);\r\n anexo = new Anexo();\r\n\r\n file = new DefaultUploadedFile();\r\n\r\n // Print out the information of the file\r\n //System.out.println(\"Uploaded File Name Is :: \" + file.getFileName() + \" :: Uploaded File Size :: \" + file.getSize());\r\n }",
"public interface DownloadListener\n{\n void onCancel(boolean isAuto);\n\n void onFailStart(boolean isAuto);\n\n void onFailed(boolean isAuto);\n\n void onProgress(int paramInt,boolean isAuto);\n\n void onStart(boolean isAuto);\n\n void onSuccess(boolean isAuto);\n\n void onWait(boolean isAuto);\n}",
"public String getFileName ();",
"public synchronized void updateFileSize( long passedSize ){\n \n fileSize = passedSize;\n if( fileSize >= 0 && fileByteCounter >= fileSize )\n finishFileTransfer(); \n }",
"void uploadStarted(StreamingStartEvent event);",
"public interface ImageCallback {\n public void onImageFetched(Bitmap bitmap, File imageFile);\n}",
"@Override\n\tpublic void onIOException(IOException arg0) {\n\n\t}"
] | [
"0.7509033",
"0.73961467",
"0.6904223",
"0.6869492",
"0.67415655",
"0.6624818",
"0.66095865",
"0.65721846",
"0.63781315",
"0.63729674",
"0.6360444",
"0.6334533",
"0.63340604",
"0.6318788",
"0.63142604",
"0.62948906",
"0.62788975",
"0.62676466",
"0.6267027",
"0.62360835",
"0.62289906",
"0.61943996",
"0.61605805",
"0.6116977",
"0.61082226",
"0.61076677",
"0.6085365",
"0.6080302",
"0.6076028",
"0.6069017",
"0.6060876",
"0.60543215",
"0.60475636",
"0.6046223",
"0.60399085",
"0.6013003",
"0.6006169",
"0.5964315",
"0.59616935",
"0.59270847",
"0.59080464",
"0.5889911",
"0.58800226",
"0.5857146",
"0.58438504",
"0.58378613",
"0.583552",
"0.58271325",
"0.5820685",
"0.58201945",
"0.57729864",
"0.57573324",
"0.57445025",
"0.5742257",
"0.57377815",
"0.5734233",
"0.5727169",
"0.5710405",
"0.5708599",
"0.57013816",
"0.5698644",
"0.56912017",
"0.5680761",
"0.5668088",
"0.56634253",
"0.56604636",
"0.5654565",
"0.56251496",
"0.56233233",
"0.5618167",
"0.5617713",
"0.56133527",
"0.5606212",
"0.5606039",
"0.56020576",
"0.55995214",
"0.5590635",
"0.5590386",
"0.5579635",
"0.5572321",
"0.5562344",
"0.5556199",
"0.5554163",
"0.5547666",
"0.554463",
"0.5535922",
"0.5534573",
"0.5533528",
"0.5525003",
"0.5515459",
"0.5499311",
"0.5496676",
"0.5494738",
"0.54934233",
"0.54905576",
"0.54833585",
"0.5478797",
"0.5477349",
"0.54704905",
"0.5470399",
"0.5469267"
] | 0.0 | -1 |
Constructor Crates a new FormPropertyEditor | FormPropertyEditor(RADComponent radComponent, Class propertyType, RADComponent.RADProperty radProperty) {
source = this;
this.radComponent = radComponent;
this.radProperty = radProperty;
this.propertyType = propertyType;
modifiedEditor = radProperty.getCurrentEditor ();
if (modifiedEditor instanceof FormAwareEditor) {
((FormAwareEditor)modifiedEditor).setRADComponent (radComponent, radProperty);
}
if (modifiedEditor instanceof org.openide.explorer.propertysheet.editors.NodePropertyEditor) {
((org.openide.explorer.propertysheet.editors.NodePropertyEditor)modifiedEditor).attach (new org.openide.nodes.Node[] { radComponent.getNodeReference () });
}
modifiedEditor.addPropertyChangeListener (this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ConfmlEditor() {\r\n\t\tsuper();\r\n\t\tinitializeEditingDomain();\r\n\t}",
"public FormFieldComponentCellEditor() {\n this(new StringFormField());\n }",
"@Override\r\n\tpublic CellEditor createPropertyEditor(Composite parent) {\n\t\tMenuCellEditor editor = new MenuCellEditor(parent);\r\n\t\teditor.setListenerModel(flistenermodel);\r\n if (getValidator() != null) {\r\n\t\t\teditor.setValidator(getValidator());\r\n\t\t}\t\t\r\n\t\t return editor;\r\n\t}",
"public EditorPropertyDisplayer(Property p) {\n this(p, null);\n }",
"public StringEditor() {\n\t\tsuper();\n\t\tmEditor = new JTextField();\n\t\t\n\t}",
"public UsuarioEditor() {\n initComponents();\n setLocationRelativeTo(null);\n// control = new PaisControlEditor();\n// control.registrarVentana(this);\n\n }",
"public java.awt.Component getCustomEditor() {\n return new FormCustomEditor (this);\n }",
"private ValidatorForm(){}",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"public ScriptEditor() { \n }",
"public ViewProperty() {\n initComponents();\n }",
"public TextField(){\n super();\n }",
"public EntityPropertyBean() {}",
"public Form() {\n initComponents();\n }",
"public EditorTxt() {\n initComponents();\n }",
"public Property() {\n this(0, 0, 0, 0);\n }",
"public Properties(){\n\n }",
"public ACLPropertyDialog() {\n this.setModal(true);\n try {\n jbInit();\n pack();\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"private PolygonEditor()\n {\n this(null, 1.0f);\n }",
"public EditorFactoryImpl() {\n\t\tsuper();\n\t}",
"public ImageEditor() {\r\n initComponents(); \r\n }",
"public Property()\r\n {\r\n }",
"public EditTokenDialog() {\r\n \t\tsuper(\"net/rptools/maptool/client/ui/forms/tokenPropertiesDialog.jfrm\");\r\n \r\n \t\tpanelInit();\r\n \t}",
"public PropertyPageCellEditor(\n \t\tComposite parent,\n \t\tPropertyPagePropertyDescriptor descriptor,\n \t\tint style) {\n \t\tsuper(parent, style);\n \t\tpropertyDescriptor = descriptor;\n \t}",
"public EditProductForm() {\n initComponents();\n }",
"public Property() {}",
"public OSDarkLAFComboBoxEditor()\r\n {\r\n super();\r\n editor.setBorder(OSDarkLAFBorders.getComboEditorBorder());\r\n }",
"public ValidatorInput(String validatorProperty, String contextProperty) {\n super();\n setValidatorProperty(validatorProperty);\n setContextProperty(contextProperty);\n }",
"public SettingsForm() {\n initComponents();\n }",
"public FieldModifierPropertyEditor() {\n super(Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.STATIC |\n Modifier.FINAL | Modifier.TRANSIENT | Modifier.VOLATILE);\n }",
"public MechanicForm() {\n initComponents();\n }",
"public PropertyPageCellEditor(\n \t\tComposite parent,\n \t\tPropertyPagePropertyDescriptor descriptor) {\n \t\tthis(parent, descriptor, SWT.NONE);\n \t}",
"public FormCompra() {\n initComponents();\n }",
"public UserForm(){ }",
"public RecipeForm(){\n\t\tFactory ingredientFactory = new Factory() {\n\t\t\tpublic Object create() {\n\t\t\t\treturn new Ingredient();\n\t\t }\n\t\t};\n\t\tFactory quantityFactory = new Factory(){\n\t\t\tpublic Object create(){\n\t\t\t\treturn new Quantity();\n\t\t\t}\n\t\t};\n\t\t\n\t\tingredientsList = LazyList.decorate(new ArrayList<Ingredient>(), ingredientFactory);\n\t\tquantities = LazyList.decorate(new ArrayList<Quantity>(), quantityFactory);\n\t}",
"public PropertyCustomEditorPanel(Component client, JDialog dialog)\n {\n initComponents();\n\n this.dialog = dialog;\n\n panel_clientArea.add(client, BorderLayout.CENTER);\n }",
"public FormPropertiesImpl(final HeterogMap<String> properties) {\n\t\tif (properties == null) throw new IllegalArgumentException(\"formProperties cannot be null, only empty\");\n\t\tthis.properties = HeterogCollections.unmodifiableMap(properties);\n\t}",
"public form() {\n initComponents();\n }",
"public ProposalSpecialReviewForm() {\r\n }",
"public Ventaform() {\n initComponents();\n }",
"public Form(){ \n\t\tsuper(tag(Form.class)); \n\t}",
"public SampleComponentProperties() {\n // Initialize the GUI\n initComponents();\n \n // Listen for changes to the info text field\n infoTextField.getDocument().addDocumentListener(new InfoTextFieldListener());\n \n }",
"public Property(Property p) {\n\t\tcity=p.getCity();\n\t\towner=p.getOwner();\n\t\tpropertyName=p.getPropertyName();\n\t\trentAmount=p.getRentAmount();\n\t\tplot= new Plot(p.plot);\n\t}",
"public EditCourseForm() {\n initComponents();\n }",
"public PropertyComponent(String label, String initValue, int numLines, boolean needsReload, boolean needsRealign) {\n\t\t\tbReload = needsReload;\n\t\t\tbRealign = needsRealign;\n\t\t\t\n\t\t\tif(numLines == 1) {\n\t\t\t\tnMode = MODE_TEXT;\n\t\t\t\ttheComponent = new JTextField(FIELD_COLUMNS);\n\t\t\t\t((JTextField)theComponent).setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnMode = MODE_MULTI_LINE;\n\t\t\t\ttheComponent = new JTextArea(numLines, FIELD_COLUMNS);\n\t\t\t\t((JTextArea)theComponent).setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\t\t\t((JTextArea)theComponent).setLineWrap(true);\n\t\t\t\t((JTextArea)theComponent).setWrapStyleWord(true);\n\t\t\t\t((JTextArea)theComponent).setMinimumSize(((JTextArea)theComponent).getPreferredSize());\n//\t\t\t\t((JTextArea)theComponent).setMaximumSize(((JTextArea)theComponent).getPreferredSize());\n\t\t\t}\n\t\t\t\n\t\t\ttheLabel = new JLabel(label);\n\t\t\ttheLabel.setBackground(Color.WHITE);\n\t\t\tsetValue(initValue);\n\t\t\tsetLayout();\n\t\t}",
"public RTextField() {\r\n }",
"public JournalPropertyValueFactory(@NamedArg(\"property\") String property) {\n super(property);\n }",
"public KeyFramePropertyViewer()\n {\n initComponents();\n \n this.jScrollPane.getVerticalScrollBar().setBlockIncrement(20);\n this.jScrollPane.getVerticalScrollBar().setUnitIncrement(20);\n //keyFrameEditor = new KeyFrameEditor(new KeyFrame());\n\n this.jointChangeListener = new PropertyChangeListener()\n {\n public void propertyChange(PropertyChangeEvent evt)\n {\n if(evt.getPropertyName().compareTo(\"jointStateChanged\") == 0)\n {\n firePropertyChange(\"jointStateChanged\", null, null);\n }\n }\n };\n\n\n }",
"public CadastroProdutoNew() {\n initComponents();\n }",
"public Editor() {\n initComponents();\n this.setTitle(\"Diario “La Otra Perspectiva”\");\n this.setLocationRelativeTo(null);\n }",
"public GitConfigPanel(EnvironmentConfig gitConfig) {\n this.bean = new EnvironmentConfigBean(gitConfig);\n initComponents();\n validationWorker = createValidationWorker();\n this.bean.addPropertyChangeListener(new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent evt) {\n System.out.print(evt);\n executor.schedule(validationWorker, 2, TimeUnit.SECONDS);\n }\n });\n }",
"public TextFieldExt() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}",
"public AmountTextField() {\n initComponents();\n setFormatterFactory(formatterFactory);\n setInputVerifier(verifier);\n }",
"public Formulario() {\n initComponents();\n }",
"public StorageForm() {\n}",
"public FormEditorHTML(Form1 f) {\n initComponents();\n this.myForm=f;\n }",
"public EditorPanel() {\n encodingModel = new DefaultComboBoxModel(); \n for (String charSet : Charset.availableCharsets().keySet()) {\n encodingModel.addElement(charSet);\n }\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"Property createProperty();",
"public FormPemilihan() {\n initComponents();\n }",
"public PDMRelationshipForm() {\r\n initComponents();\r\n }",
"public CurveEditorPanel(RavenEditor editor)\n {\n this.editor = editor;\n initComponents();\n\n coordToDeviceXform.setToScale(1, -1);\n\n selection.addSelectionListener(this);\n ToolTipManager.sharedInstance().registerComponent(this);\n }",
"public FormCadastroAutomovel() {\n initComponents();\n }",
"public ConfigFormDescriptor(ConfigurationForm configForm)\n {\n this.configForm = configForm;\n\n byte[] icon = null;\n\n try\n {\n icon = configForm.getIcon();\n\n configFormTitle = configForm.getTitle();\n }\n catch (Exception e)\n {\n logger.error(\"Could not load configuration form.\", e);\n }\n\n if(icon != null)\n configFormIcon = new ImageIcon(icon);\n }",
"public Edit() {\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public ProcedureFormPanel() {\n initComponents();\n }",
"public Property() {\n\t\tcity=\"\";\n\t\towner=\"\";\n\t\tpropertyName=\"\";\n\t\trentAmount=0;\n\t\tplot= new Plot(0,0,1,1);\n\t}",
"public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public FormInserir() {\n initComponents();\n }",
"Form getPropertyEditionForm(ProjectEntity entity, String propertyTypeName);",
"private ComponentComposite(Composite parent, int style) {\n\t\tsuper(parent, style);\n\t\tcreateControls();\n\t}",
"public IMRSelectForm() {\n }",
"public SpotPropertyManager() {\r\n\t\tsuper();\r\n\t}",
"public Oddeven() {\n initComponents();\n }",
"public Property(Property prop, int regNum) {\n // this code provided by Dave Houtman [2020] personal communication\n this(prop.getXLength(), prop.getYWidth(), prop.getXLeft(), prop.getYTop(), regNum);\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public AttributeForm() \n {\n initComponents();\n mJerseyNumberUpDown.setModel(new SpinnerNumberModel(0,0,99,1));\n \n m_Parser = new InputParser();\n m_Attributes = new JComboBox[8];\n m_Attributes[0] = m_RSBox;\n m_Attributes[1] = m_RPBox;\n m_Attributes[2] = m_MSBox;\n m_Attributes[3] = m_HPBox;\n m_Attributes[4] = m_PS_BC_PI_KABox;\n m_Attributes[5] = m_PC_REC_QU_KABox;\n m_Attributes[6] = m_ACCBox;\n m_Attributes[7] = m_APBBox;\n\n m_SimAttrs = new JSpinner[4];\n m_SimAttrs[0] = m_Sim1UpDown;\n m_SimAttrs[1] = m_Sim2UpDown;\n m_SimAttrs[2] = m_Sim3UpDown;\n m_SimAttrs[3] = m_Sim4UpDown;\n \n m_DoneInit = true;\n setCurrentState(StateEnum.QB);\n \n }",
"public JCProjectProperties() {\n this(null);\n }",
"public PDocente() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n public SocialLoginServiceEditor(@Nonnull String property, @Nonnull ValueEditor<?> editor,\n @Nonnull Function<Object, String> valueToString, @Nonnull Function<String, Object> stringToValue)\n {\n _property = property;\n _editor = (ValueEditor<Object>) editor;\n _valueToString = valueToString;\n _stringToValue = stringToValue;\n }",
"public InvoiceCreate() {\n initComponents();\n }",
"@Override\n\tpublic SimpleBeanEditorDriver<Product, ?> createEditorDriver() {\n\t\tDriver driver = GWT.create(Driver.class);\n\t\tdriver.initialize(this);\n\n\t\treturn driver;\n\t}",
"public Property(int xLength, int yWidth, int xLeft, int yTop, int regNum) {\n setXLength(xLength);\n setYWidth(yWidth);\n setXLeft(xLeft);\n setYTop(yTop);\n setRegNum(regNum);\n }",
"public ComponentDescriptor() {\r\n\t\t// initialize empty collections\r\n\t\tconstructorParametersTypes = new LinkedList<List<Class<?>>>();\r\n//\t\trequiredProperties = new HashMap<String, MetaProperty>();\r\n//\t\toptionalProperties = new HashMap<String, MetaProperty>();\r\n\t}",
"public MotionNetEditorPanel()\n {\n initComponents();\n this.keyFrameControlMap = new HashMap<KeyFrame, KeyFrameControl>();\n this.transitionControlList = new ArrayList<TransitionControl>();\n this.motionNet = null;\n firstKeyFrameRemoved = false;\n setPasteEnable(false);\n this.setBounds(0, 0, this.getWidth(), this.getHeight());\n this.jointChangeListener = new PropertyChangeListener()\n {\n public void propertyChange(PropertyChangeEvent evt)\n {\n if(evt.getPropertyName().compareTo(\"jointStateChanged\") == 0)\n {\n setPasteEnable(false);\n }\n }\n };\n\n }",
"public UploadForm() {\n initComponents();\n }",
"public PropertyCriteria() {\n\t\tsuper();\n\t}",
"public JTextField() {\n this(null, null, 0);\n }",
"public FormularioP() {\n initComponents();\n }",
"public void createFieldEditors() {\n\t\taddField(\n\t\t\tnew BooleanFieldEditor(\n\t\t\t\tPreferenceConstants.PRETTY_CML,\n\t\t\t\t\"&Pretty print CML\",\n\t\t\t\tgetFieldEditorParent()));\n\t\tbioclipseLogging = new BooleanFieldEditor(\n\t\t\tPreferenceConstants.BIOCLIPSE_LOGGING,\n\t\t\t\"&Use Bioclipse Logging\",\n\t\t\tgetFieldEditorParent());\n\t\taddField(bioclipseLogging);\n\t}",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"public PropertiesView(){\n\n\t\tbtnDescTemplate = new DescTemplateWidget(this);\n\t\tbtnCalculation = new DescTemplateWidget(this);\n\n\t\ttable.setWidget(0, 0, new Label(LocaleText.get(\"text\")));\n\t\ttable.setWidget(1, 0, new Label(LocaleText.get(\"helpText\")));\n\t\ttable.setWidget(2, 0, new Label(LocaleText.get(\"type\")));\n\t\ttable.setWidget(3, 0, new Label(LocaleText.get(\"binding\")));\n\t\ttable.setWidget(4, 0, new Label(LocaleText.get(\"visible\")));\n\t\ttable.setWidget(5, 0, new Label(LocaleText.get(\"enabled\")));\n\t\ttable.setWidget(6, 0, new Label(LocaleText.get(\"locked\")));\n\t\ttable.setWidget(7, 0, new Label(LocaleText.get(\"required\")));\n\t\ttable.setWidget(8, 0, new Label(LocaleText.get(\"defaultValue\")));\n\t\ttable.setWidget(9, 0, new Label(LocaleText.get(\"calculation\")));\n\t\t\n\t\tlblDescTemplate = new Label(LocaleText.get(\"descriptionTemplate\"));\n\t\ttable.setWidget(10, 0, lblDescTemplate);\n\t\ttable.setWidget(11, 0, new Label(LocaleText.get(\"formKey\")));\n\n\t\ttable.setWidget(0, 1, txtText);\n\t\ttable.setWidget(1, 1, txtHelpText);\n\t\ttable.setWidget(2, 1, cbDataType);\n\t\ttable.setWidget(3, 1, txtBinding);\n\t\ttable.setWidget(4, 1, chkVisible);\n\t\ttable.setWidget(5, 1, chkEnabled);\n\t\ttable.setWidget(6, 1, chkLocked);\n\t\ttable.setWidget(7, 1, chkRequired);\n\t\ttable.setWidget(8, 1, txtDefaultValue);\n\n\t\tHorizontalPanel panel = new HorizontalPanel();\n\t\tpanel.add(txtCalculation);\n\t\tpanel.add(btnCalculation);\n\t\tpanel.setCellWidth(btnCalculation, \"20%\");\n\t\tFormUtil.maximizeWidget(txtCalculation);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(9, 1, panel);\n\n\t\tpanel = new HorizontalPanel();\n\t\tpanel.add(txtDescTemplate);\n\t\tpanel.add(btnDescTemplate);\n\t\tpanel.setCellWidth(btnDescTemplate, \"20%\");\n\t\tFormUtil.maximizeWidget(txtDescTemplate);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(10, 1, panel);\n\t\t\n\t\ttable.setWidget(11, 1, txtFormKey);\n\n\t\ttable.setStyleName(\"cw-FlexTable\");\n\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeText\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeNumber\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDecimal\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDate\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDateTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBoolean\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeMultSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeRepeat\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypePicture\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeVideo\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeAudio\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelectDynamic\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeGPS\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBarcode\"));\n\n\t\tFlexCellFormatter cellFormatter = table.getFlexCellFormatter();\n\t\tcellFormatter.setHorizontalAlignment(15, 1, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\ttable.setWidth(\"100%\");\n\t\tcellFormatter.setWidth(0, 0, \"20%\");\n\t\t//cellFormatter.setColSpan(0, 0, 2);\n\t\t\n\t\t//cellFormatter.setWidth(9, 0, \"20\"+PurcConstants.UNITS);\n\t\t//cellFormatter.setWidth(9, 1, \"20\"+PurcConstants.UNITS);\n\n\t\ttxtText.setWidth(\"100%\");\n\t\ttxtHelpText.setWidth(\"100%\");\n\t\ttxtBinding.setWidth(\"100%\");\n\t\ttxtDefaultValue.setWidth(\"100%\");\n\t\tcbDataType.setWidth(\"100%\");\n\t\ttxtFormKey.setWidth(\"100%\");\n\n\t\tVerticalPanel verticalPanel = new VerticalPanel();\n\t\tverticalPanel.setSpacing(5);\n\t\tverticalPanel.add(table);\n\n\t\tDecoratedTabPanel tabs = new DecoratedTabPanel();\n\t\ttabs.add(skipRulesView, LocaleText.get(\"skipLogic\"));\n\t\ttabs.add(validationRulesView, LocaleText.get(\"validationLogic\"));\n\t\ttabs.add(dynamicListsView, LocaleText.get(\"dynamicLists\"));\n\n\t\ttabs.selectTab(0);\n\t\tverticalPanel.add(tabs);\n\t\tFormUtil.maximizeWidget(tabs);\n\n\t\tFormUtil.maximizeWidget(verticalPanel);\n\t\tinitWidget(verticalPanel);\n\n\t\tsetupEventListeners();\n\n\t\tcbDataType.setSelectedIndex(-1);\n\n\t\tenableQuestionOnlyProperties(false);\n\t\ttxtText.setEnabled(false);\n\t\t//txtDescTemplate.setVisible(false);\n\t\t//btnDescTemplate.setVisible(false);\n\t\tenableDescriptionTemplate(false);\n\t\ttxtCalculation.setEnabled(false);\n\t\tbtnCalculation.setEnabled(false);\n\t\ttxtBinding.setEnabled(false);\n\n\t\ttxtText.setTitle(LocaleText.get(\"questionTextDesc\"));\n\t\ttxtHelpText.setTitle(LocaleText.get(\"questionDescDesc\"));\n\t\ttxtBinding.setTitle(LocaleText.get(\"questionIdDesc\"));\n\t\ttxtDefaultValue.setTitle(LocaleText.get(\"defaultValDesc\"));\n\t\tcbDataType.setTitle(LocaleText.get(\"questionTypeDesc\"));\n\n\t\tDOM.sinkEvents(getElement(), Event.ONKEYDOWN | DOM.getEventsSunk(getElement()));\n\t}",
"public C_AdminForm() {\n initComponents();\n }",
"public AuditFunctionForm() {\n initComponents();\n init();\n }",
"public PreferencesPanel() {\n initComponents();\n }",
"public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }",
"public FormFieldComponentCellEditor(FormFieldComponent editorComponent) {\n setEditorComponent(editorComponent);\n }",
"public Designer() {\n initComponents();\n }"
] | [
"0.6482708",
"0.63758427",
"0.61963576",
"0.6071281",
"0.6047404",
"0.59192574",
"0.59001005",
"0.5857209",
"0.5856868",
"0.58559734",
"0.58338016",
"0.58121616",
"0.5808661",
"0.5802838",
"0.58017415",
"0.5800035",
"0.57983464",
"0.57966053",
"0.57965314",
"0.5761663",
"0.5732603",
"0.5731431",
"0.5716716",
"0.5697961",
"0.56612027",
"0.5658487",
"0.56539476",
"0.56497467",
"0.56450677",
"0.56418216",
"0.56021416",
"0.5598521",
"0.5573597",
"0.55599093",
"0.5556565",
"0.55323505",
"0.55291915",
"0.5528181",
"0.552387",
"0.54820514",
"0.5464386",
"0.5461238",
"0.5460416",
"0.54558986",
"0.545412",
"0.5440543",
"0.54255736",
"0.54224014",
"0.5422383",
"0.5413544",
"0.5413043",
"0.54110104",
"0.5409588",
"0.5397521",
"0.53811586",
"0.5380364",
"0.53801817",
"0.53784895",
"0.5372436",
"0.53636473",
"0.53620166",
"0.5360836",
"0.53600466",
"0.53580546",
"0.5357653",
"0.5350236",
"0.5350019",
"0.5349479",
"0.53441614",
"0.53406066",
"0.5339209",
"0.53350955",
"0.5334415",
"0.5330958",
"0.5324885",
"0.5324564",
"0.5316707",
"0.5306138",
"0.53045756",
"0.53022057",
"0.52854",
"0.5280708",
"0.5278259",
"0.5276947",
"0.5274663",
"0.5267231",
"0.52612203",
"0.5255845",
"0.52544034",
"0.5252314",
"0.52503675",
"0.5247954",
"0.5245113",
"0.5244004",
"0.52386427",
"0.52378863",
"0.52353704",
"0.52317417",
"0.5227159",
"0.52266306"
] | 0.6475366 | 1 |
PropertyEditor implementation Set (or change) the object that is to be edited. | public void setValue(Object newValue) {
Object oldValue = value;
value = newValue;
modifiedEditor.setValue (value);
firePropertyChange ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setValue(Object object) {\n\n\t}",
"@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}",
"public abstract void setContentObject(Object object);",
"public void setObject(Object obj) {\n\tObject bean = ((AxBridgeObject)obj).getJavaObject();\n\ttry {\n\t Class cls = bInfo.getBeanDescriptor().getCustomizerClass();\n\t if(cls != null) {\n\t\tcustomizer = (Customizer)cls.newInstance();\n\t\tcomp = (Component)customizer;\n\t\tcustomizer.setObject(bean);\n\t }\n\t \n\t //If no customizer, try property editors\n\t if(comp == null) {\n\t\tPropertyDescriptor[] pds = bInfo.getPropertyDescriptors();\n\t\tfor(int i=0;i<pds.length;i++) {\n\t\t cls = pds[i].getPropertyEditorClass();\n\t\t if(cls != null) {\n\t\t\t//System.out.println(cls.toString() + i);\n\t\t\tpropEditor = (PropertyEditor)cls.newInstance();\n\t\t\tif(propEditor.supportsCustomEditor()) {\n\t\t\t comp = propEditor.getCustomEditor();\n\t\t\t propEditor.setValue(bean);\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t} catch(Throwable e) {\n\t e.printStackTrace();\n\t}\n }",
"public void setEditor(Editor editor) {\n this.currentEditor = editor;\n refreshView();\n }",
"@Override\n public void setObject(Object arg0)\n {\n \n }",
"public void setValue(Object value) {\n\t\tthis.present = isRequired() || value != null;\t\t\n\t\teditorBinder.setBackingObject(value);\n\t\teditorBinder.initEditors();\n\t}",
"public void setEditor(Editor editor)\n {\n this.editor = editor;\n }",
"public void set(E obj) {\r\n throw new UnsupportedOperationException();\r\n }",
"void editProperty(String requestedProperty, Object newValue) {\n properties.editProperty(requestedProperty, newValue); // <-- The replace() method automatically checks for null\n }",
"void setValue(Object object, Object value);",
"public void setObject(T object)\n\t{\n\t\tthis.object = object;\n\t}",
"public void setProperty(String name,Object value);",
"public abstract void setContent(Object o);",
"public abstract void set(M newValue);",
"public void setUserObject(Object o);",
"void setObjectValue(Object dataObject);",
"public void setValue(Object o){\n \tthis.value = o;\n }",
"protected void addEditorPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_editor_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_editor_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__EDITOR,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }",
"@Override\r\n public void setObject(String object) {\n }",
"public void setEditedItem(Object item) {editedItem = item;}",
"public void setEditorValue(Object value) {\r\n\t \tif(value == null)\r\n\t \t{\r\n\t \t this.setText(\"\");\r\n\t \t return;\r\n\t \t}\r\n\t\tthis.setText(value.toString());\r\n\t}",
"@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tvoid setProperty(BoundedShape anObject, Point aNewValue) {\n\t\tRectangle newBounds = new Rectangle (aNewValue.x, aNewValue.y, anObject.getWidth(), anObject.getHeight());\r\n\t\tanObject.setBounds(newBounds);\r\n\t}",
"@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void setObject(TemplateDeDescripcion objeto, int profundidadActual,\n\t\t\tint profundidadDeseada) {\n\n\t}",
"public void setModified();",
"public void setObject(Object aObject) {\r\n\t\tthis.object = aObject;\r\n\t}",
"IViewerBinding setContent(EObject object, EReference reference);",
"public void updateProperty(Inspectable object, InspectableProperty property) {\n\n InspectorInterface inspector = null;\n Enumeration e = inspectors.elements();\n while (e.hasMoreElements()) {\n inspector = (InspectorInterface)e.nextElement();\n if (inspector.getInspectedObject()==object)\n inspector.updateProperty(property);\n }\n\n}",
"@Override\n\tpublic void setActiveObject(UIBean obj) {\n\n\t}",
"public void setValue(Object object, Object value) throws IllegalArgumentException, IllegalAccessException, SecurityException, InvocationTargetException, NoSuchMethodException, InstantiationException{\n\t\tif(this.fielAncestor != null){\n\t\t\tobject = this.fielAncestor.getValueForSetValue(object);\n\t\t}\n\t\tsetValueObject(object, value);\n\t\t\n\t}",
"public void change(GeometricalObject object);",
"public void setObjectAtLocation(Point p, Object o);",
"public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\n }",
"@Override\n\tpublic void setProperty(String propertyName, Object value) {\n\t\t\n\t}",
"public T set(T obj);",
"public void set(XObject object) {\r\n if(object == null)\r\n throw new IllegalArgumentException(\"XObject was null.\");\r\n name = object.getName();\r\n id = object.getId();\r\n parent = object.getParent();\r\n }",
"@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}",
"@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}",
"@Override\n\tpublic void setModel(Object o) {\n\t\t\n\t}",
"void setValue(Object value);",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"@Override\n public void update(Observable o, Object arg) {\n this.currentSelectedEntity = EntityObserver.selected;\n manageComponentVisibility();\n \n if (objectPanel.isVisible()) {\n setType();\n setPosition();\n setEntityDampening();\n setEntityReflection();\n setEntityRotation();\n \n if (colorPanel.isVisible()) {\n manageLights(EntityObserver.selected);\n }\n }\n }",
"@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}",
"protected EditDialog(Shell parentShell, AdapterFactory adapterFactory,\n IItemPropertyDescriptor itemPropertyDescriptor, EObject eObject) {\n super(parentShell);\n this.adapterFactory = adapterFactory;\n this.itemPropertyDescriptor = itemPropertyDescriptor;\n this.eObject = eObject;\n\n }",
"public void setValue(Object value);",
"@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}",
"public void setProperty(String arg0, Object arg1)\n throws UniquePropertyValueConflictException,\n\n EntityPersistenceException {\n\n }",
"public void afterPropertyChange(T obj, String propertyName, Object oldValue, Object newValue);",
"@Override\n\tpublic void propertyChange() {\n\t\tthis.apply();\n\t}",
"public void setOwner(TLPropertyOwner propertyOwner) {\n this.propertyOwner = propertyOwner;\n }",
"@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}",
"public\tvoid setobject(object obj) {\r\n\t\t oop.value=obj.value;\r\n\t\t oop.size=obj.size;\r\n\t\t \r\n\t}",
"public void setItem (Object anObject)\r\n {\r\n // TODO: implement (?)\r\n }",
"public void setObject(@NonNull T object) {\n index = object.getIndex();\n objectReference = new WeakReference<T>(object);\n }",
"IViewerBinding setContent(IObservableValue object, EReference reference);",
"public void setCurrentObject(java.lang.Object syntax) {\n\tif (syntax == null) {\n\t\tgetPnlEditor().setEditable(false);\n\t\tgetPnlEditor().setText(null);\n\t} else {\n\t\tgetPnlEditor().setEditable(true);\n\t\tif(syntax instanceof ConstraintDef){\n\t\t\tConstraintDef constraintDef = (ConstraintDef)syntax;\n\t\t\tgetPnlEditor().setText(ElementUtils.mapNlsString(((ConstraintExpression)constraintDef.getBody()).getSyntax()));\n\t\t}else{\n\t\t\tgetPnlEditor().setText(ElementUtils.mapNlsString(((ch.ehi.basics.types.NlsString)syntax)));\n\t\t}\n\t}\n}",
"public ContentObject setCurrent(\n ContentObject value\n )\n {\n ContentObject replacedObject = objects.set(index,value);\n refresh();\n\n return replacedObject;\n }",
"public void setComboRO(Object newValue);",
"public void setObject(double height) {\n // remove the object from the pane if it's already existed\n removeFromPane(object);\n \n // create object rectangle\n // x coordinate = Xcenter - half of the rectangle's width\n // y coordinate = Y coordinate of the ground line - rectangle's height\n object = new Rectangle(objectWidth, height);\n object.setLayoutX(objectCenterX - objectWidth / 2);\n object.setLayoutY(groundLineY - height);\n\n // Check the comboBox to set the corresponding object\n // fill the appropriate image to the object rectangle\n if (pickPicture.getValue().equals(\"Candle\")) {\n object.setFill(AssetManager.getCandleImage());\n } else if (pickPicture.getValue().equals(\"Can\")) {\n object.setFill(AssetManager.getCanImage());\n } else {\n object.setFill(AssetManager.getPencilImage());\n }\n\n // add the object rectangle to the pane\n addToPane(object);\n\n // update the object height value\n objectHeight = object.getHeight();\n }",
"public void setModelObject(cbit.vcell.parser.SymbolTableEntry modelObject) throws java.beans.PropertyVetoException {\r\n\tcbit.vcell.parser.SymbolTableEntry oldValue = fieldModelObject;\r\n\tfireVetoableChange(\"modelObject\", oldValue, modelObject);\r\n\tfieldModelObject = modelObject;\r\n\tfirePropertyChange(\"modelObject\", oldValue, modelObject);\r\n}",
"@Override\n\tpublic void setObjetivo(String objetivo) {\n\t\tmodel.setObjetivo(objetivo);\n\t}",
"public void propertyChange(PropertyChangeEvent e) {\n super.propertyChange(e);\n String name = e.getPropertyName();\n if (e.getSource() == paramEditor && name.equals(\"edit\")) { //$NON-NLS-1$\n initEditor.getTable().selectOnFocus = false;\n } else if (name.equals(\"angles_in_radians\") && model.trackerPanel != null) { //$NON-NLS-1$\n model.trackerPanel.getTFrame().setAnglesInRadians((Boolean) e.getNewValue());\n }\n }",
"public void setObject(XSerial obj);",
"public void setOwner(RMParentShape anObj) { _owner = anObj; }",
"public void setGuiObject(Object guiObject);",
"public void setObjeto(ObjetoVida o){\r\n\t\tobjeto = o;\r\n\t}",
"public void setObject(Spatial objChange, int index, int parentIndex) {\n toChange[index]=objChange;\n parentIndexes[index]=parentIndex;\n }",
"public void setGameObject(GameObject gameObject)\n {\n this.gameObject = gameObject;\n }",
"@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 updateByObject()\r\n\t{\n\t}",
"void setObject(String id, Object data);",
"public abstract void setValue(Context c, Object v) throws PropertyException;",
"public abstract void setPropertyValue(String propertyName, Object value)\n throws ModelException;",
"public void setValue(Object value) { this.value = value; }",
"public void setObj1 (String value) {\r\n Obj1 = value;\r\n }",
"@Override\r\n\t\t\tpublic void setDelegate(EditorDelegate<TwoDimensionBone> delegate) {\n\t\t\t\t\r\n\t\t\t}",
"public void setInvolvedPerson(InvolvedPerson value) {\r\n\t\tBase.set(this.model, this.getResource(), INVOLVEDPERSON, value);\r\n\t}",
"void setAssociatedObject(IEntityObject relatedObj);",
"@Override\r\n public void commitEdit(Person newValue) {\n newValue = (newValue == null) ? this.model : newValue;\r\n super.commitEdit(newValue); // <-- important\r\n // update the model with values from the text fields\r\n newValue.firstName(firstName.textProperty().get());\r\n newValue.lastName(lastName.textProperty().get());\r\n newValue.phoneNumber(phoneNumber.textProperty().get());\r\n }",
"@Override\n\tpublic void set(T e) {\n\t\t\n\t}",
"public void setValue(final Object value) { _value = value; }",
"@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}",
"public void set(final int index, final Object object) {\n super.set(index, object);\n }",
"public void firePropertyChange(String propertyName, Object oldValue, Object newValue);",
"Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);",
"public synchronized void edit(E object) {\n Node<E> temp = first;\n while (temp.next != null) {\n if (temp.object.equals(object)) {\n temp.object = object;\n }\n temp = temp.next;\n }\n }",
"@Override\r\n\tpublic void update(Object object) {\n\t\t\r\n\t}",
"public void attemptSet(V after)\n\t{\n\t\t// Editable\n\t\tif ( ! this.getProperty().isEditable())\n\t\t{\n\t\t\tmsg(\"<b>The property <h>%s<b> is not editable.\", this.getProperty().getDisplayName());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Inherited / Source / Before\n\t\tEntry<O, V> inherited = this.getInheritedEntry();\n\t\tO source = inherited.getKey();\n\t\tV before = inherited.getValue();\n\t\t\n\t\t// Event\n\t\tEventMassiveCoreEditorEdit<O, V> event = new EventMassiveCoreEditorEdit<>(this, source, before, after);\n\t\tevent.run();\n\t\tif (event.isCancelled()) return;\n\t\tafter = event.getAfter();\n\t\t\n\t\t// NoChange\n\t\t// We check, inform and cancel on equality.\n\t\t// For this to count the source must be the object itself.\n\t\tif (MUtil.equals(this.getObject(), source) && this.getValueType().equals(before, after))\n\t\t{\n\t\t\tmessage(this.attemptSetNochangeMessage());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.attemptSetPerform(after);\n\t}",
"public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }",
"public void set(Object requestor, String field, JComponent comp);",
"@Override\n public void setValue(ELContext context, Object base, Object property,\n Object value) throws NullPointerException, PropertyNotFoundException,\n PropertyNotWritableException, ELException {\n }",
"public void set( Object obj ) throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException( \"set(Object obj) Not implemented.\" );\n\t\t}",
"public void setObjectProperty(Object object, String property, Object propertyValue) throws WBSerializerException\r\n \t{\r\n \t\ttry\r\n \t\t{\r\n \t\t\tPropertyDescriptor pd = new PropertyDescriptor(property, object.getClass());\r\n \t\t\tpd.getWriteMethod().invoke(object, propertyValue);\r\n \t\t} catch (Exception e)\r\n \t\t{\r\n \t\t\tthrow new WBSerializerException(\"Cannot set property for object\", e);\r\n \t\t}\r\n \r\n \t}",
"public void setObject(Object value)\n {\n initialize();\n\n if (_invariant)\n throw createReadOnlyBindingException(this);\n\n try\n {\n if (_accessor != null)\n {\n _evaluator.write(_root, _accessor, value);\n }\n else if (EXPRESSION_EVALUATION_ENABLED && _evaluator.isCompileEnabled() && _accessor == null)\n {\n //_evaluator.compileExpression(_root, _parsedExpression, _expression);\n //_accessor = _parsedExpression.getAccessor();\n\n if (!_writeFailed)\n {\n // re-parse expression as compilation may be possible now that it potentially has a value\n try\n {\n _evaluator.compileExpression(_root, _parsedExpression, _expression);\n _accessor = _parsedExpression.getAccessor();\n }\n catch (Throwable t)\n {\n // ignore re-read failures as they aren't supposed to be happening now anyways\n // and a more user friendly version will be available if someone actually calls\n // getObject\n\n // if writing fails then we're probably screwed...so don't do it again\n if (value != null)\n _writeFailed = true;\n }\n }\n }\n else\n {\n _evaluator.writeCompiled(_root, _parsedExpression, value);\n }\n }\n catch (Throwable ex)\n {\n throw new BindingException(\n Tapestry.format(\n \"ExpressionBinding.unable-to-update-expression\",\n _expression,\n _root,\n value),\n this,\n ex);\n }\n }",
"public void setProperty(Object object, String property, Object newValue) {\n if (object == null) {\n throw new GroovyRuntimeException(\"Cannot set property on null object\");\n }\n else if (object instanceof GroovyObject) {\n GroovyObject pogo = (GroovyObject) object;\n pogo.setProperty(property, newValue);\n }\n else if (object instanceof Map) {\n Map map = (Map) object;\n map.put(property, newValue);\n }\n else {\n metaRegistry.getMetaClass(object.getClass()).setProperty(object, property, newValue);\n }\n }",
"public void setPainter(Painter painter)\n/* */ {\n/* 104 */ Painter old = getPainter();\n/* 105 */ this.painter = painter;\n/* 106 */ firePropertyChange(\"painter\", old, getPainter());\n/* */ }",
"@Override\n public void setChanged() {\n set(getItem());\n }",
"public void setEditor(String value) {\n setAttributeInternal(EDITOR, value);\n }"
] | [
"0.6382352",
"0.63806945",
"0.6252527",
"0.6243054",
"0.6142001",
"0.60533947",
"0.60283715",
"0.6007035",
"0.5949589",
"0.5929781",
"0.59082574",
"0.5882183",
"0.5878962",
"0.5863419",
"0.5830572",
"0.5811354",
"0.57985145",
"0.5789448",
"0.5776096",
"0.577246",
"0.57692015",
"0.5751674",
"0.5750461",
"0.57409024",
"0.5732702",
"0.56836087",
"0.56737316",
"0.56594926",
"0.5658839",
"0.5654854",
"0.56501514",
"0.56260693",
"0.56202507",
"0.56128776",
"0.55861664",
"0.55847067",
"0.5574485",
"0.55608535",
"0.555409",
"0.555409",
"0.5525848",
"0.5513004",
"0.5509873",
"0.5509674",
"0.5505123",
"0.5493986",
"0.54814714",
"0.54793173",
"0.54760647",
"0.54676896",
"0.545787",
"0.54572946",
"0.54512227",
"0.5450191",
"0.5447959",
"0.5433063",
"0.5420461",
"0.5410462",
"0.5400063",
"0.5386724",
"0.53844327",
"0.5380318",
"0.537669",
"0.53762245",
"0.5375998",
"0.5363711",
"0.53579754",
"0.53555393",
"0.53459376",
"0.53451186",
"0.53375936",
"0.5335812",
"0.5330875",
"0.5326666",
"0.5322353",
"0.53215903",
"0.5309613",
"0.53072953",
"0.5297994",
"0.529594",
"0.52920014",
"0.5289086",
"0.52822554",
"0.5279508",
"0.5279066",
"0.5274646",
"0.52717775",
"0.5271085",
"0.5269753",
"0.5262921",
"0.52471334",
"0.5244412",
"0.52441466",
"0.5243521",
"0.5235291",
"0.5234037",
"0.52332747",
"0.5230748",
"0.52188116",
"0.52166426"
] | 0.61791986 | 4 |
Gets the value of the property. | public Object getValue() {
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public Object getValue()\n {\n return getProperty(VALUE_KEY);\n }",
"public String getPropValue() {\n return propValue;\n }",
"public String getValueProperty() {\r\n return getAttributeAsString(\"valueProperty\");\r\n }",
"Property getProperty();",
"Property getProperty();",
"private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }",
"public String get() {\n return this.value;\n }",
"public String getProperty();",
"public String getValue() {\n\t\treturn this.value;\n\t}",
"public String getValue() {\n\t\treturn this.value;\n\t}",
"public String getValue() {\n\t\treturn this.value;\n\t}",
"public String getValue(){\n\t\treturn _value;\n\t}",
"public String getValue(){\n\t\treturn this.value;\n\t}",
"public String getValue() {\n return getMethodValue(\"value\");\n }",
"public String getValue() {\n return this.value;\n }",
"public String getValue() {\n return this.value;\n }",
"public String getValue() {\n return this.value;\n }",
"public String getValue() {\n return this.value;\n }",
"public String getValue() {\n return this.value;\n }",
"public String getValue() {\n return this.value;\n }",
"public String getValue() {\n return this.value;\n }",
"public String getValue() {\n\t\tString value;\n\t\ttry {\n\t\t\tvalue = this.getString(\"value\");\n\t\t} catch (Exception e) {\n\t\t\tvalue = null;\n\t\t}\n\t\treturn value;\n\t}",
"public String getValue()\n {\n return this.value;\n }",
"public String getValue(String key) {\r\n\t\t\treturn prop.getProperty(key);\r\n\t\t}",
"public String get() {\n return value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}",
"public String getValue() {\r\n\t\treturn value;\r\n\t}",
"public String getValue() {\n\t\treturn mValue;\n\t}",
"public String getValue()\r\n\t{\r\n\t\treturn value;\r\n\t}",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String get()\n {\n return val;\n }",
"public String getProperty() {\n Object ref = property_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getProperty() {\n Object ref = property_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n }\n }",
"public String getValue()\n {\n return value;\n }",
"public final Object get() {\n return getValue();\n }",
"public Object getValue() {\n\t\t\treturn value;\n\t\t}",
"public String getValue() {\n\n return this.value;\n\n }",
"public String getValue()\n {\n return value;\n }",
"public Object getValue()\r\n {\r\n return this.value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n\t\t\treturn mValue;\r\n\t\t}",
"public Property getProperty() {\n\t\treturn _property;\n\t}",
"public String getValue()\n {\n return mValue;\n }",
"public Object getValue() {\n\t\treturn value;\n\t}",
"public Object getValue() {\n\t\treturn value;\n\t}",
"public String getValue()\n {\n return value;\n }",
"public String getValue()\n {\n return value;\n }",
"@Override\n public V getValue() {\n return m_value;\n }",
"public java.lang.String getValue() {\n return value;\n }",
"java.lang.String getProperty();",
"public String getValue() {\n return value;\n }",
"@JSProperty\n String getValue();",
"public String getValue() {\n\t\treturn (String) get_Value(\"Value\");\n\t}",
"V getValue() {\n return value;\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn value;\n\t}",
"public Object getValue() {\r\n return value;\r\n }",
"String getProperty();",
"String getProperty();",
"String getProperty();",
"public String getValue () { return value; }",
"@JsProperty String getValue();",
"public String getValue(){\n return this.value;\n }",
"@Override\r\n\tpublic String getValue() {\n\t\treturn value;\r\n\t}",
"public Object getValue() { return this.value; }",
"public String getValue(String key) {\n\t\t\treturn properties.get(key);\n\t\t}",
"public final DoubleProperty valueProperty() {\n return value;\n }",
"@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}",
"<T> T getValue(Property<T> property);",
"public String getValue() { return value; }"
] | [
"0.772247",
"0.7634338",
"0.7582185",
"0.7448367",
"0.7448367",
"0.74450034",
"0.731906",
"0.72381526",
"0.7234488",
"0.7234488",
"0.7234488",
"0.72239953",
"0.7219495",
"0.7181686",
"0.71742934",
"0.71742934",
"0.71742934",
"0.71742934",
"0.71742934",
"0.71742934",
"0.71742934",
"0.717369",
"0.7169636",
"0.71692336",
"0.7167994",
"0.7157449",
"0.7157449",
"0.7157449",
"0.7157449",
"0.7157449",
"0.7154952",
"0.7151172",
"0.7128534",
"0.71237814",
"0.71219593",
"0.71219593",
"0.71219593",
"0.71219593",
"0.71219593",
"0.7115445",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71150684",
"0.71144676",
"0.71124816",
"0.7112318",
"0.71118885",
"0.7110151",
"0.71098983",
"0.7098892",
"0.7095501",
"0.7095382",
"0.70895344",
"0.70874614",
"0.70826244",
"0.70681703",
"0.7065279",
"0.7065279",
"0.7061923",
"0.7061923",
"0.7058504",
"0.70435596",
"0.70432454",
"0.7039724",
"0.70231926",
"0.7006181",
"0.6992161",
"0.69908947",
"0.69902253",
"0.69898516",
"0.69898516",
"0.69898516",
"0.6984433",
"0.6980298",
"0.6973043",
"0.6967137",
"0.69531286",
"0.69440943",
"0.69432026",
"0.6913092",
"0.6906539",
"0.69040775"
] | 0.70188034 | 81 |
Determines whether the class will honor the painValue method. | public boolean isPaintable() {
return modifiedEditor.isPaintable ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isValue() {\n return false;\n }",
"public abstract boolean getEffectiveBooleanValue();",
"public boolean hasValue() { return false; }",
"abstract protected boolean hasCompatValueFlags();",
"@Override\n public final boolean hasSpecialDefenseValueAttribute() {\n return true;\n }",
"public boolean isValue() {\n return value;\n }",
"boolean hasCustomValue();",
"public boolean isKnownValue() {\r\n\t\t\treturn isKnownValue;\r\n\t\t}",
"public boolean isSetValue() {\n return this.value != null;\n }",
"boolean isSetValue();",
"boolean isSetValue();",
"public boolean isValue() {\n switch(this.getType()) {\n case CONSTANT_INTEGER : \n case CONSTANT_FLOAT :\n case CONSTANT_DOUBLE : \n case CONSTANT_LONG : \n case CONSTANT_STRING:\n return true ;\n default :\n return false;\n }\n }",
"boolean shouldReadValue();",
"public boolean isValue() {\n return value;\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public boolean getMustUnderstand();",
"public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }",
"@Override\r\n public boolean isHasDirectValue() {\r\n return this.hasDirectValue;\r\n }",
"boolean isSetValueRatio();",
"boolean isValue();",
"@Override\r\n\tprotected Object getValue(Object element) {\r\n\t\treturn true;\r\n\t}",
"default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}",
"public abstract boolean isAllowCustomProperties();",
"<T> boolean shouldWriteValue(T value);",
"public boolean getValue();",
"@Override\n\tpublic boolean getHasValue() {\n\t\treturn true;\n\t}",
"public boolean setDangerous() {\r\n\t\tif(!isDangerous && isCovered) {\r\n\t\t\tisDangerous=true;\r\n\t\t\t\r\n\t\t\tthis.setChanged();\r\n\t\t\tthis.notifyObservers();\r\n\t\t\tthis.clearChanged();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean getValueIsAdjusting() {\r\n return isAdjusting;\r\n }",
"@SuppressWarnings(\"restriction\")\n\tpublic boolean getNewValue() {\n\t\treturn invokeWithoutInvocationException(boolean.class, \"getNewValue\");\n\t}",
"public boolean getIsPeaceful()\r\n/* 29: */ {\r\n/* 30:49 */ return this.isPeaceful;\r\n/* 31: */ }",
"public boolean getValuePresent() {\r\n return ValuePresent;\r\n }",
"private boolean isVal() {\n\t\treturn look.type == Tag.BOOLEAN || look.type == Tag.NUMBER\n\t\t\t\t|| look.type == Tag.STRING || look.type == Tag.NULL;\n\n\t}",
"boolean getValue();",
"@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}",
"public boolean setPropertyAlive(boolean aValue);",
"boolean isSetValueCodeableConcept();",
"private boolean correctValues() {\n try {\n //TODO: check COM ports\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"@Override\r\n public boolean isSystemProperty() throws Exception\r\n {\n return false;\r\n }",
"@Override\n\tpublic boolean paie() {\n\n\t\treturn true;\n\t}",
"public boolean isProperty();",
"boolean hasHPValue();",
"public Boolean isProhibited() {\n throw new NotImplementedException();\n }",
"public boolean getInternal()\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(INTERNAL$4, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }",
"public boolean isSafety () {\n return this.safety;\n }",
"public boolean effectiveBooleanValue() {\r\n return value.length() > 0;\r\n }",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"@SuppressWarnings(\"restriction\")\n\tpublic boolean getOldValue() {\n\t\treturn invokeWithoutInvocationException(boolean.class, \"getOldValue\");\n\t}",
"boolean hasMPValue();",
"public boolean evaluate() {\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// handle the case when this.getValue() is null\r\n\t\t\tif (this.getValue() == null) {\r\n\t\t\t\t// if the value is null, then we just need to see if expected evaluation is also null\r\n\t\t\t\treturn this.getCurrentEvaluation() == null;\r\n\t\t\t}\r\n\t\t\t// if entities have the same name, they are equals.\r\n\t\t\tif (this.getCurrentEvaluation().getName().equalsIgnoreCase(this.getValue().getName())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}",
"public abstract boolean promulgationDataDefined();",
"public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}",
"public final boolean isSpecialForm ()\r\n {\r\n return _value.isSpecialForm();\r\n }",
"public boolean isValueGet() {\r\n return valueGet;\r\n }",
"public Boolean getMustSupport() { \n\t\treturn getMustSupportElement().getValue();\n\t}",
"@Override\n\tpublic boolean canBeFalsey() {\n\t\treturn false;\n\t}",
"boolean getPossiblyBad();",
"@Override\n\tpublic boolean hasValue(Attribute attribute) {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean checkOverride(IEventInstance eventInstance, Operand operand) {\n\t\treturn false;\n\t}",
"public boolean isNotNullSupportsTipAdjust() {\n return genClient.cacheValueIsNotNull(CacheKey.supportsTipAdjust);\n }",
"@java.lang.Override\n public boolean hasTransformValue() {\n return typeCase_ == 14;\n }",
"public boolean isBusted() {\n\t\tif (hand.checkHandValue() > 21) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public final boolean isForSetted() {\n\t\treturn engine.isPropertySetted(Properties.FOR);\n\t}",
"boolean hasSetProperty();",
"public boolean needsValueField() {\n/* 227 */ for (CEnumConstant cec : this.members) {\n/* 228 */ if (!cec.getName().equals(cec.getLexicalValue()))\n/* 229 */ return true; \n/* */ } \n/* 231 */ return false;\n/* */ }",
"protected void doSetValue(Object _value) {\n\t\tthis.value = (Boolean) _value;\n\t}",
"protected boolean func_70814_o() { return true; }",
"public Boolean getValue() {\n/* 60 */ return Boolean.valueOf(this.val);\n/* */ }",
"@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}",
"protected abstract boolean useReasoner();",
"@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}",
"public boolean getValue() {\n\t\treturn _checked;\n\t}",
"@Test\n\tpublic void testPropertyIntegralType() {\n\t\tfinal Base base = context.mock(Base.class);\n\t\tcontext.checking(new PropertyEnabledExpectations() {\n\t\t\t{\n\t\t\t\tallowingProperty(base).isValid();\n\t\t\t\twill(returnValue(true));\n\t\t\t}\n\t\t});\n\n\t\tassertTrue(\"Initial value was not set\", base.isValid());\n\t\tbase.setValid(false);\n\t\tassertFalse(\"Value didn't change\", base.isValid());\n\t}",
"@java.lang.Override\n public boolean hasBasisValue() {\n return typeCase_ == 13;\n }",
"public Boolean value() {\n return this.value;\n }",
"public Boolean value() {\n return this.value;\n }",
"public Boolean value() {\n return this.value;\n }",
"@java.lang.Override\n public boolean hasVal() {\n return val_ != null;\n }",
"public final boolean isValueLockedSetted() {\n\t\treturn engine.isPropertySetted(Properties.VALUE_LOCKED);\n\t}",
"public abstract Object getDecisionValue();",
"BooleanProperty noValueWarningProperty();",
"public boolean shouldHit() {\r\n\t\tif(getHandVal() < 17) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}",
"protected String getFalse() {\n return \"false\";\n }",
"protected boolean isValueAllowed(T value)\n\t{\n\t\tif(value == null)\n\t\t\treturn false;\n\t\t\n\t\tif(specifics.isEmpty())\n\t\t\treturn true;\n\t\t\n\t\tfor(Class<? extends Object> clazz : specifics)\n\t\t{\n\t\t\tif(clazz.isInstance(value))\n\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean isKnown();",
"public boolean hasValue() {\n return value_ != null;\n }",
"public boolean getValue() {\r\n\t\treturn this.value;\r\n\t}",
"@java.lang.Override\n public boolean hasTransformValue() {\n return typeCase_ == 14;\n }",
"boolean isSimpleValue();"
] | [
"0.64463043",
"0.643357",
"0.63136643",
"0.6254609",
"0.6205128",
"0.6149418",
"0.6123183",
"0.60953814",
"0.6070967",
"0.6066185",
"0.6066185",
"0.6051387",
"0.60432714",
"0.6038153",
"0.60249406",
"0.602031",
"0.6005414",
"0.59206134",
"0.5866604",
"0.58316",
"0.5829981",
"0.5806541",
"0.5745963",
"0.5739141",
"0.57358146",
"0.5734366",
"0.5715765",
"0.57050306",
"0.5696066",
"0.56928617",
"0.56542534",
"0.5644958",
"0.56449515",
"0.56446713",
"0.56418294",
"0.56372625",
"0.5635354",
"0.5633893",
"0.5607145",
"0.56031334",
"0.55856764",
"0.5557235",
"0.5540394",
"0.5536971",
"0.55287164",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.55148965",
"0.5489791",
"0.5461636",
"0.54530376",
"0.54434055",
"0.54388905",
"0.543465",
"0.54311556",
"0.5428984",
"0.54148364",
"0.54016906",
"0.5397454",
"0.5396005",
"0.53952116",
"0.53926593",
"0.53689724",
"0.536529",
"0.5359344",
"0.53543615",
"0.53522867",
"0.534601",
"0.5341543",
"0.53414726",
"0.53400713",
"0.5334765",
"0.5329272",
"0.53289413",
"0.53287995",
"0.53263986",
"0.53263986",
"0.53263986",
"0.5323732",
"0.53225976",
"0.53217995",
"0.531272",
"0.5311815",
"0.5311618",
"0.53095555",
"0.53058887",
"0.530247",
"0.530234",
"0.5301144",
"0.5297545"
] | 0.0 | -1 |
Paint a representation of the value into a given area of screen real estate. Note that the propertyEditor is responsible for doing its own clipping so that it fits into the given rectangle. If the PropertyEditor doesn't honor paint requests (see isPaintable) this method should be a silent noop. | public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
modifiedEditor.paintValue (gfx, box);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void drawRectangle(Rectangle rectangle) {\n implementation.devDrawRectangle(\n (int) rectangle.getMinX(),\n (int) rectangle.getMinY(),\n (int) rectangle.getWidth(),\n (int) rectangle.getHeight(),\n rectangle.getColor()\n );\n }",
"ObjectProperty<Bounds> drawAreaBoundsProperty();",
"private void setRect(org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto value) {\n value.getClass();\n rect_ = value;\n bitField0_ |= 0x00000001;\n }",
"public void paintValue(Graphics pGraphics, Rectangle pBox) {\n\t\n\t}",
"public void drawRectangle(int x, int y, int width, int height, Color color) {\n implementation.devDrawRectangle(x, y, width, height, color);\n }",
"public Builder setRect(\n org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto.Builder builderForValue) {\n copyOnWrite();\n instance.setRect(builderForValue.build());\n return this;\n }",
"void setBounds(Rectangle rectangle);",
"@Override\n public void rect(double x, double y, double width, double height) {\n graphicsEnvironmentImpl.rect(canvas, x, y, width, height);\n }",
"public void drawRect(int x, int y, int width, int height, int color);",
"public void setRectangleClip(int x, int y, float width, float height);",
"public void fillRectangle(RectangleShape rectangle);",
"private void drawRectangle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc2 = myCanvas.getGraphicsContext2D();\r\n gc2.setFill(randomColor());\r\n gc2.fillRect(x - 20, y - 20, 40, 40);\r\n }",
"@Override\n public void fillRoundRectangle(Rectangle rect, int arcWidth, int arcHeight) {\n RoundRectangle2D roundRect = new RoundRectangle2D.Float(rect.x + transX, rect.y + transY, rect.width - 1, rect.height - 1, arcWidth,\n arcHeight);\n\n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));\n getGraphics2D().fill(roundRect);\n }",
"public void drawRect(int x, int y, int width, int height);",
"public GLGraphics fillRect(Rect bounds) {\n\t\treturn fillRect(bounds.x(), bounds.y(), bounds.width(), bounds.height());\n\t}",
"@Override\n\tpublic synchronized Rectangle displayBox() {\n return super.displayBox();\n }",
"public void DasherDrawRectangle(long iLeft, long iMinY, long iRight, long iMaxY, int Color, int iOutlineColour, int iThickness) {\r\n\t\t\r\n\t\ttemp1.init(iLeft, iMinY);\r\n\t\tDasher2Screen(temp1);\r\n\t\t\r\n\t\ttemp2.init(iRight, iMaxY);\r\n\t\tDasher2Screen(temp2);\r\n\t\t\r\n\t\tScreen().DrawRectangle((int)temp1.x, (int)temp1.y, (int)temp2.x, (int)temp2.y, Color, iOutlineColour, iThickness);\r\n\t}",
"@Override\n public void draw(ModernComponent c, Graphics2D g2, IntRect rect, Props props) {\n\n g2.setColor(FILL);\n\n fill(c, g2, rect, props);\n\n g2.setColor(BORDER);\n outline(c, g2, rect, props);\n }",
"public Builder setRect(org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto value) {\n copyOnWrite();\n instance.setRect(value);\n return this;\n }",
"public void fillRectangle(int x, int y, int width, int height);",
"public void fillRect(int x, int y, int width, int height);",
"public void renderFilledRectangle(float x, float y, float width, float height, int color)\n {\n float xStart = x;\n float yStart = y;\n float xEnd = xStart + width;\n float yEnd = yStart + height;\n\n if (xStart < 0) xStart = 0;\n if (yStart < 0) yStart = 0;\n if (xEnd > this.width) xEnd = this.width;\n if (yEnd > this.height) yEnd = this.height;\n if (xStart >= this.width || yStart >= this.height || xEnd < 0 || yEnd < 0) return;\n\n for (int xPos = (int) xStart; xPos < xEnd; xPos++)\n {\n for (int yPos = (int) yStart; yPos < yEnd; yPos++)\n {\n int index = yPos * this.width + xPos;\n if (index < 0 || index > data.length - 1) continue;\n if (((color >> 24) & 0xFF) == 255)\n {\n data[index] = color;\n } else if (((color >> 24) & 0xFF) > 0)\n {\n data[index] = Color.tint(data[index], color);\n }\n }\n }\n }",
"@Override\n public void draw(final Object obj, final Component comp, final Graphics2D g2, final Rectangle rect) {\n Color color = (Color) AbstractDisplay.getProperty(obj, \"color\");\n if (color == null && obj instanceof Color) {\n color = (Color) obj;\n }\n Color textColor = (Color) AbstractDisplay.getProperty(obj, \"textColor\");\n if (textColor == null) {\n textColor = Color.BLACK;\n }\n if (color != null) {\n g2.setPaint(color);\n g2.fill(rect);\n if (color.equals(textColor)) {\n textColor = new Color(255 - textColor.getRed(),\n 255 - textColor.getGreen(), 255 - textColor.getBlue());\n }\n }\n String text = (String) AbstractDisplay.getProperty(obj, \"text\");\n if (text == null && !(obj instanceof Color)) {\n text = \"\" + obj;\n }\n if (text == null) {\n return;\n }\n if (text.length() > DefaultDisplay.MAX_TEXT_LENGTH) {\n text = text.substring(0, DefaultDisplay.MAX_TEXT_LENGTH) + \"...\";\n }\n this.paintCenteredText(g2, text, rect, 0.8, textColor);\n }",
"@java.lang.SuppressWarnings({\"ReferenceEquality\"})\n private void mergeRect(org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto value) {\n value.getClass();\n if (rect_ != null &&\n rect_ != org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto.getDefaultInstance()) {\n rect_ =\n org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto.newBuilder(rect_).mergeFrom(value).buildPartial();\n } else {\n rect_ = value;\n }\n bitField0_ |= 0x00000001;\n }",
"public void drawRectangle(){\n\t height = height + 1;\n\t width = width + 1;\n\t //This loop draws the rectangle.\n\t for(int p = 1; p < height; p++){\n\t\tfor (int q = 1; q < width; q++){\n\t\t System.out.print(appearance);\n\t\t}\n\t\tSystem.out.println(\"\");\n\t }\n\t System.out.println(\"\");\n\n\t}",
"public void invalidate(Rectangle rect) {\n\t\tif (rect != null) {\n\t\t\trect = toInner(rect);\n\t\t\trect = rect.intersection(getBounds()); // do this here or should it be done in WorldMorph?\n\t\t\tchangedArea = changedArea == null ? rect : rect.union(changedArea);\n\t\t} else {\n\t\t\tchangedArea = getBounds();\n\t\t}\n\t}",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"This is rectangle\");\n\t}",
"public void renderFilledRectangle(int x, int y, int width, int height, int color)\n {\n int xStart = x;\n int yStart = y;\n int xEnd = xStart + width;\n int yEnd = yStart + height;\n\n if (xStart < 0) xStart = 0;\n if (yStart < 0) yStart = 0;\n if (xEnd > this.width) xEnd = this.width;\n if (yEnd > this.height) yEnd = this.height;\n if (xStart >= this.width || yStart >= this.height || xEnd < 0 || yEnd < 0) return;\n\n for (int xPos = xStart; xPos < xEnd; xPos++)\n {\n for (int yPos = yStart; yPos < yEnd; yPos++)\n {\n int index = yPos * this.width + xPos;\n if (index < 0 || index > data.length - 1) continue;\n if (((color >> 24) & 0xFF) == 255)\n {\n data[index] = color;\n } else if (((color >> 24) & 0xFF) > 0)\n {\n data[index] = Color.tint(data[index], color);\n }\n }\n }\n }",
"public void drawRect(int offX, int offY, int width, int height, int colour) {\n\tif (offX + width - camX < 0)\r\n\t return;\r\n\tif (offY + height - camY < 0)\r\n\t return;\r\n\tif (offX - camX > pW)\r\n\t return;\r\n\tif (offY - camY > pH)\r\n\t return;\r\n\r\n\tfor (int y = 0; y < height; y++) {\r\n\t setPixel(offX, y + offY, colour);\r\n\t setPixel(offX + width - 1, y + offY, colour);\r\n\t}\r\n\r\n\tfor (int x = 0; x < width; x++) {\r\n\t setPixel(x + offX, offY, colour);\r\n\t setPixel(x + offX, offY + height - 1, colour);\r\n\t}\r\n }",
"@Override\n public void fillRectangle(int x, int y, int width, int height) {\n Rectangle2D rect = new Rectangle2D.Float(x + transX, y + transY, width - 1, height - 1);\n\n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));\n getGraphics2D().fill(rect);\n }",
"public void drawRect(int left, int top, int right, int i, Paint p) {\n\t\t\n\t}",
"@Override\n public void fillRect(double x, double y, double width, double height) {\n graphicsEnvironmentImpl.fillRect(canvas, x, y, width, height);\n }",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Rectangle.draw()\");\n\t}",
"@Override\r\n\tvoid setProperty(BoundedShape anObject, Point aNewValue) {\n\t\tRectangle newBounds = new Rectangle (aNewValue.x, aNewValue.y, anObject.getWidth(), anObject.getHeight());\r\n\t\tanObject.setBounds(newBounds);\r\n\t}",
"void render(Rectangle borders);",
"public void setViewRectangle(Rectangle r) {\n\n\t}",
"private void drawRect(double x0, double y0, double width, double height, int lWidth, Color color){\n \n lWidth = Math.min(lWidth, max_width);\n \n x0 += 0.5 * lWidth;\n y0 += 0.5 * lWidth;\n width -= lWidth;\n height -= lWidth;\n \n x0 /= this.width;\n y0 /= this.height;\n width /= this.width;\n height /= this.height;\n \n x0 -= 0.5;\n y0 -= 0.5;\n \n glLineWidth(lWidth);\n \n glBegin(GL_LINES);\n glEnable(GL_LINE_WIDTH);\n glColor3f(color.getRed(), color.getGreen(), color.getBlue());\n \n //left side\n glVertex3d(x0, y0 + height, 0);\n glVertex3d(x0, y0, 0);\n \n //Right side\n glVertex3d(x0 + width, y0, 0);\n glVertex3d(x0 + width, y0 + height, 0);\n \n x0 -= (double)lWidth / (double)this.width / 2d;\n width += (double)lWidth / (double)this.width;\n \n //bottom\n glVertex3d(x0, y0, 0);\n glVertex3d(x0 + width, y0, 0);\n \n //top\n glVertex3d(x0, y0 + height, 0);\n glVertex3d(x0 + width, y0 + height, 0);\n \n \n glEnd();\n }",
"protected void drawRectangle(Graphics2D g2, final Color c, final double x, final double y, final double width, final double height) {\r\n\r\n g2.setColor(c);\r\n\r\n g2.fillRect(floor(x), floor(y), floor(width), floor(height));\r\n }",
"public void setRectangle(String key, Rectangle value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.x + \" \" + value.y + \" \" + value.width + ' ' + value.height);\n\t\telse\n\t\t\tinternal.remove(key);\n\t}",
"@Override\r\n\tpublic void howToColor() {\r\n\t\tSystem.out.println(\"Color all sides of the rectangle.\");\r\n\t}",
"public void drawRoundRect(int x, int y, int width, int height, int arcWidth,\r\n\t\t\tint arcHeight)\r\n\t{\r\n\t\t// System.out.println(\"drawRoundRect\");\r\n\t}",
"public void drawRect(float x, float y, float width, float height) {\n float x1 = margins.computeX(x), y1 = margins.computeY(y);\n float x2 = margins.computeX(x + width), y2 = margins.computeY(y + height);\n buffer(() -> {\n GL15.glBufferData(GL15.GL_ARRAY_BUFFER, new float[]{\n x1, y1, 0F, 0F,\n x2, y1, 1F, 0F,\n x2, y2, 1F, 1F,\n x1, y2, 0F, 1F\n }, GL15.GL_STREAM_DRAW);\n GL11.glDrawArrays(GL11.GL_QUADS, 0, 4);\n });\n }",
"public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}",
"@Override\r\n public Rect getDisplayedRect()\r\n {\r\n return displayedRect;\r\n }",
"protected abstract void fillRect(final float x, final float y,\n final float width, final float height);",
"@Override\n public void setBounds(Rectangle bounds) {\n final Rectangle repaintBounds = new Rectangle(getBounds());\n\n final Rectangle newBounds = new Rectangle(ajustOnGrid(bounds.x),\n ajustOnGrid(bounds.y), ajustOnGrid(bounds.width), bounds.height);\n\n newBounds.width = newBounds.width < MINIMUM_SIZE.x ? MINIMUM_SIZE.x\n : newBounds.width;\n\n this.bounds = newBounds;\n\n parent.getScene().repaint(repaintBounds);\n parent.getScene().repaint(newBounds);\n\n // Move graphics elements associated with this component\n leftMovableSquare.setBounds(computeLocationResizer(0));\n rightMovableSquare.setBounds(computeLocationResizer(bounds.width));\n\n setChanged();\n notifyObservers();\n }",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Here is the method to draw a Rectangle\");\n\t}",
"public void drawRect(int x, int y, Graphics2D g) {\n rect = new Rectangle2D.Double(x * 10, y * 10, 10, 10);\n g.fillRoundRect(2, 2, x * 10, y * 10, 10, 10);\n g.setColor(Color.orange);\n g.draw(rect);\n }",
"public void setBounds(Rectangle b);",
"public void paintImmediately() {\n apparatusPanel2.paintDirtyRectanglesImmediately();\n }",
"public abstract void clearRect(int x, int y, int width, int height);",
"public void repaint(Rectangle r) {}",
"private void setBounds(RectProto.Builder builderForValue) {\n this.bounds_ = (RectProto) builderForValue.build();\n this.bitField0_ |= 8;\n }",
"@ApiModelProperty(value = \"Rectangle area where searched original text.\")\n public Rectangle getRect() {\n return rect;\n }",
"public void paintComponent(Graphics page)\n {\n super.paintComponent(page);\n\n //set color, then draw a rectangle\n page.setColor(currentColor);\n\n page.drawRect(x1, y1, currentWidth, currentHeight);\n }",
"public void strokeRectangle(int x, int y, int width, int height);",
"public void drawRect(int x, int y, int width, int height, int color){\n hline(x, x + width - 1, y, color);\n hline(x, x + width - 1, y + height - 1, color);\n vline(y, y + height - 1, x, color);\n vline(y, y + height - 1, x + width - 1, color);\n }",
"public void display ( GameObject obj ) {\n Screen tempScreen = Screen.getScreen();\n\n // I could script this! Quickly change the colors\n\n tempScreen.fill(color); //set color\n\n\n tempScreen.noStroke(); //no stroke\n tempScreen.rect(obj.x, obj.y, obj.width, obj.height); //make a rectangle\n }",
"public static void drawRectangle(Canvas c, int x, int y, int w, int h) {\n CanvasTools.drawRectangle(c, x, y, w, h, HTMLColors.RED, HTMLColors.YELLOW);\n }",
"public void paintRectSelectionUnit(Unit unit, Graphics graphics, Camera camera){\r\n\t\tint unitSize = EntityConfiguration.UNIT_SIZE;\r\n\t\tint cavalrySize = EntityConfiguration.CAVALRY_SIZE;\r\n\t\t\r\n\t\tgraphics.setColor(new Color(255,255,255,100));\r\n\t\tif(unit.getId() == EntityConfiguration.CAVALRY) {\r\n\t\t\tgraphics.drawRect(unit.getPosition().getX() - camera.getX(), unit.getPosition().getY() - camera.getY(), cavalrySize, cavalrySize);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgraphics.drawRect(unit.getPosition().getX() - camera.getX(), unit.getPosition().getY() - camera.getY(), unitSize, unitSize);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic Rectangle getRect() {\n\t\treturn null;\r\n\t}",
"public void renderRectangle(int x, int y, float width, float height, int color)\n {\n int xStart = x;\n int yStart = y;\n float xEnd = xStart + width;\n float yEnd = yStart + height;\n if (xStart >= this.width || yStart >= this.height || xEnd < 0 || yEnd < 0) return;\n if (xStart < 0) xStart = 0;\n if (yStart < 0) yStart = 0;\n if (xEnd > this.width) xEnd = this.width;\n if (yEnd > this.height) yEnd = this.height;\n\n for (int xPos = xStart; xPos < xEnd; xPos++)\n {\n for (int yPos = yStart; yPos < yEnd; yPos++)\n {\n int index = yPos * this.width + xPos;\n if (index < 0 || index > data.length - 1) continue;\n if (xPos == xStart || xPos == xEnd - 1 || yPos == yStart || yPos == yEnd - 1)\n {\n if (((color >> 24) & 0xFF) == 255)\n {\n data[index] = color;\n } else if (((color >> 24) & 0xFF) > 0)\n {\n data[index] = Color.tint(data[index], color);\n }\n }\n }\n }\n }",
"public void paint(SelectionRect rectangle, Graphics graphics){\r\n\t\tif(rectangle.isActive()){\r\n\t\t\tgraphics.setColor(Color.green);\r\n\t\t\tgraphics.drawRect(rectangle.getX(), rectangle.getY(), rectangle.getW(), rectangle.getH());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"You are drawing a RECTANGLE\");\n\t}",
"public void draw(Graphics2D g, Dimension area);",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.ORANGE);\n\t\tg.fillRect(x, y, WIDTH, HEIGHT);\n\t}",
"@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 renderRectangle(int x, int y, int width, int height, float scale, int color)\n {\n renderRectangle(x, y, width * scale, height * scale, color);\n }",
"@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tgc.setFill(this.color.getColor());\n\t\tgc.fillRect(MyPoint.point[0], MyPoint.point[1], this.width, this.height);\n\t}",
"protected void damageRect(int x, int y, int width, int height)\r\n\t{\r\n\tif (needsPaint)\r\n\t\t{\r\n\t\tint ax = x + width;\r\n\t\tint ay = y + height;\r\n\t\tint bx = paintX + paintWidth;\r\n\t\tint by = paintY + paintHeight;\r\n\t\tif (paintX < x)\r\n\t\t\tx = paintX;\r\n\t\tif (paintY < y)\r\n\t\t\ty = paintY;\r\n\t\tif (ax > bx)\r\n\t\t\twidth = ax - x;\r\n\t\telse\r\n\t\t\twidth = bx - x;\r\n\t\tif (ay > by)\r\n\t\t\theight = ay - y;\r\n\t\telse\r\n\t\t\theight = by - y;\r\n\t\t}\r\n\tpaintX = x;\r\n\tpaintY = y;\r\n\tpaintWidth = width;\r\n\tpaintHeight = height;\r\n\tneedsPaint = true;\r\n\t}",
"@Override\n public void paintContent(MapPaintArgs args) {\n if (isDragging && end != null && start != null) {\n int xmin = Math.min(end.x, start.x);\n int xmax = Math.max(end.x, start.x);\n int ymin = Math.min(end.y, start.y);\n int ymax = Math.max(end.y, start.y);\n Rectangle rect = new Rectangle(xmin, ymin, xmax - xmin, ymax - ymin);\n args.getGraphics().setColor(Color.BLACK);\n Stroke original = args.getGraphics().getStroke();\n BasicStroke strk = new BasicStroke(2, BasicStroke.CAP_BUTT,\n BasicStroke.JOIN_BEVEL, 1, new float[]{2.0f, 1.0f}, 0);\n args.getGraphics().setStroke(strk);\n args.getGraphics().drawRect(rect.x, rect.y, rect.width, rect.height);\n args.getGraphics().setStroke(original);\n }\n super.paintContent(args);\n }",
"public void display() {\n shadow.display();\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }",
"org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto getRect();",
"public Rectangle() {\n super();\n properties = new HashMap<String, Double>();\n properties.put(\"Width\", null);\n properties.put(\"Length\", null);\n }",
"private void setBounds(RectProto value) {\n if (value != null) {\n this.bounds_ = value;\n this.bitField0_ |= 8;\n return;\n }\n throw new NullPointerException();\n }",
"Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }",
"public Rectangle getInvalidatedRectangle() {\n return rect;\n }",
"public X computeRect(Rectangle visibleRect) {\n component.computeVisibleRect(visibleRect);\n return (X) this;\n }",
"MyRectangle(double height, double width, MyColor color) {\n\t\tsuper(color);\n\t\tthis.height=height;\n\t\tthis.width=width;\n\t}",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Rectangle()\");\n\t}",
"protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}",
"static void testRectangle(Point a, Point b, Point c, Point d){\n Rectangle rect1 = new Rectangle(a,b,c,d);\n System.out.print(\"Perimeter of rectangle=\"+rect1.calculatePerimeter());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", rect1.calculatePerimeter()).equals(\"16.00\"));\n System.out.print(\"Area of rectangle=\"+rect1.calculateArea());\n System.out.printf(\"->%b\\n\", String.format(\"%.2f\", rect1.calculateArea()).equals(\"16.00\"));\n System.out.println(rect1); //prints the return value from rect1.toString()\n }",
"public void drawRect(float x, float y, float width, float height, float u, float v, float texW, float texH) {\n float a = TextureManager.getBound().w, b = TextureManager.getBound().h;\n float u1 = u / a, v1 = v / a;\n float u2 = (u + texW) / a, v2 = (v + texH) / b;\n float x1 = margins.computeX(x), y1 = margins.computeY(y);\n float x2 = margins.computeX(x + width), y2 = margins.computeY(y + height);\n buffer(() -> {\n GL15.glBufferData(GL15.GL_ARRAY_BUFFER, new float[]{\n x2, y1, u2, v1,\n x1, y1, u1, v1,\n x2, y2, u2, v2,\n x1, y2, u1, v2\n }, GL15.GL_STREAM_DRAW);\n GL11.glDrawArrays(GL11.GL_QUADS, 0, 4);\n });\n }",
"public void mouseDragged(MouseEvent e) {\r\n Graphics g = view.getViewJComponent().getGraphics();\r\n rectangle.setSize(Math.abs(e.getX() - rectangle.x),\r\n Math.abs(e.getY() - rectangle.y));\r\n view.getViewJComponent().repaint();\r\n g.drawRect(rectangle.x, rectangle.y, rectangle.width,\r\n rectangle.height);\r\n }",
"@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.red);\n\t\t\tg.fillRoundRect(30, 30, 240, 140, 30, 30);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.setFont(new Font(\"Monospaced\", Font.BOLD, 48));\n\t\t\tg.drawString(\"Hallo! Was wenn ich mehr Text habe?\", 65, 110);\n\t\t}",
"public static void drawRectangle(double width, double height) {\n gl.glPushMatrix();\n gl.glScaled(width, height, 1);\n gl.glBegin(GL.GL_TRIANGLE_FAN);\n gl.glVertex3d(-0.5, -0.5, 0);\n gl.glVertex3d(0.5, -0.5, 0);\n gl.glVertex3d(0.5, 0.5, 0);\n gl.glVertex3d(-0.5, 0.5, 0);\n gl.glEnd();\n gl.glPopMatrix();\n }",
"public void createRectangle(double x, double y, double width, double height) {\r\n GRect rectangle = new GRect(x, y, width, height);\r\n rectangle.setFilled(true);\r\n rectangle.setFillColor(Color.GRAY);\r\n rectangle.setColor(Color.WHITE);\r\n add(rectangle);\r\n }",
"public void strokeRectangle(RectangleShape rectangle);",
"void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}",
"public CustomRectangle() { }",
"public GLGraphics drawRect(float x, float y, float w, float h) {\n\t\treturn renderRect(false, x, y, w, h);\n\t}",
"public void drawRoundedRect(int x, int y, int width, int height, int roundSize, Color color) {\n implementation.devDrawRoundedRect(x, y, width, height, roundSize, roundSize, color);\n }",
"@Override\r\n public void repaint(final Rectangle r) {\r\n }",
"public void fillRoundRectangle(RectangleShape rectangle, int radius);",
"protected synchronized void damage(Rectangle r) {\n if(!overwriteMode){\n super.damage(r);\n }\n else {\n if (r == null)\n return;\n\n //Give values to x, y, width, height (inherited from java.awt.Rectangle)\n x = r.x;\n y = r.y;\n height = r.height;\n\n //May be set by paint (better value), set here if not\n if (width <= 0)\n width = getComponent().getWidth();\n\n //Calls getComponent().repaint(x, y, width, height)\n repaint();\n }\n }",
"@Override\r\n public String toString() {\r\n return \"Rectangle length: \" + length + \", Rectangle width: \" + width + \", Rectangle color: \" + super.toString();\r\n }",
"public GLGraphics fillRect(float x, float y, float w, float h) {\n\t\treturn renderRect(true, x, y, w, h);\n\t}",
"@Override\n public void drawScreen(int n, int n2) {\n void mouseY;\n void mouseX;\n super.drawScreen((int)mouseX, (int)mouseY);\n float[] hsb = Color.RGBtoHSB(this.setting.getValue().getRed(), this.setting.getValue().getGreen(), this.setting.getValue().getBlue(), null);\n Color color = Color.getHSBColor(hsb[0], Float.intBitsToFloat(Float.floatToIntBits(6.4887953f) ^ 0x7F4FA436), Float.intBitsToFloat(Float.floatToIntBits(4.629535f) ^ 0x7F142527));\n Gui.drawRect((int)this.getX(), (int)this.getY(), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 14), (int)new Color(40, 40, 40).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 2), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 12), (int)this.setting.getValue().getRGB());\n RenderUtils.drawOutline(this.getX() + this.getWidth() - 12, this.getY() + 2, this.getX() + this.getWidth() - 2, this.getY() + 12, Float.intBitsToFloat(Float.floatToIntBits(2.7144578f) ^ 0x7F2DB9AD), new Color(20, 20, 20).getRGB());\n if (this.open) {\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 14), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 28), (int)new Color(40, 40, 40).getRGB());\n float i = Float.intBitsToFloat(Float.floatToIntBits(1.3378998E38f) ^ 0x7EC94E07);\n while (i + Float.intBitsToFloat(Float.floatToIntBits(13.8331995f) ^ 0x7EDD54C9) < Float.intBitsToFloat(Float.floatToIntBits(0.07128618f) ^ 0x7F51FE7D)) {\n RenderUtils.drawRecta((float)(this.getX() + 2) + i, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(7.249331f) ^ 0x7F67FA85), Float.intBitsToFloat(Float.floatToIntBits(1.7045807f) ^ 0x7EEA2FB3), Color.getHSBColor(i / Float.intBitsToFloat(Float.floatToIntBits(0.115068644f) ^ 0x7F2BA91C), Float.intBitsToFloat(Float.floatToIntBits(4.3161592f) ^ 0x7F0A1DFA), Float.intBitsToFloat(Float.floatToIntBits(21.075346f) ^ 0x7E289A4F)).getRGB());\n i += Float.intBitsToFloat(Float.floatToIntBits(3.807338f) ^ 0x7E95CD0B);\n }\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 16, this.getX() + 2 + this.getWidth() - 4, this.getY() + 27, Float.intBitsToFloat(Float.floatToIntBits(2.7503529f) ^ 0x7F3005C8), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.hueWidth, this.getY() + 16, Float.intBitsToFloat(Float.floatToIntBits(5.200255f) ^ 0x7F26687D), Float.intBitsToFloat(Float.floatToIntBits(1.2665411f) ^ 0x7E921E05), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 28), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 42), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 29, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.19645536f) ^ 0x7F792B98), new Color(255, 255, 255), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 29, this.getX() + 2 + this.getWidth() - 4, this.getY() + 40, Float.intBitsToFloat(Float.floatToIntBits(103.69628f) ^ 0x7DCF647F), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.satWidth, this.getY() + 29, Float.intBitsToFloat(Float.floatToIntBits(7.3489017f) ^ 0x7F6B2A34), Float.intBitsToFloat(Float.floatToIntBits(0.1948352f) ^ 0x7F7782E1), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 42), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 56), (int)new Color(40, 40, 40).getRGB());\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 42, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(1.5246161f) ^ 0x7EF3269F), new Color(0, 0, 0), color, 255, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 42, this.getX() + 2 + this.getWidth() - 4, this.getY() + 53, Float.intBitsToFloat(Float.floatToIntBits(3.7803736f) ^ 0x7F71F1A4), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.briWidth, this.getY() + 42, Float.intBitsToFloat(Float.floatToIntBits(8.346171f) ^ 0x7E8589EB), Float.intBitsToFloat(Float.floatToIntBits(0.08925866f) ^ 0x7C86CD3F), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 56), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 70), (int)new Color(40, 40, 40).getRGB());\n this.renderAlphaBG(this.getX() + 2, this.getY() + 55, this.alphaBG);\n RenderUtils.drawSidewaysGradient(this.getX() + 2, this.getY() + 55, this.getWidth() - 4, Float.intBitsToFloat(Float.floatToIntBits(0.13166903f) ^ 0x7F36D43F), new Color(0, 0, 0), color, 0, 255);\n RenderUtils.drawOutline(this.getX() + 2, this.getY() + 55, this.getX() + 2 + this.getWidth() - 4, this.getY() + 66, Float.intBitsToFloat(Float.floatToIntBits(19.69502f) ^ 0x7E9D8F67), new Color(0, 0, 0).getRGB());\n RenderUtils.drawRecta((float)(this.getX() + 2) + this.alphaWidth, this.getY() + 55, Float.intBitsToFloat(Float.floatToIntBits(6.702013f) ^ 0x7F5676E4), Float.intBitsToFloat(Float.floatToIntBits(0.13652846f) ^ 0x7F3BCE1E), new Color(255, 255, 255).getRGB());\n Gui.drawRect((int)this.getX(), (int)(this.getY() + 70), (int)(this.getX() + this.getWidth()), (int)(this.getY() + 84), (int)new Color(40, 40, 40).getRGB());\n Europa.FONT_MANAGER.drawString(\"Rainbow\", this.getX() + 3, (float)(this.getY() + 78) - Europa.FONT_MANAGER.getHeight() / Float.intBitsToFloat(Float.floatToIntBits(0.8730777f) ^ 0x7F5F8205), Color.WHITE);\n Gui.drawRect((int)(this.getX() + this.getWidth() - 12), (int)(this.getY() + 72), (int)(this.getX() + this.getWidth() - 2), (int)(this.getY() + 82), (int)new Color(30, 30, 30).getRGB());\n if (this.setting.getRainbow().booleanValue()) {\n RenderUtils.prepareGL();\n GL11.glShadeModel((int)7425);\n GL11.glEnable((int)2848);\n GL11.glLineWidth((float)Float.intBitsToFloat(Float.floatToIntBits(0.2713932f) ^ 0x7EAAF40D));\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015137452f) ^ 0x7F070313)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(1.1948546f) ^ 0x7CE7F0FF)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.36357376f) ^ 0x7DC52657)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.015521388f) ^ 0x7F014D6B)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.01025841f) ^ 0x7F5712E4)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.10675689f) ^ 0x7EA5A35B)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8 + 4), (double)(this.getY() + 74));\n GL11.glEnd();\n GL11.glBegin((int)1);\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.009417259f) ^ 0x7F654AD9)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.07014828f) ^ 0x7EF0A9E7)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.013465701f) ^ 0x7F239F3E)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 8), (double)(this.getY() + 80));\n GL11.glColor3f((float)((float)ModuleColor.getActualColor().getRed() / Float.intBitsToFloat(Float.floatToIntBits(0.0155056f) ^ 0x7F010B33)), (float)((float)ModuleColor.getActualColor().getGreen() / Float.intBitsToFloat(Float.floatToIntBits(0.011914493f) ^ 0x7F3C3501)), (float)((float)ModuleColor.getActualColor().getBlue() / Float.intBitsToFloat(Float.floatToIntBits(0.012230922f) ^ 0x7F376434)));\n GL11.glVertex2d((double)(this.getX() + this.getWidth() - 10), (double)(this.getY() + 77));\n GL11.glEnd();\n RenderUtils.releaseGL();\n }\n }\n Gui.drawRect((int)(this.getX() - 1), (int)this.getY(), (int)this.getX(), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Gui.drawRect((int)(this.getX() + this.getWidth()), (int)this.getY(), (int)(this.getX() + this.getWidth() + 1), (int)(this.getY() + 84), (int)new Color(30, 30, 30).getRGB());\n Europa.FONT_MANAGER.drawString(this.setting.getName(), this.getX() + 3, this.getY() + 3, Color.WHITE);\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.gray);\n\t\tg.fillRect(min.x, min.y, max.x - min.x, max.y - min.y);\n\t\tg.setColor(Color.BLACK);\n\t}",
"private Rectangle(Point position, Map<String, Double> properties, Color color, Color fillColor) {\n super(position, color, fillColor);\n this.properties = properties;\n }"
] | [
"0.63671124",
"0.6332377",
"0.6218922",
"0.61300117",
"0.5978783",
"0.59151787",
"0.5910737",
"0.5847768",
"0.5844585",
"0.57099885",
"0.57033503",
"0.56466717",
"0.56455654",
"0.5637555",
"0.563043",
"0.56214225",
"0.56145537",
"0.55930066",
"0.55186194",
"0.54906183",
"0.5453966",
"0.54463786",
"0.5445946",
"0.54382133",
"0.5435544",
"0.5433608",
"0.5430624",
"0.54279923",
"0.5419847",
"0.54154164",
"0.540589",
"0.5405435",
"0.5401698",
"0.53998786",
"0.53952414",
"0.5380233",
"0.53727424",
"0.5371965",
"0.5367382",
"0.53555095",
"0.5352405",
"0.5350527",
"0.53422534",
"0.5340988",
"0.5339224",
"0.53204286",
"0.53186285",
"0.53055537",
"0.53045034",
"0.529987",
"0.52932805",
"0.52869207",
"0.52868307",
"0.5282885",
"0.52781653",
"0.525983",
"0.52531356",
"0.5240129",
"0.5233545",
"0.5230192",
"0.5227872",
"0.5226712",
"0.52257276",
"0.52087617",
"0.5199773",
"0.5192282",
"0.51880103",
"0.5176028",
"0.51628286",
"0.516185",
"0.51536757",
"0.51527095",
"0.51509446",
"0.5145367",
"0.51405764",
"0.5136205",
"0.51326656",
"0.51321954",
"0.5128957",
"0.51277393",
"0.51197654",
"0.5110146",
"0.5108306",
"0.5107491",
"0.51055133",
"0.5101613",
"0.5097969",
"0.5095716",
"0.5092149",
"0.5083077",
"0.5082156",
"0.5079974",
"0.5076612",
"0.5075413",
"0.5072478",
"0.5065247",
"0.50628525",
"0.50600237",
"0.5054239",
"0.505355"
] | 0.6088108 | 4 |
This method is intended for use when generating Java code to set the value of the property. It should return a fragment of Java code that can be used to initialize a variable with the current property value. Example results are "2", "new Color(127,127,34)", "Color.orange", etc. | public String getJavaInitializationString() {
return modifiedEditor.getJavaInitializationString ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String convertToJavascript() {\n\t\tString str = \"new Property('\" + propType.getSSID() + \"', '\" + displayName + \"', '\" + mode.toString() + \"', '\"\n\t\t\t\t+ value.toString() + \"')\";\n\t\treturn str;\n\t}",
"public LiteralExpression (String str){\n _value = str;\n }",
"public String build() {\n StringBuilder sb = new StringBuilder();\n\n appendColor(sb);\n sb.append(flagSymbol);\n appendIndentation(sb);\n appendProperty(sb);\n appendValue(sb);\n appendDefaultColor(sb);\n\n return sb.toString();\n }",
"public void testCreateValue() {\n System.out.println(\"createValue\"); // NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n String value = \"Test value\";// NOI18N\n PropertyValue result = PropertyValue.createValue(new PrimitiveDescriptorSupport().getDescriptorForTypeIDString(TypesSupport.TYPEID_JAVA_LANG_STRING.getString()), type, value);\n assertEquals(PropertyValue.Kind.VALUE,result.getKind());\n assertEquals(type,result.getType());\n assertEquals(value,result.getValue());\n }",
"@Override\n public String generate() {\n var variableType = this.variable.getType();\n var variableSymbol = this.variable.getSymbol();\n var variableLLVMType = JavaTypeToLLVMType.getLLVMType(variableType);\n return \"\\t%\" + variableSymbol + \" = alloca \" + variableLLVMType + \"\\n\";\n }",
"PropertyCallExp createPropertyCallExp();",
"public Object computeValue() throws SyntaxException {\n List<String> strings = getStrings();\n return parameter.parse(strings);\n }",
"public String toCodeString() {\n return String.format(\"%s = %s;\\n\", this.identifier.toString(), this.exp.toCodeString());\n }",
"public String toAsmCode(){\n\t\tif(value<0) //for drive label with value<0, we add _n if value is <0\n\t\t\treturn \".FloatLiteral_n\"+ getStringValue().substring(1,getStringValue().length());\n\t\telse\n\t\t\treturn \".FloatLiteral_\"+ getStringValue();\n\t}",
"public String getJavaInitializationString() {\n\t\tchar quote = '\"';\n\t\tString str = \"new String\";\n\t\treturn str;\n\t}",
"private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}",
"private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}",
"VariableDeclarationWithInitCS getResultVariable();",
"Property createProperty();",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"java.lang.String getVarValue();",
"@Override\n public String toString() {\n\t\treturn literal;\n\t}",
"public native final Value property(final String name)/*-{\n\t\treturn {\n\t\t\tdatum : this.property(name)\n\t\t};\n\t}-*/;",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"public Variable(){\n name = \"\";\n initialValue = 0;\n }",
"public String toString () {\n return \"(set \" + varName + \" \" + expr + \")\";\n }",
"@Override\r\n public String toString() {\r\n return literal;\r\n }",
"java.lang.String getProperty();",
"@Override\n public String toString() {\n return literal;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }",
"String setValue();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }",
"@Test\n public void testPseudoVariable() {\n String html = source.toHTML(new SEclipseStyle(), new SPseudoVariable());\n assertEquals(html, \"<pre style='color:#000000\"\n + \";background:#ffffff;'>\"\n + \"public class MainClass {\\n\"\n + \" \\n\"\n + \" public static void main(String args[]){\\n\"\n + \" GradeBook myGradeBook=new GradeBook();\\n\"\n + \" String courseName=\\\"Java \\\";\\n\"\n + \" myGradeBook.displayMessage(courseName);\\n\"\n + \" \\n\"\n + \" }\\n\"\n + \" }public class Foo {\\n\"\n + \" \\n\"\n + \" public boolean bar(){\\n\"\n + \" <span style='color:#7f0055;\"\n + \" font-weight:bold; '>\"\n + \"super</span>.foo();\\n\"\n + \" return false;\\n\"\n + \" \\n\"\n + \" }\\n\"\n + \" }</pre>\");\n }",
"public String getValue() {\n/* 99 */ return this.value;\n/* */ }",
"protected Value() {\n flags = 0;\n num = null;\n str = null;\n object_labels = getters = setters = null;\n excluded_strings = included_strings = null;\n functionPartitions = null;\n functionTypeSignatures = null;\n var = null;\n hashcode = 0;\n }",
"private ProgrammingLanguage(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }",
"public String toCode()\n {\n return \"TermConstant.getConstant(\" + index + \")\";\n }",
"public Constant createProperty(Expression exp) {\r\n\t\tif (exp.isConstant()){\r\n\t\t\t// no regexp, std property\r\n\t\t\treturn (Constant) exp;\r\n\t\t}\r\n\t\tConstant cst = createConstant(RootPropertyQN);\r\n\t\tcst.setExpression(exp);\r\n\t\treturn cst;\r\n\t}",
"public String toString() {\n\t\treturn String.format(\"%s = %d\",name,value);\n\t}",
"private PropertyEvaluator createEvaluator() {\n return helper.getStandardPropertyEvaluator();\n }",
"public String nextPropertyValue()\n {\n if (empty())\n return null;\n int start = position;\n int lastValidPos = position;\n\n int ch = input.charAt(position);\n while (ch != -1 && ch != ';' && ch != '}' && ch != '!' && !isEOL(ch)) {\n if (!isWhitespace(ch)) // don't include an spaces at the end\n lastValidPos = position + 1;\n ch = advanceChar();\n }\n if (position > start)\n return input.substring(start, lastValidPos);\n position = start;\n return null;\n }",
"JavaEvaluator createJavaEvaluator();",
"public void setCode(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CODE_PROP.get(), value);\n }",
"public String value() {\n return formattedCode;\n }",
"public void setValue (Context c, Object v) throws PropertyException\n {\n throw new PropertyException(\"Cannot set the value of a function: \" + _vname);\n }",
"@Transient\n @JsonIgnore\n public String getValueWithVariableValues() {\n return insertVariableValues(value);\n }",
"public ConstantProduct() {\n constProperty = \"constant\";\n constProperty2 = \"constant2\";\n }",
"public String getValueConcatenator() {\n\t\treturn \":\";\n\t}",
"private Value() {\n\t}",
"public Expression inlineValue(Environment env, Context ctx) {\n if (type == Type.tString && isConstant()) {\n StringBuffer buffer = inlineValueSB(env, ctx, new StringBuffer());\n if (buffer != null) {\n // We were able to evaluate the String concatenation.\n return new StringExpression(where, buffer.toString());\n }\n }\n // For some reason inlinValueSB() failed to produce a value.\n // Use the older, less efficient, inlining mechanism.\n return super.inlineValue(env, ctx);\n }",
"Literal createLiteral();",
"Literal createLiteral();",
"String getProperty();",
"String getProperty();",
"String getProperty();",
"public String toString()\r\n\t{\r\n\t\treturn \" \" + this.value;\r\n\t}",
"private Expr expression() {\n return assignment();\n }",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();"
] | [
"0.56370115",
"0.5475877",
"0.53851986",
"0.5282915",
"0.52449536",
"0.5184978",
"0.51729643",
"0.5170715",
"0.5152856",
"0.51107174",
"0.5107481",
"0.5107481",
"0.50912327",
"0.50746256",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.50205004",
"0.5011859",
"0.5011859",
"0.5011859",
"0.5011859",
"0.5011859",
"0.5011859",
"0.5007015",
"0.5006997",
"0.50034726",
"0.50004965",
"0.50004965",
"0.50004965",
"0.50004965",
"0.4997633",
"0.49642724",
"0.49469274",
"0.49216297",
"0.49192947",
"0.49165708",
"0.49134353",
"0.4901019",
"0.48665798",
"0.4861379",
"0.48429635",
"0.484106",
"0.48366818",
"0.48366818",
"0.48366818",
"0.48366818",
"0.48366818",
"0.48366818",
"0.48327598",
"0.4824052",
"0.4823935",
"0.48151326",
"0.48059207",
"0.4788743",
"0.47861788",
"0.47538343",
"0.4753386",
"0.47449294",
"0.4744142",
"0.47343472",
"0.47216415",
"0.47175536",
"0.47139546",
"0.47133967",
"0.47133967",
"0.47059414",
"0.47059414",
"0.47059414",
"0.47032",
"0.4687857",
"0.4685587",
"0.4685587",
"0.4685587",
"0.4685587",
"0.4685587",
"0.4685587",
"0.4685587",
"0.4685587"
] | 0.0 | -1 |
Gets the property value as a string suitable for presentation to a human to edit. | public String getAsText() {
return modifiedEditor.getAsText ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProperty() {\n Object ref = property_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getStringValue() {\n if (value == null) return null;\n PropertyEditor propertyEditor = PropertyEditors.getEditor(clazz);\n propertyEditor.setValue(value);\n return propertyEditor.getAsText();\n }",
"public String getProperty() {\n Object ref = property_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n }\n }",
"@Override\n public final String toString() {\n return this.value;\n }",
"public String toString() {\n StringBuilder stringBuilder = new StringBuilder(40);\n stringBuilder.append(\"property '\").append(this.getName()).append(\"' (\");\n if (this._accessorMethod != null) {\n stringBuilder.append(\"via method \").append(this._accessorMethod.getDeclaringClass().getName()).append(\"#\").append(this._accessorMethod.getName());\n } else {\n stringBuilder.append(\"field \\\"\").append(this._field.getDeclaringClass().getName()).append(\"#\").append(this._field.getName());\n }\n if (this._serializer == null) {\n stringBuilder.append(\", no static serializer\");\n } else {\n stringBuilder.append(\", static serializer of type \" + this._serializer.getClass().getName());\n }\n stringBuilder.append(')');\n return stringBuilder.toString();\n }",
"public String toStr() {\r\n return value.toString();\r\n }",
"public String getStringValue() {\n return box.getFormat().format(box, box.getValue());\n }",
"public String getValue() {\n return String.valueOf(value);\n }",
"public String toString(){\n\t\treturn getValue();\n\t}",
"private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }",
"public String toString() {\n return value;\r\n }",
"public String getValueProperty() {\r\n return getAttributeAsString(\"valueProperty\");\r\n }",
"public String toString() {\n return value;\n }",
"public String toString() {\n\t\treturn (getValue().toString());\r\n\t}",
"java.lang.String getProperty();",
"@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}",
"@Override\n public String getValue() {\n return this.value.toString();\n }",
"public String getValueAsString() {\n return value == null ? StringUtils.EMPTY : value.toString();\n }",
"public String getProperty() {\n return \"\";\n }",
"@Override\n\tpublic String toString() {\n\t\treturn value;\n\t}",
"@Override\n\tpublic String getString() {\n\t\treturn value;\n\t}",
"public String toString()\r\n\t{\r\n\t\treturn \" \" + this.value;\r\n\t}",
"@Override\n public String toString() {\n return String.valueOf(value());\n }",
"@Override\n public String toString() {\n StringBuilder buffer = new StringBuilder();\n if (actualProperties != null) {\n synchronized (propertySyncObject) {\n Enumeration<Object> keys = actualProperties.keys();\n while (keys.hasMoreElements()) {\n String key = (String) keys.nextElement();\n String value = actualProperties.getProperty(key);\n buffer.append(key).append(\": \").append(value).append(\"\\n\");\n }\n }\n }\n return buffer.toString();\n }",
"@Override\n public String toString(){\n return this.getValue();\n }",
"@Override\n public String toString() {\n return \"\" + this.value;\n }",
"public java.lang.String getValue() {\n return value;\n }",
"public java.lang.String toString() {\n return this.stringValue;\n }",
"public String getPropValue() {\n return propValue;\n }",
"String getValue()\n {\n return value.toString();\n }",
"public String toString() {\n\t\treturn String.valueOf(this.currentValue);\n\t}",
"public\t\tString\t\tgetValue()\n\t\t{\n\t\treturn(\"\" + getNormalizedValue());\n\t\t}",
"@Override\r\n public String toString() {\r\n return (value == null) ? \"\" : value;\r\n }",
"public StringProperty perfProperty() {\n return perf.getHint().textProperty();\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn getValor();\r\n\t}",
"public String get() {\n return this.value;\n }",
"@Override\n public String toString(){\n return String.valueOf(value);\n }",
"String getProperty();",
"String getProperty();",
"String getProperty();",
"public java.lang.String toString()\n {\n return this.stringValue;\n }",
"public String getStringValue()\n {\n return this.getValue();\n }",
"public String getProperty();",
"public String asText() {\n return getValueAttribute();\n }",
"public String get() {\n return value;\n\t}",
"public com.google.protobuf.ByteString\n getPropertyBytes() {\n Object ref = property_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n property_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String value() {\n return value;\n }",
"public String getString() {\r\n\t\tString s = value.getString();\r\n\t\t// System.out.println(\"Getting string of: \" + s);\r\n\t\tif (s == null)\r\n\t\t\treturn (s);\r\n\t\treturn (substitution(s));\r\n\t}",
"@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}",
"String getValueAsString();",
"@Override\n public String toString() {\n // using String.format to display out put value and infomation of Property\n return String.format(\n \"\\nCoordinates: %d, %d\\n\" + \"Length: %d m Width: %d m\\n\" + \"Registrant: #%d\\nArea: %d m2\\n\"\n + \"Property Taxes : $%.1f\",\n this.getXLeft(), this.getYTop(), this.getXLength(), this.getYWidth(), this.getRegNum(), this.getArea(),\n this.getTaxes());\n }",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s:%s\", type, value);\n\t}",
"@Override\n public String toString() {\n\n if (this.value == null) {\n return name;\n }\n final int len = this.name.length() + 1 + this.value.length();\n final StringBuilder buffer = new StringBuilder(len);\n buffer.append(this.name);\n buffer.append(\"=\");\n buffer.append(this.value);\n return buffer.toString();\n }",
"@Override\n public String toString() {\n\n if (this.value == null) {\n return name;\n }\n final int len = this.name.length() + 1 + this.value.length();\n final StringBuilder buffer = new StringBuilder(len);\n buffer.append(this.name);\n buffer.append(\"=\");\n buffer.append(this.value);\n return buffer.toString();\n }",
"@Override\r\n\tpublic String getValue() {\n\t\treturn value;\r\n\t}",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\n return value;\n }",
"public String toString() {\n\t\treturn String.format(\"%s = %d\",name,value);\n\t}",
"public String toString()\n {\n String string = new Integer(this.getValue()).toString();\n return string; \n }",
"public com.google.protobuf.ByteString\n getPropertyBytes() {\n Object ref = property_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n property_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String valueAsText() {\n return \"\" + this.intValue;\n }",
"public String getValue(){\n\t\treturn this.value;\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn val.toString();\r\n\t}",
"public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn value;\n\t}",
"public String toString()\n\t{\n\t\treturn \"\" + val;\n\t}",
"public String value() {\n return this.value;\n }",
"public String value() {\n return this.value;\n }",
"public String getValue() {\n return value;\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\r\n return value;\r\n }",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"public String getValue() {\n\t\treturn value;\n\t}",
"String getValueFormatted();",
"@Override\n\tpublic String toString() {\n\t\treturn getValue() != null ? getValue().toString() : \"null\";\n\t}",
"public String getValue()\n {\n return value;\n }",
"public String getValue() {\r\n\t\treturn value;\r\n\t}",
"@Override\n public String toString() {\n return value();\n }",
"public String getFormattedValue() {\n if (labelFormatter != null) {\n return labelFormatter.getText();\n } else {\n return \"\" + getValue();\n }\n }",
"@Override\n public String asText() {\n return value;\n }"
] | [
"0.7541894",
"0.74701685",
"0.73725456",
"0.7241896",
"0.7235508",
"0.7218888",
"0.71921676",
"0.7180596",
"0.7161738",
"0.715899",
"0.71355855",
"0.713428",
"0.71147984",
"0.7109388",
"0.7052429",
"0.70424664",
"0.7018088",
"0.6977505",
"0.6956839",
"0.6926992",
"0.69240737",
"0.6883034",
"0.6872092",
"0.68319803",
"0.68242896",
"0.68179697",
"0.6816343",
"0.67865664",
"0.676973",
"0.67515147",
"0.6743026",
"0.67423123",
"0.6691485",
"0.6686963",
"0.6685541",
"0.6670092",
"0.6659719",
"0.66420597",
"0.66420597",
"0.66420597",
"0.66141874",
"0.6599607",
"0.65782905",
"0.6577667",
"0.65604067",
"0.65601224",
"0.6558674",
"0.65519637",
"0.65482146",
"0.6543682",
"0.6533451",
"0.65330166",
"0.652897",
"0.6524165",
"0.652109",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.651379",
"0.6512162",
"0.65115947",
"0.65089786",
"0.65085274",
"0.6487167",
"0.64871293",
"0.6486807",
"0.64799964",
"0.6477093",
"0.64768875",
"0.64768875",
"0.64763606",
"0.6474956",
"0.6474956",
"0.6474956",
"0.6474956",
"0.6474956",
"0.64747375",
"0.64747375",
"0.64747375",
"0.64747375",
"0.64747375",
"0.64686424",
"0.6465192",
"0.64626986",
"0.64581674",
"0.6456984",
"0.6456283",
"0.645508"
] | 0.0 | -1 |
Sets the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text. | public void setAsText(String text) throws java.lang.IllegalArgumentException {
modifiedEditor.setAsText (text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setString(String prop, String value)\n {\n props.setProperty(prop, value);\n }",
"public void\n fromString\n (\n String value\n )\n {\n if (value == null)\n throw new IllegalArgumentException(\"Cannot set a Parameter value from a null string\");\n Double doubleValue = null;\n try {\n doubleValue = Double.valueOf(value);\n }\n catch(NumberFormatException ex) {\n throw new IllegalArgumentException\n (\"The value (\" + value + \") passed into the fromString method cannot be parsed \" +\n \"as a Double.\\n\" + ex.getMessage());\n }\n setValue(doubleValue);\n }",
"public void setStringProperty(String propertyName, String value);",
"public void setPropertyString(String name, String value) {\n\t\tsetProperty(name, toObject(value, name));\n\t}",
"public void setStringProperty(String propertyName,String propertyValue) throws UtilsException;",
"public void set (String text) throws ParseException {\n\t\tParsing t = new Parsing(text);\n\t\tboolean p;\n\t\tthis.set();\t\t\t\t// Reset\n\t\tp = this.parsing(t);\n\t\tt.gobbleSpaces();\n\t\t/* Accept NULL */\n\t\tif (DEBUG>0) System.out.println(\"....Unit.set(\"+text+\")\" + p \n\t\t\t\t+ \" => \" + this.toString());\n\t\tif (t.pos < t.length) throw new ParseException\n\t\t(\"****Unit: set '\" + text + \"'+\" + t.pos, t.pos);\n\t}",
"public void setValue (String text) throws ParseException {\n\t\tParsing t = new Parsing(text);\n\t\tint posini;\n\t\t/* Ignore the leading blanks */\n\t\tt.gobbleSpaces();\n\t\tposini = t.pos;\n\t\t/* Take care of units requiring data in Sexagesimal */\n\t\tif ((symbol.charAt(0) == '\"') && (symbol.indexOf(':')>0)) \t// \"\n\t\t\tvalue = t.parseSexa();\n\t\telse value = t.parseFactor();\n\t\tif (t.pos == posini) {\t\t// Nothing (NaN checked in Parsing)\n\t\t\tvalue = 0./0. ;\n\t\t\t// while ((t.pos < t.length) && (t.a[t.pos] == '-')) t.pos++;\n\t\t}\n\t\t/* Skip the trailing blanks */\n\t\tt.gobbleSpaces();\n\t\tif (t.pos < t.length) throw new ParseException\n\t\t(\"****Unit: setValue '\" + text + \"'+\" + t.pos, t.pos);\n\t}",
"@Override\n public void set(DP value) {\n if (value == null || \"\".equals(value)) {\n isValid.set(true);\n source.set(null);\n return;\n }\n final SP parsed;\n try {\n parsed = formatter.parse(value);\n } catch (Exception e) {\n isValid.set(false);\n // we failed to parse the value, but still treat this as touching the source property\n source.setTouched(true);\n return;\n }\n isValid.set(true);\n source.set(parsed);\n }",
"public\t\tvoid\t\tsetValue(String value)\n\t\t{\n\t\tdouble val = Utility.toDouble(value);\n\t\tsetNormalizedValue(val);\n\t\t}",
"public void setValue(String value)\n {\n if (value == null)\n throw new IllegalArgumentException(\"value cannot be null\");\n \n this.value = value;\n }",
"void setValueString(org.hl7.fhir.String valueString);",
"void setValue(java.lang.String value);",
"public void parseString(String properties)\n\t{\n\t\tString[] entries = properties.split((\"\"+'\\f'));\n\t\tint i;\n\t\tfor (String entry : entries)\n\t\t{\n\t\t\ti = entry.indexOf('=');\n\t\t\tif (i > 0)\n\t\t\t\tsetProperty(entry.substring(0, i).trim(), entry.substring(i+1));\n\t\t}\n\t}",
"protected void setValue( String strValue )\n {\n _strValue = strValue;\n }",
"public void set(String str) {\n\t setValueInternal(str);\n\t}",
"private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}",
"private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}",
"void setValue(final String value);",
"void setString(String attributeValue);",
"public Builder setProperty(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n property_ = value;\n onChanged();\n return this;\n }",
"public abstract void setString(String paramString) throws InvalidHeaderException;",
"public void setValue(String value) throws Exception {\n\t\tthis.value = value;\n\t}",
"void setValue(String value);",
"void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String value);",
"public void setValue(String text) {\n\t\tthis.value = text;\n\t}",
"public void setValue(final String value)\n {\n this.value = value;\n }",
"public void setStr(java.lang.String str)\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(STR$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STR$0);\r\n }\r\n target.setStringValue(str);\r\n }\r\n }",
"@Override\r\n public void setAsText(String text) throws IllegalArgumentException {\r\n if (this.allowEmpty && StringUtils.isBlank(text)) {\r\n // Treat empty String as null value.\r\n setValue(null);\r\n } else {\r\n try {\r\n if(this.dateFormat != null) {\r\n \tsetValue(this.dateFormat.parse(text)); \t\r\n } else {\r\n if(text.contains(TIME_FLAG)) {\r\n setValue(new SimpleDateFormat(TIME_FORMAT).parse(text));\r\n } else {\r\n setValue(new SimpleDateFormat(DATE_FORMAT).parse(text));\r\n }\r\n }\r\n } catch (ParseException ex) {\r\n throw new IllegalArgumentException(\"Could not parse date: \" + ex.getMessage(), ex);\r\n }\r\n }\r\n }",
"public void setValue(final String value) {\n this.value = value;\n }",
"public void setString(String value) {\r\n\t\ttype(ConfigurationItemType.STRING);\r\n\t\tthis.stringValue = value;\r\n\t}",
"public abstract void parseValue(String value);",
"public void setValue( String value )\n {\n this.value = value;\n }",
"public void setString(String name, String value) {\n parameters.get(name).setValue(value);\n }",
"public void setValue(String value) {\n\t\tthis.text = value;\n\t}",
"public void setValue(String value) {\n this.value = value;\n }",
"public void setValue(String value) {\n this.value = value;\n }",
"public void setValue(String value) {\n this.value = value;\n }",
"public void setValue(String value) {\n this.value = value;\n }",
"public void setValue(String value) {\n this.value = value;\n }",
"public void setValue(String value) {\r\n this.value = value;\r\n }",
"public void setValue(String value) {\r\n this.value = value;\r\n }",
"public void setValue(String value) {\r\n this.value = value;\r\n }",
"public void setValue(String value) {\r\n this.value = value;\r\n }",
"public void setValue(String value) {\r\n this.value = value;\r\n }",
"public void setValue(String value) {\n set (value);\n }",
"public void setValue(String value) {\n\t\tmValue = value;\n\t}",
"public void setAsText( String pText) {\n\t\tsetValue( pText);\n\t}",
"public void setProperty(final String property, final String value) {\n\n\t\tthis.engine.setProperty(property, value);\n\t}",
"public void setValue(String value) throws ClientException {\n Pattern pattern = Pattern.compile(VALUE_REGEX);\n Matcher matcher = pattern.matcher(value);\n\n if (matcher.matches()) {\n this.value = value;\n } else {\n throw new ClientException(\"your value is invalid\", OSSErrorCode.INVALID_ARGUMENT, null);\n }\n }",
"public void setValue(java.lang.String value) {\n this.value = value;\n }",
"public void setValue(String value)\n {\n this.value = value;\n }",
"public IValuable parse(String value);",
"public void setProperty(String aProperty, Object aObject)\n\t\t\t\t\t throws SAXNotSupportedException, SAXNotRecognizedException {\n\t\tparserImpl.setProperty(aProperty, aObject);\n\t}",
"public void setStringValue(String stringValue) {\n\t\tthis.rawValue = stringValue;\n\t}",
"public void setValue(String value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(String value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(String value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(String value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(String value) {\r\n\t\tthis.value = value;\r\n\t}",
"void setValue(String s) throws YangException;",
"public void setStringValue(String v)\n {\n this.setValue(v);\n }",
"public void setValue(String value) {\n\t\tthis.value = value;\n\t}",
"public void set(String s);",
"protected synchronized void setStringValue(String tag, String value) {\n if (actualProperties != null) {\n actualProperties.put(tag, value);\n }\n }",
"public void setValue (String Value);",
"public void setProperty(String prop, Object value)\r\n {\r\n\tswitch(prop)\r\n\t{\r\n\t case \"name\":\r\n\t\tname = value.toString();\r\n\t\tbreak;\r\n\t case \"description\":\r\n\t\tdesc = value.toString();\r\n\t\tbreak;\r\n\t case \"type\":\r\n\t\tsetType(value.toString());\r\n\t\tbreak;\r\n\t case \"level\":\r\n\t\tlevel = (Integer) value;\r\n\t\tbreak;\r\n\t case \"rarity\":\r\n\t\trare = Rarity.valueOf(value.toString().toUpperCase());\r\n\t\tbreak;\r\n\t case \"vendor_value\":\r\n\t\tvendorValue = (Integer) value;\r\n\t\tbreak;\r\n\t case \"game_types\":\r\n\t\taddGameType(value.toString());\r\n\t\tbreak;\r\n\t case \"flags\":\r\n\t\taddFlag(value.toString());\r\n\t\tbreak;\r\n\t case \"restrictions\":\r\n\t\taddRestriction(value.toString());\r\n\t\tbreak;\r\n\t case \"id\":\r\n\t\tid = (Integer) value;\r\n\t\tbreak;\r\n\t case \"icon\":\r\n\t\ttry {\r\n\t\t icon = new URL(value.toString());\r\n\t\t}\r\n\t\tcatch(MalformedURLException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\tbreak;\r\n\t}\r\n }",
"public void setString(String parName, String parVal) throws HibException;",
"public void setValue(String value)\n {\n if(this.valueString.compareTo(value) == 0)\n {\n return;\n }\n this.valueString = value;\n treeModel.nodeChanged(this.treeNode);\n }",
"public void setString(String string) {\n this.string = string;\n }",
"public void parseString(String string)\n throws XMLParseException {\n this.parseCharArray(string.toCharArray(), 0, string.length(), 1);\n }",
"private void setStringValue(String stringValue) {\r\n \t\tif (null != slider) {\r\n \t\t\ttry {\r\n \t\t\t\tintValue = Integer.parseInt(stringValue);\r\n \t\t\t\tslider.setSelection(intValue);\r\n \t\t\t\t/*\r\n \t\t\t\t * Show value in percents.\r\n \t\t\t\t */\r\n \t\t\t\tString weightsString = \"\" + (intValue / 10) + \"%\"; //$NON-NLS-1$ //$NON-NLS-2$\r\n \t\t\t\tslider.setToolTipText(weightsString);\r\n \t\t\t\tif (null != sliderLabel) {\r\n \t\t\t\t\tsliderLabel.setText(weightsString);\r\n \t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n \t\t\t\t// Do nothing\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"public void setProperty(String keyValuePair) throws PropertiesPlusException\n\t{\n\t\tkeyValuePair = keyValuePair.trim();\n\t\tint i = keyValuePair.indexOf('=');\n\t\tif (i < 1)\n\t\t\tthrow new PropertiesPlusException(String.format(\n\t\t\t\t\t\"%nError parsing %s%nExpecting a String containing one '=' sign%n\",\n\t\t\t\t\tkeyValuePair));\n\t\t\n\t\tString key = keyValuePair.substring(0, i).trim();\n\t\tString value = i == keyValuePair.length()-1 ? \"\" : keyValuePair.substring(i+1).trim();\n\t\tsetProperty(key, value);\n\t}",
"@Override\r\n\tprotected Object stringToValue(String valueString) throws ParseException {\r\n\t\ttry {\r\n\t\t\treturn PersistentBean.findOrCreate(beanClass, valueString);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new ParseException(e.getMessage(), 0);\r\n\t\t}\r\n\t}",
"public void setString(String key, String value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value);\n\t\telse\n\t\t\tinternal.remove(key);\n\t}",
"protected final Object fromStringImpl(String string)\n throws TypeValueException {\n int y, m, d;\n try {\n y = Integer.parseInt(string.substring(0, 4));\n m = Integer.parseInt(string.substring(4, 6));\n d = Integer.parseInt(string.substring(6, 8));\n } catch (NumberFormatException nfe) {\n\n // Should never happen, since isValidValueImpl(String) will have been\n // called\n throw new TypeValueException(this, string);\n }\n\n // Check that the values are in the correct range\n return new Value(y, m, d);\n }",
"protected Object parseValue (String value)\n throws Exception\n {\n return value;\n }",
"public void setProperty(String property) {\n }",
"public void setAsText (String text) throws java.lang.IllegalArgumentException {\n String programmaticName = findProgrammaticName(text);\n setValue((programmaticName == null) ? text : programmaticName);\n }",
"public void setPropValue(String propValue) {\n this.propValue = propValue;\n }",
"public abstract void setProperty(String property, Object value)\n throws SOAPException;",
"public void setAttribute_value(String string) {\n this.attribute_value = string;\n }",
"public void setValue(String value) {\n\t this.valueS = value;\n\t }",
"@Override\n protected void loadValue(String sValue) {\n value = sValue;\n }",
"public void setUnit (String text) throws ParseException {\n\t\tthis.set(text);\n\t\tthis.setUnit();\n\t}",
"public static void setParameterString(String key, String value)\n throws Exception {\n ini.setProperty(key, value);\n systemlog(LogType.DEBUG, \"setParam \" + key + \" to: \" + value);\n }",
"public void set (String Value)\n\t\t{\n\t\tthis.Value = Value;\t\t\n\t\t}",
"void set(String text);",
"public void setProperty(String name,Object value);",
"public void setString(int index,String value);",
"public <T> void setValue (String key, T value)\n\t{\n\t\tproperties.get(key).value.setValue(value);\n\t}",
"public void setString(String val) {\n\t\tcp.setString(val);\n\t}",
"public void setProperty(String key, Object value);",
"public void parse(final String s) throws NumberFormatException {\r\n\t}",
"@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}",
"public Value(String s) {\n string = s;\n itemClass = String.class;\n type = DataType.STRING;\n }",
"public final void setValue (String newValue) throws ReadOnlyException, InvalidArgumentException {\n //\n // check new value\n //\n if ( Util.equals (this.getValue (), newValue) )\n return;\n checkReadOnly ();\n checkValue (newValue);\n \n //\n // set new value\n //\n setValueImpl (newValue);\n }",
"public abstract void setString(String paramString1, String paramString2) throws InvalidDLNAProtocolAttributeException;"
] | [
"0.67884356",
"0.6621196",
"0.65974295",
"0.64703697",
"0.64329237",
"0.6394364",
"0.6346956",
"0.6312416",
"0.63071036",
"0.6291652",
"0.6267507",
"0.6208637",
"0.6188304",
"0.6145467",
"0.6140382",
"0.6137194",
"0.6137194",
"0.6119454",
"0.6046488",
"0.60299754",
"0.6003836",
"0.5943448",
"0.59400666",
"0.59400666",
"0.591841",
"0.591841",
"0.591841",
"0.591841",
"0.5905374",
"0.5878267",
"0.58773637",
"0.5823291",
"0.5819737",
"0.58175784",
"0.580089",
"0.57908285",
"0.57824224",
"0.578176",
"0.5777675",
"0.5777675",
"0.5777675",
"0.5777675",
"0.5777675",
"0.57767004",
"0.57767004",
"0.57767004",
"0.57767004",
"0.57767004",
"0.57742965",
"0.57729393",
"0.5766744",
"0.57635015",
"0.574891",
"0.57391745",
"0.5734454",
"0.57193965",
"0.5714175",
"0.5709438",
"0.57061446",
"0.57061446",
"0.57061446",
"0.57061446",
"0.5690221",
"0.56775016",
"0.5654371",
"0.56528383",
"0.56490123",
"0.56456846",
"0.5643654",
"0.5633804",
"0.5629619",
"0.56223226",
"0.56135124",
"0.5604268",
"0.5604119",
"0.5591508",
"0.55873466",
"0.5578457",
"0.55610704",
"0.5548935",
"0.5546045",
"0.55443585",
"0.553549",
"0.5535479",
"0.55313134",
"0.5527509",
"0.55195284",
"0.5518724",
"0.54992324",
"0.549357",
"0.54871184",
"0.54717964",
"0.54482675",
"0.5446239",
"0.54408216",
"0.5429565",
"0.54254776",
"0.54208076",
"0.54117453",
"0.5404934",
"0.5404349"
] | 0.0 | -1 |
If the property value must be one of a set of known tagged values, then this method should return an array of the tag values. This can be used to represent (for example) enum values. If a PropertyEditor supports tags, then it should support the use of setAsText with a tag value as a way of setting the value. | public String[] getTags() {
return modifiedEditor.getTags ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List<String> getTagValues() {\n if (tagValues == null) {\n tagValues = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n tagValues.setAutoConstruct(true);\n }\n return tagValues;\n }",
"public boolean supportsEditingTaggedValues () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).supportsEditingTaggedValues ();\n } else {\n return false;\n }\n }",
"public Object getValue() {\n return tags.toString();\n }",
"PropertyValue<?, ?>[] values();",
"@DialogField(fieldLabel = \"Tags\", fieldDescription = \"List of tags to filter on.\")\n @TagInputField\n public List<Tag> getTags() {\n if (tags == null) {\n tags = getAsList(PARAM_TAGS, String.class)\n .stream()\n .map(tagId -> tagManager.resolve(tagId))\n .filter(Objects:: nonNull)\n .collect(Collectors.toList());\n }\n\n return tags;\n }",
"public Set<String> getTags(){return tags;}",
"public java.util.List<java.lang.String> getTags() {\n return tags;\n }",
"public java.util.List<java.lang.String> getTags() {\n return tags;\n }",
"public Object getTags() {\n return this.tags;\n }",
"@NotNull\n @Generated\n @Selector(\"tags\")\n public native NSSet<String> tags();",
"public Set<String> getTags()\n {\n return tags;\n }",
"public List getTags();",
"public String getTags() {\n return this.tags;\n }",
"public String [] getTags() {\n\t\treturn null;\n\t}",
"public List<String> getTags() {\n\t\treturn tags;\n\t}",
"List<String> getTags() {\r\n return tags;\r\n }",
"public String getTags() {\n return tags;\n }",
"public String getTags() {\n return tags;\n }",
"public Tag [] getTagSet() {\n return this.TagSet;\n }",
"public String getTags() {\n\t\treturn tags;\n\t}",
"public String getTags() {\n\t\treturn tags;\n\t}",
"public Set<String> getTags() {\n\t\tSet<String> tags = tagToImg.keySet();\n\t\treturn tags;\n\t}",
"List<String> getTags() {\n return tags;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Add tags attached to this object\")\n\n public List<String> getTags() {\n return tags;\n }",
"public List<Tag> getTag()\n\t{\n\t\treturn (List<Tag>) this.getKeyValue(\"Tag\");\n\n\t}",
"public java.util.List<Tag> getTags() {\n return tags;\n }",
"public java.util.List<Tag> getTags() {\n return tags;\n }",
"public TagInfo[] getTags() {\n/* 164 */ return this.tags;\n/* */ }",
"@Nullable\n public abstract List<String> tags();",
"public List<ITag> getTags ();",
"Set<String> tags();",
"public List<String> getTags() {\n\n\t\tSet<String> tags = new TreeSet<>();\n\n\t\tString allTags = tagsTextField.getText();\n\n\t\tif (!allTags.isEmpty()) {\n\t\t\ttags.addAll(Arrays.asList(allTags.replaceAll(\"\\\\s+\", \"\").split(\",\")));\n\t\t}\n\t\t\n\t\ttags.addAll(allCurrentTagsListView.getSelectionModel().getSelectedItems());\n\t\t\n\t\tif(currentDateAsTag.isSelected()) {\n\t\t\ttags.add(LocalDate.now().format(DateTimeFormatter.ofPattern(\"dd.MM.yyyy\")).toString());\n\t\t}\n\n\t\treturn new ArrayList<>(tags);\n\n\t}",
"private List<Tag> getTags() {\r\n\r\n\t\treturn getTags(null);\r\n\r\n\t}",
"String[] getAvailableTags();",
"@SuppressWarnings(\"unchecked\")\n @JsonProperty(\"tags\")\n @Override\n public List<? extends Tag> getTerms() {\n return (List)super.getTerms();\n }",
"public Set<String> getTags(){\r\n\t\treturn tags.keySet();\r\n\t}",
"public List<Tag> getTags() {\n return tags;\n }",
"@GET\n @Path(\"/values/tags/{tags}\")\n public Collection<RESTValueType> getValueTypeByTag(@PathParam(\"tags\") String tags, @HeaderParam(\"Accept-Language\") String language) {\n String[] tagsArray = tags.split(\",\");\n Set<ValueType> results = new LinkedHashSet<>();\n for (String tag : tagsArray) {\n results.addAll(definitionsService.getValueTypeByTag(tag));\n }\n return localizationHelper.generateValueTypes(results, language);\n }",
"@Nullable\r\n default Map<String, String> getTags() {\r\n throw new IllegalArgumentException(\"getTags is unsupported\");\r\n }",
"@JsonSetter(\"tags\")\n public void setTags (Object value) { \n this.tags = value;\n }",
"public List<Tag> getTags() {\n return new ArrayList<>(tags);\n }",
"public Map<String, String> getTags() {\n return this.tags;\n }",
"com.google.protobuf.ByteString\n getTagValueBytes();",
"@ApiModelProperty(value = \"A comma-separated values list of tags to add to the package.\")\n public String getTags() {\n return tags;\n }",
"public ArrayList<String> getSelectedTags() {\n\t\treturn selectedTags;\n\t}",
"@Override\n public boolean isTagged() {\n for (List<String> t : tags.values()) {\n if(!t.isEmpty()) return true;\n }\n return false;\n }",
"public com.babbler.ws.io.avro.model.BabbleValue.Builder setTags(java.util.List<java.lang.String> value) {\n validate(fields()[4], value);\n this.tags = value;\n fieldSetFlags()[4] = true;\n return this;\n }",
"public java.util.List<Tag> getTags() {\n if (tags == null) {\n tags = new com.amazonaws.internal.SdkInternalList<Tag>();\n }\n return tags;\n }",
"public java.util.List<Tag> getTags() {\n if (tags == null) {\n tags = new com.amazonaws.internal.SdkInternalList<Tag>();\n }\n return tags;\n }",
"public java.util.List<Tag> getTags() {\n if (tags == null) {\n tags = new com.amazonaws.internal.SdkInternalList<Tag>();\n }\n return tags;\n }",
"public java.util.List<Tag> getTags() {\n if (tags == null) {\n tags = new com.amazonaws.internal.SdkInternalList<Tag>();\n }\n return tags;\n }",
"public java.util.List<Tag> getTags() {\n if (tags == null) {\n tags = new com.amazonaws.internal.SdkInternalList<Tag>();\n }\n return tags;\n }",
"public List<String> values() {\n return this.values;\n }",
"public com.google.protobuf.ByteString\n getTagValueBytes() {\n java.lang.Object ref = tagValue_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n tagValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public ITag[] getTags() {\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}",
"public String[] getValue() {\n return value;\n\t}",
"public ArrayList<String> getTags() {\n return (ArrayList<String>)this.tags.clone();\n }",
"public ArrayList<Tag> getTags() {\n return tags;\n }",
"@Override\n List<Value> values();",
"public Set<TagDTO> getTags() {\n\t\treturn tags;\n\t}",
"@JsonSetter(\"tags\")\n public void setTags (String value) { \n this.tags = value;\n }",
"java.lang.String getTagValue();",
"UniqueTagList getTags();",
"static String[] getProductTagsArray() {\n\n\t\tList<String> productTagsList = new ArrayList<>();\n\t\tproductTagsList.add(\"neutro\");\n\t\tproductTagsList.add(\"veludo\");\n\t\tproductTagsList.add(\"couro\");\n\t\tproductTagsList.add(\"basics\");\n\t\tproductTagsList.add(\"festa\");\n\t\tproductTagsList.add(\"workwear\");\n\t\tproductTagsList.add(\"inverno\");\n\t\tproductTagsList.add(\"boho\");\n\t\tproductTagsList.add(\"estampas\");\n\t\tproductTagsList.add(\"balada\");\n\t\tproductTagsList.add(\"colorido\");\n\t\tproductTagsList.add(\"casual\");\n\t\tproductTagsList.add(\"liso\");\n\t\tproductTagsList.add(\"moderno\");\n\t\tproductTagsList.add(\"passeio\");\n\t\tproductTagsList.add(\"metal\");\n\t\tproductTagsList.add(\"viagem\");\n\t\tproductTagsList.add(\"delicado\");\n\t\tproductTagsList.add(\"descolado\");\n\t\tproductTagsList.add(\"elastano\");\n\n\t\treturn productTagsList.toArray(new String[productTagsList.size()]);\n\t}",
"public java.util.List<? extends org.multibit.hd.core.protobuf.MBHDContactsProtos.TagOrBuilder> \n getTagOrBuilderList() {\n if (tagBuilder_ != null) {\n return tagBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(tag_);\n }\n }",
"public List<WorldStateProperty> getValues ()\n\t{\n\t\treturn new ArrayList<WorldStateProperty>(properties.values());\n\t}",
"public String getTagValue() {\n return tagValue;\n }",
"public String[] getValidValues();",
"public String[] getValidValues();",
"public com.google.protobuf.ByteString\n getTagValueBytes() {\n java.lang.Object ref = tagValue_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n tagValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public ArrayList<String> getTags(){\n return (ArrayList<String>)tags.clone();\n }",
"@NonNull\n public Set<String> affectedTags() {\n return affectedTags;\n }",
"public Map getUserDefinedTags()\n {\n return m_Tags;\n }",
"public java.util.Map<String, String> getTags() {\n return tags;\n }",
"public java.util.Map<String, String> getTags() {\n return tags;\n }",
"public java.util.Map<String, String> getTags() {\n return tags;\n }",
"public java.util.Map<String, String> getTags() {\n return tags;\n }",
"public List<String> getValue() {\r\n return value;\r\n }",
"@java.lang.Override\n public java.util.List<? extends io.envoyproxy.envoy.type.tracing.v3.CustomTagOrBuilder> \n getCustomTagsOrBuilderList() {\n return customTags_;\n }",
"public StringBuilder getTags () {\n return tags;\n }",
"public String[] getValues()\n {\n return values;\n }",
"public Map<String, String> tags() {\n return this.tags;\n }",
"public Map<String, String> tags() {\n return this.tags;\n }",
"public String getTags() {\n if (tags.size() == 0) {\n return \"\";\n }\n StringBuilder result = new StringBuilder(\" (Tags:\");\n for (String t : tags) {\n result.append(\" \").append(t);\n }\n result.append(\")\");\n return result.toString();\n }",
"public java.util.List<io.envoyproxy.envoy.type.tracing.v3.CustomTag> getCustomTagsList() {\n if (customTagsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(customTags_);\n } else {\n return customTagsBuilder_.getMessageList();\n }\n }",
"String[] getTags() {\n if (sections == null) {\n return null;\n }\n\n Vector<String> tagV = new Vector<>(sections.length * 2);\n\n for (Section section : sections) {\n String[] names = section.getOutputNames();\n\n Collections.addAll(tagV, names);\n } // outer for\n\n return tagV.toArray(new String[tagV.size()]);\n }",
"public java.util.List<? extends io.envoyproxy.envoy.type.tracing.v3.CustomTagOrBuilder> \n getCustomTagsOrBuilderList() {\n if (customTagsBuilder_ != null) {\n return customTagsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(customTags_);\n }\n }",
"public java.lang.String getTagValue() {\n java.lang.Object ref = tagValue_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n tagValue_ = s;\n }\n return s;\n }\n }",
"@java.lang.Override\n public java.util.List<io.envoyproxy.envoy.type.tracing.v3.CustomTag> getCustomTagsList() {\n return customTags_;\n }",
"public int[] getTags() {\n int[] tags = new int[fieldIndex.size()];\n Iterator iter = fieldIndex.keySet().iterator();\n int i = 0;\n\n while (iter.hasNext()) {\n tags[i++] = (Integer) iter.next();\n }\n\n return tags;\n }",
"@JsonGetter(\"tags\")\n public Object getTags ( ) { \n return this.tags;\n }",
"@Override\n\tpublic Collection<String> values() {\n\t\treturn null;\n\t}",
"@JsonGetter(\"tags\")\n public String getTags ( ) { \n return this.tags;\n }",
"public java.lang.String getTagValue() {\n java.lang.Object ref = tagValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n tagValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public List<Boolean> getValues() {\r\n\t\treturn values;\r\n\t}",
"public String getAllowedValues () {\n return allowedValues;\n }",
"public String getTagVal() {\n return tagVal;\n }",
"@AutoEscape\n\tpublic String getTagProperty();",
"public Set<RvtAoiMetadataKey> getTags() {\n return map.keySet();\n }",
"public List<Tag> getTags() {\n return fullPhoto.getTags();\n }"
] | [
"0.6417276",
"0.63073593",
"0.6219152",
"0.60370106",
"0.6028409",
"0.59401274",
"0.59173095",
"0.5883318",
"0.57567054",
"0.5734479",
"0.5732123",
"0.5731002",
"0.57297057",
"0.5728238",
"0.5724725",
"0.5716476",
"0.5714566",
"0.5714566",
"0.570368",
"0.5653482",
"0.5653482",
"0.5622987",
"0.5621461",
"0.5606083",
"0.55367166",
"0.55252975",
"0.55252975",
"0.5519662",
"0.55061203",
"0.54994345",
"0.54950917",
"0.54918617",
"0.54634875",
"0.54532623",
"0.54245305",
"0.5418895",
"0.5411959",
"0.5408731",
"0.5378725",
"0.5355945",
"0.53496",
"0.5339617",
"0.5336933",
"0.531648",
"0.5314807",
"0.5305059",
"0.53011227",
"0.529603",
"0.529603",
"0.529603",
"0.529603",
"0.529603",
"0.5281558",
"0.528074",
"0.52785856",
"0.5277429",
"0.5265736",
"0.5262283",
"0.52619207",
"0.5261227",
"0.52594775",
"0.5259278",
"0.52474433",
"0.5236788",
"0.5223886",
"0.5221667",
"0.5214369",
"0.5210836",
"0.5210836",
"0.52006817",
"0.51998574",
"0.5192422",
"0.5185397",
"0.5181282",
"0.5181282",
"0.5181282",
"0.5181282",
"0.51780784",
"0.5176457",
"0.5175803",
"0.5173844",
"0.5168274",
"0.5168274",
"0.5167916",
"0.5142025",
"0.5138618",
"0.51364416",
"0.5133917",
"0.51192176",
"0.5095571",
"0.50891626",
"0.5073867",
"0.5070671",
"0.5056598",
"0.505648",
"0.5047042",
"0.50329417",
"0.5025702",
"0.50247395",
"0.5019757"
] | 0.5922932 | 6 |
A PropertyEditor may chose to make available a full custom Component that edits its property value. It is the responsibility of the PropertyEditor to hook itself up to its editor Component itself and to report property value changes by firing a PropertyChange event. The higherlevel code that calls getCustomEditor may either embed the Component in some larger property sheet, or it may put it in its own individual dialog, or ... | public java.awt.Component getCustomEditor() {
return new FormCustomEditor (this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.awt.Component getInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).getInPlaceCustomEditor ();\n } else {\n return null;\n }\n }",
"public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}",
"public CustomModuleEditor getPropertyEditor() {\n\t return new SetErrorFunction();\n }",
"public boolean hasInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).hasInPlaceCustomEditor ();\n } else {\n return false;\n }\n }",
"public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"public Object \n getCellEditorValue() \n {\n BaseEditor editor = null;\n if(pField.getPluginName() != null) {\n try {\n\tPluginMgrClient pclient = PluginMgrClient.getInstance();\n\teditor = pclient.newEditor(pField.getPluginName(), \n\t\t\t\t pField.getPluginVersionID(), \n\t\t\t\t pField.getPluginVendor());\n }\n catch(PipelineException ex) {\n }\n }\n \n return editor; \n }",
"public interface ValueChangeListener {\n public void onValueChange(CustomComponent view, String value);\n}",
"public interface InspectorComponent<PropMgr extends PropertiesManager<PropMgr>> {\n\n /**\n * Update the properties used\n *\n * @param components the components selected\n * @param properties that are now available\n * @param propertiesManager the current properties manager\n */\n void updateProperties(@NotNull List<NlComponent> components,\n @NotNull Map<String, NlProperty> properties,\n @NotNull PropMgr propertiesManager);\n\n /**\n * Return the maximum number of rows that attachToInspector may generate.\n * A row is either a title, separator, or a component row\n */\n int getMaxNumberOfRows();\n\n /**\n * Add rows of controls to the inspector panel for this inspector.\n */\n void attachToInspector(@NotNull InspectorPanel<PropMgr> inspector);\n\n /**\n * Refresh the values shown in this inspector.\n */\n void refresh();\n\n /**\n * Get the editors created by this inspector.\n */\n @NotNull\n List<NlComponentEditor> getEditors();\n\n /**\n * If customized handling of field visibility is required, use this method\n * to set the visibility of the fields.\n * Filtering in the inspector will change any visibility settings done by this\n * {@code InspectorComponent}. Use this method to override the visibility when\n * there is no filter active. When a filter is active this method should not\n * do anything.\n */\n default void updateVisibility() {\n }\n}",
"public boolean supportsCustomEditor() {\n PropertyEditor[] editors = getAllEditors ();\n if (editors.length > 1) return true; // we must allow to choose the editor even if none of them supports custom editing\n if (editors.length == 1) return editors[0].supportsCustomEditor ();\n return false;\n }",
"public JawbComponent getEditorComponent () {\n if (editorComponent == null)\n initEditorComponent ();\n return editorComponent;\n }",
"public boolean supportsCustomEditor() {\n\t\treturn true;\n\t}",
"@Override\n\t\tprotected boolean initializeSpecificProperties(Component c, AWTEvent introspectionRequestEvent,\n\t\t\t\tTestEditor testEditor) {\n\t\t\tif (c instanceof CustomComponent) {\n\t\t\t\texpectpedValueOfPropertyToCheck = ((CustomComponent) c).propertyToCheck;\n\t\t\t\tnewValueOfPropertyToChange = ((CustomComponent) c).propertyToChange + 1;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public interface ComboPropertiesEditionPart {\n\n\t/**\n\t * @return the combo\n\t */\n\tpublic Object getCombo();\n\n\t/**\n\t * Init the combo\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initCombo(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new combo\n\t * @param newValue the new combo to set\n\t */\n\tpublic void setCombo(Object newValue);\n\n\t/**\n\t * Adds the given filter to the combo edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToCombo(ViewerFilter filter);\n\n\n\n\n\n\n\t/**\n\t * @return the comboRO\n\t */\n\tpublic Object getComboRO();\n\n\t/**\n\t * Init the comboRO\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initComboRO(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new comboRO\n\t * @param newValue the new comboRO to set\n\t */\n\tpublic void setComboRO(Object newValue);\n\n\t/**\n\t * Adds the given filter to the comboRO edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToComboRO(ViewerFilter filter);\n\n\n\n\n\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"public interface PropertyManager extends Manager {\n\t/**\n\t * The attribute \"attr\" has been added (instantiated for the first time).\n\t * \n\t * @param component\n\t * . The component (Spec, Implem, Instance) holding that\n\t * attribute.\n\t * @param attr\n\t * . The attribute name.\n\t * @param newValue\n\t * . The new value of that attribute.\n\t */\n\tpublic void attributeAdded(Component component, String attr, String newValue);\n\n\t/**\n\t * The attribute \"attr\" has been modified.\n\t * \n\t * @param component\n\t * . The component (Spec, Implem, Instance) holding that\n\t * attribute.\n\t * @param attr\n\t * . The attribute name.\n\t * @param newValue\n\t * . The new value of that attribute.\n\t * @param oldValue\n\t * . The previous value of that attribute.\n\t */\n\tpublic void attributeChanged(Component component, String attr, String newValue, String oldValue);\n\n\t/**\n\t * The attribute \"attr\" has been removed.\n\t * \n\t * @param component\n\t * . The component (Spec, Implem, Instance) holding that\n\t * attribute.\n\t * @param attr\n\t * . The attribute name.\n\t * @param oldValue\n\t * . The previous value of that attribute.\n\t */\n\tpublic void attributeRemoved(Component component, String attr, String oldValue);\n}",
"public Component \t\n getTableCellEditorComponent\n (\n JTable table, \n Object value, \n boolean isSelected, \n int row, \n int column\n )\n {\n pField.setPlugin((BaseEditor) value);\n \n return pField;\n }",
"FormPropertyEditor(RADComponent radComponent, Class propertyType, RADComponent.RADProperty radProperty) {\n source = this;\n this.radComponent = radComponent;\n this.radProperty = radProperty;\n this.propertyType = propertyType;\n modifiedEditor = radProperty.getCurrentEditor ();\n if (modifiedEditor instanceof FormAwareEditor) {\n ((FormAwareEditor)modifiedEditor).setRADComponent (radComponent, radProperty);\n }\n if (modifiedEditor instanceof org.openide.explorer.propertysheet.editors.NodePropertyEditor) {\n ((org.openide.explorer.propertysheet.editors.NodePropertyEditor)modifiedEditor).attach (new org.openide.nodes.Node[] { radComponent.getNodeReference () });\n }\n modifiedEditor.addPropertyChangeListener (this);\n }",
"default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }",
"@Override\n\t\tpublic void execute(final Component c, Tester tester) {\n\t\t\tif (!expectpedValueOfPropertyToCheck.equals(((CustomComponent) c).propertyToCheck)) {\n\t\t\t\tthrow new TestFailure(\"propertyToCheck is not ok\");\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Note that the current thread is the UI thread. Then it is safe here to\n\t\t\t * execute instructions that updates the UI. No need to use\n\t\t\t * SwingUtilities.invoke* methods.\n\t\t\t */\n\t\t\t((CustomComponent) c).propertyToChange = newValueOfPropertyToChange;\n\t\t}",
"public PropertyCustomEditorPanel(Component client, JDialog dialog)\n {\n initComponents();\n\n this.dialog = dialog;\n\n panel_clientArea.add(client, BorderLayout.CENTER);\n }",
"protected java.beans.PropertyChangeSupport getPropertyChange() {\r\n\tif (propertyChange == null) {\r\n\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\r\n\t};\r\n\treturn propertyChange;\r\n}",
"@Override\r\n\tpublic CellEditor createPropertyEditor(Composite parent) {\n\t\tMenuCellEditor editor = new MenuCellEditor(parent);\r\n\t\teditor.setListenerModel(flistenermodel);\r\n if (getValidator() != null) {\r\n\t\t\teditor.setValidator(getValidator());\r\n\t\t}\t\t\r\n\t\t return editor;\r\n\t}",
"public interface DomainBuilderComponent extends PropertyChangeListener {\n\t/**\n\t * get name of the component\n\t * @return\n\t */\n\tpublic String getName();\n\t\n\t/**\n\t * get icon for the component\n\t * @return\n\t */\n\tpublic Icon getIcon();\n\t\n\t\n\t/**\n\t * get component\n\t * @return\n\t */\n\tpublic Component getComponent();\n\t\n\t\n\t/**\n\t * get menu bar\n\t * @return\n\t */\n\tpublic JMenuBar getMenuBar();\n\t\n\t\n\t/**\n\t * load whatever resources one needs to get this piece working \n\t */\n\tpublic void load();\n\t\n\t/**\n\t * dispose of this component\n\t */\n\tpublic void dispose();\n}",
"public FormFieldComponentCellEditor(FormFieldComponent editorComponent) {\n setEditorComponent(editorComponent);\n }",
"Component getComponent() {\n/* 224 */ return this.component;\n/* */ }",
"@Override\n\tpublic void setComponentValue(Object value) {\n\t\t\n\t}",
"public JFormattedTextField getEditComponent() {\r\n\t\tif(m_editComponent==null) {\r\n\t\t\t// create\r\n\t\t\tm_editComponent = createDefaultComponent(true,m_documentListener);\r\n\t\t\t//m_editComponent.getDocument().addDocumentListener(m_documentListener);\r\n\t\t}\r\n\t\treturn m_editComponent;\r\n\t}",
"public Editor getEditor() { return editor; }",
"protected final JTextComponent getComponent() {\n return editor;\n }",
"public interface Component {\n\n /** Property name for the 'cost' property. */\n public static final String PROP_COST = \"cost\";\n /** Property name for the 'label' property. */\n public static final String PROP_LABEL = \"label\";\n\n /**\n * Add a PropertyChangeListener to the listener list.\n *\n * @param listener the PropertyChangeListener to be added.\n */\n void addPropertyChangeListener(PropertyChangeListener listener);\n\n /**\n * Returns the value of the property with the specified key. Only\n * properties added with <code>putClientProperty</code> will return\n * a non-null value.\n *\n * @param key the key being queried.\n * @return the value of this property or <code>null</code>.\n */\n Object getClientProperty(Object key);\n\n /**\n * Returns the cost of the edge.\n *\n * @return distance between the two endpoints.\n */\n double getCost();\n\n /**\n * Returns the string label for this edge. This will never return a\n * null reference, as it will create an empty string if there is not\n * a label already set.\n *\n * @return label for this edge.\n */\n String getLabel();\n\n /**\n * Returns the component model this component belongs to.\n *\n * @return component model for this component.\n */\n Model getModel();\n\n /**\n * Adds an arbitrary key/value \"client property\" to this component.\n *\n * <p>The <code>get/putClientProperty</code> methods provide access\n * to a small per-instance hashtable. Callers can use\n * get/putClientProperty to annotate components that were created\n * by another module.</p>\n *\n * <p>If value is <code>null</code> this method will remove the\n * property. Changes to client properties are reported with\n * <code>PropertyChange</code> events. The name of the property\n * (for the sake of PropertyChange events) is\n * <code>key.toString()</code>.</p>\n *\n * @param key the new client property key.\n * @param value the new client property value; if\n * <code>null</code> the property will be removed.\n */\n void putClientProperty(Object key, Object value);\n\n /**\n * Remove a PropertyChangeListener from the listener list.\n *\n * @param listener the PropertyChangeListener to be removed.\n */\n void removePropertyChangeListener(PropertyChangeListener listener);\n\n /**\n * Sets the cost of the edge. Once the cost is set it will not be\n * modified until subsequent calls to this method.\n *\n * @param cost new cost for this edge.\n */\n void setCost(double cost);\n\n /**\n * Sets the string label of this edge.\n *\n * @param label new label for this edge.\n */\n void setLabel(String label);\n}",
"public void notifyChanged(final Notification msg) {\r\n\t super.notifyChanged(msg);\r\n\t \r\n\t if(msg.getFeature() == PropertiesPackage.Literals.PROPERTY__VALUE) {\r\n\t \tsetGUIAttributes();\r\n\t }\r\n\t }",
"@Override\n protected void componentOpened() {\n WindowManager.getDefault().getRegistry().addPropertyChangeListener(this);\n }",
"protected java.beans.PropertyChangeSupport getPropertyChange() {\n\t\tif (propertyChange == null) {\n\t\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\n\t\t};\n\t\treturn propertyChange;\n\t}",
"@Override\r\n\t\t\tpublic void modifyText(ModifyEvent me) {\n\t\t\t\tString newValue = newEditor.getText();\r\n\t\t\t\teditor.getItem().setText(VALUE_COLUMN_NO, newValue);\r\n\t\t\t\t//isEditorModify = true;\r\n\t\t\t\t//propertyInfo.setValue(newValue);\r\n\t\t\t}",
"@Override\npublic void setUIComponent(VirtualComponent c) {\n\t\n}",
"public void propertyChange(PropertyChangeEvent e) {\n super.propertyChange(e);\n String name = e.getPropertyName();\n if (e.getSource() == paramEditor && name.equals(\"edit\")) { //$NON-NLS-1$\n initEditor.getTable().selectOnFocus = false;\n } else if (name.equals(\"angles_in_radians\") && model.trackerPanel != null) { //$NON-NLS-1$\n model.trackerPanel.getTFrame().setAnglesInRadians((Boolean) e.getNewValue());\n }\n }",
"protected void addEditorPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_editor_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_editor_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__EDITOR,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\n\t}",
"public void propertiesChanged(String property, String value) {\n\t\tif(property != null) {\n \t\t\tFComponent comp = mainFrame.getSelectedComponent().getComponent();\n \t\t\tif(comp.getLabel() == null || !comp.getLabel().equals(value)) {\n \t\t\t\tcomp.setLabel(value);\n \t\t\t\tmainFrame.refreshPreview();\t\t\t\t\n \t\t\t}\n \t\t}\n \t}",
"@Override\n public GeneralOrthoMclSettingsVisualPanel getComponent() {\n if (component == null) {\n component = new GeneralOrthoMclSettingsVisualPanel();\n\n }\n return component;\n }",
"@Override\n\tpublic Component getComponent() {\n\t\treturn p;\n\t}",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0)\n\t{\n\t\t\n\t}",
"public interface PropertyConsumer {\n\n /**\n * Key in the associated propertyInfo object. Holds a list of\n * property names, which should be displayed and editable when\n * configuring a PropertyConsumer object interatively. List is\n * space seperated and the order is the order in which the\n * properties will appear (initProperties).\n */\n public static final String initPropertiesProperty = \"initProperties\";\n\n /**\n * Keyword for PropertyEditor class from PropertyInfo Property\n * object (editor).\n */\n public static final String EditorProperty = \"editor\";\n /**\n * Scoped keyword for PropertyEditor class from PropertyInfo\n * Property object, same as EditorProperty with a period in front\n * (.editor).\n */\n public static final String ScopedEditorProperty = \".editor\";\n /**\n * Scoped keyword for PropertyEditor class from PropertyInfo\n * Property object, to scope the label for the property as\n * displayed in the Inspector (label).\n */\n public static final String LabelEditorProperty = \".label\";\n\n /**\n * Method to set the properties in the PropertyConsumer. It is\n * assumed that the properties do not have a prefix associated\n * with them, or that the prefix has already been set.\n * \n * @param setList a properties object that the PropertyConsumer\n * can use to retrieve expected properties it can use for\n * configuration.\n */\n public void setProperties(Properties setList);\n\n /**\n * Method to set the properties in the PropertyConsumer. The\n * prefix is a string that should be prepended to each property\n * key (in addition to a separating '.') in order for the\n * PropertyConsumer to uniquely identify properties meant for it,\n * in the midst of of Properties meant for several objects.\n * \n * @param prefix a String used by the PropertyConsumer to prepend\n * to each property value it wants to look up -\n * setList.getProperty(prefix.propertyKey). If the prefix\n * had already been set, then the prefix passed in should\n * replace that previous value.\n * @param setList a Properties object that the PropertyConsumer\n * can use to retrieve expected properties it can use for\n * configuration.\n */\n public void setProperties(String prefix, Properties setList);\n\n /**\n * Method to fill in a Properties object, reflecting the current\n * values of the PropertyConsumer. If the PropertyConsumer has a\n * prefix set, the property keys should have that prefix plus a\n * separating '.' prepended to each property key it uses for\n * configuration.\n * \n * @param getList a Properties object to load the PropertyConsumer\n * properties into. If getList equals null, then a new\n * Properties object should be created.\n * @return Properties object containing PropertyConsumer property\n * values. If getList was not null, this should equal\n * getList. Otherwise, it should be the Properties object\n * created by the PropertyConsumer.\n */\n public Properties getProperties(Properties getList);\n\n /**\n * Method to fill in a Properties object with values reflecting\n * the properties able to be set on this PropertyConsumer. The key\n * for each property should be the raw property name (without a\n * prefix) with a value that is a String that describes what the\n * property key represents, along with any other information about\n * the property that would be helpful (range, default value,\n * etc.).\n * \n * @param list a Properties object to load the PropertyConsumer\n * properties into. If getList equals null, then a new\n * Properties object should be created.\n * @return Properties object containing PropertyConsumer property\n * values. If getList was not null, this should equal\n * getList. Otherwise, it should be the Properties object\n * created by the PropertyConsumer.\n */\n public Properties getPropertyInfo(Properties list);\n\n /**\n * Set the property key prefix that should be used by the\n * PropertyConsumer. The prefix, along with a '.', should be\n * prepended to the property keys known by the PropertyConsumer.\n * \n * @param prefix the prefix String.\n */\n public void setPropertyPrefix(String prefix);\n\n /**\n * Get the property key prefix that is being used to prepend to\n * the property keys for Properties lookups.\n * \n * @return the prefix string\n */\n public String getPropertyPrefix();\n\n}",
"protected final Component getComponent()\n\t{\n\t\treturn component;\n\t}",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}",
"@Override\n \tpublic void propertyChange(PropertyChangeEvent arg0) {\n \t\t\n \t}",
"public void setPopupComponent(Component c) {\r\n _component = c;\r\n }",
"public void designerInputModified(DesignerEvent e);",
"@Override\n public SelectCurriculumVisualPanel getComponent() {\n if (component == null) {\n component = new SelectCurriculumVisualPanel();\n component.manager.addPropertyChangeListener(this);\n }\n return component;\n }",
"public TreeModelCustomizer(TreeModelEditor propEditor) {\n this.propEditor = propEditor;\n initComponents();\n String code = propEditor.getCodeValue();\n if (code == null) {\n String defaultModel = \"JTree\\n colors\\n blue\\n violet\\n red\\n yellow\\n\" // NOI18N\n + \" sports\\n basketball\\n soccer\\n football\\n hockey\\n\" // NOI18N\n + \" food\\n hot dogs\\n pizza\\n ravioli\\n bananas\"; // NOI18N\n textArea.setText(defaultModel);\n expandTree();\n }\n textArea.getDocument().addDocumentListener(new DocumentListener() {\n @Override\n public void insertUpdate(DocumentEvent e) {\n updateTree();\n }\n @Override\n public void removeUpdate(DocumentEvent e) {\n updateTree();\n }\n @Override\n public void changedUpdate(DocumentEvent e) {\n updateTree();\n }\n });\n if (code != null) {\n textArea.setText(code);\n updateTree();\n }\n }",
"public SampleComponentProperties() {\n // Initialize the GUI\n initComponents();\n \n // Listen for changes to the info text field\n infoTextField.getDocument().addDocumentListener(new InfoTextFieldListener());\n \n }",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\r\n\t}",
"public final Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int rowIndex, int vColIndex) {\n ((JTextField) component).setText(value.toString());\n\n // Return the configured component\n return component;\n }",
"protected PropertyChangeSupport getPropertyChange() {\r\n\t\tif (propertyChange == null) {\r\n\t\t\tpropertyChange = new PropertyChangeSupport(this);\r\n\t\t}\r\n\t\t;\r\n\t\treturn propertyChange;\r\n\t}",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\n\t}",
"public void propertyChange(PropertyChangeEvent e) {\n String name = e.getPropertyName();\n if (name.equals(\"stepnumber\")) { //$NON-NLS-1$\n if (trackerPanel.getSelectedTrack() == this) {\n displayWorldCoordinates();\n stepValueLabel.setText(e.getNewValue() + \":\"); //$NON-NLS-1$\n }\n } else if (name.equals(\"locked\")) { //$NON-NLS-1$\n xField.setEnabled(!isLocked());\n yField.setEnabled(!isLocked());\n } else super.propertyChange(e);\n }",
"public void propertyChange(PropertyChangeEvent evt) {\n if(evt.getPropertyName().equals(\"position\")){\n// System.out.println(\"slider property change new val=\"+evt.getNewValue());\n sliderDontProcess=true;\n // note this cool semaphore/flag trick to avoid processing the\n // event generated when we programmatically set the slider position here\n playerSlider.setValue(Math.round(player.getFractionalPosition()*100));\n }else if(evt.getPropertyName().equals(\"readerStarted\")){\n log.info(\"MotionViewer.propertyChange: AEReader started, fixing device control menu\");\n // cypress reader started, can set device control for cypress usbio reader thread\n// fixDeviceControlMenuItems();\n }\n }",
"@Override\n\tpublic Component getComponent() {\n\t\treturn this;\n\t}",
"public JComponent getWrappedComponent()\n {\n return field;\n }",
"public Component getComponent() {\n\treturn component;\n}",
"JComponent getImpl();",
"public void propertyChange(PropertyChangeEvent evt)\n/* */ {\n/* 76 */ CompoundPainter<?> painter = (CompoundPainter)this.ref.get();\n/* */ \n/* 78 */ if (painter == null) {\n/* 79 */ AbstractPainter<?> src = (AbstractPainter)evt.getSource();\n/* 80 */ src.removePropertyChangeListener(this);\n/* */ } else {\n/* 82 */ String property = evt.getPropertyName();\n/* */ \n/* 84 */ if ((\"dirty\".equals(property)) && (evt.getNewValue() == Boolean.FALSE)) {\n/* 85 */ return;\n/* */ }\n/* */ \n/* 88 */ painter.setDirty(true);\n/* */ }\n/* */ }",
"@Override\n public Object getCellEditorValue() {\n if (item_.allowed.length == 1) {\n if (item_.singleProp && item_.hasLimits) {\n return slider_.getText();\n } else if (item_.singlePropAllowed != null && item_.singlePropAllowed.length == 0) {\n return text_.getText();\n } else {\n return combo_.getSelectedItem();\n }\n } else {\n return combo_.getSelectedItem();\n }\n }",
"Builder addEditor(String value);",
"ISModifyComponent createISModifyComponent();",
"protected void PropertyChanged()\r\n { }",
"public String getComponent() {\n return this.component;\n }",
"public void propertyChange(PropertyChangeEvent evt) {\n \r\n }",
"public void setModalComponent( final Component value ) {\r\n this.modalComponent = value;\r\n }",
"public com.commercetools.api.models.type.CustomFields getCustom() {\n return this.custom;\n }",
"public com.commercetools.api.models.type.CustomFields getCustom() {\n return this.custom;\n }",
"public Component getPopupComponent() {\r\n return _component;\r\n }",
"void addCustomization(@NotNull EditorEx editor, @NotNull Feature feature);",
"public String setField(ColorFieldEditor field, Composite parent)\n {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null)\n {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n } \n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n } \n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n field.getColorSelector().setEnabled(false);\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n field.getLabelControl(parent).setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color. \n\n if (parent != null && !parent.isDisposed()) {\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getLabelControl(parent).setBackground(colorWhite);\n } else if (level != null && field.getLabelControl(parent).getEnabled()) {\n field.getLabelControl(parent).setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }",
"public Map addToEditor (Composite composite, Object listener);",
"private ch.softenvironment.view.SimpleEditorPanel getPnlEditor() {\n\tif (ivjPnlEditor == null) {\n\t\ttry {\n\t\t\tivjPnlEditor = new ch.softenvironment.view.SimpleEditorPanel();\n\t\t\tivjPnlEditor.setName(\"PnlEditor\");\n\t\t\tivjPnlEditor.setLayout(new javax.swing.BoxLayout(getPnlEditor(), javax.swing.BoxLayout.X_AXIS));\n\t\t\tivjPnlEditor.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjPnlEditor;\n}",
"public Component getTableCellEditorComponent(JTable table,\r\n Object value,\r\n boolean isSelected,\r\n int row,\r\n int column) { \r\n return jtextfield;\r\n }",
"@Override\n public boolean isCellEditable( Object node, int column )\n {\n if ( column == 0 )\n {\n return true;\n }\n\n if ( node instanceof Property )\n {\n Property p = ( Property )node;\n if ( p.isReadOnly() )\n {\n return false;\n }\n\n if ( p instanceof SimpleProperty )\n {\n return true;\n }\n\n // @pending At the moment if one property from the list of composite editor is read only all property is read only. Is there better idea?\n Object cepl = p.getDescriptor().getValue( BeanInfoConstants.COMPOSITE_EDITOR_PROPERTY_LIST );\n if ( cepl != null )\n {\n boolean bReadOnly = false;\n StringTokenizer st = new StringTokenizer( (String)cepl, \";, \" );\n while ( st.hasMoreTokens() )\n {\n Property prop = p.findProperty( st.nextToken() );\n if ( prop == null )\n {\n continue;\n }\n if ( ( bReadOnly = prop.isReadOnly() ) )\n {\n break;\n }\n }\n\n return !bReadOnly;\n }\n\n return ( ( PropertyDescriptor )p.getDescriptor() ).getPropertyEditorClass() != null;\n }\n\n return false;\n }",
"private void updateValue() {\n int type = -1;\n String name = null;\n Icon icon = null;\n if (rbProjectImages.isSelected()) {\n if (selectedFile != null) {\n name = FileUtil.getRelativePath(rootFolder, selectedFile);\n try {\n try {\n Image image = ImageIO.read(new File(selectedFile.getPath()));\n if (image != null) {\n icon = new ImageIcon(image);\n type = IconEditor.TYPE_FILE;\n } // no NbImageIcon will be created for invalid file\n } catch (IllegalArgumentException iaex) { // Issue 178906\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.INFO, null, iaex);\n icon = new ImageIcon(name);\n type = IconEditor.TYPE_FILE;\n }\n } catch (IOException ex) {\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.WARNING, null, ex);\n }\n }\n } else if (rbExternalImages.isSelected()) {\n if (selectedURL != null && !\"\".equals(selectedURL)) { // NOI18N\n type = IconEditor.TYPE_URL;\n name = selectedURL;\n try {\n try {\n Image image = ImageIO.read(new URL(selectedURL));\n if (image != null) {\n icon = new ImageIcon(image);\n type = IconEditor.TYPE_URL;\n }\n } catch (IllegalArgumentException iaex) { // Issue 178906\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.INFO, null, iaex);\n icon = new ImageIcon(new URL(selectedURL));\n }\n // for URL-based icon create NbImageIcon even if no icon can be loaded from the URL\n } catch (IOException ex) {\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.WARNING, null, ex);\n }\n }\n }\n\n ignoreSetValue = true;\n try {\n propertyEditor.setAsText(name);\n } finally {\n ignoreSetValue = false;\n }\n\n previewLabel.setIcon(icon);\n\n }",
"public void setModalComponent( final Component value ) {\n this.modalComponent = value;\n }",
"public void replacePropertyResolver(ActionEvent action) {\n FacesContext context = FacesContext.getCurrentInstance();\n Application app = context.getApplication();\n \n // see if we need to take action-\n if (null == context.getExternalContext().getSessionMap().get(\"systest.replacePropertyResolver\")) {\n final PropertyResolver oldProp = app.getPropertyResolver();\n PropertyResolver\n newProp = new PropertyResolver() {\n public Object getValue(Object base, Object property)\n throws EvaluationException, PropertyNotFoundException {\n return oldProp.getValue(base, property);\n }\n \n public Object getValue(Object base, int index)\n throws EvaluationException, PropertyNotFoundException {\n return oldProp.getValue(base, index);\n }\n \n public void setValue(Object base, Object property, Object value)\n throws EvaluationException, PropertyNotFoundException {\n TestBean.this.setValueChangeMessage(\"setValue() called\");\n oldProp.setValue(base, property, value);\n }\n \n public void setValue(Object base, int index, Object value)\n throws EvaluationException, PropertyNotFoundException {\n TestBean.this.setValueChangeMessage(\"setValue() called\");\n oldProp.setValue(base, index, value);\n }\n \n public boolean isReadOnly(Object base, Object property)\n throws EvaluationException, PropertyNotFoundException {\n return oldProp.isReadOnly(base, property);\n }\n \n public boolean isReadOnly(Object base, int index)\n throws EvaluationException, PropertyNotFoundException {\n return oldProp.isReadOnly(base, index);\n }\n \n public Class getType(Object base, Object property)\n throws EvaluationException, PropertyNotFoundException {\n return oldProp.getType(base, property);\n }\n \n public Class getType(Object base, int index)\n throws EvaluationException, PropertyNotFoundException {\n return oldProp.getType(base, index);\n }\n \n };\n app.setPropertyResolver(newProp);\n context.getExternalContext().getSessionMap().put(\"systest.replacePropertyResolver\", oldProp);\n }\n }",
"void onChangeEvent(CarPropertyValue value);",
"public java.lang.String getCustom() {\r\n return custom;\r\n }",
"public String setField(ComboFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\t\t\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): composite is disposed\");\n }\n // Updating a radio field with a null value should\n // cause the first button to be selected\n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n // Assume that editability on the project level is set\n // appropriately by a project-selection listener\n //field.getTextControl(composite).setEditable(false);\n field.getComboBoxControl().setBackground(colorWhite);\n Control[] children = field.getComboBoxControl().getChildren();\n if (children != null) {\n for (int i = 0; i < children.length; i++) {\n Button button = (Button) children[i];\n button.setBackground(PreferencesUtilities.colorWhite);\t\n }\n }\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when it's control\n // is disposed. In that case you can (evidently) change the\n // text in the field but not the background color.\t\n\n if (!parent.isDisposed()) {\n // Needed if color is set in loadWithInheritance()?\n // (Should the color be set in loadWithInheritance()?\n// if (field.isInherited()) {\n// field.getComboBoxControl(composite).setBackground(colorBluish);\n// } else {\n// field.getComboBoxControl(composite).setBackground(colorWhite);\n// }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }",
"@Test\r\n\tpublic void testComplexProperty() throws Exception {\r\n\t\tAdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tXMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider.getInstance()\r\n\t\t\t\t.getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\t// Retreiving value of the property.\r\n\t\tProperty subProperty = container.getProperty(\"complexProperty.stringProperty\");\r\n\t\tassertNotNull(subProperty);\r\n\r\n\t\t// Attaching monitor to the property.\r\n\t\tPropertyMonitorStub monitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexProperty.stringProperty\", monitor);\r\n\t\tsubProperty.setValue(subProperty.getValue() + \" - new value\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexProperty.stringProperty\", monitor);\r\n\r\n\t\t// Attaching monitor only to \"complexProperty\"\r\n\t\tmonitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexProperty\", monitor);\r\n\t\tsubProperty.setValue(\"\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexProperty\", monitor);\r\n\r\n\t\t// The monitor should not get the message now.\r\n\t\tsubProperty.setValue(\"newValue\");\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t}",
"@Override\n\tpublic void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {\n\t\tsuper.onPropertyModified(descriptor, oldValue, newValue);\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n public Component getUiComponent() {\n return this;\n }",
"@Override\n public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n }",
"public void propertyChange(PropertyChangeEvent e) {\n String prop = e.getPropertyName();\n\n if (isVisible()\n && (e.getSource() == optionPane)\n && (JOptionPane.VALUE_PROPERTY.equals(prop) ||\n JOptionPane.INPUT_VALUE_PROPERTY.equals(prop))) {\n Object value = optionPane.getValue();\n if (value == JOptionPane.UNINITIALIZED_VALUE)\n return;\n optionPane.setValue(JOptionPane.UNINITIALIZED_VALUE);\n\n if (btnString1.equals(value)) {\n \tint charsPerLine = (int)widthField.getValue();\n \tBufferedImage image = getFontImage(charsPerLine);\n \t\ttry {\n \t\t File file = new File(\"fontx.png\");\n \t\t ImageIO.write(image, \"png\", file);\n \t\t} catch (IOException ioe) {}\n \t\t}\n\t\t\tsetVisible(false);\n }\n\t}",
"public void setUIComponent(Component c) {}",
"@SuppressWarnings(\"unchecked\")\n public SocialLoginServiceEditor(@Nonnull String property, @Nonnull ValueEditor<?> editor,\n @Nonnull Function<Object, String> valueToString, @Nonnull Function<String, Object> stringToValue)\n {\n _property = property;\n _editor = (ValueEditor<Object>) editor;\n _valueToString = valueToString;\n _stringToValue = stringToValue;\n }",
"public abstract void addPropertyChangeListener(IPropertyChangeListener listener);",
"public void setEditor(Editor editor)\n {\n this.editor = editor;\n }",
"@Override\n public JComponent getComponent () {\n return this;\n }",
"public abstract void addPropertyChangeListener(PropertyChangeListener listener);",
"public Component getComponent() {\n return component;\n }",
"protected JComponent createEditor() {\n return spinner.getEditor(); }",
"protected ITextEditor getEditor() {\n return editor;\n }"
] | [
"0.7276921",
"0.7159521",
"0.63834417",
"0.61730313",
"0.6122743",
"0.5962125",
"0.596063",
"0.5926496",
"0.59202284",
"0.5853446",
"0.5828246",
"0.581879",
"0.5810057",
"0.5708868",
"0.5701236",
"0.56867737",
"0.5619229",
"0.5588056",
"0.5556847",
"0.5528636",
"0.549231",
"0.54758406",
"0.54419756",
"0.54124916",
"0.5412402",
"0.5396696",
"0.5390702",
"0.53708804",
"0.535491",
"0.53393734",
"0.5319896",
"0.52979976",
"0.529401",
"0.5290697",
"0.52858245",
"0.52783746",
"0.5241633",
"0.5222033",
"0.52214533",
"0.5211487",
"0.52023584",
"0.51959264",
"0.5193722",
"0.51758176",
"0.51686925",
"0.51686925",
"0.51669645",
"0.5162717",
"0.51556545",
"0.5151676",
"0.51475465",
"0.51445127",
"0.51339513",
"0.513103",
"0.51229465",
"0.5118533",
"0.5081211",
"0.5079375",
"0.50723195",
"0.5063838",
"0.50636536",
"0.50578284",
"0.5055537",
"0.5018008",
"0.500933",
"0.500192",
"0.50002575",
"0.49967697",
"0.49961495",
"0.49856055",
"0.4984312",
"0.4974387",
"0.4974387",
"0.49675098",
"0.49647838",
"0.49611",
"0.49602592",
"0.4959731",
"0.49545375",
"0.49542865",
"0.49463964",
"0.49437764",
"0.49327812",
"0.49277043",
"0.49188575",
"0.4909141",
"0.49072793",
"0.49043706",
"0.48991734",
"0.48806232",
"0.4877521",
"0.48711452",
"0.48658526",
"0.48658296",
"0.4864966",
"0.48637834",
"0.48637697",
"0.48634252",
"0.4854312",
"0.484686"
] | 0.65767324 | 2 |
Determines whether the propertyEditor can provide a custom editor. | public boolean supportsCustomEditor() {
PropertyEditor[] editors = getAllEditors ();
if (editors.length > 1) return true; // we must allow to choose the editor even if none of them supports custom editing
if (editors.length == 1) return editors[0].supportsCustomEditor ();
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).hasInPlaceCustomEditor ();\n } else {\n return false;\n }\n }",
"public boolean supportsCustomEditor() {\n\t\treturn true;\n\t}",
"public boolean hasEditor()\n\t{\n\t\treturn true;\n\t}",
"public abstract boolean isAllowCustomProperties();",
"public boolean hasCustom();",
"public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}",
"public java.awt.Component getInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).getInPlaceCustomEditor ();\n } else {\n return null;\n }\n }",
"@Override\n\tpublic boolean hasCustomUI() {\n\t\treturn false;\n\t}",
"public CustomModuleEditor getPropertyEditor() {\n\t return new SetErrorFunction();\n }",
"@Override\r\n\tprotected boolean hasEditSupport() {\n\t\treturn false;\r\n\t}",
"public boolean isPaintable() {\n return modifiedEditor.isPaintable ();\n }",
"public boolean isProperty();",
"protected boolean isLinkedWithEditor() {\n return modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR);\n }",
"public boolean hasCustomCodeSections() {\n\t\treturn m_customCodeSections != null && !m_customCodeSections.isEmpty();\n\t}",
"public boolean supportsEditingTaggedValues () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).supportsEditingTaggedValues ();\n } else {\n return false;\n }\n }",
"@Override\n public boolean isCellEditable( Object node, int column )\n {\n if ( column == 0 )\n {\n return true;\n }\n\n if ( node instanceof Property )\n {\n Property p = ( Property )node;\n if ( p.isReadOnly() )\n {\n return false;\n }\n\n if ( p instanceof SimpleProperty )\n {\n return true;\n }\n\n // @pending At the moment if one property from the list of composite editor is read only all property is read only. Is there better idea?\n Object cepl = p.getDescriptor().getValue( BeanInfoConstants.COMPOSITE_EDITOR_PROPERTY_LIST );\n if ( cepl != null )\n {\n boolean bReadOnly = false;\n StringTokenizer st = new StringTokenizer( (String)cepl, \";, \" );\n while ( st.hasMoreTokens() )\n {\n Property prop = p.findProperty( st.nextToken() );\n if ( prop == null )\n {\n continue;\n }\n if ( ( bReadOnly = prop.isReadOnly() ) )\n {\n break;\n }\n }\n\n return !bReadOnly;\n }\n\n return ( ( PropertyDescriptor )p.getDescriptor() ).getPropertyEditorClass() != null;\n }\n\n return false;\n }",
"boolean mo117961a(Editor editor);",
"@Override\n public boolean isPropertySupported(String name) {\n // !!! TBI: not all these properties are really supported\n return mConfig.isPropertySupported(name);\n }",
"@Override\n public boolean onCheckIsTextEditor() {\n return false;\n }",
"public boolean isVisualizeEditEnabled() {\n return visualizeEditEnabled;\n }",
"boolean hasCustomFeatures();",
"@Override\r\n\tpublic boolean isEnabled() {\r\n\t\tboolean result = false;\r\n\t\tif (getSelection().size() == 1) {\r\n\t\t\tif (getSelection().getFirstElement() instanceof IResource) {\r\n\t\t\t\tIResource resource = (IResource) getSelection().getFirstElement();\r\n\t\t\t\tString pomFileNames = AggregatedProperties.getPomFileNames(resource.getProject());\r\n\t\t\t\tStringTokenizer tkz = new StringTokenizer(pomFileNames, ConfigurationConstants.POM_FILES_SEPARATOR, false);\r\n\t\t\t\twhile (tkz.hasMoreTokens()) {\r\n\t\t\t\t\tif (resource.getName().equalsIgnoreCase(tkz.nextToken())) {\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public java.awt.Component getCustomEditor() {\n return new FormCustomEditor (this);\n }",
"public boolean getHasCustomArmor() {\n return this.hasCustomArmor;\n }",
"boolean isCustom(Object custom);",
"protected boolean isSupportedProperty(String propertyName, Namespace namespace) {\n if (!WebdavConstants.DAV_NAMESPACE.equals(namespace)) {\n return true;\n }\n \n return DAV_PROPERTIES.contains(propertyName);\n }",
"private boolean isCustomRenderer(ModelBlock p_177587_1_) {\n/* 741 */ if (p_177587_1_ == null)\n/* */ {\n/* 743 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 747 */ ModelBlock var2 = p_177587_1_.getRootModel();\n/* 748 */ return (var2 == MODEL_ENTITY);\n/* */ }",
"public boolean isEditingEnabled() {\r\n // Additional business logic can go here\r\n return (getContactSelection().getMinSelectionIndex() != -1);\r\n }",
"@CalledByNative\n @Override\n protected boolean isCustomTab() {\n return mDelegate.isCustomTab();\n }",
"boolean isSetCustomsDetails();",
"boolean hasCustomValue();",
"@DISPID(-2147417078)\n @PropGet\n boolean isTextEdit();",
"public boolean isSetCustomValues() {\n return this.customValues != null;\n }",
"public boolean isSetCustomValues() {\n return this.customValues != null;\n }",
"public boolean isSetCustomValues() {\n return this.customValues != null;\n }",
"public boolean canEdit() {\r\n\t\treturn !dslView.isContainsErrors();\r\n\t}",
"public static boolean hasNonOptionalEditors(Node node) {\n\t\tif (isAttachedWithNonOptionalEditor(node)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (Node child : findChildrenOfNode(node)) {\n\t\t\tif (hasNonOptionalEditors(child)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public void setHasCustom(boolean hasCustom);",
"public boolean editorconfig(String owner, String repo, String filepath) {\n return apiClient.get(String.format(\"/repos/%s/%s/editorconfig/%s\", owner, repo, filepath)).isOk();\n }",
"boolean hasAppliedModifier();",
"public final boolean arePropertiesSupported() {\n\treturn arePropertiesSupported;\n }",
"@Override\n public boolean hasCustomName() {\n return this.customName != null && !this.customName.isEmpty();\n }",
"public boolean getHasCustomPowers() {\n return this.hasCustomPowers;\n }",
"@Override\r\n public boolean isSystemProperty() throws Exception\r\n {\n return false;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isExternallyManaged();",
"public boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef) {\n Mode mode = intr.findCreatorBinding(creator);\n if (mode == Mode.PROPERTIES) {\n return true;\n }\n if (mode == Mode.DELEGATING) {\n return false;\n }\n if ((propDef != null && propDef.isExplicitlyNamed()) || intr.findInjectableValueId(creator.getParameter(0)) != null) {\n return true;\n }\n if (propDef != null) {\n String implName = propDef.getName();\n if (implName != null && !implName.isEmpty() && propDef.couldSerialize()) {\n return true;\n }\n }\n return false;\n }",
"private boolean isAdditionalPorperty(String propertyName)\n\t{\n\t\tif (propertyName == null)\n\t\t\treturn false;\n\t\t\n\t\treturn (!(this.definedPropertyKeys.contains(propertyName)));\n\t}",
"public boolean allowsEditing() {\n\t\tif (type==SOURCE) return true;\n\t\telse return false;\n\t}",
"boolean supports(Object descriptor);",
"boolean isCustomiseSet();",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"public boolean getHasCustomName() {\n return this.hasCustomName;\n }",
"@Override\n protected boolean calculateEnabled() {\n if (!super.calculateEnabled())\n return false;\n // allows only the editing of non-readonly parts\n return EditPartUtil.isEditable(getSelectedObjects().get(0));\n }",
"public boolean canAddParameters() {\n final PluginWrapper plugin = Hudson.getInstance().getPluginManager().getPlugin(\"parameterized-trigger\"); //$NON-NLS-1$\n return plugin != null && plugin.isActive();\n }",
"public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }",
"boolean hasManagedPlacementView();",
"protected abstract boolean isSupportedTestType(Properties prop);",
"protected boolean isEdit(){\n\t\treturn getArguments().getBoolean(ARG_KEY_IS_EDIT);\n\t}",
"private boolean canViewOptions() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }",
"@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }",
"boolean isSetValueCodeableConcept();",
"public boolean canBeMerged(MInspectSetting entity) {\n\t\treturn true;\n\t}",
"boolean hasProperty();",
"boolean hasProperty();",
"boolean hasProperty();",
"protected boolean activatePasteMetadata()\r\n {\r\n if (!hasViewMask(VIEW_MASK_ENABLE_PASTE_METADATA))\r\n {\r\n return false;\r\n }\r\n\r\n OwClipboard clipboard = ((OwMainAppContext) getContext()).getClipboard();\r\n switch (clipboard.getContentType())\r\n {\r\n case OwClipboard.CONTENT_TYPE_OW_OBJECT:\r\n return clipboard.getContent().size() == 1;\r\n\r\n case OwClipboard.CONTENT_TYPE_OW_FIELD:\r\n return clipboard.getContent().size() > 0;\r\n\r\n default:\r\n return false;\r\n }\r\n\r\n }",
"public boolean isEditing() { RMShape p = getParent(); return p!=null && p.isEditing(); }",
"public boolean needEnableExposureAdjustment() {\n if (CustomUtil.getInstance().getBoolean(CustomFields.DEF_CAMERA_ENABLE_COMPENSATION_OTHER_THAN_AUTO, true)) {\n return true;\n }\n return false;\n }",
"public final static native boolean isSupported() /*-{\r\n return !!$wnd.FileReader;\r\n }-*/;",
"public synchronized boolean isVisibleEditor(IWorkbenchWindow currentWindow,\n Object object) {\n Set<IEditorPart> parts = visibleParts.get(currentWindow);\n if (parts != null) {\n return parts.contains(object);\n }\n return false;\n }",
"@Override\n public boolean isInheritable(InheritedAccessEnabled access) {\n Preference preference = (Preference) access;\n if (preference.getVisibleAtRole() != null) {\n return true;\n }\n if (preference.isPropertyList()) {\n return !propertyBlackList.contains(preference.getProperty());\n } else {\n return true;\n }\n }",
"public boolean isSetPlugin() {\n return this.plugin != null;\n }",
"public boolean isEnabled () {\r\n\tcheckWidget();\r\n\treturn getEnabled () && parent.isEnabled ();\r\n}",
"@Override\n public boolean isConfigured()\n {\n return (config != null) && config.isValid() &&!config.isDisabled();\n }",
"boolean hasIngestJobSettingsPanel();",
"public static boolean areCustomCamerasActive(){\r\n\t\treturn runningCustomCameras;\r\n\t}",
"@Override\n\tpublic boolean execute(IEditorPart target) {\n\t\treturn false;\n\t}",
"public static boolean isDocRenderingEnabled(@NotNull Editor editor) {\n if (editor.getEditorKind() == EditorKind.DIFF) return false;\n Boolean value = editor.getUserData(DOC_RENDER_ENABLED);\n boolean enabled;\n try (AccessToken ignored = withClientId(ClientEditorManager.getClientId(editor))) {\n enabled = EditorSettingsExternalizable.getInstance().isDocCommentRenderingEnabled();\n }\n return value == null ? enabled : value;\n }",
"public final boolean isEdited(){\n\t\treturn JsUtils.getNativePropertyBoolean(this, \"edited\");\n\t}",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"@Override\n public boolean isInCustomActionMode() {\n return mActionMode != null;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIsModifier();",
"void addCustomization(@NotNull EditorEx editor, @NotNull Feature feature);",
"public boolean hasCustomInventoryName()\n {\n return this.hasCustomName;\n }",
"public Editor getEditor() { return editor; }",
"boolean hasSetProperty();",
"public boolean supportsCodeItem() {\n return (access & (Opcodes.ACC_ABSTRACT | Opcodes.ACC_INTERFACE | Opcodes.ACC_NATIVE)) == 0;\n }",
"@Override\n public boolean isPropertyEditable(String propertyName) {\n if (propertyName.startsWith(\"document.committeeList[0].committeeMemberships[\")) {\n return true;\n } else {\n return super.isPropertyEditable(propertyName);\n }\n }",
"public boolean markerAreEnabled() {\r\n if (resource == null) {\r\n return false;\r\n }\r\n if (!(preferences.isEnabled() && preferences.supportsResource(resource))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"boolean hasEnableInlineVm();",
"public boolean hasCustomInventoryName()\n {\n return this.hasCustomName();\n }",
"public boolean isSetDataCustom()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATACUSTOM$2) != 0;\n }\n }",
"public boolean isSetDataCustom()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATACUSTOM$2) != 0;\n }\n }",
"public boolean canInteract(){\n\t\treturn false;\n\t}",
"@Override\n\t\t\t\tpublic String isValid(Object value) {\n\t\t\t\t\treturn \"Editing not allowed!\";\n\t\t\t\t}",
"public boolean isKpiEditEnabled() {\n return kpiEditEnabled;\n }",
"public boolean hasPlugin() {\n return plugin != null;\n }",
"public boolean isCustomNameVisible ( ) {\n\t\treturn extract ( handle -> handle.isCustomNameVisible ( ) );\n\t}"
] | [
"0.80747366",
"0.77632844",
"0.6756932",
"0.6493587",
"0.62289006",
"0.621209",
"0.6128531",
"0.5882315",
"0.579506",
"0.57719034",
"0.56957227",
"0.5643207",
"0.5621906",
"0.558831",
"0.5547787",
"0.55383754",
"0.5505772",
"0.5496237",
"0.54841703",
"0.5476073",
"0.54740816",
"0.54712236",
"0.54509926",
"0.54349375",
"0.54337883",
"0.5423795",
"0.53618836",
"0.5358244",
"0.535586",
"0.53439397",
"0.53417915",
"0.5298138",
"0.52694577",
"0.52694577",
"0.52694577",
"0.526642",
"0.52544796",
"0.5252821",
"0.52526313",
"0.523705",
"0.52317506",
"0.52108765",
"0.5204145",
"0.51940423",
"0.51692414",
"0.51662225",
"0.516412",
"0.5161185",
"0.5145583",
"0.51455414",
"0.51358086",
"0.51341933",
"0.51295173",
"0.5118386",
"0.5114102",
"0.5095713",
"0.50951916",
"0.50931233",
"0.50845265",
"0.5083741",
"0.50827575",
"0.5072997",
"0.50720817",
"0.50720817",
"0.50720817",
"0.5066366",
"0.5061044",
"0.5060026",
"0.5058282",
"0.5033642",
"0.5026769",
"0.5017936",
"0.5016356",
"0.5016323",
"0.5011715",
"0.50063014",
"0.50019956",
"0.49946427",
"0.49908897",
"0.4989128",
"0.49887156",
"0.49887156",
"0.49884376",
"0.4985224",
"0.49828348",
"0.4982463",
"0.49822614",
"0.4976688",
"0.496954",
"0.49495304",
"0.49478877",
"0.49414492",
"0.4935149",
"0.49347755",
"0.49347755",
"0.49312228",
"0.49275377",
"0.49129242",
"0.49111113",
"0.4909922"
] | 0.8589582 | 0 |
EnhancedPropertyEditor implementation Get an inplace editor. | public java.awt.Component getInPlaceCustomEditor () {
if (modifiedEditor instanceof EnhancedPropertyEditor) {
return ((EnhancedPropertyEditor)modifiedEditor).getInPlaceCustomEditor ();
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }",
"public Editor getEditor() { return editor; }",
"@Api(1.0)\n public HaloPreferencesStorageEditor edit() {\n if (mCurrentEditor == null) {\n mCurrentEditor = new HaloPreferencesStorageEditor(getSharedPreferences());\n }\n return mCurrentEditor;\n }",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"public JawbComponent getEditorComponent () {\n if (editorComponent == null)\n initEditorComponent ();\n return editorComponent;\n }",
"public Object \n getCellEditorValue() \n {\n BaseEditor editor = null;\n if(pField.getPluginName() != null) {\n try {\n\tPluginMgrClient pclient = PluginMgrClient.getInstance();\n\teditor = pclient.newEditor(pField.getPluginName(), \n\t\t\t\t pField.getPluginVersionID(), \n\t\t\t\t pField.getPluginVendor());\n }\n catch(PipelineException ex) {\n }\n }\n \n return editor; \n }",
"public BaseEditorPanel getEditorPanel ()\n {\n return _epanel;\n }",
"protected ITextEditor getEditor() {\n return editor;\n }",
"private ch.softenvironment.view.SimpleEditorPanel getPnlEditor() {\n\tif (ivjPnlEditor == null) {\n\t\ttry {\n\t\t\tivjPnlEditor = new ch.softenvironment.view.SimpleEditorPanel();\n\t\t\tivjPnlEditor.setName(\"PnlEditor\");\n\t\t\tivjPnlEditor.setLayout(new javax.swing.BoxLayout(getPnlEditor(), javax.swing.BoxLayout.X_AXIS));\n\t\t\tivjPnlEditor.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjPnlEditor;\n}",
"protected abstract IEditorPreferences getPreferences();",
"public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}",
"public MyTextPane getEditor() {\n\t\treturn editor;\n\t}",
"public Object createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}",
"public EditPanel getEditPanel() { return ep; }",
"public boolean hasInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).hasInPlaceCustomEditor ();\n } else {\n return false;\n }\n }",
"protected final JTextComponent getComponent() {\n return editor;\n }",
"public CustomModuleEditor getPropertyEditor() {\n\t return new SetErrorFunction();\n }",
"public java.awt.Component getCustomEditor() {\n return new FormCustomEditor (this);\n }",
"protected InteractionDrawingEditor getViewEditor()\n {\n return view.getEditor();\n }",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"public synchronized IEditorPart getActiveEditor() {\n return activeEditorMap.get(currentWindow);\n }",
"public PetalEditor getEditor() {\n return petal_editor;\n }",
"public EditorView getEditorView() {\n\t\treturn this.editorView;\n\t}",
"public Component \t\n getTableCellEditorComponent\n (\n JTable table, \n Object value, \n boolean isSelected, \n int row, \n int column\n )\n {\n pField.setPlugin((BaseEditor) value);\n \n return pField;\n }",
"public InitialValueEditor getInitEditor() {\n return initEditor;\n }",
"public Editor getEditor() {\n if (currentEditor == null) {\n getTopEditor(); // this will trigger creation of a new top editor if it doesn't exist and currentEditor will be assigned with that one as well\n }\n return currentEditor;\n }",
"public Container getContainer() {\n return editor;\n }",
"@Override\n public TreeCellEditor getCellEditor() {\n final TreeCellEditor ed = super.getCellEditor();\n if (ed == null) {\n return null;\n }\n if (wrapper == null) {\n wrapper = new RendererEditorWrapper();\n }\n wrapper.ed = ed;\n return wrapper;\n }",
"public JFormattedTextField getEditComponent() {\r\n\t\tif(m_editComponent==null) {\r\n\t\t\t// create\r\n\t\t\tm_editComponent = createDefaultComponent(true,m_documentListener);\r\n\t\t\t//m_editComponent.getDocument().addDocumentListener(m_documentListener);\r\n\t\t}\r\n\t\treturn m_editComponent;\r\n\t}",
"public MapEditor getMapEditor() {\n\t\treturn mapEditor;\n\t}",
"public DivisionDataEdit asEditable() {\n return new DivisionDataEdit(this);\n }",
"Builder addEditor(String value);",
"protected abstract Entity getEditedEntity();",
"public static SlideshowEditor getInstance()\n {\n if (instance == null) {\n instance = new SlideshowEditor();\n }\n return instance;\n }",
"interface EditorImpl {\r\n void save(SharedPreferences.Editor editor);\r\n }",
"public PropertyEditor getCellEditor() {\n Icon[] iconArray = new Icon[LineStyle.getIconSet().values().size()];\n\t\tint i = 0;\n for ( Icon newIcon : LineStyle.getIconSet().values()) {\n ((VisualPropertyIcon)newIcon).setIconHeight(16);\n ((VisualPropertyIcon)newIcon).setIconWidth(16);\n iconArray[i++] = newIcon;\n\t\t}\n\n\t\tlineCellEditor.setAvailableValues(LineStyle.getIconSet().keySet().toArray());\n lineCellEditor.setAvailableIcons(iconArray);\n\t\treturn lineCellEditor;\n }",
"public final BooleanProperty editableProperty() {\n\n return this.getWrappedControl().editableProperty();\n }",
"public String getEditor() {\n return (String)getAttributeInternal(EDITOR);\n }",
"public String getEditor() {\n return (String)getAttributeInternal(EDITOR);\n }",
"public final SimpleBooleanProperty editableProperty() {\n return this.editable;\n }",
"public TopEntityEditor getTopEditor() {\n if (topEditor == null) {\n try {\n if (entity == null) {\n entity = createEntity();\n }\n if (entity == null) {\n return null;\n }\n topEditor = new TopEntityEditor(entity, getEditorDao());\n currentEditor = topEditor;\n } catch (InvalidEntityBeanPropertyException iepex) {\n throw new RuntimeException(\"Failed to instantiate EntityEditorManager topEditor - invalid entity bean property exception thrown while creating TopEntityEditor\", iepex);\n } catch (Exception ex) {\n throw new RuntimeException(\"Exception while creating a new entity in EntityEditorManager.createEntity()\", ex);\n }\n }\n return topEditor;\n }",
"protected MigrationEditorOperation getEditor() {\n IEditorPart editorPart = PluginUtil.getActiveEditor();\n if (editorPart instanceof MigrationEditorOperation) {\n return (MigrationEditorOperation) editorPart;\n }\n return null;\n }",
"public DelegatingCredentialRequestEditor getEditor() {\n return editor;\n }",
"public final MWC.GUI.Editable.EditorType getInfo()\r\n\t{\r\n\t\tif (_myEditor == null)\r\n\t\t\t_myEditor = new FieldInfo(this, this.getName());\r\n\r\n\t\treturn _myEditor;\r\n\t}",
"@Override\r\n\tpublic CellEditor createPropertyEditor(Composite parent) {\n\t\tMenuCellEditor editor = new MenuCellEditor(parent);\r\n\t\teditor.setListenerModel(flistenermodel);\r\n if (getValidator() != null) {\r\n\t\t\teditor.setValidator(getValidator());\r\n\t\t}\t\t\r\n\t\t return editor;\r\n\t}",
"public void setEditor(Editor editor)\n {\n this.editor = editor;\n }",
"public Popup makeEditPopup() {\n Popup popup = new Popup();\n popup.setY(0);\n popup.setX(0);\n GridPane pane = new GridPane();\n setUpPopupTexts();\n pane.setVgap(8);\n pane.setHgap(8);\n addColumn0(pane);\n addColumn1(pane);\n popup.getContent().add(pane);\n return popup;\n }",
"protected JComponent createEditor() {\n return spinner.getEditor(); }",
"@Override\r\n\tpublic TableCellEditor getCellEditor(int row, int column) {\n \treturn new MyTableCellEditor();\r\n\t}",
"public static SharedPreferences.Editor getSharedPrefsEditor() {\n return PreferencesUtils.getSharedPrefs().edit();\n }",
"public final boolean getEditable() {\n return this.editableProperty().getValue();\n }",
"public FieldModifierPropertyEditor() {\n super(Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.STATIC |\n Modifier.FINAL | Modifier.TRANSIENT | Modifier.VOLATILE);\n }",
"Builder addEditor(Person value);",
"public Object getEditorValue() {\r\n\t try{\r\n\t\treturn new Integer(getText());\r\n\t }catch(Exception e){}\r\n\t return null;\r\n\t}",
"public MWC.GUI.Editable.EditorType getInfo()\n\t{\n\t\tif (_myEditor == null)\n\t\t\t_myEditor = new InvestigateInfo(this);\n\n\t\treturn _myEditor;\n\t}",
"void setEditorController(EditorViewController gameEditorViewController);",
"public Component getTableCellEditorComponent(JTable table,\r\n Object value,\r\n boolean isSelected,\r\n int row,\r\n int column) { \r\n return jtextfield;\r\n }",
"private TaskEditor getTaskEditor(EditableTask editable) {\n \t\tif (editable.getEditor() == null) {\n // Create a new editor using the extension point data\n \t\t\tTaskEditor editor = TaskEditorManager.getInstance().getEditor(editable.getKind());\n \t\t\tif (editor != null) {\n \t\t\t\tComposite editorPanel = new Composite(taskEditorContainer, SWT.NULL);\n \t\t\t\tGridLayout layout = new GridLayout();\n \t\t\t\tlayout.marginWidth = 0;\n \t\t\t\tlayout.marginHeight = 0;\n \t\t\t\teditorPanel.setLayout(layout);\n \t\t\t\tmform.getToolkit().adapt(editorPanel);\n \t\t\t\teditor.createControl(editorPanel, mform.getToolkit());\n \t\t\t\teditable.setEditor(editor);\n \t\t\t\tGridData gridData = new GridData(GridData.FILL_BOTH);\n \t\t\t\teditor.getControl().setLayoutData(gridData);\n \t\t\t} \n \t\t}\n \t\treturn editable.getEditor();\t\n \t}",
"private static SharedPreferences.Editor getEditor(Context context) {\n SharedPreferences preferences = getSharedPreferences(context);\n return preferences.edit();\n }",
"public Object getValue() {\n\t\tif (present || isRequired()) {\t\t\t\n\t\t\treturn editorBinder.populateBackingObject();\n\t\t}\n\t\treturn null;\n\t}",
"public ConfmlEditor() {\r\n\t\tsuper();\r\n\t\tinitializeEditingDomain();\r\n\t}",
"public String getAsText() {\n return modifiedEditor.getAsText ();\n }",
"protected void addEditorPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_editor_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_editor_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__EDITOR,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }",
"public Object getItem ()\r\n {\r\n return editor.getText ();\r\n }",
"public final Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int rowIndex, int vColIndex) {\n ((JTextField) component).setText(value.toString());\n\n // Return the configured component\n return component;\n }",
"public NetworkEditor getNetworkEditor() {\n return panel.getNetworkEditor();\n }",
"@NotNull\n List<NlComponentEditor> getEditors();",
"public StringEditor() {\n\t\tsuper();\n\t\tmEditor = new JTextField();\n\t\t\n\t}",
"public boolean supportsCustomEditor() {\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic Object getEditableValue() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic SimpleBeanEditorDriver<Product, ?> createEditorDriver() {\n\t\tDriver driver = GWT.create(Driver.class);\n\t\tdriver.initialize(this);\n\n\t\treturn driver;\n\t}",
"@Nullable\n public JComponent getPreferredFocusedComponent() {\n return myEditor;\n }",
"public Object showDiscreteEditor() throws Exception {\n \t\treturn showEditor(EditorDisplayer.getEditor(this, EditorType.DISCRETE));\n \t}",
"public FCKEditorConfig getConfig()\n {\n return config;\n }",
"public LeafValueEditor<SSDate> asEditor() {\n return box.asEditor();\n }",
"public TreeTableCellEditor getEditor() {\n return treeTableCellEditor;\n }",
"public static IEditorPart getActiveEditor(){\r\n\t\tIWorkbench workbench = PlatformUI.getWorkbench();\r\n\t\tIWorkbenchWindow window = workbench.getActiveWorkbenchWindow();\r\n\t\tIWorkbenchPage page = window.getActivePage();\r\n\t\tIEditorPart editorPart = page.getActiveEditor();\r\n\t\treturn editorPart;\r\n\t}",
"public EditorPropertyDisplayer(Property p) {\n this(p, null);\n }",
"private AddressEditorPanel getCenterAddressEditorPanel() {\r\n if (this.centerAddressEditorPanel == null) {\r\n this.centerAddressEditorPanel = new AddressEditorPanel();\r\n }\r\n return this.centerAddressEditorPanel;\r\n }",
"public interface ComboPropertiesEditionPart {\n\n\t/**\n\t * @return the combo\n\t */\n\tpublic Object getCombo();\n\n\t/**\n\t * Init the combo\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initCombo(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new combo\n\t * @param newValue the new combo to set\n\t */\n\tpublic void setCombo(Object newValue);\n\n\t/**\n\t * Adds the given filter to the combo edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToCombo(ViewerFilter filter);\n\n\n\n\n\n\n\t/**\n\t * @return the comboRO\n\t */\n\tpublic Object getComboRO();\n\n\t/**\n\t * Init the comboRO\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initComboRO(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new comboRO\n\t * @param newValue the new comboRO to set\n\t */\n\tpublic void setComboRO(Object newValue);\n\n\t/**\n\t * Adds the given filter to the comboRO edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToComboRO(ViewerFilter filter);\n\n\n\n\n\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"public static OpenEditPolicy createOpenEditPolicy() {\n\t\treturn (new ShowViewEditPolicy())\n\t\t\t\t.createOpenEditPolicy(\"org.eclipse.ui.views.PropertySheet\");\n\t}",
"@Override\n\tpublic abstract EditableNode getEditable();",
"protected abstract BaseDualControlDataEditor<PK, DATA> instantiateEditorPanel () ;",
"public void setEditor(Editor editor) {\n this.currentEditor = editor;\n refreshView();\n }",
"public Editor edit() throws IOException {\n\t\t\treturn DiskLruCache.this.edit(key, sequenceNumber);\n\t\t}",
"public String getAsText() {\n\t\treturn mEditor.getText();\n\t}",
"public TableEditor openTableEditor(){\n this.save();\n\t\treturn new TableEditor(this.getTitle());\n\t}",
"public AdapterMapEditor getD_MapEditor() {\n return d_MapEditor;\n }",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"public UserFunctionEditor getUserFunctionEditor() {\n return (UserFunctionEditor) functionEditor;\n }",
"public KTableCellEditor getCellEditor() {\n\t\treturn null;\r\n\t}",
"Boolean getIsEditable() {\n\t\treturn isEditable;\n\t}",
"public Map addToEditor (Composite composite, Object listener);",
"public interface ACSUIEditor {\n\n ACSUIEditable getEditable(SimpleRequestContext src);\n\n ACSUIEditable getEditable();\n\n ACSUIEditable updatetEditable(SimpleRequestContext src);\n\n ACSUIEditable insertEditable(SimpleRequestContext src);\n\n ACSUIEditable deleteEditable(SimpleRequestContext src);\n\n ACSUIEditable[] getEditables(SimpleRequestContext src);\n\n String[] getColNames();\n\n String getType();\n\n boolean[] checkInputData(ACSRequestContext ctx);\n\n String getManagmentLabel();\n\n String getAddLabel();\n\n String getUpdateLabel();\n\n}",
"public FormFieldComponentCellEditor(FormFieldComponent editorComponent) {\n setEditorComponent(editorComponent);\n }",
"public java.lang.Boolean getEdit() {\n return edit;\n }",
"public interface ITextEditor extends ISelectionProvider {\r\n\r\n /**\r\n * a constant for Incresing e.g. the font size\r\n * \r\n * @author Lukas Balzer\r\n */\r\n String INCREASE = \"INCREASE\"; //$NON-NLS-1$\r\n /**\r\n * a constant for decreasing sth.\r\n * \r\n * @author Lukas Balzer\r\n */\r\n String DECREASE = \"DECREASE\"; //$NON-NLS-1$\r\n /**\r\n * constant for applying an italic style to some text\r\n */\r\n String ITALIC = \"ITALIC\"; //$NON-NLS-1$\r\n /**\r\n * constant for underlining text\r\n */\r\n String UNDERLINE = \"UNDERLINE\"; //$NON-NLS-1$\r\n /**\r\n * constant for for adding a strike out\r\n */\r\n String STRIKEOUT = \"STRIKEOUT\"; //$NON-NLS-1$\r\n /**\r\n * constant for addressing the foreground color\r\n */\r\n String FOREGROUND = \"FOREGROUND\"; //$NON-NLS-1$\r\n /**\r\n * constant for addressing the background color\r\n */\r\n String BACKGROUND = \"BACKGROUND\"; //$NON-NLS-1$\r\n /**\r\n * constant for applying a bold style to the text\r\n */\r\n String BOLD = \"BOLD\"; //$NON-NLS-1$\r\n /**\r\n * constant for adding an itemization\r\n */\r\n String DOT_LIST = \"DOT_LIST\"; //$NON-NLS-1$\r\n /**\r\n * constant for adding an enumeration\r\n */\r\n String NUM_LIST = \"NUM_LIST\"; //$NON-NLS-1$\r\n\r\n @SuppressWarnings(\"javadoc\")\r\n String FONT_SIZE = \"FONT_SIZE\"; //$NON-NLS-1$\r\n\r\n @SuppressWarnings(\"javadoc\")\r\n String FONT_FAMILY = \"FONT_FAMILY\"; //$NON-NLS-1$\r\n\r\n @SuppressWarnings(\"javadoc\")\r\n String FONT_SIZE_UP = \"FONT_SIZE_UP\"; //$NON-NLS-1$\r\n\r\n @SuppressWarnings(\"javadoc\")\r\n String FONT_SIZE_DOWN = \"FONT_SIZE_DOWN\"; //$NON-NLS-1$\r\n\r\n @SuppressWarnings(\"javadoc\")\r\n String DESCRIPTION = \"DESCRIPTION\"; //$NON-NLS-1$\r\n\r\n /**\r\n * Set style to chosen format if text gets modified or toolBar item pressed.\r\n * \r\n * @author Sebastian Sieber,Lukas Balzer\r\n * @param style\r\n * one of the constants defined in ITextEditor\r\n */\r\n void setStyle(String style);\r\n\r\n /**\r\n * @author Lukas Balzer\r\n *\r\n * @param color\r\n * one of {@link #FOREGROUND} and {@link #BACKGROUND}\r\n * @param rgb\r\n * the new rgbColor\r\n */\r\n void setStyleColor(String color, RGB rgb);\r\n\r\n /**\r\n * changes the font\r\n *\r\n * @author Lukas Balzer\r\n *\r\n * @param fontString\r\n * the name of the new Font\r\n * @param fontSize\r\n * the Size in points\r\n */\r\n void setFont(String fontString, int fontSize);\r\n\r\n /**\r\n * changes the font size\r\n *\r\n * @author Lukas Balzer\r\n * @param style\r\n * one of {@link #FONT_SIZE_DOWN},{@link #FONT_SIZE_UP},\r\n * {@link #FONT_SIZE}\r\n *\r\n * @param fontSize\r\n * the font size of the text in points\r\n */\r\n void setFontSize(String style, int fontSize);\r\n\r\n /**\r\n * Set a bullet to TextField.\r\n * \r\n * @author Sebastian Sieber\r\n * @param type\r\n * one of {@link #DOT_LIST},{@value #NUM_LIST}\r\n */\r\n void setBullet(String type);\r\n\r\n /**\r\n * registers the contributor by the editor so that the editor can react to its\r\n * calls\r\n * \r\n * @author Lukas Balzer\r\n *\r\n * @param contributor\r\n * the contributor, with which the user can manipulate the Text\r\n */\r\n void setEditToolContributor(ITextEditContribution contributor);\r\n\r\n}",
"public synchronized IEditorPart getActiveEditor(IWorkbenchWindow window) {\n return activeEditorMap.get(window);\n }",
"public String getEdited() {\n return Edited;\n }"
] | [
"0.67051846",
"0.6468789",
"0.64379156",
"0.6367531",
"0.6351032",
"0.6319841",
"0.63093346",
"0.6287627",
"0.62254125",
"0.61910546",
"0.61553514",
"0.6034928",
"0.60276526",
"0.6010315",
"0.6003747",
"0.5964801",
"0.5921965",
"0.58813995",
"0.58026576",
"0.5731145",
"0.5718253",
"0.5716508",
"0.5694477",
"0.56719387",
"0.56375855",
"0.56138074",
"0.55717623",
"0.55255216",
"0.5520628",
"0.54975796",
"0.5486751",
"0.54596037",
"0.5457515",
"0.54407114",
"0.54270005",
"0.5408437",
"0.5399892",
"0.5362269",
"0.5362269",
"0.5348363",
"0.5345028",
"0.53299385",
"0.5324635",
"0.5317278",
"0.5313022",
"0.5307448",
"0.5305853",
"0.5293571",
"0.52333117",
"0.5218072",
"0.5179252",
"0.51697433",
"0.51653475",
"0.5164432",
"0.5153614",
"0.51535106",
"0.51520824",
"0.5149239",
"0.51238424",
"0.5114393",
"0.51003414",
"0.5092769",
"0.50904924",
"0.506738",
"0.5065915",
"0.50650746",
"0.5064875",
"0.5055651",
"0.5038131",
"0.5030727",
"0.5025268",
"0.50214744",
"0.5008257",
"0.5004072",
"0.5003718",
"0.49818918",
"0.4972912",
"0.49698856",
"0.49668574",
"0.49528322",
"0.494651",
"0.49440718",
"0.49412683",
"0.4933234",
"0.49211434",
"0.491742",
"0.4903285",
"0.49002227",
"0.48893076",
"0.48893076",
"0.48884785",
"0.48845693",
"0.48809722",
"0.48756754",
"0.4871213",
"0.48665717",
"0.48658803",
"0.48618338",
"0.48604485",
"0.48551053"
] | 0.7462949 | 0 |
Test for support of inplace custom editors. | public boolean hasInPlaceCustomEditor () {
if (modifiedEditor instanceof EnhancedPropertyEditor) {
return ((EnhancedPropertyEditor)modifiedEditor).hasInPlaceCustomEditor ();
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean supportsCustomEditor() {\n\t\treturn true;\n\t}",
"@Override\r\n\tprotected boolean hasEditSupport() {\n\t\treturn false;\r\n\t}",
"public boolean supportsCustomEditor() {\n PropertyEditor[] editors = getAllEditors ();\n if (editors.length > 1) return true; // we must allow to choose the editor even if none of them supports custom editing\n if (editors.length == 1) return editors[0].supportsCustomEditor ();\n return false;\n }",
"@Override\n public void checkEditing() {\n }",
"public boolean hasEditor()\n\t{\n\t\treturn true;\n\t}",
"@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }",
"@Override\n public void testCreateAsEditor() {}",
"boolean isReplaceable();",
"public boolean isEditable() {\n/* 1014 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public abstract void checkEditing();",
"boolean isEditable();",
"public boolean supportsEditingTaggedValues () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).supportsEditingTaggedValues ();\n } else {\n return false;\n }\n }",
"public boolean allowsEditing() {\n\t\tif (type==SOURCE) return true;\n\t\telse return false;\n\t}",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"boolean isEdit();",
"@Override\n public boolean onCheckIsTextEditor() {\n return false;\n }",
"boolean mo117961a(Editor editor);",
"public boolean shouldEditButtonBePresent();",
"public boolean isEditable() {\n \t\treturn true;\n \t}",
"@Override\n\tpublic boolean execute(IEditorPart target) {\n\t\treturn false;\n\t}",
"public abstract void acceptEditing();",
"public void testGetEditor() {\n\t\tassertEquals(\"Wrong REDEditor returned.\", fEditor, fFinder.getEditor());\n\t}",
"public boolean replaceEdit(UndoableEdit anEdit) {\n throw new UnsupportedOperationException(\"The replaceEdit(UndoableEdit) method is not supported.\");\n }",
"public java.awt.Component getInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).getInPlaceCustomEditor ();\n } else {\n return null;\n }\n }",
"protected boolean isEdit(){\n\t\treturn getArguments().getBoolean(ARG_KEY_IS_EDIT);\n\t}",
"public default boolean isEditable(){ return false; }",
"protected void initializeEditors() {\n\t}",
"public boolean applyDialog() {\n\n\t\tif (!editorsAreValid())\n\t\t\treturn false;\n\t\t\t\n\t\ttry {\n\t\t\tconnection.callRPC(GDL_CONFIGURE_PROC_,\n\t\t\t\tnew Object[]{editedItem, getResultStructures(), connection.retrieveSession()},\n\t\t\t\t30000);\n\t\t} catch (Exception e) {\n\t\t\tTrace.exception(e);\n\t\t\treturn false;\n\t\t}\n\t\tchangedAttributes.clear();\n\t\treturn true;\n\t}",
"private boolean checkEditContent()\n {\n if (etUrl.hasContent() && etFilePath.hasContent())\n {\n return true;\n }\n return false;\n }",
"boolean shouldModify();",
"public boolean canImport(JComponent comp, DataFlavor[] flavors) {\n JTextComponent c = (JTextComponent)comp;\n if (!(c.isEditable() && c.isEnabled())) {\n return false;\n }\n return (getImportFlavor(flavors, c) != null);\n }",
"public interface Editable {\n\n void createValidationPatterns();\n void setUpButtonListeners();\n}",
"public boolean replaceEdit(UndoableEdit anEdit);",
"public boolean replaceEdit(UndoableEdit anEdit);",
"public boolean canEdit() {\r\n\t\treturn !dslView.isContainsErrors();\r\n\t}",
"public final boolean isEdited(){\n\t\treturn JsUtils.getNativePropertyBoolean(this, \"edited\");\n\t}",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"private static void OnToggleInsert(Object target, ExecutedRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(target); \r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly) \r\n {\r\n return;\r\n }\r\n\r\n This._OvertypeMode = !This._OvertypeMode;\r\n\r\n // Use Cicero's transitory extension for OverTyping. \r\n if (TextServicesLoader.ServicesInstalled && (This.TextStore != null))\r\n { \r\n TextServicesHost tsfHost = TextServicesHost.Current;\r\n if (tsfHost != null)\r\n {\r\n if (This._OvertypeMode) \r\n {\r\n IInputElement element = target as IInputElement; \r\n if (element != null) \r\n {\r\n PresentationSource.AddSourceChangedHandler(element, OnSourceChanged); \r\n }\r\n\r\n TextServicesHost.StartTransitoryExtension(This.TextStore);\r\n } \r\n else\r\n { \r\n IInputElement element = target as IInputElement; \r\n if (element != null)\r\n { \r\n PresentationSource.RemoveSourceChangedHandler(element, OnSourceChanged);\r\n }\r\n\r\n TextServicesHost.StopTransitoryExtension(This.TextStore); \r\n }\r\n } \r\n } \r\n }",
"public boolean isEditable() {\n \treturn model.isEditable();\n }",
"public void correcto( Editor<Tipo> editor );",
"@Override\n\t\t\t\tpublic String isValid(Object value) {\n\t\t\t\t\treturn \"Editing not allowed!\";\n\t\t\t\t}",
"public boolean canEditSnippet(Session session, Snippet snippet);",
"boolean hasReplace();",
"public boolean isCValueEditable();",
"public boolean tryEditingScheduledEvent();",
"boolean isReplaceable(TransferDescription description);",
"private boolean canChangeDocuments() {\n\n // If the text is modified, give the user a chance to\n // save it. Otherwise return true.\n\n if (fDocument.isModified()) {\n byte save = askSave(this, getTitle());\n if (save == YES) {\n return doSave();\n }\n else {\n return save == NO;\n }\n }\n else {\n return true;\n }\n }",
"public void runEditorExisting()\r\n\t{\r\n\t\tmainFrame.runEditorExisting();\r\n\t}",
"boolean isManipulated();",
"interface EditorImpl {\r\n void save(SharedPreferences.Editor editor);\r\n }",
"boolean isModified();",
"boolean isModified();",
"@Override\r\n\tpublic boolean editPosition(Position post) throws Exception {\n\t\treturn false;\r\n\t}",
"@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}",
"@Override\r\n public boolean isEditable(AuthenticationInfo obj) {\n if (CFG_GUI.CFG.isPresentationModeEnabled()) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean isEditable() {\n\t\treturn isEditable;\n\t}",
"public boolean isEditable() {\n\t\treturn isEditable;\n\t}",
"protected abstract IEditorPreferences getPreferences();",
"@Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M le decimos que no seran editables los componetnes\r\n return false;\r\n }",
"public boolean isLegalReplacement(byte[] repl) {\n return true;\n }",
"private void makeModifiable() {\n final TableEditor editor = new TableEditor(providers);\n editor.horizontalAlignment = SWT.LEFT;\n editor.grabHorizontal = true;\n editor.minimumWidth = 50;\n\n // editing the fourth column\n final int editable = 4;\n\n providers.addSelectionListener(new SelectionListener() {\n \n @Override\n public void widgetSelected(SelectionEvent exc) {\n\n TableItem item = (TableItem) exc.item;\n\n //Column should only be editable if arguments are allowed for the provider.\n if (item.getText(3).toString().equals(\"false\") || item == null) {\n return;\n }\n\n Control oldEditor = editor.getEditor();\n\n if (oldEditor != null) {\n oldEditor.dispose();\n }\n\n \n Text newEditor = new Text(providers, SWT.NONE);\n newEditor.setText(item.getText(editable));\n newEditor.addModifyListener(new ModifyListener() {\n\n \n @Override\n public void modifyText(ModifyEvent exc) {\n Text text = (Text) editor.getEditor();\n editor.getItem().setText(editable, text.getText());\n }\n });\n \n newEditor.selectAll();\n newEditor.setFocus();\n editor.setEditor(newEditor, item, editable); \n }\n\n @Override\n public void widgetDefaultSelected(SelectionEvent exc) {\n // TODO Auto-generated method stub\n }\n });\n \n for (int i = 0; i < TITLES.length; i++) {\n providers.getColumn(i).pack();\n }\n }",
"@Override\r\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn AdminUserEditForm.class.isAssignableFrom(clazz);\r\n\t}",
"public boolean isEditable() {\r\n return isEditable;\r\n }",
"private boolean isEditableRecipe() {\n\t\tUser user = User.getInstance();\n\t\tString userEmail = user.getEmail();\n\t\tString creatorEmail = currentRecipe.getCreatorEmail();\n\t\tif (userEmail.equalsIgnoreCase(creatorEmail)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"protected abstract void createFieldEditors();",
"protected abstract boolean supportsForUpdate();",
"@DISPID(-2147417078)\n @PropGet\n boolean isTextEdit();",
"boolean isOssModified();",
"public boolean isModified();",
"public boolean isModified();",
"public native boolean isEditable() /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\treturn jso.editable;\n }-*/;",
"void onNewTextSet(CodeEditor editor);",
"public boolean addEdit(UndoableEdit anEdit);",
"public boolean addEdit(UndoableEdit anEdit);",
"boolean canEditValueOfColumn(ModelColumnInfo<Item> column);",
"@Override\n public boolean getOrReplace() {\n return orReplace_;\n }",
"@Override\n public boolean getOrReplace() {\n return orReplace_;\n }",
"@MediumTest\n @Feature({ \"TextSelection\" })\n public void testEditableSelectionHandles() throws Throwable {\n doSelectionHandleTest(TestPageType.EDITABLE);\n }",
"boolean getOrReplace();",
"boolean getOrReplace();",
"public boolean actionReplaceable() {\n return mReplaceable;\n }",
"public static void registerEditor (ConfigEditor editor)\n {\n _editors.add(editor);\n }",
"public void testBug72337() {\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n IPath path = new Path(\"/foo/bar.txt\");\n IFile fileA = workspace.getRoot().getFile(path);\n FileEditorInput inputA1 = new FileEditorInput(fileA);\n OtherFileEditorInput inputA2 = new OtherFileEditorInput(fileA);\n assertTrue(inputA1.equals(inputA2));\n assertTrue(inputA2.equals(inputA1));\n }",
"void addCustomization(@NotNull EditorEx editor, @NotNull Feature feature);",
"public boolean canEdit() throws GTClientException\n {\n return isNewEntity();\n }",
"boolean openPageInEditMode();",
"public boolean isEditingEnabled() {\r\n // Additional business logic can go here\r\n return (getContactSelection().getMinSelectionIndex() != -1);\r\n }",
"public boolean isEditable()\n {\n return field.isEditable();\n }",
"public boolean isEdited() {\n return (_spItem.getAvEditState() == SpAvEditState.EDITED);\n }",
"public boolean canUndo();",
"public boolean canUndo();",
"public static boolean isEdit(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase EDIT:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isEditable()\n {\n return editable;\n }",
"@Override\n public boolean isDirty(Object value) {\n return !(value instanceof ModifyAwareOwner) || ((ModifyAwareOwner) value).isMarkedDirty();\n }",
"@Override\n protected void validateEdit(Fornecedor post) {\n\n }",
"@Override\n public boolean getOrReplace() {\n return orReplace_;\n }",
"@Override\n public boolean getOrReplace() {\n return orReplace_;\n }",
"public boolean doModify() {\n return true;\n }",
"@Override\r\n public boolean canEditDefinition(User user, Domain domain)\r\n {\n ExpSampleSet ss = getSampleSet(domain);\r\n if (ss == null || ExperimentService.get().ensureDefaultSampleSet().equals(ss))\r\n {\r\n return false;\r\n }\r\n return domain.getContainer().hasPermission(user, UpdatePermission.class);\r\n }"
] | [
"0.7119727",
"0.6899208",
"0.6615175",
"0.63828534",
"0.6280609",
"0.617863",
"0.6081377",
"0.60579664",
"0.6051266",
"0.60511243",
"0.6046735",
"0.58989114",
"0.5877185",
"0.58551127",
"0.58551127",
"0.5841044",
"0.58300257",
"0.58105177",
"0.57624155",
"0.5688234",
"0.5595035",
"0.5593634",
"0.55607533",
"0.55536443",
"0.55427665",
"0.550899",
"0.5504055",
"0.5495356",
"0.54932314",
"0.54823333",
"0.5474527",
"0.5470563",
"0.5438945",
"0.5432454",
"0.5432454",
"0.5374896",
"0.5357255",
"0.5348005",
"0.53424007",
"0.533106",
"0.5302807",
"0.52824277",
"0.52753353",
"0.52731824",
"0.5238297",
"0.52125496",
"0.51990134",
"0.51864225",
"0.5155007",
"0.5151435",
"0.51414007",
"0.5124728",
"0.5124728",
"0.51234907",
"0.51101035",
"0.5104741",
"0.50990736",
"0.50990736",
"0.509482",
"0.5088682",
"0.5087606",
"0.5080784",
"0.50729716",
"0.5072055",
"0.5071831",
"0.50643134",
"0.50491333",
"0.50392056",
"0.50356174",
"0.50318325",
"0.50318325",
"0.50291127",
"0.5024315",
"0.50097114",
"0.50097114",
"0.50091106",
"0.5005106",
"0.5005106",
"0.50048363",
"0.50045687",
"0.50045687",
"0.50029",
"0.50022954",
"0.49974445",
"0.4971146",
"0.4965694",
"0.49655116",
"0.49654076",
"0.4964258",
"0.49639302",
"0.49598145",
"0.49598145",
"0.49530867",
"0.49518248",
"0.49492785",
"0.49471778",
"0.49416864",
"0.49416864",
"0.49361184",
"0.4912787"
] | 0.7020007 | 1 |
Test for support of editing of tagged values. Must also accept custom strings, otherwise you may may specify a standard property editor accepting only tagged values. | public boolean supportsEditingTaggedValues () {
if (modifiedEditor instanceof EnhancedPropertyEditor) {
return ((EnhancedPropertyEditor)modifiedEditor).supportsEditingTaggedValues ();
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean supportsCustomEditor() {\n\t\treturn true;\n\t}",
"@Override\n\t\t\t\tpublic String isValid(Object value) {\n\t\t\t\t\treturn \"Editing not allowed!\";\n\t\t\t\t}",
"public boolean isCValueEditable();",
"protected boolean handleSpecialSetter(String bean, String value) throws OxyException {\r\n if (bean == \"name\") {\r\n setName(value);\r\n return true;\r\n } else if (bean == \"focused\") {\r\n if (\"true\".equals(value))\r\n grabFocus();\r\n else if (\"false\".equals(value))\r\n releaseFocus();\r\n else\r\n throw new OxyException(\"cannot parse focus with value \"+value);\r\n return true;\r\n } else if (bean == \"top\") {\r\n setTop(toFloat(bean, value));\r\n return true;\r\n } else if (bean==\"left\") {\r\n setLeft(toFloat(bean, value));\r\n return true;\r\n } else if (bean==\"bottom\") {\r\n setBottom(toFloat(bean, value));\r\n return true;\r\n } else if (bean==\"right\") {\r\n setRight(toFloat(bean, value));\r\n return true;\r\n } else if (bean == \"background\") {\r\n setBackground(Doc.parseColor(value));\r\n return true;\r\n } else if (bean == \"foreground\") {\r\n setForeground(Doc.parseColor(value));\r\n return true;\r\n } else if (bean == \"toolTipText\") {\r\n setToolTipText(value);\r\n return true;\r\n } else if (bean == \"theme\") {\r\n return true;\r\n } else if (bean == \"disabledForeground\") {\r\n setDisabledForeground(Doc.parseColor(value));\r\n return true;\r\n } else if (bean == \"next_up\") {\r\n upstr = value;\r\n return true;\r\n } else if (bean == \"next_left\") {\r\n leftstr = value;\r\n return true;\r\n } else if (bean == \"next_down\") {\r\n downstr = value;\r\n return true;\r\n } else if (bean == \"next_right\") {\r\n rightstr = value;\r\n return true;\r\n } else if (bean == \"class\" || bean == \"factory\") {\r\n return true;\r\n } else\r\n return false;\r\n }",
"public boolean supportsCustomEditor() {\n PropertyEditor[] editors = getAllEditors ();\n if (editors.length > 1) return true; // we must allow to choose the editor even if none of them supports custom editing\n if (editors.length == 1) return editors[0].supportsCustomEditor ();\n return false;\n }",
"@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }",
"boolean hasTagValue();",
"public boolean canModify(Object element, String property) {\r\n\t // Allow editing of all values\r\n\t return true;\r\n\t }",
"public void setTagProperty(String tagProperty);",
"@Override\n\tpublic boolean supports(Object value) {\n\t\treturn value != null && (value instanceof String);\n\t}",
"private boolean isEditValid ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint value = Integer.parseInt (super.getText ());\r\n\t\t\tboolean isValid = isInsideValidRange (value);\r\n\r\n\t\t\tif (isValid)\r\n\t\t\t{\r\n\t\t\t\tcommitEdit (value);\r\n\t\t\t}\r\n\r\n\t\t\treturn (isValid);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\t// Parse failed; therefore invalid\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t}",
"protected void editOccured(ModifyEvent e) {\n \n \t\tString aValue = text.getText();\n \t\tif (aValue == null) {\n \t\t\taValue = StringStatics.BLANK;\n \t\t}\n \t\tObject typedValue = aValue;\n \t\tboolean oldValidState = isValueValid();\n \t\tboolean newValidState = isCorrect(typedValue);\n \t\tif (typedValue == null && newValidState) {\n \t\t\tassert (false) : \"Validator isn't limiting the cell editor's type range\"; //$NON-NLS-1$\n \t\t}\n \t\tif (!newValidState) {\n \t\t\t// try to insert the current value into the error message.\n \t\t\tsetErrorMessage(\n \t\t\t\tMessageFormat.format(\n \t\t\t\t\tgetErrorMessage(),\n \t\t\t\t\tnew Object[] { aValue }));\n \t\t}\n \t\tvalueChanged(oldValidState, newValidState);\n \t}",
"private boolean isVal() {\n\t\treturn look.type == Tag.BOOLEAN || look.type == Tag.NUMBER\n\t\t\t\t|| look.type == Tag.STRING || look.type == Tag.NULL;\n\n\t}",
"@Override\r\n\tprotected boolean hasEditSupport() {\n\t\treturn false;\r\n\t}",
"boolean allowsValue (final String str, final ValidationContext vc)\n {\n try\n {\n getValue (str, vc);\n return true;\n }\n catch (final DatatypeException e)\n {\n return false;\n }\n }",
"Builder addEditor(String value);",
"@Override\n public boolean isTagged() {\n for (List<String> t : tags.values()) {\n if(!t.isEmpty()) return true;\n }\n return false;\n }",
"@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n String text = v.getText().toString();\n String tag = v.getTag().toString();\n\n switch (tag) {\n case \"frames\":\n setFrames(Integer.parseInt(text));\n break;\n case \"a\":\n setA(Float.parseFloat(text));\n break;\n case \"b\":\n setB(Float.parseFloat(text));\n break;\n case \"P\":\n setP(Float.parseFloat(text));\n break;\n default:\n return false;\n }\n return true;\n }",
"boolean isSetValueString();",
"public boolean hasInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).hasInPlaceCustomEditor ();\n } else {\n return false;\n }\n }",
"@DISPID(-2147417078)\n @PropGet\n boolean isTextEdit();",
"@Override\n protected boolean isValueIsValid(String value) {\n return false;\n }",
"boolean isEditable();",
"@Override\n public boolean isPropertyEditable(String propertyName) {\n if (propertyName.startsWith(\"document.committeeList[0].committeeMemberships[\")) {\n return true;\n } else {\n return super.isPropertyEditable(propertyName);\n }\n }",
"public abstract boolean isAllowCustomProperties();",
"public void setTag(String tagName, Object value);",
"private void writeTagTagInputTextareaValue(Set<String> textboxValues, StringWriter out, RDFaMetaWriter writer, RDFRepository _repository) throws RepositoryException, QueryEvaluationException, IOException {\n\t\tSet<Object> setTextboxValues = new HashSet<Object>();\n\t\tSet<String> setObjects = new HashSet<String>();\n\t\t\n\t\tfor (Iterator<String> iTextboxValues = textboxValues.iterator(); iTextboxValues.hasNext();) {\n\t\t\tObject varValues = iTextboxValues.next();\n\t\t\tif (!setTextboxValues.contains(varValues)) {\t\t\t\t\n\t\t\t\torg.openrdf.model.URI uriValueStatement = c.getValueFactory().createURI(varValues.toString());\n\t\t\t\ttry {\n\t\t\t\t\tStatement valueStatement = c.getObject(Statement.class, uriValueStatement);\t\t\t\t\t\n\t\t\t\t\tSet<Object> valueObjects = valueStatement.getRdfObjects();\n\t\t\t\t\t//Set<Object> setObjects = new HashSet<Object>();\t\t\t\t\t\n\t\t\t\t\tfor (Iterator<Object> iObjects = valueObjects.iterator(); iObjects.hasNext();) {\n\t\t\t\t\t\tObject varObjects = iObjects.next();\n\t\t\t\t\t\t//if (!setObjects.contains(varObjects)) {\n\t\t\t\t\t\tif (!setObjects.contains(varObjects.toString())) {\n\t\t\t\t\t\t\t//out.append(\" value=\\\"\" + varObjects.toString() + \"\\\"\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tout.append(varObjects.toString());\n\t\t\t\t\t\t\t//setObjects.add(varObjects);\n\t\t\t\t\t\t\tsetObjects.add(varObjects.toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//setObjects.add(varObjects);\n\t\t\t\t\t\t\tsetObjects.add(varObjects.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tsetTextboxValues.add(varValues);\t\t\t\t\t\n\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsetTextboxValues.add(varValues);\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"boolean isSetValueCodeableConcept();",
"private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }",
"public void validate(String value) throws UnsupportedPreferenceException { }",
"boolean isEdit();",
"boolean isSetTag();",
"@MediumTest\n @Feature({ \"TextSelection\" })\n public void testEditableSelectionHandles() throws Throwable {\n doSelectionHandleTest(TestPageType.EDITABLE);\n }",
"boolean supports(Object descriptor);",
"@Test\n public void parse_invalidValueFollowedByValidValue_success() {\n Index targetIndex = INDEX_FIRST_EVENT;\n String userInput = targetIndex.getOneBased() + INVALID_EVENT_NAME_DESC + EVENT_NAME_DESC_MA2101\n + VALID_FLAG_ALL;\n EditEventDescriptor descriptor = new EditEventDescriptorBuilder()\n .withEventName(VALID_EVENT_NAME_MA2101).build();\n EditCommand expectedCommand = new EditCommand(targetIndex, descriptor);\n assertParseSuccess(parser, userInput, expectedCommand);\n\n // other valid values specified\n userInput = targetIndex.getOneBased() + INVALID_EVENT_NAME_DESC + EVENT_NAME_DESC_MA2101\n + DESCRIPTION_DESC_MA2101 + VENUE_DESC_MA2101 + VALID_FLAG_ALL;\n descriptor = new EditEventDescriptorBuilder().withEventName(VALID_EVENT_NAME_MA2101)\n .withDescription(VALID_DESCRIPTION_MA2101).withVenue(VALID_VENUE_MA2101).build();\n expectedCommand = new EditCommand(targetIndex, descriptor);\n assertParseSuccess(parser, userInput, expectedCommand);\n }",
"@Override\n public void checkEditing() {\n }",
"boolean isSetValue();",
"boolean isSetValue();",
"private void setTagEditable(boolean bool){\n \t\teditTag.setVisible(!bool);\r\n \t\teditTag.setVisible(bool); //actually we want editTag visible false\r\n \t\t\r\n \t\tviewTag.setVisible(bool);\r\n \t\tviewTag.setVisible(!bool); //actually we want viewTag visible true\r\n \t}",
"protected boolean isEdit(){\n\t\treturn getArguments().getBoolean(ARG_KEY_IS_EDIT);\n\t}",
"private void setHasTag(int value) {\n \n hasTag_ = value;\n }",
"void accept(@NotNull T editText);",
"protected synchronized void setStringValue(String tag, String value) {\n if (actualProperties != null) {\n actualProperties.put(tag, value);\n }\n }",
"private static boolean hasTag(String value) {\n return value.contains(\"<\") || value.contains(\">\");\n }",
"@Override\n\tpublic boolean canSetLiteral() {\n\t\treturn heldObj.canSetLiteral();\n\t}",
"public boolean allowsEditing() {\n\t\tif (type==SOURCE) return true;\n\t\telse return false;\n\t}",
"@Test\n public void parse_invalidValueFollowedByValidValue_success() {\n Index targetIndex = INDEX_FIRST_RECIPE;\n String userInput = targetIndex.getOneBased() + INVALID_INGREDIENTS_DESC + INGREDIENTS_DESC_EGGS_ON_TOAST;\n EditRecipeDescriptor descriptor = new EditRecipeDescriptorBuilder()\n .withIngredients(VALID_INGREDIENTS_EGGS_ON_TOAST).build();\n ModifyCommand expectedCommand = new ModifyCommand(targetIndex, descriptor);\n assertParseSuccess(parser, userInput, expectedCommand);\n\n // other valid values specified\n userInput = targetIndex.getOneBased() + INSTRUCTIONS_DESC_EGGS_ON_TOAST + INVALID_INGREDIENTS_DESC\n + INGREDIENTS_DESC_EGGS_ON_TOAST;\n descriptor =\n new EditRecipeDescriptorBuilder().withIngredients(VALID_INGREDIENTS_EGGS_ON_TOAST)\n .withInstructions(VALID_INSTRUCTIONS_EGGS_ON_TOAST).build();\n expectedCommand = new ModifyCommand(targetIndex, descriptor);\n assertParseSuccess(parser, userInput, expectedCommand);\n }",
"public interface EditableFilterElement {\r\n\r\n\tpublic String getTextValue();\r\n}",
"public void correcto( Editor<Tipo> editor );",
"public boolean isTextValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_TEXT);\n }",
"@Override\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return columnIndex == VALUE_COLUMN;\n }",
"@Test\n void shouldRenderValidTags() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[ aA0._ ]] \",\n new MapOf<>(\"aA0._\", \"XX\")\n ),\n Matchers.is(\"XX \")\n );\n }",
"private void tagDataType()\n {\n List<DataTypeInfo> dtList = myDataTypesSupplier.get();\n if (!dtList.isEmpty())\n {\n List<DataTypeInfoDisplayNameProxy> pxyList = DataTypeInfoDisplayNameProxy.toProxyList(dtList, null);\n Object selected = JOptionPane.showInputDialog(myToolbox.getUIRegistry().getMainFrameProvider().get(),\n CHOOSE_DATA_TYPE, CHOOSE_DATA_TYPE, JOptionPane.QUESTION_MESSAGE, null, pxyList.toArray(), pxyList.get(0));\n\n if (selected != null)\n {\n DataTypeInfoDisplayNameProxy proxy = (DataTypeInfoDisplayNameProxy)selected;\n StringBuilder sb = new StringBuilder(128);\n sb.append(\"Data Type: \").append(proxy.getItem().getDisplayName()).append(\"\\n\" + \"Current Tags Are:\\n \")\n .append(proxy.getItem().getTags().toString())\n .append(\"\\n\\n\" + \"Add a tag by typing in a NEW string that is not in the list.\\n\"\n + \"Remove a tag by typing in an EXISTING tag name.\");\n String result = JOptionPane.showInputDialog(myToolbox.getUIRegistry().getMainFrameProvider(), sb.toString());\n if (result != null)\n {\n if (proxy.getItem().hasTag(result))\n {\n proxy.getItem().removeTag(result, this);\n }\n else\n {\n proxy.getItem().addTag(result, this);\n }\n }\n }\n }\n }",
"boolean isSetString();",
"@AutoEscape\n\tpublic String getTagProperty();",
"@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}",
"boolean hasCustomValue();",
"@JsonSetter(\"tags\")\n public void setTags (String value) { \n this.tags = value;\n }",
"@Override\r\n\tpublic boolean canModify(Object arg0, String arg1) {\n\t\treturn true;\r\n\t}",
"boolean visit(IPropertyDescriptor pd, Object value);",
"@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}",
"protected final void checkValue (String value) throws InvalidArgumentException {\n TreeUtilities.checkAttributeValue (value);\n }",
"public interface EdentInlineEditableObject {\n public static final String INSERT_VALUE = \"Povinná hodnota\";\n \n public void setStringValue(String name, String value);\n \n}",
"private boolean tagsMatch(Tag target, Tag test) {\n\t\tboolean checkValue = target.getValue() != null;\n\n\t\tif (checkValue) {\n\t\t\tif (test.equalsTypeValue(target))\n\t\t\t\treturn true;\n\n\t\t} else if (test.equalsType(target))\n\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"@Override\n\t\tpublic boolean inRange(String value) {\n\t\t\treturn true;\n\t\t}",
"@Override\n public void testCreateAsEditor() {}",
"@Override\n protected void validateEdit(Fornecedor post) {\n\n }",
"@Test\n\tpublic void addProperty() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\t\tXMLTagParser.editElement(\"Person\", \"residence\", \"milan\");\n\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"isRenting\", \"false\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"isRenting\"), \"false\");\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"hasGarage\", \"true\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"hasGarage\"), \"true\");\n\t}",
"@Override\n public Component getTableCellEditorComponent(JTable table, Object value,\n boolean isSelected, int rowIndex, int vColIndex) {\n\n if (isSelected) {\n // cell (and perhaps other cells) are selected\n }\n\n StateTableData data = (StateTableData) table.getModel();\n item_ = data.getPropertyItem(rowIndex);\n // Configure the component with the specified value\n\n if (item_.allowed.length == 0) {\n text_.setText((String) value);\n return text_;\n }\n\n if (item_.allowed.length == 1) {\n if (item_.singleProp) {\n if (item_.hasLimits) {\n // slider editing\n if (item_.isInteger()) {\n slider_.setLimits((int) item_.lowerLimit, (int) item_.upperLimit);\n } else {\n slider_.setLimits(item_.lowerLimit, item_.upperLimit);\n }\n try {\n slider_.setText((String) value);\n } catch (ParseException ex) {\n ReportingUtils.logError(ex);\n }\n return slider_;\n\n } else if (item_.singlePropAllowed != null && item_.singlePropAllowed.length > 0) {\n setComboBox(item_.allowed);\n return combo_;\n } else {\n text_.setText((String) value);\n return text_;\n }\n }\n }\n\n\n if (1 < item_.allowed.length) {\n boolean allNumeric2 = true;\n // test that first character of every possible value is a numeral\n // if so, show user the list sorted by the numeric prefix\n for (int k = 0; k < item_.allowed.length; k++) {\n if (item_.allowed[k].length() > 0 && !Character.isDigit(item_.allowed[k].charAt(0))) {\n allNumeric2 = false;\n break;\n }\n }\n if (allNumeric2) {\n Arrays.sort(item_.allowed, new SortFunctionObjects.NumericPrefixStringComp());\n } else {\n Arrays.sort(item_.allowed);\n }\n }\n\n setComboBox(item_.allowed);\n\n // Return the configured component\n return combo_;\n }",
"java.lang.String getTagValue();",
"@Override\n public boolean isCellEditable( Object node, int column )\n {\n if ( column == 0 )\n {\n return true;\n }\n\n if ( node instanceof Property )\n {\n Property p = ( Property )node;\n if ( p.isReadOnly() )\n {\n return false;\n }\n\n if ( p instanceof SimpleProperty )\n {\n return true;\n }\n\n // @pending At the moment if one property from the list of composite editor is read only all property is read only. Is there better idea?\n Object cepl = p.getDescriptor().getValue( BeanInfoConstants.COMPOSITE_EDITOR_PROPERTY_LIST );\n if ( cepl != null )\n {\n boolean bReadOnly = false;\n StringTokenizer st = new StringTokenizer( (String)cepl, \";, \" );\n while ( st.hasMoreTokens() )\n {\n Property prop = p.findProperty( st.nextToken() );\n if ( prop == null )\n {\n continue;\n }\n if ( ( bReadOnly = prop.isReadOnly() ) )\n {\n break;\n }\n }\n\n return !bReadOnly;\n }\n\n return ( ( PropertyDescriptor )p.getDescriptor() ).getPropertyEditorClass() != null;\n }\n\n return false;\n }",
"public boolean canProvideString();",
"Builder addEditor(Person value);",
"public boolean shouldEditButtonBePresent();",
"public void setToTag(String tag) throws ParseException,NullPointerException;",
"public default boolean isEditable(){ return false; }",
"public void setEditor(String value) {\n setAttributeInternal(EDITOR, value);\n }",
"public void setEditor(String value) {\n setAttributeInternal(EDITOR, value);\n }",
"public interface MaskFacet extends SingleStringValueFacet, ValidatingInteractionAdvisor {\r\n\r\n /**\r\n * Whether the provided string matches the mask.\r\n */\r\n public boolean doesNotMatch(NakedObject nakedObject);\r\n}",
"@Override\n public final boolean hasSpecialDefenseValueAttribute() {\n return true;\n }",
"public void setFromTag(String tag) throws ParseException,NullPointerException;",
"public abstract void checkEditing();",
"public void setALLOWMISCINVCREATION(java.lang.CharSequence value) {\n this.ALLOW_MISC_INV_CREATION = value;\n }",
"public boolean isAnyFieldEdited() {\n return CollectionUtil.isAnyNonNull(title, type, author, details, tags);\n }",
"@Override\n public void setAsText(String text) {\n logger.info(\"BookCheckedPropertyEditor Received text \" + text);\n String[] ids = text.split(\",\");\n List<Object> result = new ArrayList<Object>();\n for(String id : ids) {\n try {\n logger.info(\"BookCheckedPropertyEditor Converting id to \"+type+\" : \" + id);\n long idLong = Long.parseLong(id.trim());\n if(type.equals(TYPE_CATEGORIES)) {\n Category category = new Category();\n category.setId(idLong);\n ((List) result).add(category);\n } else if(type.equals(TYPE_WRITERS)) {\n Writer writer = new Writer();\n writer.setId(idLong);\n ((List) result).add(writer);\n }\n } catch (NumberFormatException e) {\n logger.error(\"Error on formatting String (\"+id+\") to Long\", e);\n }\n }\n setValue(result);\n }",
"@Override\n\tpublic boolean isTagged() {\n\t\treturn tagged;\n\t}",
"public CustomModuleEditor getPropertyEditor() {\n\t return new SetErrorFunction();\n }",
"public boolean canImport(JComponent comp, DataFlavor[] flavors) {\n JTextComponent c = (JTextComponent)comp;\n if (!(c.isEditable() && c.isEnabled())) {\n return false;\n }\n return (getImportFlavor(flavors, c) != null);\n }",
"boolean shouldReadValue();",
"boolean isCustomiseSet();",
"private void checkAttributes() throws JellyTagException\n {\n if (getField() == null)\n {\n throw new MissingAttributeException(\"field\");\n }\n if (getVar() == null)\n {\n if (!(getParent() instanceof ValueSupport))\n {\n throw new JellyTagException(\n \"No target for the resolved value: \"\n + \"Specify the var attribute or place the tag \"\n + \"in the body of a ValueSupport tag.\");\n }\n }\n }",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"@Override\n public boolean isInEditMode() {\n return mEditable;\n }",
"public boolean isAnyFieldEdited() {\n return CollectionUtil.isAnyNonNull(name);\n }",
"public Tag(Property.Name value) {\n\t}",
"public boolean isEditable() {\n/* 1014 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"<T> boolean shouldWriteValue(T value);",
"public boolean isAnyFieldEdited() {\n return CollectionUtil.isAnyNonNull(name, phone, email, tags);\n }",
"@JsonSetter(\"tags\")\n public void setTags (Object value) { \n this.tags = value;\n }",
"protected boolean setEnum(String name, Object value, PropertyDescriptor pd, Object bean)\n throws IllegalAccessException, InvocationTargetException, NoSuchMethodException{\n\n assert (name != null);\n assert (value != null);\n assert (pd != null);\n assert (bean != null);\n\n boolean success = false;\n Class propertyType = pd.getPropertyType();\n\n\n try{\n pd.getWriteMethod().invoke(bean, Enum.valueOf(propertyType, value.toString()));\n success = true;\n }\n catch (IllegalArgumentException e){\n\n //check if the emum has a parse(String) method, and use it if it does.\n Method parseMethod = propertyType.getDeclaredMethod(\"parse\", String.class);\n Enum parsedEnum = (Enum) parseMethod.invoke(\n propertyType.getEnumConstants()[0], value);\n pd.getWriteMethod().invoke(bean, parsedEnum);\n success = true;\n }\n\n return success;\n }"
] | [
"0.5854115",
"0.58302146",
"0.5744665",
"0.55852264",
"0.55422837",
"0.54856455",
"0.54579675",
"0.54534507",
"0.52655244",
"0.5215733",
"0.52153814",
"0.5212526",
"0.52083844",
"0.5205964",
"0.51781845",
"0.5158332",
"0.5155319",
"0.5145014",
"0.5144056",
"0.5133821",
"0.51317894",
"0.5098497",
"0.50963575",
"0.50865483",
"0.5067522",
"0.5034304",
"0.50339687",
"0.5012282",
"0.49631295",
"0.49494788",
"0.49449354",
"0.49257904",
"0.48864654",
"0.4876609",
"0.4866934",
"0.48640904",
"0.485912",
"0.485912",
"0.48484594",
"0.48429886",
"0.48261452",
"0.48229876",
"0.4817745",
"0.4815979",
"0.48085934",
"0.48048532",
"0.4801953",
"0.480007",
"0.4793532",
"0.47842005",
"0.47731793",
"0.47687453",
"0.4766655",
"0.47627267",
"0.47599664",
"0.47418156",
"0.47340488",
"0.47318742",
"0.47112864",
"0.4709963",
"0.47071603",
"0.47071096",
"0.47057223",
"0.46993586",
"0.46959662",
"0.46947342",
"0.46918228",
"0.46872365",
"0.4684701",
"0.46842092",
"0.46801105",
"0.46789855",
"0.4677412",
"0.46748784",
"0.4673026",
"0.46630976",
"0.46575353",
"0.46575353",
"0.46539643",
"0.46502644",
"0.46436542",
"0.4642782",
"0.4639174",
"0.46256828",
"0.46242458",
"0.4620217",
"0.46148482",
"0.46093494",
"0.45992967",
"0.4586838",
"0.4576289",
"0.45722586",
"0.45722586",
"0.45645568",
"0.45627022",
"0.45598528",
"0.45577136",
"0.45534456",
"0.4551997",
"0.45511913"
] | 0.7885981 | 0 |
Register a listener for the PropertyChange event. The class will fire a PropertyChange value whenever the value is updated. | public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
if (listeners == null) {
listeners = new java.util.Vector();
}
listeners.addElement(listener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addPropertyChangeListener(PropertyChangeListener listener);",
"public void addPropertyChangeListener(PropertyChangeListener listener);",
"public void addPropertyChangeListener(PropertyChangeListener l);",
"public abstract void addPropertyChangeListener(PropertyChangeListener listener);",
"public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener) {\n }",
"public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n }",
"@Override\n public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n }",
"public void addPropertyChangeListener(@NotNull PropertyChangeListener listener) {\n }",
"public void addListener(PropertyChangeListener listener, String propertyType);",
"public abstract void addPropertyChangeListener(IPropertyChangeListener listener);",
"public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n\t}",
"private static void usePropertyChangeListener() {\n SimpleStringProperty stringProperty = new SimpleStringProperty(\"xyz\");\n // Prints property's value\n System.out.println(stringProperty.getValue());\n // Adds a listener - action that will be run if property's value changes.\n stringProperty.addListener((observable, oldValue, newValue) -> {\n System.out.println(\"New value is set: \" + newValue);\n });\n // Sets new value\n stringProperty.setValue(\"Some new value\");\n }",
"public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\tgetPropertyChange().addPropertyChangeListener(listener);\r\n}",
"void addChangeListener(PropertyChangeListener<? super R> listener);",
"@Override\n public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n if (changes == null)\n {\n changes = new PropertyChangeSupport(this);\n }\n changes.addPropertyChangeListener(listener);\n }",
"void addPropertyListener(PropertyListener listener);",
"public void addPropertyChangeListener(PropertyChangeListener listener) {\n \tmPropertyChangeSupport.addPropertyChangeListener(listener);\n }",
"@Override\n public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {\n if (listeners == null) {\n listeners = new PropertyChangeSupport(this);\n }\n listeners.addPropertyChangeListener(listener);\n }",
"public void addPropertyChangeListener(PropertyChangeListener l) {\n getPropertyChangeSupport().addPropertyChangeListener(l);\n }",
"public void addPropertyChangeListener (PropertyChangeListener l)\n { pcs.addPropertyChangeListener (l); }",
"public void addPropertyChangeListener (PropertyChangeListener l) {\n pcs.addPropertyChangeListener (l);\n }",
"default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }",
"public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\r\n propertyChangeSupport.addPropertyChangeListener(l);\r\n }",
"public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener( l );\n }",
"public void addPropertyChangeListener (\n String propertyName,\n PropertyChangeListener l\n ) {\n pcs.addPropertyChangeListener (propertyName, l);\n }",
"public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\t\tgetPropertyChange().addPropertyChangeListener(listener);\n\t}",
"public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }",
"public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }",
"public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }",
"public void addPropertyChangeListener(PropertyChangeListener pListener) {\n \tmodel.addPropertyChangeListener(pListener);\n }",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}",
"public synchronized void addPropertyChangeListener(PropertyChangeListener l) {\n if (propertySupport == null) {\n propertySupport = new PropertyChangeSupport(this);\n }\n\n propertySupport.addPropertyChangeListener(l);\n }",
"public final void addPropertyChangeListener (PropertyChangeListener pl) {\n if (changeSupport == null)\n changeSupport = new PropertyChangeSupport (this);\n changeSupport.addPropertyChangeListener (pl);\n }",
"public void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\tmPcs.addPropertyChangeListener(listener);\n }",
"public void addPropertyChangeListener(PropertyChangeListener listener) {\n\t\tthis.propertyChangeSupport.addPropertyChangeListener(listener);\n\t\tthis.messages.addPropertyChangeListener(listener);\n\t\tthis.endGameReached.addPropertyChangeListener(listener);\n\t}",
"public void addPropertyChangeListener(Property property, PropertyChangeListener listener) {\n this.propertyChangeSupport.addPropertyChangeListener(property.name(), listener);\n }",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0)\n\t{\n\t\t\n\t}",
"static public void addPropertyChangeListener(PropertyChangeListener l) {\n if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) {\n accessibilityListener.installListeners();\n }\n listenerList.add(PropertyChangeListener.class, l);\n }",
"public synchronized void addPropertyChangeListener(PropertyChangeListener l) {\n addLImpl(null, l);\n }",
"public void addPropertyChangeListener(PropertyChangeListener pcl) {\n\t\tproperties.addListener(pcl);\n\t}",
"public String listen(String key, PropertyChangedCallback callback);",
"@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\r\n\t}",
"protected void addListenerForProperty(MapChangeListener<Object, Object> aMapChangeListener, String aProperty) {\n\n // Create a wrapper, which will only trigger the given Listener when the given property has changed.\n MapChangeListener<Object, Object> tmpListenerWrapper = (aChange -> {\n\n // Current document changed?\n if (aChange.getKey().equals(aProperty)) {\n\n aMapChangeListener.onChanged(aChange);\n }\n });\n\n // Add the wrapper listener to our List of added Listeners\n stagePropertiesListenersList.add(tmpListenerWrapper);\n\n // Add it to the stage properties.\n stage.getProperties().addListener(tmpListenerWrapper);\n }",
"public void propertyChange(PropertyChangeEvent evt) {\n \r\n }",
"void onPropertyChange(String name, String newValue);",
"@Override\n \tpublic void propertyChange(PropertyChangeEvent arg0) {\n \t\t\n \t}",
"PropertyChangeListener[] getPropertyChangeListeners();",
"public void addPropertyChangeListener(final PropertyChangeListener thePcl) {\n myPcs.addPropertyChangeListener(thePcl);\n }",
"public void addPropertyChangeListener(PropertyChangeListener listener) {\n listeners.removePropertyChangeListener(listener);\n listeners.addPropertyChangeListener(listener);\n }",
"void addChangeListener(ChangeListener listener);",
"public void setPropertyChanged(com.app.tvp.cas.cliente.PropertyChangedEventHandler propertyChanged) {\n this.propertyChanged = propertyChanged;\n }",
"public void addPropertyChangeListener(String propertyName, java.beans.PropertyChangeListener listener) {\n\tmPcs.addPropertyChangeListener(propertyName, listener);\n }",
"@Override\n public void addChangeListener(ChangeListener l) {}",
"public synchronized void addPropertyChangeListener(String propertyName,\n PropertyChangeListener l) {\n addLImpl(propertyName, l);\n }",
"public void setOnPropertyChangedListener(OnPropertyChangedListener l){\n _onPropertyChange = l;\n }",
"protected PropertyChangeListener createPropertyChangeListener() {\n return new PropertyChangeHandler(); }",
"@Override\n\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\n\t}",
"void addChangeListener(ChangeListener cl);",
"public void propertyChange(PropertyChangeEvent evt) {\r\n fireStateChanged();\r\n }",
"void addPropertyChangedObserver(PropertyChangeObserver observer);",
"public void setChangeListener();",
"protected void PropertyChanged()\r\n { }",
"public void propertyChange(String propertyName, Object oldValue, Object newValue) {\r\n propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue);\r\n }",
"public PropertyChangeListener[] getPropertyChangeListeners();",
"void onChangeEvent(CarPropertyValue value);",
"@Override\n public void addPropertyChangeListener( String propertyName, PropertyChangeListener listener )\n {\n if( componentModel == null )\n return;\n\n if( propertyName==null )\n {\n componentModel.addPropertyChangeListener( listener );\n }\n else\n {\n Property prop = componentModel.findProperty( propertyName );\n if ( prop != null )\n {\n prop.addPropertyChangeListener( listener );\n }\n }\n }",
"@Override\n public void addChangeListener(ChangeListener l) {\n }",
"@Override\n public void addChangeListener(ChangeListener l) {\n }",
"public void addPropertyChangeListener(PropertyChangeListener pcl) {\n\t\tthis.pcs.addPropertyChangeListener(pcl);\n\t}",
"public void addPropertyChangeListener(ActionListener<PropertyChangeEvent> l) {\n if (root != null) {\n Property prop = property;\n if (prop == null && tags != null) {\n prop = root.getEntity().findProperty(tags);\n }\n if (prop != null) {\n root.getEntity().addPropertyChangeListener(prop, pcl());\n }\n } else {\n Entity leafEntity = getLeafEntity();\n Property leafProperty = getLeafProperty();\n if (leafEntity != null && leafProperty != null) {\n leafEntity.getEntity().addPropertyChangeListener(leafProperty, pcl());\n }\n parent.addVetoablePropertyChangeListener(vpcl());\n parent.addListChangeListener(listChangeListener());\n }\n if (listeners == null) {\n listeners = new EventDispatcher();\n }\n listeners.addListener(l);\n \n }",
"public void propertyChange(PropertyChangeEvent e) {\n\n logger.debug(LOG_TAG + \".propertyChangeListener()\");\n String propertyName = e.getPropertyName();\n\n switch(propertyName) {\n case \"progress\":\n logger.info(\"client progress: \" + e.getNewValue());\n\n break;\n case \"state\":\n StateValue stateValue = ((StateValue)e.getNewValue());\n logger.info(\"client state: \" + stateValue.toString());\n\n switch(stateValue) {\n case STARTED:\n\n break;\n case PENDING:\n\n break;\n case DONE:\n\n break;\n } // eof switch\n } // eof switch\n\n }",
"public void addChangeListener(ChangeListener l) {\n }",
"public void addChangeListener(ChangeListener l) {\n }",
"public void addPropertyChangeListener(String propertyName,\n\t\t\tPropertyChangeListener listener) {\n\t\tpropertyChangeSupport.addPropertyChangeListener(propertyName, listener);\n\t}",
"private PropertyChangeListener createListener() {\n return new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent evt) {\n String propertyName = evt.getPropertyName();\n if (Filter.PROPERTY_PATTERN.equals(propertyName)) {\n DocumentViewPanel.RP.post(new Runnable() {\n @Override\n public void run() {\n refreshKeys();\n }\n });\n }\n }\n };\n }",
"public abstract void addPropertyChangeListener(PropertyChangeListener listener, String kenaiHostUrl);",
"public void addListener(PropertyChangeListener pcl) {\n\t\tthis.pcl = pcl;\n\t}",
"private void addListener(String propertyName, PropertyChangeListener pcl) {\r\n pcs.addPropertyChangeListener(propertyName, pcl);\r\n }",
"protected void do_childSupportFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public interface PropertyChangeListener<T>\n{\n /**\n * Callback function when there is a change in any property that starts with key\n * It's upto the implementation to handle the following different cases 1) key\n * is a simple key and does not have any children. PropertyStore.getProperty(key) must\n * be used to retrieve the value; 2) key is a prefix and has children.\n * PropertyStore.getPropertyNames(key) must be used to retrieve all the children keys.\n * Its important to know that PropertyStore will not be able to provide the\n * delta[old value,new value] or which child was added/deleted. The\n * implementation must take care of the fact that there might be callback for\n * every child thats added/deleted. General way applications handle this is\n * keep a local cache of keys and compare against the latest keys.\n * \n * @param key\n */\n void onPropertyChange(String key);\n}",
"public void addChangeListener(ChangeListener listener) { _changeListeners.add(listener); }",
"protected void do_utilityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public void testPropertyChange() {\n System.out.println(\"propertyChange\");\n PropertyChangeEvent evt = null;\n Wizard instance = new Wizard();\n instance.propertyChange(evt);\n }",
"public void registerChangedProperty(String theChangedKey, String theChangedValue) {\n this.theChangedKey = theChangedKey;\n this.theChangedValue = theChangedValue;\n }",
"public void firePropertyChange(String propertyName, Object oldValue, Object newValue);",
"public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue) {\r\n\tgetPropertyChange().firePropertyChange(propertyName, oldValue, newValue);\r\n}",
"public void propertyChange(final PropertyChangeEvent _event)\n {\n this.updateStyle();\n }",
"protected void do_socialSecurityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"protected void publishChangeEvent(T oldValue, T newValue) {\n PropertyChangeEvent evt = new PropertyChangeEvent(getOwner(), getPropertyName(),oldValue, newValue);\n synchronized (listeners){\n listeners.forEach(l -> {\n try{\n l.propertyChange(evt);\n }catch(Exception e){\n LOG.log(Level.SEVERE, \"Error in config change listener: \" + l, e);\n }\n });\n }\n }",
"@Override\n public void propertyChange(PropertyChangeEvent e) {\n this.updateCoords();\n }",
"@Override\n\tpublic void addPropertyChangeListener(PropertyChangeListener l) {\n\t\t//do nothing\n\t}",
"@Test\n public void testAddPropertyChangeListener() {\n // trivial\n }",
"void addChangeListener( RegistryListener listener );",
"public synchronized void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n Iterator<WeakReference<PropertyChangeListener>> i = listeners.iterator();\r\n boolean add = true;\r\n\r\n while (i.hasNext()) {\r\n PropertyChangeListener l = i.next().get();\r\n\r\n if (l == null)\r\n i.remove();\r\n else if (l.equals(listener))\r\n add = false;\r\n }\r\n if (add && listeners.add(new WeakReference<>(listener))\r\n && !this.added) {\r\n addThisToNotifier();\r\n this.added = true;\r\n }\r\n }",
"@Override\n public void propertyChange(final PropertyChangeEvent theEvent) {\n if (\"speed up\".equals(theEvent.getPropertyName())) {\n faster();\n } else if (\"change dimensions\".equals(theEvent.getPropertyName())) {\n myWidth = (int) theEvent.getOldValue();\n myHeight = (int) theEvent.getNewValue();\n } else if (\"update board\".equals(theEvent.getPropertyName())) {\n myGameMode = (String) theEvent.getOldValue();\n myBoard = (Board) theEvent.getNewValue();\n }\n }",
"@Override\n\tpublic void addValueChangeListener(final ValueChangeListener<T> listener) {\n\t\t\n\t}",
"protected void do_tanfFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"@Override\n public void propertyChange(PropertyChangeEvent evt) {\n\n System.out.println(\"Customer \" + this.name + \" observed a change in \" +\n evt.getPropertyName() + \" of \" + evt.getSource());\n\n System.out.println(\n evt.getOldValue() + \" has changed to \" + evt.getNewValue() + \". \");\n\n System.out.println();\n }"
] | [
"0.7865947",
"0.78184396",
"0.76406795",
"0.7618264",
"0.7615632",
"0.7611955",
"0.75188977",
"0.75170815",
"0.7485224",
"0.7469153",
"0.7374804",
"0.736847",
"0.7363966",
"0.7356467",
"0.72673637",
"0.72575706",
"0.71593857",
"0.7158329",
"0.71404636",
"0.7102974",
"0.7058887",
"0.7032813",
"0.70307064",
"0.7024005",
"0.70070964",
"0.6972398",
"0.6967698",
"0.6967698",
"0.6967698",
"0.69039476",
"0.6892244",
"0.68840665",
"0.68840665",
"0.6870222",
"0.6862177",
"0.6861115",
"0.68535995",
"0.6853166",
"0.6842506",
"0.6789701",
"0.6775829",
"0.6769783",
"0.6767866",
"0.6767508",
"0.67513037",
"0.6748341",
"0.6733188",
"0.66879505",
"0.6665125",
"0.6627173",
"0.6613455",
"0.6584566",
"0.6579849",
"0.6567583",
"0.6524779",
"0.6510754",
"0.650401",
"0.6500147",
"0.6496106",
"0.6477563",
"0.6460471",
"0.6460404",
"0.6459027",
"0.6446838",
"0.64442855",
"0.6443767",
"0.64320725",
"0.6395529",
"0.6374007",
"0.6374007",
"0.63653404",
"0.63627404",
"0.63436794",
"0.6332776",
"0.6332776",
"0.6319693",
"0.6300666",
"0.6288793",
"0.6244048",
"0.6240733",
"0.61963546",
"0.6143279",
"0.61373425",
"0.6124169",
"0.61126894",
"0.61081755",
"0.6107575",
"0.6086317",
"0.6059413",
"0.6053826",
"0.6052932",
"0.6020962",
"0.6014852",
"0.59994936",
"0.5991424",
"0.59823114",
"0.5965752",
"0.5963607",
"0.59629935",
"0.5961224"
] | 0.67281216 | 47 |
Remove a listener for the PropertyChange event. | public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
if (listeners == null) {
return;
}
listeners.removeElement(listener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removePropertyChangeListener(PropertyChangeListener listener);",
"void removePropertyChangeListener(PropertyChangeListener listener);",
"public void removePropertyChangeListener(PropertyChangeListener listener);",
"public void removePropertyChangeListener(PropertyChangeListener l);",
"public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener) {\n }",
"public void removePropertyChangeListener(PropertyChangeListener listener)\n {\n }",
"public abstract void removePropertyChangeListener(PropertyChangeListener listener);",
"@Override\n public void removePropertyChangeListener(PropertyChangeListener listener) {\n\n }",
"public void removePropertyChangeListener (PropertyChangeListener l)\n { pcs.removePropertyChangeListener (l); }",
"public void removePropertyChangeListener(@NotNull PropertyChangeListener listener) {\n }",
"@Override\n\tpublic void removePropertyChangeListener(PropertyChangeListener l) {\n\t\t//do nothing\n\t}",
"public void removePropertyChangeListener (PropertyChangeListener l) {\n pcs.removePropertyChangeListener (l);\n }",
"void removeChangeListener(PropertyChangeListener<? super R> listener);",
"public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\tgetPropertyChange().removePropertyChangeListener(listener);\r\n}",
"public abstract void removePropertyChangeListener(IPropertyChangeListener listener);",
"public void removeListener(PropertyChangeListener listener, String propertyType);",
"void removePropertyListener(PropertyListener listener);",
"public void removePropertyChangeListener(PropertyChangeListener listener) {\n\n\t}",
"@Override\n public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {\n if (listeners != null) {\n listeners.removePropertyChangeListener(listener);\n }\n }",
"public void removePropertyChangeListener(PropertyChangeListener listener) {\n \tmPropertyChangeSupport.removePropertyChangeListener(listener);\n }",
"public void removePropertyChangeListener(PropertyChangeListener l) {\n getPropertyChangeSupport().removePropertyChangeListener(l);\n }",
"default void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }",
"public void removePropertyChangeListener (\n String propertyName,\n PropertyChangeListener l\n ) {\n pcs.removePropertyChangeListener (propertyName, l);\n }",
"public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener( l );\n }",
"public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\r\n propertyChangeSupport.removePropertyChangeListener(l);\r\n }",
"public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener(l);\n }",
"public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener(l);\n }",
"public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener(l);\n }",
"public void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\tmPcs.removePropertyChangeListener(listener);\n }",
"public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\t\tgetPropertyChange().removePropertyChangeListener(listener);\r\n\t}",
"public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\t\tgetPropertyChange().removePropertyChangeListener(listener);\n\t}",
"static public void removePropertyChangeListener(PropertyChangeListener l) {\n listenerList.remove(PropertyChangeListener.class, l);\n if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) {\n accessibilityListener.removeListeners();\n }\n }",
"public final void removePropertyChangeListener (PropertyChangeListener pl) {\n if (changeSupport == null)\n return;\n changeSupport.removePropertyChangeListener (pl);\n }",
"public void removePropertyChangeListener(PropertyChangeListener pListener) {\n \tmodel.removePropertyChangeListener(pListener);\n }",
"public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {\r\n\t\tgetPropertyChange().removePropertyChangeListener(listener);\r\n\t}",
"public synchronized void removePropertyChangeListener(PropertyChangeListener l) {\n if (propertySupport != null) {\n propertySupport.removePropertyChangeListener(l);\n }\n }",
"@SuppressWarnings(\"unused\")\r\n public synchronized void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n Iterator<WeakReference<PropertyChangeListener>> i = listeners.iterator();\r\n while (i.hasNext()) {\r\n PropertyChangeListener l = i.next().get();\r\n\r\n if ((l == null) || l.equals(listener))\r\n i.remove();\r\n }\r\n if (this.added && (listeners.size() == 0)) {\r\n removeThisFromNotifier();\r\n this.added = false;\r\n }\r\n }",
"public void removePropertyChangeListener(final PropertyChangeListener thePcl) {\n myPcs.removePropertyChangeListener(thePcl);\n }",
"public void removePropertyChangeListener(Property property, PropertyChangeListener listener) {\n this.propertyChangeSupport.removePropertyChangeListener(property.name(), listener);\n }",
"public void removePropertyChangeListener(PropertyChangeListener listener) {\n\t\tthis.propertyChangeSupport.removePropertyChangeListener(listener);\n\t}",
"public void removePropertyChangeListener(ActionListener<PropertyChangeEvent> l) {\n if (listeners == null || !listeners.hasListeners()) {\n return;\n }\n listeners.removeListener(l);\n if (!listeners.hasListeners()) {\n if (pcl != null) {\n if (root != null) {\n Property prop = property;\n if (prop == null && tags != null) {\n prop = root.getEntity().findProperty(tags);\n }\n if (prop != null) {\n root.getEntity().removePropertyChangeListener(prop, pcl);\n }\n } else {\n Entity leafEntity = getLeafEntity();\n Property leafProperty = getLeafProperty();\n if (leafEntity != null && leafProperty != null) {\n leafEntity.getEntity().removePropertyChangeListener(leafProperty, pcl());\n }\n parent.removeVetoablePropertyChangeListener(vpcl());\n parent.removeListChangeListener(listChangeListener());\n }\n }\n }\n }",
"@Override\r\n public void rmValueListener(PropertyChangeListener l) {\n\r\n }",
"@Override\n public void removePropertyChangeListener( String propertyName,PropertyChangeListener listener )\n {\n if( componentModel == null )\n return;\n\n if( propertyName==null )\n {\n componentModel.removePropertyChangeListener( listener );\n }\n else\n {\n Property prop = componentModel.findProperty( propertyName );\n if ( prop != null )\n {\n prop.removePropertyChangeListener( listener );\n }\n }\n }",
"public void removeChangeListener(ChangeListener listener) { _changeListeners.remove(listener); }",
"public synchronized void removePropertyChangeListener(PropertyChangeListener l) {\n int cnt = listeners.size();\n for (int i = 0; i < cnt; i++) {\n Object o = ((WeakReference)listeners.get(i)).get();\n if (o == null || o == l) { // remove null references and the required one\n listeners.remove(i);\n interestNames.remove(i);\n i--;\n cnt--;\n }\n }\n }",
"protected void uninstallListeners() {\n frame.removePropertyChangeListener(propertyChangeListener);\n }",
"void removeListener(ChangeListener<? super T> listener);",
"void removeModelEventListener(PropertyChangeListener listener, Object modelelement, String propertyName);",
"public void removeChangeListener(ChangeListener l) {\n\t\t//do nothing\n\t}",
"void removePropertyChangedObserver(PropertyChangeObserver observer);",
"public X removePropertyChangeListener(PropertyChangeListener listener) {\n component.removePropertyChangeListener(listener);\n return (X) this;\n }",
"void removeModelEventListener(PropertyChangeListener listener, Object modelelement);",
"public abstract void removePropertyChangeListener(PropertyChangeListener listener, String kenaiHostUrl);",
"public X removePropertyChangeListener(String property, PropertyChangeListener listener) {\n component.removePropertyChangeListener(property, listener);\n return (X) this;\n }",
"@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \ttry {\n\t\t\tm.unRegisteredPropListener(mMyPropListener);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }",
"@Override\n\tpublic void addPropertyChangeListener(PropertyChangeListener l) {\n\t\t//do nothing\n\t}",
"void removeModelEventListener(PropertyChangeListener listener, Object modelelement, String[] propertyNames);",
"void removeModelEventListener(UmlChangeListener listener, Object modelelement, String propertyName);",
"public void removeChangeListener(ChangeListener<BufferedImage> listener) {\n observer.remove(listener);\n }",
"@Override\n\tpublic void removeValueChangeListener(final ValueChangeListener<T> listener) {\n\t\t\n\t}",
"@Override\n public void removeListener(ChangeListener<? super String> listener) {\n }",
"public void removeChangeListener(ChangeListener listener) {\n\t\tchangeListeners.remove(listener);\n\t}",
"@Test\n public void testRemovePropertyChangeListener() {\n // trivial\n }",
"protected void uninstallListeners() {\n spinner.removePropertyChangeListener(propertyChangeListener); }",
"protected void uninstallListeners() { this.tipPane.removePropertyChangeListener(this.changeListener); }",
"@Override\r\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.removeListener(notifyChangedListener);\r\n\t}",
"@Override\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"@Override\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}",
"public void removeChangeListener(ChangeListener listener) {\n listenerList.remove(ChangeListener.class, listener);\n }",
"public void removeListener(ValueChangedListener listener) {\n\t\t_listenerManager.removeListener(listener);\n\t}",
"public void removeChangeListener(ChangeListener listener) {\n if (listener == null) {\n return;\n }\n listeners.remove(listener);\n }",
"@Override\n public void removeListener() {\n this.mListener = null;\n }",
"void removeModelEventListener(UmlChangeListener listener, Object modelelement, String[] propertyNames);",
"void removeClassModelEventListener(PropertyChangeListener listener, Object modelClass, String propertyName);",
"public void removeDeepChangeListener(DeepChangeListener aLstnr) { removeListener(DeepChangeListener.class, aLstnr); }",
"void removeListener(MapChangeListener<? super K, ? super V> listener);",
"public void removeAllObjectChangeListeners()\n\t{\n\t\tlistenerList = null;\n\t}",
"public void removeAllObjectChangeListeners()\n\t{\n\t\tlistenerList = null;\n\t}",
"public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener listener) {\r\n\tgetVetoPropertyChange().removeVetoableChangeListener(listener);\r\n}",
"public void removeChangeListener(final ChangeListener listener) {\n listeners.remove(ChangeListener.class, listener);\n }",
"private void removeVetoablePropertyChangeListener(ActionListener<VetoablePropertyChangeEvent> l) {\n if (root != null) {\n Property prop = property;\n if (prop == null && tags != null) {\n prop = root.getEntity().findProperty(tags);\n }\n if (prop != null) {\n root.getEntity().addVetoablePropertyChangeListener(prop, l);\n }\n } else {\n Entity leafEntity = getLeafEntity();\n Property leafProperty = getLeafProperty();\n if (leafEntity != null && leafProperty != null) {\n leafEntity.getEntity().addVetoablePropertyChangeListener(leafProperty, l);\n }\n parent.addVetoablePropertyChangeListener(l);\n }\n }",
"@Override\n public void removeOnPropertyChangedCallback(OnPropertyChangedCallback callback) {\n }",
"@Override\n protected void componentClosed() {\n WindowManager.getDefault().getRegistry().removePropertyChangeListener(this);\n }",
"protected void RemoveEvents()\r\n {\r\n INotifyPropertyChanged propParent = (INotifyPropertyChanged)getProxyParent();\r\n propParent.getPropertyChanged().removeObservers(filterPropertyChanges);\r\n }",
"@Override\r\n protected void unregisterChangeListener()\r\n {\r\n getTabbedPane().removeChangeListener(this);\r\n }",
"@Override\n public void removeChangeListener(ChangeListener listener, Event[] events) {\n boolean addEvent[] = selectEventsToModify(events);\n if (addEvent[Event.LOAD.ordinal()]) {\n loadListeners.removeChangeListener(listener);\n }\n if (addEvent[Event.STORE.ordinal()]) {\n storeListeners.removeChangeListener(listener);\n }\n if (addEvent[Event.REMOVE.ordinal()]) {\n removeListeners.removeChangeListener(listener);\n }\n }",
"public synchronized void removeChangeListener(ChangeListener l) {\n if (changeListeners != null && changeListeners.contains(l)) {\n Vector v = (Vector) changeListeners.clone();\n v.removeElement(l);\n changeListeners = v;\n }\n }",
"@Override\n public void removeListener(InvalidationListener listener) {\n }",
"public void removeListener(INotifyChangedListener notifyChangedListener)\n {\n changeNotifier.removeListener(notifyChangedListener);\n }",
"public void stopListening(){\n\t\tcv.getConfigurer().getControlFieldProvider().removeChangeListener(this);\n\t}",
"public void removeBeanEventListener( String propertyName, String eventName,\n BeanEventListener listener )\n {\n Property prop;\n if ( propertyName == null || propertyName.length() == 0 )\n {\n prop = componentModel;\n }\n else\n {\n prop = componentModel.findProperty( propertyName );\n }\n\n if ( prop instanceof CompositeProperty )\n {\n ( ( CompositeProperty )prop ).removeBeanEventListener( eventName, listener );\n }\n }",
"public static void removeGenomeChangedListener(Listener<GenomeChangedEvent> l) {\n genomeController.removeListener(l);\n }",
"public void removeNameChangeListener(NameChangeListener listener) {\n this.listeners.remove(listener);\n }",
"public void registerStopListener(PropertyChangeListener listener) {\n\t\toyenteFinalizacion.addPropertyChangeListener(listener);\n\t}",
"public void removeObjectChangeListener(ObjectChangeListener listener)\n\t{\n\t\tif (listenerList == null)\treturn;\n\t\tlistenerList.remove(listener);\n\t\tif (listenerList.size()==0) listenerList = null;\n\t}",
"public void removeObjectChangeListener(ObjectChangeListener listener)\n\t{\n\t\tif (listenerList == null)\treturn;\n\t\tlistenerList.remove(listener);\n\t\tif (listenerList.size()==0) listenerList = null;\n\t}",
"public void removeFileChangeEventListener(final FileChangeEventListener listener) {\r\n\t\tlistenerList.remove(FileChangeEventListener.class, listener);\r\n\t}",
"public void removeListener(@NotNull ValueListener<V> listener) {\n\t\tlistener.listenerDetached();\n\t\tvalueListeners.remove(listener);\n\t}",
"void removeClassModelEventListener(PropertyChangeListener listener, Object modelClass, String[] propertyNames);",
"public void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}"
] | [
"0.8460438",
"0.8460438",
"0.84492695",
"0.8401049",
"0.8307183",
"0.8297566",
"0.82705283",
"0.8260456",
"0.8242832",
"0.8237461",
"0.8220812",
"0.8199435",
"0.81852955",
"0.8171702",
"0.81664944",
"0.81007177",
"0.80994856",
"0.80683243",
"0.7998911",
"0.7955098",
"0.79389006",
"0.79302204",
"0.7888188",
"0.7887737",
"0.78877205",
"0.7853922",
"0.7853922",
"0.7853922",
"0.7833616",
"0.7826125",
"0.7796284",
"0.77854985",
"0.7768066",
"0.77622706",
"0.7747186",
"0.7724413",
"0.7641856",
"0.75883454",
"0.7580273",
"0.7513712",
"0.74641997",
"0.74082464",
"0.7377399",
"0.72218734",
"0.7196088",
"0.71773285",
"0.7125792",
"0.7124838",
"0.70688957",
"0.70421934",
"0.69934607",
"0.69691324",
"0.69009376",
"0.6887836",
"0.68469816",
"0.67702395",
"0.67649287",
"0.6763581",
"0.6762986",
"0.67429966",
"0.6734986",
"0.67018",
"0.6679533",
"0.6663867",
"0.66578376",
"0.66483974",
"0.664091",
"0.664091",
"0.66248465",
"0.6568837",
"0.6566181",
"0.6562598",
"0.6555204",
"0.6546001",
"0.65076756",
"0.6472548",
"0.6469322",
"0.6469322",
"0.64566207",
"0.64561886",
"0.64352095",
"0.6432686",
"0.63956904",
"0.6385788",
"0.6363198",
"0.6349962",
"0.63391024",
"0.6337307",
"0.632546",
"0.6290857",
"0.62849885",
"0.6279877",
"0.6268599",
"0.62178373",
"0.61498505",
"0.61498505",
"0.61481947",
"0.6133884",
"0.6113465",
"0.609424"
] | 0.77771723 | 32 |
Report that we have been modified to any interested listeners. | void firePropertyChange() {
java.util.Vector targets;
synchronized (this) {
if (listeners == null) {
return;
}
targets = (java.util.Vector) listeners.clone();
}
PropertyChangeEvent evt = new PropertyChangeEvent(this, null, null, null);
for (int i = 0; i < targets.size(); i++) {
PropertyChangeListener target = (PropertyChangeListener)targets.elementAt(i);
target.propertyChange(evt);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void indicateModified() {\n invalidationListenerManager.callListeners(this);\n }",
"protected void notifyModificationListeners() {\r\n\t\tfor (ElementModificationListener l : modificationListeners) {\r\n\t\t\tl.elementModified(current);\r\n\t\t}\r\n\t}",
"private void notifyListeners() {\n\t\tfor(ModelListener l:listeners) {\n\t\t\tl.update();\t// Tell the listener that something changed\n\t\t}\n\t}",
"public void markChanged()\n \t{\n \t\tbChanged=true;\n \t}",
"private static void informListeners() {\r\n\t\tfor (ATEListener l : listeners) {\r\n\t\t\tl.classListChanged( );\r\n\t\t}\r\n\t}",
"protected synchronized void setChanged() {\n changed = true;\n }",
"private void changed() {\n // Ok to have a race here, see the field javadoc.\n if (!changed)\n changed = true;\n }",
"private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }",
"@Override\n\tpublic void setChanged() {\n\t\tthis.changed = true;\n\t}",
"public final synchronized void setChanged() {\n\t\tsuper.setChanged ();\n }",
"public boolean changed() {\r\n\t\treturn changed;\r\n\t}",
"public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }",
"void notifyAllAboutChange();",
"protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }",
"public void managerOutputModified(ManagerEvent e);",
"private void notifyListeners() {\n IDisplayPaneContainer container = (IDisplayPaneContainer) activeEditorMap\n .get(currentWindow);\n for (IVizEditorChangedListener listener : changeListeners) {\n listener.editorChanged(container);\n }\n }",
"public synchronized boolean hasChanged() {\n return changed;\n }",
"public boolean hasChanged();",
"public boolean hasChanged();",
"public void notifyChangementJoueurs();",
"@Override\n\tpublic boolean hasChanged() {\n\t\treturn this.changed;\n\t}",
"public boolean updated()\r\n\t{\r\n\t\treturn bChanged;\r\n\t}",
"public boolean modified() {\r\n\t\treturn modified;\r\n\t}",
"public boolean isChanged()\r\n\t{\r\n\t\treturn changed;\r\n\t}",
"public void alert(){\n\t\tfor (ChangeListener l : listeners) {\n\t\t\tl.stateChanged(new ChangeEvent(this));\n\t\t}\n\t}",
"public synchronized void setChanged() {\n super.setChanged();\n }",
"public void isChanged()\n\t{\n\t\tchange = true;\n\t}",
"public boolean isChanged() {\r\n return isChanged;\r\n }",
"public void handleModified(ModifiedEvent source) {}",
"private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}",
"public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}",
"private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }",
"@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}",
"protected void fireNameChanged() {\n\t\tfor(ReadingPointListener l : listeners) l.nameChanged(this);\n\t}",
"public void notifyListeners() {\n Logger logger = LogX;\n logger.d(\"notifyListeners: \" + this.mListeners.size(), false);\n List<IWalletCardBaseInfo> tmpCardInfo = getCardInfo();\n Iterator<OnDataReadyListener> it = this.mListeners.iterator();\n while (it.hasNext()) {\n it.next().refreshData(tmpCardInfo);\n }\n }",
"public void changed() {\n this.fireContentsChanged(this, 0, this.getSize() - 1);\n }",
"public void changedUpdate(DocumentEvent e)\n {\n performFlags();\n }",
"protected void initModifiedListeners()\n\t{\n\t\tif (path != null)\n\t\t{\n\t\t\tpath.addModifiedListener(this);\n\t\t}\n\t}",
"private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }",
"public void notifyObservers() {}",
"void\n notifyChange() {\n this.notifyChange = true;\n synchronized (this.changeMonitor) {\n this.changeMonitor.notifyAll();\n }\n }",
"@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}",
"public void willbeUpdated() {\n\t\t\n\t}",
"protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"private void notifyEventListListeners() {\n this.eventListListeners.forEach(listener -> listener.onEventListChange(this.getEventList()));\n }",
"public void detectAndSendChanges() {\n\t\tsuper.detectAndSendChanges();\n\n\t\tfor (int i = 0; i < this.listeners.size(); ++i) {\n\t\t\tIContainerListener containerListener = this.listeners.get(i);\n\n\t\t\tif (this.burnTime != this.inventory.getField(TileEntityGenerator.FIELD_BURN_TIME)) {\n\t\t\t\tcontainerListener.sendWindowProperty(this, TileEntityGenerator.FIELD_BURN_TIME,\n\t\t\t\t\t\tthis.inventory.getField(TileEntityGenerator.FIELD_BURN_TIME));\n\t\t\t}\n\n\t\t\tif (this.currentItemBurnTime != this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME)) {\n\t\t\t\tcontainerListener.sendWindowProperty(this, TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME,\n\t\t\t\t\t\tthis.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME));\n\t\t\t}\n\n\t\t\tif (this.curEnergy != this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ENERGY)) {\n\t\t\t\tcontainerListener.sendWindowProperty(this, TileEntityGenerator.FIELD_CURRENT_ENERGY,\n\t\t\t\t\t\tthis.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ENERGY));\n\t\t\t}\n\t\t}\n\n\t\tthis.burnTime = this.inventory.getField(TileEntityGenerator.FIELD_BURN_TIME);\n\t\tthis.currentItemBurnTime = this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ITEM_BURN_TIME);\n\t\tthis.curEnergy = this.inventory.getField(TileEntityGenerator.FIELD_CURRENT_ENERGY);\n\t}",
"public void printModified() {\n System.out.println(\"\\n\"\n + \"=== Modifications Not Staged For Commit ===\");\n }",
"public void changed() {\n // from ChangeHandler\n configSave.enable();\n }",
"public boolean hasChanges();",
"private static void fireMazeChanged() {\r\n\t\tfor (ATEListener l : listeners) {\r\n\t\t\tl.mazeChanged(currentMaze);\r\n\t\t}\r\n\t}",
"private void notifyListeners() \n\t{\n\t\tSystem.out.println(\"Event Source: Notifying all listeners\");\n\n\t\tfor(IListener listener : listeners)\n\t\t{\n\t\t\tlistener.eventOccured(new Event(this));//passing and object of source\n\t\t}\n\n\t}",
"@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}",
"long getLastChanged();",
"@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }",
"public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}",
"private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}",
"@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}",
"public void tellChanged(SearchTool searchTool) {\n updateAll();\n }",
"public void changed(boolean changed) {\r\n\t\tthis.changed = changed;\r\n\t}",
"protected void notifyListeners(CacheEvent e) {\n synchronized (listeners) {\n for (int i=0; i<listeners.size(); i++) {\n CacheListener l = (CacheListener) listeners.elementAt(i);\n l.cacheUpdated(e);\n }\n }\n }",
"public boolean changeMade()\n {\n return isChanged;\n }",
"@Override\n\tpublic void notifys() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update(this);\n\t\t}\n\t}",
"public void addListener(ModifiedEventListener listener) {\n\t\tlisteners.add(listener);\n\t}",
"@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}",
"protected boolean isDataChanged() {\n\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}",
"protected void notifyDirty() {\n Event evt = new Event();\n evt.item = this;\n evt.widget = this;\n SelectionEvent event = new SelectionEvent(evt);\n for (SelectionListener listener : dirtyListener) {\n listener.widgetSelected(event);\n }\n }",
"public boolean isChanged() {\n return this.changed;\n }",
"public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }",
"public void notifyObservers() {\n for (int i = 0; i < observers.size(); i++) {\n Observer observer = (Observer)observers.get(i);\n observer.update(this.durum);\n }\n }",
"protected void fireContentsChanged() {\r\n\t// Guaranteed to return a non-null array\r\n\tObject[] listeners = listenerList.getListenerList();\r\n\tListDataEvent e = null;\r\n\t// Process the listeners last to first, notifying\r\n\t// those that are interested in this event\r\n\tfor (int i = listeners.length-2; i>=0; i-=2) {\r\n\t if (listeners[i]==ListDataListener.class) {\r\n\t\t// Lazily create the event:\r\n\t\tif (e == null) {\r\n\t\t e = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED,\r\n\t\t\t\t\t 0, getSize()-1);\r\n\t\t}\r\n\t\t((ListDataListener)listeners[i+1]).contentsChanged(e);\r\n\t }\r\n\t}\r\n }",
"@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}",
"public void notifyObservers(){\n for (GameObserver g: observers){\n g.handleUpdate(new GameEvent(this,\n currentPlayer,\n genericWorldMap,\n gameState,\n currentTerritoriesOfInterest,\n currentMessage));\n }\n }",
"public void notifyChangementCroyants();",
"public void notifyObservers();",
"public void notifyObservers();",
"public void notifyObservers();",
"public boolean hasChanges() {\n return !(changed.isEmpty() && defunct.isEmpty());\n }",
"protected final void notifyContentChanged() {\n // notify all listeners (including parents)\n for (DialogModuleChangeListener listener : listeners) {\n listener.onContentChanged();\n }\n }",
"public void subjectChanged(){\n return; //TODO codavaj!!\n }",
"@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}",
"protected void notifyListeners() {\n // TODO could these be done earlier (or just once?)\n JMeterContext threadContext = getThreadContext();\n JMeterVariables threadVars = threadContext.getVariables();\n SamplePackage pack = (SamplePackage) threadVars.getObject(JMeterThread.PACKAGE_OBJECT);\n if (pack == null) {\n // If child of TransactionController is a ThroughputController and TPC does\n // not sample its children, then we will have this\n // TODO Should this be at warn level ?\n log.warn(\"Could not fetch SamplePackage\");\n } else {\n SampleEvent event = new SampleEvent(res, threadContext.getThreadGroup().getName(),threadVars, true);\n // We must set res to null now, before sending the event for the transaction,\n // so that we can ignore that event in our sampleOccured method\n res = null;\n- // bug 50032 \n- if (!getThreadContext().isReinitializingSubControllers()) {\n- lnf.notifyListeners(event, pack.getSampleListeners());\n- }\n+ lnf.notifyListeners(event, pack.getSampleListeners());\n }\n }",
"@Override\n\tpublic void onDataChanged()\n\t{\n\t\tfor (DataChangedCallbacks listener : this.dataChangedListeners)\n\t\t{\n\t\t\tlistener.onDataChanged();\n\t\t}\n\t}",
"@Override\n public void changedUpdate(DocumentEvent e) {\n verifierSaisie();\n }",
"void onListenerChanged(ListenerUpdate update);",
"public void updateObserver();",
"public boolean isModified();",
"public boolean isModified();",
"private void notifyObjectChanged(int index0, int index1) {\n\t\tlisteners.forEach(l -> l.objectsChanged(this, index0, index1));\n\t}",
"public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) {\n }",
"void reportPrimaryClipChanged() {\n synchronized (this.mPrimaryClipChangedListeners) {\n if (this.mPrimaryClipChangedListeners.size() <= 0) {\n return;\n }\n Object[] listeners = this.mPrimaryClipChangedListeners.toArray();\n }\n }",
"public final void fireModified(ModifiedEvent event) {\n\t\tif (allowNotificationsProperty().getValue()) {\n\t\t\tif (\tevent.getType() != ModifiedEventType.Save &&\n\t\t\t\t\t!(isHandlingActiveProperty().getValue() && \n\t\t\t\t\tevent.getSource().triggersModifyProperty().getValue() &&\t\t\t\t\t\n\t\t\t\t\tevent.getType() == ModifiedEventType.Active)) {\n\t\t\t\tstateProperty().getValue().add(State.Modified);\n\t\t\t}\n\t\t\t\n\t\t\t// Don't handle event if this was the object which fired it last\n\t\t\tif (event.getCaller() != this) {\n\t\t\t\thandleModified(event);\n\t\t\t\tevent = new ModifiedEvent(event, this);\n\t\t\t\t\n\t\t\t\tif (childLinkedAttributes != null && event.getAttributeOwner() == this) {\n\t\t\t\t\tLinkRecord record = childLinkedAttributes.get(event.getSource().getName().toLowerCase());\n\t\t\t\t\tif (record != null) {\n\t\t\t\t\t\tfireModified(new ModifiedEvent(findChildByName(record.linkName), ModifiedEventType.Link));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tBusinessObject owner = ownerProperty().getValue();\n\t\t\tif (owner != null) {\n\t\t\t\towner.fireModified(event);\n\t\t\t}\n\t\t\tfor(ModifiedEventListener listener : listeners) {\n\t\t\t\tlistener.handleModified(event);\n\t\t\t}\n\t\t\t\n\t\t\t// finished firing event...save the timestamp\n\t\t\tlastEventTimestamp = System.currentTimeMillis();\n\t\t}\n\t}",
"protected void addChangeListeners() {\n\t\tif (this.getChangeListenersAdded()) {\n\t\t\t// TODO don\\u00b4t throw an exception yet. CR has to fix another problem. then the exception is the right thing.\n\t\t\t// But what problem?! Should we just try this? UA\n\t\t\treturn;//throw new IllegalStateException();\n\t\t}\n\t\tthis.addCollectableComponentModelListeners();\n\t\tthis.addAdditionalChangeListeners();\n\t\tthis.bChangeListenersAdded = true;\n\n\t\tassert this.getChangeListenersAdded();\n\t}",
"void notifyObservers();",
"void notifyObservers();",
"private void reafficher() {\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}",
"public void notifyObservers()\n\t{\n\t\tsetChanged();\n\t\tnotifyObservers(new GameWorldProxy(this));\n\t}",
"@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer2 has received update!\");\r\n\t}",
"public void setModified();",
"protected void fireChange() {\n\t\tActionListener[] actionListenerArray = actionListeners.toArray(new ActionListener[0]);\n\t\tfor (int i = 0; i < actionListenerArray.length; i++) {\n\t\t\tActionListener listener = actionListenerArray[i];\n\t\t\tlistener.onActionChanged(this);\n\t\t}\n\t}"
] | [
"0.7617721",
"0.74043566",
"0.69044626",
"0.6868066",
"0.6770384",
"0.6762869",
"0.6698778",
"0.6485016",
"0.6468451",
"0.6467336",
"0.64594144",
"0.6440568",
"0.64216",
"0.6409504",
"0.6358885",
"0.6346565",
"0.628809",
"0.62871027",
"0.62871027",
"0.6281996",
"0.6281699",
"0.6271587",
"0.62703913",
"0.62682873",
"0.6256971",
"0.6243334",
"0.62345105",
"0.6232732",
"0.62326264",
"0.6205427",
"0.62021494",
"0.61808586",
"0.6180385",
"0.6174891",
"0.6172644",
"0.61626875",
"0.61609524",
"0.6156303",
"0.6155213",
"0.6155013",
"0.61481357",
"0.61441815",
"0.61083746",
"0.6107954",
"0.6072458",
"0.6067706",
"0.6062758",
"0.6052539",
"0.6046499",
"0.6045132",
"0.6041974",
"0.60324657",
"0.60307217",
"0.6018467",
"0.6015345",
"0.60102665",
"0.6008188",
"0.6007167",
"0.5999452",
"0.5978574",
"0.5976783",
"0.5971284",
"0.5958921",
"0.5953496",
"0.5949418",
"0.594721",
"0.59360033",
"0.59347546",
"0.592184",
"0.59218097",
"0.59188056",
"0.59014064",
"0.58974946",
"0.58963567",
"0.58880645",
"0.58880645",
"0.58880645",
"0.58814937",
"0.58808094",
"0.5879294",
"0.5877211",
"0.5871719",
"0.58665663",
"0.5855244",
"0.585278",
"0.5852555",
"0.58518714",
"0.58518714",
"0.58364695",
"0.5834116",
"0.58305377",
"0.5828137",
"0.5825089",
"0.58237624",
"0.58237624",
"0.58230346",
"0.58224344",
"0.58188844",
"0.5809587",
"0.58073187",
"0.5806652"
] | 0.0 | -1 |
/ renamed from: a | public final void mo4887a(Object obj) {
this.f15691a.mo18167L2((String) obj);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
TODO Autogenerated method stub / Properties key : Object Value : any type | public static void main(String[] args) {
Properties properties = new Properties();
properties.setProperty("cho", "조용근");
properties.setProperty("kang", "강성조");
properties.setProperty("lee", "이행엽");
for (Object key : properties.keySet()) {
System.out.println(properties.get(key));
}
/*
* Map
* key : any type?
* Value : any type
*/
HashMap<String, String> hashmap = new HashMap<String, String>();
hashmap.put("cho", "조용근");
hashmap.put("kang", "강성조");
hashmap.put("lee", "이행엽");
for (String key : hashmap.keySet()) {
System.out.println(hashmap.get(key));
}
System.out.println("-------------------------------");
/*
* Set (집합)
* Value : 중복을 허용하지 않음
*/
HashSet<String> hashset = new HashSet<String>();
hashset.add("조용근");
hashset.add("강성조");
hashset.add("이행엽");
for (String name : hashset) {
System.out.println(name);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void putValue(String key, Object value) {\n\n }",
"@Override\r\n\tpublic void putObject(Object key, Object value) {\n\t\t\r\n\t}",
"public Dict(Obj value) {\n this.value = value;\n }",
"@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}",
"void setObjectValue(Object dataObject);",
"void putValue(String key, Object data);",
"private EstadoAsistenciaType(String key, String value) {\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t}",
"@Override\n public T getValue(T object) {\n return object;\n }",
"ObjectValue createObjectValue();",
"public Object get_KeyValue(){return\t\t\t Id;}",
"@Override\n\tpublic void setValue(Object object) {\n\n\t}",
"@Override\n public Object setMetadata(String key, Object value) {\n return null;\n }",
"@Override\n public Object getValue(String key) {\n return null;\n }",
"@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}",
"@Override\n public String toString() {\n return key + \"=\" + value;\n }",
"@Override\r\n public String toString() {\r\n return key.toString() + \"=\" + value.toString();\r\n }",
"public final void value(Object o) {\n value(objectToInt(o));\n valueType = OBJECT_TYPE;\n }",
"@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\r\n public void updateEntryValue(Object key, Object value) throws Exception\r\n {\n }",
"@Override\r\n public Object getValue() {\r\n return value;\r\n }",
"@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}",
"@Override\n public Object getValue()\n {\n return value;\n }",
"public void setObject(Object object) {\n\t\tif(object==null)\n\t\t\treturn;\n\t\ttry {\n\t\t\t//BeanUtils.copyProperties(this,object);\n\t\t\tMap map=PropertyUtils.describe(object);\n\t\t\tSet set=map.keySet();\n\t\t\tIterator i=set.iterator();\n\t\t\twhile(i.hasNext())\n\t\t\t{\n\t\t\t\tStringBuffer method=new StringBuffer();\n\t\t\t\tmethod.append(\"get\");\n\t\t\t\tObject key=i.next();\n\t\t\t\t\n\t\t\t\tString s=(String)key;\n\t\t\t\tif(s.equals(\"class\"))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tString first=s.substring(0,1);\n\t\t\t\tmethod.append(first.toUpperCase());\n\t\t\t\tmethod.append(s.substring(1));\n\t\t\t\t//System.out.println(method);\n\t\t\t\t//Class clas=PropertyUtils.getPropertyType(dist,s);\n\t\t\t\tObject value=null;\n\t\t\t\tboolean po=false;\n\t\t\t\tClass clas=PropertyUtils.getPropertyType(object,s);\n\t\t\t\t\n\t\t\t\tif(clas==String.class)\n\t\t\t\t{\n\t\t\t\t\tvalue=MethodUtils.invokeExactMethod(object,method.toString(),null);\n\t\t\t\t\tpo=true;\n\t\t\t\t}\n\t\t\t\tif(clas==Long.class)\n\t\t\t\t{\n\t\t\t\t\tObject temp=MethodUtils.invokeExactMethod(object,method.toString(),null);\n\t\t\t\t\tvalue=temp.toString();\n\t\t\t\t\tpo=true;\n\t\t\t\t}\n\t\t\t\tif(clas== Date.class)\n\t\t\t\t{\n\t\t\t\t\tObject temp=MethodUtils.invokeExactMethod(object,method.toString(),null);\n\t\t\t\t\tDate d=(Date)temp;\n\t\t\t\t\tvalue=TimeUtil.getTheTimeStr(d);\n\t\t\t\t\tpo=true;\n\t\t\t\t}\n\t\t\t\tif(clas== Double.class)\n\t\t\t\t{\n\t\t\t\t\tObject temp=MethodUtils.invokeExactMethod(object,method.toString(),null);\n\t\t\t\t\tvalue=temp.toString();\n\t\t\t\t\tpo=true;\n\t\t\t\t}\n\t\t\t\tif(clas== BigDecimal.class)\n\t\t\t\t{\n\t\t\t\t\tObject temp=MethodUtils.invokeExactMethod(object,method.toString(),null);\n\t\t\t\t\tvalue=temp.toString();\n\t\t\t\t\tpo=true;\n\t\t\t\t}\n\t\t\t\tif(clas==Set.class)\n\t\t\t\t\tcontinue;\n\t\t\t\tif(clas==List.class)\n\t\t\t\t\tcontinue;\n\t\t\t\tif(clas==Map.class)\n\t\t\t\t\tcontinue;\n\t\t\t\tif(clas.isAssignableFrom(Collection.class))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(!po)\n\t\t\t\t{\n\t\t\t\t\tObject temp=MethodUtils.invokeExactMethod(object,method.toString(),null);\n\t\t\t\t\tif(temp!=null)\n\t\t\t\t\tvalue=MethodUtils.invokeExactMethod(temp,\"getId\",null);\n\t\t\t\t}\n\t\t\t\tif(value!=null)\n\t\t\t\t{\n\t\t\t\t\tthis.set(s,value);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchMethodException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n\t\tpublic void passivateObject(Object key, Object obj) throws Exception {\n\t\t}",
"@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tpublic Object getObject(Object key) {\n\t\treturn null;\r\n\t}",
"void set(String key, Object value);",
"Object getValueFrom();",
"public Object getValue() {\n\t\treturn object;\n\t}",
"private NoValue(K key) {\n this.key = key;\n }",
"public abstract Object getValue();",
"public abstract Object getValue();",
"public abstract Object getValue();",
"@Override\r\n\t\tpublic String toString() {\r\n\t\t\treturn key.toString() + \"=\" + value.toString();\r\n\t\t}",
"private Values(){}",
"public Object objectValue();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"public T value(final Object value) {\r\n\t\treturn values(value);\r\n\t}",
"public interface ValueObject<T> {\n\n /**\n * TODO BTF this is stupid. Use {@link #equals(Object)}.\n * \n * Value objects compare by the values of their attributes, they don't have an identity.\n *\n * @param other The other value object.\n * @return <code>true</code> if the given value object's and this value object's attributes are the same.\n */\n boolean sameValueAs(T other);\n\n}",
"public void setValue(Object o){\n \tthis.value = o;\n }",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"void setValue(Object value);",
"public Property(String key, Object value)\r\n {\r\n m_key = key;\r\n m_value = value;\r\n }",
"public HashEntry( AnyType e )\n {\n \tkey = e;\n }",
"@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}",
"void setObjectKey(String objectKey);",
"@Override\r\n\t\tpublic Object getUserData(String key)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n\tpublic T put(String key, T value) {\n\t\tString uKey = key.toUpperCase();\n\t\tif ( containsKey(uKey)){\n\t\t\treturn super.get(uKey);\n\t\t}else{\n\t\t\treturn super.put(uKey, value);\n\t\t}\n\t\t\n\t}",
"public Value(){}",
"public Object getValue() { return _value; }",
"private static Object mapValueToJava(Object value) {\n if (value instanceof Map) {\n value = ((Map<?, ?>) value).toMap();\n } else if (value instanceof Sequence) {\n value = ((Sequence<?>) value).toMappedList();\n } else if (value instanceof net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) {\n value = ((net.ssehub.easy.instantiation.core.model.vilTypes.Set<?>) value).toMappedSet();\n }\n return value;\n }",
"@Override\n public T getValue() {\n return entry.getValue().getValue();\n }",
"@Override\n public void onAccess(Object key, @Nullable Object value) {\n if (key instanceof String && (value == null || value instanceof String)) {\n systemPropertyQueried(convertToString(key), convertToString(value), consumer);\n }\n }",
"public JbootVoModel set(String key, Object value) {\n super.put(key, value);\n return this;\n }",
"private static Object toJavaObject(Value value) throws RepositoryException {\n switch (value.getType()) {\n case PropertyType.DECIMAL:\n return value.getDecimal();\n case PropertyType.BINARY:\n return new LazyInputStream(value);\n case PropertyType.BOOLEAN:\n return value.getBoolean();\n case PropertyType.DATE:\n return value.getDate();\n case PropertyType.DOUBLE:\n return value.getDouble();\n case PropertyType.LONG:\n return value.getLong();\n case PropertyType.NAME: // fall through\n case PropertyType.PATH: // fall through\n case PropertyType.REFERENCE: // fall through\n case PropertyType.STRING: // fall through\n case PropertyType.UNDEFINED: // not actually expected\n default: // not actually expected\n return value.getString();\n }\n }",
"public Value get(Key key) ;",
"@Override\r\n public void store(long key, O object) throws OBException {\n }",
"public\tvoid setobject(object obj) {\r\n\t\t oop.value=obj.value;\r\n\t\t oop.size=obj.size;\r\n\t\t \r\n\t}",
"public void setValue(Object value) { this.value = value; }",
"public void setValue(Object value);",
"protected CacheObject(T value) {\n this.value = value;\n }",
"@Override\n public boolean equals(final Object obj)\n {\n return this.value.equals(obj);\n }",
"protected static Object getObjectFromValue(Value value)\n {\n switch (value.getDataType())\n {\n case Boolean:\n return value.getBoolean();\n case Integer:\n return value.getInteger();\n case Long:\n return value.getLong();\n case Double:\n return value.getDouble();\n default:\n return value.getString();\n }\n }",
"@Override\n public boolean isObject() {\n return false;\n }",
"@Override\n\tpublic String getObjectKey() {\n\t\treturn OBJECT_KEY;\n\t}",
"public T caseValue(Value object) {\n\t\treturn null;\n\t}",
"public T caseValue(Value object) {\n\t\treturn null;\n\t}",
"public T caseValue(Value object) {\n\t\treturn null;\n\t}",
"private void put(String aKey, Object aValue) {\n\t\tmData.put(aKey, getValue(aValue));\n\t}",
"public ValueWrapper(Object value) {\n\t\tsuper();\n\t\tthis.value = value;\n\t}",
"Object getContainedValue();",
"@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}",
"void setValue(Object object, Object value);",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic void put (JSONObject target , String key ,Object value) {\r\n\t\tif ( value==null){\r\n\t\t\ttarget.put(key, JSONNull.getInstance());\r\n\t\t\treturn ; \r\n\t\t}\r\n\t\tif ( value instanceof String[]){\r\n\t\t\tString arr[] =(String[])value;\r\n\t\t\tif ( arr.length>0){\r\n\t\t\t\tJSONArray objArr = new JSONArray();\r\n\t\t\t\tint i =0;\r\n\t\t\t\tfor ( String scn : arr){\r\n\t\t\t\t\tobjArr.set(i++, new JSONString(scn));\r\n\t\t\t\t}\r\n\t\t\t\ttarget.put(key, objArr);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( value instanceof int[]){\r\n\t\t\tint arr[] =(int[])value;\r\n\t\t\tif ( arr.length>0){\r\n\t\t\t\tJSONArray objArr = new JSONArray();\r\n\t\t\t\tint i =0;\r\n\t\t\t\tfor ( int scn : arr){\r\n\t\t\t\t\tobjArr.set(i++, new JSONNumber(scn));\r\n\t\t\t\t}\r\n\t\t\t\ttarget.put(key, objArr);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( value instanceof float[]){\r\n\t\t\tfloat arr[] =(float[])value;\r\n\t\t\tif ( arr.length>0){\r\n\t\t\t\tJSONArray objArr = new JSONArray();\r\n\t\t\t\tint i =0;\r\n\t\t\t\tfor ( float scn : arr){\r\n\t\t\t\t\tobjArr.set(i++, new JSONNumber(scn));\r\n\t\t\t\t}\r\n\t\t\t\ttarget.put(key, objArr);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( value instanceof double[]){\r\n\t\t\tdouble arr[] =(double[])value;\r\n\t\t\tif ( arr.length>0){\r\n\t\t\t\tJSONArray objArr = new JSONArray();\r\n\t\t\t\tint i =0;\r\n\t\t\t\tfor ( double scn : arr){\r\n\t\t\t\t\tobjArr.set(i++, new JSONNumber(scn));\r\n\t\t\t\t}\r\n\t\t\t\ttarget.put(key, objArr);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ( value instanceof String)\r\n\t\t\ttarget.put(key, new JSONString((String)value));\r\n\t\telse if ( value instanceof Boolean)\r\n\t\t\ttarget.put(key, JSONBoolean.getInstance((Boolean)value));\r\n\t\telse if (value instanceof Integer)\r\n\t\t\ttarget.put(key, new JSONNumber((Integer)value));\r\n\t\telse if (value instanceof Float)\r\n\t\t\ttarget.put(key, new JSONNumber((Float)value));\r\n\t\telse if ( value instanceof \t Double ) \r\n\t\t\ttarget.put(key, new JSONNumber((Double)value));//\r\n\t\telse if (value instanceof Long) \r\n\t\t\ttarget.put(key, new JSONNumber((Long)value));//\r\n\t\telse if ( value instanceof JSONFriendlyObject<?>){\r\n\t\t\ttarget.put(key, ((JSONFriendlyObject)value).translateToJSON());\r\n\t\t}\r\n\t\t\t\r\n\t}",
"public OrderedValue(Object key, Object value, int approxSize) {\r\n this.value = value;\r\n this.touch();\r\n }",
"@Override\n public void returnObject(\n Object key,\n Object obj )\n {\n String error;\n\n if ( key == null || obj == null )\n {\n error = \"key or obj was null.\";\n logger.error( error );\n }\n\n if ( !(key instanceof String) )\n {\n error = \"Invalid key class \" + key.getClass().getName();\n logger.error( error );\n throw new InvalidArgumentException( error );\n }\n\n if ( !(obj instanceof IClientTask) )\n {\n error = \"Invalid object class \" + obj.getClass().getName();\n logger.error( error );\n throw new InvalidArgumentException( error );\n }\n\n try\n {\n super.returnObject( key, obj );\n }\n catch ( Exception e )\n {\n logger.error( e );\n }\n }",
"public boolean put( KEY key, OBJECT object );",
"PathDetail(Object value) {\n this.value = value;\n }",
"public Entrada(K key, V value) {\n\t\t\tsuper(key, value);\n\t\t}",
"public interface Value {\n\t}",
"void put(String key, Object value);",
"public Object convert(Object fromValue) {\n RawObject oldDataRawObject = (RawObject) fromValue;\n RawObject oldKeyRawObject = (RawObject)oldDataRawObject.\n getSuper().getValues().get(\"keys\");\n Object[] oldDataKeyValue = \n (Object[])oldKeyRawObject.getElements();\n RawObject oldValueRawObject = (RawObject)oldDataRawObject.\n getSuper().getValues().get(\"values\");\n \n ArrayList<RawObject> newDataKeyValue = \n new ArrayList<RawObject>();\n RawObject myEnumRawObject = new RawObject(myEnumType, \"DATA\");\n newDataKeyValue.add(myEnumRawObject);\n \n RawObject newKeyRawObject = new RawObject\n (oldKeyRawObject.getType(), newDataKeyValue.toArray());\n Map<String, Object> \n newDataSuperValue = new HashMap<String, Object>();\n newDataSuperValue.put(\"keys\", newKeyRawObject);\n newDataSuperValue.put(\"values\", oldValueRawObject);\n RawObject newDataSuperRawObject = \n new RawObject(newDataSuperType, newDataSuperValue, null);\n Map<String, Object> newDataValue = \n new HashMap<String, Object>();\n RawObject newDataRawObject = \n new RawObject(newDataType, newDataValue, \n newDataSuperRawObject);\n return newDataRawObject;\n }",
"@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}",
"public /*override*/ Type GetValueType() \r\n {\r\n if (_dictionary != null)\r\n {\r\n // Take a peek at the element type of the ElementStartRecord \r\n // within the ResourceDictionary's deferred content.\r\n boolean found; \r\n return _dictionary.GetValueType(_keyOrValue, /*out*/ found); \r\n }\r\n else \r\n {\r\n return _keyOrValue != null ? _keyOrValue.GetType() : null;\r\n }\r\n }",
"public Entry(K key, V value)\r\n\t\t{\r\n\t\t\tthis.key = key;\r\n\t\t\tthis.value = value;\r\n\t\t}",
"protected static Value getValue(Object obj)\n {\n Value v = new Value();\n\n switch(getDataTypeFromObject(obj))\n {\n case Boolean:\n return v.setBoolean((Boolean) obj);\n case Integer:\n return v.setInteger((java.lang.Integer) obj);\n case Long:\n return v.setLong((java.lang.Long) obj);\n case Double:\n return v.setDouble((java.lang.Double) obj);\n default:\n return v.setString((java.lang.String) obj);\n }\n }",
"public void setObj1 (String value) {\r\n Obj1 = value;\r\n }",
"@Override\n public void setObject(Object arg0)\n {\n \n }",
"public Entry(K key, V value) {\r\n this.key = key;\r\n this.value = value;\r\n }",
"public Entry(K key, V value) {\r\n this.key = key;\r\n this.value = value;\r\n }"
] | [
"0.6609547",
"0.6605804",
"0.64772403",
"0.60627365",
"0.60562515",
"0.591464",
"0.58705145",
"0.5868184",
"0.58513445",
"0.5839047",
"0.583334",
"0.583265",
"0.5821152",
"0.58209336",
"0.57833976",
"0.5774296",
"0.5714655",
"0.5714285",
"0.56882834",
"0.56827533",
"0.5681713",
"0.56710625",
"0.5654485",
"0.56252295",
"0.56090117",
"0.5590239",
"0.55656224",
"0.5527064",
"0.5515136",
"0.5513366",
"0.55052924",
"0.55052185",
"0.55052185",
"0.55052185",
"0.5503357",
"0.550004",
"0.5492764",
"0.54902244",
"0.54902244",
"0.54902244",
"0.54902244",
"0.54902244",
"0.5468799",
"0.5462928",
"0.5449425",
"0.54366744",
"0.54366744",
"0.54366744",
"0.54366744",
"0.54366744",
"0.54366744",
"0.54366744",
"0.542536",
"0.542414",
"0.5423328",
"0.5416486",
"0.5413089",
"0.5395978",
"0.5395726",
"0.5382452",
"0.5371095",
"0.5363362",
"0.5359679",
"0.53589225",
"0.53573906",
"0.53493065",
"0.53458065",
"0.53456974",
"0.53440076",
"0.5342152",
"0.5342052",
"0.5339524",
"0.5335347",
"0.5326432",
"0.53234327",
"0.5321882",
"0.5320401",
"0.5320401",
"0.5320401",
"0.5317061",
"0.53149706",
"0.53113216",
"0.52982974",
"0.5292549",
"0.52917063",
"0.52885884",
"0.5286943",
"0.5285051",
"0.5284672",
"0.52770257",
"0.52662396",
"0.52639556",
"0.5262978",
"0.5258427",
"0.5256216",
"0.52505666",
"0.52456105",
"0.52450913",
"0.5241664",
"0.523965",
"0.523965"
] | 0.0 | -1 |
Responsible for executing high level application tasks. | public interface Worker {
void activate(String filteredClassValue);
void stop();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void performOtherTasks() {\n\t\t\tSystem.out.println(\"performing tasks other than servicing\");\n\t\t\t// do whatever you want to do in the servicing package\n\t\t}",
"private static void executeTask02() {\n }",
"abstract void doTaskOnRun();",
"public void execute() {\n\t\tlaunch();\n\t}",
"@Override\n\tprotected Application doInBackground() throws Exception {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void doTask() {\n\t}",
"public abstract void persistAndRunTaskHandler() throws IOException;",
"protected void mainTask() {\n\t logger.log(1, CLASS, \"-\", \"impl\",\n\t\t \"About to read command\");\n\t try { \n\t\tcommand = (COMMAND)connection.receive();\n\t\tlogger.log(1,CLASS, \"-\", \"impl\",\n\t\t\t \"Received command: \"+(command == null ? \"no-command\" : command.getClass().getName()));\n\t } catch (IOException e) {\n\t\tinitError(\"I/O error while reading command:[\"+e+\"]\",command);\n\t\treturn;\n\t } catch (ClassCastException ce) {\n\t\tinitError(\"Garbled command:[\"+ce+\"]\", command);\n\t\treturn;\n\t } \n\t \n\t // 2. Create a handler.\n\t if (command == null) {\n\t\tinitError(\"No command set\", null);\n\t\treturn;\n\t }\n\n\t if (handlerFactory != null) {\n\t\thandler = handlerFactory.createHandler(connection, command);\n\t\tif (handler == null) {\n\t\t initError(\"Unable to process command [\"+command.getClass().getName()+\"]: No known handler\", command);\n\t\t return;\n\t\t}\n\t \n\t\t// 3. Handle the request - handler may send multiple updates to client over long period\n\t\thandler.handleRequest();\n\t }\t \n\t}",
"protected void internalRun() {\n work();\n }",
"public void backEndProcesses() {\n\n }",
"public abstract void task();",
"abstract void run(TaskList tasks, MainWindow ui, Storage storage);",
"public void execute() {\n if (hasError())\n return;\n\n runLocally();\n runRemotely();\n }",
"void execute() throws Exception {\n\n\t\tif (getSystemState(db) != SYSTEM_STATE_CREATED_COULD_BE_EXACTLY_ONE) {\n\t\t\tInteger ss = getSystemState(db);\n\t\t\tshutDown();\n\t\t\tthrow new Exception(\"System in wrong state for this task: \" + ss);\n\t\t}\n\n\t\tloadExecutionEngine(db);\n\t\tperformUpdate();\n\t\tshutDown();\n\t}",
"protected void execute() {\n\t\t//execution handled by pid thread\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}",
"public void startTask() {\n\t}",
"abstract void execute(TaskList tasks, Ui ui, Storage storage) throws IOException;",
"void run(IAppLogic logic);",
"public static void main(String[] args) {\n\t\tAnnotationConfigApplicationContext context =new AnnotationConfigApplicationContext(TaskExecutorConfig.class);\r\n\t\tAsyncTaskService asyncTaskService = context.getBean(AsyncTaskService.class);\r\n\t\tfor(int i=0;i<10;i++) {\r\n\t\t\tasyncTaskService.executeAsyncTask(i);\r\n\t\t\tasyncTaskService.executeAsyncTaskPlus(i);\r\n\t\t}\r\n\t\tcontext.close();\r\n\r\n\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"protected void process() {\n long start = System.nanoTime();\n loadDriver(translator);\n configureConnectionPool();\n\n if (this.checkCompatibility) {\n checkCompatibility();\n }\n\n if (addKeyForTenant != null) {\n addTenantKey();\n } else if (this.dropSchema) {\n // only proceed with the drop if the user has provided additional confirmation\n if (this.confirmDrop) {\n dropSchema();\n } else {\n throw new IllegalArgumentException(\"[ERROR] Drop not confirmed with --confirm-drop\");\n }\n } else if (this.dropAdmin) {\n // only try to drop the admin schema\n if (this.confirmDrop) {\n dropSchema();\n } else {\n throw new IllegalArgumentException(\"[ERROR] Drop not confirmed with --confirm-drop\");\n }\n } else if (updateFhirSchema || updateOauthSchema || updateJavaBatchSchema) {\n updateSchema();\n } else if (createFhirSchema || createOauthSchema || createJavaBatchSchema) {\n createSchemas();\n } else if (updateProc) {\n updateProcedures();\n } else if (this.listTenants) {\n listTenants();\n } else if (this.allocateTenant) {\n allocateTenant();\n } else if (this.testTenant) {\n testTenant();\n } else if (this.freezeTenant) {\n freezeTenant();\n } else if (this.dropDetached) {\n dropDetachedPartitionTables();\n } else if (this.deleteTenantMeta) {\n deleteTenantMeta();\n } else if (this.dropTenant) {\n dropTenant();\n }\n\n if (this.grantTo != null) {\n grantPrivileges();\n }\n\n long elapsed = System.nanoTime() - start;\n logger.info(String.format(\"Processing took: %7.3f s\", elapsed / NANOS));\n }",
"@Override\n\tpublic void task() {\n\t\tst.subTask();\n System.out.println(\"This is UI Task\");\n\t}",
"public void doIdleTasks();",
"private void submitCollectAppsTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectAppsTrafficTask()...\");\n\t\taddTask(new CollectAppsTrafficTask());\n\t}",
"protected abstract void executeHelper();",
"public static void main(String[] args) throws Exception {\n // construct a new executor that will run async tasks\n AsyncExecutor executor = new ThreadAsyncExecutor();\n\n // start few async tasks with varying processing times, two last with callback handlers\n AsyncResult<Integer> asyncResult1 = executor.startProcess(lazyval(10, 5000));\n AsyncResult<String> asyncResult2 = executor.startProcess(lazyval(\"test\", 3000));\n AsyncResult<Long> asyncResult3 = executor.startProcess(lazyval(50L, 7000));\n AsyncResult<Integer> asyncResult4 = executor.startProcess(lazyval(20, 4000), callback(9999));\n AsyncResult<String> asyncResult5 =\n executor.startProcess(lazyval(\"I am result5\", 6000), callback(\"Callback result 5\"));\n\n // emulate processing in the current thread while async tasks are running in their own threads\n Thread.sleep(3500); // Oh boy I'm working hard here\n log(\"Some hard work done\");\n\n // wait for completion of the tasks\n Integer result1 = executor.endProcess(asyncResult1);\n String result2 = executor.endProcess(asyncResult2);\n Long result3 = executor.endProcess(asyncResult3);\n asyncResult4.await();\n asyncResult5.await();\n\n // log the results of the tasks, callbacks log immediately when complete\n log(\"Result 1: \" + result1);\n log(\"Result 2: \" + result2);\n log(\"Result 3: \" + result3);\n log(\"Result 4: \" + asyncResult4.getValue());\n log(\"Result 5: \" + asyncResult5.getValue());\n }",
"public final void run() {\n final long contextID = Nodex.instance.getContextID();\n Runnable runner = new Runnable() {\n public void run() {\n try {\n final T result = execute();\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(result));\n }\n });\n } catch (final Exception e) {\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(e));\n }\n });\n } catch (Throwable t) {\n //Not much we can do, just log it\n t.printStackTrace(System.err);\n }\n }\n };\n\n NodexInternal.instance.executeInBackground(runner);\n }",
"public void run() {\n TasksCounter tc = new TasksCounter(tasks);\n new Window(tc);\n Ui.welcome();\n boolean isExit = false;\n Scanner in = new Scanner(System.in);\n while (!isExit) {\n try {\n String fullCommand = Ui.readLine(in);\n Command c = Parser.commandLine(fullCommand);\n c.execute(tasks, members, storage);\n isExit = c.isExit();\n } catch (DukeException e) {\n Ui.print(e.getMessage());\n }\n }\n }",
"@Override\r\n\tvoid execute(Runnable task);",
"public void run() {\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionStart();\n\n /**\n * create an archetype for the new application\n */\n executeArchetypeCommand();\n\n /**\n * Provide some delay to allow thread to create the archetype\n */\n splash = new SplashScreen();\n\n for (int i = 0; i < 7; i++) {\n updateStatus(i);\n try {\n Thread.sleep(500);\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n }\n }\n\n hideSplashScreen();\n splash = null;\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionEnd();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tmApps = mRequestManager.getApps();\n\t\t\t\tpopulateGrid();\n\t\t\t}",
"public static void launchTask(Task tsk)\n {\n getInstance().doExecute(tsk);\n }",
"private void submitCollectSysTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectSysTrafficTask()...\");\n\t\taddTask(new CollectSysTrafficTask());\n\t}",
"public void execute(){\n if (pipeline != null){\n pipeline.addTask(this);\n } else {\n run();\n }\n }",
"protected void execute() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\n task3();\n }",
"protected void execute() {}",
"public static void main(String[] args) {\n runTaskFive();\n }",
"@Override\n public void taskStarting() {\n\n }",
"public void run(){\n try{\n doTask();\n } catch (IOException ex){\n throw new RuntimeException(ex);\n }\n }",
"public String call() throws Exception {\n LOG.info(\"Starting to process task\");\n Thread.sleep(5000);\n LOG.info(\"Task is now done\");\n return \"Camel rocks\";\n }",
"public String call() throws Exception {\n LOG.info(\"Starting to process task\");\n Thread.sleep(5000);\n LOG.info(\"Task is now done\");\n return \"Camel rocks\";\n }",
"public BotTaskExecutor(SlackSession session) {\n LOG.info(\"Start time: {}\", String.format(\"%1$-2d:%2$-2d\", START_HOUR, START_MIN));\n\n SlackChannel channelBotMain = session.findChannelByName(Constants.BOT_MAIN_CHANNEL);\n\n // Enable/disabe the Meetup bot\n if (PropertiesUtil.getBooleanProperty(Constants.MEETUP_ENABLE, true)) {\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start MEETUP task\");\n SlackBot.messageAdmins(session, \"Failed to start MEETUP task\");\n } else {\n TASKS.add(new MeetupBotTask(EXECUTOR_SERVICE, \"MEETUP\", START_HOUR, START_MIN, session, channelBotMain));\n }\n }\n\n if (PropertiesUtil.getBooleanProperty(Constants.BOT_TEST, false)) {\n channelBotMain = session.findChannelByName(\"random\");\n } else {\n channelBotMain = session.findChannelById(PropertiesUtil.getProperty(Constants.WBB_CHANNEL_ID));\n }\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start WBB task\");\n SlackBot.messageAdmins(session, \"Failed to start WBB task\");\n } else {\n TASKS.add(new WbbBotTask(EXECUTOR_SERVICE, \"WBB\", START_HOUR, START_MIN, session, channelBotMain));\n }\n\n channelBotMain = session.findChannelByName(Constants.BOT_MAIN_CHANNEL);\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start UPGRADE task\");\n SlackBot.messageAdmins(session, \"Failed to start UPGRADE task\");\n } else {\n // Start the upgrade task at 0600\n TASKS.add(new UpgradeTask(EXECUTOR_SERVICE, \"UPGRADE\", 6, 0, session, channelBotMain));\n }\n\n startAll();\n }",
"public void execute(Object notUsed)\n {\n Thread.currentThread().setName(this.emailControllerDaemonConfig.getName());\n log.info(\"Begin EmailControllerDaemon \"\n + this.emailControllerDaemonConfig.getName() + \" processing\");\n\n this.running = true;\n\n try\n {\n // Start processing loop\n while (running)\n {\n log.info(\"Begin processing loop\");\n\n OracleJdbcConn oracleConn = null;\n try\n {\n // Get an Oracle Connection\n oracleConn = (OracleJdbcConn) this.oracleConnPool.getObject();\n Connection conn = oracleConn.getJdbcConnection();\n log.info(\"Obtained Oracle connection\");\n\n // Output the ovoAlertEmailerPkg's Version string\n Statement stmt = conn.createStatement();\n stmt.execute(\"SELECT ovoAlertEmailerPkg.version from dual\");\n ResultSet rs = stmt.getResultSet();\n rs.next();\n log.info(\"ovoAlertEmailerPkg.version:\\n\" + rs.getString(1));\n stmt.close();\n\n // Perpared the execute statement\n CallableStatement execStmt\n = conn.prepareCall(\"BEGIN ovoAlertEmailerPkg.execute; END;\");\n log.info(\"Prepared ovoAlertEmailerPkg execute statement\");\n \n int execCount = 0;\n while (running)\n {\n execCount++;\n if (1 == (execCount % 100))\n {\n log.info(\"Begin ovoAlertEmailerPkg execute number \" + execCount);\n }\n\n // Execute callable statement\n execStmt.execute();\n \n // Sleep a while\n try { Thread.sleep(this.emailControllerDaemonConfig.getSleepDelay()); }\n catch (Exception ignored) {}\n\n if (1 == (execCount % 100))\n {\n log.info(\"End ovoAlertEmailerPkg execute number \" + execCount);\n }\n }\n execStmt.close();\n }\n catch (SQLException sqlException)\n {\n log.error(\"Caught SQLException:\\n\" + sqlException.toString());\n }\n catch (PoolException poolException)\n {\n log.error(\"Unable to get Oracle Connection from pool:\\n\"\n + poolException.toString());\n }\n finally\n {\n // Always return the Oracle Connection\n if (null != oracleConn)\n {\n this.oracleConnPool.returnObject(oracleConn);\n }\n }\n\n if (running)\n {\n // Sleep 5 seconds, don't cycle thru execptions too quickly\n try { Thread.sleep(5000); }\n catch (Exception ignored) {}\n }\n }\n log.info(\"No longer running\");\n }\n catch (Throwable fatalException)\n {\n log.error(\"EmailControllerDaemon encountered with exception:\\n\"\n + fatalException.toString());\n StringWriter sw = new StringWriter();\n fatalException.printStackTrace(new PrintWriter(sw));\n String stackTrace = sw.toString();\n log.error(\"Stacktrace =\\n\" + stackTrace);\n }\n\n log.info(\"End EmailControllerDaemon Processing\");\n }",
"protected abstract void createTasks();",
"public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }",
"@Override\n public void runTask() throws Exception {\n String scannedFileDirectoryPath = \"/mnt/digibuffer/tmp\";\n Path scanFileDirectory = Paths.get(scannedFileDirectoryPath);\n taskLog(\"Process existing files in %s\\n\", scannedFileDirectoryPath);\n processFiles(scanFileDirectory);\n }",
"public static void main(String[] args) {\n TaskLocatorService taskLocatorService = new TaskLocatorService();\n MarshallerLocatorService marshallerLocatorService = new MarshallerLocatorService();\n TaskExecutorService taskExecutorService = new TaskExecutorService(taskLocatorService, marshallerLocatorService);\n\n // Register filters\n before((request, response) -> {});\n\n after((request, response) -> {\n response.type(\"application/json\");\n });\n\n // Register Spark endpoints\n CartEndpoints cartEndpoints = new CartEndpoints(taskExecutorService);\n cartEndpoints.register();\n }",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}",
"void startTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );",
"<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;",
"@Override\n public void run() {\n task.run();\n }",
"@Override\n public void run() {\n runTask();\n\n }",
"@Override\n\tprotected void executeInternal(JobExecutionContext context,\n\t\t\tInteger channelId, Integer applicationId)\n\t\t\tthrows JobExecutionException {\n\t\t\n\t\t\n\t\tTaskManager taskManager = SpringUtil.getBean(TaskManager.class);\n\t\t\n\t\t//TODO 这里没法确定channel code,所以没法通过common notify packet方式生成task\n\t\t//不是很好\n\t\t//个人觉得没必要再单独生成一个额外的扫尾task,可以直接在扫尾的cron job中执行\n\t\tTask task = SpringUtil.getBean(SaoweiTask.class);\n\t\t//TODO 上下文的处理,系统级task上下文,这里暂时塞0吧,没啥关系\n\t\tChannelService channelService = SpringUtil.getBean(ChannelService.class);\n\t\tApplicationService applicationService = SpringUtil.getBean(ApplicationService.class);\n\t\tChannel channel = channelService.getChannelByCode(\"SYSTEM\");\n\t\tList<Application> applications = applicationService.getApplicationsByChannelId(channel.getId());\n\t\tApplication application = applications.get(0);\n\t\tTaskTemplateService templateService = SpringUtil.getBean(TaskTemplateService.class);\n\t\tTaskTemplate template = templateService.getTaskTemplateByTypeAndSubType(\"SYSTEM\", \"saowei\");\n\t\ttry {\n\t\t\ttask.setDataId(String.valueOf(System.nanoTime()));\n\t\t\ttask.setData(\"\");\n\t\t\ttask.setTemplate(template);\n\t\t\t\n\t\t\ttask.getContext().setChannelCode(channel.getCode());\n\t\t\ttask.getContext().setChannelId(channel.getId());\n\t\t\ttask.getContext().setApplicationCode(application.getCode());\n\t\t\ttask.getContext().setApplicationId(application.getId());\n\t\t\ttask.getContext().setStoreId(application.getStoreId());\n\t\t\t\n\t\t\tif (context.getMergedJobDataMap().containsKey(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY)) {\n\t\t\t\tString taskRerunDelay = (String)context.getMergedJobDataMap().get(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY);\n\t\t\t\ttask.getContext().put(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY, taskRerunDelay);\n\t\t\t}\n\t\t\t\n\t\t\ttaskManager.executeTask(task);\n\t\t} catch (TaskException e) {\n\t\t\t//e.printStackTrace();\n\t\t\tLOGGER.error(\"扫尾job运行失败\", e);\n\t\t\tthrow new JobExecutionException(e);\n\t\t}\n\t}",
"public void execute() {\r\n\t\r\n\t}",
"protected void execute() {\n\n\t}",
"abstract void exec();",
"public void startExecuting() {}",
"protected void execute() {\n \t\n }",
"protected void execute() {\n \t\n }",
"private static void CLIapplication() {\n\n\t\tboolean done = false;\n\t\tdo {\n\t\t\tint choice = HQmenu();\n\t\t\tSite newSite;\n\n\t\t\tswitch(choice) {\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Register exchange office\");\n\t\t\t\tnewSite = createNewSite();\n\t\t\t\tif(sites.containsKey(newSite.getSiteName())) {\n\t\t\t\t\tSystem.out.println(\"Site already registred!1\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsites.putIfAbsent(newSite.getSiteName(), newSite);\t\t\t\t\t\n\t\t\t\t\twriteNewSiteToConfigFile(newSite.getSiteName());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(sites.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"You need to register site(s) first.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tCLIHelper.menuInput();\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Not a valid menu choice!\");\n\t\t\t}\n\t\t\tlogger.info(\"-------Task_Done-------\\n\");\n\t\t}while(!done);\n\t}",
"@Override\n\tpublic void execute() {\n\t\tThreadPool pool=ThreadPool.getInstance();\n\t\tpool.beginTaskRun(this);\n\t}",
"protected void execute() {\r\n }",
"public void execute() {\n\n\t}",
"@Override\n public void onInitializeTasks() {\n }",
"protected void execute() {\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"@Override\n protected void appStart() {\n }",
"@Override\n\t public void onStart(Application app) {\n\t\t Logger.info(\"Inside Global Class\");\n\t\t \n\t FiniteDuration delay = FiniteDuration.create(0, TimeUnit.SECONDS);\n\t FiniteDuration frequency = FiniteDuration.create(5, TimeUnit.SECONDS);\n\n\t Runnable showTime = new Runnable() {\n\t @Override\n\t public void run() {\n\t System.out.println(\"Time is now: \" + new Date());\n\t Connection connection = DB.getConnection();\n\t \t try{\n\t Statement stmt = connection.createStatement();\n String sql = \"SELECT * FROM jobs\";\n Logger.debug(\"************* About to get jobs **************\");\n ResultSet rs = stmt.executeQuery(sql);\n while(rs.next()){\n //Retrieve by column name\n String jobclassname = rs.getString(\"jobclassname\");\n int id = rs.getInt(\"jobid\");\n ObjectNode result = Json.newObject();\n result = (ObjectNode) Json.parse(rs.getString(\"json\"));\n Class c = Class.forName(jobclassname);\n Object object = c.newInstance();\n object.getClass().getDeclaredMethod(\"process\", int.class, String.class).invoke(object , id, result.get(\"servicename\").asText());\n \n //sql = \"DELETE FROM jobs WHERE jobid = \" + id;\n }\n rs.close();\n\t \t }catch(Exception e){\n\t \t\t e.printStackTrace();\n\t \t }\n\t \t finally{\n\t \t\t try {\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t \t }\n\t }\n };\n \n\t Akka.system().scheduler().schedule(delay, frequency, showTime, Akka.system().dispatcher());\n\t }",
"@Override\n\tpublic void launchTasks() throws Exception {\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).switchFridgeOn();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).setOndulatorPolicy(\"default\");\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getFridgeTemperature();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t2000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getBatteryEnergy();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).controllFridge();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 4000, 1000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getEPConsommation();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 1000, 4000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t}",
"public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}",
"public interface App {\n\tpublic static final int FULL_DATA_SIZE = 1460;\n\tpublic static final int TRAINING_BATCH_SIZE = 128;\n\t/** Data used to train and build the network. */\n\tpublic static final String TRAINING_INPUTS_PATH = \"./data/train.csv\";\n\t/** Path to write out data to after spark preprocessing */\n\tpublic static final String TRAINING_SPARK_RESULTS_PATH = \"./data/trainSparkResult\";\n\t/** Data used to generate predictions to submit to kaggle */\n\tpublic static final String SUBMISSION_INPUTS_PATH = \"./data/test.csv\";\n\t/** Path to write out data to after spark preprocessing */\n\tpublic static final String SUBMISSION_SPARK_RESULTS_PATH = \"./data/submissionSparkResult\";\n\n\tpublic abstract void run();\n}",
"java.util.concurrent.Future<StartApplicationResult> startApplicationAsync(StartApplicationRequest startApplicationRequest);",
"public void execute() {\n\t\t\n\t}",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"public void startApp()\r\n\t{\n\t}"
] | [
"0.6790578",
"0.65236646",
"0.6270529",
"0.6259542",
"0.6235548",
"0.6135125",
"0.61334455",
"0.61291957",
"0.60995287",
"0.6091168",
"0.60400474",
"0.6004806",
"0.5945202",
"0.5926516",
"0.5921216",
"0.5917158",
"0.5897163",
"0.589023",
"0.5878901",
"0.583242",
"0.5812088",
"0.5812088",
"0.5812088",
"0.5812088",
"0.5812088",
"0.5812088",
"0.5812088",
"0.5812088",
"0.5812088",
"0.5810808",
"0.5791067",
"0.57843184",
"0.5779249",
"0.57389295",
"0.57076764",
"0.56972927",
"0.5687236",
"0.5686333",
"0.5669847",
"0.56653947",
"0.5659386",
"0.56560445",
"0.56466895",
"0.5643616",
"0.56419414",
"0.56377757",
"0.56328464",
"0.5631201",
"0.56257427",
"0.56235135",
"0.56235135",
"0.5618664",
"0.56122255",
"0.5611246",
"0.5609156",
"0.56046724",
"0.56038094",
"0.559617",
"0.559617",
"0.559617",
"0.5592618",
"0.5572525",
"0.55685186",
"0.55657864",
"0.5564",
"0.5553598",
"0.555338",
"0.55525213",
"0.5546889",
"0.5540452",
"0.5538149",
"0.5538149",
"0.5537888",
"0.55372626",
"0.5528497",
"0.55277735",
"0.55266756",
"0.5523161",
"0.5522138",
"0.5522138",
"0.5522138",
"0.552024",
"0.5519461",
"0.5504873",
"0.5494842",
"0.54869354",
"0.548639",
"0.5483809",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.5477409",
"0.54743344"
] | 0.0 | -1 |
This method must add a new shopper user or administrator user. | public boolean addUser(String userID, String password, boolean admin) {
boolean result = false;
boolean isRegistered = false;
fm.readUsers();
for (User u : fm.users)
if (u.isUserID(userID))
isRegistered = true;
if (!isRegistered)
if (admin) {
fm.users.add(new Administrator(userID, password));
result = true;
} else {
fm.users.add(new Shopper(userID, password));
result = true;
}
fm.writeUsers();
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}",
"void userAddByAdmin(AdminUserAddDTO adminUserAddDTO) throws RecordExistException;",
"public void addUser(User user) {\n\t\t\r\n\t}",
"@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}",
"void add(User user) throws AccessControlException;",
"@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic void add(User user) {\n\r\n\t}",
"private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}",
"@Override\r\n\tpublic void createShopOwner(User customer, ShopOwner shopOwner) {\n\t\tshopOwner.setUser(customer);\r\n\t\tsuper.getSessionFactory().getCurrentSession().save(shopOwner);\r\n\t\tcustomer.setSeller(true);\r\n\t\tsuper.getSessionFactory().getCurrentSession().saveOrUpdate(customer);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}",
"public void addUser(User user);",
"public void addUser(Customer user) {}",
"public void addAdmin(Admin admin);",
"@Override\n\tpublic int AddUser(UserBean userbean) {\n\t\treturn 0;\n\t}",
"public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }",
"public void grantAdministrate(User user) throws ServiceException{\n }",
"@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}",
"@Override\n\tpublic void addUser(ERSUser user) {\n\t\tuserDao.insertUser(user);\n\t}",
"public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}",
"public Boolean addUser(User user) throws ApplicationException;",
"void addUser(User user);",
"void addUser(User user);",
"public String addUser() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\r\n\tpublic boolean addNewUser(User user) {\n\t\treturn false;\r\n\t}",
"public void AddUserDepot(String id, String label) {\r\n try {\r\n UserManager mydb = new UserManager(activity);\r\n mydb.open();\r\n mydb.AddUserWarehouse(id, label);\r\n mydb.close();\r\n }catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void createAdmin()\r\n\t{\r\n\t\tSystem.out.println(\"Administrator account not exist, please create the administrator account by setting up a password for it.\");\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter the password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter the password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(\"administrator\",hash_password,\"administrator\",\"\",0,0,last_login,false));\r\n\t\tSystem.out.println(\"Administrator account created successfully!\");\r\n\t}",
"@Override\n public boolean addUser(User user) {\n return controller.addUser(user);\n }",
"@Override\r\n\tpublic Admin addUser(String id, String password) {\n\t\t\r\n\t\tSession session=sessionFactory.openSession();\r\n\r\n\t\tAdmin admin = (Admin) session.get(Admin.class, id);\r\n\t\t\r\n\t\t\r\n\t\treturn admin;\r\n\t}",
"private void addPrivilegedUser(ActionEvent actionEvent) {\n if (addUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(addUserMenu.getSelectionModel().getSelectedItem())) {\n selectedAddUser = user;\n }\n }\n // set selected user to channel as privileged\n channel.withPrivilegedUsers(selectedAddUser);\n // update addMenu\n addUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (!user.getPrivileged().contains(channel)) {\n addUserMenu.getItems().add(user.getName());\n }\n }\n // update removeMenu\n removeUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (user.getPrivileged().contains(channel)) {\n removeUserMenu.getItems().add(user.getName());\n }\n }\n channelPrivilegedUserUpdate();\n }\n }",
"@Override\n\tpublic boolean addNewUser() {\n\t\treturn false;\n\t}",
"public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }",
"public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }",
"@Override\r\n\t\tpublic boolean addDev(Dev_User user) {\n\t\t int flag= session.insert(\"com.app.dao.AppMapper.insDev\", user); \r\n\t\t if(flag>0){\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else{\r\n\t\t\treturn false;\r\n\t\t }\r\n\t\t}",
"public boolean addUser(User user) {\n\t\treturn false;\r\n\t}",
"public void createSupplier(User user){\n BCryptPasswordEncoder encoder= new BCryptPasswordEncoder();\n user.setPassword(encoder.encode(user.getPassword()));\n //creating roles\n Role userRole = new Role(\"SUPPLIER\");//we create a role type client\n //a user can then take a list of roles\n List<Role> roles = new ArrayList<>();//list of roles\n roles.add(userRole);//add client role type to the list\n user.setRoles(roles);//set a user to a role type\n userRepository.save(user);//save( save is a crudrepository method) the user to the database.\n }",
"@Override\r\n\tpublic int insert(AdminUser record) {\n\t\treturn adminUserMapper.insert(record);\r\n\t}",
"@Override\n\tpublic void addItem(User entity) {\n\t\tuserRepository.save(entity);\n\t\t\n\t}",
"@Override\n\tpublic void addMember(User user, UserProfile profileTemplate)\n\t\t\tthrows Exception {\n\n\t}",
"public void addUser(User user){\r\n users.add(user);\r\n }",
"public boolean signUp(String userName, String pwd, UserType userType) {\n if(userType == UserType.MANAGER) {\n if (this.managers.containsKey(userName)) {\n return false;\n } else {\n this.managers.put(userName, new Manager(userName, pwd));\n System.out.println(\"New Manager Added\");\n return true;\n }\n } else {\n //userType is CUSTOMER\n if (this.customers.containsKey(userName)) {\n return false;\n } else {\n this.customers.put(userName, new Customer(userName, pwd));\n System.out.println(\"New Customer Added\");\n return true;\n }\n }\n }",
"public void addUser(UserModel user);",
"@PostMapping(\"/add-owner-to-store\")\n Status addOwnerToStore(@RequestParam Long userId, Long storeId) {\n return ownerService.addOwnerToStore(userId,storeId);\n }",
"public String add() {\r\n\t\tuserAdd = new User();\r\n\t\treturn \"add\";\r\n\t}",
"public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}",
"@Override\n\tpublic int addUser(User_role user) throws Exception{\n\t\treturn userMapper.insertByUser(user);\n\t}",
"public void addUser(String u, String p) {\n \t//users.put(\"admin\",\"12345\");\n users.put(u, p);\n }",
"public void addUser() {\n\t\tthis.users++;\n\t}",
"@Override\r\n\tpublic boolean addUser(user user) {\n\t\tif(userdao.insert(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}",
"@Override\n\tpublic void insert(SysUserRole sysUserRole) {\n\t\tsysUserRoleService.insert(sysUserRole);\n\t}",
"public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}",
"private void createAdmin(String book_email,String book_phone,String book_title) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(bookId)) {\n bookId = mFirebaseDatabase.push().getKey();\n }\n\n Book book = new Book(book_email,book_phone,book_title);\n\n mFirebaseDatabase.child(bookId).setValue(book);\n\n addUserChangeListener();\n }",
"@Transactional\r\n\tpublic void addUser(){\r\n\t}",
"@Override\n public TechGalleryUser addUser(final TechGalleryUser user) throws BadRequestException {\n if (!userDataIsValid(user)) {\n throw new BadRequestException(i18n.t(\"User's email cannot be blank.\"));\n } else {\n userDao.add(user);\n UserProfileServiceImpl.getInstance().createProfile(user);\n return user;\n }\n }",
"BaseUser createAdminUser(Application application);",
"@Override\r\n public String addUser(UserDTO dto) throws DuplicateElementException {\n\r\n User userEsist = userRepository.findByUsername(dto.getUsername());\r\n if(userEsist == null) {\r\n User user = new User();\r\n user.setFirstName(dto.getFirstName());\r\n user.setLastName(dto.getLastName());\r\n user.setRole(Role.valueOf(dto.getRole()));\r\n // Embedded Object\r\n Address address = new Address();\r\n AddressDTO addressDTO = dto.getAddresses();\r\n address.setCity(addressDTO.getCity());\r\n address.setLandmark(addressDTO.getLandmark());\r\n address.setPhoneNumber(addressDTO.getPhoneNumber());\r\n address.setPostboxNo(addressDTO.getPostboxNo());\r\n address.setZipcode(addressDTO.getZipcode());\r\n user.setAddress(address);\r\n user.setEmail(dto.getEmail());\r\n user.setUsername(dto.getUsername());\r\n user.setPassword(dto.getPassword());\r\n userRepository.save(user);\r\n return \"SUCCESS\";\r\n } else {\r\n throw new DuplicateElementException(\"User with username \"+ dto.getUsername()+ \" already present\");\r\n }\r\n\r\n\r\n\r\n\r\n }",
"boolean addUser(int employeeId, String name, String password, String role);",
"void addNewUser(User user, int roleId) throws DAOException;",
"public boolean addUser(User user) {\n\t\t\r\n\t\tuser.setEnabled(true);\r\n\t\tuser.setAuthority(\"user\");\r\n\t\tuser.setPassword(new BCryptPasswordEncoder().encode(user.getPassword()));\r\n\t\t\r\n\tsessionFactory.getCurrentSession().save(user);\r\n\treturn true;\r\n \r\n\t}",
"public User addUser(User user) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic String addUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}",
"public void setUser(ShopUser user) {\n this.user = user;\n }",
"boolean addUser(User userToAdd, BankEmployee employee) {\n if(employee.isBankEmployee()){\n listOfUsers.add(userToAdd);\n return true;\n }else\n return false;\n }",
"@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean add(User u) {\r\n\t\treturn executeAndIsModified(INSERT_INTO_USERS, u.getTax_code(),\r\n\t\t\t\tu.getName(),\r\n\t\t\t\tu.getSurname(),\r\n\t\t\t\tu.getPhone(),\r\n\t\t\t\tu.getAddress(),\r\n\t\t\t\tu.getEmail(),\r\n\t\t\t\tu.getPassword(),\r\n\t\t\t\tu.getRole());\r\n\r\n\t}",
"public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}",
"@Override\n\tpublic void addUsers(Session session){\n\t\ttry{\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\n\t\t\tSystem.out.print(\"+++++++++++Add Customer/Admin here+++++++++++\\n\");\n\n\t\t\tSystem.out.println(\"Enter 'Admin' to add a new admin to database\");\n\t\t\tSystem.out.println(\"Enter 'Customer' to add a new admin to database\");\n\t\t\tSystem.out.println(\"--------------Enter one from above------------------\");\n\t\t\tString accType = scanner.nextLine();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter First Name:\");\n\t\t\tString firstName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Last Name:\");\n\t\t\tString lastName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter UserId:\");\n\t\t\tString inputLoginId = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Password:\");\n\t\t\tString inputLoginPwd = scanner.nextLine();\n\n\t\t\t//pass these input fields to client controller\n\t\t\tsamp=mvc.addUsers(session,accType,firstName,lastName,inputLoginId,inputLoginPwd);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Users Exception: \" +e.getMessage());\n\t\t}\n\t}",
"public void addAppUser(AppUser appUser) {\n\t\tappUserRepository.save(appUser);\t\t\n\t\t\n\t}",
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void insert(UserRole vo) {\n\n\t}",
"public void grantAdminOnIndividualToSystemUser(Individual i, SystemUser user);",
"@Override\n public void add(User member) {\n super.add(member);\n members.add(member);\n }",
"@Override\n\tpublic int addUser(TbUser user) {\n\t\treturn new userDaoImpl().addUser(user);\n\t}",
"public int add(Userinfo user) {\n\t\treturn userDAO.AddUser(user);\r\n\t}",
"@Override\n\tpublic void addUser(User user) {\n mapper.addUser(user);\n\t}",
"@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }",
"public void addUserToFirestore() {\n if (isSignedIn()) {\n getUserTask().addOnCompleteListener(\n new OnCompleteListener<DocumentSnapshot>()\n {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful() && !task.getResult().exists()) {\n setUser(userMap(false));\n setAnalysis(analysisMap(new ArrayList<String>()));\n setSlouches(slouchMap(new ArrayList<Date>(), new ArrayList<Double>()));\n }\n }\n });\n }\n }",
"@Override\r\n\tpublic int addUser(User user) {\n\t\treturn userMapper.addUser(user);\r\n\t}",
"@PostMapping(\"admin/save\")\r\n\tpublic Admin addAdmin(@RequestBody User u) {\r\n\t\tUser u1 = userRepo.save(u);\r\n\t\tAdmin ad = new Admin(null, u1);\r\n\t\treturn adminRepo.save(ad);\r\n\t\t\r\n\t}",
"private void addHocSinh() {\n\t\thocsinh user = new hocsinh();\n\n\t\tuser.setMa(txtMa.getText());\n\t\tuser.setTen(txtTen.getText());\n\t\tuser.setTuoi(txtTuoi.getText());\n\t\tuser.setSdt(txtSdt.getText());\n\t\tuser.setDiaChi(txtDiaChi.getText());\n\t\tuser.setEmail(txtEmail.getText());\n\t\t\n\t\thocsinhdao.addUser(user);\n\t}",
"public void addUser(User tmpUser, User user) {\n\t\t\n\t}",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic int addAccount(AccountUser au) {\n\t\tau.setName(au.getUsername());\n\t\tau.setStatus(1);\n\t\tau.setPwd(\"666666\");\n\t\tau.setSalt(CommTool.getSalt());\n\t\tau.setPwd(PasswordUtil.generate(au.getPwd(), au.getSalt()));\n\t\treturn auMapper.addAccount(au);\n\t}",
"@Override\r\n\tpublic User addUser(User user) {\n\t\treturn userReposotory.save(user);\r\n\t}",
"public void createUser(String name, String password, Boolean uBtn, Boolean eBtn){\n\t\t\n\t\tif(eBtn) {\n\t\t\tif(password.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter Password\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No password entered \" , \"Empty Password\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else if(name.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter UserName\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No UserName entered \" , \"Empty UserName\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else {\n\t\t\t\tEmployee e1 = new Employee(name);\n//\t\t\t\te1.setName(name);\n\t\t\t\t\n\t\t\t\tonlinestore.employeeList.put(e1, password);\n\t\t\t\tSystem.out.println(\"New Employee Created, Please login\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"New Employee Created. PLease Login Again\" , \"new Employee\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\n\t\t\t\tbuildEmployeeLoginGUI();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif(uBtn) {\n\t\t\t\n\t\t\tif(password.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter Password\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No password entered \" , \"Empty Password\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else if(name.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter UserName\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No UserName entered \" , \"Empty UserName\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"User radio button pressed\");\n\t\t\t\tCustomer c1 = new Customer(name);\n\t\t\t\t//c1.setName(name);\n\t\t\t\t\n\t\t\t\tonlinestore.customerList.put(c1, password);\n\t\t\t\t//System.out.println(\"New Customer Created, Please Login\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"New Customer Created. Please Login Again \" , \"new Customer\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tbuildCustomerLoginGUI();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}",
"@Test\n public void testCreateOnBehalfUser_asTechnologyManager() throws Exception {\n container.login(supplierAdminUser.getKey(), ROLE_TECHNOLOGY_MANAGER);\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), \"abcdef\");\n checkCreatedUser(result, customer, \"abcdef\", false);\n checkUserRoleAssignment(result, ROLE_ORGANIZATION_ADMIN);\n }",
"@Override\r\n\tpublic String addUser(taskPojo addUser,HttpServletRequest request, HttpServletResponse response) {\n\t\treturn dao.addUser(addUser,request,response);\r\n\t}",
"public void CreateAdminUser (String administratorUserName, String administratorPassword, \n String administratorFirstName, String administratorLastName, String administratorEmail) {\n User user = identityService.newUser(administratorUserName);\n user.setFirstName(administratorFirstName);\n user.setLastName(administratorLastName);\n user.setPassword(administratorPassword);\n user.setEmail(administratorEmail);\n identityService.saveUser(user);\n\n LOGGER.info(\"Creating the camunda admin group\");\n // create Administrator Group\n if(identityService.createGroupQuery().groupId(Groups.CAMUNDA_ADMIN).count() == 0) {\n Group camundaAdminGroup = identityService.newGroup(Groups.CAMUNDA_ADMIN);\n camundaAdminGroup.setName(\"camunda BPM Administrators\");\n camundaAdminGroup.setType(Groups.GROUP_TYPE_SYSTEM);\n identityService.saveGroup(camundaAdminGroup);\n }\n\n LOGGER.info(\"Creating Admin group authrorizations for all built-in resources\");\n // create Admin authorizations on all built-in resources\n for (Resource resource : Resources.values()) {\n if(authorizationService.createAuthorizationQuery().groupIdIn(Groups.CAMUNDA_ADMIN).resourceType(resource).resourceId(ANY).count() == 0) {\n AuthorizationEntity userAdminAuth = new AuthorizationEntity(AUTH_TYPE_GRANT);\n userAdminAuth.setGroupId(Groups.CAMUNDA_ADMIN);\n userAdminAuth.setResource(resource);\n userAdminAuth.setResourceId(ANY);\n userAdminAuth.addPermission(ALL);\n authorizationService.saveAuthorization(userAdminAuth);\n }\n }\n identityService.createMembership(administratorUserName, \"camunda-admin\");\n }",
"private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}",
"public int adduser(UserBean user) {\n\t\t// TODO Auto-generated method stub\n\t\tuser.setGrantedpermission(0);\n\t\tuser.setFirsttimelogin(1);\n\t\tuser.setStartdate(LocalDate.now().toString());\n\t\tuser.setUserpassword(\"Hello@123\");\n\t\tcrud1.save(user);\n\t\tValidateBean validate = new ValidateBean();\n\n\t\tvalidate.setId(user.getUserid());\n\n\t\tvalidate.setPassword(user.getUserpassword());\n\t\tvalidate.setRole(\"user\");\n\t\tcrud.save(validate);\n\t\treturn 1;\n\t}",
"@Override\r\n\tpublic void insertOne(GuestUserVo bean) throws SQLException {\n\t\t\r\n\t}",
"private final void initializeAdminUser() throws Exception {\r\n String adminEmail = server.getServerProperties().get(ADMIN_EMAIL_KEY);\r\n String adminPassword = server.getServerProperties().get(ADMIN_PASSWORD_KEY);\r\n // First, clear any existing Admin role property.\r\n for (User user : this.email2user.values()) {\r\n user.setRole(\"basic\");\r\n }\r\n // Now define the admin user with the admin property.\r\n if (this.email2user.containsKey(adminEmail)) {\r\n User user = this.email2user.get(adminEmail);\r\n user.setPassword(adminPassword);\r\n user.setRole(\"admin\");\r\n }\r\n else {\r\n User admin = new User();\r\n admin.setEmail(adminEmail);\r\n admin.setPassword(adminPassword);\r\n admin.setRole(\"admin\");\r\n this.updateCache(admin);\r\n }\r\n }",
"public void createUser(User user) {\n\n\t}",
"@Override\r\n\tpublic void addUser(User user) throws ToDoListDAOException{\r\n\t\tSession session = factory.openSession();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tsession.beginTransaction();\r\n\t\t\tsession.save(user);\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t}\r\n\t\tcatch (HibernateException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tif(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif(session != null) \r\n\t\t\t{ \r\n\t\t\t\tsession.close(); \r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic int addUser(User user) {\n\t\treturn userDao.addUser(user);\n\t}",
"public void add(User user) {\r\n this.UserList.add(user);\r\n }",
"public void add_admin(String admin_id, String admin_name, String admin_address, String admin_designation,\n\t\t\t double salary, String contact, boolean status_vacancy, String password,String admin_project_key)\n {\n\t\t\n \tadm_list.insert(new Admin(admin_id,admin_name,admin_address,admin_designation, salary,contact,status_vacancy,password,admin_project_key));\n \twrite_adm_file();\n }",
"public void addUser(User user) {\n\t\tuserList.addUser(user);\n\t}",
"@Override\n\tpublic User addUser(User user) {\n\t\treturn userDatabase.put(user.getEmail(), user);\n\t}",
"Integer addUser(ServiceUserEntity user);",
"public void setAddUser(Long addUser) {\n this.addUser = addUser;\n }",
"@Override\n\tpublic User addSimpleUser(SimpleUser user) {\n\t\treturn dao.addSimpleUser(user);\n\t}"
] | [
"0.63891715",
"0.6343298",
"0.6314581",
"0.63038605",
"0.6245001",
"0.6188228",
"0.6181225",
"0.61416477",
"0.6061279",
"0.6023219",
"0.5999698",
"0.59822464",
"0.5951733",
"0.59498465",
"0.594898",
"0.5947251",
"0.5941242",
"0.59411037",
"0.5922474",
"0.5887902",
"0.5887902",
"0.5874658",
"0.5856802",
"0.58355033",
"0.58332",
"0.5825214",
"0.5803506",
"0.5793449",
"0.57925504",
"0.57879305",
"0.5787054",
"0.57813793",
"0.5779217",
"0.5775527",
"0.5771358",
"0.5770308",
"0.5734692",
"0.57328874",
"0.57305396",
"0.5725256",
"0.57077664",
"0.57008916",
"0.5700258",
"0.56898785",
"0.5688304",
"0.56814855",
"0.5679609",
"0.5679002",
"0.5677641",
"0.5675665",
"0.56722695",
"0.56716484",
"0.56693786",
"0.5668176",
"0.5667878",
"0.5660223",
"0.56550246",
"0.56511223",
"0.56503874",
"0.5648228",
"0.56463915",
"0.5642916",
"0.56364316",
"0.5630122",
"0.5611672",
"0.5609978",
"0.56098086",
"0.5607833",
"0.55958503",
"0.559221",
"0.55868256",
"0.55858415",
"0.55774915",
"0.5575243",
"0.55695635",
"0.5568797",
"0.5560019",
"0.5555546",
"0.55531484",
"0.5550859",
"0.55507106",
"0.5546809",
"0.5545045",
"0.5541496",
"0.55393666",
"0.55347604",
"0.5534306",
"0.5526288",
"0.5522813",
"0.55166364",
"0.5505658",
"0.5504281",
"0.5496811",
"0.5496745",
"0.54955673",
"0.54916316",
"0.54913795",
"0.54857564",
"0.54840434",
"0.547896"
] | 0.5857788 | 22 |
Authenticates a user an creates an active work session | public int login(String userID, String password) {
// If this user is not logged in
// and has already been registered(i.e. has been added)
// and password matches,
// then create a new session for this user.
// Check if logged in already
for (int i=0;i<sessions.size();i++)
if (sessions.get(i).isLoggedin(userID))
return -1;
// Check if registered already and password matches
User u = null;
for (User user : fm.users)
if (user.login(userID, password))
u = user;
// Log in this user by creating a new session for the user
if (u != null) {
User.fm = fm;
if (u instanceof Shopper)
((Shopper)u).login();
Session s = new Session(u.userID, fm);
sessions.add(s);
return s.getID(); // The session ID.
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String registerUserWithGetCurrentSession(User user);",
"User loginUser(User userLoginRequest, HttpSession httpSession) throws Exception;",
"public void login(HttpServletRequest req, HttpServletResponse res) throws IOException {\n\n // Client credentials\n Properties p = GlobalSettings.getNode(\"oauth.password-credentials\");\n String clientId = p.getProperty(\"client\");\n String secret = p.getProperty(\"secret\");\n ClientCredentials clientCredentials = new ClientCredentials(clientId, secret);\n\n // User credentials\n String username = req.getParameter(\"username\");\n String password = req.getParameter(\"password\");\n UsernamePassword userCredentials = new UsernamePassword(username, password);\n\n // Create request\n TokenResponse oauth = TokenRequest.newPassword(userCredentials, clientCredentials).post();\n if (oauth.isSuccessful()) {\n PSToken token = oauth.getAccessToken();\n\n // If open id was defined, we can get the member directly\n PSMember member = oauth.getMember();\n if (member == null) {\n member = OAuthUtils.retrieve(token);\n }\n\n if (member != null) {\n OAuthUser user = new OAuthUser(member, token);\n HttpSession session = req.getSession(false);\n String goToURL = this.defaultTarget;\n if (session != null) {\n ProtectedRequest target = (ProtectedRequest)session.getAttribute(AuthSessions.REQUEST_ATTRIBUTE);\n if (target != null) {\n goToURL = target.url();\n session.invalidate();\n }\n }\n session = req.getSession(true);\n session.setAttribute(AuthSessions.USER_ATTRIBUTE, user);\n res.sendRedirect(goToURL);\n } else {\n LOGGER.error(\"Unable to identify user!\");\n res.sendError(HttpServletResponse.SC_FORBIDDEN);\n }\n\n } else {\n LOGGER.error(\"OAuth failed '{}': {}\", oauth.getError(), oauth.getErrorDescription());\n if (oauth.isAvailable()) {\n res.sendError(HttpServletResponse.SC_FORBIDDEN);\n } else {\n res.sendError(HttpServletResponse.SC_BAD_GATEWAY);\n }\n }\n\n }",
"int authenticateUser(IDAOSession session, String userName, String password);",
"EmployeeMaster authenticateUser(int employeeId, String password);",
"public User doAuthentication(String account, String password);",
"public UserSession login () {\n\t\tRandom r = new Random();\n\t\tthis.session_id = Utility.md5(this.avatar + this.alias + System.currentTimeMillis() + r.nextInt());\n\t\tthis.karmaKubes = KarmaKube.find(\"byRecipient_idAndOpenedAndRejected\", this.id, false, false).fetch(1000);\n\t\tthis.lastLogin = Utility.time();\n\t\tthis.populateSuperPowerDetails();\n\t\tthis.excludedUsers = UserExclusion.excludedList(this.id);\n\t\treturn new UserSession(this, this.session_id);\n\t}",
"UserToken login(String username, String password) throws WorkspaceException;",
"private Object authenticate(Invocation invocation, HttpServletRequest request,\r\n HttpServletResponse response) throws IOException {\r\n\r\n Object[] args = invocation.getArgs();\r\n if (args.length != 2) {\r\n throw new RuntimeException(\"The authenticate call must have two arguments\");\r\n }\r\n\r\n String user = (String) args[0];\r\n String password = (String) args[1];\r\n\r\n //We can make the remote call\r\n Object result = invoke(invocation);\r\n\r\n //If the authentification failed we finish the execution\r\n if (result instanceof LoginContext) {\r\n LoginContext loginContext = (LoginContext) result;\r\n if (loginContext == null) {\r\n throw new RuntimeException(\"Login failed!!\");\r\n }\r\n \r\n HttpSession session = request.getSession(false);\r\n String sessionId = session.getId();\r\n response.addHeader(\"jsessionid\", sessionId);\r\n\r\n \r\n session.setAttribute(User.USER_KEY, loginContext.getUser());\r\n\r\n session.setAttribute(RhSessionContext.CLIENT_ID, loginContext.getClient_id());\r\n session.setAttribute(RhSessionContext.ORG_ID, loginContext.getOrg_id());\r\n session.setAttribute(RhSessionContext.DUTY_ID, loginContext.getDutyId());\r\n\r\n Map attrs = loginContext.getAttributes();\r\n Set<Map.Entry> entries = attrs.entrySet();\r\n for (Map.Entry entry : entries) {\r\n session.setAttribute((String) entry.getKey(), entry.getValue());\r\n }\r\n\r\n // 创建login session\r\n LoginSession loginSession = new LoginSession();\r\n loginSession.setLoginName(loginContext.getUser().getUsername());\r\n loginSession.setIp(request.getRemoteHost());\r\n loginSession.setLoginDate(new Date(session.getCreationTime()));\r\n loginSession.setSessionId(session.getId());\r\n loginSession.setLiving(true);\r\n\r\n //Session hibernateSession = RhinoCtx.instance().getHibernate().getSession();\r\n try {\r\n \r\n ServiceBase serviceBase = (ServiceBase) ServiceFactory.getService(ServiceBase.NAME);\r\n //ServiceBase serviceBase = (ServiceBase) RhinoCtx.getBean(\"serviceBase\");\r\n //hibernateSession.beginTransaction();\r\n serviceBase.save(loginSession);\r\n //hibernateSession.getTransaction().commit();\r\n session.setAttribute(\"loginSession\", loginSession);\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n //hibernateSession.getTransaction().rollback();\r\n } finally {\r\n //hibernateSession.close();\r\n }\r\n }\r\n return result;\r\n }",
"public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"admin@gibmit.ch\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}",
"private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }",
"private void startAuth() {\n if (ConnectionUtils.getSessionInstance().isLoggedIn()) {\n ConnectionUtils.getSessionInstance().logOut();\n } else {\n ConnectionUtils.getSessionInstance().authenticate(this);\n }\n updateUiForLoginState();\n }",
"User login(Uuid id, String username, String password, Time creationTime);",
"String signIn(String userName, String password) throws UserNotFoundException;",
"private Single<SessionEntity> newSession(UserEntity userEntity) {\n return this.authApi.getToken().flatMap(requestTokenEntity ->\n this.authApi.validateToken(\n new ValidateTokenEntity(\n userEntity.getTMDBUsername(),\n userEntity.getTMDBPassword(),\n requestTokenEntity.getRequestToken()\n )\n ).doOnError((e)-> {\n updateUser(new SessionEntity(false, \"\"), userEntity);\n createUserSession();\n })\n .flatMap(validatedRequestToken ->\n this.authApi.createSession(validatedRequestToken.getRequestToken()).doOnSuccess(sessionEntity -> {\n if (!sessionEntity.isSuccess()) {\n //TODO - refreshSession few times and return guest session.\n }\n\n updateUser(sessionEntity, userEntity);\n }\n )\n ));\n }",
"private void loggedInUser() {\n\t\t\n\t}",
"public void login(User user);",
"User signIn(String login, String password);",
"public static void userLogin(Context context)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\r\n\t\t\tString username = context.formParam(\"myUsername\");\r\n\t\t\tString password = context.formParam(\"myPassword\");\r\n\t\t\t\r\n\t\t\tif(myAccountServ.attemptLoginServiceLayer(username, password)) //if true then get user account from DB\r\n\t\t\t{\r\n\t//\t\t\tSystem.out.println(myAccountServ.getMyAccountFromDatabase(username, password));\r\n\t\t\t\tcontext.sessionAttribute(\"currentUser\", myAccountServ.getMyAccountFromDatabase(username, password)); //set session to user account info\r\n\t//\t\t\tSystem.out.println(((Account)context.sessionAttribute(\"currentUser\")));\r\n\t//\t\t\tSystem.out.println(((Account)context.sessionAttribute(\"currentUser\")).getRoleId() == 1);\r\n\t\t\t\tif(((Account)context.sessionAttribute(\"currentUser\")).getRoleId() == 1)//check user role id if they employeee\r\n\t\t\t\t{\r\n\t\t\t\t\t//take me to the employee page\r\n\t\t\t\t\tcontext.redirect(\"/html/employee-page.html\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(((Account)context.sessionAttribute(\"currentUser\")).getRoleId() == 0) // or if they manager\r\n\t\t\t\t{\r\n\t\t\t\t\tcontext.redirect(\"/html/manager-page.html\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse//if we failed login attempt... send us back to login page aka \"/index.html\"\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"not correct credentials\");\r\n\t\t\t\tcontext.redirect(\"/index.html\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogging.error(e);\r\n\t\t}\r\n\t\t\r\n//\t\tSystem.out.println(\"username: \" + username);\r\n//\t\tSystem.out.println(\"pssword: \" + password);\r\n\t}",
"public abstract User login(User data);",
"@Override\n public Single<SessionEntity> createUserSession() {\n return this.userRepository.getUser().firstOrError().flatMap(userEntity -> {\n if (!userEntity.isGuestUser()) {\n if (userEntity.getSessionId().isEmpty()) {\n return newSession(userEntity);\n }\n else if (userEntity.isHasOpenSession()) {\n return Single.just(new SessionEntity(userEntity.isHasOpenSession(), userEntity.getSessionId()));\n }\n }\n return Single.just(new SessionEntity(false, \"\"));\n });\n }",
"public void createUserLoginSession(String uId, String uEmail, String uPwd) {\n editor.putBoolean(IS_USER_LOGIN, true);\n\n editor.putString(TAG_id, uId);\n editor.putString(TAG_email, uEmail);\n editor.putString(TAG_pwd, uPwd);\n\n editor.commit();\n }",
"@POST\n\t@Consumes({ MediaType.APPLICATION_JSON })\n\t@Produces({ MediaType.APPLICATION_JSON })\n\tpublic Response createSession(@Context HttpServletRequest req,\n\t\t\tJSONObject inputJsonObj, @Context UriInfo ui,\n\t\t\t@Context HttpHeaders hh) {\n\t\tString userName = null; // user inserted fields\n\t\tString attemptedPassword = null; // user inserted fields\n\t\tResponse response = null;\n\t\ttry {\n\t\t\tuserName = (String) inputJsonObj.get(\"userName\");\n\t\t\tattemptedPassword = (String) inputJsonObj.get(\"password\");\n\t\t} catch (JSONException e) {\n\t\t\tSystem.out.println(\"Error Reading the jsonFile\");\n\t\t\treturn Response.status(Status.BAD_REQUEST)\n\t\t\t\t\t.entity(\"Error reading JSON\").build();\n\t\t}\n\t\t// String email = appsMid.getEmailUsingUserName(appId, userName);\n\t\tif(userName == null && attemptedPassword == null)\n\t\t\treturn Response.status(Status.BAD_REQUEST)\n\t\t\t\t\t.entity(\"Error reading JSON\").build();\n\t\tString userId = appsMid.getUserIdUsingUserName(appId, userName);\n\t\tif (userId != null) {\n\t\t\tboolean usersConfirmedOption = appsMid\n\t\t\t\t\t.confirmUsersEmailOption(appId);\n\t\t\t// Remember the order of evaluation in java\n\t\t\tif (usersConfirmedOption) {\n\t\t\t\tif (appsMid.userEmailIsConfirmed(appId, userId)) {\n\t\t\t\t\tSystem.out.println(\"userId of \" + userName + \"is: \"\n\t\t\t\t\t\t\t+ userId);\n\t\t\t\t\tString sessionToken = getRandomString(IDGENERATOR);\n\t\t\t\t\tboolean validation = appsMid.createSession(sessionToken,\n\t\t\t\t\t\t\tappId, userId, attemptedPassword);\n\t\t\t\t\tif (validation) {\n\t\t\t\t\t\tNewCookie identifier = new NewCookie(\"sessionToken\",\n\t\t\t\t\t\t\t\tsessionToken);\n\n\t\t\t\t\t\tresponse = Response.status(Status.OK)\n\t\t\t\t\t\t\t\t.entity(identifier).build();\n\t\t\t\t\t}\n\t\t\t\t\tresponse = Response.status(Status.OK).entity(sessionToken)\n\t\t\t\t\t\t\t.build();\n\t\t\t\t} else {\n\t\t\t\t\tresponse = Response.status(Status.FORBIDDEN)\n\t\t\t\t\t\t\t.entity(EMAILCONFIRMATIONERROR).build();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tresponse = Response.status(Status.UNAUTHORIZED).entity(\"\")\n\t\t\t\t\t\t.build();\n\t\t} else\n\t\t\tresponse = Response.status(Status.NOT_FOUND).entity(\"\").build();\n\t\treturn response;\n\n\t}",
"private void makeLogin() {\n if (enableLoginActivity && mAuth.getCurrentUser() == null) {\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n else if (!enableLoginActivity) {\n user = new User(\"johnDoe\", \"johnDoe@gmail.com\", \"1234\");\n }\n }",
"@Override\r\n\t\tpublic Session newSession(Request request, Response response) {\n\t\t\tLoginSession session = new LoginSession(request);\r\n\t\t\tsession.authenticate(\"scott\", \"tiger\");\r\n\t\t\t\r\n\t\t\treturn session;\r\n\t\t}",
"public void login() {\n try {\n callApi(\"GET\", \"account/session\", null, null, true);\n } catch (RuntimeException re) {\n\n }\n\n Map<String, Object> payload = new HashMap<>();\n payload.put(\"name\", \"admin\");\n payload.put(\"password\", apiAdminPassword);\n payload.put(\"remember\", 1);\n\n callApi(\"POST\", \"account/signin\", null, payload, true);\n }",
"@Override\n @SessionRequired\n public UserSession newSession(final User user, final boolean isDeviceTrusted) {\n final String seriesId = crypto.nextSessionId();\n final UserSession session = user.getEntityFactory().newByKey(UserSession.class, user, seriesHash(seriesId));\n session.setTrusted(isDeviceTrusted);\n final Date expiryTime = calcExpiryTime(isDeviceTrusted);\n session.setExpiryTime(expiryTime);\n session.setLastAccess(constants.now().toDate());\n\n // authenticator needs to be computed and assigned after the session has been persisted\n // assign authenticator in way not to disturb the entity meta-state\n final UserSession saved = save(session);\n saved.beginInitialising();\n saved.setAuthenticator(mkAuthenticator(saved.getUser(), seriesId /* un-hashed */, saved.getExpiryTime()));\n saved.endInitialising();\n\n // need to cache the established session in associated with the generated authenticator\n cache.put(saved.getAuthenticator().get().toString(), saved);\n\n return saved;\n }",
"@Override\n\tpublic SmbmsUser login(String userCode, String userPassword) {\n\t\treturn sud.login(userCode, userPassword);\n\t}",
"private void setAuthenticatedUser(HttpServletRequest req, HttpSession httpSess, String userName) {\n\t\t// Set the authentication\n\t\tauthComponent.setCurrentUser(userName);\n\n\t\t// Set up the user information\n\t\tUserTransaction tx = transactionService.getUserTransaction();\n\t\tNodeRef homeSpaceRef = null;\n\t\tUser user;\n\t\ttry {\n\t\t\ttx.begin();\n\t\t\tuser = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));\n\t\t\thomeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName), ContentModel.PROP_HOMEFOLDER);\n\t\t\tif(homeSpaceRef == null) {\n\t\t\t\tlogger.warn(\"Home Folder is null for user '\"+userName+\"', using company_home.\");\n\t\t\t\thomeSpaceRef = (NodeRef) nodeService.getRootNode(Repository.getStoreRef());\n\t\t\t}\n\t\t\tuser.setHomeSpaceId(homeSpaceRef.getId());\n\t\t\ttx.commit();\n\t\t} catch (Throwable ex) {\n\t\t\tlogger.error(ex);\n\n\t\t\ttry {\n\t\t\t\ttx.rollback();\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tlogger.error(\"Failed to rollback transaction\", ex2);\n\t\t\t}\n\n\t\t\tif (ex instanceof RuntimeException) {\n\t\t\t\tthrow (RuntimeException) ex;\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Failed to set authenticated user\", ex);\n\t\t\t}\n\t\t}\n\n\t\t// Store the user\n\t\thttpSess.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user);\n\t\thttpSess.setAttribute(LoginBean.LOGIN_EXTERNAL_AUTH, Boolean.TRUE);\n\n\t\t// Set the current locale from the Accept-Lanaguage header if available\n\t\tLocale userLocale = parseAcceptLanguageHeader(req, m_languages);\n\n\t\tif (userLocale != null) {\n\t\t\thttpSess.setAttribute(LOCALE, userLocale);\n\t\t\thttpSess.removeAttribute(MESSAGE_BUNDLE);\n\t\t}\n\n\t\t// Set the locale using the session\n\t\tI18NUtil.setLocale(Application.getLanguage(httpSess));\n\n\t}",
"public String login(){\n UsernamePasswordToken token = new UsernamePasswordToken(user.getAccount(),\n user.getPassword());\n\n// \"Remember Me\" built-in:\n token.setRememberMe(user.isRememberMe());\n\n Subject currentUser = SecurityUtils.getSubject();\n\n\n try {\n currentUser.login(token);\n } catch (AuthenticationException e) {\n // Could catch a subclass of AuthenticationException if you like\n FacesContext.getCurrentInstance().addMessage(\n null,\n new FacesMessage(\"Login Failed: \" + e.getMessage(), e\n .toString()));\n return \"/login\";\n }\n return \"index\";\n }",
"@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}",
"private void login() {\n setCredentials();\n setSysProperties();\n\n Properties sysProperties = System.getProperties();\n sysProperties.put(\"mail.store.protocol\", \"imaps\");\n this.session = Session.getInstance(sysProperties,\n new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n }",
"private boolean authenticatedUser(String uName, String pass) {\n\t\treturn true;\n\t}",
"private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// session = new EvernoteSession(info, result, getTempDir());\n// }\n ConnectionUtils.connectFirstTime();\n updateUiForLoginState();\n }",
"public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}",
"void loginAttempt(String email, String password);",
"int newUser(String username, String password, Time creationTime);",
"void markAsUserSession();",
"LoginContext login(String username, String password) throws LoginException;",
"void activateUser(String email, String activationToken);",
"User login(String username, String password);",
"public void run() {\n int id = getIdentity();\n iUser user = createUser(id);\n boolean userCreated = (user != null);\n if (userCreated) {\n presenter.printAccountCreated();\n } else {\n presenter.printRequestDeclined();\n }\n }",
"public void createSigninSession(OtpResult data, boolean rememberme) {\n\n\n editor.putString(KEY_ID,data.details.aUId);\n editor.putString(KEY_NUMBER,data.details.mobile);\n editor.putString(KEY_EMAIL,data.details.email);\n editor.putString(KEY_NAME,data.details.name);\n // Storing login value as TRUE\n editor.putBoolean(IS_LOGIN,true);\n editor.putBoolean(KEY_REMEMBER_ME,rememberme);\n editor.putString(PROFILE_IMG_PATH,data.picPath);\n editor.putString(PROFILE_IMG_URL,data.details.profilePic);\n editor.commit();\n }",
"public void authenticate() {\n LOGGER.info(\"Authenticating user: {}\", this.name);\n WebSession result = null;\n try {\n result =\n getContext()\n .getAuthenticationMethod()\n .authenticate(\n getContext().getSessionManagementMethod(),\n this.authenticationCredentials,\n this);\n } catch (UnsupportedAuthenticationCredentialsException e) {\n LOGGER.error(\"User does not have the expected type of credentials:\", e);\n } catch (Exception e) {\n LOGGER.error(\"An error occurred while authenticating:\", e);\n return;\n }\n // no issues appear if a simultaneous call to #queueAuthentication() is made\n synchronized (this) {\n this.getAuthenticationState().setLastSuccessfulAuthTime(System.currentTimeMillis());\n this.authenticatedSession = result;\n }\n }",
"@Override\r\n \t\t\tpublic SSession createSession(long tenantId, long userId, String userName,\r\n \t\t\t boolean technicalUser) throws SSessionException {\n \t\t\t\treturn null;\r\n \t\t\t}",
"@Override\n\tpublic void loginUser() {\n\t\t\n\t}",
"@Override\r\n \t\t\tpublic SSession createSession(long tenantId, String userName)\r\n \t\t\t throws SSessionException {\n \t\t\t\treturn null;\r\n \t\t\t}",
"public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}",
"void login(String user, String password);",
"protected void login() {\n\t\t\r\n\t}",
"@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }",
"public void createSession(int uid);",
"@POST\n @Path(\"/UserAuth\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response authenticateUser(final LoginRequest loginRequest) {\n final String methodName = \"authenticateUser\";\n log.entering(CLASS_NAME, methodName);\n Status status = Response.Status.OK;\n loginRequest.setImsAction(WipsConstant.WIPS_LOGIN_ACTION);\n final PendingApprovalResponse pendingApprovalResponse =\n this.wipsLoginBF.authenticateUser(loginRequest);\n if (pendingApprovalResponse.isValidUser()) {\n final String lterm =\n createUserSessionDetailsIntoCache(loginRequest.getRacfId(),\n pendingApprovalResponse);\n pendingApprovalResponse.setLtermToken(WipsUtil.encrpyt(lterm));\n } else {\n status = Response.Status.BAD_REQUEST;\n }\n log.exiting(CLASS_NAME, methodName);\n return buildResponse(pendingApprovalResponse, status);\n }",
"private void createUser(final String email, final String password) {\n\n }",
"public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"email\")).clear();\r\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(UID);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"pass\")).clear();\r\n\t\tdriver.findElement(By.id(\"pass\")).sendKeys(PWD);\r\n\t}",
"public static boolean login(Context ctx) {\n\t\t\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\t\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\t\n\t\tif(username.equals(\"user\") && password.equals(\"pass\")) {\n\t\t\tctx.res.setStatus(204);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"McBobby\",true));\n\t\t\treturn true;\n\t\t}else {\n\t\t\t\n\t\t\tctx.res.setStatus(400);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n//\t\tctx.queryParam(password); /authenticate?password=value\n//\t\tctx.pathParam(password); /authenticate/{password}\n\t}",
"public boolean loginUser();",
"public Session(User user) {\n sessionId = UUID.randomUUID().toString();\n loggedInUser = user;\n }",
"public int logIn() {\n guestPresenter.printLogInMessage();\n int id = requestInt(\"id\");\n char[] password = requestString(\"password\").toCharArray();\n UserManager.UserType user = guestManager.logIn(id, password);\n\n if (user == null) {\n guestPresenter.logInFailure();\n return -1;\n } else {\n return id;\n }\n }",
"protected synchronized void login() {\n\t\tauthenticate();\n\t}",
"public void authenticateUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tint index=loginattempt();\r\n\t}",
"private UserSession handleBasicAuthentication(String credentials, HttpServletRequest request) {\n\t\tString userPass = Base64Decoder.decode(credentials);\n\n\t\t// The decoded string is in the form\n\t\t// \"userID:password\".\n\t\tint p = userPass.indexOf(\":\");\n\t\tif (p != -1) {\n\t\t\tString userID = userPass.substring(0, p);\n\t\t\tString password = userPass.substring(p + 1);\n\t\t\t\n\t\t\t// Validate user ID and password\n\t\t\t// and set valid true if valid.\n\t\t\t// In this example, we simply check\n\t\t\t// that neither field is blank\n\t\t\tIdentity identity = WebDAVAuthManager.authenticate(userID, password);\n\t\t\tif (identity != null) {\n\t\t\t\tUserSession usess = UserSession.getUserSession(request);\n\t\t\t\tsynchronized(usess) {\n\t\t\t\t\t//double check to prevent severals concurrent login\n\t\t\t\t\tif(usess.isAuthenticated()) {\n\t\t\t\t\t\treturn usess;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tusess.signOffAndClear();\n\t\t\t\t\tusess.setIdentity(identity);\n\t\t\t\t\tUserDeletionManager.getInstance().setIdentityAsActiv(identity);\n\t\t\t\t\t// set the roles (admin, author, guest)\n\t\t\t\t\tRoles roles = BaseSecurityManager.getInstance().getRoles(identity);\n\t\t\t\t\tusess.setRoles(roles);\n\t\t\t\t\t// set authprovider\n\t\t\t\t\t//usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);\n\t\t\t\t\n\t\t\t\t\t// set session info\n\t\t\t\t\tSessionInfo sinfo = new SessionInfo(identity.getName(), request.getSession());\n\t\t\t\t\tUser usr = identity.getUser();\n\t\t\t\t\tsinfo.setFirstname(usr.getProperty(UserConstants.FIRSTNAME, null));\n\t\t\t\t\tsinfo.setLastname(usr.getProperty(UserConstants.LASTNAME, null));\n\t\t\t\t\tsinfo.setFromIP(request.getRemoteAddr());\n\t\t\t\t\tsinfo.setFromFQN(request.getRemoteAddr());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInetAddress[] iaddr = InetAddress.getAllByName(request.getRemoteAddr());\n\t\t\t\t\t\tif (iaddr.length > 0) sinfo.setFromFQN(iaddr[0].getHostName());\n\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t // ok, already set IP as FQDN\n\t\t\t\t\t}\n\t\t\t\t\tsinfo.setAuthProvider(BaseSecurityModule.getDefaultAuthProviderIdentifier());\n\t\t\t\t\tsinfo.setUserAgent(request.getHeader(\"User-Agent\"));\n\t\t\t\t\tsinfo.setSecure(request.isSecure());\n\t\t\t\t\tsinfo.setWebDAV(true);\n\t\t\t\t\tsinfo.setWebModeFromUreq(null);\n\t\t\t\t\t// set session info for this session\n\t\t\t\t\tusess.setSessionInfo(sinfo);\n\t\t\t\t\t//\n\t\t\t\t\tusess.signOn();\n\t\t\t\t\treturn usess;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"protected void switchToUser( ApplicationContext ctx, String username ) {\n\n UserDetails user = userManager.loadUserByUsername( username );\n\n List<GrantedAuthority> authrs = new ArrayList<GrantedAuthority>( user.getAuthorities() );\n\n ProviderManager providerManager = ( ProviderManager ) ctx.getBean( \"authenticationManager\" );\n providerManager.getProviders().add( new TestingAuthenticationProvider() );\n\n TestingAuthenticationToken token = new TestingAuthenticationToken( username, \"testing\", authrs );\n token.setAuthenticated( true );\n\n putTokenInContext( token );\n }",
"public String signIn(String username, String password);",
"public void createUserAccount(UserAccount account);",
"public void signIn(String userName, String password) {\n\t}",
"DefaultSession createSession(String id);",
"public AuthToken loginUser(){\n return null;\n }",
"private boolean create() {\r\n\t\tboolean rtn = false;\r\n\t\ttry {\r\n\t\t\tif (_session != null) {\r\n\t\t\t\tSessionMgr.removeSession(_session.getKey());\r\n\t\t\t\t_session = null;\r\n\t\t\t\t_transaction.setSession(_session);\r\n\t\t\t}\r\n\r\n\t\t\tString sentpwd = _where.optString( UsrRequest.PASSWORD, null);\r\n\t\t\tif ((sentpwd == null) || (sentpwd.length() == 0)) {\r\n\t\t\t\tsetError(\"Password missing from login\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString loginname = _where.optString( UsrRequest.LOGINNAME, null);\r\n\t\t\tif ((sentpwd == null) || (sentpwd.length() == 0)) {\r\n\t\t\t\tsetError(\"Loginname missing from login\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\tEntityMap emap = EntityMapMgr.getEMap(USR);\r\n\t\t\t_data.put(COLUMNS, FIELDLIST);\r\n\t\t\tResultSet rs = _dbi.readRecords(emap, _data);\r\n\t\t\tif (rs == null) {\r\n\t\t\t\tsetError(\"User login failed... Invalid usr id ????\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tthis._usrid = rs.getLong(ID);\r\n\t\t\t\tString firstname = rs.getString(UsrRequest.FIRSTNAME);\r\n\t\t\t\tString lastname = rs.getString(UsrRequest.LASTNAME);\r\n\t\t\t\tString str_salt = rs.getString(UsrRequest.SALT);\r\n\t\t\t\tString email = rs.getString(UsrRequest.EMAIL);\r\n\r\n\t\t\t\tint code = validate(\r\n\t\t\t\t\t\tthis._usrid, \r\n\t\t\t\t\t\trs.getString(UsrRequest.DIGEST), \r\n\t\t\t\t\t\tEncryptUtil.getPasswordDigest(sentpwd, str_salt), \r\n\t\t\t\t\t\trs.getInt(\"statusid\"), \r\n\t\t\t\t\t\trs.getInt(\"attempts\"), \r\n\t\t\t\t\t\trs.getTimestamp(\"lastattempt\"));\r\n\t\t\t\trs.close();\r\n\t\t\t\tif (code != NORMAL) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tArrayList<Integer> ugroups = AuthorityMgr.getUGroups(_dbi, this._usrid);\r\n\t\t\t\tif (_session == null) {\r\n\t\t\t\t\t_session = SessionMgr.createSession(this._usrid, ugroups);\r\n\t\t\t\t}\r\n\t\t\t\t_session.setLoginname(loginname);\r\n\t\t\t\t_session.setData(UsrRequest.EMAIL, email);\r\n\t\t\t\t_transaction.setSession(_session);\r\n\r\n\t\t\t\t_jwriter.openObject(DATA);\r\n\t\t\t\t_jwriter.writePair(LOGIN, true);\r\n\t\t\t\t_jwriter.writePair(\"usrid\", this._usrid);\r\n\t\t\t\t_jwriter.writePair(\"firstname\", firstname);\r\n\t\t\t\t_jwriter.writePair(\"lastname\", lastname);\r\n\t\t\t\t_jwriter.writePair(\"sessionid\", _session.getSessionID());\r\n\t\t\t\t_jwriter.writePair(\"permissions\", AuthorityMgr.convertPermissions(ugroups));\r\n\t\t\t\t\r\n\t\t\t\t_jwriter.writePair(\"storageloc\", StorageMgr.instance().usableAsJson());\r\n//\t\t\t\t_jwriter.writePair(\"serverconfig\", ServerconfigRequest.info(_conn));\r\n\t\t\t\t_dbi.read(\"usrconfig\", EntityMapMgr.getEMap(\"usrconfig\"), JsonUtil.getDataWhere(this._usrid));\r\n\r\n\t\t\t\t_jwriter.closeObject();\r\n\t\t\t\trtn = true;\r\n\t\t\t} else {\r\n\t\t\t\t// user does not exists\r\n\t\t\t\tsetErrorNoLog(\"Login failed\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetError(e);\r\n\t\t}\r\n\t\treturn rtn;\r\n\t}",
"private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }",
"public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;",
"public void shiro_signin(){\n Factory<SecurityManager> factory = new IniSecurityManagerFactory(\"classpath:shiro.ini\");\n SecurityManager securityManager = factory.getInstance();\n\n // for this simple example quickstart, make the SecurityManager\n // accessible as a JVM singleton. Most applications wouldn't do this\n // and instead rely on their container configuration or web.xml for\n // webapps. That is outside the scope of this simple quickstart, so\n // we'll just do the bare minimum so you can continue to get a feel\n // for things.\n SecurityUtils.setSecurityManager(securityManager);\n\n // Now that a simple Shiro environment is set up, let's see what you can do:\n\n // get the currently executing user:\n Subject currentUser = SecurityUtils.getSubject();\n\n // Do some stuff with a Session (no need for a web or EJB container!!!)\n Session session = currentUser.getSession();\n session.setAttribute(\"someKey\", \"aValue\");\n String value = (String) session.getAttribute(\"someKey\");\n if (value.equals(\"aValue\")) {\n logger.info(\"Retrieved the correct value! [\" + value + \"]\");\n }\n\n // let's login the current user so we can check against roles and permissions:\n if (!currentUser.isAuthenticated()) {\n UsernamePasswordToken token = new UsernamePasswordToken(\"root\", \"root\");\n token.setRememberMe(true);\n try {\n currentUser.login(token);\n } catch (UnknownAccountException uae) {\n logger.info(\"There is no user with username of \" + token.getPrincipal());\n } catch (IncorrectCredentialsException ice) {\n logger.info(\"Password for account \" + token.getPrincipal() + \" was incorrect!\");\n } catch (LockedAccountException lae) {\n logger.info(\"The account for username \" + token.getPrincipal() + \" is locked. \" +\n \"Please contact your administrator to unlock it.\");\n }\n // ... catch more exceptions here (maybe custom ones specific to your application?\n catch (AuthenticationException ae) {\n //unexpected condition? error?\n }\n }\n\n //say who they are:\n //print their identifying principal (in this case, a username):\n logger.info(\"User [\" + currentUser.getPrincipal() + \"] logged in successfully.\");\n\n //test a role:\n if (currentUser.hasRole(\"admin\")) {\n logger.info(\"has admin role\");\n } else {\n logger.info(\"no admin role\");\n }\n\n //test a typed permission (not instance-level)\n if (currentUser.isPermitted(\"order:read:finished\")) {\n logger.info(\"has order read \");\n } else {\n logger.info(\"no order read \");\n }\n }",
"public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }",
"private void authenticate(String user, String pass) {\n }",
"private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }",
"public String createSession(String username){\n\t\tString token = generateToken(username);\n\t\tfor(Session s : getSessionSet()){\n\t\t\tif(s.getName().equals(username)){\t\t//User already in session.\n\t\t\t\ts.setToken(token); \t\t\t\t//Generates a new token.\n\t\t\t\ts.setLoginTime(new LocalTime()); //Resets login time.\n\t\t\t\treturn token;\t\t\t\t\t\t//No need to see more users.\n\t\t\t}\t\t\t\n\t\t}\n\t\t//User not in session, create a new one.\n\t\taddSession(new Session(new LocalTime(),username,token));\t\n\t\treturn token;\n\t}",
"User login(String email, String password) throws AuthenticationException;",
"private boolean loginAndStore(boolean isNewUser)\r\n {\n \r\n List<Pair<String, String>> requestHeaderProperties = new ArrayList<>(1);\r\n String encoding = Base64.getEncoder().encodeToString((usernameField.getText() + \":\" + passwordField.getText()).getBytes());\r\n requestHeaderProperties.add(new Pair<>(\"Authorization\", \"Basic \" + encoding));\r\n \r\n JsonElement jsonDataPacket = new ArborJsonRetriever().getResponseJson(girderBaseURL + \"user/authentication\", \"GET\", requestHeaderProperties);\r\n \r\n //System.out.println(jsonDataPacket);\r\n \r\n if (jsonDataPacket == null)\r\n {\r\n if (isNewUser)\r\n new Alert(Alert.AlertType.ERROR, \"Exceptional error: New user registration completed successfully, but login with the new credentials failed.\", ButtonType.OK).showAndWait();\r\n else\r\n new Alert(Alert.AlertType.ERROR, \"Login failed.\", ButtonType.OK).showAndWait();\r\n \r\n return false;\r\n }\r\n \r\n JsonObject jsonDataPacketObj = jsonDataPacket.getAsJsonObject();\r\n \r\n userInfo = new ArborUserInfo(\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"_id\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"login\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"firstName\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"lastName\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"email\").getAsString(),\r\n jsonDataPacketObj.get(\"authToken\").getAsJsonObject().get(\"token\").getAsString(),\r\n jsonDataPacketObj.get(\"authToken\").getAsJsonObject().get(\"expires\").getAsString());\r\n \r\n if (isNewUser)\r\n new Alert(Alert.AlertType.CONFIRMATION, \"Account created! Welcome, \" + userInfo.getFirstName() + \"!\", ButtonType.OK).showAndWait();\r\n else\r\n new Alert(Alert.AlertType.CONFIRMATION, \"Login successful! Welcome, \" + userInfo.getFirstName() + \"!\", ButtonType.OK).showAndWait();\r\n \r\n return true;\r\n }",
"public AuthenticatedUser() {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Please input your username: \"); //Ask user to identify with services\n this.name = input.nextLine();\n \n if (!new File(AuctionSecurity.CLIENT_STORAGE + name + \"/Private.key\").exists()) { //If no private key exists for this invidual on file, we must make one.\n input = new Scanner(System.in);\n System.out.println(\"User not registered.\\nInsert secret code for registration: \");\n if (input.nextLine().equals(PASSCODE)) { //Ensure the user is someone whom we have given permission to register.\n this.privateKey = AuctionSecurity.registerUser(name);\n } else {\n System.out.println(\"That's the incorrect passcode. Therefore you cannot register.\");\n System.exit(0);\n }\n } else {\n this.privateKey = AuctionSecurity.getPrivateKey(name);\n }\n this.name = name;\n }",
"User getCurrentLoggedInUser();",
"public User logInUser(final String login, final String password);",
"private void loginFlow() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\n\t\tif (userController.isLoggedIn()) {\n\t\t\t// continue\n\t\t} else {\n\t\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t\t}\n\t}",
"void open(SessionParameters sessionParameters, AuthenticationParameters authenticationParameters);",
"public User login(String loginName, String password) throws UserBlockedException;",
"@Override\n\t\t\tpublic void submit(String user, String pass) {\n\t\t\t\tsetUsername(user);\n\t\t\t\tsetPassword(pass);\n\t\t\t\tlogin();\n\t\t\t}",
"public void createLoginSession(String name, String email, String phone){\n editor.putBoolean(IS_LOGIN, true);\n\n // Storing data in pref\n editor.putString(KEY_NAME, name);\n editor.putString(KEY_EMAIL, email);\n editor.putString(KEY_PHONE, phone);\n\n // commit changes\n editor.commit();\n }",
"@PreAuthorize(\"@userAuthorize.canCreate(#user)\")\n\t@RequestMapping(value = \"/createWithLogin\", method = RequestMethod.POST)\n\tpublic ResponseEntity<?> createWithLogin(@RequestBody User user, @RequestParam Map<String, Object> params) throws NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException, KeyStoreException, KeyManagementException, UnrecoverableKeyException {\n\t\t// Call serverauth to create user.\n\t String serverauthUrl = evn.getProperty(\"serverauth.url\");\n\t String token = params.get(\"token\").toString();\n\t Map<String, Object> data = new HashMap<String, Object>();\n\t data.put(\"username\", user.getUsername());\n\t data.put(\"password\", user.getPassword());\n\t data.put(\"displayname\", user.getDisplayname());\n\t data.put(\"thumbnail\", user.getThumbnail());\n\t data.put(\"enabled\", true);\n\t ResponseEntity<Object> response = RestAPIHelper.exchangeSSLService(serverauthUrl + \"/users/createWithEvent\", HttpMethod.POST, token, null, data, null);\n\t Map<String, Object> resultRemote = (Map<String, Object>) response.getBody();\n\t if(resultRemote.get(\"error\") != null) {\n\t \t// throw server exception.\n\t\t \tthrow new ServerException(Constant.SERVERCODE_ERROR);\n\t }\n\t \n\t try {\n\t \tUser result = userService.create(user);\n\t\t\t// Call serverauth to confirm create user as SUCCESS.\n\t\t\tresponse = RestAPIHelper.exchangeSSLService(serverauthUrl + \"/users/confirmStatus/\" + resultRemote.get(\"id\") + \"/\" + Constant.SERVICETRANSACTION_SUCCESS, HttpMethod.GET, token, null, null, null);\n\t\t\t// return.\n\t\t\treturn new ResponseEntity<Integer>(result.getId(), HttpStatus.OK);\n\t } catch(Exception ex) {\n\t\t\t// Call serverauth to confirm create user as ABORT.\n\t\t\tresponse = RestAPIHelper.exchangeSSLService(serverauthUrl + \"/users/confirmStatus/\" + resultRemote.get(\"id\") + \"/\" + Constant.SERVICETRANSACTION_ABORT, HttpMethod.GET, token, null, null, null);\n\t\t\t// throw server exception.\n\t\t \tthrow new ServerException(Constant.SERVERCODE_ERROR);\n\t }\n\t \n\t}",
"@Override\r\n protected final String loginAsAutoUser(boolean launch) {\r\n \t//login(DDConstants.AUTO_USERNAME, DDConstants.AUTO_PASSWORD, launch);\r\n \tsuper.login(getAutoUserName(), getAutoPassword(), launch);\r\n\r\n \tchooseApp();\r\n\r\n \treturn getCurrentUser();\r\n }",
"LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;",
"@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain,\n Authentication authResult) throws IOException, ServletException {\n ApiUser apiUser = this.apiUsersService.getApiUserByUserName(((User) authResult.getPrincipal()).getUsername());\n String jwtToken = Jwts.builder()\n .setSubject(((User) authResult.getPrincipal()).getUsername())\n .setExpiration(new Date(System.currentTimeMillis() + EXPIRATION_TIME))\n .claim(\"authorities\", ((User) authResult.getPrincipal()).getAuthorities().toArray())\n .claim(\"firstName\", apiUser.getFirstName())\n .claim(\"lastName\", apiUser.getLastName())\n .claim(\"apiUserId\", apiUser.getId())\n .signWith(SignatureAlgorithm.HS512, SECRET.getBytes(StandardCharsets.UTF_8))\n .compact();\n try {\n response.getWriter().write(TOKEN_PREFIX + jwtToken);\n this.eventsService.createEvent(new Event(\"Logged In\", apiUser,\n new Date(System.currentTimeMillis()).getTime(), false));\n } catch (Exception e) {\n authLogger.warn(e.getMessage());\n throw (e);\n }\n response.setStatus(HttpServletResponse.SC_ACCEPTED);\n }",
"protected void onLoginSuccess(HttpServletRequest request, HttpServletResponse response, Authentication successfulAuthentication) {\n String username = successfulAuthentication.getName();\n\n logger.debug(\"Creating new persistent login for user \" + username);\n //SHANE\n username = combineUserNameOrgId(request, username);\n\n PersistentRememberMeToken persistentToken = new PersistentRememberMeToken(username, generateSeriesData(),\n generateTokenData(), new Date());\n try {\n tokenRepository.createNewToken(persistentToken);\n addCookie(persistentToken, request, response);\n } catch (DataAccessException e) {\n logger.error(\"Failed to save persistent token \", e);\n }\n }",
"public UserAuthToken createUser(CreateUserRequest request);",
"@Override\n\tpublic boolean employeeLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.employeeLogIn(username, password);\n\t\treturn result;\n\t}",
"@GetMapping(\"/login\")\n\tpublic boolean login(HttpServletRequest request) {\n\t\t//Implement logic to authenticate and set authenticated user object in session , setting \n\t\t\n\t\tUserInfo user = new UserInfo(\"yogesh\", \"admin\");\n\t\tHttpSession session = request.getSession(true);\n\t\tsession.setAttribute(\"authUser\",user);\n\t\treturn true;\n\t\t\n\t}",
"public String[] login(String username,String password){\n\t\tFlexSession session = FlexContext.getFlexSession();\r\n//\t\tSystem.out.println(username+\"---\"+session.getAttribute(username)+\"::\"+password + \"---\" + session.getId());\r\n//\t\tsession.setAttribute(username, username);\r\n//\t\tMySessionContext context = MySessionContext.getInstance();\r\n//\t\t\r\n//\t\tFlexSession userInfo = context.getSession(username);\r\n//\t\tif(userInfo != null && userInfo.isValid()) {\r\n//\t\t\tSystem.out.println(username + \"====\" + userInfo.isValid());\r\n//\t\t\tif(userInfo.getAttribute(username)!=null&&!userInfo.getAttribute(username).equals(\"\")){\r\n//\t\t\t\tcontext.getSession(username).invalidate();\r\n//\t\t\t}\r\n//\t\t} \r\n//\t\tcontext.addSession(session, username);\r\n//\t\tsession.addSessionCreatedListener(listener);\r\n//\t\tsession.addSessionDestroyedListener(new MyFlexSessionListener());\r\n\t\t//session.invalidate();\r\n\t\t//session.cancelTimeout()\r\n\t//\tsession.getId();\r\n\t\tBsWebUser bsWebUser = userLoginService.login(username,password);\r\n\t\t\r\n\t\tif(bsWebUser == null) {\r\n\t\t\t//用户不存在\r\n\t\t\treturn new String[] {\"-1\",\"用户名或密码错误\"} ;\r\n\t\t}else {\r\n\t\t\tif(bsWebUser.getWuActivestatus() == 0) {\r\n//\t\t\t\tloginMsg = \"该用户未激活!\";\r\n\t\t\t\treturn new String[] {\"-1\",\"该用户未激活!\"} ;\r\n\t\t\t}else if(bsWebUser.getWuActivestatus() == 2){\r\n//\t\t\t\tloginMsg = \"该用户已禁用!\";\r\n\t\t\t\treturn new String[] {\"-1\",\"该用户已禁用!\"} ;\r\n\t\t\t}else if(bsWebUser.getWuActivestatus() == 3){\r\n//\t\t\t\tloginMsg = \"该用户已锁定,请稍候再试!\";\r\n\t\t\t\treturn new String[] {\"-1\",\"该用户已锁定,请稍候再试!\"} ;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsession.setAttribute(\"user\", bsWebUser);\r\n\t\treturn new String[] {String.valueOf(bsWebUser.getWuId()),bsWebUser.getBsUserInfo().getNickName(),bsWebUser.getBsUserInfo().getRealName()};\r\n\t}",
"@Override\n\tpublic boolean managerLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.managerLogIn(username, password);\n\t\treturn result;\n\t}",
"public void onClickedActiveDirectorySignIn() {\n showProgressDialog(getString(R.string.authentication_attempting));\n // Attempt to get a user and acquireTokenSilently\n // If this fails we will do an interactive request\n Log.d(TAG, \"onClickedActiveDirectorySignIn\");\n IAccount currentAccount =\n MicrosoftIdentityHelper.getUserByPolicy(activeDirectoryApp.getAccounts(), Constants.SISU_POLICY);\n final String[] scopes = Constants.SCOPES.split(\"\\\\s+\");\n if (currentAccount != null) {\n // We have 1 user\n activeDirectoryApp.acquireTokenSilentAsync(\n scopes,\n currentAccount,\n getAuthSilentCallback());\n } else {\n // We have no user (for required policy)\n activeDirectoryApp.acquireToken(MainActivity.this, scopes, getAuthInteractiveCallback());\n }\n }",
"@Test\n public void test_create_user_and_login_success() {\n try {\n TokenVO firstTokenVO = authBO.createUser(\"createduser1\",\"createdpassword1\");\n Assert.assertNotNull(firstTokenVO);\n Assert.assertNotNull(firstTokenVO.getBearer_token());\n Assert.assertTrue(firstTokenVO.getCoachId() > 1);\n String firstToken = firstTokenVO.getBearer_token();\n\n TokenVO secondTokenVO = authBO.login(\"createduser1\", \"createdpassword1\");\n Assert.assertNotNull(secondTokenVO);\n Assert.assertNotNull(secondTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() > 1);\n Assert.assertTrue(secondTokenVO.getBearer_token() != firstTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() == firstTokenVO.getCoachId());\n } catch (AuthException e) {\n System.err.println(e.getMessage());\n Assert.assertTrue(e.getMessage().equalsIgnoreCase(\"\"));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic void execute() {\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\r\n\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\tLOG.debug(String.format(\"Entering AbstractAuthenticator, userid: %s\", ssoUser!=null?ssoUser.getUserName():\"null\"));\r\n\t\t}\r\n\t\tmapHeaderToUserProfileMap();\r\n\r\n\t\tif (AuthenticatorHelper.isVAPLoggedIn(request)) {\r\n\t\t\tString userIdentifier = (String)userProfile.get(AuthenticationConsts.KEY_USER_NAME);\r\n\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\tLOG.debug(String.format(\"User is Logged in, user: %s\", userIdentifier));\r\n\t\t\t}\r\n\t\t\tif (AuthenticatorHelper.isForceCleanupSession(request)) {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(String.format(\"Force session clean up, userid: %s\", userIdentifier));\r\n\t\t\t\t}\r\n\t\t\t\tAuthenticatorHelper.cleanupSession(request);\r\n\t\t\t} else if (isDiffUser()) {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(String.format(\"Different User, userid: %s\", userIdentifier));\r\n\t\t\t\t}\r\n\t\t\t\tuserProfile.put(AuthenticationConsts.KEY_LAST_LOGIN_DATE,\r\n\t\t\t\t\t\t\t\tnew Date());\r\n\t\t\t\tAuthenticatorHelper.cleanupSession(request);\r\n\t\t\t} else if (isUserRecentUpdated()) {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(String.format(\"User is updated, userid: %s\", userIdentifier));\r\n\t\t\t\t}\r\n\t\t\t\t// not cleanup session per CR 86\r\n\t\t\t\t//AuthenticatorHelper.cleanupSession(request);\r\n\t\t\t} else if (AuthenticatorHelper.isForceInitSession(request)) {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(String.format(\"Force initSession tag found, userid: %s\", userIdentifier));\r\n\t\t\t\t}\r\n\t\t\t\t// not cleanup session per CR 86\r\n\t\t\t\t//AuthenticatorHelper.cleanupSession(request);\r\n\t\t\t} else if (AuthenticatorHelper.isSiteChanged(request)) {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(String.format(\"Site is changed, userid: %s\", userIdentifier));\r\n\t\t\t\t}\r\n\t\t\t\t// not cleanup session per CR 86\r\n\t\t\t\t//AuthenticatorHelper.cleanupSession(request);\r\n\t\t\t} else {\r\n\t\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\t\tLOG.debug(String.format(\"Other Cases, userid: %s\", userIdentifier));\r\n\t\t\t\t}\r\n\t\t\t\t// keep the current HTTP header user profile\r\n\t\t\t\tMap httpHeaderUserProfile = userProfile;\r\n\r\n\t\t\t\t// fetch userProfile from session, only need to refresh this user profile map\r\n\t\t\t\tuserProfile = (Map)request.getSession()\r\n\t\t\t\t\t\t\t\t\t\t .getAttribute(AuthenticationConsts.USER_PROFILE_KEY);\r\n\t\t\t\t// get groups from userProfile\r\n\t\t\t\tList<String> sessionGroups = (List<String>)userProfile.get(AuthenticationConsts.KEY_USER_GROUPS);\r\n\t\t\t\trefreshLocaleRelatedGroups(sessionGroups);\r\n\r\n\t\t\t\t// refresh user timezone\r\n\t\t\t\trefreshUserTimezone(userProfile, httpHeaderUserProfile);\r\n\r\n\t\t\t\tuserName = (String)userProfile.get(AuthenticationConsts.KEY_USER_NAME);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\t\tLOG.debug(String.format(\"User is logging in as: %s\", ssoUser!=null?ssoUser.getUserName():\"null\"));\r\n\t\t\t}\r\n\t\t\tuserProfile.put(AuthenticationConsts.KEY_LAST_LOGIN_DATE,\r\n\t\t\t\t\t\t\tnew Date());\r\n\t\t}\r\n\r\n\r\n\t\t// Set the SPFAuthType attribute before calling group service so the group definitions can\r\n\t\t// use its value.\r\n\t\tsetAuthTypeProfileAttribute();\r\n\r\n\t\ttry {\r\n\t\t\t// Retrieve user group from UGS to SSOUser\r\n\t\t\t// and synchronous to VAP user, and return the\r\n\t\t\t// updated vap user\r\n\t\t\tUser updatedVAPUser = syncVAPUser();\r\n\t\t\tsaveUserProfile2Session(updatedVAPUser);\r\n\t\t\tuserName = ssoUser.getUserName();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tuserName = null;\r\n\t\t\tLOG.error(\"Invoke Authenticator.execute error: \" + ex.getMessage(),\r\n\t\t\t\t\t ex);\r\n\t\t\trequest.getSession()\r\n\t\t\t\t .setAttribute(AuthenticationConsts.SESSION_ATTR_SSO_ERROR,\r\n \"1\");\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.AUTH001, ex.toString());\r\n\t\t}\r\n\t\tif (LOG.willLogAtLevel(LogConfiguration.DEBUG)) {\r\n\t\t\tLOG.debug(String.format(\"Time spent on AbstractAuthenticator.execute (sec): %s for user: %s\", (System.currentTimeMillis()-startTime)/1000, userName));\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void createSession(String customer) {\n\t\t\n\t}",
"public User login(Credentials creds) throws InvalidCredentialsException, MultipleLoginException, UserInactiveException {\r\n//\t\tLogManager.getLogger().info( \"Current sessions: \" + irpSessionRepository.count() );\r\n//\t\tLogManager.getLogger().info( \"Current Locks: \" + irpLockRepository.count() );\r\n\r\n \tString md5password = passwordManager.hashMC( creds.getPassword() );\r\n\t\tString schema = dhh.getSchema();\r\n\r\n//\t\ttry {\r\n//\t\t\tInteger uc = getDataSource().queryForObject(\"select usercode from \" + schema + \".USERACCOUNT where username = ? and password = ?\", Integer.class, creds.getUsername(), md5password);\r\n//\t\t\tAppSession is = irpSessionRepository.find( uc );\r\n//\r\n//\t\t\tif ( is == null ) {\r\n//\t\t\t\tApplicationParameter ap = apr.findParam(ApplicationParameterType.GENERAL, 1, 6); // EVALUATOR param\r\n//\t\t\t\tUser u = userRepository.find( uc );\r\n//\r\n//\t\t\t\tif ( ap.getParameterValueInt() == 0 ) {\r\n//\t\t\t\t\tif ( u.getUserAccount().hasRole( 7 ) ) {\r\n//\t\t\t\t\t\t// Evaluators should not login!\r\n//\t\t\t\t\t\tLogManager.getLogger().warn(\"Evaluator Cannot login. Evaluator flow NOT enabled\");\r\n//\t\t\t\t\t\tthrow new UserInactiveException( creds );\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\tif ( u.getPosition() > 0 &&\r\n//\t\t\t\t\t\t\t( u.getUserAccount().hasRole( 3 ) || u.getUserAccount().hasRole( 4 ) || u.getUserAccount().hasRole( 5 ) )) {\r\n//\t\t\t\t\t\tLogManager.getLogger().warn(\"Branch User Cannot login. Evaluator flow NOT enabled\");\r\n//\t\t\t\t\t\tthrow new UserInactiveException( creds );\r\n//\t\t\t\t\t}\r\n//\t\t\t\t} else {\r\n//\t\t\t\t\tif ( ap.getFailCode() != 1 ) {\r\n//\t\t\t\t\t\tif ( u.getPosition() > 0 &&\r\n//\t\t\t\t\t\t\t\t( u.getUserAccount().hasRole( 3 ) || u.getUserAccount().hasRole( 4 ) || u.getUserAccount().hasRole( 5 ) )) {\r\n//\t\t\t\t\t\t\tLogManager.getLogger().warn(\"Branch User Cannot login. Branches in Evaluator flow NOT enabled\");\r\n//\t\t\t\t\t\t\tthrow new UserInactiveException( creds );\r\n//\t\t\t\t\t\t}\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t\tirpSessionRepository.create(creds.getFromIp(), uc);\r\n//\t\t\t\tu.getUserAccount().setLastlogin( new Date() );\r\n//\t\t\t\tuserAccountRepository.persist( u.getUserAccount() );\r\n//\t\t\t\tdhh.logLogin(creds.getUsername(), \"AUTHENTICATION_SUCCEEDED\", null, null, null, null);\r\n//\t\t\t\treturn u;\r\n//\t\t\t} else {\r\n//\t\t\t\tthrow new MultipleLoginException();\r\n//\t\t\t}\r\n//\t\t} catch (Exception e) {\r\n//\t\t\tif ( e instanceof UserInactiveException) {\r\n//\t\t\t\tdhh.logLogin(creds.getUsername(), \"USER_INACTIVE\", null, null, null, null);\r\n//\t\t\t\tthrow e;\r\n//\t\t\t}\r\n//\t\t\tif ( e instanceof MultipleLoginException) {\r\n//\t\t\t\tdhh.logLogin(creds.getUsername(), \"ALREADY_LOGGED_IN\", null, null, null, null);\r\n//\t\t\t\tthrow e;\r\n//\t\t\t}\r\n//\t\t\tdhh.logLogin(creds.getUsername(), \"AUTHENTICATION_FAILED\", null, null, null, null);\r\n//\t\t\tthrow new InvalidCredentialsException(creds);\r\n//\t\t}\r\n\t\treturn null;\r\n\t}"
] | [
"0.63895214",
"0.63733476",
"0.6314194",
"0.62689686",
"0.62413824",
"0.6224284",
"0.62084985",
"0.618553",
"0.60869443",
"0.6083432",
"0.6079781",
"0.59883887",
"0.59828746",
"0.5975154",
"0.5918076",
"0.5906892",
"0.5905404",
"0.5901545",
"0.589871",
"0.5897103",
"0.58957946",
"0.5892299",
"0.587548",
"0.587201",
"0.5860172",
"0.58459127",
"0.58120894",
"0.58096",
"0.5797432",
"0.5759017",
"0.5753324",
"0.57502526",
"0.5743723",
"0.5741202",
"0.5726222",
"0.57178956",
"0.57133013",
"0.5698498",
"0.56854385",
"0.5679587",
"0.5677264",
"0.5675018",
"0.5674029",
"0.5671177",
"0.5668279",
"0.5666701",
"0.56604195",
"0.5660245",
"0.56337893",
"0.5633004",
"0.5632194",
"0.56221896",
"0.5619235",
"0.5618613",
"0.56140983",
"0.5611949",
"0.5608554",
"0.5607799",
"0.560772",
"0.56039906",
"0.5603889",
"0.5600067",
"0.5599905",
"0.5596414",
"0.5595764",
"0.55885226",
"0.5587636",
"0.55873",
"0.5586004",
"0.5581642",
"0.5574223",
"0.5568017",
"0.5536962",
"0.55272686",
"0.5527194",
"0.5519425",
"0.5518806",
"0.550857",
"0.5508012",
"0.550599",
"0.55001587",
"0.5496766",
"0.54960626",
"0.54935616",
"0.549016",
"0.5483843",
"0.54805374",
"0.54790914",
"0.5476896",
"0.5471697",
"0.5469843",
"0.5466306",
"0.5465963",
"0.54642487",
"0.5455401",
"0.5453422",
"0.54529256",
"0.5450996",
"0.54476684",
"0.5445031",
"0.54441565"
] | 0.0 | -1 |
Makes sessionID unavailable for connection | public void logout(int sessionID) {
for (int i=0;i<sessions.size();i++)
if (sessions.get(i).getID() == sessionID) {
if (sessions.get(i).getUser() instanceof Shopper)
((Shopper)sessions.get(i).getUser()).logout();
sessions.remove(i);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void unsetSessionID();",
"void setSessionID(java.lang.String sessionID);",
"void sessionExpired();",
"public abstract void setIdSession(String id_session);",
"public void changeSessionId(Session session);",
"@Override\n\t\tpublic boolean isRequestedSessionIdValid() {\n\t\t\treturn false;\n\t\t}",
"@Override\n\t\tpublic boolean isRequestedSessionIdFromURL() {\n\t\t\treturn false;\n\t\t}",
"private static void closeSession() {\n isSessionOpen = false;\n }",
"boolean isSetSessionID();",
"@Override\n\tpublic boolean isRequestedSessionIdFromUrl() {\n\t\treturn false;\n\t}",
"public void connectionTimeout(Long sessionId);",
"protected boolean closeSessionOnUnrecoverableError() {\n return false;\n }",
"@Override\r\n \t\t\tpublic void cleanInvalidSessions() {\n \t\t\t\t\r\n \t\t\t}",
"@Override\n\tpublic boolean isRequestedSessionIdFromCookie() {\n\t\treturn false;\n\t}",
"@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}",
"protected void onSessionStateChange(SessionState state, Exception exception) {\n }",
"@Test\n void setSessionStateNoSessionId() {\n // Arrange\n final byte[] sessionState = new byte[]{10, 11, 8, 88, 15};\n\n // Act & Assert\n StepVerifier.create(managementChannel.setSessionState(null, sessionState, LINK_NAME))\n .verifyError(NullPointerException.class);\n\n StepVerifier.create(managementChannel.setSessionState(\"\", sessionState, LINK_NAME))\n .verifyError(IllegalArgumentException.class);\n\n verifyNoInteractions(requestResponseChannel);\n }",
"@Override\n\t\tpublic boolean isRequestedSessionIdFromUrl() {\n\t\t\treturn false;\n\t\t}",
"@Test\n void getSessionStateNoSessionId() {\n // Act & Assert\n StepVerifier.create(managementChannel.getSessionState(null, LINK_NAME))\n .verifyError(NullPointerException.class);\n\n StepVerifier.create(managementChannel.getSessionState(\"\", LINK_NAME))\n .verifyError(IllegalArgumentException.class);\n\n verifyNoInteractions(requestResponseChannel);\n }",
"static void beginNewSession() {\n SESSION_ID = null;\n Prefs.INSTANCE.setEventPlatformSessionId(null);\n\n // A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.\n PAGEVIEW_ID = null;\n }",
"protected String getSessionID(Session session) {\n String[] authorizationValues = session.getUpgradeRequest().getHeader(\"Authorization\").split(\":\");\n if (authorizationValues.length < 3) {\n session.close(HttpStatus.BAD_REQUEST_400, \"Invalid Authorization header.\");\n }\n return Player.getPlayer(authorizationValues[2]).getSession().getSessionID();\n\n }",
"boolean hasClientSessionID();",
"@Override\n\t\tpublic boolean isRequestedSessionIdFromCookie() {\n\t\t\treturn false;\n\t\t}",
"java.lang.String getSessionID();",
"int getSessionId();",
"public void enquireTimeout(Long sessionId);",
"@Override\r\n \t\t\tpublic void renewSession(long sessionId) throws SSessionException {\n \t\t\t\t\r\n \t\t\t}",
"public void setSessionId(int value) {\n this.sessionId = value;\n }",
"private void checkSession(final long sessionID, final long sessionVerID)\n {\n }",
"public void setSessionId(short sessionId) {\n this.sessionId = sessionId;\n }",
"protected boolean shouldValidateSession ()\n {\n return false;\n }",
"@Before\n public void getTestSession() {\n if (sessionId == null) {\n sessionId = Util.getSessionID();\n }\n }",
"@Override\r\n public PhoenixSession getSession()\r\n {\n return null;\r\n }",
"private Session() {\n userId = -1;\n onUserDeletion = null;\n }",
"void setSessionId(String sessionId);",
"String getSessionID();",
"String getSessionID();",
"void sessionInactivityTimerExpired(DefaultSession session, long now);",
"public boolean isReuseSessionID() {\n return isReuseSessionID;\n }",
"public void connectionCheck(Long sessionId);",
"@Override\n\tprotected Session doReadSession(Serializable sessionId) {\n\t\treturn null;\n\t}",
"boolean hasSessionId();",
"boolean hasSessionId();",
"boolean hasSessionId();",
"boolean hasSessionId();",
"boolean hasSessionId();",
"boolean hasSessionId();",
"public void setSessionId(long sessionId) {\n\t\tthis.sessionId = sessionId;\n\t}",
"int getClientSessionID();",
"InternalSession createEmptySession();",
"java.lang.String getSessionId();",
"@Override\n public int getSessionId() {\n return sessionId_;\n }",
"String getSessionId();",
"String getSessionId();",
"String getSessionId();",
"String getSessionId();",
"private void initSession(HttpServletRequest request, HttpServletResponse response) throws IOException {\n // create new seassion for user\n HttpSession session = request.getSession();\n if (session != null) {\n _sessionId = session.getId();\n }\n\n response.getWriter().write(_sessionId);\n }",
"UUID getSessionId();",
"public void setSessionId(String sessionId)\r\n\t{\r\n\t\tthis.sessionId = sessionId;\r\n\t}",
"default void onDisconnect(SessionID sessionID) {\n }",
"public Builder setSessionID(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sessionID_ = value;\n onChanged();\n return this;\n }",
"public Builder setSessionID(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sessionID_ = value;\n onChanged();\n return this;\n }",
"public Session createEmptySession();",
"@Override\n public int getSessionId() {\n return sessionId_;\n }",
"HttpSession changeSessionIdentifier(HttpServletRequest request) throws AuthenticationException;",
"private Session establishSession(String sessionid) throws AxisFault {\n Session s = sessionManager.getSession(sessionid);\n\n if (s == null) {\n throw new AxisFault(\"Session \\\"\" + sessionid + \"\\\" is not active\");\n }\n s.setActive();\n sessionManager.setCurrentSession(s);\n return s;\n }",
"public String getID()\n\t{\n\t return this.sessionID;\n\t}",
"@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}",
"private static String sessionId(String sessionID) {\n\t\t// setting the default value when argument's value is omitted\n\t\tif (sessionID == null) {\n\t\t\t// if the sessionID isn't specified, maybe we can still recover it somehow\n\t\t\treturn firstSessionId();\n\t\t} else {\n\t\t\t// nothing to do in this case; a SessionID WAS passed along, so just continue\n\t\t\t// using it\n\t\t\treturn sessionID;\n\t\t}\n\t}",
"@Override\n\t\tpublic String getRequestedSessionId() {\n\t\t\treturn null;\n\t\t}",
"@Test\n void renewSessionLockNoSessionId() {\n // Act & Assert\n StepVerifier.create(managementChannel.renewSessionLock(null, LINK_NAME))\n .verifyError(NullPointerException.class);\n\n StepVerifier.create(managementChannel.renewSessionLock(\"\", LINK_NAME))\n .verifyError(IllegalArgumentException.class);\n\n verifyNoInteractions(requestResponseChannel);\n }",
"public void AddSession(String session, Long id){ validSessions.put(session, id); }",
"public void setSessionCounter(long sessionCounter);",
"public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}",
"@Override\r\npublic void sessionWillPassivate(HttpSessionEvent arg0) {\n\t\r\n}",
"public void setSessionId(String sessionId)\n\t{\n\t\tthis.sessionId = Toolbox.trim(sessionId, 50);\n\t}",
"public void setSessionId(String SessionId) {\n this.SessionId = SessionId;\n }",
"public void setReuseSessionID(boolean isReuseSessionID) {\n this.isReuseSessionID = isReuseSessionID;\n }",
"@Override\n public SessionCookieConfig getSessionCookieConfig() {\n return null;\n }",
"@Override\n\tpublic HttpSessionContext getSessionContext() {\n\t\treturn null;\n\t}",
"public void setSessionId(String sessionId) {\n this.sessionId = sessionId;\n }",
"String renewSessionId(String oldId, String newId);",
"public int getSessionId() {\n return sessionId_;\n }",
"@Override\n @Test(groups = {\"SessionContext access\"})\n public void testSessionContext00() throws Exception {\n super.testSessionContext00();\n }",
"public String getSessionId() {\n return super.getSessionId();\n }",
"public void sessionStarted() {\n\t\t\r\n\t}",
"DefaultSession createSession(String id);",
"@Override\n\t\t\tpublic void handleNewSession() throws Exception {\n\t\t\t\t\n\t\t\t}",
"default void onConnect(SessionID sessionID) {\n }",
"UUID sessionId();",
"@Override\n public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {\n sessionMap.remove(session.getId());\n }",
"@Override\n\tpublic void sessionDestroyed(HttpSessionEvent arg0) {\n\t\tlog.info(\"------ sessionListen-----init------\");\n\t}",
"default void onReset(SessionID sessionID) {\n }",
"@Override\n\t\tpublic HttpSession getSession() {\n\t\t\treturn null;\n\t\t}",
"public String getSessionId() {\n// synchronized (mSessionObj) {\n// return mSessionId;\n// }\n return \"\";\n }",
"@Override\n\tpublic boolean isProcessIgnoreSession() {\n\t\treturn false;\n\t}",
"public void sessionTimeout() {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(DeviceTrackerApplication.getContext());\n alertDialogBuilder.setTitle(getString(R.string.app_name));\n alertDialogBuilder\n .setMessage(R.string.session_expired)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_msg, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n logout();\n }\n });\n alertDialog = alertDialogBuilder.create();\n alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);\n startSessionTimer(0);\n }",
"String allocateId() throws SessionStorageException;",
"public void setSessionId(String sessionId) {\n\t\tthis.sessionId = sessionId;\n\t}",
"public void setSessionId(String sessionId) {\n\t\tthis.sessionId = sessionId;\n\t}",
"void xsetSessionID(org.apache.xmlbeans.XmlString sessionID);"
] | [
"0.7183165",
"0.6581048",
"0.6523157",
"0.6491825",
"0.64177704",
"0.6369414",
"0.63634485",
"0.6323404",
"0.62950885",
"0.6262833",
"0.6260388",
"0.62443805",
"0.62440515",
"0.62400264",
"0.6235969",
"0.62246895",
"0.62063235",
"0.6196212",
"0.6193168",
"0.61650234",
"0.61606705",
"0.61539704",
"0.6149433",
"0.61361057",
"0.61034787",
"0.6072364",
"0.605662",
"0.6028585",
"0.6023203",
"0.6022588",
"0.60219187",
"0.6017322",
"0.60051405",
"0.6004863",
"0.5993575",
"0.59657294",
"0.59657294",
"0.59617096",
"0.59616506",
"0.5927987",
"0.59268045",
"0.5909713",
"0.5909713",
"0.5909713",
"0.5909713",
"0.5909713",
"0.5909713",
"0.5896394",
"0.58811617",
"0.58736426",
"0.5871183",
"0.5861485",
"0.58595324",
"0.58595324",
"0.58595324",
"0.58595324",
"0.58580244",
"0.58564866",
"0.5831465",
"0.5814628",
"0.5803237",
"0.5803237",
"0.5787056",
"0.57764995",
"0.5775439",
"0.57652843",
"0.5761657",
"0.57545596",
"0.57544905",
"0.574368",
"0.57379496",
"0.57305074",
"0.57230425",
"0.57187927",
"0.5713854",
"0.5701391",
"0.5686001",
"0.5683721",
"0.5683106",
"0.5682783",
"0.5678902",
"0.56752676",
"0.56750983",
"0.5648464",
"0.5638184",
"0.563408",
"0.5624956",
"0.5623336",
"0.56156707",
"0.56123215",
"0.5607359",
"0.5602824",
"0.5589331",
"0.55856633",
"0.5585162",
"0.5583518",
"0.55782944",
"0.5576897",
"0.557579",
"0.557579",
"0.55715775"
] | 0.0 | -1 |
This method must add a new category in your application. | public int addCategory(String catName, int sessionID) {
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Administrator) {
Administrator ad = (Administrator)(s.getUser());
return ad.addCategory(catName);
}
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addCategory(Category category);",
"Category addNewCategory(Category category);",
"public void newCategory() {\n btNewCategory().push();\n }",
"private void addNewCategory() {\n Utils.replaceFragment(getActivity(),new AddCategoriesFragment());\n }",
"@Override\r\n\tpublic void addCategory() {\n\t\tCategory cat=new Category();\r\n\t\tcat.setNameCategory(\"Computing Tools\");\r\n\t\tem.persist(cat);\r\n\t\t\r\n\t}",
"public void addNewCategory(Category category) throws CostManagerException;",
"void add(ProductCategory category);",
"public static void addCategory(Context context, String category) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getWritableDatabase();\r\n\r\n // Don't allow adding if there's already a non-deleted category with that name\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0 AND \" + CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category},\r\n null,\r\n null,\r\n null\r\n );\r\n\r\n if(cursor.getCount() > 0) {\r\n cursor.close();\r\n throw new IllegalArgumentException(\"Category with name already exists\");\r\n }\r\n cursor.close();\r\n\r\n // Check if there's a deleted category that can be re-enabled\r\n ContentValues updateValues = new ContentValues();\r\n updateValues.put(CategoryTable.COLUMN_NAME_IS_DELETED, 0);\r\n\r\n int count = db.update(\r\n DbContract.CategoryTable.TABLE_NAME,\r\n updateValues,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category}\r\n );\r\n if(count > 0) return;\r\n\r\n // Otherwise add it as normal\r\n ContentValues insertValues = new ContentValues();\r\n insertValues.put(CategoryTable.COLUMN_NAME_CATEGORY_NAME, category);\r\n db.insert(CategoryTable.TABLE_NAME, null, insertValues);\r\n db.close();\r\n }",
"@Override\n\tpublic Category addCategory(Category cat) {\n\t\treturn dao.addCategory(cat);\n\t}",
"@Override\n\tpublic boolean addCategory(String catName) {\n\t\tTransaction tx=sessionFactory.getCurrentSession().beginTransaction();\n\t\tboolean found =categoryhome.isFound(catName);\n\t\tif(found==true)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\tCategory cat =new Category();\n\t\tcat.setName(catName);\n\t\tsessionFactory.getCurrentSession().save(cat);\n\t\ttx.commit();\n\t\t\treturn true;\n\t\t}\n\t}",
"private void createCategory() {\n Uri uri = TimeSeriesData.TimeSeries.CONTENT_URI;\n Intent i = new Intent(Intent.ACTION_INSERT, uri);\n startActivityForResult(i, ARC_CATEGORY_CREATE);\n }",
"private void saveNewCategory() {\n String name = newCategory_name.getText()\n .toString();\n int defaultSizeType = categoryDefaultSize.getSelectedItemPosition() - 1;\n String color = String.format(\"%06X\", (0xFFFFFF & categoryColor.getExactColor()));\n int parentCategoryId = -1;\n if (parentCategory != null) {\n parentCategoryId = parentCategory.getId();\n }\n String icon = categoryIcon.getSelectedItem();\n categoryDataSource.editCategory(categoryId, name, name, parentCategoryId, defaultSizeType,\n icon, color);\n\n setResult(Activity.RESULT_OK);\n this.finish();\n }",
"@RequestMapping(value = \"/add\", method = GET)\n public String addCategory(Model model) {\n model.addAttribute(\"action\", ADD_ACTION);\n model.addAttribute(\"category\", new Category());\n return FORM_VIEW;\n }",
"public void setCategory(String newCategory) {\n category = newCategory;\n }",
"@RequestMapping(value = \"/Category\", method = RequestMethod.POST)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n @ResponseBody\n public void addCategory(@RequestBody Category category) {\n blogDAO.addCategory(category);\n }",
"@Test\n\tpublic void testAddCategory() {\n\t\tcategory = new Category();\n\t\tcategory.setName(CATEGORY_NAME);\n\t\tcategory.setDescription(\"A wonderful addition to your home. 80 inches\");\n\t\tcategory.setImageURL(\"CAT_1.png\");\n\n\t\tassertEquals(\"Successfully added a category to the database table\", true, categoryDAO.add(category));\n\t}",
"public Categorie addCategorie(Categorie c);",
"public void addCategory(Category c) {\n\t\tcategoryDao.save(c);\n\t}",
"public void addCategory(String categoryName) {\n if(!containsCategory(categoryName)) {\n Category cat = new Category(categoryName);\n categories.add(cat);\n }\n }",
"public void addCat(Cat catToAdd)\r\n {\r\n if(catToAdd != null){\r\n catCollection.add(catToAdd);\r\n }\r\n }",
"public boolean addCategory(Category c){\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(DBEntryContract.CategoryEntry.COLUMN_NAME_TITLE, c.title);\n\t\t// Insert the new row, returning the primary key value of the new row\n\t\tlong newRowId;\n\t\tnewRowId = db.insert(\n\t\t\t\t\tDBEntryContract.CategoryEntry.TABLE_NAME,\n\t\t\t\t\tnull,\n\t\t\t\t\tvalues);\n\t\t\n\t\tif (newRowId != -1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public void createCategory(String categoryName) {\n wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.className(\"page-title\"))));\n Actions builder = new Actions(driver);\n builder.moveToElement(driver.findElement(By.id(\"subtab-AdminCatalog\")));\n builder.moveToElement(driver.findElement(By.id(\"subtab-AdminProducts\")));\n builder.moveToElement(driver.findElement(By.id(\"subtab-AdminCategories\")));\n builder.click(driver.findElement(By.id(\"subtab-AdminCategories\"))).perform();\n\n waitForContentLoad(\"Women\");\n WebElement creatNew = driver.findElement(By.id(\"page-header-desc-category-new_category\"));\n creatNew.click();\n WebElement newName = driver.findElement(By.id(\"name_1\"));\n newName.sendKeys(categoryName);\n WebElement saveBtn = driver.findElement(By.id(\"category_form_submit_btn\"));\n saveBtn.click();\n // TODO implement logic for new category creation\n if (categoryName == null) {\n throw new UnsupportedOperationException();\n }\n }",
"public void setCategory(String category){\n this.category = category;\n }",
"public int addCategory(Category cat) {\n\t\treturn 0;\n\t}",
"public String createCategory()\n {\n logger.info(\"**** In createCategory in Controller ****\");\n if (category != null && StringUtils.isNotEmpty(category.getCategoryName()))\n {\n String creationMessage = categoryService.createCategory(category);\n if (creationMessage.equalsIgnoreCase(Constants.CATEGORY_CREATION_SUCCESS))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Constants.CATEGORY_CREATION_SUCCESS, Constants.CATEGORY_CREATION_SUCCESS);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n else if (creationMessage.equalsIgnoreCase(Constants.CATEGORY_ALREADY_EXISTS))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, Constants.CATEGORY_ALREADY_EXISTS, Constants.CATEGORY_ALREADY_EXISTS);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n else if (creationMessage.equalsIgnoreCase(Constants.CATEGORY_CREATION_EXCEPTION))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, Constants.CATEGORY_CREATION_EXCEPTION, Constants.CATEGORY_CREATION_EXCEPTION);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n else if (creationMessage.equalsIgnoreCase(Constants.FAILURE))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, Constants.CATEGORY_CREATION_FAILURE, Constants.CATEGORY_CREATION_FAILURE);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n }\n\n return Constants.CREATE_CATEGORY_VIEW;\n }",
"public void setCategory(Category cat) {\n this.category = cat;\n }",
"CreateCategoryResponse createCategory(CreateCategoryRequest request);",
"@Override\r\n\tpublic void addCategory(Category category) {\n\t\tgetHibernateTemplate().save(category);\r\n\t}",
"public void addCategory(ProductCatagory pCatagory)\n\t\t\tthrows BusinessException;",
"public void onAddCategoryButtonClicked(View v){\n //starts addcategory activity\n Intent addCategoryIntent = new Intent(this, AddCategoryActivity.class);\n startActivity(addCategoryIntent);\n }",
"@PostMapping(path=\"/category/add\")\n\tpublic @ResponseBody String addNewCategory(@RequestBody Category n) {\n\t\tcategoryRepository.save(n);\n\t\treturn \"Saved\";\n\t}",
"public void setCategory(String category) {\r\n this.category = category;\r\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(Category c) {\n this.category = c;\n }",
"public void setCategory(String category);",
"public Category(String categoryName) {\n this.categoryName = categoryName;\n }",
"public Category(String categoryName) {\n this.categoryName = categoryName;\n }",
"public void setCategory(Category category) {\r\n this.category = category;\r\n }",
"@Override\n\tpublic ZuelResult addContentCategory(TbContentCategory contentCategory) throws ServiceException {\n\t\ttry {\n contentCategory.setId(ZuelIdUtil.getId());\n contentCategory.setIsParent(false);\n contentCategory.setSortOrder(1);\n contentCategory.setStatus(ZuelContentStatus.CONTENT_CATEGORY_OK);\n Date now = new Date();\n contentCategory.setCreated(now);\n contentCategory.setUpdated(now);\n boolean isCreated = service.addContentCategory(contentCategory);\n if (isCreated) { \n return ZuelResult.ok(contentCategory);\n }\n }catch (ServiceException e){\n e.printStackTrace();\n throw e; \n }\n return ZuelResult.error(\"服务器忙,请稍后重试!\");\n\t}",
"@Override\n\tpublic void createCategory(Category category) { \n\t\tif (categoryExists(category))\n\t\t\treturn; \n\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tsession.save(category);\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t}",
"Boolean insertCategory(DvdCategory category) throws DvdStoreException;",
"public WebDriver add_category(String category_name)\n {\n driver.findElement(By.xpath(\"//*[@id=\\\"go_add_category\\\"]\")).click();\n\n driver.findElement(By.xpath(\"//*[@id=\\\"name\\\"]\")).sendKeys(category_name);\n\n driver.findElement(By.xpath(\"//*[@id=\\\"submit\\\"]\")).click();\n\n return driver;\n }",
"public Flowable<Category> addCategory(final Category newCategory) {\n return executeTransaction((bgRealm, subscriber) -> {\n if (newCategory.getId() == 0) {\n // Auto Incremental Id\n Number currentIdNum = bgRealm.where(Category.class).max(\"id\");\n int nextId = currentIdNum == null ? 1 : currentIdNum.intValue() + 1;\n newCategory.setId(nextId);\n }\n bgRealm.insert(newCategory);\n });\n }",
"protected boolean addCategory(int conId, Category cat) {\n\t\tContest cs = getContest(conId);\n\t\tif(cs == null) {\n\t\t\treturn false;\n\t\t}\n\t\tcs.addCategory(cat);\n\t\treturn true;\n\t}",
"@Override\n\tpublic void add(Category category) {\n\t\tsessionFactory.getCurrentSession().persist(category);\n\t\tsessionFactory.getCurrentSession().flush();\n\t}",
"public category() {\r\n }",
"public Long addCategory(AddCategoryDTO category) throws CategoryException {\n\n Category categoryFromDB = categoryRepository.findCategoryByName(category.getCategoryName());\n if(categoryFromDB != null){\n throw new CategoryException(\"Already such category !!!\");\n }\n categoryFromDB = new Category();\n categoryFromDB.setName(category.getCategoryName());\n if(category.getParentCategoryId() != null) {\n Category parentCategory = categoryRepository.findCategoryById(category.getParentCategoryId());\n if(parentCategory == null){\n throw new CategoryException(\"No such parent category !!!\");\n }\n categoryFromDB.setParentCategory(parentCategory);\n }\n Long newCategoryId = categoryRepository.save(categoryFromDB).getId();\n return newCategoryId;\n }",
"public void setCategory(Category category) {\n this.category = category;\n }",
"public void setCategory(Category category) {\n this.category = category;\n }",
"public void setCategory(Category category) {\n this.category = category;\n }",
"public void setCategory(Category category) {\n this.category = category;\n }",
"public void setCategory(java.lang.String category) {\n this.category = category;\n }",
"protected int AddCategory(String categoryName, String categoryColor) {\n int resnum = Integer.parseInt(this.IniFile.getIniString(this.appIniFile,\n \"resource\", \"resnum\", \"0\", (byte) 0));\n for (int i = 1; i <= resnum; i++) {\n String resname = this.IniFile.getIniString(this.appIniFile, \"resource\",\n \"resname\" + i, \"0\", (byte) 0);\n if (resname.equals(categoryName)) {\n return 0;\n }\n }\n resnum = resnum + 1;\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resnum\", resnum + \"\");\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resid\" + resnum,\n \"group\" + resnum);\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resname\" + resnum,\n categoryName);\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resicon\" + resnum, \"\");\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resbkcolor\" + resnum,\n categoryColor);\n Map<String, String> group = new HashMap<String, String>();\n group.put(\"group\", categoryName);\n this.groups.add(group);\n List<Map<String, String>> child = new ArrayList<Map<String, String>>();\n this.childs.add(child);\n this.exlist_adapter.notifyDataSetChanged();\n return 1;\n }",
"public @NotNull Category newCategory();",
"public void addCategory(AtomCategory category) {\n if(!categories.contains(category)) {\n \tthis.categories.add(category);\n }\n }",
"public void addRemoteCategory(String name) {\n url = Constants.addCategory;\n params = new HashMap<>();\n params.put(param_category_name, \"\" + name);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.addCategory(name, mIRestApiCallBack, false, url, params);\n } else {\n mIRestApiCallBack.onNoInternet();\n }\n\n }",
"@Override\n\tpublic void saveCategory(Category category, boolean isNew) throws Exception {\n\n\t}",
"public void setCategoryName(final String categoryName);",
"@Override\n public Category createCategory(Category newCategory)\n {\n // format the string\n String query = \"INSERT INTO Categories(CategoryName, Description, CreationDate)\";\n query += \" VALUES ('%1$s', '%2$s', '%3$s')\";\n \n query = String.format(query, newCategory.getCategoryName(), newCategory.getDescription(),\n newCategory.getCreationDate());\n \n // if everything worked, inserted id will have the identity key\n // or primary key\n int insertedId = DataService.executeCreate(query);\n if (insertedId > 0)\n {\n return getCategoryById(insertedId);\n }\n \n return null;\n }",
"@PostMapping(path = \"menus/{id}/categories\")\n ResponseEntity<?> post(@RequestBody Category body, @PathVariable String id) {\n Menu findMenu = menuRepository.findById(id)\n .orElseThrow(() -> new CategoryNotFound(\"Category with id: \" + id + \" Not Found\"));\n Category newCategory = repository.save(body);\n findMenu.getCategories().add(newCategory);\n Menu SavedMenu = menuRepository.save(findMenu);\n // must be created\n return ResponseEntity.ok(SavedMenu);\n }",
"@Transactional\n public abstract OnmsCategory createCategoryIfNecessary(String name);",
"@PostMapping(\"/add\")\n\tpublic ResponseEntity<?> add(@RequestBody String body){\n\t\tCategoryVO newCat = null;\n\t\ttry {\n\t\t\tnewCat = new ObjectMapper().readValue(body, CategoryVO.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\tCategoryVO cat = catService.add(newCat);\n\t\treturn checkNull(cat);\n\t}",
"@PostMapping(\"/categoriesfu\")\n\t@Secured({ AuthoritiesConstants.ADMIN, AuthoritiesConstants.BOSS, AuthoritiesConstants.MANAGER })\n public synchronized ResponseEntity<Category> createCategory(@Valid @RequestBody Category category) throws URISyntaxException {\n log.debug(\"REST request to save Category : {}\", category);\n \n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n category.setRestaurant(restaurant);\n \n if (category.getId() != null) {\n throw new BadRequestAlertException(\"A new category cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Category result = categoryRepository.save(category);\n return ResponseEntity.created(new URI(\"/api/categoriesfu/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"void updateCategory(Category category);",
"void updateCategory(Category category);",
"public void createCategory(String name) {\n\t\t\n\t\tFlashCategory cat = (\n\t\t\t\t\t\t\t\t\t\t\tselectionListener.selectedComponents.size() == 0\n\t\t\t\t\t\t\t\t\t\t?\troot\n\t\t\t\t\t\t\t\t\t\t:\t(FlashCategory) selectionListener.selectedComponents.iterator().next()\n\t\t);\n\t\t\n\t\tcat.add(new FlashCategory(name));\n\t\t\n\t\tfireIntervalChanged(this,-1,-1);\n\t}",
"public boolean addCategory(Category newCat) {\n\t\tfor(Category cat : categoriesList) {\n\t\t\tif(cat.getName().equals(newCat.getName())) return false;\n\t\t}\n\t\tcategoriesList.add(newCat);\n\t\t//this.notifyDataSetChanged();\n\t\treturn true;\n\t}",
"public void setCategory(String cat) {\t//TODO\n\t\tcategory = cat;\n\t}",
"@Override\n\tpublic int add(FoodCategory foodCategory) {\n\t\treturn foodCategoryDao.add(foodCategory);\n\t}",
"@Override\r\n\tpublic boolean add(Se_cat se_cat) {\n\t\t\t\treturn se_catdao.add(se_cat);\r\n\t}",
"void updateCategory(String category){}",
"@PostMapping()\n\t@ApiOperation(value = \"categoryAPI\")\n\t@ApiResponses(value = { @ApiResponse(code = 201, message = \"Category added\", response = String.class),\n\t\t\t@ApiResponse(code = 400, message = \"Invalid Category\", response = Category.class) })\n\n\tpublic ResponseEntity<?> addCategory(@RequestBody CategoryDTO categoryDTO) throws ValidatorException {\n\n\t\ttry {\n\t\t\tcategoryService.addCategory(categoryDTO);\n\t\t\treturn new ResponseEntity<>(HttpStatus.CREATED);\n\n\t\t} catch (ServiceException e) {\n\t\t\tMessage message = new Message(e.getMessage());\n\t\t\treturn new ResponseEntity<>(message,HttpStatus.BAD_REQUEST);\n\t\t}\n\n\t}",
"@Override\n public String getCategory() {\n return category;\n }",
"public void setCategory(String category)\r\n {\r\n m_category = category;\r\n }",
"public long createCategory(CategoryModel categoryModel){\n //access the database\n SQLiteDatabase db = this.getWritableDatabase();\n\n //set the parameters\n ContentValues values = new ContentValues();\n values.put(InventoryContract.CategoryEntry.COLUMN_CATEGORY_NAME, categoryModel.getName());\n\n //insert the row\n long category_id = db.insert(CategoryEntry.TABLE_NAME, null, values);\n\n return category_id;\n }",
"public String getCategory() {\n return this.category;\n }",
"public String getCategory() {\n return this.category;\n }",
"public Category() {\n super();\n }",
"public String getCategory() {\r\n return category;\r\n }",
"@Override\r\n\tpublic void add(SecondCategory scategory) {\n\t\tscategory.setCreattime(new Date());\r\n\t\tscategoryDao.add(scategory);\r\n\t}",
"@Override\n public void setCategory(String category) {\n this.category = category;\n }",
"@Override\r\n\tpublic boolean addCategory(List<Category> categories) throws CategoryCreationException {\n\t\tboolean stat=false;\r\n\t\ttry {\r\n\t\t\tstat=categoryDao.addCategory(categories);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tthrow new CategoryCreationException(\"Error in creating object check your inputs\");\r\n\t\t}\r\n\t\treturn stat;\r\n\t}",
"@RequestMapping(value = \"addCategory\", method = RequestMethod.POST)\r\n\tpublic ModelAndView addCategory(@ModelAttribute AdminFormBean formBean) {\r\n\t\tCategory category = formBean.getCategory();\r\n\t\tcategoryService.addCategory(category);\r\n\t\treturn new ModelAndView(\"redirect:/admin\");\r\n\t}",
"public Category createCategory(Category category) throws Exception\r\n\t{\n\t\tif(category.getId() != 0 && categoryDao.findById(category.getId()).isPresent())\r\n\t\t\tthrow new Exception(\"category exists\");\r\n\t\tcategory = categoryDao.save(category);\r\n\t\treturn category;\r\n\t}",
"public String getCategory() {\n return category;\n }",
"public String getCategory() {\n return category;\n }",
"public String getCategory() {\n return category;\n }",
"public Category() {\n categoryName = null;\n }",
"public void setCategory(String category) {\n\t\tthis.category = category;\n\t}",
"public void setCategory(String category) {\n\t\tthis.category = category;\n\t}",
"@Test\n public void addToCategory() throws Exception {\n withProductAndUnconnectedCategory(client(), (final Product product, final Category category) -> {\n assertThat(product.getMasterData().getStaged().getCategories()).isEmpty();\n\n final String orderHint = \"0.123\";\n final Product productWithCategory = client()\n .executeBlocking(ProductUpdateCommand.of(product, AddToCategory.of(category, orderHint)));\n\n final Reference<Category> categoryReference = productWithCategory.getMasterData().getStaged().getCategories().stream().findAny().get();\n assertThat(categoryReference.referencesSameResource(category)).isTrue();\n assertThat(productWithCategory.getMasterData().getStaged().getCategoryOrderHints().get(category.getId())).isEqualTo(orderHint);\n\n final Product productWithoutCategory = client()\n .executeBlocking(ProductUpdateCommand.of(productWithCategory, RemoveFromCategory.of(category)));\n\n assertThat(productWithoutCategory.getMasterData().getStaged().getCategories()).isEmpty();\n });\n }",
"@Test\n\tpublic void testCreateCategory() throws Exception {\n\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.createCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\n\t\t\tmockMvc.perform(post(\"/category/v1/_create\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryCreateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryCreateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}",
"public void create(Category category) {\n category_dao.create(category);\n }",
"public String getCategory() {\n return category;\n }",
"public String getCategory() {\n return category;\n }",
"public String getCategory() {\n return category;\n }"
] | [
"0.82055885",
"0.7991417",
"0.78291726",
"0.7824467",
"0.7732156",
"0.76087105",
"0.74361694",
"0.7320573",
"0.71911347",
"0.7124259",
"0.7098562",
"0.70741105",
"0.70316553",
"0.6995892",
"0.697616",
"0.69745964",
"0.6965345",
"0.6904436",
"0.690265",
"0.6900403",
"0.6849958",
"0.6810611",
"0.6805162",
"0.6789233",
"0.6784735",
"0.6775201",
"0.67619944",
"0.67537034",
"0.6720836",
"0.6714615",
"0.67038995",
"0.6701078",
"0.6685496",
"0.6685496",
"0.6685496",
"0.6685496",
"0.6685496",
"0.6684198",
"0.6668468",
"0.6645993",
"0.6645993",
"0.6613747",
"0.6609066",
"0.6603989",
"0.6600409",
"0.6598587",
"0.65961695",
"0.659595",
"0.6587318",
"0.6581804",
"0.6575814",
"0.65675086",
"0.65675086",
"0.65675086",
"0.65675086",
"0.65538985",
"0.6543018",
"0.6539198",
"0.64942014",
"0.6494008",
"0.6491497",
"0.6485608",
"0.64840615",
"0.6471591",
"0.6468439",
"0.64665115",
"0.64656925",
"0.6457273",
"0.6457273",
"0.6450258",
"0.6432556",
"0.64045703",
"0.6381859",
"0.6381479",
"0.63651246",
"0.633925",
"0.6335777",
"0.6325502",
"0.63165355",
"0.6314941",
"0.63142705",
"0.63127434",
"0.6312352",
"0.6301169",
"0.6296207",
"0.6286067",
"0.62841004",
"0.6277664",
"0.62748116",
"0.62748116",
"0.62733567",
"0.62658066",
"0.626514",
"0.626514",
"0.6264078",
"0.6260617",
"0.6251653",
"0.62408274",
"0.62408274",
"0.62408274"
] | 0.62632215 | 95 |
Adds a distribution center to your application. If the given distribution center exists, or sesionID invalid, do nothing. | public void addDistributionCenter(String city, int sessionID) {
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Administrator) {
Administrator ad = (Administrator)(s.getUser());
ad.addDistributionCenter(city);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCenterid(String centerid) {\n this.centerid = centerid == null ? null : centerid.trim();\n }",
"public void setDataCenterId(java.lang.String dataCenterId) {\r\n this.dataCenterId = dataCenterId;\r\n }",
"public void setCostCenter(String CostCenter) {\n\t\t_CostCenter = CostCenter;\n\t}",
"public void setDataCenter(String dataCenter) {\n this.dataCenter = dataCenter;\n }",
"public String getCenterid() {\n return centerid;\n }",
"public void setClaimCenterUID(java.lang.String value);",
"public boolean hasDatacenter(String datacenterName);",
"public void setCenter(Coordinate center) {\n this.center = center;\n }",
"public void addDistributionCenter(Inventory inventory, String city){\r\n\t\tif (!inventory.distCenter_list.contains(city)){\r\n\t\t\tinventory.distCenter_list.add(city);\r\n\t\t\tArrayList<Product> products = inventory.allProduct();\r\n\t\t\tfor (int i= 0; i < products.size(); i++){\r\n\t\t\t\tProduct p = products.get(i);\r\n\t\t\t\tp.distCenters.put(city, 0);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setCenter(Point centerPoint) {\n this.center = centerPoint;\n }",
"public void setCenter(Point center) {\r\n this.center = center;\r\n }",
"public void addCenter(int i){\n\tsynchroCenters.add(new Integer(i));\n }",
"public void addDocumentToContest(long documentId, long contestId) throws ContestManagementException {\r\n\r\n }",
"public void setCenter(Point center) {\r\n\t\tthis.center = center;\r\n\t}",
"public void setCenter(boolean isCenter) {\n\t\tthis.roomCenter = isCenter; \n\t}",
"public void setCenter(PointF center) {\n this.center = center;\n }",
"@Override\n public final void setDatacenter(final Datacenter datacenter) {\n this.datacenter = requireNonNull(datacenter);\n }",
"public void setCenteringEnabled(boolean centeringEnabled) {\r\n setCenteringEnabled(centeringEnabled, centeringEnabled);\r\n }",
"public CertAuthClient addDistributionAuthetication(Consumer<Communique> distAuth)\n\t\t{\n\t\t\tthis.distAuth = this.distAuth.andThen(distAuth);\n\t\t\treturn this;\n\t\t}",
"public void setCenteringX(boolean centeringX) {\r\n this.centeringX = centeringX;\r\n }",
"public void setCenter() {\n\t\tthis.isCenter = true;\n\t}",
"public static void SetCenter(int center) //set the center fret when needed\n\t{\n\t\tif(center==0)\n\t\t\tSfret=Efret=Center=1;\n\t\tif(center==15)\n\t\t\tSfret=Efret=Center=14;\n\t}",
"private void updateCenterSquareSum() {\n\t\tfor(KMeansCluster cluster : clusters) {\n\t\t\tKMeansNode center = cluster.getCenter();\n\t\t\tdouble squareSum = 0;\n\t\t\tfor(Entry<?, Double> entry : center.getVector().entrySet()) {\n\t\t\t\tsquareSum += entry.getValue() * entry.getValue();\n\t\t\t}\n\t\t\tsquareSum = Math.sqrt(squareSum);\n\t\t\tcenterTfidfSquireSum.put(cluster, squareSum);\n\t\t\t\n\t\t}\n\t}",
"public void updateQuantity(Product p, String distCenter, int quantity){\r\n\t\tp.distCenters.put(distCenter, p.distCenters.get(distCenter) + quantity);\r\n\t\tp.quantity += quantity;\r\n\t}",
"public void setCentre(Vector2D newCentre) {\n this.center = newCentre;\n }",
"public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}",
"@Override\r\n\tpublic void ShowPersonCenter(Context _in_context) {\n\t\tTypeSDKLogger.e( \"ShowPersonCenter\");\r\n//\t\tHMPay.startUserCenter(appContext);\r\n\t}",
"public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\n\t\tgameObj.add(new SpaceStation(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Space station added\");\n\t\tnotifyObservers();\n\t}",
"public String getCenterName() {\n\t\treturn centerName;\r\n\t}",
"public void addDocumentToContest(long arg0, long arg1) throws ContestManagementException {\r\n }",
"public Document addDocument(Document arg0) throws ContestManagementException {\r\n return null;\r\n }",
"public void setDonutCenterOptions(DonutCenterOptions donutCenterOptions) {\n this.donutCenterOptions = donutCenterOptions;\n }",
"public void entryAdded(EntryEvent<Identifier, SystemMetadata> event) {\n\n if (ComponentActivationUtility.replicationIsActive()) {\n log.info(\"Received entry added event on the hzSystemMetadata map for pid: \"\n + event.getKey().getValue());\n\n if (isAuthoritativeReplicaValid(event.getValue())) {\n createReplicationTask(event.getKey());\n } else {\n log.info(\"Authoritative replica is not valid, not queueing to replication for pid: \"\n + event.getKey().getValue());\n }\n }\n }",
"void deleteCenterProgram(String centerProgramId);",
"@Test\n\tpublic void addNewCostCenterToADriver_FuncTest() throws MalBusinessException{\n\t\thasCurrentCostCenterDrvId = ((BigDecimal)em.createNativeQuery(TestQueryConstants.READ_DRIVER_ID_WITH_CURR_COST_CENTER).getSingleResult()).longValue();\n\t\t\n\t\tDriver driverWithCostCenter = driverService.getDriver(hasCurrentCostCenterDrvId);\n\n\t\tCostCentreCode expectedCenter = costCenterService.getCostCenters(driverWithCostCenter.getExternalAccount()).get(1);\n\t\t\n\t\tDriver actualDriver = driverService.saveOrUpdateDriver(driverWithCostCenter.getExternalAccount(), driverWithCostCenter.getDgdGradeCode(), driverWithCostCenter, driverWithCostCenter.getDriverAddressList(), driverWithCostCenter.getPhoneNumbers(), \"Testing\", expectedCenter);\n\t\t \n\t\tassertEquals(actualDriver.getDriverCurrentCostCenter().getCostCenterCode(), expectedCenter.getCostCentreCodesPK().getCostCentreCode());\n\t\tassertEquals(actualDriver.getCostCentreCode(), expectedCenter.getCostCentreCodesPK().getCostCentreCode());\n\t}",
"@Override\n public boolean updateTestingCenterInfo(TestingCenterInfo testingCenterInfoMap) {\n return testingCenterInfo.update(testingCenterInfo);\n }",
"public void setCenter(Point newPoint) {\n this.center = newPoint;\n }",
"private void registerCenter(MouseEvent e) {\n\t\tcenterX = e.getX();\n\t\tcenterY = e.getY();\n\t}",
"private void insertEntry() {\n String desiredId = idField.getText();\n String desiredName = nameField.getText();\n String desiredMajor = majorField.getText();\n\n if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"Error: A student with this information already exists.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } else {\n studentHashMap.put(desiredId, new Student(desiredName, desiredMajor));\n\n this.displayStatusPanel(\n \"Success: \" + desiredName + \" has been added.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n }\n }",
"public void addCluster()\r\n\t{\r\n\t\tcluster[nextAvailableCluster()] = true;\r\n\t}",
"public Document addDocument(Document document) throws ContestManagementException {\r\n return null;\r\n }",
"public void setCenter(Point newCenter) {\n\t\tPoint oldCenter = getCenter();\n\t\tmove(newCenter.x - oldCenter.x, newCenter.y - oldCenter.y);\n\t}",
"private boolean distributeAddByKey(Entry<ProcessorDistributionKey, Collection<Geometry>> addEntry,\n Map<ProcessorDistributionKey, Collection<Geometry>> removeKeyToGeoms)\n {\n boolean processorCreated = false;\n final ProcessorDistributionKey key = addEntry.getKey();\n final Collection<Geometry> geometries = addEntry.getValue();\n GeometryProcessor<? extends Geometry> processor = myGeometryProcessorsMap.get(key);\n if (!geometries.isEmpty() && processor == null)\n {\n Set<Geometry> inactive = myInactiveGeometries.get(key);\n if (inactive == null)\n {\n final boolean process = inProcessRange(key, myActiveTimeSpans);\n if (process)\n {\n setProcessorConstraints(key);\n processor = myProcessorBuilder.createProcessorForClass(key.getGeometryType());\n processorCreated = processor != null;\n }\n else\n {\n inactive = New.set(geometries);\n myInactiveGeometries.put(key, inactive);\n }\n }\n else\n {\n inactive.addAll(geometries);\n }\n }\n\n if (processor != null)\n {\n final Collection<? extends Geometry> procAdds = geometries;\n final Collection<? extends Geometry> procRemoves = removeKeyToGeoms.remove(key);\n processor.receiveObjects(this, procAdds, procRemoves == null ? Collections.<Geometry>emptyList() : procRemoves);\n if (processorCreated)\n {\n myGeometryProcessorsMap.put(addEntry.getKey(), processor);\n }\n if (LOGGER.isDebugEnabled())\n {\n if (processorCreated)\n {\n LOGGER.debug(\"Created processor for distribution key \" + addEntry.getKey());\n }\n LOGGER.debug(\"Added \" + geometries.size() + \", removed \" + (procRemoves == null ? 0 : procRemoves.size())\n + \" for processor \" + processor);\n }\n }\n\n return processorCreated;\n }",
"private void setupCenterPanel(GridPane contentGrid) {\n GridPane centerPanel = createGridPane(0, 0, Insets.EMPTY);\n centerPanel.setId(\"centerPanel\");\n addNodeToGrid(centerPanel, contentGrid, 0, 1, Insets.EMPTY);\n UiUtil.addPercentRows(centerPanel, 100);\n UiUtil.addPercentColumns(centerPanel, 100);\n this.graphView = new GraphView(centerPanel);\n }",
"public final synchronized void setUpdateCenter(IUpdateCenter updateCenter) {\r\n\t\tthis.updateCenter = updateCenter;\r\n\t\tfor (User user : this.DictionaryUsers.values()) {\r\n\t\t\tuser.setUpdateCenter(updateCenter);\r\n\t\t}\r\n\t\tfor (Ship ship : this.DictionaryShips.values()) {\r\n\t\t\tship.setUpdateCenter(updateCenter);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic int insert(Entrust entrust) {\n\t\treturn entrustServiceImpl.insert(entrust);\n\t}",
"public void objectAvailable (DObject object)\n {\n _clobj = (ClusterObject)object;\n _clusters.put(_clobj.getOid(), this);\n \n // let any mapped users know about our cluster\n Iterator iter = values().iterator();\n while (iter.hasNext()) {\n ClusteredBodyObject body = (ClusteredBodyObject)iter.next();\n body.setClusterOid(_clobj.getOid());\n _clobj.addToOccupants(((BodyObject)body).getOid());\n }\n \n // configure our cluster record and publish it\n _cluster.clusterOid = _clobj.getOid();\n _ssobj.addToClusters(_cluster);\n \n // if we didn't manage to add our creating user when we first\n // started up, there's no point in our sticking around\n if (size() == 0) {\n destroy();\n }\n }",
"public void justifyCenter() {\n\t\tleft.center();\n\t}",
"@Resource(name=\"thirdPoint\")\r\n\tpublic void setCenter(Point center) {\r\n\t\tthis.center = center;\r\n\t}",
"Builder addEducationalAlignment(AlignmentObject value);",
"protected abstract Node createCenterContent();",
"@Override\r\n\tpublic CenterLocation updateCenter(CenterLocation loc) throws Exception {\n\t\t\r\n\t\tSystem.out.println(\"Inside service layer \");\r\n\t\tcdao.updateCenter(loc);\r\n\t\treturn loc;\r\n\t}",
"public void setCenterOverCoords(boolean doCenter)\n\t{\n\t\tcenterOverCoords = doCenter;\n\t}",
"public void attachWSMenuEntry(final JMenu wsmenu,\n final AlignFrame alignFrame)\n {\n final JMenu enfinServiceMenu = new JMenu(\"Envision 2\");\n wsmenu.add(enfinServiceMenu);\n enfinServiceMenu.setEnabled(false);\n wsmenu.addMenuListener(new MenuListener()\n {\n // this listener remembers when the menu was first selected, and\n // doesn't rebuild the session list until it has been cleared and\n // reselected again.\n boolean refresh = true;\n\n public void menuCanceled(MenuEvent e)\n {\n refresh = true;\n }\n\n public void menuDeselected(MenuEvent e)\n {\n refresh = true;\n }\n\n public void menuSelected(MenuEvent e)\n {\n if (refresh && !isRunning())\n {\n new Thread(new Runnable()\n {\n public void run()\n {\n try\n {\n buildGroupLinkMenu(enfinServiceMenu, alignFrame);\n } catch (OutOfMemoryError ex)\n {\n Cache.log\n .error(\"Out of memory when calculating the Envision2 links.\",\n ex);\n enfinServiceMenu.setEnabled(false);\n }\n }\n }).start();\n refresh = false;\n }\n }\n });\n\n }",
"@Override\n\t@Transactional\n\tpublic String setDocumentDetailsSave(DocumentCenter documentCenterBean) throws Exception {\n\t\tString result = null;\n\t\ttry {\n\t\t\tSession hybSes = sessionFactory.getCurrentSession();\n\t\t\thybSes.merge(documentCenterBean);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t\treturn result;\n\t}",
"@Override\r\n\tpublic void ShowPersonCenter(Context _in_context) {\n\t\tTypeSDKLogger.e(\"ShowPersonCenter\");\r\n\t}",
"public int prodInquiry(int prodID, String center) {\r\n\t\tfm.readProducts();\r\n\t\tProduct pro = fm.getProduct(prodID);\r\n\t\tif (pro != null) \r\n\t\t\treturn pro.quantityIn(center);\r\n\t\treturn -1;\r\n\t}",
"@Override\r\n\tpublic int create(Object value) throws Exception {\r\n\t\t\t\t\t\r\n\t\t//Default error\r\n\t\tint result = Errors.NO_ERROR;\r\n\t\t\t\t\t\t\r\n\t\t//Verify class\t\t\r\n\t\tif (value.getClass()!=CentroVO.class) \r\n\t\t\tthrow (new Exception(\"Not valid class\")); \r\n\t\t\t\t\t\r\n\t\tCentroVO center = (CentroVO)value;\r\n\t\t\t\t\r\n\t\t// Verify used licenses\r\n\t\tLOG.info(\"Verifying licenses\");\r\n\t\t\r\n\t\t//Verificamos que existan suficientes licencias disponibles para \r\n\t\t//la solicitud realizada\t\t\r\n\t\tif (licenseService.getEnabledLicensesCenter(Constants.NOT_CREATED)<center.getLicencias()) {\r\n\t\t\tresult = Errors.MAX_LICENSES;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif (result >=0){\r\n\t\t\tLOG.debug(\"Calling create center\");\r\n\t \r\n\t //Calling service\r\n\t result = service.insertCentro(center);\r\n\t\t}\r\n\t\t\t\t \t\t\t\t\t\t\t\t\r\n\t\treturn result;\t\t\t\t\t\t\t\t\r\n\t}",
"public void setMouseCentered(boolean centered) {\n mouseCentered.set(centered);\n }",
"private void centerRegion() {\r\n\t\tthis.addComponent(BorderLayout.CENTER, mp);\r\n\t}",
"public boolean isCenteringEnabled() {\r\n return isCenteringX() && isCenteringY();\r\n }",
"public Builder addClusteringKey(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureClusteringKeyIsMutable();\n clusteringKey_.add(value);\n onChanged();\n return this;\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.BusinessIndustryLicense addNewBusinessIndustryLicenses();",
"public void setCentre(Vector3D centre) {\n\t\tthis.centre = centre;\n\t}",
"public java.lang.String getDataCenterId() {\r\n return dataCenterId;\r\n }",
"public void addHostIdentity() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"host-identity\",\n null,\n childrenNames());\n }",
"private void addCatalogEntry(CatalogDefinition catalogDefinition) throws TranslationException\n {\n\tif(log.isDebugEnabled())\n\t log.debug(\"Adding catalog entry to catalogs table\");\n\n\tString sql = null;\n\n\ttry\n\t{\n\t String name = \"'\" + catalogDefinition.getName() + \"'\";\n\t String version = \"'\" + catalogDefinition.getVersion() + \"'\";\n\t String description = \"'\" + catalogDefinition.getDescription() + \"'\";\n\t String releaseDate = \"'\" + catalogDefinition.getReleaseDate().getValueAsString() + \"'\";\n\n\t sql = \"INSERT INTO \" + PropertyLookup.getCatalogsTableName()\n\t\t + \" (name, version, release_date, description) VALUES (\" + name + \",\" + version + \",\" + releaseDate\n\t\t + \",\" + description + \")\";\n\n\t sqlConnector.closeConnection();\n\t int insertedRows = sqlConnector.executeUpdate(sql);\n\n\t if(insertedRows != 1)\n\t\tthrow new TranslationException(\"Error trying inserting the catalog, returning code: \" + insertedRows);\n\t}\n\tcatch(SQLException e)\n\t{\n\t throw new TranslationException(\"Error inserting the catalog row: \" + sql, e);\n\t}\n\tcatch(IncompatibleTypeException e)\n\t{\n\t throw new TranslationException(\"Error accesing the catalog release date\", e);\n\t}\n\tfinally\n\t{\n\t sqlConnector.closeConnection();\n\t}\n }",
"public void addShard(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.AddClusterShardRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddShardMethod(), responseObserver);\n }",
"public void alignCenter() {\n\t\ttop.middle();\n\t}",
"void addCoordinateSystem(CoordinateSystem cs);",
"void add(SpaceInstanceAddedEventListener eventListener, boolean includeExisting);",
"public void centerOnScreen() {\n Runnable doUpdate = new Runnable() {\n public void run() {\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n Dimension window = getSize();\n int iCenterX = screen.width / 2;\n int iCenterY = screen.height / 2;\n setLocation(iCenterX - (window.width / 2), iCenterY - (window.height / 2));\n }\n };\n SwingUtilities.invokeLater(doUpdate);\n }",
"@Override\n public boolean hasCentral(Central central) {\n return (central.getId() == this.central.getId());\n }",
"void insert_Sphere() {\n\t\t\n\t\tif( end == n )\n\t\t\tSystem.out.println(\"Insertion not possible as Array is full.........\");\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"Enter radius of Sphere :-\");\n\t\t\tdouble radius = sc.nextDouble();\n\t\t\t\t\n\t\t\ts[end]= new Sphere(radius);\n\t\t\t\t\n\t\t\tend++;\t\t\t\n\t\t}\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof ServiceCenter)) {\n return false;\n }\n ServiceCenter other = (ServiceCenter) object;\n if ((this.serviceCenterLocationId == null && other.serviceCenterLocationId != null) || (this.serviceCenterLocationId != null && !this.serviceCenterLocationId.equals(other.serviceCenterLocationId))) {\n return false;\n }\n return true;\n }",
"private void registerSvcsForOrg(String subOrgName, String subOrgDN)\n {\n try {\n Set defaultServices =\n ServiceManager.servicesAssignedByDefault();\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager::\"+\n \"registerSvcsForOrg. \"+\n \"defaultServices : \" + defaultServices);\n }\n \n // Register the default services to the newly created orgs,so\n // they will be marked with the OC sunRegisteredServiceName.\n if (defaultServices != null) {\n Set assignedServices = amsdk.getAssignedServices();\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager::\" +\n \"registerSvcsForOrg:assignedServices: \" +\n assignedServices);\n }\n Iterator items = defaultServices.iterator();\n String serviceName = null;\n if (SMSEntry.getRootSuffix().equalsIgnoreCase(\n SMSEntry.getAMSdkBaseDN())) {\n amsdk = new OrgConfigViaAMSDK(token,\n orgNamingAttrInLegacyMode + SMSEntry.EQUALS +\n subOrgName + SMSEntry.COMMA +\n DNMapper.realmNameToAMSDKName(orgDN), subOrgDN);\n } else {\n amsdk = new OrgConfigViaAMSDK(token,\n orgNamingAttrInLegacyMode + SMSEntry.EQUALS +\n subOrgName + SMSEntry.COMMA + amSDKOrgDN, subOrgDN);\n }\n while (items.hasNext()) {\n serviceName = (String) items.next();\n if (assignedServices.contains(serviceName)) {\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\n \"OrganizationConfigManager::\"+\n \"registerSvcsForOrg:ServiceName : \" +\n serviceName);\n }\n amsdk.assignService(serviceName);\n }\n }\n }\n } catch (SMSException smse) {\n // Unable to load default services\n if (SMSEntry.debug.warningEnabled()) {\n SMSEntry.debug.warning(\"OrganizationConfigManager::\" +\n \"registerSvcsForOrg. \" +\n \"SMSException in registering services: \", smse);\n }\n }\n }",
"public void AddSession(String session, Long id){ validSessions.put(session, id); }",
"@NotNull\n @Generated\n @Selector(\"defaultSubscriptionRegistrationCenter\")\n public static native VSSubscriptionRegistrationCenter defaultSubscriptionRegistrationCenter();",
"@Override\n\tpublic boolean insertOffice(Map<String, Object> params) {\n\t\treturn false;\n\t}",
"public static boolean hasUpdateCenter(File asInstallRoot) {\n return getUpdateCenterLauncher(asInstallRoot) != null;\n }",
"public boolean addSelfSigned(SubjectInfo subjectInfo){\n if(myDatabase.containsValid(subjectInfo.getOrganisation() +\"-\"+ subjectInfo.getOrganisationUnit()))\n return false;\n X500Name x500Name = generateX500Name(subjectInfo);\n String serial = String.valueOf(myDatabase.getCounter());\n\n Calendar calendar = Calendar.getInstance();\n Date startDate = calendar.getTime();\n calendar.add(Calendar.YEAR, 2); // Certificate duration will be fixed at 2 years\n Date endDate = calendar.getTime();\n\n KeyPair keyPair = generateKeyPair();\n\n SubjectData subjectData = new SubjectData(keyPair.getPublic(), x500Name, serial, startDate, endDate);\n IssuerData issuerData = new IssuerData(keyPair.getPrivate(), x500Name);\n X509Certificate certificate = certificateGenerator.generateCertificate(subjectData, issuerData, true);\n\n keyStoreWriter.loadKeyStore(null, keystorePassword.toCharArray());\n keyStoreWriter.write(serial, keyPair.getPrivate(), keystorePassword.toCharArray(), certificate);\n keyStoreWriter.saveKeyStore(keystoreFile, keystorePassword.toCharArray());\n myDatabase.writeNew(true,subjectInfo.getOrganisation() + \"-\" + subjectInfo.getOrganisationUnit());\n return true;\n }",
"public void addShard(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.AddClusterShardRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getAddShardMethod(), getCallOptions()), request, responseObserver);\n }",
"public void setCenteringY(boolean centeringY) {\r\n this.centeringY = centeringY;\r\n }",
"public long insert(DcSquadDO dcSquad) throws DataAccessException;",
"public void addNewDistrict(District District);",
"public Integer insert(SsoAuthDO ssoAuth) throws DataAccessException;",
"public void processAddStation() {\n AppTextEnterDialogSingleton dialog = AppTextEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Metro Station\", \"Enter Name of the Metro Station:\");\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_STATION_MODE);\n }",
"public boolean updateQuantity(int prodID, String distCentre, int quantity, int sessionID) {\r\n\t\tboolean cID = false;\r\n\t\tfor (int i=0;i<sessions.size();i++) {\r\n\t\t\tSession s = sessions.get(i);\r\n\t\t\tif (s.getID() == sessionID && s.getUser() instanceof Administrator) {\r\n\t\t\t\tAdministrator ad = (Administrator)(s.getUser());\r\n\t\t\t\tcID = ad.updateQuantity(prodID, distCentre, quantity);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cID;\r\n\t}",
"public void smartCenter() {\n WebPlot p = getPrimaryPlot();\n if (p==null) return;\n\n if (isWcsSync()) {\n wcsSyncCenter(computeWcsSyncCenter());\n }\n else if (p.containsAttributeKey(WebPlot.FIXED_TARGET)) {\n Object o = p.getAttribute(WebPlot.FIXED_TARGET);\n if (o instanceof ActiveTarget.PosEntry) {\n ActiveTarget.PosEntry entry = (ActiveTarget.PosEntry) o;\n ImageWorkSpacePt ipt = p.getImageWorkSpaceCoords(entry.getPt());\n if (ipt!=null && p.pointInPlot(entry.getPt())) centerOnPoint(ipt);\n else simpleImageCenter();\n }\n } else {\n simpleImageCenter();\n }\n }",
"public void insertCluster(int tick, Set<Integer> ids) {\n\n }",
"private static void locateCenters(final int[] cluster, double[][] centers, final double[][] data) {\n int N = data.length;\n int M = data[0].length;\n int numCluster = centers.length;\n\n // reset centers to 0\n for (int c = 0; c < numCluster; c++) {\n Arrays.fill(centers[c], 0);\n }\n\n int[] countCluster = new int[numCluster];\n\n // sum over all samples\n for (int n = 0; n < N; n++) {\n vectorSumInPlace(centers[cluster[n]], data[n]);\n countCluster[cluster[n]]++;\n }\n\n // divide by number of samples in each cluster\n for (int c = 0; c < numCluster; c++) {\n vectorDivideInPlace(centers[c], countCluster[c]);\n }\n }",
"public void addSales(double amount) throws ArithmeticException {\n\t\tif(amount <= 0) {\n\t\t\tthrow new ArithmeticException(\"Cannot add zero sales\");\n\t\t}\n\t\tsetSales(getSales() + amount);\n\t}",
"public void setCentreX(float centreX) {\n this.centreX = centreX;\n }",
"private void insert (\n Node object,\n Bounds objectBounds,\n double centerX,\n double centerY,\n double centerZ\n ) {\n\n if (this.bounds.contains (centerX, centerY, centerZ))\n insertFirstClass (object, objectBounds, centerX, centerY, centerZ);\n else if (this.bounds.intersects (objectBounds))\n insertSecondClass (object, objectBounds);\n else throw new IllegalArgumentException (\"Object does not belong in this tree\");\n \n }",
"public Integer insert(SsoCacheManagerDO ssoCacheManager) throws DataAccessException {\r\n \tif (ssoCacheManager == null) {\r\n \t\tthrow new IllegalArgumentException(\"Can't insert a null data object into db.\");\r\n \t}\r\n \t\r\n getSqlMapClientTemplate().insert(\"MS-SSO-CACHE-MANAGER-INSERT\", ssoCacheManager);\r\n\r\n return ssoCacheManager.getId();\r\n }",
"@Override\n\tpublic void onCenterChanged(GeoPoint center) {\n\t}",
"public void putSNS(FragmentActivity activity,final SNS sns,final IRequestListener iRequestListener) {\r\n boolean isCheckExistedSNS = false;\r\n isCheckExistedSNS = BravoUtils.isSNSAlreadyLoggined(activity,sns);\r\n if (!isCheckExistedSNS)\r\n return;\r\n int loginBravoViaType = BravoSharePrefs.getInstance(mContext).getIntValue(BravoConstant.PREF_KEY_SESSION_LOGIN_BRAVO_VIA_TYPE);\r\n SessionLogin sessionLogin = BravoUtils.getSession(mContext, loginBravoViaType);\r\n String userId = sessionLogin.userID;\r\n String accessToken = sessionLogin.accessToken;\r\n HashMap<String, String> subParams = new HashMap<String, String>();\r\n subParams.put(\"Foreign_SNS\", sns.foreignSNS);\r\n subParams.put(\"Foreign_ID\", sns.foreignID);\r\n subParams.put(\"Foreign_Access_Token\", sns.foreignAccessToken);\r\n JSONObject jsonObject = new JSONObject(subParams);\r\n List<NameValuePair> params = ParameterFactory.createSubParamsPutFollow(jsonObject.toString());\r\n String url = BravoWebServiceConfig.URL_PUT_SNS.replace(\"{User_ID}\", userId).replace(\"{Access_Token}\", accessToken);\r\n AsyncHttpPut putReport = new AsyncHttpPut(activity, new AsyncHttpResponseProcess(activity, null) {\r\n @Override\r\n public void processIfResponseSuccess(String response) {\r\n AIOLog.d(\"response putSNS :===>\" + response);\r\n JSONObject jsonObject = null;\r\n\r\n try {\r\n jsonObject = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (jsonObject == null)\r\n return;\r\n\r\n String status = null;\r\n try {\r\n status = jsonObject.getString(\"status\");\r\n } catch (JSONException e1) {\r\n e1.printStackTrace();\r\n }\r\n if (status == String.valueOf(BravoWebServiceConfig.STATUS_RESPONSE_DATA_SUCCESS)) {\r\n iRequestListener.onResponse(response);\r\n } else {\r\n iRequestListener.onErrorResponse(\"Cannot put sns\");\r\n }\r\n }\r\n\r\n @Override\r\n public void processIfResponseFail() {\r\n iRequestListener.onErrorResponse(\"Cannot put sns\");\r\n }\r\n }, params, true);\r\n AIOLog.d(url);\r\n putReport.execute(url);\r\n }",
"public static void main(String[] args) throws Exception {\n CloudFrontService cloudFrontService = new CloudFrontService(\n SamplesUtils.loadAWSCredentials());\n \n // List your distributions\n Distribution[] distributions = cloudFrontService.listDistributions();\n for (int i = 0; i < distributions.length; i++) {\n System.out.println(\"Distribution \" + (i + 1) + \": \" + distributions[i]);\n }\n \n /*\n // List the distributions applied to a given S3 bucket\n Distribution[] bucketDistributions = cloudFrontService.listDistributions(\"jets3t\");\n for (int i = 0; i < bucketDistributions.length; i++) {\n System.out.println(\"Bucket distribution \" + (i + 1) + \": \" + bucketDistributions[i]);\n }\n \n // Create a new distribution \n String originBucket = \"jets3t.s3.amazonaws.com\";\n Distribution newDistribution = cloudFrontService.createDistribution(\n originBucket, \n \"\" + System.currentTimeMillis(), // Caller reference - a unique string value\n new String[] {\"test1.jamesmurty.com\"}, // CNAME aliases for distribution\n \"Testing\", // Comment\n true // Enabled?\n );\n System.out.println(\"New Distribution: \" + newDistribution);\n \n // The ID of the new distribution we will use for testing\n String testDistributionId = newDistribution.getId(); \n \n // List information about a distribution\n Distribution distribution = cloudFrontService.getDistributionInfo(testDistributionId);\n System.out.println(\"Distribution: \" + distribution);\n\n // List configuration information about a distribution\n DistributionConfig distributionConfig = cloudFrontService.getDistributionConfig(testDistributionId);\n System.out.println(\"Distribution Config: \" + distributionConfig);\n\n // Update a distribution's configuration, in this case to add an extra CNAME alias.\n DistributionConfig updatedDistributionConfig = cloudFrontService.updateDistributionConfig(\n testDistributionId, \n new String[] {\"test1.jamesmurty.com\", \"test2.jamesmurty.com\"}, // CNAME aliases for distribution\n \"Another comment for testing\", // Comment \n true // Enabled?\n );\n System.out.println(\"Updated Distribution Config: \" + updatedDistributionConfig);\n\n // Disable a distribution, e.g. so that it may be deleted. This operation may take some time to complete...\n DistributionConfig disabledDistributionConfig = cloudFrontService.updateDistributionConfig(\n testDistributionId, new String[] {}, \"Deleting distribution\", false);\n System.out.println(\"Disabled Distribution Config: \" + disabledDistributionConfig);\n\n // Check whether a distribution is deployed\n Distribution distribution = cloudFrontService.getDistributionInfo(testDistributionId);\n System.out.println(\"Distribution is deployed? \" + distribution.isDeployed());\n\n // Delete a distribution (the distribution must be disabled and deployed first)\n cloudFrontService.deleteDistribution(testDistributionId);\n */\n \n }",
"public static Space addExistingSpace(Context context, boolean isMainSpace, String roomID) {\n\t\tSpace space = null;\n\t\ttry {\n\t\t\tspace = new Space(context, isMainSpace, roomID, false/*owner*/);\n\t\t//\tUser owner = \n\t\t\tPrivateSpaceIconView psIcon=new PrivateSpaceIconView(Space.getMainSpace().getContext(),space);\n\t\t\tspace.getSpaceController().setPSIV(psIcon);\n\t\t\tMainApplication.screen.getActivity().invalidatePSIconView(psIcon);\n\t\t\tMainApplication.screen.getActivity().invalidateSpaceView();\n\t\t\tLog.v(\"SpaceController\", \"this space has \" + space.getAllParticipants().size() + \" people\");\n\t\t\t\n\t\t} catch (XMPPException e) {\n\t\t\tLog.v(\"SpaceController\", \"Could not make an existing space for you\");\n\t\t}\n\t\treturn space;\n\t}",
"public void createClusters() {\n\t\t/*\n\t\t * double simAvg = documentDao.getSimilarity(avg); double simMax =\n\t\t * documentDao.getSimilarity(max); double simMin =\n\t\t * documentDao.getSimilarity(min);\n\t\t */\n\n\t\t// initClusters();\n\n\t\tList<Document> docList = documentDao.getDocumentListOrderBySimilarity();\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tint i = 0;\n\t\tCluster cluster = clusterList.get(i);\n\t\tfor (Document document : docList) {\n\t\t\twhile (document.getSimilarity() < cluster.getLow()) {\n\t\t\t\tcluster = clusterList.get(++i);\n\t\t\t}\n\t\t\tif (document.getSimilarity() < cluster.getHigh() && document.getSimilarity() >= cluster.getLow()) {\n\t\t\t\tdocument.setClusterId(cluster.getId());\n\t\t\t\tdocumentDao.insertDocument(document);\n\t\t\t}\n\t\t}\n\n\t}"
] | [
"0.53374034",
"0.50168324",
"0.48918864",
"0.48487118",
"0.47431344",
"0.47379833",
"0.4666046",
"0.46478724",
"0.46415627",
"0.45378503",
"0.45214325",
"0.4516908",
"0.44879413",
"0.44628885",
"0.4413649",
"0.44029054",
"0.43925166",
"0.43560025",
"0.43460813",
"0.4336086",
"0.42477515",
"0.42470372",
"0.4230876",
"0.42283955",
"0.4216905",
"0.41922253",
"0.41656846",
"0.4161064",
"0.4151364",
"0.41410926",
"0.41399318",
"0.4135954",
"0.41229045",
"0.40968263",
"0.40962976",
"0.40909043",
"0.40855768",
"0.4052107",
"0.40386447",
"0.4027453",
"0.4023209",
"0.40212414",
"0.40180722",
"0.4000126",
"0.39978674",
"0.39896327",
"0.39710975",
"0.39649493",
"0.3964391",
"0.39574525",
"0.3953093",
"0.39515635",
"0.3947933",
"0.39347845",
"0.39285305",
"0.3916285",
"0.39150488",
"0.3891943",
"0.38912496",
"0.38897067",
"0.38892815",
"0.3885928",
"0.38850045",
"0.3884307",
"0.38826966",
"0.38766152",
"0.38744596",
"0.38722575",
"0.38684332",
"0.3866554",
"0.38624793",
"0.3854084",
"0.38517314",
"0.38511196",
"0.3850513",
"0.3847652",
"0.38364533",
"0.38361192",
"0.38315895",
"0.3826059",
"0.38197413",
"0.3819166",
"0.3813031",
"0.38099796",
"0.38038042",
"0.3792795",
"0.37926692",
"0.37919658",
"0.37904108",
"0.37869117",
"0.3786337",
"0.37839139",
"0.3780284",
"0.37776014",
"0.3767053",
"0.37670213",
"0.3756703",
"0.37549016",
"0.37480292",
"0.37449393"
] | 0.5597894 | 0 |
Adds a new Customer to your application; the customer record that belongs to a newly added shopper user that has no customer record on the system. | public int addCustomer(String custName, String city, String street, int sessionID) {
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Shopper) {
Shopper sh = (Shopper)(s.getUser());
return sh.addRecord(custName, city, street);
}
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addCustomer() {\r\n\t\tdo {\r\n\t\t\tString name = getToken(\"Enter the customer's name: \");\r\n\t\t\tString phoneNumber = getToken(\"Enter the phone number: \");\r\n\t\t\tCustomer customer = store.addCustomer(name, phoneNumber);\r\n\t\t\tif (customer == null) {\r\n\t\t\t\tSystem.out.println(\"Could not add customer.\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(customer);\r\n\t\t} while (yesOrNo(\"Would you like to add another Customer?\"));\r\n\t}",
"public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }",
"public void addCustomer(Customer customer) throws UserExistsException {\r\n if (customerExists(customer)){\r\n throw new UserExistsException(\"Customer \"+ customer.getF_Name()+\" already exists\");\r\n }\r\n customers.add(customer);\r\n }",
"public void addCustomer(Customer customer) {\r\n if (hasID(customer.getID())) {\r\n return;\r\n }\r\n\r\n for (int i = 0; i < customers.length; i++) {\r\n if (customers[i] == null) {\r\n customers[i] = customer;\r\n return;\r\n }\r\n }\r\n\r\n System.err.println(\"No more room in database!\");\r\n }",
"public Customermodel addCustomer(Customermodel customermodel) {\n\t\t return customerdb.save(customermodel);\n\t }",
"@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}",
"@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}",
"private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public Customer addCustomer(Customer customer) {\n customer.setMemberSince(LocalDate.now());\n customer.setStatus(MembershipStatus.ACTIVE);\n return customerRepository.save(customer);\n }",
"public boolean addCustomer(CustomerBean customer);",
"@Override\n public void addCustomer(Customer customer) {\n log.info(\"Inside addCustomer method\");\n customerRepository.save(customer);\n }",
"@Override\n\tpublic void addCustomer(Customer customer) {\n\t\tcustomerDao.addCustomer(customer);\n\t}",
"public boolean addCustomer(Customer customer) throws DatabaseOperationException;",
"public void add(Customer c) {\n customers.add(c);\n\n fireTableDataChanged();\n }",
"private void addCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getCreateDate().toString(),\n customer.getCreatedBy(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"InsertCustomer.sql\"),\n args\n );\n }",
"public int addCustomer(Customer customer) {\n return model.addCustomer(customer);\n }",
"@Override\n\t@Transactional\n\tpublic void addCustomer(Customer customer) {\n\n\t\tSystem.out.println(\"here is our customer\" + customer);\n\n\t\thibernateTemplate.saveOrUpdate(customer);\n\n\t}",
"public void addUser(Customer user) {}",
"public static boolean addCustomer(Customer customer) throws SQLException {\n \n if (customerInDatabase(customer.getCustomer())) {\n System.out.println(\"Customer \" + customer.getCustomer() + \" already in DB (addCustomer)\");\n return false;\n }\n else if (customer.getCustomer().isEmpty()) {\n System.out.println(\"Customer given is empty (addCustomer\");\n return false;\n }\n String insertStatement = \"INSERT INTO customer(customerName, addressId, active, createDate, createdBy, lastUpdateBy) \" +\n \"VALUES (?,?,?,?,?,?)\";\n \n DBQueryPrepared.setPreparedStatement(CONN, insertStatement);\n ps = DBQueryPrepared.getPreparedStatement();\n ps.setString(1, customer.getCustomer());\n ps.setString(2, String.valueOf(customer.getAddressId()));\n ps.setString(3, \"1\");\n ps.setString(4, model.timeConversion.getTime().toString());\n ps.setString(5, \"currentUser\");\n ps.setString(6, \"currentUser\");\n ps.execute();\n return true; \n }",
"public au.gov.asic.types.AccountIdentifierType addNewCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().add_element_user(CUSTOMER$0);\n return target;\n }\n }",
"public void addCustomer(CustomerSignup p)\n {\n Session session = this.sessionFactory.getCurrentSession();\n \n session.persist(p);\n \n CustomerLogin cl=new CustomerLogin();\n cl.setUsername(p.getUsername());\n cl.setPassword(p.getPassword());\n cl.setId(p.getId());\n session.persist(cl);\n \n Authorities a = new Authorities();\n a.setUsername(p.getUsername());\n a.setAuthority(\"ROLE_USER\");\n a.setId(p.getId());\n session.saveOrUpdate(a);\n\n session.flush();\n \n logger.info(\"Customer saved successfully, Customer Details=\"+p);\n }",
"@PostMapping(\"/customers\")\r\n\tpublic Customer addCustomer(@RequestBody Customer customer) {\n\t\tcustomer.setId(0);\r\n\t\t\r\n\t\tcustomerService.saveCustomer(customer);\r\n\t\treturn customer;\r\n\t}",
"public void addCustomer(String c){\n\t\tif(!containsCustomer(c)){\n\t\t\tCustomer e = new Customer(c);\n\t\t\tlist.add(e);\n\t\t}\n\t}",
"@PostMapping(\"/customers\")\n public Customer addCustomer(@RequestBody Customer theCustomer)\n {\n //also just in case they pass an id in JSON .. set id to o\n //this is to force a save of new item ... instead od update\n theCustomer.setId(0);\n customerService.save(theCustomer);\n return theCustomer;\n }",
"public static DAO AddCustomer(Customer customer) throws CustomerIDExistsException, IllegalStateException\r\n\t{\r\n\t\treturn instance.addCustomer(customer);\r\n\t}",
"public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic boolean addCustomer(Customer customer) {\n\t\tint result=0;\n\t\tConnection connection;\n\t\ttry {\n\t\t\tconnection = DBConnection.makeConnection();\n\t\t\tPreparedStatement Statement = connection.prepareStatement(INSERT_CUSTOMER_QUERY);\n\t\t\tStatement.setInt(1, customer.getCustomerId());\n\t\t\tStatement.setString(2, customer.getCustomerName());\n\t\t\tStatement.setString(3, customer.getCustomerAddress());\n\t\t\t\tStatement.setInt(4, customer.getBillAmount());\n\t\t\t\tresult=Statement.executeUpdate();\n\n\t\t} \n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\n\t\tif(result==0)\n\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic Customer addCustomer(Customer customer) {\r\n\r\n\t\tif (!inputValidator.nameValidator(customer.getName()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a Valid Customer Name.\");\r\n\t\tif (!inputValidator.userIdValidator(customer.getUserId()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a Valid UserId.\");\r\n\t\tif (!inputValidator.contactValidator(customer.getContactNo()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a valid Contact Number.\");\r\n\t\tif (!inputValidator.emailValidator(customer.getEmail()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a valid Email.\");\r\n\t\tCustomer customer2 = customerRepository.save(customer);\r\n\t\treturn customer2;\r\n\r\n\t}",
"public void register(Customer c) {\n\t\tUser.customers.add(c);\n\t}",
"@Override\r\n\tpublic int insertNewCustomer(Customer cust) throws CustException {\n\t\tmanager.persist(cust);\r\n\t\treturn 1;\r\n\t}",
"public void add(Customer customer) {\n\t\tSessionFactory sessionFactory = HibernateUtil.getSessionFactory();\n\t\t//Step 2. Create/Obtain Session object\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//Step 3. Start/Participate in a Transaction\n\t\tTransaction tx = session.beginTransaction();\n\t\t\n\t\t//Now we can insert/update/delete/select whatever we want\n\t\tsession.save(customer); //save method generates insert query\n\t\t\n\t\ttx.commit();\n\t}",
"public void addCustomer(CustomerWithGoods customer) {\n\t\tthis.allCustomers.add(customer);\n\t}",
"public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}",
"@PreAuthorize(\"#oauth2.hasAnyScope('write','read-write')\")\n\t@RequestMapping(method = POST, consumes = { APPLICATION_JSON_UTF8_VALUE })\n\tpublic Mono<ResponseEntity<?>> addCustomer(@RequestBody @Valid Customer newCustomer) {\n\n\t\treturn Mono.justOrEmpty(newCustomer.getId())\n\t\t\t.flatMap(id -> repo.existsById(id))\n\t\t\t.defaultIfEmpty(Boolean.FALSE)\n\t\t\t.flatMap(exists -> {\n\n\t\t\t\tif (exists) {\n\t\t\t\t\tthrow new CustomerServiceException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\"Customer already exists, to update an existing customer use PUT instead.\");\n\t\t\t\t}\n\n\t\t\t\treturn repo.save(newCustomer).map(saved -> {\n\t\t\t\t\treturn created(URI.create(format(\"/customers/%s\", saved.getId()))).build();\n\t\t\t\t});\n\t\t\t});\n\t}",
"@Override\n\tpublic Customers create(Customers newcust) {\n\t\tif (newcust.getId()!=null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers savecust = CustRepo.save(newcust);\n\t\treturn savecust;\n\t}",
"@Override\n\tpublic void createCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\ttry {\n\t\t\t\n\t\t\tStatement st = con.createStatement();\n\t\t\tString create = String.format(\"insert into customer values('%s', '%s')\", customer.getCustName(),\n\t\t\t\t\tcustomer.getPassword());\n\t\t\tst.executeUpdate(create);\n\t\t\tSystem.out.println(\"Customer added successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to add A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}",
"@PostMapping( value = CustomerRestURIConstants.POST_CUSTOMER )\n\tpublic ResponseEntity<?> addCustomer(@RequestBody Customer customer) {\n\t\tlong id = customerService.save(customer);\n\t return ResponseEntity.ok().body(\"New Customer has been saved with ID:\" + id);\n\t}",
"public void registerNewCustomers(Customer c) {\n if (!newCustomers.contains(c)\n && !modifiedCustomers.contains(c)) {\n newCustomers.add(c);\n }\n }",
"@RequestMapping(value = \"/customers\", method = RequestMethod.POST)\n public ResponseEntity<?> addCustomer(@RequestBody Customer customer) {\n Customer aNewCustomer = customerService.newCustomer(customer);\n return new ResponseEntity<>(aNewCustomer, HttpStatus.CREATED);\n }",
"@Path(\"customer\")\n @Service({\"customer\"})\n public ResponseMessage addCustomer(Customer customer) {\n return csi.addCustomer(customer);\n }",
"public void addCustomer() {\n\t \n\t try{\n\t\t con = openDBConnection();\n\t\t callStmt = con.prepareCall(\" {call team5.CUSTOMER_ADD_PROC(?,?,?,?,?,?,?)}\");\n\t\t callStmt.setString(1,this.emailad);\n\t\t callStmt.setString(2,this.fname);\n\t\t callStmt.setString(3,this.lname);\n\t\t callStmt.setString(4,this.username);\n\t\t callStmt.setString(5,this.password);\n\t\t callStmt.setString(6,this.adminUsername);\n\t\t callStmt.setInt(7, this.id);\n\t\t callStmt.execute();\n\t\t callStmt.close();\n\t } catch (Exception E) {\n\t E.printStackTrace();\n\t }\n}",
"@Override\n\tpublic boolean addCustomer(Customer customer) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t try {\n\t\tShippingAddress shippingAddress=customer.getShippingAddress();\n\t session.save(customer);\n\t session.save(shippingAddress);\n\t\n\t\treturn true;\n\t }\n\t catch(HibernateException e)\n\t {\n\t \t\n\t \te.printStackTrace();\n\t \treturn false;\n\t }\n\t}",
"@Override\r\n\tpublic int insertCustomer(Customer customer) throws BillingServicesDownException {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Mobile Customer Add()\");\n\t}",
"public void add(Customer customer) throws CustomerAlreadyExistsException{\n\t\tList<Customer> checkLastName = repository.findByLastName(customer.getLastName());\n\t\tList<Customer> checkFirstName = repository.findByFirstName(customer.getFirstName());\n\t\t\n\t\tif ( (!checkLastName.isEmpty() ) && (!checkFirstName.isEmpty() ) ) {\n\t\t\tthrow new CustomerAlreadyExistsException(\"Customer already exists!\");\n\t\t}\n\t\trepository.save(customer);\n\t}",
"@Override\n\tpublic int addCustomerReprieve(CustomerReprieve customerReprieve) {\n\t\treturn customerDao.addCustomerReprieve(customerReprieve);\n\t}",
"private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }",
"private Customer addCustomerDetails(CustomerRegRequestDto requestDto) {\n\t\tString customerId = null;\n\n\t\tOptional<Utility> details = utilityRepo.findByUtilityId(requestDto.getCustomerUtilityId());\n\t\tif (!details.isPresent())\n\t\t\tthrow new NoDataFoundException(CustomerConstants.UTILITY_NOT_FOUND);\n\n\t\tOptional<Customer> getCustomer = customerRepo.findFirstByOrderByModifiedDateDesc();\n\t\tif (getCustomer.isPresent()) {\n\t\t\tif (getCustomer.get().getCustomerId().charAt(0) == CustomerConstants.CUSTOMER_STARTING)\n\t\t\t\tcustomerId = Helper.generateNextCustomerId(getCustomer.get().getCustomerId(),\n\t\t\t\t\t\tdetails.get().getUtilityName());\n\t\t\telse\n\t\t\t\tcustomerId = Helper.generateUniqueCustomerId(details.get().getUtilityName());\n\n\t\t} else {\n\t\t\tcustomerId = Helper.generateUniqueCustomerId(details.get().getUtilityName());\n\n\t\t}\n\t\tmodelMapper.getConfiguration().setAmbiguityIgnored(true);\n\t\tCustomer addNewCustomer = modelMapper.map(requestDto, Customer.class);\n\t\taddNewCustomer.setCustomerId(customerId);\n\t\taddNewCustomer.setActive(true);\n\t\taddNewCustomer.setCreatedBy(requestDto.getUserId());\n\t\taddNewCustomer.setCreatedDate(new Date());\n\t\taddNewCustomer.setModifiedBy(requestDto.getUserId());\n\t\taddNewCustomer.setModifiedDate(new Date());\n\t\treturn customerRepo.save(addNewCustomer);\n\t}",
"@PostMapping(\"/addcustomer\")\n\tpublic String save(@ModelAttribute(\"customer\") Customer theCustomer) {\n\t\tcustomerServices.save(theCustomer);\n\t\treturn \"redirect:/dairymilk/customers\";\n\t}",
"@Transactional\n @Override\n public User add(RegisterCustomerDto registerCustomerDto) {\n\n Customer customer = new Customer();\n customer.setUsername(registerCustomerDto.getUsername());\n customer.setEmail(registerCustomerDto.getEmail());\n\n customer = customerDao.saveOrUpdate(customer);\n\n Role role = roleDao.findByName(RoleEnum.USER.getRole().getName());\n if (role == null) {\n role = roleDao.add(RoleEnum.USER.getRole());\n }\n\n Set<Role> roles = new HashSet<>();\n roles.add(role);\n\n BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder();\n String password = bCrypt.encode(registerCustomerDto.getPassword());\n\n User user = new User();\n user.setCustomer(customer);\n user.setPassword(password);\n user.setRoles(roles);\n user.setName(registerCustomerDto.getUsername());\n\n return userDao.saveOrUpdate(user);\n }",
"private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }",
"public int insertCustomer() {\n\t\treturn 0;\r\n\t}",
"public void addCustomer() {\n\t\tSystem.out.println(\"Enter your first name.\");\n\t\tString fn = scan.nextLine();\n\t\tSystem.out.println(\"Enter your last name.\");\n\t\tString ln = scan.nextLine();\n\t\tSystem.out.println(\"Enter your username.\");\n\t\tString user = scan.nextLine();\n\t\tSystem.out.println(\"Enter your password.\");\n\t\tString pw = scan.nextLine();\n\t\tSystem.out.println(\"Password once more (to be safe.)\");\n\t\tString pw2 = scan.nextLine();\n\t\t/*if (pw.toString() != pw2.toString()) {\n\t\t\tSystem.out.println(\"Whoops! Let's try that again.\");\n\t\t\taddCustomer();\n\t\t}\n\t\t*/\n\t\t//else {\n String sql = \"INSERT INTO bank.login (first_name, last_name, user_name, password) VALUES (\"+\"\\\"\"+fn+\"\\\"\"+\", \"+\"\\\"\"+ln+\"\\\"\"+\", \"\n\t\t+\"\\\"\"+user+\"\\\"\"+\", \"+\"\\\"\"+pw+\"\\\"\"+\")\";\n\n try{\n \t\n \tconnect.databaseUtil();\n Statement statement = Database.connection.createStatement();\n // ResultSet resultSet =\n \t\tstatement.executeUpdate(sql);\n try {\n \t\t\tconnect.databaseClose();\n \t\t} catch (SQLException e) {\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n\n bank.start();\n }\n \n\n catch(SQLException e){\n \t\te.printStackTrace();\n Menus.custMenu();\n\n }\n\n \n\t\t\n\t}",
"@Override\n\tpublic String insertNewCustomer(Customer c) {\n\n\t\tInteger id=dao.insertNewCustomer(c);\n\t\tif(id==null)\n\t\t\treturn \"User registratin failed\";\n\t\treturn \"User registration successfull having user ID - \"+id;\n\n\t}",
"public DAO addCustomer(Customer customer) throws CustomerIDExistsException, IllegalStateException\r\n\t{\r\n\t\tsynchronized (lock)\r\n\t\t{\r\n\t\t\tif (!isInitialized)\r\n\t\t\t{\r\n\t\t\t\tthrow new IllegalStateException(\"The DAO isn't initialized\", initializationError);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (findCustomerById(customer.getId()) != null)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomerIDExistsException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcustomers.add(customer);\r\n\t\t\t\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}",
"public static void addNewCustomer(final ArrayList<Car> carList, ArrayList<Customer> customerList, HashSet<Integer> idHashSet)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Input Customer ID and Customer Name\");\n\t\tint custIdInput = sc.nextInt();\n\t\t\n\t\t//Check if the Entered ID is unique and is not used by any other customer\n\t\tif(ValidationCheck.isIdUnique(custIdInput, idHashSet) != true)\n\t\t{\n\t\t\tSystem.out.println(\"Please Enter a Unique Customer Id\");\n\t\t\treturn;\n\t\t}\n\t\tidHashSet.add(custIdInput);\n\t\tString custNameInput = sc.next();\n\t\t\n\t\t//check if Name consists of valid characters\n\t\tif(ValidationCheck.isValidName(custNameInput) != true)\n\t\t{\n\t\t\tSystem.out.println(\"Please enter a valid Customer Name\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t Customer customerObj = new Customer(custIdInput, custNameInput, carList);\n\t customerList.add(customerObj);\n\t}",
"public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }",
"public synchronized Person addNewBuyer(String name) {\n Customer newCustomer = new Customer(UsersSerialGenerator++,name);\n m_CustomersInSystem.put(name,newCustomer);\n return newCustomer;\n }",
"public ShoppinCard addcard(ShoppinCard shoppingCard, int itemId,Customer customer) throws Exception\r\n\t{\n\t\tif(customer != null) \r\n\t\t{\t\t\r\n\t\tItem item = itemRepository.findById(itemId).orElseThrow(()->new IDNotFoundException(\"Item Are Not Present Into DataBase\"));\r\n\t\tshoppingCard.setItem(item);\r\n\t\tshoppingCard.setCustomer(customer);\r\n\t\treturn shoppingcardRepository.save(shoppingCard);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ResourceNotFoundException(\"You Can't Login First Do You Login \");\r\n\t\t}\r\n\t}",
"private void createCustomer(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer checkCustomer = CustomerDao.getCustomer(id);\n if (checkCustomer == null) {\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer newCustomer = new Customer(id, name, phone, email);\n CustomerDao.addCustomer(newCustomer);\n response.sendRedirect(\"/\");\n }\n else {\n String message = \"This ID already exist\";\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer ExitCustomer = new Customer(id, name, phone, email);\n request.setAttribute(\"message\", message);\n request.setAttribute(\"customer\", ExitCustomer);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/newCustomer.jsp\");\n dispatcher.forward(request, response);\n }\n }",
"public boolean insertCustomer(Customer customer){\n\n ContentValues cv = new ContentValues();\n\n cv.put(\"customer_name\", customer.getName());\n cv.put(\"customer_description\", customer.getDescription());\n\n long insert = _db.insert(\"Customer\", null, cv);\n\n // Checks if rows have been updated.\n if(insert == -1){\n return false;\n }\n\n return true;\n }",
"public void setCustomer(Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t\tpassengers.add(customer);\r\n\t}",
"@Override\n\tpublic void addCustomer(Customer customer, Branch branch) {\n\t\t\n\t}",
"static void addCustomer(customer customer) {\n\n }",
"public void newCustomer () {\r\n\t\t//input category id.\r\n\t\t//TODO\r\n boolean ok = false;\r\n do { \r\n my.printCategoies();\r\n try {\r\n System.out.println(\"Category:\");\r\n Scanner scan = new Scanner(System.in);\r\n String cat = scan.next();\r\n \r\n Category c = my.getCategory(cat);\r\n //\r\n if (c!=null ) {\r\n // add the new customer to a category\r\n //input new customer.\r\n Customer theNewCustomer = readCustomer(cat);\r\n if ( theNewCustomer != null ) {\r\n my.add(c, theNewCustomer);\r\n ok = true;\r\n }\r\n \r\n }else{\r\n System.out.println(\"Category not exist\");\r\n }\r\n \r\n } catch (Exception e) {\r\n System.out.println(\"Sorry, try again\");\r\n }\r\n } while (ok == false);\r\n \r\n\t\t\r\n\t}",
"public void registerCustomer(Customer customer) {\nSession session=sessionFactory.getCurrentSession();\n\t\t\n\t\tAuthorities authorities=new Authorities();\n\t\tauthorities.setRole(\"ROLE_USER\");\n\t\tauthorities.setUser(customer.getUser());//FK column in authorities table\n\t\t\n\t\tcustomer.getUser().setAuthorities(authorities);\n\t\tcustomer.getUser().setEnabled(true);\n\t\t\n\t\tCart cart=new Cart();\n\t\tcustomer.setCart(cart);\n\t\tcart.setCustomer(customer);\n\t\t\n\t\tsession.save(customer);\n\t\n\t\t\n\t}",
"static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }",
"@Override\n\tpublic Customer register(Customer customer) {\n\t\tcustomer=customerRepo.addCustomer(customer);\n\t\treturn customer;\n\t}",
"public void create(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"INSERT INTO customer (name, id, phone) VALUES (?, ?, ?)\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.executeUpdate();\n System.out.println(\"Customer created.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Creation error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }",
"public void add(ActionEvent e) {\r\n Customer newCustomer = new Customer();\r\n newCustomer.setContactfirstname(tempcontactfirstname);\r\n newCustomer.setContactlastname(tempcontactlastname);\r\n save(newCustomer);\r\n addRecord = !addRecord;\r\n }",
"public void AddCustomer(View v) {\r\n try {\r\n if (edtCustName.getText().toString().equalsIgnoreCase(\"\") || edtCustPhoneNo.getText().toString().equalsIgnoreCase(\"\") || edtCustAddress.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please fill all details before adding customer\");\r\n } else if (edtCustPhoneNo.getText().toString().length()!= 10)\r\n {\r\n MsgBox.Show(\"Warning\", \"Please fill 10 digit customer phone number\");\r\n return;\r\n } else{\r\n Cursor crsrCust = dbBillScreen.getCustomer(edtCustPhoneNo.getText().toString());\r\n if (crsrCust.moveToFirst()) {\r\n MsgBox.Show(\"Note\", \"Customer Already Exists\");\r\n } else {\r\n String gstin = etCustGSTIN.getText().toString().trim().toUpperCase();\r\n if (gstin == null) {\r\n gstin = \"\";\r\n }\r\n boolean mFlag = GSTINValidation.checkGSTINValidation(gstin);\r\n if(mFlag)\r\n {\r\n if( !GSTINValidation.checkValidStateCode(gstin,this))\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please Enter Valid StateCode for GSTIN\");\r\n }\r\n else {\r\n InsertCustomer(edtCustAddress.getText().toString(), edtCustPhoneNo.getText().toString(),\r\n edtCustName.getText().toString(), 0, 0, 0, gstin);\r\n //ResetCustomer();\r\n //MsgBox.Show(\"\", \"Customer Added Successfully\");\r\n Toast.makeText(myContext, \"Customer Added Successfully\", Toast.LENGTH_SHORT).show();\r\n ControlsSetEnabled();\r\n checkForInterStateTax();\r\n }\r\n }else\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please enter valid GSTIN for customer\");\r\n }\r\n\r\n }\r\n }\r\n } catch (Exception ex) {\r\n MsgBox.Show(\"Error\", ex.getMessage());\r\n }\r\n }",
"public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}",
"private Customer addCustomer(String title, String firstName, String lastName, String phone, String email, String addressLine1, String addressLine2, String city, String state, String postCode, String country) {\r\n out.print(title);\r\n out.print(firstName);\r\n out.print(lastName);\r\n out.print(phone);\r\n out.print(email);\r\n out.print(addressLine1);\r\n out.print(addressLine2);\r\n out.print(city);\r\n out.print(state);\r\n out.print(postCode);\r\n out.print(country);\r\n\r\n Customer customer = new Customer();\r\n customer.setCustomerTitle(title);\r\n customer.setCustomerFirstName(firstName);\r\n customer.setCustomerLastName(lastName);\r\n customer.setCustomerPhone(phone);\r\n customer.setCustomerEmail(email);\r\n customer.setCustomerAddressLine1(addressLine1);\r\n customer.setCustomerAddressLine2(addressLine2);\r\n customer.setCustomerCity(city);\r\n customer.setCustomerState(state);\r\n customer.setCustomerPostCode(postCode);\r\n customer.setCustomerCountry(country);\r\n\r\n em.persist(customer);\r\n return customer;\r\n }",
"@PostMapping(\"/customers\")\n public void addCustomer(@RequestBody CustomerHibernate theCustomerHibernate) {\n //this is to force a save for a new item .... instead of update\n\n theCustomerHibernate.setId(0);\n\n customerService.save(theCustomerHibernate);\n }",
"@Override\r\n\tpublic void createShopOwner(User customer, ShopOwner shopOwner) {\n\t\tshopOwner.setUser(customer);\r\n\t\tsuper.getSessionFactory().getCurrentSession().save(shopOwner);\r\n\t\tcustomer.setSeller(true);\r\n\t\tsuper.getSessionFactory().getCurrentSession().saveOrUpdate(customer);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}",
"public Customer saveCustomer(Customer customer) {\n\t\treturn null;\n\t}",
"@RequestMapping(value=\"/pizza/custCreate.html\", method = RequestMethod.POST)\r\n public ModelAndView custCreate(\r\n @ModelAttribute(\"customer\")Customer customer,\r\n @CookieValue(value = \"v\", defaultValue = \"\") String visitorId,\r\n HttpServletResponse response) throws Exception {\n visitorManager.setCookieValue(visitorId);\r\n \r\n // Get the current order\r\n Order order = shoppingCart.getOrder();\r\n ModelAndView result = new ModelAndView(\"/pizza/cardEntry\");\r\n result.addObject(\"order\", order);\r\n \r\n // TODO: Is the customer valid?\r\n \r\n // Add the customer to the order\r\n order.setCustomer(customer);\r\n shoppingCart.assignCustomer(customer);\r\n\r\n // Remember the visitor\r\n response.addCookie(new Cookie(\"v\", visitorManager.getCookieValue()));\r\n return result;\r\n }",
"public Customer createOrUpdateCustomer(final Customer customer) {\n checkNotNull(customer);\n\n String key = CustomerDbClient.computeKey(customer.getPhone(), customer.getName());\n Customer existing = dbClient.getById(key);\n if (existing == null) {\n return dbClient.putAndUpdateTimestamp(customer.toBuilder().setId(key).build());\n }\n\n List<Address> newAddresses = customer.getAddressesList()\n .stream()\n .filter(t -> !existing.getAddressesList().contains(t))\n .collect(Collectors.toList());\n\n Customer toUpdate = existing.toBuilder()\n .clearAddresses()\n .addAllAddresses(newAddresses) // The new address will be the default one.\n .addAllAddresses(existing.getAddressesList())\n .setDefaultAddressIndex(0)\n .build();\n\n return dbClient.putAndUpdateTimestamp(toUpdate);\n }",
"@PostMapping(\"/customers\")\n\tpublic Customer savecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomer.setId(0); //here 0 is not id, we are telling saveorupdate() DAO method to insert the customer object coz it inserts if id is empty(so give 0 or null)\n\t\tthecustomerService.saveCustomer(thecustomer);\n\t\treturn thecustomer;\n\t}",
"@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}",
"private User addNewUser(CustomerRegRequestDto requestDto, Customer addNewCustomer) {\n\t\tString userId = null;\n\t\tOptional<User> getUser = userRepo.findFirstByOrderByCreatedDateDesc();\n\t\tif (getUser.isPresent()) {\n\t\t\tif (getUser.get().getUserId().charAt(0) == CustomerConstants.CUSTOMER_USER_STARTING)\n\t\t\t\tuserId = Helper.generateNextUserId(getUser.get().getUserId());\n\t\t\telse\n\t\t\t\tuserId = Helper.generateUniqueUserId(CustomerConstants.CUSTOMER_USER_STARTING);\n\n\t\t} else {\n\t\t\tuserId = Helper.generateUniqueUserId(CustomerConstants.CUSTOMER_USER_STARTING);\n\n\t\t}\n\t\trequestDto.setRoleId(CustomerConstants.CUSTOMER_ADMIN_ROLE_ID);\n\t\tmodelMapper.getConfiguration().setAmbiguityIgnored(true);\n\t\tUser addUser = modelMapper.map(requestDto, User.class);\n\t\tString hashOfPassword = PasswordDecode.getHash(requestDto.getCustomerUserName().toLowerCase(), \"MD5\");\n\t\tString passwordHash = PasswordDecode.getHash(requestDto.getConfirmPassword(), hashOfPassword, \"MD5\");\n\t\taddUser.setUserName(requestDto.getCustomerUserName());\n\t\taddUser.setFirstName(requestDto.getCustomerName());\n\t\taddUser.setLastName(requestDto.getCustomerName());\n\t\taddUser.setMiddleName(requestDto.getCustomerName());\n\t\taddUser.setUserStatus(requestDto.getCustomerStatus());\n\t\taddUser.setUserId(userId);\n\t\taddUser.setEmailId(addNewCustomer.getCustomerEmailId());\n\t\taddUser.setPassword(passwordHash);\n\t\taddUser.setPasswordHash(hashOfPassword);\n\t\taddUser.setCustomer(addNewCustomer);\n\t\taddUser.setIsActive(true);\n\t\taddUser.setCreatedBy(requestDto.getUserId());\n\t\taddUser.setCreatedDate(new Date());\n\t\taddUser.setModifiedBy(requestDto.getUserId());\n\t\taddUser.setModifiedDate(new Date());\n\t\treturn userRepo.save(addUser);\n\n\t}",
"public static boolean addNewCustomer(String customerName, String customerAddress, String\n customerPostalCode, String customerPhoneNumber, Integer divisionID)\n {\n try {\n Statement statement = DBConnection.getConnection().createStatement();\n String addQuery = \"INSERT INTO customers SET Customer_Name='\" + customerName\n + \"', Address='\" + customerAddress\n + \"', Phone='\" + customerPhoneNumber\n + \"', Postal_Code='\" + customerPostalCode\n + \"', Division_ID=\" + divisionID;\n statement.execute(addQuery);\n if(statement.getUpdateCount() > 0)\n System.out.println(statement.getUpdateCount() + \" row(s) affected.\");\n else\n System.out.println(\"No changes were made.\");\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n }\n return false;\n }",
"public void prepareAdd() {\r\n\t\tcurrent = new Customer();\r\n\t\tcurrent.setCustomerCode(generateCode.generateCustomerCode());\r\n\t}",
"public boolean addCustomer(String newCustomerName, double firstTransaction) {\n Customer foundCustomer = findCustomer(newCustomerName);\n\n if (foundCustomer != null) {\n System.out.println(newCustomerName + \" was found on file\");\n return false;\n }\n\n this.customers.add(new Customer(newCustomerName, firstTransaction));\n return true;\n }",
"public boolean add(String firstName, String lastName, String email, String phoneNumber) {\n Customer c = new Customer(firstName, lastName, email, phoneNumber);\n return customerCrudInterface.add(c);\n\n }",
"public boolean newCustomer(String customerName, double transactions){\n Customer newCustomer = findCustomer(customerName);\n if(newCustomer == null){\n this.customers.add(new Customer(customerName,transactions));\n return true;\n }\n return false;\n }",
"Customer createCustomer();",
"Customer createCustomer();",
"Customer createCustomer();",
"Customer createCustomer();",
"@Override\n\tpublic Customer saveCustomer(Customer customer) {\n\t\treturn null;\n\t}",
"public void createSalerCustomer(SalerCustomer salerCustomer) {\n\t\tthis.salerCustomerMapper.createSalerCustomer(salerCustomer);\n\t}",
"AccountModel addByCustomer(AccountModel account,String customerId) throws AccountException, CustomerException;",
"public void register(Customer customer) {\n\t\tcustomerDao.register(customer);\r\n\t}",
"public void create(Customer customer) {\r\n this.entityManager.persist(customer);\r\n }",
"public void addTransaction(CustomerTransaction cust) {\n history.add(cust);\n }",
"@PostMapping(\"/customer\")\n\tpublic Customer createCustomer(@RequestBody Customer customer) {\n\t\treturn customerRepository.save(customer);\n\t}",
"public au.gov.asic.types.MessageIdentifierType.CustomerIdentifier addNewCustomerIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.MessageIdentifierType.CustomerIdentifier target = null;\n target = (au.gov.asic.types.MessageIdentifierType.CustomerIdentifier)get_store().add_element_user(CUSTOMERIDENTIFIER$2);\n return target;\n }\n }",
"public static void addCustomer(String name, String address, String firstDivision, String postalCode, String phoneNumber) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String insertStatement = \"INSERT INTO customers(Customer_Name, Address, Postal_Code, Phone, Created_By, Last_Updated_By, Division_ID) VALUES(?,?,?,?,?,?,?);\";\r\n DBQuery.setPreparedStatement(conn, insertStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n int divisionID = getDivisionID(firstDivision);\r\n String userName = DBUsers.getUser();\r\n\r\n ps.setString(1,name);\r\n ps.setString(2, address);\r\n ps.setString(3,postalCode);\r\n ps.setString(4,phoneNumber);\r\n ps.setString(5,userName);\r\n ps.setString(6,userName);\r\n ps.setInt(7,divisionID);\r\n\r\n ps.execute();\r\n\r\n if(ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n }\r\n else {\r\n System.out.println(\"no change\");\r\n }\r\n }",
"public Customer putCustomer(final Customer customer) {\n return dbClient.put(customer);\n }",
"public static void addCarToCustomer(final int customerId, final Car car, ArrayList<Customer> customerList)\n\t{\n\t\tint i, customerFlag = 0;\n\t\t//Search the List of Customers to whom new car to be added\n\t\tfor(i=0;i<customerList.size();i++)\n\t\t{\n\t\t\tif(customerId == customerList.get(i).getCustomerId())\n\t\t\t{\n\t\t\t\t//If customer with entered ID found set the customerFlag\n\t\t\t\tcustomerFlag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If No Customer with entered ID exists in the list\n\t\tif(customerFlag == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Customer with Inputed Id Found\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcustomerList.get(i).addCarToCustomer(car);\n\t}"
] | [
"0.746778",
"0.74125266",
"0.71958864",
"0.7195149",
"0.71071035",
"0.7053348",
"0.7010375",
"0.6968058",
"0.69352937",
"0.6917183",
"0.69144136",
"0.6907501",
"0.6880125",
"0.6879259",
"0.68427145",
"0.68369013",
"0.6820734",
"0.68147194",
"0.67810583",
"0.6775029",
"0.67369634",
"0.66995585",
"0.6651751",
"0.6638588",
"0.6612393",
"0.66107774",
"0.6595721",
"0.6595423",
"0.6574217",
"0.6573901",
"0.65538156",
"0.6544404",
"0.6519103",
"0.6469086",
"0.6466758",
"0.6441783",
"0.64318156",
"0.64306086",
"0.64107597",
"0.6406244",
"0.6398169",
"0.63941634",
"0.6388414",
"0.63689864",
"0.6352562",
"0.6349027",
"0.633624",
"0.6335931",
"0.6335038",
"0.63136244",
"0.629078",
"0.62824786",
"0.62771225",
"0.6269175",
"0.6232114",
"0.6230897",
"0.6229875",
"0.62256277",
"0.6215999",
"0.62013966",
"0.6184759",
"0.6166049",
"0.6127998",
"0.61132133",
"0.6110592",
"0.6087461",
"0.608136",
"0.6080992",
"0.6074873",
"0.60716456",
"0.60702264",
"0.60483295",
"0.60353774",
"0.6021358",
"0.6012789",
"0.6001416",
"0.59899884",
"0.597762",
"0.597676",
"0.59707475",
"0.59642917",
"0.59394276",
"0.5929347",
"0.592909",
"0.5918946",
"0.5913328",
"0.5904821",
"0.5904821",
"0.5904821",
"0.5904821",
"0.58828914",
"0.58756804",
"0.58719563",
"0.58588",
"0.5855858",
"0.5854958",
"0.58406097",
"0.58270586",
"0.5826335",
"0.58262634",
"0.5816072"
] | 0.0 | -1 |
Adds a new Product to your application | public int addProduct(String prodName, int category, double price, int sessionID) {
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Administrator) {
Administrator ad = (Administrator)(s.getUser());
return ad.addProduct(prodName, category, price);
}
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addProduct(Product product);",
"ProductView addProduct(ProductBinding productToAdd) throws ProductException;",
"void addProduct(Product product);",
"private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }",
"Product addNewProductInStore(Product newProduct);",
"public addproduct() {\n\t\tsuper();\n\t}",
"public void addProduct(Product product) {\n allProducts.add(product);\n }",
"public void addProduct() {\n Product result;\n String prodName = getToken(\"Enter product name: \");\n double price = getDouble(\"Enter price per unit: $\");\n result = warehouse.addProduct(prodName, price);\n if (result != null) {\n System.out.println(result);\n }\n else {\n System.out.println(\"Product could not be added.\");\n }\n }",
"public void addProduct(Product newProduct) {\n System.out.println(\"addProduct(): \" + newProduct.getName());\n allProducts.add(newProduct);\n }",
"public void add(Product product) {\r\n sessionFactory.getCurrentSession()\r\n .save(product);\r\n }",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"public void addProduct(Product product){\n // Adding new contact\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_PRODUCT_NAME, product.getName_product());\n values.put(IS_STRIKE_OUT, product.IsStrikeout());\n values.put(KEY_UUID_PRODUCT_NAME, String.valueOf(product.getId()));\n\n\n // Inserting Row\n db.insert(TABLE_PRODUCTS, null, values);\n Log.d(LOG_TAG_ERROR, \"addProduct OK \" + \" \" + product.getName_product() + \" \" + product.getId());\n\n db.close(); // Closing database connection\n }",
"public void addProduct(Product p) {\n c.addProduct(p);\n }",
"Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;",
"public void addProduct(Product pProduct)\n\t{\n\t\tmyProductInventory.add(pProduct);\n\n\n\t}",
"public static void addProduct(Product newProduct) {\n allProducts.add(newProduct);\n }",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public void add(Product product) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, product.getName());\n values.put(KEY_URL, product.getURL());\n values.put(KEY_CURRENT, product.getCurrentPrice());\n values.put(KEY_CHANGE, product.getChange());\n values.put(KEY_DATE, product.getDate());\n values.put(KEY_INITIAL, product.getInitialPrice());\n long id = database.insert(PRODUCT_TABLE, null, values);\n product.setId((int) id);\n database.close();\n }",
"public void addProduct(Product toAdd) {\n\t\tthis.products.add(toAdd);\n\t}",
"@Override\n\tpublic void add(Product p) {\n\t\tproductRepository.save(p);\n\t}",
"public void addProduct() throws Throwable\r\n\t{\r\n\t\tgoToProductsSection();\r\n\t\tverifyProduct();\r\n\t\tselPproductBtn.click();\r\n\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ProductsPage\") , \"Products Page \");\r\n\t\tProductsPage pdpage=new ProductsPage();\r\n\t\tpdpage.selectProducts();\r\n\t}",
"public static void addProduct(Product product){\r\n \r\n System.out.println(\"Adding Product \" + product.getProductName());\r\n productInvMap.put(productInvMap.size(),product);\r\n }",
"public void saveNewProduct(Product product) throws BackendException;",
"public void addProduct(Product product) {\n entityManager.persist(product);\n }",
"public void addProduct(Product p) {\n\t\tthis.productList.add(p);\n\t}",
"@PostMapping(\"/add\")\r\n\tpublic ProductDetails addProduct(@Valid @RequestBody AddProduct request) {\r\n\r\n\t\tProduct product = productUtil.getProduct();\r\n\t\tproduct.setProduct_Id(productUtil.generateId());\r\n\t\tproduct.setProduct_Name(request.getProduct_Name());\r\n\t\tproduct.setProduct_Price(request.getProduct_Price());\r\n\t\tproduct.setProduct_Quantity(request.getProduct_Quantity());\r\n\t\tproduct.setProduct_Availability(request.isProduct_Availability());\r\n\t\tproduct = productService.addProduct(product);\r\n\t\treturn productUtil.toProductDetails(product);\r\n\r\n\t}",
"@Override\r\n\tpublic boolean addProduct(Product product) {\n\t\treturn dao.addProduct(product);\r\n\t}",
"@Override\n\tpublic void addProduct(Product product) throws ProductNotFoundException {\n\t\tif (productRepository.findByName(product.getName()) == null){\n\t\t\tproductRepository.addProduct(product);\n\t\t}\n\n\t}",
"@Override\n\tpublic void addProduct(ProductEntity product)\n\t{\n\t\tsave(product);\n\t\tlogger.debug(\"The user added is \" + product.getProductUuid());\n\t}",
"public void insert(Product product) {\n this.products.add(product);\n }",
"public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }",
"@ModelAttribute(\"product\")\n public Product productToAdd() {\n return new Product();\n }",
"public void addProduct(Product p){\n stock.add(p);\n }",
"@Override\n\tpublic boolean addProduct(Product p) {\n\t\treturn false;\n\t}",
"@RequestMapping(value = {\"/add_product\"}, method = RequestMethod.POST)\n public String createProduct(Model model, HttpServletRequest request) {\n boolean isSuccess = addProductByRest(request);\n if (isSuccess) {\n ProductController controller = new ProductController();\n List<Product> productList = controller.getProductList(request, \"products\");\n model.addAttribute(\"products\", productList);\n return \"product_list\";\n } else {\n return \"product_detail_new\";\n }\n }",
"public Products addProduct(Products product) {\n\t\treturn productsRepo.save(product);\n\t}",
"public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }",
"x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product addNewProduct();",
"public void addProduct(Product item){\n inventory.add(item);\n }",
"public boolean addProduct(Product product) {\n\t\treturn false;\n\t}",
"public void addProduct(Product product)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n\n values.put(ShoppingListTable.KEY_TPNB, product.getTPNB());\n values.put(ShoppingListTable.KEY_NAME, product.getName());\n values.put(ShoppingListTable.KEY_DESCRIPTION, product.getDescription());\n values.put(ShoppingListTable.KEY_COST, product.getCost());\n values.put(ShoppingListTable.KEY_QUANTITY, product.getQuantity());\n values.put(ShoppingListTable.KEY_SUPER_DEPARTMENT, product.getSuperDepartment());\n values.put(ShoppingListTable.KEY_DEPARTMENT, product.getDepartment());\n values.put(ShoppingListTable.KEY_IMAGE_URL, product.getImageURL());\n values.put(ShoppingListTable.KEY_CHECKED, product.isChecked());\n values.put(ShoppingListTable.KEY_AMOUNT, product.getAmount());\n values.put(ShoppingListTable.KEY_POSITION, product.getAmount());\n\n db.insert(ShoppingListTable.TABLE_NAME, null, values);\n\n db.close();\n }",
"@RequestMapping(\n method = RequestMethod.POST,\n consumes = MediaType.APPLICATION_JSON_VALUE,\n path = \"{productId}\"\n )\n public void addProductToShoppingCart(@PathVariable(\"productId\") UUID productId){\n shoppingCartService.insertProduct(productId);\n }",
"@Override\r\n\tpublic ProductMaster addNewProduct(ProductMaster product) {\n\t\treturn this.repository.save(product);\r\n\t}",
"public static Result newProduct() {\n Form<models.Product> productForm = form(models.Product.class).bindFromRequest();\n if(productForm.hasErrors()) {\n return badRequest(\"Tag name cannot be 'tag'.\");\n }\n models.Product product = productForm.get();\n product.save();\n return ok(product.toString());\n }",
"@GetMapping(Mappings.ADD_PRODUCT)\n public ModelAndView add_product(){\n Product product = new Product();\n ModelAndView mv = new ModelAndView(ViewNames.ADD_PRODUCT);\n mv.addObject(\"product\", product);\n return mv;\n }",
"@PostMapping(\"/addproduct\")\n\t\tpublic ResponseEntity<List<Product>> insertProduct(@RequestBody Product product) {\n\t\t\tlogger.info(\"product inserted\");\n\t\t\tList<Product> sq = productService.saveProduct(product);\n\n\t\t\treturn new ResponseEntity<List<Product>>(sq, HttpStatus.OK);\n\t\t}",
"public void addProduct(Product product) {\n\t\tSystem.out.println(\"Before inserting product \" + product.getProductID());\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(product);// permanently store the product object in database,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// session.sav\n\t\tSystem.out.println(\"After inserting product \" + product.getProductID());\n\n\t}",
"public void addProduct(Product p) {\n\t\t\n\t\tString manufacturer = p.getManufacturer().toLowerCase();\n\t\t\n\t\tSet<Product> productsForThisManufacturer = productsByManufacturer.get(manufacturer);\n\t\t\n\t\tif (productsForThisManufacturer == null) {\n\t\t\tproductsForThisManufacturer = new HashSet<Product>();\n\t\t\tproductsByManufacturer.put(manufacturer, productsForThisManufacturer);\n\t\t}\n\t\t\n\t\tproductsForThisManufacturer.add(p);\n\n\t}",
"@Override\r\n\tpublic int add(Product product) throws Exception {\n\t\treturn this.dao.add(product);\r\n\t}",
"public void add(Product p) {\r\n\t\tparts.add(p);\r\n\t}",
"@Override\n\tpublic void add(Entity entity) throws Exception {\n\t\tsuper.add(entity);\n\t\tProduct prod = (Product) entity;\n\n\t\tSQLiteStatement st = db\n\t\t\t\t.prepare(\"INSERT INTO products(sessionID, name, priceMin, priceMax, quantity, category)\"\n\t\t\t\t\t\t+\"VALUES (?, ?, ?, ?, ?, ?)\");\n\t\tst.bind(1, sessionId).bind(2, prod.getName()).bind(3, prod.getPriceMin())\n\t\t\t\t.bind(4, prod.getPriceMin()).bind(5, prod.getQuantity())\n\t\t\t\t.bind(6, prod.getCategory());\n\t\tst.step();\n\t\ttotalQuantity += prod.quantity;\n\t\tif (!categoryList.containsKey(prod.getCategory())) {\n\t\t\tcategoryList.put(prod.getCategory(), new ArrayList<Product>());\n\t\t}\n\t\tcategoryList.get(prod.getCategory()).add(prod);\n\t\tif (availableProducts.get(entity.getName())==null) {\n\t\t\tavailableProducts.put(entity.getName(), \" \");\n\t\t}\n\t}",
"public void addProduct(Product item)\n {\n stock.add(item);\n }",
"public void agregar(Producto producto) throws BusinessErrorHelper;",
"public com.mozu.api.contracts.productadmin.Product addProduct(com.mozu.api.contracts.productadmin.Product product) throws Exception\r\n\t{\r\n\t\treturn addProduct( product, null);\r\n\t}",
"public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }",
"@ResponseStatus(HttpStatus.CREATED)\r\n @PostMapping(\"/products\")\r\n public Product addProduct(@RequestBody ProductDTO productDto) {\r\n return productService.addNewProduct(productDto);\r\n }",
"@Override\n\tpublic boolean addProduct(Products productInfoBean) {\n\t\treturn dao.addProduct(productInfoBean);\n\t}",
"public static ArrayList<Product> addNewProduct() {\r\n\r\n\t\tSupplier selectedSup = Part02Tester.getSupplier();\r\n\r\n\t\tArrayList<Product> newProductArray = addProduct();\r\n\r\n\t\tProduct newProduct = newProductArray.get(0);\r\n\r\n\t\tArrayList<Product> prodList = selectedSup.getSupProducts();\r\n\r\n\t\tprodList.add(newProduct);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//The product is then added to the array list for the specified supplier\r\n\t\treturn newProductArray;\r\n\r\n\t}",
"@Override\n\tpublic void addProduct(Product product) throws DataBaseAccessException {\n\t\tLOGGER.debug(\"Inserting a single row into a database table\");\n\t\tLOGGER.info(\"values of product \" + product.getProductId());\n\t\tObject[] insert = new Object[] { product.getProductId(), product.getProductName(),\n\t\t\t\tproduct.getProductCategory() };\n\t\ttry {\n\t\t\tjdbcTemplate.update(INSERT_PRODUCT, insert);\n\t\t} catch (DataAccessException e) {\n\t\t\tthrow new DataBaseAccessException(\"unable to do the transaction \" + e);\n\t\t}\n\t}",
"public boolean addProduct(Product product) \r\n\t{\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\tboolean feedback=pDoa.addProductDoa(product);\r\n\t\t\tif(feedback) {\r\n\t\t\t\t\r\n\t\t\t\t\t\t\treturn true;\t\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn false;\r\n\t\t\r\n\t}",
"public void handleAddProducts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/product.fxml\"));\n Parent root = null;\n try {\n root = (Parent) fxmlLoader.load();\n\n // Get controller and configure controller settings\n ProductController productController = fxmlLoader.getController();\n productController.setModifyProducts(false);\n productController.setInventory(inventory);\n productController.setHomeController(this);\n productController.updateParts();\n\n // Spin up product form\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.DECORATED);\n stage.setTitle(\"Add Products\");\n stage.setScene(new Scene(root));\n stage.show();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"Product storeProduct(Product product);",
"@Override\r\n\tpublic ResponseData addProduct(ProductModel productModel) {\n\t\tProduct product = (Product) productConverter.convert(productModel);\r\n\t\tlong i = productRepositoryImpl.addProduct(product).getId();\r\n\t\tif (i > 0) {\r\n\t\t\treturn new ResponseData(product.getId(), true, \"Save Data Success full\");\r\n\t\t} else {\r\n\t\t\treturn new ResponseData(0, false, \"Failed\");\r\n\t\t}\r\n\r\n\t}",
"public boolean add(Product product) {\n\t\treturn dao.add(product);\n\t}",
"@Override\r\n\tpublic boolean addProduct(ProductDAO product) {\n\t\treturn false;\r\n\t}",
"public String addProduct() throws Exception {\r\n\t\t\r\n\t\t//content spot entity\r\n\t\tSpotBean spotBean = new SpotBean();\r\n\t\tspotBean.setId(this.getContentSpot().getId());\r\n\t\tspotBean = contentSpotService.load(spotBean);\r\n\t\t\r\n\t\t//main content spot\r\n\t\tContentSpot content = spotBean.getContentSpot();\r\n\t\tthis.products = content.getProducts();\r\n\r\n\t\t//configure products list attribute\r\n\t\tcontent.setProducts(extractProducts());\r\n\t\t\r\n\t\treturn update(spotBean);\r\n\t}",
"public boolean addProduct(Product p) {\n// products.add(p);\n boolean prodExists = false;\n for(Product prod: products){\n if(prod.getId() == p.getId()){\n prodExists = true;\n break;\n }\n }\n if(!prodExists){\n products.add(p);\n return true;\n }\n return false;\n }",
"@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}",
"public boolean addProduct(Product p) {\n\t\t\n\t\treturn products.add(p);\n\t}",
"public void createProduct(ProductData newProduct) {\n throw new UnsupportedOperationException();\n }",
"public void onAddButtonClick(View view) {\n\n if (view.getId() == R.id.Badd) {\n\n EditText a = (EditText) findViewById(R.id.TFenterName);\n\n String b = a.getText().toString();\n product.setProductName(b);\n\n a = (EditText) findViewById(R.id.TFenterPrice);\n b = a.getText().toString();\n product.setPrice(b);\n\n a = (EditText) findViewById(R.id.TFenterQuantity);\n b = a.getText().toString();\n product.setQuantity(b);\n\n a = (EditText) findViewById(R.id.TFLocation);\n b = a.getText().toString();\n product.setLocation(b);\n\n a = (EditText) findViewById(R.id.TFExpiration);\n b = a.getText().toString();\n product.setExpiration(b);\n\n helper.insertProduct(product);\n\n Intent i = new Intent(AddProduct.this, WasAdded.class);\n i.putExtra(\"product\", product.getProductName());\n startActivity(i);\n\n }\n }",
"@RequestMapping(method = RequestMethod.POST)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String addProduct(@Valid @ModelAttribute Product product, BindingResult errors) {\n\t\tif(errors.hasErrors()) {\t\t\t\n\t\t\treturn \"products/newProduct\";\n\t\t}\n\t\t\n\t\t//Set Producty Identity\n\t\tString productIdentity = product.getProductName().replaceAll(\" \", \"_\");\n\t\tproduct.setProductIdentity(productIdentity);\n\t\t\n\t\t//Set CUSTOM to true\n\t\tproduct.setCustom(true);\n\t\t\n\t\tproductDao.addEntity(product);\n\t\tlogger.info(\"Product [\"+product.getProductName()+\"] created!\");\n\t return \"redirect:/products\";\n\t}",
"public AdmAddProduct() {\n initComponents();\n }",
"public boolean add(Product product) {\n return cartRepository.add(product);\n }",
"public synchronized void addItem(Product product){\n \n ShoppingCartItem item = carrito.get(product.getId());\n int new_quantity;\n \n if(item==null){\n carrito.set(product.getId(), new ShoppingCartItem(product));\n new_quantity = 1;\n }else{\n new_quantity = item.getQuantity()+1;\n }\n //even if it's added or not, we call update method to update the quantity of the product\n this.update(product,Integer.toString(new_quantity));\n }",
"private static void createProducts() {\n productRepository.addProduct(Product.builder()\n .name(\"Milk\")\n .barcode(new Barcode(\"5900017304007\"))\n .price(new BigDecimal(2.90))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Butter\")\n .barcode(new Barcode(\"5906217041483\"))\n .price(new BigDecimal(4.29))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Beer\")\n .barcode(new Barcode(\"5905927001114\"))\n .price(new BigDecimal(2.99))\n .build()\n );\n }",
"public void addItem(Product p) {\n\t\t_items.add(p);\n\t}",
"private void writeNewProduct(Product product) {\n database.child(\"user-groceries\").child(LoginRepository.activeUserId()).child(product.name).setValue(product);\n }",
"public void addProduct(){\n\t\tSystem.out.println(\"Company:\");\n\t\tSystem.out.println(theHolding.fabricationCompanies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Code:\");\n\t\t\tString code = reader.nextLine();\n\t\t\tSystem.out.println(\"Water quantity require:\");\n\t\t\tdouble waterQuantity = reader.nextDouble();\n\t\t\treader.nextLine();\n\t\t\tSystem.out.println(\"Inventory:\");\n\t\t\tint inventory = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tProduct toAdd = new Product(name, code, waterQuantity, inventory);\n\t\t\ttheHolding.addProduct(selected, toAdd);\n\t\t\tSystem.out.println(\"The product were added successfuly\");\n\t\t}\n\t}",
"@Override\r\n\tpublic int insertProduct(Product product) {\n\t\treturn dao.insertProduct(product);\r\n\t}",
"public Product createProduct() {\n\t\tProduct prod = new Product();\n\t\tprod.setProdId(this.getProdId());\n\t\tprod.setProductName(this.getProductName());\n\t\tprod.setPrice(this.getPrice());\n\t\tprod.setStock(this.getStock());\n\t\tprod.setDescription(this.getDescription());\n\t\tprod.setImage(this.getImage());\n\t\tprod.setSellerId(this.getSellerId());\n\t\tprod.setCategory(this.getCategory());\n\t\tprod.setSubcategory(this.getSubcategory());\n\t\tprod.setProductrating(this.getProductrating());\n\t\treturn prod;\n\t}",
"@FXML void but_AddProduct(ActionEvent event) {\n\n productLine.add(new Widget(txtProductName.getText(), txtManufacturer.getText(),\n choiceType.getValue())); //Adding test product in observable list\n\n productTable.setItems(productLine); //Adds product to table\n listProduce.setItems(productLine); //Adds product to produce list\n\n addToDatabaseProduct();\n\n System.out.println(\"Product added\");\n }",
"void add(ProductCategory category);",
"public Product addProduct(final Product newProduct) {\n\t\tfor(final Sku newSku : newProduct.getChildSkus()) {\n\t\t\tnewSku.setParentProduct(newProduct);\n\t\t}\n\t\treturn productRepository.save(newProduct);\n\t}",
"@Override\n\t@Transactional\n\tpublic String addProduct(Inventory product) {\n\t\treturn null;\n\t}",
"@Step(\"Add product to cart and proceed to checkout\")\n public HomeSteps addProductToCart(String productName) {\n homePage\n .openPage()\n .clickAddToCartButton(productName)\n .clickProceedToCheckoutButton();\n return this;\n }",
"public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }",
"public void addNewProduct(String name, String metaTag, String model, double price, String category) {\r\n\t\t\r\n\t\t//clicking on add button\r\n\t\tthis.addNewBtn.click();\r\n\t\t\r\n\t\t//entering the name of product in the category name field\r\n\t\tthis.productName.sendKeys(name);\r\n\t\t\r\n\t\t//entering meta tag title for the product\r\n\t\tthis.metaTag.sendKeys(metaTag);\r\n\t\t\r\n\t\t//going to model tab\r\n\t\tthis.dataTabBtn.click();\r\n\t\t\r\n\t\t//entering model no\r\n\t\tthis.modelField.sendKeys(model);\r\n\t\t\r\n\t\t//entering price\r\n\t\tthis.priceField.sendKeys(String.valueOf(price));\r\n\t\t\r\n\t\t//going to links tab\r\n\t\tthis.linksTabBtn.click();\r\n\t\t\r\n\t\t//entering categories\r\n\t\tthis.categoriesField.sendKeys(category);\r\n\t\t\r\n\t\t//clicking on save button\r\n\t\tthis.saveBtn.click();\t\t\r\n\t}",
"public void addProduct(Product p) {\n if(products.size() != 0 && products.get(0).getPricingDetails().equals(p.getPricingDetails()))\n return;\n\n products.add(p);\n quantity++;\n price = price.add(p.getPricingDetails());\n }",
"public void addToDatabaseProduct() {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n final String sqlProductName = txtProductName.getText();\n String sqlManufName = txtManufacturer.getText();\n ItemType sqlItemType = choiceType.getValue();\n\n stmt = conn.prepareStatement(\"INSERT INTO Product(type, manufacturer, name) VALUES (?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setString(1, sqlItemType.toString());\n stmt.setString(2, sqlManufName);\n stmt.setString(3, sqlProductName);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public static ArrayList<Product> addProduct() {\r\n\r\n\t\tboolean proDiscontinued = false;\r\n\t\tboolean proInStock = false;\r\n\t\tint proQtyAvailable = 0;\r\n\r\n\t\tArrayList<Product> newProductArray = new ArrayList<Product>();\r\n\r\n\t\tSystem.out.println(\"---Product details---\");\r\n\r\n\t\tRandom proCodeRandom = new Random();\t\t\t\t\t\t\t\r\n\t\tint proCode = proCodeRandom.nextInt(100);\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the make of the product:\");\t\t\r\n\r\n\t\tString proMake = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the model of the product:\");\r\n\r\n\t\tString proModel = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the price of the product:\");\r\n\t\tdouble proPrice = Validation.doubleValidation();\r\n\r\n\t\tSystem.out.println(\"Is the product discontinued? y/n \");\r\n\r\n\t\tString answer = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tif(answer.equals(\"y\") || answer.equals(\"Y\")) {\r\n\t\t\tproDiscontinued = true;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}else if(answer.equals(\"n\") || answer.equals(\"N\")) {\r\n\t\t\tproDiscontinued = false;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t\tProduct newProduct = new Product(proCode, proMake, proModel, proPrice, proInStock);\r\n\t\tnewProduct.setProQtyAvailable(proQtyAvailable);\r\n\t\tnewProduct.setProDiscontinued(proDiscontinued);\r\n\r\n\t\tnewProductArray.add(newProduct);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//The product is then added to the array list for the specified supplier\r\n\r\n\t\tSystem.out.println();\r\n\r\n\t\treturn newProductArray;\r\n\t}",
"public synchronized void add(Product product) {\n\t\tProduct[] playerProducts = playerMap.getOrDefault(product.getOwner(), new Product[8]);\n\t\tplayerProducts[product.getSlot()] = product;\n\t\tplayerMap.put(product.getOwner(), playerProducts);\n\n\t\tSet<Product> productSet = getProductSet(product);\n\t\tproductSet.add(product);\n\t\ttypeMap.get(product.getType()).get(product.getState()).put(product.getItemId(), productSet);\n\t}",
"public String addToInventory(Product productDetails){\n productDetails.setProductForSale(\"Y\");\n productDetails = mongoDbConnector.addToInventory(productDetails);\n return productDetails.getProductName();\n }",
"public void saveProduct(Product product);",
"public static void addProducts(Product product) throws SQLException\n\t{\n\t\tpreparedStatement = connection.prepareStatement(addQuery);\n//\t\tpreparedStatement.setInt(1, product.getProductId());\n\t\tpreparedStatement.setString(1, product.getProductName());\n\t\tpreparedStatement.setInt(2, product.getCategoryId());\n\t\tpreparedStatement.setInt(3, product.getProductTypeId());\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t}",
"public void addProduct(Product product) {\n orderProducts.add(product);\n product.setOrderProduct(this);\n }",
"public void setProduct(String product) {\r\n this.product = product;\r\n }",
"@RequestMapping(value = { \"/newproduct\" }, method = RequestMethod.GET)\r\n\tpublic String newProduct(ModelMap model) {\r\n\t\tProduct product = new Product();\r\n\t\tmodel.addAttribute(\"product\", product);\r\n\t\tmodel.addAttribute(\"productTypes\", productTypeService.findAllProductTypes());\r\n\t\tmodel.addAttribute(\"brands\", brandService.findAllBrands());\r\n\t\tmodel.addAttribute(\"edit\", false);\r\n\t\treturn \"newproduct\";\r\n\t}",
"public void setProduct(Product product) {\n this.product = product;\n }",
"@PostMapping(path =\"/products\")\n public ResponseEntity<Product> createProduct(@RequestBody Product product) throws URISyntaxException {\n log.debug(\"REST request to create Product : {}\", product);\n Product result = productService.save(product);\n return ResponseEntity.created(new URI(\"/api/products/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }"
] | [
"0.82038957",
"0.81969434",
"0.8129011",
"0.8040004",
"0.80381143",
"0.79029083",
"0.78150785",
"0.7722611",
"0.7707728",
"0.7681521",
"0.76785713",
"0.76287323",
"0.75823915",
"0.7581681",
"0.7533167",
"0.7532319",
"0.7508261",
"0.743583",
"0.74319965",
"0.7406443",
"0.73862785",
"0.73762524",
"0.7374887",
"0.7358841",
"0.734317",
"0.72997576",
"0.7290837",
"0.72678113",
"0.7249603",
"0.72314936",
"0.72255296",
"0.7186881",
"0.71847796",
"0.71601915",
"0.7159571",
"0.7138316",
"0.7129931",
"0.71209294",
"0.7109315",
"0.710765",
"0.71028244",
"0.7096113",
"0.7083269",
"0.70511276",
"0.70280147",
"0.70092",
"0.7001911",
"0.6997998",
"0.69752467",
"0.69524574",
"0.69367635",
"0.69344705",
"0.69245476",
"0.6922896",
"0.6895249",
"0.6889219",
"0.68882585",
"0.6881469",
"0.68733615",
"0.68602324",
"0.6854684",
"0.68504226",
"0.68444705",
"0.6841376",
"0.68292767",
"0.6822354",
"0.68199366",
"0.6816215",
"0.6811813",
"0.67890286",
"0.67651296",
"0.669923",
"0.66931504",
"0.6690765",
"0.66728616",
"0.6670513",
"0.66621166",
"0.665905",
"0.6657417",
"0.6656731",
"0.66547006",
"0.6642448",
"0.6629999",
"0.6629427",
"0.66292906",
"0.662643",
"0.6618962",
"0.6609568",
"0.6605193",
"0.6593829",
"0.65841967",
"0.65790313",
"0.6576303",
"0.6572774",
"0.655945",
"0.6555542",
"0.65547013",
"0.6550826",
"0.6540193",
"0.6539178",
"0.65361065"
] | 0.0 | -1 |
Computes the available quantity of prodID in a specific distribution center. | public int prodInquiry(int prodID, String center) {
fm.readProducts();
Product pro = fm.getProduct(prodID);
if (pro != null)
return pro.quantityIn(center);
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateQuantity(Product p, String distCenter, int quantity){\r\n\t\tp.distCenters.put(distCenter, p.distCenters.get(distCenter) + quantity);\r\n\t\tp.quantity += quantity;\r\n\t}",
"public static final int quantityAvailable(String productKey) {\n\t\tInteger tValue = sConsumableProducts.get(productKey);\n\t\tif (tValue == null) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn tValue.intValue();\n\t\t}\n\t}",
"int getSellQuantity();",
"public void setProd(BigInteger prod)\n {\n this.prod = prod;\n }",
"private void somarQuantidade(Integer id_produto){\n\t for (ItensCompra it : itensCompra){\n\t\t //verifico se o item do meu arraylist é igual ao ID passado no Mapping\n\t\t if(it.getTable_Produtos().getId_produto().equals(id_produto)){\n\t //defino a quantidade atual(pego a quantidade atual e somo um)\n\t it.setQuantidade(it.getQuantidade() + 1);\n\t //a apartir daqui, faço o cálculo. Valor Total(ATUAL) + ((NOVA) quantidade * valor unitário do produto(ATUAL))\n\t it.setValorTotal(0.);\n\t it.setValorTotal(it.getValorTotal() + (it.getQuantidade() * it.getValorUnitario()));\n }\n}\n\t}",
"BigDecimal getDisplayQuantity();",
"long getQuantity();",
"long getQuantity();",
"public int getStock(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.stock;\n}\n}\nreturn -1;\n}",
"@Test\n public void testLookupPoolsProvidingProduct() {\n Product parentProduct = TestUtil.createProduct(\"1\", \"product-1\");\n Product childProduct = TestUtil.createProduct(\"2\", \"product-2\");\n productCurator.create(childProduct);\n productCurator.create(parentProduct);\n \n Set<String> productIds = new HashSet<String>();\n productIds.add(childProduct.getId());\n \n Pool pool = TestUtil.createPool(owner, parentProduct.getId(),\n productIds, 5);\n poolCurator.create(pool);\n \n \n List<Pool> results = poolCurator.listAvailableEntitlementPools(null, owner, \n childProduct.getId(), false);\n assertEquals(1, results.size());\n assertEquals(pool.getId(), results.get(0).getId());\n }",
"long getQuantite();",
"BigDecimal getCacheSpaceAvailable();",
"QuantityExtentType getQuantityExtent();",
"public BigDecimal getProductQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ProductQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"int getBuyQuantity();",
"BigDecimal getQuantity();",
"private int calculateInputStock_Items() {\n\t\tint total = 0;\n\t\tArrayList<Integer> stock = getAllStockValues();\n\t\tif (!stock.isEmpty()) {\n\t\t\t// get for all K\n\t\t\ttotal += (stock.get(0) * getSetUpMachine().getVending_item().get(\"K\"));\n\t\t\t// get for all S\n\t\t\ttotal += (stock.get(1) * getSetUpMachine().getVending_item().get(\"S\"));\n\t\t\t// get for all F\n\t\t\ttotal += (stock.get(2) * getSetUpMachine().getVending_item().get(\"F\"));\n\t\t\t// get for all N\n\t\t\ttotal += (stock.get(3) * getSetUpMachine().getVending_item().get(\"N\"));\n\t\t}\n\t\treturn total;\n\t}",
"private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desiredQuantity;\n }",
"private void checkProductAvailability()\n\t{\n\n\t\tprodMsg = \"\";\n\t\tcartIsEmpty = false;\n\n\t\tMap <String,Product> products = getProducts();\n\n\t\tint qtyRequested, qtyAvailable;\n\n\t\t// Check for unavailable products\n\t\tfor ( Product p : shoppingCart.getProducts().keySet() )\n\t\t{\n\t\t\tfor ( String s : products.keySet() )\n\t\t\t{\n\t\t\t\tif ( products.get(s).getName().equals(p.getName()) )\n\t\t\t\t{\n\t\t\t\t\t// Modify product to write to file\n\t\t\t\t\tqtyRequested = shoppingCart.getProducts().get(p);\n\t\t\t\t\tqtyAvailable = products.get(s).getQtyAvailable();\n\n\t\t\t\t\tif ( qtyAvailable < qtyRequested )\n\t\t\t\t\t\tunavailableProds.put(p, new ArrayList <>(Arrays.asList(qtyRequested, qtyAvailable)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Show warning\n\t\tif ( !unavailableProds.isEmpty() )\n\t\t{\n\t\t\tprodMsg = \"The cart products were not available anymore in the requested quantity, only the available quantity has been bought:\\n\\n\";\n\n\t\t\tfor ( Product p : unavailableProds.keySet() )\n\t\t\t{\n\t\t\t\tprodMsg += p.getName() + \": requested: \" + unavailableProds.get(p).get(0) + \", available: \"\n\t\t\t\t\t\t+ unavailableProds.get(p).get(1) + \"\\n\";\n\n\t\t\t\tif ( unavailableProds.get(p).get(1) == 0 )\n\t\t\t\t\tshoppingCart.removeProduct(p);\n\t\t\t\telse\n\t\t\t\t\tshoppingCart.getProducts().replace(p, unavailableProds.get(p).get(1));\n\t\t\t}\n\n\t\t\tif ( shoppingCart.getProducts().size() == 0 )\n\t\t\t{\n\t\t\t\tcartIsEmpty = true;\n\t\t\t\tprodMsg = \"All of your products were not available anymore for purchase: payment cancelled.\\nPlease select some new products.\";\n\t\t\t}\n\t\t}\n\t}",
"int getQuantity();",
"int getQuantite();",
"int getQuantite();",
"public static BigDecimal getQtyReserved(Properties ctx, int M_Warehouse_ID, int M_Product_ID, Timestamp To, String trxName) {\n\t\tfinal String sql = \"SELECT SUM(Qty) FROM PP_MRP WHERE \" + \" TypeMRP=?\" + \" AND DocStatus IN ('IP','CO')\"\n\t\t// +\" AND OrderType IN ('SOO','MOP','DOO')\"\n\t\t\t\t+ \" AND AD_Client_ID=? AND M_Warehouse_ID =? AND M_Product_ID=?\" + \" AND DatePromised <=?\";\n\t\tBigDecimal qty = MUDB.getSQLValueBD(trxName, sql, new Object[] { MPPMRP.TYPEMRP_Demand, Env.getAD_Client_ID(ctx), M_Warehouse_ID, M_Product_ID, To, });\n\t\t// SQL may return no rows or null\n\t\tif (qty == null)\n\t\t\treturn Env.ZERO;\n\n\t\treturn qty;\n\t}",
"public java.math.BigDecimal getQty() throws java.rmi.RemoteException;",
"public int getByproductScaled(int scale)\n {\n return this.byproduct.getFluidAmount() * scale / TOTAL_BYPRODUCT_SPACE;\n }",
"public boolean updateQuantity(int prodID, String distCentre, int quantity, int sessionID) {\r\n\t\tboolean cID = false;\r\n\t\tfor (int i=0;i<sessions.size();i++) {\r\n\t\t\tSession s = sessions.get(i);\r\n\t\t\tif (s.getID() == sessionID && s.getUser() instanceof Administrator) {\r\n\t\t\t\tAdministrator ad = (Administrator)(s.getUser());\r\n\t\t\t\tcID = ad.updateQuantity(prodID, distCentre, quantity);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cID;\r\n\t}",
"private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}",
"private String validateQuantityAmountNumPromotionShop(List<PromotionShopMap> lstCurrentPromotionShopMap, List<PromotionShopMap> lstNewPromotionShopMap) {\n\t\tint size = lstCurrentPromotionShopMap.size();\n\t\tint allocateQuantity = 0;\n\t\tint allocateAmount = 0;\n\t\tint allocateNum = 0;\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tPromotionShopMap psm = lstCurrentPromotionShopMap.get(i);\n\t\t\tif (psm.getQuantityMax() != null) {\n\t\t\t\tallocateQuantity++;\n\t\t\t}\n\t\t\tif (psm.getAmountMax() != null) {\n\t\t\t\tallocateAmount++;\n\t\t\t}\n\t\t\tif (psm.getNumMax() != null) {\n\t\t\t\tallocateNum++;\n\t\t\t}\n\t\t}\n\t\tfor (int j = 0, n = lstNewPromotionShopMap.size(); j < n; j++) {\n\t\t\tPromotionShopMap promotionShopMap = lstNewPromotionShopMap.get(j);\n\t\t\tString shopName = promotionShopMap.getShop() == null ? \"\" : (promotionShopMap.getShop().getShopCode() + \" - \" + promotionShopMap.getShop().getShopName());\n\t\t\tif (promotionShopMap.getQuantityMax() != null && allocateQuantity == 0) {\n\t\t\t\treturn Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.shop.denied.allcate.quantity\", shopName);\n\t\t\t}\n\t\t\tif (promotionShopMap.getQuantityMax() == null && allocateQuantity > 0) {\n\t\t\t\treturn Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.shop.no.allcate.quantity\", shopName);\n\t\t\t}\n\t\t\tif (promotionShopMap.getAmountMax() != null && allocateAmount == 0) {\n\t\t\t\treturn Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.shop.denied.allcate.amount\", shopName);\n\t\t\t}\n\t\t\tif (promotionShopMap.getAmountMax() == null && allocateAmount > 0) {\n\t\t\t\treturn Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.shop.no.allcate.amount\", shopName);\n\t\t\t}\n\t\t\tif (promotionShopMap.getNumMax() != null && allocateNum == 0) {\n\t\t\t\treturn Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.shop.denied.allcate.num\", shopName);\n\t\t\t}\n\t\t\tif (promotionShopMap.getNumMax() == null && allocateNum > 0) {\n\t\t\t\treturn Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.shop.no.allcate.num\", shopName);\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\n\tpublic int getNoofQuantity() {\n\t String sql=\"SELECT SUM(quantity) FROM supplier_product\";\n\t int total=this.getJdbcTemplate().queryForObject(sql, Integer.class);\n\t\treturn total;\n\t}",
"public int getSpace(){\n // iterate through nodes\n int totalSpace = 0;\n Collection<SupplyNode> nodeCol = t.values();\n Iterator<SupplyNode> it = nodeCol.iterator();\n \n // multiply resource count by resource space\n while (it.hasNext()){\n SupplyNode s = it.next();\n totalSpace += (s.getCurrent()*s.getResource().getCost());\n }\n \n // return\n return totalSpace;\n }",
"public int numberInStock(int id)\n {\n Product product = findProduct(id);\n \n if(product != null)\n {\n return product.quantity;\n }\n else\n {\n return 0;\n }\n }",
"public int numberProduct() {\n\t\tint number = 0;\n\t\tfor (ItemCart item : listItemcart) {\n\t\t\tnumber += item.getQuantity();\n\t\t}\n\t\treturn number;\n\t}",
"public float getQuantityAvailableForSale () {\n return (float) 0.0;\n }",
"public static BigDecimal getQtyReserved(Properties ctx, int M_Warehouse_ID, int M_Product_ID, String trxName) {\n\t\treturn getQtyReserved(ctx, M_Warehouse_ID, M_Product_ID, new Timestamp(System.currentTimeMillis()), trxName);\n\t}",
"Map<Goods, Integer> getQuantityByDepartment(Department department) throws StoreKeeperWorkException;",
"private void demoSellProducts()\n {\n System.out.println(\"\\nSelling all the products\\n\");\n System.out.println(\"============================\");\n System.out.println();\n for(int id = 101; id <= 110; id++)\n {\n amount = generator.nextInt(20);\n manager.sellProduct(id, amount);\n }\n \n manager.printAllProducts();\n }",
"@Override\n public int requestAvailableCapacity() {\n int total = facility.getCapacity();\n for (Facility facility : facilities) {\n total += facility.getCapacity();\n }\n return total;\n }",
"public String getProductQuantity() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(quantityInputFieldShoppingCart);\n\t\treturn quantityInputFieldShoppingCart.getAttribute(\"value\");\n\t}",
"@Override\n public double evaluate(DataCenterInterface dataCenter,\n double binCpuRemain,\n double binMemRemain,\n double binActualCpuUsed,\n double binActualMemUsed,\n double itemCpuUsed,\n double itemMemUsed,\n double itemActualCpuUsed,\n double itemActualMemUsed) {\n return 0;\n }",
"public double getCost(int endId) throws IllegalArgumentException, IllegalStateException;",
"public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}",
"@Override\n\tpublic Integer getNoofQuantity(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT SUM(h.quantity) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE buy_date>=?::Date and buy_date<=?::Date\";\n\t\tInteger total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplyStartDate, supplyLastDate);\n\t\treturn total;\n\t}",
"public float getCapacity();",
"public Integer getQuantity();",
"Quantity getQuantity();",
"public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }",
"int getTotalFree();",
"void printTotalQuantity();",
"public int getQuantity();",
"public abstract Float getGeonorCapacity(int stationId) throws DataAccessException;",
"public int getQuantity(Product p){\n int count = 0;\n for (Product i : cartContents)\n {\n if (i.getProductID().equals(p.getProductID()))\n {\n count++;\n }\n }\n return count;\n }",
"static BigDecimal Find(String productId){\n\n\t\tBigDecimal price=null;\n\n\t\tLong key=Long.parseLong(productId);\n\n\t\tif(!productListOnID.containsKey(key)){\n\t\t\tprice=new BigDecimal(\"0\");\n\t\t}else{\n\n\t\t\tdxm116130Product product=productListOnID.get(key);\n\t\t\tprice=product.getProductPrice();\n\n\t\t}\n\t\t\n\t\treturn price;\n\n\n\t}",
"public BigDecimal getShrinkQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ShrinkQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"public double getTotalCartValue();",
"ProductPurchaseItem getSupplierProductPurchaseItemPerCatalogNo(long suppId, String catalogNo);",
"public void reportQuantity() {\n\t\tlogger.debug(\"*** Product quantity report ***\");\n\t\tfor(String prodName: entities.keySet()) {\n\t\t\tProduct prod = (Product)entities.get(prodName);\n\t\t\tlogger.debug(String.format(\"Product: %-3s, quantity: %-5d\", prod.getName(), prod.getQuantity()));\t\t\t\n\t\t}\n\t\tlogger.debug(\"*** *** ***\");\n\t}",
"public Double getProductQty() {\n return productQty;\n }",
"public BigDecimal getQtyEntered();",
"Map<Goods, Integer> getQuantityByGroup(GoodsGroup group) throws StoreKeeperWorkException;",
"@Override\n\tpublic int getNoofQuantity(String supplierName) {\n\t\tString sql=\"SELECT SUM(h.quantity) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE supplier_name=?\";\n\t\tint total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplierName);\n\t\treturn total;\n\t}",
"public CQ getPsl12_ProductServiceQuantity() { \r\n\t\tCQ retVal = this.getTypedField(12, 0);\r\n\t\treturn retVal;\r\n }",
"public int reproduct_sizes() {\n int prosize_id = 0;\n try (Connection con = DBUtil.getConnection();\n Statement stm = con.createStatement();\n ResultSet rs = stm.executeQuery(\"select size_id from sizes order by size_id desc limit 1;\");) {\n if (rs.next()) {\n prosize_id = rs.getInt(\"size_id\");\n } else {\n System.out.println(\"not set id!\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return prosize_id;\n }",
"public int getCapacity() {\n switch (getID()) {\n case 5509:\n return 3;\n case 5510:\n case 5511:\n return 6;\n case 5512:\n case 5513:\n return 9;\n case 5514:\n case 5515:\n default:\n return 12;\n }\n }",
"private Collection<ProductAmountTO> removeUnavailableProducts(\n\t\t\tCollection<ProductAmountTO> requiredProductAmounts,\n\t\t\tHashtable<Store, Collection<StockItem>> storeStockItems) {\n\t\t\n\t\tCollection<ProductAmountTO> foundProductAmounts = new ArrayList<ProductAmountTO>();\n\t\t\n\t\tIterator<ProductAmountTO> requiredProductAmountsIterator = requiredProductAmounts.iterator();\n\t\twhile(requiredProductAmountsIterator.hasNext()) {\n\t\t\tProductAmountTO currentProductAmountTO = requiredProductAmountsIterator.next();\n\t\t\t\n\t\t\tIterator<Collection<StockItem>> storeStockItemCollectionsIterator = storeStockItems.values().iterator();\n\t\t\twhile(storeStockItemCollectionsIterator.hasNext()) { //iterate over stock of stores\n\t\t\t\tCollection<StockItem> currentStockItemCollection = storeStockItemCollectionsIterator.next();\n\t\t\t\t\n\t\t\t\tStockItem stockItem =\n\t\t\t\t\tsearchForProductOffered(currentStockItemCollection, currentProductAmountTO);\n\t\t\t\tif (stockItem != null && currentStockItemCollection.contains(stockItem)) {\n\t\t\t\t\tfoundProductAmounts.add(currentProductAmountTO);\n\t\t\t\t} else {\n\t\t\t\t\t//TODO: remove debug:\n//\t\t\t\t\tSystem.out.println(\"KK: NOT found\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//no need to search for the same product at other stores: found --> available\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn foundProductAmounts;\n\t}",
"private static int minCoststore(int[] dimensions, int start, int end,int[][] storage) {\n\t\tif(start>=end)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif(storage[start][end]!=-1)\r\n\t\t{\r\n\t\t\treturn storage[start][end];\r\n\t\t}\r\n\t\tint mincost=Integer.MAX_VALUE;\r\n\t\tfor(int k=start;k<end;k++)\r\n\t\t{\r\n\t\t\tint cost=minCoststore(dimensions,start,k,storage)+minCoststore(dimensions,k+1,end,storage)+\r\n\t\t\t\t\tdimensions[start-1]*dimensions[k]*dimensions[end];\r\n\t\t\tif(cost<mincost)\r\n\t\t\t{\r\n\t\t\t\tmincost=cost;\r\n\t\t\t}\r\n\t\t}\r\n\t\tstorage[start][end]=mincost;\r\n\t\treturn mincost;\r\n\t}",
"@Override\n\tpublic double calcConsumedEnergy() {\n\t\treturn (getBasicEnergyCost() * 4);\n\t}",
"public int product() {\n // You'll need to replace this code with something\n // else to make product() work; this is just to make\n // things compile while you work on sum()\n return 1;\n }",
"private @Nullable String findTestVolumeProductId() {\n ComputeServices computeServices = provider.getComputeServices();\n if( computeServices == null ) {\n return null;\n }\n VolumeSupport volumeSupport = computeServices.getVolumeSupport();\n\n if( volumeSupport != null ) {\n try {\n VolumeProduct defaultProduct = null;\n\n for( VolumeProduct product : volumeSupport.listVolumeProducts() ) {\n if( defaultProduct == null ) {\n defaultProduct = product;\n }\n else {\n if( volumeSupport.getCapabilities().isVolumeSizeDeterminedByProduct() ) {\n if( product.getMinVolumeSize().intValue() < defaultProduct.getMinVolumeSize().intValue() && product.getMinVolumeSize().intValue() >= 20 ) {\n defaultProduct = product;\n }\n }\n else {\n if( product.getMonthlyGigabyteCost() > 0.00 ) {\n if( product.getMonthlyGigabyteCost() < defaultProduct.getMonthlyGigabyteCost() ) {\n defaultProduct = product;\n }\n }\n }\n }\n }\n if( defaultProduct != null ) {\n return defaultProduct.getProviderProductId();\n }\n } catch( Throwable ignore ) {\n // ignore me\n }\n }\n return null;\n }",
"int getNumberOfAvailableCopies(int materialId);",
"public BigDecimal getLiterAllocation();",
"@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}",
"public int getProductCount();",
"@Override\r\n public double searchProduct(ProductInput productInput) {\r\n\r\n LocalDate Date1= productInput.getAvailDate();\r\n LocalDate Date2= Date1.plusDays(10);\r\n\r\n double quantity= 0;\r\n if(Date1.isAfter(LocalDate.of(2021,03,18)) && Date1.isBefore(LocalDate.of(2021,03,31)))\r\n {\r\n for(Product i:InventoryList)\r\n {\r\n LocalDate Date3= i.getAvailDate();\r\n if(Date3.isAfter(Date1.minusDays(1)) && Date3.isBefore(Date2.plusDays(1)))\r\n {\r\n quantity= quantity + i.getAvailQty();\r\n }\r\n }\r\n return quantity;\r\n }\r\n else\r\n return quantity;\r\n }",
"@Test\n\tpublic void testMultipleSkuAllocation() {\n\t\tfinal int skuQty = 2;\n\t\tfinal int stockReductionQty = 1;\n\n\t\tinventoryDto.setQuantityOnHand(skuQty * 2);\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + skuQty * 2, skuQty * 2, inventoryDto.getAvailableQuantityInStock());\n\n\t\torderSku1.setQuantity(skuQty);\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + (skuQty * 2 - skuQty), skuQty * 2 - skuQty, inventoryDto.getAvailableQuantityInStock());\n\t\torderSku2.setQuantity(skuQty);\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + 0, 0, inventoryDto.getAvailableQuantityInStock());\n\n\t\t//stock reduction, but it doesn't affect allocation\n\t\tinventoryDto.setQuantityOnHand(inventoryDto.getQuantityOnHand() - stockReductionQty);\n\n\t\tassertEquals(\"Quantity on Hand should be \" + (skuQty * 2 - stockReductionQty),\n\t\t\t\tskuQty * 2 - stockReductionQty, inventoryDto.getQuantityOnHand());\n\n\t\tinventoryDto.getAvailableQuantityInStock();\n\n\t\tassertTrue(\"There should be enough allocation for this sku\", productInventoryManagementService1.isSelfAllocationSufficient(orderSku1, 0));\n\n\t\tinventoryDto.setAllocatedQuantity(inventoryDto.getAllocatedQuantity() - skuQty);\n\t\tinventoryDto.setQuantityOnHand(inventoryDto.getQuantityOnHand() - skuQty);\n\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + (inventoryDto.getQuantityOnHand() - inventoryDto.getAllocatedQuantity()),\n\t\t\t\tinventoryDto.getQuantityOnHand() - inventoryDto.getAllocatedQuantity(), inventoryDto.getAvailableQuantityInStock());\n\t\tassertFalse(\"There should NOT be enough allocation for this sku\",\n\t\t\t\tproductInventoryManagementService1.isSelfAllocationSufficient(orderSku2, 0));\n\t}",
"int getProductKey();",
"public int getQuantidade() {\r\n\r\n return produtos.size();\r\n }",
"public Number getSizeQty() {\n return (Number)getAttributeInternal(SIZEQTY);\n }",
"Map<Goods, Integer> getQuantityByBrand(Brand brand) throws StoreKeeperWorkException;",
"public BigDecimal getBase (String CostDistribution)\n\t{\n\t\tif (X_C_LandedCost.LANDEDCOSTDISTRIBUTION_Costs.equals(CostDistribution))\n\t\t{\n\t\t\t//\tTODO Costs!\n\t\t\tlog.severe(\"Not Implemented yet - Cost\");\n\t\t\treturn Env.ZERO;\n\t\t}\n\t\telse if (X_C_LandedCost.LANDEDCOSTDISTRIBUTION_Line.equals(CostDistribution))\n\t\t\treturn Env.ONE;\n\t\telse if (X_C_LandedCost.LANDEDCOSTDISTRIBUTION_Quantity.equals(CostDistribution))\n\t\t\treturn getMovementQty();\n\t\telse if (X_C_LandedCost.LANDEDCOSTDISTRIBUTION_Volume.equals(CostDistribution))\n\t\t{\n\t\t\tMProduct product = getProduct();\n\t\t\tif (product == null)\n\t\t\t{\n\t\t\t\tlog.severe(\"No Product\");\n\t\t\t\treturn Env.ZERO;\n\t\t\t}\n\t\t\treturn getMovementQty().multiply(product.getVolume());\n\t\t}\n\t\telse if (X_C_LandedCost.LANDEDCOSTDISTRIBUTION_Weight.equals(CostDistribution))\n\t\t{\n\t\t\tMProduct product = getProduct();\n\t\t\tif (product == null)\n\t\t\t{\n\t\t\t\tlog.severe(\"No Product\");\n\t\t\t\treturn Env.ZERO;\n\t\t\t}\n\t\t\treturn getMovementQty().multiply(product.getWeight());\n\t\t}\n\t\t//\n\t\tlog.severe(\"Invalid Criteria: \" + CostDistribution);\n\t\treturn Env.ZERO;\n\t}",
"public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}",
"public int getProduct() {\n int a = 5;\n int b = 14;\n int c = a * b;\n return c;\n }",
"public BigDecimal getConvertedProductQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedProductQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"public BigDecimal getScrappedQty() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"ScrappedQty\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}",
"private static StockItem searchForProductOffered(Collection<StockItem> offeredStockItems, ProductAmountTO currentRequiredProduct) {\t\n\t\tIterator<StockItem> stockItemIterator = offeredStockItems.iterator();\n\t\tStockItem currentStockItem;\n\t\twhile(stockItemIterator.hasNext()) {\n\t\t\tcurrentStockItem = stockItemIterator.next();\n\t\t\tProductTO productTO = FillTransferObjects.fillProductTO(currentStockItem.getProduct());\n\t\t\tif(productTO.equals(currentRequiredProduct.getProduct())) {\n\t\t\t\treturn currentStockItem;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn null;\n\t}",
"public int getOrdersProductssSize(com.sybase.persistence.Query query)\n {\n return ru.terralink.mvideo.sap.Products.getSize(initChildrenQuery(query, new String[]{\"ordersFK\"}));\n }",
"public BigDecimal getSplitQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"SplitQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"private void calculatePrice(int quantity, int pricePerCup) {\n int price = quantity * pricePerCup;\n }",
"@Override\n\tpublic int getNoofProduct() {\n\t\tString sql=\"SELECT COUNT(product_product_id) FROM supplier_product\";\n\t\tint total=this.getJdbcTemplate().queryForObject(sql, Integer.class);\n\t\treturn total;\n\t}",
"protected abstract int getBucketIndex(int freeSpace);",
"public int getFreeSpace() {\n\t\tif(coordinate.size() == 0)\n\t\t\treturn -1;\n\t\tint rnd = new Random(new Date().getTime()).nextInt(coordinate.size());\n\t\tint value = coordinate.get(rnd);\n\t\tcoordinate.remove(rnd);\n\t\treturn value;\n\t}",
"public double calculatePrize(List<StorageCartLine> storageCartLine){\n\t\tdouble prize = 0.0;\n\t\tif(!storageCartLine.isEmpty()){\n\t\t\tfor(StorageCartLine pAux : storageCartLine){\n\t\t\t\tprize = prize + (pAux.getPrize());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn prize;\n\t}",
"public void fillProducts(int totalEntries) {\n Fairy fairy = Fairy.create();\n TextProducer text = fairy.textProducer();\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n storeOperations.addProduct(i, text.sentence(getRandomNumber(1, 10)), text.paragraph(getRandomNumber(1, 50)), (float) getRandomNumber(1, 3000), getRandomNumber(1, 5000));\n }\n }",
"private Observable<Long> retrieveQuantityFromInventoryService(Long productId) {\n return new GetInventoryCommand(productId, inventoryService).observe();\n }",
"public double getCost() {\n return quantity*ppu;\n\n }",
"public CQ getProductServiceQuantity() { \r\n\t\tCQ retVal = this.getTypedField(12, 0);\r\n\t\treturn retVal;\r\n }",
"public double calculatePrice() {\r\n\t\treturn menuItem.getPrice() * quantity;\t\r\n\t}",
"long getTotalProductsCount();",
"@Override\r\n public int getProductQuantity(Product product) {\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n return this.productQuantity.get(i);\r\n }\r\n i++;\r\n }\r\n return -1;\r\n }",
"void setDisplayQuantity(BigDecimal inDisplayQuantity);",
"@Test\n\tpublic void testGetQuantityAwaitingAllocation() {\n\t\tfinal List<OrderSku> listSkus = new ArrayList<OrderSku>();\n\t\tfinal OrderSku orderSku1 = new OrderSkuImpl();\n\t\torderSku1.setPrice(1, null);\n\t\torderSku1.setAllocatedQuantity(1);\n\t\tfinal OrderSku orderSku2 = new OrderSkuImpl();\n\t\torderSku2.setPrice(1, null);\n\t\torderSku2.setAllocatedQuantity(0);\n\t\tlistSkus.add(orderSku1);\n\t\tlistSkus.add(orderSku2);\n\n\t\tfinal InventoryDtoImpl inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal PersistenceSession persistanceSession = context.mock(PersistenceSession.class);\n\t\tfinal Query query = context.mock(Query.class);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(persistenceEngine).getPersistenceSession(); will(returnValue(persistanceSession));\n\t\t\t\tallowing(persistanceSession).createNamedQuery(ORDER_SKU_SELECT_BY_CODE_AND_STATUS); will(returnValue(query));\n\t\t\t\tallowing(persistenceEngine).retrieveByNamedQuery(with(equal(ORDER_SKU_SELECT_BY_CODE_AND_STATUS)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Arrays.asList(orderSku1, orderSku2)));\n\t\t\t\tignoring(query).setParameter(with(any(int.class)), with(any(Object.class)));\n\t\t\t\tallowing(query).list(); will(returnValue(listSkus));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\n\t\t\t\torderSku2.getQuantity() - orderSku2.getAllocatedQuantity(),\n\t\t\t\tallocationService.getQuantityAwaitingAllocation(productSku\n\t\t\t\t\t\t.getSkuCode(), WAREHOUSE_UID));\n\n\t}"
] | [
"0.6148641",
"0.5908327",
"0.5832746",
"0.56146157",
"0.5522864",
"0.5415463",
"0.5398257",
"0.5398257",
"0.5330023",
"0.5308043",
"0.5264228",
"0.5256927",
"0.5242857",
"0.5237996",
"0.5217362",
"0.51828486",
"0.5166541",
"0.51575303",
"0.51448697",
"0.5139255",
"0.5133123",
"0.5133123",
"0.512165",
"0.51132995",
"0.51128393",
"0.5103386",
"0.5073009",
"0.50705063",
"0.50652516",
"0.5059344",
"0.50462687",
"0.5046104",
"0.503945",
"0.50296086",
"0.5013609",
"0.50032574",
"0.500255",
"0.49854353",
"0.49620417",
"0.4959319",
"0.49559373",
"0.49492773",
"0.49462894",
"0.49167287",
"0.4911138",
"0.49047184",
"0.49046654",
"0.4895557",
"0.4895407",
"0.48866585",
"0.48716146",
"0.48687935",
"0.48659053",
"0.48533377",
"0.48499373",
"0.48487422",
"0.48470536",
"0.48460212",
"0.48457256",
"0.48449194",
"0.48403698",
"0.48403528",
"0.48390242",
"0.48328823",
"0.48186854",
"0.48166192",
"0.48143595",
"0.4810477",
"0.48063785",
"0.48061",
"0.4801614",
"0.4800801",
"0.4797385",
"0.479274",
"0.47886342",
"0.47824618",
"0.478234",
"0.4782286",
"0.47819936",
"0.4780126",
"0.47794473",
"0.47662973",
"0.4761044",
"0.47609928",
"0.47609437",
"0.47534654",
"0.47534156",
"0.4751491",
"0.4751273",
"0.47490185",
"0.47457057",
"0.4745581",
"0.4743086",
"0.47414744",
"0.4740844",
"0.4740609",
"0.47349906",
"0.4732965",
"0.47315305",
"0.47301838"
] | 0.67416453 | 0 |
Updates the stock quantity of the product identified by prodID | public boolean updateQuantity(int prodID, String distCentre, int quantity, int sessionID) {
boolean cID = false;
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Administrator) {
Administrator ad = (Administrator)(s.getUser());
cID = ad.updateQuantity(prodID, distCentre, quantity);
}
}
return cID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}",
"@Override\n\tpublic int reduceStock(Integer id, Integer quantity) {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\t \n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"update product set stock=stock-? where id=?\");\n\t\t\tpst.setInt(1,quantity);\n\t\t\tpst.setInt(2, id);\n\t\t\t\n\t\n\t\t\treturn pst.executeUpdate();\n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void changeQuantity(int prodID, int quant)\r\n\t{\r\n\t\tOrderItem temp;\r\n\t\tint test = 0;\r\n\t\t\r\n\t\t//iterate through list and compare product ID of each item against the parameter,\r\n\t\t//then update the quantity of the one that matches\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++)\r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttest = temp.getProductID();\r\n\t\t\tif (test == prodID)\r\n\t\t\t{\r\n\t\t\t\ttemp.setProductQuant(quant);\r\n\t\t\t} //end if\r\n\t\t} //end for\r\n\t\t\t\r\n\t}",
"public int reduceProductStock(Integer product_id, Integer quantity) throws ProductException {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tMap<String,Integer> map=new HashMap<String,Integer>();\n\t\tmap.put(\"quantity\", quantity);\n\t\tmap.put(\"productid\", product_id);\n\t\tint row=session.update(\"com.liangyu.entity.Product.reduceProductStock\",map);\n\t\tsession.commit();\n\t\t\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}",
"private void reduceQuantity(Context context, Uri productUri, int currentQuantity) {\n\n // Reduce stock, check if new stock is less than 0, in which case set it to 0\n int newStock = (currentQuantity >= 1) ? currentQuantity - 1 : 0;\n\n // Update table with new stock of the product\n ContentValues contentValues = new ContentValues();\n contentValues.put(ProductEntry.COLUMN_PRODUCT_QUANTITY, newStock);\n int numRowsUpdated = context.getContentResolver().update(productUri, contentValues, null, null);\n\n// // Display error message in Log if product stock fails to update\n// if (!(numRowsUpdated > 0)) {\n// Log.e(TAG, context.getString(R.string.error_quantity_update));\n// }\n }",
"private void UpdateItemStock(Cursor crsrUpdateStock, float Quantity) {\r\n int iResult = 0;\r\n float fCurrentStock = 0, fNewStock = 0;\r\n\r\n // Get current stock of item\r\n fCurrentStock = crsrUpdateStock.getFloat(crsrUpdateStock.getColumnIndex(\"Quantity\"));\r\n\r\n // New Stock\r\n fNewStock = fCurrentStock - Quantity;\r\n\r\n // Update new stock for item\r\n iResult = db.updateItemStock(crsrUpdateStock.getInt(crsrUpdateStock.getColumnIndex(\"MenuCode\")),\r\n fNewStock);\r\n\r\n Log.d(\"UpdateItemStock\", \"Updated Rows:\" + iResult);\r\n\r\n }",
"private void UpdateItemStock(Cursor crsrUpdateStock, float Quantity) {\n int iResult = 0;\n float fCurrentStock = 0, fNewStock = 0;\n\n // Get current stock of item\n fCurrentStock = crsrUpdateStock.getFloat(crsrUpdateStock.getColumnIndex(\"Quantity\"));\n\n // New Stock\n fNewStock = fCurrentStock - Quantity;\n\n // Update new stock for item\n iResult = db.updateItemStock(crsrUpdateStock.getInt(crsrUpdateStock.getColumnIndex(\"MenuCode\")),\n fNewStock);\n\n Log.d(\"UpdateItemStock\", \"Updated Rows:\" + iResult);\n\n }",
"@Test\n\tpublic void testUpdateStock() {\n\t\tStock stock = null;\n\t\tString productId = \"HY-1004\";\n\t\tTestFactory tf = new TestFactory();\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tif (!tf.createStock(em, productId)) {\n\t\t\t\tfail(\"Unable to create \"); // doubt\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tem.getTransaction().begin();\n\t\t\t// Find Stock for update\n\t\t\tstock = em.find(Stock.class, productId);\n\t\t\t// Update Business Partner\n\t\t\tstock.setQuantity(BigDecimal.valueOf(10));\n\t\t\tem.persist(stock);\n\t\t\tem.getTransaction().commit();\n\t\t\t// Find Business Partner after update\n\t\t\tstock = em.find(Stock.class, productId);\n\t\t\tassertEquals(\n\t\t\t\t\t\"Update Stock: Stock attribute quantity not updated in the database\",\n\t\t\t\t\tBigDecimal.valueOf(10), stock.getQuantity());\n\t\t\ttf.deleteStock(em, productId);\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\n\t}",
"public void updateQuantity(DrinkItem temp, int val) throws SQLException{\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity=? where drink_code=?\");\n\t\t\tmyStmt.setInt(1, val);\n\t\t\tmyStmt.setInt(2, temp.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t\t\n\t}",
"public void updateDB(int orderID, String prodID, String quantity) {\r\n try {\r\n String sql = \"UPDATE EmpOrders SET EmpOrderID = '\" + orderID + \"', ProductID = '\"\r\n + prodID + \"', QuanitityNeeded = '\" + quantity + \"'\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }",
"public void actualizarStock(Long idProducto, Long cantidad) {\n\t\t\n\t}",
"public ProductWithStockItemTO updateStockItem(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;",
"@ServiceMethod(name = \"updateStoreProductQuantity\")\r\n\tpublic IResponseHandler updateStoreProductQuantity(StoreProductDTO dto)\r\n\t{\t\r\n\t\t\r\n\t\tList<StoreProduct> sps =getStoreProduct(dto);\r\n\t\t\r\n\t\tfor(StoreProduct sp : sps)\r\n\t\t{\r\n\t\t\tsp.setQuantity(dto.getQuantity());\r\n\t\t\tgetSession().update(sp);\r\n\t\t}\r\n\r\n\t\treturn dto;\r\n\t}",
"@GetMapping(\"/update_to_cart\")\n\t@ResponseBody\n\tpublic String updateQuantity(@RequestParam(name = \"productId\") int id, @RequestParam(name = \"qty\", required = false) Integer qty, HttpSession session) {\n\t\tObject obj = session.getAttribute(Constant.CART_INFOR);\n\t\tMap<Integer, OrderItem> map;\n\t\tif(obj!=null) {\n\t\t\tmap = (Map<Integer, OrderItem>) obj;\n\t\t\tOrderItem orderItem = map.get(id);\n\t\t\torderItem.setQuantity(qty);\n\t\t\tsession.setAttribute(Constant.CART_INFOR, map);\n\t\t}\n\t\treturn \"\";\n\t}",
"public void updateProductQuantity(double quantity) {\n\t\t\n\t\ttry {\n\t\t\tString quan = \"\";\n\t\t\tPreparedStatement state1 = connect.prepareStatement(getProductQuantity);\n\t\t\tstate1.setString(1, productName);\n\t\t\t\n\t\t\tResultSet rs1 = state1.executeQuery();\n\t\t\twhile(rs1.next()) {\n\t\t\t\tquan = (String) rs1.getObject(\"quantity\");\n\t\t\t}\n\t\t\tquantity += Double.parseDouble(quan.split(\" \")[0]);\n\t\t\tquantity -= getQuantityFromBill();\n\t\t\tPreparedStatement state2 = connect.prepareStatement(updateProductQuantity);\n\t\t\tstate2.setString(1, quantity+\" \"+quan.split(\" \")[1]);\n\t\t\tstate2.setString(2, productName);\n\t\t\t\n\t\t\tstate2.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}",
"public synchronized void update(Product product, String quantity){\n ShoppingCartItem item = carrito.get(product.getId());\n item.setQuantity(Integer.parseInt(quantity));\n }",
"public void update(Product prod) {\n\t\tentities.put(prod.getName(), prod);\n\t\tif (prod.quantity==0) {\n\t\t\tavailableProducts.remove(prod.getName());\n\t\t}\n\t}",
"public void updateQuantity (Product product, int newQuantity) throws NoSuchProductException {\n Product productInCart = getProductInCartCorrespondentTo(product);\n int previousQuantity = productInCart.getQuantity();\n productInCart.setQuantity(newQuantity);\n int delta = newQuantity - previousQuantity;\n this.amount += delta * product.getPrice();\n updateLastProductList(product, previousQuantity, newQuantity);\n }",
"public void stockItem(String upc, int qty) \n\n\t\t\tthrows SQLException, ClassNotFoundException, IOException\n\n\t\t\t{\n\n\t\tif(qty < 0 )\n\n\t\t\t//sanity check\n\n\t\t\tthrow new IOException(\"Quantity input cannot be less than 0.\");\n\n\n\n\t\tif(this.conn == null)\n\n\t\t\tthis.conn = JDBCConnection.getConnection();\n\n\n\n\t\tPreparedStatement stmt = conn.prepareStatement(\n\n\t\t\t\t\"UPDATE Item \" +\n\n\t\t\t\t\t\t\"SET stock = stock + ? \" +\n\n\t\t\t\t\"WHERE upc = ? \");\n\n\t\tstmt.setInt(1, qty);\n\n\t\tstmt.setString(2, upc);\n\n\t\ttry\n\n\t\t{\n\n\t\t\tint update = stmt.executeUpdate();\n\n\t\t\tif(update == 1)\n\n\t\t\t\treturn;\n\n\t\t\telse if(update == 0)\n\n\t\t\t\t//if none is update\n\n\t\t\t\tthrow new SQLException(\"The Item with upc \" + upc + \" does \" +\n\n\t\t\t\t\t\t\"not exist.\");\n\n\t\t\telse\n\n\t\t\t\t//Fatal error: more than 1 tuple is updated -> duplicate upc!!!\n\n\t\t\t\tthrow new SQLException(\"Fatal Error: Duplicate UPC!\");\n\n\t\t}\n\n\t\tfinally\n\n\t\t{\n\n\t\t\tstmt.close();\n\n\t\t}\n\n\t\t\t}",
"public ProductWithStockItemTO changePrice(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;",
"private void updateStocks(StockTransferTransactionRequest item) {\n\n Integer updatedQuantity = item.getQuantity();\n StockTraderServiceFactoryIF serviceFactory = new StockTraderServiceFactory();\n DematServiceIF dematService = serviceFactory.dematService();\n\n Optional<Integer> oldQuantity = dematService.getStockStatus(item.getUserName(),\n item.getStock());\n if(oldQuantity != null && oldQuantity.get() > 0) {\n updatedQuantity = oldQuantity.get() + item.getQuantity();\n }\n try(Connection conn = DriverManager.getConnection(Constants.DB_URL,\n Constants.USER,\n Constants.PASS);\n PreparedStatement stmt = conn.prepareStatement(\n Constants.MERGE_STOCK)) {\n stmt.setString(1, item.getUserName());\n stmt.setString(2, item.getStock().toString());\n stmt.setInt(3, updatedQuantity);\n stmt.execute();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }",
"public void stock(int number) {\r\n quantity += number;\r\n }",
"public void setProductQuantity (Product key, int quant) {\n\t\tm_prodList.remove(key);\n\t\tm_prodList.put(key,new Integer(quant));\n\n\t}",
"@Modifying(clearAutomatically = true)\n\t@Lock(value = LockModeType.OPTIMISTIC_FORCE_INCREMENT)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity + ?1 WHERE i =?2\")\n int addToStock(double qty, Item item);",
"public void updateQuantityProduct(List<ItemCart> list) {\n\t\tfor (ItemCart i : list) {\n\t\t\tProduct p = i.getP();\n\t\t\t// b1: lay quantity khach hang mua\n\t\t\tint quatity = i.getQuantity();\n\t\t\t// b2: lay quantity cua Product duoi DB\n\t\t\tProduct pDB = new ProductDAO().lookUp(p.getId());\n\t\t\tint quantityNew = pDB.getSoLuongTrongKho() - quatity;\n\t\t\tnew ProductDAO().updateQuatity(p.getId(), quantityNew);\n\n\t\t}\n\n\t}",
"private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }",
"public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}",
"public void setStock(Integer shopID, Integer stock){\n\t\tString query = \"UPDATE `shops` SET stock=? WHERE shop_id=?;\";\n\t\tdebugOut(query);\n\t\ttry {\n\t\t\tPreparedStatement sql = connection.prepareStatement(query);\n\t\t\tsql.setInt(1, stock);\n\t\t\tsql.setInt(2, shopID);\n\t\t\tsql.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\t// 更新购物车中商品的数量\n\tpublic int updateCartByUserIdAndProductId(Integer userid, Integer productid, int quantity) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession(true);\n\t\tMap<String,Integer> map=new HashMap<String,Integer>();\n\t\tmap.put(\"userid\", userid);\n\t\tmap.put(\"productid\", productid);\n\t\tmap.put(\"quantity\", quantity);\n\t\tint result=session.update(\"com.neusoft.entity.Cart.updateCartByUserIdAndProductId\", map);\n\t\tsession.close();\n\t\treturn result;\n\t\t\n\t}",
"void updateOfProductById(long id);",
"@Override\n\tpublic Integer updateQtyForFrozen(InvBaseStock baseStock) {\n\t\treturn invBaseStockDao.updateQtyForFrozen(baseStock);\n\t}",
"ResponseEntity<Cart> updateCartItemQuantity(CartFormData formData);",
"public Integer updateProductSales(Long productId) throws Exception;",
"public void setProductQty(Double productQty) {\n this.productQty = productQty;\n }",
"public static void setQuantity(Products product, int quantity,String product_id) {\n ShoppingCartEntry curEntry = cartMap.get(product);\n\n // If the quantity is zero or less, remove the products\n if (quantity <= 0) {\n if (curEntry != null)\n removeProduct(product);\n return;\n }\n\n // If a current cart entry doesn't exist, create one\n if (curEntry == null) {\n curEntry = new ShoppingCartEntry(product, quantity);\n cartMap.put(product, curEntry);\n return;\n }\n\n // Update the quantity\n curEntry.setQuantity(quantity);\n }",
"private void updateProduct(Product productUpdated, int productId) {\n try {\n ConDB conn = new ConDB();\n String query = \"UPDATE products SET productName = ?,\"\n + \"total = ?, remaining = ?, warehouse_id = ? WHERE id = \" + productId;\n \n \n PreparedStatement pst = conn.getConnection().prepareStatement(query);\n pst.setString(1, productUpdated.getProductName());\n pst.setInt(2, productUpdated.getTotal());\n pst.setInt(3, productUpdated.getRemaining());\n pst.setInt(4, productUpdated.getWarehouse_id());\n \n pst.executeUpdate();\n JOptionPane.showMessageDialog(null, \"Product updated\");\n closeUpdateProduct();\n } catch (SQLException ex) {\n System.out.println(ex.getLocalizedMessage());\n }\n }",
"public void updateQuantityOnCommissionPosition(int sessionId, int commissionPositionId, int quantity);",
"public void increaseStock(int ID, int amt) {\r\n\t\tinventory.put(ID, (inventory.get(ID)+amt));\r\n\t}",
"public void stockItemPrice(String upc, int qty, int price_incent)\n\n\t\t\tthrows SQLException, ClassNotFoundException, IOException\n\n\t\t\t{\n\n\t\tif(qty < 0)\n\n\t\t\t//sanity check\n\n\t\t\tthrow new IOException(\"Quantity input cannot be less than 0.\");\n\n\t\tif(price_incent <= 0)\n\n\t\t\t//santiy check\n\n\t\t\tthrow new IOException(\"Price input must be larger than 0.\");\n\n\n\n\t\tif(this.conn == null)\n\n\t\t\tthis.conn = JDBCConnection.getConnection();\n\n\n\n\t\tPreparedStatement stmt = conn.prepareStatement(\n\n\t\t\t\t\"UPDATE Item \" +\n\n\t\t\t\t\t\t\"SET stock = stock + ?, price = ? \" +\n\n\t\t\t\t\"WHERE upc = ?\");\n\n\t\tstmt.setInt(1, qty);\n\n\t\tstmt.setDouble(2, (double)price_incent / 100.0);\n\n\t\tstmt.setString(3, upc);\n\n\t\ttry\n\n\t\t{\n\n\t\t\tint update = stmt.executeUpdate();\n\n\t\t\tif(update == 1)\n\n\t\t\t\treturn;\n\n\t\t\telse if(update == 0)\n\n\t\t\t\t//if none is update\n\n\t\t\t\tthrow new SQLException(\"The Item with upc \" + upc + \" does \" +\n\n\t\t\t\t\t\t\"not exist.\");\n\n\t\t\telse\n\n\t\t\t\t//Fatal error: more than 1 tuple is updated -> duplicate upc!!!\n\n\t\t\t\tthrow new SQLException(\"Fatal Error: Duplicate UPC!\");\n\n\t\t}\n\n\t\tfinally\n\n\t\t{\n\n\t\t\tstmt.close();\n\n\t\t}\n\n\t\t\t}",
"@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}",
"@Modifying(clearAutomatically = true)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity - ?1 WHERE i =?2\")\n int deductFromStock(double qty, Item item);",
"public void mudaQuantidadeAprovada(PedidoProduto pedidoProduto) {\n String sql = \"UPDATE pedidosprodutos SET QuantidadeAprovada=? WHERE Id=?\";\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, pedidoProduto.getQuantidadeAprovada());\n stmt.setInt(2, pedidoProduto.getId());\n stmt.execute();\n connFac.closeAll(rs, stmt, st, conn);\n } catch(SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n throw new RuntimeException(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n }\n }",
"@Override\r\n\tpublic int updateProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"public void increaseStock(int i, int a){\n stock.get(i).increaseQuantity(a);\n }",
"public void increaseQuantityOfProductByOne() {\n int intQuantity = Integer.parseInt(quantityOfProducts.getAttribute(\"value\"));\n plusButton.click();\n testClass.waitTillValueOfElementIsIncreasedByOne(\n QUANTITY_OF_PRODUCTS_XPATH, intQuantity + 1);\n }",
"private void updateProductQnt(List<Product> productList) {\n if (productList != null) {\n productList.forEach(product -> {\n Product productToSave = productService.findOne(product.getId());\n productToSave.setQuantity(productToSave.getQuantity() - product.getQuantity());\n productService.save(productToSave);\n });\n }\n }",
"public int numberInStock(int id)\n {\n Product product = findProduct(id);\n \n if(product != null)\n {\n return product.quantity;\n }\n else\n {\n return 0;\n }\n }",
"@Override\n public void updateProduct(TradingQuote tradingQuote) {\n }",
"private void editProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id -\");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id -\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter new Quantity of Product\");\n\t\t\tint quantity = getValidInteger(\"Enter new Quantity of Product\");\n\t\t\tCartController.getInstance().editProductFromCart(productId,\n\t\t\t\t\tquantity);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}",
"public abstract void setWarehouseAmount(int productID, int newAmount) throws GettingDataFailedException;",
"public void update(int bookId, int quantity){ \n JSONObject jbook = dbmanager.getBmanager().readJSON(bookId);\n dbmanager.getBmanager().delete(bookId);\n jbook.remove(\"quantity\");\n jbook.put(\"quantity\", Integer.toString(quantity));\n dbmanager.open();\n dbmanager.createCommit(getNextBookId(),jbook);\n dbmanager.close();\n \n }",
"public void updateOrder(String id, int quantity)\n {\n for (OrderItem orderItem : orderItems)\n if (orderItem.getFruitId().equalsIgnoreCase(id))\n {\n orderItem.setQuantity(orderItem.getQuantity() + quantity);\n return;\n }\n }",
"@Override\n\tpublic Integer update(InvBaseStock baseStock) {\n\t\treturn invBaseStockDao.update(baseStock);\n\t}",
"@Override\n void updateStockLevels(){\n for(OrderLine orderLine : products){\n Product p = orderLine.getProduct();\n //remove quantity ordered from stock levels\n p.updateNumInStock(-orderLine.getQuantity());\n }\n }",
"public int adjustQuantitiesInDB(Ingredient ingredient, int givenQuantity)throws SQLException{ //adds a current type of ingredient to database takes in quantity and ingredient object \r\n\t\tint newQuantity;\r\n\t\tString requiredIngredientName = ingredient.getName();\r\n\t\tString sqlUpdate = \"update stock_ingredients set quantity = quantity + \" + givenQuantity + \" where name = \" + \"'\" + requiredIngredientName + \"'\";\r\n\t\t\t\r\n\t\t//find correct syntax for increasing the quantity by x amount\r\n\r\n\t\tConnection connection = connectToDB(databaseUser, databasePass);\r\n\r\n\t\tPreparedStatement ps = connection.prepareStatement(sqlUpdate);\r\n\r\n\t\tps.executeUpdate();\r\n\r\n\t\tnewQuantity = checkCurrentStockLevels(ingredient);\r\n\r\n\t\tconnection.close();\r\n\t\t\r\n\t\treturn newQuantity;\r\n\r\n\t}",
"public void setQty(java.math.BigDecimal newQty)\n\t\tthrows java.rmi.RemoteException;",
"public void testUpdateProduct() {\n\t\tProduct product=productDao.selectProducts(33);\n\t\tproduct.setPrice(100.0);\n\t\tproduct.setQuantity(1);\n\t\tproductDao.updateProduct(product);//product has updated price and update quantity\n\t\tassertTrue(product.getPrice()==100.0);\n\t\tassertTrue(product.getQuantity()==1);\n\t}",
"public void editProduct(int index, String description, String category, int quantity, int weight, int price, int stocknumber) {\t\t\n\t}",
"@Override\r\n public void addProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n this.productQuantity.set(i, stock + quantity);\r\n break;\r\n }\r\n i++;\r\n }\r\n this.productList.add(product);\r\n this.productQuantity.add(quantity);\r\n }",
"public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}",
"public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }",
"public Double getProductQty() {\n return productQty;\n }",
"private void productsQuantityChange(final List<Integer> ids, final int quantityChange)\n\t\t\tthrows RepositoryException\n\t{\n\t\tfinal String updateQuantityQuery =\n\t\t\t\t\"UPDATE \" + productTableName + \" SET quantity = quantity + ? WHERE id_product = ?;\";\n\n\t\ttry (Connection con = SQLConnector.getConnection();\n\t\t\t PreparedStatement prepStmtUpdateQuantity = con.prepareStatement(updateQuantityQuery))\n\t\t{\n\t\t\tfor (int id : ids)\n\t\t\t{\n\t\t\t\tprepStmtUpdateQuantity.setInt(1, quantityChange);\n\t\t\t\tprepStmtUpdateQuantity.setInt(2, id);\n\t\t\t\tprepStmtUpdateQuantity.executeUpdate();\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tthrow new RepositoryException(\"Could not update product quantity!\", e);\n\t\t}\n\t}",
"public void setQty(int qty) {\n this.qty = qty;\n }",
"public int getStock(){\n\t\treturn Stock; // Return the product's stock\n\t}",
"@Override\n public void changeQuantity(Product product, int position) {\n changeProductQuantity(product, -1);\n }",
"private void somarQuantidade(Integer id_produto){\n\t for (ItensCompra it : itensCompra){\n\t\t //verifico se o item do meu arraylist é igual ao ID passado no Mapping\n\t\t if(it.getTable_Produtos().getId_produto().equals(id_produto)){\n\t //defino a quantidade atual(pego a quantidade atual e somo um)\n\t it.setQuantidade(it.getQuantidade() + 1);\n\t //a apartir daqui, faço o cálculo. Valor Total(ATUAL) + ((NOVA) quantidade * valor unitário do produto(ATUAL))\n\t it.setValorTotal(0.);\n\t it.setValorTotal(it.getValorTotal() + (it.getQuantidade() * it.getValorUnitario()));\n }\n}\n\t}",
"@PutMapping(\"/{id}/update\")\n\tpublic boolean updateItemQuantity(@PathVariable Long id, @NotBlank @RequestParam Integer quantity) {\n\t\treturn itemService.updateItemQuantity(id, quantity);\n\t}",
"public void modifyCart(int userId) {\n try {\n int cartId = InputUtil.getInt(\"Enter cart Id : \");\n int newQuantity = InputUtil.getInt(\"Enter new quantity: \");\n Cart cart = cartService.getCart(cartId);\n cartService.checkUserCart(cart,userId);\n cartService.modifyItem(cart,userId,newQuantity);\n System.out.println(\"\\nProduct quantity changed for cart Id : \"+String.valueOf(cartId));\n } catch (CartException ex) {\n System.out.println(ex);\n } \n }",
"void update(Product product) throws IllegalArgumentException;",
"public void update(Product product) {\n\n\t}",
"public static boolean updateInventoryStock(ObservableList<Product> products, TransactionType transactionType) {\r\n\t\tdbConnect();\r\n\t\tPreparedStatement stmt = null;\r\n\t\tboolean saveStatus = true;\r\n\t\tfor (Product product : products) {\r\n\t\t\tString operation = (transactionType == TransactionType.PURCHASE ? \"+ \" : \"- \");\r\n\t\t\tfinal String UPDATE_STOCK = \"UPDATE product SET product_quantity = product_quantity \" + operation\r\n\t\t\t\t\t+ product.getSubQuantity() + \" WHERE product_code = \" + product.getProductCode();\r\n\t\t\ttry {\r\n\t\t\t\tstmt = conn.prepareStatement(UPDATE_STOCK);\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tsaveStatus = false;\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn saveStatus;\r\n\t}",
"private void updateBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateBtnMouseClicked\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"UPDATE `stock` SET `Product_Name`=?,`Quantity`=?,`Entry_Date`=?,`Price`=? Where `Product_ID`=?\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setString(1, name);\n\n pstm.setInt(2, Integer.parseInt(quantity));\n pstm.setString(3, date);\n pstm.setInt(4, Integer.parseInt(price));\n pstm.setInt(5, Integer.parseInt(id));\n pstm.executeUpdate();\n } catch (Exception ex) {\n\n JOptionPane.showMessageDialog(null, \"Data Not Found To be Updated\");\n }\n\n //Refersh Table\n refTable();\n\n }",
"public void changeStockVal() {\n double old = _stockVal;\n _stockVal = 0;\n for (Company x : _stocks.keySet()) {\n _stockVal += x.getPrice() * _stocks.get(x);\n }\n _stockValChanged = _stockVal - old;\n\n }",
"@Override\n public void onClick(View view) {\n if (quantity > 0) {\n int decrementedQuantity = quantity - 1;\n\n //Get the URI with the ID for the row\n Uri quantityUri = ContentUris.withAppendedId(BookEntry.CONTENT_URI, currentBookId);\n\n //Update the database with the new quantity value\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, decrementedQuantity);\n context.getContentResolver().update(quantityUri, values, null, null);\n } else {\n //Show an error when the quantity reaches 0\n Toast.makeText(context, R.string.out_of_stock_message, Toast.LENGTH_SHORT).show();\n }\n }",
"int updateByPrimaryKey(ItemStockDO record);",
"int updateByPrimaryKey(ItemStockDO record);",
"public void updateItem(int id, String desc, String family, float price, int stock) {\n ContentValues values = new ContentValues();\n values.put(\"description\", desc);\n values.put(\"family\", family);\n values.put(\"price\", price);\n\n dbW.update(\"store\", values, \"_id=?\", new String[] { String.valueOf(id) });\n }",
"public void decreaseQuantity() {\n this.quantity--;\n this.updateTotalPrice();\n }",
"@Override\r\n public void updatedSaleInventory(ItemAndQuantity lastItem) {\r\n }",
"Product updateProductInStore(Product product);",
"private void increaseProductCountInCart(int productID, List<Product> products) {\n\n for (Product product : products) {\n\n if (product.getId() == productID)\n product.setCount(product.getCount() + 1);\n }\n }",
"@Override\n\tpublic int update(ShoppingCartDetailEntity shoppingCart) {\n\t\treturn 0;\n\t}",
"protected void updateStockPrice( final D dto )\n {\n final String methodName = \"updateStockPrice\";\n logMethodBegin( methodName, dto );\n Objects.requireNonNull( dto, \"dto argument cannot be null\" );\n this.stockPriceQuoteService\n .setStockPriceQuote( (StockPriceQuoteDTOContainer) dto );\n logMethodEnd( methodName );\n }",
"public boolean updateProduct(int prod_id, Product new_product) \n\t{\n\t\treturn false;\n\t}",
"@Override\n public Product process(Product product) throws Exception\n {\n List<Product> productList = jdbcTemplate.query(GET_PRODUCT, new Object[] {product.getProductCode()}, new RowMapper<Product>() {\n @Override\n public Product mapRow( ResultSet resultSet, int rowNum ) throws SQLException {\n Product p = new Product();\n p.setProductCode( resultSet.getInt( 1 ) );\n p.setProductName( resultSet.getString( 2 ) );\n p.setMrp( resultSet.getString( 3 ) );\n p.setDicountedPrice( resultSet.getString( 4 ) );\n p.setStock( resultSet.getString( 4 ) );\n return p;\n }\n });\n\n if( productList.size() > 0 )\n {\n // Add the new quantity to the existing quantity\n Product existingProduct = productList.get( 0 );\n int stock = Integer.parseInt(existingProduct.getStock()) + Integer.parseInt(product.getStock());\n product.setStock(Integer.toString(stock));\n }\n\n // Return the (possibly) update prduct\n return product;\n }",
"@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }",
"public void sellProduct(){\n if(quantity > 0)\n this.quantity -= 1;\n else\n throw new IllegalArgumentException(\"Cannot sell \"+ this.model +\" with no inventory\");\n\n }",
"@Override\n\tpublic int update(ProductDTO dto) {\n\t\treturn 0;\n\t}",
"void stockPriceChanged(Stock stock, double oldValue, double newValue);",
"public void updateProduct() throws ApplicationException {\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n try {\n session.beginTransaction();\n Menu updateProduct = (Menu) session.get(Menu.class, menuFxObjectPropertyEdit.getValue().getIdProduct());\n\n updateProduct.setName(menuFxObjectPropertyEdit.getValue().getName());\n updateProduct.setPrice(menuFxObjectPropertyEdit.getValue().getPrice());\n\n session.update(updateProduct);\n session.getTransaction().commit();\n } catch (RuntimeException e) {\n session.getTransaction().rollback();\n SQLException sqlException = getCauseOfClass(e, SQLException.class);\n throw new ApplicationException(sqlException.getMessage());\n }\n\n initMenuList();\n }",
"@PUT\n @Path(\"{id}\")\n @Produces(MediaType.APPLICATION_XML)\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n public ShoppingList updateQuantityInShoppingList(@PathParam(\"id\") Long id, @QueryParam(\"idItem\") Long idItem, @QueryParam(\"quantityItem\") int quantityItem) throws WebApplicationException {\n boolean b = sls.updateQuantityItemShoppingList(id, idItem, quantityItem);\n if (b == true) {\n return sls.getShoppingList(id);\n } else {\n throw new WebApplicationException(Response.Status.BAD_REQUEST);\n\n }\n }",
"@PostMapping(\"/editCart\")\n @PermissionStoreItemRead\n public String editCart(@RequestParam @Min(0) long productID,\n @RequestParam @Min(0) Integer numberOfItems,\n HttpSession session,\n Model model,\n RedirectAttributes redirectAttributes) {\n\n log.debug(\"Cart editing| product \" + productID + \" set to \" + numberOfItems);\n ShoppingCart cart = (ShoppingCart) session.getAttribute(\"cart\");\n Item item = itemService.findById(productID).orElseThrow(() -> new RuntimeException(\"Item not found\"));\n if (numberOfItems > item.getStock()) {\n redirectAttributes.addFlashAttribute(\"error\", \"Not enough items\");\n return \"redirect:/user/cart\";\n }\n cart.editItemQuantity(item, numberOfItems);\n log.debug(\"Total size of cart : \" + cart.numberOfItems());\n return \"redirect:/user/cart\";\n }",
"public void UpdateQuantity(String qty, int item){\r\n\t\tString Qty = getValue(qty);\r\n\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:- Quantity should be udapted to \"+qty);\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele =listofelements(locator_split(\"txtUpdatequantity\"));\r\n\t\t\tif(ele.size()>4){\r\n\t\t\t\titem=item+4;\r\n\t\t\t}\r\n\t\t\tele.get(item).clear();\r\n\t\t\tele.get(item).sendKeys(Qty);\r\n\t\t\tSystem.out.println(\"Quantity for second item is updated to \"+Qty);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Quantity for second item is updated to \"+Qty);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Quantity is not udated to \"+Qty);\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtUpdatequantity\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlashMessage addQuantity(ShoppingCart cart, Long productId, int changeQuantity) {\n FlashMessage flashMessage;\n Product product = productService.findById(productId);\n if (product == null) {\n throw new ProductNotFoundException(\"Attempt to buy unknown product: \"+productId);\n }\n\n Purchase purchase = cart.getPurchase();\n boolean productAlreadyInCart = false;\n if (purchase == null) {\n purchase = new Purchase();\n cart.setPurchase(purchase);\n }\n else {\n for (ProductPurchase pp : purchase.getProductPurchases()) {\n if (pp.getProduct() != null) {\n if (pp.getProduct().getId().equals(productId)) {\n if ((pp.getQuantity()+changeQuantity) > product.getQuantity()) { // We want buy more than have\n throw new ExceedsProductQuantityException(FlashMessage.outOfStock(product));\n }\n pp.setQuantity(pp.getQuantity() + changeQuantity);\n productAlreadyInCart = true;\n break;\n }\n }\n }\n }\n\n if (!productAlreadyInCart) {\n if (changeQuantity>product.getQuantity()) { // We want buy more than have in stock that product\n throw new ExceedsProductQuantityException(FlashMessage.outOfStock(product));\n }\n\n ProductPurchase newProductPurchase = new ProductPurchase();\n newProductPurchase.setProduct(product);\n newProductPurchase.setQuantity(changeQuantity);\n newProductPurchase.setPurchase(purchase);\n purchase.getProductPurchases().add(newProductPurchase);\n }\n\n flashMessage = new FlashMessage (String.format(\"Added %d of %s to cart.\", changeQuantity, product.getName()), FlashMessage.Status.SUCCESS);\n cart.setPurchase(purchaseService.save(purchase));\n return flashMessage;\n }",
"private void increaseStock() {\n\t\tint increaseBy; // declares declares increaseBy\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the card you wish to edit:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if the card with the inputed ID exists\n\t\t\tSystem.out.println(\"Please enter the amount you wish to increase the stock by:\");\n\t\t\tincreaseBy = scan.nextInt();\n\t\t\tif(increaseBy <= 0) {\n\t\t\t\tSystem.out.println(\"Error! You must increase the stock by 1 or more\\n\");\n\t\t\t\tgetUserInfo();\n\t\t\t}\n\t\t\t\n\t\t\tinventoryObject.increaseStock(sic_idHolder, increaseBy); // calls increaseStock in InventoryManagement\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"There are no cards with the ID you entered\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\t\n\t\t\n\t}",
"public int updateProductQuantity(String product, int quantity) {\n Collection<String> collection = shoppingBasket.keySet();\n\n for (String key : collection) {\n if (key != null) {\n if (product.equals(key) == true) {\n // нашли наше значение равное ключу\n // кладутся новые значения\n shoppingBasket.put(product, quantity);\n return 1;\n } else {\n return 0;\n }\n }\n }\n return 0;\n }",
"Product updateProductById(Long id);",
"public void addProductStock(Product product, int nbProducts) {\r\n this.productStocks.add(new ProductStock(product, nbProducts));\r\n }"
] | [
"0.75925475",
"0.7394374",
"0.72636205",
"0.6926382",
"0.6923123",
"0.68421483",
"0.68398607",
"0.6777997",
"0.67360985",
"0.67259955",
"0.67187005",
"0.67036873",
"0.6692856",
"0.6690398",
"0.66501594",
"0.6648278",
"0.66108006",
"0.6575605",
"0.6557596",
"0.6554257",
"0.6479794",
"0.6461891",
"0.6443017",
"0.6437685",
"0.6421925",
"0.64025253",
"0.63982064",
"0.6392664",
"0.63566667",
"0.63414687",
"0.6313362",
"0.631071",
"0.630527",
"0.6301347",
"0.6284663",
"0.62679964",
"0.6257614",
"0.6253065",
"0.6234995",
"0.62340266",
"0.623235",
"0.62166196",
"0.6214305",
"0.6185529",
"0.6176158",
"0.61632824",
"0.61461717",
"0.6141658",
"0.613545",
"0.61348045",
"0.61301607",
"0.61107194",
"0.6108783",
"0.6092931",
"0.6079402",
"0.6067338",
"0.6061013",
"0.6054789",
"0.604065",
"0.6024054",
"0.60214204",
"0.6020228",
"0.6006468",
"0.5987572",
"0.5985901",
"0.5983314",
"0.59761333",
"0.5971634",
"0.5971283",
"0.5971236",
"0.59653187",
"0.59613484",
"0.59597945",
"0.5954079",
"0.59400725",
"0.5921531",
"0.5921333",
"0.59169596",
"0.59169596",
"0.59127885",
"0.5905245",
"0.59008247",
"0.5899703",
"0.5899661",
"0.58869356",
"0.5882008",
"0.58777267",
"0.5866596",
"0.5848218",
"0.5847676",
"0.584659",
"0.5845363",
"0.5839781",
"0.58365774",
"0.5832293",
"0.5820219",
"0.581585",
"0.58088434",
"0.58034277",
"0.579849",
"0.57955116"
] | 0.0 | -1 |
Adds two nodes cityA, cityB to the shipping graph Adds a route (an edge to the shipping graph) from cityA to cityB with length distance If the nodes or the edge (or both) exist, does nothing | public void addRoute(String cityA, String cityB, int distance, int sessionID) {
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Administrator) {
Administrator ad = (Administrator)(s.getUser());
ad.addRoute(cityA, cityB, distance);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addWay(City c1,City c2) throws CityNotFoundException{\r\n\t\ttry {\r\n\t\t\tmap.addEdge(c1, c2);\r\n\t\t} catch (VertexNotExistException e) {\r\n\r\n\t\t\tthrow new CityNotFoundException(\"city not founds\");\r\n\t\t}\r\n\t}",
"private static void addDepotToGraph(Depot newDepot, Graph<Node, WeightEdge> graph, List<Node> depots, List<Node> trips, Problem problem){\n Node depotSource = new Node(newDepot, newDepot.getNumberOfVehicles(), true);\n graph.addVertex(depotSource);\n depots.add(depotSource);\n\n // add the depot sink vertex\n Node depotSink = new Node(newDepot, -newDepot.getNumberOfVehicles(), false);\n graph.addVertex(depotSink);\n depots.add(depotSink);\n\n // add edges from this depot source to all existing trips entry\n // add edges from all existing trips exit to this depot sink\n for(Node trip : trips){\n if(!trip.isExitNode()){\n // from depot source to trip startPoint\n WeightEdge depotToTripWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(depotSource, trip, depotToTripWeightEdge);\n graph.setEdgeWeight(depotToTripWeightEdge, problem.getCost(depotSource.getLocation(), trip.getLocation()).toMinutes());\n }else{ //ending point\n // from trip endPoint to depot sink\n WeightEdge tripToDepotWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(trip, depotSink, tripToDepotWeightEdge);\n graph.setEdgeWeight(tripToDepotWeightEdge, problem.getCost(trip.getLocation(), depotSink.getLocation()).toMinutes());\n }\n }\n\n // add arc from depot source to depot sink with lowerBound: 0 end upperBound: depot.numberOfAvailableVehicles\n // this arc is necessary when some vehicles in the depot are nod used\n Integer numberOfAvailableVehicles = ((Depot) depotSource.getLocation()).getNumberOfVehicles();\n WeightEdge sourceToSinkWeightEdge = new BoundedWeightEdge(0, numberOfAvailableVehicles);\n graph.addEdge(depotSource, depotSink, sourceToSinkWeightEdge);\n graph.setEdgeWeight(sourceToSinkWeightEdge, 0);\n\n }",
"private static void addTripToGraph(Trip newTrip, Graph<Node, WeightEdge> graph, List<Node> depots, List<Node> trips, Problem problem){\n Node tripStart = new Node(newTrip, 0, false);\n Node tripEnd = new Node(newTrip, 0, true);\n\n graph.addVertex(tripStart);\n graph.addVertex(tripEnd);\n\n // Add weightEdgeWithBounders from trip startPoint to trip endPoint\n // lowerBound and upperBound for this edges is 1, because we are looking for solution that saturates all trips\n WeightEdge tripInternalWeightEdge = new BoundedWeightEdge(1,1);\n graph.addEdge(tripStart, tripEnd, tripInternalWeightEdge);\n graph.setEdgeWeight(tripInternalWeightEdge, 0);\n\n for(Node depot : depots){\n if(depot.isExitNode()){ // is source\n // add weightEdgeWithBounders from depot source to trip startPoint\n WeightEdge depotToTripWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(depot, tripStart, depotToTripWeightEdge);\n graph.setEdgeWeight(depotToTripWeightEdge, problem.getCost(depot.getLocation(), tripStart.getLocation()).toMinutes());\n }else{ // is depot sink\n // add weightEdgeWithBounders from trip endPoint to depot sink\n WeightEdge tripToDepotWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, depot, tripToDepotWeightEdge);\n graph.setEdgeWeight(tripToDepotWeightEdge, problem.getCost(tripEnd.getLocation(), depot.getLocation()).toMinutes());\n }\n }\n\n for(Node otherTrip : trips){\n if(otherTrip.isExitNode()){\n // add feasible edges from all trips endPoints to this trip startPoint\n if(isFeasibleEdge(otherTrip, tripStart, problem)){\n WeightEdge otherTripToThisTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(otherTrip, tripStart, otherTripToThisTrip);\n graph.setEdgeWeight(otherTripToThisTrip, problem.getCost(otherTrip.getLocation(), tripStart.getLocation()).toMinutes());\n }\n }else{\n // add feasible edges from this trip endPoint to all trips startPoints\n if(isFeasibleEdge(tripEnd, otherTrip, problem)){\n WeightEdge thisTripToOtherTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, otherTrip, thisTripToOtherTrip);\n graph.setEdgeWeight(thisTripToOtherTrip, problem.getCost(tripEnd.getLocation(), otherTrip.getLocation()).toMinutes());\n }\n }\n }\n\n // add this nodes in our trips list;\n trips.add(tripStart);\n trips.add(tripEnd);\n }",
"public Route(City city1, City city2, int distance, double price) {\n this.city1 = city1;\n this.city2 = city2;\n this.distance = distance;\n this.price = price;\n }",
"public abstract boolean addEdge(Node node1, Node node2, int weight);",
"private static void addWay(GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph,HashMap<Long, WayNodeOSM> osmNodes, OSMWay way) {\n \t\tfor (int j = 1; j < way.nodes.size(); ++j) {\n \t\t\t// get the star and end node of this segment of the way \n \t\t\tfinal Long startNodeId = way.nodes.get(j - 1);\n \t\t\tfinal Long endNodeId = way.nodes.get(j);\n \t\t\tNodeCppOSM node1 = createNodeIfNonexisting(osmGraph, startNodeId);\n \t\t\tnode1.lat = osmNodes.get(startNodeId).getLatitude();\n \t\t\tnode1.lon = osmNodes.get(startNodeId).getLongitude();\n \t\t\tNodeCppOSM node2 = createNodeIfNonexisting(osmGraph, endNodeId);\n \t\t\tnode2.lat = osmNodes.get(endNodeId).getLatitude();\n \t\t\tnode2.lon = osmNodes.get(endNodeId).getLongitude();\n \t\t\t// create the meta nodes for this segment\n \t\t\tfinal List<WayNodeOSM> metaNodes = new LinkedList<>();\n \t\t\tmetaNodes.add(osmNodes.get(startNodeId));\n \t\t\tmetaNodes.add(osmNodes.get(endNodeId));\n \t\t\t// for roundabouts use distance 0, so we can run around in circles at no cost\n //\t\t\tdouble distance = way.roundabout ? 0 : getDistance(osmNodes.get(startNodeId),osmNodes.get(endNodeId));\n \t\t\tdouble distance = getDistance(osmNodes.get(startNodeId),osmNodes.get(endNodeId));\n \t\t\tosmGraph.getNode(startNodeId).connectWithNodeWeigthAndMeta(osmGraph.getNode(endNodeId), distance,\n \t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, way.name, metaNodes));\n \t\t}\n \t}",
"void addEdge(int source, int destination, int weight);",
"private static void addWay(GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph,HashMap<Long, WayNodeOSM> osmNodes, OSMWay way) {\n \t\tfor (int j = 1; j < way.nodes.size(); ++j) {\n \t\t\t// get the star and end node of this segment of the way \n \t\t\tfinal Long startNodeId = way.nodes.get(j - 1);\n \t\t\tfinal Long endNodeId = way.nodes.get(j);\n \t\t\tcreateNodeIfNonexisting(osmGraph, startNodeId);\n \t\t\tcreateNodeIfNonexisting(osmGraph, endNodeId);\n \t\t\t// create the meta nodes for this segment\n \t\t\tfinal List<WayNodeOSM> metaNodes = new LinkedList<>();\n \t\t\tmetaNodes.add(osmNodes.get(startNodeId));\n \t\t\tmetaNodes.add(osmNodes.get(endNodeId));\n \t\t\t// for roundabouts use distance 0, so we can run around in circles at no cost\n \t\t\tdouble distance = way.roundabout ? 0 : getDistance(osmNodes.get(startNodeId),osmNodes.get(endNodeId));\n \t\t\tosmGraph.getNode(startNodeId).connectWithNodeWeigthAndMeta(osmGraph.getNode(endNodeId), distance,\n \t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, way.name, metaNodes));\n \t\t\tif(!way.directed && (startNodeId != endNodeId)) {\n \t\t\t\t//a loop must not be doubled, no need for it\n \t\t\t\tosmGraph.getNode(endNodeId).connectWithNodeWeigthAndMeta(osmGraph.getNode(startNodeId), distance,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, way.name, metaNodes));\n \t\t\t}\n \t\t}\n \t}",
"@Override\n public boolean addConnection(String firstNodeName, String secondNodeName) throws NodeException {\n\n try {\n if (containsNode(getSingleNode(firstNodeName)) && containsNode(getSingleNode(secondNodeName))) {\n getSingleNode(firstNodeName).newNeighbour(getSingleNode(secondNodeName));\n getSingleNode(secondNodeName).newNeighbour(getSingleNode(firstNodeName));\n return true;\n }\n } catch (NodeException e) {\n throw new NodeException(\"Jeden z Vámi zadaných prvků neexistuje!\");\n }\n\n return false;\n }",
"private int dist(int city1, int city2){\n\t\treturn this.getGraph().getWeight(city1, city2);\n\t}",
"public void connect(int node1, int node2, double w)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2) && (node1 != node2))\n\t{\n\t \tNode n1 = (Node)getNodes().get(node1);\n\t\t Node n2 = (Node)getNodes().get(node2);\n\t\t\n\t\tif(!n1.hasNi(node2)&&!n2.hasNi(node1))\n\t\t{\n\t\t\tEdge e=new Edge(w,node1,node2);\n\t\t\tn1.addEdge(e);\n\t\t\tn2.addEdge(e);\n\t\t\tmc++;//adding an edge\n\t\t\tedge_size++;\n\t\t}\n\t\telse\n\t\t\t// if the edge already exist in the HashMap of the two nodes\n\t\t\t//we want only update the weight of the edge.\n\t\t{\n\t\t\tn1.getEdgesOf().get(node2).set_weight(w);\n\t\t\tn2.getEdgesOf().get(node1).set_weight(w);\n\t\t}\n\t\t\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"src or dst doesnt exist OR src equals to dest\");\n\t}\n}",
"private boolean addRoad(\n String fromName, String toName, double roadDistance, String roadName\n ) {\n Vertex<String> from = addLocation(fromName);\n Vertex<String> to = addLocation(toName);\n\n // Add the road to the network - We assume all roads are two-way and\n // ignore if we've already added the road as a reverse of another\n try {\n\n Edge<String> road = graph.insert(from, to, roadName);\n Edge<String> backwardsRoad = graph.insert(to, from, roadName);\n\n // Label each road with it's weight\n graph.label(road, roadDistance);\n graph.label(backwardsRoad, roadDistance);\n\n } catch (InsertionException ignored) {\n return false;\n }\n\n return true;\n }",
"public void addEdge(Node source, Node destination, int weight) {\n nodes.add(source);\n nodes.add(destination);\n checkEdgeExistance(source, destination, weight);\n\n if (!directed && source != destination) {\n checkEdgeExistance(destination, source, weight);\n }\n }",
"double getRouteCost(Graph g){\n double totalCost = 0;\n double matrixWeights[][] = g.getMatrixOfWeights(); //get the matrix of weights from the class Graph\n for(int i=0;i<cityIndex.size()-1;i++){\n //the cost is calculated by computing the route from one index to the next since the representation is\n // a permutation\n totalCost = totalCost + matrixWeights[cityIndex.get(i)][cityIndex.get(i+1)];\n }\n totalCost = totalCost+matrixWeights[cityIndex.get(cityIndex.size()-1)][cityIndex.get(0)]; //To Return back from the\n // last to the first city\n return totalCost;\n }",
"@Override\n public ArrayList<GraphEdge> getRoute(GraphNode a, GraphNode b) {\n \tHashMap<GraphNode, Double> distances = new HashMap<GraphNode, Double>();\n \tHashMap<GraphNode, GraphEdge> predecessor = new HashMap<GraphNode, GraphEdge>();\n \tHashSet<GraphNode> visited = new HashSet<GraphNode>();\n \t\n \tArrayList<GraphEdge> result = new ArrayList<GraphEdge>();\n\t\n \t//Initialize distances, predecessor, and visited\n \tfor(GraphNode g : drivableNodes) {\n \t distances.put(g, Double.MAX_VALUE);\n \t predecessor.put(g, null);\n \t}\n \t\n \tint remaining = drivableNodes.size();\n \t\n \t//Put starting node\n \tdistances.put(a, 0.0);\n \t//predecessor.put(a, null);\n \t\n \t//Main loop\n \twhile(remaining > 0) {\n \t GraphNode closest = null;\n \t double minDist = Double.MAX_VALUE;\n\n \t for(GraphNode n : distances.keySet()) {\n \t\tdouble dist = distances.get(n);\n \t\tif(!visited.contains(n) &&\n \t\t\tdist != Double.MAX_VALUE &&\n \t\t\t(minDist == Double.MAX_VALUE || dist < minDist)) {\n \t\t closest = n;\n \t\t minDist = dist;\n \t\t}\n \t }\n \t \n \t if(closest == null)\n \t\treturn null;\n \t \n \t if(closest.equals(b))\n \t\tbreak;\n \t \n \t visited.add(closest);\n \t \n \t for(GraphEdge edge : closest.getEdges()) {\n \t\tGraphNode adjacent = edge.getOtherNode(closest);\n \t\tif(adjacent != null && !visited.contains(adjacent)) {\n \t\t //Map distance value for the other Node\n \t\t double otherDist = distances.get(adjacent);\n \t\t //Weight of edge from closest node to adjacent node\n \t\t double weight = edge.getWeight();\n \t\t String way = edge.getWay();\n \t\t \n \t\t if(otherDist == Double.MAX_VALUE ||\n \t\t\t weight + minDist < otherDist) {\n \t\t\tdistances.put(adjacent, weight + minDist);\n \t\t\t\n \t\t\t//Make new edge in correct order\n \t\t\tGraphEdge corrected = new GraphEdge(closest, adjacent, weight, way);\n \t\t\t\n \t\t\tpredecessor.put(adjacent, corrected);\n \t\t }\n \t\t}\n \t }\n\n \t remaining--;\n \t}\n \t\n \t//Backtrack to build route\n \tif(distances.get(b) == Double.MAX_VALUE) {\n \t return null;\n \t} else {\n \t //buildPath(predecessor, a, b, result);\n \t //Non recursive version\n \t Stack<GraphEdge> stack = new Stack<GraphEdge>(); \n \t while(!b.equals(a)) {\n \t\tGraphEdge edge = predecessor.get(b);\n \t\t\n \t\t//Make sure vertices are in correct order\n \t\tGraphNode start = edge.getOtherNode(b);\n \t\t//double weight = edge.getWeight();\n \t\t//GraphEdge corrected = new GraphEdge(start, b, weight);\n \t\t\n \t\tstack.push(edge);\n \t\tb = start;\n \t }\n \t \n \t while(!stack.isEmpty()) {\n \t\tGraphEdge edge = stack.pop();\n \t\tresult.add(edge);\n \t }\n \t}\n \t\n\treturn result;\n }",
"public Road(Place A, Place B)\n\t{\n\t\tEmpire roadEmpire = Empire.getInstance();\n\t\t\n\t\tint intXA, intYA, intXB, intYB;\n\t\tdouble xA, yA, xB, yB;\n\t\t\n\t\tintXA = A.getXPosition();\n\t\tintYA = A.getYPosition();\n\t\tintXB = B.getXPosition();\n\t\tintYB = B.getYPosition();\n\t\t\n\t\txA = (double) intXA;\n\t\tyA = (double) intYA;\n\t\txB = (double) intXB;\n\t\tyB = (double) intYB;\n\t\t\n\t\taPoint = new Point((int) xA, (int) yA);\n\t\tbPoint = new Point((int) xB, (int) yB);\n\t\t\n\t\taName = A.getName();\n\t\tbName = B.getName();\n\t\t\n\t\tlength = Math.sqrt((((xA-xB)*(xA-xB) + (yA - yB)*(yA - yB))));\n\t\tkFactor = (yB - yA)/(xB-xA);\n\t\t\n\t\troad.add(new Point(intXA, intYA));\n\t\t\n\t\tString keyA = String.valueOf(intXA) + \"-\" + String.valueOf(intYA);\n\t\tif(!roadEmpire.POINTS.containsKey(keyA));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXA,intYA);\n\t\t\troadEmpire.POINTS.put(keyA, m);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif((xA == xB) && (yA == yB))\n\t\t{\n\t\t\tdirection = Direction.NONE;\n\t\t}\n\t\telse if(xA == xB)\n\t\t{\n\t\t\tif(yB > yA)\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH;\n\t\t\t}\t\t\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x = (int) xA;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tif(yB > yA)\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if(yA == yB)\n\t\t{\n\t\t\tif(xB > xA)\n\t\t\t{\n\t\t\t\tdirection = Direction.EAST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.WEST;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y = (int)yA;\n\t\t\t\t\n\t\t\t\tif(xB > xA)\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_EAST;\n\t\t\t}\n\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t{\t\n\t\t\t\tdirection = Direction.NORTH_EAST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_WEST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH_WEST;\n\t\t\t}\n\t\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tdouble c = (double) i;\n\t\t\t\tdouble a = c/(Math.sqrt((kFactor*kFactor + 1.0))); \n\t\t\t\tdouble b = Math.abs(a*kFactor);\n\t\t\t\t\n\t\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = 100;\n\t\t\t\t\ty = 100;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point (x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t\t\n\t\troad.add(new Point(intXB, intYB));\n\t\t\n\t\tString keyB = String.valueOf(intXB) + \"-\" + String.valueOf(intYB);\n\t\tif(!roadEmpire.POINTS.containsKey(keyB));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXB,intYB);\n\t\t\troadEmpire.POINTS.put(keyB, m);\n\t\t}\n\t}",
"public boolean addConnection(GraphNode nodeA, GraphNode nodeB){\n nodeA.addAdjacent(nodeB);\n nodeB.addAdjacent(nodeA);\n if(nodeA.getAdjacent().contains(nodeB) && nodeB.getAdjacent().contains(nodeA))\n return true;\n else\n return false;\n }",
"public void findNewAStarPath(PedSimCity state) {\n\n\t\tRouteData route = new RouteData();\n\t\troute.origin = originNode.getID();\n\t\troute.destination = destinationNode.getID();\n\t\t//\t\toriginNode = PedSimCity.nodesMap.get(9406);\n\t\t//\t\tdestinationNode = PedSimCity.nodesMap.get(4456);\n\n\t\tif (UserParameters.empiricalABM) {\n\t\t\tSystem.out.println(\" Agent nr. \"+this.agentID + \" group \" + this.agp.groupName + \" OD \" + originNode.getID()+\" \" +destinationNode.getID());\n\t\t\tagp.defineRouteChoiceParameters();\n\t\t\tCombinedNavigation combinedNavigation = new CombinedNavigation();\n\t\t\tnewPath = combinedNavigation.path(originNode, destinationNode, agp);\n\t\t\troute.group = this.agp.groupID;\n\t\t\troute.localH = this.agp.localHeuristic;\n\t\t\troute.routeID = this.agentID.toString()+\"-\"+originNode.getID().toString()+\"-\"+destinationNode.getID().toString();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(originNode.getID() + \" \"+ destinationNode.getID()+ \" \"+ap.routeChoice);\n\t\t\tselectRouteChoice();\n\t\t\troute.routeChoice = ap.routeChoice;\n\t\t\t//\t\t\troute.routeID = numTrips;\n\t\t}\n\n\t\tList<Integer> sequenceEdges = new ArrayList<Integer>();\n\n\t\tfor (GeomPlanarGraphDirectedEdge o : newPath) {\n\t\t\t// update edge data\n\t\t\tupdateEdgeData((EdgeGraph) o.getEdge());\n\t\t\tint edgeID = ((EdgeGraph) o.getEdge()).getID();\n\t\t\tsequenceEdges.add(edgeID);\n\t\t}\n\t\troute.sequenceEdges = sequenceEdges;\n\t\tPedSimCity.routesData.add(route);\n\t\tindexOnPath = 0;\n\t\tpath = newPath;\n\n\t\t// set up how to traverse this first link\n\t\tEdgeGraph firstEdge = (EdgeGraph) newPath.get(0).getEdge();\n\t\tsetupEdge(firstEdge); //Sets the Agent up to proceed along an Edge\n\n\t\t// update the current position for this link\n\t\tupdatePosition(segment.extractPoint(currentIndex));\n\t\tnumTrips += 1;\n\t}",
"public void addEdge(String node1, String node2) {\n\r\n LinkedHashSet<String> adjacent = map.get(node1);\r\n// checking to see if adjacent node exist or otherwise is null \r\n if (adjacent == null) {\r\n adjacent = new LinkedHashSet<String>();\r\n map.put(node1, adjacent);\r\n }\r\n adjacent.add(node2); // if exist we add the instance node to adjacency list\r\n }",
"private void makeRoute(Route route, AbstractPort location1, AbstractPort location2) {\n route.add(location1);\n route.add(closestCrossing(location1.getLocation(), location2.getLocation()));\n route.add(location2);\n registerGameObject(route);\n }",
"public void addTwoWayVertex(String node1, String node2) {\r\n addEdge(node1, node2);\r\n addEdge(node2, node1);\r\n }",
"public void shortestRouteDijkstra(){\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n\n shortestRouteDij(lm1, lm2);\n }",
"private Path(Path other){\n\t\t\n\t\tthis.source = other.source;\n\t\tthis.destination = other.destination;\n\t\tthis.cities = other.cities;\n\t\t\n\t\tthis.cost = other.cost;\n\t\tthis.destination = other.destination;\n\t\t\n\t\tthis.connections = new LinkedList<Connection>();\n\t\t\n\t\tfor (Connection c : other.connections){\n\t\t\tthis.connections.add((Connection) c.clone());\n\t\t}\n\t\t\n\t}",
"Integer distance(PathFindingNode a, PathFindingNode b);",
"private static void connect(City a, City b, int d){\n a.addConnection(b, d);\n b.addConnection(a, d);\n }",
"void addDirectedEdge(final Node first, final Node second)\n {\n if ( first == second )\n {\n return;\n }\n else if (first.connectedNodes.contains(second))\n return;\n else\n first.connectedNodes.add(second);\n }",
"public void addEdge( String sourceName, String destName , Double distance)\n {\n Vertex v = getVertex( sourceName );\n Vertex w = getVertex( destName );\n v.adjEdge.put(w.name, new Edge(w,distance) );\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"public IEdge addEdge(String from, String to, Double cost);",
"public static void connectNetwork(int src, int dest, boolean printPath)\r\n\t{\r\n\t\tint v = routers;\r\n\t\t\r\n\t\tint parent[] = new int[v];//parent node array\r\n\t\tint dist[] = new int[v];// distance array\r\n\t\tboolean visited[] = new boolean[v];// visited will be either true or false\r\n\t\t\r\n\t\t// initialize parent, distance arrays\r\n\t\tfor (int i = 0; i < v; i++ ) { \r\n\t\t\tvisited[i] = false;\r\n\t\t\tparent[i] = -1;\r\n\t\t\tdist[i] = Integer.MAX_VALUE;\r\n\t\t}\r\n\t\t\r\n\t\t// initialize the source distance as zero\r\n\t\tdist[src] = 0;\r\n\t\t\r\n\t\t// get minimum edge from the unvisited nodes\r\n\t\tfor (int count = 0; count < v-1; count++) { // loop for all v nodes\r\n\t\t\t\r\n\t\t\tint start = -1;\r\n\t\t\tint min = Integer.MAX_VALUE;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\tif (visited[i] == false && dist[i] < min) {\r\n\t\t\t\t\tmin = dist[i];\r\n\t\t\t\t\tstart = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// minimum distance is computed for all connected edges\r\n\t\t\tif (start == -1) \r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t// update the current node as visited\r\n\t\t\tvisited[start] = true;\r\n\t\t\t\r\n\t\t\t// update all adjacent nodes' distance array\r\n\t\t\tfor (int end = 0; end < v; end++) {\r\n\t\t\t\tif ((visited[end] != true) && (graph[start][end] != -1) &&\r\n\t\t\t\t\t\t(dist[start] != Integer.MAX_VALUE) &&\r\n\t\t\t\t\t\t(dist[start] + graph[start][end] < dist[end])) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdist[end] = dist[start] + graph[start][end];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// start node is the parent node in BFS tree\r\n\t\t\t\t\tparent[end] = start;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tif (dest != -1) {\r\n\t\t\t\r\n\t\t\t// Case#4: shortest path between source and destination nodes \r\n\t\t\tif (parent[dest] == -1) {\r\n\t\t\t\tSystem.out.println(\"There is no path from \" + (src+1) + \" to \" + (dest+1) + \" exists.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Shortest distance from \" + (src+1) + \" to \" + (dest+1) + \" is: \" + dist[dest]);\r\n\t\t\t\tSystem.out.print(\"Corresponding Shortest Path is: \");\r\n\t\t\t\tprintNodes(parent, parent[dest], src);\r\n\t\t\t\tSystem.out.println(dest+1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n System.out.println(\"The Shortest Distance from node you entered, \"+ (src+1) + \" are\\n\");\r\n //Printing shortest path length\r\n\t\t\tSystem.out.println(\"Destination\\tDistance\\n========================\");\r\n for (int i = 0; i < v; i++) {\r\n System.out.println(\"\\t\"+ (i+1) + \"\\t \"+ dist[i]); // Printing the node number and distance\r\n }\r\n \r\n\t\t\tif (printPath == true) {\r\n\t\t\t\t\r\n\t\t\t\t// case#2: Print all shortest paths from source node\r\n\t\t\t\tfor (int i = 0; i < v; i++) {\r\n\t\t\t\t\tif (i == src)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse if (parent[i] == -1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Shortest path from \" + (src+1) + \" to \" + (i+1) + \" doesn't exist.\");\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.print(\"Shortest Path from \" + (src+1) + \" to \" + (i+1) + \" is: \");\r\n\t\t\t\t\tprintNodes(parent, parent[i], src);\r\n\t\t\t\t\tSystem.out.println(i+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void connect(T value1, T value2, int weight) {\n Vertex<T> from = vertices.get(value1);\n Vertex<T> to = vertices.get(value2);\n from.addNeighbor(to, weight);\n\n }",
"public boolean addEdge(Vertex one,Vertex two,int weight)\n\t{\n\t\tif (one.equals(two)) { return false; }\n\t\t\n\t\t//check that edge is not in graph\n\t\tEdge e = new Edge(one,two,weight);\n\t\t//future location to increment trips along\n\t\t//the same path\n\t\tif (edges.containsKey(e.hashCode()))\n\t\t{\n\t\t\te.addTrip();//does not work\n\t\t\treturn false;\n\t\t}\n\t\t//check that edge is not incident to either vertex\n\t\telse if (one.containsNeighbor(e) || two.containsNeighbor(e))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tedges.put(e.hashCode(), e);\n\t\tone.addNeighbor(e);\n\t\ttwo.addNeighbor(e);\n\t\treturn true;\n\t}",
"public void addPath(int startRoom, int door, int destinationRoom){\r\n\t\tEdge e= new Edge(startRoom,door,destinationRoom);\r\n\t\tprint(\"Adding edge \"+e);\r\n\t\tBoolean flag=false;\r\n\t\tif(startPaths.containsKey(startRoom)){\r\n\t\t\tprint(\"Start path contains \"+startRoom);\r\n\t\t\tfor(int i=0;i<startPaths.get(startRoom).size();i++){\r\n\t\t\t\tif(e.equals(startPaths.get(i))){\r\n\t\t\t\t\tflag=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(flag==false){\r\n\t\t\tstartPaths.get(startRoom).add(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tVector<Edge> v= new Vector<Edge>();\r\n\t\t\tv.add(e);\r\n\t\t\tstartPaths.put(startRoom, v);\r\n\t\t}\r\n\r\n\t\tif(destinationPaths.containsKey(destinationRoom)){\r\n\t\t\tprint(\"Destination path contains \"+destinationRoom);\r\n\t\t\tfor(int i=0;i<destinationPaths.get(destinationRoom).size();i++){\r\n\t\t\t\tif(e.equals(destinationPaths.get(i))){\r\n\t\t\t\t\tflag=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(flag==false){\r\n\t\t\t\tdestinationPaths.get(destinationRoom).add(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tVector<Edge> v= new Vector<Edge>();\r\n\t\t\tv.add(e);\r\n\t\t\tdestinationPaths.put(destinationRoom, v);\r\n\t\t}\r\n\t}",
"public void addEdge(DijkstraNode dn1, DijkstraNode dn2, int distance) {\n DijkstraEdge de = new DijkstraEdge(dn1, dn2, distance);\n addToMap(dn1,de);\n addToMap(dn2,de);\n }",
"private void addEdge(int node1, int node2, int cost, int bandwidth) throws IllegalArgumentException {\n // We can't add edges between non-existent nodes\n int nodeCount = mGraph.getNodeCount();\n if (node1 >= nodeCount || node2 >= nodeCount) {\n throw new IllegalArgumentException();\n }\n\n // Add forward edge\n int edgeCount = mGraph.getEdgeCount() / 2;\n\n Edge forward = mGraph.addEdge(String.valueOf(edgeCount + \"f\"), node1, node2, true);\n forward.addAttribute(\"ui.label\", String.valueOf(edgeCount));\n forward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n forward.addAttribute(\"cost\", cost);\n\n // Add backward edge\n Edge backward = mGraph.addEdge(String.valueOf(edgeCount + \"b\"), node2, node1, true);\n backward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n backward.addAttribute(\"cost\", cost);\n\n // Add edge to the SimpleEdge list\n mEdgeList.add(new SimpleEdge(node1, node2, cost, bandwidth));\n }",
"public void addEdge(T source, T destination, Path length) {\n\t\tif (source == null || destination == null) {\n\t\t\tthrow new NullPointerException(\n\t\t\t\t\t\"Source and Destination, both should be non-null.\");\n\t\t}\n\t\tif (!graph.containsKey(source) || !graph.containsKey(destination)) {\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"Source and Destination, both should be part of graph\");\n\t\t}\n\t\t/* A node would always be added so no point returning true or false */\n\t\tgraph.get(source).put(destination, length);\n\t}",
"public boolean addEdge(NodeType nodeA, NodeType nodeB, WeightType weight) {\n\n\t\tif ( nodeA == null || nodeB == null )\n\t\t\treturn false;\n\n\t\tif ( !partitionMap.containsKey( nodeA ) ) { \n\t\t\tSystem.out.println(\"partA doesn't contain nodeA \" + nodeA);\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !partitionMap.containsKey( nodeB ) ) {\n\t\t\tSystem.out.println(\"partB doesn't contain nodeB \" + nodeB);\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( partitionMap.get(nodeA).equals( partitionMap.get(nodeB) ) ){\n\t\t\tSystem.out.println(\"nodeA equals nodeB\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn super.addEdge( nodeA, nodeB, weight );\n\t}",
"private static void shortestPathFinder(Graph graph, Character userCity, int algoNum) {\n\n // Finds and stores the City that corresponds to the cityName input\n City currentCity = graph.cityOf(userCity);\n\n // Array List to store every City that was visited by the current one\n ArrayList<Character> citiesVisited = new ArrayList<>();\n\n // Adds the cityName of the input userCity\n citiesVisited.add(userCity);\n\n // Creates a Stack to store and manage all Cities visited\n Stack<City> visitingCities = new Stack<>();\n\n // Loops over each City object in the graph until currentCity becomes the final destinantion Z.\n while (!(currentCity.equals(graph.cityOf('Z')))) {\n // As long as we startCity did not reach the final destination, it means it has visited the\n // previous City object, therefore:\n\n // Adds currentCity to the stack\n visitingCities.add(currentCity);\n\n // Sets true to setCitiesVisited() as it has been visited\n currentCity.setCitiesVisited(true);\n\n // It will also be included to the shortest path\n currentCity.setItIsTheShortest(true);\n\n // Gets all the edges that are connected to the current City we are on\n ArrayList<Edge> cityEdges = currentCity.getCityEdges();\n\n // Temporary City object to update currentCity\n City nextCity = null;\n\n // Integer to track the shortest distance (weight + direct distance) for heuristic algorithm 2\n int weightDistanceTotal = Integer.MAX_VALUE;\n\n // Loop to keep track of currentCity as it advances to the final destination\n // It iterates over edges of currentCity and chooses among its edges Cities that have not been\n // visited yet, using either algorithm 1 or algorithm 2 based on the method input above.\n // the loop terminates if the final currentCity becomes the final destination Z\n // It also terminates after iterating over all edges and choosing the one with the City that\n // has the shortest direct distance to final destination Z\n for (Edge edge: cityEdges) {\n\n // Checks if City of this edge was visited. If so, it continues to check the next edge\n if (edge.getAdjacentCity().getCitiesVisited()) {\n\n // Continues to the next edge\n continue;\n }\n\n // 2. assign the next City to the destination\n if (nextCity == null) {\n\n // Updates nextCity to be adjacent City\n nextCity = edge.getAdjacentCity();\n\n } else {\n\n // Checks which algorithm is being called, and executes the right one\n if (algoNum == 1) {\n if (nextCity.getCityToDestination() > edge.getAdjacentCity().getCityToDestination()) {\n nextCity = edge.getAdjacentCity();\n }\n\n // if algorithm 1 was not chosen, it executes algorithm 2 in the else block bellow\n } else {\n weightDistanceTotalCity cityWithWeightDistanceTotal =\n weightPlusDistanceAlgorithm(nextCity, edge, weightDistanceTotal);\n nextCity = cityWithWeightDistanceTotal.city;\n weightDistanceTotal = cityWithWeightDistanceTotal.weightDistanceTotal;\n }\n }\n }\n\n // If nextCity is still null, it means that its edge was skipped in the for loop above,\n // because it has already been visited by checking if getCitiesVisited() returns true\n if (nextCity == null) {\n\n // Pops off the City we just visited, and flag it to be not the shortest distant City\n visitingCities.pop().setItIsTheShortest(false);\n\n // Sets the next City to the previous one\n nextCity = visitingCities.pop();\n }\n\n // Adds the City name that was visited to keep track of the path\n citiesVisited.add(nextCity.getName());\n\n // CurrentCity is updated to be the next City\n currentCity = nextCity;\n\n // When visiting the last City mark z in the shortest path found\n if (currentCity.getName() == 'Z') {\n currentCity.setItIsTheShortest(true);\n }\n }\n\n // Tracks the path visited and adds up all the weights of the path found\n int pathCounter = 0;\n\n // Constructs the shortest path found\n ArrayList<City> shortestPath = new ArrayList<>();\n\n for (Character tempCity: citiesVisited) {\n // Gets the City of cityVisitor\n City city = graph.cityOf(tempCity);\n\n // Adds to the shortest path found\n if (city.getItIsTheShortest() && !shortestPath.contains(city)) {\n shortestPath.add(city);\n }\n }\n\n // Prints out the shortest path found\n for (int i = 0; i < shortestPath.size() - 1; i++) {\n currentCity = shortestPath.get(i);\n City nextCity = shortestPath.get(i + 1);\n\n // find the weight of that City\n int weight = currentCity.findWeight(nextCity);\n pathCounter += weight;\n }\n\n // Constructs the final output\n String fullPathSequence = \"\";\n String citiesVisitedAsString = \"\";\n\n for (int i = 0; i < citiesVisited.size(); i++) {\n if (i != citiesVisited.size() - 1) {\n fullPathSequence += citiesVisited.get(i) + \" -> \";\n }\n }\n\n // Constructs a string to store all cityNames\n fullPathSequence += citiesVisited.get(citiesVisited.size() - 1);\n\n for (int i = 0; i < shortestPath.size(); i++) {\n if (i != shortestPath.size() - 1) {\n citiesVisitedAsString += shortestPath.get(i).getName() + \" -> \";\n }\n }\n\n if (currentCity.getName() == 'Z') {\n citiesVisitedAsString += \"Z\";\n } else {\n citiesVisitedAsString += shortestPath.get(shortestPath.size() - 1).getName();\n }\n\n // Prints out the String results.\n System.out.println(\"Algorithm \" + algoNum + \":\\nSequence of all Cities: \" + fullPathSequence\n + \"\\nShortest path: \" + citiesVisitedAsString + \"\\nShortest path length: \" + pathCounter + \"\\n\");\n }",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}",
"public void connect(ASNode node) {\n\n\t\t/* Create new paths for this node and other node */\n\t\tArrayList<ASNode> newPath1 = new ArrayList<ASNode>();\n\t\tArrayList<ASNode> newPath2 = new ArrayList<ASNode>();\n\t\tnewPath1.add(node);\n\t\tnewPath2.add(this);\n\t\t/* Adds the Node to each others maps to get ready for exchange */\n\t\tMap<Integer, ArrayList<ASNode>> map1 = addNodeToTable(this, paths);\n\t\tMap<Integer, ArrayList<ASNode>> map2 = addNodeToTable(node,\n\t\t\t\tnode.getPaths());\n\n\t\t/* put new path into this node */\n\t\tpaths.put(node.getASNum(), newPath1);\n\t\tmap1.put(this.ASNum, newPath2);\n\t\t/* put new path into other node */\n\t\tnode.setPathsCombine(map1);\n\t\t/* exchange maps and see if any path if shorter, if shorter than adjust */\n\t\tsetPathsCombine(map2);\n\t\t/* Add each other as neighbors */\n\t\tneighbors.add(node);\n\t\tnode.getNeighbors().add(this);\n\t\t\n\t\t/* Announce each other's paths */\n\t\tnode.announce(this);\n\t\tannounce(node);\n\t\t\n\t\t// Exchange IP tables\n\t\tfor (PrefixPair p : IPTable.keySet()) {\n\t\t\tNextPair n = new NextPair(this, IPTable.get(p).length);\n\t\t\tannounceIP(p, n);\n\t\t}\n\t\tfor (PrefixPair p : node.IPTable.keySet()) {\n\t\t\tNextPair n = new NextPair(node, node.IPTable.get(p).length);\n\t\t\tnode.announceIP(p, n);\n\t\t}\n\t\tfor (PrefixPair p : IPTable.keySet()) {\n\t\t\tNextPair n = new NextPair(this, IPTable.get(p).length);\n\t\t\tannounceIP(p, n);\n\t\t}\n\t}",
"@Test\n public void directedRouting() {\n EdgeIteratorState rightNorth, rightSouth, leftSouth, leftNorth;\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(3, 4).setDistance(3).set(speedEnc, 10, 10);\n rightNorth = graph.edge(4, 10).setDistance(1).set(speedEnc, 10, 10);\n rightSouth = graph.edge(10, 5).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(5, 6).setDistance(2).set(speedEnc, 10, 10);\n graph.edge(6, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 7).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(7, 8).setDistance(9).set(speedEnc, 10, 10);\n leftSouth = graph.edge(8, 9).setDistance(1).set(speedEnc, 10, 10);\n leftNorth = graph.edge(9, 0).setDistance(1).set(speedEnc, 10, 10);\n\n // make paths fully deterministic by applying some turn costs at junction node 2\n setTurnCost(7, 2, 3, 1);\n setTurnCost(7, 2, 6, 3);\n setTurnCost(1, 2, 3, 5);\n setTurnCost(1, 2, 6, 7);\n setTurnCost(1, 2, 7, 9);\n\n final double unitEdgeWeight = 0.1;\n assertPath(calcPath(9, 9, leftNorth.getEdge(), leftSouth.getEdge()),\n 23 * unitEdgeWeight + 5, 23, (long) ((23 * unitEdgeWeight + 5) * 1000),\n nodes(9, 0, 1, 2, 3, 4, 10, 5, 6, 2, 7, 8, 9));\n assertPath(calcPath(9, 9, leftSouth.getEdge(), leftNorth.getEdge()),\n 14 * unitEdgeWeight, 14, (long) ((14 * unitEdgeWeight) * 1000),\n nodes(9, 8, 7, 2, 1, 0, 9));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightSouth.getEdge()),\n 15 * unitEdgeWeight + 3, 15, (long) ((15 * unitEdgeWeight + 3) * 1000),\n nodes(9, 8, 7, 2, 6, 5, 10));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightNorth.getEdge()),\n 16 * unitEdgeWeight + 1, 16, (long) ((16 * unitEdgeWeight + 1) * 1000),\n nodes(9, 8, 7, 2, 3, 4, 10));\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cities = Integer.parseInt(sc.nextLine());\n\t\tint roads = Integer.parseInt(sc.nextLine());\n\n EdgeWeightedGraph graphObj = new EdgeWeightedGraph(cities);\n for (int i = 0; i < roads; i++) {\n String way = sc.nextLine();\n String[] tokens = way.split(\" \");\n graphObj.addEdge(new Edge(Integer.parseInt(tokens[0]),\n Integer.parseInt(tokens[1]), Double.parseDouble(tokens[2])));\n }\n\n\t\tString caseToGo = sc.nextLine();\n\t\tswitch (caseToGo) {\n\t\tcase \"Graph\":\n\t\t\t//Print the Graph Object.\n\t\t System.out.println(graphObj);\n\t\t\tbreak;\n\n\t\tcase \"DirectedPaths\":\n\t\t\t// Handle the case of DirectedPaths, where two integers are given.\n\t\t\t// First is the source and second is the path[1].\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t String[] path = sc.nextLine().split(\" \");\n\t\t int source = Integer.parseInt(path[0]);\n\t\t int destiny = Integer.parseInt(path[1]);\n\t\t\tDijkstraUndirectedSP pathObj = new DijkstraUndirectedSP(graphObj, source);\n\t\t\tif(pathObj.hasPathTo(destiny)) {\n\t\t\t\tSystem.out.println(pathObj.distTo(destiny));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No Path Found.\");\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase \"ViaPaths\":\n\t\t\t// Handle the case of ViaPaths, where three integers are given.\n\t\t\t// First is the source and second is the via is the one where path should pass throuh.\n\t\t\t// third is the path[1].\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t String[] path1 = sc.nextLine().split(\" \");\n\t\t int source1 = Integer.parseInt(path1[0]);\n\t\t int via = Integer.parseInt(path1[1]);\n\t\t int destiny1 = Integer.parseInt(path1[2]);\n\n\t\t\tDijkstraUndirectedSP path1Obj = new DijkstraUndirectedSP(graphObj, source1);\n\t\t\tif(path1Obj.hasPathTo(via)) {\n\n\t\t\t\tDijkstraUndirectedSP viaObj = new DijkstraUndirectedSP(graphObj, via);\n\t\t\t\tif(viaObj.hasPathTo(destiny1)) {\n\t\t\t\t\tdouble dist = path1Obj.distTo(via);\n\t\t\t\t\tdist += viaObj.distTo(destiny1);\n\t\t\t\t\tSystem.out.println(dist);\n\n\t\t\t\tList<Integer> arraylist = new List<Integer>();\n\t\t\t\t\tString srcvia = path1Obj.pathTo(via)+\"\"+viaObj.pathTo(destiny1);\n\t\t\t\t\t//System.out.println(srcvia);\n\t\t\t\t \tString[] temp = srcvia.split(\" \");\n\t\t\t\t \tString[] temp1 = temp[0].split(\"-\");\n\t\t\t\t \tString[] temp2 = temp[2].split(\"-\");\n\t\t\t\t \tString[] temp3 = temp[4].split(\"-\");\n\t\t\t\t \tString[] temp4 = temp[6].split(\"-\");\n\t\t\t\t \tString[] temp5 = temp[8].split(\"-\");\n\n\t\t\t\t// \tString[] val = temp[1].split(\" \");\n\t\t\t\t \tarraylist.add(Integer.parseInt(temp1[1]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp1[0]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp3[1]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp3[0]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp5[1]));\n\t\t\t\t\tarraylist.add(Integer.parseInt(temp5[0]));\n\n\n\n\n\n\n\t\t\t\tSystem.out.println(arraylist);\n\n\n\n\t\t\t\t\t//System.out.println(path1Obj.pathTo(via)+\"\"+viaObj.pathTo(destiny1));\n\t\t\t}\n\n\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No Path Found.\");\n\t\t\t}\n\t\t}\n\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}",
"private Route calculate(String fromStation, String toStation) {\n\t\tif (stations==null){\r\n\t\t\tSystem.out.println(\"DEBUG RUN OF DIJKSTRA.\");\r\n\t\t\tstations = new ArrayList<Station>();\r\n\t\t\tcreateDebugMap(stations);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Check if the stations exists\r\n\t\t */\r\n\t\tStation startStation = null, endStation = null;\r\n\r\n\t\t// Find starting station\r\n\t\tfor (Station thisStation : stations) {\r\n\t\t\tif (thisStation.stationName.equals(fromStation)) {\r\n\t\t\t\tSystem.out.println(\"Found startStaion in the Database\");\r\n\t\t\t\tstartStation = thisStation;\r\n\t\t\t}\r\n\t\t\tif (thisStation.stationName.equals(toStation)) {\r\n\t\t\t\tSystem.out.println(\"Found endStation in the Database\");\r\n\t\t\t\tendStation = thisStation;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Station not found. Break\r\n\t\tif (startStation == null || endStation == null) {\r\n\t\t\tSystem.out.println(\"Shit! One of the stations could not be found\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Declare the variables for the algorithm\r\n\t\t */\r\n\r\n\t\t// ArrayList for keeping track of stations we have visited.\r\n\t\tArrayList<Station> visitedStations = new ArrayList<Station>();\r\n\t\t// Array for the DijkstraStations. This type holds the current best cost and best link to it.\r\n\t\tArrayList<DijkstraStation> dijkstraStations = new ArrayList<DijkstraStation>();\r\n\r\n\t\t// The station we are examining neighbors from.\r\n\t\tDijkstraStation currentStation = new DijkstraStation(new Neighbor(startStation, 0, 0), 0, startStation);\r\n\r\n\t\t// PriorityQueue for sorting unvisited DijkstraStations.\r\n\t\tNeighBorDijktstraComparetor Dijkcomparator = new NeighBorDijktstraComparetor();\r\n\t\tPriorityQueue<DijkstraStation> unvisitedDijkstraStations;\r\n\t\tunvisitedDijkstraStations = new PriorityQueue<DijkstraStation>(100, Dijkcomparator);\r\n\r\n\t\t// Variable to keep track of the goal\r\n\t\tboolean goalFound = false; // did we find the goal yet\r\n\t\tint goalBestCost = Integer.MAX_VALUE; // did we find the goal yet\r\n\r\n\t\t// Add the start staion to the queue so that the loop will start with this staiton\r\n\t\tunvisitedDijkstraStations.add(currentStation);\r\n\t\tdijkstraStations.add(currentStation);\r\n\r\n\t\t/***************************\r\n\t\t * The Dijkstra algorithm loop.\r\n\t\t ***************************/\r\n\r\n\t\twhile (!unvisitedDijkstraStations.isEmpty()) {\r\n\t\t\t// Take the next station to examine from the queue and set the next station as the currentStation\r\n\t\t\tcurrentStation = unvisitedDijkstraStations.poll();\r\n\r\n\t\t\tSystem.out.println(\"\\n============= New loop passtrough =============\");\r\n\t\t\tSystem.out.println(\"Analysing neighbors of \" + currentStation.stationRef.stationName + \". Cost to this station is: \" + currentStation.totalCost);\r\n\r\n\t\t\t// Add visited so we dont visit again.\r\n\t\t\tvisitedStations.add(currentStation.stationRef);\r\n\r\n\t\t\t// break the algorithm if the current stations totalcost if bigger than the best cost of the goal\r\n\t\t\tif (goalBestCost < currentStation.totalCost) {\r\n\t\t\t\tSystem.out.println(\"Best route to the goal has been found. Best cost is: \" + goalBestCost\r\n\t\t\t\t\t\t+ \" (To reach current station is: \" + currentStation.totalCost + \")\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check all neighbors from the currentStation to the neighBorQueue so we can examine them\r\n\t\t\tfor (Neighbor thisNeighbor : currentStation.stationRef.neighbors) {\r\n\r\n\t\t\t\t// Skip stations we have already visited\r\n\t\t\t\tif (!visitedStations.contains(thisNeighbor.stationRef)) {\r\n\t\t\t\t\t// If we havent seen this station before\r\n\t\t\t\t\t// Add it to the list of Dijkstrastations and to the PriorityQueue of unvisited stations\r\n\t\t\t\t\tif (getDijkstraStationByID(thisNeighbor.stationRef.stationid, dijkstraStations) == null) {\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = new DijkstraStation(thisNeighbor, currentStation.totalCost\r\n\t\t\t\t\t\t\t\t+ thisNeighbor.cost, currentStation.stationRef);\r\n\t\t\t\t\t\tdijkstraStations.add(thisDijkstraStation);\r\n\t\t\t\t\t\tunvisitedDijkstraStations.offer(thisDijkstraStation);\r\n\r\n\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\tgoalFound = true;\r\n\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Goal station found :) Cost to goal is: \" + goalBestCost);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"New station seen: \" + thisDijkstraStation);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Station has been seen before.\r\n\r\n\t\t\t\t\t\t// Get the station as a DijkstraStation from the array\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = getDijkstraStationByID(thisNeighbor.stationRef.stationid,\r\n\t\t\t\t\t\t\t\tdijkstraStations);\r\n\r\n\t\t\t\t\t\t// Check if the connection is better than the one we already know\r\n\t\t\t\t\t\tif (currentStation.totalCost + thisNeighbor.cost < thisDijkstraStation.totalCost) {\r\n\r\n\t\t\t\t\t\t\t// New best link found\r\n\t\t\t\t\t\t\tSystem.out.println(\"New best route found for \" + thisNeighbor.stationRef.stationName);\r\n\t\t\t\t\t\t\tSystem.out.println(\"Old cost:\" + thisDijkstraStation.totalCost + \", New cost: \"\r\n\t\t\t\t\t\t\t\t\t+ (currentStation.totalCost + thisNeighbor.cost));\r\n\r\n\t\t\t\t\t\t\t// update the cost and via station on the DijkstraStation\r\n\t\t\t\t\t\t\tthisDijkstraStation.updateBestLink((int) (currentStation.totalCost + thisNeighbor.cost),\r\n\t\t\t\t\t\t\t\t\tcurrentStation.stationRef, thisNeighbor);\r\n\r\n\t\t\t\t\t\t\t// if this is the goal station, update the totalCost\r\n\t\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Updated cost for the goal to : \" + goalBestCost);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}// End while\r\n\r\n\t\t// Print the World:\r\n//\t\t System.out.println();\r\n//\t\t System.out.println(\"################# Printing the world ###################\");\r\n//\t\t for (DijkstraStation thisDijkstraStation : dijkstraStations) {\r\n//\t\t System.out.println(thisDijkstraStation.toString());\r\n//\t\t DijkstraStation tempStation = thisDijkstraStation;\r\n//\t\t System.out.print(\"BackTracking route =>\");\r\n//\t\t while (!tempStation.stationRef.equals(startStation)) {\r\n//\t\t System.out.print(\" \" + tempStation.cost + \" to \" + tempStation.viaStation.stationName + \" #\");\r\n//\t\t\r\n//\t\t tempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n//\t\t }\r\n//\t\t System.out.print(\" End\");\r\n//\t\t System.out.print(\"\\n\\n\");\r\n//\t\t }\r\n//\r\n\t\tif (goalFound) {\r\n\t\t\tSystem.out.println(\"Generating route to goal\");\r\n\t\t\t// create a route object with all the stations.\r\n\t\t\tRoute routeToGoal = new Route(fromStation, toStation);\r\n\t\t\t// get the goalStation as a DijkstraStation Type\r\n\t\t\tDijkstraStation goalStation = getDijkstraStationByID(endStation.stationid, dijkstraStations);\r\n\r\n\t\t\trouteToGoal.cost = goalStation.totalCost;\r\n\t\t\trouteToGoal.price = (int) goalStation.totalCost;\r\n\r\n\t\t\t// Find the route to the goal\r\n\t\t\tDijkstraStation tempStation = goalStation;\r\n\r\n\t\t\twhile (!tempStation.stationRef.equals(startStation)) {\r\n\t\t\t\t// Add the station to the route table\r\n\t\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.cost, tempStation.cost,\r\n\t\t\t\t\t\ttempStation.stationRef.stationName, tempStation.stationRef.stationid);\r\n\t\t\t\t\r\n\t\t\t\t//Fix region string\r\n\t\t\t\tString regionString=\"\";\r\n\t\t\t\tfor (Integer regionID : tempStation.stationRef.region) {\r\n\t\t\t\t\tregionString.concat(regionID+ \",\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tthisStation.region = regionString.substring(0, regionString.length() - 1);\r\n\t\t\t\t\r\n\t\t\t\t//Add the station\r\n\t\t\t\trouteToGoal.route.add(0, thisStation);\r\n\t\t\t\t// Go to the previous station\r\n\t\t\t\ttempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n\t\t\t}\r\n\t\t\t// add the starting station\r\n\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.stationRef.latitude, tempStation.stationRef.longitude, tempStation.stationRef.stationName,\r\n\t\t\t\t\ttempStation.stationRef.stationid);\r\n\t\t\trouteToGoal.route.add(0, thisStation);\r\n\r\n\t\t\t// print the route\r\n\t\t\t//System.out.println(\"Printing best route to the Goal:\\n\" + routeToGoal.toString());\r\n\r\n\t\t\treturn routeToGoal;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"public ImmutableNetwork<Node, Edge> buildGraph() {\n\n // MutableNetwork is an interface requiring a type for nodes and a type for edges\n MutableNetwork<Node, Edge> roads = NetworkBuilder.undirected().build();\n\n // Construct Nodes for cities,\n // and add them to a map\n String[] cities = {\"Wuhan\", \"shanghai\", \"Beijing\", \"Tianjin\", \"dalian\"};\n\n Map<String, Node> all_nodes = new TreeMap<String, Node>();\n for (int i = 0; i < cities.length; i++) {\n // Add nodes to map\n Node node = new Node(cities[i]);\n all_nodes.put(cities[i], node);\n\n // Add nodes to network\n roads.addNode(node);\n }\n\n // Construct Edges for roads,\n // and add them to a map\n String[] distances = {\"Wuhan:shanghai:9239\", \"Wuhan:Beijing:1103\", \"Wuhan:Tianjin:1162\", \"Wuhan:dalian:1423\", \"shanghai:Beijing:1214\", \"shanghai:Tianjin:20\", \"Beijing:Tianjin:4\", \"shanghai:dalian:1076\", \"Tianjin:dalian:802\" };\n //String[] distances = {\"A:B:10\",\"A:D:20\", \"A:C:15\", \"B:D:25\", \"B:C:35\" , \"C:D:30\"};\n Map<String, Edge> all_edges = new TreeMap<String, Edge>();\n for (int j = 0; j < distances.length; j++) {\n // Parse out (city1):(city2):(distance)\n String[] splitresult = distances[j].split(\":\");\n String left = splitresult[0];\n String right = splitresult[1];\n String label = left + \":\" + right;\n int value = Integer.parseInt(splitresult[2]);\n\n // Add edges to map\n Edge edge = new Edge(left, right, value);\n all_edges.put(label, edge);\n\n // Add edges to network\n roads.addEdge(all_nodes.get(edge.left), all_nodes.get(edge.right), edge);\n }\n\n // Freeze the network\n ImmutableNetwork<Node, Edge> frozen_roads = ImmutableNetwork.copyOf(roads);\n\n return frozen_roads;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cities = sc.nextInt();\n\t\tint roadlines = sc.nextInt();\n\t\tsc.nextLine(); // for reading string in nextline\n\t\tEdgeWeightedGraph edge = new EdgeWeightedGraph(cities);\n\t\t// The Time Complexity is O(E)\n\t\t// The road lines is the number of edges\n\t\tfor (int i = 0; i < roadlines; i++) {\n\t\t\tString[] tokens = sc.nextLine().split(\" \");\n\t\t\tedge.addEdge(new Edge(Integer.parseInt(tokens[0]), Integer.parseInt(tokens[1]),\n\t\t\t\tDouble.parseDouble(tokens[2])));\n\t\t}\n\t\tString caseToGo = sc.nextLine();\n\t\tswitch (caseToGo) {\n\t\tcase \"Graph\":\n\t\t\t//Print the Graph Object.\n\t\t\tSystem.out.println(edge);\n\t\t\tbreak;\n\n\t\tcase \"DirectedPaths\":\n\t\t\t// Handle the case of DirectedPaths, where two integers are given.\n\t\t\t// First is the source and second is the destination.\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t\tString[] input = sc.nextLine().split(\" \");\n\t\t\tDijkstraSP shortest = new DijkstraSP(\n edge, Integer.parseInt(input[0]));\n double distance = shortest.distTo(Integer.parseInt(input[1]));\n // The time complexity is O(1)\n if (!shortest.hasPathTo(Integer.parseInt(input[1]))) {\n \tSystem.out.println(\"No Path Found.\");\n } else {\n \tSystem.out.println(distance);\n }\n\t\t\tbreak;\n\n\t\tcase \"ViaPaths\":\n\t\t\t// Handle the case of ViaPaths, where three integers are given.\n\t\t\t// First is the source and second is the via is the one where path should pass throuh.\n\t\t\t// third is the destination.\n\t\t\t// If the path exists print the distance between them.\n\t\t\t// Other wise print \"No Path Found.\"\n\t\t\tString[] str1 = sc.nextLine().split(\" \");\n\t\t\tboolean flag1 = false;\n\t\t\tboolean flag2 = false;\n\t\t\tdouble distance1 = 0.0;\n\t\t\tdouble distance2 = 0.0;\n\t\t\tDijkstraSP shortest1 = new DijkstraSP(edge, Integer.parseInt(str1[0]));\n\t\t\t// Time Complexity: O(1)\n\t\t\tif (shortest1.hasPathTo(Integer.parseInt(str1[1]))) {\n\t\t\t\tflag1 = true;\n\t\t\t\tdistance1 = shortest1.distance(Integer.parseInt(str1[1]));\n\t\t\t}\n\t\t\tDijkstraSP shortest2 = new DijkstraSP(edge, Integer.parseInt(str1[1]));\n\t\t\t// Time Complexity: O(1)\n\t\t\tif (shortest2.hasPathTo(Integer.parseInt(str1[2]))) {\n\t\t\t\tflag2 = true;\n\t\t\t\tdistance2 = shortest2.distance(Integer.parseInt(str1[2]));\n\t\t\t}\n\t\t\tdouble Distance = distance1 + distance2;\n\t\t\t// Time Complexity: O(1)\n\t\t\tif (flag1 && flag2) {\n\t\t\t// Displays output upto 1 decimal point\n\t\t\tSystem.out.format(\"%.1f\", Distance);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"No Path Found.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n ArrayList<Integer> path = new ArrayList<>();\n for (Edge eachlink : shortest1.pathTo(Integer.parseInt(str1[1]))) {\n int either = eachlink.either();\n int other = eachlink.other(eachlink.either());\n if (!path.contains(other)) {\n path.add(other);\n }\n if (!path.contains(either)) {\n path.add(either);\n }\n }\n for (Edge eachlink1 : shortest2.pathTo(Integer.parseInt(str1[2]))) {\n int either1 = eachlink1.either();\n int other1 = eachlink1.other(eachlink1.either());\n if (!path.contains(other1)) {\n path.add(other1);\n }\n if (!path.contains(either1)) {\n path.add(either1);\n }\n }\n for (int everyval : path) {\n System.out.print(everyval + \" \");\n }\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"void addFlight(Node toNode);",
"public void addEdge(Node src, Node dest, int cost){\n if(nodes.containsKey(src) && nodes.containsKey(dest)){\n Edge newEdge = new Edge(src, dest, cost);\n nodes.get(src).add(dest);\n src.addNodeEdge(newEdge);\n\n Edge otherEdge = new Edge(dest, src, cost);\n nodes.get(dest).add(src);\n dest.addNodeEdge(otherEdge);\n\n\n }\n\n }",
"private void connectVertex(IndoorVertex indoorV1, IndoorVertex indoorV2)\n {\n XYPos firstPos = indoorV1.getPosition();\n XYPos secondPos = indoorV2.getPosition();\n\n //Change in only X position means that the vertex's are East/West of eachother\n //Change in only Y position means that the vertex's are North/South of eachother\n if(firstPos.getX() > secondPos.getX() && Math.floor(firstPos.getY() - secondPos.getY()) == 0.0)\n {\n indoorV1.addWestConnection(indoorV2);\n indoorV2.addEastConnection(indoorV1);\n }\n else if(firstPos.getX() < secondPos.getX() && Math.floor(firstPos.getY() - secondPos.getY()) == 0.0)\n {\n indoorV1.addEastConnection(indoorV2);\n indoorV2.addWestConnection(indoorV1);\n }\n else if(firstPos.getY() > secondPos.getY() && Math.floor(firstPos.getX() - secondPos.getX()) == 0.0)\n {\n indoorV1.addSouthConnection(indoorV2);\n indoorV2.addNorthConnection(indoorV1);\n }\n else if(firstPos.getY() < secondPos.getY() && Math.floor(firstPos.getX() - secondPos.getX()) == 0.0)\n {\n indoorV1.addNorthConnection(indoorV2);\n indoorV2.addSouthConnection(indoorV1);\n }\n\n\n indoorV1.addConnection(indoorV2);\n indoorV2.addConnection(indoorV1);\n }",
"public void addEdge(GeographicPoint from, GeographicPoint to, String roadName,\n\t\t\tString roadType, double length) throws IllegalArgumentException {\n\n\t\t//TODO: Implement this method in WEEK 3\n\t\t\n\t\tif (length < 0 || (!map.containsKey(from) || !map.containsKey(to)) || (from == null || to == null)) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tMapNode start = map.get(from);\n\t\tboolean added = start.addNeighbours(to, length, roadName, roadType);\n\t\tif (added) {\n\t\t\tnumEdges++;\n\t\t}\n\t}",
"public void addEdge(Graph graph, int source, int destination, double weight){\r\n\r\n Node node = new Node(destination, weight);\r\n LinkedList<Node> list = null;\r\n\r\n //Add an adjacent Node for source\r\n list = adjacencyList.get((double)source);\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)source, list);\r\n\r\n //Add adjacent node again since graph is undirected\r\n node = new Node(source, weight);\r\n\r\n list = null;\r\n\r\n list = adjacencyList.get((double)destination);\r\n\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)destination, list);\r\n }",
"public boolean addEdge(String id1, String id2, Integer weight)\n\t{\n\t\t// if its a new edge, or a new edge weight\n\t\tif (!hasEdge(id1, id2) || (weight != null && edgeWeight(id1, id2) == null))\n\t\t{\n\t\t\tNode n1 = getNode(id1);\n\t\t\tNode n2 = getNode(id2);\n\t\t\tn1.addEdge(n2, weight);\n\t\t\tn2.addEdge(n1, weight);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private HipsterDirectedGraph<String,Long> doGraphHops(Collection<RouteNode> routes) {\r\n log.info(\"Doing directed graph for defined routes. Cost is equal to one(to get hops).\");\r\n GraphBuilder<String,Long> graphBuilder = GraphBuilder.<String,Long>create();\r\n routes.forEach(route -> {\r\n graphBuilder.connect(route.getCity()).to(route.getDestination()).withEdge(1L); \r\n });\r\n return graphBuilder.createDirectedGraph();\r\n }",
"private void addConnection(Vertex v, Vertex v1, boolean twoway_road) {\n\t\tif(v == null || v1 == null) return;\r\n\t\tv1.addEdge(new Edge(v1, v));\r\n\t\tif (twoway_road)\r\n\t\t\tv1.addEdge(new Edge(v, v1));\r\n\t}",
"public Path shortestPath(Vertex a, Vertex b) {\n // If a or b aren't present in the set of vertices throw an exception\n if (!myGraph.containsKey(b) || !myGraph.containsKey(a)) {\n throw new IllegalArgumentException(\"One of the vertices isn't valid\");\n }\n /* Create a map of Vertices to VertexInfos. Fill it with VertexInfos for all\n vertices that each have no previous vertex and and a cost of INFINITY */\n Map<Vertex, VertexInfo> vertInfos = new HashMap<Vertex, VertexInfo>();\n for (Vertex v : vertices()) {\n vertInfos.put(v, new VertexInfo(v, null, INFINITY));\n }\n /* Create a PriorityQueue for VertexInfos */\n PriorityQueue<VertexInfo> viQueue = new PriorityQueue<VertexInfo>();\n /* Create a VertexInfo for the start Vertex 'a' with a cost of 0. This uses a copy of Vertex a&b for immutability */\n Vertex copyA = new Vertex(a.getLabel());\n Vertex copyB = new Vertex(b.getLabel());\n\n VertexInfo vi_a = new VertexInfo(copyA, null, 0);\n /* Add VerxtexInfo for a to PQ and map it to it's VertexInfo */\n viQueue.add(vi_a);\n vertInfos.put(a, vi_a);\n while(!viQueue.isEmpty()) {\n /* Remove the VertexInfo with lowest cost */\n Vertex curr = viQueue.poll().getVertex();\n /* Check all adjacent Vertices of curr Vertex */\n for (Vertex v : adjacentVertices(curr)) {\n /* Calculate cost to get to v through curr */\n int cost = vertInfos.get(curr).getCost() + edgeCost(curr, v);\n /* If cost through curr is lower than previous */\n if (cost < vertInfos.get(v).getCost()) {\n /* Remove v's VertexInfo from PQ */\n viQueue.remove(vertInfos.get(v));\n /* Overwrite previous value of v in map\n Add updated VerexInfo to PQ */\n VertexInfo vi = new VertexInfo(v, curr, cost);\n vertInfos.put(v,vi);\n viQueue.add(vi);\n }\n }\n }\n /* Create ArrayList for path */\n List<Vertex> path = new ArrayList<Vertex>();\n \n /* Add each vertex and it's previous vertex to path until a null vertex is reached */\n for (Vertex vert = copyB; vert != null; vert = vertInfos.get(vert).getPrev()) {\n path.add(vert);\n }\n\n /* Reverse order of path */ \n Collections.reverse(path);\n /* Create new Path object with corresponding parameters */\n if(path.contains(copyA)){\n Path pathToB = new Path(path, vertInfos.get(copyB).getCost());\n return pathToB;\n } else {\n return null;\n }\n }",
"public void addCity(String city) {\n connects.put(city, new ArrayList<Flight>());\n }",
"private HipsterDirectedGraph<String,Long> doGraphWithTimes(Collection<RouteNode> routes) {\r\n log.info(\"Doing directed graph for defined routes. Cost based on time.\");\r\n GraphBuilder<String,Long> graphBuilder = GraphBuilder.<String,Long>create();\r\n routes.forEach(route -> {\r\n graphBuilder.connect(route.getCity()).to(route.getDestination()).withEdge(route.getCost()); \r\n });\r\n return graphBuilder.createDirectedGraph();\r\n }",
"public void append(Route another) throws PointNotNearException {\n Point last_point = route.get(route.size() - 1);\n Point connection_point = another.route.get(0);\n int dx = connection_point.x - last_point.x;\n int dy = connection_point.y - last_point.y;\n int m_distance = Math.abs(dx) + Math.abs(dy);\n\n if (m_distance == 0) {\n // The starting of another route is the ending of this route.\n route.addAll(another.route.subList(1, another.route.size()));\n } else if (m_distance == 1) {\n // The starting of another route is next to this route.\n route.addAll(another.route);\n } else {\n // Invalid another route.\n throw new PointNotNearException();\n }\n }",
"private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}",
"public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }",
"@Override\r\n public void connect(V start, V destination) {\r\n try {\r\n Iterator<Vertex> vertexIterator = map.values().iterator();\r\n Vertex a = null, b = null;\r\n while(vertexIterator.hasNext()) {\r\n Vertex v = vertexIterator.next();\r\n if(start.compareTo(v.vertexName) == 0)\r\n a = v;\r\n if(destination.compareTo(v.vertexName) == 0)\r\n b = v;\r\n }\r\n if(a == null || b == null)\r\n vertexIterator.next();\r\n a.addDestinations(destination);\r\n } catch(NoSuchElementException e) {\r\n throw e;\r\n }\r\n }",
"ShortestPath(UndirectedWeightedGraph graph, String startNodeId, String endNodeId) throws NotFoundNodeException {\r\n\t\t\r\n\t\tif (!graph.containsNode(startNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, startNodeId);\r\n\t\t}\t\t\r\n\t\tif (!graph.containsNode(endNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, endNodeId);\r\n\t\t}\t\r\n\r\n\t\tsrc = startNodeId;\r\n\t\tdst = endNodeId;\r\n\t\t\r\n\t\tif (endNodeId.equals(startNodeId)) {\r\n\t\t\tlength = 0;\r\n\t\t\tnumOfPath = 1;\r\n\t\t\tArrayList<String> path = new ArrayList<String>();\r\n\t\t\tpath.add(startNodeId);\r\n\t\t\tpathList.add(path);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// create a HashMap of updated distance from the starting node to every node\r\n\t\t\t// initially it is 0, inf, inf, inf, ...\r\n\t\t\tHashMap<String, Double> distance = new HashMap<String, Double>();\t\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif (nodeId.equals(startNodeId)) {\r\n\t\t\t\t\t// the starting node will always have 0 distance from itself\r\n\t\t\t\t\tdistance.put(nodeId, 0.0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// the others have initial distance is infinity\r\n\t\t\t\t\tdistance.put(nodeId, Double.MAX_VALUE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// a HashMap of preceding node of each node\r\n\t\t\tHashMap<String, HashSet<String>> precedence = new HashMap<String, HashSet<String>>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif ( nodeId.equals(startNodeId) ) {\r\n\t\t\t\t\tprecedence.put(nodeId, null);\t// the start node will have no preceding node\r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tprecedence.put(nodeId, new HashSet<String>());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\tSet<String> unvisitedNode = new HashSet<String>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tunvisitedNode.add(nodeId);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble minUnvisitedLength;\r\n\t\t\tString minUnvisitedNode;\r\n\t\t\t// run loop while not all node is visited\r\n\t\t\twhile ( unvisitedNode.size() != 0 ) {\r\n\t\t\t\t// find the unvisited node with minimum current distance in distance list\r\n\t\t\t\tminUnvisitedLength = Double.MAX_VALUE;\r\n\t\t\t\tminUnvisitedNode = \"\";\r\n\t\t\t\tfor (String nodeId : unvisitedNode) {\r\n\t\t\t\t\tif (distance.get(nodeId) < minUnvisitedLength) {\r\n\t\t\t\t\t\tminUnvisitedNode = nodeId;\r\n\t\t\t\t\t\tminUnvisitedLength = distance.get(nodeId); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// if there are no node that can be visited from the unvisitedNode, break the loop \r\n\t\t\t\tif (minUnvisitedLength == Double.MAX_VALUE) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// remove the node from unvisitedNode\r\n\t\t\t\tunvisitedNode.remove(minUnvisitedNode);\r\n\t\t\t\t\r\n\t\t\t\t// update the distance of its neighbors\r\n\t\t\t\tfor (Node neighborNode : graph.getNodeList().get(minUnvisitedNode).getNeighbors().keySet()) {\r\n\t\t\t\t\tdouble distanceFromTheMinNode = distance.get(minUnvisitedNode) + graph.getNodeList().get(minUnvisitedNode).getNeighbors().get(neighborNode).getWeight();\r\n\t\t\t\t\t// if the distance of the neighbor can be shorter from the current node, change \r\n\t\t\t\t\t// its details in distance and precedence\r\n\t\t\t\t\tif ( distanceFromTheMinNode < distance.get(neighborNode.getId()) ) {\r\n\t\t\t\t\t\tdistance.replace(neighborNode.getId(), distanceFromTheMinNode);\r\n\t\t\t\t\t\t// renew the precedence of the neighbor node\r\n\t\t\t\t\t\tprecedence.put(neighborNode.getId(), new HashSet<String>());\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (distanceFromTheMinNode == distance.get(neighborNode.getId())) {\r\n\t\t\t\t\t\t// unlike dijkstra's algorithm, multiple path should be update into the precedence\r\n\t\t\t\t\t\t// if from another node the distance is the same, add it to the precedence\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// if the current node in the process is the end node, we can stop the while loop here\r\n\t\t\t\tif (minUnvisitedNode == endNodeId) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (distance.get(endNodeId) == Double.MAX_VALUE) {\r\n\t\t\t\t// in case there is no shortest path between the 2 nodes\r\n\t\t\t\tlength = 0;\r\n\t\t\t\tnumOfPath = 0;\r\n\t\t\t\tpathList = null;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// other wise we have these information\r\n\t\t\t\tlength = distance.get(endNodeId);\r\n\t\t\t\t//numOfPath = this.getNumPath(precedence, startNodeId, endNodeId);\r\n\t\t\t\tpathList = this.findPathList(precedence, startNodeId, endNodeId);\r\n\t\t\t\tnumOfPath = pathList.size();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\t// END ELSE\t\t\r\n\t}",
"private void checkEdgeExistance(Node a, Node b, int weight) {\n for (Edge edge : a.getEdges()) {\n if (edge.getSource() == a && edge.getDestination() == b) {\n edge.setWeight(weight);\n return;\n }\n }\n a.getEdges().add(new Edge(a, b, weight));\n }",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"public void addFriendShip(String firstPerson, String secondPerson) {\n Integer fromIndex = this.vertexNames.get(firstPerson);\n if (fromIndex == null) {\n fromIndex = this.indexCounter;\n this.indexCounter++;\n this.vertexNames.put(firstPerson, fromIndex);\n }\n Integer toIndex = this.vertexNames.get(secondPerson);\n if (toIndex == null) {\n toIndex = this.indexCounter;\n this.indexCounter++;\n this.vertexNames.put(secondPerson, toIndex);\n }\n super.addEdge(fromIndex, toIndex, 1.0);\n }",
"public static void main(String[] args) {\n PointNode A = new PointNode(\"A\",0,0);\r\n PointNode B = new PointNode(\"B\",20,10);\r\n PointNode C = new PointNode(\"C\",40,20);\r\n PointNode D = new PointNode(\"D\",30,30);\r\n PointNode E = new PointNode(\"E\",20,50);\r\n PointNode F = new PointNode(\"F\",-10,40);\r\n PointNode G = new PointNode(\"G\",10,20);\r\n PointNode H = new PointNode(\"H\",10,40);\r\n PointNode I = new PointNode(\"I\",30,40);\r\n PointNode K = new PointNode(\"K\",30,20);\r\n PointNode L = new PointNode(\"L\",40,40);\r\n\r\n A.connectWithPoint(B);\r\n A.connectWithPoint(G);\r\n G.connectWithPoint(F);\r\n G.connectWithPoint(H);\r\n G.connectWithPoint(D);\r\n K.connectWithPoint(L);\r\n B.connectWithPoint(C);\r\n D.connectWithPoint(I);\r\n D.connectWithPoint(E);\r\n L.connectWithPoint(E);\r\n F.connectWithPoint(E);\r\n H.connectWithPoint(E);\r\n I.connectWithPoint(E);\r\n A.connectWithPoint(K);\r\n\r\n Route route = searchWay(A, E);\r\n System.out.println(route);\r\n }",
"private void updateDistance(String s1, String s2)\n\t{\n\t\tString name = EdgeUtil.formatEdge(s1, s2);\n\t\tint weightOld = this.listNode.get(s2).getDistanceFromOrigin();\n\t\tint weightNew = this.listNode.get(s1).getDistanceFromOrigin() + this.listEdge.get(name).getWeight();\n\t\t\n\t\tif(weightOld > weightNew) {\n\t\t\tthis.listNode.get(s2).setDistanceFromOrigin(weightNew);\n\t\t\tthis.listNode.get(s2).setPrecedent(s1);\n\t\t}\n\t}",
"public void addUndirectedEdge(int vertexOne, int vertexTwo) {\n\t\tGraphNode first = nodeList.get(vertexOne - 1);\n\t\tGraphNode second = nodeList.get(vertexTwo - 1);\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\n\t\tsecond.getNeighbors().add(first);//Neighbour of second is first. Store it.\n\t\tSystem.out.println(first.getNeighbors());\n\t\tSystem.out.println(second.getNeighbors());\n\t}",
"public void connect(int first, int second) {\n\t\tvertex.get(first).add(second);\n\t}",
"@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public void addEdge(Node n1, Node n2, int weight, boolean twoWay) {\n\t\tthis.edges.add(new Edge(n1, n2, weight, twoWay));\n\t\tnrOfEdges++;\n\t}",
"public static void findDestinations(Graph graph, HashMap<Integer, Tuple> topology) {\n // loops through the entire topology and updates matched list\n // with routers we can route to based on current topology\n for (int i = 0; i < topology.size(); i++) {\n ArrayList checked = new ArrayList();\n Iterator iterator = topology.entrySet().iterator();\n int routerId = 0;\n int routerLink = 0;\n boolean inTesting = false;\n while(iterator.hasNext()) {\n Map.Entry entry = (Map.Entry)iterator.next();\n Tuple tuple = (Tuple) entry.getValue();\n if (!matched.contains(tuple.link_id) && !checked.contains(tuple.link_id) && !inTesting) {\n checked.add(tuple.link_id);\n routerId = tuple.router_id;\n routerLink = tuple.link_id;\n inTesting = true;\n } else if (!matched.contains(tuple.link_id) && tuple.link_id == routerLink) {\n Node n1 = null;\n Node n2 = null;\n for (Node n: graph.nodes) {\n if (n.id == routerId) {\n n1 = n;\n } else if (n.id == tuple.router_id) {\n n2 = n;\n }\n }\n matched.add(routerLink);\n n1.addDestination(n2, tuple.link_cost);\n n2.addDestination(n1, tuple.link_cost);\n }\n }\n }\n }",
"@Override\n\tpublic void connect(int src, int dest, double w) {\n\t\tif(w<=0)\n\t\t{\n\t\t\tSystem.err.println(\"The weight must be positive! . connect failed\");\n\t\t\treturn;\n\t\t}\n\t\tEdgeData e = new EdgeData(src, dest, w);\n\t\tif (!Nodes.containsKey(src) || !Nodes.containsKey(dest)) {\n\t\t\tSystem.err.println(\"can't connect\");\n\t\t\treturn;\n\t\t}\n\t\tEdges.get(src).put(dest, e);\n\t\tnumOfEdges++;\n\t\tMC++;\n\t}",
"public void setAdjacent(int city1, int city2){\r\n\t\tcheckCityNoRange(city1);\r\n\t\tcheckCityNoRange(city2);\r\n\t\tif(city1 == city2)\r\n\t\t\tthrow new IllegalArgumentException(\"must be 2 different cities\");\r\n\t\t\r\n\t\tcity1 --;\r\n\t\tcity2 --;\r\n\t\tcities[city1].addAdjcentNode(city2);\r\n\t\tcities[city2].addAdjcentNode(city1);\r\n\t}",
"private void addNodeNeighbour(Node aNode, int aX, int aY, Node[][] allNodes) {\n if (aX >= 0 && aX < allNodes.length && aY >=0 && aY < allNodes[0].length) {\n aNode.addNeighbour(allNodes[aX][aY]);\n }\n }",
"private void getData(Path inputOne, Path inputTwo) throws IOException {\n String line;\n\n try (BufferedReader br = Files.newBufferedReader(inputOne, StandardCharsets.ISO_8859_1)) {\n\n while((line = br.readLine()) != null){\n City source = null;\n City target = null;\n\n String[] split = line.split(\",\");\n if(!cities.stream().anyMatch(o -> o.getCityName().equalsIgnoreCase(split[0]))) {\n cities.add(source = new City(split[0]));\n }\n if(!cities.stream().anyMatch(o -> o.getCityName().equalsIgnoreCase(split[1]))){\n cities.add(target = new City(split[1]));\n }\n\n for (City city : cities){\n if(city.getCityName().equalsIgnoreCase(split[0])){\n source = city;\n }\n if(city.getCityName().equalsIgnoreCase(split[1])){\n target = city;\n }\n if(source != null && target != null){\n Road newroad = new Road(source, target, Integer.parseInt(split[2]), Integer.parseInt(split[3]));\n roads.add(newroad);\n break;\n }\n }\n }\n }\n\n try (BufferedReader br = Files.newBufferedReader(inputTwo, StandardCharsets.ISO_8859_1)) {\n while((line = br.readLine()) != null) {\n String[] split = line.split(\",\");\n\n for(City city : cities){\n if(city.getCityName().equalsIgnoreCase(split[1])){\n city.addAttraction(split[0]);\n }\n }\n }\n }\n }",
"boolean CanUseRoadBuilder(EdgeLocation spot1, EdgeLocation spot2);",
"public void calculateRoute() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(start);\n route.setDestinationCoordinate(end);\n route.setNoOfRoutes(1);\n switch (routingType) {\n case SHORTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_SHORTEST);\n break;\n case FASTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_FASTEST);\n break;\n case QUIET:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_QUIETEST);\n break;\n }\n route.setRouteExposed(true);\n SKRouteManager.getInstance().calculateRoute(route);\n }",
"public void connect(int a, int b) {\n int a_root = find(a);\r\n int b_root = find(b);\r\n if(a_root!=b_root){\r\n graph[a_root] = b_root;\r\n count-=1;\r\n }\r\n \r\n }",
"public void edgeMake(int vertex1, int vertex2) {\n addVertex(vertex1); // both vertices added to the set\n addVertex(vertex2);\n adjacencyMap.get(vertex1).add(vertex2); // both vertices receive the edge\n adjacencyMap.get(vertex2).add(vertex1);\n }",
"public void addEdge(int source, int destination, int roadCost)\n\t\t{\n\t\t\tEdge edge = new Edge(source, destination, roadCost);\n\t\t\tallEdges.add(edge);\n\t\t}",
"public void addEdge (E vertex1, E vertex2, int edgeWeight) throws IllegalArgumentException\n {\n if(vertex1 == vertex2)\n return;\n \n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\n if (this.hasEdge (vertex1, vertex2))\n {\n this.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }\n \n Node node = new Node(index2, edgeWeight);\n this.addNode(node, index1);\n node = new Node(index1, edgeWeight);\n this.addNode(node, index2);\n }",
"@Test\n\tpublic void addRoadTest(){\n\t\tDjikstrasMap m = new DjikstrasMap();\t//Creates new DjikstrasMap object\n\t\tLocation l1 = new Location(\"Guildford\");\n\t\tLocation l2 = new Location(\"Portsmouth\");\n\t\t\n\t\tm.addRoad(\"Guildford\", \"Portsmouth\", 20.5, \"M3\");\t//Adds a road from Guildford to portsmouth to the map\n m.addRoad(\"Portsmouth\", \"Guildford\", 20.5, \"M3\");\n \n assertEquals(l1.getName(), m.getNode(\"Guildford\").getName());\t//Tests that the method added the roads correctly to teh map\n assertEquals(l2.getName(), m.getNode(\"Portsmouth\").getName());\n\t}",
"private static weightDistanceTotalCity weightPlusDistanceAlgorithm(City nextCity, Edge edge,\n Integer weightDistanceTotal) {\n if (edge.getWeight() + edge.getAdjacentCity().getCityToDestination() < weightDistanceTotal) {\n weightDistanceTotal = (edge.getWeight() + edge.getAdjacentCity().getCityToDestination());\n return new weightDistanceTotalCity(edge.getAdjacentCity(), weightDistanceTotal);\n }\n return new weightDistanceTotalCity(nextCity, weightDistanceTotal);\n }",
"public void addEdge(int start, int end, double weight);",
"@Test\n public void addRoads() {\n assertTrue(country1.getNetwork().get(cityA).size()==3);\n assertTrue(country2.getNetwork().get(cityG).size()==2);\n country1.addRoads(cityA,cityG,5);\n assertTrue(country1.getNetwork().get(cityA).size()==4);\n assertTrue(country2.getNetwork().get(cityG).size()==2);\n country2.addRoads(cityA,cityG,5);\n assertTrue(country1.getNetwork().get(cityA).size()==4);\n assertTrue(country2.getNetwork().get(cityG).size()==3);\n //Two roads created if both cities are in the country.\n assertTrue(country1.getNetwork().get(cityB).size()==2);\n assertTrue(country1.getNetwork().get(cityC).size()==3);\n country1.addRoads(cityB,cityC,5);\n assertTrue(country1.getNetwork().get(cityB).size()==3);\n assertTrue(country1.getNetwork().get(cityC).size()==4);\n //No roads created if the cities are not in the country.\n assertTrue(country2.getNetwork().get(cityE).size()==3);\n assertTrue(country2.getNetwork().get(cityF).size()==3);\n country1.addRoads(cityE,cityF,6);\n assertTrue(country2.getNetwork().get(cityE).size()==3);\n assertTrue(country2.getNetwork().get(cityF).size()==3);\n \n //Null\n assertTrue(country2.getNetwork().get(cityF).size()==3);\n country2.addRoads(null,cityF,6);\n assertTrue(country2.getNetwork().get(cityF).size()==4);\n //Null\n assertTrue(country2.getNetwork().get(cityE).size()==3);\n country2.addRoads(cityE,null,6);\n assertTrue(country2.getNetwork().get(cityE).size()==4);\n }",
"public void connect(int a, int b) {\n\t\tint rootA = find(a);\n\t\tint rootB = find(b);\n\t\tif (rootA != rootB) {\n\t\t\tgraph[rootA] = rootB;\n\t\t}\n }",
"@Test\n void calculateRoute() {\n GPSObject n2 = new GPSObject(\"Centenary 2\");\n Location n1 = new Location(\"Centenary 2\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1-5\");\n Location n4 = new Location(\"Thuto 1-5\",\"1\",n3);\n Locations loc = new Locations();\n assertNotNull(roo.calculateRoute(loc));\n }",
"public void addEdge(Node from, Node to);",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"private void launchAlternativeRouteCalculation() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(new SKCoordinate(-122.392284, 37.787189));\n route.setDestinationCoordinate(new SKCoordinate(-122.484378, 37.856300));\n // number of alternative routes specified here\n route.setNoOfRoutes(3);\n route.setRouteMode(SKRouteSettings.SKROUTE_CAR_FASTEST);\n route.setRouteExposed(true);\n SKRouteManager.getInstance().setRouteListener(this);\n SKRouteManager.getInstance().calculateRoute(route);\n }",
"@Test\n\tvoid testAddEdge() {\n\t\tgeo_location ge = new GeoLoc(0,1,2);\n\t\tnode_data n0 =new NodeData(0,ge);\n\t\tgeo_location ge1 = new GeoLoc(0,6,2);\n\t\tnode_data n1 =new NodeData(2,ge1);\n\t\tgraph.addNode(n0);\n\t\tgraph.addNode(n1);\n\t\tedge_data e = new EdgeData(0, 2, 20);\n\t\tgraph.connect(0, 2, 20);\n\t\tedge_data actual = graph.getEdge(0, 2);\n\t\tedge_data expected = e;\n\t\tassertEquals(expected.getSrc(), actual.getSrc());\n\t\tassertEquals(expected.getDest(), actual.getDest());\n\t\tassertEquals(expected.getWeight(), actual.getWeight());\n\t}",
"public static Node add(Node poly1, Node poly2) {\r\n\t\t/** COMPLETE THIS METHOD **/\r\n\t\t// FOLLOWING LINE IS A PLACEHOLDER TO MAKE THIS METHOD COMPILE\r\n\t\t// CHANGE IT AS NEEDED FOR YOUR IMPLEMENTATION\r\n\t\t//Equation for the first polynomial\r\n\t\tNode Equation1=poly1;\r\n\t\t//Equation for the second polynomial\r\n Node Equation2=poly2;\r\n Node Summation= null;\r\n Node hold=null;\r\n //this will hold the temporary adding\r\n float tmp =0;\r\n\r\n \r\n if(Equation1==null) {\r\n \treturn Equation2;\r\n }\r\n if(Equation2==null) {\r\n \treturn Equation1;\r\n }\r\n\r\n //loops through both equations and check to see if both are null\r\n while(Equation1!=null && Equation2!=null) {\r\n \t\r\n \t//if the degree is higher when the terms are compared then just place \r\n \t//the equation down\r\n \t\r\n \t\r\n \t\r\n \tif(Equation2.term.degree <Equation1.term.degree) {\r\n \t\t\r\n \t//\tSummation = new Node(Equation2.term.coeff,Equation2.term.degree,Summation);\r\n \t\tSummation = new Node(Equation1.term.coeff,Equation1.term.degree,Summation);\r\n \t\t\r\n \t\t\r\n \t\t//goes to next term to see if this term will match the equation\r\n \t\t\r\n \t\t\tEquation2 =Equation2.next;\r\n \t\t\r\n \t\t\r\n \t\t\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \telse if(Equation2.term.degree >Equation1.term.degree) {\r\n \t\tSummation = new Node(Equation1.term.coeff,Equation1.term.degree,Summation);\r\n \t\t//goes to next term to see if this term will match the equation\r\n \t\t\r\n \t\tEquation1= Equation1.next;\r\n \t}\r\n \t\t\r\n \telse if(Equation1.term.degree==Equation2.term.degree) {\r\n \t\ttmp= Equation1.term.coeff + Equation2.term.coeff;\r\n \t\tif(tmp==0) {\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\r\n \t\t\t\tSummation = new Node(tmp,Equation1.term.degree,Summation);\r\n \t\t\r\n \t\t\t\t\r\n \t\t\t\tif(Equation1!=null) {\r\n \t\t\t\tEquation1=Equation1.next;\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\tif(Equation2!=null){\r\n \t\t\t\t\tEquation2=Equation2.next;\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\r\n \t\t\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \t\r\n \t\r\n }\r\n \r\n \r\n \r\n if(Equation1 == null) {\r\n \t\r\n \tEquation2= Equation2.next;\r\n \twhile(Equation2!= null) {\r\n \t\t\r\n \t\tSummation = new Node(Equation2.term.coeff,Equation2.term.degree,Summation);\r\n \t\tEquation2 = Equation2.next;\r\n \t}\r\n }\r\n \r\n if(Equation2 == null) {\r\n \t\r\n \tEquation1=Equation1.next;\r\n \twhile(Equation1!= null) {\r\n \t\t\r\n \t\tSummation = new Node(Equation1.term.coeff,Equation1.term.degree,Summation);\r\n \t\tEquation1 = Equation1.next;\r\n \t}\r\n }\r\n \r\n \r\n \t\twhile(Summation!=null) {\r\n \t\t\thold = new Node(Summation.term.coeff,Summation.term.degree,hold );\r\n \t\t\tSummation = Summation.next;\r\n \t\t}\r\n \r\n\t\treturn hold;\r\n\t}",
"void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public void addDestination(Node destination, int distance) {\n adjacentNodes.put(destination, distance);\n }",
"private void createBurgdorfRoutes(Scenario scenario, LeastCostPathCalculator router, int numOrigins) {\n\t\t// create to Burgdorf routes\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tRoute route;\n\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\tId<Link> toLinkId = Id.create(endLinkIdBurgdorf, Link.class);\n\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\n\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\n\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\troute.setDistance(distance);\n\t\t\troute.setTravelTime(path.travelTime);\n\t\t\t\n\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\n\t\t\troutes.put(startLinkIds[i] + \"_\" + endLinkIdBurgdorf, route);\n\t\t\t\n\t\t\tprintRoute(scenario, route, startLinkIds[i], endLinkIdBurgdorf);\n\t\t}\n\t\n\t\t// create from Burgdorf routes\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tRoute route;\n\t\t\tId<Link> fromLinkId = Id.create(startLinkIdBurgdorf, Link.class);\n\t\t\tId<Link> toLinkId = Id.create(endLinkIds[i], Link.class);\n\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\n\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\n\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\troute.setDistance(distance);\n\t\t\troute.setTravelTime(path.travelTime);\n\t\t\t\n\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\n\t\t\troutes.put(startLinkIdBurgdorf + \"_\" + endLinkIds[i], route);\n\t\t\t\n\t\t\tprintRoute(scenario, route, startLinkIdBurgdorf, endLinkIds[i]);\n\t\t}\n\t}",
"public void addEdge(int indexOne, int indexTwo)\n\t{\n\t\tadjacencyMatrix[indexOne][indexTwo] = true;\n\t\tadjacencyMatrix[indexTwo][indexOne] = true;\n\t}",
"public void createEdges() {\n \tfor(String key : ways.keySet()) {\n \t Way way = ways.get(key);\n \t if(way.canDrive()) {\n \t\tArrayList<String> refs = way.getRefs();\n \t\t\t\n \t\tif(refs.size() > 0) {\n \t\t GPSNode prev = (GPSNode) this.getNode(refs.get(0));\n \t\t drivableNodes.add(prev);\n \t\t \n \t\t GPSNode curr = null;\n \t\t for(int i = 1; i <refs.size(); i++) {\n \t\t\tcurr = (GPSNode) this.getNode(refs.get(i));\n \t\t\tif(curr == null || prev == null)\n \t\t\t continue;\n \t\t\telse {\n \t\t\t double distance = calcDistance(curr.getLatitude(), curr.getLongitude(),\n \t\t\t\t prev.getLatitude(), prev.getLongitude());\n\n \t\t\t GraphEdge edge = new GraphEdge(prev, curr, distance, way.id);\n \t\t\t prev.addEdge(edge);\n \t\t\t curr.addEdge(edge);\n \t\t\t \n \t\t\t drivableNodes.add(curr);\n \t\t\t prev = curr;\n \t\t\t}\n \t\t }\t\n \t\t}\n \t }\n \t}\n }",
"private void createRoutes(Scenario scenario, LeastCostPathCalculator router, int numOrigins) {\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tfor (int j = 0; j < numOrigins; j++) {\n\t\t\t\tRoute route;\n\t\t\t\tif (i == j) {\n\t\t\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\t\t\tId<Link> toLinkId = fromLinkId;\n\t\t\t\t\t\n\t\t\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\t\troute.setDistance(0.0);\n\t\t\t\t\troute.setTravelTime(0.0);\n\t\t\t\t} else {\n\t\t\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\t\t\tId<Link> toLinkId = Id.create(endLinkIds[j], Link.class);\n\t\t\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\t\t\t\t\n\t\t\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\t\t\n\t\t\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\t\t\troute.setDistance(distance);\n\t\t\t\t\troute.setTravelTime(path.travelTime);\n\n\t\t\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troutes.put(startLinkIds[i] + \"_\" + endLinkIds[j], route);\n\t\t\t\t\n\t\t\t\tprintRoute(scenario, route, startLinkIds[i], endLinkIds[j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// fix bad routes\n\t\tString routeString;\n\t\tString[] links;\n\t\tList<Id<Link>> linkIds;\n\t\tNetworkRoute networkRoute;\n\t\t\t\n\t\trouteString = \"17560000130806FT_17560000126838FT\";\n\t\t//17560000130806FT - start link \n\t\t//17560000126838FT - end link \n\t\tlinks = new String[]{\"17560001813912FT\", \"17560001813913FT\", \"17560002100968FT\", \"17560000122288FT\", \"17560000122328FT\",\n\t\t\t\t\"17560001368986TF\", \"17560001786482TF\", \"17560001862499FT\", \"17560000125722FT\", \"17560001812124FT\", \"17560002102719FT\",\n\t\t\t\t\"17560001838515FT\", \"17560001984994FT\", \"17560001984995FT\", \"17560001812144FT\", \"17560001834645FT\", \"17560000126288FT\",\n\t\t\t\t\"17560002102725FT\", \"17560002102726FT\", \"17560001368914FT\", \"17560001368915FT\", \"17560001846187FT\"};\n\t\tlinkIds = new ArrayList<Id<Link>>();\n\t\tfor (String link : links) linkIds.add(Id.create(link, Link.class));\n\t\tnetworkRoute = (NetworkRoute) routes.get(routeString);\n\t\tnetworkRoute.setLinkIds(networkRoute.getStartLinkId(), linkIds, networkRoute.getEndLinkId());\n\t}"
] | [
"0.6685071",
"0.61656976",
"0.5962902",
"0.577392",
"0.57387316",
"0.5721558",
"0.5715932",
"0.5632834",
"0.56037235",
"0.5587612",
"0.55864346",
"0.55182135",
"0.55176324",
"0.5503571",
"0.54987735",
"0.5490491",
"0.54902405",
"0.542558",
"0.541808",
"0.5417347",
"0.5400472",
"0.5388855",
"0.53878325",
"0.5366362",
"0.5362745",
"0.53548545",
"0.53224874",
"0.5319993",
"0.53197074",
"0.53141767",
"0.5311731",
"0.5307908",
"0.5300862",
"0.5300452",
"0.5295479",
"0.5289532",
"0.5280911",
"0.52802926",
"0.5271743",
"0.5252542",
"0.523994",
"0.52389693",
"0.5234108",
"0.5224605",
"0.52092224",
"0.5206383",
"0.5206009",
"0.5191612",
"0.5181934",
"0.5176382",
"0.51689816",
"0.5161955",
"0.5138265",
"0.5133692",
"0.5116708",
"0.5108882",
"0.50995857",
"0.5096764",
"0.5095564",
"0.5081341",
"0.50738984",
"0.5070459",
"0.50691146",
"0.5066987",
"0.50606704",
"0.50589716",
"0.50585544",
"0.50468814",
"0.50389713",
"0.5029847",
"0.5018416",
"0.50180954",
"0.5013231",
"0.50103265",
"0.5009499",
"0.5006281",
"0.5001401",
"0.49996057",
"0.4998759",
"0.4997976",
"0.49975222",
"0.4993062",
"0.499219",
"0.4981108",
"0.49794844",
"0.49794826",
"0.49775785",
"0.49695808",
"0.49685815",
"0.49536675",
"0.4950233",
"0.49451822",
"0.49423435",
"0.4928788",
"0.4918932",
"0.49151555",
"0.49135342",
"0.48975956",
"0.4886327",
"0.4881859"
] | 0.5688322 | 7 |
Attempts an order in behalf of custID for quantity units of the prodID | public int placeOrder(int custID, int prodID, int quantity, int sessionID) {
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Shopper) {
Shopper sh = (Shopper)(s.getUser());
if (sh.cust != null && sh.cust.custID == custID)
return sh.placeOrder(prodID, quantity);
}
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int placeOrder(Order order, String cust_no, Connection conn) {\r\n\t\ttry {\r\n\t\t\tint item_no=0;\r\n\t\t\tArrayList<Item> item_collection = new ArrayList<Item>();\r\n\t\t\titem_collection = order.getItemCollection(); \r\n\t\t\tfor(Item i : item_collection)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t\titem_no = i.getItemNo();\r\n\t\t\t}\r\n\t\t\tint order_no = 0;\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select max(orderno) from order_XXXX\");\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\torder_no = rset.getInt(1);\r\n\t\t\t\torder_no++;\r\n\t\t\t}\r\n\t\t\tPreparedStatement pstmt = conn\r\n\t\t\t\t\t.prepareStatement(\"insert into order_XXXX(orderno,item_no,ord_qty,custno) values(?,?,?,?)\");\r\n\t\t\tpstmt.setInt(1, order_no);\r\n\t\t\tpstmt.setInt(2, item_no);\r\n\t\t\tpstmt.setInt(3, order.getOrderQty());\r\n\t\t\tpstmt.setString(4, cust_no);\r\n\t\t\tint count = pstmt.executeUpdate();\r\n\t\t\tPreparedStatement pstmt1 = conn.prepareStatement(\"update item_XXXX set qty=qty-? where item_no = ?\");\r\n\t\t\tpstmt1.setInt(1, order.getOrderQty());\r\n\t\t\tpstmt1.setInt(2, item_no);\r\n\t\t\tpstmt1.executeUpdate();\r\n\t\t\treturn count;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public void insertDBorder(String prodID, String quantity) {\r\n try {\r\n String sql = \"INSERT INTO EmpOrders (ProductID, QuantityNeeded) VALUES ('\" + prodID + \"', '\" + quantity + \"')\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }",
"public void updateDB(int orderID, String prodID, String quantity) {\r\n try {\r\n String sql = \"UPDATE EmpOrders SET EmpOrderID = '\" + orderID + \"', ProductID = '\"\r\n + prodID + \"', QuanitityNeeded = '\" + quantity + \"'\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }",
"public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }",
"public String updateCustomerQuantity() throws Exception {\n\t\tactionStartTime = new Date();\n\t\tresetToken(result);\n\t\tresult.put(ERROR, true);\n\t\tif (promotionId == null || promotionId < 1 || id == null || id < 1) {\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_DATA_CORRECT));\n\t\t\treturn JSON;\n\t\t}\n\t\ttry {\n\t\t\tstaff = getStaffByCurrentUser();\n\t\t\tif (staff == null || staff.getShop() == null || staff.getStaffType() == null) {\n\t\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_PERMISSION, \"\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\tPromotionProgram pro = promotionProgramMgr.getPromotionProgramById(promotionId);\n\t\t\tif (pro == null) {\n\t\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_EXIST_DB, \"CTKM\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\t\t\tif (!ActiveType.WAITING.equals(pro.getStatus()) && !ActiveType.RUNNING.equals(pro.getStatus())) {\n\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.incorrect\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\tPromotionCustomerMap pcm = promotionProgramMgr.getPromotionCustomerMapById(id);\n\t\t\tif (pcm == null || !ActiveType.RUNNING.equals(pcm.getStatus())) {\n\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.customer.map.not.exists\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\t\t\tif (quantity != null && pcm.getQuantityReceivedTotal() != null && quantity.compareTo(pcm.getQuantityReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số suất phân bổ không được bé hơn số suất đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else if (amount != null && pcm.getAmountReceivedTotal() != null && amount.compareTo(pcm.getAmountReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số tiền phân bổ không được bé hơn số tiền đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else if (number != null && pcm.getNumReceivedTotal() != null && number.compareTo(pcm.getNumReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số lượng phân bổ không được bé hơn số lượng đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else {\n\t\t\t\tpcm.setQuantityMax(quantity);\n\t\t\t\tpcm.setAmountMax(amount);\n\t\t\t\tpcm.setNumMax(number);\n\t\t\t\tpromotionProgramMgr.updatePromotionCustomerMap(pcm, getLogInfoVO());\n\t\t\t\tresult.put(ERROR, false);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.updateCustomerQuantity\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn JSON;\n\t}",
"private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}",
"Cart addToCart(String productCode, Long quantity, String userId);",
"@Test\n\tpublic void orderingItemsIncreasesCumulativeOrders() {\n\t\tItemQuantity itemQ1 = new ItemQuantity(101, 5);\n\t\tItemQuantity itemQ2 = new ItemQuantity(102, 10);\n\t\tList<ItemQuantity> itemQuantities = new ArrayList<ItemQuantity>();\n\t\titemQuantities.add(itemQ1);\n\t\titemQuantities.add(itemQ2);\n\t\tOrderStep step = new OrderStep(1, itemQuantities);\n\t\t\n\t\ttry {\n\t\t\titemSupplier.executeStep(step);\n\t\t} catch (OrderProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tList<ItemQuantity> ordersPerItem = null;\n\t\ttry {\n\t\t\tordersPerItem = itemSupplier.getOrdersPerItem(supplierItemIds);\n\t\t} catch (InvalidItemException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tfor (ItemQuantity itemQ : ordersPerItem) {\n\t\t\tif (itemQ.getItemId() == 101)\n\t\t\t\tassertEquals(5, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 102)\n\t\t\t\tassertEquals(10, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 103)\n\t\t\t\tassertEquals(0, itemQ.getQuantity());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Place another order\n\t\t */\n\t\titemQ1 = new ItemQuantity(101, 10);\n\t\titemQ2 = new ItemQuantity(103, 3);\n\t\titemQuantities = new ArrayList<ItemQuantity>();\n\t\titemQuantities.add(itemQ1);\n\t\titemQuantities.add(itemQ2);\n\t\tstep = new OrderStep(1, itemQuantities);\n\t\t\n\t\ttry {\n\t\t\titemSupplier.executeStep(step);\n\t\t} catch (OrderProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tordersPerItem = null;\n\t\ttry {\n\t\t\tordersPerItem = itemSupplier.getOrdersPerItem(supplierItemIds);\n\t\t} catch (InvalidItemException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tfor (ItemQuantity itemQ : ordersPerItem) {\n\t\t\tif (itemQ.getItemId() == 101)\n\t\t\t\tassertEquals(15, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 102)\n\t\t\t\tassertEquals(10, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 103)\n\t\t\t\tassertEquals(3, itemQ.getQuantity());\n\t\t}\n\t}",
"static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }",
"public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}",
"public void ExecuteSellOrder() throws SQLException, InvalidOrderException, InvalidAssetException, NegativePriceException, UnitException {\n // Current asset instance\n Asset currentAsset = Asset.findAsset(this.assetID);\n\n // Check if just ordered asset has corresponding order\n\n // Find buy orders of same asset\n Statement smt = connection.createStatement();\n String sqlFindOrder\n = \"SELECT * FROM orders WHERE assetID = '\" + assetID + \"' and orderType = 'BUY' \" +\n \"and orderStatus = 'INCOMPLETE' and unitID != '\" + this.unitID + \"' \" +\n \"ORDER BY orderTime;\";\n ResultSet buyOrders = smt.executeQuery(sqlFindOrder);\n\n // List to store corresponding buy orders of the same asset\n ArrayList<Order> matchingOrders = new ArrayList<>();\n\n // Add queried rows as new Buy Orders in list\n while (buyOrders.next()) {\n matchingOrders.add(\n new BuyOrder(\n buyOrders.getString(\"orderID\"),\n buyOrders.getString(\"userID\"),\n buyOrders.getString(\"unitID\"),\n buyOrders.getString(\"assetID\"),\n buyOrders.getString(\"orderTime\").substring(0,19),\n OrderStatus.valueOf(buyOrders.getString(\"orderStatus\")),\n OrderType.valueOf(buyOrders.getString(\"orderType\")),\n buyOrders.getDouble(\"orderPrice\"),\n buyOrders.getInt(\"orderQuantity\"),\n buyOrders.getInt(\"quantFilled\"),\n buyOrders.getInt(\"quantRemain\")\n )\n );\n }\n\n // Remove orders if the buy bid is less than the sell ask\n matchingOrders.removeIf(buys -> (buys.orderPrice < this.orderPrice));\n\n // List to store required orders that can fully/partially or completely not fill order\n ArrayList<Order> requiredOrders = new ArrayList<>();\n\n // Required asset amount to facilitate quantity of this order\n int requiredQuant = this.quantRemain;\n\n // Loop through orders matching conditions and append as many orders possible to\n // fully/partially facilitate this order\n for (int i = 0; i < matchingOrders.size(); i++) {\n // Stores quantity of current order in matchingOrders list\n int quantity = matchingOrders.get(i).quantRemain;\n if (requiredQuant > 0) {\n requiredOrders.add(matchingOrders.get(i));\n requiredQuant -= quantity;\n } else if (requiredQuant <= 0) {\n break;\n }\n }\n\n // If requiredOrders is filled it can either\n // - Have enough buy orders to fully facilitate the sell order\n // * Complete sell order (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Update buyer and seller inventory numbers\n // * Change buy order (INCOMPLETE, quantFilled, quantRemain)\n // - Have enough buy orders to partially fill the sell order\n // * Complete the corresponding buy order/s (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Change sell order (INCOMPLETE, change quant remain, change quant filled)\n // * Add inventory entry and update corresponding inventory numbers\n\n for (int i = 0; i < requiredOrders.size(); i++) {\n // How much this order has remaining to fill\n int sellQuant = this.quantRemain;\n // How much can this corresponding order faciliate of this order\n int buyQuant = requiredOrders.get(i).quantRemain;\n\n // Track executed quantity\n int executed = 0;\n\n if (buyQuant > sellQuant) {\n // When this order has more than the quantity required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n\n } else if (buyQuant == sellQuant) {\n // When this order has exactly the same amount required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n this.ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n } else {\n // When this order has less than required amount to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += requiredOrders.get(i).quantRemain;\n this.quantRemain -= requiredOrders.get(i).quantRemain;\n\n assert this.quantRemain + this.quantFilled == this.orderQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= buyQuant;\n requiredOrders.get(i).quantFilled += buyQuant;\n executed = buyQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n ChangeStatus(OrderStatus.INCOMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n }\n\n // Change asset price\n currentAsset.SetPrice(requiredOrders.get(i).orderPrice);\n\n // Change inventory amounts\n new InventoryItem(this.unitID, this.assetID, requiredOrders.get(i).orderPrice, -executed, this.orderID);\n new InventoryItem(requiredOrders.get(i).unitID, requiredOrders.get(i).assetID, requiredOrders.get(i).orderPrice, executed, requiredOrders.get(i).orderID);\n\n // Set credit balance of units\n Unit sellerUnit = Unit.getUnit(this.unitID);\n sellerUnit.ChangeUnitBalance(this.unitID, requiredOrders.get(i).orderPrice * executed);\n Unit buyerUnit = Unit.getUnit(requiredOrders.get(i).unitID);\n buyerUnit.ChangeUnitBalance(requiredOrders.get(i).unitID, -requiredOrders.get(i).orderPrice * executed);\n }\n\n // If requiredOrders is empty, no current buy orders are able to facilitate sell order\n\n // Modify watchlist balances\n\n }",
"@Override\n public TicketDTO buyCart() throws InvalidQuantityException, IOException, ProductNotFoundException {\n\n return catalogueRepository.buyCart();\n }",
"public void submitOrder(int quantity) {\n display(quantity);\n displayPrice(quantity * pintPrice);\n }",
"public void addOrder(Order o) {\n medOrder.add(o);\n //System.out.println(\"in adding order\");\n for(OrderItem oi: o.getOrderItemList())\n {\n MedicineProduct p=oi.getProduct();\n //System.out.println(\"in for oop produscts \"+p);\n Medicine med = this.searchMedicine(p.getProdName());\n if(med!=null){\n int i = med.getAvailQuantity()+oi.getQuantity();\n med.setAvailQuantity(i);\n // System.out.println(\"in adding quntity \"+i);\n \n }\n }\n \n }",
"@Transactional\n public ResponseEntity<String> orderProductsFromCart(String email)\n {\n User user = userRepository.findByEmail(email);\n Customer customer = customerRepository.findCustomerById(user.getId());\n\n // getting all ids for production variation from customer's cart\n List<Long> productVariationIds = cartRepository.getListOfProductVariationIdForCustomerId(customer.getId());\n\n // list of production variation from customer's cart\n List<ProductVariation> productVariationList = new ArrayList<>();\n\n for (Long variationId: productVariationIds) {\n\n ProductVariation productVariation = productVariationRepository.findProductVariationById(variationId);\n\n // checking if product variation is deleted\n if(productVariation == null)\n {\n return new ResponseEntity(\"Product variation with id : \"+variationId\n +\" not found at time of ordering.\",HttpStatus.NOT_FOUND);\n }\n\n // checking if product variation is active\n if(!productVariation.isActive())\n {\n return new ResponseEntity(\"Product variation with id: \"+productVariation.getId()+\" is inactive.\"\n ,HttpStatus.BAD_REQUEST);\n }\n\n productVariationList.add(productVariation);\n }\n\n // creating new instance of orders\n Orders order = new Orders();\n order.setCustomer(customer);\n order.setDateCreated(new Date());\n // by default assigning the method as COD\n order.setPaymentMethod(\"COD\");\n\n // getting customer's address by default getting home label address\n Address customerAddress = addressRepository.findAddressByUserIdAndLabel(customer.getId(), \"home\");\n\n order.setCustomerAddressAddressLine(customerAddress.getAddressLine());\n order.setCustomerAddressCity(customerAddress.getCity());\n order.setCustomerAddressCountry(customerAddress.getCountry());\n order.setCustomerAddressState(customerAddress.getState());\n order.setCustomerAddressZipCode(customerAddress.getZipCode());\n order.setCustomerAddressLabel(customerAddress.getLabel());\n\n // setting total amount for the order\n order.setAmountPaid(returnOrderTotalAmount(productVariationList, customer.getId()));\n\n // saving the order\n ordersRepository.save(order);\n\n for (ProductVariation productVariation: productVariationList) {\n\n // getting quantity from cart for each customer product variation\n int quantityFromCart = cartRepository.getQuantityForCustomerIdAndVariationId(customer.getId()\n , productVariation.getId());\n\n // creating instance of order status to persist data in OrderProduct and OrderStatus\n // since OrderStatus is inheriting OrderProduct, so using the instance of OrderStatus\n // to also set the OrderProduct entity\n OrderStatus orderProductStatus = new OrderStatus();\n orderProductStatus.setOrders(order);\n orderProductStatus.setProductVariation(productVariation);\n\n // checking if product is out of stock after adding product to cart\n if(productVariation.getQuantityAvailable() == 0)\n {\n return new ResponseEntity(\"Product variation with id : \"+productVariation.getId()\n +\" is out of stock.\",HttpStatus.BAD_REQUEST);\n }\n\n // checking if the product have sufficient quantity available to fulfill the order\n if(productVariation.getQuantityAvailable()<quantityFromCart) {\n\n return new ResponseEntity(\"Only \"+productVariation.getQuantityAvailable()\n +\" is left for the product variation id : \"+productVariation.getId(),HttpStatus.BAD_REQUEST);\n }\n\n orderProductStatus.setQuantity(quantityFromCart);\n orderProductStatus.setPrice(productVariation.getPrice()*orderProductStatus.getQuantity());\n orderProductStatus.setProductVariationMetadata(productVariation.getMetadata());\n\n // setting order status from null bcoz order is just created and didn't had a state before creation\n orderProductStatus.setFromStatus(null);\n orderProductStatus.setToStatus(ORDER_PLACED);\n\n // updating the product variation quantity after the customers orders certain quantity\n productVariation.setQuantityAvailable(productVariation.getQuantityAvailable()-orderProductStatus.getQuantity());\n productVariationRepository.save(productVariation);\n\n orderProductRepository.save(orderProductStatus); // bcoz OrderStatus inherits OrderProduct.\n }\n\n // empting the cart after order creation\n cartService.emptyCart(customer.getEmail());\n\n return new ResponseEntity<>(\"Order placed successfully with order id : \"+order.getId(),HttpStatus.CREATED);\n }",
"public ResponseEntity<String> orderPartialProductsFromCart(List<Long> productVariationIds, String email)\n {\n User user = userRepository.findByEmail(email);\n Customer customer = customerRepository.findCustomerById(user.getId());\n\n // getting all ids for production variation from customer's cart\n List<Long> productVariationIdsFromCart = cartRepository.getListOfProductVariationIdForCustomerId(customer.getId());\n\n // list for production variation from customer's cart\n List<ProductVariation> productVariationList = new ArrayList<>();\n\n for (Long variationId: productVariationIds) {\n\n // checking if passed product variation id exist in cart\n if(!productVariationIdsFromCart.contains(variationId))\n {\n return new ResponseEntity(\"Product variation with id: \"+variationId+\" does not exist in your cart\"\n , HttpStatus.NOT_FOUND);\n }\n }\n\n for (Long variationId: productVariationIds) {\n\n ProductVariation productVariation = productVariationRepository.findProductVariationById(variationId);\n\n // checking if product variation is deleted\n if(productVariation == null)\n {\n return new ResponseEntity(\"Product variation with id : \"+variationId\n +\" not found at time of ordering.\",HttpStatus.NOT_FOUND);\n }\n\n // checking if product variation is active\n if(!productVariation.isActive())\n {\n return new ResponseEntity(\"Product variation with id: \"+productVariation.getId()+\" is inactive.\"\n ,HttpStatus.BAD_REQUEST);\n }\n\n productVariationList.add(productVariation);\n }\n\n // creating new instance of orders\n Orders order = new Orders();\n order.setCustomer(customer);\n order.setDateCreated(new Date());\n // by default assigning the method as COD\n order.setPaymentMethod(\"COD\");\n\n // getting customer's address by default getting home label address\n Address customerAddress = addressRepository.findAddressByUserIdAndLabel(customer.getId(), \"home\");\n\n order.setCustomerAddressAddressLine(customerAddress.getAddressLine());\n order.setCustomerAddressCity(customerAddress.getCity());\n order.setCustomerAddressCountry(customerAddress.getCountry());\n order.setCustomerAddressState(customerAddress.getState());\n order.setCustomerAddressZipCode(customerAddress.getZipCode());\n order.setCustomerAddressLabel(customerAddress.getLabel());\n\n // setting total amount for the order\n order.setAmountPaid(returnOrderTotalAmount(productVariationList, customer.getId()));\n\n // saving the order\n ordersRepository.save(order);\n\n for (ProductVariation productVariation: productVariationList) {\n\n // getting quantity from cart for each customer product variation\n int quantityFromCart = cartRepository.getQuantityForCustomerIdAndVariationId(customer.getId()\n , productVariation.getId());\n\n // creating instance of order status to persist data in OrderProduct and OrderStatus\n // since OrderStatus is inheriting OrderProduct, so using the instance of OrderStatus\n // to also set the OrderProduct entity\n OrderStatus orderProductStatus = new OrderStatus();\n orderProductStatus.setOrders(order);\n orderProductStatus.setProductVariation(productVariation);\n\n // checking if product is out of stock after adding product to cart\n if(productVariation.getQuantityAvailable() == 0)\n {\n return new ResponseEntity(\"Product variation with id : \"+productVariation.getId()\n +\" is out of stock.\",HttpStatus.BAD_REQUEST);\n }\n\n // checking if the product have sufficient quantity available to fulfill the order\n if(productVariation.getQuantityAvailable()<quantityFromCart) {\n\n return new ResponseEntity(\"Only \"+productVariation.getQuantityAvailable()\n +\" is left for the product variation id : \"+productVariation.getId(),HttpStatus.BAD_REQUEST);\n }\n\n orderProductStatus.setQuantity(quantityFromCart);\n orderProductStatus.setPrice(productVariation.getPrice()*orderProductStatus.getQuantity());\n orderProductStatus.setProductVariationMetadata(productVariation.getMetadata());\n\n // setting order status from null bcoz order is just created and didn't had a state before creation\n orderProductStatus.setFromStatus(null);\n orderProductStatus.setToStatus(ORDER_PLACED);\n\n // updating the product variation quantity after the customers orders certain quantity\n productVariation.setQuantityAvailable(productVariation.getQuantityAvailable()-orderProductStatus.getQuantity());\n productVariationRepository.save(productVariation);\n\n orderProductRepository.save(orderProductStatus); // bcoz OrderStatus inherits OrderProduct.\n }\n\n // deleting the ordered item from the cart after order creation\n for (Long variationId: productVariationIds) {\n Cart cartItem = cartRepository.getItemFromCartForCompositeKeyCombination(customer.getId(), variationId);\n cartRepository.delete(cartItem);\n }\n\n return new ResponseEntity<>(\"Order placed successfully with order id : \"+order.getId(),HttpStatus.CREATED);\n }",
"public static Result confirmOrder(Orders orderObj){\n \n Result result = Result.FAILURE_PROCESS;\n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceBundle rs = ResourceBundle.getBundle(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection();\n PreparedStatement preStat;\n boolean isSuccessInsertion;\n \n// if(!Checker.isValidDate(date))\n// return Result.FAILURE_CHECKER_DATE;\n\n try{ \n String order_id = Util.generateID();\n \n preStat = conn.prepareStatement(rs.getString(\"mysql.order.update.insert.1\"));\n preStat.setString(1, order_id);\n preStat.setString(2, \"1\" );\n preStat.setInt(3, 0);\n preStat.setLong(4, orderObj.getDate());\n preStat.setLong(5, orderObj.getDelay());\n preStat.setString(6, orderObj.getNote());\n preStat.setDouble(7, -1);\n preStat.setString(8, orderObj.getUserAddressID());\n preStat.setString(9, orderObj.getDistributerAddressID());\n \n \n if(preStat.executeUpdate()==1){\n List<OrderProduct> orderProductList = orderObj.getOrderProductList();\n isSuccessInsertion = orderProductList.size()>0;\n\n // - * - If process fail then break operation\n insertionFail:\n for(OrderProduct orderProduct:orderProductList){\n preStat = conn.prepareStatement(rs.getString(\"mysql.orderProduct.update.insert.1\"));\n preStat.setString(1, order_id);\n preStat.setString(2, orderProduct.getCompanyProduct_id());\n preStat.setDouble(3, orderProduct.getQuantity());\n\n if(preStat.executeUpdate()!=1){\n isSuccessInsertion = false;\n break insertionFail;\n }\n }\n\n // - * - Return success\n if(isSuccessInsertion){\n mysql.commitAndCloseConnection();\n return Result.SUCCESS.setContent(\"Siparişiniz başarılı bir şekilde verilmiştir...\");\n }\n\n // - * - If operation fail then rollback \n mysql.rollbackAndCloseConnection();\n }\n\n } catch (Exception ex) {\n mysql.rollbackAndCloseConnection();\n Logger.getLogger(DBOrder.class.getName()).log(Level.SEVERE, null, ex);\n return Result.FAILURE_PROCESS.setContent(ex.getMessage());\n } finally {\n mysql.closeAllConnection();\n } \n\n return result;\n }",
"@Test\n\tpublic void testOrder() {\n\t\t\n\t\tDateFormat df1 = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = df1 .parse(\"2021-10-15\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tshoppingCart = new ShoppingCart();\n\t\tshoppingCart.setExpiry(date);\n\t\tshoppingCart.setUserId(11491);\n\t\tshoppingCart.setItems(shoppingCartSet);\n\t\t\n\t\torder.setId(1);\n\t\torder.setShoppingCart(shoppingCart);\n\t\t\n\t\ttry {\n\t\t\tassertEquals(orderService.order(order), 1);\n\t\t\t\n\t\t} catch (OrderException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void insertDB(int orderID, String prodID, String quantity) {\r\n try {\r\n String sql = \"INSERT INTO EmpOrders VALUES ('\" + orderID + \"', '\"\r\n + prodID + \"', '\" + quantity + \"')\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }",
"private static void orderItems()\r\n\t{\r\n\t\tSystem.out.println(\"Enter the S/N of the item:\");\r\n\t\tboolean checkID = false;\r\n\t\tboolean checkQty = false;\r\n\t\twhile(checkID==false)\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tint id = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t/*if the id is greater than 0, less than the menu size, i.e the ID is valid and the order list does not contain the id of\r\n\t\t\t\titem ordered, add the ID of the item ordered and the quantity in the order list*/\r\n\t\t\t\tif(id<=menu.size() && id>0 && !orderList.containsKey(id))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckID = true;\r\n\t\t\t\t\tSystem.out.println(\"Enter the quantity desired:\");\r\n\t\t\t\t\twhile(checkQty==false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint quantity = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t\t\t\torderList.put(id, quantity);\r\n\t\t\t\t\t\t\tcheckQty = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please enter a valid quantity!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*if the id is greater than 0, less than the menu size, i.e the ID is valid and the order list contains the id of item \r\n\t\t\t\tordered, retrieve existing quantity, add it up together and store the ID and the updated quantity in the order list*/\r\n\t\t\t\telse if(id<=menu.size() && id>0 && orderList.containsKey(id))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckID = true;\r\n\t\t\t\t\tint existingQty = orderList.get(id);\r\n\t\t\t\t\tSystem.out.println(\"Enter the quantity desired:\");\r\n\t\t\t\t\twhile(checkQty==false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint quantity = Integer.parseInt(scan.nextLine());\r\n\t\t\t\t\t\t\tint newQty = existingQty + quantity;\r\n\t\t\t\t\t\t\torderList.put(id, newQty);\r\n\t\t\t\t\t\t\tcheckQty = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please enter a valid quantity!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Please enter a valid menu item!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid integer!\");\r\n\t\t\t\tSystem.out.println(\"Enter the S/N of the item:\");\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void EditOrderTest() {\n wait.until(ExpectedConditions.visibilityOfElementLocated(editOrderQuantityLocator));\n WebElement editOrderQuantity = driver.findElement(editOrderQuantityLocator);\n editOrderQuantity.click();\n // Click on the checkout button\n By goToCheckOutBtnLocator = By.xpath(\"//div[@class='Basket-bf28b64c20927ec7']//button[contains(@class,'ccl-d0484b0360a2b432')]\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(goToCheckOutBtnLocator));\n WebElement goToCheckOutBtn = driver.findElement(goToCheckOutBtnLocator);\n goToCheckOutBtn.click();\n // Check that the order added to the basket\n By basketSectionSummaryLocator = By.className(\"ccl-9aab795066526b4d ccl-24c197eb36c1c3d3\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(basketSectionSummaryLocator));\n\n }",
"@PostMapping(\"/order\")\n public ResponseEntity<OrderConfirmation> placeOrder(final HttpSession session) throws Exception {\n Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT);\n log.info(session.getId() + \" : Reviewing the order\");\n //check if the cart is empty\n ControllerUtils.checkEmptyCart(initialCart, session.getId());\n\n //check if items are still available during confirmation of order\n List<OrderProduct> orderProducts = new ArrayList<>();\n for (String key : initialCart.keySet())\n orderProducts.add(ControllerUtils.parse(initialCart.get(key)));\n List<String> chckQuantity = prodService.checkQuantityList(orderProducts);\n if (chckQuantity != null) {\n log.error(session.getId() + \" : Error submitting order for products unavailable\");\n throw new AvailabilityException(chckQuantity);\n }\n\n //Confirm order and update tables\n log.info(session.getId() + \" : confirming the order and killing the session\");\n OrderConfirmation orderConfirmation = prodService.confirmOrder(initialCart);\n session.invalidate();\n return ResponseEntity.status(HttpStatus.OK).body(orderConfirmation);\n }",
"public void insertOrder(Connection conn, String clientName, String productName, int orderedQuantity) {\n\tString sql = \"INSERT INTO javadbconnection.order(clientName,productName,quantity) Values(\" + clientName + \", \"+ productName + \", \"+ orderedQuantity+ \")\";\n\ttry {\n\tPreparedStatement stmt = conn.prepareStatement(sql);\n\tstmt.executeUpdate(sql);\n\t}catch (SQLException e) {\n\tSystem.err.println(e.getMessage()); \n\t\t}\n\t}",
"public int purchase (CustomerOrder customerOrder){\n int price = 0;\n for (OrderedAmountPreProduct orderedAmountPreProduct : customerOrder.getOrderedAmountPreProducts()) {\n price += orderedAmountPreProduct.getProduct().getPrice() * orderedAmountPreProduct.getQte();\n }\n return price;\n\n\n }",
"Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);",
"@Test\n\tpublic void testGetQuantityAwaitingAllocation() {\n\t\tfinal List<OrderSku> listSkus = new ArrayList<OrderSku>();\n\t\tfinal OrderSku orderSku1 = new OrderSkuImpl();\n\t\torderSku1.setPrice(1, null);\n\t\torderSku1.setAllocatedQuantity(1);\n\t\tfinal OrderSku orderSku2 = new OrderSkuImpl();\n\t\torderSku2.setPrice(1, null);\n\t\torderSku2.setAllocatedQuantity(0);\n\t\tlistSkus.add(orderSku1);\n\t\tlistSkus.add(orderSku2);\n\n\t\tfinal InventoryDtoImpl inventoryDto = new InventoryDtoImpl();\n\t\tinventoryDto.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventoryDto.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tinventoryDto.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal PersistenceSession persistanceSession = context.mock(PersistenceSession.class);\n\t\tfinal Query query = context.mock(Query.class);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(persistenceEngine).getPersistenceSession(); will(returnValue(persistanceSession));\n\t\t\t\tallowing(persistanceSession).createNamedQuery(ORDER_SKU_SELECT_BY_CODE_AND_STATUS); will(returnValue(query));\n\t\t\t\tallowing(persistenceEngine).retrieveByNamedQuery(with(equal(ORDER_SKU_SELECT_BY_CODE_AND_STATUS)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(Arrays.asList(orderSku1, orderSku2)));\n\t\t\t\tignoring(query).setParameter(with(any(int.class)), with(any(Object.class)));\n\t\t\t\tallowing(query).list(); will(returnValue(listSkus));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\n\t\t\t\torderSku2.getQuantity() - orderSku2.getAllocatedQuantity(),\n\t\t\t\tallocationService.getQuantityAwaitingAllocation(productSku\n\t\t\t\t\t\t.getSkuCode(), WAREHOUSE_UID));\n\n\t}",
"@Transactional\n @Override\n public StringBuffer addSalesOrder(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID, String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n\t\t} \n \n StringBuffer ordersList = new StringBuffer();\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = supplierFreightMap.get(string);\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(memo);\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t if(!paymentType.equals(\"3\")){\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t genarateShoppingCartOrder(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t\t}\n return ordersList;\n }",
"@Override\n\tpublic void recordOrder(int customerID, int furnitureItemID, int quantity) {\n\t}",
"@GetMapping(\"/update_to_cart\")\n\t@ResponseBody\n\tpublic String updateQuantity(@RequestParam(name = \"productId\") int id, @RequestParam(name = \"qty\", required = false) Integer qty, HttpSession session) {\n\t\tObject obj = session.getAttribute(Constant.CART_INFOR);\n\t\tMap<Integer, OrderItem> map;\n\t\tif(obj!=null) {\n\t\t\tmap = (Map<Integer, OrderItem>) obj;\n\t\t\tOrderItem orderItem = map.get(id);\n\t\t\torderItem.setQuantity(qty);\n\t\t\tsession.setAttribute(Constant.CART_INFOR, map);\n\t\t}\n\t\treturn \"\";\n\t}",
"@Transactional\n @Override\n public StringBuffer addSalesOrderTparts(String customerID, String cartIDs, String addressID, String paymentType,\n String orderAmount, String scoreAll, String memo, String itemCount, String itemID,\n String supplierID, String itemType, String orderType, String objID, String invoiceType,\n String invoiceTitle, String generateType, String orderID,String memoIDs,String allFreight, String supplierFreightStr) throws Exception {\n \t\n String ids[] = cartIDs.split(\",\");\n String memos[] = memoIDs.split(\",\");\n List<ShoppingCartVO> shopCartList = new ArrayList<ShoppingCartVO>();\n for (String id : ids) {\n ShoppingCartVO shoppingCartVO = shoppingCartDAO.findShoppingCartByID(Long.valueOf(id));\n shopCartList.add(shoppingCartVO);\n }\n Map<String,List<ShoppingCartVO>> maps = new HashMap<String,List<ShoppingCartVO>>();\n for(ShoppingCartVO s:shopCartList){\n \tList<ShoppingCartVO> temp = new ArrayList<ShoppingCartVO>();\n \t String sid1= s.getSupplierID();\n String siname1= s.getSupplierName();\n for(ShoppingCartVO shoppingCartVO1 : shopCartList){\n \t//当前店铺对应的购物车集合\n \tString sid2 = shoppingCartVO1.getSupplierID();\n \tif(sid1.equals(sid2)){\n \t\ttemp.add(shoppingCartVO1);\n \t}\n }\n maps.put(sid1+\"_\"+siname1, temp);\n }\n \n //根据物流模板计算运费\n Map<String, Double> supplierFreightMap = new HashMap<String, Double>();\n String[] supplierFreightAll = null;\n if(StringUtil.isNotEmpty(supplierFreightStr))\n {\n \tsupplierFreightAll = supplierFreightStr.split(\"\\\\|\");\n for (int i = 0; i < supplierFreightAll.length; i++) {\n \tString[] supplierFreight = supplierFreightAll[i].split(\":\");\n \tsupplierFreightMap.put(supplierFreight[0], Double.parseDouble(supplierFreight[1]));\n \t\t} \t\n }\n \n \n StringBuffer ordersList = new StringBuffer();\n int num = 0;\n// cachedClient.delete(customerID + orderID);\n Set<String> set = maps.keySet();\n\t\tfor(String string : set){\n\t\t List<ShoppingCartVO> temp1= maps.get(string);\n\t\t double supplierFreight = 0d;\n\t\t if(supplierFreightMap.size()>0)\n\t\t {\n\t\t\t supplierFreight = supplierFreightMap.get(string);\n\t\t }\n\t\t Double amount = 0d;\n\t\t Integer count = 0;\n Integer score = 0;\n Double weight = 0d;\n\t\t for (ShoppingCartVO shoppingCartVO : temp1) {\n ItemVO itemVO = itemDAO.findItemById(shoppingCartVO.getItemID());\n count += shoppingCartVO.getItemCount();\n // weight += itemVO.getWeight();\n if (shoppingCartVO.getType() == 1) {\n amount += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesPrice();\n } else if (shoppingCartVO.getType() == 2) {\n score += shoppingCartVO.getItemCount() * itemVO.getScore();\n } else if (shoppingCartVO.getType() == 3) {\n amount += shoppingCartVO.getItemCount() * itemVO.getScorePrice();\n score += shoppingCartVO.getItemCount() * shoppingCartVO.getSalesScore();\n }\n }\n\t\t //SalesOrderVO tempOrder = new SalesOrderVO();\n\t /*if (tempOrder == null) {\n\t throw new Exception(\"参数错误\");\n\t }\n\t if (\"012\".indexOf(invoiceType) == -1) {\n\t throw new Exception(\"参数错误\");\n\t }*/\n\t SalesOrderDTO salesOrderDTO = new SalesOrderDTO();\n\t salesOrderDTO.setMainID(randomNumeric());\n\t salesOrderDTO.setCustomerID(customerID);\n\t salesOrderDTO.setPaymentType(Integer.valueOf(paymentType));\n\t salesOrderDTO.setPaymentStatus(0);\n\n\t // salesOrderDTO.setExpressFee(tempOrder.getExpressFee());//运费\n\t salesOrderDTO.setProductAmount(amount);\n\t salesOrderDTO.setTotalAmount(amount + supplierFreight);\n\t salesOrderDTO.setPayableAmount(amount);\n\n\t salesOrderDTO.setOrderType(Integer.valueOf(orderType));\n\t salesOrderDTO.setMemo(getMemoBySupplier(memos,string.split(\"_\")[0]));\n\t salesOrderDTO.setInvoiceType(Integer.parseInt(invoiceType));\n\t salesOrderDTO.setInvoiceTitle(invoiceTitle);\n\t salesOrderDTO.setSupplierID(string);\n\t salesOrderDTO.setExpressFee(supplierFreight);\n\t salesOrderDAO.addSalesOrder(salesOrderDTO);\n\t ordersList.append(salesOrderDTO.getMainID()+\",\");\n\t // 支付方式1:余额支付2:货到付款3:在线支付4:积分礼品5:线下汇款\n\t if(!paymentType.equals(\"3\")){\n\t \t//3:在线支付\n\t \t CustomerDeliveryAddressVO customerDeliveryAddressVO = customerDeliveryAddressDAO.findAddressByID(Long.valueOf(addressID));\n\t \t if (customerDeliveryAddressVO != null) {\n\t \t SalesOrderDeliveryAddressDTO salesOrderDeliveryAddressDTO = new SalesOrderDeliveryAddressDTO();\n\t \t salesOrderDeliveryAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderDeliveryAddressDTO.setName(customerDeliveryAddressVO.getName());\n\t \t salesOrderDeliveryAddressDTO.setCountryID(customerDeliveryAddressVO.getCountryID());\n\t \t salesOrderDeliveryAddressDTO.setProvinceID(customerDeliveryAddressVO.getProvinceID());\n\t \t salesOrderDeliveryAddressDTO.setCityID(customerDeliveryAddressVO.getCityID());\n\t \t salesOrderDeliveryAddressDTO.setDisctrictID(customerDeliveryAddressVO.getDisctrictID());\n\t \t salesOrderDeliveryAddressDTO.setAddress(customerDeliveryAddressVO.getAddress());\n\t \t salesOrderDeliveryAddressDTO.setMobile(customerDeliveryAddressVO.getMobile());\n\t \t salesOrderDeliveryAddressDTO.setTelephone(customerDeliveryAddressVO.getTelephone());\n\t \t if (customerDeliveryAddressVO.getZip() != null) {\n\t \t salesOrderDeliveryAddressDTO.setZip(customerDeliveryAddressVO.getZip());\n\t \t }\n\t \t salesOrderDeliveryAddressDAO.insertSalesOrderDeliveryAddress(salesOrderDeliveryAddressDTO);\n\t \t }\n\t \t ShippingAddressVO shippingAddressVO = shippingAddressDAO.findDefaultShippingAddress();\n\t \t if (shippingAddressVO != null) {\n\t \t SalesOrderShippingAddressDTO salesOrderShippingAddressDTO = new SalesOrderShippingAddressDTO();\n\t \t salesOrderShippingAddressDTO.setSalesOrderID(salesOrderDTO.getMainID());\n\t \t salesOrderShippingAddressDTO.setName(shippingAddressVO.getName());\n\t \t salesOrderShippingAddressDTO.setCountryID(shippingAddressVO.getCountryID());\n\t \t salesOrderShippingAddressDTO.setProvinceID(shippingAddressVO.getProvinceID());\n\t \t salesOrderShippingAddressDTO.setCityID(shippingAddressVO.getCityID());\n\t \t salesOrderShippingAddressDTO.setDisctrictID(shippingAddressVO.getDisctrictID());\n\t \t salesOrderShippingAddressDTO.setAddress(shippingAddressVO.getAddress());\n\t \t salesOrderShippingAddressDTO.setMobile(shippingAddressVO.getMobile());\n\t \t salesOrderShippingAddressDTO.setTelephone(shippingAddressVO.getTelephone());\n\t \t salesOrderShippingAddressDTO.setZip(shippingAddressVO.getZip());\n\t \t salesOrderShippingAddressDAO.insertSalesOrderShippingAddress(salesOrderShippingAddressDTO);\n\t \t }\n\t }\n\t \n\t ItemDTO itemDTO = new ItemDTO();\n\t SupplierItemDTO supplierItemDTO = new SupplierItemDTO();\n\t SalesOrderLineDTO salesOrderLineDTO = new SalesOrderLineDTO();\n\t if (generateType.equals(\"quickBuy\")) {\n\t generateQuickBuyOrder(itemCount,cartIDs, itemID, supplierID, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"oneKey\")) {\n\t generateOneKeyOrder(customerID, itemCount, itemType, objID, salesOrderDTO, itemDTO, supplierItemDTO,\n\t salesOrderLineDTO);\n\n\t } else if (generateType.equals(\"shoppingcart\")) {\n\t \tgenarateShoppingCartOrderTparts(customerID, cartIDs, itemCount, itemType, objID, salesOrderDTO, itemDTO,\n\t supplierItemDTO, salesOrderLineDTO);\n\t } else {\n\t throw new Exception(\"订单类型无法确定\");\n\t }\n\t num++;\n\t\t}\n return ordersList;\n }",
"public void addToOrder()\n {\n\n if ( donutTypeComboBox.getSelectionModel().isEmpty() || flavorComboBox.getSelectionModel().isEmpty() )\n {\n Popup.DisplayError(\"Must select donut type AND donut flavor.\");\n return;\n } else\n {\n int quantity = Integer.parseInt(quantityTextField.getText());\n if ( quantity == 0 )\n {\n Popup.DisplayError(\"Quantity must be greater than 0.\");\n return;\n } else\n {\n for ( int i = 0; i < quantity; i++ )\n {\n Donut donut = new Donut(donutTypeComboBox.getSelectionModel().getSelectedIndex(), flavorComboBox.getSelectionModel().getSelectedIndex());\n mainMenuController.getCurrentOrder().add(donut);\n }\n if ( quantity == 1 )\n {\n Popup.Display(\"Donuts\", \"Donut has been added to the current order.\");\n } else\n {\n Popup.Display(\"Donuts\", \"Donuts have been added to the current order.\");\n }\n\n\n donutTypeComboBox.getSelectionModel().clearSelection();\n flavorComboBox.getSelectionModel().clearSelection();\n quantityTextField.setText(\"0\");\n subtotalTextField.setText(\"$0.00\");\n }\n }\n\n\n }",
"@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentChangeQty() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tfinal long warehouseUid = WAREHOUSE_UID;\n\t\tinventory.setWarehouseUid(warehouseUid);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tfinal String skuCode = SKU_CODE;\n\t\tproductSku.setSkuCode(skuCode);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(skuCode, warehouseUid); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t}\n\t\t});\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao2).getInventory(skuCode, warehouseUid); will(returnValue(inventory2));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(\n\t\t\t\torderSku, AllocationEventType.ORDER_ADJUSTMENT_CHANGEQTY, EVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10 - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10 + QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\t}",
"public void EnterQtyInSku(String itemnum){ \r\n\t\tString searchitem = getValue(itemnum);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+searchitem);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Quantity should be entered in the quantity box\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"txtSkuPageQty\"));\r\n\t\t\tclearWebEdit(locator_split(\"txtSkuPageQty\"));\r\n\t\t\tsendKeys(locator_split(\"txtSkuPageQty\"), searchitem);\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Quantity is entered in the quantity box\");\r\n\t\t\tSystem.out.println(\"Quantity is entered in the quantity box - \"+searchitem+\" is entered\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Quantity is not entered in the quantity box \"+elementProperties.getProperty(\"txtSkuPageQty\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSkuPageQty\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}",
"List<Inventory> executeOrder(OrderForm orderForm) throws Exception;",
"public void payForOrder(){\n\t\tcurrentOrder.setDate(new Date()); // setting date to current\n\t\t\n\t\t//Checking if tendered money is enough to pay for the order.\n\t\tfor(;;){\n\t\t\tJOptionPane.showMessageDialog(this.getParent(), new CheckoutPanel(currentOrder), \"\", JOptionPane.PLAIN_MESSAGE);\n\t\t\tif(currentOrder.getTendered().compareTo(currentOrder.getSubtotal())==-1){\n\t\t\t\tJOptionPane.showMessageDialog(this.getParent(), \"Not enough money tendered\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Setting order number.\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString str = df.format(currentOrder.getDate());\n\t\tString number = Integer.toString(till.getOrders().size()+1) +\"/\"+str;\n\t\tcurrentOrder.setNumber(number);\n\t\t\n\t\t//Setting customer name.\n\t\tcurrentOrder.setCustomerName(custNameField.getText());\n\t\t\n\t\t//Adding current order to orders list.\n\t\ttill.getOrders().add(currentOrder); \n\t\t\n\t\t//Displays the receipt.\n\t\tJOptionPane.showMessageDialog(this.getParent(), new ReceiptPanel(currentOrder), \"Receipt\", \n\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\n\t\t//Resets OrderPanel.\n\t\tthis.resetOrder();\n\t}",
"private void addOrder() {\r\n // Variables\r\n String date = null, cust_email = null, cust_location = null, product_id = null;\r\n int quantity = 0;\r\n\r\n // Date-Time Format \"YYYY-MM-DD\"\r\n DateTimeFormatter dateFormatter = DateTimeFormatter.ISO_LOCAL_DATE;\r\n boolean date_Valid = false;\r\n\r\n // Separator for user readability\r\n String s = \"----------------------------------------\"; // separator\r\n\r\n boolean user_confirmed = false;\r\n while (!user_confirmed) {\r\n\r\n // module header\r\n System.out.println(s);\r\n System.out.println(\"Adding Order: \");\r\n System.out.println(s);\r\n\r\n // Getting the user date for entry\r\n System.out.print(\"Enter Date(YYYY-MM-DD): \");\r\n date = console.next();\r\n //This while loop will check if the date is valid\r\n while (!date_Valid) {\r\n try {\r\n LocalDate.parse(date, dateFormatter);\r\n System.out.println(\"Validated Date\");\r\n date_Valid = true;\r\n } catch (DateTimeParseException e) {\r\n date_Valid = false;\r\n System.out.println(\"Invalid Date\");\r\n System.out.print(\"Enter valid date(YYYY-MM-DD):\");\r\n date = console.next();\r\n }\r\n }\r\n\r\n // Getting user email\r\n System.out.print(\"Enter customer email: \");\r\n cust_email = console.next();\r\n boolean flag = false;\r\n int countr = 0, countd = 0;\r\n while(!flag) {\r\n //This loop will check if the email is valid\r\n for (int i = 0; i < cust_email.length(); i++) {\r\n if (cust_email.charAt(i) == '@') {\r\n countr++;\r\n if (countr > 1) {\r\n flag = false;\r\n break;\r\n }\r\n if (i >= 1) flag = true;\r\n else {\r\n flag = false;\r\n break;\r\n }\r\n\r\n }\r\n if (cust_email.charAt(i) == '.') {\r\n countd++;\r\n if (countd > 1) {\r\n flag = false;\r\n break;\r\n }\r\n if (i >= 3) flag = true;\r\n else {\r\n flag = false;\r\n break;\r\n }\r\n }\r\n if (cust_email.indexOf(\".\") - cust_email.indexOf(\"@\") >= 2) {\r\n flag = true;\r\n }\r\n if (!flag) break;\r\n }\r\n if (flag && cust_email.length() >= 5) {\r\n System.out.println(\"Validated Email\");\r\n break;\r\n } else {\r\n System.out.println(\"Invalid Email\");\r\n }\r\n }\r\n\r\n //Validate the customer ZIP code\r\n System.out.print(\"Enter ZIP Code: \");\r\n cust_location = console.next();\r\n while((cust_location.length()) != 5){\r\n System.out.println(\"ZIP Code must be 5 characters long\");\r\n System.out.print(\"Enter ZIP Code: \");\r\n cust_location = console.next();\r\n }\r\n\r\n // Validate product id\r\n System.out.print(\"Enter Product ID: \");\r\n product_id = console.next();\r\n while ((product_id.length()) != 12) {\r\n System.out.println(\"Product ID must be 12 characters long!\");\r\n System.out.print(\"Enter Product ID: \");\r\n product_id = console.next();\r\n }\r\n\r\n // Validate quantity\r\n System.out.print(\"Enter Quantity: \");\r\n while (!console.hasNextInt()) {\r\n System.out.println(\"Quantity must be a whole number!\");\r\n System.out.print(\"Enter Quantity: \");\r\n console.next();\r\n }\r\n quantity = console.nextInt();\r\n\r\n //Confirming Entries\r\n System.out.println(s);\r\n System.out.println(\"You entered the following values:\");\r\n System.out.println(s);\r\n System.out.printf(\"%-11s %-20s %-20s %-18s %-11s\\n\", \"|DATE:|\", \"|CUSTOMER EMAIL:|\", \"|CUSTOMER LOCATION:|\", \"|PRODUCT ID:|\", \"|QUANTITY:|\");\r\n System.out.printf(\"%-11s %-20s %-20s %-18s %11s\\n\", date, cust_email, cust_location, product_id, quantity);\r\n System.out.println(s);\r\n System.out.println(\"Is this correct?\");\r\n System.out.print(\"Type 'yes' to add this record, type 'no' to start over: \");\r\n String inp = console.next();\r\n boolean validated = false;\r\n while (validated == false) {\r\n if (inp.toLowerCase().equals(\"yes\")) {\r\n validated = true;\r\n user_confirmed = true;\r\n }\r\n else if (inp.toLowerCase().equals(\"no\")) {\r\n validated = true;\r\n\r\n }\r\n else {\r\n System.out.print(\"Invalid response. Please type 'yes' or 'no': \");\r\n inp = console.next();\r\n }\r\n }\r\n }\r\n OrderItem newItem = new OrderItem(date, cust_email, cust_location, product_id, quantity);\r\n orderInfo.add(newItem);\r\n\r\n // alert user and get next step\r\n System.out.println(s);\r\n System.out.println(\"Entry added to Data Base!\");\r\n System.out.println(s);\r\n System.out.println(\"Do you want to add another entry?\");\r\n System.out.print(\"Type 'yes' to add another entry, or 'no' to exit to main menu: \");\r\n String inp = console.next();\r\n boolean valid = false;\r\n while (valid == false) {\r\n if (inp.toLowerCase().equals(\"yes\")) {\r\n valid = true;\r\n addOrder();\r\n } else if (inp.toLowerCase().equals(\"no\")) {\r\n valid = true; // possibly direct to main menu later\r\n } else {\r\n System.out.print(\"Invalid response. Please type 'yes' or 'no': \");\r\n inp = console.next();\r\n }\r\n }\r\n }",
"@Override\n public OrderResponseDto buy(OrderRequestDto orderRequestDto){\n if(CollectionUtils.isEmpty(orderRequestDto.getOrderItemList())){\n throw new BusinessException(SystemErrorCodeEnum.ILLEGAL_PARAMETER.getCode(),\n SystemErrorCodeEnum.ILLEGAL_PARAMETER.getMessage());\n }\n\n ThreadFactory orderPromotionThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"order-promotion-%d\").build();\n ExecutorService orderPromotionProcessThreadPool = new ThreadPoolExecutor(5, 200, 0L,\n TimeUnit.MILLISECONDS, new LinkedBlockingDeque<>(1024), orderPromotionThreadFactory,\n new ThreadPoolExecutor.AbortPolicy());\n\n //Execute as individual parallel tasks for promotion settlement process of each sku item\n CompletionService<List<SkuSettlementDto>> orderSettlementSvc = new ExecutorCompletionService<>(orderPromotionProcessThreadPool);\n orderRequestDto.getOrderItemList().parallelStream().forEach(oi -> {\n //Validation for sku basic info\n SkuInfo skuInfo = skuRepository.selectById(oi.getSkuId());\n if(skuInfo == null){\n throw new BusinessException(BusinessErrorCodeEnum.CANNOT_FOUND_SKU_BASE_INFO.getCode(),\n BusinessErrorCodeEnum.CANNOT_FOUND_SKU_BASE_INFO.getMessage());\n }\n\n //Query related rule exists or not\n PromotionRule filter = new PromotionRule();\n filter.setPromotionSkuId(oi.getSkuId());\n filter.setDelete(false);\n Wrapper<PromotionRule> wrapper = new EntityWrapper<>(filter);\n PromotionRule promotionRule = promotionRuleRepository.selectOne(wrapper);\n //If no corresponding promotion rule, return\n if(promotionRule == null){\n return;\n }\n\n orderSettlementSvc.submit(new Callable() {\n @Override\n public SkuSettlementDto call() throws Exception {\n //Start execute promotion settlement process\n PromotionProcessBaseStrategy strategy = promotionProcessContext.getPromotionProcessBaseStrategy(\n PromotionRuleTypeEnum.getValueByCode(promotionRule.getPromotionRuleType()));\n\n ProcessSkuSettlementBo processSkuSettlementBo = new ProcessSkuSettlementBo();\n processSkuSettlementBo.setPromotionRule(promotionRule);\n processSkuSettlementBo.setSkuInfo(skuInfo);\n BeanUtils.copyProperties(oi, processSkuSettlementBo);\n\n return strategy.processSkuSettlement(processSkuSettlementBo);\n }\n });\n });\n\n //Get the summary result of each task\n List<SkuSettlementDto> processResultSkuList = new ArrayList();\n orderRequestDto.getOrderItemList().parallelStream().forEach(oi -> {\n try {\n SkuSettlementDto processedSkuInfo = (SkuSettlementDto)orderSettlementSvc.take().get();\n if(processedSkuInfo != null) {\n processResultSkuList.add(processedSkuInfo);\n }\n } catch (InterruptedException | ExecutionException e) {\n throw new BusinessException(BusinessErrorCodeEnum.PROCESS_SKU_PROMOTION_SETTLEMENT_FAILED.getCode(),\n BusinessErrorCodeEnum.PROCESS_SKU_PROMOTION_SETTLEMENT_FAILED.getMessage() + e.getStackTrace());\n }\n });\n\n orderPromotionProcessThreadPool.shutdown();\n\n OrderResponseDto orderResponseDto = null;\n if(!CollectionUtils.isEmpty(processResultSkuList)){\n orderResponseDto = new OrderResponseDto();\n orderResponseDto.setSkuSettlementResultList(processResultSkuList);\n\n //Calculate total order actual paid amount\n List<BigDecimal> allSkuSubtotalAmount = processResultSkuList.stream()\n .map(SkuSettlementDto::getSubTotalAmount)\n .collect(Collectors.toList());\n if(!CollectionUtils.isEmpty(allSkuSubtotalAmount)){\n orderResponseDto.setActualTotalPaidAmount(allSkuSubtotalAmount.stream()\n .reduce(BigDecimal.ZERO, BigDecimal::add)\n .setScale(2));\n }\n }\n\n return orderResponseDto;\n }",
"public void updateOrder(String id, int quantity)\n {\n for (OrderItem orderItem : orderItems)\n if (orderItem.getFruitId().equalsIgnoreCase(id))\n {\n orderItem.setQuantity(orderItem.getQuantity() + quantity);\n return;\n }\n }",
"public static BigDecimal getQtyOrdered(Properties ctx, int M_Warehouse_ID, int M_Product_ID, Timestamp To, String trxName) {\n\t\tfinal String sql = \"SELECT SUM(Qty) FROM PP_MRP WHERE \" + \" TypeMRP='S' AND DocStatus IN ('IP','CO')\"\n\t\t// +\" AND OrderType IN ('POO','MOP','DOO')\"\n\t\t\t\t+ \" AND AD_Client_ID=?\" + \" AND DatePromised <=?\" + \" AND M_Warehouse_ID =? AND M_Product_ID=?\";\n\t\tBigDecimal qty = MUDB.getSQLValueBD(trxName, sql, new Object[] { Env.getAD_Client_ID(ctx), To, M_Warehouse_ID, M_Product_ID });\n\t\t// SQL may return no rows or null\n\t\tif (qty == null)\n\t\t\treturn Env.ZERO;\n\n\t\treturn qty;\n\t}",
"@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}",
"@Then(\"^user selects the accommodation and enters the quantity$\")\n\tpublic void user_selects_the_accommodation_and_enters_the_quantity() throws Throwable {\n\t\tamendFerry.updateExtraAccom();\n\t\tamendFerry.updateExtra();\n\t}",
"String registerOrder(int userId, int quantity, int pricePerUnit, OrderType orderType);",
"public CartOrder updateOrder(CartOrder order) throws Exception;",
"public CustomerCartItem(Long itemId, int quantity) {\n this.id = itemId;\n this.quantity = quantity;\n }",
"@Override\n\tpublic int completeOrder(int orderId) {\n\t\tOrder order = orderDao.getOrder(orderId);\n\t\tfor (ProductOrder productOrder : order.getProductOrders()) {\n\t\t\tProduct product = productOrder.getProduct();\n\t\t\tint newQuantity = product.getAvailableQuantity() - productOrder.getOrderAmount();\n\t\t\tproduct.setAvailableQuantity(newQuantity);\n\t\t\tcatalogService.editProduct(product);\n\t\t}\n\t\treturn orderDao.completeOrder(orderId);\n\t}",
"@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}",
"@Override\n public ResponsePurchaseDTO checkout() throws NotLoggedInException, NotEnoughQuantityException, NameNotFoundException, IOException, ProductIdNotValidException, BrandNotFoundException, WrongUserDatabase, UserDatabaseNotFoundException {\n if (actualUser != null) {\n ResponsePurchaseDTO response;\n response = new ResponsePurchaseDTO(productService.makePurchase(actualUser.getPersonalCart()), new StatusCodeDTO(200, \"Usuario \" + actualUser.getUserName() + \", su solicitud de compra ha sido exitosa\"));\n clearCart();\n reloadUser(lastUserName);\n return response;\n } else\n throw new NotLoggedInException();\n }",
"public ResponseEntity<String> directOrderProduct(Long productVariationId, Integer quantity, String email)\n {\n User user = userRepository.findByEmail(email);\n Customer customer = customerRepository.findCustomerById(user.getId());\n\n ProductVariation productVariation = productVariationRepository.findProductVariationById(productVariationId);\n\n if(productVariation == null)\n {\n return new ResponseEntity(\"Invalid product variation id\",HttpStatus.NOT_FOUND);\n }\n\n // checking if product variation is active\n if(!productVariation.isActive())\n {\n return new ResponseEntity(\"Product variation with id: \"+productVariation.getId()+\" is inactive.\"\n ,HttpStatus.BAD_REQUEST);\n }\n\n if(quantity<=0)\n {\n return new ResponseEntity(\"Quantity should be greater than 0.\",HttpStatus.BAD_REQUEST);\n }\n\n if(productVariation.getQuantityAvailable() == 0)\n {\n return new ResponseEntity(\"Product variation is out of stock.\",HttpStatus.BAD_REQUEST);\n }\n\n if(productVariation.getQuantityAvailable() < quantity)\n {\n return new ResponseEntity(\"Only \"+ productVariation.getQuantityAvailable()\n +\" stocks available for the product variations.\",HttpStatus.BAD_REQUEST);\n }\n\n // creating new instance of orders\n Orders order = new Orders();\n order.setCustomer(customer);\n order.setDateCreated(new Date());\n // by default assigning the method as COD\n order.setPaymentMethod(\"COD\");\n\n // getting customer's address by default getting home label address\n Address customerAddress = addressRepository.findAddressByUserIdAndLabel(customer.getId(), \"home\");\n\n order.setCustomerAddressAddressLine(customerAddress.getAddressLine());\n order.setCustomerAddressCity(customerAddress.getCity());\n order.setCustomerAddressCountry(customerAddress.getCountry());\n order.setCustomerAddressState(customerAddress.getState());\n order.setCustomerAddressZipCode(customerAddress.getZipCode());\n order.setCustomerAddressLabel(customerAddress.getLabel());\n\n // setting total amount for the order\n order.setAmountPaid(productVariation.getPrice()*quantity);\n\n // saving the order\n ordersRepository.save(order);\n\n // creating instance of order status to persist data in OrderProduct and OrderStatus\n // since OrderStatus is inheriting OrderProduct, so using the instance of OrderStatus\n // to also set the OrderProduct entity\n OrderStatus orderProductStatus = new OrderStatus();\n orderProductStatus.setOrders(order);\n orderProductStatus.setProductVariation(productVariation);\n orderProductStatus.setQuantity(quantity);\n orderProductStatus.setPrice(productVariation.getPrice()*orderProductStatus.getQuantity());\n orderProductStatus.setProductVariationMetadata(productVariation.getMetadata());\n\n // setting order status from null bcoz order is just created and didn't had a state before creation\n orderProductStatus.setFromStatus(null);\n orderProductStatus.setToStatus(ORDER_PLACED);\n\n // updating the product variation quantity after the customers orders certain quantity\n productVariation.setQuantityAvailable(productVariation.getQuantityAvailable()-orderProductStatus.getQuantity());\n productVariationRepository.save(productVariation);\n\n orderProductRepository.save(orderProductStatus);\n\n return new ResponseEntity<>(\"Order placed successfully with order id : \"+order.getId(),HttpStatus.CREATED);\n }",
"@Test\n public void getOrderByIdTest() {\n Long orderId = 10L;\n Order response = api.getOrderById(orderId);\n Assert.assertNotNull(response);\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/order/10\")));\n }",
"@Test(priority = 1)\n public void testPurchaseSingleItemAndGetTotal() throws Exception {\n URI uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n HttpEntity<String> request = new HttpEntity<>(headersUser1);\n ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.GET, request, String.class);\n assertEquals(200, result.getStatusCodeValue());\n setCookie(result, headersUser1); // save the session cookie to use with subsequent requests.\n\n // doing an API call to get products and select a random product\n List<ProductDTO> products = getProducts(headersUser1);\n Random random = new Random();\n ProductDTO product = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n BigDecimal exceptedTotal = new BigDecimal(\"0.0\");\n CartItemDTO item = new CartItemDTO();\n item.setQuantity((long) (random.nextInt(5) + 1));\n item.setProduct(product);\n\n BigDecimal price = product.getPrice().add(product.getTax());\n exceptedTotal = exceptedTotal.add(price.multiply(new BigDecimal(item.getQuantity())));\n\n // doing an API call to add the select product into cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/items\");\n HttpEntity<CartItemDTO> itemAddRequest = new HttpEntity<>(item, headersUser1);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // doing an API call to get the content of the cart\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser1);\n ResponseEntity<ShoppingCartDTO> cartResponse = restTemplate.exchange(uri,\n HttpMethod.GET, request, ShoppingCartDTO.class);\n assertEquals(200, cartResponse.getStatusCodeValue());\n assertNotNull(cartResponse.getBody());\n exceptedTotal = exceptedTotal.multiply(new BigDecimal(\"1.15\"));\n assertEquals(exceptedTotal, cartResponse.getBody().getTotalAmount());\n\n // doing an API call to clear the cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser1);\n result = restTemplate.exchange(uri, HttpMethod.DELETE, request, String.class);\n assertEquals(204, result.getStatusCodeValue());\n }",
"@Override\n @Transactional\n public PurchaseResponse placeOrder(Purchase purchase) {\n Order order = purchase.getOrder();\n\n //genrate traking number\n String orderTrakingNumber = genrateOrderTrakingnumber();\n order.setOrderTrackingNumber(orderTrakingNumber);\n\n //populate order with order item\n Set<OrderItem> orderItems = purchase.getOrderItems();\n orderItems.forEach(item-> order.add(item));\n\n //populate order with billingAddress and shipplingAddress\n order.setBillingAddress(purchase.getBillingAddress());\n order.setShippingAddress(purchase.getShippingAddress());\n\n //populate customer with order\n Customer customer = purchase.getCustomer();\n\n // checck if the existing customer\n String theEmail = customer.getEmail();\n Customer customerFromDB = customerRepository.findByEmail(theEmail);\n\n if(customerFromDB != null){\n // we found it let assign them\n customer = customerFromDB;\n }\n\n customer.add(order);\n\n //sqve to the db\n customerRepository.save(customer);\n\n\n\n // return the response\n return new PurchaseResponse(orderTrakingNumber);\n }",
"@Test\n public void addToCart() throws Exception {\n\n ReadableProducts product = super.readyToWorkProduct(\"addToCart\");\n assertNotNull(product);\n\n PersistableShoppingCartItem cartItem = new PersistableShoppingCartItem();\n cartItem.setProduct(product.getId());\n cartItem.setQuantity(1);\n\n final HttpEntity<PersistableShoppingCartItem> cartEntity =\n new HttpEntity<>(cartItem, getHeader());\n final ResponseEntity<ReadableShoppingCart> response =\n testRestTemplate.postForEntity(\n String.format(\"/api/v1/cart/\"), cartEntity, ReadableShoppingCart.class);\n\n // assertNotNull(response);\n // assertThat(response.getStatusCode(), is(CREATED));\n\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 Integer insertOrders(Double total, Integer[] cartIds, Integer userid) {\n\t\tOrders orders=new Orders();\n\t\torders.setUserid(userid);\n\t\torders.setTotal(total);//订单的总金额\n\t\torders.setOrdertime(new Date());//下订单时间\n\t\torders.setState(0);//代表未付款\n\t\tordersMapper.insert(orders);\n\t\tInteger oid=orders.getOid();\n\t\tfor (int i = 0; i < cartIds.length; i++) {\n\t\t\tShopcart shopcart=shopcartMapper.selectByPrimaryKey(cartIds[i]);\n\t\t\t\n\t\t\tOrderitem orderitem=new Orderitem();\n\t\t\torderitem.setCount(shopcart.getCount());\n\t\t\torderitem.setPid(shopcart.getPid());\n\t\t\torderitem.setSubtotal(shopcart.getSubtotal());\n\t\t\torderitem.setOid(oid);\n\t\t\torderitemMapper.insert(orderitem);\n\t\t\t\n\t\t\tshopcartMapper.deleteByPrimaryKey(cartIds[i]);\n\t\t}\n\t\t\n\t\treturn oid;\n\t}",
"public Order(int ordID, int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = ordID;\r\n\t\torderTotal = 0;\r\n\t}",
"public void increaseQuantityOfProductByOne() {\n int intQuantity = Integer.parseInt(quantityOfProducts.getAttribute(\"value\"));\n plusButton.click();\n testClass.waitTillValueOfElementIsIncreasedByOne(\n QUANTITY_OF_PRODUCTS_XPATH, intQuantity + 1);\n }",
"@Test(priority = 2)\n public void testPurchaseMultipleItemsAndGetTotal() throws Exception {\n URI uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n HttpEntity<String> request = new HttpEntity<>(headersUser2);\n ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.GET, request, String.class);\n assertEquals(200, result.getStatusCodeValue());\n setCookie(result, headersUser2);\n\n // doing an API call to get products and select a random product\n List<ProductDTO> products = getProducts(headersUser2);\n Random random = new Random();\n ProductDTO product1 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n BigDecimal exceptedTotal = new BigDecimal(\"0.0\");\n CartItemDTO item1 = new CartItemDTO();\n item1.setQuantity((long) (random.nextInt(5) + 1));\n item1.setProduct(product1);\n\n BigDecimal price1 = product1.getPrice().add(product1.getTax());\n exceptedTotal = exceptedTotal.add(price1.multiply(new BigDecimal(item1.getQuantity())));\n\n // doing an API call to add the select product into cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/items\");\n HttpEntity<CartItemDTO> itemAddRequest = new HttpEntity<>(item1, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // Select another random product\n ProductDTO product2 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n CartItemDTO item2 = new CartItemDTO();\n item2.setQuantity((long) (random.nextInt(5) + 1));\n item2.setProduct(product2);\n\n BigDecimal price2 = product2.getPrice().add(product2.getTax());\n exceptedTotal = exceptedTotal.add(price2.multiply(new BigDecimal(item2.getQuantity())));\n\n // doing an API call to add the select product into cart.\n itemAddRequest = new HttpEntity<>(item2, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // doing an API call to get the content of the cart\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser2);\n ResponseEntity<ShoppingCartDTO> cartResponse = restTemplate.exchange(uri,\n HttpMethod.GET, request, ShoppingCartDTO.class);\n assertEquals(200, cartResponse.getStatusCodeValue());\n assertNotNull(cartResponse.getBody());\n exceptedTotal = exceptedTotal.multiply(new BigDecimal(\"1.15\"));\n assertEquals(exceptedTotal, cartResponse.getBody().getTotalAmount());\n\n // doing an API call to submit the cart to process.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/submit\");\n request = new HttpEntity<>(headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, request, String.class);\n assertEquals(201, result.getStatusCodeValue());\n }",
"public void purchase() {\r\n\t\tdo {\r\n\t\t\tString id = getToken(\"Enter customer id: \");\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tint quantity = getInteger(\"Enter quantity to purchase: \");\r\n\t\t\tboolean purchased = store.purchaseWasher(id, brand, model, quantity);\r\n\t\t\tif (purchased) {\r\n\t\t\t\tSystem.out.println(\"Purchased \" + quantity + \" of \" + brand + \" \" + model + \" for customer \" + id);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Purchase unsuccessful.\");\r\n\t\t\t}\r\n\t\t} while (yesOrNo(\"Make another Purchase?\"));\r\n\t}",
"public Object[][] addItemsToCart(WebDriver driver, String[] itemsNeeded, int[] itemQuantity, int countOfItems) throws InterruptedException {\n WebDriverWait explicitWait = new WebDriverWait(driver, 5);\n Actions actions = new Actions(driver);\n List<String> itemsNeededList = Arrays.asList(itemsNeeded);\n List<String> itemsNotFoundList = new LinkedList<>(Arrays.asList(itemsNeeded));\n\n //create object with / product name / quantity / position / prices from products page\n Object[][] data = new Object[itemsNeeded.length][4];\n\n for (int i = 0; i < itemsNeeded.length; i++) {\n data[i][0] = itemsNeeded[i];\n data[i][1] = itemQuantity[i];\n\n // find position\n for (int j = 0; j < productsList.size(); j++) {\n String formattedName = productsList.get(j).getText().split(\"-\")[0].trim();\n if (itemsNeeded[i].equals(formattedName)) {\n //position\n data[i][2] = j;\n // price\n data[i][3] = Integer.parseInt(productsPrice.get(j).getText());\n itemsNotFoundList.remove(formattedName);\n break;\n }\n }\n }\n\n // if some products not found - return\n if (itemsNotFoundList.size() > 0) {\n\n Object[][] productsNotFound = new Object[1][2];\n productsNotFound[0][0] = \"Some Product/s not found: \";\n productsNotFound[0][1] = itemsNotFoundList;\n\n return productsNotFound;\n\n }\n\n //start adding items\n for (int i = 0; i < itemsNeeded.length; i++){\n int k = 1;\n // for avoid element not clickable\n actions.sendKeys(Keys.HOME).build().perform();\n Thread.sleep(200);\n\n // when product was found on page\n if (data[i][2] != null) {\n // if product was added recently - change quantity back to 1\n if (Integer.parseInt(productsQuantityView.get((Integer) data[i][2]).getAttribute(\"value\")) > 1) {\n productsQuantityView.get((Integer) data[i][2]).clear();\n productsQuantityView.get((Integer) data[i][2]).sendKeys(\"1\");\n }\n // change quantity\n while (k < (Integer) data[i][1]) {\n incrementQuantityButton.get((Integer) data[i][2]).click();\n k++;\n }\n //in case add to cart button would not refresh after previous click\n explicitWait.until(ExpectedConditions.visibilityOf(addToCartButtonsList.get((Integer) data[i][2])));\n // add item to cart\n addToCartButtonsList.get((Integer) data[i][2]).click();\n Thread.sleep(1000);\n }\n }\n\n // reformatting data if some products are present more than 1 time (for comparing with card data)\n List<String> formattedNeededList =itemsNeededList.stream().distinct().collect(Collectors.toList());\n if (itemsNeededList.size() > formattedNeededList.size()) {\n int sameProductsCount = itemsNeededList.size() - formattedNeededList.size();\n Object[][] newData = new Object[formattedNeededList.size()][4];\n for (int i = 0; i < formattedNeededList.size(); i++) {\n String nameFromFormattedList = formattedNeededList.get(i);\n // name of product\n newData[i][0] = nameFromFormattedList;\n // position\n newData[i][2] = data[itemsNeededList.indexOf(nameFromFormattedList)][2];\n // price\n newData[i][3] = data[itemsNeededList.indexOf(nameFromFormattedList)][3];\n\n //quantity check\n int totalQuantityForProduct = (int) data[itemsNeededList.indexOf(nameFromFormattedList)][1];\n\n for (int j = i + 1; j < itemsNeededList.size() && sameProductsCount > 0; j++) {\n if (data[i][0].equals(data[j][0])) {\n totalQuantityForProduct += (int) data[j][1];\n sameProductsCount--;\n }\n }\n //quantity\n newData[i][1] = totalQuantityForProduct;\n }\n return newData;\n\n } else {\n return data;\n }\n }",
"public void addItemToSale(String productId, int quantity) {\r\n if (productId.isEmpty()) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id is missing - enter valid product id\");\r\n System.exit(1);\r\n }\r\n if (quantity <= 0) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"quantity is less than or equal to 0 - enter valid quantity\");\r\n System.exit(1);\r\n }\r\n FakeDatabase db = new FakeDatabase();\r\n Product product = db.findProduct(productId);\r\n\r\n if (product != null) { //product found in database\r\n receipt.addLineItem(product, quantity);\r\n } else {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id not found in database - enter valid product id\");\r\n System.exit(1);\r\n }\r\n }",
"public void purchase(){\n\t\t\n\t\t//Ask the user for notes about the item\n\t\tSystem.out.println(\"Please enter any special requests regarding your \" +\n\t\t\t\t\t\t\t\"food item for our staff to see while they prepare it.\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString foodNotes = scan.nextLine();\n\t\tnotes = foodNotes;\n\t\t\n\t\t//Add this item's price to the order total\n\t\tMenu.orderPrice += price;\n\t\t\n\t}",
"public void scannedProduct(String prodId, int qty) {\r\n newLineItem = transaction.addItemToSale(prodId, qty);\r\n if (newLineItem != null) {\r\n addToLineItem(newLineItem);\r\n }\r\n else {\r\n System.out.println(\"The price and product information for \" \r\n + \"product \" + prodId + \" can not found!\");\r\n }\r\n }",
"public ComplexOrderEntryTO[] getStockItems(long storeID, ProductTO[] requiredProductTOs) throws NotImplementedException;",
"void createOrder(List<Product> products, Customer customer);",
"public void checkout() {\n\t\t// checkout and reset the quantity in global product list\n\t\tfor (CartProduct product : Admin.products) {\n\t\t\ttry {\n\t\t\t\tfor (CartProduct cartProduct : cart.getProducts()) {\n\t\t\t\t\tif (product.getDescription().equals(cartProduct.getDescription())) {\n\t\t\t\t\t\tif(product.getQuantity() >= 1) {\n\t\t\t\t\t\t\tproduct.setQuantity(product.getQuantity() - 1); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tcart.deleteCart();\n\t}",
"public void submitOrder() {\n int price = quantity*5;\n displayPrice(price);\n }",
"ProductView orderProduct(int amount, int productId) throws ProductException;",
"@Override\n\tpublic void updateOrderQuantity(Long id, Long quantity, Long userId) {\n\t\tOptional<Order> order = ordersRepository.findById(id);\n\t\tif(order.isPresent()){\n\t\t\tif( order.get().getUser().getId()==userId) {\n\t\t\t\tOrder entity = order.get();\n\t\t\t\tentity.setQuantity(quantity);\n\t\t\t\tordersRepository.save(entity);\n\t\t\t}else{\n\t\t\t\t//add a logger here\n\t\t\t\tthrow new ValidationException(\"User not allowed to modify this order\",\n\t\t\t\t\t\t\"The order does not belong to this user\",\n\t\t\t\t\t\t\"Provide the order ID belonging to the logged in user\");\n\t\t\t}\n\t\t}else{\n\t\t\t//Add a logger here\n\t\t\tthrow new NotFoundException(\"Order does not exist\", \"Invalid order ID given\", \"Verify the order ID/user ID\");\n\t\t}\n\n\t}",
"Cart deleteFromCart(String code, Long quantity, String userId);",
"public void editQTYtoreach3000subtotal() throws InterruptedException {\n qtyeditfieldFirstItem.clear();\n qtyeditfieldFirstItem.sendKeys(bulkorderqtycalculation());\n Thread.sleep(1000);\n qtyPlusIconBasketSec1ShoppingCart.click();\n Thread.sleep(5000);\n }",
"public void getCartProducts(int userId) {\n try {\n int flag = 1;\n while(1 == flag) {\n int prodId = InputUtil.getInt(\"Enter product Id : \");\n Product product = cartService.getProductFromStore(prodId);\n if(!cartService.validateProduct(userId,prodId)) {\n System.out.println(\"Product added already in cart\\n\"); \n break;\n }\n Cart cart = new Cart();\n\t\t cart.setProduct(product); \n cart.setUser(userService.getUser(userId));\n\t\t int quantity = InputUtil.getInt(\"Enter product quantity : \"); \n cart.setQuantity(quantity);\n cart.setCreated(DateUtil.getCurrentDateTime());\n cart.setModified(DateUtil.getCurrentDateTime());\n cartService.add(cart);\n System.out.println(\"\\n\"+product.getName().toUpperCase()+\" added to cart \");\n flag = InputUtil.getInt(\"Enter 1 to add products. 2 to exit : \");\n }\n } catch (ProductException e) {\n\t System.out.println(e);\n } catch (DatabaseConnectionException e) {\n\t System.out.println(e);\n\t } catch (NoRecordFoundException ex) {\n System.out.println(ex);\n } catch (CartException ex) {\n System.out.println(ex);\n } \n }",
"public void fillOrders(int totalEntries) {\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Date date = new Date();\n int getRandomUserId = getRandomNumber(0, 999);\n storeOperations.submitOrder(dateFormat.format(date), \"user_\" + getRandomUserId, \"password_\" + getRandomUserId, getProductsToBeOrdered(getRandomNumber(1, 10)));\n }\n }",
"@Test\n public void enterOrderWithUnmatchedActiveOrder() throws Exception {\n LimitOrderRequest limitOrderRequest = getLimitOrderRequest(Direction.BUY);\n LimitOrder referenceLimitOrder = getLimitOrder();\n String orderRequestJsonString = jsonMapper.writeValueAsString(limitOrderRequest);\n\n //When: the order is posted to the service\n MvcResult postResponse = performEnterOrderPostRequest(orderRequestJsonString);\n\n OrderRequestResponse response = jsonMapper\n .readValue(postResponse.getResponse().getContentAsString(), OrderRequestResponse.class);\n Assert.assertEquals(\"Response should be successful\", ResponseType.SUCCESS,\n response.getResponseType());\n\n MvcResult getResponse = mvc.perform(get(\"/status\")\n .contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n\n PublicMarketStatus status = jsonMapper\n .readValue(getResponse.getResponse().getContentAsString(), PublicMarketStatus.class);\n\n //Then: the order is entered correctly in to the market\n List<Ticker> tickers = status.getOrders();\n Assert.assertEquals(\"There is a ticker\", 1, tickers.size());\n Ticker ticker = tickers.get(0);\n Assert.assertEquals(\"Ticker name is correct\", limitOrderRequest.getTicker(), ticker.getName());\n Assert.assertTrue(\"Order is not in wrong queue\", ticker.getSell().isEmpty());\n Assert.assertEquals(\"Order is in right queue\", 1, ticker.getBuy().size());\n AbstractActiveOrder order = ticker.getBuy().get(0);\n Assert.assertEquals(\"Order is correct one\", referenceLimitOrder, order);\n\n }",
"public void buyItem(int id, int q)\n\t{\n\t\t/* If the player isn't shopping, in a normal shop */\n\t\tif(m_currentShop == null)\n\t\t{\n\t\t\t/* First, check if the player can afford this */\n\t\t\tint price = GameServer.getServiceManager().getItemDatabase().getItem(id).getPrice();\n\t\t\tif(m_money - q * price >= 0)\n\t\t\t{\n\t\t\t\t/* Finally, if the item is in stock, buy it */\n\n\t\t\t\tm_money = m_money - q * price;\n\t\t\t\tm_bag.addItem(id, q);\n\t\t\t\tupdateClientMoney();\n\t\t\t\t/* Let player know he bought the item. */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.BOUGHT_ITEM);\n\t\t\t\tmessage.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\tgetSession().Send(message);\n\t\t\t\t/* Update player inventory. */\n\t\t\t\tServerMessage update = new ServerMessage(ClientPacket.UPDATE_ITEM_TOT);\n\t\t\t\tupdate.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\tupdate.addInt(q);\n\t\t\t\tgetSession().Send(update);\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Return You have no money, fool! */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.NOT_ENOUGH_MONEY);\n\t\t\t\tgetSession().Send(message);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif(m_bag.hasSpace(id))\n\t\t{\n\t\t\t/* First, check if the player can afford this */\n\t\t\tif(m_money - q * m_currentShop.getPriceForItem(id) >= 0)\n\t\t\t{\n\t\t\t\t/* Finally, if the item is in stock, buy it */\n\t\t\t\tif(m_currentShop.buyItem(id, q))\n\t\t\t\t{\n\t\t\t\t\tm_money = m_money - q * m_currentShop.getPriceForItem(id);\n\t\t\t\t\tm_bag.addItem(id, q);\n\t\t\t\t\tupdateClientMoney();\n\t\t\t\t\t/* Let player know he bought the item. */\n\t\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.BOUGHT_ITEM);\n\t\t\t\t\tmessage.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\t\tgetSession().Send(message);\n\t\t\t\t\t/* Update player inventory. */\n\t\t\t\t\tServerMessage update = new ServerMessage(ClientPacket.UPDATE_ITEM_TOT);\n\t\t\t\t\tupdate.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\t\tupdate.addInt(1);\n\t\t\t\t\tgetSession().Send(update);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Return You have no money, fool! */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.NOT_ENOUGH_MONEY);\n\t\t\t\tgetSession().Send(message);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Send You cant carry any more items! */\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.POCKET_FULL);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t}",
"public void increaseQty_CNCItem(int qtytoincrease) throws InterruptedException {\n UtilityHelper.waitUntilClickable(plusIcon1stunderCNCsectionShoppingCartPage);\n for (int i = 0; i < qtytoincrease; i++) {\n plusIcon1stunderCNCsectionShoppingCartPage.click();\n }\n Thread.sleep(3000);\n }",
"@Test\n\tpublic void orderingBadItemsThrowsException() {\n\t\tItemQuantity wrongItem = new ItemQuantity(201, 5);\n\t\tList<ItemQuantity> wrongItemQuantities = new ArrayList<ItemQuantity>();\n\t\twrongItemQuantities.add(wrongItem);\n\t\t\n\t\tOrderStep wrongStep = new OrderStep(1, wrongItemQuantities);\n\t\t\n\t\tboolean exceptionWasThrown = false;\n\t\ttry {\n\t\t\titemSupplier.executeStep(wrongStep);\n\t\t}\n\t\tcatch (OrderProcessingException ex) {\n\t\t\texceptionWasThrown = true;\n\t\t}\n\t\tassertTrue(exceptionWasThrown);\n\t\t\n\t\t/* \n\t\t * Check that items with negative quantity get rejected \n\t\t */\n\t\twrongItem = new ItemQuantity(101, -5);\n\t\twrongItemQuantities = new ArrayList<ItemQuantity>();\n\t\twrongItemQuantities.add(wrongItem);\n\t\t\n\t\twrongStep = new OrderStep(1, wrongItemQuantities);\n\t\t\n\t\texceptionWasThrown = false;\n\t\ttry {\n\t\t\titemSupplier.executeStep(wrongStep);\n\t\t}\n\t\tcatch (OrderProcessingException ex) {\n\t\t\texceptionWasThrown = true;\n\t\t}\n\t\tassertTrue(exceptionWasThrown);\n\t}",
"public void enterQuantityInputFieldShoppingCart(String input_Quantity) throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(quantityInputFieldShoppingCart);\n\t\tquantityInputFieldShoppingCart.clear();\n\t\tquantityInputFieldShoppingCart.sendKeys(input_Quantity);\n\t}",
"public void changeOrderPosItemQuantityInOrder(int orderID, long orderPosItemID, int orderPosItemQuantity) {\n if (this.orderListMap.get(orderID).getOrderState().equals(OrderState.INPROGRESS)) {\n\n double beforeOrderTotalPrice = this.orderListMap.get(orderID).getOrderTotalPrice();\n int discount = this.orderListMap.get(orderID).getDiscount();\n OrderPosition bufOrderPosition = this.orderListMap.get(orderID).getOrderPositionMap().remove(orderPosItemID);\n double beforeOrderPosPrice = bufOrderPosition.getOrderPosTotalPrice();\n\n try {\n bufOrderPosition.setOrderPosItemQuantity(orderPosItemQuantity);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n bufOrderPosition.setOrderPosTotalPrice();\n\n this.orderListMap.get(orderID).getOrderPositionMap().put(orderPosItemID, bufOrderPosition);\n\n double newOrderTotalPrice = beforeOrderTotalPrice - beforeOrderPosPrice * (100 - discount) / 100.0;\n newOrderTotalPrice += bufOrderPosition.getOrderPosTotalPrice() * (100 - discount) / 100.0;\n newOrderTotalPrice = Math.round(newOrderTotalPrice * 100) / 100.0;\n\n this.orderListMap.get(orderID).setOrderTotalPrice(newOrderTotalPrice);\n\n OrderIO.setOrderIO(this.orderListMap);\n } else {\n System.out.println(\"Order state is not \\\"in progress\\\". Forbidden to change quantity of certain items (aka order position) in order.\");\n }\n }",
"public void changeQuantity(int prodID, int quant)\r\n\t{\r\n\t\tOrderItem temp;\r\n\t\tint test = 0;\r\n\t\t\r\n\t\t//iterate through list and compare product ID of each item against the parameter,\r\n\t\t//then update the quantity of the one that matches\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++)\r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttest = temp.getProductID();\r\n\t\t\tif (test == prodID)\r\n\t\t\t{\r\n\t\t\t\ttemp.setProductQuant(quant);\r\n\t\t\t} //end if\r\n\t\t} //end for\r\n\t\t\t\r\n\t}",
"@Transactional\n public OrderViewModel processOrder(OrderViewModel ovm){\n\n //Making sure that the Customer exist\n try{\n customerService.getCustomer(ovm.getCustomerId());\n }catch (RuntimeException e){\n throw new CustomerNotFoundException(\"No Customer found in the database for id #\" + ovm.getCustomerId() + \" !\");\n }\n\n //List to store the ProductsToBuy\n List<ProductToBuyViewModel> productsToBuy = ovm.getProductsToBuy();\n\n //List with uniques ProductsToBuy\n productsToBuy = filterProductsToBuyList(productsToBuy);\n<<<<<<< HEAD\n\n //List InvoiceITems\n List<InvoiceItemViewModel> invoiceItemsList = new ArrayList<>();\n\n<<<<<<< HEAD\n int count = 0;\n\n //The deletion is going to be processed if the Customer does not have any related invoices\n try{\n invoiceService.getInvoicesByCustomerId(id);\n count++;\n }catch (RuntimeException e){\n try{\n levelUpService.getLevelUpAccountByCustomerId(id);\n count++;\n=======\n //Order Total\n double total = 0;\n\n //List that stores the Inventory register that have to be updated\n List<InventoryViewModel> inventoriesToUpdate = new ArrayList<>();\n\n //Getting all the Inventory Rows for the productId\n for(int i = 0; i < productsToBuy.size(); i++){\n\n ProductToBuyViewModel product = productsToBuy.get(i);\n\n int productId = product.getProductId();\n\n //Checking that the product exist\n try{\n productService.getProduct(productId);\n }catch (RuntimeException e){\n throw new ProductNotFoundException(\"Cannot process your order, there is no Product associated with id number \"+ productId+ \" in the database!!\");\n }\n\n //Reading the product Price from the ProductService\n BigDecimal unitPrice = BigDecimal.valueOf(Double.valueOf(productService.getProduct(productId).getListPrice()));\n\n //Reading the Product in Stock from the InventoryService\n List<InventoryViewModel> inventoryList = inventoryService.getAllInventoriesByProductId(product.getProductId());\n\n inventoryList = orderInventoryListByQuantity(inventoryList);\n\n int totalInInventory = 0;\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n=======\n\n //List InvoiceITems\n List<InvoiceItemViewModel> invoiceItemsList = new ArrayList<>();\n\n //Order Total\n double total = 0;\n\n //List that stores the Inventory register that have to be updated\n List<InventoryViewModel> inventoriesToUpdate = new ArrayList<>();\n\n //Getting all the Inventory Rows for the productId\n for(int i = 0; i < productsToBuy.size(); i++){\n\n ProductToBuyViewModel product = productsToBuy.get(i);\n\n int productId = product.getProductId();\n\n //Checking that the product exist\n try{\n productService.getProduct(productId);\n }catch (RuntimeException e){\n throw new ProductNotFoundException(\"Cannot process your order, there is no Product associated with id number \"+ productId+ \" in the database!!\");\n }\n\n //Reading the product Price from the ProductService\n BigDecimal unitPrice = BigDecimal.valueOf(Double.valueOf(productService.getProduct(productId).getListPrice()));\n\n //Reading the Product in Stock from the InventoryService\n List<InventoryViewModel> inventoryList = inventoryService.getAllInventoriesByProductId(product.getProductId());\n\n inventoryList = orderInventoryListByQuantity(inventoryList);\n\n int totalInInventory = 0;\n\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n for (int i2 = 0; i2 < inventoryList.size(); i2++){\n int quantityInInventory = inventoryList.get(i2).getQuantity();\n totalInInventory = totalInInventory + quantityInInventory;\n }\n<<<<<<< HEAD\n<<<<<<< HEAD\n }\n\n if(count != 0){\n throw new DeleteNotAllowedException(\"Impossible Deletion, there is LevelUp Account associated with this Customer\");\n }\n\n }\n=======\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n int quantityToBuy = product.getQuantity();\n\n //Check if there is enough productsToBuy in the inventory.\n if(quantityToBuy > totalInInventory){\n if(totalInInventory == 0){\n throw new OutOfStockException(\"Sorry, we can not process your order the Product with the id \"+product.getProductId() +\" is out of stock!!\");\n }else{\n throw new OutOfStockException(\"Sorry, we can not process your order there is only \"+ totalInInventory +\" units of the Product with the id \" + product.getProductId());\n }\n }\n\n //List<InvoiceItemViewModel> invoiceItemsPerProduct = updateInventory(inventoryList, quantityToBuy);\n\n List<InvoiceItemViewModel> invoiceItemsPerProduct = new ArrayList<>();\n\n<<<<<<< HEAD\n return inventoryService.createInventory(ivm);\n }\n=======\n for(int i3 = 0; i3 < inventoryList.size(); i3++){\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n=======\n\n int quantityToBuy = product.getQuantity();\n\n //Check if there is enough productsToBuy in the inventory.\n if(quantityToBuy > totalInInventory){\n if(totalInInventory == 0){\n throw new OutOfStockException(\"Sorry, we can not process your order the Product with the id \"+product.getProductId() +\" is out of stock!!\");\n }else{\n throw new OutOfStockException(\"Sorry, we can not process your order there is only \"+ totalInInventory +\" units of the Product with the id \" + product.getProductId());\n }\n }\n\n //List<InvoiceItemViewModel> invoiceItemsPerProduct = updateInventory(inventoryList, quantityToBuy);\n\n List<InvoiceItemViewModel> invoiceItemsPerProduct = new ArrayList<>();\n\n for(int i3 = 0; i3 < inventoryList.size(); i3++){\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n InventoryViewModel inventory = inventoryList.get(i3);\n int quantityAvailablePerInventory = inventory.getQuantity();\n\n<<<<<<< HEAD\n<<<<<<< HEAD\n try{\n return inventoryService.getAllInventories();\n }catch (RuntimeException e){\n throw new InventoryNotFoundException(\"The database is empty!!! No Inventory found in the Database\");\n }\n }\n=======\n //Create an InvoiceItem\n InvoiceItemViewModel invoiceItem = new InvoiceItemViewModel();\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n if (quantityToBuy > quantityAvailablePerInventory) {\n\n<<<<<<< HEAD\n try{\n inventoryService.updateInventory(id,ivm);\n }catch (RuntimeException e){\n throw new InventoryNotFoundException(\"Impossible Update, No Inventory found in the Database for id \" + id + \"!\");\n }\n }\n=======\n quantityToBuy = quantityToBuy - quantityAvailablePerInventory;\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n=======\n //Create an InvoiceItem\n InvoiceItemViewModel invoiceItem = new InvoiceItemViewModel();\n\n if (quantityToBuy > quantityAvailablePerInventory) {\n\n quantityToBuy = quantityToBuy - quantityAvailablePerInventory;\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n //If the quantityToBuy is larger than the quantity available, that means that is going to empty that Inventory register\n inventory.setQuantity(0);\n\n<<<<<<< HEAD\n<<<<<<< HEAD\n try{\n return inventoryService.getInventory(id);\n }catch (RuntimeException e){\n throw new InventoryNotFoundException(\"No Inventory found in the Database for id \" + id + \"!\");\n }\n }\n\n //Delete Inventory\n public void deleteInventory(int id){\n inventoryService.deleteInventory(id);\n }\n=======\n //Updating the inventory\n //inventoryService.updateInventory(inventory.getInventoryId(), inventory);\n inventoriesToUpdate.add(inventory);\n\n //Updating the invoiceItem\n invoiceItem.setQuantity(quantityAvailablePerInventory);\n invoiceItem.setInventoryId(inventory.getInventoryId());\n>>>>>>> f00fc299981692406efd94cca8a90917049f7e46\n\n //Adding the invoice to the List\n invoiceItemsPerProduct.add(invoiceItem);\n\n<<<<<<< HEAD\n try{\n return inventoryService.getAllInventoriesByProductId(productId);\n }",
"public void addItemsToCart() throws InterruptedException {\n\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver; // using JavascriptExecutor class to scroll down to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// page\n\t\tWebElement TopDeals = driver.findElement(By.xpath(\"/html/body/div[4]/div/div/div[3]/div/h1/span\")); // TopDeals\n\t\t// To avoid staleElementException\n\t\tfor (int i = 0; i <= 2; i++) {\n\t\t\ttry {\n\t\t\t\tjs.executeScript(\"arguments[0].scrollIntoView();\", TopDeals); // scrolling till TopDeals element visible\n\t\t\t\tbreak;\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t}\n\t\t// Adding 1st element to the cart\n\t\tWebElement crownbrocli = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-26487-homepage-collection\\\"]\"));\n\t\tcrownbrocli.click();\n\n\t\tActions actions = new Actions(driver); // now use action class to move cursor to another element so that we can\n\t\t\t\t\t\t\t\t\t\t\t\t// add another element\n\t\t // Adding 2nd Element to the cart\n\t\tWebElement apples = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-25982-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(apples);\n\t\tapples.click();\n\n\t\t// Adding 3rd element to the cart\n\t\tWebElement tomatoes = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-254884-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(tomatoes).click(); // Adding 3rd element to the cart\n\n\n\t\t// Adding 4rd element to the cart\n\t\tWebElement salmonFillet= driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-select-item-weight-22454-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(salmonFillet).click(); \n Select salmonWeight = new Select(salmonFillet); //to choose particular weight use Select Class\n\t\tsalmonWeight.selectByVisibleText(\"0.75 lbs\"); \n\n\t\t/*WebElement ChickenBreast = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-265709-homepage-collection\\\"]\"));\n//(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-265709-homepage-collection\\\"]\n\t\tactions.moveToElement(ChickenBreast).click(); // Adding 4th element to the cart\n*/\n\t}",
"private void takeOrder(MyCustomer customer) {\n\tDo(\"Taking \" + customer.cmr +\"'s order.\");\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgWhatWouldYouLike();\n\tstateChanged();\n }",
"public static void addCustomerItems(int cusId, int proId, double price, double quantity) {\n\n\t\tboolean checkCusId = IdPriceValidation.checkId(cusId);\n\t\tboolean checkProId = IdPriceValidation.checkId(proId);\n\t\tboolean checkPrice = IdPriceValidation.checkPrice((int) price);\n\t\tboolean checkQuantity = QuantityValidation.checkQuantity((int) quantity);\n\n\t\tif (checkCusId && checkProId && checkPrice && checkQuantity) {\n\t\t\ttry {\n\t\t\t\tCustomerItemsDAO.addCustomerItems(cusId, proId, price, quantity);\n\n\t\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tLogger.debug(\"Invalid Data\");\n\t\t}\n\t}",
"public static void submitOrder(Order order, Map<Product,Integer> products) throws Exception {\n\n\t\t\tConnection con = null;\n\t\t\tPreparedStatement stmt1 = null;\n\t\t\tPreparedStatement stmt2 = null;\n\t\t\tString sql1 = \"insert into ocgr_orders values (?,?,?,?,?,?,?,?);\";\n\t\t\tString sql2 = \"insert into ocgr_isordered values (?,?,?);\";\n\n\t\t\tDB db = new DB();\n\n\t\t\ttry {\n\t\t\t\tdb.open();\n\t\t\t\tcon = db.getConnection();\n\n\t\t\t\tstmt1 = con.prepareStatement(sql1);\n\n\t\t\t\tstmt1.setString(1,order.getId() );\n\t\t\t\tstmt1.setTimestamp(2,order.getTimestamp());\n\t\t\t\tstmt1.setBigDecimal(3,order.getTotal() );\n\t\t\t\tstmt1.setString(4,order.getAddress() );\n\t\t\t\tstmt1.setString(5,order.getStatus() );\n\t\t\t\tstmt1.setString(6,order.getPayment() );\n\t\t\t\tClient client = order.getClient();\n\t\t\t\tstmt1.setString(7,client.getId() );\n\t\t\t\tVendor vendor = order.getVendor();\n\t\t\t\tstmt1.setString(8,vendor.getId() );\n\n\t\t\t\tSystem.out.println(order.getId());\n\t\t\t\tstmt1.executeUpdate();\n\t\t\t\tSystem.out.println(order.getTotal());\n\n\t\t\t\tSet<Product> prods = products.keySet();\n\t\t\t\tIterator<Product> itr = prods.iterator();\n\n\t\t\t\twhile (itr.hasNext()) {\n\t\t\t\t\tProduct productOrdered = (Product)itr.next();\n\t\t\t\t\tSystem.out.println(productOrdered.getId());\n\n\t\t\t\t\tstmt2 = con.prepareStatement(sql2);\n\t\t\t\t\tstmt2.setString(1, order.getId() );\n\t\t\t\t\tstmt2.setString(2, productOrdered.getId() );\n\t\t\t\t\tstmt2.setInt(3, products.get(productOrdered) );\n\n\t\t\t\t\tstmt2.executeUpdate();\n\t\t\t\t}\n\n\t\t\t\tstmt1.close();\n\t\t\t\tstmt2.close();\n\t\t\t\tdb.close();\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\tthrow new Exception(e.getMessage());\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tdb.close();\n\t\t\t\t} catch (Exception e) {}\n\t\t\t}\n\t\t}",
"public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }",
"void insertCart(int customer_id, detailDTO re) throws DataAccessException;",
"public java.math.BigDecimal getQty() throws java.rmi.RemoteException;",
"public void UpdateQuantity(String qty, int item){\r\n\t\tString Qty = getValue(qty);\r\n\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:- Quantity should be udapted to \"+qty);\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele =listofelements(locator_split(\"txtUpdatequantity\"));\r\n\t\t\tif(ele.size()>4){\r\n\t\t\t\titem=item+4;\r\n\t\t\t}\r\n\t\t\tele.get(item).clear();\r\n\t\t\tele.get(item).sendKeys(Qty);\r\n\t\t\tSystem.out.println(\"Quantity for second item is updated to \"+Qty);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Quantity for second item is updated to \"+Qty);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Quantity is not udated to \"+Qty);\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtUpdatequantity\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void buy(String code, Integer units) throws InsufficientUnitsException, InvalidCodeException {\n\t\tAtomicInteger count = new AtomicInteger();\n\t\tcentsMap.forEach((k,v)-> {\n\t\t\tif(k.equalsIgnoreCase(code)) {\n\t\t\t\tSystem.out.println(\"Code : \" + k + \" Value : \" + v);\t\t\t\t\n\t\t\t\tstockMap.forEach((key,value)-> {\n\t\t\t\t\t\tSystem.out.println(\"Code : \" + key + \" Value : \" + value);\n\t\t\t\t\t\tif(value > 0 && count.intValue() == 0) {\n\t\t\t\t\t\t\tstockMap.put(key, value - units);\n\t\t\t\t\t\t\tcount.incrementAndGet();\n\t\t\t\t\t\t}\n\t\t\t\t});\t\t\t\t\n\t\t\t\t// track the value \n\t\t\t\ttradePerCentsList.add(v);\n\t\t\t}\t\t\t\n\t\t});\n\n\t}",
"@Test\n public void testPayUnpaidOrderFails() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // issue an order\n int orderId = shop.issueOrder(productCode, 10, 1);\n\n // trying to pay for an order with receiveCashPayment fails\n assertEquals(-1, shop.receiveCashPayment(orderId, 10), 0.001);\n\n // verify order is still in ISSUED state\n assertEquals(\"ISSUED\", shop.getAllOrders().stream()\n .filter(b -> b.getBalanceId() == orderId)\n .map(Order::getStatus)\n .findAny()\n .orElse(null));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }",
"public void orderPo(int pid) throws Exception {\n PoBean po = this.getPoById(pid);\n if (po == null) throw new Exception(\"Purchase Order doesn't exist!\");\n if (po.getStatus() != PoBean.Status.PROCESSED) throw new Exception(\"Invalid Purchase Order Status.\");\n this.setPoStatus(PoBean.Status.ORDERED, pid);\n }",
"public Order(int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = 0;\r\n\t\torderTotal = 0;\r\n\t}",
"public static BigDecimal getQtyOrdered(Properties ctx, int M_Warehouse_ID, int M_Product_ID, String trxName) {\n\t\treturn getQtyOrdered(ctx, M_Warehouse_ID, M_Product_ID, new Timestamp(System.currentTimeMillis()), trxName);\n\t}",
"final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }",
"@Override\n\tpublic String confirmOrder(int oid, int code) {\n \n\t\tOrder order = orderRepo.findById(oid).get();\n\t\tUser user = order.getUser();\n\t\t\n\t\tSystem.out.println(\"code at conifrmOdrer \"+user.getVerficationCode()+\" matches with int code \"+code);\n\t\tif (user.getVerficationCode() == code) {\n\t\t\tfor (Cart c : user.getCart()) {\n\t\t\t\tcartRepo.delete(c);\n\t\t\t}\n\t\t\tuser.getCart().clear();\n\t\t\torder.setPaymentStatus(\"Success\");\n\t\t\temailService.sendConfirmationMail(user, oid); //Order Information sent to Email.\n\t\t\treturn \"Order successfull\";\n\t\t} else {\n\t\t\torder.setPaymentStatus(\"Failed\");\n\t\t\tfor (Cart c : user.getCart()) {\n\t\t\t\tc.getProduct().setStock(c.getProduct().getStock()+c.getQuantity());\n\t\t\t}\t\t\t\n\t\t\treturn \"Order not successfull\";\n\t\t }\n\t\t\n\t\t\n\n\t}",
"private void somarQuantidade(Integer id_produto){\n\t for (ItensCompra it : itensCompra){\n\t\t //verifico se o item do meu arraylist é igual ao ID passado no Mapping\n\t\t if(it.getTable_Produtos().getId_produto().equals(id_produto)){\n\t //defino a quantidade atual(pego a quantidade atual e somo um)\n\t it.setQuantidade(it.getQuantidade() + 1);\n\t //a apartir daqui, faço o cálculo. Valor Total(ATUAL) + ((NOVA) quantidade * valor unitário do produto(ATUAL))\n\t it.setValorTotal(0.);\n\t it.setValorTotal(it.getValorTotal() + (it.getQuantidade() * it.getValorUnitario()));\n }\n}\n\t}",
"@Override\n\tpublic String checkout(Cart cart, User user) {\n\t\tlong millis = System.currentTimeMillis();\n\t\tString orderId = millis + \"\" + user.getId();\n\n\t\t// 2. generate an order\n\t\tOrder order = new Order();\n\t\torder.setCreateDate(new Date());\n\t\torder.setOrderId(orderId);\n\t\torder.setTotalMoney(cart.getTotalMoney());\n\t\torder.setStatus(0);\n\t\torder.setUserId(user.getId());\n\n\t\t// 3. generate orderitems for this order (according to cart) and save it to\n\t\t// database one by one\n\t\tList<CartItem> allItems = cart.getAllItems();\n\t\tList<OrderItem> orderItems = new ArrayList<>();\n\t\tfor (CartItem cartItem : allItems) {\n\t\t\tOrderItem item = new OrderItem(cartItem.getBook().getTitle(), cartItem.getBook().getPrice(),\n\t\t\t\t\tcartItem.getCount(), cartItem.getTotalPrice(), orderId);\n\t\t\torderItems.add(item);\n\t\t}\n\t\t// 4. save order\n\t\tod.saveOrder(order);\n\n\t\t// 5. save orderitems\n\t\tois.saveItem(orderItems);\n\t\t\n\t\t// 6. update stock and sales\n\t\tfor(CartItem cartItem : allItems) {\n\t\t\tBook book = cartItem.getBook();\n\t\t\t// update stock and sales according to the databank in real time in case of invalid operation\n\t\t\tBook one = bs.getOne(book);\n\t\t\tone.setSales(one.getSales() + cartItem.getCount());\n\t\t\tone.setStock(one.getStock() - cartItem.getCount());\n\t\t\tbs.update(one);\n\t\t}\n\t\t\n\t\t// 7. clear cart\n\t\tcart.clear();\n\t\treturn orderId;\n\t}",
"@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"gsrini@gmail.com\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }",
"public boolean insertOrderDetails(List<CartProductDetails> cartProductDetailses, int orderid) {\n Connection con = new ConnectionManager().getConnection();\n boolean flag = false;\n try {\n for(CartProductDetails cpd:cartProductDetailses){\n PreparedStatement ps = con.prepareStatement(\"INSERT INTO ORDER_DETAILS (order_ID, product_id , quantity) VALUES (?,?,?)\");\n ps.setInt(1, orderid);\n ps.setInt(2, cpd.getProductId());\n ps.setInt(3, cpd.getQuntity());\n// ResultSet rs = ps.executeQuery();\n ps.executeUpdate();\n }\n flag = true;\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(OrderDetailsDao.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return flag;\n }",
"public GroceryItemOrder(String name, int quantity, double pricePerUnit) {\n this.name = name;\n this.quantity = quantity;\n this.ppu = pricePerUnit;\n }"
] | [
"0.5957744",
"0.5947312",
"0.5918376",
"0.58685505",
"0.5838512",
"0.582868",
"0.5789761",
"0.57539237",
"0.57307976",
"0.5725219",
"0.56603605",
"0.56447685",
"0.5608061",
"0.5585645",
"0.55800086",
"0.5568009",
"0.5532498",
"0.55204725",
"0.55202293",
"0.55132717",
"0.54937106",
"0.5484093",
"0.54594254",
"0.54477316",
"0.5434381",
"0.5433166",
"0.54306495",
"0.5429821",
"0.5420089",
"0.5418344",
"0.5417643",
"0.54162246",
"0.5415195",
"0.54083574",
"0.5403455",
"0.5397295",
"0.53893906",
"0.53574",
"0.5355288",
"0.5354574",
"0.5353266",
"0.53532636",
"0.5344841",
"0.53430814",
"0.5332237",
"0.5296609",
"0.52956486",
"0.5295387",
"0.52937293",
"0.5292291",
"0.52913916",
"0.5286826",
"0.52828753",
"0.5282226",
"0.5271176",
"0.52702266",
"0.52663946",
"0.5260514",
"0.5258168",
"0.52548826",
"0.52542317",
"0.52503264",
"0.5247322",
"0.5239728",
"0.5239226",
"0.523804",
"0.52284735",
"0.5226885",
"0.5224731",
"0.52222437",
"0.52135676",
"0.51995784",
"0.51942044",
"0.5191253",
"0.51895946",
"0.5185906",
"0.5161898",
"0.5161545",
"0.51567215",
"0.515662",
"0.51485753",
"0.51449776",
"0.514474",
"0.5144407",
"0.5137416",
"0.513609",
"0.51313084",
"0.5128148",
"0.51278967",
"0.51269805",
"0.51241225",
"0.5123584",
"0.51201016",
"0.51193887",
"0.51161075",
"0.5112157",
"0.51097125",
"0.51030385",
"0.5099036",
"0.5098018"
] | 0.64859897 | 0 |
Returns the best (shortest) delivery route for a given order | public ArrayList<String> getDeliveryRoute(int orderID, int sessionID) {
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Shopper) {
Shopper sh = (Shopper)(s.getUser());
Invoice inv = fm.getInvoice(orderID);
if (inv != null && inv.shopperID == sh.cust.custID)
return fm.map.ShortestRoute(inv.shopperCity);
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:07.082 -0500\", hash_original_method = \"71B2FD618F41F3F10AED78DDC584C5B5\", hash_generated_method = \"D5C1464D9CBFFD7FDEF25798ABF91481\")\n \npublic static RouteInfo selectBestRoute(Collection<RouteInfo> routes, InetAddress dest) {\n if ((routes == null) || (dest == null)) return null;\n\n RouteInfo bestRoute = null;\n // pick a longest prefix match under same address type\n for (RouteInfo route : routes) {\n if (NetworkUtils.addressTypeMatches(route.mDestination.getAddress(), dest)) {\n if ((bestRoute != null) &&\n (bestRoute.mDestination.getNetworkPrefixLength() >=\n route.mDestination.getNetworkPrefixLength())) {\n continue;\n }\n if (route.matches(dest)) bestRoute = route;\n }\n }\n return bestRoute;\n }",
"public BestPath getBestPath(String origin, String destination, FlightCriteria criteria) {\r\n\t\tint originIndex = 0;\r\n\t\tif(airportNames.contains(origin)){\r\n\t\t\toriginIndex = airportNames.indexOf(origin);\r\n\t\t}\r\n\t\tint destinationIndex = 0;\r\n\t\tif(airportNames.contains(destination)){\r\n\t\t\tdestinationIndex = airportNames.indexOf(destination);\r\n\t\t}\r\n\t\tAirport start = allAirports.get(originIndex);\r\n\t\tAirport goal = allAirports.get(destinationIndex);\r\n\r\n\t\tPriorityQueue<Airport> queue = new PriorityQueue<Airport>();\r\n\t\tLinkedList<String> path = new LinkedList<String>();\r\n\r\n\t\tstart.setWeight(0);\r\n\t\tqueue.add(start);\r\n\t\tAirport current;\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tcurrent = queue.poll();\r\n\t\t\tif(current.compareTo(goal) == 0) {\r\n\t\t\t\tdouble finalWeight = current.getWeight();\r\n\t\t\t\twhile(current.compareTo(start) != 0){\r\n\t\t\t\t\tpath.addFirst(current.getAirport());\r\n\t\t\t\t\tcurrent = current.getPrevious();\r\n\t\t\t\t}\r\n\t\t\t\tpath.addFirst(start.getAirport());\r\n\t\t\t\tBestPath bestPath = new BestPath(path, finalWeight);\r\n\t\t\t\treturn bestPath;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent.visited = true;\r\n\t\t\tAirport neighbor = current;\r\n\t\t\tArrayList<Flight> currentFlights;\r\n\t\t\tfor (int i = 0; i < current.size(); i++){\r\n\t\t\t\tcurrentFlights = new ArrayList<Flight>();\r\n\t\t\t\tcurrentFlights = current.getOutgoingFlights();\r\n\t\t\t\tneighbor = currentFlights.get(i).getDestination();\r\n\t\t\t\t\r\n\t\t\t\tdouble neighborWeight = neighbor.getWeight();\r\n\t\t\t\tcurrentFlights.get(i).setWeight(criteria);\r\n\t\t\t\tdouble flightWeight = currentFlights.get(i).getFlightWeight();\r\n\t\t\t\tif(neighborWeight > (current.getWeight() + flightWeight)){\r\n\t\t\t\t\tqueue.add(neighbor);\r\n\t\t\t\t\tneighbor.setPrevious(current);\r\n\t\t\t\t\tneighbor.setWeight(current.getWeight() + flightWeight);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static RouteDetails findShortestRoute(Graph g, String start, String end) {\n\t\tAlgorithmGraph ag = new AlgorithmGraph(g);\n\t\treturn ag.getShortestRoute(start, end);\n\t}",
"public Path getShortestPath() {\n\t\tNodeRecord startRecord = new NodeRecord(start, null, 0.0f, (float) heuristic.estimate(start), Category.OPEN);\n\n\t\t// Initialize the open list\n\t\tPathFindingList open = new PathFindingList();\n\t\topen.addRecordByEstimatedTotalCost(startRecord);\n\t\trecords.set(Integer.parseInt(startRecord.node.id), startRecord);\n\t\tNodeRecord current = null;\n\t\t\n\t\t// Iterate through processing each node\n\t\twhile (!open.isEmpty()) {\n\t\t\t// Find smallest element in the open list using estimatedTotalCost\n\t\t\tcurrent = open.getSmallestNodeRecordByEstimatedTotalCost();\n\n\t\t\t// If its the goal node, terminate\n\t\t\tif (current.node.equals(end)) break;\n\n\t\t\t// Otherwise get its outgoing connections\n\t\t\tArrayList<DefaultWeightedEdge> connections = g.getConnections(current.node);\n\t\t\t\n\t\t\t// Loop through each connection\n\t\t\tfor (DefaultWeightedEdge connection : connections) {\n\t\t\t\t// Get the cost and other information for end node\n\t\t\t Vertex endNode = g.graph.getEdgeTarget(connection);\n\t\t\t int endNodeRecordIndex = Integer.parseInt(endNode.id);\n NodeRecord endNodeRecord = records.get(endNodeRecordIndex); // this is potentially null but we handle it\n\t\t\t\tdouble newEndNodeCost = current.costSoFar + g.graph.getEdgeWeight(connection);\n\t\t\t\tdouble endNodeHeuristic = 0;\n\t\t\t\t\n\t\t\t\t// if node is closed we may have to skip, or remove it from closed list\t\n\t\t\t\tif( endNodeRecord != null && endNodeRecord.category == Category.CLOSED ){ \n\t\t\t\t\t// Find the record corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If we didn't find a shorter route, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Otherwise remove it from closed list\n\t\t\t\t\trecords.get(endNodeRecordIndex).category = Category.OPEN;\n\n\t\t\t\t\t// Use node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Skip if node is open and we've not found a better route\n\t\t\t\t} else if( endNodeRecord != null && endNodeRecord.category == Category.OPEN ){ \n\t\t\t\t\t// Here we find the record in the open list corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If our route isn't better, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Use the node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Otherwise we know we've got an unvisited node, so make a new record\n\t\t\t\t} else { // if endNodeRecord.category == Category.UNVISITED\n\t\t\t\t endNodeRecord = new NodeRecord();\n\t\t\t\t\tendNodeRecord.node = endNode;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\n\t\t\t\t\t// Need to calculate heuristic since this is new\n\t\t\t\t\tendNodeHeuristic = heuristic.estimate(endNode);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// We're here if we need to update the node\n\t\t\t\t// update the cost, estimate, and connection\n\t\t\t\tendNodeRecord.costSoFar = newEndNodeCost;\n\t\t\t\tendNodeRecord.edge = connection;\n\t\t\t\tendNodeRecord.estimatedTotalCost = newEndNodeCost + endNodeHeuristic;\n\n\t\t\t\t// Add it to the open list\n\t\t\t\tif ( endNodeRecord.category != Category.OPEN ) {\n\t\t\t\t\topen.addRecordByEstimatedTotalCost(endNodeRecord);\n\t\t\t\t\tendNodeRecord.category = Category.OPEN;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t// We’ve finished looking at the connections for\n\t\t\t// the current node, so add it to the closed list\n\t\t\t// and remove it from the open list\n\t\t\topen.removeRecord(current);\n\t\t\tcurrent.category = Category.CLOSED;\n\t\t\trecords.set(Integer.parseInt(current.node.id), current);\n\t\t}\n\t\t\n\t\t// We’re here if we’ve either found the goal, or\n\t\t// if we’ve no more nodes to search, find which.\n\t\tif (!current.node.equals(end)) {\n\t\t\t// Ran out of nodes without finding the goal, no solution\n\t\t\treturn null;\n\t\t} else {\n\t\t // Compile the list of connections in the path\n\t\t\tArrayList<DefaultWeightedEdge> path = new ArrayList<>();\n\n\t\t\twhile (!current.node.equals(start)) {\n\t\t\t\tpath.add(current.edge);\n\t\t\t\t// Set current (NodeRecord) to is source.\n\t\t\t\tcurrent = records.get( Integer.parseInt(g.graph.getEdgeSource(current.edge).id) );\n\t\t\t}\n\n\t\t\t// Reverse the path, and return it\n\t\t\tCollections.reverse(path);\n\t\t\treturn new Path(g, path);\n\t\t}\n\n\t}",
"public BestPath getBestPath(String origin, String destination, FlightCriteria criteria, String airliner) {\r\n\t\tint originIndex = 0;\r\n\t\tif(airportNames.contains(origin)){\r\n\t\t\toriginIndex = airportNames.indexOf(origin);\r\n\t\t}\r\n\t\tint destinationIndex = 0;\r\n\t\tif(airportNames.contains(destination)){\r\n\t\t\tdestinationIndex = airportNames.indexOf(destination);\r\n\t\t}\r\n\t\tAirport start = allAirports.get(originIndex);\r\n\t\tAirport goal = allAirports.get(destinationIndex);\r\n\r\n\t\tPriorityQueue<Airport> queue = new PriorityQueue<Airport>();\r\n\t\r\n\t\tLinkedList<String> path = new LinkedList<String>();\r\n\r\n\t\tstart.setWeight(0);\r\n\t\tqueue.add(start);\r\n\t\tAirport current;\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tcurrent = queue.poll();\r\n\t\t\t\r\n\t\t\tif(current.compareTo(goal) == 0) {\r\n\t\t\t\tdouble finalWeight = current.getWeight();\r\n\t\t\t\t\r\n\t\t\t\twhile(current.compareTo(start) != 0){\r\n\t\t\t\t\t\r\n\t\t\t\t\tpath.addFirst(current.getAirport());\r\n\t\t\t\t\tcurrent = current.getPrevious();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tpath.addFirst(start.getAirport());\r\n\t\t\t\tBestPath bestPath = new BestPath(path, finalWeight);\r\n\t\t\t\treturn bestPath;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent.visited = true;\r\n\t\t\tAirport neighbor = current;\r\n\t\t\tArrayList<Flight> currentFlights;\r\n\t\t\tfor (int i = 0; i < current.size(); i++){\r\n\t\t\t\tcurrentFlights = new ArrayList<Flight>();\r\n\t\t\t\tcurrentFlights = current.getOutgoingFlights();\r\n\t\t\t\tneighbor = currentFlights.get(i).getDestination();\r\n\t\t\t\tdouble neighborWeight = neighbor.getWeight();\r\n\t\t\t\tcurrentFlights.get(i).setWeight(criteria);\r\n\t\t\t\tdouble flightWeight = currentFlights.get(i).getFlightWeight();\r\n\t\t\t\tif((neighborWeight > (current.getWeight() + flightWeight)) && currentFlights.get(i).getCarrier() == airliner){\r\n\t\t\t\t\tqueue.add(neighbor);\r\n\t\t\t\t\tneighbor.setPrevious(current);\r\n\t\t\t\t\tneighbor.setWeight(current.getWeight() + flightWeight);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private ICommunicationAddress decideOrderAssigment(Order order) {\n\n\t\tICommunicationAddress workerAddress = null;\n\t\tPosition orderPosition = order.position;\n\t\tPosition currentWorkerPosition = null;\n\n\t\tint minimum = Integer.MAX_VALUE;\n\t\tint currentDistance = 0;\n\n\t\tString[] workerAgentId = workerIdReverseAID.values().toArray(new String[0]);\n\t\tfor (String currentWorkerId: workerAgentId) {\n\n\t\t\tcurrentWorkerPosition = positionMap.get(currentWorkerId);\n\t\t\tcurrentDistance = orderPosition.distance(currentWorkerPosition);\n\t\t\tif (orderPosition.distance(currentWorkerPosition) < minimum) {\n\t\t\t\tminimum = currentDistance;\n\t\t\t\tworkerAddress = workerIdMap.get(currentWorkerId).getMessageBoxAddress();\n\t\t\t}\n\n\t\t}\n\n\t\treturn workerAddress;\n\n\t}",
"public Trip getShortestRoute(Station src, Station dst)\n {\n if (src.equals(dst)) return new Trip(); // no self loops\n\n String key = src.getId() + \"-\" + dst.getId();\n\n if (tripDict.containsKey(key))\n {\n TreeSet<Trip> trips = (TreeSet<Trip>) this.tripDict.get(key);\n\n return trips.first();\n }\n\n return null;\n }",
"@Override\n\tpublic RouteHelper computeDelivery(Map map, DeliveryQuery delivery) {\n\t\treturn null;\n\t}",
"public TrainRoute calculateShortestRoute(Train train) {\n\t\tSet<Integer> allVertices = layout.vertexSet();\n\t\tHashSet<Integer> visitedNodes = new HashSet<Integer>(layout.vertexSet().size());\n\t\tdouble totalWeight = ((DefaultBlock)blockData.get(train.currentBlock)).blockLength - train.distanceTraveledOnBlock;\n\t\tInteger currentBlock = null;\n\t\tInteger destinationBlock = null;\n\t\tLinkedList<Integer> path = new LinkedList<Integer>();\n\t\tHashMap<LinkedList<Integer>, Double> allSimplePaths = new HashMap<LinkedList<Integer>, Double>();\n\t\tfor (Integer i : allVertices) {\n\t\t\tif (i.equals(train.currentBlock)) {\n\t\t\t\tcurrentBlock = i;\n\t\t\t}\n\t\t\tif (i.equals(train.destination)) {\n\t\t\t\tdestinationBlock = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfindSimplePaths(currentBlock, destinationBlock, totalWeight, path, allVertices, visitedNodes, allSimplePaths);\n\t\t// Create a route object for all of the paths\n\t\tLinkedList<TrainRoute> allTrainRoutes = new LinkedList<TrainRoute>();\n\t\tfor (LinkedList<Integer> p : allSimplePaths.keySet()) {\n\t\t\tDouble pathDistance = allSimplePaths.get(p);\n\t\t\tp.add(0, currentBlock);\n\t\t\tpathDistance += ((DefaultBlock)blockData.get(currentBlock)).blockLength;\n\t\t\tpathDistance += ((DefaultBlock)blockData.get(p.get(p.size()-1))).blockLength/2;\n\t\t\t// create the TrainRoute Object\n\t\t\tdouble trainSpeed = ((DefaultBlock)blockData.get(train.currentBlock)).speedLimit;\n\t\t\tif (train.maxSpeed < trainSpeed) {\n\t\t\t\ttrainSpeed = train.maxSpeed;\n\t\t\t}\n\t\t\tdouble authority = train.authority;\n\t\t\tif (authority > pathDistance) {\n\t\t\t\tauthority = pathDistance;\n\t\t\t}\n\n\t\t\tallTrainRoutes.add(new TrainRoute(lineName, train.currentBlock, p, trainSpeed, authority, pathDistance));\n\t\t}\n\t\tCollections.sort(allTrainRoutes);\n\t\tblockToControllerMap.get(currentBlock).addRoute(allTrainRoutes.get(0));\n\t\treturn allTrainRoutes.get(0);\n\t}",
"io.opencannabis.schema.commerce.OrderDelivery.DeliveryDestination getDestination();",
"public void findShortestRoute(Point2D start, Point2D end){\n fastestPath = null;\n try {\n RouteFinder routeFinder = new RouteFinder(start, end);\n travelMethod(routeFinder);\n routeFinder.setShortestRoute();\n shortestPath = routeFinder.getShortestPath();\n setTravelInfo(routeFinder);\n RoutePlanner routePlanner = new RoutePlanner(shortestPath);\n addToDirectionPane(routePlanner.getDirections());\n }catch(IllegalArgumentException | NullPointerException e){\n addToDirectionPane(new String[]{\"No shortest path between the two locations was found\"});\n setTravelInfo(null);\n shortestPath = null;\n }\n\n repaint();\n\n }",
"public void findBestRoute(Node src, Node dst) {\r\n\t\tArrayList<Node> route = new ArrayList<>();\r\n\t\tNode curr = src;\r\n\t\twhile (!curr.getName().equals(dst.getName())) {\r\n\t\t\tcurr = curr.getForwardingTable().get(dst);\r\n\t\t\troute.add(curr);\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\"Best route so far is: \");\r\n\t\tfor (Node node : route) {\r\n\t\t\tSystem.out.print(node.getName() + \" \");\r\n\t\t}\r\n\t}",
"private Destination cheapestDestinations(String originCode, Trip trip){\n\t\tSortedSet<Destination> possibleDestinations = new TreeSet<Destination>(DESTINATION_COMPARATOR);\n\t\tList<TopRoute> routes = this.topRoutesService.getTopRoutes();\n\t\tfor (TopRoute route : routes) {\n\t\t\tif (route.getFrom().equals(originCode) && !trip.isVisited(route.getTo())) {\n\t\t\t\tpossibleDestinations.add(createDestination(originCode, route));\n\t\t\t\t//LOGGER.debug(\"adding new destination from {} to {}\", route.getFrom(),route.getTo());\n\t\t\t}\t\n\t\t}\n\t\ttry{\n\t\t\treturn possibleDestinations.first();\n\t\t}\n\t\tcatch(NoSuchElementException e){\n\t\t\tthrow new RoutesNotFoundException(\"Error there's no route available\", e);\n\t\t}\n\t}",
"public BGPPath getPath(int dest) {\n\n BGPPath installedPath = null;\n\n /*\n * Hunt for the hole punched path first, if it exists return it\n */\n installedPath = this.locRib.get(dest * -1);\n if (installedPath == null) {\n installedPath = this.locRib.get(dest);\n }\n\n if (this.avoidMode == AS.AvoidMode.LEGACY && this.isWardenAS()) {\n if (installedPath != null && this.routeStatusMap.get(dest) == AS.RS_CLEAN) {\n return installedPath;\n } else {\n if (this.routeStatusMap.get(dest) == AS.RS_LEGACY) {\n return this.mplsRoutes.get(dest);\n } else if (this.routeStatusMap.get(dest) == AS.RS_DIRTY) {\n BGPPath bestCabalPath = null;\n\n for (AS tWarden : this.wardenSet) {\n if (tWarden.getASN() != this.asn) {\n /*\n * IMPORTANT NOTE, this has to be a call to the\n * local rib NOT getPath, otherwise an infinite\n * recursion can result...\n */\n if (!(this.hasCleanRoute(tWarden.getASN()) && tWarden.hasCleanRoute(dest))) {\n continue;\n }\n\n BGPPath theirPath = tWarden.locRib.get(dest);\n BGPPath toThem = this.locRib.get(tWarden.getASN());\n\n if (bestCabalPath == null\n || bestCabalPath.getPathLength() > theirPath.getPathLength()\n + toThem.getPathLength()) {\n bestCabalPath = toThem.stichPaths(theirPath);\n }\n\n }\n }\n\n if (bestCabalPath != null) {\n this.mplsRoutes.put(dest, bestCabalPath);\n this.routeStatusMap.put(dest, AS.RS_LEGACY);\n return bestCabalPath;\n } else {\n this.routeStatusMap.put(dest, AS.RS_DIRTY_NO_LEGACY);\n }\n }\n }\n }\n\n return installedPath;\n }",
"public String findShortestRoute(char start, char finish) {\r\n PriorityQueue<Vertex> Q = new PriorityQueue<>(new Comparator<Vertex>() {\r\n @Override\r\n public int compare(Vertex v1, Vertex v2) {\r\n return Integer.compare(v1.getDistanceFromStart(), v2.getDistanceFromStart());\r\n }\r\n });\r\n\r\n Vertex startVert = null;\r\n for(Vertex v : listOfVertices) {\r\n if(v.getName() == start) {\r\n v.setDistanceFromStart(0);\r\n v.setPrevious(v);\r\n startVert = v;\r\n }\r\n else {\r\n v.setDistanceFromStart(Integer.MAX_VALUE);\r\n v.setPrevious(null);\r\n }\r\n Q.add(v);\r\n }\r\n if(startVert == null) {\r\n throw new IllegalArgumentException(\"start vertex is not in graph\");\r\n }\r\n\r\n Vertex finishVert = null;\r\n while(!Q.isEmpty()) {\r\n Vertex v = Q.remove(); // remove first vertex in queue, the shortest path has been found to this vertex\r\n if(v.getName() == finish) {\r\n finishVert = v;\r\n break; // finish quicker\r\n }\r\n for(Edge incidentEdge : v.getIncidentEdges()) {\r\n Vertex adjacentVertex = incidentEdge.getOppositeVertex(v);\r\n int alt = v.getDistanceFromStart() + incidentEdge.getDistance();\r\n if(alt < adjacentVertex.getDistanceFromStart()) { // if going through this edge shortens the route to adjacentVertex\r\n adjacentVertex.setDistanceFromStart(alt);\r\n adjacentVertex.setPrevious(v);\r\n Q.remove(adjacentVertex); // increase the priority of adjacent vertices if this vertex shortens their route\r\n Q.add(adjacentVertex);\r\n }\r\n }\r\n }\r\n \r\n // throw exception if finish vertex not found\r\n if(finishVert == null) {\r\n throw new IllegalArgumentException(\"finish vertex is not in graph\");\r\n }\r\n \r\n // build the return value by adding vertex names from finish to start,\r\n // reversing the string, then concatenating the distance\r\n StringBuilder sb = new StringBuilder();\r\n for(Vertex v = finishVert; v != startVert; v = v.getPrevious()) {\r\n sb.append(v.getName());\r\n }\r\n return sb.append(start).reverse().append(finishVert.getDistanceFromStart()).toString();\r\n }",
"@Nullable\n private NodeWithCost<V, A> findShortestPath(@Nonnull DirectedGraph<V, A> graph,\n V start, V goal, @Nonnull ToDoubleFunction<A> costf) {\n PriorityQueue< NodeWithCost<V, A>> frontier = new PriorityQueue<>(61);\n Map<V, NodeWithCost<V, A>> frontierMap = new HashMap<>(61);\n // Size of explored is the expected number of nextArrows that we need to explore.\n Set<V> explored = new HashSet<>(61);\n return doFindShortestPath(start, frontier, frontierMap, goal, explored, graph, costf);\n }",
"@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}",
"private WorldDelivery getNextDelivery(String droneID, Set<WorldDelivery> undeliveredDeliveries){\n\n\t\tWorldDelivery lowestSeqNbDelivery = null;\n\t\tlong lowestSeqNb = Long.MAX_VALUE;\n\t\tfor(WorldDelivery delivery: undeliveredDeliveries){\n\t\t\t//check if this package is destined for the currently selected drone\n\t\t\tif(!droneID.equals(delivery.getDeliveryDroneID())){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlong currentSeqNb = delivery.getSequenceNumber();\n\n\t\t\t//and also if the sequence number is lower\n\t\t\tif( currentSeqNb < lowestSeqNb){\n\t\t\t\tlowestSeqNb = currentSeqNb;\n\t\t\t\tlowestSeqNbDelivery = delivery;\n\t\t\t}\n\t\t}\n\n\t\treturn lowestSeqNbDelivery;\n\t}",
"public Queue<Station> approxShortestPath(Station start, Station end)\n {\n //Create a hash from station IDs to extra data needed for this algorithm.\n HashMap<String, ApproxSearchExtra> station_extras =\n new HashMap<String, ApproxSearchExtra>();\n for (Station station : getStations())\n station_extras.put(station.getId(), new ApproxSearchExtra());\n\n HashSet<Station> closed = new HashSet<Station>();\n HashSet<Station> open = new HashSet<Station>();\n open.add(start);\n\n while (open.size() > 0)\n {\n //Current is the item in the open set with the lowest estimated cost.\n Station current = null;\n ApproxSearchExtra current_extra = null;\n for (Station element : open)\n {\n if (current == null && current_extra == null)\n {\n current = element;\n current_extra = station_extras.get(element.getId());\n }\n else\n {\n ApproxSearchExtra extra = station_extras.get(element.getId());\n if (extra.estimated_cost < current_extra.estimated_cost)\n {\n current = element;\n current_extra = extra;\n }\n }\n }\n\n //If the current station is the end station, then we're done.\n if (current == end)\n return buildApproxShortestPathResult(end, station_extras);\n\n //Station is no longer in the open set and is now in the closed set\n //because it was traversed.\n open.remove(current);\n closed.add(current);\n\n for (Station neighbour : getAdjacentStations(current))\n {\n //Do nothing if neighbour is already in the closed set.\n if (closed.contains(neighbour))\n continue;\n\n ApproxSearchExtra neighbour_extra =\n station_extras.get(neighbour.getId());\n\n //Cost of movement to this neighbour.\n float attempt_cost = current_extra.cost + current.distance(neighbour);\n\n //If not in the open set, add the neighbour to the open set so that it\n //will be traversed later.\n if (!open.contains(neighbour))\n open.add(neighbour);\n //If this path is more costly than another path to this station, then\n //this path cannot be optimal.\n else if (attempt_cost >= neighbour_extra.cost)\n continue;\n\n //This is now the best path to this neighbour. Store this information.\n neighbour_extra.came_from = current;\n neighbour_extra.cost = attempt_cost;\n neighbour_extra.estimated_cost = attempt_cost +\n neighbour.distance(end);\n }\n }\n\n return null;\n }",
"private myPoint getNextRoute(){\n\t\ttry {\n\t\t\treturn this.Route.take();\n\t\t} catch (InterruptedException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Route getRoute() throws SQLException {\n\t\tsortedOrders = sortReadyOrders();\n\t\tList<Vertex> verts = bgCtr.getVertList();\n\t\tList<Vertex> vertsForRoute = new LinkedList<>();\n\t\tList<Vertex> routeList = new LinkedList<>();\n\n\t\tVertex hansGrillBar = bgCtr.getVertList().get(0);\n\n\t\tvertsForRoute.add(hansGrillBar);\n\n\t\tfor (int i = 0; i < sortedOrders.size(); i++) {\n\t\t\tString address = sortedOrders.get(i).getPers().getAddress();\n\t\t\tfor (int j = 0; j < verts.size(); j++) {\n\t\t\t\tif (verts.get(j).getName().equalsIgnoreCase(address)) {\n\t\t\t\t\tvertsForRoute.add(verts.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < vertsForRoute.size(); i++) {\n\t\t\tint count = i + 1;\n\t\t\tList<Vertex> tempRouteList = new LinkedList<>();\n\t\t\tif (!(count >= vertsForRoute.size())) {\n\t\t\t\tVertex source = vertsForRoute.get(i);\n\t\t\t\tVertex target = vertsForRoute.get(count);\n\t\t\t\ttempRouteList = generateTempRouteList(source, target);\n\t\t\t\tif (!source.equals(target)) {\n\t\t\t\t\tfor (int j = 0; j < tempRouteList.size(); j++) {\n\t\t\t\t\t\tif (!source.equals(tempRouteList.get(j))) {\n\t\t\t\t\t\t\tif (routeList.isEmpty()) {\n\t\t\t\t\t\t\t\trouteList.add(tempRouteList.get(j));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trouteList.add(tempRouteList.get(j));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tRoute route = new Route(routeList);\n\t\tcreateRoute(route);\n\t\treturn route;\n\t}",
"private Path findShortestPath(Address start, Address destination) throws Exception{\n HashMap<Intersection, Segment> pi = dijkstra(start);\n Segment seg = pi.get(destination);\n if(seg == null){\n throw new Exception();\n }\n LinkedList<Segment> newPathComposition = new LinkedList<>();\n Path newPath = new Path(start, destination, newPathComposition);\n newPathComposition.add(seg);\n while (!seg.getOrigin().equals(start)) {\n Intersection s = seg.getOrigin();\n seg = pi.get(s);\n if(seg == null){\n throw new Exception();\n }\n newPathComposition.add(seg);\n }\n Collections.reverse(newPathComposition);\n newPath.setSegmentsOfPath(newPathComposition);\n return newPath;\n }",
"@Override\n public ArrayList<GraphEdge> getRoute(GraphNode a, GraphNode b) {\n \tHashMap<GraphNode, Double> distances = new HashMap<GraphNode, Double>();\n \tHashMap<GraphNode, GraphEdge> predecessor = new HashMap<GraphNode, GraphEdge>();\n \tHashSet<GraphNode> visited = new HashSet<GraphNode>();\n \t\n \tArrayList<GraphEdge> result = new ArrayList<GraphEdge>();\n\t\n \t//Initialize distances, predecessor, and visited\n \tfor(GraphNode g : drivableNodes) {\n \t distances.put(g, Double.MAX_VALUE);\n \t predecessor.put(g, null);\n \t}\n \t\n \tint remaining = drivableNodes.size();\n \t\n \t//Put starting node\n \tdistances.put(a, 0.0);\n \t//predecessor.put(a, null);\n \t\n \t//Main loop\n \twhile(remaining > 0) {\n \t GraphNode closest = null;\n \t double minDist = Double.MAX_VALUE;\n\n \t for(GraphNode n : distances.keySet()) {\n \t\tdouble dist = distances.get(n);\n \t\tif(!visited.contains(n) &&\n \t\t\tdist != Double.MAX_VALUE &&\n \t\t\t(minDist == Double.MAX_VALUE || dist < minDist)) {\n \t\t closest = n;\n \t\t minDist = dist;\n \t\t}\n \t }\n \t \n \t if(closest == null)\n \t\treturn null;\n \t \n \t if(closest.equals(b))\n \t\tbreak;\n \t \n \t visited.add(closest);\n \t \n \t for(GraphEdge edge : closest.getEdges()) {\n \t\tGraphNode adjacent = edge.getOtherNode(closest);\n \t\tif(adjacent != null && !visited.contains(adjacent)) {\n \t\t //Map distance value for the other Node\n \t\t double otherDist = distances.get(adjacent);\n \t\t //Weight of edge from closest node to adjacent node\n \t\t double weight = edge.getWeight();\n \t\t String way = edge.getWay();\n \t\t \n \t\t if(otherDist == Double.MAX_VALUE ||\n \t\t\t weight + minDist < otherDist) {\n \t\t\tdistances.put(adjacent, weight + minDist);\n \t\t\t\n \t\t\t//Make new edge in correct order\n \t\t\tGraphEdge corrected = new GraphEdge(closest, adjacent, weight, way);\n \t\t\t\n \t\t\tpredecessor.put(adjacent, corrected);\n \t\t }\n \t\t}\n \t }\n\n \t remaining--;\n \t}\n \t\n \t//Backtrack to build route\n \tif(distances.get(b) == Double.MAX_VALUE) {\n \t return null;\n \t} else {\n \t //buildPath(predecessor, a, b, result);\n \t //Non recursive version\n \t Stack<GraphEdge> stack = new Stack<GraphEdge>(); \n \t while(!b.equals(a)) {\n \t\tGraphEdge edge = predecessor.get(b);\n \t\t\n \t\t//Make sure vertices are in correct order\n \t\tGraphNode start = edge.getOtherNode(b);\n \t\t//double weight = edge.getWeight();\n \t\t//GraphEdge corrected = new GraphEdge(start, b, weight);\n \t\t\n \t\tstack.push(edge);\n \t\tb = start;\n \t }\n \t \n \t while(!stack.isEmpty()) {\n \t\tGraphEdge edge = stack.pop();\n \t\tresult.add(edge);\n \t }\n \t}\n \t\n\treturn result;\n }",
"private String getShortestPath(final Pair<Long, Long> src, final Pair<Long, Long> dst,\n final String passCode, final boolean first) {\n final var queue = new LinkedList<Node>();\n final var seen = new HashSet<Node>();\n //start from source\n final var srcNode = new Node( src, \"\" );\n queue.add( srcNode );\n seen.add( srcNode );\n\n int max = 0;\n while ( !queue.isEmpty() ) {\n final var curr = queue.remove();\n if ( curr.pos.equals( dst ) ) {\n if ( first ) {\n //shortest path\n return curr.path;\n } else {\n //store path length\n max = curr.path.length();\n //stop this path\n }\n } else {\n for ( final var neighbour : getNeighbours( curr, passCode ) ) {\n //unseen neighbour\n if ( seen.add( neighbour ) ) {\n //add to the queue\n queue.add( neighbour );\n }\n }\n }\n }\n\n return itoa( max );\n }",
"public void findFastestRoute(Point2D start, Point2D end){\n shortestPath = null;\n try {\n RouteFinder routeFinder = new RouteFinder(start, end); //Create a RouteFinder and let it handle it.\n travelMethod(routeFinder);\n routeFinder.setFastestRoute();\n fastestPath = routeFinder.getFastestPath(); //retrieve the fastest route from it\n setTravelInfo(routeFinder);\n RoutePlanner routePlanner = new RoutePlanner(fastestPath); //create a routePlanner to get direction for path\n addToDirectionPane(routePlanner.getDirections());\n }catch(IllegalArgumentException | NullPointerException e){\n addToDirectionPane(new String[]{\"No fastest path between the two locations was found\"});\n setTravelInfo(null);\n fastestPath = null;\n\n }\n\n repaint();\n\n }",
"private void launchAlternativeRouteCalculation() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(new SKCoordinate(-122.392284, 37.787189));\n route.setDestinationCoordinate(new SKCoordinate(-122.484378, 37.856300));\n // number of alternative routes specified here\n route.setNoOfRoutes(3);\n route.setRouteMode(SKRouteSettings.SKROUTE_CAR_FASTEST);\n route.setRouteExposed(true);\n SKRouteManager.getInstance().setRouteListener(this);\n SKRouteManager.getInstance().calculateRoute(route);\n }",
"private RouteAction Best(RouteState state) {\r\n\t\treturn V.get(state).action;\r\n\t}",
"@Override\r\n public Collection<OptimizedItinerary> getBestItineraryByTime(String origin, Collection<RouteNode> routes) throws OptimizedItineraryStrategyException {\r\n log.info(String.format(\"** Getting best itineraries (based on time) from %s, using Dijkstra algorithm. **\", origin));\r\n \r\n if (!isOriginPresent(routes, origin))\r\n \tthrow new OptimizedItineraryStrategyException(String.format(\"Origin city: %s is not present.\", origin));\r\n \t\r\n Set<String> allDestinations = getDestinations(routes, origin);\r\n HipsterDirectedGraph<String,Long> graph = doGraphWithTimes(routes);\r\n \r\n // call Dijkstra for the same origen and all the destinations ...\r\n Collection<OptimizedItinerary> results = allDestinations.stream()\r\n .map(destination -> doDijkstra(graph, origin, destination))\r\n .collect(Collectors.toList());\r\n \r\n return results;\r\n }",
"public List<Node> computeDijkstraShortestPath(Node source, Node destination) {\n\n source.minDistance = 0.;\n PriorityQueue<Node> nodeQueue = new PriorityQueue<Node>();\n nodeQueue.add(source);\n\n int destinationGroup = destination._groupID;\n\n while (!nodeQueue.isEmpty()) {\n Node v = nodeQueue.poll();\n\n Log.i(\"bbb\", \"In dijsk node name \"+ v._waypointName);\n //Stop searching when reach the destination node\n\n\n if(destinationGroup!=0){\n\n if(v._groupID==destinationGroup){\n destination = navigationGraph.get(navigationGraph.size()-1).nodesInSubgraph.get(v._waypointID);\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n break;\n }\n\n }\n\n if (v._waypointID.equals(destination._waypointID))\n break;\n\n\n // Visit each edge that is adjacent to v\n for (Edge e : v._edges) {\n Node a = e.target;\n Log.i(\"bbb\", \"node a \"+a._waypointName);\n double weight = e.weight;\n double distanceThroughU = v.minDistance + weight;\n if (distanceThroughU < a.minDistance) {\n nodeQueue.remove(a);\n a.minDistance = distanceThroughU;\n a.previous = v;\n Log.i(\"bbb\", \"set previous\");\n nodeQueue.add(a);\n }\n }\n }\n\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n return getShortestPathToDestination(destination);\n }",
"private List<Pair<Integer, Integer>> getBestPath(Pair<Integer, Integer> curLocation, Pair<Integer, Integer> dest) {\n\t\tList<Pair<Integer, Integer>> path = new LinkedList<Pair<Integer, Integer>>();\n\t\t\n\t\t\n\t\tNode current = new Node(curLocation.getX(), curLocation.getY(), getHitProbability(curLocation.getX(), curLocation.getY()));\n\t\tNode target = new Node(dest.getX(), dest.getY(), getHitProbability(dest.getX(), dest.getY()));\n\t\tList<Node> openSet = new ArrayList<>();\n List<Node> closedSet = new ArrayList<>();\n \n \n while (true) {\n openSet.remove(current);\n List<Node> adjacent = getAdjacentNodes(current, closedSet, target);\n\n // Find the adjacent node with the lowest heuristic cost.\n for (Node neighbor : adjacent) {\n \tboolean inOpenset = false;\n \tList<Node> openSetCopy = new ArrayList<>(openSet);\n \tfor (Node node : openSetCopy) {\n \t\tif (neighbor.equals(node)) {\n \t\t\tinOpenset = true;\n \t\t\tif (neighbor.getAccumulatedCost() < node.getAccumulatedCost()) {\n \t\t\t\topenSet.remove(node);\n \t\t\t\topenSet.add(neighbor);\n \t\t\t}\n \t\t}\n \t}\n \t\n \tif (!inOpenset) {\n \t\topenSet.add(neighbor);\n \t}\n }\n\n // Exit search if done.\n if (openSet.isEmpty()) {\n System.out.printf(\"Target (%d, %d) is unreachable from position (%d, %d).\\n\",\n target.getX(), target.getY(), curLocation.getX(), curLocation.getY());\n return null;\n } else if (/*isAdjacent(current, target)*/ current.equals(target)) {\n break;\n }\n\n // This node has been explored now.\n closedSet.add(current);\n\n // Find the next open node with the lowest cost.\n Node next = openSet.get(0);\n for (Node node : openSet) {\n if (node.getCost(target) < next.getCost(target)) {\n next = node;\n }\n }\n// System.out.println(\"Moving to node: \" + current);\n current = next;\n }\n \n // Rebuild the path using the node parents\n path.add(new Pair<Integer, Integer>(curLocation.getX(), curLocation.getY()));\n while(current.getParent() != null) {\n \tcurrent = current.getParent();\n \tpath.add(0, new Pair<Integer, Integer>(current.getX(), current.getY()));\n }\n \n if (path.size() > 1) {\n \tpath.remove(0);\n }\n \n\t\treturn path;\n\t}",
"public static Path findShortestPath(Unit unit, int x, int y, GameMap map, boolean theoretical)\n {\n if( null == unit || null == map || !map.isLocationValid(unit.x, unit.y) )\n {\n return null;\n }\n\n Path aPath = new Path(100);\n if( !map.isLocationValid(x, y) )\n {\n // Unit is not in a valid place. No path can be found.\n System.out.println(\"WARNING! Cannot find path for a unit that is not on the map.\");\n aPath.clear();\n return aPath;\n }\n\n int[][] costGrid = new int[map.mapWidth][map.mapHeight];\n for( int i = 0; i < map.mapWidth; i++ )\n {\n for( int j = 0; j < map.mapHeight; j++ )\n {\n costGrid[i][j] = Integer.MAX_VALUE;\n }\n }\n\n // Set up search parameters.\n SearchNode root = new SearchNode(unit.x, unit.y);\n costGrid[unit.x][unit.y] = 0;\n Queue<SearchNode> searchQueue = new java.util.PriorityQueue<SearchNode>(13, new SearchNodeComparator(costGrid, x, y));\n searchQueue.add(root);\n\n ArrayList<SearchNode> waypointList = new ArrayList<SearchNode>();\n\n // Find optimal route.\n while (!searchQueue.isEmpty())\n {\n // Retrieve the next search node.\n SearchNode currentNode = searchQueue.poll();\n\n // If this node is our destination, we are done.\n if( currentNode.x == x && currentNode.y == y )\n {\n // Add all of the points on the route to our waypoint list.\n while (currentNode.parent != null)\n {\n waypointList.add(currentNode);\n currentNode = currentNode.parent;\n }\n // Don't forget the starting node (no parent).\n waypointList.add(currentNode);\n break;\n }\n\n expandSearchNode(unit, map, currentNode, searchQueue, costGrid, theoretical);\n\n currentNode = null;\n }\n\n // Clear and Populate the Path object.\n aPath.clear();\n // We added the waypoints to the list from end to beginning, so populate the Path in reverse order.\n if( !waypointList.isEmpty() )\n {\n for( int j = waypointList.size() - 1; j >= 0; --j )\n {\n //System.out.println(\"Waypoint \" + waypointList.get(j).x + \", \" + waypointList.get(j).y + \" over \" + map.getEnvironment(waypointList.get(j).x, waypointList.get(j).y).terrainType);\n aPath.addWaypoint(waypointList.get(j).x, waypointList.get(j).y);\n }\n }\n\n return aPath;\n }",
"public List<String> getShortestRoute(String start, String end) {\n\t\tif (!vertices.contains(start)) return null;\n\t\tMap<String, Vertex> verticesWithDistance = new HashMap<String, Vertex>();\n\t\tVertex starting = new Vertex(start, 0);\n\t\tverticesWithDistance.put(start, starting);\n\t\tstarting.route.add(starting.name);\n\t\tfor (String v : vertices) {\n\t\t\tif (!v.equals(start))\n\t\t\t\tverticesWithDistance.put(v, new Vertex(v, -1));\n\t\t}\n\t\treturn searchByDijkstra(starting, end , verticesWithDistance);\n\t}",
"List<RoutePoint> getRoutePointsForOrder(Order order);",
"@Override\r\n public Collection<OptimizedItinerary> getBestItineraryByHops(String origin, Collection<RouteNode> routes) throws OptimizedItineraryStrategyException{\r\n log.info(String.format(\"** Getting best itineraries (based on hops) from %s, using Dijkstra algorithm. **\", origin));\r\n \r\n if (!isOriginPresent(routes, origin))\r\n \tthrow new OptimizedItineraryStrategyException(String.format(\"Origin city: %s is not present.\", origin));\r\n \r\n Set<String> allDestinations = getDestinations(routes, origin);\r\n HipsterDirectedGraph<String,Long> graph = doGraphHops(routes);\r\n \r\n Collection<OptimizedItinerary> results = allDestinations.stream()\r\n .map(destination -> doDijkstra(graph, origin, destination))\r\n .collect(Collectors.toList());\r\n \r\n return results;\r\n }",
"PrioritizedMove getBestMoveFor(int player, int desiredLength);",
"private List<BoardPos> filterShorter(List<BoardPos> route) {\n int maxDepth = route.isEmpty() ? 0 : route.get(route.size() - 1).routeLen();\n Iterator<BoardPos> it = route.iterator();\n\n while (it.hasNext()) {\n BoardPos pos = it.next();\n if (pos.routeLen() != maxDepth)\n it.remove();\n }\n\n return route;\n }",
"private int best_Broadcasting_Router(int[][] matrx)\n\t{\n\t\tint best_router = -1;\n\t\tint min = INFINITE_DIST;\n\t\tint[] min_dist = new int[matrx.length];\n\t\tint[] forward_min_dist_table = new int[matrx.length];\n\t\tint[] prev_node = new int[matrx.length];\n\t\t\n\t\tfor(int s=0; s<matrx.length; s++)\n\t\t{\n\t\t\t//Compute shortest path for every node\n\t\t\tforward_min_dist_table = shrtst_Path_Dijkstra_Algo(matrx, s, forward_min_dist_table, prev_node);\n\t\t\t\n\t\t\t//only include reachable nodes for total\n\t\t\tfor(int i=0; i<forward_min_dist_table.length; i++)\n\t\t\t{\n\t\t\t\tif(forward_min_dist_table[i] != INFINITE_DIST)\n\t\t\t\t\tmin_dist[s] += forward_min_dist_table[i];\n\t\t\t}\n\t\t}\n\t\t//min_dist array contains min distance from every node to every other node\n\t\tfor(int n=0; n<min_dist.length; n++)\n\t\t{\n\t\t\tSystem.out.println(\"Total cost of router \"+ (n+1) +\" to other nodes is: \"+ min_dist[n]);\n\t\t\tif(min_dist[n] < min && min_dist[n] != 0)\n\t\t\t{\n\t\t\t\tmin = min_dist[n];\n\t\t\t\tbest_router = n;\n\t\t\t}\n\t\t}\n\t\treturn (best_router + 1);\n\t}",
"public Direction getBestNeighbor(Location location) {\r\n\t\t// get the four neighbors\r\n\t\tLocation northNeighbor = map.getLocation(location, Direction.NORTH);\r\n\t\tLocation southNeighbor = map.getLocation(location, Direction.SOUTH);\r\n\t\tLocation eastNeighbor = map.getLocation(location, Direction.EAST);\r\n\t\tLocation westNeighbor = map.getLocation(location, Direction.WEST);\r\n\r\n\t\tArrayList<Location> neighbors = new ArrayList<Location>(4);\r\n\t\tneighbors.add(northNeighbor);\r\n\t\tneighbors.add(southNeighbor);\r\n\t\tneighbors.add(eastNeighbor);\r\n\t\tneighbors.add(westNeighbor);\r\n\t\t\r\n\t\t// sort them increasingly by strength\r\n\t\tStrengthComparator comparator = new StrengthComparator();\r\n\t\tCollections.sort(neighbors, comparator);\r\n\t\tLocation weakestNeighbor;\r\n\r\n\t\t// search for the strongest neighbors that isn't owned by player and\r\n\t\t// whose strength is smaller than location's\r\n\t\tfor (int i = 0; i < neighbors.size() - 1; i++) {\r\n\t\t\tweakestNeighbor = neighbors.get(i);\r\n\t\t\tif(location.getSite().strength - weakestNeighbor.getSite().strength < 0)\r\n\t\t\t\tbreak;\r\n\t\t\tif (comparator.compare(location, weakestNeighbor) > 0 && weakestNeighbor.getSite().owner != myID) {\r\n\t\t\t\t// go in the neighbor's direction that matches the condition\r\n\t\t\t\treturn location.getNeighborDirection(location, neighbors.get(i), map);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Direction.STILL;\r\n\t}",
"@Test\n\tpublic void checkShortestRoute() {\n\t\tassertEquals(Trains.shortestRoute(\"A\",\"C\"), 9);\n\t\t//assertEquals(Trains.shortestRoute(\"B\",\"B\"), 9);\n\t}",
"double getRouteCost(Graph g){\n double totalCost = 0;\n double matrixWeights[][] = g.getMatrixOfWeights(); //get the matrix of weights from the class Graph\n for(int i=0;i<cityIndex.size()-1;i++){\n //the cost is calculated by computing the route from one index to the next since the representation is\n // a permutation\n totalCost = totalCost + matrixWeights[cityIndex.get(i)][cityIndex.get(i+1)];\n }\n totalCost = totalCost+matrixWeights[cityIndex.get(cityIndex.size()-1)][cityIndex.get(0)]; //To Return back from the\n // last to the first city\n return totalCost;\n }",
"private Queue<Position> pathToClosest(MyAgentState state, Position start, int goal) {\n\t\tQueue<Position> frontier = new LinkedList<Position>();\n\t\tSet<String> enqueued = new HashSet<String>();\n\t\tMap<Position, Position> preceedes = new HashMap<Position, Position>();\n\t\tfrontier.add(start);\n\t\tenqueued.add(start.toString());\n\n\t\twhile (!frontier.isEmpty()) {\n\t\t\tPosition pos = frontier.remove();\n\t\t\tif (state.getTileData(pos) == goal) {\n\t\t\t\treturn toQueue(preceedes, pos, start);\n\t\t\t}\n\t\t\t\n\t\t\tfor (Position neighbour : pos.neighbours()) {\n\t\t\t\tif (!enqueued.contains(neighbour.toString()) && state.getTileData(neighbour) != state.WALL) {\n\t\t\t\t\tpreceedes.put(neighbour, pos);\n\t\t\t\t\tfrontier.add(neighbour);\n\t\t\t\t\tenqueued.add(neighbour.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private PathCostFlow findCheapestPath(int start, int end, double max_flow) throws Exception {\n if (getNode(start) == null || getNode(end) == null\n || !getNode(start).isSource() || getNode(end).isSource()) {\n throw new IllegalArgumentException(\"start must be the index of a source and end must be the index of a sink\");\n }\n double amount = Math.min(Math.min(getNode(start).getResidualCapacity(),\n getNode(end).getResidualCapacity()), max_flow);\n\n boolean[] visited = new boolean[n];\n int[] parent = new int[n];\n for (int i = 0; i < n; i++) {\n parent[i] = -1;\n }\n double[] cost = new double[n];\n for (int i = 0; i < n; i++) {\n cost[i] = Integer.MAX_VALUE;\n }\n cost[start] = 0;\n\n PriorityQueue<IndexCostTuple> queue = new PriorityQueue<IndexCostTuple>();\n queue.add(new IndexCostTuple(start, 0));\n\n while (!queue.isEmpty()) {\n IndexCostTuple current = queue.poll();\n\n // we found the target node\n if (current.getIndex() == end) {\n ArrayList<Integer> path = new ArrayList<Integer>();\n path.add(new Integer(end));\n while (path.get(path.size() - 1) != start) {\n path.add(parent[path.get(path.size() - 1)]);\n }\n Collections.reverse(path);\n if ((path.get(0) != start) || (path.get(path.size() - 1) != end)) {\n throw new Exception(\"I fucked up coding Dijkstra's\");\n }\n return new PathCostFlow(path, cost[end], amount);\n }\n\n // iterate through all possible neighbors of the current node\n for (int i = 0; i < n; i++) {\n SingleEdge e = matrix[current.getIndex()][i];\n if ((!visited[i]) && (e != null)\n && (current.getCost() + e.getCost(amount) < cost[i])) {\n cost[i] = current.getCost() + e.getCost(amount);\n parent[i] = current.getIndex();\n\n // update the entry for this node in the queue\n IndexCostTuple newCost = new IndexCostTuple(i, cost[i]);\n queue.remove(newCost);\n queue.add(newCost);\n }\n }\n visited[current.getIndex()] = true;\n }\n\n return null; //the target node was unreachable\n }",
"public void calculateRoute() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(start);\n route.setDestinationCoordinate(end);\n route.setNoOfRoutes(1);\n switch (routingType) {\n case SHORTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_SHORTEST);\n break;\n case FASTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_FASTEST);\n break;\n case QUIET:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_QUIETEST);\n break;\n }\n route.setRouteExposed(true);\n SKRouteManager.getInstance().calculateRoute(route);\n }",
"private Node closestUnvisitedNeighbour(HashMap <Node, Integer > shortestPathMap){\n int shortestDistance = Integer.MAX_VALUE;\n Node closestReachableNode = null;\n for (Node node : getNodes()) {\n if (node.isVisited())\n continue;\n\n int currentDistance = shortestPathMap.get(node);\n if (currentDistance == Integer.MAX_VALUE)\n continue;\n\n if (currentDistance < shortestDistance) {\n shortestDistance = currentDistance;\n closestReachableNode = node;\n }\n }\n return closestReachableNode;\n }",
"public void selectRouteChoice()\n\t{\n\t\tRoutePlanner planner = new RoutePlanner();\n\t\tthis.sequence = ap.listSequences.get(numTrips);\n\t\t// only minimisation\n\t\tif (ap.routeChoice.equals(\"DS\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AC\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"TS\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus only global landmarks\n\t\telse if (ap.routeChoice.equals(\"DG\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AG\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus local and (optionally) global landmarks\n\t\telse if (ap.routeChoice.contains(\"D\") && ap.routeChoice.contains(\"L\")) newPath = planner.roadDistanceSequence(sequence, ap);\n\t\telse if (ap.routeChoice.contains(\"A\") && ap.routeChoice.contains(\"L\")) newPath = planner.angularChangeBasedSequence(sequence, ap);\n\t\t// anything with regions and/or barriers, or just barriers\n\t\telse if (ap.routeChoice.contains(\"R\")) newPath = planner.regionBarrierBasedPath(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.contains(\"B\")) newPath = planner.barrierBasedPath(originNode, destinationNode, ap);\n\t}",
"private Cell getShortestPath(List<Cell> surroundingBlocks, int DestinationX, int DestinationY) {\n \n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell min = surroundingBlocks.get(0);\n int distMin = euclideanDistance(surroundingBlocks.get(0).x, surroundingBlocks.get(0).y, DestinationX, DestinationY);\n \n for(int i = 0; i < surroundingBlocks.size(); i++) {\n if (i==1) {\n min = surroundingBlocks.get(i);\n }\n if(distMin > euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY)) {\n distMin = euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY);\n min = surroundingBlocks.get(i);\n }\n }\n return min;\n }",
"@Nullable\n public EdgePath<A> findShortestEdgePath(DirectedGraph<V, A> graph,\n V start, V goal, @Nonnull ToDoubleFunction<A> costf) {\n\n if (graph instanceof IntDirectedGraph) {\n @SuppressWarnings(\"unchecked\")\n AttributedIntDirectedGraph<V,A> intGraph = (AttributedIntDirectedGraph<V,A>) graph;\n int startIndex = -1, goalIndex = -1;\n {int i=0;\n for (V v:graph.getVertices()) {\n if (v == start) {\n startIndex = i;\n if (goalIndex != -1) {\n break;\n }\n }\n if (v == goal) {\n goalIndex = i;\n if (startIndex != -1) {\n break;\n }\n }\n i++;\n }}\n return findIntShortestEdgePath(intGraph, startIndex, goalIndex, costf);\n } else {\n return doFindShortestEdgePath(graph, start, goal, costf);\n }\n }",
"public List<Node> getShortestPathToDestination(Node destination) {\n List<Node> path = new ArrayList<Node>();\n\n\n\n for (Node node = destination; node != null; node = node.previous){\n Log.i(\"bbb\", \"get path \"+node._waypointName);\n path.add(node);\n }\n\n // reverse path to get correct order\n Collections.reverse(path);\n return path;\n }",
"public int shortestRouteBetweenTowns(Town origin, \n\t\t\tTown destination) {\n\t\treturn findShortestRoute(origin, \n\t\t\t\tdestination, 0, 0);\n\t}",
"private Route calculate(String fromStation, String toStation) {\n\t\tif (stations==null){\r\n\t\t\tSystem.out.println(\"DEBUG RUN OF DIJKSTRA.\");\r\n\t\t\tstations = new ArrayList<Station>();\r\n\t\t\tcreateDebugMap(stations);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Check if the stations exists\r\n\t\t */\r\n\t\tStation startStation = null, endStation = null;\r\n\r\n\t\t// Find starting station\r\n\t\tfor (Station thisStation : stations) {\r\n\t\t\tif (thisStation.stationName.equals(fromStation)) {\r\n\t\t\t\tSystem.out.println(\"Found startStaion in the Database\");\r\n\t\t\t\tstartStation = thisStation;\r\n\t\t\t}\r\n\t\t\tif (thisStation.stationName.equals(toStation)) {\r\n\t\t\t\tSystem.out.println(\"Found endStation in the Database\");\r\n\t\t\t\tendStation = thisStation;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Station not found. Break\r\n\t\tif (startStation == null || endStation == null) {\r\n\t\t\tSystem.out.println(\"Shit! One of the stations could not be found\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Declare the variables for the algorithm\r\n\t\t */\r\n\r\n\t\t// ArrayList for keeping track of stations we have visited.\r\n\t\tArrayList<Station> visitedStations = new ArrayList<Station>();\r\n\t\t// Array for the DijkstraStations. This type holds the current best cost and best link to it.\r\n\t\tArrayList<DijkstraStation> dijkstraStations = new ArrayList<DijkstraStation>();\r\n\r\n\t\t// The station we are examining neighbors from.\r\n\t\tDijkstraStation currentStation = new DijkstraStation(new Neighbor(startStation, 0, 0), 0, startStation);\r\n\r\n\t\t// PriorityQueue for sorting unvisited DijkstraStations.\r\n\t\tNeighBorDijktstraComparetor Dijkcomparator = new NeighBorDijktstraComparetor();\r\n\t\tPriorityQueue<DijkstraStation> unvisitedDijkstraStations;\r\n\t\tunvisitedDijkstraStations = new PriorityQueue<DijkstraStation>(100, Dijkcomparator);\r\n\r\n\t\t// Variable to keep track of the goal\r\n\t\tboolean goalFound = false; // did we find the goal yet\r\n\t\tint goalBestCost = Integer.MAX_VALUE; // did we find the goal yet\r\n\r\n\t\t// Add the start staion to the queue so that the loop will start with this staiton\r\n\t\tunvisitedDijkstraStations.add(currentStation);\r\n\t\tdijkstraStations.add(currentStation);\r\n\r\n\t\t/***************************\r\n\t\t * The Dijkstra algorithm loop.\r\n\t\t ***************************/\r\n\r\n\t\twhile (!unvisitedDijkstraStations.isEmpty()) {\r\n\t\t\t// Take the next station to examine from the queue and set the next station as the currentStation\r\n\t\t\tcurrentStation = unvisitedDijkstraStations.poll();\r\n\r\n\t\t\tSystem.out.println(\"\\n============= New loop passtrough =============\");\r\n\t\t\tSystem.out.println(\"Analysing neighbors of \" + currentStation.stationRef.stationName + \". Cost to this station is: \" + currentStation.totalCost);\r\n\r\n\t\t\t// Add visited so we dont visit again.\r\n\t\t\tvisitedStations.add(currentStation.stationRef);\r\n\r\n\t\t\t// break the algorithm if the current stations totalcost if bigger than the best cost of the goal\r\n\t\t\tif (goalBestCost < currentStation.totalCost) {\r\n\t\t\t\tSystem.out.println(\"Best route to the goal has been found. Best cost is: \" + goalBestCost\r\n\t\t\t\t\t\t+ \" (To reach current station is: \" + currentStation.totalCost + \")\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check all neighbors from the currentStation to the neighBorQueue so we can examine them\r\n\t\t\tfor (Neighbor thisNeighbor : currentStation.stationRef.neighbors) {\r\n\r\n\t\t\t\t// Skip stations we have already visited\r\n\t\t\t\tif (!visitedStations.contains(thisNeighbor.stationRef)) {\r\n\t\t\t\t\t// If we havent seen this station before\r\n\t\t\t\t\t// Add it to the list of Dijkstrastations and to the PriorityQueue of unvisited stations\r\n\t\t\t\t\tif (getDijkstraStationByID(thisNeighbor.stationRef.stationid, dijkstraStations) == null) {\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = new DijkstraStation(thisNeighbor, currentStation.totalCost\r\n\t\t\t\t\t\t\t\t+ thisNeighbor.cost, currentStation.stationRef);\r\n\t\t\t\t\t\tdijkstraStations.add(thisDijkstraStation);\r\n\t\t\t\t\t\tunvisitedDijkstraStations.offer(thisDijkstraStation);\r\n\r\n\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\tgoalFound = true;\r\n\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Goal station found :) Cost to goal is: \" + goalBestCost);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"New station seen: \" + thisDijkstraStation);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Station has been seen before.\r\n\r\n\t\t\t\t\t\t// Get the station as a DijkstraStation from the array\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = getDijkstraStationByID(thisNeighbor.stationRef.stationid,\r\n\t\t\t\t\t\t\t\tdijkstraStations);\r\n\r\n\t\t\t\t\t\t// Check if the connection is better than the one we already know\r\n\t\t\t\t\t\tif (currentStation.totalCost + thisNeighbor.cost < thisDijkstraStation.totalCost) {\r\n\r\n\t\t\t\t\t\t\t// New best link found\r\n\t\t\t\t\t\t\tSystem.out.println(\"New best route found for \" + thisNeighbor.stationRef.stationName);\r\n\t\t\t\t\t\t\tSystem.out.println(\"Old cost:\" + thisDijkstraStation.totalCost + \", New cost: \"\r\n\t\t\t\t\t\t\t\t\t+ (currentStation.totalCost + thisNeighbor.cost));\r\n\r\n\t\t\t\t\t\t\t// update the cost and via station on the DijkstraStation\r\n\t\t\t\t\t\t\tthisDijkstraStation.updateBestLink((int) (currentStation.totalCost + thisNeighbor.cost),\r\n\t\t\t\t\t\t\t\t\tcurrentStation.stationRef, thisNeighbor);\r\n\r\n\t\t\t\t\t\t\t// if this is the goal station, update the totalCost\r\n\t\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Updated cost for the goal to : \" + goalBestCost);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}// End while\r\n\r\n\t\t// Print the World:\r\n//\t\t System.out.println();\r\n//\t\t System.out.println(\"################# Printing the world ###################\");\r\n//\t\t for (DijkstraStation thisDijkstraStation : dijkstraStations) {\r\n//\t\t System.out.println(thisDijkstraStation.toString());\r\n//\t\t DijkstraStation tempStation = thisDijkstraStation;\r\n//\t\t System.out.print(\"BackTracking route =>\");\r\n//\t\t while (!tempStation.stationRef.equals(startStation)) {\r\n//\t\t System.out.print(\" \" + tempStation.cost + \" to \" + tempStation.viaStation.stationName + \" #\");\r\n//\t\t\r\n//\t\t tempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n//\t\t }\r\n//\t\t System.out.print(\" End\");\r\n//\t\t System.out.print(\"\\n\\n\");\r\n//\t\t }\r\n//\r\n\t\tif (goalFound) {\r\n\t\t\tSystem.out.println(\"Generating route to goal\");\r\n\t\t\t// create a route object with all the stations.\r\n\t\t\tRoute routeToGoal = new Route(fromStation, toStation);\r\n\t\t\t// get the goalStation as a DijkstraStation Type\r\n\t\t\tDijkstraStation goalStation = getDijkstraStationByID(endStation.stationid, dijkstraStations);\r\n\r\n\t\t\trouteToGoal.cost = goalStation.totalCost;\r\n\t\t\trouteToGoal.price = (int) goalStation.totalCost;\r\n\r\n\t\t\t// Find the route to the goal\r\n\t\t\tDijkstraStation tempStation = goalStation;\r\n\r\n\t\t\twhile (!tempStation.stationRef.equals(startStation)) {\r\n\t\t\t\t// Add the station to the route table\r\n\t\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.cost, tempStation.cost,\r\n\t\t\t\t\t\ttempStation.stationRef.stationName, tempStation.stationRef.stationid);\r\n\t\t\t\t\r\n\t\t\t\t//Fix region string\r\n\t\t\t\tString regionString=\"\";\r\n\t\t\t\tfor (Integer regionID : tempStation.stationRef.region) {\r\n\t\t\t\t\tregionString.concat(regionID+ \",\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tthisStation.region = regionString.substring(0, regionString.length() - 1);\r\n\t\t\t\t\r\n\t\t\t\t//Add the station\r\n\t\t\t\trouteToGoal.route.add(0, thisStation);\r\n\t\t\t\t// Go to the previous station\r\n\t\t\t\ttempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n\t\t\t}\r\n\t\t\t// add the starting station\r\n\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.stationRef.latitude, tempStation.stationRef.longitude, tempStation.stationRef.stationName,\r\n\t\t\t\t\ttempStation.stationRef.stationid);\r\n\t\t\trouteToGoal.route.add(0, thisStation);\r\n\r\n\t\t\t// print the route\r\n\t\t\t//System.out.println(\"Printing best route to the Goal:\\n\" + routeToGoal.toString());\r\n\r\n\t\t\treturn routeToGoal;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"private void calculateShortestRoute(String strSourceTerminal){\n\t\tshortestTravelTime = new HashMap<>();\n\n //stores parent of every terminal in shortest travel time\n parent = new HashMap<>();\n \n //heap + map data structure\n MinimumHeap<BaggageTerminal> minHeap = new MinimumHeap<>();\n\n //initialize all terminal with infinite distance from source terminal\n for(BaggageTerminal baggageTerminal : graph.getTerminals()){\n minHeap.add(Integer.MAX_VALUE, baggageTerminal);\n }\n \n BaggageTerminal sourceTerminal = graph.getTerminal(strSourceTerminal);\n \n //set distance of source terminal to itself 0\n minHeap.decrease(sourceTerminal, 0);\n\n //put it in map\n shortestTravelTime.put(sourceTerminal, 0);\n\n //source terminal parent is null\n parent.put(sourceTerminal, null);\n\n //iterate till heap is not empty\n while(!minHeap.empty()){\n //get the min value from heap node which has vertex and distance of that vertex from source vertex.\n MinimumHeap<BaggageTerminal>.Node heapNode = minHeap.extractMinNode();\n BaggageTerminal currentTerminal = heapNode.key;\n\n //update shortest distance of current vertex from source vertex\n shortestTravelTime.put(currentTerminal, heapNode.weight);\n\n //iterate through all connections of current terminal\n for(Connection connection : currentTerminal.getConnections()){\n\n //get the adjacent terminal\n BaggageTerminal adjacent = getConnectingTerminal(currentTerminal, connection);\n\n //if heap does not contain adjacent vertex means adjacent vertex already has shortest distance from source vertex\n if(!minHeap.containsData(adjacent)){\n continue;\n }\n\n //add distance of current vertex to edge weight to get distance of adjacent vertex from source vertex\n //when it goes through current vertex\n int newDistance = shortestTravelTime.get(currentTerminal) + connection.getWeight();\n\n //see if this above calculated distance is less than current distance stored for adjacent vertex from source vertex\n if(minHeap.getWeight(adjacent) > newDistance) {\n minHeap.decrease(adjacent, newDistance);\n parent.put(adjacent, currentTerminal);\n }\n }\n }\n return;\n }",
"public int calculateDistance(String route) {\r\n if(route.length() < 2)\r\n throw new IllegalArgumentException(\"route is too short\");\r\n \r\n // find first vertex\r\n Vertex currentVertex = null;\r\n for(Vertex v : listOfVertices) {\r\n if(v.getName() == route.charAt(0)) {\r\n currentVertex = v;\r\n break;\r\n }\r\n }\r\n if(currentVertex == null) {\r\n throw new IllegalArgumentException(\"Vertex \" + route.charAt(0) + \" not found\");\r\n }\r\n \r\n int totalDistance = 0;\r\n for(int i = 1; i < route.length(); ++i) {\r\n char nextVertexName = route.charAt(i);\r\n Edge travelledEdge = currentVertex.getJoiningEdgeByName(nextVertexName);\r\n \r\n // check edge between vertices exists, and if not throw exception\r\n if(travelledEdge == null) {\r\n throw new IllegalArgumentException(\"Vertex \" + route.charAt(i) + \" not found\");\r\n }\r\n \r\n // travel edge to next vertex\r\n totalDistance += travelledEdge.getDistance();\r\n currentVertex = travelledEdge.getOppositeVertex(currentVertex);\r\n }\r\n \r\n return totalDistance;\r\n }",
"@Nullable\n private static RoutePoint findClosestRoutePoint(BingItineraryItem currentItem, List<RoutePoint> routePoints) {\n\n double pointLat = currentItem.getManeuverPoint().getCoordinates()[0];\n double pointLng = currentItem.getManeuverPoint().getCoordinates()[1];\n\n GeoPoint point = new GeoPoint(pointLat, pointLng);\n\n RoutePoint closestPoint = null;\n double closestDist = Double.MAX_VALUE;\n\n for (RoutePoint rp : routePoints) {\n double currentDist = point.sphericalDistance(rp.getGeoPoint());\n\n if (currentDist < closestDist) {\n if (rp.getStreetName().isEmpty() && rp.getInstruction().isEmpty()) {\n closestDist = currentDist;\n closestPoint = rp;\n }\n }\n }\n return closestPoint;\n }",
"public double satisfyOrder(ShipmentOrder order) \n {\n double fOreToLoad, fOreToTake, fMetalRemaining;\n OrePile pile;\n\n if (order.getOrderedMetalWt() > calcTotalMetalWeight())\n throw new IllegalStateException(\"Not enough ore in this Shed to fulfill the order\");\n\n fMetalRemaining = order.getOrderedMetalWt();\n fOreToLoad = 0.000;\n\n while (fMetalRemaining > 0.) \n {\n pile = m_orePileQueue.peek();\n\n if (fMetalRemaining >= pile.calcMetalWeight()) {\n // Take this whole pile and dequeue it\n pile = m_orePileQueue.peek();\n m_orePileQueue.dequeue();\n fOreToLoad += pile.getWeight();\n fMetalRemaining -= pile.calcMetalWeight();\n }\n else \n {\n // Take part of this pile but leave it on the queue\n fOreToTake = fMetalRemaining / (pile.getGrade() / 100.0);\n pile.setWeight(pile.getWeight() - fOreToTake);\n fOreToLoad += fOreToTake;\n fMetalRemaining = 0.0;\t// We're done\n }\n }\n\n fMetalRemaining = 0;\n return fOreToLoad;\n }",
"public List<Integer> getRoute(int start, int destination, Map<Transport, Integer> tickets) {\n\n List<Node<Integer>> nodes = graph.getNodes();\n //Initialisation\n Map<Node<Integer>, Double> unvisitedNodes = new HashMap<Node<Integer>, Double>();\n Map<Node<Integer>, Double> distances = new HashMap<Node<Integer>, Double>();\n Map<Node<Integer>, Node<Integer>> previousNodes = new HashMap<Node<Integer>, Node<Integer>>();\n Node<Integer> currentNode = graph.getNode(start);\n\n for (Node<Integer> node : nodes) {\n if (!currentNode.getIndex().equals(node.getIndex())) {\n distances.put(node, Double.POSITIVE_INFINITY);\n } else {\n distances.put(node, 0.0);\n }\n Integer location = node.getIndex();\n try {\n unvisitedNodes.put(node, (1/pageRank.getPageRank(location)));\n } catch (Exception e) {\n System.err.println(e);\n }\n previousNodes.put(node, null);\n }\n //Search through the graph\n while (unvisitedNodes.size() > 0) {\n Node<Integer> m = minDistance(distances, unvisitedNodes);\n if (m == null) break;\n currentNode = m;\n if (currentNode.getIndex().equals(destination)) break;\n unvisitedNodes.remove(currentNode);\n\n step(graph, distances, unvisitedNodes, currentNode, previousNodes, tickets);\n }\n\n //Move backwards finding the shortest route\n List<Integer> route = new ArrayList<Integer>();\n while (previousNodes.get(currentNode) != null) {\n route.add(0, currentNode.getIndex());\n currentNode = previousNodes.get(currentNode);\n }\n route.add(0, currentNode.getIndex());\n return route;\n }",
"@Override\n public int compareTo(RouteNode o) {\n return Double.compare(this.estimatedDistanceToTarget, o.estimatedDistanceToTarget);\n }",
"public void optimizeRoute(final Route route) throws ExecutionException, InterruptedException {\n\n\n ExecutorService executorService = Executors.newFixedThreadPool(10);\n executorService.execute(new Runnable() {\n public void run() {\n\n String routeName = route.getRouteName();\n routeName = routeName.replace(\" \", \"+\");\n\n String orderMongo = \"http://10.0.2.2:8082/optimizeRoute?routeName=\" + routeName;\n\n URL url = null;\n try {\n url = new URL(orderMongo);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n HttpURLConnection urlConnection = null;\n try {\n assert url != null;\n urlConnection = (HttpURLConnection) url.openConnection();\n } catch (IOException e) {\n e.printStackTrace();\n }\n int responseCode = 0;\n try {\n assert urlConnection != null;\n responseCode = urlConnection.getResponseCode();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n InputStream inputStream = null;\n if (responseCode != HttpURLConnection.HTTP_OK) {\n inputStream = urlConnection.getErrorStream();\n } else {\n try {\n inputStream = urlConnection.getInputStream();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n urlConnection.disconnect();\n\n\n }\n });\n\n executorService.shutdown();\n }",
"public int[] djekstra(Router root, Router destination){\n //if router and destination same\n if (root.getID() == destination.getID()){\n int[] result = new int[2];\n result[0] = root.getID();\n result[1] = 0;\n hops.add(0);\n return result;\n }\n\n //Storing shortest path currently known\n int[] shortestPath = new int[size];\n //Storing the weights of the current router's connection to neighbors\n int[] currentNeighborConnectionWeight = new int[size];\n\n //First set all of the positions to 9999 (pseudo infinity)\n for (int i = 0; i < shortestPath.length;i++){\n shortestPath[i] = 9999;\n }\n\n // Set the distance to itself as 0, mark as visited\n shortestPath[root.getID()-1] = 0;\n root.visit();\n\n //For each connection the root has, set the shortestPath available to the weight to the neighbor\n for (Connection c : root.getConnections()){\n shortestPath[c.getDestination().getID()-1] = c.getWeight();\n }\n\n //Find the smallest router to start the algorithm\n //ID of smallest router, start the value with the first available option\n int smallestRouterID = 0;\n int smallestRouterWeight = 9999;\n //Router used for iterating\n Router current = null;\n //Storing path length\n int totalPathLength = 0;\n\n\n //Find the shortest available path link to start with\n for (int k = 0; k < shortestPath.length; k++){\n if ((shortestPath[k] < smallestRouterWeight) && (shortestPath[k] != 0)){\n // Check to see if dead end\n if (routers.get(k).getConnections().size() > 1){\n // id is pos+1\n smallestRouterID = k + 1;\n smallestRouterWeight = shortestPath[k];\n } else if (routers.get(k).getID() == destination.getID()){ //edge case\n // id is pos+1\n smallestRouterID = k + 1;\n smallestRouterWeight = shortestPath[k];\n }\n }\n }\n // add its weight\n totalPathLength += smallestRouterWeight;\n\n //This is where we start our first step\n current = getRouter(smallestRouterID);\n hops.add(current.getID());\n current.visit();\n //System.out.println(\"First step--> Router:\" + smallestRouterID + \" Weight to router from root:\" + smallestRouterWeight);\n //Now we loop\n Router firstRouter = current;\n boolean done = false;\n while (done == false){\n //Break case 1, we found the router\n if (current.getID() == destination.getID()){\n // check if root has available connections\n\n // set current to root and store totalPathLength to new variable && store hops in new array ArrayList\n // compare totals and store the one that's lower ++ hops list too\n // could we recursively call djekstra?\n done = true;\n // System.out.println(\"Router found\");\n break;\n }\n\n //Break case 2, all of the connections have been visited already\n boolean destinationAvailable = hasAvailableConnections(current);\n if (destinationAvailable == false){\n if(hasAvailableConnections(root)){\n current = root;\n hops.clear();\n totalPathLength= 0;\n } else {\n done = true;\n // System.out.println(\"v-- No more routers available\");\n break;\n }\n }\n\n //set all to 9999 to assume we cant see\n for (int a = 0; a < currentNeighborConnectionWeight.length; a++){\n currentNeighborConnectionWeight[a] = 9999;\n }\n\n //Recalculate for new path lengths\n for (Connection c : current.getConnections()){\n //Only calculate path for routers that havent been visited\n if (c.getDestination().getVisit() == false){\n currentNeighborConnectionWeight[c.getDestination().getID()-1] = c.getWeight();\n }\n }\n\n //Find the next step to take\n //Find the shortest available path link to start with\n smallestRouterID = 0;\n smallestRouterWeight = 9999;\n for (int b = 0; b < currentNeighborConnectionWeight.length; b++){\n if ((currentNeighborConnectionWeight[b] < smallestRouterWeight)){\n // id is pos+1\n smallestRouterID = b + 1;\n smallestRouterWeight = currentNeighborConnectionWeight[b];\n }\n }\n\n // add its weight\n totalPathLength += smallestRouterWeight;\n current = getRouter(smallestRouterID);\n hops.add(current.getID());\n current.visit();\n // System.out.println(\"Next shortest path--> Router: \" + current.getID() + \" Length from root:\" + totalPathLength);\n\n\n } // <--------------------------------------------------------------------------------End of while loop\n\n // returns <lasthop, pathcost>\n int[] result = new int[2];\n //Check and see if the path length is smaller then the original\n if (totalPathLength <= shortestPath[destination.getID()-1]){\n //System.out.println(\"Case new \" + firstRouter.getID());\n shortestPath[destination.getID()-1] = totalPathLength;\n result[0] = firstRouter.getID();\n result[1] = shortestPath[destination.getID()-1];\n } else {\n //root was shorter\n //System.out.println(\"Case old \" + root.getID());\n result[0] = root.getID();\n result[1] = shortestPath[destination.getID()-1];\n }\n // System.out.println(\"Next hop:\" + current.getID() + \" Total Distance:\" + shortestPath[destination.getID()-1]);\n\n //reset the visited list\n for (Router r: routers){\n r.unvisit();\n }\n return result;\n }",
"Execution getFarthestDistance();",
"static int minCost(int cost[][], int destinationStation)\n {\n // dist[i] stores minimum cost to reach station i\n // from station 0.\n int minCost[] = new int[destinationStation];\n Arrays.fill(minCost, Integer.MAX_VALUE);\n minCost[0] = 0;\n \n // Go through every station and check if using it\n // as an intermediate station gives better path\n for (int i=0; i < destinationStation; i++)\n { \n \tfor (int j=i+1; j < destinationStation; j++)\n \t{ \n \t\tminCost[j] = Math.min(minCost[i] + cost[i][j], minCost[j]);\n \t}\n }\n return minCost[destinationStation-1];\n }",
"@Nullable\n public VertexPath<V> findShortestVertexPath(DirectedGraph<V, A> graph,\n V start, V goal, @Nonnull ToDoubleFunction<A> costf) {\n if (graph instanceof IntDirectedGraph) {\n return doFindIntShortestVertexPath(graph, start, goal, costf);\n } else {\n return doFindShortestVertexPath(graph, start, goal, costf);\n }\n }",
"@Override\n public Double calculateShortestPathFromSource(String from, String to) {\n Node source = graph.getNodeByName(from);\n Node destination = graph.getNodeByName(to);\n source.setDistance(0d);\n Set<Node> settledNodes = new HashSet<>();\n PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));\n unsettledNodes.add(source);\n while (unsettledNodes.size() != 0) {\n Node currentNode = unsettledNodes.poll();\n for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Double distance = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n calculateMinimumDistance(adjacentNode, distance, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();\n }",
"private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }",
"private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}",
"public io.opencannabis.schema.commerce.OrderDelivery.DeliveryDestination getDestination() {\n if (destinationBuilder_ == null) {\n return destination_ == null ? io.opencannabis.schema.commerce.OrderDelivery.DeliveryDestination.getDefaultInstance() : destination_;\n } else {\n return destinationBuilder_.getMessage();\n }\n }",
"private Node find(Order ord){\n\t\tNode position=head;\n\t\tOrder ItemPosition;\n\t\twhile (position!=null){\n\t\t\tItemPosition = position.ord;\n\t\t\tif(ItemPosition.equals(ord)) {\n\t\t\t\tposition=bestBid;\n\t\t\t\treturn position;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public ArrayQueue<T> getShortestPath(T vertex1, T vertex2){\n DijkstraShortestPath p = new DijkstraShortestPath(vertex1, vertex2);\n return p.getMinPath();\n }",
"public static PriorityQueue<Route> getFeasibleRoutes2(\r\n\t\t\tint i, \r\n\t\t\tint j, \r\n\t\t\tint[] hList,\r\n\t\t\tNode[] nodes,\r\n\t\t\tRoute[][][][] routes,\r\n\t\t\tdouble[][] distances,\r\n\t\t\tdouble alpha\r\n\t\t\t){\n\t\tPriorityQueue<Route> feasibleRoutes = new PriorityQueue<Route>();\r\n\t\t\t\tif (nodes[i].isHub && nodes[j].isHub) {\r\n\t\t\t\t\tif (routes[i][i][j][j] == null)\r\n\t\t\t\t\t\troutes[i][i][j][j] = new Route(nodes[i], nodes[i], nodes[j], nodes[j],\r\n\t\t\t\t\t\t\t\tdistances, alpha);\r\n\t\t\t\t\tfeasibleRoutes.add(routes[i][i][j][j]);\r\n\t\t\t\t} else if (nodes[i].isHub) {\r\n\t\t\t\t\tfor (Integer n : hList) {\r\n\t\t\t\t\t\tif (routes[i][i][n][j] == null)\r\n\t\t\t\t\t\t\troutes[i][i][n][j] = new Route(nodes[i], nodes[i], nodes[n], nodes[j],\r\n\t\t\t\t\t\t\t\t\tdistances, alpha);\r\n\t\t\t\t\t\tfeasibleRoutes.add(routes[i][i][n][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (nodes[j].isHub) {\r\n\t\t\t\t\tfor (Integer n : hList) {\r\n\t\t\t\t\t\tif (routes[i][n][j][j] == null)\r\n\t\t\t\t\t\t\troutes[i][n][j][j] = new Route(nodes[i], nodes[n], nodes[j], nodes[j],\r\n\t\t\t\t\t\t\t\t\tdistances, alpha);\r\n\t\t\t\t\t\tfeasibleRoutes.add(routes[i][n][j][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor (int u = 0; u < hList.length; u++) {\r\n\t\t\t\t\t\tfor (int v = u; v < hList.length; v++) {\r\n\t\t\t\t\t\t\tif (routes[i][hList[u]][hList[v]][j] == null\r\n\t\t\t\t\t\t\t\t\t&& routes[i][hList[v]][hList[u]][j] == null) {\r\n\t\t\t\t\t\t\t\tRoute r1 = new Route(nodes[i], nodes[hList[u]], nodes[hList[v]], nodes[j],\r\n\t\t\t\t\t\t\t\t\t\tdistances, alpha);\r\n\t\t\t\t\t\t\t\tRoute r2 = new Route(nodes[i], nodes[hList[v]],nodes[hList[u]], nodes[j],\r\n\t\t\t\t\t\t\t\t\t\tdistances, alpha);\r\n\t\t\t\t\t\t\t\tif (r1.expCost <= r2.expCost) {\r\n\t\t\t\t\t\t\t\t\troutes[r1.i.ID][r1.k.ID][r1.m.ID][r1.j.ID] = r1;\r\n\t\t\t\t\t\t\t\t\tfeasibleRoutes.add(r1);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\troutes[r2.i.ID][r2.k.ID][r2.m.ID][r2.j.ID] = r2;\r\n\t\t\t\t\t\t\t\t\tfeasibleRoutes.add(r2);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (routes[i][hList[u]][hList[v]][j] != null) {\r\n\t\t\t\t\t\t\t\tfeasibleRoutes.add(routes[i][hList[u]][hList[v]][j]);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tfeasibleRoutes.add(routes[i][hList[v]][hList[u]][j]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn feasibleRoutes;\r\n\t}",
"private int getPriority(Order order) {\n if (order.getVip()) {\n return vipPriority;\n } else if (order.getFood()) {\n return foodPriority;\n } else {\n return otherPriority;\n }\n }",
"public ArrayList<Destination> calculateOrderedDestinations(int[] waypointOrder) {\n ArrayList<Destination> orderedDestinations = new ArrayList<Destination>();\n orderedDestinations.add(destinations.get(0));\n for(int i = 0; i < waypointOrder.length; i++){\n orderedDestinations.add(destinations.get(waypointOrder[i]+1));\n }\n orderedDestinations.add(destinations.get(destinations.size()-1));\n return orderedDestinations;\n }",
"Move getBestMove() {\n //System.out.println(\"AI chooses: \" + m.toString());\n return moves.get((int) (Math.random() * moves.size()));\n }",
"@Override\n public int findLowerCostPath(City src, City dest) {\n List<City> cityList = new ArrayList<>(cityManager.getAll());\n int[] travelCosts = new int[cityList.size()]; // accumulate minimum travel costs through each city\n boolean[] exploredCity = new boolean[cityList.size()];\n int currCityId = src.getId();\n Arrays.fill(travelCosts, INF); //All travel costs are INF\n travelCosts[currCityId - 1] = 0; //except src\n\n //Iterate\n for (int i = 0; i < cityList.size(); i++) {\n int minCost = INF;\n // if we get destination, ignore, it will be last explored city\n if (currCityId != dest.getId())\n exploredCity[currCityId - 1] = true;\n //find all paths of city to iterate\n Set<Path> paths = findAllPaths(cityList.get(currCityId - 1));\n for (Path path : paths) {\n if (exploredCity[path.getDestId() - 1])\n continue;\n //if from city cost + path cost < to city cost, then assign new value\n if (path.getCost() + travelCosts[path.getSrcId() - 1] < travelCosts[path.getDestId() - 1]) {\n travelCosts[path.getDestId() - 1] = travelCosts[path.getSrcId() - 1] + path.getCost();\n }\n //find minimum path cost of cur city\n if (path.getCost() < minCost) {\n minCost = path.getCost();\n currCityId = path.getDestId();\n }\n }\n //to find remaining not explored cities\n if (minCost == INF) {\n for (int j = 0; j < exploredCity.length; j++) {\n if (!exploredCity[j] && dest.getId() != (j + 1) && travelCosts[j] != INF) {\n currCityId = j + 1;\n }\n }\n }\n }\n //last explored city is destination\n exploredCity[dest.getId() - 1] = true;\n\n return travelCosts[dest.getId() - 1];\n }",
"public Address getNextHop()\n {\n return (Address)route.get(getHopCount()+1);\n }",
"public void deliverOrder(Order order, int totalDistance) {\n // Vehicle is not currently available for delivery\n // Run the delivery on a separate thread so the deliveries can happen concurrently\n // This is the current order on the vehicle.\n this.currentOrder = order;\n this.setAvailableForDelivery(false);\n Thread deliveryThread = new Thread(new VehicleThread(this, order, totalDistance));\n deliveryThread.start();\n\n }",
"private void findBestPath(int start){\n\t\tint n = this.getDimension(); // for readability\n\t\tint lastCity, minDist = 0, moment = 0;\n\t\t\n\t\tthis.path = new int[this.getDimension() + 1];\n\t\tthis.visited = 0; \n\t\t\n\t\tsetAllUnvisited();\n\t\t\n\t\tvisitCity(moment, start); // visits the first city in time 0\n\t\tlastCity = start;\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + this.visited);\n\t\t// Repeats until all cities were visited\n\t\twhile(visited < n){\n//\t\t\tSystem.out.println(\"LC:\" + lastCity + \" MD:\" + minDist + \" M:\" + moment);\n\t\t\tmoment++;\n\t\t\t\n\t\t\t// Finds the closest city\n\t\t\tint closest = -1, closestDist = -1;\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\tif(!wasVisited(i)){\n\t\t\t\t\tif(dist(lastCity, i) < closestDist || closestDist == -1){ // If it's the first iteration or found a closer city\n\t\t\t\t\t\tclosest = i;\n\t\t\t\t\t\tclosestDist = dist(lastCity, closest);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Updates distance\n\t\t\tminDist += dist(lastCity, closest);\n\t\t\t\n\t\t\t// Visits the closest city\n\t\t\tvisitCity(moment, closest);\n\t\t\tlastCity = closest;\n//\t\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + minDist);\n\t\t\t\n\t\t}\n\t\t\n\t\t// Returns to the first city\n\t\tvisitCity(moment + 1, start);\n\t\tminDist += dist(lastCity, start);\n\t\t\n\t\tif(minDist < this.totalDistance || this.totalDistance == -1){\n\t\t\tthis.totalDistance = minDist;\n\t\t\tthis.bestPath = this.path.clone();\n\t\t}\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" -----> \" + minDist);\n\t}",
"private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }",
"private static void findBestRelocationMove(RelocationMove rm, Solution s, double [][] distanceMatrix, int numberOfVehicles) \n\t{\n\t\t//This is a variable that will hold the cost of the best relocation move\n\t\tdouble bestMoveCost = Double.MAX_VALUE;\n\n\t\t//We will iterate through all available vehicles\n\t\t\n\t\t//Vehicles to relocate FROM\n\t\tfor (int from = 0; from<numberOfVehicles; from++)\n\t\t{\n\t\t\t// Vehicles to relocate TO\n\t\t\tfor (int to = 0; to<numberOfVehicles; to++)\n\t\t\t{\n\n\t\t\t\tfor (int fromIndex = 1; fromIndex < s.routes.get(from).customers.size() - 1; fromIndex++)\n\t\t\t\t{\n\t\t\t\t\t//Node A is the predecessor of B\n\t\t\t\t\tCustomer A = s.routes.get(from).customers.get(fromIndex - 1);\n\n\t\t\t\t\t//Node B is the relocated node\n\t\t\t\t\tCustomer B = s.routes.get(from).customers.get(fromIndex);\n\n\t\t\t\t\t//Node C is the successor of B\n\t\t\t\t\tCustomer C = s.routes.get(from).customers.get(fromIndex + 1);\n\n\t\t\t\t\t//We will iterate through all possible re-insertion positions for B\n\t\t\t\t\tfor (int afterIndex = 0; afterIndex < s.routes.get(to).customers.size() -1; afterIndex ++)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif ((afterIndex != fromIndex && afterIndex != fromIndex - 1)||from != to)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Node F the node after which B is going to be reinserted\n\t\t\t\t\t\t\tCustomer F = s.routes.get(to).customers.get(afterIndex);\n\n\t\t\t\t\t\t\t//Node G the successor of F\n\t\t\t\t\t\t\tCustomer G = s.routes.get(to).customers.get(afterIndex + 1);\n\n\t\t\t\t\t\t\t//The arcs A-B, B-C, and F-G break\n\t\t\t\t\t\t\tdouble costRemovedFrom = distanceMatrix[A.ID][B.ID] + distanceMatrix[B.ID][C.ID];\n\t\t\t\t\t\t\tdouble costRemovedTo = distanceMatrix[F.ID][G.ID];\n\n\t\t\t\t\t\t\t//The arcs A-C, F-B and B-G are created\n\t\t\t\t\t\t\tdouble costAddedFrom = distanceMatrix[A.ID][C.ID];\n\t\t\t\t\t\t\tdouble costAddedTo = distanceMatrix[F.ID][B.ID] + distanceMatrix[B.ID][G.ID];\n\n\t\t\t\t\t\t\t//This is the cost of the move, or in other words\n\t\t\t\t\t\t\t//the change that this move will cause if applied to the current solution\n\t\t\t\t\t\t\tdouble fromMoveCost = costAddedFrom - costRemovedFrom;\n\t\t\t\t\t\t\tdouble toMoveCost = costAddedTo - costRemovedTo;\n\n\t\t\t\t\t\t\t//If this move is the best found so far\n\t\t\t\t\t\t\tdouble moveCost = fromMoveCost+toMoveCost;\n\t\t\t\t\t\t\tif ((moveCost < bestMoveCost)&&(from == to || (s.routes.get(to).load + s.routes.get(from).customers.get(fromIndex).demand<=s.routes.get(to).capacity)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//set the best cost equal to the cost of this solution\n\t\t\t\t\t\t\t\tbestMoveCost = moveCost;\n\n\t\t\t\t\t\t\t\t//store its characteristics\n\t\t\t\t\t\t\t\trm.positionOfRelocated = fromIndex;\n\t\t\t\t\t\t\t\trm.positionToBeInserted = afterIndex;\n\t\t\t\t\t\t\t\trm.toMoveCost = toMoveCost;\n\t\t\t\t\t\t\t\trm.fromMoveCost = fromMoveCost;\n\t\t\t\t\t\t\t\trm.fromRoute = from;\n\t\t\t\t\t\t\t\trm.toRoute = to;\n\t\t\t\t\t\t\t\trm.moveCost = moveCost;\n\t\t\t\t\t\t\t\tif (from != to) {\n\t\t\t\t\t\t\t\t\trm.fromUpdLoad = s.routes.get(from).load - s.routes.get(from).customers.get(fromIndex).demand;\n\t\t\t\t\t\t\t\t\trm.toUpdLoad = s.routes.get(to).load + s.routes.get(from).customers.get(fromIndex).demand;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\trm.fromUpdLoad = s.routes.get(from).load;\n\t\t\t\t\t\t\t\t\trm.toUpdLoad = s.routes.get(to).load;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void findShortestPath(String startName, String endName) {\n checkValidEndpoint(startName);\n checkValidEndpoint(endName);\n\n Vertex<String> start = vertices.get(startName);\n Vertex<String> end = vertices.get(endName);\n\n double totalDist; // totalDist must be update below\n\n Map<Vertex<String>, Double> distance = new HashMap<>();\n Map<Vertex<String>, Vertex<String>> previous = new HashMap<>();\n Set<Vertex<String>> explored = new HashSet<>();\n PriorityQueue<VertexDistancePair> pq = new PriorityQueue<>();\n\n\n\n addPQ(distance, start, pq, previous);\n\n\n\n dijkstraHelper(pq, end, explored, distance, previous);\n\n\n\n\n\n\n totalDist = distance.get(end);\n List<Edge<String>> path = getPath(end, start);\n printPath(path, totalDist);\n }",
"public ErpAddressModel getCorrectedDeliveryAddress() {\n\t\tErpDeliveryInfoModel dlvInfo = erpOrder.getDeliveryInfo();\n\t\tErpAddressModel origAddress = dlvInfo.getDeliveryAddress();\n\t\t/*\n\t\t * The following block was added to fix COS Promo Bug.\n\t\t * The modified order delivery info object contains the attribute\n\t\t * EnumDeliveryType which defines the service type used fo that\n\t\t * order. But the view cart page itself uses AddressModel.serviceType\n\t\t * which in this case would be NULL, to decide if it was a HOME or \n\t\t * CORPORATE order. So the following black sets the AddressModel.serviceType\n\t\t * based on the DeliveryInfo.deliveryType so that the system knows\n\t\t * the serviceType way in advance before you go to delivery address page\n\t\t * and come back.\n\t\t * \n\t\t */\n\t\t//BEGIN FIX\n\t\tEnumDeliveryType dlvType = dlvInfo.getDeliveryType();\n\t\tif(EnumDeliveryType.HOME.equals(dlvType)){\n\t\t\torigAddress.setServiceType(EnumServiceType.HOME);\n\t\t} else if (EnumDeliveryType.CORPORATE.equals(dlvType)){\n\t\t\torigAddress.setServiceType(EnumServiceType.CORPORATE);\n\t\t} else if (EnumDeliveryType.PICKUP.equals(dlvType)){\n\t\t\torigAddress.setServiceType(EnumServiceType.PICKUP);\n\t\t} else if (EnumDeliveryType.DEPOT.equals(dlvType)){\n\t\t\torigAddress.setServiceType(EnumServiceType.DEPOT);\n\t\t}\n\t\t//END FIX.\n\t\t\n\t\tif (EnumDeliveryType.DEPOT.equals(dlvType) || EnumDeliveryType.PICKUP.equals(dlvType)) {\n\t\t\tErpDepotAddressModel depotAddress = new ErpDepotAddressModel(origAddress);\n\t\t\tdepotAddress.setFacility(getDepotFacility());\n\t\t\tdepotAddress.setPickup(EnumDeliveryType.PICKUP.equals(dlvType));\n\t\t\tdepotAddress.setLocationId(dlvInfo.getDepotLocationId());\n\t\t\tdepotAddress.setInstructions(origAddress.getInstructions());\n\t\t\tdepotAddress.setZoneCode(dlvInfo.getDeliveryZone()); \n\t\t\treturn depotAddress;\n\t\t}\n\t\treturn origAddress;\n\t}",
"public int findCheapestPrice(int n, int[][] flights, int src, int dst, int K) {\n int[][] g = new int[n][n];\n \n for(int[] f : flights){\n int start = f[0];\n int end = f[1];\n int price = f[2];\n g[start][end] = price;\n }\n \n PriorityQueue<int[]> pq = new PriorityQueue<>((a,b)->a[0]-b[0]);\n pq.offer(new int[]{0,src,K+1});\n while(!pq.isEmpty()){\n int[] curr = pq.poll();\n int currPrice = curr[0];\n int currPoint = curr[1];\n int stepsRemain = curr[2];\n \n // if this point is destination, finish\n if(currPoint == dst) return currPrice;\n \n if(stepsRemain >0){\n // Add all reachable neighbors\n for(int i=0; i<n; i++){\n if(g[currPoint][i] != 0){\n int nextPrice = g[currPoint][i];\n pq.offer(new int[]{currPrice+nextPrice, i, stepsRemain-1});\n }\n } \n } \n }\n return -1;\n }",
"private static long getShortestDistance(String origin, String destination) \n\t\tthrows IOException, ParserConfigurationException, SAXException{\n\t\t\t\t\n\t\tURL googleReq = new URL(\"http://maps.google.com/maps/api/directions/xml?origin=\"+origin.replace(\" \", \"+\").replace(\",\", \"\")+\n\t\t\t\t\"&destination=\"+destination.replace(\" \", \"+\").replace(\",\", \"\")+\"&sensor=false\");\n\t\t\n\t\tURLConnection urlConnection = googleReq.openConnection();\n\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\n\t\tDocument doc = db.parse(urlConnection.getInputStream());\n\t\ttry{\n\t\t\t/*\n\t\t\t * we write the response to an xml file\n\t\t\t * just for supervision\n\t\t\t */\n\t\t\tSource source = new DOMSource(doc);\n\t\t\tFile file = new File(\"response.xml\");\n\t\t\tResult result = new StreamResult(file);\n\n\t\t\t// Write the DOM document to the file\n\t\t\tTransformer xformer = TransformerFactory.newInstance().newTransformer();\n\t\t\txformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t} catch (TransformerException e) {\n\t\t}\n\n\t\tNode stNode = doc.getElementsByTagName(\"status\").item(0);\n\t\tlong dst = -1;\n\t\tif(stNode.getTextContent().equals(\"OK\")){\n\t\t\t//extract the distance from the response\n\t\t\tNodeList routeLst = doc.getElementsByTagName(\"route\");\n\t\t\t\n\t\t\tfor(int rCtr=0;rCtr<routeLst.getLength();rCtr++){\n\t\t\t\tlong routeDist = 0;\n\t\t\t\tNode route = routeLst.item(rCtr);\n\t\t\t\t\n\t\t\t\tNodeList distLst = ((Element)route).getElementsByTagName(\"distance\");\n\n\t\t\t\tfor(int dCtr=0;dCtr<distLst.getLength();dCtr++){\n\t\t\t\t\tNode distanceNode = distLst.item(dCtr);\n\t\t\t\t\tif(distanceNode.getParentNode().getNodeName().equals(\"leg\")){\n\t\t\t\t\t\tNodeList distChild = ((Element)distanceNode).getElementsByTagName(\"value\");\n\t\t\t\t\t\tfor(int ch=0;ch<distChild.getLength();ch++){\n\t\t\t\t\t\t\tNode tmpChild = distChild.item(ch);\n\t\t\t\t\t\t\t\trouteDist += Long.parseLong(tmpChild.getTextContent());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(routeDist<dst || dst==-1)\n\t\t\t\t\tdst=routeDist;\n\t\t\t} //end route\n\t\t\tSystem.out.println(\"Shortest distance: \"+dst+\" meters\");\n\t\t}\n\t\telse{\n\t\t\tSystem.err.println(\"RESPONSE STATUS NOT OK!\");\t//probably over_query_limit status\n\t\t}\n\t\t\n\t\treturn dst;\n\t}",
"public Move pickBestMove(Board board) {\n\t\treturn null;\n\t}",
"public static void getShortestPathsToRooms(Board board, DisplayTile startTile) {\n\t\tHashMap<Room, List<DisplayTile>> shortestPathToRoomsMap = new HashMap<Room, List<DisplayTile>>();\n\t\tHashMap<DisplayTile, DisplayTile> chainedTiles = new HashMap<DisplayTile, DisplayTile>();\n\t\tchainedTiles.put(startTile, null);\n\t\tLinkedList<DisplayTile> tilesToExplore = new LinkedList<DisplayTile>();\n\t\t\n\t\taddUnexploredAdjacentTiles(board, startTile, chainedTiles, tilesToExplore);\n\t\twhile (!tilesToExplore.isEmpty()) {\n\t\t\tDisplayTile currentTile = tilesToExplore.remove();\n\t\t\tif (currentTile.isRoomTile()) {\n\t\t\t\tLinkedList<DisplayTile> path = new LinkedList<DisplayTile>();\n\t\t\t\tDisplayTile tile = currentTile;\n\t\t\t\tdo {\n\t\t\t\t\tpath.addLast(tile);\n\t\t\t\t\ttile = chainedTiles.get(tile);\n\t\t\t\t}\n\t\t\t\twhile (tile != startTile);\n\t\n\t\t\t\tRoom room = currentTile.getRoom();\n\t\t\t\tif (!shortestPathToRoomsMap.containsKey(room) || path.size() < shortestPathToRoomsMap.get(room).size())\n\t\t\t\t\tshortestPathToRoomsMap.put(room, path);\n\t\t\t}\n\t\t\telse\n\t\t\t\taddUnexploredAdjacentTiles(board, currentTile, chainedTiles, tilesToExplore);\n\t\t}\n\t}",
"public static void getShortestPath()\r\n\t{\r\n\t\tScanner scan = new Scanner(System.in); //instance for input declared\r\n\t\tSystem.out.print(\"\\nPlease enter the Source node for shortest path: \");\r\n\t\tint src = scan.nextInt() - 1;\r\n\t\twhile(src < 0 || src > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered source node is out of range, please enter again: \"); // Printing error\r\n\t\t\tsrc = scan.nextInt() - 1;\t//re-input source\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.print(\"Please enter the destination node for shortest path: \");\r\n\t\tint dest = scan.nextInt() - 1;\r\n\t\twhile(dest < 0 || dest > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered destination node is out of range, please enter again: \"); // Printing error\r\n\t\t\tdest = scan.nextInt() - 1;\t//re-input destination\r\n\t\t}\r\n\t\t\r\n\t\tconnectNetwork(src, dest, true);\r\n\t}",
"public static List<MapTile> findPath(MovableObject mO, GameObject destination) {\n List<MapTile> openList = new LinkedList<>();\n List<MapTile> closedList = new LinkedList<>();\n List<MapTile> neighbours = new ArrayList<>();\n Point objectTileCoord = mO.getGridCoordinates();\n Point destinationTileCoord = destination.getGridCoordinates();\n MapTile currentTile;\n try {\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.print(\"Error while getting current tile for pathfinding. Trying to adapt coords.\");\n if (mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight()) {\n objectTileCoord.y -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight() && mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n objectTileCoord.y -= 1;\n }\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n }\n\n currentTile.setParentMapTile(null);\n currentTile.totalMovementCost = 0;\n openList.add(currentTile);\n\n boolean notDone = true;\n\n while (notDone) {\n neighbours.clear();\n currentTile = getLowestCostTileFromOpenList(openList, currentTile);\n closedList.add(currentTile);\n openList.remove(currentTile);\n\n //ReachedGoal?\n if ((currentTile.xTileCoord == destinationTileCoord.x) && (currentTile.yTileCoord == destinationTileCoord.y)) {\n try {\n return getResultListOfMapTiles(currentTile);\n } catch (Exception e) {\n System.out.println(\"closed list size: \" + closedList.size());\n throw e;\n }\n }\n\n neighbours.addAll(currentTile.getNeighbourTiles());\n neighbours.removeAll(closedList);\n\n for (MapTile mapTile : neighbours) {\n if (openList.contains(mapTile)) {\n // compare total movement costs.\n if (mapTile.totalMovementCost > currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost) {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost;\n }\n } else {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.totalMovementCost + currentTile.getMovementCostToTile(mapTile);\n openList.add(mapTile);\n }\n }\n }\n return null;\n }",
"public float getCost(int weight, int volume) {\r\n\t\t//System.out.println(\"getCost method in Journey called. should have been a delivery.\");\r\n\t\ttimesUsed++;\r\n\t\tfloat total = 0;\r\n\t\tfor(Path p: usedPaths){\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttotal += p.calcCost(weight, volume);\r\n\t\t\t\t} catch (OverweightException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (ExceededVolumeException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t}\r\n\t\ttotalCost += total;\r\n\t\treturn total;\r\n\t}",
"int getPathCost(Coordinate end) {\n if (!graph.containsKey(end)) {\n // test use display point\n // System.err.printf(\"Graph doesn't contain end vertex \\\"%s\\\"\\n\", end);\n return Integer.MAX_VALUE;\n }\n int weight = Integer.MAX_VALUE;\n for (Coordinate key : graph.keySet()) {\n if (key.equals(end)) {\n weight = graph.get(key).dist;\n }\n }\n return weight;\n }",
"public OtherAgent nearestAgent(RedAgent agent, Function<OtherAgent, Boolean> test)\n\t{\n\t\t// get a list of OtherAgents satisfying the test\n\t\tList<OtherAgent> ags = new ArrayList<OtherAgent>();\n\t\tfor (OtherAgent ag : agent.agents.values())\n\t\t{\n\t\t\tif (ag.position != null && test.apply(ag))\n\t\t\t{\n\t\t\t\tags.add(ag);\n\t\t\t}\n\t\t}\n\n\t\tif (ags.isEmpty()) return null;\n\n\t\t// get the shortest path to one of those agents\n\t\tLinkedList<String> path = shortestPath(agent.position, (id) -> {\n\t\t\tfor (OtherAgent ag : ags) if (ag.position.equals(id)) return true;\n\t\t\treturn false;\n\t\t});\n\n\t\tif (path == null) return null;\n\n\t\t// (arbitrarily) pick one agent that that path leads to\n\t\tfor (OtherAgent ag : ags)\n\t\t{\n\t\t\tif (path.isEmpty())\n\t\t\t{\n\t\t\t\tif (ag.position.equals(agent.position)) return ag;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (ag.position.equals(path.get(path.size() - 1))) return ag;\n\t\t\t}\n\t\t}\n\n\t\t// XXX shouldn't get here\n\t\tthrow new RuntimeException(\"failed to find nearest agent\");\n\t}",
"public LinkedList<Node> shortestPath() throws PathNotFoundException {\n // Which strategy shall we use?\n ApplicationConfiguration config = ApplicationConfiguration.getInstance();\n switch(config.getCurrentSearchAlgorithm()) {\n case A_STAR:\n return aStarPath();\n case BFS:\n return bfsPath();\n case DFS:\n return dfsPath();\n default:\n return null;\n }\n }",
"private List<StopEdge> getPossibleDestinations(Stop stop, long timeAtStop, Route route, String tripId, LocalDate departureDate, long departureTime, List<StopTime> stopTimesOfTrip, Set<Stop> found, Map<String, Long> bestArrivalTime) {\n List<StopEdge> edges = new TiraArrayList<>();\n\n long departureTimeMillis = calculateTime(departureDate, departureTime);\n //If the public transport service departs from the stop before current time, that service cannot be used for the route -> return empty list\n if (departureTimeMillis < timeAtStop) {\n return Collections.emptyList();\n }\n\n for (StopTime stopTime : stopTimesOfTrip) {\n Stop destinationStop = stops.get(stopTime.getStopId());\n if (destinationStop == null) {\n //This should happen only if the GTFS feed is malformed\n return Collections.emptyList();\n }\n\n //Don't add new edge if a better route to the destination was already found\n long arrivalTimeMillis = calculateTime(departureDate, stopTime.getArrivalTime());\n if (arrivalTimeMillis > bestArrivalTime.getOrDefault(destinationStop.getId(), Long.MAX_VALUE)) {\n continue;\n }\n\n if (arrivalTimeMillis > departureTimeMillis) {\n //If the trip would pass through any of already found stops, return empty list as it would be slower to reach the final destination using this route than the route that was used for reaching the previously found route\n if (found.contains(destinationStop)) {\n return Collections.emptyList();\n }\n\n bestArrivalTime.put(destinationStop.getId(), arrivalTimeMillis);\n edges.add(new StopEdge(route.getName(), tripId, route.getMode(), stop, destinationStop, arrivalTimeMillis, departureTimeMillis));\n }\n }\n\n return edges;\n }",
"private ProblemModel findCheapestNode(){\n\t\tProblemModel ret = unvisitedPM.peek();\n\t\t\n\t\tfor(ProblemModel p : unvisitedPM){ \n\t\t\t//f(s) = depth + cost to make this move\n\t\t\tif(p.getCost() + p.getDepth() <= ret.getCost() + ret.getDepth()) ret = p;\n\t\t}\n\t\tunvisitedPM.remove(ret);\n\t\treturn ret;\n\t}",
"io.opencannabis.schema.commerce.OrderDelivery.DeliveryDestinationOrBuilder getDestinationOrBuilder();",
"public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public MapLocation findNearestArchon() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestAction = null;\n float nearestDistance = 9999f;\n\n for (int i = 0; i < enemyArchonCount; ++i) {\n ArchonLocation loc = archonLocations[i];\n if (loc.isDead()) continue;\n float distance = loc.location.distanceSquaredTo(origin);\n if (nearestAction == null || distance < nearestDistance) {\n nearestAction = loc.location;\n nearestDistance = distance;\n }\n }\n\n return nearestAction;\n }",
"public List<String> computeBestPath(String source, String dest)\r\n {\r\n Vertex v;\r\n List<String>shortestPath = new LinkedList<String>();\r\n \r\n // First, relax all nodes\r\n computeAllPaths(source);\r\n \r\n // Then go through each one and return the path as a list of strings\r\n for (v= network_topology.get(dest); v != null; v = v.previous)\r\n { \r\n shortestPath.add(v.name);\r\n }\r\n \r\n Collections.reverse(shortestPath);\r\n \r\n // Clear the relaxed values so that they can be recalculated with each term\r\n clearPathData();\r\n \r\n return shortestPath;\r\n }",
"@Override\n public List<Node> findShortestPath(Node s, Node t)\n {\n nodeDists.clear(); //clear previously calculated distances\n\n recordNodeDistances(s, t); //record node distances to target\n\n LinkedList<Node> shortestPath = new LinkedList<Node>();\n\n shortestPath.addLast(s);\n\n boolean reachedEnd = false;\n\n if(s==t) reachedEnd = true; // \"That was easy\"\n\n while(!reachedEnd)\n {\n //get the neighbors from the most recent step on the path\n Collection<? extends Node> neighbors = shortestPath.getLast().getNeighbors();\n\n //minimum cost from neighbors\n Node minNode = null;\n\n for(Node n: neighbors)\n {\n if(minNode == null || nodeDists.get(n) < nodeDists.get(minNode))\n {\n minNode = n;\n\n if(nodeDists.get(n) == 0)\n {\n reachedEnd = true;\n break;\n }\n }\n }\n\n if(nodeDists.get(minNode) == Integer.MAX_VALUE) return null; //no path\n else shortestPath.addLast(minNode);\n }\n\n return shortestPath;\n }",
"public int findShortestDistance(String s, String t) {\r\n //store the vertex and distance closest to each vertex\r\n Map<String, Vertex> finalMap = new HashMap<>(this.number_of_vertices);\r\n for (String vertex : all_vertices) {\r\n finalMap.put(vertex, new Vertex(s, Integer.MAX_VALUE));\r\n }\r\n finalMap.put(s, null);\r\n Queue<Vertex> pq = new PriorityQueue<>(new Comparator() {\r\n @Override\r\n public int compare(Object o1, Object o2) {\r\n Vertex v1 = (Vertex) o1;\r\n Vertex v2 = (Vertex) o2;\r\n return v1.dist - v2.dist;\r\n }\r\n });\r\n pq.add(new Vertex(s, 0));\r\n Set<String> visited = new HashSet<>(this.number_of_vertices);\r\n while (!pq.isEmpty()) {\r\n Vertex minVertex = pq.poll();\r\n if (!visited.add(minVertex.v)) {\r\n continue;\r\n }\r\n Map<String, Integer> edgeMap = adj.get(minVertex.v);\r\n for (Map.Entry<String, Integer> entry : edgeMap.entrySet()) {\r\n int distance = minVertex.dist + entry.getValue();\r\n if (finalMap.get(entry.getKey()) != null && distance < finalMap.get(entry.getKey()).dist) {\r\n finalMap.get(entry.getKey()).dist = distance;\r\n finalMap.get(entry.getKey()).v = minVertex.v;\r\n }\r\n pq.add(new Vertex(entry.getKey(), distance));\r\n }\r\n }\r\n if (!s.equals(t)){\r\n return finalMap.get(t).dist;\r\n }else{\r\n return calculateDistance(s, finalMap);\r\n }\r\n }",
"Route getRouteById(Long id_route) throws RouteNotFoundException;",
"public Neighbour findNextJump(String destinationIp) {\n if (!isFinalDestination(destinationIp)) {\n Iterator it = routes.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<Neighbour, Neighbour> pair = (Map.Entry)it.next();\n if (destinationIp.equals(pair.getKey().getAddress())) {\n return pair.getValue();\n }\n it.remove(); // Avoids a ConcurrentModificationException\n }\n }\n return null;\n }",
"Execution getClosestDistance();"
] | [
"0.65123445",
"0.5974655",
"0.5950671",
"0.5949859",
"0.5902413",
"0.5862949",
"0.5854429",
"0.5824804",
"0.57832",
"0.5707139",
"0.56990844",
"0.5691897",
"0.5685846",
"0.5680795",
"0.5653758",
"0.56007004",
"0.5593702",
"0.5571355",
"0.5564712",
"0.55539244",
"0.5551675",
"0.5531294",
"0.5526118",
"0.5502339",
"0.54771173",
"0.54677314",
"0.54486185",
"0.54049486",
"0.5403365",
"0.539775",
"0.5383129",
"0.53690505",
"0.5344653",
"0.53431386",
"0.53430724",
"0.5342965",
"0.53384876",
"0.53373474",
"0.53339875",
"0.53133225",
"0.52722317",
"0.52635753",
"0.5255679",
"0.5254887",
"0.5253477",
"0.5225934",
"0.5222106",
"0.52213067",
"0.51746047",
"0.51663536",
"0.51540685",
"0.51522815",
"0.5148429",
"0.5142631",
"0.5133032",
"0.5120339",
"0.51087207",
"0.5068565",
"0.5038292",
"0.5037323",
"0.5031034",
"0.50280285",
"0.50222754",
"0.5013742",
"0.50131947",
"0.5010574",
"0.50035906",
"0.4992084",
"0.4991832",
"0.49814212",
"0.49718055",
"0.49589446",
"0.49581543",
"0.4957551",
"0.49566972",
"0.4956448",
"0.49531287",
"0.4943052",
"0.4941883",
"0.49400347",
"0.49386206",
"0.49341637",
"0.4932318",
"0.4916228",
"0.49145624",
"0.4912417",
"0.490534",
"0.4898408",
"0.48927316",
"0.4891554",
"0.4886152",
"0.4882029",
"0.48814493",
"0.4876356",
"0.48752162",
"0.48647222",
"0.48625612",
"0.4856592",
"0.48363027",
"0.48339653"
] | 0.67945826 | 0 |
Computes the invoice amount for a given order. Please use the fixed price 0.01$/km to compute the shipping cost | public double invoiceAmount(int orderID, int sessionID) {
double amount = 0;
for (int i=0;i<sessions.size();i++) {
Session s = sessions.get(i);
if (s.getID() == sessionID && s.getUser() instanceof Shopper) {
Shopper sh = (Shopper)(s.getUser());
Invoice inv = fm.getInvoice(orderID);
if (inv != null && inv.shopperID == sh.cust.custID) {
amount = inv.delCharge;
for (int proID : inv.items.keySet()) {
Product p = fm.getProduct(proID);
if (p != null) {
amount += p.price * inv.items.get(proID);
}
}
}
}
}
return amount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BigDecimal calculateTotalPrice(Order order);",
"public double getInvoiceAmount(){\n\t\t// declare a local variable of type double to store the invoice's total price\n\t\tdouble totalPrice;\n\t\t// the total price is given my multiplying the price per unit with the quantity\n\t\ttotalPrice = price * quantity;\t\t\n\t\t// return the value stored in the local variable totalPrice\n\t\treturn totalPrice;\n\t}",
"public double calculatePrice(Order order){\r\n return order.quantity * order.itemPrice -\r\n Math.max(0, order.quantity - 500) * order.itemPrice * 0.05 +\r\n Math.min(order.quantity * order.itemPrice * 0.1, 100);\r\n }",
"TotalInvoiceAmountType getTotalInvoiceAmount();",
"private double calculateTotalPrice(Order order) {\n int nights = (int)(order.getVaucher().getDateTo().getTime() - order.getVaucher().getDateFrom().getTime())/(24 * 60 * 60 * 1000);\n double totalPrice = (nights * order.getVaucher().getHotel().getPricePerDay() + order.getVaucher().getTour().getPrice()) * (100 - order.getUser().getDiscount())/100;\n return totalPrice;\n }",
"@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }",
"public float calcOrderTotal()\r\n\t{\r\n\t\tOrderItem temp;\r\n\t\tfloat total = 0;\r\n\t\t\r\n\t\t//iterate through list and get quantity and unit price of each item\r\n\t\t//then multiply together and add to running total\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++)\r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttotal = total + (temp.getProductQuant() * temp.getProductPrice());\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}",
"public double calculate(Map<String, Order> orders) {\n\n\t\t// This is the fix to avoid null pointer exception if Cart has null\n\t\t// orders\n\t\tif (orders == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Orders are invalid. Input is null\");\n\t\t}\n\t\t// GrandTotal is initialized outside the loop to have the grand total\n\t\tdouble grandTotal = 0;\n\n\t\t// Iterate through the orders\n\t\tfor (Map.Entry<String, Order> entry : orders.entrySet()) {\n\t\t\tSystem.out.println(\"*******\" + entry.getKey() + \"*******\");\n\t\t\tOrder order = entry.getValue();\n\t\t\tdouble totalTax = 0;\n\t\t\tdouble total = 0;\n\n\t\t\t// Iterate through the items in the order\n\t\t\t/*\n\t\t\t * In lists indexes starts with 0 and ends with its size-1. We\n\t\t\t * should not include indexes which are not exist,it will leads to\n\t\t\t * ArrayIndexOutofBoundException. Hence logical operator = is\n\t\t\t * removed\n\t\t\t */\n\t\t\tfor (int i = 0; i < order.size(); i++) {\n\n\t\t\t\t// Calculate the taxes\n\t\t\t\tdouble tax = 0;\n\n\t\t\t\tItem item = order.get(i).getItem();\n\n\t\t\t\ttax = calculateTax(item);\n\n\t\t\t\t// Calculate the total price\n\t\t\t\tdouble totalPrice = item.getPrice() + tax;\n\n\t\t\t\t// Print out the item's total price\n\t\t\t\t// Wrong way of rounding off here it is fixed with the help of\n\t\t\t\t// BigDecimal\n\t\t\t\tSystem.out.println(item.getDescription() + \": \"\n\t\t\t\t\t\t+ roundToTwoDecimal(totalPrice));\n\n\t\t\t\t// Keep a running total\n\t\t\t\ttotalTax += tax;\n\t\t\t\ttotal += item.getPrice();\n\t\t\t}\n\n\t\t\t// Print out the total taxes\n\t\t\t// Wrong way of rounding off here it is fixed with the help of\n\t\t\t// BigDecimal\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Sales Tax: \" + roundToTwoDecimal(totalTax) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Math.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * floor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * totalTax\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */);\n\n\t\t\t// Fix to Total. Total should not include Tax\n\t\t\t// total = total + totalTax;\n\n\t\t\t// Print out the total amount\n\t\t\t// Wrong way of rounding off here it is fixed with the help of\n\t\t\t// BigDecimal\n\t\t\tSystem.out.println(\"Total: \" + roundToTwoDecimal(total) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Math.floor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * (total *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * 100) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * 100\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */);\n\t\t\tgrandTotal += total;\n\t\t}\n\n\t\t// grandtotal = Math.floor(grandtotal * 100) / 100;\n\t\t// Bug Fix: 10 (Wrong way of rounding. To meet the requirements, we\n\t\t// should be using BigDecimal.)\n\t\tSystem.out.println(\"Sum of orders: \" + roundToTwoDecimal(grandTotal));\n\n\t\treturn grandTotal;\n\t}",
"@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }",
"public double getTotalCostOfOrder() {\n double total = 0;\n for (AbstractProduct item :\n this.itemsReceived) {\n total += item.getPrice();\n }\n return total;\n }",
"private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }",
"double calculateDeliveryCost(Cart cart);",
"private MMDecimal getCustomerReturnItemPrice(OrderDetail odetail) {\r\n MMDecimal result = MMDecimal.ZERO;\r\n MMDecimal itemCostAmt = odetail.getOrderItemPriceAmt() == null ? MMDecimal.ZERO : odetail\r\n .getOrderItemPriceAmt();\r\n \r\n MMDecimal itemTaxAmt = odetail.getOrderItemTaxAmt() == null ? MMDecimal.ZERO : odetail\r\n .getOrderItemTaxAmt();\r\n result = itemCostAmt.add(itemTaxAmt);\r\n return result;\r\n }",
"public BigDecimal calculateTotal() {\r\n BigDecimal orderTotal = BigDecimal.ZERO;\r\n \r\n final Iterator<Item> iterator = myShoppingCart.keySet().iterator();\r\n \r\n while (iterator.hasNext()) {\r\n final BigDecimal currentOrderPrice = myShoppingCart.get(iterator.next());\r\n \r\n orderTotal = orderTotal.add(currentOrderPrice);\r\n }\r\n \r\n //if membership take %10 off the total cost\r\n if (myMembership) {\r\n if (orderTotal.compareTo(new BigDecimal(\"25.00\")) == 1) { //myOrderTotal > $25\r\n final BigDecimal discount = DISCOUNT_RATE.multiply(orderTotal); \r\n orderTotal = orderTotal.subtract(discount);\r\n }\r\n }\r\n \r\n return orderTotal.setScale(2, RoundingMode.HALF_EVEN);\r\n }",
"public BigDecimal\tgetOrderFee();",
"public double calculateOrderTotalWithDiscountsAndShipping(String[] order, boolean isMember){\n\t\t//TODO\n\t\t\n\t\tint a=discountByItemPrice(order,isMember);\n\t\tint b=discountByItemCount(order,isMember);\n\t\tdouble price=getOrderTotalWithoutDiscount(order);\n\t\t\n\t\tint discount= a>b ? a:b;\n\t\t\n\t\tif(isShippingFree(order,isMember)) {\n\t\t\t\n\t\t\tprice=price-(price*discount/100);\n\t\t}else {\n\t\t\tprice=price-(price*discount/100)+SHIPPING_CHARGE;\n\t\t}return price;\n\t\t\n\t}",
"public java.math.BigDecimal getInvoiceAmount () {\n\t\treturn invoiceAmount;\n\t}",
"private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }",
"public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}",
"public BigDecimal countTotalOrderPriceDiscount(Order order) {\n\n return order.getTotalOrderPrice().multiply(\n new BigDecimal(order.getOrder_discount())).divide(new BigDecimal(100));\n }",
"public int purchase (CustomerOrder customerOrder){\n int price = 0;\n for (OrderedAmountPreProduct orderedAmountPreProduct : customerOrder.getOrderedAmountPreProducts()) {\n price += orderedAmountPreProduct.getProduct().getPrice() * orderedAmountPreProduct.getQte();\n }\n return price;\n\n\n }",
"public int calculateShippingFee(Order order) {\n\t\tRandom rand = new Random();\n\t\tint fees = (int) (((rand.nextFloat() * 10) / 100) * order.getAmount());\n\t\tLOGGER.info(\"Order Amount: \" + order.getAmount() + \" -- Shipping Fees: \" + fees);\n\t\treturn fees;\n\t}",
"public BigDecimal getTotalPrice() {\n\t\t// the current total cost which the customer owes in the transaction\n\t\tBigDecimal total = new BigDecimal(0);\n\n\t\tArrayList<Item> currentPurchases = purchaseList.getCurrentPurchases(); \n\n\t\tfor (Item item : currentPurchases) {\n\t\t\ttotal = total.add(this.getItemPrice(item));\n\t\t}\n\n\t\treturn total;\n\t}",
"@Override\n\tpublic Double getAmount(OrderDetails orderDetails) throws NotEnoguhQuantityException, CartNotEditable {\n\t\treturn orderDetails.getCart().getCartTotal();\n\t}",
"public BigDecimal countTotalOrderPrice(Order order) {\n BigDecimal totalSum = new BigDecimal(0);\n\n\n // iterate through all products and count total price of them -\n // TODO: can be speeded up by adding the order_total_price parameter to the order object/table\n if (order != null && order.getOrderProducts().size() > 0) {\n Set<Product> orderProducts = order.getOrderProducts();\n for (Product product : orderProducts) {\n totalSum = totalSum.add(product.getProduct_price());\n }\n\n }\n return totalSum;\n }",
"public double getOrderTotalWithoutDiscount(String[] order) {\n\t\t//TODO\n\t\t\n\t\tdouble all=0.0;\n\t\tfor(String item:order) {\n\t\t\t\n\t\t\tall+=findItemPrice(item);\n\t\t}return all;\n\t\t\t\n\t\t\t\n\t\t}",
"public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }",
"public void calculateCost(Order currentOrder) {\n\n BigDecimal area = currentOrder.getArea();\n BigDecimal materialCost = (area.multiply(currentOrder.getProduct().getCostPerSqFt())).setScale(2);\n BigDecimal laborCost = (area.multiply(currentOrder.getProduct().getLaborCostPerSqFt()));\n BigDecimal tax = laborCost.add(materialCost).multiply(currentOrder.getState().getTaxRate().movePointLeft(2));\n BigDecimal total = materialCost.add(laborCost).add(tax);\n\n //using half_up for rounding to get the (nearest neighbor)\n //Setting each price to the object\n currentOrder.setMaterialCost(materialCost.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setLaborCost(laborCost.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setTax(tax.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setTotal(total.setScale(2, RoundingMode.HALF_UP));\n }",
"public float getItemPriceInvoice()\n\t{\n\t\treturn itemPriceInvoice;\n\t}",
"public double calculatingCostO(int quantity)\n { \n cost = 750 + (0.25 * quantity);\n return cost;\n \n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();",
"public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }",
"public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }",
"public BigDecimal getLineNetAmt();",
"public float calculateTotalPrice(ArrayList<Food> totalOrder) {\n totalPrice = 0.0f;\n for (Food itemOfFood : totalOrder) {\n totalPrice = totalPrice + itemOfFood.getPrice();\n }\n return totalPrice;\n }",
"public BigDecimal getOrderPrice() {\n return orderPrice;\n }",
"public double calculateCost(Purchase purchase);",
"public BigDecimal getOrderTotal()\r\n\t{\r\n\t\tSystem.out.println(\"Order Total is: \" + subtotal);\r\n\t\treturn subtotal;\r\n\t}",
"private BigDecimal calculateTotalAmount(Product product, int quantity) throws ScriptException {\n return eval(Expressions.EXPRESSION_TOTAL, product, quantity);\n }",
"private String getBillPrice() {\n double cost = 0.00;\n\n for (MenuItem item : bill.getItems()) {\n cost += (item.getPrice() * item.getQuantity());\n cost += item.getExtraIngredientPrice();\n cost -= item.getRemovedIngredientsPrice();\n }\n\n return String.format(\"%.2f\", cost);\n }",
"public BigDecimal getOrderMoney() {\n return orderMoney;\n }",
"BigDecimal getAmount();",
"public double calculateShipping() {\n shipAmount = (SHIPPINGCOST);\n\n return shipAmount;\n }",
"@SuppressWarnings(\"rawtypes\")\n public double calculateCouponOrderDiscountAdjustments(Order order) {\n double discountAdjustment = 0.0d;\n\n if (order != null) {\n List orderAdjustments = order.getPriceInfo().getAdjustments();\n if (orderAdjustments != null && orderAdjustments.size() > 0) {\n discountAdjustment = getDiscountedAmount(orderAdjustments);\n }\n }\n return discountAdjustment;\n }",
"private double calculateAmount(Instruction instruction) {\n return instruction.getPerunitPrice() * instruction.getUnits() * instruction.getFxRate();\n }",
"public BigDecimal getPayAmt();",
"private MMDecimal getVendorReturnItemPrice(OrderDetail odetail) {\r\n MMDecimal result = MMDecimal.ZERO;\r\n result = odetail.getOrderItemCostAmt() == null ? MMDecimal.ZERO : odetail\r\n .getOrderItemCostAmt();\r\n return result;\r\n }",
"public double calTotalAmount(){\n\t\tdouble result=0;\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tresult += this.cd.get(i).getPrice();\n\t\t}\n\t\treturn result;\n\t}",
"Optional<BigDecimal> getDiscountedTotalPrice(List<Item> items) throws CheckoutProcessingException;",
"@Override\n public double calcSalesFee() {\n return getCost() + getSalesPurchase();\n }",
"@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }",
"public BigDecimal calculatePOSubTotal(MaintenanceRequest po){\n\t\tBigDecimal subTotal = new BigDecimal(0.00).setScale(2);\n\t\tString defaultMarkUpCode = willowConfigService.getConfigValue(\"MAINT_NON_NETWORK_CODE\");\n\t\tfor(MaintenanceRequestTask line : po.getMaintenanceRequestTasks()){\n\t\t\t/** Excluding non-network mark up maintenance code 999-002 **/\n\t\t\tif(MALUtilities.isEmpty(defaultMarkUpCode) || !line.getMaintenanceCode().getCode().equals(defaultMarkUpCode)){\n\t\t\t\tsubTotal = subTotal.add(line.getTotalCost().setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn subTotal;\n\t}",
"public double calcDollarAmount(double euroAmount, double exchangeRate) {\n return Math.ceil(euroAmount * exchangeRate * 100) / 100;\n\n }",
"float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}",
"public void amount() {\n \t\tfloat boxOHamt=boxOH*.65f*48f;\n \t\tSystem.out.printf(boxOH+\" boxes of Oh Henry ($0.65 x 48)= $%4.2f \\n\",boxOHamt);\n \t\tfloat boxCCamt=boxCC*.80f*48f;\n \t\tSystem.out.printf(boxCC+\" boxes of Coffee Crisp ($0.80 x 48)= $%4.2f \\n\", boxCCamt);\n \t\tfloat boxAEamt=boxAE*.60f*48f;\n \t\tSystem.out.printf(boxAE+\" boxes of Aero ($0.60 x 48)= $%4.2f \\n\", boxAEamt);\n \t\tfloat boxSMamt=boxSM*.70f*48f;\n \t\tSystem.out.printf(boxSM+\" boxes of Smarties ($0.70 x 48)= $%4.2f \\n\", boxSMamt);\n \t\tfloat boxCRamt=boxCR*.75f*48f;\n \t\tSystem.out.printf(boxCR+\" boxes of Crunchies ($0.75 x 48)= $%4.2f \\n\",boxCRamt);\n \t\tSystem.out.println(\"----------------------------------------------\");\n \t\t//display the total prices\n \t\tsubtotal=boxOHamt+boxCCamt+boxAEamt+boxSMamt+boxCRamt;\n \t\tSystem.out.printf(\"Sub Total = $%4.2f \\n\", subtotal);\n \t\ttax=subtotal*.07f;\n \t\tSystem.out.printf(\"Tax = $%4.2f \\n\", tax);\n \t\tSystem.out.println(\"==============================================\");\n \t\ttotal=subtotal+tax;\n \t\tSystem.out.printf(\"Amount Due = $%4.2f \\n\", total);\n \t}",
"public static Map<String, Object> createInvoiceForOrder(DispatchContext dctx, Map<String, Object> context) {\n Delegator delegator = dctx.getDelegator();\n LocalDispatcher dispatcher = dctx.getDispatcher();\n GenericValue userLogin = (GenericValue) context.get(\"userLogin\");\n Locale locale = (Locale) context.get(\"locale\");\n if (DECIMALS == -1 || ROUNDING == null) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingAritmeticPropertiesNotConfigured\", locale));\n }\n\n String orderId = (String) context.get(\"orderId\");\n List<GenericValue> billItems = UtilGenerics.cast(context.get(\"billItems\"));\n String invoiceId = (String) context.get(\"invoiceId\");\n\n if (UtilValidate.isEmpty(billItems)) {\n if (Debug.verboseOn()) {\n Debug.logVerbose(\"No order items to invoice; not creating invoice; returning success\", MODULE);\n }\n return ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE,\n \"AccountingNoOrderItemsToInvoice\", locale));\n }\n\n try {\n GenericValue orderHeader = EntityQuery.use(delegator).from(\"OrderHeader\").where(\"orderId\", orderId).queryOne();\n if (orderHeader == null) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingNoOrderHeader\", locale));\n }\n\n // figure out the invoice type\n String invoiceType = null;\n\n String orderType = orderHeader.getString(\"orderTypeId\");\n if (\"SALES_ORDER\".equals(orderType)) {\n invoiceType = \"SALES_INVOICE\";\n } else if (\"PURCHASE_ORDER\".equals(orderType)) {\n invoiceType = \"PURCHASE_INVOICE\";\n }\n\n // Set the precision depending on the type of invoice\n int invoiceTypeDecimals = UtilNumber.getBigDecimalScale(\"invoice.\" + invoiceType + \".decimals\");\n if (invoiceTypeDecimals == -1) {\n invoiceTypeDecimals = DECIMALS;\n }\n\n // Make an order read helper from the order\n OrderReadHelper orh = new OrderReadHelper(orderHeader);\n\n // get the product store\n GenericValue productStore = orh.getProductStore();\n\n // get the shipping adjustment mode (Y = Pro-Rate; N = First-Invoice)\n String prorateShipping = productStore != null ? productStore.getString(\"prorateShipping\") : \"Y\";\n if (prorateShipping == null) {\n prorateShipping = \"Y\";\n }\n\n // get the billing parties\n String billToCustomerPartyId = orh.getBillToParty().getString(\"partyId\");\n String billFromVendorPartyId = orh.getBillFromParty().getString(\"partyId\");\n\n // get some price totals\n BigDecimal shippableAmount = orh.getShippableTotal(null);\n BigDecimal shippableQuantity = orh.getShippableQuantity(null);\n BigDecimal orderSubTotal = orh.getOrderItemsSubTotal();\n BigDecimal orderQuantity = orh.getTotalOrderItemsQuantity();\n\n // these variables are for pro-rating order amounts across invoices, so they should not be rounded off for maximum accuracy\n BigDecimal invoiceShipProRateAmount = BigDecimal.ZERO;\n BigDecimal invoiceShippableQuantity = BigDecimal.ZERO;\n BigDecimal invoiceSubTotal = BigDecimal.ZERO;\n BigDecimal invoiceQuantity = BigDecimal.ZERO;\n\n GenericValue billingAccount = orderHeader.getRelatedOne(\"BillingAccount\", false);\n String billingAccountId = billingAccount != null ? billingAccount.getString(\"billingAccountId\") : null;\n\n Timestamp invoiceDate = (Timestamp) context.get(\"eventDate\");\n if (UtilValidate.isEmpty(invoiceDate)) {\n // TODO: ideally this should be the same time as when a shipment is sent and be passed in as a parameter\n invoiceDate = UtilDateTime.nowTimestamp();\n }\n // TODO: perhaps consider billing account net days term as well?\n Long orderTermNetDays = orh.getOrderTermNetDays();\n Timestamp dueDate = null;\n if (orderTermNetDays != null) {\n dueDate = UtilDateTime.getDayEnd(invoiceDate, orderTermNetDays);\n }\n\n // create the invoice record\n if (UtilValidate.isEmpty(invoiceId)) {\n Map<String, Object> createInvoiceContext = new HashMap<>();\n createInvoiceContext.put(\"partyId\", billToCustomerPartyId);\n createInvoiceContext.put(\"partyIdFrom\", billFromVendorPartyId);\n createInvoiceContext.put(\"billingAccountId\", billingAccountId);\n createInvoiceContext.put(\"invoiceDate\", invoiceDate);\n createInvoiceContext.put(\"dueDate\", dueDate);\n createInvoiceContext.put(\"invoiceTypeId\", invoiceType);\n // start with INVOICE_IN_PROCESS, in the INVOICE_READY we can't change the invoice (or shouldn't be able to...)\n createInvoiceContext.put(\"statusId\", \"INVOICE_IN_PROCESS\");\n createInvoiceContext.put(\"currencyUomId\", orderHeader.getString(\"currencyUom\"));\n createInvoiceContext.put(\"userLogin\", userLogin);\n\n // store the invoice first\n Map<String, Object> createInvoiceResult = dispatcher.runSync(\"createInvoice\", createInvoiceContext);\n if (ServiceUtil.isError(createInvoiceResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, createInvoiceResult);\n }\n\n // call service, not direct entity op: delegator.create(invoice);\n invoiceId = (String) createInvoiceResult.get(\"invoiceId\");\n }\n\n // order roles to invoice roles\n List<GenericValue> orderRoles = orderHeader.getRelated(\"OrderRole\", null, null, false);\n Map<String, Object> createInvoiceRoleContext = new HashMap<>();\n createInvoiceRoleContext.put(\"invoiceId\", invoiceId);\n createInvoiceRoleContext.put(\"userLogin\", userLogin);\n for (GenericValue orderRole : orderRoles) {\n createInvoiceRoleContext.put(\"partyId\", orderRole.getString(\"partyId\"));\n createInvoiceRoleContext.put(\"roleTypeId\", orderRole.getString(\"roleTypeId\"));\n Map<String, Object> createInvoiceRoleResult = dispatcher.runSync(\"createInvoiceRole\", createInvoiceRoleContext);\n if (ServiceUtil.isError(createInvoiceRoleResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, createInvoiceRoleResult);\n }\n }\n\n // order terms to invoice terms.\n // TODO: it might be nice to filter OrderTerms to only copy over financial terms.\n List<GenericValue> orderTerms = orh.getOrderTerms();\n createInvoiceTerms(delegator, dispatcher, invoiceId, orderTerms, userLogin, locale);\n\n // billing accounts\n // List billingAccountTerms = null;\n // for billing accounts we will use related information\n if (billingAccount != null) {\n /*\n * jacopoc: billing account terms were already copied as order terms\n * when the order was created.\n // get the billing account terms\n billingAccountTerms = billingAccount.getRelated(\"BillingAccountTerm\", null, null, false);\n\n // set the invoice terms as defined for the billing account\n createInvoiceTerms(delegator, dispatcher, invoiceId, billingAccountTerms, userLogin, locale);\n */\n // set the invoice bill_to_customer from the billing account\n List<GenericValue> billToRoles = billingAccount.getRelated(\"BillingAccountRole\", UtilMisc.toMap(\"roleTypeId\", \"BILL_TO_CUSTOMER\"),\n null, false);\n for (GenericValue billToRole : billToRoles) {\n if (!(billToRole.getString(\"partyId\").equals(billToCustomerPartyId))) {\n createInvoiceRoleContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"partyId\", billToRole.get(\"partyId\"),\n \"roleTypeId\", \"BILL_TO_CUSTOMER\", \"userLogin\", userLogin);\n Map<String, Object> createInvoiceRoleResult = dispatcher.runSync(\"createInvoiceRole\", createInvoiceRoleContext);\n if (ServiceUtil.isError(createInvoiceRoleResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceRoleFromOrder\", locale), null, null, createInvoiceRoleResult);\n }\n }\n }\n\n // set the bill-to contact mech as the contact mech of the billing account\n if (UtilValidate.isNotEmpty(billingAccount.getString(\"contactMechId\"))) {\n Map<String, Object> createBillToContactMechContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"contactMechId\",\n billingAccount.getString(\"contactMechId\"),\n \"contactMechPurposeTypeId\", \"BILLING_LOCATION\", \"userLogin\", userLogin);\n Map<String, Object> createBillToContactMechResult = dispatcher.runSync(\"createInvoiceContactMech\",\n createBillToContactMechContext);\n if (ServiceUtil.isError(createBillToContactMechResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceContactMechFromOrder\", locale), null, null, createBillToContactMechResult);\n }\n }\n } else {\n List<GenericValue> billingLocations = orh.getBillingLocations();\n if (UtilValidate.isNotEmpty(billingLocations)) {\n for (GenericValue ocm : billingLocations) {\n Map<String, Object> createBillToContactMechContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"contactMechId\", ocm.getString(\n \"contactMechId\"),\n \"contactMechPurposeTypeId\", \"BILLING_LOCATION\", \"userLogin\", userLogin);\n Map<String, Object> createBillToContactMechResult = dispatcher.runSync(\"createInvoiceContactMech\",\n createBillToContactMechContext);\n if (ServiceUtil.isError(createBillToContactMechResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceContactMechFromOrder\", locale), null, null, createBillToContactMechResult);\n }\n }\n } else {\n Debug.logWarning(\"No billing locations found for order [\" + orderId + \"] and none were created for Invoice [\" + invoiceId\n + \"]\", MODULE);\n }\n }\n\n // get a list of the payment method types\n //DEJ20050705 doesn't appear to be used: List paymentPreferences = orderHeader.getRelated(\"OrderPaymentPreference\", null, null, false);\n\n // create the bill-from (or pay-to) contact mech as the primary PAYMENT_LOCATION of the party from the store\n GenericValue payToAddress = null;\n if (\"PURCHASE_INVOICE\".equals(invoiceType)) {\n // for purchase orders, the pay to address is the BILLING_LOCATION of the vendor\n GenericValue billFromVendor = orh.getPartyFromRole(\"BILL_FROM_VENDOR\");\n if (billFromVendor != null) {\n List<GenericValue> billingContactMechs = billFromVendor.getRelatedOne(\"Party\", false).getRelated(\"PartyContactMechPurpose\",\n UtilMisc.toMap(\"contactMechPurposeTypeId\", \"BILLING_LOCATION\"), null, false);\n if (UtilValidate.isNotEmpty(billingContactMechs)) {\n payToAddress = EntityUtil.getFirst(EntityUtil.filterByDate(billingContactMechs));\n }\n }\n } else {\n // for sales orders, it is the payment address on file for the store\n payToAddress = PaymentWorker.getPaymentAddress(delegator, productStore.getString(\"payToPartyId\"));\n }\n if (payToAddress != null) {\n Map<String, Object> createPayToContactMechContext = UtilMisc.toMap(\"invoiceId\", invoiceId, \"contactMechId\", payToAddress.getString(\n \"contactMechId\"),\n \"contactMechPurposeTypeId\", \"PAYMENT_LOCATION\", \"userLogin\", userLogin);\n Map<String, Object> createPayToContactMechResult = dispatcher.runSync(\"createInvoiceContactMech\", createPayToContactMechContext);\n if (ServiceUtil.isError(createPayToContactMechResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceContactMechFromOrder\", locale), null, null, createPayToContactMechResult);\n }\n }\n\n // sequence for items - all OrderItems or InventoryReservations + all Adjustments\n int invoiceItemSeqNum = 1;\n String invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n\n // create the item records\n for (GenericValue currentValue : billItems) {\n GenericValue itemIssuance = null;\n GenericValue orderItem = null;\n GenericValue shipmentReceipt = null;\n if (\"ItemIssuance\".equals(currentValue.getEntityName())) {\n itemIssuance = currentValue;\n } else if (\"OrderItem\".equals(currentValue.getEntityName())) {\n orderItem = currentValue;\n } else if (\"ShipmentReceipt\".equals(currentValue.getEntityName())) {\n shipmentReceipt = currentValue;\n } else {\n Debug.logError(\"Unexpected entity \" + currentValue + \" of type \" + currentValue.getEntityName(), MODULE);\n }\n\n if (orderItem == null && itemIssuance != null) {\n orderItem = itemIssuance.getRelatedOne(\"OrderItem\", false);\n } else if ((orderItem == null) && (shipmentReceipt != null)) {\n orderItem = shipmentReceipt.getRelatedOne(\"OrderItem\", false);\n }\n\n if (orderItem == null) {\n Debug.logError(\"Cannot create invoice when orderItem, itemIssuance, and shipmentReceipt are all null\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingIllegalValuesPassedToCreateInvoiceService\", locale));\n }\n\n GenericValue product = null;\n if (orderItem.get(\"productId\") != null) {\n product = orderItem.getRelatedOne(\"Product\", false);\n }\n\n // get some quantities\n BigDecimal billingQuantity = null;\n if (itemIssuance != null) {\n billingQuantity = itemIssuance.getBigDecimal(\"quantity\");\n BigDecimal cancelQty = itemIssuance.getBigDecimal(\"cancelQuantity\");\n if (cancelQty == null) {\n cancelQty = BigDecimal.ZERO;\n }\n billingQuantity = billingQuantity.subtract(cancelQty).setScale(DECIMALS, ROUNDING);\n } else if (shipmentReceipt != null) {\n billingQuantity = shipmentReceipt.getBigDecimal(\"quantityAccepted\");\n } else {\n BigDecimal orderedQuantity = OrderReadHelper.getOrderItemQuantity(orderItem);\n BigDecimal invoicedQuantity = OrderReadHelper.getOrderItemInvoicedQuantity(orderItem);\n billingQuantity = orderedQuantity.subtract(invoicedQuantity);\n if (billingQuantity.compareTo(BigDecimal.ZERO) < 0) {\n billingQuantity = BigDecimal.ZERO;\n }\n }\n if (billingQuantity == null) {\n billingQuantity = BigDecimal.ZERO;\n }\n\n // check if shipping applies to this item. Shipping is calculated for sales invoices, not purchase invoices.\n boolean shippingApplies = false;\n if ((product != null) && (ProductWorker.shippingApplies(product)) && (\"SALES_INVOICE\".equals(invoiceType))) {\n shippingApplies = true;\n }\n\n BigDecimal billingAmount = BigDecimal.ZERO;\n GenericValue orderAdj = EntityUtil.getFirst(orderItem.getRelated(\"OrderAdjustment\", UtilMisc.toMap(\"orderAdjustmentTypeId\",\n \"VAT_TAX\"), null, false));\n /* Apply formula to get actual product price to set amount in invoice item\n Formula is: productPrice = (productPriceWithTax.multiply(100)) / (orderAdj sourcePercentage + 100))\n product price = (43*100) / (20+100) = 35.83 (Here product price is 43 with VAT)\n */\n if (UtilValidate.isNotEmpty(orderAdj) && (orderAdj.getBigDecimal(\"amount\").signum() == 0)\n && UtilValidate.isNotEmpty(orderAdj.getBigDecimal(\"amountAlreadyIncluded\"))\n && orderAdj.getBigDecimal(\"amountAlreadyIncluded\").signum() != 0) {\n BigDecimal sourcePercentageTotal = orderAdj.getBigDecimal(\"sourcePercentage\").add(new BigDecimal(100));\n billingAmount =\n orderItem.getBigDecimal(\"unitPrice\").divide(sourcePercentageTotal, 100, ROUNDING)\n .multiply(new BigDecimal(100)).setScale(invoiceTypeDecimals, ROUNDING);\n } else {\n billingAmount = orderItem.getBigDecimal(\"unitPrice\").setScale(invoiceTypeDecimals, ROUNDING);\n }\n\n Map<String, Object> createInvoiceItemContext = new HashMap<>();\n createInvoiceItemContext.put(\"invoiceId\", invoiceId);\n createInvoiceItemContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createInvoiceItemContext.put(\"invoiceItemTypeId\", getInvoiceItemType(delegator, orderItem.getString(\"orderItemTypeId\"),\n product == null ? null : product.getString(\"productTypeId\"), invoiceType, \"INV_FPROD_ITEM\"));\n createInvoiceItemContext.put(\"description\", orderItem.get(\"itemDescription\"));\n createInvoiceItemContext.put(\"quantity\", billingQuantity);\n createInvoiceItemContext.put(\"amount\", billingAmount);\n createInvoiceItemContext.put(\"productId\", orderItem.get(\"productId\"));\n createInvoiceItemContext.put(\"productFeatureId\", orderItem.get(\"productFeatureId\"));\n createInvoiceItemContext.put(\"overrideGlAccountId\", orderItem.get(\"overrideGlAccountId\"));\n createInvoiceItemContext.put(\"userLogin\", userLogin);\n\n String itemIssuanceId = null;\n if (itemIssuance != null && itemIssuance.get(\"inventoryItemId\") != null) {\n itemIssuanceId = itemIssuance.getString(\"itemIssuanceId\");\n createInvoiceItemContext.put(\"inventoryItemId\", itemIssuance.get(\"inventoryItemId\"));\n }\n // similarly, tax only for purchase invoices\n if ((product != null) && (\"SALES_INVOICE\".equals(invoiceType))) {\n createInvoiceItemContext.put(\"taxableFlag\", product.get(\"taxable\"));\n }\n\n Map<String, Object> createInvoiceItemResult = dispatcher.runSync(\"createInvoiceItem\", createInvoiceItemContext);\n if (ServiceUtil.isError(createInvoiceItemResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceItemFromOrder\", locale), null, null, createInvoiceItemResult);\n }\n\n // this item total\n BigDecimal thisAmount = billingAmount.multiply(billingQuantity).setScale(invoiceTypeDecimals, ROUNDING);\n\n // add to the ship amount only if it applies to this item\n if (shippingApplies) {\n invoiceShipProRateAmount = invoiceShipProRateAmount.add(thisAmount).setScale(invoiceTypeDecimals, ROUNDING);\n invoiceShippableQuantity = invoiceQuantity.add(billingQuantity).setScale(invoiceTypeDecimals, ROUNDING);\n }\n\n // increment the invoice subtotal\n invoiceSubTotal = invoiceSubTotal.add(thisAmount).setScale(100, ROUNDING);\n\n // increment the invoice quantity\n invoiceQuantity = invoiceQuantity.add(billingQuantity).setScale(invoiceTypeDecimals, ROUNDING);\n\n // create the OrderItemBilling record\n Map<String, Object> createOrderItemBillingContext = new HashMap<>();\n createOrderItemBillingContext.put(\"invoiceId\", invoiceId);\n createOrderItemBillingContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createOrderItemBillingContext.put(\"orderId\", orderItem.get(\"orderId\"));\n createOrderItemBillingContext.put(\"orderItemSeqId\", orderItem.get(\"orderItemSeqId\"));\n createOrderItemBillingContext.put(\"itemIssuanceId\", itemIssuanceId);\n createOrderItemBillingContext.put(\"quantity\", billingQuantity);\n createOrderItemBillingContext.put(\"amount\", billingAmount);\n createOrderItemBillingContext.put(\"userLogin\", userLogin);\n if ((shipmentReceipt != null) && (shipmentReceipt.getString(\"receiptId\") != null)) {\n createOrderItemBillingContext.put(\"shipmentReceiptId\", shipmentReceipt.getString(\"receiptId\"));\n }\n\n Map<String, Object> createOrderItemBillingResult = dispatcher.runSync(\"createOrderItemBilling\", createOrderItemBillingContext);\n if (ServiceUtil.isError(createOrderItemBillingResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingOrderItemBillingFromOrder\", locale), null, null, createOrderItemBillingResult);\n }\n\n if (\"ItemIssuance\".equals(currentValue.getEntityName())) {\n /* Find ShipmentItemBilling based on shipmentId, shipmentItemSeqId, invoiceId, invoiceItemSeqId as\n because if any order item has multiple quantity and reserved by multiple inventories then there will be multiple invoice items.\n In that case ShipmentItemBilling was creating only for one invoice item. Fixed under OFBIZ-6806.\n */\n List<GenericValue> shipmentItemBillings = EntityQuery.use(delegator).from(\"ShipmentItemBilling\")\n .where(\"shipmentId\", currentValue.get(\"shipmentId\"), \"shipmentItemSeqId\", currentValue.get(\"shipmentItemSeqId\"),\n \"invoiceId\", invoiceId, \"invoiceItemSeqId\", invoiceItemSeqId)\n .queryList();\n if (UtilValidate.isEmpty(shipmentItemBillings)) {\n\n // create the ShipmentItemBilling record\n Map<String, Object> shipmentItemBillingCtx = new HashMap<>();\n shipmentItemBillingCtx.put(\"invoiceId\", invoiceId);\n shipmentItemBillingCtx.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n shipmentItemBillingCtx.put(\"shipmentId\", currentValue.get(\"shipmentId\"));\n shipmentItemBillingCtx.put(\"shipmentItemSeqId\", currentValue.get(\"shipmentItemSeqId\"));\n shipmentItemBillingCtx.put(\"userLogin\", userLogin);\n Map<String, Object> result = dispatcher.runSync(\"createShipmentItemBilling\", shipmentItemBillingCtx);\n if (ServiceUtil.isError(result)) {\n return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));\n }\n }\n }\n\n String parentInvoiceItemSeqId = invoiceItemSeqId;\n // increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n\n // Get the original order item from the DB, in case the quantity has been overridden\n GenericValue originalOrderItem = EntityQuery.use(delegator).from(\"OrderItem\").where(\"orderId\", orderId, \"orderItemSeqId\",\n orderItem.get(\"orderItemSeqId\")).queryOne();\n\n // create the item adjustment as line items\n List<GenericValue> itemAdjustments = OrderReadHelper.getOrderItemAdjustmentList(orderItem, orh.getAdjustments());\n for (GenericValue adj : itemAdjustments) {\n\n // Check against OrderAdjustmentBilling to see how much of this adjustment has already been invoiced\n BigDecimal adjAlreadyInvoicedAmount = null;\n try {\n Map<String, Object> checkResult = dispatcher.runSync(\"calculateInvoicedAdjustmentTotal\", UtilMisc.toMap(\"orderAdjustment\",\n adj));\n if (ServiceUtil.isError(checkResult)) {\n Debug.logError(\"Accounting trouble calling calculateInvoicedAdjustmentTotal service\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n adjAlreadyInvoicedAmount = (BigDecimal) checkResult.get(\"invoicedTotal\");\n } catch (GenericServiceException e) {\n Debug.logError(e, \"Accounting trouble calling calculateInvoicedAdjustmentTotal service\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n\n // Set adjustment amount as amountAlreadyIncluded to continue invoice item creation process\n boolean isTaxIncludedInPrice = \"VAT_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))\n && UtilValidate.isNotEmpty(adj.getBigDecimal(\"amountAlreadyIncluded\"))\n && adj.getBigDecimal(\"amountAlreadyIncluded\").signum() != 0;\n if (isTaxIncludedInPrice && (adj.getBigDecimal(\"amount\").signum() == 0)) {\n adj.set(\"amount\", adj.getBigDecimal(\"amountAlreadyIncluded\"));\n }\n // If the absolute invoiced amount >= the abs of the adjustment amount, the full amount has already been invoiced, so skip this\n // adjustment\n if (isTaxIncludedInPrice && adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals,\n ROUNDING).abs()) > 0) {\n continue;\n }\n\n BigDecimal originalOrderItemQuantity = OrderReadHelper.getOrderItemQuantity(originalOrderItem);\n BigDecimal amount = BigDecimal.ZERO;\n if (originalOrderItemQuantity.signum() != 0) {\n if (adj.get(\"amount\") != null) {\n if (\"PROMOTION_ADJUSTMENT\".equals(adj.getString(\"orderAdjustmentTypeId\")) && adj.get(\"productPromoId\") != null) {\n /* Find negative amountAlreadyIncluded in OrderAdjustment to subtract it from discounted amount.\n As we stored negative sales tax amount in order adjustment for discounted\n item.\n */\n List<EntityExpr> exprs = UtilMisc.toList(EntityCondition.makeCondition(\"orderId\", EntityOperator.EQUALS,\n orderItem.getString(\"orderId\")),\n EntityCondition.makeCondition(\"orderItemSeqId\", EntityOperator.EQUALS, orderItem.getString(\"orderItemSeqId\")),\n EntityCondition.makeCondition(\"orderAdjustmentTypeId\", EntityOperator.EQUALS, \"VAT_TAX\"),\n EntityCondition.makeCondition(\"amountAlreadyIncluded\", EntityOperator.LESS_THAN, BigDecimal.ZERO));\n EntityCondition andCondition = EntityCondition.makeCondition(exprs, EntityOperator.AND);\n GenericValue orderAdjustment = EntityUtil.getFirst(delegator.findList(\"OrderAdjustment\", andCondition, null, null,\n null, false));\n if (UtilValidate.isNotEmpty(orderAdjustment)) {\n amount =\n adj.getBigDecimal(\"amount\").subtract(orderAdjustment.getBigDecimal(\"amountAlreadyIncluded\")).setScale(100,\n ROUNDING);\n } else {\n amount = adj.getBigDecimal(\"amount\");\n }\n } else {\n // pro-rate the amount\n // set decimals = 100 means we don't round this intermediate value, which is very important\n if (isTaxIncludedInPrice) {\n BigDecimal priceWithTax = originalOrderItem.getBigDecimal(\"unitPrice\");\n // Get tax included in item price\n amount = priceWithTax.subtract(billingAmount);\n amount = amount.multiply(billingQuantity);\n // get adjustment amount\n /* Get tax amount of other invoice and calculate remaining amount need to store in invoice item(Handle case\n of of partial shipment and promotional item)\n to adjust tax amount in invoice item.\n */\n BigDecimal otherInvoiceTaxAmount = BigDecimal.ZERO;\n GenericValue orderAdjBilling = EntityQuery.use(delegator).from(\"OrderAdjustmentBilling\").where(\n \"orderAdjustmentId\", adj.getString(\"orderAdjustmentId\")).queryFirst();\n if (UtilValidate.isNotEmpty(orderAdjBilling)) {\n //FIXME: Need to check here isTaxIncludedInPrice pass to use cache\n List<GenericValue> invoiceItems = EntityQuery.use(delegator).from(\"InvoiceItem\").where(\"invoiceId\",\n orderAdjBilling.getString(\"invoiceId\"), \"invoiceItemTypeId\", \"ITM_SALES_TAX\", \"productId\",\n originalOrderItem.getString(\"productId\")).cache(isTaxIncludedInPrice).queryList();\n for (GenericValue invoiceItem : invoiceItems) {\n otherInvoiceTaxAmount = otherInvoiceTaxAmount.add(invoiceItem.getBigDecimal(\"amount\"));\n }\n if (otherInvoiceTaxAmount.compareTo(BigDecimal.ZERO) > 0) {\n BigDecimal remainingAmount = adj.getBigDecimal(\"amountAlreadyIncluded\").subtract(otherInvoiceTaxAmount);\n amount = amount.min(remainingAmount);\n }\n }\n amount = amount.min(adj.getBigDecimal(\"amountAlreadyIncluded\")).setScale(100, ROUNDING);\n } else {\n amount = adj.getBigDecimal(\"amount\").divide(originalOrderItemQuantity, 100, ROUNDING);\n amount = amount.multiply(billingQuantity);\n }\n }\n // Tax needs to be rounded differently from other order adjustments\n if (\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n amount = amount.setScale(TAX_DECIMALS, TAX_ROUNDING);\n } else {\n amount = amount.setScale(invoiceTypeDecimals, ROUNDING);\n }\n } else if (adj.get(\"sourcePercentage\") != null) {\n // pro-rate the amount\n // set decimals = 100 means we don't round this intermediate value, which is very important\n BigDecimal percent = adj.getBigDecimal(\"sourcePercentage\");\n percent = percent.divide(new BigDecimal(100), 100, ROUNDING);\n amount = billingAmount.multiply(percent);\n amount = amount.divide(originalOrderItemQuantity, 100, ROUNDING);\n amount = amount.multiply(billingQuantity);\n amount = amount.setScale(invoiceTypeDecimals, ROUNDING);\n }\n }\n if (amount.signum() != 0) {\n Map<String, Object> createInvoiceItemAdjContext = new HashMap<>();\n createInvoiceItemAdjContext.put(\"invoiceId\", invoiceId);\n createInvoiceItemAdjContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createInvoiceItemAdjContext.put(\"invoiceItemTypeId\", getInvoiceItemType(delegator, adj.getString(\"orderAdjustmentTypeId\"),\n null, invoiceType, \"INVOICE_ITM_ADJ\"));\n createInvoiceItemAdjContext.put(\"quantity\", BigDecimal.ONE);\n createInvoiceItemAdjContext.put(\"amount\", amount);\n createInvoiceItemAdjContext.put(\"productId\", orderItem.get(\"productId\"));\n createInvoiceItemAdjContext.put(\"productFeatureId\", orderItem.get(\"productFeatureId\"));\n createInvoiceItemAdjContext.put(\"overrideGlAccountId\", adj.get(\"overrideGlAccountId\"));\n createInvoiceItemAdjContext.put(\"parentInvoiceId\", invoiceId);\n createInvoiceItemAdjContext.put(\"parentInvoiceItemSeqId\", parentInvoiceItemSeqId);\n createInvoiceItemAdjContext.put(\"userLogin\", userLogin);\n createInvoiceItemAdjContext.put(\"taxAuthPartyId\", adj.get(\"taxAuthPartyId\"));\n createInvoiceItemAdjContext.put(\"taxAuthGeoId\", adj.get(\"taxAuthGeoId\"));\n createInvoiceItemAdjContext.put(\"taxAuthorityRateSeqId\", adj.get(\"taxAuthorityRateSeqId\"));\n\n // some adjustments fill out the comments field instead\n String description = (UtilValidate.isEmpty(adj.getString(\"description\")) ? adj.getString(\"comments\") : adj.getString(\n \"description\"));\n createInvoiceItemAdjContext.put(\"description\", description);\n\n // invoice items for sales tax are not taxable themselves\n // TODO: This is not an ideal solution. Instead, we need to use OrderAdjustment.includeInTax when it is implemented\n if (!(\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\")))) {\n createInvoiceItemAdjContext.put(\"taxableFlag\", product.get(\"taxable\"));\n }\n\n // If the OrderAdjustment is associated to a ProductPromo,\n // and the field ProductPromo.overrideOrgPartyId is set,\n // copy the value to InvoiceItem.overrideOrgPartyId: this\n // represent an organization override for the payToPartyId\n if (UtilValidate.isNotEmpty(adj.getString(\"productPromoId\"))) {\n try {\n GenericValue productPromo = adj.getRelatedOne(\"ProductPromo\", false);\n if (UtilValidate.isNotEmpty(productPromo.getString(\"overrideOrgPartyId\"))) {\n createInvoiceItemAdjContext.put(\"overrideOrgPartyId\", productPromo.getString(\"overrideOrgPartyId\"));\n }\n } catch (GenericEntityException e) {\n Debug.logError(e, \"Error looking up ProductPromo with id [\" + adj.getString(\"productPromoId\") + \"]\", MODULE);\n }\n }\n\n Map<String, Object> createInvoiceItemAdjResult = dispatcher.runSync(\"createInvoiceItem\", createInvoiceItemAdjContext);\n if (ServiceUtil.isError(createInvoiceItemAdjResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceItemFromOrder\", locale), null, null, createInvoiceItemAdjResult);\n }\n\n // Create the OrderAdjustmentBilling record\n Map<String, Object> createOrderAdjustmentBillingContext = new HashMap<>();\n createOrderAdjustmentBillingContext.put(\"orderAdjustmentId\", adj.getString(\"orderAdjustmentId\"));\n createOrderAdjustmentBillingContext.put(\"invoiceId\", invoiceId);\n createOrderAdjustmentBillingContext.put(\"invoiceItemSeqId\", invoiceItemSeqId);\n createOrderAdjustmentBillingContext.put(\"amount\", amount);\n createOrderAdjustmentBillingContext.put(\"userLogin\", userLogin);\n\n Map<String, Object> createOrderAdjustmentBillingResult = dispatcher.runSync(\"createOrderAdjustmentBilling\",\n createOrderAdjustmentBillingContext);\n if (ServiceUtil.isError(createOrderAdjustmentBillingResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingOrderAdjustmentBillingFromOrder\", locale), null, null,\n createOrderAdjustmentBillingContext);\n }\n\n // this adjustment amount\n BigDecimal thisAdjAmount = amount;\n\n // adjustments only apply to totals when they are not tax or shipping adjustments\n if (!\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))\n && !\"SHIPPING_ADJUSTMENT\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n // increment the invoice subtotal\n invoiceSubTotal = invoiceSubTotal.add(thisAdjAmount).setScale(100, ROUNDING);\n\n // add to the ship amount only if it applies to this item\n if (shippingApplies) {\n invoiceShipProRateAmount = invoiceShipProRateAmount.add(thisAdjAmount).setScale(invoiceTypeDecimals, ROUNDING);\n }\n }\n\n // increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n }\n }\n\n // create header adjustments as line items -- always to tax/shipping last\n Map<GenericValue, BigDecimal> shipAdjustments = new HashMap<>();\n Map<GenericValue, BigDecimal> taxAdjustments = new HashMap<>();\n\n List<GenericValue> headerAdjustments = orh.getOrderHeaderAdjustments();\n for (GenericValue adj : headerAdjustments) {\n\n // Check against OrderAdjustmentBilling to see how much of this adjustment has already been invoiced\n BigDecimal adjAlreadyInvoicedAmount = null;\n try {\n Map<String, Object> checkResult = dispatcher.runSync(\"calculateInvoicedAdjustmentTotal\", UtilMisc.toMap(\"orderAdjustment\", adj));\n if (ServiceUtil.isError(checkResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n adjAlreadyInvoicedAmount = ((BigDecimal) checkResult.get(\"invoicedTotal\")).setScale(invoiceTypeDecimals, ROUNDING);\n } catch (GenericServiceException e) {\n Debug.logError(e, \"Accounting trouble calling calculateInvoicedAdjustmentTotal service\", MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingTroubleCallingCalculateInvoicedAdjustmentTotalService\", locale));\n }\n\n // If the absolute invoiced amount >= the abs of the adjustment amount, the full amount has already been invoiced, so skip this\n // adjustment\n if (adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING).abs()) >= 0) {\n continue;\n }\n\n if (\"SHIPPING_CHARGES\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n shipAdjustments.put(adj, adjAlreadyInvoicedAmount);\n } else if (\"SALES_TAX\".equals(adj.getString(\"orderAdjustmentTypeId\"))) {\n taxAdjustments.put(adj, adjAlreadyInvoicedAmount);\n } else {\n // these will effect the shipping pro-rate (unless commented)\n // other adjustment type\n BigDecimal divisor = orderSubTotal;\n BigDecimal multiplier = invoiceSubTotal;\n if (BigDecimal.ZERO.compareTo(multiplier) == 0 && BigDecimal.ZERO.compareTo(divisor) == 0) {\n // if multiplier and divisor are equal to zero then use the quantities instead of the amounts\n // this is useful when the order has free items and misc charges\n divisor = orderQuantity;\n multiplier = invoiceQuantity;\n }\n\n calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, divisor, multiplier,\n adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING), invoiceTypeDecimals, ROUNDING, userLogin,\n dispatcher, locale);\n // invoiceShipProRateAmount += adjAmount;\n // do adjustments compound or are they based off subtotal? Here we will (unless commented)\n // invoiceSubTotal += adjAmount;\n\n // increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n }\n\n // next do the shipping adjustments. Note that we do not want to add these to the invoiceSubTotal or orderSubTotal for pro-rating tax\n // later, as that would cause\n // numerator/denominator problems when the shipping is not pro-rated but rather charged all on the first invoice\n for (Map.Entry<GenericValue, BigDecimal> set : shipAdjustments.entrySet()) {\n BigDecimal adjAlreadyInvoicedAmount = set.getValue();\n GenericValue adj = set.getKey();\n\n if (\"N\".equalsIgnoreCase(prorateShipping)) {\n\n // Set the divisor and multiplier to 1 to avoid prorating\n BigDecimal divisor = BigDecimal.ONE;\n BigDecimal multiplier = BigDecimal.ONE;\n\n // The base amount in this case is the adjustment amount minus the total already invoiced for that adjustment, since\n // it won't be prorated\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING).subtract(adjAlreadyInvoicedAmount);\n calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, divisor, multiplier, baseAmount,\n invoiceTypeDecimals, ROUNDING, userLogin, dispatcher, locale);\n } else {\n\n // Pro-rate the shipping amount based on shippable information\n BigDecimal divisor = shippableAmount;\n BigDecimal multiplier = invoiceShipProRateAmount;\n if (BigDecimal.ZERO.compareTo(multiplier) == 0 && BigDecimal.ZERO.compareTo(divisor) == 0) {\n // if multiplier and divisor are equal to zero then use the quantities instead of the amounts\n // this is useful when the order has free items and shipping charges\n divisor = shippableQuantity;\n multiplier = invoiceShippableQuantity;\n }\n\n // The base amount in this case is the adjustment amount, since we want to prorate based on the full amount\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\").setScale(invoiceTypeDecimals, ROUNDING);\n calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, divisor, multiplier,\n baseAmount, invoiceTypeDecimals, ROUNDING, userLogin, dispatcher, locale);\n }\n\n // Increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n\n // last do the tax adjustments\n String prorateTaxes = productStore != null ? productStore.getString(\"prorateTaxes\") : \"Y\";\n if (prorateTaxes == null) {\n prorateTaxes = \"Y\";\n }\n for (Map.Entry<GenericValue, BigDecimal> entry : taxAdjustments.entrySet()) {\n GenericValue adj = entry.getKey();\n BigDecimal adjAlreadyInvoicedAmount = entry.getValue();\n BigDecimal adjAmount = null;\n\n if (\"N\".equalsIgnoreCase(prorateTaxes)) {\n\n // Set the divisor and multiplier to 1 to avoid prorating\n BigDecimal divisor = BigDecimal.ONE;\n BigDecimal multiplier = BigDecimal.ONE;\n\n // The base amount in this case is the adjustment amount minus the total already invoiced for that adjustment, since\n // it won't be prorated\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\").setScale(TAX_DECIMALS, TAX_ROUNDING).subtract(adjAlreadyInvoicedAmount);\n adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId,\n divisor, multiplier, baseAmount, TAX_DECIMALS, TAX_ROUNDING, userLogin, dispatcher, locale);\n } else {\n\n // Pro-rate the tax amount based on shippable information\n BigDecimal divisor = orderSubTotal;\n BigDecimal multiplier = invoiceSubTotal;\n\n // The base amount in this case is the adjustment amount, since we want to prorate based on the full amount\n BigDecimal baseAmount = adj.getBigDecimal(\"amount\");\n adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId,\n divisor, multiplier, baseAmount, TAX_DECIMALS, TAX_ROUNDING, userLogin, dispatcher, locale);\n }\n invoiceSubTotal = invoiceSubTotal.add(adjAmount).setScale(invoiceTypeDecimals, ROUNDING);\n\n // Increment the counter\n invoiceItemSeqNum++;\n invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, INVOICE_ITEM_SEQUENCE_ID_DIGITS);\n }\n\n // check for previous order payments\n List<GenericValue> orderPaymentPrefs = EntityQuery.use(delegator).from(\"OrderPaymentPreference\")\n .where(EntityCondition.makeCondition(\"orderId\", EntityOperator.EQUALS, orderId),\n EntityCondition.makeCondition(\"statusId\", EntityOperator.NOT_EQUAL, \"PAYMENT_CANCELLED\")).queryList();\n List<GenericValue> currentPayments = new LinkedList<>();\n for (GenericValue paymentPref : orderPaymentPrefs) {\n List<GenericValue> payments = paymentPref.getRelated(\"Payment\", null, null, false);\n currentPayments.addAll(payments);\n }\n // apply these payments to the invoice if they have any remaining amount to apply\n for (GenericValue payment : currentPayments) {\n if (\"PMNT_VOID\".equals(payment.getString(\"statusId\")) || \"PMNT_CANCELLED\".equals(payment.getString(\"statusId\"))) {\n continue;\n }\n BigDecimal notApplied = PaymentWorker.getPaymentNotApplied(payment);\n if (notApplied.signum() > 0) {\n Map<String, Object> appl = new HashMap<>();\n appl.put(\"paymentId\", payment.get(\"paymentId\"));\n appl.put(\"invoiceId\", invoiceId);\n appl.put(\"billingAccountId\", billingAccountId);\n appl.put(\"amountApplied\", notApplied);\n appl.put(\"userLogin\", userLogin);\n Map<String, Object> createPayApplResult = dispatcher.runSync(\"createPaymentApplication\", appl);\n if (ServiceUtil.isError(createPayApplResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, createPayApplResult);\n }\n }\n }\n\n // Should all be in place now. Depending on the ProductStore.autoApproveInvoice setting, set status to INVOICE_READY (unless it's a\n // purchase invoice, which we set to INVOICE_IN_PROCESS)\n String autoApproveInvoice = productStore != null ? productStore.getString(\"autoApproveInvoice\") : \"Y\";\n if (!\"N\".equals(autoApproveInvoice)) {\n String nextStatusId = \"PURCHASE_INVOICE\".equals(invoiceType) ? \"INVOICE_IN_PROCESS\" : \"INVOICE_READY\";\n Map<String, Object> setInvoiceStatusResult = dispatcher.runSync(\"setInvoiceStatus\", UtilMisc.<String, Object>toMap(\"invoiceId\",\n invoiceId, \"statusId\", nextStatusId, \"userLogin\", userLogin));\n if (ServiceUtil.isError(setInvoiceStatusResult)) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingErrorCreatingInvoiceFromOrder\", locale), null, null, setInvoiceStatusResult);\n }\n }\n\n Map<String, Object> resp = ServiceUtil.returnSuccess();\n resp.put(\"invoiceId\", invoiceId);\n resp.put(\"invoiceTypeId\", invoiceType);\n return resp;\n } catch (GenericEntityException e) {\n Debug.logError(e, \"Entity/data problem creating invoice from order items: \" + e.toString(), MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingEntityDataProblemCreatingInvoiceFromOrderItems\",\n UtilMisc.toMap(\"reason\", e.toString()), locale));\n } catch (GenericServiceException e) {\n Debug.logError(e, \"Service/other problem creating invoice from order items: \" + e.toString(), MODULE);\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingServiceOtherProblemCreatingInvoiceFromOrderItems\",\n UtilMisc.toMap(\"reason\", e.toString()), locale));\n }\n }",
"public double getTotal() {\n double total = 0.0;\n for (OrderItem i : getOrderItems()) {\n total += i.getOrderQuantity() * i.getPrice();\n }\n return total;\n }",
"public static double calculations(int quantity, double cost) {\r\n\tdouble price = 0;\r\n\tprice = quantity*cost;\r\n\treturn price = price+calculateTax(price);\r\n\t}",
"Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);",
"public BigDecimal getTotalPrice() {\n\t\tBigDecimal total = new BigDecimal(\"0.00\");\n\t\tfor (Map.Entry<Integer, DishGeneral> entry : this.getOrderedDishes().entrySet()){\n\t\t\ttotal = total.add(new BigDecimal(entry.getValue().getAmount()).multiply(entry.getValue().getPrice()));\n\t\t}\n\t\tfor (Map.Entry<String, DishGeneral> entry : this.getOrderedTeppanyakiDishes().entrySet()){\n\t\t\tfor(Map.Entry<Integer, IngredientGeneral> ent : entry.getValue().getIngredients().entrySet()){\n\t\t\t\tBigDecimal p = new BigDecimal(ent.getValue().getGrams()).multiply(ent.getValue().getPricePerHundredGrams())\n\t\t\t\t\t\t.divide(new BigDecimal(100));\n\t\t\t\ttotal = total.add(p);\n\t\t\t}\n\t\t}\n\t\treturn total.setScale(2, RoundingMode.CEILING);\n\t}",
"public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }",
"BigDecimal getPrice();",
"public void calculateOrderTotals() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n\n //order number increases for each order\n orderNo++;\n System.out.println(\"- \" + \"OrderNo: \" + orderNo + \" -\");\n\n //cycle through the items in the order and add to the totals\n for(Item i : items) {\n\n incrementOrderTotal(i.getNumOfItems() * i.getPriceWithTax());\n incrementOrderSalesTax(i.getNumOfItems() * i.getTaxOnItem());\n\n System.out.println(i.getDescrip() + formatter.format(i.getPriceWithTax()));\n }\n\n //print out totals\n System.out.println(\"Sales taxes: \" + formatter.format(Math.round(getOrderSalesTax() * 100.0) / 100.0));\n System.out.println(\"Order total: \" + formatter.format(Math.round(getOrderTotal() * 100.0) / 100.0));\n System.out.println(\"\\n\");\n }",
"@Test\n public void testOrderFactoryInvoiceTotal() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n \n // create the invoice\n orderController.addOrderInvoice(orderController.getOrder(1));\n\n // check that the invoice is created\n assertEquals(1, orderController.getOrderInvoices().size());\n assertEquals(3 * MENU_PRICE, orderController.getOrderInvoices().get(0).getSubTotal());\n assertEquals((3 * MENU_PRICE) * 0.1, orderController.getOrderInvoices().get(0).getServiceChargeAmount());\n assertEquals((((3 * MENU_PRICE) * 0.1) + (3 * MENU_PRICE)) * 0.07, orderController.getOrderInvoices().get(0).getGSTAmount());\n assertEquals(((((3 * MENU_PRICE) * 0.1) + (3 * MENU_PRICE)) * 0.07) + ((3 * MENU_PRICE) * 0.1) + (3 * MENU_PRICE), orderController.getOrderInvoices().get(0).getTotal());\n assertEquals(1, orderController.getOrderInvoices().get(0).getOrderId());\n assertEquals(STAFF_NAME, orderController.getOrderInvoices().get(0).getStaffName());\n assertEquals(1, orderController.getOrderInvoices().get(0).getTableId());\n }",
"public BigDecimal getPriceActual();",
"public float getPayableAmount() {\n /**\n * { var_description }.\n */\n float dscnt = NUM3 * coupon;\n /**\n * { item_description }.\n */\n return (getTotalAmount() * (1f - dscnt)) * NUM5;\n }",
"private BigDecimal calculateAmountPayable(Product product, int quantity) throws ScriptException {\n BigDecimal totalAmountPayable;\n Optional<Discount> optional = product.getDiscounts().stream().findFirst();\n if (optional.isPresent()) {\n Discount discount = optional.get();\n switch (discount.getDiscountType()) {\n case QUANTITIVE:\n totalAmountPayable = eval(Expressions.EXPRESSION_QUANTITIVE, product, quantity);\n break;\n case PERCENTILE:\n totalAmountPayable = eval(Expressions.EXPRESSION_PERCENTAGE, product, quantity);\n break;\n default:\n totalAmountPayable = new BigDecimal(0);\n }\n } else {\n totalAmountPayable = new BigDecimal(0);\n }\n return totalAmountPayable;\n }",
"private static void calculatePrice(AbstractOrder abstractOrder) {\n System.out.println(abstractOrder.getPrice());\n }",
"org.adscale.format.opertb.AmountMessage.Amount getExchangeprice();",
"double ComputeCost(double order, double tipPercent, double serviceRating, double foodRating)\r\n {\r\n // kazda gwiazdka to 2 procent od sumy zamówienia\r\n return order + order * (tipPercent/100) + (serviceRating * 0.02) * order + (foodRating * 0.02) * order;\r\n }",
"public double calculate_total_sales_of_transaction() {\n char ismember = 'n';\n discounts = 1;\n String member_typ = \"null\";\n ismember = order.getIsMember();\n member_typ = order_member.getMemberType();\n\n total_sales_of_transaction = order.getBike().getPrice();\n\n if (Character.toUpperCase(ismember) == 'Y') {\n if (member_typ == \"Premium\") {\n discounts = 0.85;\n } else {\n discounts = 0.9;\n }\n }\n double price = total_sales_of_transaction * discounts;\n return price;\n }",
"public float getTotalPrice(){\n return price * amount;\n }",
"BigDecimal getShipping();",
"public java.math.BigDecimal getTotalInvoiceBalance() {\n return totalInvoiceBalance;\n }",
"public double getPaymentAmount() {\n\t\tdouble amount = 0.0;\n\t\tString content = \"\";\n\t\t\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t.until(ExpectedConditions.presenceOfElementLocated(By.id(\"totalAmt\")));\t\t\n\t\tcontent = temp.findElement(By.xpath(\"span[2]\")).getAttribute(\"innerHTML\");\n\t\tamount = Double.parseDouble(content);\n\t\treturn amount;\n\t}",
"BigDecimal getAmountAssigned(DestinationEntity destinationEntity);",
"BigDecimal getOrigAmount();",
"public BigDecimal calculateTotalPrice(final Transaction transaction) {\n\t\tlong totalPrice = 0;\n\t\tif(null != transaction.shoppingBasket && !transaction.shoppingBasket.isEmpty()) {\n\t\t\n\t\t\t\n\t\t\tfinal List<PricingRule> orderedPricingRules = orderPricingRules(transaction.pricingRules);\n\t final Map<Item, Long> shoppingBasket = new HashMap<Item, Long>(transaction.shoppingBasket);\n\t \n\t\n\t\t\tfor (PricingRule rule : orderedPricingRules) {\n\t\t\t\tif (shoppingBasket.containsKey(rule.getItem())) {\n\t\n\t\t\t\t\tlong quantityInBasket = shoppingBasket.get(rule.getItem());\n\t\t\t\t\tUnit unit = rule.getUnit(quantityInBasket);\n\t\t\t\t\ttotalPrice += unit.getPrice();\n\t\t\t\t\tlong remainingQty = 0;\n\t\t\t\t\tif(quantityInBasket == 1) {\n\t\t\t\t\t\tremainingQty = quantityInBasket;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tremainingQty = quantityInBasket - unit.getQuantity();\n\t\t\t\t\t}\n\t\t\t\t\t// Update the basket with remaining quantity.\n\t\t\t\t\tshoppingBasket.put(rule.getItem(), remainingQty);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// totalPrice in GBP.\n\t\tBigDecimal totPrice = new BigDecimal(totalPrice).setScale(2, RoundingMode.CEILING);\n\t\ttotPrice = totPrice.divide(new BigDecimal(100)).setScale(2, RoundingMode.CEILING);\n\t\treturn totPrice;\n }",
"private void calculatePrice(int quantity) {\n int price = quantity * priceOfCoffee;\n }",
"public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\n\t}",
"@Test\n public void testOrderFactoryInvoiceMemberTotal() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order with member\n orderController.addOrder(STAFF_NAME, 1, true, orderItems, setOrderItems);\n \n // create the invoice\n orderController.addOrderInvoice(orderController.getOrder(1));\n\n // check that the invoice is created\n assertEquals(1, orderController.getOrderInvoices().size());\n assertEquals(3 * MENU_PRICE * 0.8, orderController.getOrderInvoices().get(0).getSubTotal());\n assertEquals((3 * MENU_PRICE * 0.8) * 0.1, orderController.getOrderInvoices().get(0).getServiceChargeAmount());\n assertEquals((((3 * MENU_PRICE * 0.8) * 0.1) + (3 * MENU_PRICE * 0.8)) * 0.07, orderController.getOrderInvoices().get(0).getGSTAmount());\n assertEquals(((((3 * MENU_PRICE * 0.8) * 0.1) + (3 * MENU_PRICE * 0.8)) * 0.07) + ((3 * MENU_PRICE * 0.8) * 0.1) + (3 * MENU_PRICE * 0.8), orderController.getOrderInvoices().get(0).getTotal());\n }",
"public double getDepositAmount()\n\t{\n\t\treturn this.getFlightCosts() + this.totalPrice * this.half;\n\t}",
"@Override\r\n\tpublic double taxAmount(long itemSold, double price) {\n\t\treturn 100.230;\r\n\t}",
"private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }",
"public BigDecimal sumCostAvoidanceTotal(MaintenanceRequest po){\n\t\tBigDecimal total = new BigDecimal(0.00).setScale(2);\n\t\t\n\t\tfor(MaintenanceRequestTask task : po.getMaintenanceRequestTasks()){\n\t\t\ttotal = total.add(MALUtilities.isEmpty(task.getCostAvoidanceAmount()) ? new BigDecimal(0) : task.getCostAvoidanceAmount());\n\t\t}\n\t\t\n\t\treturn total;\t\t\n\t}",
"BigDecimal getCommission( String officeCode );",
"public int calcTotalPrice(){\r\n\t\tint flightPrice = flight.getFlightPrice();\r\n\t\tint bagPrice = nrBag*LUGGAGE_PRICE;\r\n\t\tthis.totalPrice = bagPrice + nrAdult*flightPrice + nrChildren*1/2*flightPrice;\r\n\t\treturn this.totalPrice;\r\n\t}",
"public double getPrice()\n\t{\n\t\treturn this.totalPrice + this.getFlightCosts() + this.excursionSubTotal\n\t\t\t\t+ this.getLodgingCost();\n\t}",
"public BigDecimal getPrice() {\n BigDecimal price = BigDecimal.ZERO;\n for (int i = 0; i < flights.size(); i++) {\n price = price.add(flights.get(i).getPrice(seatClass.get(i)));\n }\n return price;\n }",
"private double returnOrderTotalAmount(List<ProductVariation> productVariationList, long customerId)\n {\n double totalAmount = 0;\n\n for (ProductVariation productVariation: productVariationList) {\n\n int quantityFromCart = cartRepository.getQuantityForCustomerIdAndVariationId(customerId\n , productVariation.getId());\n totalAmount+=(productVariation.getPrice()*quantityFromCart);\n }\n return totalAmount;\n }",
"private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }",
"public static double getPaymentAmountDue(Payment payment, HashMap requestParams, accVendorPaymentDAO accVendorPaymentobj) throws ServiceException, ParseException {\n boolean isOpeningPayment = false;\n boolean isAdvancePaymentToVendor = false;\n boolean isRefundPaymentToCustomer = false;\n DateFormat df = (DateFormat) requestParams.get(GoodsReceiptCMNConstants.DATEFORMAT);\n if (df == null) {\n df = (DateFormat) requestParams.get(Constants.df);\n }\n String companyid = (String) requestParams.get(GoodsReceiptCMNConstants.COMPANYID);\n double paymentDueAmt = 0;\n if ((payment.getAdvanceDetails() != null && !payment.getAdvanceDetails().isEmpty()) || payment.isIsOpeningBalencePayment()) {\n double paymentAmt = 0;\n double linkedPaymentAmt = 0;\n if (payment.isIsOpeningBalencePayment()) {//opening payment\n isOpeningPayment = true;\n paymentAmt += payment.getDepositAmount();\n } else if (payment.getVendor() != null) {//advance payment against vendor\n isAdvancePaymentToVendor = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n paymentAmt += advanceDetail.getAmount();\n }\n } else if (payment.getCustomer() != null) {//Refund payment against customer\n isRefundPaymentToCustomer = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n if (advanceDetail.getReceiptAdvanceDetails() == null) {//Only such refunds can be due in which at the time of creation no document (no advance receipt) is selected \n paymentAmt += advanceDetail.getAmount();\n }\n }\n //In this case paymentAmt can be zero (if all refund have advance receipt documnet selected) so we need to retun amount due zero here\n if (paymentAmt == 0) {\n return 0;\n }\n }\n HashMap<String, Object> reqParams1 = new HashMap();\n reqParams1.put(\"paymentid\", payment.getID());\n reqParams1.put(\"companyid\", companyid);\n reqParams1.put(Constants.df, df);\n if (requestParams.containsKey(\"asofdate\") && requestParams.get(\"asofdate\") != null) {\n reqParams1.put(\"asofdate\", requestParams.get(\"asofdate\"));\n }\n if (isOpeningPayment || isAdvancePaymentToVendor) {\n KwlReturnObject result = accVendorPaymentobj.getLinkedDetailsPayment(reqParams1);\n List<LinkDetailPayment> linkedDetaisPayments = result.getEntityList();\n for (LinkDetailPayment ldp : linkedDetaisPayments) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getLinkDetailPaymentToCreditNote(reqParams1);\n List<LinkDetailPaymentToCreditNote> linkedDetaisPaymentsToCN = result.getEntityList();\n for (LinkDetailPaymentToCreditNote ldp : linkedDetaisPaymentsToCN) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getAdvanceReceiptDetailsByPayment(reqParams1);\n List<Object[]> list2 = result.getEntityList();\n for (Object obj[] : list2) {\n double revExchangeRate = 1.0;\n double amount = obj[1] != null ? Double.parseDouble(obj[1].toString()) : 0.0;\n double exchangeRate = obj[2] != null ? Double.parseDouble(obj[2].toString()) : 0.0;\n if (exchangeRate != 0.0) {\n revExchangeRate = 1 / exchangeRate;\n }\n linkedPaymentAmt += authHandler.round(revExchangeRate * amount, companyid);\n }\n result = accVendorPaymentobj.getLinkDetailReceiptToAdvancePayment(reqParams1);\n List<LinkDetailReceiptToAdvancePayment> linkDetailReceiptToAdvancePayment = result.getEntityList();\n for (LinkDetailReceiptToAdvancePayment ldp : linkDetailReceiptToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmountInPaymentCurrency();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n } else if (isRefundPaymentToCustomer) {\n KwlReturnObject result = accVendorPaymentobj.getLinkDetailAdvanceReceiptToRefundPayment(reqParams1);\n List<LinkDetailPaymentToAdvancePayment> linkDetailPaymentToAdvancePayment = result.getEntityList();\n for (LinkDetailPaymentToAdvancePayment ldp : linkDetailPaymentToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmount();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n }\n }\n paymentDueAmt = authHandler.round(paymentDueAmt, companyid);\n return paymentDueAmt;\n }",
"public double totalprice()\n {\n \tthis.caltotalprice();\n \tdouble res = Math.round(mTotalPrice);\n \t return res;\n }",
"public KualiDecimal getCoinTotal(CashDrawer drawer);",
"org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();",
"public void setOrderPrice(BigDecimal orderPrice) {\n this.orderPrice = orderPrice;\n }",
"public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }",
"public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}",
"@Override\n\tpublic Double calculateTotalPurchasedItems(List<OnlineShoppingCartItem> onlineShoppingCartItem) {\n\t\tretailCustomerUserBill.setOnlineShoppingCartItem(onlineShoppingCartItem);\n\t\treturn getTotalBillCost(onlineShoppingCartItem);\n\t}",
"public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }"
] | [
"0.7460188",
"0.730801",
"0.6934134",
"0.67667466",
"0.6497093",
"0.644379",
"0.6377234",
"0.63702196",
"0.63658994",
"0.63617367",
"0.6358789",
"0.6354978",
"0.628751",
"0.6204976",
"0.61939573",
"0.6184279",
"0.6138736",
"0.6112526",
"0.60414886",
"0.60359484",
"0.60217047",
"0.59394115",
"0.5929311",
"0.5914436",
"0.59078807",
"0.5891578",
"0.58367807",
"0.5823296",
"0.58108044",
"0.5796534",
"0.5780127",
"0.57700014",
"0.5762596",
"0.57581913",
"0.5757505",
"0.57431877",
"0.5734572",
"0.5729287",
"0.5722956",
"0.5721629",
"0.5719104",
"0.5712513",
"0.5699553",
"0.5691572",
"0.56675047",
"0.5661984",
"0.5630621",
"0.5612115",
"0.5600766",
"0.55960894",
"0.55913466",
"0.5579554",
"0.5577496",
"0.5565379",
"0.55521053",
"0.5538753",
"0.55382824",
"0.5517731",
"0.5496803",
"0.5489619",
"0.54825264",
"0.5479957",
"0.54660356",
"0.5465901",
"0.54652524",
"0.5465118",
"0.5462864",
"0.5453177",
"0.5448662",
"0.5436645",
"0.5436623",
"0.5429922",
"0.54246634",
"0.54240745",
"0.53660005",
"0.53595215",
"0.5359213",
"0.53564894",
"0.534996",
"0.5334018",
"0.5333116",
"0.5311616",
"0.5310408",
"0.53055286",
"0.5297621",
"0.5296118",
"0.5294627",
"0.5288",
"0.5284806",
"0.52749056",
"0.5273081",
"0.5272771",
"0.5272266",
"0.52702963",
"0.5269174",
"0.5268862",
"0.5267494",
"0.5265521",
"0.52652806",
"0.5264625"
] | 0.6670261 | 4 |
String name, String description, byte[] picture, long adminId | public Forum create(Forum forum) throws ForumNotValidException {
try {
Forum newForum = new Forum(forum.getForumName(), forum.getDescription(), forum.getForumAdminId(), forum.getPicture());
newForum.setCreationDate(new Date().toString());
forumRepository.save(newForum);
System.out.println("New Forum created.");
return newForum;
} catch (Exception e) {
throw new ForumNotValidException();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 }",
"byte[] getPhotoDetails(Long customerId,String type) throws EOTException;",
"Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"public void setImageName(String name) {\n imageToInsert = name;\n}",
"private void uploadImage(byte[] imageData) {\n\n }",
"@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"@Override\n public String getPicPhoto() {\n return pic_filekey;\n }",
"public PictureResult upload(byte[] fileBytes,String extName,String orignalName) throws Exception;",
"void register(byte[] imageData, ObjectImageType imageType, String uuid);",
"public void setAdminId(int adminId) {\n\t\tthis.adminId = adminId;\n\t}",
"public EmbeddedImage(byte[] bytes) throws KlvParseException {\n try {\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);\n embeddedImage = ImageIO.read(byteArrayInputStream);\n } catch (IOException ex) {\n LOGGER.error(\"\", ex);\n embeddedImage = null;\n }\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }",
"private void uploadFile() {\n //checking if file is available\n if (filePath != null) {\n //displaying progress dialog while image is uploading\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.show();\n\n //getting the storage reference\n StorageReference sRef = storageReference.child(\"admins/\" + System.currentTimeMillis() + \".\" + getFileExtension(filePath));\n\n //adding the file to reference\n sRef.putFile(filePath).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //dismissing the progress dialog\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n //displaying the upload progress\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\n }\n });\n } else {\n Toast.makeText(RegisterAsAdmin.this, \"File Error\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public String GetImagePart() {\n return \"coal\";\n }",
"public void addRpiPhoto(String rpiId, String time, String name, byte[] photo) throws SQLException, IOException;",
"public void setPicture(String picture) {\n this.picture = picture;\n }",
"public void add_admin(String admin_id, String admin_name, String admin_address, String admin_designation,\n\t\t\t double salary, String contact, boolean status_vacancy, String password,String admin_project_key)\n {\n\t\t\n \tadm_list.insert(new Admin(admin_id,admin_name,admin_address,admin_designation, salary,contact,status_vacancy,password,admin_project_key));\n \twrite_adm_file();\n }",
"byte[] getProfileImage();",
"public void upload(FileUploadEvent event){\n UploadedFile file = event.getFile();\n if(file != null){\n try {\n imagePic = new OracleSerialBlob(file.getContents());\n Long size = imagePic.length();\n putProfPic(imagePic);\n //setPhoto_profile(new ByteArrayContent(imagePic.getBytes(1, size.intValue())));\n } catch (SQLException ex) {\n LOG.error(ex);\n GBMessage.putErrorMessage(\"Error al subir el archivo\");\n } catch (IOException ex) {\n Logger.getLogger(StaffBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n GBMessage.putInfoMessage(\"Carga correcta\");\n }\n }",
"public void storePhoto(int receiptId, FileArguments args);",
"public UserEntity(){\n putFile(\"coverPhoto\");\n putFile(\"profilePhoto\");\n }",
"@PostMapping\n @PreAuthorize(KekRoles.USER_ADMIN)\n public ResponseEntity<String> addData(@RequestBody String image) {\n logger.info(\"Accepted requested to upload data to Cloud Storage for user\");\n\n byte[] encodedByte = Base64.decodeBase64(image.getBytes());\n\n ICloudStorageObject cloudStorageObject = cloudStorageService.uploadBinaryData(encodedByte);\n\n String url = cloudStorageObject.getUrlString();\n\n logger.info(\"Sending the url to uploaded data in Cloud Storage:\\n{}\", url);\n return ResponseEntity\n .status(HttpStatus.CREATED)\n .body(url);\n }",
"public void addAdmin(Admin admin);",
"public Builder setAdminBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n admin_ = value;\n onChanged();\n return this;\n }",
"public com.google.protobuf.ByteString\n getAdminBytes() {\n java.lang.Object ref = admin_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n admin_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"com.google.protobuf.ByteString\n getAdminBytes();",
"void addPhoto(User user, Photo photo);",
"protected void setPic() {\n }",
"@GET\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic byte[] returnPicture(){\n \t return ContainerPicture.picture;\n \t}",
"@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n String image = getStringImage(bitmap);\n\n //Creating parameters\n Map<String,String> params = new Hashtable<String, String>();\n\n //Adding parameters\n params.put(\"image\", image);\n params.put(\"userid\",userID);\n params.put(\"jodiUploadImg\",\"\");\n\n //returning parameters\n return params;\n }",
"private void saveAndUpload(String name, String email, Uri photoUri){\n\n // TODO implement save to local DB\n // TODO implement safe upload to Server\n }",
"public void setAdminName(String adminName) {\n\t\tthis.adminName = adminName;\n\t}",
"public void setAdminId(String adminId) {\n this.adminId = adminId == null ? null : adminId.trim();\n }",
"public void setAdminId(String adminId) {\n this.adminId = adminId == null ? null : adminId.trim();\n }",
"@PutMapping(value = KekMappingValues.GUID)\n @PreAuthorize(KekRoles.USER_ADMIN)\n public ResponseEntity<String> modifyData(@PathVariable String guid, @RequestBody String image) {\n logger.info(\"Accepted modified data from the client \");\n\n byte[] encodedByte = Base64.decodeBase64(image.getBytes());\n\n ICloudStorageObject cloudStorageObject = cloudStorageService.updateBinaryData(guid, encodedByte);\n\n String modifiedUrl = cloudStorageObject.getUrlString();\n\n logger.info(\"Sending the modified url to the client:\\n{}\", modifiedUrl);\n return ResponseEntity\n .status(HttpStatus.OK)\n .body(modifiedUrl);\n }",
"public String getPic() {\n return pic;\n }",
"public String getPic() {\n return pic;\n }",
"public String getStaticPicture();",
"void updateProfilePhoto(int userId, String filename);",
"public String getPicture() {\r\n return picture;\r\n }",
"public void setPhoto(String photo) {\r\n this.photo = photo;\r\n }",
"public void setPhoto(String photo) {\r\n this.photo = photo;\r\n }",
"public void setAdminName(String adminName) {\n\t\tAdminName = adminName;\n\t}",
"CommunityStorage createCommunityStorage( String name, byte[] user_short_pid ) \r\n throws CommunityException;",
"public static void creaAdmin(Admin admin) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CREATE_USER;\n\t\t\trp.userType = UserType.ADMIN;\n\t\t\trp.parameters = new Object[] { admin };\n\t\t\tsend(rp);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}",
"public static String putMedia(byte[] bytes) throws IOException {\n\t\t\n\t\tString value = HTTP.post(MEDIA_URL, bytes);\n\t\tLog.w(LogTags.BACKEND_WRITE, \"IN PUT MEDIA, media id: \" + value);\n\t\treturn value;\n\t}",
"@Override\n public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n GroupDao daoGroup = (GroupDao) this.getServletContext().getAttribute(\"dao-group\");\n\n assert ServletFileUpload.isMultipartContent(req);\n CloudStorageHelper storageHelper = (CloudStorageHelper) getServletContext().getAttribute(\"storageHelper\");\n\n String newImageUrl = null;\n Map<String, String> params = new HashMap<String, String>();\n try {\n FileItemIterator iter = new ServletFileUpload().getItemIterator(req);\n while (iter.hasNext()) {\n FileItemStream item = iter.next();\n if (item.isFormField()) {\n params.put(item.getFieldName(), Streams.asString(item.openStream()));\n } else if (!Strings.isNullOrEmpty(item.getName())) {\n newImageUrl = storageHelper.uploadFile(\n item, getServletContext().getInitParameter(\"personshelf.bucket\"));\n }\n }\n } catch (FileUploadException e) {\n throw new IOException(e);\n }\n\n try {\n Group oldGroup = daoGroup.readGroup(Long.decode(params.get(\"id\")));\n\n // [START personBuilder]\n Group group = new Group.Builder()\n .id(Long.decode(params.get(\"id\")))\n .name(params.get(\"name\"))\n .introduction(params.get(\"introduction\"))\n .category(params.get(\"category\"))\n .status(params.get(\"status\"))\n .description(params.get(\"description\"))\n .imageUrl(null == newImageUrl ? params.get(\"imageUrl\") : newImageUrl)\n // [START auth]\n .createdBy(oldGroup.getCreatedBy())\n .createdById(oldGroup.getCreatedById())\n .createdDate(oldGroup.getCreatedDate())\n // [END auth]\n .build();\n // [END groupBuilder]\n\n daoGroup.updateGroup(group);\n resp.sendRedirect(\"read?id=\" + params.get(\"id\"));\n } catch (Exception e) {\n throw new ServletException(\"Error updating group\", e);\n }\n }",
"@RolesAllowed(RoleEnum.ROLE_ADMIN)\n\tpublic Integer saveAdmin(Admin admin);",
"public interface ImageService {\n\n void saveImageFile(Long recipeId, MultipartFile imageFile);\n}",
"public void setAdmin(int admin) {\n this.admin = admin;\n }",
"@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n encodedImage = Base64.encodeToString(data, Base64.DEFAULT);\n galleryId = \"Company\";\n showEnterLabelDialog();\n camera.startPreview();\n }",
"public String getThumbnail();",
"public BioDataMetaData(String userId) {\n \n \n \n initComponents();\n this.userId=userId;\n \n Image img = new ImageIcon(System.getProperty(\"user.dir\")+\"/\"+\"ICON_LOGO.jpg\").getImage();\n this.setIconImage(img);\n this.setTitle(\"ADD NEW ITEM\"); \n// initComponents();\n }",
"public void setImage(String image){\n this.image = image;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getAdminBytes() {\n java.lang.Object ref = admin_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n admin_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\r\n\tpublic String getDescription() {\r\n\t\treturn \"Image Files\";\r\n\t}",
"void setImage(TokenEntry entry, @NonNull String newImage);",
"public void upload(FileUploadEvent event) {\r\n\t\tUploadedFile uploadFile = event.getFile();\r\n\t\t// Recuperer le contenu de l'image en byte array (pixels)\r\n\t\tbyte[] contents = uploadFile.getContents();\r\n\t\tSystem.out.println(\"---------------- \" + contents);\r\n\t\tproduit.setPhoto(contents);\r\n\t\t// Transforme byte array en string (format basé64)\r\n\t\timage = \"data:image/png;base64,\" + Base64.encodeBase64String(produit.getPhoto());\r\n\t\t\r\n\t}",
"public List selectByExampleWithBLOBs(TbAdminMenuExample example) {\n List list = getSqlMapClientTemplate().queryForList(\"tb_admin_menu.ibatorgenerated_selectByExampleWithBLOBs\", example);\n return list;\n }",
"public String getPhoto() {\r\n return photo;\r\n }",
"public String getPhoto() {\r\n return photo;\r\n }",
"Person addImage(String name, String imagePath);",
"private static void writeBLOBData() {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tconn = JDBCUtils.getMySQLConnection();\n\t\t\tString sql = \"INSERT INTO testblob(name, img) values(?,?)\";\n\t\t\tstmt = conn.prepareStatement(sql);\n\t\t\tstmt.setString(1, \"ke\");\n\t\t\tFile file = new File(\"D:\" + File.separator + \"test.jpg\");\n\t\t\tInputStream in = new FileInputStream(file);\n\t\t\tstmt.setBinaryStream(2, in, (int)file.length());\n\t\t\tstmt.executeUpdate();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tJDBCUtils.release(stmt, conn);\n\t\t}\n\t}",
"private void saveAndUploadAndSendNotification(byte[] bytes) throws IOException {\n Log.d(TAG, \"saving picture \");\n Bitmap pictureAsBitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n\n Matrix matrix = new Matrix();\n if (currentCamera == CAMERA_FRONT) {\n matrix.postRotate(-90);\n } else {\n if (currentCamera == CAMERA_BACK) {\n matrix.postRotate(90);\n }\n }\n Bitmap rotatedBitmap = Bitmap.createBitmap(pictureAsBitmap, 0, 0, pictureAsBitmap.getWidth(), pictureAsBitmap.getHeight(), matrix, true);\n\n Uri uri = getImageUri(getContext(), rotatedBitmap);\n\n double altitude = 0;\n double latitude = 0;\n double longitude = 0;\n if (currentLocation != null) {\n altitude = currentLocation.getAltitude();\n latitude = currentLocation.getLatitude();\n longitude = currentLocation.getLongitude();\n }\n HEPicture hePicture = new HEPicture(rotatedBitmap,\n uri.getLastPathSegment(),\n sizeOf(rotatedBitmap),\n altitude,\n latitude,\n longitude,\n cityName,\n Calendar.getInstance().getTime().toString()\n );\n HEPicture.getPictures().put(hePicture.getLastPathSegment(), hePicture);\n PictureListFragment.hePictureInterface.onNewPictureLoaded(hePicture.getLastPathSegment());\n HEPicture.savePicture(hePicture);\n uploadFromUri(uri, hePicture);\n }",
"public interface ArtMasterAttachmentManager {\n Map saveArtMasterAttachment(HttpServletRequest request, LogBean logBean) throws Exception;\n\n Map deleteArtMasterAttachment(HttpServletRequest request, LogBean logBean) throws Exception;\n}",
"public void setPic(byte[] data) {\n ParseFile pic = new ParseFile(getObjectId().toString()+ \".jpg\", data);\n //SAVE PIC THEN ONCE DONE, PERFORM SAVE ON THE PHOTO OBJECT\n pic.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error in uploading photo to Parse: \" + e);\n }\n }\n }, new ProgressCallback() {\n @Override\n public void done(Integer percentDone) {\n\n }\n });\n put(\"pic\", pic);\n saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error saving photo to Parse: \" + e);\n }\n }\n });\n }",
"public String getDescription() {\r\n\t return \"Just accept image file\";\r\n\t }",
"@Method(selector = \"thumbnail:imageData:width:height:completionBlock:\")\n\tpublic native void thumbnail(String name, NSData imageData, int width, int height, @Block App42ResponseBlock completionBlock);",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.900 -0500\", hash_original_method = \"BDD10C58ECCC962A5941D61E3DCCB1CC\", hash_generated_method = \"CC96DF6BBA141BCD4483A4EED9B38592\")\n \nprivate Photos() {}",
"private void buildPart(DataOutputStream dataOutputStream, byte[] fileData, String fileName) throws IOException {\n dataOutputStream.writeBytes(twoHyphens + boundary + lineEnd);\n dataOutputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"image\\\"; filename=\\\"\" + fileName + \"\\\"\" + lineEnd);\n // dataOutputStream.writeBytes(\"Content-Type: image/jpeg\" + lineEnd);\n dataOutputStream.writeBytes(lineEnd);\n\n ByteArrayInputStream fileInputStream = new ByteArrayInputStream(fileData);\n int bytesAvailable = fileInputStream.available();\n\n int maxBufferSize = 1024 * 1024;\n int bufferSize = Math.min(bytesAvailable, maxBufferSize);\n byte[] buffer = new byte[bufferSize];\n\n // read file and write it into form...\n int bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\n while (bytesRead > 0) {\n dataOutputStream.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n dataOutputStream.writeBytes(lineEnd);\n }",
"public void setPhoto(String aPhoto) {\n photo = aPhoto;\n }",
"public ServerInfo(String serverImageBase64, String motd) {\n this.logger = null;\n this.setImageBase64(serverImageBase64);\n this.setMotd(motd);\n }",
"@Multipart\n @PUT(\"photos\")\n Call<Photo> newPhoto(@Part(\"photo\") Photo photoObject,@Part(\"content\") byte[] picture);",
"private void setPhotoAttcher() {\n\n }",
"public Permission( String objName, String opName, boolean admin )\n {\n this.objName = objName;\n this.opName = opName;\n this.admin = admin;\n }",
"BlobInfo putBlob(byte[] data);",
"public void onSuccessfulImageCallback(byte[] byteArray, String Id){\r\n Bitmap bmp = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);\r\n PantAd ad = PantAdList.getAdById(Id);\r\n BitmapDrawable d = new BitmapDrawable(context.getResources(), bmp);\r\n ad.setImage(d);\r\n callbackInterface.onSuccessfulReadCallback();\r\n }",
"public void setImage(byte[] image) {\n this.image = image;\n }",
"public void setImage(byte[] image) {\n this.image = image;\n }",
"int updateByExampleWithBLOBs(@Param(\"record\") DashboardGoods record, @Param(\"example\") DashboardGoodsExample example);",
"void setImage(String image);",
"@Multipart\n @POST()\n Call<Result> uploadImage(@Part MultipartBody.Part file, @Url String medialUploadUrl, @PartMap() Map<String, RequestBody> partMap);",
"DashboardGoods selectOneByExampleWithBLOBs(DashboardGoodsExample example);",
"public static void generateUploadRichMedia()\n\t{\t\n\t\t\n\t\tAdvRMContentDetail rmContentDetail = new AdvRMContentDetail();\n\t\trmContentDetail.getContentId();\n\t\trmContentDetail.getAdGroupLandingURL();\n\t\trmContentDetail.getRmContent().getContentProvider();\n\t\n\t\t\n\t}",
"public String getPhoto() {\n return photo;\n }",
"public String getPhoto() {\n return photo;\n }",
"public Digital(int id, String title, String description, String image, String author, Date timePost, String shortDes) {\n this.id = id;\n this.title = title;\n this.description = description;\n this.image = image;\n this.author = author;\n this.timePost = timePost;\n this.shortDes = shortDes;\n }",
"public byte[] getPhoto() {\n return photo;\n }",
"@Override\n\tvoid postarFoto() {\n\n\t}",
"@ApiOperation(value = \"\", authorizations = {@Authorization(value = \"apiKey\")})\n @PostMapping(\"/update/{customerId}\")\n public ResponseEntity<ResponseDTO> changeImage(@PathVariable Long customerId,\n @RequestParam(\"photo\") MultipartFile photo) {\n Optional<Customer> optionalCustomer = this.customerRepository.findCustomerByIdAndDeleteFlag(customerId,\n Status.ACTIVE.getStatus());\n if (optionalCustomer.isPresent()) { // customer exist\n try {\n Optional<Avatar> optionalAvatar = this.customerRepository.findAvatarById(customerId);\n\n if (optionalAvatar.isPresent()) {// founded ava inside customer\n Avatar avatarFound = optionalAvatar.get();\n\n //xoa in source\n Path filePath = Paths.get(\"./uploads\").toAbsolutePath().resolve(avatarFound.getName()).normalize();\n File file = new File(filePath.toString());\n if (file.delete()) {\n //update\n this.avatarService.storeFile(photo, avatarFound);\n } else {\n throw new NotFoundException(\"Delete in store error\");\n }\n\n } else {\n //k co avatar inside customer\n Avatar avatar = new Avatar();\n //create/store\n this.avatarService.storeFile(photo, avatar);\n //add ava for customer\n this.customerService.updateAvatar(avatar, customerId);\n }\n\n } catch (NoSuchElementException e) {\n throw new NotFoundException(\"Opp!, Something problem, please try again.\");\n\n\n }\n } else {\n throw new NotFoundException(\"Customer not found id - \" + customerId);\n }\n\n responseDTO.setContent(true);\n responseDTO.setMessage(\"Create success!\");\n return new ResponseEntity<>(responseDTO, HttpStatus.OK);\n }",
"public interface PictureService {\n\n String uploadPicture(byte[] fileBuffer, String fileName) throws Exception;\n\n String uploadFile(String local_filename, String file_ext_name) throws Exception;\n\n}",
"public void setProfilePicture(byte[] profile_picture){\n this.profile_picture = profile_picture;\n }",
"public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesion actual\n //este es utilizado para ubicar la carpeta que le eprtenece\n String codUsuario=String.valueOf(new SessionLogica().obtenerUsuarioSession().getCodUsuario());\n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"post\"+File.separatorChar+codUsuario+File.separatorChar+\"all\"+File.separatorChar;\n //Asignacion de la ruta creada\n this.rutaImgPublicacion=ruta;\n }",
"@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n String image = getStringImage(bmpChange);\n\n\n //Creating parameters\n Map<String,String> params = new Hashtable<String, String>();\n\n //Adding parameters\n params.put(\"image\", image);\n\n //returning parameters\n return params;\n }",
"public void setPhoto(byte[] photo) {\n\t\tthis.photo = photo;\n\t}",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public byte[] getProfilePicture(){\n return profile_picture;\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n ServletOutputStream out = response.getOutputStream();\r\n \r\n \r\n if(request.getParameter(\"tambah\") != null && request.getParameter(\"tambah\").equals(\"Tambah\")){\r\n \r\n \r\n \r\n int Result= 0;\r\n String Nkacamata= request.getParameter(\"Nkacamata\");\r\n int Harga = Integer.parseInt(request.getParameter(\"harga\"));\r\n Harga = Harga;\r\n String deskripsi = request.getParameter(\"deskripsi\");\r\n String kategori = request.getParameter(\"kategori\");\r\n Part part = request.getPart(\"photo\");\r\n \r\n String photo= \"../img/\";\r\n \r\n try {\r\n String sql =\"INSERT INTO datakacamata (nama,harga,deskripsi,kategori,photo) VALUES(?,?,?,?,?)\";\r\n PreparedStatement statement = koneksi.koneksi.getConnection().prepareStatement(sql);\r\n InputStream is = part.getInputStream();\r\n statement.setString(1, Nkacamata);\r\n statement.setInt(2, Harga);\r\n statement.setString(3, deskripsi);\r\n statement.setString(4, kategori);\r\n statement.setBlob(5, is);\r\n \r\n Result=statement.executeUpdate();\r\n if(Result >0){\r\n System.out.println(\"Sukses coyyyy\");\r\n response.sendRedirect(\"admin\");\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Error\"+e.getMessage());\r\n }\r\n \r\n \r\n }else if(request.getParameter(\"edit\") != null && request.getParameter(\"edit\").equals(\"Edit\")){\r\n \r\n String id = request.getParameter(\"id\");\r\n String Nkacamata = request.getParameter(\"Nkacamata\");\r\n int harga = Integer.parseInt(request.getParameter(\"harga\"));\r\n String deskripsi = request.getParameter(\"deskripsi\");\r\n String kategori = request.getParameter(\"kategori\");\r\n // Part part = request.getPart(\"photo\");\r\n int Result = 0;\r\n String sql =\"UPDATE datakacamata SET nama=?, harga=?, deskripsi=?, kategori=? WHERE id=?\";\r\n \r\n try{\r\n PreparedStatement statement = koneksi.koneksi.getConnection().prepareStatement(sql);\r\n //InputStream is = part.getInputStream(); \r\n statement.setString(1, Nkacamata);\r\n statement.setInt(2, harga);\r\n statement.setString(3, deskripsi);\r\n statement.setString(4, kategori);\r\n// statement.setBlob(5, is);\r\n statement.setString(5, id);\r\n Result=statement.executeUpdate();\r\n if(Result > 0){\r\n response.sendRedirect(\"admin\");\r\n }\r\n \r\n System.out.println(\"SUkses\");\r\n }catch(Exception e){\r\n System.out.println(\"Error\"+e.getMessage());\r\n }\r\n }else if(request.getParameter(\"regist\") != null && request.getParameter(\"regist\").equals(\"Regist\")){\r\n \r\n String username = request.getParameter(\"username\");\r\n String nama = request.getParameter(\"nama\");\r\n String email = request.getParameter(\"email\");\r\n String password = request.getParameter(\"password\");\r\n String jenkel = request.getParameter(\"jenkel\");\r\n \r\n String sql =\"INSERT INTO admin (username, nama, email, password, jenkel)VALUES(?,?,?,?,?)\";\r\n \r\n try{\r\n PreparedStatement statement = koneksi.koneksi.getConnection().prepareStatement(sql);\r\n statement.setString(1, username);\r\n statement.setString(2, nama);\r\n statement.setString(3, email);\r\n statement.setString(4, password);\r\n statement.setString(5, jenkel);\r\n statement.executeUpdate();\r\n System.out.println(\"SUkses\");\r\n response.sendRedirect(\"proses/loginadmin\");\r\n }catch(Exception e){\r\n System.out.println(\"Error\"+e.getMessage());\r\n }\r\n }\r\n \r\n \r\n }",
"public void setAdmin(boolean admin) {\n this.admin = admin;\n }",
"public Photo( long id, String title, String description, Date creationDate, Date modifiedDate, long width, long height, double weight, double latitude, double longitude, double altitude, String address )\n\t{\n\t\tthis.id = id;\n\t\tthis.title = title;\n\t\tthis.description = description;\n\t\tthis.creationDate = creationDate;\n\t\tthis.modifiedDate = modifiedDate;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.weight = weight;\n\t\tthis.latitude = latitude;\n\t\tthis.longitude = longitude;\n\t\tthis.altitude = altitude;\n\t\tthis.address = address;\n\t}"
] | [
"0.5861403",
"0.57816696",
"0.57030046",
"0.55505157",
"0.5429226",
"0.54051715",
"0.5322486",
"0.53093135",
"0.5306339",
"0.52794904",
"0.5194349",
"0.51071566",
"0.50762784",
"0.5072187",
"0.50531507",
"0.50349265",
"0.50188786",
"0.50153875",
"0.5004552",
"0.49607456",
"0.4960069",
"0.4958921",
"0.49541494",
"0.49513808",
"0.49495646",
"0.49478358",
"0.49460813",
"0.49451146",
"0.4943068",
"0.4938375",
"0.49310395",
"0.49250042",
"0.49240255",
"0.490246",
"0.490246",
"0.48996374",
"0.4897948",
"0.4897948",
"0.48967972",
"0.4894623",
"0.48930386",
"0.48863086",
"0.48863086",
"0.48850298",
"0.4883113",
"0.4882714",
"0.48765552",
"0.4876146",
"0.4874729",
"0.48712483",
"0.4865059",
"0.48629916",
"0.4860088",
"0.48595452",
"0.48549315",
"0.48538196",
"0.4846626",
"0.48447052",
"0.4841238",
"0.48385638",
"0.48349962",
"0.48349962",
"0.48307282",
"0.48295867",
"0.48283225",
"0.4827854",
"0.4826655",
"0.48166183",
"0.48145634",
"0.4808613",
"0.4804714",
"0.4804596",
"0.48025814",
"0.4801685",
"0.4795912",
"0.47954533",
"0.47951946",
"0.4794845",
"0.4789177",
"0.4789177",
"0.4785817",
"0.47831595",
"0.47814143",
"0.47778636",
"0.47774094",
"0.47730082",
"0.47730082",
"0.47723642",
"0.47709188",
"0.47642055",
"0.47632098",
"0.47619474",
"0.47608504",
"0.47526708",
"0.47475308",
"0.47463202",
"0.47446555",
"0.47431672",
"0.47385377",
"0.47369304",
"0.47299656"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onStart() {
super.onStart();
scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
//每隔2秒钟切换一张图片
scheduledExecutorService.scheduleWithFixedDelay(new ViewPagerTask(), 3, 4, TimeUnit.SECONDS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66713095",
"0.6567948",
"0.652319",
"0.648097",
"0.64770466",
"0.64586824",
"0.64132667",
"0.6376419",
"0.62759",
"0.62545097",
"0.62371093",
"0.62237984",
"0.6201738",
"0.619477",
"0.619477",
"0.61924416",
"0.61872935",
"0.6173417",
"0.613289",
"0.6127952",
"0.6080854",
"0.6076905",
"0.6041205",
"0.6024897",
"0.60200036",
"0.59985113",
"0.5967729",
"0.5967729",
"0.5965808",
"0.5949083",
"0.5941002",
"0.59236866",
"0.5909713",
"0.59030116",
"0.589475",
"0.58857024",
"0.58837134",
"0.586915",
"0.58575684",
"0.5850424",
"0.5847001",
"0.5824116",
"0.5810248",
"0.5809659",
"0.58069366",
"0.58069366",
"0.5800507",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.5792168",
"0.57900196",
"0.5790005",
"0.578691",
"0.578416",
"0.578416",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5774115",
"0.5761079",
"0.57592577",
"0.57592577",
"0.5749888",
"0.5749888",
"0.5749888",
"0.5748457",
"0.5733414",
"0.5733414",
"0.5733414",
"0.57209575",
"0.57154554",
"0.57149583",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.57140404",
"0.571194",
"0.57043016",
"0.56993437",
"0.5696782",
"0.5687825",
"0.5677794",
"0.5673577",
"0.5672046",
"0.5669512",
"0.5661156",
"0.56579345",
"0.5655569",
"0.5655569",
"0.5655569",
"0.56546396",
"0.56543446",
"0.5653163",
"0.56502634"
] | 0.0 | -1 |
Je recupere la saise de l'utilisateur | @Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String celsius = req.getParameter("celsius");
try {
double celsiusDouble = Double.parseDouble(celsius);
double farenheit = 1.8 * celsiusDouble + 32;
BigDecimal resultat = BigDecimal.valueOf(farenheit);
resultat = resultat.setScale(2, RoundingMode.HALF_UP);
//J'encapsule le resultat dans la requete en tant qu'attribut
req.setAttribute("resultat", resultat);
} catch (NumberFormatException e) {
req.setAttribute("error", "Erreur de saisie");
} finally {
doGet(req, resp);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View v) {\n trasferisci_utente();\n\n // controlla se tutti i dati sono inseriti\n if (checkInput())\n {\n creaUser();\n NOME = username.getText().toString();\n CHIAVE = password.getText().toString();\n\n // controlla se l'utente USER con i dati inseriti negli edit_text è gia presente\n if (checkUser(persone, NOME, CHIAVE)) {\n\n errore_utente.setVisibility(View.GONE);\n\n // impedisce a due utenti di avere lo stesso username\n if(checkUsername(persone, NOME)) {\n\n errore_duplicato_username.setVisibility(View.GONE);\n\n persone.add(user);\n\n Intent showResult = new Intent(Registration.this, MainActivity.class);\n showResult.putExtra(PERSONA_PATH, persone);\n //showResult.putExtra(UTENTE_PATH, user);\n startActivity(showResult);\n } else {\n errore_duplicato_username.setVisibility(View.VISIBLE);\n }\n } else {\n errore_utente.setVisibility(View.VISIBLE);\n }\n }\n }",
"protected void accionUsuario() {\n\t\t\r\n\t}",
"public void effacerUtilisateur() {\r\n this.modele.effacerUtilisateur(this.modele);\r\n this.modele = new Utilisateurs();\r\n }",
"@Override\r\n\tpublic Utilisateur getUser(String nom) {\n\t\treturn null;\r\n\t}",
"public void subeUsuario() {\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameEditText);\n\t\tstrNickname = nicknameText.getText().toString().trim();\n\t\t\n\t\tif (strNickname.equals(\"\")) {\n\t\t\tToast.makeText(this, \"Nickname no puede estar vacío\",Toast.LENGTH_LONG).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tguardarPreferences();\n\t\t\n\t\t//lanzamos un uploadService\n\t\tIntent uploadService = new Intent(getApplicationContext(),UploadUserService.class);\n\t\t\n\t\tuploadService.putExtra(\"id\", userId);\n\t\tuploadService.putExtra(\"nickname\", strNickname);\n\t\tuploadService.putExtra(\"mail\", strEmail);\n\t\tuploadService.putExtra(\"dob\", dayOfBirth);\n\t\tuploadService.putExtra(\"pass\", strPassword);\n\t\tuploadService.putExtra(\"genero\", gender);\n\t\tuploadService.putExtra(\"avatar\", strAvatar);\n\t\t\n\t\tstartService(uploadService);\n\t}",
"@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}",
"@Listen(\"onChange = #txtUsuario; onOK = #txtUsuario\")\r\n\tpublic void buscarPorLogin() {\r\n\t\tUsuario usuario = servicioUsuario.buscarPorLogin(txtUsuario.getValue());\r\n\t\tif (usuario != null)\r\n\t\t\tllenarCamposUser(usuario);\r\n\t\telse {\r\n\t\t\tmsj.mensajeAlerta(Mensaje.noHayRegistros);\r\n\t\t\tidUser = \"TODOS\";\r\n\t\t\ttxtUsuario.setValue(\"TODOS\");\r\n\t\t\tlblUsuario.setValue(\"TODOS\");\r\n\t\t\ttxtUsuario.setFocus(true);\r\n\t\t}\r\n\t}",
"public String getUsuario() {\r\n return usuario;\r\n }",
"public String getUsuario() {\r\n return usuario;\r\n }",
"private void serchUser() {\n if (!userNameTextField.getText().isEmpty() && !passwordPasswordField.getText().isEmpty()) {\n try {\n User user = UserController.searchUserByUserName(userNameTextField.getText());\n if (user != null) {\n if (passwordPasswordField.getText().equals(user.getPassword())) {\n closeFadeOut();\n Hi hi = new Hi();\n hi.setUser(user);\n hi.setVisible(true);\n dispose();\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Please enter username and password\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n }",
"public String chaveSecundaria(){\r\n return this.email;\r\n }",
"public void zmienDaneUzytkownika() throws SQLException {\n String noweImie = userEdycjaNoweImie.getText().trim();\n String noweNazwisko = userEdycjaNoweNazwisko.getText().trim();\n String nowyEmail = userEdycjaNoweAdresEmail.getText().trim();\n String nowyNumerKontaktowy = userEdycjaNowyNumerKontaktowy.getText().trim();\n\n Driver.editUser(noweImie, noweNazwisko, nowyNumerKontaktowy, nowyEmail);\n }",
"protected String getUsuario() {\n return this.usuario;\n }",
"public String getUsuario() {\r\n return Usuario;\r\n }",
"public String getPassUsuario() {\r\n return passUsuario;\r\n }",
"public void setUsuarioInsercion(String p) { this.usuarioInsercion = p; }",
"public void setUsuarioInsercion(String p) { this.usuarioInsercion = p; }",
"public String usuarioconectado() {\n\t\tString nome;\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n\t\tif (principal instanceof UserDetails) {\n\t\t\tnome = ((UserDetails) principal).getUsername();\n\t\t} else {\n\t\t\tnome = principal.toString();\n\t\t}\n\t\t// System.out.println(nome);\n\t\treturn nome;\n\t}",
"private void actualizaUsuario() {\n\t\t\n\t\tInteger edad=miCoordinador.validarEdad(campoEdad.getText().trim());\n\t\t\n\t\tif (edad!=null) {\n\t\t\t\n\t\t\tUsuarioVo miUsuarioVo=new UsuarioVo();\n\t\t\t//se asigna cada dato... el metodo trim() del final, permite eliminar espacios al inicio y al final, en caso de que se ingresen datos con espacio\n\t\t\tmiUsuarioVo.setDocumento(campoDocumento.getText().trim());\n\t\t\tmiUsuarioVo.setNombre(campoNombre.getText().trim());\n\t\t\tmiUsuarioVo.setEdad(Integer.parseInt(campoEdad.getText().trim()));\n\t\t\tmiUsuarioVo.setProfesion(campoProfesion.getText().trim());\n\t\t\tmiUsuarioVo.setTelefono(campoTelefono.getText().trim());\n\t\t\tmiUsuarioVo.setDireccion(campoDireccion.getText().trim());\n\t\t\t\n\t\t\tString actualiza=\"\";\n\t\t\t//se llama al metodo validarCampos(), este retorna true o false, dependiendo de eso ingresa a una de las opciones\n\t\t\tif (miCoordinador.validarCampos(miUsuarioVo)) {\n\t\t\t\t//si se retornó true es porque todo está correcto y se llama a actualizar\n\t\t\t\tactualiza=miCoordinador.actualizaUsuario(miUsuarioVo);//en registro se almacena ok o error, dependiendo de lo que retorne el metodo\n\t\t\t}else{\n\t\t\t\tactualiza=\"mas_datos\";//si validarCampos() retorna false, entonces se guarda la palabra mas_datos para indicar que hace falta diligenciar los campos obligatorios\n\t\t\t}\n\t\t\t\n\t\t\t//si el registro es exitoso muestra un mensaje en pantalla, sino, se valida si necesita mas datos o hay algun error\n\t\t\tif (actualiza.equals(\"ok\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Se ha Modificado Correctamente \",\"Confirmación\",JOptionPane.INFORMATION_MESSAGE);\t\t\t\n\t\t\t}else{\n\t\t\t\tif (actualiza.equals(\"mas_datos\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe Ingresar los campos obligatorios\",\"Faltan Datos\",JOptionPane.WARNING_MESSAGE);\t\t\t\n\t\t\t\t}else{\n\t\t JOptionPane.showMessageDialog(null, \"Error al Modificar\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar una edad Valida!!!\",\"Advertencia\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\t\t\t\n\t}",
"public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n \r\n }",
"private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUsuarioPojo user = null;\r\n\t\t\t\tUsuarioPersistencia up = new UsuarioPersistencia();\r\n\r\n\t\t\t\t//int id = up.obtenerIdEmple();\r\n\t\t\t\tString usuarioMail = txtUsuario.getText();\r\n\t\t\t\tString password = new String(pwdPass.getPassword()); // DNI de momento\r\n\t\t\t\tString passwordC = new String(pwdConfPass.getPassword());\r\n\t\t\t\tString apenom = txtApenom.getText();\r\n\t\t\t\tString dni = txtDni.getText();\r\n\t\t\t\tint numSS = Integer.parseInt(txtSegSoc.getText());\r\n\t\t\t\tString cuenta = txtCuenta.getText();\r\n\r\n\t\t\t\tif (password.equals(passwordC)) {\r\n\t\t\t\t\t// creamos un objeto usuario si coinciden las contraseñas\r\n\t\t\t\t\tuser = new UsuarioPojo(apenom, numSS, cuenta, dni, usuarioMail, password);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (user != null) {\r\n\t\t\t\t\t// insertaremos el usuario si coinciden las contraseñas\r\n\t\t\t\t\tup = new UsuarioPersistencia();\r\n\t\t\t\t\tint res = up.insertarUser(user);\r\n\r\n\t\t\t\t\tif (res == 1) { // se habrá registrado al usuario\r\n\t\t\t\t\t\tSystem.out.println(\"Insertado correctamente\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Registro insertado correctamente\",\r\n\t\t\t\t\t\t\t\t\"Resultado del Registro\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\tdispose(); // dispose cierra ventana actual, System.exit(0) sale del programa\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// mostramos msg si no coinciden las contraseñas, manteniendo el control en dreg\r\n\t\t\t\t\tSystem.out.println(\"No insertado\");\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Contraseñas introducidas no coinciden\", \"Error de contraseña\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t// limpiamos campos de contraseña\r\n\t\t\t\t}\r\n\t\t\t}",
"private void actualizarUsuario() {\n\n\n if (!altura_et.getText().toString().isEmpty() && !peso_et.getText().toString().isEmpty() &&\n !email_et.getText().toString().isEmpty() && !nombreUO_et.getText().toString().isEmpty()) {\n\n user.setAltura(Integer.parseInt(altura_et.getText().toString()));\n user.setPeso(Integer.parseInt(peso_et.getText().toString()));\n user.setCorreo(email_et.getText().toString());\n user.setUserID(nombreUO_et.getText().toString());\n\n\n }else\n Toast.makeText(this,\"Comprueba los datos\", Toast.LENGTH_LONG).show();\n\n }",
"public java.lang.String getUsuario();",
"public HTMLInputElement getElementUsuarioInsercion() { return this.$element_UsuarioInsercion; }",
"public HTMLInputElement getElementUsuarioInsercion() { return this.$element_UsuarioInsercion; }",
"@SuppressWarnings(\"deprecation\")\r\n\tprivate void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\r\n \t//valeur de centre d'inetret\r\n \tString domaine = String.valueOf(jComboBox1.getSelectedItem());\r\n \tSystem.out.println(\"nom \"+jTextField2.getText().toString());\r\n \tSystem.out.println(\"prenom \"+jTextField1.getText());\r\n \tSystem.out.println(\"domaine \"+domaine);\r\n \tSystem.out.println(\"mdp \"+jPasswordField1.getText().toString());\r\n\r\n \t//créer l'utilisateur\r\n \tif(jTextField2.getText().equals(\"\")||jTextField1.getText().equals(\"\")||jPasswordField1.getText().equals(\"\"))\r\n \t{\r\n \t\r\n jLabel6.setText(\"Veuillez remplire tous les champs!!!\");\r\n\r\n \t}\r\n \telse\r\n \t{\r\n \t\tint i=0;\r\n \t\tUtilisateur user=new Utilisateur(jTextField2.getText().toString(),jTextField1.getText().toString(),domaine,jPasswordField1.getText().toString(),new ArrayList<file>());\r\n\r\n \t\tif(!users.getInfo().isEmpty()) {\r\n \t\twhile(i<users.getInfo().size())\r\n \t{\r\n \t\tSystem.out.println(\"user ----> \"+users.getInfo().get(i).getUser().getNom());\r\n \t\tSystem.out.println(\"user ----> \"+nomAgent);\r\n \t\tSystem.out.println(\"user ----> \"+mtpAgent);\r\n\r\n \t\t//vérification\r\n \t\tif(users.getInfo().get(i).getUser().getNom().equalsIgnoreCase(nomAgent)\r\n \t\t\t\t&&(users.getInfo().get(i).getUser().getMot_de_passe().equals(mtpAgent))\r\n \t\t\t\t)\r\n \t\t\t\t{\r\n \t\t\t\r\n \t\t\tSystem.out.println(\"utilisateur modifié trouvé \");\r\n \t\t\t//la modification\r\n\r\n \t\t\tusers.getInfo().get(i).setUser(user);\r\n \t\t\t\r\n \t\t\t/*users.getInfo().get(i).getUser().setNom(nomAgent);\r\n \t\tusers.getInfo().get(i).getUser().setPrenom(prenomAgent);\r\n \t\tusers.getInfo().get(i).getUser().setDomaine(domaineAgent);\r\n \t\tusers.getInfo().get(i).getUser().setMot_de_passe(jPasswordField1.getText());*/\r\n \t\t\tSystem.out.println(\"new name \"+users.getInfo().get(i).getUser().getNom());\r\n \t\t\tSystem.out.println(\"new prenom \"+user.getPrenom());\r\n \t\t\tSystem.out.println(\"new mtp \"+users.getInfo().get(i).getUser().getMot_de_passe());\r\n \t\t\tSystem.out.println(\"new domaine \"+users.getInfo().get(i).getUser().getDomaine());\r\n \t\t\tIndex.récuperation(user.getNom(), user.getPrenom(), user.getDomaine(), user.getMot_de_passe());\r\n \t\t\tIndex.affecterAgentInfo(users.getInfo().get(i),i);\r\n \t\t\t new Index();\r\n \t\t\t this.setVisible(false);\r\n \t\t\t this.dispose();\r\n\r\n \t\t\t\t}\r\n \t\ti++;\r\n \t}\r\n \t}\r\n \t\tif(!users.getMath().isEmpty()) {\r\n \t\twhile(i<users.getMath().size())\r\n \t{\r\n \t\tSystem.out.println(\"user ----> \"+users.getMath().get(i).getUser().getNom());\r\n \t\t//vérification\r\n \t\tif(users.getMath().get(i).getUser().getNom().equalsIgnoreCase(nomAgent)\r\n \t\t\t\t&&(users.getMath().get(i).getUser().getMot_de_passe().equals(mtpAgent))\r\n \t\t\t\t)\r\n \t\t\t\t{\r\n \t\t\t\r\n \t\t\tSystem.out.println(\"utilisateur modifié trouvé \");\r\n \t\t\t//la modification\r\n\r\n \t\t\tusers.getMath().get(i).setUser(user);\r\n \t\t\t\r\n \t\t\t/*users.getInfo().get(i).getUser().setNom(nomAgent);\r\n \t\tusers.getInfo().get(i).getUser().setPrenom(prenomAgent);\r\n \t\tusers.getInfo().get(i).getUser().setDomaine(domaineAgent);\r\n \t\tusers.getInfo().get(i).getUser().setMot_de_passe(jPasswordField1.getText());*/\r\n \t\t\tSystem.out.println(\"new name \"+users.getMath().get(i).getUser().getNom());\r\n \t\t\tSystem.out.println(\"new prenom \"+users.getMath().get(i).getUser().getPrenom());\r\n \t\t\tSystem.out.println(\"new mtp \"+users.getMath().get(i).getUser().getMot_de_passe());\r\n \t\t\tSystem.out.println(\"new domaine \"+users.getMath().get(i).getUser().getDomaine());\r\n \t\t\tIndex.récuperation(user.getNom(), user.getPrenom(), user.getDomaine(), user.getMot_de_passe());\r\n\r\n \t\t\tIndex.affecterAgentMath(users.getMath().get(i));\r\n \t\t\t new Index();\r\n \t\t\t this.setVisible(false);\r\n \t\t\t this.dispose();\r\n\r\n \t\t\t\t}\r\n \t\ti++;\r\n \t}\r\n \t}\r\n \t\t\r\n\r\n \t\t\r\n \t\t\r\n \t\r\n \t\t\t\r\n \t\t\t\r\n \t\t\t}\r\n \t\t\r\n \r\n \t\r\n\r\n \t\r\n \t\r\n \t }",
"private void metodoSalvarUsuarioFirebase(final Usuarios variavelClasseUsuarios) {\n\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n refAutenticacaofb.createUserWithEmailAndPassword(variavelClasseUsuarios.getEmail(),\n variavelClasseUsuarios.getSenha()).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n\n idUsuario = task.getResult().getUser().getUid();\n variavelClasseUsuarios.setId(idUsuario);\n variavelClasseUsuarios.salvarUsuario();\n\n if(pegarTipoUsuarioSwitch() == \"Cliente\"){\n\n startActivity(new Intent(CadastroUsuario.this, Home.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Usuário salvo com sucesso\", Toast.LENGTH_LONG).show();\n }else{\n\n startActivity(new Intent(CadastroUsuario.this, PainelEmpresa.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Empresa inserida com sucesso!\", Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n\n\n }\n });\n\n }",
"public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n }",
"public void setUsuario(String usuario) {\r\n this.usuario = usuario;\r\n }",
"public void altaUsuario();",
"private void controladorUser(Controlador controlador){\n this.contUserCrearProyecto = controlador.getUserCrearProyecto();\n inicioUser.setControlCrearProyecto(contUserCrearProyecto);\n \n this.contUserCrearColectivo = controlador.getUserCrearColectivo();\n inicioUser.setControlCrearColectivo(contUserCrearColectivo);\n\n this.contInformes = controlador.getInformes();\n inicioUser.setControlSolicitarInformes(contInformes); \n \n this.contFiltrar = controlador.getFiltrar();\n inicioUser.setControlFiltrar(contFiltrar);\n\n this.contLimpiar = controlador.getLimpiarFiltro();\n inicioUser.setControlLimpiarFiltro(contLimpiar);\n }",
"@Override\n public void onResume() {\n if(currentUser != null){\n btnEnviar.setEnabled(false);\n DatabaseReference referenciaTipo = FirebaseDatabase.getInstance().getReference().child(\"usuarios\").child(currentUser);\n referenciaTipo.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Usuarios usuarios = dataSnapshot.getValue(Usuarios.class);\n nombreUsuarioLog = usuarios.getNombre();\n textNombre.setText(nombreUsuarioLog);\n btnEnviar.setEnabled(true);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }else{\n returnLogin();\n }\n super.onResume();\n }",
"private void B_InscrireActionPerformed(java.awt.event.ActionEvent evt) {\n \n String ident=T_Email.getText();\n String mdp1=String.valueOf(Ps_Mdp.getPassword());\n String mdp2=String.valueOf(Ps_ConfirmeMdp.getPassword());\n String prenom_uti=prenom.getText();\n String nom_uti=nom.getText();\n \n boolean ajout;\n \n if (mdp1.equals(mdp2)){\n System.out.println(\"Les deux mots de passe correspondent\");\n Bdd bdd = new Bdd();\n \n //On vérifie que l'utilisateur existe pas déjà\n boolean exists = bdd.liste_uti(ident);\n \n if(exists==true){ //alors on ajoute\n bdd.Inscription(ident,mdp1,prenom_uti,nom_uti);\n AffichageConnexion Aff = new AffichageConnexion();\n Aff.setLocationRelativeTo(null);\n Aff.setVisible(true);\n this.dispose();\n }\n else {\n System.out.println(\"existe déjà\");\n } \n }\n else \n System.out.println(\"mdp diff\");\n }",
"@Override\n\tpublic Usuario mostrar() {\n\t\tLOG.info(\"Mostrar los datos del usuario\");\n\t\treturn usuario;\n\t}",
"public HTMLElement getElementUsuarioInsercionEd() { return this.$element_UsuarioInsercionEd; }",
"@Override\n public void onClick(View v) {\n String cnpj_email = campo_CNPJ_email.getText().toString();\n String senhaLogim = campoSenha.getText().toString();\n\n //testar se nao estao vazios\n if (!cnpj_email.isEmpty()){\n\n //if para o campo senha\n if (!senhaLogim.isEmpty()){\n\n usuarioCliente = new UsuarioCliente();\n usuarioCliente.setEmail(cnpj_email);\n usuarioCliente.setSenha(senhaLogim);\n //metodo que valida login\n validarLogin(usuarioCliente);\n\n }else{\n Toast.makeText(AutentinticacaoActivity.this,\"Preencha o campo CNPJ/Email\",\n Toast.LENGTH_SHORT).show();\n }\n }else{\n\n Toast.makeText(AutentinticacaoActivity.this,\"Preencha o campo Senha\",\n Toast.LENGTH_SHORT).show();\n }\n }",
"public void createUtilisateur(UtilisateurBean u) {\n\t}",
"@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}",
"public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void cadastrarUsuario(View view){\n String textoNome= campoNome.getText().toString();\n String textoEmail= campoEmail.getText().toString();\n String textoSenha= campoSenha.getText().toString();\n\n\n if(!textoNome.isEmpty()){\n if(!textoEmail.isEmpty()){\n if(!textoSenha.isEmpty()){\n Usuario usuario = new Usuario();\n usuario.setNome(textoNome);\n usuario.setEmail(textoEmail);\n usuario.setSenha(textoSenha);\n salvarUsuario(usuario);\n\n home();\n finish();\n }else{ exibirMensagem(\"preencha sua senha\"); }\n }else{ exibirMensagem(\"preencha seu email\"); }\n }else{ exibirMensagem(\"Digite seu nome\"); }\n }",
"public void setLoggedUser(PersAdministrativo usuario){\n this.usuario = usuario;\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"private User getUser() {\n String phone = editTextPhone.getText().toString();\n String username = editTextUsername.getText().toString();\n String password = editTextPassword.getText().toString();\n String password2 = editTextPassword2.getText().toString();\n if (phone.isEmpty()) {\n Toast.makeText(getActivity(), \"Số điện thoại không được để trống\", Toast.LENGTH_LONG).show();\n editTextPhone.requestFocus();\n } else if (username.isEmpty()) {\n Toast.makeText(getActivity(), \"Tên không được để trống\", Toast.LENGTH_LONG).show();\n editTextUsername.requestFocus();\n } else if (password.isEmpty()) {\n Toast.makeText(getActivity(), \"Password không được để trống\", Toast.LENGTH_LONG).show();\n editTextPassword.requestFocus();\n } else if (!password2.equals(password)) {\n Toast.makeText(getActivity(), \"Password nhập lại không không trùng khớp\", Toast.LENGTH_LONG).show();\n editTextPassword2.requestFocus();\n } else {\n User user = new User(phone, username, password);\n return user;\n }\n return null;\n }",
"@Override\n\tpublic Usuario modificar() {\n\t\tLOG.info(\"Se modifico el usuario de la bd\");\n\t\treturn usuario;\n\t}",
"private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}",
"private void loguearUsuario() {\n\n final FirebaseAuth auth = FirebaseAuth.getInstance();\n FirebaseUser user = auth.getCurrentUser();\n // consigue el usuario\n final String email = editTextEmail.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n\n if (TextUtils.isEmpty(email)) {\n Toast.makeText(this, \"Se debe ingresar un email\", Toast.LENGTH_LONG).show();\n return;\n }\n if (TextUtils.isEmpty(password)) {\n Toast.makeText(this, \"Falta ingresar la contraseña\", Toast.LENGTH_LONG).show();\n return;\n }\n\n progressDialog.setMessage(\"Realizando consulta en linea...\");\n progressDialog.show();\n\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n // la misma funcion que en el caso anterior pero para poder ingresar\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup\n\n if (task.isSuccessful()) {\n // si el usuario se encontraba creado entonces la tarea es exitosa\n\n int pos = email.indexOf(\"@\");\n userstring = email.substring(0, pos); //consigue el nombre del usuario\n Toast.makeText(Login.this, \"Bienvenido: \" + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail\n Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad\n intencion.putExtra(\"user\", email); // le pasa como dato al usuario ingresado a la proxima actividad\n startActivity(intencion); //hay que hacer el get del usuario en la parte principal\n // userapasar = user;\n loged = true;\n\n } else {\n loged = false;\n\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn\n\n Toast.makeText(Login.this, \"Procesando\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"\", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }\n });\n }",
"public static void tener_Usuario_activo() {\n\t\t\t\tdesktop.<DomTextField>find(\"//BrowserApplication//BrowserWindow//input[@id='username']\").typeKeys(\"ocastro\");\n\t\t\t\tdesktop.<DomTextField>find(\"//BrowserApplication//BrowserWindow//input[@id='password']\").setText(\"bogota2016\");\n\t\t\t\tdesktop.<DomButton>find(\"//BrowserApplication//BrowserWindow//input[@id='loginbtn']\").click();\n\t\t\t\t//end recording\n\t\t\t\tSerenity.takeScreenshot();\n\t}",
"public void registrarUsuarioFinal(){\r\n Usuario nuevoUsuario= new Usuario();\r\n nuevoUsuario.setNombreUsuario(nuevoNombreUsuario);\r\n nuevoUsuario.setPassword(nuevoPasswordUsuario);\r\n nuevoUsuario.setTipoUsuario(\"final\");\r\n \r\n IUsuarioDAO iusuarioDAO = new UsuarioDAOImp();\r\n iusuarioDAO.agregarUsuario(nuevoUsuario);\r\n FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Usuario registrado\", \"Usuario registrado exitosamente\");\r\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\r\n\r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(requestCode == 78 && resultCode == RESULT_OK ){\n\n user = data.getExtras().getString(\"usuarioP\");\n pass = data.getExtras().getString(\"contraseñaP\");\n correo = data.getExtras().getString(\"correoP\");\n\n // tTemporal2.setText(\"vengo de perfil\" + user + \"\\n\" + pass);\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }",
"public void editUser(userBean utilisateur){\r\n\t\ttry {\r\n\t\t//La requ�te sql qui permet de modifier un enregistrement\r\n\t\t\tString sql = \"UPDATE utilisateur set nom=? ,prenom=? where id=?;\";\r\n\t\t//toujours en fait appelle a la methode PrepareStatement\r\n\t\t//pour pr�parer la requ�te sql et permettre de remplacer les '?' par \r\n\t\t//Les variables correspondantes\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\r\n\t\t\t\tps.setString(1, utilisateur.getNom());\r\n\t\t\t\tps.setString(2, utilisateur.getPrenom());\r\n\t\t\t\tps.setInt(3, utilisateur.getID());\r\n\t\t\t// ex�cuter la requ�te \r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t//g�rer les exceptions\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public HTMLInputElement getElementUsuarioModificacion() { return this.$element_UsuarioModificacion; }",
"public HTMLInputElement getElementUsuarioModificacion() { return this.$element_UsuarioModificacion; }",
"public void ajouterRole(RoleUtilisateur ru);",
"private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}",
"public Cgg_res_oficial_seguimiento_usuario(){}",
"private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }",
"public void recuperandoDadosUsuarioescolhido(){\n Bundle bundle = getIntent().getExtras();\n if (bundle != null){\n if (bundle.containsKey(\"usuarioSelecionado\")){\n dadosDoUsuario = (Usuario) bundle.getSerializable(\"usuarioSelecionado\");\n }\n }\n\n // Configurando Toolbar\n\n toolbar.setTitle(dadosDoUsuario.getNome());\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n // Configurando Imagem\n if (dadosDoUsuario.getFoto() != null){\n if (!dadosDoUsuario.getFoto().isEmpty()){\n Uri url = Uri.parse(dadosDoUsuario.getFoto());\n Glide.with(getApplicationContext()).load(url).into(civFotoPerfil);\n }\n }\n\n // Configurando Seguidores Postagens e Seguindo\n\n //stPublicacao = String.valueOf(dadosDoUsuario.getPublicacoes());\n stSeguidores = String.valueOf(dadosDoUsuario.getSeguidores());\n stSeguindo = String.valueOf(dadosDoUsuario.getSeguindo());\n\n tvSeguindo.setText(stSeguindo);\n tvSeguidores.setText(stSeguidores);\n //tvPublicacao.setText(stPublicacao);\n\n // Configurando Referencia postagens Usuario Escolhido\n postagensUsuarioRef = ConfiguracaoFirebase.getFirebaseDatabase()\n .child(\"postagens\")\n .child(dadosDoUsuario.getId());\n\n // Inicializa o Universal Image Loader\n inicializarImageLoader();\n // Recupera as Postagens do nosso Banco de Dados\n carregarFotosPostagem();\n }",
"@Override\n public void run() {\n User user = new UserSessionDataSource(MainActivity.this).SelectTableUser();\n Grua grua = new GruaSessionDataSource(MainActivity.this).SelectTableUser();\n if(user.getId() == -1)\n return;\n Toast.makeText(getApplicationContext(),\"Entrando en modo desconectado\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this, InitActivity.class);\n intent.putExtra(Register.JSON_USER, user.toJSON());\n intent.putExtra(Register.JSON_GRUA, grua.toJSON());\n startActivity(intent);\n }",
"protected void setUsuario(String usuario) {\n this.usuario = usuario;\n }",
"public String getUsuario() {\n\t\treturn this.usuario;\n\t}",
"public java.lang.String getUsuario() {\n return usuario;\n }",
"public void setUsuario(Usuario usuario) {\n this.usuario = usuario;\n }",
"public void setUsuario(Usuario usuario) {\n this.usuario = usuario;\n }",
"public void actualizarUsuario(Long idUsr,String nick,String nombres,String pass){\n\t\t\t\t\t //buscamos el objeto que debe ser actualizado:\n\t\t\t\t\t Usuario u = findbyIdUsuario(idUsr);\n\t\t\t\t\t em.getTransaction().begin();\n\t\t\t\t\t // no se actualiza la clave primaria, en este caso solo la descripcion\n\t\t\t\t\t u.setNick(nick);\n\t\t\t\t\t u.setNombres(nombres);\n\t\t\t\t\t u.setPass(pass);\n\t\t\t\t\t em.merge(u);\n\t\t\t\t\t em.getTransaction().commit();\n\t\t\t\t }",
"public void cadastrarUsuario(final Usuario usuario){\n mAuth = ConfiguracaoFirebase.getFirebaseAuth();\n mAuth.createUserWithEmailAndPassword(\n usuario.getEmail(),usuario.getSenha()\n ).addOnCompleteListener(\n this, new OnCompleteListener<AuthResult>() {\n //Verifica exceções e se o usuário se cadastrou\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"Usuário cadastrado com sucesso!\",Toast.LENGTH_SHORT).show();\n finish();\n //Convertendo email em base 64 para ser usado como uidPessoa\n try {\n String identificadorUsuario = Base64Custom.codificarBase64(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setUidPessoa(identificadorUsuario);\n usuario.setNome(FirebaseAuth.getInstance().getCurrentUser().getDisplayName());\n usuario.setEmail(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setPontos(1);\n usuario.salvar();\n cadastrarUsuario(usuario);\n logarUsuario(usuario);\n abrirTelaPrincipal();\n }catch (Exception e){\n e.printStackTrace();\n }\n }else {String excecao = \"\";\n try{\n throw task.getException();\n\n }catch (FirebaseAuthWeakPasswordException e){\n excecao = \"Digite uma senha forte!\";\n }catch (FirebaseAuthInvalidCredentialsException e){\n excecao = \"Por favor, digite um e-mail válido\";\n }catch (FirebaseAuthUserCollisionException e){\n excecao = \"esta conta já está cadastrada\";\n }catch (Exception e){\n excecao = \"Erro ao cadastrar usuário\" + e.getMessage();\n e.printStackTrace();\n }\n Toast.makeText(getApplicationContext(),excecao,Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public User(){\n nomorAkun = 0;\n pin = 0;\n saldo = 0;\n }",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"public Cliente registroUsuario(Ventana vis, Modelo mod) {\n\t\tJTextField dni = vis.panelLogin.textFieldDNI;\n\t\tJTextField nombre = vis.panelLogin.textFieldNombre;\n\t\tJTextField apellido = vis.panelLogin.textFieldApellido;\n\t\tDate fechaNac = vis.panelLogin.calendarioFechaNac.getDate();\n\t\tchar sexo = cambiarSexoAChar(vis.panelLogin.cmbBoxSexo);\n\t\tfinal char[] contra = vis.panelLogin.passFieldContrasenia.getPassword();\n\t\tif (validarSoloLetras(nombre) && validarSoloLetras(apellido) && (nombre.getText().length() > 0) && (apellido.getText().length() > 0) && validarDNI(dni) && validarFecha(fechaNac) && validarContrasenia(contra)) {\n\t\t\tif (comprobarDNIenBD(vis.panelLogin.textFieldDNI.getText(), mod) == false) {\n\t\t\t\treturn (new Cliente(dni.getText(), nombre.getText(), apellido.getText(), fechaNac, sexo, encriptarContra(contra)));\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El usuario introducido ya esta registrado, porfavor inicie sesion\", \"Usuario ya registrado\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Utilisateur() {\n\t\tsuper();\n\t}",
"@Override\n public void onClick(View v) {\n String nom =\"\";\n String prenom = \"\";\n String mail = \"\";\n String tel = \"\";\n String mdp = \"\";\n String confMdp = \"\";\n\n // Recuperation des données saisies\n try {\n nom = nomInscription.getText().toString();\n prenom = prenomInscription.getText().toString();\n mail = mailInscription.getText().toString();\n tel = telInscription.getText().toString();\n mdp = mdpInscription.getText().toString();\n confMdp = mdpConfirmation.getText().toString();\n\n Utilisateur connexionUtilisateurs = new Utilisateur(nom,prenom,mail,tel,mdp);\n controle.setConnexionUtilisateurs(connexionUtilisateurs);\n }catch (Exception e){\n Log.d(\"Recup\", \"****************** Erreur reuperation donnees inscription\\n****\" + e);\n }\n\n // Controle des données saisie\n if((nom.equals(\"\"))||(prenom.equals(\"\"))||(mail.equals(\"\"))||(tel.equals(\"\"))||(mdp.equals(\"\"))||(confMdp.equals(\"\"))){\n Toast.makeText(InscriptionActivity.this,\"Saisie incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!(mdp.equals(confMdp))){\n Toast.makeText(InscriptionActivity.this,\"mots de passe incorrect\",Toast.LENGTH_SHORT).show();\n }else if (tel.length() != 10){\n Toast.makeText(InscriptionActivity.this,\"Numéro de téléphone incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!isValiEmail(mail)){\n Toast.makeText(InscriptionActivity.this,\"Format de l'adresse mail incorrect\",Toast.LENGTH_SHORT).show();\n }else {\n // si la saisie est correcte, envoie les informations à la base de données pour l'inscription\n afficheResult(nom,prenom,mail,tel,mdp);\n Utilisateur user = new Utilisateur(nom,prenom,mail,tel,mdp);\n AccesDistant accesDistant = new AccesDistant();\n Log.d(\"envoi inscript\",\"*************\" + user.inscriptionConvertToJSONArray());\n accesDistant.envoi(\"inscription\", user.inscriptionConvertToJSONArray());\n\n // Bouton pour aller vers la page home\n Intent intent = new Intent(InscriptionActivity.this,HomeActivity.class);\n startActivity(intent);\n }\n\n }",
"public void setUsuario(java.lang.String newUsuario);",
"@Override\n public void login(String nome, String email, int senha) {\n if (getNome() == nome && this.getEmail() == email && this.getSenha() == senha){\n System.out.println(\"Login efetuado com sucesso\");\n } else {\n System.out.println(\"0 - Sair\");\n System.out.println(\"Saiu do usuario\");\n }\n\n }",
"public String getNombreUsuario() {\r\n return nombreUsuario;\r\n }",
"@PostMapping(value = \"/utilisateur/create\")\n public String saveNewUtilisateur(Model model, @Valid Utilisateur utilisateur, BindingResult bindingResult){\n if (utilisateurRepository.findByUsername(utilisateur.getUsername())==null && utilisateurRepository.findByEmail(utilisateur.getEmail())==null){\n utilisateur.getRoles().add(RoleEnum.ROLE_USER);\n utilisateurRepository.save(utilisateur);\n model.addAttribute(\"utilisateur\",utilisateur);\n logger.info(\"L'utilisateur \"+utilisateur.getUsername()+\" a été ajouté a la DB\");\n return \"confirmationUtilisateur\";\n }else{\n if (utilisateurRepository.findByUsername(utilisateur.getUsername().toLowerCase())!=null ){\n bindingResult.rejectValue(\"username\",\"utilisateur.username\", \"ce pseudo est déjà utilisé :(\");\n }\n if (utilisateurRepository.findByEmail(utilisateur.getEmail().toLowerCase())!=null){\n bindingResult.rejectValue(\"email\",\"utilisateur.email\", \"cet e-mail est déjà associé à un autre compte :(\");\n }\n model.addAttribute(\"utilisateur\",utilisateur);\n return \"inscription\";\n }\n }",
"private void registerUser(){\n mAuth.createUserWithEmailAndPassword(correo, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //mapa de valores\n Map<String, Object> map = new HashMap<>();\n map.put(\"name\",name);\n map.put(\"email\",correo);\n map.put(\"password\",password);\n map.put(\"birthday\",cumple);\n map.put(\"genre\",genre);\n map.put(\"size\",size);\n //obtenemos el id asignado por la firebase\n String id= mAuth.getCurrentUser().getUid();\n //pasamos el mapa de valores\n mDatabase.child(\"Users\").child(id).setValue(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task2) {\n //validams que la tarea sea exitosa\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }else{\n Toast.makeText(DatosIniciales.this, \"No pudimos completar su registro\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public String modificarUsuario() {\n\t\tString stringIdUsuario = session.getAttribute(\"id\").toString();\n\t\tInteger intIdUsuario = Integer.parseInt(stringIdUsuario);\n\t\t\n\t\tFacesContext con = FacesContext.getCurrentInstance();\n\t\tHttpServletRequest request = (HttpServletRequest) con.getExternalContext().getRequest();\n\t\tString cambioDeTexto = request.getParameter(\"myForm:texto\");\n\t\tString passwordViejo = request.getParameter(\"myForm:password\");\n\t\tString passwordNuevo = request.getParameter(\"myForm:passwordNuevo\");\n\t\tUsuario usuarioDb = usuarioService.buscarUsuarioPorId(intIdUsuario);\n\t\tif (usuarioDb != null) {\n\t\t\tif(usuarioService.validarNoCaracteresEspeciales(cambioDeTexto)==true) {\n\t\t\t\tString accion = \"Usuario \"+ usuarioDb.getEmail() + \" error al modificar texto.\";\n\t\t\t\tauditoriaService.registrarAuditoria(usuarioDb,accion);\n\t\t\t\terror =\"Campo texto no permitido\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror = usuarioService.usuarioModificaPasswordyTexto(cambioDeTexto, passwordViejo, passwordNuevo, intIdUsuario);\n\t\t\t}\n\t\t}\n\t\treturn \"home\";\n\t\t\n\t}",
"public Usuario iniciarSesion(Usuario u) {\n Usuario user = null;\n\n try {\n if (this.em.isOpen()) {\n user = (Usuario) this.em.createNamedQuery(\"Usuario.findByUsernamePass\")\n .setParameter(\"username\", u.getUsername())\n .setParameter(\"password\", u.getPassword()).getSingleResult();\n em.refresh(user);\n }\n\n } catch (Exception e) {\n //e.printStackTrace();\n\n }\n\n return (user);\n }",
"@Override\n\tpublic void guardar() {\n\t\tLOG.info(\"El usuario fue guardado \"+ usuario.getApellido()+\", \"+ usuario.getNombre());\n\t}",
"@Override\r\n\t\t\tpublic void onSuccess() {\n\t\t\t\tfinal User c = userManager.getCurrentUser(User.class);\r\n\t\t\t\tShowToast(\"修改成功:\"+c.getNick());\r\n\t\t\t\tfinish();\r\n\t\t\t}",
"public Usuario getUsuario() {\n return usuario;\n }",
"public Usuario getUsuario() {\n return usuario;\n }",
"@Override\n public void onClick(View v) {\n biensoxe = etBienSoXe.getText().toString().toLowerCase().trim();\n passwordtx = etPasswordtx.getText().toString().trim();\n confirmPassword = etConfirmPassword.getText().toString().trim();\n tenchuxe = etTenChuXe.getText().toString().trim();\n sdt = etSDT.getText().toString().trim();\n mota = edMoTa.getText().toString().trim();\n loaixe = tenloaixe;\n trongtaixe = trongtai;\n if (validateInputs()) {\n registerUser();\n }\n\n }",
"public String getTxtUser() {\n return txtUser.getText();\n }",
"public void ponerUsuarioInactivo(String idUsuario);",
"@Override\n\tpublic void input() {\n\t\tUser u =new User();\n\t\tif(list.size() <= MAX_USER) {\n\t\tSystem.out.print(\"이름 입력 : \");\n\t\tu.setName(sc.next());\n\t\tSystem.out.print(\"나이 입력 : \");\n\t\tu.setAge(sc.nextInt());\n\t\tSystem.out.print(\"주소 입력 : \");\n\t\tu.setAddr(sc.next());\n\t\tlist.add(u);\n\t\t\n\t\t}else if(list.size() > MAX_USER) {\n\t\t\tSystem.out.println(\"최대 등록 인원은 10명입니다.\");\n\t\t}\n\t}",
"public void registro(View v) {\n\t\tsubeUsuario();\n\t\tif (userId == -1) { // si es nuevo\n\t\t\tfinish(); // hay que dejar que el server devuelva el id y leerlo\n\t\t}\n\t}",
"public tela_GerencLogin() {\n initComponents();\n lb_NomeLogin.setText(Sessao.getLogin());\n lb_Id.setText(Integer.toString(Sessao.getId()));\n \n }",
"public String getNickName(){\n return nombreUsuario;\n }",
"protected void proccesValues() {\n Users user = new Users();\n user.setName(bean.getName());\n user.setSurname(bean.getSurname());\n user.setUsername(bean.getUsername());\n StrongPasswordEncryptor passwordEncryptor = new StrongPasswordEncryptor();\n String encryptedPassword = passwordEncryptor.encryptPassword(bean.getPassword());\n user.setPassword(encryptedPassword);\n \n usersService.persist(user);\n Notification.show(msgs.getMessage(INFO_REGISTERED), Notification.Type.ERROR_MESSAGE);\n resetValues();\n UI.getCurrent().getNavigator().navigateTo(ViewLogin.NAME);\n }",
"public String getNickUsuario() {\r\n return nickUsuario;\r\n }",
"public boolean crarUsuario(Usuario creador, String nombre, String nombreMostrar, String contrasena, boolean cambiarContra,boolean admin,int tipoPersonal,int tipodescuento, boolean notas, boolean habilitacion,boolean profesor, int ciProfesor){\r\n if (creador.isAdmin()){\r\n try {\r\n String sql= \"insert into sistemasEM.usuarios (nombre, mostrar, contrasena,cambiarContra,admin,permisosPersonal,permisosDescuento,notas, habilitacion,profesor,ciProfesor) values(?,?,MD5(?),?,?,?,?,?,?,?,?)\";\r\n PreparedStatement s= connection.prepareStatement(sql);\r\n int i=1;\r\n s.setString(i++, nombre);\r\n s.setString(i++, nombreMostrar);\r\n s.setString(i++, contrasena);\r\n s.setBoolean(i++, cambiarContra);\r\n s.setBoolean(i++, admin);\r\n s.setInt(i++, tipoPersonal);\r\n s.setInt(i++, tipodescuento);\r\n s.setBoolean(i++, notas);\r\n s.setBoolean(i++, habilitacion);\r\n s.setBoolean(i++, profesor);\r\n s.setInt(i++, ciProfesor);\r\n int result = s.executeUpdate();\r\n if(result>0){\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return false;\r\n }",
"public Utilisateur(String login, String pwd, String nom, String prenom) {\n\t\tsuper();\n\t\tthis.login = login;\n\t\tthis.pwd = pwd;\n\t\tthis.nom = nom;\n\t\tthis.prenom = prenom;\n\t}",
"public String getidUsuario(){\n return preferencias.getString(CHAVE_ID, null);\n }",
"private void razia(){\n /* Mereset semua Error dan fokus menjadi default */\n mViewUser.setError(null);\n mViewPassword.setError(null);\n View fokus = null;\n boolean cancel = false;\n\n /* Mengambil text dari form User dan form Password dengan variable baru bertipe String*/\n String user = mViewUser.getText().toString();\n String password = mViewPassword.getText().toString();\n\n /* Jika form user kosong atau TIDAK memenuhi kriteria di Method cekUser() maka, Set error\n * di Form User dengan menset variable fokus dan error di Viewnya juga cancel menjadi true*/\n if (TextUtils.isEmpty(user)){\n mViewUser.setError(\"This field is required\");\n fokus = mViewUser;\n cancel = true;\n }else if(!cekUser(user)){\n mViewUser.setError(\"This Username is not found\");\n fokus = mViewUser;\n cancel = true;\n }\n\n /* Sama syarat percabangannya dengan User seperti di atas. Bedanya ini untuk Form Password*/\n if (TextUtils.isEmpty(password)){\n mViewPassword.setError(\"This field is required\");\n fokus = mViewPassword;\n cancel = true;\n }else if (!cekPassword(password)){\n mViewPassword.setError(\"This password is incorrect\");\n fokus = mViewPassword;\n cancel = true;\n }\n\n /* Jika cancel true, variable fokus mendapatkan fokus */\n if (cancel) fokus.requestFocus();\n else masuk();\n }",
"public Usuario getAutor() {\n return autor;\n }",
"public boolean registrar(usuario usr) {\n\n PreparedStatement ps = null;\n Conectar ct = new Conectar();\n Connection con = ct.conexion();\n //INSEERTAR DENTRO DE LA TABLA TRABAJO LOS DATOS DE REGISTRO\n String sql = \"INSERT INTO trabajo (usuario, password, Email, id_tipo, Nombre) VALUES(?,?,?,?,?)\";\n\n try {\n ps = con.prepareStatement(sql);\n\n ps.setString(1, usr.getUsuario());\n\n ps.setString(2, usr.getPassword());\n\n ps.setString(3, usr.getEmail());\n\n ps.setInt(4, usr.getId_tipo());\n\n ps.setString(5, usr.getNombre());\n\n ps.execute();\n return true;\n\n } catch (SQLException ex) {\n Logger.getLogger(sqlUsuario.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n }",
"public void setUsuario(java.lang.String usuario) {\n this.usuario = usuario;\n }"
] | [
"0.714308",
"0.68855464",
"0.6805352",
"0.67132485",
"0.6677923",
"0.664286",
"0.6623344",
"0.65747285",
"0.65747285",
"0.6547601",
"0.6544542",
"0.6540434",
"0.6539921",
"0.6527575",
"0.65152884",
"0.6512111",
"0.6512111",
"0.650304",
"0.6488298",
"0.6473499",
"0.6456084",
"0.6427878",
"0.6425255",
"0.6417471",
"0.6390599",
"0.6390599",
"0.6383363",
"0.63805926",
"0.6368985",
"0.6368985",
"0.63550943",
"0.6342081",
"0.63399196",
"0.6332778",
"0.6295655",
"0.6278566",
"0.62689346",
"0.62486994",
"0.62482727",
"0.62423867",
"0.62401897",
"0.6238281",
"0.6229863",
"0.6229863",
"0.6229863",
"0.62215954",
"0.6214747",
"0.6211158",
"0.6210676",
"0.6209552",
"0.62070274",
"0.62029004",
"0.61883086",
"0.6177338",
"0.6177338",
"0.61721873",
"0.61533046",
"0.61518097",
"0.61403245",
"0.6135925",
"0.61322254",
"0.6131298",
"0.6121448",
"0.61211675",
"0.610868",
"0.610868",
"0.6107995",
"0.6096664",
"0.60963476",
"0.6094129",
"0.6085312",
"0.6077894",
"0.6076635",
"0.6073044",
"0.60645723",
"0.6060191",
"0.6057202",
"0.60550517",
"0.60534286",
"0.6038753",
"0.6038039",
"0.6032952",
"0.6032511",
"0.6021079",
"0.6021079",
"0.601395",
"0.6005951",
"0.60021967",
"0.599627",
"0.5982954",
"0.5981241",
"0.59769696",
"0.59751505",
"0.59716356",
"0.5971471",
"0.59677917",
"0.5964322",
"0.5963917",
"0.5962536",
"0.5957477",
"0.5957209"
] | 0.0 | -1 |
Invoke the IOC container | public static void main(String[] args) {
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"applicationContext.xml");
// get the bean
Student student = (Student) applicationContext.getBean("student");
// use the bean
student.displayDetails();
// close the bean
applicationContext.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public ServiceRegistration<CdiContainer> call() throws Exception {\n BeanBundle cdiBundle = container.getInstance().select(BeanBundle.class)\n .get();\n BundleContext bc = bundle.getBundleContext();\n cdiBundle.setBundleContext(bc);\n\n // fire ContainerInitialized event\n BeanManager beanManager = container.getBeanManager();\n beanManager.fireEvent(new ContainerInitialized());\n\n // register CdiContainer service\n Dictionary<String, Object> props = new Hashtable<String, Object>();\n props.put(\"bundleId\", bundle.getBundleId());\n props.put(\"symbolicName\", bundle.getSymbolicName());\n\n return bc.registerService(CdiContainer.class, container, props);\n }",
"public void startIt() {\r\n\r\n\t\tfinal Weld weld = new Weld();\r\n\t\ttry (WeldContainer container = weld.initialize()) {\r\n\t\t\tfinal WeldInstance<ResearchCDIBean> instance = container.select(ResearchCDIBean.class);\r\n\t\t\tfinal ResearchCDIBean researchCDIBean = instance.get();\r\n\t\t\t/*\r\n\t\t\t * run in container\r\n\t\t\t */\r\n\t\t\tresearchCDIBean.process();\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinvoke();\n\t\t\t\t\t}",
"private <B, I> void _start() throws Exception\n {\n bootstrap.bindBean(ApplicationDescriptor.class, null, descriptor);\n\n // Bind the application context\n bootstrap.declareBean(ApplicationContext.class, null, InternalApplicationContext.class);\n\n //\n bootstrap.setFilter(new BeanFilter()\n {\n public <T> boolean acceptBean(Class<T> beanType)\n {\n if (beanType.getName().startsWith(\"org.juzu.\") || beanType.getAnnotation(Export.class) != null)\n {\n return false;\n }\n else\n {\n // Do that better with a meta annotation that describe Juzu annotation\n // that veto beans\n for (Method method : beanType.getMethods())\n {\n if (method.getAnnotation(View.class) != null || method.getAnnotation(Action.class) != null || method.getAnnotation(Resource.class) != null)\n {\n return false;\n }\n }\n return true;\n }\n }\n });\n\n // Bind the scopes\n for (Scope scope : Scope.values())\n {\n bootstrap.addScope(scope);\n }\n\n // Bind the controllers\n for (ControllerDescriptor controller : descriptor.getControllers())\n {\n bootstrap.declareBean(controller.getType(), null, (Class)null);\n }\n\n // Bind the templates\n for (TemplateDescriptor template : descriptor.getTemplates())\n {\n bootstrap.declareBean(Template.class, null, template.getType());\n }\n\n //\n Class<?> s = descriptor.getPackageClass();\n\n // Bind the bean bindings\n Bindings bindings = s.getAnnotation(Bindings.class);\n if (bindings != null)\n {\n for (Binding binding : bindings.value())\n {\n Class<?> type = binding.value();\n Class<?> implementation = binding.implementation();\n if (MetaProvider.class.isAssignableFrom(implementation))\n {\n MetaProvider mp = (MetaProvider)implementation.newInstance();\n Provider provider = mp.getProvider(type);\n bootstrap.bindProvider(type, null, provider);\n }\n else if (Provider.class.isAssignableFrom(implementation))\n {\n Method m = implementation.getMethod(\"get\");\n ArrayList<Annotation> qualifiers = null;\n for (Annotation annotation : m.getAnnotations())\n {\n if (annotation.annotationType().getAnnotation(Qualifier.class) != null)\n {\n if (qualifiers == null)\n {\n qualifiers = new ArrayList<Annotation>();\n }\n qualifiers.add(annotation);\n }\n }\n bootstrap.declareProvider(type, qualifiers, (Class)implementation);\n }\n else\n {\n if (implementation == Object.class)\n {\n implementation = null;\n }\n bootstrap.declareBean((Class)type, null, (Class)implementation);\n }\n }\n }\n\n //\n List<Class<? extends Plugin>> plugins = descriptor.getPlugins();\n\n // Declare the plugins\n for (Class<? extends Plugin> pluginType : plugins)\n {\n bootstrap.declareBean(pluginType, null, null);\n }\n\n //\n InjectManager<B, I> manager = bootstrap.create();\n\n //\n B contextBean = manager.resolveBean(ApplicationContext.class);\n I contextInstance = manager.create(contextBean);\n \n // Get plugins\n ArrayList<Plugin> p = new ArrayList<Plugin>();\n for (Class<? extends Plugin> pluginType : plugins)\n {\n B pluginBean = manager.resolveBean(pluginType);\n I pluginInstance = manager.create(pluginBean);\n Object o = manager.get(pluginBean, pluginInstance);\n p.add((Plugin)o);\n }\n\n //\n this.context = (InternalApplicationContext)manager.get(contextBean, contextInstance);\n }",
"public static Kernel start(int port)\n {\n Kernel app = Kernel.newInstance();\n Container container = app.getContainer();\n\n // Forms\n container.add(new ServiceDefinition<>(AnnualReviewType.class));\n container.add(new ServiceDefinition<>(UserType.class));\n\n // Managers\n container.add(new ServiceDefinition<>(AccessDecisionManager.class, YuconzAccessDecisionManager.class));\n container.add(new ServiceDefinition<>(YuconzAuthenticationManager.class));\n container.add(new ServiceDefinition<>(Hibernate.class));\n container.add(new ServiceDefinition<>(LogManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n container.add(new ServiceDefinition<>(RecordManager.class));\n container.add(new ServiceDefinition<>(AnnualReviewManager.class));\n container.add(new ServiceDefinition<>(FormManager.class));\n\n container.add(new ServiceDefinition<>(AuthorisationManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n\n // Resolvers\n container.add(new ServiceDefinition<>(UserResolver.class));\n container.add(new ServiceDefinition<>(RecordResolver.class));\n\n // JTwig Functions\n container.add(new ServiceDefinition<>(CurrentUserFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(CurrentRoleFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormStartRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormEndRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ActivePageFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(IsGrantedFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(RangeFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ServiceFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(LocalDateFunction.class)).addTag(\"jtwig.function\");\n\n // Voters\n container.add(new ServiceDefinition<>(PersonalDetailsVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(RecordVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AnnualReviewVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AuthorisationVoter.class)).addTag(\"authentication.voter\");\n\n container.getServiceDefinition(FrameworkServer.class).setConfigurationReference(new PlainReference<>(new Configuration()\n {\n @Override\n public int getPort()\n {\n return port;\n }\n }));\n\n app.boot();\n\n Router router = container.get(Router.class);\n\n // Records\n router.registerController(AppController.class);\n router.registerController(StaticController.class);\n router.registerController(AuthenticationController.class);\n router.registerController(DashboardController.class);\n router.registerController(EmployeesController.class);\n router.registerController(RecordController.class);\n router.registerController(AnnualReviewController.class);\n\n FormManager formManager = container.get(FormManager.class);\n\n formManager.getRenderers().removeIf(r -> r.getClass().equals(ChoiceRenderer.class));\n formManager.addRenderer(CustomChoiceRenderer.class);\n formManager.addRenderer(DateRenderer.class);\n\n app.start();\n\n return app;\n }",
"private void inject() {\n }",
"public abstract void doInvoke(InvocationContext ic) throws Exception;",
"public static void main(String[] args) {\n\n IOCBeanLoadByXML iocBeanLoadByXML = (IOCBeanLoadByXML) BeanFactory.getBean(\"beanLoadByXML\");\n iocBeanLoadByXML.say();\n// IIOCBean iocBeanWithField = (IIOCBean) BeanFactory.getBean(\"testautowired\");\n// iocBeanWithField.say(\"param1\");\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tservicio();\r\n\t\t}",
"private ServiceLocator(){}",
"public abstract void injectComponent();",
"private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}",
"@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tReflections reflections = new Reflections(\"net.yourhome.server\");\r\n\t\t\t\tSet<Class<? extends IController>> controllerClasses = reflections.getSubTypesOf(IController.class);\r\n\r\n\t\t\t\tfor (final Class<? extends IController> controllerClass : controllerClasses) {\r\n\t\t\t\t\tif (!Modifier.isAbstract(controllerClass.getModifiers())) {\r\n\t\t\t\t\t\tnew Thread() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tMethod factoryMethod;\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tfactoryMethod = controllerClass.getDeclaredMethod(\"getInstance\");\r\n\t\t\t\t\t\t\t\t\tIController controllerObject = (IController) factoryMethod.invoke(null, null);\r\n\t\t\t\t\t\t\t\t\tServer.this.controllers.put(controllerObject.getIdentifier(), controllerObject);\r\n\t\t\t\t\t\t\t\t\tSettingsManager.readSettings(controllerObject);\r\n\t\t\t\t\t\t\t\t\tcontrollerObject.init();\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\tServer.log.error(\"Could not instantiate \" + controllerClass.getName() + \" because getInstance is missing\", e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}.start();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"public static void main(String[] args) {\n ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(ANNOTATE_XML);\n\n // ask container for the Bean that is ready to use\n Car car = appContext.getBean(\"dmc12autowire\", Car.class);\n car.go();\n\n System.out.println(car.getClass().getName());\n\n appContext.close();\n }",
"public void service() {\n\t}",
"public void loadAndWait()\n {\n injector.addConfigurationInstances(this.configClassInstances);\n\n // load all @Services from @Configuration classes\n injector.activateFailOnNullInstance();\n injector.load();\n\n // detect duplicates and crash on matches\n injector.crashOnDuplicates();\n\n // branch out the dependencies, such that Service A, with dependency B, is\n // aware of all dependencies of B.\n injector.branchOutDependencyTree();\n\n // sort the services, based on dependency requirements\n injector.sortByDependencies();\n\n // instantiate services/clients and crash if any nil instances are detected\n injector.instantiateComponents();\n injector.crashOnNullInstances();\n\n // add the component instances to the ServiceContext\n injector.installServices(ctx);\n\n // instantiate clients\n //injector.instantiateClients();\n\n // invoke DepWire methods with required services & clients\n injector.findDepWireMethodsAndPopulate();\n }",
"@Override\n\tpublic void run(MicroServicioRequerimientosConfig configuration, Environment environment) throws Exception {\n\t\tApplicationContext ctx = new GenericXmlApplicationContext(\"Config.xml\");\n\t \tMongoOperations mongoOperation = (MongoOperations) ctx.getBean(\"mongoTemplate\");\n\t\tfinal Requerimientos registrar=new Requerimientos(mongoOperation);\n\t\tenvironment.healthChecks().register(\"HealthCheckRegistrar\",new RegistrarHealthCheck());\n\t\tenvironment.jersey().register(registrar);\n\t\t\n\t}",
"void init(ReflectionService reflectionService);",
"private void initService() {\r\n\t}",
"static void init() {\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(ROCKET_CRATE_CONTAINER,\n\t\t\t\t(syncId, id, player, buf) -> new RocketCrateScreenHandler(syncId, buf.readInt(), player.inventory));\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(LAUNCH_PAD_CONTAINER,\n\t\t\t\t(syncId, id, player, buf) -> new LaunchPadScreenHandler(syncId, buf.readBlockPos(), player.inventory));\n\t\tContainerProviderRegistry.INSTANCE.registerFactory(CONTRACT_MACHINE,\n\t\t\t\t(syncId, id, player, buf) -> new ContractMachineScreenHandler(syncId, buf.readBlockPos(), player.inventory));\n\t}",
"public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }",
"protected void doInvocation(){\n org.omg.CORBA.portable.Delegate delegate=StubAdapter.getDelegate(\n _target);\n // Initiate Client Portable Interceptors. Inform the PIHandler that\n // this is a DII request so that it knows to ignore the second\n // inevitable call to initiateClientPIRequest in createRequest.\n // Also, save the RequestImpl object for later use.\n _orb.getPIHandler().initiateClientPIRequest(true);\n _orb.getPIHandler().setClientPIInfo(this);\n InputStream $in=null;\n try{\n OutputStream $out=delegate.request(null,_opName,!_isOneWay);\n // Marshal args\n try{\n for(int i=0;i<_arguments.count();i++){\n NamedValue nv=_arguments.item(i);\n switch(nv.flags()){\n case ARG_IN.value:\n nv.value().write_value($out);\n break;\n case ARG_OUT.value:\n break;\n case ARG_INOUT.value:\n nv.value().write_value($out);\n break;\n }\n }\n }catch(Bounds ex){\n throw _wrapper.boundsErrorInDiiRequest(ex);\n }\n $in=delegate.invoke(null,$out);\n }catch(ApplicationException e){\n // REVISIT - minor code.\n // This is already handled in subcontract.\n // REVISIT - uncomment.\n //throw new INTERNAL();\n }catch(RemarshalException e){\n doInvocation();\n }catch(SystemException ex){\n _env.exception(ex);\n // NOTE: The exception should not be thrown.\n // However, JDK 1.4 and earlier threw the exception,\n // so we keep the behavior to be compatible.\n throw ex;\n }finally{\n delegate.releaseReply(null,$in);\n }\n }",
"@Override\n public void run(final ApiConfiguration configuration, final Environment environment) throws ClassNotFoundException {\n configureServices(environment);\n }",
"@Override\n public void run() {\n logger.info(\"Servicing connection\");\n }",
"private void dispatch(CallContext context, HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n CmisService service = null;\n try {\n // get the service\n service = getServiceFactory().getService(context);\n\n // analyze the path\n String[] pathFragments = HttpUtils.splitPath(request);\n\n if (pathFragments.length < 2) {\n // root -> service document\n dispatcher.dispatch(\"\", METHOD_GET, context, service, null, request, response);\n return;\n }\n\n String method = request.getMethod();\n String repositoryId = pathFragments[0];\n String resource = pathFragments[1];\n\n // dispatch\n boolean callServiceFound = dispatcher.dispatch(resource, method, context, service, repositoryId, request,\n response);\n\n // if the dispatcher couldn't find a matching service\n // -> return an error message\n if (!callServiceFound) {\n response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, \"Unknown operation\");\n }\n } finally {\n if (service != null) {\n service.close();\n }\n }\n }",
"private final void inject() {\n }",
"@Override\n\tprotected void initAsService() {\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"Initiating service...\");\n\t\t}\n\t\trunnerFuture = activityRunner.schedule(this::scanModulesHealth, 500, TimeUnit.MILLISECONDS);\n\t}",
"ComponentContainer container(ContextDefinition context);",
"public void startup(){}",
"@Inject\n public MachineMonkeyRestApiImpl() {\n }",
"public void run()\n {\n // open selector\n try\n {\n _selector = Selector.open();\n }\n catch (Exception exception)\n {\n System.out.println(\"selector open \");\n System.exit(-1);\n }\n \n // create reactor\n if (ProviderPerfConfig.useReactor()) // use UPA VA Reactor\n {\n _reactorOptions.clear();\n if ((_reactor = ReactorFactory.createReactor(_reactorOptions, _errorInfo)) == null)\n {\n System.out.printf(\"Reactor creation failed: %s\\n\", _errorInfo.error().text());\n System.exit(ReactorReturnCodes.FAILURE);\n }\n \n // register selector with reactor's reactorChannel.\n try\n {\n _reactor.reactorChannel().selectableChannel().register(_selector,\n SelectionKey.OP_READ,\n _reactor.reactorChannel());\n }\n catch (ClosedChannelException e)\n {\n System.out.println(\"selector register failed: \" + e.getLocalizedMessage());\n System.exit(ReactorReturnCodes.FAILURE);\n }\n }\n \n _directoryProvider.serviceName(ProviderPerfConfig.serviceName());\n _directoryProvider.serviceId(ProviderPerfConfig.serviceId());\n _directoryProvider.openLimit(ProviderPerfConfig.openLimit());\n _directoryProvider.initService(_xmlMsgData);\n\n _loginProvider.initDefaultPosition();\n _loginProvider.applicationId(applicationId);\n _loginProvider.applicationName(applicationName);\n\n if (!_dictionaryProvider.loadDictionary(_error))\n {\n System.out.println(\"Error loading dictionary: \" + _error.text());\n System.exit(CodecReturnCodes.FAILURE);\n }\n \n getProvThreadInfo().dictionary(_dictionaryProvider.dictionary());\n \n _reactorInitialized = true;\n\n // Determine update rates on per-tick basis\n long nextTickTime = initNextTickTime();\n \n // this is the main loop\n while (!shutdown())\n {\n if (!ProviderPerfConfig.useReactor()) // use UPA Channel\n {\n \tif (nextTickTime <= currentTime())\n \t{\n \t nextTickTime = nextTickTime(nextTickTime);\n \t\tsendMsgBurst(nextTickTime);\n \t\t_channelHandler.processNewChannels();\n \t}\n\t \t_channelHandler.readChannels(nextTickTime, _error);\n\t \t_channelHandler.checkPings();\n }\n else // use UPA VA Reactor\n {\n if (nextTickTime <= currentTime())\n {\n nextTickTime = nextTickTime(nextTickTime);\n sendMsgBurst(nextTickTime);\n }\n\n Set<SelectionKey> keySet = null;\n\n // set select time \n try\n {\n int selectRetVal;\n long selTime = (long)(selectTime(nextTickTime) / _divisor);\n \n if (selTime <= 0)\n selectRetVal = _selector.selectNow();\n else\n selectRetVal = _selector.select(selTime);\n \n if (selectRetVal > 0)\n {\n keySet = _selector.selectedKeys();\n }\n }\n catch (IOException e1)\n {\n System.exit(CodecReturnCodes.FAILURE);\n }\n\n // nothing to read or write\n if (keySet == null)\n continue;\n\n Iterator<SelectionKey> iter = keySet.iterator();\n while (iter.hasNext())\n {\n SelectionKey key = iter.next();\n iter.remove();\n if(!key.isValid())\n continue;\n if (key.isReadable())\n {\n int ret;\n \n // retrieve associated reactor channel and dispatch on that channel \n ReactorChannel reactorChnl = (ReactorChannel)key.attachment();\n \n /* read until no more to read */\n while ((ret = reactorChnl.dispatch(_dispatchOptions, _errorInfo)) > 0 && !shutdown()) {}\n if (ret == ReactorReturnCodes.FAILURE)\n {\n if (reactorChnl.state() != ReactorChannel.State.CLOSED &&\n reactorChnl.state() != ReactorChannel.State.DOWN_RECONNECTING)\n {\n System.out.println(\"ReactorChannel dispatch failed\");\n reactorChnl.close(_errorInfo);\n System.exit(CodecReturnCodes.FAILURE);\n }\n }\n }\n }\n }\n }\n\n shutdownAck(true);\n }",
"public interface CoreServiceInvoker {\n\n\n GWRequest processRequest(Object requestData, InterfaceMapper mapper);\n\n /**\n * 处理请求信息\n */\n GWRequest processRequest(Object requestData, InterfaceMapper mapper, boolean needPackage);\n\n /**\n * 调用核心方法\n */\n GWResponse invoke(GWRequest request, boolean needPackage);\n\n /**\n * 处理返回信息\n */\n Object analysisResponse(GWRequest request, GWResponse response);\n Object analysisResp(GWRequest request, GWResponse response);\n}",
"public void initPrimaryContainer() {\n for (IMixinPlatformAgent agent : this.agents) {\n MixinContainer.logger.debug(\"Processing launch tasks for {}\", agent);\n agent.initPrimaryContainer();\n }\n }",
"DelegateContainer() {\n super();\n }",
"public ScControl()\n {\n register();\n install();\n }",
"private void ejecutorDeServicio(){\r\n dbExeccutor = Executors.newFixedThreadPool(\r\n 1, \r\n new databaseThreadFactory()\r\n ); \r\n }",
"public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }",
"public void run() {\r\n\t\tAbstractElementControl[] controls = manager.getElements();\r\n\t\tfor (int i = 0; i < controls.length; i++) {\r\n\t\t\tif (controls[i] != null && controls[i] instanceof ServiceControl) {\r\n\t\t\t\tServiceControl sc = (ServiceControl)controls[i];\r\n\t\t\t\tif (sc.getSystemID().equals(systemID)) {\r\n\t\t\t\t\tmanager.focusElement(sc);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tServiceControl sc = new ServiceControl(manager, systemID, name);\r\n\t\tmanager.addElement(sc);\r\n\t\tmanager.focusElement(sc);\r\n\t}",
"@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"ServiceImpl execute\");\n\t}",
"@Override\n public void run() {\n\n try {\n //AQUI VAI A FUNCÃO A SER EXECUTADA\n\n invokeMethod(method);\n\n } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {\n Logger.getLogger(JFrameSale_1.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(JFrameSale_1.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void doService() {\n }",
"public static void initializeDiContainer() {\n addDependency(new CamelCaseConverter());\n addDependency(new JavadocGenerator());\n addDependency(new TemplateResolver());\n addDependency(new PreferenceStoreProvider());\n addDependency(new CurrentShellProvider());\n addDependency(new ITypeExtractor());\n addDependency(new DialogWrapper(getDependency(CurrentShellProvider.class)));\n addDependency(new PreferencesManager(getDependency(PreferenceStoreProvider.class)));\n addDependency(new ErrorHandlerHook(getDependency(DialogWrapper.class)));\n\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new GeneratedAnnotationPredicate());\n addDependency(new GenericModifierPredicate());\n addDependency(new IsPrivatePredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsStaticPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsPublicPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new GeneratedAnnotationContainingBodyDeclarationFilter(getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new PrivateConstructorRemover(getDependency(IsPrivatePredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new BuilderClassRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class),\n getDependency(IsPrivatePredicate.class),\n getDependency(IsStaticPredicate.class),\n getDependency(PreferencesManager.class)));\n addDependency(new JsonDeserializeRemover(getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderInterfaceRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new StaticBuilderMethodRemover(getDependency(IsStaticPredicate.class), getDependency(IsPublicPredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BuilderAstRemover(getDependencyList(BuilderRemoverChainItem.class)));\n\n addDependency(new BuilderRemover(getDependency(PreferencesManager.class), getDependency(ErrorHandlerHook.class),\n getDependency(BuilderAstRemover.class)));\n addDependency(new CompilationUnitSourceSetter());\n addDependency(new HandlerUtilWrapper());\n addDependency(new WorkingCopyManager());\n addDependency(new WorkingCopyManagerWrapper(getDependency(HandlerUtilWrapper.class)));\n addDependency(new CompilationUnitParser());\n addDependency(new GeneratedAnnotationPopulator(getDependency(PreferencesManager.class)));\n addDependency(new MarkerAnnotationAttacher());\n addDependency(new ImportRepository());\n addDependency(new ImportPopulator(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new BuilderMethodNameBuilder(getDependency(CamelCaseConverter.class),\n getDependency(PreferencesManager.class),\n getDependency(TemplateResolver.class)));\n addDependency(new PrivateConstructorAdderFragment());\n addDependency(new JsonPOJOBuilderAdderFragment(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new EmptyBuilderClassGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocGenerator.class),\n getDependency(TemplateResolver.class),\n getDependency(JsonPOJOBuilderAdderFragment.class)));\n addDependency(new BuildMethodBodyCreatorFragment());\n addDependency(new BuildMethodDeclarationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(TemplateResolver.class)));\n addDependency(new JavadocAdder(getDependency(JavadocGenerator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuildMethodCreatorFragment(getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(BuildMethodBodyCreatorFragment.class)));\n addDependency(new FullyQualifiedNameExtractor());\n addDependency(new StaticMethodInvocationFragment());\n addDependency(new OptionalInitializerChainItem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new BuiltInCollectionsInitializerChainitem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new FieldDeclarationPostProcessor(getDependency(PreferencesManager.class), getDependency(FullyQualifiedNameExtractor.class),\n getDependency(ImportRepository.class), getDependencyList(FieldDeclarationPostProcessorChainItem.class)));\n addDependency(new BuilderFieldAdderFragment(getDependency(FieldDeclarationPostProcessor.class)));\n addDependency(new WithMethodParameterCreatorFragment(getDependency(PreferencesManager.class), getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new RegularBuilderWithMethodAdderFragment(getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new BuilderFieldAccessCreatorFragment());\n addDependency(new TypeDeclarationToVariableNameConverter(getDependency(CamelCaseConverter.class)));\n addDependency(new FieldSetterAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new IsRegularBuilderInstanceCopyEnabledPredicate(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderCopyInstanceConstructorAdderFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new PublicConstructorWithMandatoryFieldsAdderFragment());\n addDependency(new RegularBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(RegularBuilderWithMethodAdderFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(RegularBuilderCopyInstanceConstructorAdderFragment.class),\n getDependency(PublicConstructorWithMandatoryFieldsAdderFragment.class)));\n addDependency(new StaticBuilderMethodSignatureGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new BlockWithNewBuilderCreationFragment());\n addDependency(\n new RegularBuilderBuilderMethodCreator(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new PrivateConstructorMethodDefinitionCreationFragment(getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new SuperFieldSetterMethodAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new PrivateConstructorBodyCreationFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(FieldSetterAdderFragment.class),\n getDependency(BuilderFieldAccessCreatorFragment.class),\n getDependency(SuperFieldSetterMethodAdderFragment.class)));\n addDependency(new ConstructorInsertionFragment());\n addDependency(new PrivateInitializingConstructorCreator(\n getDependency(PrivateConstructorMethodDefinitionCreationFragment.class),\n getDependency(PrivateConstructorBodyCreationFragment.class),\n getDependency(ConstructorInsertionFragment.class)));\n addDependency(new FieldPrefixSuffixPreferenceProvider(getDependency(PreferenceStoreProvider.class)));\n addDependency(new FieldNameToBuilderFieldNameConverter(getDependency(PreferencesManager.class),\n getDependency(FieldPrefixSuffixPreferenceProvider.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new TypeDeclarationFromSuperclassExtractor(getDependency(CompilationUnitParser.class),\n getDependency(ITypeExtractor.class)));\n addDependency(new BodyDeclarationVisibleFromPredicate());\n addDependency(new ApplicableFieldVisibilityFilter(getDependency(BodyDeclarationVisibleFromPredicate.class)));\n addDependency(new ClassFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(ApplicableFieldVisibilityFilter.class)));\n addDependency(new RecordFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class)));\n addDependency(new BodyDeclarationFinderUtil(getDependency(CamelCaseConverter.class)));\n addDependency(new SuperConstructorParameterCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(BodyDeclarationVisibleFromPredicate.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new SuperClassSetterFieldCollector(getDependency(PreferencesManager.class),\n getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(CamelCaseConverter.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new ApplicableBuilderFieldExtractor(Arrays.asList(\n getDependency(SuperConstructorParameterCollector.class),\n getDependency(ClassFieldCollector.class),\n getDependency(SuperClassSetterFieldCollector.class),\n getDependency(RecordFieldCollector.class))));\n addDependency(new ActiveJavaEditorOffsetProvider());\n addDependency(new ParentITypeExtractor());\n addDependency(new IsTypeApplicableForBuilderGenerationPredicate(getDependency(ParentITypeExtractor.class)));\n addDependency(new CurrentlySelectedApplicableClassesClassNameProvider(getDependency(ActiveJavaEditorOffsetProvider.class),\n getDependency(IsTypeApplicableForBuilderGenerationPredicate.class),\n getDependency(ParentITypeExtractor.class)));\n addDependency(new BuilderOwnerClassFinder(getDependency(CurrentlySelectedApplicableClassesClassNameProvider.class),\n getDependency(PreferencesManager.class), getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new BlockWithNewCopyInstanceConstructorCreationFragment());\n addDependency(new CopyInstanceBuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new RegularBuilderCopyInstanceBuilderMethodCreator(getDependency(BlockWithNewCopyInstanceConstructorCreationFragment.class),\n getDependency(CopyInstanceBuilderMethodDefinitionCreatorFragment.class),\n getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new JsonDeserializeAdder(getDependency(ImportRepository.class)));\n addDependency(new GlobalBuilderPostProcessor(getDependency(PreferencesManager.class), getDependency(JsonDeserializeAdder.class)));\n addDependency(new DefaultConstructorAppender(getDependency(ConstructorInsertionFragment.class), getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new RegularBuilderCompilationUnitGenerator(getDependency(RegularBuilderClassCreator.class),\n getDependency(RegularBuilderCopyInstanceBuilderMethodCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(RegularBuilderBuilderMethodCreator.class), getDependency(ImportPopulator.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new RegularBuilderUserPreferenceDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new RegularBuilderDialogDataConverter());\n addDependency(new RegularBuilderUserPreferenceConverter(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderUserPreferenceProvider(getDependency(RegularBuilderUserPreferenceDialogOpener.class),\n getDependency(PreferencesManager.class),\n getDependency(RegularBuilderDialogDataConverter.class),\n getDependency(RegularBuilderUserPreferenceConverter.class)));\n addDependency(new RegularBuilderCompilationUnitGeneratorBuilderFieldCollectingDecorator(getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(RegularBuilderCompilationUnitGenerator.class),\n getDependency(RegularBuilderUserPreferenceProvider.class)));\n addDependency(new IsEventOnJavaFilePredicate(getDependency(HandlerUtilWrapper.class)));\n\n // staged builder dependencies\n addDependency(new StagedBuilderInterfaceNameProvider(getDependency(PreferencesManager.class),\n getDependency(CamelCaseConverter.class),\n getDependency(TemplateResolver.class)));\n addDependency(new StagedBuilderWithMethodDefiniationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new StagedBuilderInterfaceTypeDefinitionCreatorFragment(getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderInterfaceCreatorFragment(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new StagedBuilderCreationBuilderMethodAdder(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new NewBuilderAndWithMethodCallCreationFragment());\n addDependency(new StagedBuilderCreationWithMethodAdder(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(NewBuilderAndWithMethodCallCreationFragment.class), getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderStaticBuilderCreatorMethodCreator(getDependency(StagedBuilderCreationBuilderMethodAdder.class),\n getDependency(StagedBuilderCreationWithMethodAdder.class),\n getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderWithMethodAdderFragment(\n getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new InterfaceSetter());\n addDependency(new StagedBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(StagedBuilderWithMethodAdderFragment.class),\n getDependency(InterfaceSetter.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new StagedBuilderStagePropertyInputDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new StagedBuilderStagePropertiesProvider(getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(StagedBuilderStagePropertyInputDialogOpener.class)));\n addDependency(new StagedBuilderCompilationUnitGenerator(getDependency(StagedBuilderClassCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(StagedBuilderStaticBuilderCreatorMethodCreator.class),\n getDependency(ImportPopulator.class),\n getDependency(StagedBuilderInterfaceCreatorFragment.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new StagedBuilderCompilationUnitGeneratorFieldCollectorDecorator(\n getDependency(StagedBuilderCompilationUnitGenerator.class),\n getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(StagedBuilderStagePropertiesProvider.class)));\n\n // Generator chain\n addDependency(new GenerateBuilderExecutorImpl(getDependency(CompilationUnitParser.class),\n getDependencyList(BuilderCompilationUnitGenerator.class),\n getDependency(IsEventOnJavaFilePredicate.class), getDependency(WorkingCopyManagerWrapper.class),\n getDependency(CompilationUnitSourceSetter.class),\n getDependency(ErrorHandlerHook.class),\n getDependency(BuilderOwnerClassFinder.class)));\n addDependency(new GenerateBuilderHandlerErrorHandlerDecorator(getDependency(GenerateBuilderExecutorImpl.class),\n getDependency(ErrorHandlerHook.class)));\n addDependency(new StatefulBeanHandler(getDependency(PreferenceStoreProvider.class),\n getDependency(WorkingCopyManagerWrapper.class), getDependency(ImportRepository.class)));\n addDependency(\n new StateInitializerGenerateBuilderExecutorDecorator(\n getDependency(GenerateBuilderHandlerErrorHandlerDecorator.class),\n getDependency(StatefulBeanHandler.class)));\n }",
"protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }",
"@ServiceInit\n public void init() {\n }",
"@Override\n\tpublic void run(String... args) throws Exception {\n\t\tconfiguration.exposeIdsFor(Film.class, Salle.class, Ticket.class, Categorie.class, Cinema.class, Place.class,\n\t\t\t\tProjection.class, Seance.class, Ville.class);\n\t\t// cinemaInitService.truncate();\n\t\t// cinemaInitService.initVilles();\n\t\t// cinemaInitService.initCategories();\n\t\t// cinemaInitService.initSeances();\n\t\t// cinemaInitService.initCinemas();\n\t\t// cinemaInitService.initSalles();\n\t\t// cinemaInitService.initPlaces();\n\t\t// cinemaInitService.initFilms();\n\t\t// cinemaInitService.initProjections();\n\t\t// cinemaInitService.initTickets();\n\t}",
"public DepControlar() {\n \n initComponents();\n depservice = new DepService();\n }",
"public static void main(String[] args) {\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"spring-dispatcher.xml\");\n\n\t\t/*Retrieve the bean using context*/\n\t\tInjectionThroughConstructor injectionThroughConstructor = context.getBean(\"injection\", InjectionThroughConstructor.class);\n\t\t/* invoking the respective method for above beans*/\n\t\tinjectionThroughConstructor.display();\n\t\t/* This peace of code through error as there is no default constructor available for \"InjectionThroughConstructor\"\n\t\tInjectionThroughConstructor injectionThroughConstructor1 = context.getBean(\"injection1\", InjectionThroughConstructor.class);\n\t\tinjectionThroughConstructor1.display();\n\t\t*/\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tSystem.out.println(\"context loaded\");\n\t\t// Sim sim = (Sim) context.getBean(\"sim\");\n\t\t/**\n\t\t * Avoid above type casting\n\t\t */\n\t\tSim sim = context.getBean(\"sim\", Sim.class);\n\t\tsim.calling();\n\t\tsim.data();\n\t}",
"private ServiceLocator() {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tSeContainerInitializer initializer = SeContainerInitializer.newInstance();\n\t\ttry (final SeContainer container = initializer.initialize()) {\n\t\t\tApp app = container.select(App.class).get();\n\t\t\tapp.executar();\n\t\t}\n\t}",
"public interface BeanInvoker<T> {\n\n default void invoke(T param) throws Exception {\n ManagedContext requestContext = Arc.container().requestContext();\n if (requestContext.isActive()) {\n invokeBean(param);\n } else {\n try {\n requestContext.activate();\n invokeBean(param);\n } finally {\n requestContext.terminate();\n }\n }\n }\n\n void invokeBean(T param) throws Exception;\n\n}",
"public RemoteFacadeServiceLocator() {\r\n }",
"public interface IApplicationInjector {\r\n\t\r\n\tpublic Runnable getServerListener(int port, int poolSize) throws ApplicationException;\r\n\t\r\n\tpublic Runnable getWorker(Socket socket) throws ApplicationException;\r\n\t\r\n\tpublic IFileUtil getFileUtil() throws ApplicationException;\r\n\r\n}",
"@PostConstruct //code will execute after the constructor and injection of dependencies\r\n \tpublic void doMyStatrupStuff()\r\n\t{\r\n\t\tSystem.out.println(\"TennisCoach: inside doMyStatrupStuff method\");\r\n\t}",
"@Override\n public void run() {\n try {\n logger.info(\"Starting\");\n communicator = Util.initialize();\n\n logger.info(\"Initialized\");\n\n ObjectAdapter adapter =\n communicator.createObjectAdapterWithEndpoints(\"Adapter\",\n String.format(\"tcp -h %s -p %d:udp -h %s -p %d\", hostAddress, hostPort, hostAddress, hostPort));\n\n logger.info(\"Adapter created\");\n\n com.zeroc.Ice.Object accountRegistererServant = new AccountRegistererImplementation(clients);\n com.zeroc.Ice.Object standardClientServant = new StandardManagerImplementation(clients);\n com.zeroc.Ice.Object premiumClientServant = new StandardManagerImplementation(clients);\n\n logger.info(\"Servants created\");\n\n adapter.add(accountRegistererServant, new Identity(\"accountRegistererServant\", null));\n adapter.add(standardClientServant, new Identity(\"standardClientServant\", null));\n adapter.add(premiumClientServant, new Identity(\"premiumClientServant\", null));\n\n logger.info(\"Servants added\");\n\n adapter.activate();\n\n logger.info(\"Adapter active. Waiting for termination.\");\n\n communicator.waitForShutdown();\n\n logger.info(\"Shutting down\");\n } catch (Exception e) {\n System.err.println(this.getClass().getName() + \" - ERROR: \" + e.getMessage());\n } finally {\n if (communicator != null) {\n try {\n logger.info(\"Destroying communicator\");\n communicator.destroy();\n } catch (Exception ignored) {\n // No need to handle this\n }\n }\n }\n }",
"public void boot() throws Exception {\n HazelcastInstance hz = Hazelcast.newHazelcastInstance();\n\n // setup the hazelcast idempontent repository which we will use in the route\n HazelcastIdempotentRepository repo = new HazelcastIdempotentRepository(hz, \"camel\");\n\n main = new Main();\n main.enableHangupSupport();\n // bind the hazelcast repository to the name myRepo which we refer to from the route\n main.bind(\"myRepo\", repo);\n // add the route and and let the route be named BAR and use a little delay when processing the files\n main.addRouteBuilder(new FileConsumerRoute(\"BAR\", 100));\n main.run();\n }",
"@Override\n\tpublic void loadService() {\n\t\t\n\t}",
"public interface Startup {\n\n\t/**\n\t * Starts the application.\n\t * \n\t * @param applicationManager\n\t * Application manager to start.\n\t */\n\tvoid start(ApplicationManager applicationManager);\n\n}",
"public void start( BundleContext bc ) throws Exception {\r\n\t\tinitLogger(bc);\r\n\t\t\r\n\t\tfindSearcher(bc);\r\n\t\t\r\n\t\tregisterService(bc);\r\n\t\t\r\n\t\tregisterServlets(bc);\r\n\t}",
"public void bootConsumer() throws Exception {\n\t\tmain = new Main();\r\n\t\t// bind MyBean into the registry\r\n\t\tmain.bind(\"foo\", new AsimpleBean());\r\n\t\t// add routes\r\n\t\tmain.addRouteBuilder(new SubRouteBuilder());\r\n\r\n\t\t// add event listener\r\n\t\tmain.addMainListener(new SubEvents());\r\n\t\t// run until you terminate the JVM\r\n\t\tSystem.out.println(\"Starting Camel. Use ctrl + c to terminate the JVM.\\n\");\r\n\t\tmain.run();\r\n\t}",
"@Override\n public synchronized void startIT() {\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n Tracer.emitEvent(Tracer.Event.START.getId(), Tracer.Event.START.getType());\n }\n\n // Console Log\n Thread.currentThread().setName(\"APPLICATION\");\n if (COMPSs_VERSION == null) {\n LOGGER.warn(\"Starting COMPSs Runtime\");\n } else if (COMPSs_BUILDNUMBER == null) {\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION);\n } else if (COMPSs_BUILDNUMBER.endsWith(\"rnull\")) {\n COMPSs_BUILDNUMBER = COMPSs_BUILDNUMBER.substring(0, COMPSs_BUILDNUMBER.length() - 6);\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION + \" (build \" + COMPSs_BUILDNUMBER + \")\");\n } else {\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION + \" (build \" + COMPSs_BUILDNUMBER + \")\");\n }\n\n // Init Runtime\n if (!initialized) {\n // Application\n synchronized (this) {\n LOGGER.debug(\"Initializing components\");\n\n // Initialize object registry for bindings if needed\n // String lang = System.getProperty(COMPSsConstants.LANG);\n // if (lang != COMPSsConstants.Lang.JAVA.name() && oReg == null) {\n // oReg = new ObjectRegistry(this);\n // }\n\n // Initialize main runtime components\n td = new TaskDispatcher();\n ap = new AccessProcessor(td);\n\n // Initialize runtime tools components\n if (GraphGenerator.isEnabled()) {\n graphMonitor = new GraphGenerator();\n ap.setGM(graphMonitor);\n }\n if (RuntimeMonitor.isEnabled()) {\n runtimeMonitor = new RuntimeMonitor(ap, td, graphMonitor, Long.parseLong(System.getProperty(COMPSsConstants.MONITOR)));\n }\n\n // Log initialization\n initialized = true;\n LOGGER.debug(\"Ready to process tasks\");\n }\n } else {\n // Service\n String className = Thread.currentThread().getStackTrace()[2].getClassName();\n LOGGER.debug(\"Initializing \" + className + \"Itf\");\n try {\n td.addInterface(Class.forName(className + \"Itf\"));\n } catch (ClassNotFoundException cnfe) {\n ErrorManager.fatal(\"Error adding interface \" + className + \"Itf\", cnfe);\n }\n }\n\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n }\n\n }",
"public static void main(String[] args){\n\n \tApplicationContext appContext = new AnnotationConfigApplicationContext(AppConfig.class);\n AnimalStoreService aService = appContext.getBean(\"animalStoreService\", AnimalStoreService.class);\n aService.execute();\n\n\n }",
"Result invoke(Invoker<?> invoker, Invocation invocation);",
"public void run() {\n run(ErisCasper.create());\n }",
"public void execute() throws MojoExecutionException {\n deploy(service, dockerImage,Optional.ofNullable(kalixProject),Optional.ofNullable(kalixContext));\n }",
"@Override\r\n\tpublic void startup() {\n\t\tif(!initialized)\r\n\t\t\tinitOperation();\r\n\t\tregisterMBean();\r\n\t}",
"@Override\n public void startup() {\n }",
"public interface DockerEngineService {\n\n /**\n * Returns a list of the existing containers.\n *\n * @return list of existing containers as {@link ContainerModel} objects, wrapped as {@link Mono}\n */\n Mono<List<Container>> getExistingContainers();\n\n /**\n * Returns detailed information about the specified containers as streaming data.\n * Flux streams returning from multiple containers are merged as a single stream.\n *\n * @param containerIDList list of container ID strings as provided by Docker\n * @return detailed information about the containers as {@link ContainerDetailsModel} wrapped as {@link Flux}\n */\n Flux<ContainerDetails> getContainerDetails(List<String> containerIDList);\n\n /**\n * Returns statistics about the specified containers as streaming data.\n * Flux streams returning from multiple containers are merged as a single stream.\n *\n * @param containerIDList container ID strings as provided by Docker\n * @return statistics about the container as {@link ContainerRuntimeStatsModel} wrapped as {@link Flux}\n */\n Flux<ContainerStats> getContainerStatistics(List<String> containerIDList);\n}",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"protected void execute() {\n\t\tContainer container = (Container) model;\n\t\tString name = Utilities.ask(\"Component name?\");\n\t\ttry {\n\t\t\tcontainer.launch(name);\n\t\t}catch(Exception e) {\n\t\t\t//Utilities.error(\"must be component name\");\n\t\t\tUtilities.error(e.getMessage());\n\t\t\t//System.out.println(\"The name:\" + name);\n\t\t}\n\t}",
"private WebServicesFabrica(){}",
"public static void main(String[] args) {\r\nApplicationContext context=new ClassPathXmlApplicationContext(\"/beans.xml\");\t\t\r\n\tServlet s=(Servlet)context.getBean(\"servletRef\");\r\n\ts.serviceMethod();\r\n\t}",
"public final AbstractC13275a invoke() {\n return (AbstractC13275a) Net.createService(AbstractC13275a.class);\n }",
"@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n FacesContext context = FacesContext.getCurrentInstance();\n seqTurnoController = context.getApplication().evaluateExpressionGet(context, \"#{turnoController}\", TurnoController.class);\n seqPessoaController = context.getApplication().evaluateExpressionGet(context, \"#{pessoaController}\", PessoaController.class);\n seqEscolaController = context.getApplication().evaluateExpressionGet(context, \"#{escolaController}\", EscolaController.class);\n seqAnoController = context.getApplication().evaluateExpressionGet(context, \"#{anoController}\", AnoController.class);\n }",
"public static void main(String[] args) throws Exception {\n \n CuratorFramework client = null;\n ServiceDiscovery<InstanceDetails> serviceDiscovery = null;\n Map<String, ServiceProvider<InstanceDetails>> providers = Maps.newHashMap();\n try {\n client = CuratorFrameworkFactory.newClient(ZkProp.connectionString(),ZkProp.retryPolicy());\n client.start();\n \n JsonInstanceSerializer<InstanceDetails> serializer = new JsonInstanceSerializer<>(InstanceDetails.class);\n serviceDiscovery = ServiceDiscoveryBuilder.builder(InstanceDetails.class).client(client).basePath(PATH).serializer(serializer).build();\n serviceDiscovery.start();\n \n processCommands(serviceDiscovery,providers,client);\n } finally {\n for (ServiceProvider<InstanceDetails> cache : providers.values()) {\n CloseableUtils.closeQuietly(cache);\n }\n \n CloseableUtils.closeQuietly(serviceDiscovery);\n CloseableUtils.closeQuietly(client);\n }\n }",
"Builder injectionFactory(InjectionObjectFactory factory);",
"@Singleton\n@Component(modules = {ContextModule.class, BusModule.class, GithubModule.class, GankModule.class, ZhiHuModule.class, RssModule.class})\npublic interface AppComponent {\n Context getContext();\n GankService getGankService();\n ZhiHuService getZhiHuService();\n RssService getRssService();\n EventBus getBus();\n}",
"@Override\n public void run() {\n startup();\n }",
"public void service_INIT(){\n }",
"public void activate(IActivator activator);",
"public DocumentumCoreServicesImpl() {\r\n\r\n\t\tIObjectService iObjService = null;\r\n\r\n\t\tif (this.objectService == null) {\r\n\r\n\t\t\tlogger.info(INFO_INICIANDO_EMC);\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tRepositoryIdentityConstants repositoryIdentityConstants = EMCDocumentumFactory\r\n\t\t\t\t\t\t.getConstants(RepositoryIdentityConstants.class);\r\n\r\n\t\t\t\tthis.setRepositoryIdentityConstants(repositoryIdentityConstants);\r\n\r\n\t\t\t\tContextFactory contextFactory = ContextFactory.getInstance();\r\n\r\n\t\t\t\tIServiceContext serviceContext = contextFactory.getContext();\r\n\t\t\t\tserviceContext.setRuntimeProperty(IServiceContext.USER_TRANSACTION_HINT, IServiceContext.TRANSACTION_REQUIRED);\r\n\t\t\t\tserviceContext.setRuntimeProperty(IServiceContext.PAYLOAD_PROCESSING_POLICY, \"PAYLOAD_FAIL_ON_EXCEPTION\");\r\n\r\n\t\t\t\tsetServiceContext(serviceContext);\r\n\r\n\t\t\t\tRepositoryIdentity repoId = new RepositoryIdentity();\r\n\r\n\t\t\t\trepoId.setRepositoryName(REPOSITORY_NAME);\r\n\r\n\t\t\t\trepoId.setUserName(USER_NAME);\r\n\r\n\t\t\t\trepoId.setPassword(USER_PASSWORD);\r\n\r\n\t\t\t\tgetServiceContext().addIdentity(repoId);\r\n\r\n\t\t\t\t//\t\tcontextFactory.register(getServiceContext());\r\n\r\n\t\t\t\t//iObjectService = ServiceFactory.getInstance().getRemoteService(IObjectService.class, serviceContext, MODULE_NAME, DFS_SERVICE_URL);\r\n\t\t\t\tiObjService = ServiceFactory.getInstance().getLocalService(IObjectService.class, serviceContext);\r\n\r\n\t\t\t\tlogger.info(INFO_CONEXAO_EMC);\r\n\r\n\t\t\t\tthis.objectService = iObjService;\r\n\r\n\t\t\t} catch (ServiceInvocationException e) {\r\n\r\n\t\t\t\tlogger.error(ERROR_CONEXAO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tthis.setObjectService(iObjService);\r\n\t\t}\r\n\r\n\t}",
"public void run() {\n try {\n // accepts the connection request.\n SelectableChannel peerHandle = this._handle.accept();\n if (peerHandle != null) {\n // now, create a service handler object to serve the\n // the client.\n ServiceHandler handler =\n this._factory.createServiceHandler(\n this._reactor,\n peerHandle);\n if (handler != null)\n // give the service handler object a chance to initialize itself.\n handler.open();\n }\n } catch (IOException ex) {\n MDMS.ERROR(ex.getMessage());\n }\n }",
"private void initPresenter() {\n\n RequestQueue requestQueue = App.getInstance().getRequestQueue();\n CatsHttp catsHttp = new VolleyCatsHttp(requestQueue);\n\n CatsRepository catsRepository = new CatsRepository(catsHttp);\n\n presenter = new MainPresenter(catsRepository);\n presenter.bindView(this);\n }",
"public void run() {\n ServiceCallback<BuildsCurrentResponse> callback = new AsyncExampleServiceCallback();\n\n try {\n buildsOperations.getBuildsCurrentAsync(callback);\n }\n catch(Exception e)\n {\n System.err.println(\"Call to Embedded Social failed with exception: \" + e.getMessage());\n }\n }",
"public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }",
"public static void main(String[] args) {\n\t\tAnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();\n\t\tcontext.register(AnnotationAwareAspectJAutoProxyCreator.class);\n\t\tcontext.scan(\"com.lpanek.dev.bigpicture.dip_vs_di_vs_ioc.ioc_aop\");\n\t\tcontext.refresh();\n\t\tBoxService boxService = (BoxService) context.getBean(\"boxService\");\n\n\t\t// ===== 2. USE CASE =====\n\t\tprintApplicationMessage(\"Boxes at the beginning: %s\", boxService.getAllBoxes());\n\n\t\tCreateBoxRequest createRequest = new CreateBoxRequest(\"Brand New Box\", period(\"2019-03-11\", \"2019-03-15\"));\n\t\tBoxId boxId = boxService.createBox(createRequest);\n\t\tprintApplicationMessage(\"Boxes after create Box: %s\", boxService.getAllBoxes());\n\n\t\tboxService.deleteBox(boxId);\n\t\tprintApplicationMessage(\"Boxes after delete Box: %s\", boxService.getAllBoxes());\n\t}",
"@Singleton\n@Component (modules = {\n PagoPaAPIModule.class,\n NetModule.class,\n LogModule.class\n})\npublic interface PagoPaAPIComponent {\n PagoPaAPI getPagoPaAPI();\n}",
"public static void main(String[] args) {\n\n\t\tBeanFactory f = new DefaultBeanFactory();\n\t\t\n\t\tf.registerBean(\"hu.training360.javasetraining.di.A\");\n\t\tf.registerBean(\"hu.training360.javasetraining.di.B\");\n\t\t\n\t\t\n\t\tA object = (A) f.getBean(\"A\");\n\t\t\n\t\tSystem.out.println(\"A object from container is null?\"+object);\n\t\tSystem.out.println(\"B object as dependency is: \"+object != null? object.getInstance() : \"null\");\n\t}",
"@Override\r\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable\r\n {\r\n HashSet<IInterceptor> interceptors;\r\n\r\n // Instantiation of the desired service\r\n if(implementation != null) {\r\n try {\r\n instance = InstanceManager.getInstance(implementation);\r\n\r\n // Cascade injection\r\n EJBInjector.inject(instance);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new ImpossibleAllocationException();\r\n }\r\n }\r\n\r\n // Get interceptors\r\n interceptors = InterceptorManager.getInterceptors(instance, method);\r\n\r\n // Before\r\n for(IInterceptor interceptor : interceptors) {\r\n interceptor.before(instance, method, args);\r\n }\r\n\r\n Object methodReturn = null;\r\n Throwable exceptionReturn = null;\r\n\r\n try {\r\n methodReturn = method.invoke(instance, args);\r\n } catch (InvocationTargetException e) {\r\n exceptionReturn = e.getTargetException();\r\n }\r\n\r\n // After\r\n for(IInterceptor interceptor : interceptors) {\r\n interceptor.after(instance, method, methodReturn, exceptionReturn, args);\r\n }\r\n\r\n // If there has been an exception, throw it\r\n if(exceptionReturn != null) {\r\n throw exceptionReturn;\r\n }\r\n\r\n return methodReturn;\r\n }",
"public interface WebApplicationActivator {\n public static final String SERVLET_CONTEXT_SITE = \"fabric3.servletContext\";\n public static final String SESSION_CONTEXT_SITE = \"fabric3.sessionContext\";\n public static final String CONTEXT_ATTRIBUTE = \"org.osoa.sca.ComponentContext\";\n public static final String OASIS_CONTEXT_ATTRIBUTE = \"org.oasisopen.sca.ComponentContext\";\n\n /**\n * Returns the classloader to use for the web component corresponding the given id\n *\n * @param componentId the web component id\n * @return the classloader\n */\n ClassLoader getWebComponentClassLoader(URI componentId);\n\n /**\n * Perform the activation, which will result in making the web application available for incoming requests to the runtime.\n *\n * @param contextPath the context path the web application will be available at. The context path is relative to the absolute address of\n * the embedded servlet container.\n * @param uri the URI of the contribution containing the web application assets\n * @param parentClassLoaderId the id for parent classloader to use for the web application\n * @param injectors the map of artifact ids to injectors. An artifact id identifies an artifact type such as a servlet class name or\n * ServletContext.\n * @param context the component context for the web component\n * @return the servlet context associated with the activated web application\n * @throws WebApplicationActivationException\n * if an error occurs activating the web application\n */\n ServletContext activate(String contextPath, URI uri, URI parentClassLoaderId, Map<String, List<Injector<?>>> injectors, ComponentContext context)\n throws WebApplicationActivationException;\n\n /**\n * Removes an activated web application\n *\n * @param uri the URI the web application was activated with\n * @throws WebApplicationActivationException\n * if an error occurs activating the web application\n */\n void deactivate(URI uri) throws WebApplicationActivationException;\n\n}",
"public void run() throws Exception {\n logger.log(Level.FINE, \"run()\");\n /* Start the discovery prcess by creating a LookupDiscovery\n * instance configured to discover BOTH the initial and additional\n * lookup services to be started.\n */\n String[] groupsToDiscover = toGroupsArray(getAllLookupsToStart());\n logger.log(Level.FINE,\n \"starting discovery by creating a \"\n +\"LookupDiscovery to discover -- \");\n for(int i=0;i<groupsToDiscover.length;i++) {\n logger.log(Level.FINE, \" \"+groupsToDiscover[i]);\n }//end loop\n LookupDiscovery ld = new LookupDiscovery(groupsToDiscover,\n getConfig().getConfiguration());\n lookupDiscoveryList.add(ld);\n\n /* Verify that the lookup discovery utility created above is\n * operational by verifying that the INITIIAL lookups are\n * discovered.\n */\n mainListener.setLookupsToDiscover(getInitLookupsToStart());\n ld.addDiscoveryListener(mainListener);\n waitForDiscovery(mainListener);\n\n /* Terminate the lookup discovery utility */\n ld.terminate();\n logger.log(Level.FINE, \"terminated lookup discovery\");\n\n\n /* Since the lookup discovery utility was terminated, the listener\n * should receive no more events when new lookups are started that\n * belong to groups the utility is configured to discover. Thus,\n * reset the listener to expect no more events.\n */\n mainListener.clearAllEventInfo();\n /* Verify that the lookup discovery utility created above is no\n * longer operational by starting the additional lookups, and\n * verifying that the listener receives no more discovered events.\n */\n logger.log(Level.FINE,\n \"starting additional lookup services ...\");\n startAddLookups();\n /* Wait a nominal amount of time to allow any un-expected events\n * to arrive.\n */\n waitForDiscovery(mainListener);\n }",
"public void register(){\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew Niveau1();\n\t\t\t}",
"@Singleton\r\n@Component(modules = {UIModule.class, InteractorModule.class, MockModelModule.class, MockNetworkModule.class})\r\npublic interface MockAnimalFindApplicationComponent extends AnimalFindApplicationComponent {\r\n}",
"@PostConstruct\n private void init(){\n\n okHttpClient = new OkHttpClient();\n\n// loadEtoroInstruments();\n\n }",
"public static void main(String[] args) {\n Executor executor = new Executor();\n InvocationHandler handler = new DynamicProxy(executor);\n IProxy proxy = (IProxy) Proxy.newProxyInstance(handler.getClass().getClassLoader(), executor.getClass().getInterfaces(), handler);\n proxy.action();\n }",
"void inject(BaseApplication application);",
"public interface SmartCultureFarmService extends Service<SmartCultureFarm> {\n\n}",
"void inject(MyMoneyApplication myMoneyApplication);"
] | [
"0.636723",
"0.61487985",
"0.58627224",
"0.58187765",
"0.567448",
"0.56152207",
"0.54927343",
"0.5433227",
"0.54023606",
"0.53632087",
"0.53330296",
"0.52903116",
"0.5286383",
"0.5267232",
"0.5258665",
"0.52501345",
"0.5239803",
"0.52375734",
"0.52367187",
"0.52006495",
"0.51969004",
"0.5184257",
"0.51504004",
"0.51443744",
"0.5141822",
"0.5130207",
"0.5116731",
"0.51156884",
"0.51077837",
"0.51039594",
"0.5086276",
"0.5077186",
"0.5073097",
"0.50663483",
"0.5064523",
"0.5058951",
"0.50546753",
"0.50540954",
"0.505087",
"0.5033705",
"0.50310016",
"0.5029",
"0.502656",
"0.5022729",
"0.50215566",
"0.5021354",
"0.50168824",
"0.5011241",
"0.50061566",
"0.5005294",
"0.499846",
"0.4997542",
"0.49951237",
"0.4983511",
"0.49818286",
"0.49738917",
"0.49732843",
"0.49625108",
"0.496102",
"0.4951542",
"0.49489355",
"0.4948513",
"0.49427414",
"0.49422464",
"0.4941381",
"0.49368474",
"0.4934086",
"0.4928068",
"0.49221706",
"0.49221706",
"0.49221706",
"0.49130177",
"0.49016908",
"0.48987255",
"0.4892663",
"0.48911548",
"0.48879328",
"0.48832577",
"0.48826262",
"0.48790404",
"0.4871826",
"0.48623753",
"0.48616424",
"0.48537338",
"0.48529017",
"0.48528162",
"0.48515153",
"0.48511708",
"0.4848864",
"0.4848384",
"0.4844965",
"0.4844943",
"0.48447707",
"0.4843454",
"0.4840988",
"0.48360816",
"0.48358896",
"0.48354018",
"0.48351723",
"0.4831909",
"0.48314002"
] | 0.0 | -1 |
Created by moskupols on 28.09.14. | public interface CommandFactory {
Command fromString(String s) throws UnknownCommandException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"public void mo4359a() {\n }",
"@Override\n public void init() {}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"private void m50366E() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n protected void getExras() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo6081a() {\n }",
"private void init() {\n\n\n\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"protected void mo6255a() {\n }",
"private void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}"
] | [
"0.5814925",
"0.5742603",
"0.57149506",
"0.5604554",
"0.5596193",
"0.5578364",
"0.5563555",
"0.5555631",
"0.5521961",
"0.5521961",
"0.55081826",
"0.5504742",
"0.5504742",
"0.5504742",
"0.5504742",
"0.5504742",
"0.5490162",
"0.54741305",
"0.54726744",
"0.5471477",
"0.54698664",
"0.545927",
"0.54538834",
"0.5451832",
"0.5450913",
"0.5442322",
"0.54382676",
"0.5436957",
"0.54264426",
"0.54264426",
"0.54199183",
"0.5416251",
"0.54149795",
"0.5412862",
"0.5406715",
"0.53988713",
"0.5397517",
"0.53915495",
"0.53884906",
"0.53884906",
"0.53884906",
"0.53884906",
"0.53884906",
"0.53884906",
"0.5371024",
"0.5371024",
"0.5371024",
"0.53630173",
"0.53614855",
"0.53614855",
"0.53614855",
"0.5361153",
"0.5361153",
"0.5354584",
"0.5354584",
"0.5354584",
"0.5352984",
"0.5349219",
"0.53451174",
"0.5340768",
"0.5339763",
"0.5336327",
"0.5332114",
"0.533006",
"0.533006",
"0.5326103",
"0.5319047",
"0.5315186",
"0.5313641",
"0.53063476",
"0.5305707",
"0.53038985",
"0.5296115",
"0.52909535",
"0.52903",
"0.527526",
"0.5271608",
"0.5265748",
"0.5265748",
"0.5265748",
"0.5265748",
"0.5265748",
"0.5265748",
"0.5265748",
"0.52615297",
"0.52567345",
"0.5235329",
"0.5225785",
"0.5217115",
"0.5215726",
"0.5211962",
"0.5211962",
"0.5211565",
"0.5210289",
"0.5205777",
"0.518751",
"0.51809406",
"0.5173288",
"0.5173288",
"0.5164128",
"0.51577944"
] | 0.0 | -1 |
/ This method authenticate the user | @CrossOrigin(origins = AppConstants.CORS)
@RequestMapping(value = {UrlConstants.API_LOGIN_AUTHENTICATE+"org"}, method = RequestMethod.POST)
public @ResponseBody ResponseDTO authenticate(@RequestBody LoginDTO loginDTO, BindingResult result) {
ResponseDTO responseDTO = null;
try {
if(result.hasErrors()){
responseDTO = new ResponseDTO();
responseDTO.setErrorCode(300);
responseDTO = ResponseWriter.writeResponse(responseDTO);
} else {
//responseDTO = loginService.authenticate(loginDTO);
logger.info("here");
}
} catch (Exception e) {
responseDTO = ResponseWriter.writeResponse(e.getCause(), e);
logger.error("error",e);
}
return responseDTO;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void authenticate(String user, String pass) {\n }",
"private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }",
"public Result authenticate() {\r\n // 1. Define class to send JSON response back\r\n class Login {\r\n public Long id;\r\n public String gamerTag;\r\n public String token;\r\n\r\n public Login() {\r\n }\r\n }\r\n\r\n // 2. Read email and password from request()\r\n JsonNode request = request().body().asJson();\r\n String gamerTag = request.get(\"gamerTag\").asText();\r\n String password = request.get(\"password\").asText();\r\n\r\n // 3. Find user with given gamerTag\r\n Login ret = new Login();\r\n User user = User.gamerTagLogin(gamerTag);\r\n if (user == null) {\r\n return unauthorized(Json.toJson(ret));\r\n }\r\n // 4. Compare password.\r\n String sha256 = User.getSha256(request.get(\"password\").asText());\r\n if (sha256.equals(user.getPassword())) {\r\n // Success\r\n String authToken = generateAuthToken();\r\n user.setToken(authToken);\r\n Ebean.update(user);\r\n ret.token = authToken;\r\n ret.gamerTag = user.getGamerTag();\r\n ret.id = user.getId();\r\n return ok(Json.toJson(ret));\r\n\r\n }\r\n // 5. Unauthorized access\r\n return unauthorized();\r\n }",
"boolean authenticate(String userName, String password);",
"public void authenticateUser() {\n\n String username = viewUsername.getText().toString();\n String password = viewPassword.getText().toString();\n\n Timber.v(\"authenticateUser called username: \" + username);\n activity.getOnboardingViewModel().authenticateUser(username, password);\n }",
"User authenticate(String username, String password);",
"public void authenticate() {\n LOGGER.info(\"Authenticating user: {}\", this.name);\n WebSession result = null;\n try {\n result =\n getContext()\n .getAuthenticationMethod()\n .authenticate(\n getContext().getSessionManagementMethod(),\n this.authenticationCredentials,\n this);\n } catch (UnsupportedAuthenticationCredentialsException e) {\n LOGGER.error(\"User does not have the expected type of credentials:\", e);\n } catch (Exception e) {\n LOGGER.error(\"An error occurred while authenticating:\", e);\n return;\n }\n // no issues appear if a simultaneous call to #queueAuthentication() is made\n synchronized (this) {\n this.getAuthenticationState().setLastSuccessfulAuthTime(System.currentTimeMillis());\n this.authenticatedSession = result;\n }\n }",
"public abstract boolean authenticate(String userid, String password) throws\n YAuthenticationException;",
"int authenticateUser(IDAOSession session, String userName, String password);",
"LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;",
"public void authenticateUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tint index=loginattempt();\r\n\t}",
"EmployeeMaster authenticateUser(int employeeId, String password);",
"public User doAuthentication(String account, String password);",
"@Override\n\tpublic Authentication authenticate(Authentication auth) throws AuthenticationException {\n\t\t username = auth.getName();\n\t\tString pass = auth.getCredentials().toString();\n\t\t\n\t\tif(AppController.users.containsKey(username))\n\t\t{\n\t\tString password = AppController.users.get(username); \n\t\t\t\n\t\tif(password.equals(pass))\n\t\t\treturn new UsernamePasswordAuthenticationToken(username,pass,Collections.EMPTY_LIST);\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t\t\n\t\t}\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t}",
"List<String> authenticateUser(String userName, String password);",
"protected boolean authenticate() {\n \tif (mConfig == null) {\n \t\tmConfig = getConfig();\n \t}\n \tString keys[] = getKeys();\n \tif (keys != null) {\n\t mConfig = api.authenticateToken(keys[0], keys[1], mConfig);\n\t if (mConfig != null) {\n\t return true;\n\t }\n \t}\n \tshowToast(\"Failed user authentication for stored login tokens.\");\n \tclearKeys();\n \tsetLoggedIn(false);\n \treturn false;\n }",
"private boolean authenticate (HttpRequest request, HttpResponse response) throws UnsupportedEncodingException\n\t{\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\tif(requestSplit.length<2)\n\t\t\treturn false;\n\t\tString serviceName=requestSplit[1];\n\t\tfinal int BASIC_PREFIX_LENGTH=\"BASIC \".length();\n\t\tString userPass=\"\";\n\t\tString username=\"\";\n\t\tString password=\"\";\n\t\t\n\t\t//Check for authentication information in header\n\t\tif(request.hasHeaderField(AUTHENTICATION_FIELD)\n\t\t\t\t&&(request.getHeaderField(AUTHENTICATION_FIELD).length()>BASIC_PREFIX_LENGTH))\n\t\t{\n\t\t\tuserPass=request.getHeaderField(AUTHENTICATION_FIELD).substring(BASIC_PREFIX_LENGTH);\n\t\t\tuserPass=new String(Base64.decode(userPass), \"UTF-8\");\n\t\t\tint separatorPos=userPass.indexOf(':');\n\t\t\t//get username and password\n\t\t\tusername=userPass.substring(0,separatorPos);\n\t\t\tpassword=userPass.substring(separatorPos+1);\n\t\t\t\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tlong userId;\n\t\t\t\tAgent userAgent;\n\t\t\t\t\n\t\t\t\tif ( username.matches (\"-?[0-9].*\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuserId = Long.valueOf(username);\n\t\t\t\t\t} catch ( NumberFormatException e ) {\n\t\t\t\t\t\tthrow new L2pSecurityException (\"The given user does not contain a valid agent id!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuserId = l2pNode.getAgentIdForLogin(username);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tuserAgent = l2pNode.getAgent(userId);\n\t\t\t\t\n\t\t\t\tif ( ! (userAgent instanceof PassphraseAgent ))\n\t\t\t\t\tthrow new L2pSecurityException (\"Agent is not passphrase protected!\");\n\t\t\t\t((PassphraseAgent)userAgent).unlockPrivateKey(password);\n\t\t\t\t_currentUserId=userId;\n\t\t\t\t\n\t\t\t\tif(!_userSessions.containsKey(userId))//if user not registered\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tMediator mediator = l2pNode.getOrRegisterLocalMediator(userAgent);\n\t\t\t\t\t_userSessions.put(userId, new UserSession(mediator));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_userSessions.get(userId).updateServiceTime(serviceName,new Date().getTime());//update last access time for service\n\t\t\t\t\n\t\t\t\tconnector.logMessage(\"Login: \"+username);\n\t\t\t\tconnector.logMessage(\"Sessions: \"+Integer.toString(_userSessions.size()));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch (AgentNotKnownException e) {\n\t\t\t\tsendUnauthorizedResponse(response, null, request.getRemoteAddress() + \": login denied for user \" + username);\n\t\t\t} catch (L2pSecurityException e) {\n\t\t\t\tsendUnauthorizedResponse( response, null, request.getRemoteAddress() + \": unauth access - prob. login problems\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tsendInternalErrorResponse(\n\t\t\t\t\t\tresponse, \n\t\t\t\t\t\t\"The server was unable to process your request because of an internal exception!\", \n\t\t\t\t\t\t\"Exception in processing create session request: \" + e);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.setStatus ( HttpResponse.STATUS_BAD_REQUEST );\n\t\t\tresponse.setContentType( \"text/plain\" );\n\t\t\tresponse.print ( \"No authentication provided!\" );\n\t\t\tconnector.logError( \"No authentication provided!\" );\n\t\t}\n\t\treturn false;\n\t}",
"public void authenticate( )\n\t{\n\t\t\n\t\t try\n\t\t {\n\t\t\t SessionFactory sessionFactory=new Configuration().configure\n\n().buildSessionFactory();\n\t\t\t Session session=sessionFactory.openSession();\n\t\t\t \n\t\t\t Transaction tr=session.beginTransaction();\n\t\t\t\n\t\t\t tr.commit();\n\t\t\t \n\t\t\t \n\t\t }\n\t\t catch(Exception e)\n\t\t {\n\t\t\t e.printStackTrace();\n\t\t }\n\n\t}",
"public void authenticate(LoginRequest loginRequest) {\n\n }",
"public boolean authenticateUser(String userName,String password) throws ToDoListDAOException{\r\n\t\t\r\n\t\t User user = getUserByUserName(userName); \r\n\t\t System.out.println(userName + \" \" + password);\r\n\t if(user!=null && user.getUserName().equals(userName) && user.getPassword().equals(password)){\r\n\t return true;\r\n\t }else{\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t}",
"@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }",
"private Boolean authorize() {\n\n return Session.getInstance().login(user.getText(), password.getText());\n }",
"@RequestMapping(value = \"/authenticate\", method = { RequestMethod.POST })\n public AuthResult authorize(@RequestParam String username, @RequestParam String password) {\n\n\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);\n try {\n Authentication authentication = authenticationManager.authenticate(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n User user = userService.getUserByUserName(username);\n return new AuthResult(tokenUtils.createToken(user), \"\", Status.OK);\n } catch (AuthenticationException ex){\n return new AuthResult(\"\", ex.getMessage(), Status.ERROR);\n }\n\n\n\n //return new UserInfo(user.getUsername(), tokenUtils.createToken(user));\n }",
"AuthenticationToken authenticate(String username, CharSequence password) throws Exception;",
"public abstract boolean authenticate(ServiceSecurity serviceSecurity, SecurityContext securityContext);",
"private boolean authenticatedUser(String uName, String pass) {\n\t\treturn true;\n\t}",
"@PostMapping(Constants.URI_API_AUTH)\n\tpublic ResponseEntity<?> authenticateUser(@RequestParam(required=true) String username,\n\t\t\t\t\t\t\t\t\t\t\t @RequestParam(required=true) String password){\n\t\t\n\t\tLOG.debug(\"API Authenticate User: User '\" + username + \"'\");\n\t\t\n\t\tAuthenticationToken authToken = new AuthenticationToken(userService.authenticateUser(username, password));\n\t\t\n\t\treturn ResponseEntity.ok(authToken);\n\t}",
"@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\t\t// validate username and pwd with predefined credentials\n\t\tif (username.equals(Utility.USERNAME) && password.equals(Utility.PASSWORD)) {\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@PreAuthorize(\"permitAll()\")\n @RequestMapping(\n value = \"/users/auth\",\n method = RequestMethod.POST\n )\n public ResponseEntity<AuthResponse> authenticate(@RequestParam(value = \"username\") String username, @RequestParam(value = \"password\") String password) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(username, password)\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n final UserDetails userDetails = userDetailsService.loadUserByUsername(username);\n final String token = tokenUtils.generateToken(userDetails);\n\n return ResponseEntity.ok(new AuthResponse(token));\n }",
"boolean isAuthenticate(String username, String password) throws UserDaoException;",
"protected synchronized void login() {\n\t\tauthenticate();\n\t}",
"public boolean authenticateUser() {\r\n try {\r\n \r\n firstServerMessage();\r\n sendKeys();\r\n sessionKeyMsg();\r\n \r\n \r\n \r\n \treturn true;\r\n }\r\n \r\n catch(Exception ioe){\r\n System.out.println(\"Terminating session with Acct#: \" + currAcct.getNumber());\r\n //ioe.printStackTrace();\r\n return false;\r\n }\r\n \r\n }",
"public void authenticateUser(String username, String password) {\n\n // Need to validate credentials\n // For now just authenticate the user\n\n AuthenticateUserPayload payload = new\n AuthenticateUserPayload(username, password);\n\n Timber.v(\"authenticateUser called username: \" + username);\n Observable<AuthenticateUserResponse> respObserv = ApiUtility.getApiService().authenticateUser(payload);\n respObserv.subscribeOn(Schedulers.computation())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<AuthenticateUserResponse>() {\n @Override\n public void onSubscribe(@NonNull Disposable d) { }\n\n @Override\n public void onNext(@NonNull AuthenticateUserResponse authenticateUserResponse) {\n Timber.v(\"on Next() called \" + authenticateUserResponse.getMessage());\n authUserResponseObservable.onNext(authenticateUserResponse);\n }\n\n @Override\n public void onError(@NonNull Throwable e) {\n Timber.v(\"on Error() called message: \" + e.getMessage());\n Timber.v(\"on Error() called cause: \" + e.getCause());\n authUserError(e);\n }\n\n @Override\n public void onComplete() { }\n });\n }",
"@Override\r\n\tpublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows AuthenticationException {\r\n\tAppUser appUser = null;\r\n\r\n\ttry {\r\n\t\tappUser = new ObjectMapper().readValue(request.getInputStream(), AppUser.class);\r\n\t} catch (IOException e) {\r\n\t\tthrow new RuntimeException(e);\r\n\t}\r\n\r\n\t\tSystem.out.println(\"user one : \"+appUser.getUsername());\r\n\t\treturn authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(appUser.getUsername(), appUser.getPassword()));\r\n\t}",
"@Override\n\tpublic Authentication authenticate(Authentication authentication) throws AuthenticationException {\n\t\tString userId = authentication.getPrincipal().toString();\n\t\tString password = authentication.getCredentials().toString();\n\t\tUserInfo userAuth = Config.getInstance().getUserAuth();\n\t\tuserAuth.setUserEmail(userId);\n\t\tuserAuth.setUserPassword(password);\n\t\tLoginService loginService = Config.getInstance().getLoginService();\n\t\tUserInfo userInfo;\n\t\ttry{\n\t\t\tuserInfo = loginService.authenticateUser(userId,password);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new AuthenticationServiceException(\"1000\");\n\t\t}\n\t\tif (userInfo != null)\n\t\t{\n\t\t\treturn grantNormalRole(userInfo, authentication);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No user with this banner id found.\n\t\t\tthrow new BadCredentialsException(\"1001\");\n\t\t}\n\t}",
"@Override\n public Authentication attemptAuthentication(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)\n throws AuthenticationException, IOException, ServletException {\n AccountCredentials credentials = new ObjectMapper().readValue(httpServletRequest.getInputStream(), AccountCredentials.class);\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(credentials.getUsername(), credentials.getPassword());\n return getAuthenticationManager().authenticate(token);\n }",
"private static boolean authenticateUser(String username_input, String password_input){\n\t\tif(!username_input.equals(USERNAME) || !password_input.equals(PASSWORD)){\n\t\t\tSystem.out.println(\"Invalid Credentials Entered!\");\n\t\t\treturn false;\n\t\t}\n\t\telse //username and password entered were correct\n\t\t\tSystem.out.println(\"User Credentials Authenticated! Please wait while books and students are being loaded.\");\n\t\treturn true;\n\t}",
"public void authenticateUser(View view)\n {\n\n String username = userNameTextField.getText().toString().trim();\n String password = passwordTextField.getText().toString();\n if(username.equals(\"\") || password.equals(\"\"))\n {\n AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);\n alt_bld.setMessage(\"Username and Password are required.\")\n .setCancelable(true);\n AlertDialog alert = alt_bld.create();\n alert.setButton(-1, \"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n } });\n alert.setTitle(\"Error\");\n alert.show();\n }\n else\n {\n\n progressDialog = ProgressDialog.show(LoginActivity.this,\n \"\", \"Please wait...\", true);\n isIMEIRequest = false;\n Thread thread = new Thread(this);\n thread.start();\n }\n }",
"UserPermissions authenticate (Request request);",
"private void authenticate(String username, String password) throws Exception {\n\t\tboolean autenticated = false;\n\t\tEntityManagerFactory factory = Persistence.createEntityManagerFactory(\"ForumApp\");\n\t\tEntityManager em = factory.createEntityManager();\n\n\t\tTypedQuery<User> q = em.createQuery(\"SELECT u FROM User u WHERE u.username = '\" + username + \"'\", User.class);\n\t\tUser user = q.getSingleResult();\n\n\t\tif (user != null) {\n\n\t\t\tif (user.getPassword().equals(password)) {\n\t\t\t\tautenticated = true;\n\t\t\t}\n\t\t}\n\n\t\t// Close the entity manager\n\t\tem.close();\n\t\tfactory.close();\n\n\t\t// Throw an Exception if the credentials are invalid\n\t\tif (!autenticated) {\n\t\t\tthrow new Exception();\n\t\t}\n\t}",
"User authenticate(String headerToken) throws AuthenticationException;",
"AuthenticationResponseDTO authenticateUser(String email, String password);",
"public void authenticate(View view) {\n \t\n \t/* We use the web service login here.\n \t* Commented code stores the data into the local\n \t* sqlite server.\n \t*/\n \tloginUser();\n \t/*\n \tSQLiteDatabase db = dbHelper.getWritableDatabase();\n \t\n \tString username = usernameField.getText().toString();\n \tString password = passwordField.getText().toString();\n \tString whereClause = \"username=? AND password=?\";\n \tString[] whereValues = new String[] {\n \t\t\tusername, \n \t\t\tpassword\n \t};\n \tCursor c = db.query(\n \t\t\t\"users\", // Table name to query.\n \t\t\tnull, // Passing null returns all columns in the database.\n \t\t\twhereClause, // The query condition.\n \t\t\twhereValues, // The values that fills in the query condition.\n \t\t\tnull, // Group by, null mens no group by.\n \t\t\tnull, // Having, null mens no having clause.\n \t\t\tnull // Sort order, null meams o sort order.\n \t\t\t);\n \t// Get the number of rowd from the result set.\n \tint rowCount = c.getCount();\n \tif(rowCount == 0 ) {\n \t\t// There is no record with the given username and password.\n \t\tToast toast = Toast.makeText(getApplicationContext(),\n \t\t\t\"Login failed, please check your credentials.\", \n \t\t\tToast.LENGTH_SHORT \n \t);\n \ttoast.show();\n \t}\n \telse {\n \t\t// The record was found show success message.\n \t\tToast toast = Toast.makeText(getApplicationContext(),\n \t\t\t\"Login success !\", \n \t\t\tToast.LENGTH_SHORT \n \t);\n \ttoast.show();\n \t\n \t// Now get the user's id from the result, to\n \t// store it in the session (pref file in our case).\n \tc.moveToFirst();\n \tint id_column_index = c.getColumnIndex(\"id\");\n \tint user_id = c.getInt(id_column_index);\n \tLog.i(\"USER\", \"Storing user id : \" + user_id);\n \t// Now store the login state.\n \tContext context = getApplicationContext();;\n \tSharedPreferences pref = context.getSharedPreferences(\n \t\t\tgetString(R.string.preference_file_key),\n \t\t\tContext.MODE_PRIVATE\n \t);\n \tSharedPreferences.Editor editor = pref.edit();\n \teditor.putString(\"logged_in\", \"true\");\n \teditor.putString(\"user_id\", String.valueOf(user_id));\n \teditor.commit();\n \tIntent homeIntent = new Intent(this, HomeActivity.class);\n \tstartActivity(homeIntent);\n \t}\n \t*/\n \t\n \t\n }",
"@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain,\n Authentication authResult) throws IOException, ServletException {\n ApiUser apiUser = this.apiUsersService.getApiUserByUserName(((User) authResult.getPrincipal()).getUsername());\n String jwtToken = Jwts.builder()\n .setSubject(((User) authResult.getPrincipal()).getUsername())\n .setExpiration(new Date(System.currentTimeMillis() + EXPIRATION_TIME))\n .claim(\"authorities\", ((User) authResult.getPrincipal()).getAuthorities().toArray())\n .claim(\"firstName\", apiUser.getFirstName())\n .claim(\"lastName\", apiUser.getLastName())\n .claim(\"apiUserId\", apiUser.getId())\n .signWith(SignatureAlgorithm.HS512, SECRET.getBytes(StandardCharsets.UTF_8))\n .compact();\n try {\n response.getWriter().write(TOKEN_PREFIX + jwtToken);\n this.eventsService.createEvent(new Event(\"Logged In\", apiUser,\n new Date(System.currentTimeMillis()).getTime(), false));\n } catch (Exception e) {\n authLogger.warn(e.getMessage());\n throw (e);\n }\n response.setStatus(HttpServletResponse.SC_ACCEPTED);\n }",
"private Authentication tryToAuthenticateWithUsernameAndPassword(String username, String password) {\n\t\tUsernamePasswordAuthenticationToken requestAuthentication = new UsernamePasswordAuthenticationToken(username, password);\n\t\treturn tryToAuthenticate(requestAuthentication);\n \n\t}",
"@Override\n public Authentication attemptAuthentication(\n HttpServletRequest request,\n HttpServletResponse response) throws AuthenticationException {\n\n try {\n // 1. pobieramy dane uzytkownika ktory chce sie zalogowac\n AuthenticationUser user = new ObjectMapper().readValue(request.getInputStream(), AuthenticationUser.class);\n\n // 2. dokonujemy proby logowania\n return authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(\n user.getUsername(),\n user.getPassword(),\n Collections.emptyList()\n ));\n } catch ( Exception e ) {\n throw new AppException(e.getMessage());\n }\n\n }",
"public boolean authenticate(String s) {\r\n // TODO - implement User.authenticate\r\n throw new UnsupportedOperationException();\r\n }",
"boolean authNeeded();",
"public boolean authenticate(String username, String password, HttpServletRequest request){\n try {\n MySQLService sql = new MySQLService();\n String digest = DigestUtils.md5Hex(password);\n boolean isMatched = sql.checkMatch(username, digest);\n System.out.println(isMatched);\n if (isMatched) {\n request.getSession().setAttribute(\"username\", username);\n return true;\n } else {\n return false;\n }\n }catch (Exception e){\n System.out.println(e);\n\n }\n return false;\n }",
"public void authenticate(LoginCredentials credentials) throws LoginException;",
"boolean isAuthenticated();",
"public ResponseEntity<?> authenticateUser(LoginRequest loginRequest){\n if (loginRequest.getIsTeacher() == 1){\n return teacherService.authenticateTeacher(loginRequest);\n }else {\n return studentService.authenticateStudent(loginRequest);\n }\n }",
"@Override\n\tpublic String authenticate(String username, String password) throws RemoteException\n\t{\n\t\tIterator<User> userIterator = this.users.iterator();\n\t\tUser user;\n\t\t//For every user in users\n\t\twhile (userIterator.hasNext())\n\t\t{\n\t\t\tuser = userIterator.next();\n\t\t\t//If this user's username matches the given username\n\t\t\tif (user.getUsername().equals(username))\n\t\t\t{\n\t\t\t\t//If this user's password matches the given password\n\t\t\t\tif (user.getPassword().equals(password))\n\t\t\t\t{\n\t\t\t\t\t//Generate a unique userToken\n\t\t\t\t\tString userToken = \"\";\n\t\t\t\t\tboolean duplicate = true;\n\t\t\t\t\twhile (duplicate)\n\t\t\t\t\t{\n\t\t\t\t\t\tuserToken = genUserToken();\n\t\t\t\t\t\tif (matchUser(userToken) == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tduplicate = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t//Give the userToken to the user and return it\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i = 0; i < users.size(); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tuser = users.get(i);\n\t\t\t\t\t\tif(user.getUsername().equals(username))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tuser.setUserToken(userToken);\n\t\t\t\t\t\t\tServerStartup.refreshSaver();\n\t\t\t\t\t\t\treturn userToken;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tServerStartup.refreshSaver();\n\t\t\t\t\treturn userToken;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//If no username/password match was found, return null.\n\t\treturn null;\n\t}",
"private Object authenticate(Invocation invocation, HttpServletRequest request,\r\n HttpServletResponse response) throws IOException {\r\n\r\n Object[] args = invocation.getArgs();\r\n if (args.length != 2) {\r\n throw new RuntimeException(\"The authenticate call must have two arguments\");\r\n }\r\n\r\n String user = (String) args[0];\r\n String password = (String) args[1];\r\n\r\n //We can make the remote call\r\n Object result = invoke(invocation);\r\n\r\n //If the authentification failed we finish the execution\r\n if (result instanceof LoginContext) {\r\n LoginContext loginContext = (LoginContext) result;\r\n if (loginContext == null) {\r\n throw new RuntimeException(\"Login failed!!\");\r\n }\r\n \r\n HttpSession session = request.getSession(false);\r\n String sessionId = session.getId();\r\n response.addHeader(\"jsessionid\", sessionId);\r\n\r\n \r\n session.setAttribute(User.USER_KEY, loginContext.getUser());\r\n\r\n session.setAttribute(RhSessionContext.CLIENT_ID, loginContext.getClient_id());\r\n session.setAttribute(RhSessionContext.ORG_ID, loginContext.getOrg_id());\r\n session.setAttribute(RhSessionContext.DUTY_ID, loginContext.getDutyId());\r\n\r\n Map attrs = loginContext.getAttributes();\r\n Set<Map.Entry> entries = attrs.entrySet();\r\n for (Map.Entry entry : entries) {\r\n session.setAttribute((String) entry.getKey(), entry.getValue());\r\n }\r\n\r\n // 创建login session\r\n LoginSession loginSession = new LoginSession();\r\n loginSession.setLoginName(loginContext.getUser().getUsername());\r\n loginSession.setIp(request.getRemoteHost());\r\n loginSession.setLoginDate(new Date(session.getCreationTime()));\r\n loginSession.setSessionId(session.getId());\r\n loginSession.setLiving(true);\r\n\r\n //Session hibernateSession = RhinoCtx.instance().getHibernate().getSession();\r\n try {\r\n \r\n ServiceBase serviceBase = (ServiceBase) ServiceFactory.getService(ServiceBase.NAME);\r\n //ServiceBase serviceBase = (ServiceBase) RhinoCtx.getBean(\"serviceBase\");\r\n //hibernateSession.beginTransaction();\r\n serviceBase.save(loginSession);\r\n //hibernateSession.getTransaction().commit();\r\n session.setAttribute(\"loginSession\", loginSession);\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n //hibernateSession.getTransaction().rollback();\r\n } finally {\r\n //hibernateSession.close();\r\n }\r\n }\r\n return result;\r\n }",
"@Override\n public boolean authenticate(UserInfo userInfo, String enteredCurrentPassword) {\n try {\n Authentication authentication = authenticationManager.authenticate(\n new InternalUsernamePasswordAuthenticationToken(userInfo.getUsername(),\n enteredCurrentPassword));\n return (authentication != null) && authentication.isAuthenticated();\n } catch (AuthenticationException e) {\n return false;\n }\n }",
"@RequestMapping(value = \"/authenticate\", method = RequestMethod.POST)\r\n public ResponseEntity<User> login(@RequestBody User user) {\r\n\t\tlogger.info(\"Authenticate user:\"+ user);\r\n\t\t\r\n\t\t// logger.debug(\"users=\"+userService.findAllUsers() );\r\n\t\t\r\n\t\tUser dbUser = userService.findByUserName( user.getUsername() );\r\n\r\n\t\tif (dbUser != null) {\r\n\t\t\tlogger.debug(\"Start authenticate User with username [{}].\", user.getUsername() );\r\n\t\t\t//logger.debug(\"dbUser.getPassword() = \" + dbUser.getPassword() );\r\n\t\t\t//logger.debug(\"user.getPassword() = \" + user.getPassword() );\r\n\t\t\tif ( dbUser.getPassword() != null ) {\r\n\t\t\t\t//String encryptedPasword = bCryptPasswordEncoder.encode( user.getPassword() );\r\n\t\t\t\t//logger.debug(\"encryptedPasword = \" + encryptedPasword );\r\n\t\t\t\tif ( bCryptPasswordEncoder.matches( user.getPassword(), dbUser.getPassword())) {\t\t\t\t\r\n\t\t\t\t//if ( dbUser.getPassword().equals( encryptedPasword ) ) { // this won't work, not same\r\n\t\t\t\t\tlogger.info(\"User with username {} authenticated.\", user.getUsername() );\r\n\t\t\t\t\treturn new ResponseEntity<User>(dbUser, HttpStatus.OK);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tlogger.warn(\"Unable to authenticate. Username [{}] or password incorrect.\", user.getUsername() );\r\n\t\t// json client side not handled status 401 with message pass\r\n\t\treturn new ResponseEntity(new CustomErrorType(\"Unable to authenticate. Username or password incorrect.\"),\r\n\t\t\t\tHttpStatus.UNAUTHORIZED);\r\n\t\t\r\n\t\t//return new ResponseEntity(new CustomErrorType(\"Unable to authenticate. Username or password incorrect.\"),\r\n\t\t//\t\tHttpStatus.OK);\r\n\t\t\r\n\t\t\r\n\t}",
"private boolean authenticate(String _uid, String _pwd) {\n\n Connection dbCon = null;\n ResultSet rs = null;\n try {\n dbCon = ds.getConnection();\n Statement s = dbCon.createStatement();\n rs = s.executeQuery(\"select * from user where id = '\"\n + _uid + \"' and pwd = '\" + _pwd + \"'\");\n return (rs.next());\n }\n catch (java.sql.SQLException e) {\n System.out.println(\"A problem occurred while accessing the database.\");\n System.out.println(e.toString());\n }\n finally {\n try {\n dbCon.close();\n }\n catch (SQLException e) {\n System.out.println(\"A problem occurred while closing the database.\");\n System.out.println(e.toString());\n }\n }\n \n return false;\n\n }",
"@Override\n public boolean authenticated(final String username, final String password) {\n\n Claim claim;\n try {\n claim = credService.authenticate(new PasswordCredentialsWrapper(username, password));\n } catch (AuthenticationException e) {\n LOG.debug(\"Authentication failed for user '{}' : {}\", username, e);\n return false;\n }\n\n LOG.debug(\"Authentication result for user '{}' : {}\", username, claim.domain());\n return true;\n }",
"public boolean authenticate(Connection con, String userid, String password)\n throws SQLException, NoSuchAlgorithmException{\n PreparedStatement ps = null;\n ResultSet rs = null;\n try {\n boolean userExist = true;\n // INPUT VALIDATION\n if (userid==null||password==null){\n // TIME RESISTANT ATTACK\n // Computation time is equal to the time needed by a legitimate user\n userExist = false;\n userid=\"\";\n password=\"\";\n }\n\n ps = con.prepareStatement(\"select password, extra FROM login where User_ID = ?\");\n ps.setString(1, userid);\n rs = ps.executeQuery();\n String digest, extra;\n if (rs.next()) {\n digest = rs.getString(\"password\");\n extra = rs.getString(\"extra\");\n // DATABASE VALIDATION\n if (digest == null || extra == null) {\n throw new SQLException(\"Database inconsistant Salt or Digested Password altered\");\n }\n if (rs.next()) { // Should not append, because login is the primary key\n throw new SQLException(\"Database inconsistent two CREDENTIALS with the same LOGIN\");\n }\n } else { // TIME RESISTANT ATTACK (Even if the user does not exist the\n // Computation time is equal to the time needed for a legitimate user\n digest = \"000000000000000000000000000=\";\n extra = \"00000000000=\";\n userExist = false;\n }\n\n byte[] bDigest = base64ToByte(digest);\n byte[] bExtra = base64ToByte(extra);\n\n // Compute the new DIGEST\n byte[] proposedDigest = getHash(ITERATION_NUMBER, password, bExtra);\n\n return Arrays.equals(proposedDigest, bDigest) && userExist;\n } catch (IOException ex){\n throw new SQLException(\"Database inconsistant Salt or Digested Password altered\");\n }\n finally{\n close(rs);\n close(ps);\n }\n }",
"SignedObject authenticate(String username, String hashedPassword) throws RemoteException, Exception;",
"@Override\r\n\tpublic User Authenticate(String username) {\n\t\t\tSession currentSession = this.sessionFactory.getCurrentSession();\r\n\t\t\tSystem.out.println(username);\r\n\t\t\tList<User> userList = currentSession.createCriteria(User.class)\r\n\t\t\t\t\t.add(Restrictions.eq(\"email\", username))\r\n\t\t\t\t\t.list();\r\n\t\treturn userList.get(0);\r\n\t}",
"protected synchronized String authenticated() throws JSONException {\n JSONObject principal = new JSONObject()\n .put(FIELD_USERNAME, USER)\n .put(FIELD_PASSWORD, PASSWORD);\n if (token == null){ //Avoid authentication in each call\n token =\n given()\n .basePath(\"/\")\n .contentType(ContentType.JSON)\n .body(principal.toString())\n .when()\n .post(LOGIN)\n .then()\n .statusCode(200)\n .extract()\n .header(HEADER_AUTHORIZATION);\n\n }\n return token;\n }",
"private static boolean authenticate(String username, String password) {\r\n\t\tFile file = new File(\"auth.txt\");\r\n\t\tScanner scanner;\r\n\t\tString user = null;\r\n\t\tString pwd = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(file);\r\n\t\t\tString nextLine = scanner.nextLine();\r\n\t\t\tString[] parts = nextLine.split(\"=\");\r\n\t\t\tuser = parts[0];\r\n\t\t\tpwd = parts[1];\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn (username.equals(user) && password.equals(pwd));\r\n\t\t\r\n\t}",
"public void auth(View view) {\n\n // get UI inputs\n login = (EditText) findViewById(R.id.login);\n password = (EditText) findViewById(R.id.password);\n result = (TextView)findViewById(R.id.result);\n\n // change inputs to strings\n txtLogin = login.getText().toString();\n txtPass = password.getText().toString();\n\n new Thread(){\n @Override\n public void run() { // thread to not disturb the UI thread\n\n URL url = null;\n try {\n url = new URL(\"https://httpbin.org/basic-auth/bob/sympa\");\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n // adding auth headers\n String userAndPassword = txtLogin+\":\"+txtPass; // text values from text fields\n// Log.i(\"USR\", txtLogin);\n// Log.i(\"PWD\", txtPass);\n String basicAuth = \"Basic \"+ Base64.encodeToString(userAndPassword.getBytes(), Base64.NO_WRAP);\n urlConnection.setRequestProperty(\"Authorization\", basicAuth);\n\n try {\n // read the returned HTML\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n String s = readStream(in);\n Log.i(\"JFL\", s);\n\n jsonObject = new JSONObject(s); // storing the returned html in JSON form for easy access\n\n boolean res = jsonObject.getBoolean(\"authenticated\");\n// String usr = jsonObject.getString(\"user\");\n runOnUiThread(new Runnable() { // safe way to access the UI thread\n @Override\n public void run() {\n result.setText(\"\"+res);\n }\n });\n\n } catch (JSONException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }.start();\n\n }",
"@Override\n public boolean authenticate() {\n try {\n if (conn != null) {\n return true;\n }\n conn = new Connection(configuration.getHost());\n conn.connect();\n //登陆linux\n boolean isAuthenticated = conn.authenticateWithPassword(configuration.getUsername(),\n configuration.getPassword());\n if (!isAuthenticated) {\n conn.close();\n conn = null;\n throw new UserOrPasswordErrorException(\"账号或密码错误!\");\n }\n return true;\n } catch (IOException e) {\n conn.close();\n conn = null;\n throw new HostCannotConnectException(\"无法连接到主机!\");\n }\n }",
"public Users authenticateUser(Users user) {\r\n\r\n String userName = user.getEmail();\r\n String passw = user.getPassword();\r\n\r\n Query query = em.createNamedQuery(\"checkUser\");\r\n query.setParameter(\"uname\", userName);\r\n query.setParameter(\"upass\", passw);\r\n\r\n if (!query.getResultList().isEmpty()) {\r\n Users userAuthenticated = (Users) query.getSingleResult();\r\n return userAuthenticated;\r\n }\r\n return null;\r\n }",
"public boolean loginUser();",
"public MidUser authenticate(String ticket) {\n return null;\n }",
"protected void login() {\n\t\t\r\n\t}",
"@POST\n @Path(\"/UserAuth\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response authenticateUser(final LoginRequest loginRequest) {\n final String methodName = \"authenticateUser\";\n log.entering(CLASS_NAME, methodName);\n Status status = Response.Status.OK;\n loginRequest.setImsAction(WipsConstant.WIPS_LOGIN_ACTION);\n final PendingApprovalResponse pendingApprovalResponse =\n this.wipsLoginBF.authenticateUser(loginRequest);\n if (pendingApprovalResponse.isValidUser()) {\n final String lterm =\n createUserSessionDetailsIntoCache(loginRequest.getRacfId(),\n pendingApprovalResponse);\n pendingApprovalResponse.setLtermToken(WipsUtil.encrpyt(lterm));\n } else {\n status = Response.Status.BAD_REQUEST;\n }\n log.exiting(CLASS_NAME, methodName);\n return buildResponse(pendingApprovalResponse, status);\n }",
"public boolean authenticateUser(String username, String password) {\n\t\tboolean isAuthenticated = false;\n\t\tboolean db_error = true;\n\t\tLogger.logMessage(\"UserManager.authenticateUser(..) : authenticate user \"\n\t\t\t\t+ username);\n\t\tif (DatabaseUtil.checkDatabaseConnection() == Constants.DATABASE_CONNECTION_SUCCESS) {\n\t\t\tisAuthenticated = Service.getService().userAuthentication(username,\n\t\t\t\t\tpassword);\n\t\t\tif (userList.size() == 0) {\n\t\t\t\tpopulateUserListFromDatabase();\n\t\t\t}\n\t\t\tdb_error = false;\n\t\t} else {\n\t\t\tPopupWindow.popup.createInformationalPopup(\"Login Error\",\n\t\t\t\t\t\"Not connected to database, database server is down.\");\n\t\t\tLogger.logMessage(\"UserManager.authenticateUser(..) : database connection not alive authenticating from in memory cache \"\n\t\t\t\t\t+ username);\n/*\t\t\tUser user = userMap.get(username);\n\t\t\tif (user != null) {\n\t\t\t\tisAuthenticated = true;\n\t\t\t\tdb_error = false;\n\t\t\t}*/\n\t\t}\n\t\tif (!isAuthenticated && !db_error) {\n\t\t\tPopupWindow.popup.createInformationalPopup(\"Login Error\",\n\t\t\t\t\t\"Username/Password don not match\");\n\t\t}\n\t\treturn isAuthenticated;\n\t}",
"public static boolean login(Context ctx) {\n\t\t\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\t\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\t\n\t\tif(username.equals(\"user\") && password.equals(\"pass\")) {\n\t\t\tctx.res.setStatus(204);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"McBobby\",true));\n\t\t\treturn true;\n\t\t}else {\n\t\t\t\n\t\t\tctx.res.setStatus(400);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n//\t\tctx.queryParam(password); /authenticate?password=value\n//\t\tctx.pathParam(password); /authenticate/{password}\n\t}",
"public String authenticateUser(String username, String password) {\n\n\t\tboolean validUser = ((MovieDAOImplAuth) movieDAO).validate(username, password);\n\t\tif (validUser) {\n\t\t\tlog.info(\"user : \" + username + \" has been validated!\");\n\t\t\tString token = generateToken();\n\n\t\t\tif (((MovieDAOImplAuth) movieDAO).insertToken(token,username)) {\n\t\t\t\tAuthenticationUtils.setToken(token);\n\t\t\t\tAuthenticationUtils.setCurrentlyLoggedInUser(username);\n\t\t\t} else {\n\t\t\t\tlog.error(\"token insert failed !!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn token;\n\t\t}\n\t\treturn null;\n\t}",
"private UserSession handleBasicAuthentication(String credentials, HttpServletRequest request) {\n\t\tString userPass = Base64Decoder.decode(credentials);\n\n\t\t// The decoded string is in the form\n\t\t// \"userID:password\".\n\t\tint p = userPass.indexOf(\":\");\n\t\tif (p != -1) {\n\t\t\tString userID = userPass.substring(0, p);\n\t\t\tString password = userPass.substring(p + 1);\n\t\t\t\n\t\t\t// Validate user ID and password\n\t\t\t// and set valid true if valid.\n\t\t\t// In this example, we simply check\n\t\t\t// that neither field is blank\n\t\t\tIdentity identity = WebDAVAuthManager.authenticate(userID, password);\n\t\t\tif (identity != null) {\n\t\t\t\tUserSession usess = UserSession.getUserSession(request);\n\t\t\t\tsynchronized(usess) {\n\t\t\t\t\t//double check to prevent severals concurrent login\n\t\t\t\t\tif(usess.isAuthenticated()) {\n\t\t\t\t\t\treturn usess;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tusess.signOffAndClear();\n\t\t\t\t\tusess.setIdentity(identity);\n\t\t\t\t\tUserDeletionManager.getInstance().setIdentityAsActiv(identity);\n\t\t\t\t\t// set the roles (admin, author, guest)\n\t\t\t\t\tRoles roles = BaseSecurityManager.getInstance().getRoles(identity);\n\t\t\t\t\tusess.setRoles(roles);\n\t\t\t\t\t// set authprovider\n\t\t\t\t\t//usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);\n\t\t\t\t\n\t\t\t\t\t// set session info\n\t\t\t\t\tSessionInfo sinfo = new SessionInfo(identity.getName(), request.getSession());\n\t\t\t\t\tUser usr = identity.getUser();\n\t\t\t\t\tsinfo.setFirstname(usr.getProperty(UserConstants.FIRSTNAME, null));\n\t\t\t\t\tsinfo.setLastname(usr.getProperty(UserConstants.LASTNAME, null));\n\t\t\t\t\tsinfo.setFromIP(request.getRemoteAddr());\n\t\t\t\t\tsinfo.setFromFQN(request.getRemoteAddr());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInetAddress[] iaddr = InetAddress.getAllByName(request.getRemoteAddr());\n\t\t\t\t\t\tif (iaddr.length > 0) sinfo.setFromFQN(iaddr[0].getHostName());\n\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t // ok, already set IP as FQDN\n\t\t\t\t\t}\n\t\t\t\t\tsinfo.setAuthProvider(BaseSecurityModule.getDefaultAuthProviderIdentifier());\n\t\t\t\t\tsinfo.setUserAgent(request.getHeader(\"User-Agent\"));\n\t\t\t\t\tsinfo.setSecure(request.isSecure());\n\t\t\t\t\tsinfo.setWebDAV(true);\n\t\t\t\t\tsinfo.setWebModeFromUreq(null);\n\t\t\t\t\t// set session info for this session\n\t\t\t\t\tusess.setSessionInfo(sinfo);\n\t\t\t\t\t//\n\t\t\t\t\tusess.signOn();\n\t\t\t\t\treturn usess;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\t@Transactional(readOnly=true)\n\tpublic UserType authenticate(String username, String password) {\n\t\treturn null;\n\t}",
"@Test\n public void existingUserOK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"secret\", 0); \n //Then\n assertThat(result, is(true));\n }",
"protected void doLogin(Authentication authentication) throws AuthenticationException {\n \n }",
"@Override\n public String authenticate(String username, String password) {\n String jwt = null;\n\n // Find the user by its username.\n final User user = new JPAQueryFactory(em)\n .selectFrom(qUser)\n .where(qUser.username.eq(username))\n .fetchOne();\n\n // If a user was found, check the hashed version of the password and produce a JWT if a match\n // is found.\n if (user != null) {\n try {\n String hashedPassword = cryptoService.md5(user.getSalt() + password).toLowerCase();\n if (hashedPassword.equals(user.getPassword().toLowerCase())) {\n JWTGenerateRequest request = new JWTGenerateRequest();\n request.setId(Constants.JWT_ISSUER);\n request.setTtl(Constants.JWT_TTL);\n final Optional<SettingDTO> setting = settingsService\n .getSetting(Constants.JWT_SECRET_SETTING_KEY);\n if (setting.isPresent()) {\n request.setSecret(setting.get().getSettingVal());\n }\n request.setSubject(username);\n request.setIssuer(Constants.JWT_ISSUER);\n jwt = JWTUtil.generateToken(request);\n } else {\n throw new AuthenticationException();\n }\n } catch (NoSuchAlgorithmException e) {\n LOGGER.log(Level.SEVERE, \"Could not check password.\", e);\n throw new AuthenticationException();\n }\n } else { // Username not found. \n\t\t\tthrow new AuthenticationException();\n\t\t}\n\n return jwt;\n }",
"protected Response login() {\n return login(\"\");\n }",
"@Override\n protected void afterAuthenticating() {\n }",
"User login(String email, String password) throws AuthenticationException;",
"public static boolean authenticate(String username, String attemptedPassword){\n \t\tSaltHash sh = LoginDao.validate(username);\n \t\t\n \t\tString salt = sh.getsaltObject();\n String storedEncryptedPassword = sh.getpasswordObject();\n \n \n byte[] computePBKDF2AttemptedPassword = null ;\n try {\n computePBKDF2AttemptedPassword = pwdMgmtUtils.generateEncryptedPassword(attemptedPassword, pwdMgmtUtils.returnByteArray(salt)) ;\n } catch(GeneralSecurityException genSecExc) {System.out.println(genSecExc.getMessage() + \" \" + genSecExc.getCause() ) ; System.exit(1) ; } \n \n boolean successful_authentication = Arrays.equals(computePBKDF2AttemptedPassword, pwdMgmtUtils.returnByteArray(storedEncryptedPassword)) ;\n \n System.out.println(\"User authenticated ? \" + successful_authentication);\n return successful_authentication;\n }",
"@Override\n public Authentication attemptAuthentication(HttpServletRequest req,\n HttpServletResponse res) throws AuthenticationException {\n log.info(\"Attempting authentication\");\n try {\n LoginRequest creds = new ObjectMapper()\n .readValue(req.getInputStream(), LoginRequest.class);\n\n return getAuthenticationManager().authenticate(\n new UsernamePasswordAuthenticationToken(\n creds.getUsername(),\n creds.getPassword(),\n new ArrayList<>())\n );\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\n public Uni<SessionResponseTO> authenticate(YValueTO yValue) {\n Uni<AValueTO> yvalueUni = authStateRepository.getYValueForToken(yValue.getToken());\n\n return yvalueUni.onItem().ifNull().failWith(StateNotFoundException::new)\n .and().uni(\n yvalueUni.onItem().produceUni(val -> userRepository.getKeyByUserId(val.getUserId().longValue())))\n .asTuple()\n .onItem().apply(tuple -> authUtils.checkYValue(\n tuple.getItem2(),\n tuple.getItem1().getX(),\n yValue.getY(),\n tuple.getItem1().getA(),\n 39769L * 50423\n )\n )\n .onItem().ifNull().failWith(UnauthorizedException::new)\n .onItem().produceUni(none -> authStateRepository.incrementSuccessTries(yValue.getToken()))\n .onItem().apply(s -> authUtils.isAuthorized(s, yValue.getToken()))\n .onItem().produceUni(session -> yvalueUni.onItem().produceUni(\n val -> handleCreatedSession(session, yValue.getToken(), val.getUserId().longValue())));\n }",
"@Override\n\tpublic Authentication Login(String username, String password) {\n\t\t try {\n\t\t\t\n \tAuthentication request = new UsernamePasswordAuthenticationToken(username, password);\n \tAuthentication result =authenticationManager.authenticate(request);\n \tSecurityContextHolder.getContext().setAuthentication(result);\n \treturn result;\n\t\t }\n\t\t catch(AccessDeniedException e) {\n\t \t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t }\n\t\t catch(BadCredentialsException e) {\n\t\t\t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t } catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t \t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n\t\t return null;\n\t}",
"@Override\n\tpublic boolean managerLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.managerLogIn(username, password);\n\t\treturn result;\n\t}",
"public boolean authenticate(String id, String password, String type) {\r\n\t\tmethodname = \"authenticate\" ;\r\n\t\tlogger.info(\"ENTRY---> methodname : \"+methodname);\r\n\t\t\r\n\t\tboolean flag = authDao.authenticate(id,password,type) ;\r\n\t\t\r\n\t\tlogger.info(\"EXIT---> methodname : \"+methodname);\r\n\t\treturn flag;\r\n\t}",
"@POST\n @Path(\"/users/authenticate\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response authenticateUser(User user) {\n\n final String token = authService.authenticateUser(user.getEmail(), user.getPassword());\n final AuthServiceResult result;\n final String json;\n\n if (token == null) {\n result = AuthServiceResult.INCORRECT_INFORMATION;\n json = result.getJSON();\n } else {\n result = AuthServiceResult.OK;\n json = String.format(\"{\\\"token\\\":\\\"%s\\\"}\", token);\n }\n\n return Response\n .status(result.getStatus())\n .entity(json)\n .build();\n }",
"@Override\r\n public Authentication authenticate(final Authentication authentication) {\r\n final String credentials = (String) authentication.getCredentials();\r\n if (credentials == null || credentials.isEmpty()) {\r\n final GrantedAuthority grantedAuthority = new GrantedAuthorityImpl(\"\");\r\n final GrantedAuthority[] grantedAuthorities = { grantedAuthority };\r\n return new AnonymousAuthenticationToken(\"key\", \"Anonymous\", grantedAuthorities);\r\n }\r\n final UserDetails userDetails = escidocUserDetailsService.loadUserByUsername(credentials);\r\n return new UsernamePasswordAuthenticationToken(userDetails, credentials);\r\n }",
"@Override\n public void clientAuthenticate()\n throws HubIntegrationException {\n try {\n final ArrayList<String> segments = new ArrayList<>();\n segments.add(\"j_spring_security_check\");\n final HttpUrl httpUrl = createHttpUrl(segments, null);\n\n final Map<String, String> content = new HashMap<>();\n final String username = hubServerConfig.getGlobalCredentials().getUsername();\n String password = hubServerConfig.getGlobalCredentials().getEncryptedPassword();\n if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)) {\n try {\n password = hubServerConfig.getGlobalCredentials().getDecryptedPassword();\n\n content.put(\"j_username\", username);\n content.put(\"j_password\", password);\n final Request request = createPostRequest(httpUrl, createEncodedRequestBody(content));\n Response response = null;\n try {\n logRequestHeaders(request);\n response = getClient().newCall(request).execute();\n logResponseHeaders(response);\n if (!response.isSuccessful()) {\n throw new HubIntegrationException(response.message());\n }\n } finally {\n if (response != null) {\n response.close();\n }\n }\n } catch (IllegalArgumentException | EncryptionException e) {\n throw new HubIntegrationException(e.getMessage(), e);\n }\n }\n } catch (final IOException e) {\n throw new HubIntegrationException(e.getMessage(), e);\n }\n }",
"public Boolean authenticate(String username, String password) {\n try {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(\n username,\n password\n )\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n return true;\n } catch (BadCredentialsException e) {\n return false;\n }\n }",
"@Override\n\tpublic User auth()\n\t{\n\t\treturn this.user;\n\t}",
"@Override\n public AuthenticatedUser authenticateUser(Credentials credentials)\n throws GuacamoleException {\n SSOAuthenticationProviderService authProviderService =\n injector.getInstance(SSOAuthenticationProviderService.class);\n\n return authProviderService.authenticateUser(credentials);\n\n }",
"public Identity authenticate(String login, String pwd){\r\n\t\t\t\r\n\t\t\r\n\t\tSpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);\r\n\t\tSession session = sf.openSession();\r\n\t\tList<Identity> ids = new ArrayList<Identity>();\r\n\t\tTransaction t = session.beginTransaction();\r\n\t\tQuery query = session.createQuery(\"FROM Identity AS identity WHERE identity.displayName = :login\");\r\n\t\t//transaction - forces changes in cache to be updated to dbs\r\n\t\tquery.setParameter(\"login\", login);\r\n\t\tids = query.list();\r\n\t\tt.commit();\r\n\t\tsession.close();\r\n\t\t\r\n\t\tif(ids.isEmpty())\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t//there should be only one identity to a single displayname!\r\n\t\tfor(Identity id : ids)\r\n\t\t{\r\n\t\t\tPasswordEndecryptor.getInst();\r\n\t\t\t// hashed password decryption and authentication\r\n\t\t\tif(PasswordEndecryptor.checkPwd(pwd, id.getPassword()))\r\n\t\t\t{\r\n\t\t\t\tLOGGER.debug(\"Authentication should be succesfull!\");\r\n\t\t\t\treturn id;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\tLOGGER.debug(\"Authentication should NOT be succesfull!\");\r\n\t\treturn null;\r\n\t}",
"public boolean autenticar(String userid, String pwd) throws SQLException {\r\n\r\n PreparedStatement ps = conn.prepareStatement(\"select * from usuario where login=? and senha=? and ativo=1\");\r\n ps.setString(1, userid);\r\n ps.setString(2, pwd);\r\n ResultSet rs = ps.executeQuery();\r\n\r\n if (rs.next()) {\r\n return true;\r\n } else {\r\n System.out.println(\"Senha e/ou Usuário incorreto! <a href='index.jsp'>Tente Novamente</a>\");\r\n }\r\n return false;\r\n }",
"private void userIsAuthenticated() {\n this.setResult(RC_USER_LOGGED_IN, null);\n this.finish();\n }",
"public Boolean authenticateUser(String username, String password) throws SQLException{\n\t\tStatement stmt = conn.createStatement();\n\t\tString querystring = String.format(\n\t\t\t\t\"SELECT * FROM user where username='%s' AND password='%s';\", \n\t\t\t\tusername,\n\t\t\t\tpassword);\n\t\tResultSet rs = stmt.executeQuery(querystring);\n\t\tBoolean result = rs.first();\n\t\trs.close();\n\t\tstmt.close();\n\t\treturn result;\n\t}",
"protected void onSuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) throws IOException {\n }",
"@PostMapping(\"/login\") //method handles POST requests with this path (login)\n public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));\n\n // update the SecurityContext\n SecurityContextHolder.getContext().setAuthentication(authentication);\n\n // generate JWT token\n String jwt = jwtUtils.generateJwtToken(authentication);\n\n // get UserDetails\n UserDetailsImpl userDetails = (UserDetailsImpl) authentication.getPrincipal();\n List<String> roles = userDetails.getAuthorities().stream()\n .map(GrantedAuthority::getAuthority)\n .collect(Collectors.toList());\n\n // return response with JWT token and UserDetails\n return ResponseEntity.ok(new JwtResponse(jwt,\n userDetails.getId(),\n userDetails.getUsername(),\n userDetails.getEmail(),\n roles,\n userDetails.getCategory()\n ));\n }",
"public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;",
"public void login(User user);"
] | [
"0.76966375",
"0.7695446",
"0.74912137",
"0.7377225",
"0.7300148",
"0.72966504",
"0.7260824",
"0.71390456",
"0.7133492",
"0.7090538",
"0.7033198",
"0.70281374",
"0.69947326",
"0.6921656",
"0.6897656",
"0.6895198",
"0.68933296",
"0.6824076",
"0.6800571",
"0.6799478",
"0.67931473",
"0.6778866",
"0.6738051",
"0.673195",
"0.6702952",
"0.6694359",
"0.66307056",
"0.66152495",
"0.6607779",
"0.66051435",
"0.6601246",
"0.6589781",
"0.65543765",
"0.6544937",
"0.6541138",
"0.6520001",
"0.65029866",
"0.6486625",
"0.64865947",
"0.6475261",
"0.6471365",
"0.6470692",
"0.644212",
"0.64410585",
"0.6438174",
"0.643378",
"0.64180803",
"0.64076656",
"0.6393544",
"0.63740116",
"0.6372501",
"0.63448334",
"0.63444006",
"0.63242686",
"0.6312782",
"0.63095224",
"0.6308388",
"0.6271298",
"0.6268384",
"0.6267742",
"0.6262646",
"0.6261568",
"0.62589645",
"0.625353",
"0.6247461",
"0.6246613",
"0.6245729",
"0.62234694",
"0.62204736",
"0.62171304",
"0.6215526",
"0.6196579",
"0.6185602",
"0.6183549",
"0.61777985",
"0.61766666",
"0.6174552",
"0.6160919",
"0.6160009",
"0.6156255",
"0.61479694",
"0.61468655",
"0.61396146",
"0.6136082",
"0.6123906",
"0.6123419",
"0.61180705",
"0.6116835",
"0.61132574",
"0.6112504",
"0.6111407",
"0.6110082",
"0.6108279",
"0.6099694",
"0.6093615",
"0.60895824",
"0.60885596",
"0.608668",
"0.608212",
"0.60764617",
"0.6076225"
] | 0.0 | -1 |
/ This method validate session of login user | @CrossOrigin(origins = AppConstants.CORS)
@RequestMapping(value = {UrlConstants.API_VALIDATE_SESSION+"org"}, method = RequestMethod.POST)
public @ResponseBody ResponseDTO validateSession(@RequestBody RequestDTO requestDTO, BindingResult bindingResult) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean validateLogIn() {\n //Load user from session. If the user is not in the session, no user is logged in.\n User user = (User) ScopeHandler.getInstance().load(this.request, \"user\", \"session\");\n\n if (user == null) {\n return false;\n }\n\n this.mail = user.getMail();\n this.password = user.getPassword();\n\n //Check user credentials\n this.process();\n\n return (boolean) ScopeHandler.getInstance().load(this.request, \"inputValidation\");\n }",
"private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}",
"protected boolean shouldValidateSession ()\n {\n return false;\n }",
"boolean isSessionValid(Object session);",
"private void checkSessionState() {\n // get logged in mUser\n mUser = getStoredUser();\n // check if valid\n mIsLoggedIn = (mUser != null && mUser.getId() != null);\n }",
"private boolean validateUser(HttpServletResponse resp, HttpServletRequest req, String username) throws IOException {\n\n SessionHandler session = (SessionHandler) req.getSession().getAttribute(\"authorized\");\n\n String sessionUsername = session.getUsername();\n\n if((!sessionUsername.equalsIgnoreCase(\"admin\")\n && !username.equalsIgnoreCase(sessionUsername))\n || !session.isAuthorized()\n ){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Action not permitted!\");\n return false;\n }\n return true;\n }",
"public void validate() {\n\t\tlog(\"In validate of LoginAction\");\n\t\t//if (StringUtils.isEmpty(user.getUserId())) {\n\t if (StringUtils.isEmpty(userId)) {\t\n\t\t\tlog(\"In validate of LoginAction: userId is blank\");\n\t\t\taddFieldError(\"userId\", \"User ID cannot be blank\");\n\t\t}\n\t\t//if (StringUtils.isEmpty(user.getPassword())) {\n\t if (StringUtils.isEmpty(password)) {\n\t\t\tlog(\"In validate of LoginAction: password is blank\");\n\t\t\taddFieldError(\"password\", \"Password cannot be blank\");\n\t\t}\n\t\tlog(\"Completed validate of LoginAction\");\n\t}",
"@Override\n public boolean isLoggedin(HttpServletRequest request) {\n boolean result = false;\n HttpSession session = request.getSession();\n String userName = (String) session.getAttribute(\"userName\");\n String token = (String) session.getAttribute(\"token\");\n if (userName != null && token != null) {\n CrUser user = userRepo.findByUserName(userName);\n if (user != null && isTokenValid(user, token)) {\n result = true;\n }\n }\n return result;\n }",
"public boolean loginUser();",
"private boolean validateFBLogin() {\n\t\tSession session = Session.getActiveSession();\n\t\tif (session != null && session.isOpened()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSession sessionNew = Session.openActiveSessionFromCache(this);\n\n\t\t\tif (sessionNew != null && sessionNew.isOpened()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean canLogin(Session session);",
"private void validateLoginUser() {\n\t\tUser user = userDao.getByPin(et_password.getText().toString());\n\t\tSession.setDriver(user);\n\n\t\tif (user.getWorkStatus().equals(User.STATUS_INACTIVE)) {\n\n\t\t\tdoLogin();\n\t\t} else {\n\t\t\tString locAt = \"\";\n\t\t\tif (user.getWorkStatus().equals(User.STATUS_IN_VEHICLE)) {\n\t\t\t\tVehiclesDao dao = new VehiclesDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentVehicleId()).getName();\n\t\t\t} else {\n\t\t\t\tServiceLocationDao dao = new ServiceLocationDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentServiceLocationId()).getName();\n\t\t\t}\n\t\t\tString msg = \"You are currently marked as \" + user.getWorkStatus() + \" at \" + locAt + \" since \" + user.getWorkStatusDate()\n\t\t\t\t\t+ \"\\n\" + \"Do you want to continue and override this status?\";\n\t\t\tAlertDialog.Builder alert_box = new AlertDialog.Builder(this);\n\t\t\talert_box.setIcon(R.drawable.icon);\n\t\t\talert_box.setMessage(msg);\n\t\t\talert_box.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdoPunchOut(et_password.getText().toString());\n\t\t\t\t\tdoLogin();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\talert_box.setNeutralButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talert_box.show();\n\t\t}\n\t}",
"private boolean validLogin() {\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tif(principal.equals(IConstant.LOGIN_STATUS.ANONYMOUS_USER)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tUserDetails userDetails = (UserDetails) principal;\r\n\t\t\treturn userDetails.isAccountNonExpired() &&\r\n\t\t\t\t\tuserDetails.isAccountNonLocked() &&\r\n\t\t\t\t\tuserDetails.isCredentialsNonExpired() &&\r\n\t\t\t\t\tuserDetails.isEnabled();\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"private void loginError(HttpServletRequest _req, HttpServletResponse _res)\n throws IOException, ServletException {\n\n session.setAttribute(\"validUser\", \"n\");\n session.setAttribute(\"loginError\", \"y\");\n gotoPage(\"/ch5/login.jsp\", _req, _res);\n\n }",
"public boolean verificarSesion(){\n boolean sesionValida = false;\r\n if(FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(\"usuarioValidado\")!=null){\r\n sesionValida=true;\r\n }\r\n return sesionValida;\r\n }",
"public abstract boolean isLoginRequired();",
"private boolean validateAccess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{\r\n\t\t/*institutionalEmail=request.getParameter(\"institutional_email\");\r\n\t\t\t\t\tpassword=request.getParameter(\"password\");*/\r\n\r\n\t\t//check if user has cookies with a logged session\r\n\t\tif(institutionalEmail==null || password==null){\r\n\t\t\tusercookie=getCookie(request,\"institutional_email\");\r\n\t\t\tpasscookie=getCookie(request,\"password\");\r\n\r\n\t\t\tif(usercookie!=null && passcookie!=null){\r\n\t\t\t\tinstitutionalEmail=usercookie.getValue();\r\n\t\t\t\tpassword=passcookie.getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//create cookies if he just logged in\r\n\t\telse{\r\n\t\t\tusercookie=new Cookie(\"user\",institutionalEmail);\r\n\t\t\tpasscookie=new Cookie(\"pass\",password);\r\n\t\t\tusercookie.setMaxAge(30);\r\n\t\t\tpasscookie.setMaxAge(30);\r\n\t\t}\r\n\r\n\t\tif(institutionalEmail==null || password==null){\r\n\t\t\tresponse.sendRedirect(response.encodeRedirectURL(\"Login\"));\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//user doesn't exist or isn't an allowed to view content\r\n\t\tif(ALLOWED.indexOf(ejb.login(institutionalEmail, password))==-1){\r\n\t\t\tresponse.setContentType(\"text/html\");\r\n\r\n\t\t\tif(usercookie!=null && passcookie!=null){\r\n\t\t\t\tusercookie.setMaxAge(0);\r\n\t\t\t\tpasscookie.setMaxAge(0);\r\n\t\t\t\tresponse.addCookie(usercookie);\r\n\t\t\t\tresponse.addCookie(passcookie);\r\n\r\n\t\t\t}\r\n\t\t\tresponse.sendRedirect(response.encodeRedirectURL(\"Login\"));\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tresponse.setContentType(\"text/html\");\r\n\t\tresponse.addCookie(usercookie);\r\n\t\tresponse.addCookie(passcookie);\r\n\r\n\t\trequest.setAttribute(\"institutional_email\", institutionalEmail);\r\n\t\trequest.setAttribute(\"password\", password);\r\n\r\n\t\treturn true;\r\n\t}",
"@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}",
"public boolean shouldLogIn() {\n // Check if the page requires a login\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return true;\n }\n HashMap inputParameters = (HashMap) session.getAttribute(\"_inputs\");\n String command = (String) inputParameters.get(\"command\");\n if (_unrestrictedPages.contains(\"*\") ||\n _unrestrictedPages.contains(command) ||\n (command != null && command.startsWith(\"_\"))) {\n return false;\n }\n \n // Check if the user is logged in\n return !getBoolProperty(getSessionId());\n }",
"public static boolean shouldLogin() {\n if (AppPreference.getInstance().getUserLoggedIn() == null ) {\n //|| deltaActive > Constant.SESSION_EXIPRED_TIME) {\n return true;\n }\n\n return false;\n }",
"protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"public boolean ValidCredentials() { \n\t\tif(!isEmptyFieldData()){\n\t\t\tSystemUserQuery sq = new SystemUserQuery();\n\t\t\tUser user = sq.loginQuery(getUsername(), getPassword());\n\t\t\t\n\t\t\tif(user != null){\n\t\t\t\tMain.setCurrentUser(user);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean validateLogin() {\n final String userName = userText.getText().toString();\n final String userPass = passwordText.getText().toString();\n if (\"\".equals(userName)) {\n userText.setError(\"You must enter a username\");\n return false;\n }\n if (\"\".equals(userPass)) {\n passwordText.setError(\"You must enter a password\");\n return false;\n }\n return true;\n }",
"@RequestMapping(value = \"/session\", method = RequestMethod.POST)\n public String session(@Valid @ModelAttribute(\"loginDto\") LoginDto loginDto,\n BindingResult bindingResult, Map<String, Object> model, HttpSession session, HttpServletRequest request)\n {\n if (UserEntity.getPrincipal(session) != null)\n {\n UserEntity userEntity = (UserEntity) UserEntity.getPrincipal(session);\n message.info(\"\\n\\n Name: \"+userEntity.getName()+\"\\n\\n\");\n message.info(\"\\n\\n Id: \"+userEntity.getId()+\"\\n\\n\");\n\n return \"redirect:/app/daily/list\";\n }\n\n if (bindingResult.hasErrors())\n {\n model.put(\"loginDto\", loginDto);\n return \"login/session\";\n }\n\n Principal principal ;\n try\n {\n principal = this.userAndProfileServiceDao.login(loginDto);\n }catch (ConstraintViolationException e )\n {\n loginDto.setPassword(\"\");\n model.put(\"loginDto\", loginDto);\n model.put(\"loginFail\", true);\n return \"login/session\";\n }\n if(principal == null)\n {\n loginDto.setPassword(\"\");\n model.put(\"loginFail\", true);\n return \"login/session\";\n }\n UserEntity.setPrincipal(session, principal);\n request.changeSessionId();\n return \"redirect:/app/daily/list\";\n\n\n }",
"@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }",
"public boolean attemptLogin(HttpServletRequest request, HttpServletResponse response, String data) {\n String userName = request.getParameter(\"userName\");\n String password = request.getParameter(\"password\");\n try {\n IUserDAO iUserDAOHibernate = UserDAOHibernate.getInstance();\n User user = iUserDAOHibernate.validateUserAndPassword(userName, password);\n if (user != null)\n {\n request.getSession().setAttribute(\"user\", user);\n createLoginCookie(response, userName, password);\n response.sendRedirect(\"http://localhost:8010/CostsManagerHit/login/userLogged\");\n return true;\n }\n else\n request.setAttribute(\"isSuccessfullyLoggedIn\",false);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (UserDAOException e) {\n System.out.println(e.getMessage());\n request.setAttribute(\"isSuccessfullyLoggedIn\",false);\n return false;\n }\n return false;\n }",
"private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }",
"@RequestMapping(value = \"/loginValidation\", method = RequestMethod.POST, produces = \"text/html;charset=UTF-8\" )\r\n\t@ResponseBody\r\n\tpublic String loginValidation(@Validated User user, BindingResult result, HttpSession session){\n\t\tString msg;\r\n\t\tif(result.hasErrors()){\r\n\t\t\tFieldError fe = result.getFieldErrors().get(0);\r\n\t\t\t//resultMap.put(\"result\", fe.getDefaultMessage());\r\n\t\t\tmsg = fe.getDefaultMessage();\r\n\t\t}else{\r\n\t\t\t//resultMap.put(\"result\", \"success\");\r\n\t\t\tmsg = \"success\";\r\n\t\t\tIDgenerator++;\r\n\t\t\tsession.setAttribute(\"SessionID\", IDgenerator);\r\n\t\t}\r\n\t\t//return resultMap;\r\n\t\treturn msg;\r\n\t}",
"public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }",
"private boolean isValidLoginResponse(Response response) {\n\t\treturn response.header(\"Location\").toLowerCase().contains(\"testsession\");\r\n\t}",
"private void action_login_utente(HttpServletRequest request, HttpServletResponse response) throws IOException{\n //recupero credenziali di login\n String email = SecurityLayer.addSlashes(request.getParameter(\"email\").toLowerCase());\n email = SecurityLayer.sanitizeHTMLOutput(email);\n String password = SecurityLayer.addSlashes(request.getParameter(\"password\"));\n password = SecurityLayer.sanitizeHTMLOutput(password);\n if(!email.isEmpty() && !password.isEmpty()){\n try {\n //recupero utente dal db\n Utente u = ((PollwebDataLayer)request.getAttribute(\"datalayer\")).getUtenteDAO().getUtenteByEmail(email);\n //controllo che l'utente esista\n if(u != null){\n //controllo i parametri\n if(u.getEmail().equalsIgnoreCase(email) && new BasicPasswordEncryptor().checkPassword(password, u.getPassword())){\n //se l'utente esiste ed è lui\n\n request.setAttribute(\"userName\", u.getNome());\n request.setAttribute(\"user_id\", u.getId());\n System.out.println(u.getId());\n\n SecurityLayer.createSession(request, u.getId());\n\n if (request.getParameter(\"referrer\") != null) {\n response.sendRedirect(request.getParameter(\"referrer\"));\n } else {\n response.sendRedirect(\"/home\");\n }\n }else{\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n request.setAttribute(\"error\", \"Credenziali errate\");\n response.sendRedirect(\"/login?error=100\");\n }\n }\n\n }else{\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login&error=102\");\n }\n }\n }catch (DataException ex) {\n //TODO Handle Exception\n\n }\n } else {\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login?error=101\");\n }\n }\n }",
"User loginUser(User userLoginRequest, HttpSession httpSession) throws Exception;",
"public boolean CheckSession(String session) { return validSessions.containsKey(session); }",
"public Result validate(String username, String password){\n\tTokenGeneratorService tokengen = new TokenGeneratorService();\n\tString token = tokengen.usertoken(username, password);\n\tCookie redirecturlcookie = request().cookie(\"redirecturl\");\n\tString redirecturl =null;\n\tSystem.out.println(redirecturl);\n\tif(token.equals(\"default\"))\n\treturn redirect(\"/\");\n\tif(redirecturlcookie!=null){\n\t\t redirecturl = redirecturlcookie.value();\n\t\t response().discardCookie(\"redirecturl\");\n\t\tCookie ck = new Cookie(\"authorization\",token, null, null, null, false,false);\n\treturn redirect(redirecturl).withCookies(ck);\n\t}\n\telse\n\t{\n\t\tCookie ck = new Cookie(\"authorization\",token, null, null, null, false,false);\n\t\treturn ok(views.html.validated.render()).withCookies(ck);\n\t}\n}",
"@Override\n public boolean validacionLogin(UsuarioDto usuarioDto) {\n HashMap<String, Object> params = new HashMap<>();\n params.put(\"NOMBRE_USUARIO\", usuarioDto.getNombre());\n params.put(\"PASS\", usuarioDto.getContracena());\n IntegerDto data = (IntegerDto) executeList(IntegerDto.class, \"PRC_VALIDAR_LOGIN\", params).get(0);\n return data.getData() != 0;\n }",
"private boolean verifyParameters(HttpServletRequest req, User loggedUser){\r\n\t\ttry{\r\n\t\t\tString requestedUserParam = queryStringMap.get(\"user\");\r\n\t\t\tif( requestedUserParam==null ){ return false; }\r\n\t\t\trequestedUserId = Long.parseLong( requestedUserParam );\r\n\t\t\trequestedUser = BeanUserView.getUserByIdStatic( requestedUserId );\r\n\t\t\tif( requestedUser==null ){ return false; }\r\n\t\t\telse{\r\n\t\t\t\tif( requestedUser.getRemoved() ){ return false; }\r\n\t\t\t\telse{ return true; }\r\n\t\t\t}\r\n\t\t} catch( NumberFormatException nfe ){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Override\n\t@Transactional\n\tpublic boolean validateuser(String username, String password) {\n\t\tboolean flag = this.logindao.validateuser(username, password);\n\t\treturn flag;\n\t}",
"@Override\r\n \t\t\tpublic boolean isValid(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn false;\r\n \t\t\t}",
"public boolean isSessionValid() {\n\t\treturn stateMachine.getCurrent() instanceof SessionValid;\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{\n response.setContentType(\"text/html;charset=UTF-8\");\n HttpSession session = request.getSession();\n ServletContext servletContext = getServletContext();\n ServletConfig servletConfig = getServletConfig();\n\n dataSource=session.getAttribute(\"jhuDataSource\").toString(); \n loginAttempts=Integer.parseInt(session.getAttribute(\"loginAttempts\").toString());\n // System.out.println(session.getAttribute(\"loginAttempts\").toString());\n weblogicUrl = session.getAttribute(\"weblogicURL\").toString();\n \n //I'm not sure why I'm doing this: check later\n //lSv = (LoginSyntaxVerifier) session.getAttribute(\"loginSyntaxVerifier\");\n \n loginName = request.getParameter(\"uidInput\");\n System.out.println(loginName);\n loginPass = request.getParameter(\"passInput\");\n System.out.println(loginPass);\n \n if(!(validUserName(loginName)&&validPassword(loginPass))){\n /*\n lSv.setValidUserName(validUserName(loginName));\n \tlSv.setValidPass(validPassword(loginPass));\n \tsession.setAttribute(\"loginSyntaxVerifier\", lSv);\n \tRequestDispatcher dispatcher = servletContext.getRequestDispatcher(\"/login.html\");\n \tdispatcher.forward(request, response);\n */\n \tlfBean.setLoginFailMessage(\"Username and Password must be 8 chars in length with no spaces. Try logging in Again\");\n \trequest.setAttribute(\"loginFail\", lfBean);\n \tRequestDispatcher dispatcher = servletContext.getRequestDispatcher(\"/loginFail.jsp\");\n \tdispatcher.forward(request, response);\n \t\n }else{\n\t if(findUser()){\n\t //if(kristinAdmin()){\n\t \t//lsBean.setFirstName(\"Welcome to the site, \"+\"kristin\");\n\t \t//lsBean.setLastName(\"caldwell\");\n \t\tlsBean.setFirstName(\"Welcome to the site, \"+storedFirstName);\n\t \tlsBean.setLastName(storedLastName);\n\t request.setAttribute(\"loginSuccessful\", lsBean);\n\t RequestDispatcher dispatcher = servletContext.getRequestDispatcher(\"/welcome2.jsp\");\n\t dispatcher.forward(request, response);\n\t }else{\n\t \tString logfail = \"username and password combination invalid, please register\";\n\t \tlfBean.setLoginFailMessage(logfail);\n\t \trequest.setAttribute(\"loginFail\", lfBean);\n\t \tRequestDispatcher dispatcher = servletContext.getRequestDispatcher(\"/loginFail.jsp\");\n\t \tdispatcher.forward(request, response);\n\t }\n }\n\t}",
"public String validarUsuario(){\n String resultado = null;\r\n IUsuarioDAO usuarioDAO = new UsuarioDAOImp();\r\n Usuario usuario = usuarioDAO.validarUsuario(nombreUsuario, password);\r\n \r\n if(usuario!=null){\r\n \r\n FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Usuario válido\", \"Usuario válido\");\r\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\r\n \r\n FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(\"usuarioValidado\", usuario);\r\n \r\n if(usuario.getTipoUsuario().equals(\"admin\"))\r\n resultado = \"admin?faces-redirect=true\";\r\n else\r\n {\r\n if(usuario.getTipoUsuario().equals(\"final\"))\r\n resultado = \"final?faces-redirect=true\";\r\n else\r\n {\r\n if(usuario.getTipoUsuario().equals(\"supervisor\"))\r\n resultado= \"menu\";\r\n else\r\n resultado = \"login\";\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n }else{\r\n FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Credenciales Inválidas\", \"Credenciales Inválidas\");\r\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\r\n }\r\n return resultado;\r\n }",
"public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }",
"private void verifyFromSQLite(){\n textInputLayoutUsername.setErrorEnabled(false);\n textInputLayoutPassword.setErrorEnabled(false);\n User user = new User();\n boolean _isnorekexist = false;\n\n for (int i=0;i<User.users.size();i++) {\n if (User.users.get(i).username.equals(textInputEditTextUsername.getText().toString())) {\n _isnorekexist = true;\n user = User.users.get(i);\n break;\n }\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextUsername, textInputLayoutUsername, getString(R.string.error_message_username))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextPassword, textInputLayoutPassword,getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.isInputEditTextNoRekExist(textInputEditTextUsername, textInputLayoutUsername,_isnorekexist,getString(R.string.error_username_not_exists))){\n return;\n }\n if (databaseHelper.checkUsername(textInputEditTextUsername.getText().toString().trim()\n , textInputEditTextPassword.getText().toString().trim())) {\n\n SessionManager sessionManager = SessionManager.with(this);\n sessionManager.createsession(user);\n progress = new ProgressDialog(this);\n progress.setMessage(\"Loading...\");\n progress.show();\n Thread _thread = new Thread() {\n @Override\n public void run() {\n try {\n Thread.sleep(2000);\n progress.dismiss();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n masuk();\n }\n });\n\n }\n };\n _thread.start();\n }\n else {\n // Snack Bar to show success message that record is wrong\n Snackbar.make(nestedScrollView, getString(R.string.error_valid_username_pin), Snackbar.LENGTH_LONG).show();\n }\n }",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"@Override\n public void process() {\n if (this.mail.isEmpty() || this.password == null) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n } else {\n //Get all users with the given e-mail address (size of list is 1 if successful)\n DBFilter mailFilter = new DBFilter();\n mailFilter.addConstraint(User.CLMN_MAIL, SQLConstraintOperator.LIKE, this.mail);\n ArrayList<User> users = User.findAll(mailFilter);\n\n //We expect to find exactly one user. If we find more or less than one user, the verification failed.\n if (users != null && users.size() == 1) {\n User user = users.get(0);\n //Check password:\n if (Arrays.equals(user.getPassword(), this.password)) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", true);\n ScopeHandler.getInstance().store(this.request, \"user\", user);\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n }\n }",
"public String[] login(String username,String password){\n\t\tFlexSession session = FlexContext.getFlexSession();\r\n//\t\tSystem.out.println(username+\"---\"+session.getAttribute(username)+\"::\"+password + \"---\" + session.getId());\r\n//\t\tsession.setAttribute(username, username);\r\n//\t\tMySessionContext context = MySessionContext.getInstance();\r\n//\t\t\r\n//\t\tFlexSession userInfo = context.getSession(username);\r\n//\t\tif(userInfo != null && userInfo.isValid()) {\r\n//\t\t\tSystem.out.println(username + \"====\" + userInfo.isValid());\r\n//\t\t\tif(userInfo.getAttribute(username)!=null&&!userInfo.getAttribute(username).equals(\"\")){\r\n//\t\t\t\tcontext.getSession(username).invalidate();\r\n//\t\t\t}\r\n//\t\t} \r\n//\t\tcontext.addSession(session, username);\r\n//\t\tsession.addSessionCreatedListener(listener);\r\n//\t\tsession.addSessionDestroyedListener(new MyFlexSessionListener());\r\n\t\t//session.invalidate();\r\n\t\t//session.cancelTimeout()\r\n\t//\tsession.getId();\r\n\t\tBsWebUser bsWebUser = userLoginService.login(username,password);\r\n\t\t\r\n\t\tif(bsWebUser == null) {\r\n\t\t\t//用户不存在\r\n\t\t\treturn new String[] {\"-1\",\"用户名或密码错误\"} ;\r\n\t\t}else {\r\n\t\t\tif(bsWebUser.getWuActivestatus() == 0) {\r\n//\t\t\t\tloginMsg = \"该用户未激活!\";\r\n\t\t\t\treturn new String[] {\"-1\",\"该用户未激活!\"} ;\r\n\t\t\t}else if(bsWebUser.getWuActivestatus() == 2){\r\n//\t\t\t\tloginMsg = \"该用户已禁用!\";\r\n\t\t\t\treturn new String[] {\"-1\",\"该用户已禁用!\"} ;\r\n\t\t\t}else if(bsWebUser.getWuActivestatus() == 3){\r\n//\t\t\t\tloginMsg = \"该用户已锁定,请稍候再试!\";\r\n\t\t\t\treturn new String[] {\"-1\",\"该用户已锁定,请稍候再试!\"} ;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsession.setAttribute(\"user\", bsWebUser);\r\n\t\treturn new String[] {String.valueOf(bsWebUser.getWuId()),bsWebUser.getBsUserInfo().getNickName(),bsWebUser.getBsUserInfo().getRealName()};\r\n\t}",
"@Override\n public void check() {\n if(StringUtils.isBlank(username)||StringUtils.isBlank(password)){\n logger.error(\"登陆失败!\");\n throw new InyuException(ExceptionEnum.INVALID_PARAM.getIndex(),\"用户名或密码为空!\");\n }\n }",
"public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"admin@gibmit.ch\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}",
"private boolean loginUsingCookie(HttpServletRequest request, HttpServletResponse response, String userName, String password) {\n IUserDAO iUserDAOHibernate = UserDAOHibernate.getInstance();\n try {\n User user = iUserDAOHibernate.validateUserAndPassword(userName, password);\n if (user != null)\n {\n request.getSession().setAttribute(\"user\", user);\n response.sendRedirect(\"http://localhost:8010/CostsManagerHit/login/userLogged\");\n }\n else{\n removeAppCookie(response);\n response.sendRedirect(\"http://localhost:8010/CostsManagerHit/login\");\n }\n } catch (UserDAOException e) {\n System.out.println(e.getMessage());\n return false;\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"public boolean loginUser(String sessionID, String username, String password) {\r\n \t\tboolean loginValid = this.dataLayer.validateUser(username, password);\r\n \r\n \t\t// Login valid -> set Username\r\n \t\tif (loginValid) {\r\n \t\t\tboolean isAdmin = this.dataLayer.isAdmin(username);\r\n \t\t\tRoMClient loggedInClient = this.clients.getClientBySessionID(sessionID);\r\n \t\t\tloggedInClient.setUsername(username);\r\n \t\t\tloggedInClient.setIsAdmin(isAdmin);\r\n \r\n \t\t\t// Fire event\r\n \t\t\tthis.notifyUserLoggedInListener(new UserLoggedInEvent(this, username));\r\n \t\t}\r\n \r\n \t\treturn loginValid;\r\n \t}",
"private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException {\n\t\tString account = req.getParameter(\"account\");\r\n\t\tString password = req.getParameter(\"password\");\r\n\t\tManage manage = this.service.checkLogin(account, password);\r\n\r\n\t\t// 如果User不是空,证明账号密码正确\r\n\t\tif (manage != null) {\r\n\t\t\tsession.setAttribute(\"MANAGEINSESSION\", manage);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/index.jsp\");\r\n\t\t\tpw.print(true);\r\n\t\t} else {\r\n\t\t\tpw.print(false);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/login.jsp\");\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}",
"@RequestMapping(path = \"/login\")\n public String loginUser(@RequestBody User userSubmittedViaForm, HttpSession userSession) throws Exception {\n User checkUserValidity = userRepository.findByusername(userSubmittedViaForm.getUsername().toLowerCase());\n\n //Checks for username submission for null or empty string.\n if (userSubmittedViaForm.getUsername() == null || userSubmittedViaForm.getUsername().trim().length() == 0) {\n throw new Exception(\"Invalid username input\");\n }\n //Checks for password submission for null or empty string.\n else if (userSubmittedViaForm.getPassword() == null || userSubmittedViaForm.getPassword().trim().length() == 0) {\n throw new Exception(\"Invalid password input\");\n }\n //Checks if uses exists.\n else if (checkUserValidity == null) {\n throw new Exception(\"User does not exist\");\n }\n //Checks for password equality.\n else if (!PasswordStorage.verifyPassword(userSubmittedViaForm.getPassword(), checkUserValidity.getPassword())) {\n throw new Exception(\"Incorrect Password\");\n }\n //If all checks are passed will log user to session, again maybe shouldn't be an \"else\".\n else {\n //Saves session by valid username.\n userSession.setAttribute(\"username\", checkUserValidity.getUsername());\n System.out.println(\"User \" + checkUserValidity.getUsername() + \" authenticated!\");\n return \"User authenticated!\";\n }\n }",
"private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }",
"public Boolean isValidCredential(String jwtToken , HttpServletRequest request) throws Exception {\n// Once we get the token and session .. validate it.\n\n // means user no already registered and using an un authenticated session\n // may be session fixation attack\n if (SecurityContextHolder.getContext().getAuthentication() == null) {\n System.out.println(\"[SUSPICIOUS REQUEST]-[\"+request.getRemoteAddr()+\"] not a authenticated session but jwt is acceptable \");\n return false;\n }else {\n // get UserDetails from SecurityContextHolder\n UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n if (jwtTokenUtil.validateToken(jwtToken, userDetails )){\n // jwt is valid , now check the session\n String sessionIp = (String) request.getSession().getAttribute(\"IP\");\n String sessionJwt = (String) request.getSession().getAttribute(\"TOKEN\");\n if (sessionIp != null && sessionJwt != null && sessionIp.equals(request.getRemoteAddr()) && sessionJwt.equals(jwtToken)){\n System.out.println(\"[SESSION VALIDATION APPROVED]\");\n return true;\n }else {\n System.out.println(\"[SUSPICIOUS REQUEST]-[\"+request.getRemoteAddr()+\"] user ip address or jwt not match\");\n System.out.println(\"-------details:\");\n System.out.println(\"---------------storedIp [\"+sessionIp+\"] != requestIp[\"+request.getRemoteAddr()+\"]\");\n System.out.println(\"---------------storedJwt[\"+sessionJwt+\"] != requestJWT[\"+jwtToken+\"]\");\n return false;\n }\n }else {\n System.out.println(\"[ERROR] jwt is not correct\");\n return false;\n }\n\n }\n }",
"public static boolean isSessionValid (String ACCESS_LEVEL) {\n String sqlRetrieveDateTime = \"SELECT now() as date_time\";\n \n LocalDateTime time = LocalDateTime.now().minusYears(100);\n try (Connection conn = Database.getConnection();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sqlRetrieveDateTime)) {\n \n while (rs.next()) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n time = LocalDateTime.parse(rs.getString(\"date_time\"), formatter); \n }\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (DateTimeParseException | NullPointerException dtpe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n LocalDateTime t = time.minusMinutes(30);\n \n setRoleFromDatabase();\n \n return t.isBefore(lastAction) && doesUserExist() && (role.equals(roleFromDatabase)) && (ACCESS_LEVEL.equals(role)) && (ACCESS_LEVEL.equals(roleFromDatabase)) && ((userId != -1) && (aisId != -1) && (!name.isEmpty()) && (!role.isEmpty()) && (!roleFromDatabase.isEmpty()));\n }",
"private Boolean isInSession(String token, String username) {\n \treturn true;\n }",
"private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }",
"@PostMapping(\"/login\")\n\t\tpublic String ValidateLoggedInUser(ModelMap model,@RequestParam String phno_mail,@RequestParam String password) {\n\t\t\tSystem.out.println(phno_mail + password);\n\t\t\t\tif(service.isValideUser(model,phno_mail, password)) {\n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Valid\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\treturn \"home\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmodel.put(\"Message\",\"Invalid Phoneno or Password\");\n\t\t\t\treturn \"LoginOrRegister\";}\n\t\t\t\n\t\t\t\t\n\t\t}",
"private void validateUserObject(User user) {\n\t }",
"boolean hasLogin();",
"boolean hasLogin();",
"@PostMapping(\"/user/login\")\n public ResponseVo<User> login(@Valid @RequestBody UserLoginForm userLoginForm,\n HttpSession session) {\n\n// if (bindingResult.hasErrors()) {\n// log.info(\"params inconsistent for login, {} {}\",\n// Objects.requireNonNull(bindingResult.getFieldError()).getField(),\n// bindingResult.getFieldError().getDefaultMessage());\n// return ResponseVo.error(ResponseEnum.PARAM_ERROR, bindingResult);\n// }\n\n ResponseVo<User> userResponseVo = userService.login(userLoginForm.getUsername(), userLoginForm.getPassword());\n\n session.setAttribute(MallConst.CURRENT_USER, userResponseVo.getData());\n log.info(\"/login sessionId={}\", session.getId());\n\n return userResponseVo;\n }",
"@Override\r\n\tpublic boolean validate(String userName, String password) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tCriteria criteria = session.createCriteria(User1.class);\r\n\t\tcriteria.add(Restrictions.like(\"userName\", userName));\r\n\t\tboolean flag = false;\r\n\t\tObject result = criteria.uniqueResult();\r\n\t\tif (result != null) {\r\n\t\t\tUser1 user = (User1) result;\r\n\t\t\tif (user.getPassword().equalsIgnoreCase(password)) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (flag == true) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Override\n public void validateCredentials(ObjLogin objLogin, Context mContext) {\n if (loginView != null) {\n loginView.showProgress();\n loginInteractor.login(objLogin, this, mContext);\n }\n }",
"public boolean authenticateUser() {\r\n try {\r\n \r\n firstServerMessage();\r\n sendKeys();\r\n sessionKeyMsg();\r\n \r\n \r\n \r\n \treturn true;\r\n }\r\n \r\n catch(Exception ioe){\r\n System.out.println(\"Terminating session with Acct#: \" + currAcct.getNumber());\r\n //ioe.printStackTrace();\r\n return false;\r\n }\r\n \r\n }",
"public static boolean validateSession(String ssId){\n\t\t//Filters by sessionId\n\t\tFilter sessionFilter = new FilterPredicate(\n\t\t\t\t\"sessionId\", FilterOperator.EQUAL, ssId\n\t\t\t\t);\n\t\t\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\t\n\t\t//Prepare the Query\n\t\tQuery q = new Query(\"sessionId\").setFilter(sessionFilter);\n\t\t\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\t//Loops through all results. In our case, we are going to just use the first one\n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.warning(\"Entity returned, found sessionId\");\n\t\t\t/*\n\t\t\tIf this gets returned at all, we know the sessionId is valid, therefore, \n\t\t\twe can just return true. If we wanted to add additional security measures\n\t\t\t(IE checking sessionId against the name or something) it would go here.\n\t\t\tI am purposefully not checking against the date here and I'll show why\n\t\t\tat a later date. \n\t\t\t */\n\t\t\treturn true;\t\n\t\t}\n\t\t//Nothing was returned, return false\n\t\tlog.warning(\"Entity not returned, found nothing\");\n\t\treturn false;\n\t}",
"public boolean validateUserToken(String login, String token) throws SQLException;",
"private void checkValidLogin(String username, String password) {\r\n //The check username will check to see if a password was returned. That means the user\r\n //exists. If a void is returned, then the user does not exist.\r\n String actualPassword = checkUsername(username);\r\n\r\n //If a null was passed back, then the username does not exist. We signal the user.\r\n if (actualPassword == null) {\r\n signalInvalidUser();\r\n return;\r\n }\r\n\r\n //We check to see if the password that was type is equal to the 1 we got from the DB. If\r\n //not we signal the user.\r\n if (!checkPassword(password, actualPassword)){\r\n signalInvalidPassword();\r\n return;\r\n }\r\n\r\n //If everything worked, we go to the landing page.\r\n goToLandingPage();\r\n }",
"@Override\n\tpublic boolean validate(String username, String password) throws Exception {\n\t\tboolean result=false;\n\t\tString hql=\"select count(um.username) from UserModel um where um.username=:username and um.password=:password\";\n\t\tQuery query=sf.getCurrentSession().createQuery(hql);\n\t\tquery.setString(\"username\",username);\n\t\tquery.setString(\"password\", password);\n\t\tLong lcount=(Long)query.uniqueResult();\n\t\tif(lcount!=null&&lcount>0){\n\t\t\tresult=true;\n\t\t}\n\t\treturn result;\n\t}",
"private boolean loggedIn() {\n boolean exist = false;\n UsuarioBean u = (UsuarioBean) FacesUtil.getBean(\"usuarioBean\");\n if (u.getLoggedIn() != null) {\n exist = u.getLoggedIn().booleanValue();\n }\n return exist;\n }",
"public boolean loginCheck() {\n\t\tif(allParametersGiven==true) {\n\t\t\treturn dtb.checkLoginDetais(username,password);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean validateUserCredentials(String login, String password) throws SQLException;",
"@Override\n\t\tpublic boolean isRequestedSessionIdValid() {\n\t\t\treturn false;\n\t\t}",
"@RequestMapping(\"/process_login\")\n public String processLogin(User user, Model model,HttpSession session, HttpServletRequest httpServletRequest, HttpSession httpSession) throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n\n IpAddressAttempt addressAttempt;\n session.setAttribute(\"mode\", \"read\");\n\n if(userService.existByLogin(user.getLogin())){\n Optional<User> checkUser = userService.checkPassword(user);\n if(!addressService.addressExists(httpServletRequest.getRemoteAddr()))\n addressAttempt = addressService.saveAddressAttempt(httpServletRequest.getRemoteAddr());\n else\n addressAttempt = addressService.getAddressAttempt(httpServletRequest.getRemoteAddr());\n\n if(!addressService.verifyAddressAttempts(httpServletRequest.getRemoteAddr())){\n model.addAttribute(\"errorAddress\", true);\n model.addAttribute(\"addressAttempt\", addressAttempt);\n\n\n }\n else{\n if(!loginService.existsByUserLogin(user.getLogin())){\n loginService.saveUserAttempt(user);\n }\n if(!loginService.verifyLoginAttempts(user)){\n model.addAttribute(\"errorUser\", true);\n model.addAttribute(\"userAttempt\", loginService.getLoginAttempt(user.getLogin()));\n }\n else{\n if(checkUser.isPresent()) { //check password match\n model.addAttribute(\"user\", checkUser.get());\n model.addAttribute(\"userAttempt\", checkUser.get().getLoginAttempt());\n loginService.resetAttempts(user);\n addressService.addressAddCorrectAttempts(httpServletRequest.getRemoteAddr());\n httpSession.setAttribute(\"user\", user.getLogin());\n actionService.saveAction(\"Logged In\", httpSession.getAttribute(\"user\").toString());\n\n return \"redirect:/login/\" + checkUser.get().getId();\n }\n loginService.addAttempts(user);\n addressService.addressAddIncorrectAttempts(httpServletRequest.getRemoteAddr());\n model.addAttribute(\"error\", true);\n }\n }\n }\n else {\n model.addAttribute(\"error\", true);\n }\n\n return \"loginForm\";\n\n\n\n }",
"private boolean isLoggedInUser(){\n return true;\n }",
"@Override\r\n\tpublic boolean checkLogin(int accNo) throws EwalletException {\n\t\ttemp =dao.loginuser(accNo);\r\n\t\tif(temp!=null)\r\n\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}",
"private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }",
"@RequestMapping(value=\"/loginValidation\")\r\npublic String validation(@RequestParam(\"userid\") String userid,@RequestParam(\"password\") String password)\r\n{\r\n\t//getting all credentials from user table\r\n\tList<User> listUser=userService.getAllCreds();\r\n\tboolean flag = false;\r\n\t\r\n\t//checking whether the user is valid or not\r\n\tfor(User u: listUser) {\r\n\t\tif(u.getUserId().equals(userid) && u.getPassword().equals(password)) {\r\n\t\t\tflag=true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tif(flag)\r\n\t{\r\n\t\t//if creds are valid it will redirect to usertype page\r\n\t\treturn \"usertype\";\r\n\t }\r\n\telse\r\n\t{\r\n\t\t//if creds are invalid it will redirect to loginfailure page\r\n\t\treturn \"loginfailure\";\t \r\n }\r\n}",
"@Override\n\tpublic int checkLogin(User user) {\n\t\tint msg=0;\n\t\ttry{\n\t\t\tUser user2=uDao.loginUser(user.getUsername().toString());\n\t\t\tString pwd=getEncodTool.decodeHexTest(user2.getPassword());\n\t\t\tif(pwd.equals(user.getPassword())){\n\t\t\tmsg=1;\n\t\t\t}else{\n\t\t\t\tmsg=3;\t\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tmsg=2;\n\t\t}\t\n\t\treturn msg;\n\t}",
"public boolean checkLogin(String username, String password) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n MessageDigest md = null; //check password against hash of password\n try {\n md = MessageDigest.getInstance(\"SHA\"); //step 2\n } catch (NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n try {\n md.update(password.getBytes(\"UTF-8\")); //step 3\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n byte raw[] = md.digest(); //step 4\n String hash = (new BASE64Encoder()).encode(raw); //step 5\n password = hash;\n\n try {\n\n results = session.find(\"from User as user where user.username = ? and user.password = ? and currentEmployee='true'\",\n new Object[]{username, password},\n new Type[]{Hibernate.STRING, Hibernate.STRING});\n\n\n } catch (ObjectNotFoundException onfe) {\n return false;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return false;\n } else {\n return true;\n }\n\n }",
"protected void login (HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n String username = req.getParameter(\"username\");\n String password = req.getParameter(\"password\");\n // invoke userService.login()\n User loginUser = userService.login(new User(null, username, password, null));\n // if null, then fail\n if (loginUser == null) {\n // save information to request domain\n req.setAttribute(\"msg\", \"Username or Password incorrect !\");\n req.setAttribute(\"username\", username);\n // jump to login page dispatcher share the same request information\n req.getRequestDispatcher(\"/pages/user/login.jsp\").forward(req, resp);\n }\n else {\n\n // save user information to Session domain\n req.getSession().setAttribute(\"user\", loginUser);\n req.getRequestDispatcher(\"/pages/user/login_success.jsp\").forward(req, resp);\n }\n\n }",
"public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n String username = request.getParameter(\"Username\");\r\n String password = request.getParameter(\"Password\");\r\n\r\n HttpSession session = request.getSession();\r\n List<User> userList = sql.selectAllUsers();\r\n\r\n Boolean validUser = false;\r\n Boolean IsAdmin = false;\r\n\r\n if (userList != null && userList.isEmpty() == false) {\r\n for (User user : userList) {\r\n if (user.getUsername().equals(username)\r\n && user.getPass().equals(password)) {\r\n LoginHistory newLoginHistory = new LoginHistory(user.getUsersID(),LocalDate.now().toString(),\"test123\");\r\n sql.createLoginHistory(newLoginHistory);\r\n if (user.getUserType().equals(\"Admin\")) {\r\n IsAdmin = true;\r\n break;\r\n }\r\n session.setAttribute(Session.LOGIN_USERNAME, user.getUsername());\r\n System.out.println(user.getUsername());\r\n validUser = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (session.getAttribute(Session.SITE) != null) {\r\n goToSite = session.getAttribute(Session.SITE).toString();\r\n }\r\n\r\n if (validUser && goToSite.equals(\"ProfilePage\")) {\r\n session.setAttribute(\"LoginUsername\", username);\r\n session.setAttribute(Session.SITE, \"\");\r\n response.sendRedirect(\"User/ProfilePage.jsp\");\r\n } else if (validUser && goToSite.equals(\"PurchaseMethod\")) {\r\n session.setAttribute(\"LoginUsername\", username);\r\n session.setAttribute(Session.SITE, \"\");\r\n response.sendRedirect(\"User/PurchaseMethod.jsp\");\r\n } else if (validUser) {\r\n session.setAttribute(\"LoginUsername\", username);\r\n session.setAttribute(Session.SITE, \"\");\r\n response.sendRedirect(\"MainPage.jsp\");\r\n } else if (IsAdmin) {\r\n response.sendRedirect(\"Admin/AdminMainPage.jsp\");\r\n } else {\r\n response.sendRedirect(\"LoginPage.jsp\");\r\n }\r\n } catch (Exception ex) {\r\n Logger.getLogger(LoginServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private boolean create() {\r\n\t\tboolean rtn = false;\r\n\t\ttry {\r\n\t\t\tif (_session != null) {\r\n\t\t\t\tSessionMgr.removeSession(_session.getKey());\r\n\t\t\t\t_session = null;\r\n\t\t\t\t_transaction.setSession(_session);\r\n\t\t\t}\r\n\r\n\t\t\tString sentpwd = _where.optString( UsrRequest.PASSWORD, null);\r\n\t\t\tif ((sentpwd == null) || (sentpwd.length() == 0)) {\r\n\t\t\t\tsetError(\"Password missing from login\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString loginname = _where.optString( UsrRequest.LOGINNAME, null);\r\n\t\t\tif ((sentpwd == null) || (sentpwd.length() == 0)) {\r\n\t\t\t\tsetError(\"Loginname missing from login\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\tEntityMap emap = EntityMapMgr.getEMap(USR);\r\n\t\t\t_data.put(COLUMNS, FIELDLIST);\r\n\t\t\tResultSet rs = _dbi.readRecords(emap, _data);\r\n\t\t\tif (rs == null) {\r\n\t\t\t\tsetError(\"User login failed... Invalid usr id ????\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tthis._usrid = rs.getLong(ID);\r\n\t\t\t\tString firstname = rs.getString(UsrRequest.FIRSTNAME);\r\n\t\t\t\tString lastname = rs.getString(UsrRequest.LASTNAME);\r\n\t\t\t\tString str_salt = rs.getString(UsrRequest.SALT);\r\n\t\t\t\tString email = rs.getString(UsrRequest.EMAIL);\r\n\r\n\t\t\t\tint code = validate(\r\n\t\t\t\t\t\tthis._usrid, \r\n\t\t\t\t\t\trs.getString(UsrRequest.DIGEST), \r\n\t\t\t\t\t\tEncryptUtil.getPasswordDigest(sentpwd, str_salt), \r\n\t\t\t\t\t\trs.getInt(\"statusid\"), \r\n\t\t\t\t\t\trs.getInt(\"attempts\"), \r\n\t\t\t\t\t\trs.getTimestamp(\"lastattempt\"));\r\n\t\t\t\trs.close();\r\n\t\t\t\tif (code != NORMAL) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tArrayList<Integer> ugroups = AuthorityMgr.getUGroups(_dbi, this._usrid);\r\n\t\t\t\tif (_session == null) {\r\n\t\t\t\t\t_session = SessionMgr.createSession(this._usrid, ugroups);\r\n\t\t\t\t}\r\n\t\t\t\t_session.setLoginname(loginname);\r\n\t\t\t\t_session.setData(UsrRequest.EMAIL, email);\r\n\t\t\t\t_transaction.setSession(_session);\r\n\r\n\t\t\t\t_jwriter.openObject(DATA);\r\n\t\t\t\t_jwriter.writePair(LOGIN, true);\r\n\t\t\t\t_jwriter.writePair(\"usrid\", this._usrid);\r\n\t\t\t\t_jwriter.writePair(\"firstname\", firstname);\r\n\t\t\t\t_jwriter.writePair(\"lastname\", lastname);\r\n\t\t\t\t_jwriter.writePair(\"sessionid\", _session.getSessionID());\r\n\t\t\t\t_jwriter.writePair(\"permissions\", AuthorityMgr.convertPermissions(ugroups));\r\n\t\t\t\t\r\n\t\t\t\t_jwriter.writePair(\"storageloc\", StorageMgr.instance().usableAsJson());\r\n//\t\t\t\t_jwriter.writePair(\"serverconfig\", ServerconfigRequest.info(_conn));\r\n\t\t\t\t_dbi.read(\"usrconfig\", EntityMapMgr.getEMap(\"usrconfig\"), JsonUtil.getDataWhere(this._usrid));\r\n\r\n\t\t\t\t_jwriter.closeObject();\r\n\t\t\t\trtn = true;\r\n\t\t\t} else {\r\n\t\t\t\t// user does not exists\r\n\t\t\t\tsetErrorNoLog(\"Login failed\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetError(e);\r\n\t\t}\r\n\t\treturn rtn;\r\n\t}",
"public boolean validateLogin(String email, String password) {\n\t\tLog.i(TAG, \"validate current user whether is valid in db\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString val = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"' and password='\" + password + \"'\";\n\t\tCursor cursor = db.rawQuery(val, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return false;\n\t\treturn true;\n\t}",
"@Override\n\tpublic void validate() {\n\t\tSystem.out.println(user+\"//\"+password);\n\t\tif (user == null || user.trim().equals(\"\")) {\n\t\t\taddFieldError(\"user\", \"The user is required\");\n\t\t}\n\t\tif (password == null || password.trim().equals(\"\")) {\n\t\t\taddFieldError(\"password\", \"password is required\");\n\t\t}\n\t}",
"protected void login() {\n\t\t\r\n\t}",
"private boolean SecuenciaValidacion() {\n String cuenta = jTextFieldUser.getText().trim();\n String contrasenia = new String(jPasswordFieldPswd.getPassword());\n\n JDialogSplash jDialogSplash = new JDialogSplash(this, ModalityType.APPLICATION_MODAL);\n jDialogSplash.setLocationRelativeTo(this);\n jDialogSplash.setVisible(true);\n\n if (cuenta.equals(id) && contrasenia.equals(pass)) {\n LOG.info(\"Logging successful\");\n return true;\n } else {\n LOG.info(\"Logging failed\");\n return false;\n }\n }",
"boolean hasLoginRequest();",
"private void validateUserObject(User user) {\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException \n\t{\n\t\tString usrId = req.getParameter(\"uid\");\n\t\tString password = req.getParameter(\"psw\");\n\t\tString domain=req.getParameter(\"domain\");\n\t\t\n\t\t//2. Validate the credentials\n\t\tUserAuthenticate util = new UserAuthenticate();\n\t\tboolean isValid = util.validate(usrId, password, domain);\n\t\t\n\t\tif(isValid) //if the user is valid, start a session.\n\t\t{\n\t\t\t\tHttpSession session = req.getSession(true); //starting a session.\n\t session.setAttribute(\"userID\", usrId);\n\t \n\t //setting flag according to the user's privileges.\n\t int flag=util.flag;\n\t \t\tsession.setAttribute(\"flag\", flag);\n\t\t\t\t\n\t \t\tresp.sendRedirect(\"home\");\n\t \t\t//End of Authentication\n\t\t}\n\t\telse //invalid user\n\t\t{\n\t\t\treq.setAttribute(\"errMsg\", \"In-Valid User Name / Password\");\n\t\t\tRequestDispatcher dispatcher = req.getRequestDispatcher(\"loginErr\");\n\t\t\tdispatcher.forward(req, resp);\n\t\t}\n\t}",
"public static boolean login(HttpServletRequest req) {\n\t\tif (isEmployee(req)) {\n\t\t\treq.setAttribute(REQ_CONNECTION_FAILED, false);\n\n\t\t\treq.getSession().setAttribute(SESS_IS_EMPLOYEE, true);\n\n\t\t\treturn true;\n\t\t}\n\n\t\tif (isAdmin(req)) {\n\t\t\treq.setAttribute(REQ_CONNECTION_FAILED, false);\n\n\t\t\treq.getSession().setAttribute(SESS_IS_EMPLOYEE, true);\n\t\t\treq.getSession().setAttribute(SESS_IS_ADMIN, true);\n\n\t\t\treturn true;\n\t\t}\n\n\t\treq.setAttribute(REQ_CONNECTION_FAILED, true);\n\t\treturn false;\n\t}",
"private void checkAuthSessionToken() {\n val auth = config.getString(\"authSessionToken\");\n\n checkArgument(auth.length() > 10, \"auth string (sessionToken) length is less than or equal to 10!\");\n }",
"public boolean verificarUsuario(){\n boolean estado = false;\n try{\n this.usuarioBean = (Dr_siseg_usuarioBean) this.manejoFacesContext.obtenerObjetoSession(\"usuario\");\n if(this.usuarioBean != null){\n estado = true;\n if (this.usuarioBean.getRoll().equals(\"GRP_SERVAGTMII_ADMIN\")){\n modoAdministrador=true;\n// this.usuarioRoll=\"ADMIN\";\n// this.disableBotonFinalizar=\"false\";\n// this.visibleImprimirComprobanteEncargado=\"true\";\n// this.visibleImprimirComprobanteEstudiante=\"true\";\n \n\n }else{\n if (this.usuarioBean.getRoll().equals(\"GRP_SERVAGTMII_PF1\")){\n modoAdministrador=true;\n// this.usuarioRoll=\"PF1\";\n// this.disableBotonFinalizar=\"true\";\n// this.visibleImprimirComprobanteEncargado=\"false\";\n// this.visibleImprimirComprobanteEstudiante=\"true\";\n \n }\n }\n\n }else{\n this.manejoFacesContext.redireccionarFlujoWeb(\"/WebAppSLATE/LogoutServlet\" );\n }\n }catch(Exception ex){\n this.manejoFacesContext.redireccionarFlujoWeb(\"/WebAppSLATE/LogoutServlet\" );\n // this.manejoFacesContext.redireccionarFlujoWeb(\"/WebAppMADEB/cr.ac.una.reg.info.contenido/moduloFuncionario/estudiante/e_editarDireccion.jspx\");\n }//\n return estado;\n }",
"boolean checkLogout(User user, HttpServletRequest request, HttpSession session);",
"private void validateUser(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tresponse.setContentType(\"text/html;charset=UTF-8\");\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"error.jsp\");\n\t\tUserTO userTO = new UserTO();\n\t\tHttpSession errorMessage = request.getSession(true);\n\n\t\ttry {\n\t\t\tif (request.getParameter(\"memberid\").equals(\"\") || request.getParameter(\"password\").equals(\"\")) {\n\t\t\t\tthrow new NullPointerException(PropertyUtil.getCMSMessages(\"227\"));\n\t\t\t}\n\n\t\t\tuserTO.setUserMemberID(request.getParameter(\"memberid\"));\n\t\t\tuserTO.setUserPassword(request.getParameter(\"password\"));\n\t\t\tHttpSession userSession = request.getSession(true);\n\t\t\tif (new UserLoginFacade().checkUserValidity(userTO)) {\n\t\t\t\tuserSession.setAttribute(\"memberid\", userTO.getUserMemberID());\n\t\t\t\tdispatcher = request.getRequestDispatcher(\"userhome.jsp\");\n\t\t\t} else {\n\t\t\t\terrorMessage.setAttribute(\"errorMessage\", PropertyUtil.getCMSMessages(\"228\"));\n\t\t\t\tuserSession.setAttribute(\"memberid\", userTO.getUserMemberID());\n\t\t\t\tdispatcher = request.getRequestDispatcher(\"getMemberProfileDetails\");\n\t\t\t}\n\t\t} catch (CMSBusinessException e) {\n\t\t\terrorMessage.setAttribute(\"errorMessage\", e.getMessage());\n\t\t\tdispatcher = request.getRequestDispatcher(\"Welcome.jsp\");\n\t\t\tLOGGER.info(\"Happened at class\" + this.getClass().getName() + \" at \" + Calendar.getInstance().getTime()\n\t\t\t\t\t+ \" -\" + e.getMessage());\n\n\t\t} catch (DatabaseException e) {\n\t\t\terrorMessage.setAttribute(\"errorMessage\", e.getMessage());\n\t\t\tLOGGER.info(\"Happened at class\" + this.getClass().getName() + \" at \" + Calendar.getInstance().getTime()\n\t\t\t\t\t+ \" -\" + e.getMessage());\n\t\t\tif (e.getMessage().equals(PropertyUtil.getCMSMessages(\"228\"))) {\n\t\t\t\tdispatcher = request.getRequestDispatcher(\"ProfileUpdate.jsp\");\n\t\t\t} else {\n\t\t\t\tdispatcher = request.getRequestDispatcher(\"Welcome.jsp\");\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\terrorMessage.setAttribute(\"errorMessage\", e.getMessage());\n\t\t\tdispatcher = request.getRequestDispatcher(\"Welcome.jsp\");\n\t\t\tLOGGER.info(\"Happened at class\" + this.getClass().getName() + \" at \" + Calendar.getInstance().getTime()\n\t\t\t\t\t+ \" -\" + e.getMessage());\n\t\t} finally {\n\t\t\tdispatcher.forward(request, response);\n\t\t}\n\n\t}",
"private boolean authenticate(HttpServletRequest request, RouteAction route) {\n\t\tHttpSession session = request.getSession(false);\n\t\tif (session == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException{\n LoginValidator loginValidator = new LoginValidator();\n \n response.setContentType(\"text/html;charset=UTF-8\");\n String user = request.getParameter(\"usuario\");\n String password = request.getParameter(\"clave\");\n \n //The user exists\n if(loginValidator.validateUser(user, password)){\n //We redirect the user to another servlet\n response.sendRedirect(\"\");\n } \n //The user doesn't exists\n else {\n //We redirect the user to another servlet\n response.sendRedirect(\"\");\n }\n }"
] | [
"0.7553736",
"0.72196424",
"0.71454924",
"0.70389205",
"0.69767195",
"0.6939218",
"0.6720157",
"0.66467106",
"0.66394603",
"0.65836275",
"0.65505147",
"0.6543813",
"0.65067494",
"0.65046084",
"0.65046084",
"0.6458192",
"0.64424014",
"0.64385843",
"0.64372015",
"0.63946146",
"0.6350838",
"0.633417",
"0.63302106",
"0.632193",
"0.6317081",
"0.63109124",
"0.62967044",
"0.6280069",
"0.62727123",
"0.624827",
"0.6248194",
"0.6246817",
"0.62387335",
"0.6237135",
"0.6227836",
"0.62220716",
"0.6215428",
"0.62093484",
"0.620585",
"0.618312",
"0.61812204",
"0.61579657",
"0.61510503",
"0.61349076",
"0.6130753",
"0.61264867",
"0.6111696",
"0.61102253",
"0.61041856",
"0.61027515",
"0.6101106",
"0.6095471",
"0.6094466",
"0.6093505",
"0.6086821",
"0.60797507",
"0.60604143",
"0.6051157",
"0.60359",
"0.6033287",
"0.6032214",
"0.60294586",
"0.6023938",
"0.6023938",
"0.6021869",
"0.6013022",
"0.60084474",
"0.60062",
"0.59994566",
"0.599564",
"0.5995133",
"0.5983358",
"0.59761745",
"0.59727705",
"0.59726787",
"0.59704417",
"0.5968941",
"0.5966193",
"0.59660256",
"0.596098",
"0.59605694",
"0.5954781",
"0.59534454",
"0.5949009",
"0.5948997",
"0.5947694",
"0.59453166",
"0.5942959",
"0.59419286",
"0.59401274",
"0.5936408",
"0.593619",
"0.5932211",
"0.59301716",
"0.59276265",
"0.5921379",
"0.591751",
"0.59102404",
"0.5894184",
"0.5892117",
"0.5886487"
] | 0.0 | -1 |
/ This method logout the user | @CrossOrigin(origins = AppConstants.CORS)
@RequestMapping(value = {UrlConstants.API_LOGOUT+"org"}, method = RequestMethod.POST)
public void logOut() {
try {
} catch (Exception e) {
logger.error("efregt");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n finish();\n }",
"private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(Activity_Main.this, Activity_Login.class);\n startActivity(intent);\n finish();\n }",
"private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(EscolhaProjeto.this, LoginActivity.class);\n startActivity(intent);\n finish();\n }",
"@Override\n\tpublic void logout()\n\t{\n\t\tthis.user = null;\n\t}",
"public void logout() {\n \n }",
"private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(getActivity(), LoginActivity.class);\n startActivity(intent);\n getActivity().finish();\n }",
"private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\t\tdb.deleteUsers();\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(MainActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}",
"private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(MainActivity.this, Login.class);\n startActivity(intent);\n finish();\n }",
"private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(EnterActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}",
"private void logout()\r\n {\r\n LogoutRequest request = new LogoutRequest();\r\n request.setUsername(username);\r\n this.sendRequest(request);\r\n }",
"private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }",
"public void logout(){\r\n\t\tallUser.remove(this.sessionID);\r\n\t\tthis.sessionID = -1;\r\n\t}",
"public void logout() {\n\t\tthis.setCurrentUser(null);\n\t\tthis.setUserLoggedIn(false);\t\t\n\t}",
"@Override\n\tpublic void logout(user theUser) {\n\t}",
"@Override\r\n\tpublic void logout() {\n\t\t\r\n\t}",
"private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }",
"@Override\n\tpublic void logout() {\n\t\tsessionService.setCurrentUserId(null);\n\t}",
"public void logout(){\n\t\t\n\t\tcurrentUser.logout();\n\t\tcurrentUser = null;\n\t\tchangeViewPort(new GUI_Logout(\"\", \"\", this));\n\t}",
"public void logout() {\n getRequest().getSession().invalidate();\n }",
"public void Logout() {\n \t\t\t\n \t\t}",
"protected void logout() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\t\tuserController.performLogout();\n\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t}",
"@Override\n\tpublic void logOutUser() {\n\t\t\n\t}",
"private void logout() {\n\t\tParseUser.logOut();\n\n\t\t// Go to the login view\n\t\tstartLoginActivity();\n\t}",
"public void logoutUser() {\n editor.remove(Is_Login).commit();\n editor.remove(Key_Name).commit();\n editor.remove(Key_Email).commit();\n editor.remove(KEY_CUSTOMERGROUP_ID).commit();\n // editor.clear();\n // editor.commit();\n // After logout redirect user to Loing Activity\n\n }",
"public void doLogout() {\n mSingleton.getCookieStore().removeUser(mUser);\n mPreferences.setUser(null);\n new ActivityTable().flush();\n\n //update variables\n mUser = null;\n mLogin = false;\n\n //reset drawer\n restartActivity();\n }",
"public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n\n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n }\n\n }",
"public void logoutCurrentUser() {\n mAuth.signOut();\n this.loggedInUser = null;\n }",
"void logout();",
"void logout();",
"private void logout() {\n\t\tgetUI().get().navigate(\"login\");\r\n\t\tgetUI().get().getSession().close();\r\n\t}",
"public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n /*\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n \n \n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n */\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n\n this.setVisible(false);\n }\n\n }",
"public String logout()\n\t{\n\t\tsession.remove(\"user_name\");\n\t\tsession.remove(\"password\");\n\t\tsession.clear();\n\t\tsession.invalidate();\t\n\t\taddActionMessage(\"You Have Been Successfully Logged Out\");\n\t\treturn SUCCESS;\n\t}",
"public static void logout(Context context) \r\n\t{\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\tcontext.sessionAttribute(\"currentUser\", null);\r\n\t\t\tcontext.redirect(\"/index.html\");\r\n\t\t\t//context.json(new MyCustomResponseMessage(\"You've successfully logged out\", \"success\"));\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogging.error(e);\r\n\t\t}\r\n\t}",
"public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\n\t\t}",
"@Override\n\tpublic void logout() {\n\t}",
"public void doLogout() {\n loggedIn = false;\r\n HttpSession session = (HttpSession) FacesContext.getCurrentInstance()\r\n .getExternalContext().getSession(false);\r\n session.invalidate(); \r\n String pag= \"/login.xhtml\";\r\n redireccionar(pag);\r\n }",
"public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\t\n\t\t}",
"public static void Logout(){\n\t\tloginSystem();\r\n\t\t\r\n\t}",
"private void logout() {\n getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit().clear().apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE).edit().putBoolean(IS_LOGGED_IN, false).apply();\n\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(URL + \"/nuh/logout\")\n .build();\n AsyncTask.execute(() -> {\n try {\n client.newCall(request).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n }",
"public void Logout(){\n preferences.edit().remove(userRef).apply();\n }",
"public static void logout() {\n userId = -1;\n aisId = -1;\n \n name = \"\";\n role = \"\";\n roleFromDatabase = \"\";\n \n lastAction = LocalDateTime.now().minusYears(100);\n }",
"public void logout () {\n\t\tif (isLoggedIn()) {\n\t\t\tGPPSignIn.sharedInstance().signOut();\n\t\t\tGPGManager.sharedInstance().signOut();\n\t\t}\n\t}",
"protected void userLoggedOut() {\n\t\tRuvego.userLoggedOut();\n\t\tResultsActivityMenu.userLoggedOut();\n\t\tHistory.newItem(\"homePage\");\n\t}",
"public Result logOut() {\n customerService().logout();\n return redirectToReturnUrl();\n }",
"boolean userLogout(UserDTO user) throws UserException, SQLException,ConnectException;",
"public String logout() {\n String destination = \"/index?faces-redirect=true\";\n\n // FacesContext provides access to other container managed objects,\n // such as the HttpServletRequest object, which is needed to perform\n // the logout operation.\n FacesContext context = FacesContext.getCurrentInstance();\n HttpServletRequest request = \n (HttpServletRequest) context.getExternalContext().getRequest();\n\n try {\n // added May 12, 2014\n HttpSession session = request.getSession();\n session.invalidate();\n \n // this does not invalidate the session but does null out the user Principle\n request.logout();\n } catch (ServletException e) {\n log.log(Level.SEVERE, \"Failed to logout user!\", e);\n destination = \"/loginerror?faces-redirect=true\";\n }\n\n return destination; // go to destination\n }",
"@Override\n\tpublic void userLogout(String userId) throws Exception {\n\n\t}",
"public static Result logout() {\n session().clear();\n flash(\"success\", Messages.get(\"youve.been.logged.out\"));\n return GO_HOME;\n }",
"public void logoutCurrentUser() {\n currentUser = null;\n }",
"private void logout() {\n //set offline flag\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n new PostNoSqlDataBase(this).offline(uid);\n\n //logout\n // FirebaseAuth mAuth = FirebaseAuth.getInstance();\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n mGoogleSignInClient.signOut();\n FirebaseAuth.getInstance().signOut();\n //go to the main activity\n startActivity(new Intent(this, SignUpActivity.class));\n finish();\n }",
"public void logOut() {\n try {\n // getGlobalNavigation().clickSignOut();\n } catch (TimeoutException e) {\n Log.log(\"logOut\", \"page loads for more than 30 seconds\", true);\n }\n }",
"@Override\n public void Logout() {\n\t \n }",
"public void logout() {\n \n FacesContext.getCurrentInstance().getExternalContext().invalidateSession();\n try {\n FacesContext.getCurrentInstance().getExternalContext()\n .redirect(\"/BookStorePelikSangat/faces/admin/loginadmin.xhtml\");\n } \n catch (IOException e) {}\n\t}",
"private void logout(){\r\n\t\ttry {\r\n\t\t\tserver.rmvClient(user);\r\n\t\t} catch (RemoteException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tSystem.exit(0);\r\n\t}",
"public String logout(){\r\n this.user = null;\r\n loggedIn = false;\r\n return \"/index?faces-redirect=true\";\r\n }",
"@Override\n\tpublic void exitSessionUser() {\n\t\tgetThreadLocalRequest().getSession().invalidate();\n\t\t\n\t}",
"@Override\r\n\tpublic void userLogout(String login) {\n\r\n\t}",
"public abstract void logout();",
"private void logout() {\n fbAuth.signOut();\n startActivity(new Intent(getApplicationContext(), LoginActivity.class));\n finish();\n }",
"public void logout(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", 0);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.clear();\n preferencesEditor.commit();\n // take user back to login screen\n Intent logoutIntent = new Intent(mContext, LoginActivity.class);\n logoutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(logoutIntent);\n }",
"private void logout() {\n ProgressDialog logoutProgressDialog = new ProgressDialog(ContributionsGalleryActivity.this);\n logoutProgressDialog.setMessage(getResources().getString(R.string.logging_out));\n logoutProgressDialog.setCancelable(false);\n logoutProgressDialog.show();\n ParseUser.logOutInBackground(e -> {\n logoutProgressDialog.dismiss();\n if (e != null) { // Logout has failed\n Snackbar.make(contributionsGalleryRelativeLayout, getResources().getString(R.string.logout_failed), Snackbar.LENGTH_LONG).show();\n }\n else { // Logout has succeeded\n goLoginSignupActivity();\n finish();\n }\n });\n }",
"@Override\n public void logout() {\n if (SecurityContextHolder.getContext().getAuthentication() != null) {\n SecurityContextHolder.getContext().setAuthentication(null);\n }\n session.invalidate();\n }",
"private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }",
"public void logout()\r\n {\r\n loginForForm = \"\";\r\n passwordForForm = \"\";\r\n redirectSession(\"/logout\");\r\n }",
"private void logout() {\n LogoutTask mAuthTask = new LogoutTask();\n mAuthTask.execute((Void) null);\n }",
"public void logout(Principal user) {\n }",
"private void logout(){\n ParseUser.logOut();\n removeUserFromPrefs();\n Intent intent = LandingActivity.intent_factory(this);\n startActivity(intent);\n }",
"public static void logout(Context context){\n\t\t\tnew PerformLogoutTask().execute(context);\n\t\t\t\n\t\t\t\n\t\t}",
"public void logout() {\n loggedIn = \"\";\n FacesContext.getCurrentInstance().getExternalContext()\n .getSessionMap().put(\"loggedIn\", \"\");\n }",
"private void logout() {\n Utils.showConfirmationDialogCallBack(MainActivity.this, getString(R.string.logout_sure), this);\n }",
"public String logout()\n \t{\n \t\t_session.remove(GlobalConstants.USER_KEY);\n\t\treturn \"home\";\n \t}",
"public void logout() throws Exception {\n\n Log.info(\"Logging out the user\");\n sleep(2000);\n /*$(LoginOutRepo.uatAdmin).click();\n sleep(1000);\n $(LoginOutRepo.logout).click();\n Log.info(\"Logout successful\");*/\n moveToElement(By.cssSelector(\"img[alt='Profile Picture']\"));\n $(LoginOutRepo.logout).click();\n\n }",
"private void logout(){\n showLoadingDialog();\n TwitterController.getInstance().logout(logoutCallback);\n }",
"@Override\n public String logout() throws DocumentServiceException {\n AuthenticationToken token = store.getUserToken();\n if (token != null) {\n try {\n \ttry {\n AuthSubUtil.revokeToken(token.getToken(), AuthenticationKey.getAuthSubKey());\n \t} catch (Exception x) {\n \t x.printStackTrace();\n \t}\n AuthenticationToken.clearUserToken(token.getEmail());\n UserService userService = UserServiceFactory.getUserService();\n URI url = new URI(this.getThreadLocalRequest().getRequestURL().toString());\n return userService.createLogoutURL(\"http://\" + url.getAuthority() + LOGOUT_RETURN_RELATIVE_PATH);\n } catch (Exception e) {\n e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n }\n }\n return \"/\";\n }",
"public boolean logoutUser(Context context){\n\t\tDatabaseHandler db = new DatabaseHandler(context);\n\t\tdb.resetTables();\n\t\treturn true;\n\t}",
"public void logout() {\n // Mengambil method clear untuk menghapus data Shared Preference\n editor.clear();\n // Mengeksekusi perintah clear\n editor.commit();\n // Membuat intent untuk berpindah halaman\n Intent intent = new Intent(context, LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n }",
"void logout(HttpServletRequest request);",
"boolean checkLogout(User user, HttpServletRequest request, HttpSession session);",
"void logoutDone();",
"public void onLogout() {\n ParseUser.logOut();\n\n promptForLogin();\n }",
"public boolean logoutUser(Context context){\n DatabaseHandler db = new DatabaseHandler(context);\n db.resetTables();\n return true;\n }",
"public void logout(){\n logger.debug(\"logout from the application\");\n driver.findElement(oLogout).click();\n new WebDriverWait(driver,10).until(\n ExpectedConditions.titleIs(\"Sign-on: Mercury Tours\"));\n\n }",
"public void logout() {\n updateToken(\"\");\n startActivity(new Intent(GarageListActivity.this, LoginScreenActivity.class));\n updateToken(\"\");\n finish();\n }",
"public void doLogout() {\r\n\t\tdestroy();\r\n\r\n\t\t/* ++++++ Kills the Http session ++++++ */\r\n\t\t// HttpSession s = (HttpSession)\r\n\t\t// Sessions.getCurrent().getNativeSession();\r\n\t\t// s.invalidate();\r\n\t\t/* ++++++ Kills the zk session +++++ */\r\n\t\t// Sessions.getCurrent().invalidate();\r\n\t\tExecutions.sendRedirect(\"/j_spring_logout\");\r\n\r\n\t}",
"private void logoutHandler(RoutingContext context) {\n context.clearUser();\n context.session().destroy();\n context.response().setStatusCode(204).end();\n }",
"public void Logout()\n {\n isLoggedIn = false;\n connection.Disconnect(); \n connection = null;\n }",
"private void logout(HttpServletRequest request, HttpServletResponse response)\n throws SQLException, IOException, ServletException {\n\tHttpSession session = request.getSession(false);\n\t// session.setAttribute(\"user\", null);\n\tsession.removeAttribute(\"email\");\n\t response.sendRedirect(\"index.jsp\");\n\t}",
"public static void logout() {\n\t\tif (activeAccount != null) try {\n\t\t\t\n\t\t\tif (authClient != null)\n\t\t\t\tauthClient.logout();\n\t\t\tauthClient = null;\n\t\t\t\n\t\t\tactiveAccount = null;\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(DialogPanel.getTopWindow(), (\"An error occurred while logging out from the GoldenGATE Server at\\n\" + activeAccount.host + \":\" + activeAccount.port + \"\\n\" + ioe.getMessage()), \"Error on Logout\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}",
"public void signOut(){\n mAuth.signOut();\n }",
"public void logout(int sessionId);",
"public void logOut() {\r\n\t\tthis.modoAdmin = false;\r\n\t\tthis.usuarioConectado = null;\r\n\t}",
"public String logout() {\n HttpSession session = Util.getSession();\t//get the current session\n session.invalidate();\t//destroy the session\n return \"logout\";\n }",
"void logoutRequest() throws Exception;",
"public void logout() {\n\n $(logOutNavigator).click();\n driver = commonMethods.waitForElement(driver, logOffBtn);\n $(logOffBtn).click();\n $(loadingProgressIcon).should(disappear);\n }",
"public String logout() {\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tHttpSession session = (HttpSession) facesContext.getExternalContext().getSession(true);\n\t\tsession.invalidate();\n\t\treturn \"\";\n\t}",
"@Path(\"logout\")\n\t@GET\n\tpublic Response logout() {\n\t\tHttpSession session = request.getSession(false);\n\t\t\n\t\t// If there is no session, tell the user\n\t\tif(session == null) {\n\t\t\treturn Response.status(400).entity(\"Please login to logout!\").build();\n\t\t}\n\t\t\n\t\t// invalidate the session\n\t\tsession.invalidate();\n\t\t\n\t\t// Tell the user he is now logged out\n\t\treturn Response.status(200).entity(\"You are logged out!\").build();\n\t}",
"private void signOut() {\n //logout of google\n GoogleSignIn.getClient(this, GoogleSignInOptions.DEFAULT_SIGN_IN).signOut()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n\n //logout of facebook\n LoginManager.getInstance().logOut();\n\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n }",
"public void logOut() {\n sp.edit().clear().commit();\n }",
"@Override\n\tpublic String logout() {\n\t\treturn null;\n\t}",
"public void logOut() {\n\t\t//Inform the database that the user want to log out\n\t\tdc.logOutPlayer(activity);\n\t\t\n\t\t/*\n\t\t * Call is made to StartActivity, which surely is in the bottom of activity-stack. Add a flag to clear stack\n\t\t * and from StartActivity a call is made to the Login screen and StartActivity is finished. By doing this we\n\t\t * assure that Login screen is at the bottom of the activity-stack and a press on back button, while placed \n\t\t * on Login screen, will result in that the application is closed\n\t\t */\n\t\tIntent intent = new Intent(activity, StartActivity.class);\n\t\tintent.putExtra(\"finish\", true);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tactivity.startActivity(intent);\n\t\tactivity.finish();\n\t}"
] | [
"0.82982796",
"0.8287329",
"0.82693344",
"0.824096",
"0.8226061",
"0.8191024",
"0.8174871",
"0.8172554",
"0.81683594",
"0.8167171",
"0.8126277",
"0.81064427",
"0.80900574",
"0.8056857",
"0.7937407",
"0.7931575",
"0.7911411",
"0.79111385",
"0.7905421",
"0.78930295",
"0.78757423",
"0.786304",
"0.7848247",
"0.78369313",
"0.78146577",
"0.7790716",
"0.77484363",
"0.7745068",
"0.7745068",
"0.7741808",
"0.76780003",
"0.7674933",
"0.7669995",
"0.76591647",
"0.7650695",
"0.7643243",
"0.7614963",
"0.7601072",
"0.7565156",
"0.7549663",
"0.7541738",
"0.75378656",
"0.7536781",
"0.7532002",
"0.7529317",
"0.7529225",
"0.75273377",
"0.7486593",
"0.7474704",
"0.745846",
"0.74441683",
"0.7440978",
"0.743176",
"0.7422935",
"0.74005353",
"0.7396335",
"0.7389918",
"0.7370501",
"0.7354267",
"0.73514414",
"0.7350565",
"0.7344649",
"0.73396677",
"0.73368204",
"0.7326528",
"0.7318411",
"0.73156315",
"0.72871184",
"0.7276786",
"0.7274145",
"0.7264251",
"0.72604",
"0.7248801",
"0.72445095",
"0.7243762",
"0.7243518",
"0.7240454",
"0.7238536",
"0.7235985",
"0.72292846",
"0.7223034",
"0.722299",
"0.72195333",
"0.72171026",
"0.7205763",
"0.71936125",
"0.71928495",
"0.7191621",
"0.71871096",
"0.71843624",
"0.71808827",
"0.7171404",
"0.71632296",
"0.71473384",
"0.71448165",
"0.7135118",
"0.7128489",
"0.712817",
"0.7118916",
"0.71187407"
] | 0.713821 | 95 |
Se crea un uri con el url del RCV | @Override
public void onClick(View v) {
Uri uri = Uri.parse(url);
//Se crea un intent implicito para visualizar los links en un navegador
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
//Se inicia la actividad del navegador
activityt.startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public URI createUri(String url) {\n try {\n this.uri = new URI(url);\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n return uri;\n }",
"URI createURI();",
"String getUri( );",
"private URL createURL() {\n try {\n Log.d(\"URL\", \"create\");\n String urlString = \"http://cs262.cs.calvin.edu:8084/cs262dCleaningCrew/task/cjp27\";\n return new URL(urlString);\n } catch (Exception e) {\n Toast.makeText(this, getString(R.string.connection_error), Toast.LENGTH_SHORT).show();\n }\n\n return null;\n }",
"WebURL createURL()\n {\n String url = getDir().getURL().getString() + \"!/\" + _cmt._rev.getId().getName();\n return WebURL.getURL(url);\n }",
"String getUri();",
"URI getUri();",
"public String getUri();",
"URI uri();",
"abstract String getUri();",
"Uri mo1686a();",
"java.lang.String getUri();",
"java.lang.String getUri();",
"Uri getUrl();",
"String getURI();",
"String getURI();",
"String getURI();",
"public abstract String makeReplayURI(final String datespec, final String url);",
"private String composeUri(String mode, String botName, String kind,\n String fileName) throws URISyntaxException {\n String uri = \"https://\" + host;\n uri += sep(mode);\n uri += sep(appId);\n uri += sep(botName);\n uri += sep(kind);\n uri += sep(fileName);\n return uri;\n }",
"private String createURLWithPort(String uri) {\n\t\treturn HOST + port + uri;\n\t}",
"private URL createUrl(String movieId) {\n URL url = null;\n try {\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"api.themoviedb.org\")\n .appendPath(\"3\")\n .appendPath(\"movie\")\n .appendPath(movieId)\n .appendQueryParameter(\"api_key\", getString(R.string.moviedb_api_key));\n url = new URL(builder.build().toString());\n } catch (Exception exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }",
"String getBaseUri();",
"RaptureURI getBaseURI();",
"public abstract String getResUri();",
"private URL createURLaddUser() {\n try {\n String urlString;\n\n urlString = \"http://cs262.cs.calvin.edu:8081/fitness/users\";\n\n return new URL(urlString);\n\n } catch (Exception e) {\n Toast.makeText(this, \"Failed to make URL\", Toast.LENGTH_SHORT).show();\n }\n\n return null;\n }",
"public void uriParse() {\n uri = Uri.parse(getUrlVideo());\n }",
"public static Uri UriParse(String url) {\n\t\ttry {\n\t\t\tUrlMedia = url;\n\t\t\tFile path = null;\n\t\t\tFile cacheDir;\n\t\t\tString[] urlDir = url.split(\"/\");\n\t\t\tif (sdAvailableWrite()) {\n\t\t\t\tpath = Environment.getExternalStorageDirectory();\n\t\t\t\tcacheDir = new File(path + File.separator + \"miramusei\"\n\t\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t\t} else {\n\t\t\t\tpath = Environment.getDataDirectory();\n\t\t\t\tcacheDir = new File(path + File.separator + \"data\"\n\t\t\t\t\t\t+ File.separator + \"com.miramusei.museum\"\n\t\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t\t}\n\t\t\t// File cacheDir = new File(ruta+File.separator+ urlDir[8]);\n\t\t\tif (!cacheDir.exists()) {\n\t\t\t\tcacheDir.mkdirs();\n\n\t\t\t}\n\t\t\tcacheDirNameMedia = new File(cacheDir + File.separator\n\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\n\t\t\tif (!cacheDirNameMedia.exists() || cacheDirNameMedia.length() == 0) {\n\n\t\t\t\tThread downloadFile = new Thread() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsuper.run();\n\t\t\t\t\t\t\tcacheDirNameMedia.createNewFile();\n\n\t\t\t\t\t\t\tInputStream is = (InputStream) new URL(UrlMedia)\n\t\t\t\t\t\t\t\t\t.getContent();\n\t\t\t\t\t\t\t// Uri jose=Uri.parse(url);\n\t\t\t\t\t\t\tFileOutputStream fo = new FileOutputStream(\n\t\t\t\t\t\t\t\t\tcacheDirNameMedia);\n\t\t\t\t\t\t\t// Drawable d = Drawable.createFromStream(is,\n\t\t\t\t\t\t\t// \"src name\");\n\t\t\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\t\t\tint length;\n\t\t\t\t\t\t\twhile ((length = is.read(buffer)) > 0) {\n\t\t\t\t\t\t\t\tfo.write(buffer, 0, length);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfo.close();\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcacheDirNameMedia.deleteOnExit();\n\t\t\t\t\t\t\tSystem.out.println(\"Error cacheando imagen\"\n\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tdownloadFile.start();\n\t\t\t\treturn Uri.parse(url);\n\n\t\t\t} else {\n\t\t\t\treturn Uri.fromFile(cacheDirNameMedia);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"private Drawable creaImmagineDaUrl(String urlImmagine)\n {\n try\n {\n InputStream is = (InputStream) new URL(urlImmagine).getContent();\n Drawable d = Drawable.createFromStream(is, null);\n return d;\n }catch (Exception e) {\n System.out.println(\"Exc=\"+e);\n return null;\n }\n }",
"private static URL createURL(String urlString) {\n\n // Create an empty url\n URL url = null;\n\n try {\n // Try to make a url from urlString param\n url = new URL(urlString);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error creating URL: \" + e);\n }\n\n //Return the new url\n return url;\n }",
"String url();",
"FullUriTemplateString baseUri();",
"String makePlanCommunityUrl();",
"public Recurso(String ruta){\n\t\ttipo = ruta.contains(\"http://\")?IMAGEN:TEXTO;\n\t\tif(tipo.equals(IMAGEN)){\n\t\t\timgUrl = ruta;\n\t\t\tdescripcion = ruta;\n\t\t}\n\t\telse{\n\t\t\tdescripcion = ruta;\n\t\t\timgUrl=\"\";\n\t\t}\n\t\tnivel = 0;\n\t\turl = \"Recurso obtenido de servidor se perdio url en persistencia de datos\";\n\t}",
"private Uri computeUri(Context param1) {\n }",
"public String getUri()\r\n {\r\n return uri;\r\n }",
"java.lang.String getResourceUri();",
"private URI makeUri(String source) throws URISyntaxException {\n if (source == null)\n source = \"\";\n\n if ((source.length()>0)&&((source.substring(source.length() - 1)).equals(\"/\") ))\n source=source.substring(0, source.length() - 1);\n\n return new URI( source.toLowerCase() );\n }",
"public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }",
"public String getURL();",
"URL toURL() throws IOException;",
"public String getUri() {\n return uri;\n }",
"private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Problem building the URL \", e);\n }\n return url;\n }",
"URL getUrl();",
"HttpURLConnection mo120621a(Uri uri) throws IOException;",
"private static URL createURL(String requestedUrl) {\n URL url = null;\n try {\n url = new URL(requestedUrl);\n } catch (MalformedURLException e) {\n Log.e(TAG, \"createdUrl: Problem building URL\", e);\n }\n return url;\n }",
"public Uri getImageLink(String type){\r\n return Uri.parse(\"https://graph.facebook.com\" + getImage() + \"?type=\" + type);\r\n }",
"Object create(String uri) throws IOException, SAXException, ParserConfigurationException;",
"public URI getURI()\r\n/* 34: */ {\r\n/* 35:60 */ return this.uri;\r\n/* 36: */ }",
"public URI getUri(String iden) {\r\n\t\tURI rtn = null;\r\n\t\tString url = null;\r\n\t\tStringBuilder strRtn = new StringBuilder(uriBuilder);\r\n\t\tif(isUri(iden)) {\r\n\t\t\tSystem.out.println(\"isUri\");\r\n\t\t\treturn valueFactory.createURI(iden);\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\turl = URLEncoder.encode(iden,\"utf-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tstrRtn.append(url);\r\n\t\t\trtn = valueFactory.createURI(strRtn.toString());\r\n\t\t\treturn rtn;\r\n\t\t}\r\n\t}",
"public abstract String getURL();",
"public abstract String getRobotUri();",
"public abstract RestURL getURL();",
"@Override\r\n\tpublic String getUri() {\n\t\treturn uri;\r\n\t}",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"public static Uri createImageUri() {\n \t\tUri imageFileUri;\n \t\tString folder = Environment.getExternalStorageDirectory()\n \t\t\t\t.getAbsolutePath() + \"/tmp\";\n \t\tFile folderF = new File(folder);\n \t\tif (!folderF.exists()) {\n \t\t\tfolderF.mkdir();\n \t\t}\n \n \t\tString imageFilePath = folder + \"/\"\n \t\t\t\t+ String.valueOf(System.currentTimeMillis()) + \"jpg\";\n \t\tFile imageFile = new File(imageFilePath);\n \t\timageFileUri = Uri.fromFile(imageFile);\n \n \t\treturn imageFileUri;\n \t}",
"private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}",
"public static URL buildurl(String url1)\n {\n URL url = null;\n try\n {\n url = new URL(url1.toString());\n\n }\n catch(MalformedURLException e)\n {\n e.printStackTrace();\n }\n return url;\n }",
"private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error with creating URL \", e);\n }\n return url;\n }",
"private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error with creating URL \", e);\n }\n return url;\n }",
"private static URL buildFinalMovieDbURL(String urlString){\n Uri movieDbBuiltUri = Uri.parse(urlString).buildUpon()\n .appendQueryParameter(APIKEY_PARAM, BuildConfig.MOVIE_DB_API_KEY)\n .build();\n\n //Now creates an URL based on the created Uri\n URL finalMovieDbURL = null;\n\n try {\n finalMovieDbURL = new URL(movieDbBuiltUri.toString());\n } catch (MalformedURLException e) {\n Log.e(ERROR_TAG, e.getMessage());\n }\n\n return finalMovieDbURL;\n }",
"public String getURI() {\n/* 95 */ return this.uri;\n/* */ }",
"public Uri getImageFileUri()\n {\n imagePath = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"Tuxuri\");\n Log.d(tag, \"Find \" + imagePath.getAbsolutePath());\n\n\n if (! imagePath.exists())\n {\n if (! imagePath.mkdirs())\n {\n Log.d(\"CameraTestIntent\", \"failed to create directory\");\n return null;\n }else{\n Log.d(tag,\"create new Tux folder\");\n }\n }\n\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File image = new File(imagePath,\"TUX_\"+ timeStamp + \".jpg\");\n file = image;\n name = file.getName();\n path = imagePath;\n\n\n if(!image.exists())\n {\n try {\n image.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return Uri.fromFile(image);\n }",
"public static Uri createUri(Class<? extends Model> type, Long id) {\n final StringBuilder uri = new StringBuilder();\n uri.append(\"content://\");\n uri.append(sAuthority);\n uri.append(\"/\");\n uri.append(Cache.getTableName(type).toLowerCase());\n\n if (id != null) {\n uri.append(\"/\");\n uri.append(id.toString());\n }\n\n return Uri.parse(uri.toString());\n }",
"private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}",
"public String getUri() {\n return uri;\n }",
"public static URL buildUrl() {\n Uri builtUri = Uri.parse(CONTENT_JSON_URL).buildUpon()\n .build();\n\n URL url = null;\n try {\n url = new URL(builtUri.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n return url;\n }",
"public byte[] uri() {\n return uri;\n }",
"public URI getUri()\n {\n return uri;\n }",
"private String getURL(int rad) {\n \t\tLocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n \n \t\t// Define a listener that responds to location updates\n \t\tLocationListener locationListener = new LocationListener() {\n \t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t\t// Called when a new location is found by the network location provider.\n \t\t\t\tcurrentLocation = String.valueOf(location.getLatitude()) + \"+\" + String.valueOf(location.getLongitude());\n \t\t\t}\n \n \t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {}\n \n \t\t\tpublic void onProviderEnabled(String provider) {}\n \n \t\t\tpublic void onProviderDisabled(String provider) {}\n \t\t};\n \n \t\t// Register the listener with the Location Manager to receive location updates\n \t\tlocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n \n \t\tfinal String android_id = Secure.getString(getBaseContext().getContentResolver(),\n \t\t\t\tSecure.ANDROID_ID);\n \t\t//final String user = \"aaa\"; //idk how to deal with making users unique right now\n \t\tString url = \"http://18.238.2.68/cuisinestream/phonedata.cgi?user=\"+android_id+\"&location=\"+currentLocation+\"&radius=\"+rad;\n \t\treturn url;\n \t}",
"public URL makeUrl(String path) throws IOException {\n path = Val.chkStr(path);\n URL url = null;\n \n if ((_localFolder.length() > 0) && (_externalFolder.length() > 0) &&\n path.startsWith(_localFolder)) {\n path = _externalFolder+path.substring(_localFolder.length());\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = new URL(path); \n \n } else {\n //url = this.getClass().getClassLoader().getResource(path);\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = Thread.currentThread().getContextClassLoader().getResource(path);\n }\n if (url == null) {\n throw new IOException(\"Unable to create resource URL for path: \"+path);\n }\n return url;\n}",
"private static URL buildURL(List<String> args) throws MalformedURLException {\n\n\t\tfinal String IDList = args.stream().map(id -> id.toString() + \",\").reduce(\"\", String::concat);\n\n\t\treturn new URL(String.format(BASE_URL, IDList));\n\t}",
"public URI() {\n }",
"private String getBaseUri() {\n\t\treturn null;\n\t}",
"public static URL buildUrl(String sortOrder) {\r\n\r\n if (sortOrder.equals(\"HighestRated\")) {\r\n mMovieBaseUrl = MOVIEDB_URL + MOVIE_LOOKUP_TOP_RATED;\r\n } else {\r\n mMovieBaseUrl = MOVIEDB_URL + MOVIE_LOOKUP_POPLAR;\r\n }\r\n Uri builtUri = Uri.parse(mMovieBaseUrl).buildUpon()\r\n .appendQueryParameter(API_PARAM, API_KEY)\r\n .build();\r\n URL url = null;\r\n try {\r\n url = new URL(builtUri.toString());\r\n } catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n }\r\n Log.v(TAG, \"Built URI \" + url);\r\n\r\n return url;\r\n }",
"private URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }",
"private static URL buildURL(Calendar calendar) throws MalformedURLException {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tbuilder.append(\"http://gapi.ereality.ru/events/\");\r\n\t\tbuilder.append(trueFormat.format(calendar.getTime()));\r\n\t\tbuilder.append(\".txt\");\r\n\t\treturn new URL(builder.toString());\r\n\t}",
"Builder addUrl(URL value);",
"Builder addUrl(String value);",
"java.lang.String getPictureUri();",
"private URI getUri(final MMIContext context, final PrepareRequest request)\n throws URISyntaxException, MMIMessageException {\n final ContentURLType contentUrlType = request.getContentURL();\n if (contentUrlType != null) {\n final String href = contentUrlType.getHref();\n if (href != null) {\n return new URI(href);\n }\n }\n final AnyComplexType content = request.getContent();\n if (content != null) {\n return createTemporaryVoiceXmlDocumentUri(context, content);\n }\n return context.getContentURL();\n }",
"private static URL generateUrl(String requestedUrlString) {\n URL url = null;\n\n try {\n url = new URL(requestedUrlString);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error creating a URL object : generateURL() block\", e);\n }\n return url;\n }",
"URL toURL(FileReference fileReferece);",
"public void setUri(URI uri)\n {\n this.uri = uri;\n }",
"public static Uri getRandomUri(String type) {\n String s = \"\";\n try{\n if(type.equals(\"dumb\")) {\n s = new String(getRandomData(256, false));\n //\tSystem.err.println(\"******************Uri: \"+s+\"\\n\");\n return Uri.parse(s);\n } else if(type.equals(\"good\")) {\n s = getTypeString(URI_TYPES);\n s.concat(new String(getRandomData(1024, false)));\n return Uri.parse(s);\n } else{\n return Uri.parse(type.concat(new String(getRandomData(1024, false))));\n }\n\n }\n catch(Exception ex) {\n System.err.println(\"******************An Uri exception occurred.\\n\"+s+\"\\n****************\\n\");\n }\n return null;\n }",
"public void testRemoteFileDescGetUrl() {\n\t\tSet urns = new HashSet();\n\t\turns.add(HugeTestUtils.URNS[0]);\n\t\tRemoteFileDesc rfd =\n\t\t\tnew RemoteFileDesc(\"www.test.org\", 3000, 10, \"test\", 10, TEST_GUID,\n\t\t\t\t\t\t\t 10, true, 3, true, null, urns, \n false, false,\"\",0, null, -1);\n\t\tURL rfdUrl = rfd.getUrl();\n\t\tString urlString = rfdUrl.toString();\n\t\tString host = rfd.getHost();\n\t\tString colonPort = \":\"+rfd.getPort();\n\t\tassertTrue(\"unexpected beginning of url\", \n\t\t\t\t urlString.startsWith(\"http://\"+host+colonPort));\n\t\tassertEquals(\"unexpected double slash\",\n\t\t urlString.indexOf(colonPort+\"//\"), -1);\n\t\tassertNotEquals(\"unexpected double slash\",\n\t\t -1, urlString.indexOf(\":3000/\"));\n\t}",
"private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }",
"public String uri() {\n return this.uri;\n }",
"private Uri getImageUri(String path) {\n return Uri.fromFile(new File(path));\n }",
"Call createVideoCall(String uri)\n throws OperationFailedException, ParseException;",
"public String getUri() {\r\n\t\treturn uri;\r\n\t}",
"public static String getURI(){\n\t\treturn uri;\n\t}",
"Uri getAvatarUrl();",
"@NotNull URI getURI();",
"private String generatePhotoUrl(Photo photo) {\n return String.format(\"https://farm%1$s.staticflickr.com/%2$s/%3$s_%4$s.jpg\", photo.getFarm(),\n photo.getServer(), photo.getId(), photo.getSecret());\n }",
"@Override\n\tpublic String buildURL(String string) {\n\t\treturn null;\n\t}",
"@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }",
"private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }"
] | [
"0.706883",
"0.7055174",
"0.68873787",
"0.6876825",
"0.67206395",
"0.6702008",
"0.66357124",
"0.64662856",
"0.64484245",
"0.6447849",
"0.6422606",
"0.6410103",
"0.6410103",
"0.6289964",
"0.62861836",
"0.62861836",
"0.62861836",
"0.6256078",
"0.61761135",
"0.60392773",
"0.60311407",
"0.60251695",
"0.59792733",
"0.5970334",
"0.59602267",
"0.58770365",
"0.58168435",
"0.5757561",
"0.5756925",
"0.5754671",
"0.5747736",
"0.57153773",
"0.5698334",
"0.5693263",
"0.56921905",
"0.5691956",
"0.5682994",
"0.5679398",
"0.5653293",
"0.5650657",
"0.5635462",
"0.5631484",
"0.5618068",
"0.56156784",
"0.5595063",
"0.5566493",
"0.55581367",
"0.55494875",
"0.5549079",
"0.5545391",
"0.5534184",
"0.55339307",
"0.5530832",
"0.5530797",
"0.5530797",
"0.5530797",
"0.5530797",
"0.5530797",
"0.5526087",
"0.55182093",
"0.5514276",
"0.5513648",
"0.5513648",
"0.5507498",
"0.55070525",
"0.5505099",
"0.54987186",
"0.5496908",
"0.54868686",
"0.54809666",
"0.5469227",
"0.5465192",
"0.544788",
"0.54346585",
"0.5433983",
"0.5429826",
"0.54220515",
"0.5421181",
"0.5401344",
"0.5395807",
"0.5390644",
"0.53877914",
"0.5368254",
"0.5363264",
"0.53629184",
"0.5358248",
"0.5354563",
"0.53524923",
"0.5344919",
"0.53335065",
"0.5330375",
"0.53286016",
"0.53249645",
"0.5322077",
"0.5311699",
"0.530228",
"0.5294884",
"0.52888334",
"0.5287331",
"0.52796197",
"0.5271822"
] | 0.0 | -1 |
Create a fox. A fox can be created as a new born (age zero and not hungry) or with random age. This will set the age and sex to be random | public Fox() {
super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);
constructor();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fox(int age) {\n super(age, randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Fox(Sex sex) {\n super(randomAge(MAX_AGE), sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Fox(Sex sex, int age) {\n super(age, sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Tiger(boolean randomAge) {\n super(randomAge, TIGER.getMaxAge(), rand,\n new LinkedHashMap<Class, Integer>(){{\n put(RABBIT.getSpecies(), 4);\n put(RABBIT.getSpecies(), 8);\n }});\n }",
"public Female( int age ) {\n\t\tcurrent_age = age;\n\t}",
"public Person getRandomPerson() {\n //Randomize all characteristics of a person\n int age = (int) (rd.nextDouble() * 100); //within 100y old\n int gd = (int) Math.round(rd.nextDouble() * (Person.Gender.values().length - 1));\n int bt = (int) Math.round(rd.nextDouble() * (Person.BodyType.values().length - 1));\n int pf = (int) Math.round(rd.nextDouble() * (Person.Profession.values().length - 1));\n boolean isPreg = rd.nextBoolean();\n\n //Construct a person with random characteristic\n //Person(int age, Profession profession, Gender gender, BodyType bodytype, boolean isPregnant)\n P = new Person(age, Person.Profession.values()[pf], Person.Gender.values()[gd], Person.BodyType.values()[bt], isPreg);\n return P;\n }",
"public Animal(boolean randomAge, Field field, Location location, int breeding_age, int max_age, double breeding_probability, int max_litter_size)\n {\n alive = true;\n age = 0;\n if(randomAge) {\n age = rand.nextInt(max_age);\n }\n this.field = field;\n setLocation(location);\n this.breeding_age = breeding_age;\n this.max_age = max_age;\n this.breeding_probability = breeding_probability;\n this.max_litter_size = max_litter_size;\n gender = Math.random() < 0.5;\n }",
"public Fish(String name, String gender){\n this.name = name;\n this.gender = gender;\n this.value = 10;\n this.eats = whatItEats(new fishFood());\n this.portionSize = 20;\n this.minimumOffspring = 1;\n this.maximumOffspring = 12;\n this.maxAge = 4;\n this.vetCost = 2;\n }",
"public MockFacebookUser createRandom() {\n\n\t\tthis.facebookUser = new User(\n\t\t\t\tcreateNewRandomId(),\n\t\t\t\tTestUtils.randomGaussNumberString(),\n\t\t\t\tTestUtils.randomGaussNumberString(),\n\t\t\t\tTestUtils.randomGaussNumberString(),\n\t\t\t\tGENDER_FOR_TEST,\n\t\t\t\tLocale.getDefault()\n\t\t);\n\n\t\tString MM = TestUtils.randomNumberString(1, 12);\n\t\tString DD = TestUtils.randomNumberString(1, 26);\n\t\tString YYYY = TestUtils.randomNumberString(1990, 2000);\n\n\t\ttry {\n\t\t\tField birthDayField = User.class.getDeclaredField(\"birthday\");\n\t\t\tbirthDayField.setAccessible(true);\n\t\t\tbirthDayField.set(facebookUser, MM + \"/\" + DD + \"/\" +YYYY);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn this;\n\t}",
"private Persons createFather(Persons child, String spouse)\n {\n Persons dad = new Persons();\n dad.setPersonFirstName(nameGenerator.generateMaleName());\n dad.setPersonGender(\"m\");\n dad.setPersonSpouseID(spouse);\n dad.setDescendantID(userName);\n\n if (child.getPersonGender().equals(\"m\")) {\n dad.setPersonLastName(child.getPersonLastName());\n }\n else {\n dad.setPersonLastName(nameGenerator.generateLastName());\n }\n\n return dad;\n }",
"@Test\n public void TestCreateDog() {\n String expectedName = \"Tyro\";\n Date expectedBirthDate = new Date();\n\n Dog newDog = AnimalFactory.createDog(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newDog.getName());\n Assert.assertEquals(expectedBirthDate, newDog.getBirthDate());\n }",
"public Animal()\n\t{\t\n\t\tgender = rng.nextBoolean();\n\t\tstrength = rng.nextFloat() * 100;\n\t}",
"public Animal(int age){\n this.age = age;\n System.out.println(\"An animal has been created!\");\n }",
"public Person(String firstName, String lastName) {\r\n name = new Name(firstName, lastName); \r\n id = (int )(Math.random() * 200 + 100);; \r\n }",
"@Test\n public void TestCreateCat() {\n String expectedName = \"Milo\";\n Date expectedBirthDate = new Date();\n\n Cat newCat = AnimalFactory.createCat(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newCat.getName());\n Assert.assertEquals(expectedBirthDate, newCat.getBirthDate());\n }",
"public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }",
"public Food()\n {\n x = (int) Math.floor(Math.random() * RANGEX)*20;\n y = (int) Math.floor(Math.random() * RANGEY)*20;\n isEaten = false;\n }",
"private void lifeGenerator(Persons mother, Persons father, int currYear)\n {\n eventGenerator.createBirth(father, currYear);\n eventGenerator.createBirth(mother, currYear);\n eventGenerator.createMarriage(father, mother, currYear);\n\n int lifeWheel = random.nextInt(4);\n\n if (currYear < 1920){\n eventGenerator.createDeath(father, currYear);\n eventGenerator.createDeath(mother, currYear);\n }\n else if (lifeWheel == 0){\n eventGenerator.createDeath(father, currYear);\n eventGenerator.createRandomEvent(mother, currYear);\n }\n else if (lifeWheel == 1){\n eventGenerator.createDeath(mother, currYear);\n eventGenerator.createRandomEvent(father, currYear);\n }\n\n if (lifeWheel == 2){\n eventGenerator.createRandomEvent(father, currYear);\n }\n else if (lifeWheel == 3){\n eventGenerator.createRandomEvent(mother, currYear);\n }\n }",
"public Sim.Sex chooseSex() {\n if(RND.nextInt() > 0.5) {\n return Sim.Sex.M;\n } else {\n return Sim.Sex.F;\n }\n }",
"Person createPerson();",
"public static Fish makeRandomFish(FishType type, int frameWidth, int frameHeight){\n\t\t// creates a random direction\n\t\tRandom r = new Random();\n\t\tDirection dir = Direction.values()[2 + r.nextInt(Direction.values().length -2)]; \n\t\t\n\t\t// creates and returns new fish based off of random direction\n\t\treturn new Fish(type, dir, frameWidth, frameHeight);\t\n\t}",
"@Override\n\tpublic void setAge () {\n\t\t// defining the random range for age between 1 up to 50\n\t\tint age = 1 + (int)(Math.random()*(3));\n\t\tthis.age = age;\n\t}",
"Girl(String n,String p,String i,String a,String b,String t,String pr) {\n \n name = n;\n pairedto = p;\n intelligence = Integer.parseInt(i);\n attractiveness = Integer.parseInt(a);\n mBudget = Integer.parseInt(b); \n type = t;\n pref = pr;\n \n }",
"public void create(Person p) {\n\t\t\n\t}",
"@Override\n public Animal newChild() {\n return new Fox(0);\n }",
"public void decideGender()\n {\n String gender = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 52)\n {\n gender = \"Female\";\n }//ends the if\n else\n {\n gender = \"Male\";\n }//ends the else\n \n setGender(gender);\n }",
"public Person(String inName, int inAge, Gender inGender)\n {\n name = inName;\n age = inAge;\n gender = inGender;\n\n Calendar c = Calendar.getInstance();\n c.set(Calendar.YEAR, c.get(Calendar.YEAR) - age);\n birthdate = c.getTime();\n }",
"public Guppy(String newGenus, String newSpecies, int newAgeInWeeks, boolean newIsFemale, int newGenerationNumber,\n double newHealthCoefficient) {\n numberOfGuppiesBorn++;\n\n if (newGenus == null || newGenus.trim().isEmpty()) {\n this.genus = DEFAULT_GENUS;\n } else {\n this.genus = newGenus.trim().substring(0, 1).toUpperCase() + newGenus.trim().substring(1).toLowerCase();\n }\n\n if (newSpecies == null || newSpecies.trim().isEmpty()) {\n this.species = DEFAULT_SPECIES;\n } else {\n this.species = newSpecies.trim().toLowerCase();\n }\n\n if (newHealthCoefficient < MINIMUM_HEALTH_COEFFICIENT) {\n this.healthCoefficient = MINIMUM_HEALTH_COEFFICIENT;\n } else {\n this.healthCoefficient = Math.min(newHealthCoefficient, MAXIMUM_HEALTH_COEFFICIENT);\n }\n\n this.ageInWeeks = Math.max(newAgeInWeeks, 0);\n this.isFemale = newIsFemale;\n this.generationNumber = newGenerationNumber < 0 ? 1 : newGenerationNumber;\n this.isAlive = true;\n this.identificationNumber = numberOfGuppiesBorn;\n this.randomNumberGenerator = new Random();\n }",
"public int getRandomBreed() {\n Random r = new Random();\n// displayToast(Integer.toString(getRandomBreed())); // not needed. generates another random number\n return r.nextInt(6);\n }",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public Dog(String Breed, String PrimaryColor, String Size, String name, int age){\r\n // setting the parent animal name\r\n super(name,age);\r\n // setting the parent animal age\r\n // System.out.println(\"Setting Breed...\");\r\n this.Breed = Breed ;\r\n // System.out.println(\"Setting PrimaryColor...\");\r\n this.PrimaryColor = PrimaryColor;\r\n //System.out.println(\"Setting Size...\");\r\n this.Size = Size;\r\n\r\n\r\n\r\n }",
"public CreateUser(int age, String name){ // constructor\n userAge = age;\n userName = name;\n }",
"@Override\n\tpublic Person createPerson(String id, String slug, String firstName,\n\t\t\tString lastName, String photoId, Gender gender) {\n\t\tfinal Person person = createPerson();\n\t\tperson.setId(id);\n\t\tperson.setSlug(slug);\n\t\tperson.setFirstName(firstName);\n\t\tperson.setLastName(lastName);\n\t\tperson.setName(firstName + \" \" + lastName);\n\t\tperson.setPhotoId(photoId);\n\t\tperson.setGender(gender);\n\t\treturn person;\n\t}",
"public Staff(String lastName, String firstName, String idNum, char sex, Calendar birthDate, double hourlyRate)\n\t{\n\t\tsuper(lastName, firstName, idNum, sex, birthDate);\n\t\tthis.hourlyRate = hourlyRate;\n\t}",
"public Olympian(String name, Sex sex, int age) {\n this.name = name;\n this.sex = sex;\n this.age = age;\n }",
"public Person(String userId, String firstName, String lastName, Gender gender, String spouseId, String fatherId, String motherId) {\n Id = UUID.randomUUID().toString();\n AssociatedUserName = userId;\n FirstName = firstName;\n LastName = lastName;\n Gender = gender;\n SpouseId = spouseId;\n FatherId = fatherId;\n MotherId = motherId;\n }",
"public BabyName(String n, boolean g, int count, int yr)\n {\n name = n;\n gender = g;\n numsBaby = count;\n year = yr;\n }",
"public Lemur(){\r\n //Call to super class\r\n super();\r\n //Set variables\r\n location = \"Madagascar\";\r\n classification = \"Prosimians\";\r\n coat = \"Fur\";\r\n dominantRole = \"Female\";\r\n grooming = \"Use their teeth as a comb\";\r\n age = rand.nextInt((20-1)+1)+1;\r\n weight = Math.random()*((7-1)+1)+1;\r\n }",
"public Animal getRandomAnimal() {\n //Randomize all characteristics of an animal\n int spc = (int) Math.round(rd.nextDouble() * (Animal.enumSpecies.values().length - 1));\n boolean isPet = rd.nextBoolean();\n\n //Construct an animal with random characteristic\n //Animal(int age, Gender g, BodyType b, enumSpecies espec, boolean ispet)\n A = new Animal(Animal.enumSpecies.values()[spc], isPet);\n return A;\n }",
"public void setSex(Sex sex) {\n this.sex = sex;\n }",
"@Override\n\tpublic void create(String name, Integer age) {\n\t\tuserDAO.create(name, age);\n\t}",
"public Person createPerson(String fullName, int age, String phone, String email, String favMovie, String city, String street, Profession profession, HashMap<String, Double> weightTable, ArrayList<String> hobbies) {\n startMetrics();\n String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();\n\n Person p = new Person(fullName,age,phone,email,favMovie,city,street,profession,weightTable,hobbies);\n p.setFullName(fullName);\n p.setAge(age);\n p.setPhone(phone);\n p.setEmail(email);\n p.setFavouriteMovie(favMovie);\n p.setCityName(city);\n p.setStreetName(street);\n p.setProfession(profession);\n p.setWeightTable(weightTable);\n p.setHobbies(hobbies);\n\n System.out.println(p.toString());\n\n printMethodName(methodName);\n stopMetrics();\n gatherPerformance(methodName);\n return p;\n }",
"public void create(String userName, String password, String userFullname,\r\n\t\t\tString userSex, int userTel, String role);",
"@Test\n public void createDogTest() {\n String expected = \"orbit\";\n\n Dog testDog = AnimalFactory.createDog(expected, new Date(0001));\n String actual = testDog.getName();\n\n Assert.assertEquals(expected,actual);\n\n }",
"@Override\r\n\tpublic void create(Person p) \r\n\t{\n\t\t\r\n\t}",
"public Person(String associatedUserName, String firstName, String lastName, Gender gender) {\n Id = UUID.randomUUID().toString();\n AssociatedUserName = associatedUserName;\n FirstName = firstName;\n LastName = lastName;\n Gender = gender;\n }",
"public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }",
"public Animal(int theAge) {\n\t\t// TODO Auto-generated constructor stub\n\t\tage = theAge;\n\t}",
"public Person createPerson(Person p);",
"public void setFemale(int value) {\n this.female = value;\n }",
"Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }",
"public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}",
"public Dice() {\n this.random = new Random();\n this.faces = 6;\n }",
"public Fish(String species, String desc)\n {\n super(species, desc);\n toy = \"Jesus net\";\n }",
"public ArrayList<Fish> generateGuppies() {\n ArrayList<Fish> generatedFish = new ArrayList<Fish>();\n\n final double femaleProbability = 0.5;\n\n Random generator = new Random();\n\n int ageInWeeks;\n double healthCoefficient;\n double femaleRoll;\n for (int i = 1; i <= numberOfGuppies; i++) {\n ageInWeeks = generator.nextInt(maxAge - minAge) + minAge;\n healthCoefficient = generator.nextDouble()\n * (maxHealthCoefficient - minHealthCoefficient)\n + minHealthCoefficient;\n femaleRoll = generator.nextDouble();\n\n generatedFish.add(new Guppy(\"Poecilia\", \"reticulata\",\n ageInWeeks, femaleRoll < femaleProbability, 0,\n healthCoefficient));\n }\n\n return generatedFish;\n }",
"@Test\r\n\tpublic void testCreateRandomCustomer() {\r\n\r\n\t\tint NO_FLOORS = 25;\r\n\t\t\r\n\t\tCustomer c = custFact.createRandomCustomer(NO_FLOORS);\r\n\t\t\r\n\t\tassertNotNull(c);\r\n\t\t\r\n\t}",
"public Critter1() {\r\n\t\tnumberSpawned = 0;\r\n\t\twhile (fearfullness < 50) {//at minimum fearfullness is 50%\r\n\t\t\tfearfullness = getRandomInt(100);\r\n\t\t}\r\n\t}",
"public Penguin(boolean female) {\n super(female);\n daysRemaining = 12;\n }",
"private static Bat createBat(){\n try {\n UtilityMethods.print(\"Creating Big bat for you...!\"); \n BatGenerator batGenerator = new BatGenerator();\n BatBuilder bigBatBuilder = new BigBatBuilder();\n batGenerator.setBatBuilder(bigBatBuilder);\n batGenerator.constructBat(\n \"Bat\", \n \"Male\",\n 25,\n \"Scavenger\"\n );\n Bat bigBat = bigBatBuilder.getBat();\n UtilityMethods.print(\"\\n\"); \n bigBat.eat();\n UtilityMethods.print(\"\\n\"); \n bigBat.speak();\n UtilityMethods.print(\"\\n\"); \n bigBat.walk();\n UtilityMethods.print(\"\\n\"); \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }",
"public void getNewPentomino()\t{\n\t\tRan = (int) (Math.random() * Pentominos.length);\n\t\tPentominoName = Pentominos[Ran];\n\t\tSetShape(Ran);\n\t\t\n\t}",
"public void setSex(Boolean sex) {\r\n this.sex = sex;\r\n }",
"public Vegetarian(boolean female) {\n super(female);\n }",
"private int randomAge() {\n \tint low = 18;\n \tint high = 100;\n \tint offset = high - low;\n \tRandom r = new Random();\n \treturn r.nextInt(offset) + low;\n \t\n }",
"private void fuck(int x, int y) {\n\t\tFish son = new Fish(x, y, this.environment, this.appConfig, this.scheduler);\n\t\tson.color = Color.YELLOW; // yellow when fish is a newborn\n\t\tthis.environment.addAgent(son, x, y);\n\t\tthis.scheduler.birth(son);\n\t\tthis.breedTime = this.appConfig.getFishBreedTime(); // reset breed time\n\t}",
"public Student(String personName, String personID, boolean sex, Date birthday) {\r\n\t\tsuper(personName, personID, sex, birthday);\r\n\t}",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"@Test\n public void testSetSex() {\n System.out.println(\"setSex\");\n int sex = 0;\n Manager instance = new Manager();\n instance.setSex(sex);\n \n fail(\"The test case is a prototype.\");\n }",
"public abstract Fruit generateFruit(int size, FruitType fruitType);",
"public Dog(Integer age, String name) {\n setAge(age);\n setName(name);\n }",
"public void setSex(String sex)\n {\n this.sex = sex;\n }",
"public void setSex(String sex);",
"public void setSex(String sex) {\n this.sex = sex;\n }",
"public void createUfo() {\n if (ufos.size() > 0) return;\n\n int random10 = (int) (Math.random() * 10);\n if (random10 == 0) {\n double x = Math.random() * width;\n double y = Math.random() * height / 2;\n ufos.add(new Ufo(x, y));\n }\n }",
"public void setSex(Boolean sex);",
"public Patient newPatient(String name, int dob) {\n\n\t\tint thisYear = 2016;\n\t\tint ageLimit = 130;\n\n\t\tif (((thisYear - dob) > ageLimit) || (dob > thisYear)) {\n\t\t\tSystem.out.println(\"The age is not valid\");\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tage = thisYear - dob;\n\t\tid = size;\n\t\tsize++;\n\t\tPatient x = new Patient(size, name, age);\n\t\tSystem.out.println(\"The paitent is called \" + x.name + \" and ID is : \" + x.id + \" and age is: \" + x.age);\n\t\tpatients.add(x);\n\t\treturn x;\n\t}",
"public User(String name, int age, int userid, char gender, boolean isActive) {\n\t\t\n\t\tthis.name = name;\n\t\tthis.age = age;\n\t\tthis.userid = userid;\n\t\tthis.gender = gender;\n\t\tthis.isActive = isActive;\n\t}",
"public STFBehaviour(Faction faction)\n\t{\n\t\tfFaction = faction;\n fRandom = new Random();\n\t}",
"public EntityCroco spawnBabyAnimal(EntityAgeable par1EntityAgeable)\n {\n return new EntityCroco(this.worldObj);\n }",
"private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }",
"public interface PersonFactory {\n\n public Boy getBoy();\n\n public Gril getGril();\n\n}",
"public Person()\n\t{\n\t\tthis.age = -1;\n\t\tthis.name = \"Unknown\";\n\t}",
"public Fire(float x, float y, Random randGen) {\r\n\t\t//Draws a fire object at the position set in level\r\n\t\tgraphic = new Graphic(\"FIRE\");\r\n\t\tgraphic.setPosition(x, y);\r\n\t\tfireballCountdown = randGen.nextInt(3001)+3000;\r\n\t\t\r\n\t\t\r\n\t}",
"public static User createPerson() throws ParserConfigurationException, SAXException, IOException {\n User[] users = XMLReader.parsePersonXML();\n User user = users[0];\n calories = user.getCalories();\n diet = user.getDiet();\n quantity = user.getQuantityOfPeople();\n transport = user.getTransport();\n return user;\n }",
"public static void createArmy() {\n Unit unitOne = new Unit(\"Unit One\");\n Unit unitTwo = new Unit(\"Unit Two\");\n Unit unitThree = new Unit(\"Unit Three\");\n Unit unitFour = new Unit(\"Unit Four\");\n Unit unitFive = new Unit(\"Unit Five\");\n\n Knight knightOne = new Knight(\"Knight One\");\n Knight knightTwo = new Knight(\"Knight Two\");\n Knight knightThree = new Knight(\"Knight Three\");\n\n General general = new General(\"General\");\n Doctor doctor = new Doctor(\"Doctor\");\n }",
"public Nurse()\r\n {\r\n firstName = \"\";\r\n familyName = \"\";\r\n ID = IDCreator;\r\n\t\t\tIDCreator++;\r\n }",
"@Override\r\n public Food createFood(List<Coordinate> obstacles) {\r\n Random random = new Random();\r\n double num = random.nextDouble();\r\n\r\n if (num <= MushroomPowerUp.rarity) {\r\n return new MushroomPowerUp(randomCoordinates(obstacles));\r\n }\r\n if (num <= DoubleScorePowerUp.rarity + MushroomPowerUp.rarity) {\r\n return new DoubleScorePowerUp(randomCoordinates(obstacles));\r\n }\r\n return new AppleFactory().createFood();\r\n }",
"public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}",
"public Animal(Color color, int age) {\r\n\t\tthis.color = color;\r\n\t\tif (age >= 0) {\r\n\t\t\tthis.age = age;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Animal age must not be less than 0\");\r\n\t\t}\r\n\t}",
"public void addPerson(String name, String lastName, char gender, int height, String nationality,\n\t\t\tLocalDate birthday) {\n\t\t\n\t\tString code = \"\";\n\t\tint numberDigits = (currentCode+\"\").length();\n\t\t\n\t\tfor(int i=numberDigits; i<DIGITS_CODE;i++) {\n\t\t\tcode +=\"0\";\n\t\t}\n\t\tcode += numberDigits; \n\t\tcurrentCode++;\n\t\tPerson newP = new Person(code, name, lastName, gender, height, nationality, birthday);\n\t\t\n\t\ttreeName.insertE(name+code, newP);\n\t\ttreeLastname.insertE(lastName+code, newP);\n\t\ttreeFullName.insertE(name+lastName+code, newP);\n\t\ttreeCode.insertE(code, newP);\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic void create(Person person) {\n\r\n\t}",
"private Patient setPatientDOB(Date date, Patient patient){\n\t\tint year=date.getYear()+1900;\n\t\tint age=patient.getAge();\n\t\tif(age>60){\t//If patient age above 60 years then randomize the year also\n\t\t\tyear=randBetween(1990,2010);\n\t\t}\n\t\tint dayOfMonth = randBetween(1, 31);\n\t\tint month = randBetween(0, 11);\n\t\tDate d = new Date(year-1900, month, dayOfMonth); //Random date\n\t\tpatient.setBirthdate(d);\n\t\treturn patient;\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }",
"public void setSex(Integer sex) {\r\n this.sex = sex;\r\n }",
"@Override\r\n public boolean create(Person person) {\n return false;\r\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }"
] | [
"0.7377048",
"0.7341448",
"0.7173832",
"0.6398767",
"0.6334288",
"0.6197815",
"0.6042168",
"0.60164315",
"0.5999834",
"0.591271",
"0.58560073",
"0.5829912",
"0.5825685",
"0.5818239",
"0.5776626",
"0.57740724",
"0.5755054",
"0.5745331",
"0.57183844",
"0.56914103",
"0.5691384",
"0.56448287",
"0.5619242",
"0.56138766",
"0.5609212",
"0.5545334",
"0.55280274",
"0.5518813",
"0.54784596",
"0.54782695",
"0.54713905",
"0.54441214",
"0.5441304",
"0.5419373",
"0.5413278",
"0.5411126",
"0.54032046",
"0.5401694",
"0.5392034",
"0.5387358",
"0.5381214",
"0.5366968",
"0.5364333",
"0.5363076",
"0.5359996",
"0.5341755",
"0.534017",
"0.53309304",
"0.53294593",
"0.5326147",
"0.5322181",
"0.532053",
"0.53080004",
"0.53015906",
"0.52991873",
"0.5288989",
"0.52869123",
"0.5284995",
"0.52817535",
"0.52776635",
"0.526903",
"0.52656054",
"0.5261857",
"0.525747",
"0.5256482",
"0.524937",
"0.52419966",
"0.5237042",
"0.52317584",
"0.52242666",
"0.522098",
"0.52178997",
"0.52101696",
"0.5206153",
"0.5203203",
"0.5202972",
"0.5200582",
"0.51934296",
"0.51916564",
"0.51812947",
"0.51715136",
"0.51710427",
"0.5169178",
"0.5167181",
"0.51624024",
"0.51619184",
"0.5159797",
"0.5158503",
"0.5156208",
"0.5155724",
"0.51516366",
"0.51459223",
"0.51459223",
"0.51413023",
"0.5135541",
"0.51235145",
"0.5122732",
"0.5122732",
"0.5122732",
"0.5122732"
] | 0.73612887 | 1 |
This will set the sex to be random | public Fox(int age) {
super(age, randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);
constructor();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void decideGender()\n {\n String gender = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 52)\n {\n gender = \"Female\";\n }//ends the if\n else\n {\n gender = \"Male\";\n }//ends the else\n \n setGender(gender);\n }",
"public Sim.Sex chooseSex() {\n if(RND.nextInt() > 0.5) {\n return Sim.Sex.M;\n } else {\n return Sim.Sex.F;\n }\n }",
"public void setSex(String sex);",
"public void setSex(String sex)\n {\n this.sex = sex;\n }",
"public void setSex(String sex) {\n this.sex = sex;\n }",
"public void setSex(Sex sex) {\n this.sex = sex;\n }",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(Boolean sex) {\r\n this.sex = sex;\r\n }",
"public void setSex(Integer sex) {\r\n this.sex = sex;\r\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setMale(int value) {\n this.male = value;\n }",
"public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}",
"public void setSex(Byte sex) {\n this.sex = sex;\n }",
"public void SetRandom(boolean random);",
"public void setSex(java.lang.String param) {\r\n localSexTracker = param != null;\r\n\r\n this.localSex = param;\r\n }",
"public void setSex(Short sex) {\n this.sex = sex;\n }",
"public void setSex(Boolean sex);",
"public void setDamage() {\n\t\tRandom rand = new Random();\n\t\tint damage = rand.nextInt(getMaxDamage()) + 1;\n\t\tthis.damage = damage;\n\t}",
"public void setRandomShape()\n\t{\n\t\tvar rand = new Random();\n\t\tint x = Math.abs(rand.nextInt())%7 + 1;\n\t\t\n\t\tTetromino[] values = Tetromino.values();\n\t\tsetShape (values[x]);\n\t}",
"public void setRandom(boolean random){\n this.random = random;\n }",
"public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex == null ? null : sex.trim();\n\t}",
"private void random() {\n\n\t}",
"void setRandomize(Boolean setting);",
"public abstract void randomize();",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setUserSex(String userSex) {\n this.userSex = userSex;\n }",
"public void setaSex(Integer aSex) {\n this.aSex = aSex;\n }",
"public Fox(Sex sex) {\n super(randomAge(MAX_AGE), sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public void setSex(String sex) {\r\n this.sex = sex == null ? null : sex.trim();\r\n }",
"public void setGender(char gender) { this.gender = gender; }",
"@Override\n\tpublic void setSex(String sex) throws RemoteException {\n\t\tthis.sex = sex;\n\t}",
"public void setPatientSex(String patientSex){\n\t\tthis.patientSex = patientSex;\n\t}",
"public void setSocialDeterminants(Person person) {\n String county = (String) person.attributes.get(Person.COUNTY);\n if (county == null) {\n county = \"AVERAGE\";\n }\n Map<String, Double> sdoh = socialDeterminantsOfHealth.get(county);\n if (sdoh != null) {\n for (String determinant : sdoh.keySet()) {\n Double probability = sdoh.get(determinant);\n if (determinant.equals(Person.UNEMPLOYED)) {\n if (probability == null) {\n throw new IllegalStateException(\"Unable to determine unemployment probability\");\n }\n person.attributes.put(Person.UNEMPLOYED, false);\n person.attributes.put(Person.EMPLOYMENT_MODEL, new Employment(probability));\n }\n person.attributes.put(determinant, (person.rand() <= probability));\n }\n }\n }",
"@Override\n\tpublic void setAge () {\n\t\t// defining the random range for age between 1 up to 50\n\t\tint age = 1 + (int)(Math.random()*(3));\n\t\tthis.age = age;\n\t}",
"public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}",
"public void setWhoGoesFirstRandom() {\n Random ran = new Random();\n int i = ran.nextInt(2) + 1;\n if(i == 1) {\n setWhoGoesFirst(humanPlayer);\n } else {\n setWhoGoesFirst(aiPlayer);\n }\n }",
"public int getRandomBreed() {\n Random r = new Random();\n// displayToast(Integer.toString(getRandomBreed())); // not needed. generates another random number\n return r.nextInt(6);\n }",
"public void RandomOrientation(){\n\n\t\tfor (int i=0;i<population.length;i++){\n\t\t\tpopulation[i].RandomOrientation();\n\t\t}\n\n\t}",
"private void setRand(){\n rand = generator.nextInt(9) + 1;\n }",
"public Lemur(){\r\n //Call to super class\r\n super();\r\n //Set variables\r\n location = \"Madagascar\";\r\n classification = \"Prosimians\";\r\n coat = \"Fur\";\r\n dominantRole = \"Female\";\r\n grooming = \"Use their teeth as a comb\";\r\n age = rand.nextInt((20-1)+1)+1;\r\n weight = Math.random()*((7-1)+1)+1;\r\n }",
"public static String getUniqueMaleName(){\n int randomIndex = randomNumber(maleNames.getNames().length);\n return maleNames.getNames()[randomIndex];\n }",
"public void setRnd (java.lang.String rnd) {\r\n\t\tthis.rnd = rnd;\r\n\t}",
"void randomize() {\r\n\t\trandomize(1, this.length());\r\n\t}",
"public void setGender(String gender);",
"public void setGender(String gender);",
"public void setGender(String gender);",
"private static String randomYear()\r\n {\r\n String year = \"\";\r\n int number = ran.nextInt(4);\r\n switch(number)\r\n {\r\n case 0:\r\n year = \"freshman\";\r\n break;\r\n case 1:\r\n year = \"sophmore\";\r\n break;\r\n case 2:\r\n year = \"junior\";\r\n break; \r\n case 3:\r\n year = \"senior\";\r\n break;\r\n }\r\n\r\n return year;\r\n }",
"public Animal()\n\t{\t\n\t\tgender = rng.nextBoolean();\n\t\tstrength = rng.nextFloat() * 100;\n\t}",
"private Patient setRandomPatientNames(Patient patient){\n\t\tpatient = getName(patient);\n\t\treturn patient;\n\t}",
"public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }",
"private String getRandomName(){\n return rndString.nextString();\n }",
"public void setFemale(int value) {\n this.female = value;\n }",
"private void randomBehavior() {\n\t\trandom = rand.nextInt(50);\n\t\tif (random == 0) {\n\t\t\trandom = rand.nextInt(4);\n\t\t\tswitch (random) {\n\t\t\t\tcase 0:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void setGender(Gender_Tp gender) { this.gender = gender; }",
"public void setGender(String gender){\n if(gender == \"laki\"){\r\n isMale = true;\r\n }else if(gender == \"perempuan\"){\r\n isMale = false;\r\n }\r\n }",
"public void setGender (boolean g) {\n gender = g;\n }",
"public void randomStyle(DrawTextItem s) {\n\t\tString[] fontFamilies = {\"Monospace\", \"Helvetica\", \"TimesRoman\", \"Courier\", \"Serif\", \"Sans_Serif\"}; \n\t\tint fontType = new Random().nextInt(fontFamilies.length); \n\t\tint fontSize = new Random().nextInt(15); \n\t\tif (fontSize <= 6)\n\t\t\tfontSize = 7;\n\t\tint fontStyle;\n\t\tif (Math.random() > 0.25)\n\t\t\tfontStyle = Font.ITALIC;\n\t\telse if (Math.random() > 0.5)\n\t\t\tfontStyle = Font.BOLD;\n\t\telse\n\t\t\tfontStyle = Font.ITALIC + Font.BOLD;\n\t\ts.setFont( new Font(fontFamilies[fontType], fontStyle, fontSize )); \n\t\tint angle = new Random().nextInt(359);\n\t\ts.setRotationAngle(angle);\n\t\tint scale = new Random().nextInt(5);\n\t\tif (scale == 0)\n\t\t\tscale = 1; \n\t\ts.setMagnification(scale);\n\t\tif (Math.random() < 0.5)\n\t\t\ts.setBorder(true); \n\t\telse\n\t\t\ts.setBorder(false);\n\t\ts.setTextTransparency(0.3);\n\t\tint r = new Random().nextInt(255);\n\t\tint g = new Random().nextInt(255);\n\t\tint b = new Random().nextInt(255);\n\t\ts.setBackground(new Color(r,g,b));\n\t\ts.setBackgroundTransparency(Math.random() * 0.90 + 0.10);\n\t}",
"public void randomGenre(View view) {\r\n String[] randomGenre = {\"Rock\", \"Funk\", \"Hip hop\", \"Country\", \"Pop\", \"Blues\", \"K-pop\", \"Punk\", \"House\", \"Soul\"};\r\n int index = (int) (Math.random() * 10);\r\n displayMessage(\"Your random genre is: \" + randomGenre[index]);\r\n }",
"private void chooseBreedToBeIdentified() {\n Random r = new Random();\n int questionBreedIndex = r.nextInt(3);\n\n questionCarMake = displayingCarMakes.get(questionBreedIndex);\n carMakeNameTitle.setText(questionCarMake);\n }",
"public void setRandom(Random r) {\n this.r = r;\n }",
"@Override\r\n public void initCreature() \r\n {\n \t\r\n if ( worldObj.provider.dimensionId == 1 && worldObj.rand.nextInt( 5 ) == 0 )\r\n \t{\r\n \tsetCarried( Block.whiteStone.blockID );\r\n \tsetCarryingData( 0 );\r\n \t}\r\n }",
"public void setRandomOrientation(Ship ship) {\r\n\t\tship.setOrientation(ORIENTATION.values()[rm.nextInt(ORIENTATION.values().length)]);\r\n\t}",
"public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE())\r\n\t\t\t);\r\n\t\telse if(randomizzatoreVariazione < 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione()\r\n\t\t\t\t\t- andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE() * randomizzatoreVariazione)\r\n\t\t\t);\r\n\t}",
"private Gender(String gender) {\n\t\tthis.gender = gender;\n\t}",
"default void setRandomModifier(double value, int duration){\n Random random = new Random();\n Modifier.ModifierType[] modifierTypes = Modifier.ModifierType.values();\n Modifier.ModifierType randomType = modifierTypes[random.nextInt(modifierTypes.length)];\n Modifier randomModifier = new Modifier(randomType, value, duration);\n this.setModifier(randomModifier);\n }",
"public String sex() {\n return this.sex;\n }",
"public void setAccountSex(Integer accountSex) {\n this.accountSex = accountSex;\n }",
"public void decideNature()\n {\n String nature = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 25)\n {\n nature = \"Very mischievous. Enjoys hiding objects in plain sight\";\n }//ends the if\n else if(i > 25 && i <= 50)\n {\n nature = \"Loves to spend time sleeping on the clouds\";\n }//ends the else if\n else if(i > 50 && i <= 75)\n {\n nature = \"Is very playful\";\n }//ends the else if\n else\n {\n nature = \"Loves to perform dances in the air\";\n }\n \n setNature(nature);\n }",
"public String types() { return faker.fakeValuesService().resolve(\"gender.types\", this, faker); }",
"public void setIdQuestion(int idT) {\r\n idQuestion=rand(idT);\r\n }",
"public Critter1() {\r\n\t\tnumberSpawned = 0;\r\n\t\twhile (fearfullness < 50) {//at minimum fearfullness is 50%\r\n\t\t\tfearfullness = getRandomInt(100);\r\n\t\t}\r\n\t}",
"public Person getRandomPerson() {\n //Randomize all characteristics of a person\n int age = (int) (rd.nextDouble() * 100); //within 100y old\n int gd = (int) Math.round(rd.nextDouble() * (Person.Gender.values().length - 1));\n int bt = (int) Math.round(rd.nextDouble() * (Person.BodyType.values().length - 1));\n int pf = (int) Math.round(rd.nextDouble() * (Person.Profession.values().length - 1));\n boolean isPreg = rd.nextBoolean();\n\n //Construct a person with random characteristic\n //Person(int age, Profession profession, Gender gender, BodyType bodytype, boolean isPregnant)\n P = new Person(age, Person.Profession.values()[pf], Person.Gender.values()[gd], Person.BodyType.values()[bt], isPreg);\n return P;\n }",
"public void randomize(){\r\n\t\tfor(int i = 0;i<this.myQuestions.size();i++){\r\n\t\t\tthis.myQuestions.get(i).randomize();\r\n\t\t}\r\n\t\tCollections.shuffle(this.myQuestions);\r\n\t}",
"@Override\n public void setExperiencia(){\n experiencia1=Math.random()*50*nivel;\n experiencia=experiencia+experiencia1;\n subida();\n }",
"public static void setGender(String gender){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyGender, gender);\n }",
"public void setGender(String value) {\n this.gender = value;\n }",
"public void setUserSex(Byte userSex) {\r\n this.userSex = userSex;\r\n }",
"protected void setGender(Gender gender) {\n this.gender = gender;\n }",
"private void generarNombre() {\r\n\t\tthis.nombre = NOMBRES[(int) (Math.random() * NOMBRES.length)];\r\n\t}",
"public String setRandomName( int n ){\n String Name = randomAlphabetic(n);\n setElementText(calendarNameField, Name);\n return Name;\n }",
"public void setGender(String gender) {\r\n this.gender = gender;\r\n }",
"public void setSexo(char sexo) {\r\n\t\tcomprobarSexo(sexo);\r\n\t}",
"Randomizer getRandomizer();",
"public void setSexo(String sexo) {\r\n this.sexo = sexo;\r\n }",
"public void setGender(Integer gender) {\r\n this.gender = gender;\r\n }",
"public static String getUniqueFemaleName(){\n int randomIndex = randomNumber(femaleNames.getNames().length);\n return femaleNames.getNames()[randomIndex];\n }",
"public static Student[] generatedStudent(int x){\n String gender;\n Student[] student=new Student[x];//we create array and we describe count of item by given number\n for(int i=0; i < student.length; i++){\n double GPA = Math.random()*4;//it helps you to create random double value between 0 to 4 for gpa\n int midterm= (int)(Math.random()*100);//it helps to create random integer value between 0 to 100 for midterm exam grade\n int finalGra= (int)(Math.random()*100);//it helps to create random integer value between 0 to 100 for final exam grade\n int preGender=(int)(Math.random()*2);//it helps to create random integer value between 0 to 1 for gender because when it is equal 1,it transformes to male else it transformes to female\n if(preGender==1){\n gender=\"male\";\n } \n else{\n gender=\"female\";\n }\n ExamGrade e1=new ExamGrade(midterm, finalGra);//we create exam grade to add student instructere\n student[i] = new Student(\"barış\", \"arslan\", gender, GPA, \"CMPE\", e1);\n }\n return student;\n }",
"@Override\n\tpublic void randomChanged(boolean random) {\n\t\t\n\t}",
"public void setGender(String gender) {\n this.gender = gender.equals(\"M\")?Gender.M:Gender.F; \n }",
"public void randomDestino(){\n\t\tRandom aleatorio = new Random();\n\t\tint numero = aleatorio.nextInt(2);\n\t\tif (numero == 0)\n\t\t\tsetGiro(90);\n\t\telse \n\t\t\tsetGiro(270);\n\t}"
] | [
"0.72581846",
"0.721348",
"0.67515314",
"0.6694485",
"0.6651666",
"0.66299945",
"0.6540237",
"0.6540237",
"0.6520318",
"0.65159136",
"0.6490079",
"0.6490079",
"0.6490079",
"0.6490079",
"0.6490079",
"0.64858514",
"0.6433488",
"0.6411159",
"0.63755536",
"0.6322286",
"0.63217473",
"0.6310591",
"0.6306213",
"0.6281425",
"0.6274514",
"0.61868846",
"0.61512935",
"0.614915",
"0.6114691",
"0.60941535",
"0.6082203",
"0.6082203",
"0.6082203",
"0.6082203",
"0.6082203",
"0.6082203",
"0.60726357",
"0.6066815",
"0.6065117",
"0.6059926",
"0.6041585",
"0.60281754",
"0.6024686",
"0.60224146",
"0.6016904",
"0.5993601",
"0.5989075",
"0.59666306",
"0.5964064",
"0.5939655",
"0.5939305",
"0.59188676",
"0.5911297",
"0.5905785",
"0.5881181",
"0.5881181",
"0.5881181",
"0.58561385",
"0.58523166",
"0.58494437",
"0.5846401",
"0.5844783",
"0.583644",
"0.5825362",
"0.5823154",
"0.581684",
"0.5808422",
"0.5803305",
"0.5790669",
"0.57625806",
"0.5741956",
"0.57418",
"0.5729823",
"0.57173645",
"0.5714045",
"0.5713989",
"0.5710919",
"0.57086",
"0.56979835",
"0.56938636",
"0.5668351",
"0.5664545",
"0.56600475",
"0.5659673",
"0.5656437",
"0.56528467",
"0.5650786",
"0.563389",
"0.56283015",
"0.5622826",
"0.56226885",
"0.5617801",
"0.5614249",
"0.56127036",
"0.5611353",
"0.5609387",
"0.56072026",
"0.55991125",
"0.5596111",
"0.5589892",
"0.55755484"
] | 0.0 | -1 |
This will set the age to be random | public Fox(Sex sex) {
super(randomAge(MAX_AGE), sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);
constructor();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setAge () {\n\t\t// defining the random range for age between 1 up to 50\n\t\tint age = 1 + (int)(Math.random()*(3));\n\t\tthis.age = age;\n\t}",
"private int randomAge() {\n \tint low = 18;\n \tint high = 100;\n \tint offset = high - low;\n \tRandom r = new Random();\n \treturn r.nextInt(offset) + low;\n \t\n }",
"public static Dinosaur randomAge(Dinosaur ager)\n {\n int randAge = (int)(Math.random()*34);\n \n // while (randAge != 0)\n // {\n // ager.ageUp();\n // randAge-=1;\n // }\n \n for (int index = 0; index<randAge; index++)\n {\n ager.ageUp();\n }\n return ager;\n \n }",
"protected void setAge(int age) {\r\n\t\tthis.age = age;\r\n\t}",
"private void setRand(){\n rand = generator.nextInt(9) + 1;\n }",
"public synchronized int setLuggageWeight(){\n return random.nextInt((30-0)+1)+0;\n }",
"public Tiger(boolean randomAge) {\n super(randomAge, TIGER.getMaxAge(), rand,\n new LinkedHashMap<Class, Integer>(){{\n put(RABBIT.getSpecies(), 4);\n put(RABBIT.getSpecies(), 8);\n }});\n }",
"public void setAge(int age) { \n\t\t this.age = age; \n\t}",
"protected void setAge(Age age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(double age) {\r\n\t\tif (age <= 2) setAge(age * 10.5);\r\n\t\telse setAge(21 + (4 * (age - 2)));\r\n\t}",
"public void setAge(int age){\n this.age = age;\n }",
"public static void setAge(String age){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyAge, age);\n }",
"public void setAge(int age)\r\n {\r\n this.age = age;\r\n }",
"public void setAge(int age) {\n\t\tif (age < 0) {\n\t\t\tthis.age = 0;\n\t\t} else {\n\t\t\tthis.age = age;\n\t\t}\n\t}",
"public void setAge(final int age) {\n mAge = age;\n }",
"public void setDamage() {\n\t\tRandom rand = new Random();\n\t\tint damage = rand.nextInt(getMaxDamage()) + 1;\n\t\tthis.damage = damage;\n\t}",
"public HumanBuilder setAge( int age) {\n\t\t\t/*\n\t\t\t * id is a instance variable of hte HumanBuilder class, and we are inside a \n\t\t\t * instance method so we CAN access the variable id\n\t\t\t */\n\t\t\tid=3;\n\t\t\t//we can also access statics of the HumanBuilder class in an instance method\n\t\t\tstatInt++;\n\t\t\t//this int age is a LOCAL variable\n\t\t\t/*\n\t\t\t * if i pass in a minus number, this will give age a new value of 1\n\t\t\t */\n\t\t\tif(age<=0)\n\t\t\t\tage=1;\n\t\t\t/*\n\t\t\t * cannot access age directly as this is a static nested class, so we first create\n\t\t\t * a Human object, then we access the age of that Human\n\t\t\t */\n\t\t\tmyHuman.age=age;\n\t\t\treturn this;\n\t\t}",
"@Override\r\n\tpublic final void setAge(final int theAge) {\r\n\t\tthis.age = theAge;\r\n\t}",
"public void setAge(int age) { this.age = age; }",
"public void setAge(Integer age) {\r\n this.age = age;\r\n }",
"@Override\n\tpublic void Age(int age) {\n\t\t\n\t}",
"public void setAge(int age) {\r\n\t\tif (age >= 0) \r\n\t\t\tthis.age = age;\r\n\t\t//else //ideally we should let the caller know we didn't set the Age\r\n\t}",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public AnimalBuilder setAge(int age) {\n\t\tthis.age=age;\n\t\treturn this;\n\t}",
"public void setAge(String age) {\n this.age = age;\n }",
"public void setAverageLifeExp(int age) {\n averageLifeExp = age;\n }",
"public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}",
"@Override\r\n\tpublic void setAge(int newAge) \r\n\t{\r\n\t\tthis._age = newAge;\r\n\t}",
"public void set_age(int obj_age) {\n\t\tage = obj_age;\n\t}",
"public synchronized int setArrivalTime(){\n\t\t return random.nextInt((30-1)+1)+1;\n\n\t}",
"public void setAge(final int a) {\n this.age = a;\n }",
"@Override\n\tpublic void setGrowingAge(int age) {\n\t\t// managed by DragonLifeStageHelper, so this is a no-op\n\t}",
"void setAge(int age);",
"public void setAge(String age)\r\n\t{\n\t\tthis.age = validateInteger( age, \"age\" );\r\n\t}",
"private Patient setPatientDOB(Date date, Patient patient){\n\t\tint year=date.getYear()+1900;\n\t\tint age=patient.getAge();\n\t\tif(age>60){\t//If patient age above 60 years then randomize the year also\n\t\t\tyear=randBetween(1990,2010);\n\t\t}\n\t\tint dayOfMonth = randBetween(1, 31);\n\t\tint month = randBetween(0, 11);\n\t\tDate d = new Date(year-1900, month, dayOfMonth); //Random date\n\t\tpatient.setBirthdate(d);\n\t\treturn patient;\n\t}",
"private void random() {\n\n\t}",
"public void setAge(int age);",
"protected void incrementAge()\n {\n age++;\n if(age > max_age) {\n setDead();\n }\n }",
"public void setAge(double theAge)\n\t{\n\t\tthis.theAge=theAge;\n\n\t\tif(theAge<0.0)\n\t\t{\n\t\t\tthis.theAge=0.0;\n\t\t}\n\t}",
"public Builder setAge(int value) {\n bitField0_ |= 0x00000004;\n age_ = value;\n onChanged();\n return this;\n }",
"public synchronized int setPassengerWeight(){\n return random.nextInt((100-40)+1)+40;\n }",
"public UserBuilder age(int age) {\n\t\t\tthis.age = age;\n\t\t\treturn this; // return this to make expression chainable.\n\t\t\t\n\t\t}",
"public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }",
"@Override\n public int orinar() {\n\n return (int) (Math.random() * 400) + 400;\n }",
"private static String randomYear()\r\n {\r\n String year = \"\";\r\n int number = ran.nextInt(4);\r\n switch(number)\r\n {\r\n case 0:\r\n year = \"freshman\";\r\n break;\r\n case 1:\r\n year = \"sophmore\";\r\n break;\r\n case 2:\r\n year = \"junior\";\r\n break; \r\n case 3:\r\n year = \"senior\";\r\n break;\r\n }\r\n\r\n return year;\r\n }",
"public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }",
"public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }",
"private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }",
"default void setRandomModifier(double value, int duration){\n Random random = new Random();\n Modifier.ModifierType[] modifierTypes = Modifier.ModifierType.values();\n Modifier.ModifierType randomType = modifierTypes[random.nextInt(modifierTypes.length)];\n Modifier randomModifier = new Modifier(randomType, value, duration);\n this.setModifier(randomModifier);\n }",
"public Animal(int theAge) {\n\t\t// TODO Auto-generated constructor stub\n\t\tage = theAge;\n\t}",
"public void setAge(String age) {\n\n Instant instant = Instant.parse(age) ;\n\n Date dateAge = Date.from(instant) ;\n\n //Date dateAge = format.parse(age);\n Log.e(\"age convert: \", String.valueOf(dateAge));\n this.age = dateAge;\n }",
"public static void updateAge() {\n\t\tfor (int i =0; i < data.size(); i++){\n\t\t\tdata.get(i).setAge(data.get(i).getAge()+1);\n\t\t}\n\t}",
"@java.lang.Override\n public int getAge() {\n return age_;\n }",
"public void setAge(java.lang.String param) {\r\n localAgeTracker = param != null;\r\n\r\n this.localAge = param;\r\n }",
"public void setRandom(Random r) {\n this.r = r;\n }",
"public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}",
"protected Random get_rand_value()\n {\n return rand;\n }",
"@java.lang.Override\n public int getAge() {\n return age_;\n }",
"@Override\n\tpublic void setAge(int age) throws RemoteException {\n\t\tthis.age = age;\n\t}",
"public int getAge() {\n\t \t return age; \n\t}",
"public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}",
"public void setRandom(boolean random){\n this.random = random;\n }",
"private int randomWeight()\n {\n return dice.nextInt(1000000);\n }",
"private int calculateAge() {\n\t\treturn LocalDate.now().getYear() - this.birthYear;\n\t}",
"UserInfo setAge(Integer age);",
"public int getAge() {\n return age_;\n }",
"public int getAge() {\n return age_;\n }",
"public int getAge() {\n return age_;\n }",
"public int getAge() {\n return age_;\n }",
"public int getAge() {\n return age_;\n }",
"public int getAge() {\n return age_;\n }",
"public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}",
"public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}",
"@Override\r\n\t@MockNumber(min=0, max=100)\r\n\tpublic Integer getAttr_age() {\n\t\treturn super.getAttr_age();\r\n\t}",
"public Female( int age ) {\n\t\tcurrent_age = age;\n\t}",
"private Random rand()\n\t{\n\t\treturn new Random();\n\t}",
"@Override\n\tpublic void setToRandomValue(RandomGenerator a_numberGenerator) {\n\n\t}",
"private void lifeGenerator(Persons mother, Persons father, int currYear)\n {\n eventGenerator.createBirth(father, currYear);\n eventGenerator.createBirth(mother, currYear);\n eventGenerator.createMarriage(father, mother, currYear);\n\n int lifeWheel = random.nextInt(4);\n\n if (currYear < 1920){\n eventGenerator.createDeath(father, currYear);\n eventGenerator.createDeath(mother, currYear);\n }\n else if (lifeWheel == 0){\n eventGenerator.createDeath(father, currYear);\n eventGenerator.createRandomEvent(mother, currYear);\n }\n else if (lifeWheel == 1){\n eventGenerator.createDeath(mother, currYear);\n eventGenerator.createRandomEvent(father, currYear);\n }\n\n if (lifeWheel == 2){\n eventGenerator.createRandomEvent(father, currYear);\n }\n else if (lifeWheel == 3){\n eventGenerator.createRandomEvent(mother, currYear);\n }\n }",
"public void SetRandom(boolean random);",
"public Lemur(){\r\n //Call to super class\r\n super();\r\n //Set variables\r\n location = \"Madagascar\";\r\n classification = \"Prosimians\";\r\n coat = \"Fur\";\r\n dominantRole = \"Female\";\r\n grooming = \"Use their teeth as a comb\";\r\n age = rand.nextInt((20-1)+1)+1;\r\n weight = Math.random()*((7-1)+1)+1;\r\n }",
"public int setAge(int age){\n \n if (age >= 0 && age < 18){\n \n System.out.println(\"OMG! He was too young to date, still a babe!\");\n }\n \n else if(age == 18){\n \n System.out.println(\"He was about your age!\");\n }\n \n else if (age < 0) {\n \n System.out.println(\"That is impossible. Liar! He doesn't exist!\");\n } \n \n else if(age > 18 && age <= 25){\n \n System.out.println(\"Great! He was marriage material!\");\n }\n \n else if (age >= 26 && age <=34){\n \n System.out.println(\"He was a bit old for you\");\n } \n \n else if (age >= 35 && age <=100){\n \n System.out.println(\"He was a sugar daddy!\");\n }\n \n else {\n \n System.out.println(\"That is unlikely to have happened. Were you dating a mummy?\");\n } \n \n return age;\n }",
"public Animal(boolean randomAge, Field field, Location location, int breeding_age, int max_age, double breeding_probability, int max_litter_size)\n {\n alive = true;\n age = 0;\n if(randomAge) {\n age = rand.nextInt(max_age);\n }\n this.field = field;\n setLocation(location);\n this.breeding_age = breeding_age;\n this.max_age = max_age;\n this.breeding_probability = breeding_probability;\n this.max_litter_size = max_litter_size;\n gender = Math.random() < 0.5;\n }",
"public AgeData (int age) {\n if (age<0){\n throw new IllegalArgumentException ();\n }\n this.age = age;\n total=1;\n }",
"public int presetTriageNumber() {\r\n\t\tint triageRating = 0;\r\n\t\tint triageGenerator = random.nextInt(4);\r\n\t\tswitch (triageGenerator) {\r\n\t\tcase 0:\r\n\t\t\ttriageRating = 1;\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\ttriageRating = 2;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\ttriageRating = 3;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\ttriageRating = 4;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn triageRating;\r\n\t}",
"@Test\n public void testSetAge() {\n System.out.println(\"Animal.setAge\");\n animal1.setAge(20);\n animal2.setAge(5);\n assertEquals(20, animal1.getAge());\n assertEquals(5, animal2.getAge());\n }",
"public void setPlayerRoll20()\r\n {\r\n \r\n roll2 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE20 + LOWEST_DIE_VALUE20);\r\n \r\n }"
] | [
"0.87178385",
"0.8087116",
"0.7285968",
"0.69901997",
"0.69198954",
"0.6863627",
"0.6862156",
"0.6845664",
"0.6803796",
"0.67977905",
"0.67977905",
"0.67977905",
"0.67977905",
"0.67977905",
"0.67977905",
"0.67972785",
"0.67972785",
"0.67972785",
"0.67972785",
"0.67972785",
"0.6784018",
"0.6728447",
"0.67203456",
"0.6711634",
"0.67063206",
"0.6687791",
"0.6674441",
"0.6643207",
"0.6641927",
"0.6623933",
"0.6598502",
"0.65929335",
"0.65881974",
"0.658119",
"0.6574248",
"0.6574248",
"0.6574248",
"0.6574248",
"0.6560344",
"0.65372485",
"0.6528942",
"0.6515324",
"0.6496563",
"0.6489343",
"0.64320827",
"0.6430674",
"0.64290696",
"0.6427069",
"0.64258295",
"0.6377319",
"0.6364597",
"0.6351212",
"0.6341328",
"0.6332731",
"0.6324416",
"0.6311941",
"0.62861806",
"0.62495065",
"0.62409675",
"0.6201352",
"0.61974275",
"0.61974275",
"0.6188221",
"0.6176986",
"0.6127666",
"0.6122044",
"0.61197406",
"0.61180747",
"0.61011076",
"0.6076228",
"0.60729015",
"0.60715324",
"0.6065712",
"0.6055337",
"0.6045956",
"0.60425466",
"0.6033674",
"0.6021979",
"0.6020414",
"0.6016541",
"0.60047966",
"0.60047966",
"0.60047966",
"0.59936035",
"0.59936035",
"0.59936035",
"0.5993121",
"0.59923786",
"0.5990544",
"0.59826756",
"0.5968315",
"0.5959031",
"0.5951507",
"0.5942231",
"0.5940655",
"0.5934539",
"0.5916779",
"0.59010804",
"0.5886718",
"0.58644634",
"0.5861337"
] | 0.0 | -1 |
Creates a fox with age and sex predefined | public Fox(Sex sex, int age) {
super(age, sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);
constructor();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fox(Sex sex) {\n super(randomAge(MAX_AGE), sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Fox(int age) {\n super(age, randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Fox() {\n super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Female( int age ) {\n\t\tcurrent_age = age;\n\t}",
"public Fish(String name, String gender){\n this.name = name;\n this.gender = gender;\n this.value = 10;\n this.eats = whatItEats(new fishFood());\n this.portionSize = 20;\n this.minimumOffspring = 1;\n this.maximumOffspring = 12;\n this.maxAge = 4;\n this.vetCost = 2;\n }",
"public Olympian(String name, Sex sex, int age) {\n this.name = name;\n this.sex = sex;\n this.age = age;\n }",
"private Persons createFather(Persons child, String spouse)\n {\n Persons dad = new Persons();\n dad.setPersonFirstName(nameGenerator.generateMaleName());\n dad.setPersonGender(\"m\");\n dad.setPersonSpouseID(spouse);\n dad.setDescendantID(userName);\n\n if (child.getPersonGender().equals(\"m\")) {\n dad.setPersonLastName(child.getPersonLastName());\n }\n else {\n dad.setPersonLastName(nameGenerator.generateLastName());\n }\n\n return dad;\n }",
"public Staff(String lastName, String firstName, String idNum, char sex, Calendar birthDate, double hourlyRate)\n\t{\n\t\tsuper(lastName, firstName, idNum, sex, birthDate);\n\t\tthis.hourlyRate = hourlyRate;\n\t}",
"public Vegetarian(boolean female) {\n super(female);\n }",
"public Person(String inName, int inAge, Gender inGender)\n {\n name = inName;\n age = inAge;\n gender = inGender;\n\n Calendar c = Calendar.getInstance();\n c.set(Calendar.YEAR, c.get(Calendar.YEAR) - age);\n birthdate = c.getTime();\n }",
"public void setSex(Sex sex) {\n this.sex = sex;\n }",
"public Animal(int age){\n this.age = age;\n System.out.println(\"An animal has been created!\");\n }",
"public void setSex(String sex) {\n this.sex = sex;\n }",
"public Student(String name, char gender, int age) {\r\n super(name, gender, age);\r\n }",
"public Student(String personName, String personID, boolean sex, Date birthday) {\r\n\t\tsuper(personName, personID, sex, birthday);\r\n\t}",
"public void setSex(String sex)\n {\n this.sex = sex;\n }",
"public interface PersonFactory {\n\n public Boy getBoy();\n\n public Gril getGril();\n\n}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex) {\n\t\tthis.sex = sex;\n\t}",
"public void setSex(String sex);",
"public Villager(String name, Gender gender, int age) {\r\n\t\tthis.name = name;\r\n\t\tthis.gender = gender;\r\n\t\tthis.age = age;\r\n\t}",
"public User(String name, int age, int userid, char gender, boolean isActive) {\n\t\t\n\t\tthis.name = name;\n\t\tthis.age = age;\n\t\tthis.userid = userid;\n\t\tthis.gender = gender;\n\t\tthis.isActive = isActive;\n\t}",
"public void setFemale(int value) {\n this.female = value;\n }",
"public Penguin(boolean female) {\n super(female);\n daysRemaining = 12;\n }",
"@Test\n public void TestCreateDog() {\n String expectedName = \"Tyro\";\n Date expectedBirthDate = new Date();\n\n Dog newDog = AnimalFactory.createDog(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newDog.getName());\n Assert.assertEquals(expectedBirthDate, newDog.getBirthDate());\n }",
"@Test\n public void TestCreateCat() {\n String expectedName = \"Milo\";\n Date expectedBirthDate = new Date();\n\n Cat newCat = AnimalFactory.createCat(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newCat.getName());\n Assert.assertEquals(expectedBirthDate, newCat.getBirthDate());\n }",
"@Override\n public Animal newChild() {\n return new Fox(0);\n }",
"public Tiger(boolean randomAge) {\n super(randomAge, TIGER.getMaxAge(), rand,\n new LinkedHashMap<Class, Integer>(){{\n put(RABBIT.getSpecies(), 4);\n put(RABBIT.getSpecies(), 8);\n }});\n }",
"public Fish(int yearsToLive, Size size, String color)\n {\n super( yearsToLive, size, color);\n this.areal = \"Sea\";\n }",
"public BabyName(String n, boolean g, int count, int yr)\n {\n name = n;\n gender = g;\n numsBaby = count;\n year = yr;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"public void setSex(Integer sex) {\n this.sex = sex;\n }",
"Factory<? extends T> buildPersonFactory(String type);",
"public void setSex(Integer sex) {\r\n this.sex = sex;\r\n }",
"public CreateUser(int age, String name){ // constructor\n userAge = age;\n userName = name;\n }",
"public void setSex(Boolean sex) {\r\n this.sex = sex;\r\n }",
"public Fish(String species, String desc)\n {\n super(species, desc);\n toy = \"Jesus net\";\n }",
"public void setSex(Byte sex) {\n this.sex = sex;\n }",
"public void setSex(Short sex) {\n this.sex = sex;\n }",
"public Employee(int emp_no, Date birth_date, String first_name, String last_name, String gender, Date hire_date) {\n this.emp_no = emp_no;\n this.birth_date = birth_date;\n this.first_name = first_name;\n this.last_name = last_name;\n this.gender = gender.equals(\"M\")?Gender.M:Gender.F;\n this.hire_date = hire_date;\n }",
"public Customer (String n, int age, boolean shown) {\n name = n; // sets name\n child = ((age <= 16) && (age >= 5));\n student = shown; //sets if the student id was shown\n }",
"public Pupil(String n, int a, int f){\n\t\tthis.age=a;\n\t\tthis.form=f;\n\t\tthis.name=n;\n\t}",
"public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }",
"public Person createPerson(String fullName, int age, String phone, String email, String favMovie, String city, String street, Profession profession, HashMap<String, Double> weightTable, ArrayList<String> hobbies) {\n startMetrics();\n String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();\n\n Person p = new Person(fullName,age,phone,email,favMovie,city,street,profession,weightTable,hobbies);\n p.setFullName(fullName);\n p.setAge(age);\n p.setPhone(phone);\n p.setEmail(email);\n p.setFavouriteMovie(favMovie);\n p.setCityName(city);\n p.setStreetName(street);\n p.setProfession(profession);\n p.setWeightTable(weightTable);\n p.setHobbies(hobbies);\n\n System.out.println(p.toString());\n\n printMethodName(methodName);\n stopMetrics();\n gatherPerformance(methodName);\n return p;\n }",
"public static User createPerson() throws ParserConfigurationException, SAXException, IOException {\n User[] users = XMLReader.parsePersonXML();\n User user = users[0];\n calories = user.getCalories();\n diet = user.getDiet();\n quantity = user.getQuantityOfPeople();\n transport = user.getTransport();\n return user;\n }",
"public void setSexo(String sexo) {\r\n\t\tthis.sexo = sexo;\r\n\t}",
"public Animal(int theAge) {\n\t\t// TODO Auto-generated constructor stub\n\t\tage = theAge;\n\t}",
"public void setSexo(String sexo) {\r\n this.sexo = sexo;\r\n }",
"public Citizen(String fullName, String email, String address, int age, int district, boolean resident, char gender){\n this.fullName = fullName;\n this.email = email;\n this.address = address;\n this.age = age;\n this.district = district;\n this.resident = resident;\n this.gender = gender;\n }",
"public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }",
"public void setSex(Boolean sex);",
"public static void main(String[] args) {\nint age=21 ;char gender='f';\nif(age>=21 && gender=='m')\n{\n\tSystem.out.println(\"eligble for marriage\");\n}\n\n else if (age>=18 && gender=='f') {\nSystem.out.println(\"eligble for marriage\");\n}\nelse {\n\t{System.out.println(\"not eligble for marrage\");\n}\n\t\t\n\t}\n\n\n}",
"People(String name, int age) {\n this.name = name;\n this.age = age;\n }",
"public Dog(Integer age, String name) {\n setAge(age);\n setName(name);\n }",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public static User newInstance(String account, String password, String name, boolean isFemale) {\n User user = new User();\n user.account = account;\n user.password = password;\n user.name = name;\n user.isFemale = isFemale;\n user.createdDateTime = DateTimeUtil.getCurrentDateTime(); // Automatically generates the date & time.\n return user;\n }",
"Person createPerson();",
"public Employee(String firstName, String lastName, int salary, int bonus) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.salary = salary;\n this.bonus = bonus;\n this.taxableSalary=this.salary+this.bonus-this.taxAllowance;\n }",
"private Gender(String gender) {\n\t\tthis.gender = gender;\n\t}",
"public void setaSex(Integer aSex) {\n this.aSex = aSex;\n }",
"@Test\n public void getGender() {\n User u = new User(name, mail, pass, address, gender);\n Assert.assertEquals(u.getGender(), gender);\n }",
"public User(String firstname,String lastname, int age, String email, String gender, String city, String state) {\n\t\tthis.firstname = firstname;\n\t\tthis.lastname = lastname;\n\t\tthis.age = age;\n\t\tthis.email = email;\n\t\tthis.gender = gender;\n\t\tthis.city = city;\n\t\tthis.state = state;\n\t}",
"public Doctor(float weight, int age, double height, int years, String specialty){\r\n\t\t//This calls the human's constructor, so a human object for the doctor can be created.\r\n\t\tsuper(weight, age, height);\r\n\t\t//the field years is set\r\n\t\tthis.years = years;\r\n\t\t//The field specialty is set\r\n\t\tthis.specialty = specialty;\r\n\t}",
"@Override\n\tpublic Person createPerson(String id, String slug, String firstName,\n\t\t\tString lastName, String photoId, Gender gender) {\n\t\tfinal Person person = createPerson();\n\t\tperson.setId(id);\n\t\tperson.setSlug(slug);\n\t\tperson.setFirstName(firstName);\n\t\tperson.setLastName(lastName);\n\t\tperson.setName(firstName + \" \" + lastName);\n\t\tperson.setPhotoId(photoId);\n\t\tperson.setGender(gender);\n\t\treturn person;\n\t}",
"Foco createFoco();",
"public Student(Integer age) {\n\n this.age = age;\n }",
"public Dog(String Breed, String PrimaryColor, String Size, String name, int age){\r\n // setting the parent animal name\r\n super(name,age);\r\n // setting the parent animal age\r\n // System.out.println(\"Setting Breed...\");\r\n this.Breed = Breed ;\r\n // System.out.println(\"Setting PrimaryColor...\");\r\n this.PrimaryColor = PrimaryColor;\r\n //System.out.println(\"Setting Size...\");\r\n this.Size = Size;\r\n\r\n\r\n\r\n }",
"public Fish(String n, String c, String s, int f) {\n name = n;\n color = c;\n species = s;\n fins = f;\n count++;\n }",
"public Animal(boolean randomAge, Field field, Location location, int breeding_age, int max_age, double breeding_probability, int max_litter_size)\n {\n alive = true;\n age = 0;\n if(randomAge) {\n age = rand.nextInt(max_age);\n }\n this.field = field;\n setLocation(location);\n this.breeding_age = breeding_age;\n this.max_age = max_age;\n this.breeding_probability = breeding_probability;\n this.max_litter_size = max_litter_size;\n gender = Math.random() < 0.5;\n }",
"public Officer(String name, GenderType gender, LocalDate birthday, String adress) {\n super(name, gender, birthday, adress);\n this.duties = \"Patrol, Make Arrests & Court testimony, Emergency calls\";\n }",
"public Employee(String fName, String lName, String gender, double salary) {\n this.fName = fName;\n this.lName = lName;\n this.gender = gender;\n this.salary = salary; \n }",
"public Patient newPatient(String name, int dob) {\n\n\t\tint thisYear = 2016;\n\t\tint ageLimit = 130;\n\n\t\tif (((thisYear - dob) > ageLimit) || (dob > thisYear)) {\n\t\t\tSystem.out.println(\"The age is not valid\");\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tage = thisYear - dob;\n\t\tid = size;\n\t\tsize++;\n\t\tPatient x = new Patient(size, name, age);\n\t\tSystem.out.println(\"The paitent is called \" + x.name + \" and ID is : \" + x.id + \" and age is: \" + x.age);\n\t\tpatients.add(x);\n\t\treturn x;\n\t}",
"public static void main(String[] args) {\n\t\tPerson person = new Person();\r\n\t\tperson.setName(\"Jon Snow\");\r\n\t\tperson.setAddress(\"Castle Black, 82\");\r\n\t\tperson.setEmail(\"castle.black@hotmail.com\");\r\n\t\tperson.setPhone(061666666);\r\n\t\tSystem.out.println(person);\r\n\r\n\t\t// creating a instance of Staff\r\n\t\tStaff staff = new Staff();\r\n\t\tSystem.out.println();\r\n\t\tstaff.setName(\"Ned Stark\");\r\n\t\tstaff.setTitle(\"King of North\");\r\n\t\tSystem.out.println(staff);\r\n\r\n\t\t// creating a instance of Faculty\r\n\t\tFaculty faculty = new Faculty();\r\n\t\tSystem.out.println();\r\n\t\tfaculty.setName(\"Zdravko\");\r\n\t\tfaculty.setOfficeHours(40);\r\n\t\tfaculty.setRank(\"Profesor\");\r\n\t\tSystem.out.println(faculty);\r\n\r\n\t\t// creating a instance og Employee\r\n\t\tEmployee employee = new Employee();\r\n\t\tSystem.out.println();\r\n\t\temployee.setName(\"Nedim\");\r\n\t\temployee.setOffice(\"Post Office\");\r\n\t\temployee.setSalary(2000);\r\n\t\tSystem.out.println(employee);\r\n\r\n\t\t// creating a instance of Student\r\n\t\tStudent student = new Student();\r\n\t\tSystem.out.println();\r\n\t\tstudent.setName(\"Ljubisa\");\r\n\t\tstudent.setStatus(2);\r\n\t\tSystem.out.println(student);\r\n\t}",
"public Sim.Sex chooseSex() {\n if(RND.nextInt() > 0.5) {\n return Sim.Sex.M;\n } else {\n return Sim.Sex.F;\n }\n }",
"public Instructor(String name, char gender, Integer age) {\n super(name, gender, age);\n }",
"public void addPerson(String name, String lastName, char gender, int height, String nationality,\n\t\t\tLocalDate birthday) {\n\t\t\n\t\tString code = \"\";\n\t\tint numberDigits = (currentCode+\"\").length();\n\t\t\n\t\tfor(int i=numberDigits; i<DIGITS_CODE;i++) {\n\t\t\tcode +=\"0\";\n\t\t}\n\t\tcode += numberDigits; \n\t\tcurrentCode++;\n\t\tPerson newP = new Person(code, name, lastName, gender, height, nationality, birthday);\n\t\t\n\t\ttreeName.insertE(name+code, newP);\n\t\ttreeLastname.insertE(lastName+code, newP);\n\t\ttreeFullName.insertE(name+lastName+code, newP);\n\t\ttreeCode.insertE(code, newP);\n\t\t\n\t\t\n\t}",
"Girl(String n,String p,String i,String a,String b,String t,String pr) {\n \n name = n;\n pairedto = p;\n intelligence = Integer.parseInt(i);\n attractiveness = Integer.parseInt(a);\n mBudget = Integer.parseInt(b); \n type = t;\n pref = pr;\n \n }",
"@Override\n\tpublic void create(String name, Integer age) {\n\t\tuserDAO.create(name, age);\n\t}",
"public interface PersonFactory<P extends Person> {\n P create(String firstname, String lastName);\n}",
"public Animal(Color color, int age) {\r\n\t\tthis.color = color;\r\n\t\tif (age >= 0) {\r\n\t\t\tthis.age = age;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Animal age must not be less than 0\");\r\n\t\t}\r\n\t}",
"public Passenger(String name, int age)\r\n {\r\n this.name = name;\r\n this.age = age;\r\n }",
"public void setSex(String sex) {\n\t\tthis.sex = sex == null ? null : sex.trim();\n\t}",
"Prof ( String name, String id, int age ) {\n\t\t\tthis.name = name;\n\t\t\tthis.id = id;\n\t\t\tthis.age = age;\n\t\t}",
"public Dog(String name, int size, int weight, int eyes, int legs, int tail, int teeth, String coat) {\n //super means to call a constructor from the class we are extending\n //can set values or call in the above constructor, your choice\n super(name, 1, 1, size, weight);\n //these are for the strictly dog paramters\n this.eyes = eyes;\n this.legs = legs;\n this.tail = tail;\n this.teeth = teeth;\n this.coat = coat;\n }",
"public Animal(int row, int col, String sex, String type) {\n this.row = row;\n this.col = col;\n this.sex = sex;\n this.type = type;\n this.typeChar = type.charAt(0);\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"public void setSex(String sex) {\n this.sex = sex == null ? null : sex.trim();\n }",
"@Test\n public void createDogTest() {\n String expected = \"orbit\";\n\n Dog testDog = AnimalFactory.createDog(expected, new Date(0001));\n String actual = testDog.getName();\n\n Assert.assertEquals(expected,actual);\n\n }",
"public User(final String email, final String lastName, final String firstName, final Date dateOfBirth, final Gender gender) {\n this(null, email, lastName, firstName, dateOfBirth, gender, \"123456\");\n }",
"public static void createArmy() {\n Unit unitOne = new Unit(\"Unit One\");\n Unit unitTwo = new Unit(\"Unit Two\");\n Unit unitThree = new Unit(\"Unit Three\");\n Unit unitFour = new Unit(\"Unit Four\");\n Unit unitFive = new Unit(\"Unit Five\");\n\n Knight knightOne = new Knight(\"Knight One\");\n Knight knightTwo = new Knight(\"Knight Two\");\n Knight knightThree = new Knight(\"Knight Three\");\n\n General general = new General(\"General\");\n Doctor doctor = new Doctor(\"Doctor\");\n }",
"public Person(String n,int d, int m, int y)\n\t{\n\t\tname=n;\n\t\tdob=new Date(d,m,y);\t\n\t}",
"public Animal()\n\t{\t\n\t\tgender = rng.nextBoolean();\n\t\tstrength = rng.nextFloat() * 100;\n\t}",
"public Feature createFeature(Feature.Template ft)\n throws BioException, ChangeVetoException;"
] | [
"0.78399026",
"0.78118783",
"0.7459373",
"0.6911363",
"0.6387476",
"0.62775093",
"0.6014897",
"0.6006749",
"0.59780866",
"0.5964135",
"0.58223075",
"0.5802487",
"0.5772759",
"0.5770081",
"0.57606655",
"0.5741691",
"0.5695656",
"0.5674841",
"0.5674841",
"0.5645124",
"0.5641632",
"0.5629986",
"0.55895746",
"0.5578553",
"0.55747485",
"0.55731124",
"0.5572758",
"0.55658656",
"0.5557389",
"0.55449337",
"0.5529924",
"0.5529924",
"0.5529924",
"0.5529924",
"0.5529924",
"0.55238795",
"0.5521111",
"0.551903",
"0.5518695",
"0.5512537",
"0.5479089",
"0.54611915",
"0.54421777",
"0.5431156",
"0.54303855",
"0.5418338",
"0.5403488",
"0.5394832",
"0.5370976",
"0.53687996",
"0.5367091",
"0.5344393",
"0.53408796",
"0.5339806",
"0.5338922",
"0.5312043",
"0.5296146",
"0.52957255",
"0.527629",
"0.52660763",
"0.5264148",
"0.5261694",
"0.52535003",
"0.52457106",
"0.5239131",
"0.5236946",
"0.5231146",
"0.5228729",
"0.52150285",
"0.5210875",
"0.51911235",
"0.51801825",
"0.5178214",
"0.5173712",
"0.51732415",
"0.5171557",
"0.51649404",
"0.5157925",
"0.51483166",
"0.5139522",
"0.51321906",
"0.51314014",
"0.5123745",
"0.51221114",
"0.512112",
"0.511341",
"0.5107517",
"0.5106366",
"0.51030713",
"0.51030713",
"0.51030713",
"0.51030713",
"0.51030713",
"0.51030713",
"0.5097334",
"0.5093224",
"0.5088521",
"0.5088489",
"0.50842094",
"0.5075125"
] | 0.8063117 | 0 |
Auxiliary function to the constructor | public void constructor() {
setEdibleAnimals();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Constructor(){\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"private void __sep__Constructors__() {}",
"protected abstract void construct();",
"Reproducible newInstance();",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"defaultConstructor(){}",
"private Instantiation(){}",
"void DefaultConstructor(){}",
"public static void copyConstructor(){\n\t}",
"private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }",
"private UniqueChromosomeReconstructor() { }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private Rekenhulp()\n\t{\n\t}",
"private TMCourse() {\n\t}",
"private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}",
"public Clade() {}",
"protected ForConstructor(Constructor<?> constructor) {\n this.constructor = constructor;\n }",
"private ChainingMethods() {\n // private constructor\n\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public Card() { this(12, 3); }",
"TDrawingConstructor (ArrayList interpretation){\r\n fInterpretation=interpretation;\r\n}",
"@Override\r\n\tpublic void init() {}",
"private Cat() {\n\t\t\n\t}",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"public Pitonyak_09_02() {\r\n }",
"public _355() {\n\n }",
"public MethodEx2() {\n \n }",
"private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"public CyanSus() {\n\n }",
"public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }",
"public ParseException() {\n super();\n specialConstructor = false;\n }",
"public PSRelation()\n {\n }",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"@Override\n public void init() {}",
"public void init() {\r\n\t\t// to override\r\n\t}",
"protected SimpleMatrix() {}",
"public tn(String paramString, ho paramho)\r\n/* 12: */ {\r\n/* 13:11 */ super(paramString, paramho);\r\n/* 14: */ }",
"@Override\n protected void init() {\n }",
"@Override\n public void construct() throws IOException {\n \n }",
"DefaultConstructor(int a){}",
"private Params()\n {\n }",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"protected Coord() {\n\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"public Pasien() {\r\n }",
"protected DenseMatrix()\n\t{\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public Complex(){\r\n\t this(0,0);\r\n\t}",
"private LocalParameters() {\n\n\t}",
"private Infer() {\n\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"private UsineJoueur() {}",
"public mapper3c() { super(); }",
"private static Constructor getZeroArgumentConstructor(Class cls) {\n \t\treturn ClassUtils.getConstructor(cls, new Class[] { }, zeroArgumentConstructors);\n \t}",
"private Vect3() {\n\t\tthis(0.0,0.0,0.0);\n\t}",
"public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }",
"@Override\n public void init() {\n }",
"public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }",
"ConstuctorOverloading(int num){\n\t\tSystem.out.println(\"I am contructor with 1 parameter\");\n\t}",
"@Override public void init()\n\t\t{\n\t\t}",
"Composite() {\n\n\t}",
"public lo() {}",
"@Override\n\t\tprotected void initialise() {\n\n\t\t}",
"@Override\n public void init() {\n }",
"public Lanceur() {\n\t}",
"protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }",
"public Anschrift() {\r\n }",
"public Orbiter() {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"public Generic(){\n\t\tthis(null);\n\t}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public Chick() {\n\t}",
"Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"public CacheFIFO(int paramInt)\r\n/* 11: */ {\r\n/* 12: 84 */ super(paramInt);\r\n/* 13: */ }",
"public BaseParameters(){\r\n\t}",
"public Vector() {\n construct();\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"public Self__1() {\n }",
"public void init(){}",
"public Sad() {\n }",
"public TTau() {}",
"public Cgg_jur_anticipo(){}",
"@Override\n void init() {\n }",
"private SingleObject()\r\n {\r\n }",
"@Override // opcional\n public void init(){\n\n }",
"public CSSTidier() {\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}"
] | [
"0.734441",
"0.73075384",
"0.7249037",
"0.7002565",
"0.675033",
"0.6642008",
"0.65847176",
"0.65494245",
"0.6544275",
"0.6541988",
"0.65241283",
"0.645772",
"0.6424644",
"0.64206135",
"0.6383175",
"0.63767046",
"0.6372025",
"0.63493216",
"0.63179743",
"0.631506",
"0.63008064",
"0.62951845",
"0.6294936",
"0.6294279",
"0.629259",
"0.62854517",
"0.6267784",
"0.6260159",
"0.62482363",
"0.62450534",
"0.6243656",
"0.6229208",
"0.62086135",
"0.61924446",
"0.6188117",
"0.61862034",
"0.61834675",
"0.6180181",
"0.6169505",
"0.6169099",
"0.61685544",
"0.61574584",
"0.61394244",
"0.6132479",
"0.61312103",
"0.61311346",
"0.6126072",
"0.61236393",
"0.6118007",
"0.6118007",
"0.6118007",
"0.6115446",
"0.6115259",
"0.61058724",
"0.6095242",
"0.6095242",
"0.6095242",
"0.6095242",
"0.6095242",
"0.6095048",
"0.6090818",
"0.6088233",
"0.6078525",
"0.60692567",
"0.6068352",
"0.60625315",
"0.60562795",
"0.6056049",
"0.6055505",
"0.60554373",
"0.60530317",
"0.6052708",
"0.6048769",
"0.60482687",
"0.6041971",
"0.60400987",
"0.60354316",
"0.60354316",
"0.6032304",
"0.60272676",
"0.6024843",
"0.602305",
"0.6023041",
"0.6022282",
"0.6022282",
"0.60207677",
"0.6020366",
"0.60101324",
"0.6007776",
"0.6004347",
"0.6002256",
"0.6000622",
"0.5998064",
"0.5997791",
"0.5996227",
"0.59906363",
"0.5990007",
"0.5988895",
"0.5987063",
"0.5986943"
] | 0.6080881 | 62 |
Defines what animals can be edible by the fox | @Override
public void setEdibleAnimals() {
addPrey(Rabbit.SPECIES);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isFlyingAnimal() {\n return true;\n }",
"public void constructor() {\n setEdibleAnimals();\n }",
"public boolean isAnimal(Entity e){\r\n\t\tif(e instanceof Cow || e instanceof Chicken || e instanceof Sheep || e instanceof Horse\r\n\t\t\t\t|| e instanceof Wolf || e instanceof Ocelot ||e instanceof Pig || e instanceof Mushroom){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private void seeAnimal() {\n\r\n\t}",
"protected boolean canBreed()\n {\n return age >= breeding_age;\n }",
"protected boolean dangerAnimal() {\n return dangerAnimal(0);\n }",
"public Animal(boolean randomAge, Field field, Location location, int breeding_age, int max_age, double breeding_probability, int max_litter_size)\n {\n alive = true;\n age = 0;\n if(randomAge) {\n age = rand.nextInt(max_age);\n }\n this.field = field;\n setLocation(location);\n this.breeding_age = breeding_age;\n this.max_age = max_age;\n this.breeding_probability = breeding_probability;\n this.max_litter_size = max_litter_size;\n gender = Math.random() < 0.5;\n }",
"public boolean isAnimalFood(Material item){\r\n\t\tif(item == Material.HAY_BLOCK || item == Material.SEEDS || item == Material.ROTTEN_FLESH || item == Material.RAW_BEEF || item == Material.PORK\r\n\t\t\t\t|| item == Material.RAW_FISH){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"boolean canLayEgg(IGeneticMob geneticMob);",
"public void setLiveAnimals (boolean lA)\n {\n liveAnimals= lA;\n }",
"public boolean animalFood(Entity e, Material item){\r\n\t\t\r\n\t\tif(e instanceof Cow || e instanceof Horse || e instanceof Pig || e instanceof Sheep ){\r\n\t\t\tif(item == Material.HAY_BLOCK){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(e instanceof Chicken){\r\n\t\t\tif(item == Material.SEEDS){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if( e instanceof Wolf){\r\n\t\t\tif(item == Material.ROTTEN_FLESH || item == Material.RAW_BEEF || item == Material.PORK){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(e instanceof Ocelot){\r\n\t\t\tif(item == Material.RAW_FISH){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void setAnimal(Animal animal) {\n\t\tthis.animal = animal;\r\n\t}",
"public boolean getIsAnimal()\r\n/* 34: */ {\r\n/* 35:53 */ return this.isAnimal;\r\n/* 36: */ }",
"public void createAnimals() {\n\t\tanimals = new Animal[noAnimals];\n\n\t\tfor (int i = 0; i < noAnimals; i++) {\n\t\t\tanimals[i] = new Animal(noAnimals);\n\t\t\tanimals[i].setDiffCo(diffCo[i]);\n\t\t\tanimals[i].setDiffusionRate(diffusionRate[i]);\n animals[i].initiateDensities(getIo().getNeighbours().length,getIo().getNeighbours()[0].length);\n\t\t}\n\t\n\t\t animals[0].setName(\"Hare\"); \n\t\t animals[1].setName(\"Puma\");\n\t}",
"public void addAnimals() throws IOException {\n\t\tint b = 0;\n\t\tint c = 0;\n\t\tint a = 0;\n\t\tArrayList<GameObjects> animals = new ArrayList<GameObjects>();\n\t\tRandom rand = new Random();\n\t\twhile(b<bigFish) {\n\t\t\tanimals.add(new BigFish(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth/2))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tb+=1;\n\t\t}\n\t\twhile(c<crab) {\n\t\t\tanimals.add(new Crab(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tc+=1;\n\t\t}\n\t\twhile(a<algae) {\n\t\t\tanimals.add(new Algae(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\ta+=1;\n\t\t}\n\n\t\tanimals.add(new BigFish(frameWidth, frameHeight));\n\t\tanimals.add(new Crab(frameWidth, frameHeight));\n\t\tanimals.add(new Algae(frameWidth, frameHeight));\n\n\t\tthis.objects = animals;\n\t}",
"public boolean isWaterAnimal() {\n return false;\n }",
"abstract public void act(List<Animal> newAnimals);",
"public void setNoAnimals(int noAnimalsIn) {\n\t\tnoAnimals = noAnimalsIn;\n\t}",
"public Animal()\n {\n MOVE_RIGHT = 0;\n MOVE_LEFT = 0;\n MOVE_UP = 0;\n MOVE_DOWN = 0;\n }",
"@Test\n void animalVariablesTest() {\n assertEquals(50, pens[0].getHealth());\n assertEquals(100, pens[1].getHealth());\n assertEquals(80, pens[2].getHealth());\n assertEquals(70, pens[3].getHealth());\n for (int i = 0; i < pens.length; i++) {\n assertEquals(100, pens[i].getHappiness());\n }\n assertEquals(50, pens[0].getValue());\n assertEquals(100, pens[1].getValue());\n assertEquals(80, pens[2].getValue());\n assertEquals(70, pens[3].getValue());\n }",
"public static boolean [][] breedChoice (Species [][] map, int x, int y, int plantHealth) {\n // First int: direction\n // Second int: sheep or wolf\n boolean [][] breeding = {\n {false, false},\n {false, false},\n {false, false},\n {false, false},\n };\n \n // Check null pointer exceptions\n if (map[y][x] != null) {\n\n // Breed sheep\n if ((map[y][x] instanceof Sheep) && (y > 0) && (map[y-1][x] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y-1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y-1][x].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y-1][x]).getAge() > 5)) {\n breeding[0][0] = true;\n }\n } else if ((map[y][x] instanceof Sheep) && (y < map[0].length - 2) && (map[y+1][x] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y+1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y+1][x].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y+1][x]).getAge() > 5)) {\n breeding[1][0] = true;\n }\n } else if ((map[y][x] instanceof Sheep) && (x > 0) && (map[y][x-1] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y][x-1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x-1].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y][x-1]).getAge() > 5)) {\n breeding[2][0] = true;\n }\n } else if ((map[y][x] instanceof Sheep) && (x < map.length - 2) && (map[y][x+1] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y][x+1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x+1].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y][x+1]).getAge() > 5)) {\n breeding[3][0] = true;\n }\n \n // Breed wolves\n } else if ((map[y][x] instanceof Wolf) && (y > 0) && (map[y-1][x] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y-1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y-1][x].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y-1][x]).getAge() > 5)) {\n breeding[0][1] = true;\n }\n } else if ((map[y][x] instanceof Wolf) && (y < map[0].length - 2) && (map[y+1][x] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y+1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y+1][x].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y+1][x]).getAge() > 5)) {\n breeding[1][1] = true;\n }\n } else if ((map[y][x] instanceof Wolf) && (x > 0) && (map[y][x-1] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y][x-1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x-1].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y][x-1]).getAge() > 5)) {\n breeding[2][1] = true;\n }\n } else if ((map[y][x] instanceof Wolf) && (x < map.length - 2) && (map[y][x+1] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y][x+1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x+1].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y][x+1]).getAge() > 5)) {\n breeding[3][1] = true;\n }\n }\n \n }\n return breeding;\n }",
"public interface Fox extends Animals, Sittable {\r\n\r\n /**\r\n * Gets the current type of this fox.\r\n *\r\n * @return Type of the fox.\r\n */\r\n @NotNull\r\n public Type getFoxType();\r\n\r\n /**\r\n * Sets the current type of this fox.\r\n *\r\n * @param type New type of this fox.\r\n */\r\n public void setFoxType(@NotNull Type type);\r\n\r\n /**\r\n * Checks if this animal is crouching\r\n *\r\n * @return true if crouching\r\n */\r\n boolean isCrouching();\r\n\r\n /**\r\n * Sets if this animal is crouching.\r\n *\r\n * @param crouching true if crouching\r\n */\r\n void setCrouching(boolean crouching);\r\n\r\n /**\r\n * Sets if this animal is sleeping.\r\n *\r\n * @param sleeping true if sleeping\r\n */\r\n void setSleeping(boolean sleeping);\r\n\r\n /**\r\n * Gets the first trusted player.\r\n *\r\n * @return the owning AnimalTamer, or null if not owned\r\n */\r\n @Nullable\r\n public AnimalTamer getFirstTrustedPlayer();\r\n\r\n /**\r\n * Set the first trusted player.\r\n * <p>\r\n * The first trusted player may only be removed after the second.\r\n *\r\n * @param player the AnimalTamer to be trusted\r\n */\r\n public void setFirstTrustedPlayer(@Nullable AnimalTamer player);\r\n\r\n /**\r\n * Gets the second trusted player.\r\n *\r\n * @return the owning AnimalTamer, or null if not owned\r\n */\r\n @Nullable\r\n public AnimalTamer getSecondTrustedPlayer();\r\n\r\n /**\r\n * Set the second trusted player.\r\n * <p>\r\n * The second trusted player may only be added after the first.\r\n *\r\n * @param player the AnimalTamer to be trusted\r\n */\r\n public void setSecondTrustedPlayer(@Nullable AnimalTamer player);\r\n\r\n /**\r\n * Represents the various different fox types there are.\r\n */\r\n public enum Type {\r\n RED,\r\n SNOW;\r\n }\r\n}",
"public void removeAnimal(Entity e){\r\n\t\tSet<String> farmers = plugin.getAnimalData().getConfigurationSection(\"Farmer\").getKeys(false);\r\n\t\tfor(String farmer : farmers){\r\n\t\t\tSet<String> farmeranimals = plugin.getAnimalData().getConfigurationSection(\"Farmer.\" + farmer + \".Animals\").getKeys(false);\r\n\t\t\t\r\n\t\t\tfor(String farmanimal : farmeranimals){\r\n\t\t\t\tif(farmanimal.equalsIgnoreCase(e.getUniqueId().toString())){\r\n\t\t\t\t\tLivingEntity le = (LivingEntity) e;\r\n\t\t\t\t\tplugin.getAnimalData().set(\"Farmer.\" + farmer +\".Animals.\"+ farmanimal, null);\r\n\t\t\t\t\tPlayer[] p = Bukkit.getOnlinePlayers();\r\n\t\t\t\t\tfor(Player online : p){\r\n\t\t\t\t\tif(online.getUniqueId().toString().equalsIgnoreCase(farmer)){\r\n\t\t\t\t\tonline.sendMessage(ChatColor.GRAY + \"Your \" + e.getType().toString() + \" \" + le.getCustomName() + \" has \" + ChatColor.DARK_RED + \"died.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(plugin.getAnimalData().contains(\"AnimalCoolDown.\" + farmanimal)){\r\n\t\t\t\t\t\tplugin.getAnimalData().set(\"AnimalCoolDown.\" + farmanimal, null );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tplugin.saveAnimalData();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"protected boolean dangerAnimal(double margin) {\n if (!state.isHoldingItem() && !(state.isSearching() && state.getTimeToFinishSearching() > 1)) {\n return false;\n }\n FoodType type = state.isHoldingItem() ? state.getItemHeld() : state.getFoodSearched();\n int dangerGoose = 0;\n int dangerMonkey = 0;\n final Point location = state.getLocation();\n for (Animal animal : animals) {\n if (animal.isEating()) {\n continue;\n }\n if (animal.getType() == AnimalType.MONKEY) { //monkey\n if (//distance(animal.predictNextLocation(), location) <= 5.0 + 1e-7 && \n distance(animal.getLocation(), location) <= 5.0 + 1e-7 + margin) {\n dangerMonkey += 1;\n }\n } else if (type == FoodType.SANDWICH) { //goose\n if (//distance(animal.predictNextLocation(), location) <= 2.0 + 1e-7 &&\n distance(animal.getLocation(), location) <= 2.0 + 1e-7 + margin) {\n dangerGoose += 1;\n }\n }\n }\n return (dangerGoose >= 1 || dangerMonkey >= 3);\n }",
"boolean isOccupiedByAnimal(Vector2d position);",
"public Fox() {\n super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Animal(String hewan, int x, int y) {\n switch (hewan) {\n case \"Bekantan\": {\n name = \"Bekantan\";\n habitat = \"Land\";\n weight = 50;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Fruit\";\n legs = 2;\n content = 'A';\n suara = \"Uuuuuuuu\";\n break;\n }\n case \"BurungHantu\": {\n name = \"Burung Hantu\";\n habitat = \"Air\";\n weight = 2;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Meat\";\n legs = 2;\n content = 'B';\n suara = \"Kur kur kur\";\n break;\n }\n case \"Codot\": {\n name = \"Codot\";\n habitat = \"Air\";\n weight = (float) 0.5;\n type = \"Herbivore\";\n tamed = false;\n diet = \"Fruit\";\n legs = 2;\n content = 'C';\n suara = \"Cit cit cit\";\n break;\n }\n case \"Elang\": {\n name = \"Elang\";\n habitat = \"Air\";\n weight = 3;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 2;\n content = 'D';\n suara = \"Koak koakk koakk\";\n break;\n }\n case \"Gajah\": {\n name = \"Gajah\";\n habitat = \"Land\";\n weight = 3500;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Leaf\";\n legs = 4;\n content = 'E';\n suara = \"Ngoett\";\n break;\n }\n case \"Gorilla\": {\n name = \"Gorilla\";\n habitat = \"Land\";\n weight = 200;\n type = \"Herbivore\";\n tamed = false;\n diet = \"Fruit\";\n legs = 2;\n content = 'C';\n suara = \"Huhahuha\";\n break;\n }\n case \"Harimau\": {\n name = \"Harimau\";\n habitat = \"Land\";\n weight = 450;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 4;\n content = 'G';\n suara = \"Roarrrr\";\n break;\n }\n case \"Hiu\": {\n name = \"Hiu\";\n habitat = \"Water\";\n weight = 100;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Meat\";\n legs = 0;\n content = 'H';\n suara = \"Shush shush\";\n break;\n }\n case \"IkanTerbang\": {\n name = \"Ikan Terbang\";\n habitat = \"Water\";\n weight = 2;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Insect\";\n legs = 0;\n content = 'I';\n suara = \"Cepok cepok cepok\";\n break;\n }\n case \"Jerapah\": {\n name = \"Jerapah\";\n habitat = \"Land\";\n weight = 500;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Leaf\";\n legs = 4;\n content = 'J';\n suara = \"Ngoet ngoet\";\n break;\n }\n case \"Kancil\": {\n name = \"Kancil\";\n habitat = \"Land\";\n weight = 60;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Leaf\";\n legs = 4;\n content = 'K';\n suara = \"Ngik ngik ngik\";\n break;\n }\n case \"Kepik\": {\n name = \"Kepik\";\n habitat = \"Air\";\n weight = (float) 0.01;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Nectar\";\n legs = 6;\n content = 'L';\n suara = \"Krik krik krik\";\n break;\n }\n case \"Kepiting\": {\n name = \"Kepiting\";\n habitat = \"Water\";\n weight = 1;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 10;\n content = 'M';\n suara = \"Kuikk kuikk\";\n break;\n }\n case \"KumbangHutan\": {\n name = \"Kumbang Hutan\";\n habitat = \"Air\";\n weight = (float) 0.05;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Nectar\";\n legs = 6;\n content = 'N';\n suara = \"Kruk kruk kruk\";\n break;\n }\n case \"KupuKupu\": {\n name = \"KupuKupu\";\n habitat = \"Air\";\n weight = (float) 0.03;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Nectar\";\n legs = 6;\n content = 'O';\n suara = \"Wir wir\";\n break;\n }\n case \"Lobster\": {\n name = \"Lobster\";\n habitat = \"Water\";\n weight = (float) 0.5;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 10;\n content = 'P';\n suara = \"Crek crek crek\";\n break;\n }\n case \"LumbaLumba\": {\n name = \"Lumba lumba\";\n habitat = \"Water\";\n weight = 100;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 0;\n content = 'Q';\n suara = \"Cet cet cet\";\n break;\n }\n case \"MacanTutul\": {\n name = \"Macan Tutul\";\n habitat = \"Land\";\n weight = 350;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Meat\";\n legs = 4;\n content = 'R';\n suara = \"Aummmm\";\n break;\n }\n case \"OwaOwa\": {\n name = \"OwaOwa\";\n habitat = \"Land\";\n weight = 70;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Fruit\";\n legs = 2;\n content = 'S';\n suara = \"Huhuhuhu\";\n break;\n }\n case \"PausSperma\": {\n name = \"Paus Sperma\";\n habitat = \"Water\";\n weight = 7000;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 0;\n content = 'T';\n suara = \"Srosh srosh\";\n break;\n }\n case \"Piranha\": {\n name = \"Piranha\";\n habitat = \"Water\";\n weight = (float) 0.7;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 0;\n content = 'U';\n suara = \"Kraus kraus\";\n break;\n }\n case \"Platypus\": {\n name = \"Platypus\";\n habitat = \"Land and Water\";\n weight = 5;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Insect\";\n legs = 4;\n content = 'V';\n suara = \"Krr krr\";\n break;\n }\n case \"Singa\": {\n name = \"Singa\";\n habitat = \"Land\";\n weight = 400;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 4;\n content = 'W';\n suara = \"Groarrr\";\n break;\n }\n case \"SingaLaut\": {\n name = \"Singa Laut\";\n habitat = \"Water\";\n weight = 70;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 0;\n content = 'X';\n suara = \"Ou ou ou\";\n break;\n }\n default: {\n name = \"NULL\";\n habitat = \"NULL\";\n weight = 0;\n type = \"NULL\";\n tamed = false;\n diet = \"NULL\";\n legs = 0;\n content = '-';\n suara = \"NULL\";\n break;\n }\n }\n fodder = (float) 0.025 * weight;\n locX = x;\n locY = y;\n nAnimal++;\n consumerate += fodder;\n }",
"public static boolean [] action (Species [][] map, int x, int y, int plantHealth) {\n \n // Actions: sheep eat = actionChoice[0], wolves eat = actionChoice[1], fight = actionChoice[2]\n boolean [] actionChoice = new boolean [] {false, false, false};\n \n // Find any animals and see if they have enough energy\n if ((map[y][x] != null) && (!(map[y][x] instanceof Plant)) && (((Animals)map[y][x]).getEnergy() > 0) ) {\n \n // Make sure in bounds\n if ((y > 0) && (y < map[0].length - 2) && (x > 0) && (x < map.length - 2)) {\n \n // Sheep decisions (sheep cannot decide whether or not to move away from wolves)\n if (map[y][x] instanceof Sheep) {\n \n // First choice is to eat\n if ((map[y-1][x] instanceof Plant) || (map[y+1][x] instanceof Plant) || (map[y][x-1] instanceof Plant) || (map[y][x+1] instanceof Plant)) {\n actionChoice[0] = true; \n }\n \n // Wolf decisions\n } else if (map[y][x] instanceof Wolf) {\n \n // First choice is to eat\n if ((map[y-1][x] instanceof Sheep) || (map[y+1][x] instanceof Sheep) || (map[y][x-1] instanceof Sheep) || (map[y][x+1] instanceof Sheep)) {\n actionChoice[1] = true;\n \n // Second choice is to fight a weaker wolf\n } else if ((map[y-1][x] instanceof Wolf) || (map[y+1][x] instanceof Wolf) || (map[y][x-1] instanceof Wolf) || (map[y][x+1] instanceof Wolf)) {\n actionChoice[2] = true;\n }\n \n }\n }\n \n }\n return actionChoice; // Returns what action the animal should do\n }",
"@Override\n public void mature(Farm farm, Animal animal) {\n }",
"public void setFunny(int funny) {\n this.funny = funny;\n }",
"public interface Animalable {\n public enum AnimalClass {\n VERTEBRATE,\n INVERTEBRATE\n }\n\n public enum AnimalSubClass{\n REPTILE,\n FISH,\n AMPHIBIAN,\n BIRD,\n MAMMAL\n }\n\n public interface AnimalOrders {\n enum MammalOrders implements AnimalOrders {\n RODENTIA,\n CHIROPTERA,\n INSECTIVORA,\n MARSUPIALIA,\n CARNIVORA,\n PRIMATES,\n ARTIODACTYLA,\n CETACEA,\n LAGOMORPHA,\n PINNIPEDIA,\n EDENTATA,\n PERRISSODACTYLA,\n PROBOSCIDEA\n }\n enum BirdOrders implements AnimalOrders {\n STRUTHIONIFORMES,\n CRACIFORMES,\n GALLIFORMES,\n ANSERIFORMES,\n TURNICIFORMES,\n PICIFORMES,\n GALBULIFORMES,\n BUCEROTIFORMES,\n UPUPIFORMES,\n TROGONIFORMES,\n CORACIIFORMES,\n COLIIFORMES,\n CUCULIFORMES,\n PSITTACIFORMES,\n APODIFORMES,\n TROCHILIFORMES,\n MUSOPHAGIFORMES,\n STRIGIFORMES,\n COLUMBIFORMES,\n GRUIFORMES,\n CICONIIFORMES\n }\n\n enum ReptilOrders implements AnimalOrders{\n RHYNCOCEPHALIA,\n SQUAMATA,\n CHELONIA,\n CROCODILIA\n }\n\n enum FishOrders implements AnimalOrders {\n PREHISTORIC,\n BONY,\n CARTILAGINOUS,\n JAWLESS\n }\n\n enum AmphibianOrders implements AnimalOrders {\n ANURA,\n URODELA,\n APODA\n }\n }\n\n public enum Motion{\n SWIM,\n CRAWL,\n CLIMB,\n RUN,\n WALK,\n JUMP,\n FLY,\n DIG\n }\n\n public enum FeedingBehaviour {\n AUTOTROPH,\n CARNIVORE,\n ERGIVORE,\n HERBIVORE,\n OMNIVORE,\n SCAVENGER,\n INSECTIVORE\n }\n\n public enum Media {\n AIR,\n EARTH,\n WATER\n }\n\n public enum Sex {\n MALE,\n FEMALE,\n HERMAPHRODITE\n }\n\n public AnimalClass getMyClass();\n public void setMyClass(AnimalClass animalClass);\n\n public AnimalSubClass getMySubClass();\n public void setMySubClass(AnimalSubClass animalSubClass);\n\n public AnimalOrders getMyOrder();\n public void setMyOrder(AnimalOrders myOrder);\n\n public FeedingBehaviour getMyFeedingBehaviour();\n public void setMyFeedingBehaviour(FeedingBehaviour myConsumption);\n\n public ArrayList<Media> getMyMedia();\n public void addMedia(Media aMedia);\n\n public ArrayList<Motion> getMyMotion();\n public void addMotion(Motion aMotion);\n\n public String getName();\n public void setName(String name);\n\n public String getCommonName();\n public void setCommonName(String commonName);\n\n public String getScientificName();\n public void setScientificName(String scientificName);\n\n public Boolean amIHazardous();\n public void setHazardous(boolean hazardous);\n\n public Sex getMySex();\n public void setMySex(Sex aSex);\n\n public Timestamp getLastTimeFed();\n public void feedMe(Timestamp aTime, Edible food);\n\n public int getFeedingPeriod();\n public void setFeedingPeriod(int every);\n\n public boolean timeToFeed();\n\n public int howFullIsMyBelly();\n\n public boolean isAdult();\n\n public void setAsAdult();\n\n public void setAsBaby();\n\n\n\n\n}",
"public void animalDontEat()\n {\n if(animalHungry)\n {\n map.deadAnimalOnMap(this);\n }\n }",
"public Animal(String name) {\r\n this.animalName = name;\r\n }",
"public EnquirerAnimals() {\r\n database = new TreeMap<>();\r\n bc = new BaseConhecimento();\r\n bc.setScenario(\"animals\");\r\n String[] animais_aux = bc.listaNomes();\r\n \r\n perguntas = new ArrayList<>();\r\n animais = new ArrayList<>();\r\n \r\n animais.addAll(Arrays.asList(animais_aux));\r\n \r\n \r\n \r\n //Monta database com perguntas, animais e respectivas respostas\r\n for (String animal : animais) {\r\n obj = bc.recuperaObjeto(animal);\r\n database.put(animal, new TreeMap<String,Boolean>());\r\n \r\n for (IDeclaracao decl = obj.primeira(); decl != null; decl = obj.proxima()){\r\n \r\n String perguntaAtual = decl.getPropriedade(); // pega pergunta\r\n String resp = decl.getValor(); // Pega resposta da pergunta atual\r\n \r\n QuestionInfo atual = new QuestionInfo(perguntaAtual);\r\n if (!perguntas.contains(atual))\r\n perguntas.add(atual); //Cria QuestionInfo da pergutnta atual;\r\n \r\n if (resp.equalsIgnoreCase(\"sim\"))\r\n database.get(animal).put(perguntaAtual, true);\r\n else //Respondeu nao\r\n database.get(animal).put(perguntaAtual, false);\r\n }\r\n }\r\n \r\n \r\n for (QuestionInfo pergunta : perguntas)\r\n pergunta.novoEquilibrio();\r\n }",
"public Fish(String name, String gender){\n this.name = name;\n this.gender = gender;\n this.value = 10;\n this.eats = whatItEats(new fishFood());\n this.portionSize = 20;\n this.minimumOffspring = 1;\n this.maximumOffspring = 12;\n this.maxAge = 4;\n this.vetCost = 2;\n }",
"public void decideNature()\n {\n String nature = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 25)\n {\n nature = \"Very mischievous. Enjoys hiding objects in plain sight\";\n }//ends the if\n else if(i > 25 && i <= 50)\n {\n nature = \"Loves to spend time sleeping on the clouds\";\n }//ends the else if\n else if(i > 50 && i <= 75)\n {\n nature = \"Is very playful\";\n }//ends the else if\n else\n {\n nature = \"Loves to perform dances in the air\";\n }\n \n setNature(nature);\n }",
"public Animal()\n\t{\t\n\t\tgender = rng.nextBoolean();\n\t\tstrength = rng.nextFloat() * 100;\n\t}",
"@Override\n\tpublic boolean canMateWith(EntityAnimal mate) {\n\t\treturn getReproductionHelper().canMateWith(mate);\n\t}",
"AnimalSpecific(String category,String name,String type){\n\t\tsuper(category);\n\t\tanimalName = name;\n\t\tanimalType = type;\n\t}",
"public void setAnimals(ArrayList<Animal> animals) { this.animals = animals; }",
"public abstract boolean isEdible();",
"@Override\n\tpublic void eat(Animal otherAnimal) {\n\t\t\n\t}",
"private void updateAgilisaurusState() {\n this.age++;\n\n if (this.age == 30 && this.hasCapability(LifeStage.BABY)) {\n // grow up\n this.removeCapability(LifeStage.BABY);\n this.addCapability(LifeStage.ADULT);\n this.displayChar = 'D';\n }\n\n if (this.foodLevel > 0) {\n this.foodLevel--;\n }\n\n if (this.waterLevel > 0) {\n this.waterLevel--;\n }\n\n if (this.foodLevel < 30) {\n this.behaviour = new HungryBehaviour();\n }\n\n if (this.foodLevel > 50) {\n this.behaviour = new BreedBehaviour();\n }\n\n if (this.foodLevel == 0) {\n this.Starving();\n } else {\n this.starvationLevel = 0;\n }\n\n if (this.waterLevel < 30) {\n this.behaviour = new ThirstBehaviour();\n }\n\n if (this.waterLevel == 0) {\n this.Thirsting();\n } else {\n this.thirstLevel = 0;\n }\n }",
"public boolean canFish() {\r\n\t\tif (location == Location.SAFARI || location == Location.CAVE) {\r\n\t\t\treturn items.containsKey(FishingRod.getFishingRodInstance());\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean addAnimal(Animal animal);",
"public boolean isDangerousToPeople() {\n\t\treturn this.eats.equals(\"people\");\n\t}",
"void eat(Edible anEdible, int amount);",
"boolean test(AbstractAnimals a);",
"public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}",
"public void setFaction(int faction) { this.faction = faction; }",
"public boolean isLandAnimal() {\n return false;\n }",
"@Override\n public void act(List<Animal> animals) {\n super.act(animals);\n }",
"public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }",
"public void act() \n {\n EggFactory eggFactory = new EggFactory();\n \n move(4);\n int random = Greenfoot.getRandomNumber(5000);\n if((random>200 & random<300) || ((Farm)getWorld()).atWorldEdge(this))\n {\n turn(180);\n getImage().mirrorVertically();\n move(4);\n \n }\n\n if( Greenfoot.getRandomNumber(100) ==0)\n {\n\n Farm farm = (Farm)getWorld();\n Egg egg = null; \n int eggPicker = Greenfoot.getRandomNumber(80);\n //DropEggStrategy dropEgg = new DropEggStrategy(); //Strategy pattern\n\n IEggStrategy whiteStrategy = new WhiteEggStrategy(eggFactory);\n IEggStrategy blackStrategy = new BlackEggStrategy(eggFactory);\n IEggStrategy goldenStrategy = new GoldenEggStrategy(eggFactory);\n \n DropEggContext context = new DropEggContext();\n \n if(eggPicker >= 50 && eggPicker <= 60){\n \n context.setIEggStrategy(goldenStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else if(eggPicker >= 60 && eggPicker <= 70){\n\n context.setIEggStrategy(blackStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else{\n context.setIEggStrategy(whiteStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n \n egg.register(farm.getLifeObserver());//register life creator observer into egg subject \n\n \n\n }\n\n }",
"public Fox(int age) {\n super(age, randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"abstract int add(boolean highsurf, boolean foggy, String eat);",
"@Override\n public void denyAdoptionRequest(Animal animal) {\n animalsDatabase.removeAdoptionRequestFromAnimal(animal);\n }",
"public static void ageAnimal (Species [][] map) {\n \n // Check map for animals\n for (int y = 0; y < map[0].length; y++) {\n for (int x = 0; x < map.length; x++) {\n \n // Age any sheep found\n if (map[y][x] instanceof Sheep) {\n ((Sheep)map[y][x]).gainAge();\n \n // Age any wolves found\n } else if (map[y][x] instanceof Wolf) {\n ((Wolf)map[y][x]).gainAge();\n }\n \n }\n }\n \n }",
"public Animal getRandomAnimal() {\n //Randomize all characteristics of an animal\n int spc = (int) Math.round(rd.nextDouble() * (Animal.enumSpecies.values().length - 1));\n boolean isPet = rd.nextBoolean();\n\n //Construct an animal with random characteristic\n //Animal(int age, Gender g, BodyType b, enumSpecies espec, boolean ispet)\n A = new Animal(Animal.enumSpecies.values()[spc], isPet);\n return A;\n }",
"public Fox(Sex sex) {\n super(randomAge(MAX_AGE), sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"protected Animal() {\t\r\n\t}",
"public Dog(String Breed, String PrimaryColor, String Size, String name, int age){\r\n // setting the parent animal name\r\n super(name,age);\r\n // setting the parent animal age\r\n // System.out.println(\"Setting Breed...\");\r\n this.Breed = Breed ;\r\n // System.out.println(\"Setting PrimaryColor...\");\r\n this.PrimaryColor = PrimaryColor;\r\n //System.out.println(\"Setting Size...\");\r\n this.Size = Size;\r\n\r\n\r\n\r\n }",
"Collection<String> getPossibleDefeatConditions();",
"@Override\n public boolean CanArmor() {\n return false;\n }",
"void setDefeatCondition(String conditionIdentifier);",
"public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }",
"@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n \tpublic void onPlayerInteractEntity(PlayerInteractEntityEvent event)\n \t{\n \t\t// Check if the enitiy can breed\n \t\tif (event.getRightClicked() instanceof Animals == false)\n \t\t\treturn;\n \t\t\n \t\tAgeable entity = (Ageable) event.getRightClicked();\n \t\t\n \t\tif (!entity.canBreed())\n \t\t\treturn;\n \t\t\n \t\t// Check if the entity is being bred\n \t\tswitch (event.getPlayer().getItemInHand().getType())\n \t\t{\n \t\tcase SEEDS:\n \t\tcase PUMPKIN_SEEDS:\n \t\tcase MELON_SEEDS:\n \t\t\tif (event.getRightClicked() instanceof Chicken == false)\n \t\t\t\treturn;\n \t\t\tbreak;\n \t\tcase WHEAT:\n \t\t\tif (event.getRightClicked() instanceof Cow == false && event.getRightClicked() instanceof Sheep == false)\n \t\t\t\treturn;\n \t\t\tbreak;\n \t\tcase CARROT_ITEM:\n \t\t\tif (event.getRightClicked() instanceof Pig == false)\n \t\t\t\treturn;\n \t\tdefault:\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tP.p().animalProtection.addUUID(event.getRightClicked().getUniqueId());\n \t}",
"public void exerciseAnimals() {\n System.out.println(\"Letting the animals get their exercise...\\n\");\n for (int i = 0; i < zoo.length; i++){\n zoo[i].roam();\n }\n System.out.println();\n }",
"public boolean hasDog() {\n return dataBodyCase_ == 3;\n }",
"public void reduceAnimalHappiness() {\n\t\thappiness -= 10;\n\t}",
"public boolean canAttackWithItem() {\n/* 215 */ return false;\n/* */ }",
"public interface Treat {\n public static final int GIANT_DONUT = 0;\n public static final int GIANT_MATCHA_PARFAIT = 1;\n public static final int GIANT_MINT_CHIP = 2;\n public static final int CUPCAKE_CHERRY = 0;\n public static final int CUPCAKE_VANILLA = 1;\n public static final int CUPCAKE_SUNDAE = 2;\n public static final int SMALL_DONUT = 3;\n public static final int DONUT_PINK_SPRINKLES = 4;\n public static final int DONUT_CHOCOLATE = 5;\n public static final int MATCHA_CAKE = 6;\n public static final int STRAWBERRY_CAKE = 7;\n public static final int CHOCOLATE_CAKE = 8;\n public static final int CHOCO_BANANA_SANDWICH = 9;\n public static final int MINT_CHIP_SANDWICH = 10;\n public static final int RED_VELVET_CAKE = 11;\n public static final int MATCHA_CAKE_ROUND = 12;\n public static final int DONUT_WHITE_NUTS = 13;\n public static final int DONUT_BERRY_JAM = 14;\n //public static final int DONUT_CARAMEL = 15;\n public static final int DONUT_CEREAL = 15;\n //public static final int DONUT_CHOCOLATE_WHITE = 17;\n public static final int DONUT_HALF = 16;\n public static final int DONUT_JELLY_CHOCOLATE = 17;\n public static final int DONUT_LIGHT_BLUE = 18;\n //public static final int DONUT_RED_POWDER = 21;\n public static final int CUPCAKE_CINNAMON = 19;\n public static final int CUPCAKE_MINT_CHOCOLATE = 20;\n public static final int CUPCAKE_PINK_YELLOW = 21;\n public static final int CUPCAKE_RED_VELVET = 22;\n public static final int CUPCAKE_SMORE = 23;\n public static final int DONUT_BLUE_SPRINKLES = 24;\n //public static final int DONUT_MINT_TRI = 28;\n //public static final int DONUT_PURPLE_FLOWER = 29;\n public static final int CAKE_KIWI_STRAWBERRY = 25;\n public static final int DONUT_SILA_BERRY = 26;\n public static final int MOUSSE_TRIPLE_CHOCOLATE = 27;\n public static final int CAKE_PASTEL_RAINBOW = 28;\n public static final int CAKE_CHEESE_SWIRL = 29;\n public static final int MOUSSE_TRIPLE_RASPBERRY = 30;\n public static final int MOUSSE_TRIPLE_LEMON = 31;\n public static final int MOUSSE_TRIPLE_STRAWBERRY= 32;\n\n\n public static final int NUM_TREAT_TYPES = 33;\n public static final int NULL = 100;\n public static final int RED_BEAN_HEART = 101;\n public static final int RED_BEAN_CAKE = 102;\n public static final int BAD_SHROOM = 103;\n public static final int BUFF_MAGNET = 104;\n public static final int CABBAGE = 105;\n public static final int PARTY_BALL = 106;\n public static final int BUFF_PARTY_BALL = 107;\n\n\n\n public void setMove(IObjectMove objMove);\n public IObjectMove getMove();\n public void draw(Canvas canvas);\n public void update(int elapsedTime);\n public Coordinates getCoordinates();\n public int getPoints();\n public Rect getRect();\n public int getRectTop();\n public boolean isDeleted();\n public void reinit(ITreatTypeGood type, int x, int y);\n public void delete();\n public ITreatTypeGood getType();\n}",
"@Override\n\tpublic void eatFood(Food f) {\n\t\t\n\t}",
"@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }",
"public void setNumberOfAnimalSpecies(int numberOfAnimalSpecies) {\n\t\tthis.numberOfAnimalSpecies = numberOfAnimalSpecies;\n\t}",
"boolean isSetObjectives();",
"public Animal(String tipo){\n\t\tthis.tipo = tipo;\n\t}",
"public void bark(){// bark class only belongs to dog class\n System.out.println(name+\" is barking\");\n }",
"@Test\n void penTest() {\n assertEquals(4, pens.length);\n /* Checks that all pens contain the right type of animal */\n assertEquals(pens[0].getClass().getSimpleName(), \"Chicken\");\n assertEquals(pens[1].getClass().getSimpleName(), \"Cow\");\n assertEquals(pens[2].getClass().getSimpleName(), \"Pig\");\n assertEquals(pens[3].getClass().getSimpleName(), \"Sheep\");\n /* Checks that trying to add an animal over the limit dose not affect the list */\n main.farm.newAnimal(new Chicken());\n assertEquals(4, pens.length);\n }",
"public void changeAnimal(Animal newAnimal){\n\t\tthis.myFlyweight = newAnimal;\n\t\tthis.maxAnimationFrame = this.myFlyweight.getMaxAnimationFrame();\n\t}",
"private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }",
"public boolean isAllowed(Player owner, Item item) {\r\n if (item.getValue() > 50000) {\r\n owner.getActionSender().sendMessage(\"This item is too valuable to trust to this familiar.\");\r\n return false;\r\n }\r\n if (!item.getDefinition().isTradeable()) {\r\n owner.getActionSender().sendMessage(\"You can't trade this item, not even to your familiar.\");\r\n return false;\r\n }\r\n if (!owner.getFamiliarManager().getFamiliar().getDefinition().getName().toLowerCase().contains(\"abyssal\")) {\r\n if (item.getId() == 1436 || item.getId() == 7936 || !item.getDefinition().getConfiguration(ItemConfiguration.BANKABLE, true)) {\r\n owner.getActionSender().sendMessage(\"You can't store \" + item.getName().toLowerCase() + \" in this familiar.\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"FuelCan(){\n\t\tsuper();\n\t\tsetSize(randInt(3,6));\n\t}",
"public static void show() {\n Animal.Petdog.sleep();\n\n // The dog is going to bark.\n Animal.Petdog.bark();\n\n // Creating a new chicken and a new pig.\n Animal c= new Chicken();\n Animal g= new Pig();\n\n // The animals are going to sleep.\n c.sleep();\n g.sleep();\n\n // The animals are going to fight with dog.\n c.fightWithDog();\n g.fightWithDog();\n\n // The animals are going to exercise.\n c.exe();\n g.exe();\n\n // Chicken can also run with your set.\n c.exewithset(\"Run\");\n\n // The animals are going to breed.\n c.breed();\n g.breed();\n\n // The animals are going to do shower.\n c.shower();\n g.shower();\n\n // Let's see how many product do we have before animals produce products.\n System.out.println(\"Chicken meat: \" +Chickenmeat.amount+\"\\nEggs: \"+ Eggs.amount) ;\n System.out.println(\"Pork: \" +Pork.amount) ;\n\n // The animals are going to produce external product.\n c.producewithoutdeath();\n g.producewithoutdeath();\n\n // The animals are going to produce internal product.\n c.producewithdeath();\n g.producewithdeath();\n\n // Let's see how many product do we have after animals produce products.\n System.out.println(\"Chicken meat: \" +Chickenmeat.amount+\"\\nEggs: \"+ Eggs.amount) ;\n System.out.println(\"Pork: \" +Pork.amount) ;\n\n // Get currnet states of the animals.\n c.getstate();\n g.getstate();\n\n // The dead animals regain life.\n c.setstate();\n g.setstate();\n c.getstate();\n g.getstate();\n\n\n }",
"public void setEasterEgg(boolean easterEgg){\n\t\tthis.easterEgg = easterEgg;\n\t}",
"public static void TestANIMAL () {\n\t\n\twhen(animalMock.getXP()).thenReturn (1);\n\twhen (animalMock.getXP()).thenThrow(new Exception());\n\twhen (animalMock.isSecret()).thenReturn (true);\n\twhen (animalMock.isEndangered()).thenReturn(false);\n\twhen (animalMock.isBoss()).thenReturn(false);\n\t}",
"public boolean canFly() {\n\t\treturn !isEgg() && !isHatchling();\n\t}",
"public void setBowDamage(short bowDamage);",
"public static void function(Animal a){\n a.eat();\n if (a instanceof Cat){//instanceof 判断指向类型\n Cat c =(Cat)a;\n c.catchMouse();\n }\n else if(a instanceof Dog){\n Dog d =(Dog) a;\n d.kanjia();\n }\n\n }",
"public Food()\n {\n x = (int) Math.floor(Math.random() * RANGEX)*20;\n y = (int) Math.floor(Math.random() * RANGEY)*20;\n isEaten = false;\n }",
"public static void main(String[] args) {\n AnimalBp turtle = new AnimalBp(); \n AnimalBp dog = new AnimalBp();\n AnimalBp cat = new AnimalBp();\n \n \n \n turtle .setType(\"Reptile\");\n String turtleType = turtle.getType();\n \n \n System.out.println(turtleType);\n \n turtle.setnumberOfFeet(4);\n int turtlenumberOfFeet = turtle.getnumberOfFeet();\n \n System.out.println(turtlenumberOfFeet);\n \n turtle.setColor(\"Green\");\n String turtleColor = turtle.getColor();\n \n System.out.println(turtleColor);\n \n turtle.setlaysAnEgg(true);\n boolean turtlelaysAnEgg = turtle.getLaysAnEgg();\n \n System.out.println(turtlelaysAnEgg);\n \n \n dog .setType(\"Mammal\");\n String dogType = dog.getType();\n \n System.out.println(dogType);\n \n dog.setnumberOfFeet(4);\n int dognumberOfFeet = dog.getnumberOfFeet();\n \n System.out.println(dognumberOfFeet);\n \n dog.setColor(\"Brown and White\");\n String dogColor = dog.getColor();\n \n System.out.println(dogColor);\n \n dog.setlaysAnEgg(false);\n boolean doglaysAnEgg = dog.getLaysAnEgg();\n \n System.out.println(doglaysAnEgg);\n \n cat .setType(\"Mammal\");\n String catType = cat.getType();\n \n \n System.out.println(catType);\n \n cat.setnumberOfFeet(4);\n int catnumberOfFeet = cat.getnumberOfFeet();\n \n System.out.println(catnumberOfFeet);\n \n cat.setColor(\"gray\");\n String catColor = cat.getColor();\n \n System.out.println(catColor);\n \n cat.setlaysAnEgg(false);\n boolean catlaysAnEgg = cat.getLaysAnEgg();\n \n System.out.println(catlaysAnEgg);\n }",
"private void createArmy(int size)\n {\n for(int i = 0; i < size; i++)\n {\n int rando = Randomizer.nextInt(10) + 1;\n if(rando < 6 )\n {\n army1.add(new Human());\n } \n else if(rando < 8)\n {\n army1.add(new Dwarf());\n \n }\n else if (rando < 10)\n {\n army1.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army1.add(new Demon()); \n }\n else if(rando == 2)\n {\n army1.add(new CyberDemon());\n }\n else\n {\n army1.add(new Balrog());\n }\n }\n \n rando = Randomizer.nextInt(10) + 1;\n if(rando < 6)\n {\n army2.add(new Human());\n }\n else if (rando < 8)\n {\n army2.add(new Dwarf());\n }\n else if (rando < 10)\n {\n army2.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army2.add(new Demon()); \n }\n else if(rando == 2)\n {\n army2.add(new CyberDemon());\n }\n else\n {\n army2.add(new Balrog());\n }\n } \n }\n \n \n \n \n \n }",
"public int getNumberOfAnimalSpecies() {\n\t\treturn numberOfAnimalSpecies;\n\t}",
"public Axe(boolean der)\r\n {\r\n goRight=der;\r\n contFall=0;\r\n im1=new GreenfootImage(\"axe.png\");\r\n im2=new GreenfootImage(\"axe2.png\");\r\n im3=new GreenfootImage(\"axe3.png\");\r\n im4=new GreenfootImage(\"axe4.png\");\r\n }",
"public static void main(String args[]){\n\n\t\tDog myDog = new Dog();\n\t\t//DomasticAnimal yourDog = new Dog();//valid\n\t\t//Animal herDog = new Dog();//valid\n\t\tmyDog.pet();\n\t\tmyDog.makeNoice();\n\t\tmyDog.sleep();\n\t\tmyDog.eat();\n\t\t\n\t\tLion girLion1 = new Lion();\n\t\t//WildAnimal girLion2 = new Lion();//valid\n\t\t//Animal girLion3 = new Lion();//valid\n\t\tgirLion1.hunt();\n\t\tgirLion1.makeNoice();\n\t\tgirLion1.sleep();\n\t\tgirLion1.eat();\n\t\t\n\t}",
"public abstract boolean attack(PermanentCharm i);",
"public void eat(){\r\n System.out.println(this.animalName + \" eats\");\r\n }",
"public static void main(String[] args) throws IOException {\n AnimalFactory df = new DogFactory();\n AnimalFactory cf = new CatFactory();\n AnimalFactory bf = new BirdFactory();\n \n ArrayList<Dog> dogs = new ArrayList<>();\n ArrayList<Cat> cats = new ArrayList<>();\n ArrayList<Bird> birds = new ArrayList<>();\n \n Scanner reader = new Scanner(System.in);\n String input;\n do {\n System.out.println(\"===== Animal Kennel =====\"); \n System.out.println(\"1. Add animal.\");\n System.out.println(\"2. Talk to animals.\");\n System.out.println(\"0. Exit.\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n \n switch (Integer.parseInt(input)) {\n case 1:\n System.out.println(\"Types of animals to add: \");\n System.out.println(\"1 Dogs\");\n System.out.println(\"2 Cats\");\n System.out.println(\"3 Birds\");\n \n System.out.print(\"Selection: \");\n input = reader.nextLine();\n switch (Integer.parseInt(input)) {\n case 1:\n System.out.println(\"You can add: \");\n System.out.println(\"Labrador\\tPomeranian\\tShepherd\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Dog dog = df.createDog(input);\n if (dog != null) dogs.add(dog);\n break;\n case 2:\n System.out.println(\"You can add: \");\n System.out.println(\"Burmese\\tPersian\\tSiamese\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Cat cat = cf.createCat(input);\n if (cat != null) cats.add(cat);\n break;\n case 3:\n System.out.println(\"You can add: \");\n System.out.println(\"Owl\\tParrot\\tStork\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Bird bird = bf.createBird(input);\n if (bird != null) birds.add(bird);\n break;\n default:\n break;\n }\n break;\n case 2:\n System.out.println(\"And then each of the animals spoke: \");\n dogs.forEach((dog) -> {\n dog.speak();\n });\n cats.forEach((cat) -> {\n cat.speak();\n });\n birds.forEach((bird) -> {\n bird.speak();\n });\n break;\n case 0:\n System.out.println(\"Exiting...\");\n System.exit(0);\n break;\n default:\n System.out.println(\"Choose something from the menu.\");\n break; \n }\n } while (true);\n }",
"public void setFoodHit(boolean b) {\n this.foodHit = b;\n }"
] | [
"0.6065848",
"0.59262216",
"0.59015286",
"0.58934397",
"0.58786947",
"0.5831515",
"0.5654989",
"0.5653939",
"0.5648775",
"0.5620043",
"0.5604316",
"0.5597996",
"0.5564171",
"0.5512096",
"0.5498303",
"0.5475401",
"0.5448028",
"0.54370403",
"0.54225856",
"0.54203707",
"0.5418649",
"0.5403164",
"0.54020405",
"0.5399366",
"0.5370538",
"0.5368852",
"0.53410894",
"0.53259355",
"0.5308348",
"0.5284635",
"0.5283641",
"0.52829164",
"0.5272792",
"0.5268198",
"0.5246808",
"0.52456844",
"0.5240722",
"0.52376",
"0.52329487",
"0.521721",
"0.5216652",
"0.5212672",
"0.52029413",
"0.52024186",
"0.5197627",
"0.5196149",
"0.5192643",
"0.5179826",
"0.51723",
"0.51712596",
"0.51698214",
"0.515591",
"0.51523054",
"0.51500654",
"0.51495224",
"0.51459527",
"0.5141569",
"0.51187086",
"0.5110909",
"0.5101804",
"0.5089831",
"0.50803876",
"0.5075331",
"0.5071211",
"0.5069841",
"0.50679",
"0.50650537",
"0.5061505",
"0.50545955",
"0.5050526",
"0.5047848",
"0.5030566",
"0.5027865",
"0.5027597",
"0.5011297",
"0.49957353",
"0.49919653",
"0.49917072",
"0.49902493",
"0.4984499",
"0.49842978",
"0.49817458",
"0.49784216",
"0.49759582",
"0.49720198",
"0.4970402",
"0.49659452",
"0.49628323",
"0.49610206",
"0.49604708",
"0.4959274",
"0.49585935",
"0.49567893",
"0.49512684",
"0.49487898",
"0.4946794",
"0.49408355",
"0.49391252",
"0.49390292",
"0.49356353"
] | 0.6997202 | 0 |
Creates a fox with age 0 | @Override
public Animal newChild() {
return new Fox(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fox(int age) {\n super(age, randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Fox() {\n super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Fox(Sex sex, int age) {\n super(age, sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Fox(Sex sex) {\n super(randomAge(MAX_AGE), sex, MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }",
"public Female( int age ) {\n\t\tcurrent_age = age;\n\t}",
"public Person()\n\t{\n\t\tthis.age = -1;\n\t\tthis.name = \"Unknown\";\n\t}",
"public Animal(int age){\n this.age = age;\n System.out.println(\"An animal has been created!\");\n }",
"public Animal(int theAge) {\n\t\t// TODO Auto-generated constructor stub\n\t\tage = theAge;\n\t}",
"@Test\n public void testCreate() {\n Geldbetrag zero = factory.create();\n assertEquals(Geldbetrag.ZERO, zero);\n }",
"public Fish(String name, String gender){\n this.name = name;\n this.gender = gender;\n this.value = 10;\n this.eats = whatItEats(new fishFood());\n this.portionSize = 20;\n this.minimumOffspring = 1;\n this.maximumOffspring = 12;\n this.maxAge = 4;\n this.vetCost = 2;\n }",
"public Dog(Integer age, String name) {\n setAge(age);\n setName(name);\n }",
"public AgeData (int age) {\n if (age<0){\n throw new IllegalArgumentException ();\n }\n this.age = age;\n total=1;\n }",
"public Tiger(boolean randomAge) {\n super(randomAge, TIGER.getMaxAge(), rand,\n new LinkedHashMap<Class, Integer>(){{\n put(RABBIT.getSpecies(), 4);\n put(RABBIT.getSpecies(), 8);\n }});\n }",
"public Fish() {\r\n\t}",
"public Patient newPatient(String name, int dob) {\n\n\t\tint thisYear = 2016;\n\t\tint ageLimit = 130;\n\n\t\tif (((thisYear - dob) > ageLimit) || (dob > thisYear)) {\n\t\t\tSystem.out.println(\"The age is not valid\");\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tage = thisYear - dob;\n\t\tid = size;\n\t\tsize++;\n\t\tPatient x = new Patient(size, name, age);\n\t\tSystem.out.println(\"The paitent is called \" + x.name + \" and ID is : \" + x.id + \" and age is: \" + x.age);\n\t\tpatients.add(x);\n\t\treturn x;\n\t}",
"public Person(String inName, int inAge, Gender inGender)\n {\n name = inName;\n age = inAge;\n gender = inGender;\n\n Calendar c = Calendar.getInstance();\n c.set(Calendar.YEAR, c.get(Calendar.YEAR) - age);\n birthdate = c.getTime();\n }",
"@Test\n\tpublic void testCreatePastCarYear() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"Z4\";\n\t\tString _color = \"black\";\n\t\tint _year = 1800;\n\n\t\t// ---------------------------------------------\n\t\t// Creating past year.\n\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\n\t\t}\n\t}",
"Foco createFoco();",
"public MountainGoat(String owner, String age) {\n\t\t// TODO Auto-generated constructor stub \n\t\tsuper(owner, \"Mountain Goat\", age);\n\t \n\t}",
"public Food()\n {\n x = (int) Math.floor(Math.random() * RANGEX)*20;\n y = (int) Math.floor(Math.random() * RANGEY)*20;\n isEaten = false;\n }",
"public Animal(Color color, int age) {\r\n\t\tthis.color = color;\r\n\t\tif (age >= 0) {\r\n\t\t\tthis.age = age;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Animal age must not be less than 0\");\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testCreateFutureCarYear() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"Z4\";\n\t\tString _color = \"black\";\n\t\tint _year = 19900;\n\n\t\t// ---------------------------------------------\n\t\t// Creating a future year.\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\n\t\t}\n\n\t}",
"@Test\n public void TestCreateDog() {\n String expectedName = \"Tyro\";\n Date expectedBirthDate = new Date();\n\n Dog newDog = AnimalFactory.createDog(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newDog.getName());\n Assert.assertEquals(expectedBirthDate, newDog.getBirthDate());\n }",
"public Passenger(String name, int age)\r\n {\r\n this.name = name;\r\n this.age = age;\r\n }",
"@Test\n public void createDogTest() {\n String expected = \"orbit\";\n\n Dog testDog = AnimalFactory.createDog(expected, new Date(0001));\n String actual = testDog.getName();\n\n Assert.assertEquals(expected,actual);\n\n }",
"public Person(String firstName, String lastName) {\r\n name = new Name(firstName, lastName); \r\n id = (int )(Math.random() * 200 + 100);; \r\n }",
"public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}",
"@Override\n\tpublic void create(String name, Integer age) {\n\t\tuserDAO.create(name, age);\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testCreateIllegalThaiMoney() {\n setFactory(\"ThaiMoneyFactory\");\n moneyFactory.createMoney(0.9);\n }",
"public Frog() {\n frogCount += 1; // Modify the value in the constructor\n }",
"public Villager() {\n faction = 0;\n }",
"public Penguin(boolean female) {\n super(female);\n daysRemaining = 12;\n }",
"People(String name, int age) {\n this.name = name;\n this.age = age;\n }",
"@Override\n\tpublic void setGrowingAge(int age) {\n\t\t// managed by DragonLifeStageHelper, so this is a no-op\n\t}",
"public Fish create(){\n\t\tMovementStyle style = new NoMovement();\n\t\treturn new Shark(style);\n\t}",
"public void setAge(int age) {\n\t\tif (age < 0) {\n\t\t\tthis.age = 0;\n\t\t} else {\n\t\t\tthis.age = age;\n\t\t}\n\t}",
"public Student(Integer age) {\n\n this.age = age;\n }",
"@Test\n\tpublic void testZeroCredit()\n\t{\n\t\tMortgage m = new Mortgage(50.0, 200.0, 10.0, 0);\n\t\tassertEquals(false, m.isQualified());\n\t}",
"Person createPerson();",
"private Persons createFather(Persons child, String spouse)\n {\n Persons dad = new Persons();\n dad.setPersonFirstName(nameGenerator.generateMaleName());\n dad.setPersonGender(\"m\");\n dad.setPersonSpouseID(spouse);\n dad.setDescendantID(userName);\n\n if (child.getPersonGender().equals(\"m\")) {\n dad.setPersonLastName(child.getPersonLastName());\n }\n else {\n dad.setPersonLastName(nameGenerator.generateLastName());\n }\n\n return dad;\n }",
"public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }",
"public Builder clearAge() {\n bitField0_ = (bitField0_ & ~0x00000004);\n age_ = 0;\n onChanged();\n return this;\n }",
"public Villager(String name, Gender gender, int age) {\r\n\t\tthis.name = name;\r\n\t\tthis.gender = gender;\r\n\t\tthis.age = age;\r\n\t}",
"public CreateUser(int age, String name){ // constructor\n userAge = age;\n userName = name;\n }",
"public void create(Person p) {\n\t\t\n\t}",
"public Staff(String lastName, String firstName, String idNum, char sex, Calendar birthDate, double hourlyRate)\n\t{\n\t\tsuper(lastName, firstName, idNum, sex, birthDate);\n\t\tthis.hourlyRate = hourlyRate;\n\t}",
"public Fish(String species, String desc)\n {\n super(species, desc);\n toy = \"Jesus net\";\n }",
"Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }",
"public Person1(int age, String name) {\n\t\tsuper();\n\t\tthis.age = age;\n\t\tthis.name = name;\n\t}",
"public Cab() {\r\n fare = 50;\r\n }",
"@Test\n public void TestCreateCat() {\n String expectedName = \"Milo\";\n Date expectedBirthDate = new Date();\n\n Cat newCat = AnimalFactory.createCat(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newCat.getName());\n Assert.assertEquals(expectedBirthDate, newCat.getBirthDate());\n }",
"public Vegetarian(boolean female) {\n super(female);\n }",
"Elevage createElevage();",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public Fish(int yearsToLive, Size size, String color)\n {\n super( yearsToLive, size, color);\n this.areal = \"Sea\";\n }",
"public Villager(int newF) {\n this.faction = newF;\n }",
"public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }",
"public Person() {\n\t\tthis.name = \"Unknown\"; \n\t}",
"public Furnace() {\n\t\tsuper(\"Furnace\"); // Name of the furnace\n\t\tcol = Color.get(-1, 000, 222, 333); // Color of the furnace\n\t\tsprite = 3; // Location of the sprite\n\t\txr = 3; // Width of the furnace (in-game, not sprite) \n\t\tyr = 2; // Height of the furnace (in-game, not sprite) \n\t}",
"public Olympian(String name, Sex sex, int age) {\n this.name = name;\n this.sex = sex;\n this.age = age;\n }",
"public Object setAge(int i) {\n\t\treturn null;\r\n\t}",
"public UserBuilder age(int age) {\n\t\t\tthis.age = age;\n\t\t\treturn this; // return this to make expression chainable.\n\t\t\t\n\t\t}",
"public static void main(String[] args)\n {\n Person person2 = new Person();\n try\n {\n person2.setLifeValue(100);\n person2.setLifeValue(-1);\n }\n catch (NoLifeValueException e)\n {\n System.err.printf(e.getMessage());\n }\n }",
"public Animal(boolean randomAge, Field field, Location location, int breeding_age, int max_age, double breeding_probability, int max_litter_size)\n {\n alive = true;\n age = 0;\n if(randomAge) {\n age = rand.nextInt(max_age);\n }\n this.field = field;\n setLocation(location);\n this.breeding_age = breeding_age;\n this.max_age = max_age;\n this.breeding_probability = breeding_probability;\n this.max_litter_size = max_litter_size;\n gender = Math.random() < 0.5;\n }",
"public Person(String name, double bankroll){\n\n this.name = name;\n this.bankroll = bankroll;\n bet = 0.0;\n activePlayer = true;\n\n }",
"private void fuck(int x, int y) {\n\t\tFish son = new Fish(x, y, this.environment, this.appConfig, this.scheduler);\n\t\tson.color = Color.YELLOW; // yellow when fish is a newborn\n\t\tthis.environment.addAgent(son, x, y);\n\t\tthis.scheduler.birth(son);\n\t\tthis.breedTime = this.appConfig.getFishBreedTime(); // reset breed time\n\t}",
"@Test\n\tpublic void testNagativeSalary()\n\t{\n\t\tMortgage m = new Mortgage(50.0, -100.0, 50.0, 2);\n\t\tassertEquals(false, m.isQualified());\n\t}",
"private Egg(String name, int turnsToHatch, int hatchEarnings, Dinosaur babyDinosaur) {\n super(name, 'O', true);\n this.turnsToHatch = turnsToHatch;\n this.hatchEarnings = hatchEarnings;\n this.babyDinosaur = babyDinosaur;\n this.age = 0;\n }",
"public Person(String n,int d, int m, int y)\n\t{\n\t\tname=n;\n\t\tdob=new Date(d,m,y);\t\n\t}",
"public AnimalBuilder setAge(int age) {\n\t\tthis.age=age;\n\t\treturn this;\n\t}",
"public void set(int spot, int age, String name) {\n\t\tif (spot < pups.length) {\r\n\t\t\tpups[spot] = new Dog(age, name);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No more space\");\r\n\t\t}\r\n\t}",
"public void setAge(int age) {\r\n\t\tif (age >= 0) \r\n\t\t\tthis.age = age;\r\n\t\t//else //ideally we should let the caller know we didn't set the Age\r\n\t}",
"Hurt createHurt();",
"public Person() {\n\t\tname \t= \"\";\n\t\taddress = \"\";\n\t\tcity \t= \"\";\n\t\tage \t= 0;\n\t}",
"public Person(){\n count++;\n System.out.println(\"Creating an object\");\n }",
"public Fruit() {\r\n\t}",
"public PersonaFisica() {}",
"public Student(String name, int age) {\r\n\t\tSystem.out.println(\"kakashi constructor\");\r\n\t\tthis.name = name;\r\n\t\tthis.age = Util.incrementByTen(age);\r\n\t}",
"Dog(int i) {\n\t\tSystem.out.println(\"Woof!\");\n\t}",
"public Customer (String n, int age, boolean shown) {\n name = n; // sets name\n child = ((age <= 16) && (age >= 5));\n student = shown; //sets if the student id was shown\n }",
"public int getAge(int i) {\n\t\treturn 0;\r\n\t}",
"public Fahrzeug() {\r\n this(0, null, null, null, null, 0, 0);\r\n }",
"public BirthInfo() {}",
"public Dog() {\r\n\r\n }",
"@Override\n\tpublic void Age(int age) {\n\t\t\n\t}",
"@Override\r\n\tpublic void create(Person p) \r\n\t{\n\t\t\r\n\t}",
"private Person()\r\n\t{\r\n\t\tsuper();\r\n\t\t//created = LocalDateTime.now();\r\n\t\tcreated = Calendar.getInstance().getTime();\r\n\t}",
"@Override\n\tpublic void setAge () {\n\t\t// defining the random range for age between 1 up to 50\n\t\tint age = 1 + (int)(Math.random()*(3));\n\t\tthis.age = age;\n\t}",
"public ImmutableStudent(int id, String name, Age age) {\n this.name = name;\n this.id = id;\n //this.age = age; //si la Age implementara la interface clonable y el metodo clone desarrolado podriamos =age.clone() poner directo la copia\n //pero como no es asi crearemos un nuevo objeto el cual sera enviado para evitar que modifiquemos el original\n Age cloneAge = new Age();//creamos un nuevo objeto lleno con los mismos parametros que el original\n cloneAge.setDay(age.getDay());//llenamos\n cloneAge.setMonth(age.getMonth());//llenamos\n cloneAge.setYear(age.getYear());//llenamos\n this.age = cloneAge;\n }",
"@Test\r\n\tpublic void test_leap_zero() {\r\n\t\tLeapYear year1940 = new LeapYear(1940);\r\n\t\tLeapYear year2080 = new LeapYear(2080);\r\n\t\tassertTrue(year1940.isLeapYear());\r\n\t\tassertTrue(year2080.isLeapYear());\r\n\r\n\t}",
"public Builder clearAge() {\n \n age_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearAge() {\n \n age_ = 0;\n onChanged();\n return this;\n }",
"public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}",
"private PrivatePerson(String name, int age) {\n super(name, age);\n }",
"Thing createThing();",
"public Ship(int l){\n this.lifePoints=l;\n }",
"public Dice() { \n this(6); /* Invoke the above Dice constructor with value 6. */ \n }",
"public Family(int x1, int x2){\n this.x1 = x1;\n this.x2 = x2;\n this.range = x2 - x1; // Number of doors occupied by the family\n }",
"private Fight() { }",
"public FiveValue() {\n\t\tsuper(ValueType.FIVE);\n\t\t// TODO Auto-generated constructor stub\n\t}"
] | [
"0.7621242",
"0.71393824",
"0.70514643",
"0.66651726",
"0.63045436",
"0.6038033",
"0.59688246",
"0.5880574",
"0.58317107",
"0.5742803",
"0.5742012",
"0.5730225",
"0.5701401",
"0.5657454",
"0.5609297",
"0.5577772",
"0.55723834",
"0.55514973",
"0.5550152",
"0.5544768",
"0.55309063",
"0.55018616",
"0.5496021",
"0.548962",
"0.54834884",
"0.5472101",
"0.54637605",
"0.5417201",
"0.5407479",
"0.5405727",
"0.5405698",
"0.54014117",
"0.54014033",
"0.53960866",
"0.53944564",
"0.53873116",
"0.53758883",
"0.5375713",
"0.5370289",
"0.5367892",
"0.5353939",
"0.53127325",
"0.5310973",
"0.53109497",
"0.5306318",
"0.5305884",
"0.52915174",
"0.5291147",
"0.5289162",
"0.52875787",
"0.5279777",
"0.5277721",
"0.52775586",
"0.5272687",
"0.52698404",
"0.5239531",
"0.5232571",
"0.52216864",
"0.52181494",
"0.52168703",
"0.52138203",
"0.5212218",
"0.5209966",
"0.5206584",
"0.52061605",
"0.52059937",
"0.5198737",
"0.5191187",
"0.51866007",
"0.51803493",
"0.51794016",
"0.51756495",
"0.51686424",
"0.51561546",
"0.51537514",
"0.51523334",
"0.51482314",
"0.5144537",
"0.51387167",
"0.51384586",
"0.513299",
"0.51294994",
"0.5126566",
"0.51217103",
"0.51197326",
"0.5117932",
"0.5112385",
"0.50996697",
"0.5096613",
"0.50910807",
"0.50879407",
"0.50879407",
"0.50878537",
"0.5083975",
"0.5083331",
"0.50746393",
"0.5071741",
"0.50710285",
"0.5064027",
"0.5059046"
] | 0.63658476 | 4 |
This is what the fox does most of the time: it hunts for rabbits. In the process, it might breed, die of hunger, or die of old age. | @Override
public void toLive(Field currentField, Field updatedField, List newAnimals) {
incrementHunger();
// Move towards the source of food if found.
Location newLocation = findFood(currentField, getLocation());
if (newLocation == null) { // no food found - move randomly
newLocation = updatedField.freeAdjacentLocation(getLocation());
}
super.runTime(currentField, updatedField, newAnimals, newLocation);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void hunt();",
"public void hungry()\r\n {\r\n \tSystem.out.println(\"I'm hungry!! Feed me!!\");\r\n \tbarking();\r\n }",
"public void die()\r\n { \r\n say(\"SHREEEEK! I, uh, suddenly feel very faint...\");\r\n\r\n if (type == HERO)\r\n {\r\n // say goodbye and die\r\n System.out.println(\"You died.\");\r\n \r\n }\r\n else if (name.toLowerCase().equals(\"grendel\"))\r\n {\r\n System.out.println(\"You defeated overlord Grendel!\");\r\n System.out.println(\"Thanks for playing!\");\r\n System.exit(0);\r\n }\r\n //not end of the game \r\n else\r\n {\r\n //this person will drop his weapon or armor each with 1/3 chance\r\n if (Game.random(3)==0)\r\n {\r\n if (weapon!=null) \r\n items.add(weapon);\r\n }\r\n if (Game.random(3)==0)\r\n {\r\n if (armor!=null) \r\n items.add(armor);\r\n }\r\n \r\n //create string of items this person had\r\n String thingsDropped = Game.makeQuantityList(items);\r\n if (items.size()==0)\r\n System.out.println(name + \" didn't drop anything\");\r\n else \r\n System.out.println(name + \" dropped: \" + thingsDropped);\r\n \r\n //put this person's things into the room\r\n for (int i=items.size()-1; i>=0; i--)\r\n items.get(i).changeOwner(room);\r\n \r\n room.remove(this);\r\n System.out.println();\r\n System.out.println(room.otherPeopleString() + \"\\n\" + room.thingString());\r\n room = null;\r\n }\r\n }",
"@Override\n\tpublic void decide() {\n\t\tif (this.isDead) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(this.age >= this.lifeSpan) {\n\t\t\t// DIE\n\t\t\tthis.environment.removeAgent(this.getPosX(), this.getPosY());\n\t\t\tthis.isDead = true;\n\n\t\t\t// Print if required\n\t\t\tif (this.appConfig.hasTrace()) {\n\t\t\t\tSystem.out.println(\"Agent;Death;Fish;\" + this.getPosX() + \";\" + this.getPosY());\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\tthis.age++;\n\t\tthis.color = Color.GREEN;\n\t\tboolean canFuck = this.breedTime == 0;\n\n\t\tint[] coordinates = this.chooseCoordinates();\n\n\t\t// fish cannot move or fuck because there is no place to do so\n\t\tif (coordinates == null) {\n\t\t\tthis.breedTime = this.breedTime > 0 ? this.breedTime - 1 : this.breedTime;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.environment.moveAgent(this, coordinates[0], coordinates[1]);\n\n\t\t// Time to fuck-zer\n\t\tif (canFuck) {\n\t\t\tthis.fuck(this.getPosX(), this.getPosY());\n\t\t}\n\t\t// Update breedtime in order to wait the holy fuck time\n\t\telse {\n\t\t\tthis.breedTime = this.breedTime > 0 ? this.breedTime - 1 : this.breedTime;\n\t\t}\n\t\tthis.posX = coordinates[0];\n\t\tthis.posY = coordinates[1];\n\t}",
"void breed() {\n\t\tSystem.out.println(\"Ape breeding\");\n\t}",
"public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }",
"public void reduceAnimalHappiness() {\n\t\thappiness -= 10;\n\t}",
"@Test\n public void test_BoostOnDies() {\n addCard(Zone.HAND, playerA, \"Silumgar Scavenger\", 1); // {4}{B}\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 5);\n //\n addCard(Zone.BATTLEFIELD, playerA, \"Balduvian Bears\", 1);\n\n // cast and exploit\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Silumgar Scavenger\");\n setChoice(playerA, true); // yes, exploit\n addTarget(playerA, \"Balduvian Bears\");\n\n checkPermanentCounters(\"boost\", 1, PhaseStep.BEGIN_COMBAT, playerA, \"Silumgar Scavenger\", CounterType.P1P1, 1);\n checkAbility(\"boost\", 1, PhaseStep.BEGIN_COMBAT, playerA, \"Silumgar Scavenger\", HasteAbility.class, true);\n\n setStopAt(1, PhaseStep.END_TURN);\n setStrictChooseMode(true);\n execute();\n }",
"public void eat() {\n if (!isTired()) {\n hunger -= 3;\n fatigue += 2;\n\n if (!muted) {\n System.out.println(\"eat\\t\\t|\\tYummy this is tasty!\");\n }\n }\n }",
"private void fuck(int x, int y) {\n\t\tFish son = new Fish(x, y, this.environment, this.appConfig, this.scheduler);\n\t\tson.color = Color.YELLOW; // yellow when fish is a newborn\n\t\tthis.environment.addAgent(son, x, y);\n\t\tthis.scheduler.birth(son);\n\t\tthis.breedTime = this.appConfig.getFishBreedTime(); // reset breed time\n\t}",
"void breed()\n {\n roaches *= 2;\n }",
"public void fish(int rod)\n\t{\n\t\tif(lastFishingTime + 1000 < System.currentTimeMillis())\n\t\t{\n\t\t\tif(getMap().caughtFish(this, getFacing(), rod))\n\t\t\t{\n\t\t\t\tPokemon p = getMap().getWildPokemon(this);\n\t\t\t\t/* If we have both the required level to fish this thing up and the rod to do it. */\n\t\t\t\tif(getFishingLevel() >= DataService.getFishDatabase().getFish(p.getSpeciesName()).getReqLevel() && rod >= DataService.getFishDatabase().getFish(p.getSpeciesName()).getReqRod())\n\t\t\t\t{\n\t\t\t\t\taddFishingExp(DataService.getFishDatabase().getFish(p.getSpeciesName()).getExperience());\n\t\t\t\t\tensureHealthyPokemon();\n\t\t\t\t\tm_battleField = new WildBattleField(DataService.getBattleMechanics(), this, p);\n\t\t\t\t}\n\t\t\t\t/* If you either have too low a fishing level or too weak a rod. */\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.FISH_GOT_AWAY);\n\t\t\t\t\tgetSession().Send(message);\n\t\t\t\t\taddFishingExp(10); \t// Conciliatory exp for \"hooking\" something even if it got away\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(getMap().facingWater(this, getFacing()))\n\t\t\t\t{\n\t\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.CAUGHT_NOTHING);\n\t\t\t\t\tgetSession().Send(message);\n\t\t\t\t\taddFishingExp(1);\t\t\t// Complementary exp for trying to fish.\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetFishing(false);\n\t\t}\n\t}",
"public void die(){\n\t\tboolean success = false;\n\t\ttile.setAnimal(null);\n\t\treleasePandas();\n\n\t\twhile(!success){\n\t\t\tRandom rng = new Random();\n\t\t\tInteger idx =rng.nextInt(gf.gp.getTiles().size());\n\t\t\tif(gf.gp.getTiles().get(idx).getAnimal() == null && gf.gp.getTiles().get(idx).getEntity() == null) {\n\t\t\t\tsuccess = spawn(gf.gp.getTiles().get(idx)); break;\n\t\t\t}\n\t\t}\n\t}",
"public void breath() {\n\t\tif (alive) {\n\t\t\t_age++;\n\t\t\t// Respiration process\n\t\t\tboolean canBreath = useEnergy(Math.min((_mass - _lowmaintenance) / Utils.SEGMENT_COST_DIVISOR, _energy));\n\t\t\tif ((_age >> 8) > _geneticCode.getMaxAge() || !canBreath) {\n\t\t\t\t// It's dead, but still may have energy\n\t\t\t\tdie(null);\n\t\t\t} else {\n\t\t\t\tif (_energy <= Utils.tol) {\n\t\t\t\t\talive = false;\n\t\t\t\t\t_world.decreasePopulation();\n\t\t\t\t\t_world.organismHasDied(this, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// The corpse slowly decays\n\t\t\tuseEnergy(Math.min(_energy, Utils.DECAY_ENERGY));\n\t\t}\n\t}",
"public void testBurger() {\n\t\t\n//\t\t//Burger\n//\t\tBurger b = new Burger(false);\n//\t\tb.changePatties(\"Beef\");\n\t\t\n//\t\t//Double Baron Burger\n//\t\tBurger b = new Burger(true);\n//\t\tb.addPatty();\n//\t\tb.changePatties(\"Beef\");\n\t\t\n\t\t//Triple Chicken Burger with Onions Cheese but Cheddar\n\t\tBurger b = new Burger(false);\n\t\tb.addCategory(\"Cheese\");\n\t\tb.addIngredient(\"Onions\");\n\t\tb.removeIngredient(\"Cheddar\");\n\t\tb.addPatty();\n\t\tb.addPatty();\n\t\tb.changePatties(\"Chicken\");\n\n\t\tSystem.out.println(PROCESS_ORDER + \": ThisIsUnkonwBurger\");\n\t\tSystem.out.println(b.toString());\n\t}",
"public void throwBait() {\n\t\tpokemon.eatBait();;\n\t}",
"public void tick() {\n\t\tthis.hunger += 1;\n\t\tthis.thirst += 1;\n\t\tthis.tiredness += 1;\n\t\tthis.boredom += 1;\n\t\tthis.age += 1;\n\t\tif (this.getHunger() > 90 && this.getHunger() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" may need to be fed!\");\n\t\t}\n\t\tif (this.getThirst() > 90 && this.getThirst() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" seems to be thirsty!\");\n\t\t}\n\t\tif (this.getSleep() > 95 && this.getSleep() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" may be tired!\");\n\t\t}\n\t\tif (this.getPlay() > 95 && this.getPlay() < 100) {\n\t\t\tSystem.out.println(this.getVirtualPetName() + \" seems to be bored. Please play with it!\");\n\t\t}\n\t}",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"Woof! Woof! *Crunch!*\");\n\t}",
"public void bake() {\n\t\twhile(true) {\n\t\t\tSystem.out.print(\"attempting to bake 1 souffle...\");\n\t\t\tif(Math.random() < 0.5) {\n\t\t\t\tSystem.out.println(\"success!\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"but it didn't rise\");\n\t\t\t\tprepare();\n\t\t\t}\n\t\t}\n\t}",
"void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}",
"@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }",
"@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n Weapon w = new Weapon(\"lock rifle\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.getWeapons().add(w);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n RealPlayer victim1 = new RealPlayer('y', \"ciccia1\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n victim1.setPlayerPosition(Board.getSpawnpoint('b'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim1);\n try{\n p.getPh().getWeaponDeck().getWeapon(w.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPb().getMarkedDamages('b') == 1 && victim1.getPb().countDamages() == 0 && victim1.getPb().getMarkedDamages('b') == 1 );\n }",
"@Test\n\tpublic void redberriesContractRedberriesDead()\n\t{\n\t\tfinal FarmingPatch patch = farmingGuildPatches.get(Varbits.FARMING_4772);\n\n\t\tassertNotNull(patch);\n\n\t\twhen(farmingTracker.predictPatch(patch))\n\t\t\t.thenReturn(new PatchPrediction(Produce.REDBERRIES, CropState.DEAD, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.REDBERRIES);\n\n\t\tassertEquals(SummaryState.IN_PROGRESS, farmingContractManager.getSummary());\n\t\tassertEquals(CropState.DEAD, farmingContractManager.getContractCropState());\n\t}",
"@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }",
"public void war() {\r\n while ((safeCount(survivors) > 0) && (safeCount(zombies) > 0)) {\r\n // Make each survivor attack every zombie\r\n attack(survivors, zombies);\r\n\r\n // Make each zombie attack every survivor\r\n attack(zombies, survivors);\r\n }\r\n\r\n // Print number of survivors that made to safety.\r\n warResult();\r\n }",
"public void killAndHunt() {\n\t\tRandom random = new Random();\n\t\tint currentIndex = random.nextInt(N);\t\n\t\tkill(currentIndex);\n\t}",
"public void run() {\n Set<Philosopher> disabledPhils = new HashSet<Philosopher>();\r\n // True if last philosopher who tried to eat succeed\r\n boolean wasAttemptSuccessful = false;\r\n final long startTime = System.currentTimeMillis();\r\n while (System.currentTimeMillis() - startTime < runningTime) {\r\n if (wasAttemptSuccessful || hungryPhils.isEmpty()) {\r\n hungryPhils.addAll(disabledPhils);\r\n disabledPhils.clear();\r\n }\r\n Philosopher philBeingServed = null;\r\n try {\r\n philBeingServed = hungryPhils.take(); // get phil with the highest priority\r\n disabledPhils.add(philBeingServed);\r\n if (forks.get(philBeingServed.id).attempt(1)) { // Could use tryLock instead\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.println(\"[\" + philBeingServed.id + \"] took left fork\");\r\n }\r\n if (forks.get(philBeingServed.id + 1).attempt(Math.round(Math.random() *\r\n (MAX_ATTEMPT_TIME + 1)))) {\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.println(\"[\" + philBeingServed.id + \"] took right fork\");\r\n }\r\n philBeingServed.giveMeal();\r\n disabledPhils.remove(philBeingServed);\r\n wasAttemptSuccessful = true;\r\n } else {\r\n wasAttemptSuccessful = false;\r\n forks.get(philBeingServed.id).release();\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.println(\"[\" + philBeingServed.id + \"] put left fork\");\r\n }\r\n }\r\n } else {\r\n wasAttemptSuccessful = false;\r\n }\r\n } catch (InterruptedException e) {\r\n if (philBeingServed != null) {\r\n forks.get(philBeingServed.id).release();\r\n forks.get(philBeingServed.id + 1).release();\r\n }\r\n e.printStackTrace();\r\n }\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.printf(\"\\n\\n\"); // Kinda delimiter\r\n FireStarter.isDebugEnabled = false; // Stop producing messages from philosophers\r\n }\r\n }\r\n }",
"@Test\n void doEffectsledgehammer() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"sledgehammer\");\n Weapon w13 = new Weapon(\"sledgehammer\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w13);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w13.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w13.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w13.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(10));\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w13.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(6));\n }",
"@Override\r\n\tpublic void cookChicken(int noOfChicken) {\n System.out.println(\"please place the chicken in the grill machine\");\r\n grillmachine.setState(grillmachine.getCookingState());\r\n\t}",
"Faucet startWashingHands(String person);",
"@Test\n\tpublic void redberriesContractCadavaDead()\n\t{\n\t\tfinal FarmingPatch patch = farmingGuildPatches.get(Varbits.FARMING_4772);\n\n\t\tassertNotNull(patch);\n\n\t\twhen(farmingTracker.predictPatch(patch))\n\t\t\t.thenReturn(new PatchPrediction(Produce.CADAVABERRIES, CropState.DEAD, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.REDBERRIES);\n\t\tassertEquals(SummaryState.OCCUPIED, farmingContractManager.getSummary());\n\t}",
"@Test\n void doEffectrailgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"railgun\");\n Weapon w11 = new Weapon(\"railgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w11);\n p.setPlayerPosition(Board.getSpawnpoint('r'));\n p.getPh().drawWeapon(wd, w11.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n }",
"public void die(){\n \tif (resetdelay<=0){ //if he didn't just die\r\n \t\tresetdelay = 100; //gives the frog 100 frames of invincibility\r\n \t\tlives-=1;\r\n \t}\r\n }",
"public void ruff() {\n System.out.println(\"The dog says ruff.\");\n }",
"@Test\n\tvoid testDealBackDamage() {\n\t\tthis.miner.shoot();\n\t\tassertEquals(mRUtil.dwarfMiner_hp - (mRUtil.pickaxe_damage/mRUtil.saphir_returnedDamageRatio), this.miner.getHp(), \"Case: Damage taken by the Miner from saphir\");\n\n\t\tthis.saphir.setHp(50); // reset hp to 50\n\t\tthis.soldier.shoot();\n\t\tassertEquals(mRUtil.dwarfSoldier_hp - (mRUtil.rocket_damage/mRUtil.saphir_returnedDamageRatio),this.soldier.getHp(), \"Case: Damage taken by the Soldier from saphir\");\n\n\t\tthis.saphir.setHp(50);\n\t\tthis.demolitionist.shoot();\n\t\tassertEquals(mRUtil.dwarfDemolitionist_hp - (mRUtil.dynamite_damage/mRUtil.saphir_returnedDamageRatio),this.demolitionist.getHp(), \"Case: Damage taken by the Demolitionist from saphir\");\n\n\t\tthis.saphir.setHp(50);\n\t\tthis.scientist.shoot();\n\t\tassertEquals(mRUtil.dwarfScientist_hp - (mRUtil.potion_damage/mRUtil.saphir_returnedDamageRatio),this.scientist.getHp(), \"Case: Damage taken by the Scientist from saphir\");\n\t}",
"@Test\n void doEffectflamethrower() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"flamethrower\");\n Weapon w7 = new Weapon(\"flamethrower\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w7);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w7.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n Terminator t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1);\n\n players.get(1).setPlayerPosition(Board.getSquare(5));\n try{\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"base\", null, null, p, players, null); //\"A choice of yours is wrong\"\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1);\n\n players.remove(1);\n\n try {\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n RealPlayer p2 = new RealPlayer('v', \"ciccia\");\n p2.setPlayerPosition(Board.getSquare(1));\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.clear();\n s.add(victim.getPlayerPosition());\n s.add(t.getPlayerPosition());\n\n try {\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"alt\", null, null, p, null, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p2.getPb().countDamages() == 2 && t.getPb().countDamages() == 1);\n }",
"private int heavyAttack() {\n return attack(6, 2);\n }",
"public void animalDontEat()\n {\n if(animalHungry)\n {\n map.deadAnimalOnMap(this);\n }\n }",
"protected boolean canBreed()\n {\n return age >= breeding_age;\n }",
"public void think() {\n\t\t\n\t}",
"public abstract void die();",
"public abstract void die();",
"private void tryToKillStuff(final Bomb b) {\n \t\tfor (Bomb bomb : bombs)\n \t\t\tif (bomb != b && !bomb.isCurrentlyExploding())\n \t\t\t\tif (eac.isInExplosionArea(b, bomb)) {\n \t\t\t\t\tbomb.goBomf();\n \t\t\t\t}\n \n \t\tif (eac.isInExplosionArea(b, bman.get(0))) {\n \t\t\talive = false;\n \t\t\tgui.lost();\n \t\t}\n \t}",
"void Dogs() {\n \n }",
"@Test\n public void testDiesByDamage() {\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 1);\n addCard(Zone.HAND, playerA, \"Lightning Bolt\");\n addCard(Zone.BATTLEFIELD, playerB, \"Dryad Militant\");\n\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Lightning Bolt\", \"Dryad Militant\");\n setStopAt(1, PhaseStep.BEGIN_COMBAT);\n execute();\n \n assertLife(playerB, 20);\n \n assertExileCount(\"Lightning Bolt\", 1);\n }",
"public void burry()\n\t{\n\t\tworld.death();\n\t\ttimerList.clear();\n\t\tif(hospitalNeed != null && hospitalNeed.isAlive())\n\t\t\thospitalNeed.interrupt();\n\t}",
"@Override\n public void die() {\n _brain.mouth.say(\"aaarrrrrgggh...\");\n }",
"@Override\n public void eat() {\n System.out.println(\"Now doggo is eating\");\n chew();\n super.eat();\n }",
"@Test\n void doEffectcyberblade(){\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"cyberblade\");\n Weapon w20 = new Weapon(\"cyberblade\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w20);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w20.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n }",
"private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}",
"public void makeHappy() {\n while (statusEnum() != TamagotchiMood.HAPPY) {\n if (!isHungry() && !isTired()) {\n play();\n } else if (isHungry() && !isTired()) {\n eat();\n } else {\n sleep();\n }\n }\n\n if (!muted) {\n System.out.println(\"I can do thing on my own now and will rule the world! MUHAHAHA!\");\n }\n }",
"@Override\n public boolean doAction(String inputs) {\n Random rand = new Random();\n\n // Game variables\n String[] animals = {\"Elk\", \"Bear\", \"Buffalo\"};\n int maxAnimalAlertness = 75;\n int huntEnergyDrain = 35;\n\n // Player variables\n int energy = 100;\n int alertnessDamage = 50;\n int numDryBread = 2;\n int dryBreadHealAmount = 30;\n int energizedByHunt = 35; // Percentage\n\n boolean running = true;\n\n this.console.println(\"Welcome to the hunt!\");\n\n GAME:\n while (running) {\n this.console.println(\"----------------------------------------------\");\n\n int animalAlertness = rand.nextInt(maxAnimalAlertness);\n String animal = animals[rand.nextInt(animals.length)];\n this.console.println(\"\\t# \" + animal + \" has been spotted! #\\n\");\n\n OUTER:\n while (animalAlertness > 0) {\n this.console.println(\"\\tYour energy level: \" + energy);\n this.console.println(\"\\t\" + animal + \"'s alertness: \" + animalAlertness);\n this.console.println(\"\\n\\tWhat would you like to do?\");\n this.console.println(\"\\t1. Shoot\");\n this.console.println(\"\\t2. Eat some dry bread\");\n this.console.println(\"\\t3. Run!\");\n String input = null;\n try {\n input = this.keyboard.readLine();\n } catch (IOException ex) {\n ErrorView.display(this.getClass().getName(), ex.getMessage());\n }\n switch (input) {\n case \"1\":\n int shotDealt = rand.nextInt(alertnessDamage);\n int damageEnergy = rand.nextInt(huntEnergyDrain);\n animalAlertness -= shotDealt;\n energy -= damageEnergy;\n this.console.println(\"\\t> You hit the \" + animal + \" with \" + shotDealt + \"% damage.\");\n this.console.println(\"\\t> You used \" + damageEnergy + \"% of your energy!\");\n if (energy < 1) {\n this.console.println(\"\\t> You have used all your energy reserves.\");\n break OUTER;\n }\n break;\n case \"2\":\n if (numDryBread > 0) {\n energy += dryBreadHealAmount;\n numDryBread--;\n this.console.println(\"\\t> You ate some dry bread, rejuvinating yourself by \" + dryBreadHealAmount + \"%.\"\n + \"\\n\\t> You now have \" + energy + \" % energy.\"\n + \"\\n\\t> You have \" + numDryBread + \" dry bread left.\\n\");\n } else {\n this.console.println(\"\\t> You have no Dry Bread left! Shoot well so you can get some meat!\\n\");\n }\n break;\n case \"3\":\n this.console.println(\"\\tYou run away from the \" + animal + \"!\");\n continue GAME;\n default:\n this.console.println(\"\\tInvalid command!\");\n break;\n }\n }\n\n if (energy < 1) {\n this.console.println(\"You limp away from the hunt, too weak to carry any meat.\");\n break;\n }\n\n this.console.println(\"----------------------------------------------\");\n this.console.println(\" # \" + animal + \" was shot! # \");\n this.console.println(\" # You now have \" + energy + \"% of your energy left. # \");\n if (rand.nextInt(100) < energizedByHunt) {\n numDryBread++;\n this.console.println(\" # You could return to camp. # \");\n\n }\n this.console.println(\"----------------------------------------------\");\n this.console.println(\"What would you like to do now?\");\n this.console.println(\"1. Continue hunting\");\n this.console.println(\"2. Leave the hunt\");\n\n String input = null;\n try {\n input = this.keyboard.readLine();\n } catch (IOException ex) {\n ErrorView.display(this.getClass().getName(), ex.getMessage());\n }\n\n while (!input.equals(\"1\") && !input.equals(\"2\")) {\n this.console.println(\"Invalid command!\");\n try {\n input = this.keyboard.readLine();\n } catch (IOException ex) {\n ErrorView.display(this.getClass().getName(), ex.getMessage());\n }\n }\n\n if (input.equals(\"1\")) {\n this.console.println(\"You continue on your adventure!\");\n } else if (input.equals(\"2\")) {\n this.console.println(\"You return to the wagon train laden with meat for all!\");\n break;\n }\n }\n this.console.println(\"########################\");\n this.console.println(\"# Thanks for hunting #\");\n this.console.println(\"########################\");\n return false;\n }",
"public void thrash();",
"private void Dead() {\n\t\thunger -= 5;\n\t\tthirst -= 5;\n\t\tif ((thirst < 25) && (hunger < 25)){\t\t\t// Player is very weak\n\t\t\thealth -= 15;\n\t\t}else if ((thirst < 25) || (hunger < 25)){\t\t// Player is kinda weak\n\t\t\thealth -= 5;\n\t\t}\n\t\tif (health <= 0){\t\t\t\t\t\t\t\t// Player is dead\n\t\t\taddMessage(\"Overcome by your weakness you succumb.\", \"AI\");\n\t \t\taddMessage(\"You have died\", \"AI\");\n\t \t\tmenu = MENU.GAME_OVER;\n\t\t}\n\t}",
"public void recover(){\n\tint hp = (int)((Math.random() * health)*.5);\n\n\thealth += hp;\n\t\t\n\tSystem.out.print(\"You catch your breath and pick yourself up. Recover : \");\n\tSystem.out.print(hp);\n\tSystem.out.println(\" health.\\n\"); \n }",
"private void reviveAttacker() {\n\t\tString type = (mRandom.nextFloat() > mKnightSpawnChance) ? \"normal\" : \"knight\";\n\t\treviveAttacker(type);\n\t}",
"public static void bear1() {\n System.out.println(\"She swallowed the bear to catch the dog,\");\n dog1();\n }",
"public static void main(String[] args) {\n//// vlad.takeDamage(8);\n//// vlad.showInfo();\n\n VampyreKing Dimitri = new VampyreKing(\"Dimitri\");\n// Dimitri.showInfo();\n// Dimitri.takeDamage(16);\n// Dimitri.showInfo();\n Dimitri.showInfo();\n\n while (Dimitri.getLives() > 0){\n if (Dimitri.dodges()){\n continue;\n }\n if (Dimitri.runAway()){\n System.out.println(\"Dimitri Ran Away\");\n break;\n\n }else{\n Dimitri.takeDamage(16);\n Dimitri.showInfo();\n }\n\n }\n }",
"public void suffer(int hits)\r\n {\r\n health = health - hits;\r\n if (health < 0)\r\n health = 0;\r\n if (hits == 0)\r\n say(\"Hahaha! I defened myself with \" + armor.getName() + \" and still have \" + health + \" left!\");\r\n else\r\n say(\"Ouch! \" + hits + \" hits is more than I want! I only have \" + health + \" left!\");\r\n if (health <= 0)\r\n die();\r\n }",
"public void tick(){\n oilLevel --;\n maintenance --;\n happiness --;\n health --;\n boredom ++;\n }",
"private void takeDamage(int damage){ health -= damage;}",
"protected void boilWater() { \n System.out.println(\"Boiling water\");\n }",
"public void fight() {\n\t\tif(roamingAstronauts <= 0 || roamingAliens <= 0){\n\t\t\tSystem.out.println(\"Error: Need at least 1 astronaut & alien to fight.\");\n\t\t\treturn;\n\t\t}\n\t\tAstronaut a = getRandomAstronaut();\n\t\ta.damage();\n\t\tSystem.out.println(\"The astronaut fought the alien & the alien won.\\nAstronaut takes 1 point of damage.\");\n\t}",
"private void fish()\n {\n fishing.set(true);\n final int DELAY_VARIANCE = 5000, BASE_SLEEP = 2000;\n\n Tools.sleep(BASE_SLEEP);\n while (!interrupted)\n {\n /* Logout if either the user set a logout time or we ran out of lures. */\n final LocalTime logTime = timeProperty.get();\n if ((logTime != null && Tools.timePassed(logTime))\n || (lureQuit.get() && lure.isOutOfLures()))\n {\n Tools.typeStr(Lang.EN_LOGOUT);\n Controller.sendMessage(Lang.EN_MSG_LOGOUT_CONFIRM);\n break;\n }\n\n /* If a lure needs to be re-applied, use one. */\n if (lure.shouldApply()) lure.apply();\n\n Tools.typeStr(Lang.EN_CAST_FISHING);\n if (scan())\n Controller.sendMessage(reelIn() ? Lang.EN_MSG_FISH_CAUGHT\n : Lang.EN_ERROR_SPLASH_MISSING);\n else\n Controller.sendMessage(Lang.EN_ERROR_BOBBER_MISSING);\n /* Sleep for at least BASE_SLEEP plus an additional random amount. */\n Tools.sleep(BASE_SLEEP + Tools.fluctuate((long) (DELAY_VARIANCE * Math.random())));\n }\n fishing.set(false);\n }",
"static void red_fight() {\n monsterchoices_y_r = arenafight_r.nextInt(4);\n if(monsterchoices_y_r == 0){\n System.out.println(\"You encountered a gigantic ape...\");\n gigantic_ape();\n System.out.println(\"\\n\");\n }else if(monsterchoices_y_r == 1) {\n System.out.println(\"You encountered a hungry gorilla...\");\n gorilla();\n System.out.println(\"\\n\");\n }else if(monsterchoices_y_r == 2) {\n System.out.println(\"You encountered a bloodthristy pack of wolves...\");\n pack_of_wolves();\n System.out.println(\"\\n\");\n }else if (monsterchoices_y_r == 3) {\n System.out.println(\"You encountered a King Snake...\");\n rattle_snake();\n System.out.println(\"\\n\");\n }\n }",
"public void barking()\r\n {\r\n \tSystem.out.println (\"Woof Woof\");\r\n }",
"@Test\n\tpublic void cabbageContractCabbageDeadAndCabbageDiseased()\n\t{\n\t\tfinal FarmingPatch patch1 = farmingGuildPatches.get(Varbits.FARMING_4773);\n\t\tfinal FarmingPatch patch2 = farmingGuildPatches.get(Varbits.FARMING_4774);\n\n\t\tassertNotNull(patch1);\n\t\tassertNotNull(patch2);\n\n\t\t// Specify the two allotment patches\n\t\twhen(farmingTracker.predictPatch(patch1))\n\t\t\t.thenReturn(new PatchPrediction(Produce.CABBAGE, CropState.DISEASED, 0, 2, 3));\n\t\twhen(farmingTracker.predictPatch(patch2))\n\t\t\t.thenReturn(new PatchPrediction(Produce.CABBAGE, CropState.DEAD, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.CABBAGE);\n\n\t\tassertEquals(SummaryState.IN_PROGRESS, farmingContractManager.getSummary());\n\t\t// Prefer diseased cabbages\n\t\tassertEquals(CropState.DISEASED, farmingContractManager.getContractCropState());\n\t}",
"@Test\n void doEffecthellion() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"hellion\");\n Weapon w5 = new Weapon(\"hellion\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w5);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w5);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w5.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n Terminator t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n players.clear();\n players.add(victim);\n players.add(t);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 2 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 2);\n }",
"public void repair(){\n if(health < 9) {\n this.health++;\n }\n }",
"public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}",
"@Override\n public int damage(){\n int damage = 0;\n Random rand = new Random();\n int x = rand.nextInt(20) + 1;\n if (x == 1)\n damage = 50;\n return damage; \n }",
"public void defend(){\n\tdefense += (int)(Math.random() * defense * .45 + 5);\n\tstrength -= 3;\n\tif (defense > 70) {\n\t defense = 70;\n\t}\t \n\tcounterDef += 1;\n\tif (counterDef == 2){\n\t counterDef = 0;\n\t recover();\n\t}\n\tSystem.out.println(\"You brace yourself with your bow.\");\n }",
"boolean takeDamage(int dmg);",
"public void fight();",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Nature provides birdy the ability to fly.\");\n\t\tSystem.out.println(\"Nature doesn't give kitty the abilty to fly.\");\n\t\tCat kitty = new Cat(\"kitty\", 6f, new NoFlyingAbilty());\n\t\tSparrow birdy = new Sparrow(\"birdy\", 0.3f,\n\t\t\t\tnew SparrowLikeFlyingAbility());\n\n\t\t// Nature tests the flying abilities.\n\t\tSystem.out.println(\"\\nNature asks kitty to fly.\");\n\t\tkitty.getFlyingAbility().fly();\n\t\tSystem.out.println(\"\\nNature asks birdy to fly.\");\n\t\tbirdy.getFlyingAbility().fly();\n\n\t\t// Nature feels sad that kitty cannot fly, gives it flying capabilities.\n\t\tSystem.out\n\t\t\t\t.println(\"\\nNature gives kitty the power to fly like an eagle.\");\n\t\tkitty.changeFlyingAbility(new EagleLikeFlyingAbility());\n\n\t\t// And now nature asks the kitty to spread its wings.\n\t\tSystem.out.println(\"\\nNature asks the kitty to spread its wings.\");\n\t\tkitty.getFlyingAbility().fly();\n\t}",
"void doEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 87 */ if ((!target.isMailBox() && !target.isSpringFilled() && !target.isPuppet() && \n/* 88 */ !target.isUnenchantedTurret() && !target.isEnchantedTurret()) || (target\n/* 89 */ .hasDarkMessenger() && !target.isEnchantedTurret())) {\n/* */ \n/* 91 */ performer.getCommunicator().sendNormalServerMessage(\"The spell fizzles.\", (byte)3);\n/* */ return;\n/* */ } \n/* 94 */ if (target.isUnenchantedTurret() || target.isEnchantedTurret()) {\n/* */ \n/* 96 */ int spirit = Zones.getSpiritsForTile(performer.getTileX(), performer.getTileY(), performer.isOnSurface());\n/* 97 */ String sname = \"no spirits\";\n/* 98 */ int templateId = 934;\n/* 99 */ if (spirit == 4) {\n/* */ \n/* 101 */ templateId = 942;\n/* 102 */ sname = \"There are plenty of air spirits at this height.\";\n/* */ } \n/* 104 */ if (spirit == 2) {\n/* */ \n/* 106 */ templateId = 968;\n/* 107 */ sname = \"Some water spirits were closeby.\";\n/* */ } \n/* 109 */ if (spirit == 3) {\n/* */ \n/* 111 */ templateId = 940;\n/* 112 */ sname = \"Earth spirits are everywhere below ground.\";\n/* */ } \n/* 114 */ if (spirit == 1) {\n/* */ \n/* 116 */ sname = \"Some nearby fire spirits are drawn to your contraption.\";\n/* 117 */ templateId = 941;\n/* */ } \n/* 119 */ if (templateId == 934) {\n/* */ \n/* 121 */ performer.getCommunicator().sendAlertServerMessage(\"There are no spirits nearby. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* 125 */ if (target.isUnenchantedTurret()) {\n/* */ \n/* 127 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* 128 */ target.setTemplateId(templateId);\n/* 129 */ target.setAuxData(performer.getKingdomId());\n/* */ }\n/* 131 */ else if (target.isEnchantedTurret()) {\n/* */ \n/* 133 */ if (target.getTemplateId() != templateId) {\n/* */ \n/* 135 */ performer.getCommunicator().sendAlertServerMessage(\"The nearby spirits ignore your contraption. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 140 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* */ } \n/* */ } \n/* */ \n/* 144 */ ItemSpellEffects effs = target.getSpellEffects();\n/* 145 */ if (effs == null)\n/* 146 */ effs = new ItemSpellEffects(target.getWurmId()); \n/* 147 */ SpellEffect eff = effs.getSpellEffect(this.enchantment);\n/* 148 */ if (eff == null) {\n/* */ \n/* 150 */ performer.getCommunicator().sendNormalServerMessage(\"You summon nearby spirits into the \" + target\n/* 151 */ .getName() + \".\", (byte)2);\n/* */ \n/* 153 */ eff = new SpellEffect(target.getWurmId(), this.enchantment, (float)power, 20000000);\n/* 154 */ effs.addSpellEffect(eff);\n/* 155 */ Server.getInstance().broadCastAction(performer\n/* 156 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 157 */ .getName() + \".\", performer, 5);\n/* 158 */ if (!target.isEnchantedTurret()) {\n/* 159 */ target.setHasCourier(true);\n/* */ \n/* */ }\n/* */ }\n/* 163 */ else if (eff.getPower() > power) {\n/* */ \n/* 165 */ performer.getCommunicator().sendNormalServerMessage(\"You frown as you fail to summon more spirits into the \" + target\n/* 166 */ .getName() + \".\", (byte)3);\n/* */ \n/* 168 */ Server.getInstance().broadCastAction(performer.getName() + \" frowns.\", performer, 5);\n/* */ }\n/* */ else {\n/* */ \n/* 172 */ performer.getCommunicator().sendNormalServerMessage(\"You succeed in summoning more spirits into the \" + this.name + \".\", (byte)2);\n/* */ \n/* */ \n/* 175 */ eff.improvePower(performer, (float)power);\n/* 176 */ if (!target.isEnchantedTurret())\n/* 177 */ target.setHasCourier(true); \n/* 178 */ Server.getInstance().broadCastAction(performer\n/* 179 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 180 */ .getName() + \".\", performer, 5);\n/* */ } \n/* */ }",
"static void healing_challenge3() { //this is where the player will be able to heal himself/herself in boss challenge\n System.out.println(\" You open up the bag to check your inventory...\");\n enter = next.nextLine();\n if(potions <= zero) {\n System.out.println(username + \" feels something in the bag...\");\n System.out.println(\"\\n\");\n System.out.println(\"There is a large object inside, but turns out to be your spell book\");\n enter = next.nextLine();\n System.out.println(\"UH! OH! You ran out of potions. GUESS YOUR ON YOUR OWN!!!\");\n System.out.println(\"\\n\");\n }else if(potions > zero && playerhealth != 3500) { //this makes sure their aren't any loop holes in the game for cheats\n System.out.println(username + \" found a potion in the bag.\");\n System.out.println(username + \" takes the new blue potion and consumes it entirely...\");\n System.out.println(username + \" gained 300 HP points.\");\n playerhealth = playerhealth + 300; //player's health is healed\n potions--;//put it like this, not potions = potions--; This would break the game...\n if(playerhealth > 3500){ //in case that player heals and adds 300 and health goes higher than maixmum\n playerhealth = 3500;\n }\n //in case if player tries to cheat with the maximum health\n }else if (playerhealth == 3500) {\n System.out.println(\"You are at your maximum health...You can't raise it any higher than that...\");\n System.out.println(\"NICE TRY!\");\n } \n }",
"public void takeDamage(double amount, Creature damager)\n\t{\n\t\tthis.health -= amount;\n\n\t\t// Check if dead, handle it\n\t\tif(health <= 0)\n\t\t{\n\t\t\t// Tell the killer that they killed you\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// It's possible that the caster of an effect has\n\t\t\t\t// died by the time the effect kills someone\n\t\t\t\tdamager.targetKilled(this);\n\t\t\t} catch(Exception e)\n\t\t\t{\n\t\t\t\t// No handling is needed\n\t\t\t}\n\n\t\t\tdie();\n\t\t}\n\t}",
"public void die() {\n\t\tsetDead(true);\n\t\tsetHp(0);\n\t\tgetGraphicShapes().get(stats.getBODY()).setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetGraphicShapes().get(stats.getBODY()).setSize(stats.getHeight(), stats.getWidth());\n\t\tgetPhysicalRectangle().setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetPhysicalRectangle().setSize(stats.getHeight(), stats.getWidth());\n\t\tgetGraphicShapes().remove(stats.getWEAPON());\n\t}",
"public static void fly1() {\n System.out.println(\"I don't know why she swallowed that fly,\");\n System.out.println(\"Perhaps she'll die.\");\n System.out.println();\n }",
"public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}",
"@Test\n public void bestowNighthowlerTest() {\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 4);\n // Instant - {2}{R}{R}\n // Chandra's Outrage deals 4 damage to target creature and 2 damage to that creature's controller.\n addCard(Zone.HAND, playerA, \"Chandra's Outrage\");\n\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerB, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerB, \"Swamp\", 4);\n // First strike\n // Whenever Alesha, Who Smiles at Death attacks, you may pay {W/B}{W/B}. If you do, return target creature card\n // with power 2 or less from your graveyard to the battlefield tapped and attacking.\n addCard(Zone.BATTLEFIELD, playerB, \"Alesha, Who Smiles at Death\"); // 3/2\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Nighthowler using bestow\", \"Alesha, Who Smiles at Death\");\n\n // attacks by Alesha and return card on trigger\n attack(2, playerB, \"Alesha, Who Smiles at Death\");\n setChoice(playerB, true); // use trigger\n addTarget(playerB, \"Pillarfield Ox\"); // target card to return\n\n castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Chandra's Outrage\", \"Alesha, Who Smiles at Death\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.END_TURN);\n execute();\n\n assertLife(playerB, 18); // -2 from Chandra's Outrage\n assertLife(playerA, 16); // -3 from attack Alesha with bestowed Nighthowler\n\n assertGraveyardCount(playerA, \"Chandra's Outrage\", 1);\n assertGraveyardCount(playerB, \"Alesha, Who Smiles at Death\", 1);\n assertPermanentCount(playerB, \"Nighthowler\", 1);\n assertPowerToughness(playerB, \"Nighthowler\", 2, 2);\n Permanent nighthowler = getPermanent(\"Nighthowler\", playerB);\n\n Assert.assertEquals(\"Nighthowler has to be a creature\", true, nighthowler.isCreature(currentGame));\n }",
"public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n if (!muted) {\n System.out.println(\"sleep\\t|\\tzzzZZZ *sheep*\");\n }\n }",
"@Override\n\tpublic void breath() {\n\n\t}",
"public void takeDamage(int damage);",
"@Override\n public void chooseAction(){\n healthDecay = getHealth() - 5;\n //now scan for Nazguls\n\n if(healthDecay == 0){\n death(this);\n }\n int scan_result = scan();\n\n if(scan_result == 1){\n move();\n }\n\n if(scan_result == 0 && healthDecay < 75){\n stay();\n }\n\n if(scan_result == 0 && hobbitCounter == 15){\n replicate();\n hobbitCounter = 0;\n }\n\n else{\n move();\n \n }\n hobbitCounter = hobbitCounter + 1;\n }",
"private void collideWithBall() {\n die();\n }",
"private void reapDeadRabbits() {\n\t\tfor (int i = (rabbitList.size() - 1); i >= 0; i--) {\n\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\tif (rabbit.getEnergy() < 1) {\n\t\t\t\trabbitSpace.removeRabbitAt(rabbit.getX(), rabbit.getY());\n\t\t\t\trabbitList.remove(i);\n\t\t\t}\n\t\t}\n\t}",
"public void act() \n {\n EggFactory eggFactory = new EggFactory();\n \n move(4);\n int random = Greenfoot.getRandomNumber(5000);\n if((random>200 & random<300) || ((Farm)getWorld()).atWorldEdge(this))\n {\n turn(180);\n getImage().mirrorVertically();\n move(4);\n \n }\n\n if( Greenfoot.getRandomNumber(100) ==0)\n {\n\n Farm farm = (Farm)getWorld();\n Egg egg = null; \n int eggPicker = Greenfoot.getRandomNumber(80);\n //DropEggStrategy dropEgg = new DropEggStrategy(); //Strategy pattern\n\n IEggStrategy whiteStrategy = new WhiteEggStrategy(eggFactory);\n IEggStrategy blackStrategy = new BlackEggStrategy(eggFactory);\n IEggStrategy goldenStrategy = new GoldenEggStrategy(eggFactory);\n \n DropEggContext context = new DropEggContext();\n \n if(eggPicker >= 50 && eggPicker <= 60){\n \n context.setIEggStrategy(goldenStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else if(eggPicker >= 60 && eggPicker <= 70){\n\n context.setIEggStrategy(blackStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else{\n context.setIEggStrategy(whiteStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n \n egg.register(farm.getLifeObserver());//register life creator observer into egg subject \n\n \n\n }\n\n }",
"private static void berserkerMelee(Player player) {\n\t\tbankInventoryAndEquipment(player);\n\t\tspawnInventory(player, BerserkerMelee.inventory);\n\t\tspawnEquipment(player, BerserkerMelee.equipmentSet(player));\n\t\tupdateEquipment(player);\n\t\theal(player, true, true);\n\t\tsetCombatSkills(player, \"BERSERKER\", false, null);\n\t\tsetPrayerAndMagicBook(player, \"LUNAR\");\n\t\tPresets.isPresetFlagged(player, player.bankIsFullWhileUsingPreset);\n\t}",
"@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"public void sharkAttack() {\n if (fins>0) \n fins--;\n }",
"@Test\n\tpublic void guamContractGuamDead()\n\t{\n\t\tfinal FarmingPatch patch = farmingGuildPatches.get(Varbits.FARMING_4775);\n\n\t\tassertNotNull(patch);\n\n\t\twhen(farmingTracker.predictPatch(patch))\n\t\t\t.thenReturn(new PatchPrediction(Produce.GUAM, CropState.DEAD, 0, 2, 3));\n\n\t\tfarmingContractManager.setContract(Produce.GUAM);\n\n\t\tassertEquals(SummaryState.IN_PROGRESS, farmingContractManager.getSummary());\n\t\tassertEquals(CropState.DEAD, farmingContractManager.getContractCropState());\n\t}",
"public static void horse() {\n System.out.println(\"There was an old woman who swallowed a horse,\");\n System.out.println(\"She died of course.\");\n }",
"@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }",
"public static void bullyAttack(){\n int punch = player.getHealth() - bullyHitPoints ;\n player.setHealth(punch);\n //Step 2: Conditional dialogue\n if(bullyHitPoints > 50) {\n System.out.println(textparser.getMassiveDamage() + bullyHitPoints + textparser.getToYou());\n }else if(bullyHitPoints > 25){\n System.out.println(textparser.getPunch() + bullyHitPoints + textparser.getToYou());\n }else{\n System.out.println(textparser.getDidntHurtMuch() + bullyHitPoints + textparser.getToYou());\n }\n }",
"public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }",
"abstract protected void brew();",
"public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }",
"public boolean Fight(Player p)\n{\n\tint m=1;\n\t int t=1;\n int temp=0;\n int player1=this.weapon-1;\n int player2=p.weapon-1;\n\n\t int[] a=new int[this.weapon];\n int[] b=new int[p.weapon];\n System.out.println(\"XXxxXXxxXXxxXXxxXX FIGHT XXxxXXxxXXxxXXxxXX\\n\");\nwhile(this.health>0&&p.health>0)\n{\n System.out.println(\"~~~~~Round: \" +m+\"~~~~~\");\n m++;\n System.out.println(\"++\"+this.name+\" Health: \"+this.health+\" potions.\");\n System.out.println(\"++\"+p.name+\" Health: \"+p.health+\" potions.\");\n\n for (int i=0;i<a.length;i++)\n {\n\ta[i]=this.Roll();\n }\n for(int j=0;j<b.length;j++)\n {\n\tb[j]=p.Roll();\n }\n\n Arrays.sort(a);\n Arrays.sort(b);\n\n System.out.print(this.name+\" has thrown: {\");\n\n for(int i=a.length-1;i>0;i--)\n System.out.print(a[i]+\", \");\n\n System.out.println(a[0]+\"}\");\n\n System.out.print(p.name+\" has thrown: {\");\n for(int j=b.length-1;j>0;j--)\n System.out.print(b[j]+\", \");\n\n System.out.println(b[0]+\"}\");\n\n if(a.length>b.length)\n \ttemp=b.length;\n else\n \ttemp=a.length;\n\n player1=this.weapon-1;\n player2=p.weapon-1;\n t=1;\n while(this.health>0&&p.health>0&&temp>0)\n \t{\n\n System.out.print(\"***Strike \"+t+\": \");\n if(a[player1]==b[player2])\n {\n \tSystem.out.println(\"BOTH suffer blows!!!\");\n \tthis.health-=a[player1]*10;\n \tp.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n \tSystem.out.println(p.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n else if(a[player1]>b[player2])\n {\n \t\tSystem.out.println(p.name+\" does damage!\");\n \tp.health-=a[player1]*10;\n \tSystem.out.println(p.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n }\n else\n {\n \tSystem.out.println(this.name+\" does damage!\");\n \tthis.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n\n player1--;\n player2--;\n\n temp--;\n t++;\n \t}\n\n\n}\nif(this.health<=0)\n return false;\n else\n \treturn true;\n\n}",
"static void Dungeonforgotten() {\n\t\t\n\t\tint[] lvldata;\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Fate has chosen...\");\n\t\tSystem.out.println(\"|| The Forgotten dungeon ||\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"The Forgotten dungeon is an EASY dungeon in which every book you find contains sacred text of a civilization,\\n whose language is long forgotten, but their magical powers have anything but dwindled.\");\n\t\tSystem.out.println(\"By completing this dungeon you will increase your ability to read their language,\\n and thus, understand their arcane arts.\");\n\t\t\n\t\tdungeonsize = (int) (Math.random() * 12) + 5;\n\t\tdungeondiff = 0.6;\n\t\thubcount = (int) (Math.random() * 3) + 1;\t\n\t\tlvldata = LevelGen();\n\t\tfor(int i = 1; i < dungeonsize - 1; i++) {\n\t\t\tEngine.roomaction(lvldata[i]);\n\t\t\t// TODO Forgotten progression\n\t\t}\n\t\tSystem.out.println(\"\tDebug: DungeonForgotten passed\");\n\t}"
] | [
"0.63605726",
"0.6353565",
"0.6321844",
"0.62657803",
"0.62398756",
"0.6222088",
"0.6178101",
"0.6145951",
"0.6144961",
"0.6133854",
"0.6116276",
"0.6114738",
"0.6094429",
"0.6037124",
"0.6018944",
"0.5991045",
"0.59906423",
"0.59669673",
"0.59601784",
"0.5956033",
"0.59505606",
"0.5936895",
"0.5936701",
"0.5927455",
"0.590598",
"0.58934706",
"0.58740526",
"0.58678466",
"0.5867029",
"0.58575547",
"0.58397",
"0.58282274",
"0.5827026",
"0.5818865",
"0.581719",
"0.58148074",
"0.5810614",
"0.5802318",
"0.5799565",
"0.57835305",
"0.57818264",
"0.57818264",
"0.5780042",
"0.5778924",
"0.5777172",
"0.57766604",
"0.5772057",
"0.576833",
"0.5763637",
"0.57563794",
"0.5755015",
"0.57549626",
"0.57547605",
"0.5753754",
"0.5749289",
"0.5748036",
"0.5740687",
"0.5740469",
"0.57263666",
"0.5724094",
"0.5722892",
"0.5722594",
"0.5711557",
"0.5705075",
"0.570006",
"0.5696502",
"0.56947786",
"0.5694258",
"0.5693027",
"0.56894904",
"0.5689214",
"0.5688258",
"0.56868947",
"0.5685936",
"0.56859285",
"0.56841713",
"0.5677785",
"0.5676319",
"0.5671949",
"0.56612694",
"0.56579787",
"0.5652211",
"0.56520015",
"0.56433773",
"0.56428057",
"0.56349087",
"0.5634392",
"0.563273",
"0.5631905",
"0.5631806",
"0.56300724",
"0.5626876",
"0.5620823",
"0.56203",
"0.5612104",
"0.56120306",
"0.5608021",
"0.56010056",
"0.5600028",
"0.55999994",
"0.5598841"
] | 0.0 | -1 |
com.neurolab.geometria.domain.Figura figura = new com.neurolab.geometria.domain.Figura(); | public static void main(String[] args) {
Triangulo triangulo = new TrianguloEquilatero();
Rectangulo rectangulo = new Rectangulo();
Circulo circulo = new Circulo();
Matematica matematica = new Matematica();
matematica.calcularArea(triangulo);
matematica.calcularArea(rectangulo);
System.out.println("Area cuadrado: " + rectangulo.getArea());
matematica.calcularArea(circulo);
matematica.calcularPerimetro(triangulo);
matematica.calcularPerimetro(rectangulo);
matematica.calcularPerimetro(circulo);
// No se permite porque solo tiene metodos estaticos
// y por eso se creo el contructor privado
// MatematicaUtils matematicaUtils = new MatematicaUtils();
double suma = MatematicaUtils.suma(1,2,3,4,5);
System.out.println("Suma: " + suma);
String[] nombres = StringUtils.dividir1();
System.out.println("Cadena estatico: " + StringUtils.cadena1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Factura() {\r\n }",
"public Factura() {\r\n }",
"public Facturacion() {\n }",
"public Prova() {}",
"public Aritmetica(){ }",
"public static void main(String[] args) {\n FiguraGeometrica figura = new Rectangulo(\"Rectangulo\");\n figura.dibujar();\n System.out.println(\"figura = \" + figura);\n \n }",
"public PersonaFisica() {}",
"public Egrga() {\r\n\t}",
"public Estado() {\n }",
"public Alojamiento() {\r\n\t}",
"@Override\n\tpublic void obavesti(KruznaFigura figura) {\n\t\t\n\t}",
"Foco createFoco();",
"public Caso_de_uso () {\n }",
"public Corso() {\n\n }",
"public void carregar(DadosGrafico dados){\r\n \r\n }",
"public AfiliadoVista() {\r\n }",
"public Estado() {\r\n }",
"public Odontologo() {\n }",
"public Carrera(){\n }",
"public Exercicio(){\n \n }",
"public Firma() {\n }",
"public Veiculo() {\r\n\r\n }",
"public Gasto() {\r\n\t}",
"public Vehiculo() {\r\n }",
"private QuadradoPerfeito() {\n }",
"public Fogon (String cocineroActual){\n Cocinero = cocineroActual;\n grados = 0; \n }",
"@Override\n\tpublic void generarFactura() {\n\t\t\n\t}",
"public Propiedad(){\n\t}",
"@Test\n\tpublic void ricercaSinteticaClassificatoreGSAFigli() {\n\n\t}",
"public Laboratorio() {}",
"public FacturaBean() {\n }",
"public Manusia() {}",
"public Transportista() {\n }",
"public prueba()\r\n {\r\n }",
"SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();",
"public MorteSubita() {\n }",
"public Venda() {\n }",
"public Portfolio() {\n}",
"public Historique()\n\t{\n\t\t\n\t}",
"public Factura4(){\n this.totalZapatos=0;\n this.totalZapatosNacional=0;\n this.totalZapatosArtesanal=0;\n\n }",
"public Produto() {}",
"public Kullanici() {}",
"public VotacaoSegundoDia() {\n\n\t}",
"Dimension_hauteur createDimension_hauteur();",
"public static Grafo criarGrafo() {/* Este método tem função de criar um grafo. */\r\n\t\tGrafo grafo = new Grafo();/* Aqui um grafo é criado */\r\n\t\t/*\r\n\t\t * Aqui são criados nós e em seguida adcionados a lista de nós do grafo\r\n\t\t * criado\r\n\t\t */\r\n\t\tgrafo.addNo(new No(\"n1\"));\r\n\t\tgrafo.addNo(new No(\"n2\"));\r\n\t\tgrafo.addNo(new No(\"n3\"));\r\n\t\tgrafo.addNo(new No(\"n4\"));\r\n\t\tgrafo.addNo(new No(\"n5\"));\r\n\r\n\t\t/*\r\n\t\t * Aqui as arestas são criadas e seus parâmetros para o método\r\n\t\t * construtor são passados. Os vértices que compõe cada aresta são\r\n\t\t * retiradas diretamente da lista de aresta do grafo.\r\n\t\t */\r\n\t\tAresta a1 = new Aresta(\"a1\", grafo.getNos().get(0), grafo.getNos().get(4), 1);\r\n\t\tAresta a2 = new Aresta(\"a2\",grafo.getNos().get(0), grafo.getNos().get(2), 2);\r\n\t\tAresta a3 = new Aresta(\"a3\",grafo.getNos().get(1), grafo.getNos().get(3), 4);\r\n\t\tAresta a4 = new Aresta(\"a4\",grafo.getNos().get(1), grafo.getNos().get(4), 4);\r\n\t\tAresta a5 = new Aresta(\"a5\",grafo.getNos().get(2), grafo.getNos().get(3), 3);\r\n\t\tAresta a6 = new Aresta(\"a6\",grafo.getNos().get(3), grafo.getNos().get(4), 1);\r\n\r\n\t\t/* As arestas são adcionadas a lista de arestas do grafo. */\r\n\t\tgrafo.addAresta(a1);\r\n\t\tgrafo.addAresta(a2);\r\n\t\tgrafo.addAresta(a3);\r\n\t\tgrafo.addAresta(a4);\r\n\t\tgrafo.addAresta(a5);\r\n\t\tgrafo.addAresta(a6);\r\n\r\n\t\treturn grafo;/* O grafo criado é retornado */\r\n\r\n\t}",
"public Troco() {\n }",
"public Cgg_jur_anticipo(){}",
"public Ciudad()\n {\n\n }",
"public SlanjePoruke() {\n }",
"Oracion createOracion();",
"public Portfolio(){\n }",
"public Facility() {\n }",
"public Visita() {\n initialize();\n }",
"Petunia() {\r\n\t\t}",
"public GestioneApplicazione() {\n }",
"public Clade() {}",
"public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }",
"public Pila () {\n raiz=null; //Instanciar un objeto tipo nodo;\n }",
"public AgenteEstAleatorio() {\r\n }",
"public Espacio() {\n dib=new Dibujo(\"Simulacion de satelites\", 800,800);\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta();\n }",
"public Portfolio(){}",
"public Respuesta() {\n }",
"Vaisseau createVaisseau();",
"public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public FiltroMicrorregiao() {\r\n }",
"public gui obtenerGrafica();",
"SpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide createSpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide();",
"public Persona() {\n }",
"Klassenstufe createKlassenstufe();",
"protected Asignatura()\r\n\t{}",
"public interface MovimientoConFlete extends MovimientoCosteable{\t\r\n\t\r\n\tpublic String getRemision() ;\r\n\t\r\n\tpublic Producto getProducto();\r\n\t\r\n\tpublic Sucursal getSucursal();\r\n\t\r\n\tpublic Long getDocumento();\r\n\t\r\n\tpublic Date getFecha();\r\n\t\r\n\tpublic double getKilosCalculados();\r\n\t\r\n\tpublic double getCantidad();\r\n\t\r\n\tpublic double getFactor();\r\n\t\r\n\tpublic String getTipoDocto();\r\n\t\r\n\tpublic BigDecimal getCostoFlete();\t\r\n\r\n\tpublic void setCostoFlete(BigDecimal costoFlete);\r\n\t\r\n\tpublic BigDecimal getImporteDelFlete();\r\n\r\n\tpublic AnalisisDeFlete getAnalisisFlete();\r\n\r\n\tpublic void setAnalisisFlete(AnalisisDeFlete analisisFlete);\r\n\t\r\n\tpublic void actualizarCosto();\r\n\r\n}",
"public Estado() {\r\n //Constructor vacio\r\n }",
"public Persona() {\n\t}",
"public NhanVien()\n {\n }",
"public Aktie() {\n }",
"public Classe() {\r\n }",
"public Producto() {\r\n }",
"public Plato(){\n\t\t\n\t}",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public Sistema(){\r\n\t\t\r\n\t}",
"AliciaLab createAliciaLab();",
"public Corrida(){\n\n }",
"public Persona(){\n \n }",
"public Persona(){\n \n }",
"public Curso() {\r\n }",
"SpaceInvaderTest_test_VaisseauAvance_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauAvance_DeplacerVaisseauVersLaDroite();",
"public Producto (){\n\n }",
"MaquinaCafetera(){\n }",
"public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }",
"public Prestamo() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Pasien() {\r\n }",
"public PersistenciaCMT() {\n\n }",
"public AntrianPasien() {\r\n\r\n }",
"public LocalResidenciaColaborador() {\n //ORM\n }",
"public Busca(){\n }",
"private IngenicoDisplay(){\n\n }",
"public B_NotaFiscal gera(C_Fatura fatura) {\n\t\tB_NotaFiscal nf = geraNF(fatura);\n//\t\tenviaEmail(nf);\n//\t\tsalvaNoBanco(nf);\n//\t\tnew I_EnviadorDeEmail().enviaEmail(nf);\n//\t\tnew H_NFDao().salvaNoBanco(nf);\n\t\t\n\t\treturn nf;\n\t\t//Alem disso, o eclipse tambem pode ajudar voce no refactor de extract classes\n\t}",
"public RptPotonganGaji() {\n }",
"public ChoixEntreprise() {\n\n }",
"public TebakNusantara()\n {\n }",
"SpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche();"
] | [
"0.702139",
"0.702139",
"0.6737651",
"0.6634598",
"0.6615231",
"0.6505362",
"0.64562535",
"0.63883144",
"0.6300739",
"0.6295353",
"0.6286592",
"0.62844324",
"0.6273247",
"0.62576294",
"0.62522507",
"0.62167233",
"0.6210444",
"0.619894",
"0.6197415",
"0.6192602",
"0.6189188",
"0.61808246",
"0.6161106",
"0.6155268",
"0.6133638",
"0.6081102",
"0.60765",
"0.60309863",
"0.6029392",
"0.6026304",
"0.60124385",
"0.6008935",
"0.6007056",
"0.59884465",
"0.59884363",
"0.598533",
"0.59835815",
"0.59654826",
"0.59654343",
"0.5965172",
"0.5954946",
"0.59506434",
"0.5949738",
"0.59467375",
"0.59447443",
"0.5937109",
"0.5922875",
"0.59123737",
"0.5908143",
"0.5907155",
"0.590585",
"0.5903696",
"0.5902386",
"0.5901991",
"0.58964974",
"0.5889038",
"0.5886704",
"0.58851445",
"0.5880092",
"0.5877606",
"0.58752024",
"0.5873604",
"0.5872658",
"0.587153",
"0.587005",
"0.5867201",
"0.58558136",
"0.58462244",
"0.58361304",
"0.5834497",
"0.58285123",
"0.5826817",
"0.58235645",
"0.58203703",
"0.5817863",
"0.58162874",
"0.58128285",
"0.5811526",
"0.58078194",
"0.5805825",
"0.5798865",
"0.57933635",
"0.579191",
"0.579191",
"0.57902795",
"0.5788944",
"0.5785744",
"0.57677394",
"0.57669383",
"0.57666403",
"0.5764548",
"0.5760124",
"0.5756644",
"0.5743795",
"0.57349366",
"0.57263964",
"0.57229865",
"0.5720632",
"0.5720376",
"0.5718575",
"0.57166654"
] | 0.0 | -1 |
Created by sulistiyanto on 07/12/16. | public interface RegisterAPI {
@FormUrlEncoded
@POST("android/restfull/insert.php")
Call<Value> daftar(@Field("kode") String kode,
@Field("nama") String nama,
@Field("harga") String harga);
@GET("android/restfull/view.php")
Call<Value> view();
@FormUrlEncoded
@POST("android/restfull/update.php")
Call<Value> ubah(@Field("kode") String kode,
@Field("nama") String nama,
@Field("harga") String harga);
@FormUrlEncoded
@POST("android/restfull/delete.php")
Call<Value> hapus(@Field("kode") String kode);
@FormUrlEncoded
@POST("android/restfull/search.php")
Call<Value> search(@Field("search") String search);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"@Override\n protected void init() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"public void mo4359a() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void initialize() { \n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n\tpublic void postInit() {\n\t\t\n\t}",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}"
] | [
"0.61484927",
"0.60375565",
"0.59717387",
"0.5912948",
"0.591049",
"0.58765185",
"0.58765185",
"0.58503187",
"0.58385754",
"0.58215386",
"0.58132255",
"0.5792595",
"0.57871604",
"0.57619387",
"0.5758467",
"0.57428813",
"0.57372046",
"0.5716779",
"0.57092524",
"0.57092524",
"0.56942564",
"0.5664726",
"0.56419194",
"0.56419194",
"0.56419194",
"0.56419194",
"0.56419194",
"0.5611587",
"0.5605514",
"0.5605202",
"0.56032085",
"0.5583583",
"0.5579019",
"0.5578938",
"0.55760556",
"0.5570317",
"0.55659",
"0.5555015",
"0.55527735",
"0.55527735",
"0.55509984",
"0.554762",
"0.5546008",
"0.5532461",
"0.5531125",
"0.5531125",
"0.5527669",
"0.5527669",
"0.5527669",
"0.55237603",
"0.5522528",
"0.5522528",
"0.5522528",
"0.5522528",
"0.5522528",
"0.5522528",
"0.55219257",
"0.55219257",
"0.55219257",
"0.5519949",
"0.5509142",
"0.5498277",
"0.54976594",
"0.54943573",
"0.54927844",
"0.54927844",
"0.54927844",
"0.5488578",
"0.5486777",
"0.5483624",
"0.5475764",
"0.5475764",
"0.5465898",
"0.54519665",
"0.5451016",
"0.54451454",
"0.54338545",
"0.543313",
"0.5422648",
"0.54208124",
"0.5418134",
"0.54050446",
"0.5395332",
"0.539474",
"0.53938085",
"0.5386848",
"0.53677267",
"0.5348084",
"0.5348084",
"0.5347631",
"0.5336637",
"0.5336637",
"0.5336637",
"0.5336637",
"0.5336637",
"0.5336637",
"0.5336637",
"0.53348386",
"0.532694",
"0.532093",
"0.5320039"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.